Difference between revisions of "Team:Sydney Australia/Hexagon"

Line 5: Line 5:
 
break t}}else f=!0,n=r,r.last=r.eq?D(i,null):i,r.fn(i,a===m?i:a,$),5>b&&(g=4-b,A[g]||(A[g]=[]),A[g].push({msg:k(r.exp)?"fn: "+(r.exp.name||r.exp.toString()):r.exp,newVal:i,oldVal:a}))}catch(O){s(O)}if(!(p=$.$$childHead||$!==C&&$.$$nextSibling))for(;$!==C&&!(p=$.$$nextSibling);)$=$.$parent}while($=p);if((f||x.length)&&!b--)throw h(),e("infdig","{0} $digest() iterations reached. Aborting!\nWatchers fired in the last 5 iterations: {1}",t,A)}while(f||x.length);for(h();S.length;)try{S.shift()()}catch(O){s(O)}},$destroy:function(){if(!this.$$destroyed){var t=this.$parent;if(this.$broadcast("$destroy"),this.$$destroyed=!0,this!==w){for(var e in this.$$listenerCount)$(this,this.$$listenerCount[e],e);t.$$childHead==this&&(t.$$childHead=this.$$nextSibling),t.$$childTail==this&&(t.$$childTail=this.$$prevSibling),this.$$prevSibling&&(this.$$prevSibling.$$nextSibling=this.$$nextSibling),this.$$nextSibling&&(this.$$nextSibling.$$prevSibling=this.$$prevSibling),this.$destroy=this.$digest=this.$apply=this.$evalAsync=this.$applyAsync=p,this.$on=this.$watch=this.$watchGroup=function(){return p},this.$$listeners={},this.$parent=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=this.$root=this.$$watchers=null}}},$eval:function(t,e){return u(t)(this,e)},$evalAsync:function(t,e){w.$$phase||x.length||c.defer(function(){x.length&&w.$digest()}),x.push({scope:this,expression:t,locals:e})},$$postDigest:function(t){S.push(t)},$apply:function(t){try{return d("$apply"),this.$eval(t)}catch(e){s(e)}finally{h();try{w.$digest()}catch(e){throw s(e),e}}},$applyAsync:function(t){function e(){n.$eval(t)}var n=this;t&&C.push(e),b()},$on:function(t,e){var n=this.$$listeners[t];n||(this.$$listeners[t]=n=[]),n.push(e);var r=this;do r.$$listenerCount[t]||(r.$$listenerCount[t]=0),r.$$listenerCount[t]++;while(r=r.$parent);var i=this;return function(){var r=n.indexOf(e);-1!==r&&(n[r]=null,$(i,1,t))}},$emit:function(t){var e,n,r,i=[],a=this,o=!1,u={name:t,targetScope:a,stopPropagation:function(){o=!0},preventDefault:function(){u.defaultPrevented=!0},defaultPrevented:!1},l=_([u],arguments,1);do{for(e=a.$$listeners[t]||i,u.currentScope=a,n=0,r=e.length;r>n;n++)if(e[n])try{e[n].apply(null,l)}catch(c){s(c)}else e.splice(n,1),n--,r--;if(o)return u.currentScope=null,u;a=a.$parent}while(a);return u.currentScope=null,u},$broadcast:function(t){var e=this,n=e,r=e,i={name:t,targetScope:e,preventDefault:function(){i.defaultPrevented=!0},defaultPrevented:!1};if(!e.$$listenerCount[t])return i;for(var a,o,u,l=_([i],arguments,1);n=r;){for(i.currentScope=n,a=n.$$listeners[t]||[],o=0,u=a.length;u>o;o++)if(a[o])try{a[o].apply(null,l)}catch(c){s(c)}else a.splice(o,1),o--,u--;if(!(r=n.$$listenerCount[t]&&n.$$childHead||n!==e&&n.$$nextSibling))for(;n!==e&&!(r=n.$$nextSibling);)n=n.$parent}return i.currentScope=null,i}};var w=new f,x=w.$$asyncQueue=[],S=w.$$postDigestQueue=[],C=w.$$applyAsyncQueue=[];return w}]}function Yn(){var t=/^\s*(https?|ftp|mailto|tel|file):/,e=/^\s*((https?|ftp|file|blob):|data:image\/)/;this.aHrefSanitizationWhitelist=function(e){return v(e)?(t=e,this):t},this.imgSrcSanitizationWhitelist=function(t){return v(t)?(e=t,this):e},this.$get=function(){return function(n,r){var i,a=r?e:t;return i=ir(n).href,""===i||i.match(a)?n:"unsafe:"+i}}}function Zn(t){if("self"===t)return t;if(b(t)){if(t.indexOf("***")>-1)throw va("iwcard","Illegal sequence *** in string matcher.  String: {0}",t);return t=di(t).replace("\\*\\*",".*").replace("\\*","[^:/.?&;]*"),new RegExp("^"+t+"$")}if(S(t))return new RegExp("^"+t.source+"$");throw va("imatcher",'Matchers may only be "self", string patterns or RegExp objects')}function Kn(t){var e=[];return v(t)&&a(t,function(t){e.push(Zn(t))}),e}function Xn(){this.SCE_CONTEXTS=ya;var t=["self"],e=[];this.resourceUrlWhitelist=function(e){return arguments.length&&(t=Kn(e)),t},this.resourceUrlBlacklist=function(t){return arguments.length&&(e=Kn(t)),e},this.$get=["$injector",function(r){function i(t,e){return"self"===t?ar(e):!!t.exec(e.href)}function a(n){var r,a,o=ir(n.toString()),s=!1;for(r=0,a=t.length;a>r;r++)if(i(t[r],o)){s=!0;break}if(s)for(r=0,a=e.length;a>r;r++)if(i(e[r],o)){s=!1;break}return s}function o(t){var e=function(t){this.$$unwrapTrustedValue=function(){return t}};return t&&(e.prototype=new t),e.prototype.valueOf=function(){return this.$$unwrapTrustedValue()},e.prototype.toString=function(){return this.$$unwrapTrustedValue().toString()},e}function s(t,e){var r=d.hasOwnProperty(t)?d[t]:null;if(!r)throw va("icontext","Attempted to trust a value in invalid context. Context: {0}; Value: {1}",t,e);if(null===e||e===n||""===e)return e;if("string"!=typeof e)throw va("itype","Attempted to trust a non-string value in a content requiring a string: Context: {0}",t);return new r(e)}function u(t){return t instanceof f?t.$$unwrapTrustedValue():t}function l(t,e){if(null===e||e===n||""===e)return e;var r=d.hasOwnProperty(t)?d[t]:null;if(r&&e instanceof r)return e.$$unwrapTrustedValue();if(t===ya.RESOURCE_URL){if(a(e))return e;throw va("insecurl","Blocked loading resource from url not allowed by $sceDelegate policy.  URL: {0}",e.toString())}if(t===ya.HTML)return c(e);throw va("unsafe","Attempting to use an unsafe value in a safe context.")}var c=function(){throw va("unsafe","Attempting to use an unsafe value in a safe context.")};r.has("$sanitize")&&(c=r.get("$sanitize"));var f=o(),d={};return d[ya.HTML]=o(f),d[ya.CSS]=o(f),d[ya.URL]=o(f),d[ya.JS]=o(f),d[ya.RESOURCE_URL]=o(d[ya.URL]),{trustAs:s,getTrusted:l,valueOf:u}}]}function Qn(){var t=!0;this.enabled=function(e){return arguments.length&&(t=!!e),t},this.$get=["$parse","$sceDelegate",function(e,n){if(t&&8>Xr)throw va("iequirks","Strict Contextual Escaping does not support Internet Explorer version < 11 in quirks mode.  You can fix this by adding the text <!doctype html> to the top of your HTML document.  See http://docs.angularjs.org/api/ng.$sce for more information.");var r=R(ya);r.isEnabled=function(){return t},r.trustAs=n.trustAs,r.getTrusted=n.getTrusted,r.valueOf=n.valueOf,t||(r.trustAs=r.getTrusted=function(t,e){return e},r.valueOf=$),r.parseAs=function(t,n){var i=e(n);return i.literal&&i.constant?i:e(n,function(e){return r.getTrusted(t,e)})};var i=r.parseAs,o=r.getTrusted,s=r.trustAs;return a(ya,function(t,e){var n=Wr(e);r[$e("parse_as_"+n)]=function(e){return i(t,e)},r[$e("get_trusted_"+n)]=function(e){return o(t,e)},r[$e("trust_as_"+n)]=function(e){return s(t,e)}}),r}]}function tr(){this.$get=["$window","$document",function(t,e){var n,r,i={},a=d((/android (\d+)/.exec(Wr((t.navigator||{}).userAgent))||[])[1]),o=/Boxee/i.test((t.navigator||{}).userAgent),s=e[0]||{},u=/^(Moz|webkit|ms)(?=[A-Z])/,l=s.body&&s.body.style,c=!1,f=!1;if(l){for(var h in l)if(r=u.exec(h)){n=r[0],n=n.substr(0,1).toUpperCase()+n.substr(1);break}n||(n="WebkitOpacity"in l&&"webkit"),c=!!("transition"in l||n+"Transition"in l),f=!!("animation"in l||n+"Animation"in l),!a||c&&f||(c=b(s.body.style.webkitTransition),f=b(s.body.style.webkitAnimation))}return{history:!(!t.history||!t.history.pushState||4>a||o),hasEvent:function(t){if("input"===t&&11>=Xr)return!1;if(g(i[t])){var e=s.createElement("div");i[t]="on"+t in e}return i[t]},csp:hi(),vendorPrefix:n,transitions:c,animations:f,android:a}}]}function er(){this.$get=["$templateCache","$http","$q",function(t,e,n){function r(i,a){function o(t){if(!a)throw Wi("tpload","Failed to load template: {0}",i);return n.reject(t)}r.totalPendingRequests++;var s=e.defaults&&e.defaults.transformResponse;ci(s)?s=s.filter(function(t){return t!==an}):s===an&&(s=null);var u={cache:t,transformResponse:s};return e.get(i,u).finally(function(){r.totalPendingRequests--}).then(function(t){return t.data},o)}return r.totalPendingRequests=0,r}]}function nr(){this.$get=["$rootScope","$browser","$location",function(t,e,n){var r={};return r.findBindings=function(t,e,n){var r=t.getElementsByClassName("ng-binding"),i=[];return a(r,function(t){var r=si.element(t).data("$binding");r&&a(r,function(r){if(n){var a=new RegExp("(^|\\s)"+di(e)+"(\\s|\\||$)");a.test(r)&&i.push(t)}else-1!=r.indexOf(e)&&i.push(t)})}),i},r.findModels=function(t,e,n){for(var r=["ng-","data-ng-","ng\\:"],i=0;i<r.length;++i){var a=n?"=":"*=",o="["+r[i]+"model"+a+'"'+e+'"]',s=t.querySelectorAll(o);if(s.length)return s}},r.getLocation=function(){return n.url()},r.setLocation=function(e){e!==n.url()&&(n.url(e),t.$digest())},r.whenStable=function(t){e.notifyWhenNoOutstandingRequests(t)},r}]}function rr(){this.$get=["$rootScope","$browser","$q","$$q","$exceptionHandler",function(t,e,n,r,i){function a(a,s,u){var l,c=v(u)&&!u,f=(c?r:n).defer(),d=f.promise;return l=e.defer(function(){try{f.resolve(a())}catch(e){f.reject(e),i(e)}finally{delete o[d.$$timeoutId]}c||t.$apply()},s),d.$$timeoutId=l,o[l]=f,d}var o={};return a.cancel=function(t){return t&&t.$$timeoutId in o?(o[t.$$timeoutId].reject("canceled"),delete o[t.$$timeoutId],e.defer.cancel(t.$$timeoutId)):!1},a}]}function ir(t){var e=t;return Xr&&(ba.setAttribute("href",e),e=ba.href),ba.setAttribute("href",e),{href:ba.href,protocol:ba.protocol?ba.protocol.replace(/:$/,""):"",host:ba.host,search:ba.search?ba.search.replace(/^\?/,""):"",hash:ba.hash?ba.hash.replace(/^#/,""):"",hostname:ba.hostname,port:ba.port,pathname:"/"===ba.pathname.charAt(0)?ba.pathname:"/"+ba.pathname}}function ar(t){var e=b(t)?ir(t):t;return e.protocol===wa.protocol&&e.host===wa.host}function or(){this.$get=m(t)}function sr(t){function e(r,i){if(y(r)){var o={};return a(r,function(t,n){o[n]=e(n,t)}),o}return t.factory(r+n,i)}var n="Filter";this.register=e,this.$get=["$injector",function(t){return function(e){return t.get(e+n)}}],e("currency",fr),e("date",xr),e("filter",ur),e("json",kr),e("limitTo",Sr),e("lowercase",Aa),e("number",dr),e("orderBy",Cr),e("uppercase",Oa)}function ur(){return function(t,e,n){if(!ci(t))return t;var r,i;switch(typeof e){case"function":r=e;break;case"boolean":case"number":case"string":i=!0;case"object":r=lr(e,n,i);break;default:return t}return t.filter(r)}}function lr(t,e,n){var r,i=y(t)&&"$"in t;return e===!0?e=I:k(e)||(e=function(t,e){return y(t)||y(e)?!1:(t=Wr(""+t),e=Wr(""+e),-1!==t.indexOf(e))}),r=function(r){return i&&!y(r)?cr(r,t.$,e,!1):cr(r,t,e,n)}}function cr(t,e,n,r,i){var a=typeof t,o=typeof e;if("string"===o&&"!"===e.charAt(0))return!cr(t,e.substring(1),n,r);if(ci(t))return t.some(function(t){return cr(t,e,n,r)});switch(a){case"object":var s;if(r){for(s in t)if("$"!==s.charAt(0)&&cr(t[s],e,n,!0))return!0;return i?!1:cr(t,e,n,!1)}if("object"===o){for(s in e){var u=e[s];if(!k(u)){var l="$"===s,c=l?t:t[s];if(!cr(c,u,n,l,l))return!1}}return!0}return n(t,e);case"function":return!1;default:return n(t,e)}}function fr(t){var e=t.NUMBER_FORMATS;return function(t,n,r){return g(n)&&(n=e.CURRENCY_SYM),g(r)&&(r=e.PATTERNS[1].maxFrac),null==t?t:hr(t,e.PATTERNS[1],e.GROUP_SEP,e.DECIMAL_SEP,r).replace(/\u00A4/g,n)}}function dr(t){var e=t.NUMBER_FORMATS;return function(t,n){return null==t?t:hr(t,e.PATTERNS[0],e.GROUP_SEP,e.DECIMAL_SEP,n)}}function hr(t,e,n,r,i){if(!isFinite(t)||y(t))return"";var a=0>t;t=Math.abs(t);var o=t+"",s="",u=[],l=!1;if(-1!==o.indexOf("e")){var c=o.match(/([\d\.]+)e(-?)(\d+)/);c&&"-"==c[2]&&c[3]>i+1?t=0:(s=o,l=!0)}if(l)i>0&&1>t&&(s=t.toFixed(i),t=parseFloat(s));else{var f=(o.split(xa)[1]||"").length;g(i)&&(i=Math.min(Math.max(e.minFrac,f),e.maxFrac)),t=+(Math.round(+(t.toString()+"e"+i)).toString()+"e"+-i);var d=(""+t).split(xa),h=d[0];d=d[1]||"";var p,$=0,m=e.lgSize,v=e.gSize;if(h.length>=m+v)for($=h.length-m,p=0;$>p;p++)($-p)%v===0&&0!==p&&(s+=n),s+=h.charAt(p);for(p=$;p<h.length;p++)(h.length-p)%m===0&&0!==p&&(s+=n),s+=h.charAt(p);for(;d.length<i;)d+="0";i&&"0"!==i&&(s+=r+d.substr(0,i))}return 0===t&&(a=!1),u.push(a?e.negPre:e.posPre,s,a?e.negSuf:e.posSuf),u.join("")}function pr(t,e,n){var r="";for(0>t&&(r="-",t=-t),t=""+t;t.length<e;)t="0"+t;return n&&(t=t.substr(t.length-e)),r+t}function $r(t,e,n,r){return n=n||0,function(i){var a=i["get"+t]();return(n>0||a>-n)&&(a+=n),0===a&&-12==n&&(a=12),pr(a,e,r)}}function mr(t,e){return function(n,r){var i=n["get"+t](),a=Yr(e?"SHORT"+t:t);return r[a][i]}}function gr(t){var e=-1*t.getTimezoneOffset(),n=e>=0?"+":"";return n+=pr(Math[e>0?"floor":"ceil"](e/60),2)+pr(Math.abs(e%60),2)}function vr(t){var e=new Date(t,0,1).getDay();return new Date(t,0,(4>=e?5:12)-e)}function yr(t){return new Date(t.getFullYear(),t.getMonth(),t.getDate()+(4-t.getDay()))}function br(t){return function(e){var n=vr(e.getFullYear()),r=yr(e),i=+r-+n,a=1+Math.round(i/6048e5);return pr(a,t)}}function wr(t,e){return t.getHours()<12?e.AMPMS[0]:e.AMPMS[1]}function xr(t){function e(t){var e;if(e=t.match(n)){var r=new Date(0),i=0,a=0,o=e[8]?r.setUTCFullYear:r.setFullYear,s=e[8]?r.setUTCHours:r.setHours;e[9]&&(i=d(e[9]+e[10]),a=d(e[9]+e[11])),o.call(r,d(e[1]),d(e[2])-1,d(e[3]));var u=d(e[4]||0)-i,l=d(e[5]||0)-a,c=d(e[6]||0),f=Math.round(1e3*parseFloat("0."+(e[7]||0)));return s.call(r,u,l,c,f),r}return t}var n=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;return function(n,r,i){var o,s,u="",l=[];if(r=r||"mediumDate",r=t.DATETIME_FORMATS[r]||r,b(n)&&(n=Ca.test(n)?d(n):e(n)),w(n)&&(n=new Date(n)),!x(n))return n;for(;r;)s=Sa.exec(r),s?(l=_(l,s,1),r=l.pop()):(l.push(r),r=null);return i&&"UTC"===i&&(n=new Date(n.getTime()),n.setMinutes(n.getMinutes()+n.getTimezoneOffset())),a(l,function(e){o=ka[e],u+=o?o(n,t.DATETIME_FORMATS):e.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),u}}function kr(){return function(t,e){return g(e)&&(e=2),H(t,e)}}function Sr(){return function(t,e){return w(t)&&(t=t.toString()),ci(t)||b(t)?(e=1/0===Math.abs(Number(e))?Number(e):d(e),e?e>0?t.slice(0,e):t.slice(e):b(t)?"":[]):t}}function Cr(t){return function(e,n,r){function a(t,e){for(var r=0;r<n.length;r++){var i=n[r](t,e);if(0!==i)return i}return 0}function o(t,e){return e?function(e,n){return t(n,e)}:t}function s(t){switch(typeof t){case"number":case"boolean":case"string":return!0;default:return!1}}function u(t){return null===t?"null":"function"==typeof t.valueOf&&(t=t.valueOf(),s(t))?t:"function"==typeof t.toString&&(t=t.toString(),s(t))?t:""}function l(t,e){var n=typeof t,r=typeof e;return n===r&&"object"===n&&(t=u(t),e=u(e)),n===r?("string"===n&&(t=t.toLowerCase(),e=e.toLowerCase()),t===e?0:e>t?-1:1):r>n?-1:1}return i(e)?(n=ci(n)?n:[n],0===n.length&&(n=["+"]),n=n.map(function(e){var n=!1,r=e||$;if(b(e)){if(("+"==e.charAt(0)||"-"==e.charAt(0))&&(n="-"==e.charAt(0),e=e.substring(1)),""===e)return o(l,n);if(r=t(e),r.constant){var i=r();return o(function(t,e){return l(t[i],e[i])},n)}}return o(function(t,e){return l(r(t),r(e))},n)}),ni.call(e).sort(o(a,r))):e}}function Ar(t){return k(t)&&(t={link:t}),t.restrict=t.restrict||"AC",m(t)}function Or(t,e){t.$name=e}function Er(t,e,r,i,o){var s=this,u=[],l=s.$$parentForm=t.parent().controller("form")||Na;s.$error={},s.$$success={},s.$pending=n,s.$name=o(e.name||e.ngForm||"")(r),s.$dirty=!1,s.$pristine=!0,s.$valid=!0,s.$invalid=!1,s.$submitted=!1,l.$addControl(s),s.$rollbackViewValue=function(){a(u,function(t){t.$rollbackViewValue()})},s.$commitViewValue=function(){a(u,function(t){t.$commitViewValue()})},s.$addControl=function(t){oe(t.$name,"input"),u.push(t),t.$name&&(s[t.$name]=t)},s.$$renameControl=function(t,e){var n=t.$name;s[n]===t&&delete s[n],s[e]=t,t.$name=e},s.$removeControl=function(t){t.$name&&s[t.$name]===t&&delete s[t.$name],a(s.$pending,function(e,n){s.$setValidity(n,null,t)}),a(s.$error,function(e,n){s.$setValidity(n,null,t)}),a(s.$$success,function(e,n){s.$setValidity(n,null,t)}),q(u,t)},Hr({ctrl:this,$element:t,set:function(t,e,n){var r=t[e];if(r){var i=r.indexOf(n);-1===i&&r.push(n)}else t[e]=[n]},unset:function(t,e,n){var r=t[e];r&&(q(r,n),0===r.length&&delete t[e])},parentForm:l,$animate:i}),s.$setDirty=function(){i.removeClass(t,ho),i.addClass(t,po),s.$dirty=!0,s.$pristine=!1,l.$setDirty()},s.$setPristine=function(){i.setClass(t,ho,po+" "+Ta),s.$dirty=!1,s.$pristine=!0,s.$submitted=!1,a(u,function(t){t.$setPristine()})},s.$setUntouched=function(){a(u,function(t){t.$setUntouched()})},s.$setSubmitted=function(){i.addClass(t,Ta),s.$submitted=!0,l.$setSubmitted()}}function jr(t){t.$formatters.push(function(e){return t.$isEmpty(e)?e:e.toString()})}function Nr(t,e,n,r,i,a){Tr(t,e,n,r,i,a),jr(r)}function Tr(t,e,n,r,i,a){var o=Wr(e[0].type);if(!i.android){var s=!1;e.on("compositionstart",function(){s=!0}),e.on("compositionend",function(){s=!1,u()})}var u=function(t){if(l&&(a.defer.cancel(l),l=null),!s){var i=e.val(),u=t&&t.type;"password"===o||n.ngTrim&&"false"===n.ngTrim||(i=fi(i)),(r.$viewValue!==i||""===i&&r.$$hasNativeValidators)&&r.$setViewValue(i,u)}};if(i.hasEvent("input"))e.on("input",u);else{var l,c=function(t,e,n){l||(l=a.defer(function(){l=null,e&&e.value===n||u(t)}))};e.on("keydown",function(t){var e=t.keyCode;91===e||e>15&&19>e||e>=37&&40>=e||c(t,this,this.value)}),i.hasEvent("paste")&&e.on("paste cut",c)}e.on("change",u),r.$render=function(){e.val(r.$isEmpty(r.$viewValue)?"":r.$viewValue)}}function Mr(t,e){if(x(t))return t;if(b(t)){La.lastIndex=0;var n=La.exec(t);if(n){var r=+n[1],i=+n[2],a=0,o=0,s=0,u=0,l=vr(r),c=7*(i-1);return e&&(a=e.getHours(),o=e.getMinutes(),s=e.getSeconds(),u=e.getMilliseconds()),new Date(r,0,l.getDate()+c,a,o,s,u)}}return 0/0}function Pr(t,e){return function(n,r){var i,o;if(x(n))return n;if(b(n)){if('"'==n.charAt(0)&&'"'==n.charAt(n.length-1)&&(n=n.substring(1,n.length-1)),qa.test(n))return new Date(n);if(t.lastIndex=0,i=t.exec(n))return i.shift(),o=r?{yyyy:r.getFullYear(),MM:r.getMonth()+1,dd:r.getDate(),HH:r.getHours(),mm:r.getMinutes(),ss:r.getSeconds(),sss:r.getMilliseconds()/1e3}:{yyyy:1970,MM:1,dd:1,HH:0,mm:0,ss:0,sss:0},a(i,function(t,n){n<e.length&&(o[e[n]]=+t)}),new Date(o.yyyy,o.MM-1,o.dd,o.HH,o.mm,o.ss||0,1e3*o.sss||0)}return 0/0}}function Vr(t,e,r,i){return function(a,o,s,u,l,c,f){function d(t){return t&&!(t.getTime&&t.getTime()!==t.getTime())}function h(t){return v(t)?x(t)?t:r(t):n}qr(a,o,s,u),Tr(a,o,s,u,l,c);var p,$=u&&u.$options&&u.$options.timezone;if(u.$$parserName=t,u.$parsers.push(function(t){if(u.$isEmpty(t))return null;if(e.test(t)){var i=r(t,p);return"UTC"===$&&i.setMinutes(i.getMinutes()-i.getTimezoneOffset()),i}return n}),u.$formatters.push(function(t){if(t&&!x(t))throw vo("datefmt","Expected `{0}` to be a date",t);if(d(t)){if(p=t,p&&"UTC"===$){var e=6e4*p.getTimezoneOffset();p=new Date(p.getTime()+e)}return f("date")(t,i,$)}return p=null,""}),v(s.min)||s.ngMin){var m;u.$validators.min=function(t){return!d(t)||g(m)||r(t)>=m},s.$observe("min",function(t){m=h(t),u.$validate()})}if(v(s.max)||s.ngMax){var y;u.$validators.max=function(t){return!d(t)||g(y)||r(t)<=y},s.$observe("max",function(t){y=h(t),u.$validate()})}}}function qr(t,e,r,i){var a=e[0],o=i.$$hasNativeValidators=y(a.validity);o&&i.$parsers.push(function(t){var r=e.prop(Gr)||{};return r.badInput&&!r.typeMismatch?n:t})}function Dr(t,e,r,i,a,o){if(qr(t,e,r,i),Tr(t,e,r,i,a,o),i.$$parserName="number",i.$parsers.push(function(t){return i.$isEmpty(t)?null:Ia.test(t)?parseFloat(t):n}),i.$formatters.push(function(t){if(!i.$isEmpty(t)){if(!w(t))throw vo("numfmt","Expected `{0}` to be a number",t);t=t.toString()}return t}),r.min||r.ngMin){var s;i.$validators.min=function(t){return i.$isEmpty(t)||g(s)||t>=s},r.$observe("min",function(t){v(t)&&!w(t)&&(t=parseFloat(t,10)),s=w(t)&&!isNaN(t)?t:n,i.$validate()})}if(r.max||r.ngMax){var u;i.$validators.max=function(t){return i.$isEmpty(t)||g(u)||u>=t},r.$observe("max",function(t){v(t)&&!w(t)&&(t=parseFloat(t,10)),u=w(t)&&!isNaN(t)?t:n,i.$validate()})}}function Rr(t,e,n,r,i,a){Tr(t,e,n,r,i,a),jr(r),r.$$parserName="url",r.$validators.url=function(t,e){var n=t||e;return r.$isEmpty(n)||Da.test(n)}}function Ir(t,e,n,r,i,a){Tr(t,e,n,r,i,a),jr(r),r.$$parserName="email",r.$validators.email=function(t,e){var n=t||e;return r.$isEmpty(n)||Ra.test(n)}}function _r(t,e,n,r){g(n.name)&&e.attr("name",l());var i=function(t){e[0].checked&&r.$setViewValue(n.value,t&&t.type)};e.on("click",i),r.$render=function(){var t=n.value;e[0].checked=t==r.$viewValue},n.$observe("value",r.$render)}function Ur(t,e,n,i,a){var o;if(v(i)){if(o=t(i),!o.constant)throw r("ngModel")("constexpr","Expected constant expression for `{0}`, but saw `{1}`.",n,i);return o(e)}return a}function Lr(t,e,n,r,i,a,o,s){var u=Ur(s,t,"ngTrueValue",n.ngTrueValue,!0),l=Ur(s,t,"ngFalseValue",n.ngFalseValue,!1),c=function(t){r.$setViewValue(e[0].checked,t&&t.type)};e.on("click",c),r.$render=function(){e[0].checked=r.$viewValue},r.$isEmpty=function(t){return t===!1},r.$formatters.push(function(t){return I(t,u)}),r.$parsers.push(function(t){return t?u:l})}function Fr(t,e){return t="ngClass"+t,["$animate",function(n){function r(t,e){var n=[];t:for(var r=0;r<t.length;r++){for(var i=t[r],a=0;a<e.length;a++)if(i==e[a])continue t;n.push(i)}return n}function i(t){if(ci(t))return t;if(b(t))return t.split(" ");if(y(t)){var e=[];return a(t,function(t,n){t&&(e=e.concat(n.split(" ")))}),e}return t}return{restrict:"AC",link:function(o,s,u){function l(t){var e=f(t,1);u.$addClass(e)}function c(t){var e=f(t,-1);u.$removeClass(e)}function f(t,e){var n=s.data("$classCounts")||{},r=[];return a(t,function(t){(e>0||n[t])&&(n[t]=(n[t]||0)+e,n[t]===+(e>0)&&r.push(t))}),s.data("$classCounts",n),r.join(" ")}function d(t,e){var i=r(e,t),a=r(t,e);i=f(i,1),a=f(a,-1),i&&i.length&&n.addClass(s,i),a&&a.length&&n.removeClass(s,a)}function h(t){if(e===!0||o.$index%2===e){var n=i(t||[]);if(p){if(!I(t,p)){var r=i(p);d(r,n)}}else l(n)}p=R(t)}var p;o.$watch(u[t],h,!0),u.$observe("class",function(){h(o.$eval(u[t]))}),"ngClass"!==t&&o.$watch("$index",function(n,r){var a=1&n;if(a!==(1&r)){var s=i(o.$eval(u[t]));a===e?l(s):c(s)}})}}}]}function Hr(t){function e(t,e,u){e===n?r("$pending",t,u):i("$pending",t,u),N(e)?e?(f(s.$error,t,u),c(s.$$success,t,u)):(c(s.$error,t,u),f(s.$$success,t,u)):(f(s.$error,t,u),f(s.$$success,t,u)),s.$pending?(a(go,!0),s.$valid=s.$invalid=n,o("",null)):(a(go,!1),s.$valid=Br(s.$error),s.$invalid=!s.$valid,o("",s.$valid));var l;l=s.$pending&&s.$pending[t]?n:s.$error[t]?!1:s.$$success[t]?!0:null,o(t,l),d.$setValidity(t,l,s)}function r(t,e,n){s[t]||(s[t]={}),c(s[t],e,n)}function i(t,e,r){s[t]&&f(s[t],e,r),Br(s[t])&&(s[t]=n)}function a(t,e){e&&!l[t]?(h.addClass(u,t),l[t]=!0):!e&&l[t]&&(h.removeClass(u,t),l[t]=!1)}function o(t,e){t=t?"-"+ne(t,"-"):"",a(co+t,e===!0),a(fo+t,e===!1)}var s=t.ctrl,u=t.$element,l={},c=t.set,f=t.unset,d=t.parentForm,h=t.$animate;l[fo]=!(l[co]=u.hasClass(co)),s.$setValidity=e}function Br(t){if(t)for(var e in t)return!1;return!0}var zr=/^\/(.+)\/([a-z]*)$/,Gr="validity",Wr=function(t){return b(t)?t.toLowerCase():t},Jr=Object.prototype.hasOwnProperty,Yr=function(t){return b(t)?t.toUpperCase():t},Zr=function(t){return b(t)?t.replace(/[A-Z]/g,function(t){return String.fromCharCode(32|t.charCodeAt(0))}):t},Kr=function(t){return b(t)?t.replace(/[a-z]/g,function(t){return String.fromCharCode(-33&t.charCodeAt(0))}):t};"i"!=="I".toLowerCase()&&(Wr=Zr,Yr=Kr);var Xr,Qr,ti,ei,ni=[].slice,ri=[].splice,ii=[].push,ai=Object.prototype.toString,oi=r("ng"),si=t.angular||(t.angular={}),ui=0;Xr=e.documentMode,p.$inject=[],$.$inject=[];var li,ci=Array.isArray,fi=function(t){return b(t)?t.trim():t},di=function(t){return t.replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08")},hi=function(){if(v(hi.isActive_))return hi.isActive_;var t=!(!e.querySelector("[ng-csp]")&&!e.querySelector("[data-ng-csp]"));if(!t)try{new Function("")}catch(n){t=!0}return hi.isActive_=t},pi=["ng-","data-ng-","ng:","x-ng-"],$i=/[A-Z]/g,mi=!1,gi=1,vi=3,yi=8,bi=9,wi=11,xi={full:"1.3.13",major:1,minor:3,dot:13,codeName:"meticulous-riffleshuffle"};be.expando="ng339";var ki=be.cache={},Si=1,Ci=function(t,e,n){t.addEventListener(e,n,!1)},Ai=function(t,e,n){t.removeEventListener(e,n,!1)};be._data=function(t){return this.cache[t[this.expando]]||{}};var Oi=/([\:\-\_]+(.))/g,Ei=/^moz([A-Z])/,ji={mouseleave:"mouseout",mouseenter:"mouseover"},Ni=r("jqLite"),Ti=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,Mi=/<|&#?\w+;/,Pi=/<([\w:]+)/,Vi=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,qi={option:[1,'<select multiple="multiple">',"</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};qi.optgroup=qi.option,qi.tbody=qi.tfoot=qi.colgroup=qi.caption=qi.thead,qi.th=qi.td;var Di=be.prototype={ready:function(n){function r(){i||(i=!0,n())}var i=!1;"complete"===e.readyState?setTimeout(r):(this.on("DOMContentLoaded",r),be(t).on("load",r))},toString:function(){var t=[];return a(this,function(e){t.push(""+e)}),"["+t.join(", ")+"]"},eq:function(t){return t>=0?Qr(this[t]):Qr(this[this.length+t])},length:0,push:ii,sort:[].sort,splice:[].splice},Ri={};a("multiple,selected,checked,disabled,readOnly,required,open".split(","),function(t){Ri[Wr(t)]=t});var Ii={};a("input,select,option,textarea,button,form,details".split(","),function(t){Ii[t]=!0});var _i={ngMinlength:"minlength",ngMaxlength:"maxlength",ngMin:"min",ngMax:"max",ngPattern:"pattern"};a({data:Ae,removeData:Se},function(t,e){be[e]=t}),a({data:Ae,inheritedData:Me,scope:function(t){return Qr.data(t,"$scope")||Me(t.parentNode||t,["$isolateScope","$scope"])},isolateScope:function(t){return Qr.data(t,"$isolateScope")||Qr.data(t,"$isolateScopeNoTemplate")},controller:Te,injector:function(t){return Me(t,"$injector")},removeAttr:function(t,e){t.removeAttribute(e)},hasClass:Oe,css:function(t,e,n){return e=$e(e),v(n)?(t.style[e]=n,void 0):t.style[e]},attr:function(t,e,r){var i=Wr(e);if(Ri[i]){if(!v(r))return t[e]||(t.attributes.getNamedItem(e)||p).specified?i:n;r?(t[e]=!0,t.setAttribute(e,i)):(t[e]=!1,t.removeAttribute(i))}else if(v(r))t.setAttribute(e,r);else if(t.getAttribute){var a=t.getAttribute(e,2);return null===a?n:a}},prop:function(t,e,n){return v(n)?(t[e]=n,void 0):t[e]},text:function(){function t(t,e){if(g(e)){var n=t.nodeType;return n===gi||n===vi?t.textContent:""}t.textContent=e}return t.$dv="",t}(),val:function(t,e){if(g(e)){if(t.multiple&&"select"===V(t)){var n=[];return a(t.options,function(t){t.selected&&n.push(t.value||t.text)}),0===n.length?null:n}return t.value}t.value=e},html:function(t,e){return g(e)?t.innerHTML:(xe(t,!0),t.innerHTML=e,void 0)},empty:Pe},function(t,e){be.prototype[e]=function(e,r){var i,a,o=this.length;if(t!==Pe&&(2==t.length&&t!==Oe&&t!==Te?e:r)===n){if(y(e)){for(i=0;o>i;i++)if(t===Ae)t(this[i],e);else for(a in e)t(this[i],a,e[a]);return this}for(var s=t.$dv,u=s===n?Math.min(o,1):o,l=0;u>l;l++){var c=t(this[l],e,r);s=s?s+c:c}return s}for(i=0;o>i;i++)t(this[i],e,r);return this}}),a({removeData:Se,on:function zo(t,e,n,r){if(v(r))throw Ni("onargs","jqLite#on() does not support the `selector` or `eventData` parameters");if(ge(t)){var i=Ce(t,!0),a=i.events,o=i.handle;o||(o=i.handle=Ie(t,a));for(var s=e.indexOf(" ")>=0?e.split(" "):[e],u=s.length;u--;){e=s[u];var l=a[e];l||(a[e]=[],"mouseenter"===e||"mouseleave"===e?zo(t,ji[e],function(t){var n=this,r=t.relatedTarget;(!r||r!==n&&!n.contains(r))&&o(t,e)}):"$destroy"!==e&&Ci(t,e,o),l=a[e]),l.push(n)}}},off:ke,one:function(t,e,n){t=Qr(t),t.on(e,function r(){t.off(e,n),t.off(e,r)}),t.on(e,n)},replaceWith:function(t,e){var n,r=t.parentNode;xe(t),a(new be(e),function(e){n?r.insertBefore(e,n.nextSibling):r.replaceChild(e,t),n=e})},children:function(t){var e=[];return a(t.childNodes,function(t){t.nodeType===gi&&e.push(t)}),e},contents:function(t){return t.contentDocument||t.childNodes||[]},append:function(t,e){var n=t.nodeType;if(n===gi||n===wi){e=new be(e);for(var r=0,i=e.length;i>r;r++){var a=e[r];t.appendChild(a)}}},prepend:function(t,e){if(t.nodeType===gi){var n=t.firstChild;a(new be(e),function(e){t.insertBefore(e,n)})}},wrap:function(t,e){e=Qr(e).eq(0).clone()[0];var n=t.parentNode;n&&n.replaceChild(e,t),e.appendChild(t)},remove:Ve,detach:function(t){Ve(t,!0)},after:function(t,e){var n=t,r=t.parentNode;e=new be(e);for(var i=0,a=e.length;a>i;i++){var o=e[i];r.insertBefore(o,n.nextSibling),n=o}},addClass:je,removeClass:Ee,toggleClass:function(t,e,n){e&&a(e.split(" "),function(e){var r=n;g(r)&&(r=!Oe(t,e)),(r?je:Ee)(t,e)})},parent:function(t){var e=t.parentNode;return e&&e.nodeType!==wi?e:null},next:function(t){return t.nextElementSibling},find:function(t,e){return t.getElementsByTagName?t.getElementsByTagName(e):[]},clone:we,triggerHandler:function(t,e,n){var r,i,o,s=e.type||e,u=Ce(t),l=u&&u.events,c=l&&l[s];c&&(r={preventDefault:function(){this.defaultPrevented=!0},isDefaultPrevented:function(){return this.defaultPrevented===!0},stopImmediatePropagation:function(){this.immediatePropagationStopped=!0},isImmediatePropagationStopped:function(){return this.immediatePropagationStopped===!0},stopPropagation:p,type:s,target:t},e.type&&(r=f(r,e)),i=R(c),o=n?[r].concat(n):[r],a(i,function(e){r.isImmediatePropagationStopped()||e.apply(t,o)}))}},function(t,e){be.prototype[e]=function(e,n,r){for(var i,a=0,o=this.length;o>a;a++)g(i)?(i=t(this[a],e,n,r),v(i)&&(i=Qr(i))):Ne(i,t(this[a],e,n,r));return v(i)?i:this},be.prototype.bind=be.prototype.on,be.prototype.unbind=be.prototype.off}),Le.prototype={put:function(t,e){this[Ue(t,this.nextUid)]=e},get:function(t){return this[Ue(t,this.nextUid)]},remove:function(t){var e=this[t=Ue(t,this.nextUid)];return delete this[t],e}};var Ui=/^function\s*[^\(]*\(\s*([^\)]*)\)/m,Li=/,/,Fi=/^\s*(_?)(\S+?)\1\s*$/,Hi=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,Bi=r("$injector");Be.$$annotate=He;var zi=r("$animate"),Gi=["$provide",function(t){this.$$selectors={},this.register=function(e,n){var r=e+"-animation";if(e&&"."!=e.charAt(0))throw zi("notcsel","Expecting class selector starting with '.' got '{0}'.",e);this.$$selectors[e.substr(1)]=r,t.factory(r,n)},this.classNameFilter=function(t){return 1===arguments.length&&(this.$$classNameFilter=t instanceof RegExp?t:null),this.$$classNameFilter},this.$get=["$$q","$$asyncCallback","$rootScope",function(t,e,n){function r(e){var r,i=t.defer();return i.promise.$$cancelFn=function(){r&&r()},n.$$postDigest(function(){r=e(function(){i.resolve()})}),i.promise}function i(t,e){var n=[],r=[],i=le();return a((t.attr("class")||"").split(/\s+/),function(t){i[t]=!0}),a(e,function(t,e){var a=i[e];t===!1&&a?r.push(e):t!==!0||a||n.push(e)}),n.length+r.length>0&&[n.length?n:null,r.length?r:null]}function o(t,e,n){for(var r=0,i=e.length;i>r;++r){var a=e[r];t[a]=n}}function s(){return l||(l=t.defer(),e(function(){l.resolve(),l=null})),l.promise}function u(t,e){if(si.isObject(e)){var n=f(e.from||{},e.to||{});t.css(n)}}var l;return{animate:function(t,e,n){return u(t,{from:e,to:n}),s()},enter:function(t,e,n,r){return u(t,r),n?n.after(t):e.prepend(t),s()},leave:function(t){return t.remove(),s()},move:function(t,e,n,r){return this.enter(t,e,n,r)},addClass:function(t,e,n){return this.setClass(t,e,[],n)},$$addClassImmediately:function(t,e,n){return t=Qr(t),e=b(e)?e:ci(e)?e.join(" "):"",a(t,function(t){je(t,e)}),u(t,n),s()},removeClass:function(t,e,n){return this.setClass(t,[],e,n)},$$removeClassImmediately:function(t,e,n){return t=Qr(t),e=b(e)?e:ci(e)?e.join(" "):"",a(t,function(t){Ee(t,e)}),u(t,n),s()},setClass:function(t,e,n,a){var s=this,u="$$animateClasses",l=!1;t=Qr(t);var c=t.data(u);c?a&&c.options&&(c.options=si.extend(c.options||{},a)):(c={classes:{},options:a},l=!0);var f=c.classes;return e=ci(e)?e:e.split(" "),n=ci(n)?n:n.split(" "),o(f,e,!0),o(f,n,!1),l&&(c.promise=r(function(e){var n=t.data(u);if(t.removeData(u),n){var r=i(t,n.classes);r&&s.$$setClassImmediately(t,r[0],r[1],n.options)}e()}),t.data(u,c)),c.promise},$$setClassImmediately:function(t,e,n,r){return e&&this.$$addClassImmediately(t,e),n&&this.$$removeClassImmediately(t,n),u(t,r),s()},enabled:p,cancel:p}}]}],Wi=r("$compile");Ke.$inject=["$provide","$$sanitizeUriProvider"];var Ji=/^((?:x|data)[\:\-_])/i,Yi=r("$controller"),Zi="application/json",Ki={"Content-Type":Zi+";charset=utf-8"},Xi=/^\[|^\{(?!\{)/,Qi={"[":/]$/,"{":/}$/},ta=/^\)\]\}',?\n/,ea=r("$interpolate"),na=/^([^\?#]*)(\?([^#]*))?(#(.*))?$/,ra={http:80,https:443,ftp:21},ia=r("$location"),aa={$$html5:!1,$$replace:!1,absUrl:jn("$$absUrl"),url:function(t){if(g(t))return this.$$url;
 
break t}}else f=!0,n=r,r.last=r.eq?D(i,null):i,r.fn(i,a===m?i:a,$),5>b&&(g=4-b,A[g]||(A[g]=[]),A[g].push({msg:k(r.exp)?"fn: "+(r.exp.name||r.exp.toString()):r.exp,newVal:i,oldVal:a}))}catch(O){s(O)}if(!(p=$.$$childHead||$!==C&&$.$$nextSibling))for(;$!==C&&!(p=$.$$nextSibling);)$=$.$parent}while($=p);if((f||x.length)&&!b--)throw h(),e("infdig","{0} $digest() iterations reached. Aborting!\nWatchers fired in the last 5 iterations: {1}",t,A)}while(f||x.length);for(h();S.length;)try{S.shift()()}catch(O){s(O)}},$destroy:function(){if(!this.$$destroyed){var t=this.$parent;if(this.$broadcast("$destroy"),this.$$destroyed=!0,this!==w){for(var e in this.$$listenerCount)$(this,this.$$listenerCount[e],e);t.$$childHead==this&&(t.$$childHead=this.$$nextSibling),t.$$childTail==this&&(t.$$childTail=this.$$prevSibling),this.$$prevSibling&&(this.$$prevSibling.$$nextSibling=this.$$nextSibling),this.$$nextSibling&&(this.$$nextSibling.$$prevSibling=this.$$prevSibling),this.$destroy=this.$digest=this.$apply=this.$evalAsync=this.$applyAsync=p,this.$on=this.$watch=this.$watchGroup=function(){return p},this.$$listeners={},this.$parent=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=this.$root=this.$$watchers=null}}},$eval:function(t,e){return u(t)(this,e)},$evalAsync:function(t,e){w.$$phase||x.length||c.defer(function(){x.length&&w.$digest()}),x.push({scope:this,expression:t,locals:e})},$$postDigest:function(t){S.push(t)},$apply:function(t){try{return d("$apply"),this.$eval(t)}catch(e){s(e)}finally{h();try{w.$digest()}catch(e){throw s(e),e}}},$applyAsync:function(t){function e(){n.$eval(t)}var n=this;t&&C.push(e),b()},$on:function(t,e){var n=this.$$listeners[t];n||(this.$$listeners[t]=n=[]),n.push(e);var r=this;do r.$$listenerCount[t]||(r.$$listenerCount[t]=0),r.$$listenerCount[t]++;while(r=r.$parent);var i=this;return function(){var r=n.indexOf(e);-1!==r&&(n[r]=null,$(i,1,t))}},$emit:function(t){var e,n,r,i=[],a=this,o=!1,u={name:t,targetScope:a,stopPropagation:function(){o=!0},preventDefault:function(){u.defaultPrevented=!0},defaultPrevented:!1},l=_([u],arguments,1);do{for(e=a.$$listeners[t]||i,u.currentScope=a,n=0,r=e.length;r>n;n++)if(e[n])try{e[n].apply(null,l)}catch(c){s(c)}else e.splice(n,1),n--,r--;if(o)return u.currentScope=null,u;a=a.$parent}while(a);return u.currentScope=null,u},$broadcast:function(t){var e=this,n=e,r=e,i={name:t,targetScope:e,preventDefault:function(){i.defaultPrevented=!0},defaultPrevented:!1};if(!e.$$listenerCount[t])return i;for(var a,o,u,l=_([i],arguments,1);n=r;){for(i.currentScope=n,a=n.$$listeners[t]||[],o=0,u=a.length;u>o;o++)if(a[o])try{a[o].apply(null,l)}catch(c){s(c)}else a.splice(o,1),o--,u--;if(!(r=n.$$listenerCount[t]&&n.$$childHead||n!==e&&n.$$nextSibling))for(;n!==e&&!(r=n.$$nextSibling);)n=n.$parent}return i.currentScope=null,i}};var w=new f,x=w.$$asyncQueue=[],S=w.$$postDigestQueue=[],C=w.$$applyAsyncQueue=[];return w}]}function Yn(){var t=/^\s*(https?|ftp|mailto|tel|file):/,e=/^\s*((https?|ftp|file|blob):|data:image\/)/;this.aHrefSanitizationWhitelist=function(e){return v(e)?(t=e,this):t},this.imgSrcSanitizationWhitelist=function(t){return v(t)?(e=t,this):e},this.$get=function(){return function(n,r){var i,a=r?e:t;return i=ir(n).href,""===i||i.match(a)?n:"unsafe:"+i}}}function Zn(t){if("self"===t)return t;if(b(t)){if(t.indexOf("***")>-1)throw va("iwcard","Illegal sequence *** in string matcher.  String: {0}",t);return t=di(t).replace("\\*\\*",".*").replace("\\*","[^:/.?&;]*"),new RegExp("^"+t+"$")}if(S(t))return new RegExp("^"+t.source+"$");throw va("imatcher",'Matchers may only be "self", string patterns or RegExp objects')}function Kn(t){var e=[];return v(t)&&a(t,function(t){e.push(Zn(t))}),e}function Xn(){this.SCE_CONTEXTS=ya;var t=["self"],e=[];this.resourceUrlWhitelist=function(e){return arguments.length&&(t=Kn(e)),t},this.resourceUrlBlacklist=function(t){return arguments.length&&(e=Kn(t)),e},this.$get=["$injector",function(r){function i(t,e){return"self"===t?ar(e):!!t.exec(e.href)}function a(n){var r,a,o=ir(n.toString()),s=!1;for(r=0,a=t.length;a>r;r++)if(i(t[r],o)){s=!0;break}if(s)for(r=0,a=e.length;a>r;r++)if(i(e[r],o)){s=!1;break}return s}function o(t){var e=function(t){this.$$unwrapTrustedValue=function(){return t}};return t&&(e.prototype=new t),e.prototype.valueOf=function(){return this.$$unwrapTrustedValue()},e.prototype.toString=function(){return this.$$unwrapTrustedValue().toString()},e}function s(t,e){var r=d.hasOwnProperty(t)?d[t]:null;if(!r)throw va("icontext","Attempted to trust a value in invalid context. Context: {0}; Value: {1}",t,e);if(null===e||e===n||""===e)return e;if("string"!=typeof e)throw va("itype","Attempted to trust a non-string value in a content requiring a string: Context: {0}",t);return new r(e)}function u(t){return t instanceof f?t.$$unwrapTrustedValue():t}function l(t,e){if(null===e||e===n||""===e)return e;var r=d.hasOwnProperty(t)?d[t]:null;if(r&&e instanceof r)return e.$$unwrapTrustedValue();if(t===ya.RESOURCE_URL){if(a(e))return e;throw va("insecurl","Blocked loading resource from url not allowed by $sceDelegate policy.  URL: {0}",e.toString())}if(t===ya.HTML)return c(e);throw va("unsafe","Attempting to use an unsafe value in a safe context.")}var c=function(){throw va("unsafe","Attempting to use an unsafe value in a safe context.")};r.has("$sanitize")&&(c=r.get("$sanitize"));var f=o(),d={};return d[ya.HTML]=o(f),d[ya.CSS]=o(f),d[ya.URL]=o(f),d[ya.JS]=o(f),d[ya.RESOURCE_URL]=o(d[ya.URL]),{trustAs:s,getTrusted:l,valueOf:u}}]}function Qn(){var t=!0;this.enabled=function(e){return arguments.length&&(t=!!e),t},this.$get=["$parse","$sceDelegate",function(e,n){if(t&&8>Xr)throw va("iequirks","Strict Contextual Escaping does not support Internet Explorer version < 11 in quirks mode.  You can fix this by adding the text <!doctype html> to the top of your HTML document.  See http://docs.angularjs.org/api/ng.$sce for more information.");var r=R(ya);r.isEnabled=function(){return t},r.trustAs=n.trustAs,r.getTrusted=n.getTrusted,r.valueOf=n.valueOf,t||(r.trustAs=r.getTrusted=function(t,e){return e},r.valueOf=$),r.parseAs=function(t,n){var i=e(n);return i.literal&&i.constant?i:e(n,function(e){return r.getTrusted(t,e)})};var i=r.parseAs,o=r.getTrusted,s=r.trustAs;return a(ya,function(t,e){var n=Wr(e);r[$e("parse_as_"+n)]=function(e){return i(t,e)},r[$e("get_trusted_"+n)]=function(e){return o(t,e)},r[$e("trust_as_"+n)]=function(e){return s(t,e)}}),r}]}function tr(){this.$get=["$window","$document",function(t,e){var n,r,i={},a=d((/android (\d+)/.exec(Wr((t.navigator||{}).userAgent))||[])[1]),o=/Boxee/i.test((t.navigator||{}).userAgent),s=e[0]||{},u=/^(Moz|webkit|ms)(?=[A-Z])/,l=s.body&&s.body.style,c=!1,f=!1;if(l){for(var h in l)if(r=u.exec(h)){n=r[0],n=n.substr(0,1).toUpperCase()+n.substr(1);break}n||(n="WebkitOpacity"in l&&"webkit"),c=!!("transition"in l||n+"Transition"in l),f=!!("animation"in l||n+"Animation"in l),!a||c&&f||(c=b(s.body.style.webkitTransition),f=b(s.body.style.webkitAnimation))}return{history:!(!t.history||!t.history.pushState||4>a||o),hasEvent:function(t){if("input"===t&&11>=Xr)return!1;if(g(i[t])){var e=s.createElement("div");i[t]="on"+t in e}return i[t]},csp:hi(),vendorPrefix:n,transitions:c,animations:f,android:a}}]}function er(){this.$get=["$templateCache","$http","$q",function(t,e,n){function r(i,a){function o(t){if(!a)throw Wi("tpload","Failed to load template: {0}",i);return n.reject(t)}r.totalPendingRequests++;var s=e.defaults&&e.defaults.transformResponse;ci(s)?s=s.filter(function(t){return t!==an}):s===an&&(s=null);var u={cache:t,transformResponse:s};return e.get(i,u).finally(function(){r.totalPendingRequests--}).then(function(t){return t.data},o)}return r.totalPendingRequests=0,r}]}function nr(){this.$get=["$rootScope","$browser","$location",function(t,e,n){var r={};return r.findBindings=function(t,e,n){var r=t.getElementsByClassName("ng-binding"),i=[];return a(r,function(t){var r=si.element(t).data("$binding");r&&a(r,function(r){if(n){var a=new RegExp("(^|\\s)"+di(e)+"(\\s|\\||$)");a.test(r)&&i.push(t)}else-1!=r.indexOf(e)&&i.push(t)})}),i},r.findModels=function(t,e,n){for(var r=["ng-","data-ng-","ng\\:"],i=0;i<r.length;++i){var a=n?"=":"*=",o="["+r[i]+"model"+a+'"'+e+'"]',s=t.querySelectorAll(o);if(s.length)return s}},r.getLocation=function(){return n.url()},r.setLocation=function(e){e!==n.url()&&(n.url(e),t.$digest())},r.whenStable=function(t){e.notifyWhenNoOutstandingRequests(t)},r}]}function rr(){this.$get=["$rootScope","$browser","$q","$$q","$exceptionHandler",function(t,e,n,r,i){function a(a,s,u){var l,c=v(u)&&!u,f=(c?r:n).defer(),d=f.promise;return l=e.defer(function(){try{f.resolve(a())}catch(e){f.reject(e),i(e)}finally{delete o[d.$$timeoutId]}c||t.$apply()},s),d.$$timeoutId=l,o[l]=f,d}var o={};return a.cancel=function(t){return t&&t.$$timeoutId in o?(o[t.$$timeoutId].reject("canceled"),delete o[t.$$timeoutId],e.defer.cancel(t.$$timeoutId)):!1},a}]}function ir(t){var e=t;return Xr&&(ba.setAttribute("href",e),e=ba.href),ba.setAttribute("href",e),{href:ba.href,protocol:ba.protocol?ba.protocol.replace(/:$/,""):"",host:ba.host,search:ba.search?ba.search.replace(/^\?/,""):"",hash:ba.hash?ba.hash.replace(/^#/,""):"",hostname:ba.hostname,port:ba.port,pathname:"/"===ba.pathname.charAt(0)?ba.pathname:"/"+ba.pathname}}function ar(t){var e=b(t)?ir(t):t;return e.protocol===wa.protocol&&e.host===wa.host}function or(){this.$get=m(t)}function sr(t){function e(r,i){if(y(r)){var o={};return a(r,function(t,n){o[n]=e(n,t)}),o}return t.factory(r+n,i)}var n="Filter";this.register=e,this.$get=["$injector",function(t){return function(e){return t.get(e+n)}}],e("currency",fr),e("date",xr),e("filter",ur),e("json",kr),e("limitTo",Sr),e("lowercase",Aa),e("number",dr),e("orderBy",Cr),e("uppercase",Oa)}function ur(){return function(t,e,n){if(!ci(t))return t;var r,i;switch(typeof e){case"function":r=e;break;case"boolean":case"number":case"string":i=!0;case"object":r=lr(e,n,i);break;default:return t}return t.filter(r)}}function lr(t,e,n){var r,i=y(t)&&"$"in t;return e===!0?e=I:k(e)||(e=function(t,e){return y(t)||y(e)?!1:(t=Wr(""+t),e=Wr(""+e),-1!==t.indexOf(e))}),r=function(r){return i&&!y(r)?cr(r,t.$,e,!1):cr(r,t,e,n)}}function cr(t,e,n,r,i){var a=typeof t,o=typeof e;if("string"===o&&"!"===e.charAt(0))return!cr(t,e.substring(1),n,r);if(ci(t))return t.some(function(t){return cr(t,e,n,r)});switch(a){case"object":var s;if(r){for(s in t)if("$"!==s.charAt(0)&&cr(t[s],e,n,!0))return!0;return i?!1:cr(t,e,n,!1)}if("object"===o){for(s in e){var u=e[s];if(!k(u)){var l="$"===s,c=l?t:t[s];if(!cr(c,u,n,l,l))return!1}}return!0}return n(t,e);case"function":return!1;default:return n(t,e)}}function fr(t){var e=t.NUMBER_FORMATS;return function(t,n,r){return g(n)&&(n=e.CURRENCY_SYM),g(r)&&(r=e.PATTERNS[1].maxFrac),null==t?t:hr(t,e.PATTERNS[1],e.GROUP_SEP,e.DECIMAL_SEP,r).replace(/\u00A4/g,n)}}function dr(t){var e=t.NUMBER_FORMATS;return function(t,n){return null==t?t:hr(t,e.PATTERNS[0],e.GROUP_SEP,e.DECIMAL_SEP,n)}}function hr(t,e,n,r,i){if(!isFinite(t)||y(t))return"";var a=0>t;t=Math.abs(t);var o=t+"",s="",u=[],l=!1;if(-1!==o.indexOf("e")){var c=o.match(/([\d\.]+)e(-?)(\d+)/);c&&"-"==c[2]&&c[3]>i+1?t=0:(s=o,l=!0)}if(l)i>0&&1>t&&(s=t.toFixed(i),t=parseFloat(s));else{var f=(o.split(xa)[1]||"").length;g(i)&&(i=Math.min(Math.max(e.minFrac,f),e.maxFrac)),t=+(Math.round(+(t.toString()+"e"+i)).toString()+"e"+-i);var d=(""+t).split(xa),h=d[0];d=d[1]||"";var p,$=0,m=e.lgSize,v=e.gSize;if(h.length>=m+v)for($=h.length-m,p=0;$>p;p++)($-p)%v===0&&0!==p&&(s+=n),s+=h.charAt(p);for(p=$;p<h.length;p++)(h.length-p)%m===0&&0!==p&&(s+=n),s+=h.charAt(p);for(;d.length<i;)d+="0";i&&"0"!==i&&(s+=r+d.substr(0,i))}return 0===t&&(a=!1),u.push(a?e.negPre:e.posPre,s,a?e.negSuf:e.posSuf),u.join("")}function pr(t,e,n){var r="";for(0>t&&(r="-",t=-t),t=""+t;t.length<e;)t="0"+t;return n&&(t=t.substr(t.length-e)),r+t}function $r(t,e,n,r){return n=n||0,function(i){var a=i["get"+t]();return(n>0||a>-n)&&(a+=n),0===a&&-12==n&&(a=12),pr(a,e,r)}}function mr(t,e){return function(n,r){var i=n["get"+t](),a=Yr(e?"SHORT"+t:t);return r[a][i]}}function gr(t){var e=-1*t.getTimezoneOffset(),n=e>=0?"+":"";return n+=pr(Math[e>0?"floor":"ceil"](e/60),2)+pr(Math.abs(e%60),2)}function vr(t){var e=new Date(t,0,1).getDay();return new Date(t,0,(4>=e?5:12)-e)}function yr(t){return new Date(t.getFullYear(),t.getMonth(),t.getDate()+(4-t.getDay()))}function br(t){return function(e){var n=vr(e.getFullYear()),r=yr(e),i=+r-+n,a=1+Math.round(i/6048e5);return pr(a,t)}}function wr(t,e){return t.getHours()<12?e.AMPMS[0]:e.AMPMS[1]}function xr(t){function e(t){var e;if(e=t.match(n)){var r=new Date(0),i=0,a=0,o=e[8]?r.setUTCFullYear:r.setFullYear,s=e[8]?r.setUTCHours:r.setHours;e[9]&&(i=d(e[9]+e[10]),a=d(e[9]+e[11])),o.call(r,d(e[1]),d(e[2])-1,d(e[3]));var u=d(e[4]||0)-i,l=d(e[5]||0)-a,c=d(e[6]||0),f=Math.round(1e3*parseFloat("0."+(e[7]||0)));return s.call(r,u,l,c,f),r}return t}var n=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;return function(n,r,i){var o,s,u="",l=[];if(r=r||"mediumDate",r=t.DATETIME_FORMATS[r]||r,b(n)&&(n=Ca.test(n)?d(n):e(n)),w(n)&&(n=new Date(n)),!x(n))return n;for(;r;)s=Sa.exec(r),s?(l=_(l,s,1),r=l.pop()):(l.push(r),r=null);return i&&"UTC"===i&&(n=new Date(n.getTime()),n.setMinutes(n.getMinutes()+n.getTimezoneOffset())),a(l,function(e){o=ka[e],u+=o?o(n,t.DATETIME_FORMATS):e.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),u}}function kr(){return function(t,e){return g(e)&&(e=2),H(t,e)}}function Sr(){return function(t,e){return w(t)&&(t=t.toString()),ci(t)||b(t)?(e=1/0===Math.abs(Number(e))?Number(e):d(e),e?e>0?t.slice(0,e):t.slice(e):b(t)?"":[]):t}}function Cr(t){return function(e,n,r){function a(t,e){for(var r=0;r<n.length;r++){var i=n[r](t,e);if(0!==i)return i}return 0}function o(t,e){return e?function(e,n){return t(n,e)}:t}function s(t){switch(typeof t){case"number":case"boolean":case"string":return!0;default:return!1}}function u(t){return null===t?"null":"function"==typeof t.valueOf&&(t=t.valueOf(),s(t))?t:"function"==typeof t.toString&&(t=t.toString(),s(t))?t:""}function l(t,e){var n=typeof t,r=typeof e;return n===r&&"object"===n&&(t=u(t),e=u(e)),n===r?("string"===n&&(t=t.toLowerCase(),e=e.toLowerCase()),t===e?0:e>t?-1:1):r>n?-1:1}return i(e)?(n=ci(n)?n:[n],0===n.length&&(n=["+"]),n=n.map(function(e){var n=!1,r=e||$;if(b(e)){if(("+"==e.charAt(0)||"-"==e.charAt(0))&&(n="-"==e.charAt(0),e=e.substring(1)),""===e)return o(l,n);if(r=t(e),r.constant){var i=r();return o(function(t,e){return l(t[i],e[i])},n)}}return o(function(t,e){return l(r(t),r(e))},n)}),ni.call(e).sort(o(a,r))):e}}function Ar(t){return k(t)&&(t={link:t}),t.restrict=t.restrict||"AC",m(t)}function Or(t,e){t.$name=e}function Er(t,e,r,i,o){var s=this,u=[],l=s.$$parentForm=t.parent().controller("form")||Na;s.$error={},s.$$success={},s.$pending=n,s.$name=o(e.name||e.ngForm||"")(r),s.$dirty=!1,s.$pristine=!0,s.$valid=!0,s.$invalid=!1,s.$submitted=!1,l.$addControl(s),s.$rollbackViewValue=function(){a(u,function(t){t.$rollbackViewValue()})},s.$commitViewValue=function(){a(u,function(t){t.$commitViewValue()})},s.$addControl=function(t){oe(t.$name,"input"),u.push(t),t.$name&&(s[t.$name]=t)},s.$$renameControl=function(t,e){var n=t.$name;s[n]===t&&delete s[n],s[e]=t,t.$name=e},s.$removeControl=function(t){t.$name&&s[t.$name]===t&&delete s[t.$name],a(s.$pending,function(e,n){s.$setValidity(n,null,t)}),a(s.$error,function(e,n){s.$setValidity(n,null,t)}),a(s.$$success,function(e,n){s.$setValidity(n,null,t)}),q(u,t)},Hr({ctrl:this,$element:t,set:function(t,e,n){var r=t[e];if(r){var i=r.indexOf(n);-1===i&&r.push(n)}else t[e]=[n]},unset:function(t,e,n){var r=t[e];r&&(q(r,n),0===r.length&&delete t[e])},parentForm:l,$animate:i}),s.$setDirty=function(){i.removeClass(t,ho),i.addClass(t,po),s.$dirty=!0,s.$pristine=!1,l.$setDirty()},s.$setPristine=function(){i.setClass(t,ho,po+" "+Ta),s.$dirty=!1,s.$pristine=!0,s.$submitted=!1,a(u,function(t){t.$setPristine()})},s.$setUntouched=function(){a(u,function(t){t.$setUntouched()})},s.$setSubmitted=function(){i.addClass(t,Ta),s.$submitted=!0,l.$setSubmitted()}}function jr(t){t.$formatters.push(function(e){return t.$isEmpty(e)?e:e.toString()})}function Nr(t,e,n,r,i,a){Tr(t,e,n,r,i,a),jr(r)}function Tr(t,e,n,r,i,a){var o=Wr(e[0].type);if(!i.android){var s=!1;e.on("compositionstart",function(){s=!0}),e.on("compositionend",function(){s=!1,u()})}var u=function(t){if(l&&(a.defer.cancel(l),l=null),!s){var i=e.val(),u=t&&t.type;"password"===o||n.ngTrim&&"false"===n.ngTrim||(i=fi(i)),(r.$viewValue!==i||""===i&&r.$$hasNativeValidators)&&r.$setViewValue(i,u)}};if(i.hasEvent("input"))e.on("input",u);else{var l,c=function(t,e,n){l||(l=a.defer(function(){l=null,e&&e.value===n||u(t)}))};e.on("keydown",function(t){var e=t.keyCode;91===e||e>15&&19>e||e>=37&&40>=e||c(t,this,this.value)}),i.hasEvent("paste")&&e.on("paste cut",c)}e.on("change",u),r.$render=function(){e.val(r.$isEmpty(r.$viewValue)?"":r.$viewValue)}}function Mr(t,e){if(x(t))return t;if(b(t)){La.lastIndex=0;var n=La.exec(t);if(n){var r=+n[1],i=+n[2],a=0,o=0,s=0,u=0,l=vr(r),c=7*(i-1);return e&&(a=e.getHours(),o=e.getMinutes(),s=e.getSeconds(),u=e.getMilliseconds()),new Date(r,0,l.getDate()+c,a,o,s,u)}}return 0/0}function Pr(t,e){return function(n,r){var i,o;if(x(n))return n;if(b(n)){if('"'==n.charAt(0)&&'"'==n.charAt(n.length-1)&&(n=n.substring(1,n.length-1)),qa.test(n))return new Date(n);if(t.lastIndex=0,i=t.exec(n))return i.shift(),o=r?{yyyy:r.getFullYear(),MM:r.getMonth()+1,dd:r.getDate(),HH:r.getHours(),mm:r.getMinutes(),ss:r.getSeconds(),sss:r.getMilliseconds()/1e3}:{yyyy:1970,MM:1,dd:1,HH:0,mm:0,ss:0,sss:0},a(i,function(t,n){n<e.length&&(o[e[n]]=+t)}),new Date(o.yyyy,o.MM-1,o.dd,o.HH,o.mm,o.ss||0,1e3*o.sss||0)}return 0/0}}function Vr(t,e,r,i){return function(a,o,s,u,l,c,f){function d(t){return t&&!(t.getTime&&t.getTime()!==t.getTime())}function h(t){return v(t)?x(t)?t:r(t):n}qr(a,o,s,u),Tr(a,o,s,u,l,c);var p,$=u&&u.$options&&u.$options.timezone;if(u.$$parserName=t,u.$parsers.push(function(t){if(u.$isEmpty(t))return null;if(e.test(t)){var i=r(t,p);return"UTC"===$&&i.setMinutes(i.getMinutes()-i.getTimezoneOffset()),i}return n}),u.$formatters.push(function(t){if(t&&!x(t))throw vo("datefmt","Expected `{0}` to be a date",t);if(d(t)){if(p=t,p&&"UTC"===$){var e=6e4*p.getTimezoneOffset();p=new Date(p.getTime()+e)}return f("date")(t,i,$)}return p=null,""}),v(s.min)||s.ngMin){var m;u.$validators.min=function(t){return!d(t)||g(m)||r(t)>=m},s.$observe("min",function(t){m=h(t),u.$validate()})}if(v(s.max)||s.ngMax){var y;u.$validators.max=function(t){return!d(t)||g(y)||r(t)<=y},s.$observe("max",function(t){y=h(t),u.$validate()})}}}function qr(t,e,r,i){var a=e[0],o=i.$$hasNativeValidators=y(a.validity);o&&i.$parsers.push(function(t){var r=e.prop(Gr)||{};return r.badInput&&!r.typeMismatch?n:t})}function Dr(t,e,r,i,a,o){if(qr(t,e,r,i),Tr(t,e,r,i,a,o),i.$$parserName="number",i.$parsers.push(function(t){return i.$isEmpty(t)?null:Ia.test(t)?parseFloat(t):n}),i.$formatters.push(function(t){if(!i.$isEmpty(t)){if(!w(t))throw vo("numfmt","Expected `{0}` to be a number",t);t=t.toString()}return t}),r.min||r.ngMin){var s;i.$validators.min=function(t){return i.$isEmpty(t)||g(s)||t>=s},r.$observe("min",function(t){v(t)&&!w(t)&&(t=parseFloat(t,10)),s=w(t)&&!isNaN(t)?t:n,i.$validate()})}if(r.max||r.ngMax){var u;i.$validators.max=function(t){return i.$isEmpty(t)||g(u)||u>=t},r.$observe("max",function(t){v(t)&&!w(t)&&(t=parseFloat(t,10)),u=w(t)&&!isNaN(t)?t:n,i.$validate()})}}function Rr(t,e,n,r,i,a){Tr(t,e,n,r,i,a),jr(r),r.$$parserName="url",r.$validators.url=function(t,e){var n=t||e;return r.$isEmpty(n)||Da.test(n)}}function Ir(t,e,n,r,i,a){Tr(t,e,n,r,i,a),jr(r),r.$$parserName="email",r.$validators.email=function(t,e){var n=t||e;return r.$isEmpty(n)||Ra.test(n)}}function _r(t,e,n,r){g(n.name)&&e.attr("name",l());var i=function(t){e[0].checked&&r.$setViewValue(n.value,t&&t.type)};e.on("click",i),r.$render=function(){var t=n.value;e[0].checked=t==r.$viewValue},n.$observe("value",r.$render)}function Ur(t,e,n,i,a){var o;if(v(i)){if(o=t(i),!o.constant)throw r("ngModel")("constexpr","Expected constant expression for `{0}`, but saw `{1}`.",n,i);return o(e)}return a}function Lr(t,e,n,r,i,a,o,s){var u=Ur(s,t,"ngTrueValue",n.ngTrueValue,!0),l=Ur(s,t,"ngFalseValue",n.ngFalseValue,!1),c=function(t){r.$setViewValue(e[0].checked,t&&t.type)};e.on("click",c),r.$render=function(){e[0].checked=r.$viewValue},r.$isEmpty=function(t){return t===!1},r.$formatters.push(function(t){return I(t,u)}),r.$parsers.push(function(t){return t?u:l})}function Fr(t,e){return t="ngClass"+t,["$animate",function(n){function r(t,e){var n=[];t:for(var r=0;r<t.length;r++){for(var i=t[r],a=0;a<e.length;a++)if(i==e[a])continue t;n.push(i)}return n}function i(t){if(ci(t))return t;if(b(t))return t.split(" ");if(y(t)){var e=[];return a(t,function(t,n){t&&(e=e.concat(n.split(" ")))}),e}return t}return{restrict:"AC",link:function(o,s,u){function l(t){var e=f(t,1);u.$addClass(e)}function c(t){var e=f(t,-1);u.$removeClass(e)}function f(t,e){var n=s.data("$classCounts")||{},r=[];return a(t,function(t){(e>0||n[t])&&(n[t]=(n[t]||0)+e,n[t]===+(e>0)&&r.push(t))}),s.data("$classCounts",n),r.join(" ")}function d(t,e){var i=r(e,t),a=r(t,e);i=f(i,1),a=f(a,-1),i&&i.length&&n.addClass(s,i),a&&a.length&&n.removeClass(s,a)}function h(t){if(e===!0||o.$index%2===e){var n=i(t||[]);if(p){if(!I(t,p)){var r=i(p);d(r,n)}}else l(n)}p=R(t)}var p;o.$watch(u[t],h,!0),u.$observe("class",function(){h(o.$eval(u[t]))}),"ngClass"!==t&&o.$watch("$index",function(n,r){var a=1&n;if(a!==(1&r)){var s=i(o.$eval(u[t]));a===e?l(s):c(s)}})}}}]}function Hr(t){function e(t,e,u){e===n?r("$pending",t,u):i("$pending",t,u),N(e)?e?(f(s.$error,t,u),c(s.$$success,t,u)):(c(s.$error,t,u),f(s.$$success,t,u)):(f(s.$error,t,u),f(s.$$success,t,u)),s.$pending?(a(go,!0),s.$valid=s.$invalid=n,o("",null)):(a(go,!1),s.$valid=Br(s.$error),s.$invalid=!s.$valid,o("",s.$valid));var l;l=s.$pending&&s.$pending[t]?n:s.$error[t]?!1:s.$$success[t]?!0:null,o(t,l),d.$setValidity(t,l,s)}function r(t,e,n){s[t]||(s[t]={}),c(s[t],e,n)}function i(t,e,r){s[t]&&f(s[t],e,r),Br(s[t])&&(s[t]=n)}function a(t,e){e&&!l[t]?(h.addClass(u,t),l[t]=!0):!e&&l[t]&&(h.removeClass(u,t),l[t]=!1)}function o(t,e){t=t?"-"+ne(t,"-"):"",a(co+t,e===!0),a(fo+t,e===!1)}var s=t.ctrl,u=t.$element,l={},c=t.set,f=t.unset,d=t.parentForm,h=t.$animate;l[fo]=!(l[co]=u.hasClass(co)),s.$setValidity=e}function Br(t){if(t)for(var e in t)return!1;return!0}var zr=/^\/(.+)\/([a-z]*)$/,Gr="validity",Wr=function(t){return b(t)?t.toLowerCase():t},Jr=Object.prototype.hasOwnProperty,Yr=function(t){return b(t)?t.toUpperCase():t},Zr=function(t){return b(t)?t.replace(/[A-Z]/g,function(t){return String.fromCharCode(32|t.charCodeAt(0))}):t},Kr=function(t){return b(t)?t.replace(/[a-z]/g,function(t){return String.fromCharCode(-33&t.charCodeAt(0))}):t};"i"!=="I".toLowerCase()&&(Wr=Zr,Yr=Kr);var Xr,Qr,ti,ei,ni=[].slice,ri=[].splice,ii=[].push,ai=Object.prototype.toString,oi=r("ng"),si=t.angular||(t.angular={}),ui=0;Xr=e.documentMode,p.$inject=[],$.$inject=[];var li,ci=Array.isArray,fi=function(t){return b(t)?t.trim():t},di=function(t){return t.replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08")},hi=function(){if(v(hi.isActive_))return hi.isActive_;var t=!(!e.querySelector("[ng-csp]")&&!e.querySelector("[data-ng-csp]"));if(!t)try{new Function("")}catch(n){t=!0}return hi.isActive_=t},pi=["ng-","data-ng-","ng:","x-ng-"],$i=/[A-Z]/g,mi=!1,gi=1,vi=3,yi=8,bi=9,wi=11,xi={full:"1.3.13",major:1,minor:3,dot:13,codeName:"meticulous-riffleshuffle"};be.expando="ng339";var ki=be.cache={},Si=1,Ci=function(t,e,n){t.addEventListener(e,n,!1)},Ai=function(t,e,n){t.removeEventListener(e,n,!1)};be._data=function(t){return this.cache[t[this.expando]]||{}};var Oi=/([\:\-\_]+(.))/g,Ei=/^moz([A-Z])/,ji={mouseleave:"mouseout",mouseenter:"mouseover"},Ni=r("jqLite"),Ti=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,Mi=/<|&#?\w+;/,Pi=/<([\w:]+)/,Vi=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,qi={option:[1,'<select multiple="multiple">',"</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};qi.optgroup=qi.option,qi.tbody=qi.tfoot=qi.colgroup=qi.caption=qi.thead,qi.th=qi.td;var Di=be.prototype={ready:function(n){function r(){i||(i=!0,n())}var i=!1;"complete"===e.readyState?setTimeout(r):(this.on("DOMContentLoaded",r),be(t).on("load",r))},toString:function(){var t=[];return a(this,function(e){t.push(""+e)}),"["+t.join(", ")+"]"},eq:function(t){return t>=0?Qr(this[t]):Qr(this[this.length+t])},length:0,push:ii,sort:[].sort,splice:[].splice},Ri={};a("multiple,selected,checked,disabled,readOnly,required,open".split(","),function(t){Ri[Wr(t)]=t});var Ii={};a("input,select,option,textarea,button,form,details".split(","),function(t){Ii[t]=!0});var _i={ngMinlength:"minlength",ngMaxlength:"maxlength",ngMin:"min",ngMax:"max",ngPattern:"pattern"};a({data:Ae,removeData:Se},function(t,e){be[e]=t}),a({data:Ae,inheritedData:Me,scope:function(t){return Qr.data(t,"$scope")||Me(t.parentNode||t,["$isolateScope","$scope"])},isolateScope:function(t){return Qr.data(t,"$isolateScope")||Qr.data(t,"$isolateScopeNoTemplate")},controller:Te,injector:function(t){return Me(t,"$injector")},removeAttr:function(t,e){t.removeAttribute(e)},hasClass:Oe,css:function(t,e,n){return e=$e(e),v(n)?(t.style[e]=n,void 0):t.style[e]},attr:function(t,e,r){var i=Wr(e);if(Ri[i]){if(!v(r))return t[e]||(t.attributes.getNamedItem(e)||p).specified?i:n;r?(t[e]=!0,t.setAttribute(e,i)):(t[e]=!1,t.removeAttribute(i))}else if(v(r))t.setAttribute(e,r);else if(t.getAttribute){var a=t.getAttribute(e,2);return null===a?n:a}},prop:function(t,e,n){return v(n)?(t[e]=n,void 0):t[e]},text:function(){function t(t,e){if(g(e)){var n=t.nodeType;return n===gi||n===vi?t.textContent:""}t.textContent=e}return t.$dv="",t}(),val:function(t,e){if(g(e)){if(t.multiple&&"select"===V(t)){var n=[];return a(t.options,function(t){t.selected&&n.push(t.value||t.text)}),0===n.length?null:n}return t.value}t.value=e},html:function(t,e){return g(e)?t.innerHTML:(xe(t,!0),t.innerHTML=e,void 0)},empty:Pe},function(t,e){be.prototype[e]=function(e,r){var i,a,o=this.length;if(t!==Pe&&(2==t.length&&t!==Oe&&t!==Te?e:r)===n){if(y(e)){for(i=0;o>i;i++)if(t===Ae)t(this[i],e);else for(a in e)t(this[i],a,e[a]);return this}for(var s=t.$dv,u=s===n?Math.min(o,1):o,l=0;u>l;l++){var c=t(this[l],e,r);s=s?s+c:c}return s}for(i=0;o>i;i++)t(this[i],e,r);return this}}),a({removeData:Se,on:function zo(t,e,n,r){if(v(r))throw Ni("onargs","jqLite#on() does not support the `selector` or `eventData` parameters");if(ge(t)){var i=Ce(t,!0),a=i.events,o=i.handle;o||(o=i.handle=Ie(t,a));for(var s=e.indexOf(" ")>=0?e.split(" "):[e],u=s.length;u--;){e=s[u];var l=a[e];l||(a[e]=[],"mouseenter"===e||"mouseleave"===e?zo(t,ji[e],function(t){var n=this,r=t.relatedTarget;(!r||r!==n&&!n.contains(r))&&o(t,e)}):"$destroy"!==e&&Ci(t,e,o),l=a[e]),l.push(n)}}},off:ke,one:function(t,e,n){t=Qr(t),t.on(e,function r(){t.off(e,n),t.off(e,r)}),t.on(e,n)},replaceWith:function(t,e){var n,r=t.parentNode;xe(t),a(new be(e),function(e){n?r.insertBefore(e,n.nextSibling):r.replaceChild(e,t),n=e})},children:function(t){var e=[];return a(t.childNodes,function(t){t.nodeType===gi&&e.push(t)}),e},contents:function(t){return t.contentDocument||t.childNodes||[]},append:function(t,e){var n=t.nodeType;if(n===gi||n===wi){e=new be(e);for(var r=0,i=e.length;i>r;r++){var a=e[r];t.appendChild(a)}}},prepend:function(t,e){if(t.nodeType===gi){var n=t.firstChild;a(new be(e),function(e){t.insertBefore(e,n)})}},wrap:function(t,e){e=Qr(e).eq(0).clone()[0];var n=t.parentNode;n&&n.replaceChild(e,t),e.appendChild(t)},remove:Ve,detach:function(t){Ve(t,!0)},after:function(t,e){var n=t,r=t.parentNode;e=new be(e);for(var i=0,a=e.length;a>i;i++){var o=e[i];r.insertBefore(o,n.nextSibling),n=o}},addClass:je,removeClass:Ee,toggleClass:function(t,e,n){e&&a(e.split(" "),function(e){var r=n;g(r)&&(r=!Oe(t,e)),(r?je:Ee)(t,e)})},parent:function(t){var e=t.parentNode;return e&&e.nodeType!==wi?e:null},next:function(t){return t.nextElementSibling},find:function(t,e){return t.getElementsByTagName?t.getElementsByTagName(e):[]},clone:we,triggerHandler:function(t,e,n){var r,i,o,s=e.type||e,u=Ce(t),l=u&&u.events,c=l&&l[s];c&&(r={preventDefault:function(){this.defaultPrevented=!0},isDefaultPrevented:function(){return this.defaultPrevented===!0},stopImmediatePropagation:function(){this.immediatePropagationStopped=!0},isImmediatePropagationStopped:function(){return this.immediatePropagationStopped===!0},stopPropagation:p,type:s,target:t},e.type&&(r=f(r,e)),i=R(c),o=n?[r].concat(n):[r],a(i,function(e){r.isImmediatePropagationStopped()||e.apply(t,o)}))}},function(t,e){be.prototype[e]=function(e,n,r){for(var i,a=0,o=this.length;o>a;a++)g(i)?(i=t(this[a],e,n,r),v(i)&&(i=Qr(i))):Ne(i,t(this[a],e,n,r));return v(i)?i:this},be.prototype.bind=be.prototype.on,be.prototype.unbind=be.prototype.off}),Le.prototype={put:function(t,e){this[Ue(t,this.nextUid)]=e},get:function(t){return this[Ue(t,this.nextUid)]},remove:function(t){var e=this[t=Ue(t,this.nextUid)];return delete this[t],e}};var Ui=/^function\s*[^\(]*\(\s*([^\)]*)\)/m,Li=/,/,Fi=/^\s*(_?)(\S+?)\1\s*$/,Hi=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,Bi=r("$injector");Be.$$annotate=He;var zi=r("$animate"),Gi=["$provide",function(t){this.$$selectors={},this.register=function(e,n){var r=e+"-animation";if(e&&"."!=e.charAt(0))throw zi("notcsel","Expecting class selector starting with '.' got '{0}'.",e);this.$$selectors[e.substr(1)]=r,t.factory(r,n)},this.classNameFilter=function(t){return 1===arguments.length&&(this.$$classNameFilter=t instanceof RegExp?t:null),this.$$classNameFilter},this.$get=["$$q","$$asyncCallback","$rootScope",function(t,e,n){function r(e){var r,i=t.defer();return i.promise.$$cancelFn=function(){r&&r()},n.$$postDigest(function(){r=e(function(){i.resolve()})}),i.promise}function i(t,e){var n=[],r=[],i=le();return a((t.attr("class")||"").split(/\s+/),function(t){i[t]=!0}),a(e,function(t,e){var a=i[e];t===!1&&a?r.push(e):t!==!0||a||n.push(e)}),n.length+r.length>0&&[n.length?n:null,r.length?r:null]}function o(t,e,n){for(var r=0,i=e.length;i>r;++r){var a=e[r];t[a]=n}}function s(){return l||(l=t.defer(),e(function(){l.resolve(),l=null})),l.promise}function u(t,e){if(si.isObject(e)){var n=f(e.from||{},e.to||{});t.css(n)}}var l;return{animate:function(t,e,n){return u(t,{from:e,to:n}),s()},enter:function(t,e,n,r){return u(t,r),n?n.after(t):e.prepend(t),s()},leave:function(t){return t.remove(),s()},move:function(t,e,n,r){return this.enter(t,e,n,r)},addClass:function(t,e,n){return this.setClass(t,e,[],n)},$$addClassImmediately:function(t,e,n){return t=Qr(t),e=b(e)?e:ci(e)?e.join(" "):"",a(t,function(t){je(t,e)}),u(t,n),s()},removeClass:function(t,e,n){return this.setClass(t,[],e,n)},$$removeClassImmediately:function(t,e,n){return t=Qr(t),e=b(e)?e:ci(e)?e.join(" "):"",a(t,function(t){Ee(t,e)}),u(t,n),s()},setClass:function(t,e,n,a){var s=this,u="$$animateClasses",l=!1;t=Qr(t);var c=t.data(u);c?a&&c.options&&(c.options=si.extend(c.options||{},a)):(c={classes:{},options:a},l=!0);var f=c.classes;return e=ci(e)?e:e.split(" "),n=ci(n)?n:n.split(" "),o(f,e,!0),o(f,n,!1),l&&(c.promise=r(function(e){var n=t.data(u);if(t.removeData(u),n){var r=i(t,n.classes);r&&s.$$setClassImmediately(t,r[0],r[1],n.options)}e()}),t.data(u,c)),c.promise},$$setClassImmediately:function(t,e,n,r){return e&&this.$$addClassImmediately(t,e),n&&this.$$removeClassImmediately(t,n),u(t,r),s()},enabled:p,cancel:p}}]}],Wi=r("$compile");Ke.$inject=["$provide","$$sanitizeUriProvider"];var Ji=/^((?:x|data)[\:\-_])/i,Yi=r("$controller"),Zi="application/json",Ki={"Content-Type":Zi+";charset=utf-8"},Xi=/^\[|^\{(?!\{)/,Qi={"[":/]$/,"{":/}$/},ta=/^\)\]\}',?\n/,ea=r("$interpolate"),na=/^([^\?#]*)(\?([^#]*))?(#(.*))?$/,ra={http:80,https:443,ftp:21},ia=r("$location"),aa={$$html5:!1,$$replace:!1,absUrl:jn("$$absUrl"),url:function(t){if(g(t))return this.$$url;
 
var e=na.exec(t);return(e[1]||""===t)&&this.path(decodeURIComponent(e[1])),(e[2]||e[1]||""===t)&&this.search(e[3]||""),this.hash(e[5]||""),this},protocol:jn("$$protocol"),host:jn("$$host"),port:jn("$$port"),path:Nn("$$path",function(t){return t=null!==t?t.toString():"","/"==t.charAt(0)?t:"/"+t}),search:function(t,e){switch(arguments.length){case 0:return this.$$search;case 1:if(b(t)||w(t))t=t.toString(),this.$$search=W(t);else{if(!y(t))throw ia("isrcharg","The first argument of the `$location#search()` call must be a string or an object.");t=D(t,{}),a(t,function(e,n){null==e&&delete t[n]}),this.$$search=t}break;default:g(e)||null===e?delete this.$$search[t]:this.$$search[t]=e}return this.$$compose(),this},hash:Nn("$$hash",function(t){return null!==t?t.toString():""}),replace:function(){return this.$$replace=!0,this}};a([En,On,An],function(t){t.prototype=Object.create(aa),t.prototype.state=function(e){if(!arguments.length)return this.$$state;if(t!==An||!this.$$html5)throw ia("nostate","History API state support is available only in HTML5 mode and only in browsers supporting HTML5 History API");return this.$$state=g(e)?null:e,this}});var oa=r("$parse"),sa=Function.prototype.call,ua=Function.prototype.apply,la=Function.prototype.bind,ca=le();a({"null":function(){return null},"true":function(){return!0},"false":function(){return!1},undefined:function(){}},function(t,e){t.constant=t.literal=t.sharedGetter=!0,ca[e]=t}),ca["this"]=function(t){return t},ca["this"].sharedGetter=!0;var fa=f(le(),{"+":function(t,e,r,i){return r=r(t,e),i=i(t,e),v(r)?v(i)?r+i:r:v(i)?i:n},"-":function(t,e,n,r){return n=n(t,e),r=r(t,e),(v(n)?n:0)-(v(r)?r:0)},"*":function(t,e,n,r){return n(t,e)*r(t,e)},"/":function(t,e,n,r){return n(t,e)/r(t,e)},"%":function(t,e,n,r){return n(t,e)%r(t,e)},"===":function(t,e,n,r){return n(t,e)===r(t,e)},"!==":function(t,e,n,r){return n(t,e)!==r(t,e)},"==":function(t,e,n,r){return n(t,e)==r(t,e)},"!=":function(t,e,n,r){return n(t,e)!=r(t,e)},"<":function(t,e,n,r){return n(t,e)<r(t,e)},">":function(t,e,n,r){return n(t,e)>r(t,e)},"<=":function(t,e,n,r){return n(t,e)<=r(t,e)},">=":function(t,e,n,r){return n(t,e)>=r(t,e)},"&&":function(t,e,n,r){return n(t,e)&&r(t,e)},"||":function(t,e,n,r){return n(t,e)||r(t,e)},"!":function(t,e,n){return!n(t,e)},"=":!0,"|":!0}),da={n:"\n",f:"\f",r:"\r",t:" ",v:"�","'":"'",'"':'"'},ha=function(t){this.options=t};ha.prototype={constructor:ha,lex:function(t){for(this.text=t,this.index=0,this.tokens=[];this.index<this.text.length;){var e=this.text.charAt(this.index);if('"'===e||"'"===e)this.readString(e);else if(this.isNumber(e)||"."===e&&this.isNumber(this.peek()))this.readNumber();else if(this.isIdent(e))this.readIdent();else if(this.is(e,"(){}[].,;:?"))this.tokens.push({index:this.index,text:e}),this.index++;else if(this.isWhitespace(e))this.index++;else{var n=e+this.peek(),r=n+this.peek(2),i=fa[e],a=fa[n],o=fa[r];if(i||a||o){var s=o?r:a?n:e;this.tokens.push({index:this.index,text:s,operator:!0}),this.index+=s.length}else this.throwError("Unexpected next character ",this.index,this.index+1)}}return this.tokens},is:function(t,e){return-1!==e.indexOf(t)},peek:function(t){var e=t||1;return this.index+e<this.text.length?this.text.charAt(this.index+e):!1},isNumber:function(t){return t>="0"&&"9">=t&&"string"==typeof t},isWhitespace:function(t){return" "===t||"\r"===t||" "===t||"\n"===t||"�"===t||" "===t},isIdent:function(t){return t>="a"&&"z">=t||t>="A"&&"Z">=t||"_"===t||"$"===t},isExpOperator:function(t){return"-"===t||"+"===t||this.isNumber(t)},throwError:function(t,e,n){n=n||this.index;var r=v(e)?"s "+e+"-"+this.index+" ["+this.text.substring(e,n)+"]":" "+n;throw oa("lexerr","Lexer Error: {0} at column{1} in expression [{2}].",t,r,this.text)},readNumber:function(){for(var t="",e=this.index;this.index<this.text.length;){var n=Wr(this.text.charAt(this.index));if("."==n||this.isNumber(n))t+=n;else{var r=this.peek();if("e"==n&&this.isExpOperator(r))t+=n;else if(this.isExpOperator(n)&&r&&this.isNumber(r)&&"e"==t.charAt(t.length-1))t+=n;else{if(!this.isExpOperator(n)||r&&this.isNumber(r)||"e"!=t.charAt(t.length-1))break;this.throwError("Invalid exponent")}}this.index++}this.tokens.push({index:e,text:t,constant:!0,value:Number(t)})},readIdent:function(){for(var t=this.index;this.index<this.text.length;){var e=this.text.charAt(this.index);if(!this.isIdent(e)&&!this.isNumber(e))break;this.index++}this.tokens.push({index:t,text:this.text.slice(t,this.index),identifier:!0})},readString:function(t){var e=this.index;this.index++;for(var n="",r=t,i=!1;this.index<this.text.length;){var a=this.text.charAt(this.index);if(r+=a,i){if("u"===a){var o=this.text.substring(this.index+1,this.index+5);o.match(/[\da-f]{4}/i)||this.throwError("Invalid unicode escape [\\u"+o+"]"),this.index+=4,n+=String.fromCharCode(parseInt(o,16))}else{var s=da[a];n+=s||a}i=!1}else if("\\"===a)i=!0;else{if(a===t)return this.index++,this.tokens.push({index:e,text:r,constant:!0,value:n}),void 0;n+=a}this.index++}this.throwError("Unterminated quote",e)}};var pa=function(t,e,n){this.lexer=t,this.$filter=e,this.options=n};pa.ZERO=f(function(){return 0},{sharedGetter:!0,constant:!0}),pa.prototype={constructor:pa,parse:function(t){this.text=t,this.tokens=this.lexer.lex(t);var e=this.statements();return 0!==this.tokens.length&&this.throwError("is an unexpected token",this.tokens[0]),e.literal=!!e.literal,e.constant=!!e.constant,e},primary:function(){var t;this.expect("(")?(t=this.filterChain(),this.consume(")")):this.expect("[")?t=this.arrayDeclaration():this.expect("{")?t=this.object():this.peek().identifier&&this.peek().text in ca?t=ca[this.consume().text]:this.peek().identifier?t=this.identifier():this.peek().constant?t=this.constant():this.throwError("not a primary expression",this.peek());for(var e,n;e=this.expect("(","[",".");)"("===e.text?(t=this.functionCall(t,n),n=null):"["===e.text?(n=t,t=this.objectIndex(t)):"."===e.text?(n=t,t=this.fieldAccess(t)):this.throwError("IMPOSSIBLE");return t},throwError:function(t,e){throw oa("syntax","Syntax Error: Token '{0}' {1} at column {2} of the expression [{3}] starting at [{4}].",e.text,t,e.index+1,this.text,this.text.substring(e.index))},peekToken:function(){if(0===this.tokens.length)throw oa("ueoe","Unexpected end of expression: {0}",this.text);return this.tokens[0]},peek:function(t,e,n,r){return this.peekAhead(0,t,e,n,r)},peekAhead:function(t,e,n,r,i){if(this.tokens.length>t){var a=this.tokens[t],o=a.text;if(o===e||o===n||o===r||o===i||!e&&!n&&!r&&!i)return a}return!1},expect:function(t,e,n,r){var i=this.peek(t,e,n,r);return i?(this.tokens.shift(),i):!1},consume:function(t){if(0===this.tokens.length)throw oa("ueoe","Unexpected end of expression: {0}",this.text);var e=this.expect(t);return e||this.throwError("is unexpected, expecting ["+t+"]",this.peek()),e},unaryFn:function(t,e){var n=fa[t];return f(function(t,r){return n(t,r,e)},{constant:e.constant,inputs:[e]})},binaryFn:function(t,e,n,r){var i=fa[e];return f(function(e,r){return i(e,r,t,n)},{constant:t.constant&&n.constant,inputs:!r&&[t,n]})},identifier:function(){for(var t=this.consume().text;this.peek(".")&&this.peekAhead(1).identifier&&!this.peekAhead(2,"(");)t+=this.consume().text+this.consume().text;return Ln(t,this.options,this.text)},constant:function(){var t=this.consume().value;return f(function(){return t},{constant:!0,literal:!0})},statements:function(){for(var t=[];;)if(this.tokens.length>0&&!this.peek("}",")",";","]")&&t.push(this.filterChain()),!this.expect(";"))return 1===t.length?t[0]:function(e,n){for(var r,i=0,a=t.length;a>i;i++)r=t[i](e,n);return r}},filterChain:function(){for(var t,e=this.expression();t=this.expect("|");)e=this.filter(e);return e},filter:function(t){var e,r,i=this.$filter(this.consume().text);if(this.peek(":"))for(e=[],r=[];this.expect(":");)e.push(this.expression());var a=[t].concat(e||[]);return f(function(a,o){var s=t(a,o);if(r){r[0]=s;for(var u=e.length;u--;)r[u+1]=e[u](a,o);return i.apply(n,r)}return i(s)},{constant:!i.$stateful&&a.every(Dn),inputs:!i.$stateful&&a})},expression:function(){return this.assignment()},assignment:function(){var t,e,n=this.ternary();return(e=this.expect("="))?(n.assign||this.throwError("implies assignment but ["+this.text.substring(0,e.index)+"] can not be assigned to",e),t=this.ternary(),f(function(e,r){return n.assign(e,t(e,r),r)},{inputs:[n,t]})):n},ternary:function(){var t,e,n=this.logicalOR();if((e=this.expect("?"))&&(t=this.assignment(),this.consume(":"))){var r=this.assignment();return f(function(e,i){return n(e,i)?t(e,i):r(e,i)},{constant:n.constant&&t.constant&&r.constant})}return n},logicalOR:function(){for(var t,e=this.logicalAND();t=this.expect("||");)e=this.binaryFn(e,t.text,this.logicalAND(),!0);return e},logicalAND:function(){for(var t,e=this.equality();t=this.expect("&&");)e=this.binaryFn(e,t.text,this.equality(),!0);return e},equality:function(){for(var t,e=this.relational();t=this.expect("==","!=","===","!==");)e=this.binaryFn(e,t.text,this.relational());return e},relational:function(){for(var t,e=this.additive();t=this.expect("<",">","<=",">=");)e=this.binaryFn(e,t.text,this.additive());return e},additive:function(){for(var t,e=this.multiplicative();t=this.expect("+","-");)e=this.binaryFn(e,t.text,this.multiplicative());return e},multiplicative:function(){for(var t,e=this.unary();t=this.expect("*","/","%");)e=this.binaryFn(e,t.text,this.unary());return e},unary:function(){var t;return this.expect("+")?this.primary():(t=this.expect("-"))?this.binaryFn(pa.ZERO,t.text,this.unary()):(t=this.expect("!"))?this.unaryFn(t.text,this.unary()):this.primary()},fieldAccess:function(t){var e=this.identifier();return f(function(r,i,a){var o=a||t(r,i);return null==o?n:e(o)},{assign:function(n,r,i){var a=t(n,i);return a||t.assign(n,a={},i),e.assign(a,r)}})},objectIndex:function(t){var e=this.text,r=this.expression();return this.consume("]"),f(function(i,a){var o,s=t(i,a),u=r(i,a);return Pn(u,e),s?o=Vn(s[u],e):n},{assign:function(n,i,a){var o=Pn(r(n,a),e),s=Vn(t(n,a),e);return s||t.assign(n,s={},a),s[o]=i}})},functionCall:function(t,e){var r=[];if(")"!==this.peekToken().text)do r.push(this.expression());while(this.expect(","));this.consume(")");var i=this.text,a=r.length?[]:null;return function(o,s){var u=e?e(o,s):v(e)?n:o,l=t(o,s,u)||p;if(a)for(var c=r.length;c--;)a[c]=Vn(r[c](o,s),i);Vn(u,i),qn(l,i);var f=l.apply?l.apply(u,a):l(a[0],a[1],a[2],a[3],a[4]);return a&&(a.length=0),Vn(f,i)}},arrayDeclaration:function(){var t=[];if("]"!==this.peekToken().text)do{if(this.peek("]"))break;t.push(this.expression())}while(this.expect(","));return this.consume("]"),f(function(e,n){for(var r=[],i=0,a=t.length;a>i;i++)r.push(t[i](e,n));return r},{literal:!0,constant:t.every(Dn),inputs:t})},object:function(){var t=[],e=[];if("}"!==this.peekToken().text)do{if(this.peek("}"))break;var n=this.consume();n.constant?t.push(n.value):n.identifier?t.push(n.text):this.throwError("invalid key",n),this.consume(":"),e.push(this.expression())}while(this.expect(","));return this.consume("}"),f(function(n,r){for(var i={},a=0,o=e.length;o>a;a++)i[t[a]]=e[a](n,r);return i},{literal:!0,constant:e.every(Dn),inputs:e})}};var $a=le(),ma=le(),ga=Object.prototype.valueOf,va=r("$sce"),ya={HTML:"html",CSS:"css",URL:"url",RESOURCE_URL:"resourceUrl",JS:"js"},Wi=r("$compile"),ba=e.createElement("a"),wa=ir(t.location.href);sr.$inject=["$provide"],fr.$inject=["$locale"],dr.$inject=["$locale"];var xa=".",ka={yyyy:$r("FullYear",4),yy:$r("FullYear",2,0,!0),y:$r("FullYear",1),MMMM:mr("Month"),MMM:mr("Month",!0),MM:$r("Month",2,1),M:$r("Month",1,1),dd:$r("Date",2),d:$r("Date",1),HH:$r("Hours",2),H:$r("Hours",1),hh:$r("Hours",2,-12),h:$r("Hours",1,-12),mm:$r("Minutes",2),m:$r("Minutes",1),ss:$r("Seconds",2),s:$r("Seconds",1),sss:$r("Milliseconds",3),EEEE:mr("Day"),EEE:mr("Day",!0),a:wr,Z:gr,ww:br(2),w:br(1)},Sa=/((?:[^yMdHhmsaZEw']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z|w+))(.*)/,Ca=/^\-?\d+$/;xr.$inject=["$locale"];var Aa=m(Wr),Oa=m(Yr);Cr.$inject=["$parse"];var Ea=m({restrict:"E",compile:function(t,e){return e.href||e.xlinkHref||e.name?void 0:function(t,e){if("a"===e[0].nodeName.toLowerCase()){var n="[object SVGAnimatedString]"===ai.call(e.prop("href"))?"xlink:href":"href";e.on("click",function(t){e.attr(n)||t.preventDefault()})}}}}),ja={};a(Ri,function(t,e){if("multiple"!=t){var n=Xe("ng-"+e);ja[n]=function(){return{restrict:"A",priority:100,link:function(t,r,i){t.$watch(i[n],function(t){i.$set(e,!!t)})}}}}}),a(_i,function(t,e){ja[e]=function(){return{priority:100,link:function(t,n,r){if("ngPattern"===e&&"/"==r.ngPattern.charAt(0)){var i=r.ngPattern.match(zr);if(i)return r.$set("ngPattern",new RegExp(i[1],i[2])),void 0}t.$watch(r[e],function(t){r.$set(e,t)})}}}}),a(["src","srcset","href"],function(t){var e=Xe("ng-"+t);ja[e]=function(){return{priority:99,link:function(n,r,i){var a=t,o=t;"href"===t&&"[object SVGAnimatedString]"===ai.call(r.prop("href"))&&(o="xlinkHref",i.$attr[o]="xlink:href",a=null),i.$observe(e,function(e){return e?(i.$set(o,e),Xr&&a&&r.prop(a,i[o]),void 0):("href"===t&&i.$set(o,null),void 0)})}}}});var Na={$addControl:p,$$renameControl:Or,$removeControl:p,$setValidity:p,$setDirty:p,$setPristine:p,$setSubmitted:p},Ta="ng-submitted";Er.$inject=["$element","$attrs","$scope","$animate","$interpolate"];var Ma=function(t){return["$timeout",function(e){var r={name:"form",restrict:t?"EAC":"E",controller:Er,compile:function(t){return t.addClass(ho).addClass(co),{pre:function(t,r,i,a){if(!("action"in i)){var o=function(e){t.$apply(function(){a.$commitViewValue(),a.$setSubmitted()}),e.preventDefault()};Ci(r[0],"submit",o),r.on("$destroy",function(){e(function(){Ai(r[0],"submit",o)},0,!1)})}var s=a.$$parentForm,u=a.$name;u&&(Rn(t,null,u,a,u),i.$observe(i.name?"name":"ngForm",function(e){u!==e&&(Rn(t,null,u,n,u),u=e,Rn(t,null,u,a,u),s.$$renameControl(a,u))})),r.on("$destroy",function(){s.$removeControl(a),u&&Rn(t,null,u,n,u),f(a,Na)})}}}};return r}]},Pa=Ma(),Va=Ma(!0),qa=/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)/,Da=/^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?$/,Ra=/^[a-z0-9!#$%&'*+\/=?^_`{|}~.-]+@[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i,Ia=/^\s*(\-|\+)?(\d+|(\d*(\.\d*)))\s*$/,_a=/^(\d{4})-(\d{2})-(\d{2})$/,Ua=/^(\d{4})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,La=/^(\d{4})-W(\d\d)$/,Fa=/^(\d{4})-(\d\d)$/,Ha=/^(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,Ba={text:Nr,date:Vr("date",_a,Pr(_a,["yyyy","MM","dd"]),"yyyy-MM-dd"),"datetime-local":Vr("datetimelocal",Ua,Pr(Ua,["yyyy","MM","dd","HH","mm","ss","sss"]),"yyyy-MM-ddTHH:mm:ss.sss"),time:Vr("time",Ha,Pr(Ha,["HH","mm","ss","sss"]),"HH:mm:ss.sss"),week:Vr("week",La,Mr,"yyyy-Www"),month:Vr("month",Fa,Pr(Fa,["yyyy","MM"]),"yyyy-MM"),number:Dr,url:Rr,email:Ir,radio:_r,checkbox:Lr,hidden:p,button:p,submit:p,reset:p,file:p},za=["$browser","$sniffer","$filter","$parse",function(t,e,n,r){return{restrict:"E",require:["?ngModel"],link:{pre:function(i,a,o,s){s[0]&&(Ba[Wr(o.type)]||Ba.text)(i,a,o,s[0],e,t,n,r)}}}}],Ga=/^(true|false|\d+)$/,Wa=function(){return{restrict:"A",priority:100,compile:function(t,e){return Ga.test(e.ngValue)?function(t,e,n){n.$set("value",t.$eval(n.ngValue))}:function(t,e,n){t.$watch(n.ngValue,function(t){n.$set("value",t)})}}}},Ja=["$compile",function(t){return{restrict:"AC",compile:function(e){return t.$$addBindingClass(e),function(e,r,i){t.$$addBindingInfo(r,i.ngBind),r=r[0],e.$watch(i.ngBind,function(t){r.textContent=t===n?"":t})}}}}],Ya=["$interpolate","$compile",function(t,e){return{compile:function(r){return e.$$addBindingClass(r),function(r,i,a){var o=t(i.attr(a.$attr.ngBindTemplate));e.$$addBindingInfo(i,o.expressions),i=i[0],a.$observe("ngBindTemplate",function(t){i.textContent=t===n?"":t})}}}}],Za=["$sce","$parse","$compile",function(t,e,n){return{restrict:"A",compile:function(r,i){var a=e(i.ngBindHtml),o=e(i.ngBindHtml,function(t){return(t||"").toString()});return n.$$addBindingClass(r),function(e,r,i){n.$$addBindingInfo(r,i.ngBindHtml),e.$watch(o,function(){r.html(t.getTrustedHtml(a(e))||"")})}}}}],Ka=m({restrict:"A",require:"ngModel",link:function(t,e,n,r){r.$viewChangeListeners.push(function(){t.$eval(n.ngChange)})}}),Xa=Fr("",!0),Qa=Fr("Odd",0),to=Fr("Even",1),eo=Ar({compile:function(t,e){e.$set("ngCloak",n),t.removeClass("ng-cloak")}}),no=[function(){return{restrict:"A",scope:!0,controller:"@",priority:500}}],ro={},io={blur:!0,focus:!0};a("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "),function(t){var e=Xe("ng-"+t);ro[e]=["$parse","$rootScope",function(n,r){return{restrict:"A",compile:function(i,a){var o=n(a[e],null,!0);return function(e,n){n.on(t,function(n){var i=function(){o(e,{$event:n})};io[t]&&r.$$phase?e.$evalAsync(i):e.$apply(i)})}}}}]});var ao=["$animate",function(t){return{multiElement:!0,transclude:"element",priority:600,terminal:!0,restrict:"A",$$tlb:!0,link:function(n,r,i,a,o){var s,u,l;n.$watch(i.ngIf,function(n){n?u||o(function(n,a){u=a,n[n.length++]=e.createComment(" end ngIf: "+i.ngIf+" "),s={clone:n},t.enter(n,r.parent(),r)}):(l&&(l.remove(),l=null),u&&(u.$destroy(),u=null),s&&(l=ue(s.clone),t.leave(l).then(function(){l=null}),s=null))})}}}],oo=["$templateRequest","$anchorScroll","$animate","$sce",function(t,e,n,r){return{restrict:"ECA",priority:400,terminal:!0,transclude:"element",controller:si.noop,compile:function(i,a){var o=a.ngInclude||a.src,s=a.onload||"",u=a.autoscroll;return function(i,a,l,c,f){var d,h,p,$=0,m=function(){h&&(h.remove(),h=null),d&&(d.$destroy(),d=null),p&&(n.leave(p).then(function(){h=null}),h=p,p=null)};i.$watch(r.parseAsResourceUrl(o),function(r){var o=function(){!v(u)||u&&!i.$eval(u)||e()},l=++$;r?(t(r,!0).then(function(t){if(l===$){var e=i.$new();c.template=t;var u=f(e,function(t){m(),n.enter(t,null,a).then(o)});d=e,p=u,d.$emit("$includeContentLoaded",r),i.$eval(s)}},function(){l===$&&(m(),i.$emit("$includeContentError",r))}),i.$emit("$includeContentRequested",r)):(m(),c.template=null)})}}}}],so=["$compile",function(t){return{restrict:"ECA",priority:-400,require:"ngInclude",link:function(n,r,i,a){return/SVG/.test(r[0].toString())?(r.empty(),t(ve(a.template,e).childNodes)(n,function(t){r.append(t)},{futureParentElement:r}),void 0):(r.html(a.template),t(r.contents())(n),void 0)}}}],uo=Ar({priority:450,compile:function(){return{pre:function(t,e,n){t.$eval(n.ngInit)}}}}),lo=function(){return{restrict:"A",priority:100,require:"ngModel",link:function(t,e,r,i){var o=e.attr(r.$attr.ngList)||", ",s="false"!==r.ngTrim,u=s?fi(o):o,l=function(t){if(!g(t)){var e=[];return t&&a(t.split(u),function(t){t&&e.push(s?fi(t):t)}),e}};i.$parsers.push(l),i.$formatters.push(function(t){return ci(t)?t.join(o):n}),i.$isEmpty=function(t){return!t||!t.length}}}},co="ng-valid",fo="ng-invalid",ho="ng-pristine",po="ng-dirty",$o="ng-untouched",mo="ng-touched",go="ng-pending",vo=new r("ngModel"),yo=["$scope","$exceptionHandler","$attrs","$element","$parse","$animate","$timeout","$rootScope","$q","$interpolate",function(t,e,r,i,o,s,u,l,c,f){this.$viewValue=Number.NaN,this.$modelValue=Number.NaN,this.$$rawModelValue=n,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=n,this.$name=f(r.name||"",!1)(t);var d=o(r.ngModel),h=d.assign,$=d,m=h,y=null,b=this;this.$$setOptions=function(t){if(b.$options=t,t&&t.getterSetter){var e=o(r.ngModel+"()"),n=o(r.ngModel+"($$$p)");$=function(t){var n=d(t);return k(n)&&(n=e(t)),n},m=function(t){k(d(t))?n(t,{$$$p:b.$modelValue}):h(t,b.$modelValue)}}else if(!d.assign)throw vo("nonassign","Expression '{0}' is non-assignable. Element: {1}",r.ngModel,z(i))},this.$render=p,this.$isEmpty=function(t){return g(t)||""===t||null===t||t!==t};var x=i.inheritedData("$formController")||Na,S=0;Hr({ctrl:this,$element:i,set:function(t,e){t[e]=!0},unset:function(t,e){delete t[e]},parentForm:x,$animate:s}),this.$setPristine=function(){b.$dirty=!1,b.$pristine=!0,s.removeClass(i,po),s.addClass(i,ho)},this.$setDirty=function(){b.$dirty=!0,b.$pristine=!1,s.removeClass(i,ho),s.addClass(i,po),x.$setDirty()},this.$setUntouched=function(){b.$touched=!1,b.$untouched=!0,s.setClass(i,$o,mo)},this.$setTouched=function(){b.$touched=!0,b.$untouched=!1,s.setClass(i,mo,$o)},this.$rollbackViewValue=function(){u.cancel(y),b.$viewValue=b.$$lastCommittedViewValue,b.$render()},this.$validate=function(){if(!w(b.$modelValue)||!isNaN(b.$modelValue)){var t=b.$$lastCommittedViewValue,e=b.$$rawModelValue,r=b.$$parserName||"parse",i=b.$error[r]?!1:n,a=b.$valid,o=b.$modelValue,s=b.$options&&b.$options.allowInvalid;b.$$runValidators(i,e,t,function(t){s||a===t||(b.$modelValue=t?e:n,b.$modelValue!==o&&b.$$writeModelToScope())})}},this.$$runValidators=function(t,e,r,i){function o(t){var e=b.$$parserName||"parse";if(t===n)l(e,null);else if(l(e,t),!t)return a(b.$validators,function(t,e){l(e,null)}),a(b.$asyncValidators,function(t,e){l(e,null)}),!1;return!0}function s(){var t=!0;return a(b.$validators,function(n,i){var a=n(e,r);t=t&&a,l(i,a)}),t?!0:(a(b.$asyncValidators,function(t,e){l(e,null)}),!1)}function u(){var t=[],i=!0;a(b.$asyncValidators,function(a,o){var s=a(e,r);if(!T(s))throw vo("$asyncValidators","Expected asynchronous validator to return a promise but got '{0}' instead.",s);l(o,n),t.push(s.then(function(){l(o,!0)},function(){i=!1,l(o,!1)}))}),t.length?c.all(t).then(function(){f(i)},p):f(!0)}function l(t,e){d===S&&b.$setValidity(t,e)}function f(t){d===S&&i(t)}S++;var d=S;return o(t)?s()?(u(),void 0):(f(!1),void 0):(f(!1),void 0)},this.$commitViewValue=function(){var t=b.$viewValue;u.cancel(y),(b.$$lastCommittedViewValue!==t||""===t&&b.$$hasNativeValidators)&&(b.$$lastCommittedViewValue=t,b.$pristine&&this.$setDirty(),this.$$parseAndValidate())},this.$$parseAndValidate=function(){function e(){b.$modelValue!==s&&b.$$writeModelToScope()}var r=b.$$lastCommittedViewValue,i=r,a=g(i)?n:!0;if(a)for(var o=0;o<b.$parsers.length;o++)if(i=b.$parsers[o](i),g(i)){a=!1;break}w(b.$modelValue)&&isNaN(b.$modelValue)&&(b.$modelValue=$(t));var s=b.$modelValue,u=b.$options&&b.$options.allowInvalid;b.$$rawModelValue=i,u&&(b.$modelValue=i,e()),b.$$runValidators(a,i,b.$$lastCommittedViewValue,function(t){u||(b.$modelValue=t?i:n,e())})},this.$$writeModelToScope=function(){m(t,b.$modelValue),a(b.$viewChangeListeners,function(t){try{t()}catch(n){e(n)}})},this.$setViewValue=function(t,e){b.$viewValue=t,(!b.$options||b.$options.updateOnDefault)&&b.$$debounceViewValueCommit(e)},this.$$debounceViewValueCommit=function(e){var n,r=0,i=b.$options;i&&v(i.debounce)&&(n=i.debounce,w(n)?r=n:w(n[e])?r=n[e]:w(n["default"])&&(r=n["default"])),u.cancel(y),r?y=u(function(){b.$commitViewValue()},r):l.$$phase?b.$commitViewValue():t.$apply(function(){b.$commitViewValue()})},t.$watch(function(){var e=$(t);if(e!==b.$modelValue){b.$modelValue=b.$$rawModelValue=e;for(var r=b.$formatters,i=r.length,a=e;i--;)a=r[i](a);b.$viewValue!==a&&(b.$viewValue=b.$$lastCommittedViewValue=a,b.$render(),b.$$runValidators(n,e,a,p))}return e})}],bo=["$rootScope",function(t){return{restrict:"A",require:["ngModel","^?form","^?ngModelOptions"],controller:yo,priority:1,compile:function(e){return e.addClass(ho).addClass($o).addClass(co),{pre:function(t,e,n,r){var i=r[0],a=r[1]||Na;i.$$setOptions(r[2]&&r[2].$options),a.$addControl(i),n.$observe("name",function(t){i.$name!==t&&a.$$renameControl(i,t)}),t.$on("$destroy",function(){a.$removeControl(i)})},post:function(e,n,r,i){var a=i[0];a.$options&&a.$options.updateOn&&n.on(a.$options.updateOn,function(t){a.$$debounceViewValueCommit(t&&t.type)}),n.on("blur",function(){a.$touched||(t.$$phase?e.$evalAsync(a.$setTouched):e.$apply(a.$setTouched))})}}}}}],wo=/(\s+|^)default(\s+|$)/,xo=function(){return{restrict:"A",controller:["$scope","$attrs",function(t,e){var r=this;this.$options=t.$eval(e.ngModelOptions),this.$options.updateOn!==n?(this.$options.updateOnDefault=!1,this.$options.updateOn=fi(this.$options.updateOn.replace(wo,function(){return r.$options.updateOnDefault=!0," "}))):this.$options.updateOnDefault=!0}]}},ko=Ar({terminal:!0,priority:1e3}),So=["$locale","$interpolate",function(t,e){var n=/{}/g,r=/^when(Minus)?(.+)$/;return{restrict:"EA",link:function(i,o,s){function u(t){o.text(t||"")}var l,c=s.count,f=s.$attr.when&&o.attr(s.$attr.when),d=s.offset||0,h=i.$eval(f)||{},p={},$=e.startSymbol(),m=e.endSymbol(),g=$+c+"-"+d+m,v=si.noop;a(s,function(t,e){var n=r.exec(e);if(n){var i=(n[1]?"-":"")+Wr(n[2]);h[i]=o.attr(s.$attr[e])}}),a(h,function(t,r){p[r]=e(t.replace(n,g))}),i.$watch(c,function(e){var n=parseFloat(e),r=isNaN(n);r||n in h||(n=t.pluralCat(n-d)),n===l||r&&isNaN(l)||(v(),v=i.$watch(p[n],u),l=n)})}}}],Co=["$parse","$animate",function(t,o){var s="$$NG_REMOVED",u=r("ngRepeat"),l=function(t,e,n,r,i,a,o){t[n]=r,i&&(t[i]=a),t.$index=e,t.$first=0===e,t.$last=e===o-1,t.$middle=!(t.$first||t.$last),t.$odd=!(t.$even=0===(1&e))},c=function(t){return t.clone[0]},f=function(t){return t.clone[t.clone.length-1]};return{restrict:"A",multiElement:!0,transclude:"element",priority:1e3,terminal:!0,$$tlb:!0,compile:function(r,d){var h=d.ngRepeat,p=e.createComment(" end ngRepeat: "+h+" "),$=h.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+track\s+by\s+([\s\S]+?))?\s*$/);if(!$)throw u("iexp","Expected expression in form of '_item_ in _collection_[ track by _id_]' but got '{0}'.",h);var m=$[1],g=$[2],v=$[3],y=$[4];if($=m.match(/^(?:(\s*[\$\w]+)|\(\s*([\$\w]+)\s*,\s*([\$\w]+)\s*\))$/),!$)throw u("iidexp","'_item_' in '_item_ in _collection_' should be an identifier or '(_key_, _value_)' expression, but got '{0}'.",m);var b=$[3]||$[1],w=$[2];if(v&&(!/^[$a-zA-Z_][$a-zA-Z0-9_]*$/.test(v)||/^(null|undefined|this|\$index|\$first|\$middle|\$last|\$even|\$odd|\$parent|\$root|\$id)$/.test(v)))throw u("badident","alias '{0}' is invalid --- must be a valid JS identifier which is not a reserved name.",v);var x,k,S,C,A={$id:Ue};return y?x=t(y):(S=function(t,e){return Ue(e)},C=function(t){return t}),function(t,e,r,d,$){x&&(k=function(e,n,r){return w&&(A[w]=e),A[b]=n,A.$index=r,x(t,A)});var m=le();t.$watchCollection(g,function(r){var d,g,y,x,A,O,E,j,N,T,M,P,V=e[0],q=le();if(v&&(t[v]=r),i(r))N=r,j=k||S;else{j=k||C,N=[];for(var D in r)r.hasOwnProperty(D)&&"$"!=D.charAt(0)&&N.push(D);N.sort()}for(x=N.length,M=new Array(x),d=0;x>d;d++)if(A=r===N?d:N[d],O=r[A],E=j(A,O,d),m[E])T=m[E],delete m[E],q[E]=T,M[d]=T;else{if(q[E])throw a(M,function(t){t&&t.scope&&(m[t.id]=t)}),u("dupes","Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: {0}, Duplicate key: {1}, Duplicate value: {2}",h,E,O);M[d]={id:E,scope:n,clone:n},q[E]=!0}for(var R in m){if(T=m[R],P=ue(T.clone),o.leave(P),P[0].parentNode)for(d=0,g=P.length;g>d;d++)P[d][s]=!0;T.scope.$destroy()}for(d=0;x>d;d++)if(A=r===N?d:N[d],O=r[A],T=M[d],T.scope){y=V;do y=y.nextSibling;while(y&&y[s]);c(T)!=y&&o.move(ue(T.clone),null,Qr(V)),V=f(T),l(T.scope,d,b,O,w,A,x)}else $(function(t,e){T.scope=e;var n=p.cloneNode(!1);t[t.length++]=n,o.enter(t,null,Qr(V)),V=n,T.clone=t,q[T.id]=T,l(T.scope,d,b,O,w,A,x)});m=q})}}}}],Ao="ng-hide",Oo="ng-hide-animate",Eo=["$animate",function(t){return{restrict:"A",multiElement:!0,link:function(e,n,r){e.$watch(r.ngShow,function(e){t[e?"removeClass":"addClass"](n,Ao,{tempClasses:Oo})})}}}],jo=["$animate",function(t){return{restrict:"A",multiElement:!0,link:function(e,n,r){e.$watch(r.ngHide,function(e){t[e?"addClass":"removeClass"](n,Ao,{tempClasses:Oo})})}}}],No=Ar(function(t,e,n){t.$watchCollection(n.ngStyle,function(t,n){n&&t!==n&&a(n,function(t,n){e.css(n,"")}),t&&e.css(t)})}),To=["$animate",function(t){return{restrict:"EA",require:"ngSwitch",controller:["$scope",function(){this.cases={}}],link:function(n,r,i,o){var s=i.ngSwitch||i.on,u=[],l=[],c=[],f=[],d=function(t,e){return function(){t.splice(e,1)}};n.$watch(s,function(n){var r,i;for(r=0,i=c.length;i>r;++r)t.cancel(c[r]);for(c.length=0,r=0,i=f.length;i>r;++r){var s=ue(l[r].clone);f[r].$destroy();var h=c[r]=t.leave(s);h.then(d(c,r))}l.length=0,f.length=0,(u=o.cases["!"+n]||o.cases["?"])&&a(u,function(n){n.transclude(function(r,i){f.push(i);var a=n.element;r[r.length++]=e.createComment(" end ngSwitchWhen: ");var o={clone:r};l.push(o),t.enter(r,a.parent(),a)})})})}}}],Mo=Ar({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(t,e,n,r,i){r.cases["!"+n.ngSwitchWhen]=r.cases["!"+n.ngSwitchWhen]||[],r.cases["!"+n.ngSwitchWhen].push({transclude:i,element:e})}}),Po=Ar({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(t,e,n,r,i){r.cases["?"]=r.cases["?"]||[],r.cases["?"].push({transclude:i,element:e})}}),Vo=Ar({restrict:"EAC",link:function(t,e,n,i,a){if(!a)throw r("ngTransclude")("orphan","Illegal use of ngTransclude directive in the template! No parent directive that requires a transclusion found. Element: {0}",z(e));a(function(t){e.empty(),e.append(t)})}}),qo=["$templateCache",function(t){return{restrict:"E",terminal:!0,compile:function(e,n){if("text/ng-template"==n.type){var r=n.id,i=e[0].text;t.put(r,i)}}}}],Do=r("ngOptions"),Ro=m({restrict:"A",terminal:!0}),Io=["$compile","$parse",function(t,r){var i=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+group\s+by\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]+?))?$/,s={$setViewValue:p};return{restrict:"E",require:["select","?ngModel"],controller:["$element","$scope","$attrs",function(t,e,n){var r,i,a=this,o={},u=s;a.databound=n.ngModel,a.init=function(t,e,n){u=t,r=e,i=n},a.addOption=function(e,n){oe(e,'"option value"'),o[e]=!0,u.$viewValue==e&&(t.val(e),i.parent()&&i.remove()),n&&n[0].hasAttribute("selected")&&(n[0].selected=!0)},a.removeOption=function(t){this.hasOption(t)&&(delete o[t],u.$viewValue===t&&this.renderUnknownOption(t))},a.renderUnknownOption=function(e){var n="? "+Ue(e)+" ?";i.val(n),t.prepend(i),t.val(n),i.prop("selected",!0)},a.hasOption=function(t){return o.hasOwnProperty(t)},e.$on("$destroy",function(){a.renderUnknownOption=p})}],link:function(s,u,l,c){function f(t,e,n,r){n.$render=function(){var t=n.$viewValue;r.hasOption(t)?(C.parent()&&C.remove(),e.val(t),""===t&&p.prop("selected",!0)):g(t)&&p?e.val(""):r.renderUnknownOption(t)},e.on("change",function(){t.$apply(function(){C.parent()&&C.remove(),n.$setViewValue(e.val())})})}function d(t,e,n){var r;n.$render=function(){var t=new Le(n.$viewValue);a(e.find("option"),function(e){e.selected=v(t.get(e.value))})},t.$watch(function(){I(r,n.$viewValue)||(r=R(n.$viewValue),n.$render())}),e.on("change",function(){t.$apply(function(){var t=[];a(e.find("option"),function(e){e.selected&&t.push(e.value)}),n.$setViewValue(t)})})}function h(e,s,u){function l(t,n,r){return I[O]=r,N&&(I[N]=n),t(e,I)}function c(){e.$apply(function(){var t,n=P(e)||[];if(y)t=[],a(s.val(),function(e){e=q?D[e]:e,t.push(f(e,n[e]))});else{var r=q?D[s.val()]:s.val();t=f(r,n[r])}u.$setViewValue(t),g()})}function f(t,e){if("?"===t)return n;if(""===t)return null;var r=j?j:M;return l(r,t,e)}function d(){var t,n=P(e);if(n&&ci(n)){t=new Array(n.length);for(var r=0,i=n.length;i>r;r++)t[r]=l(A,r,n[r]);return t}if(n){t={};for(var a in n)n.hasOwnProperty(a)&&(t[a]=l(A,a,n[a]))}return t}function h(t){var e;if(y)if(q&&ci(t)){e=new Le([]);for(var n=0;n<t.length;n++)e.put(l(q,null,t[n]),!0)}else e=new Le(t);else q&&(t=l(q,null,t));return function(n,r){var i;return i=q?q:j?j:M,y?v(e.remove(l(i,n,r))):t===l(i,n,r)}}function p(){x||(e.$$postDigest(g),x=!0)}function m(t,e,n){t[e]=t[e]||0,t[e]+=n?1:-1}function g(){x=!1;var t,n,r,i,c,f,d,p,g,b,C,O,E,j,M,V,_,U={"":[]},L=[""],F=u.$viewValue,H=P(e)||[],B=N?o(H):H,z={},G=h(F),W=!1;for(D={},O=0;b=B.length,b>O;O++)d=O,N&&(d=B[O],"$"===d.charAt(0))||(p=H[d],t=l(T,d,p)||"",(n=U[t])||(n=U[t]=[],L.push(t)),E=G(d,p),W=W||E,V=l(A,d,p),V=v(V)?V:"",_=q?q(e,I):N?B[O]:O,q&&(D[_]=d),n.push({id:_,label:V,selected:E}));</script>
 
var e=na.exec(t);return(e[1]||""===t)&&this.path(decodeURIComponent(e[1])),(e[2]||e[1]||""===t)&&this.search(e[3]||""),this.hash(e[5]||""),this},protocol:jn("$$protocol"),host:jn("$$host"),port:jn("$$port"),path:Nn("$$path",function(t){return t=null!==t?t.toString():"","/"==t.charAt(0)?t:"/"+t}),search:function(t,e){switch(arguments.length){case 0:return this.$$search;case 1:if(b(t)||w(t))t=t.toString(),this.$$search=W(t);else{if(!y(t))throw ia("isrcharg","The first argument of the `$location#search()` call must be a string or an object.");t=D(t,{}),a(t,function(e,n){null==e&&delete t[n]}),this.$$search=t}break;default:g(e)||null===e?delete this.$$search[t]:this.$$search[t]=e}return this.$$compose(),this},hash:Nn("$$hash",function(t){return null!==t?t.toString():""}),replace:function(){return this.$$replace=!0,this}};a([En,On,An],function(t){t.prototype=Object.create(aa),t.prototype.state=function(e){if(!arguments.length)return this.$$state;if(t!==An||!this.$$html5)throw ia("nostate","History API state support is available only in HTML5 mode and only in browsers supporting HTML5 History API");return this.$$state=g(e)?null:e,this}});var oa=r("$parse"),sa=Function.prototype.call,ua=Function.prototype.apply,la=Function.prototype.bind,ca=le();a({"null":function(){return null},"true":function(){return!0},"false":function(){return!1},undefined:function(){}},function(t,e){t.constant=t.literal=t.sharedGetter=!0,ca[e]=t}),ca["this"]=function(t){return t},ca["this"].sharedGetter=!0;var fa=f(le(),{"+":function(t,e,r,i){return r=r(t,e),i=i(t,e),v(r)?v(i)?r+i:r:v(i)?i:n},"-":function(t,e,n,r){return n=n(t,e),r=r(t,e),(v(n)?n:0)-(v(r)?r:0)},"*":function(t,e,n,r){return n(t,e)*r(t,e)},"/":function(t,e,n,r){return n(t,e)/r(t,e)},"%":function(t,e,n,r){return n(t,e)%r(t,e)},"===":function(t,e,n,r){return n(t,e)===r(t,e)},"!==":function(t,e,n,r){return n(t,e)!==r(t,e)},"==":function(t,e,n,r){return n(t,e)==r(t,e)},"!=":function(t,e,n,r){return n(t,e)!=r(t,e)},"<":function(t,e,n,r){return n(t,e)<r(t,e)},">":function(t,e,n,r){return n(t,e)>r(t,e)},"<=":function(t,e,n,r){return n(t,e)<=r(t,e)},">=":function(t,e,n,r){return n(t,e)>=r(t,e)},"&&":function(t,e,n,r){return n(t,e)&&r(t,e)},"||":function(t,e,n,r){return n(t,e)||r(t,e)},"!":function(t,e,n){return!n(t,e)},"=":!0,"|":!0}),da={n:"\n",f:"\f",r:"\r",t:" ",v:"�","'":"'",'"':'"'},ha=function(t){this.options=t};ha.prototype={constructor:ha,lex:function(t){for(this.text=t,this.index=0,this.tokens=[];this.index<this.text.length;){var e=this.text.charAt(this.index);if('"'===e||"'"===e)this.readString(e);else if(this.isNumber(e)||"."===e&&this.isNumber(this.peek()))this.readNumber();else if(this.isIdent(e))this.readIdent();else if(this.is(e,"(){}[].,;:?"))this.tokens.push({index:this.index,text:e}),this.index++;else if(this.isWhitespace(e))this.index++;else{var n=e+this.peek(),r=n+this.peek(2),i=fa[e],a=fa[n],o=fa[r];if(i||a||o){var s=o?r:a?n:e;this.tokens.push({index:this.index,text:s,operator:!0}),this.index+=s.length}else this.throwError("Unexpected next character ",this.index,this.index+1)}}return this.tokens},is:function(t,e){return-1!==e.indexOf(t)},peek:function(t){var e=t||1;return this.index+e<this.text.length?this.text.charAt(this.index+e):!1},isNumber:function(t){return t>="0"&&"9">=t&&"string"==typeof t},isWhitespace:function(t){return" "===t||"\r"===t||" "===t||"\n"===t||"�"===t||" "===t},isIdent:function(t){return t>="a"&&"z">=t||t>="A"&&"Z">=t||"_"===t||"$"===t},isExpOperator:function(t){return"-"===t||"+"===t||this.isNumber(t)},throwError:function(t,e,n){n=n||this.index;var r=v(e)?"s "+e+"-"+this.index+" ["+this.text.substring(e,n)+"]":" "+n;throw oa("lexerr","Lexer Error: {0} at column{1} in expression [{2}].",t,r,this.text)},readNumber:function(){for(var t="",e=this.index;this.index<this.text.length;){var n=Wr(this.text.charAt(this.index));if("."==n||this.isNumber(n))t+=n;else{var r=this.peek();if("e"==n&&this.isExpOperator(r))t+=n;else if(this.isExpOperator(n)&&r&&this.isNumber(r)&&"e"==t.charAt(t.length-1))t+=n;else{if(!this.isExpOperator(n)||r&&this.isNumber(r)||"e"!=t.charAt(t.length-1))break;this.throwError("Invalid exponent")}}this.index++}this.tokens.push({index:e,text:t,constant:!0,value:Number(t)})},readIdent:function(){for(var t=this.index;this.index<this.text.length;){var e=this.text.charAt(this.index);if(!this.isIdent(e)&&!this.isNumber(e))break;this.index++}this.tokens.push({index:t,text:this.text.slice(t,this.index),identifier:!0})},readString:function(t){var e=this.index;this.index++;for(var n="",r=t,i=!1;this.index<this.text.length;){var a=this.text.charAt(this.index);if(r+=a,i){if("u"===a){var o=this.text.substring(this.index+1,this.index+5);o.match(/[\da-f]{4}/i)||this.throwError("Invalid unicode escape [\\u"+o+"]"),this.index+=4,n+=String.fromCharCode(parseInt(o,16))}else{var s=da[a];n+=s||a}i=!1}else if("\\"===a)i=!0;else{if(a===t)return this.index++,this.tokens.push({index:e,text:r,constant:!0,value:n}),void 0;n+=a}this.index++}this.throwError("Unterminated quote",e)}};var pa=function(t,e,n){this.lexer=t,this.$filter=e,this.options=n};pa.ZERO=f(function(){return 0},{sharedGetter:!0,constant:!0}),pa.prototype={constructor:pa,parse:function(t){this.text=t,this.tokens=this.lexer.lex(t);var e=this.statements();return 0!==this.tokens.length&&this.throwError("is an unexpected token",this.tokens[0]),e.literal=!!e.literal,e.constant=!!e.constant,e},primary:function(){var t;this.expect("(")?(t=this.filterChain(),this.consume(")")):this.expect("[")?t=this.arrayDeclaration():this.expect("{")?t=this.object():this.peek().identifier&&this.peek().text in ca?t=ca[this.consume().text]:this.peek().identifier?t=this.identifier():this.peek().constant?t=this.constant():this.throwError("not a primary expression",this.peek());for(var e,n;e=this.expect("(","[",".");)"("===e.text?(t=this.functionCall(t,n),n=null):"["===e.text?(n=t,t=this.objectIndex(t)):"."===e.text?(n=t,t=this.fieldAccess(t)):this.throwError("IMPOSSIBLE");return t},throwError:function(t,e){throw oa("syntax","Syntax Error: Token '{0}' {1} at column {2} of the expression [{3}] starting at [{4}].",e.text,t,e.index+1,this.text,this.text.substring(e.index))},peekToken:function(){if(0===this.tokens.length)throw oa("ueoe","Unexpected end of expression: {0}",this.text);return this.tokens[0]},peek:function(t,e,n,r){return this.peekAhead(0,t,e,n,r)},peekAhead:function(t,e,n,r,i){if(this.tokens.length>t){var a=this.tokens[t],o=a.text;if(o===e||o===n||o===r||o===i||!e&&!n&&!r&&!i)return a}return!1},expect:function(t,e,n,r){var i=this.peek(t,e,n,r);return i?(this.tokens.shift(),i):!1},consume:function(t){if(0===this.tokens.length)throw oa("ueoe","Unexpected end of expression: {0}",this.text);var e=this.expect(t);return e||this.throwError("is unexpected, expecting ["+t+"]",this.peek()),e},unaryFn:function(t,e){var n=fa[t];return f(function(t,r){return n(t,r,e)},{constant:e.constant,inputs:[e]})},binaryFn:function(t,e,n,r){var i=fa[e];return f(function(e,r){return i(e,r,t,n)},{constant:t.constant&&n.constant,inputs:!r&&[t,n]})},identifier:function(){for(var t=this.consume().text;this.peek(".")&&this.peekAhead(1).identifier&&!this.peekAhead(2,"(");)t+=this.consume().text+this.consume().text;return Ln(t,this.options,this.text)},constant:function(){var t=this.consume().value;return f(function(){return t},{constant:!0,literal:!0})},statements:function(){for(var t=[];;)if(this.tokens.length>0&&!this.peek("}",")",";","]")&&t.push(this.filterChain()),!this.expect(";"))return 1===t.length?t[0]:function(e,n){for(var r,i=0,a=t.length;a>i;i++)r=t[i](e,n);return r}},filterChain:function(){for(var t,e=this.expression();t=this.expect("|");)e=this.filter(e);return e},filter:function(t){var e,r,i=this.$filter(this.consume().text);if(this.peek(":"))for(e=[],r=[];this.expect(":");)e.push(this.expression());var a=[t].concat(e||[]);return f(function(a,o){var s=t(a,o);if(r){r[0]=s;for(var u=e.length;u--;)r[u+1]=e[u](a,o);return i.apply(n,r)}return i(s)},{constant:!i.$stateful&&a.every(Dn),inputs:!i.$stateful&&a})},expression:function(){return this.assignment()},assignment:function(){var t,e,n=this.ternary();return(e=this.expect("="))?(n.assign||this.throwError("implies assignment but ["+this.text.substring(0,e.index)+"] can not be assigned to",e),t=this.ternary(),f(function(e,r){return n.assign(e,t(e,r),r)},{inputs:[n,t]})):n},ternary:function(){var t,e,n=this.logicalOR();if((e=this.expect("?"))&&(t=this.assignment(),this.consume(":"))){var r=this.assignment();return f(function(e,i){return n(e,i)?t(e,i):r(e,i)},{constant:n.constant&&t.constant&&r.constant})}return n},logicalOR:function(){for(var t,e=this.logicalAND();t=this.expect("||");)e=this.binaryFn(e,t.text,this.logicalAND(),!0);return e},logicalAND:function(){for(var t,e=this.equality();t=this.expect("&&");)e=this.binaryFn(e,t.text,this.equality(),!0);return e},equality:function(){for(var t,e=this.relational();t=this.expect("==","!=","===","!==");)e=this.binaryFn(e,t.text,this.relational());return e},relational:function(){for(var t,e=this.additive();t=this.expect("<",">","<=",">=");)e=this.binaryFn(e,t.text,this.additive());return e},additive:function(){for(var t,e=this.multiplicative();t=this.expect("+","-");)e=this.binaryFn(e,t.text,this.multiplicative());return e},multiplicative:function(){for(var t,e=this.unary();t=this.expect("*","/","%");)e=this.binaryFn(e,t.text,this.unary());return e},unary:function(){var t;return this.expect("+")?this.primary():(t=this.expect("-"))?this.binaryFn(pa.ZERO,t.text,this.unary()):(t=this.expect("!"))?this.unaryFn(t.text,this.unary()):this.primary()},fieldAccess:function(t){var e=this.identifier();return f(function(r,i,a){var o=a||t(r,i);return null==o?n:e(o)},{assign:function(n,r,i){var a=t(n,i);return a||t.assign(n,a={},i),e.assign(a,r)}})},objectIndex:function(t){var e=this.text,r=this.expression();return this.consume("]"),f(function(i,a){var o,s=t(i,a),u=r(i,a);return Pn(u,e),s?o=Vn(s[u],e):n},{assign:function(n,i,a){var o=Pn(r(n,a),e),s=Vn(t(n,a),e);return s||t.assign(n,s={},a),s[o]=i}})},functionCall:function(t,e){var r=[];if(")"!==this.peekToken().text)do r.push(this.expression());while(this.expect(","));this.consume(")");var i=this.text,a=r.length?[]:null;return function(o,s){var u=e?e(o,s):v(e)?n:o,l=t(o,s,u)||p;if(a)for(var c=r.length;c--;)a[c]=Vn(r[c](o,s),i);Vn(u,i),qn(l,i);var f=l.apply?l.apply(u,a):l(a[0],a[1],a[2],a[3],a[4]);return a&&(a.length=0),Vn(f,i)}},arrayDeclaration:function(){var t=[];if("]"!==this.peekToken().text)do{if(this.peek("]"))break;t.push(this.expression())}while(this.expect(","));return this.consume("]"),f(function(e,n){for(var r=[],i=0,a=t.length;a>i;i++)r.push(t[i](e,n));return r},{literal:!0,constant:t.every(Dn),inputs:t})},object:function(){var t=[],e=[];if("}"!==this.peekToken().text)do{if(this.peek("}"))break;var n=this.consume();n.constant?t.push(n.value):n.identifier?t.push(n.text):this.throwError("invalid key",n),this.consume(":"),e.push(this.expression())}while(this.expect(","));return this.consume("}"),f(function(n,r){for(var i={},a=0,o=e.length;o>a;a++)i[t[a]]=e[a](n,r);return i},{literal:!0,constant:e.every(Dn),inputs:e})}};var $a=le(),ma=le(),ga=Object.prototype.valueOf,va=r("$sce"),ya={HTML:"html",CSS:"css",URL:"url",RESOURCE_URL:"resourceUrl",JS:"js"},Wi=r("$compile"),ba=e.createElement("a"),wa=ir(t.location.href);sr.$inject=["$provide"],fr.$inject=["$locale"],dr.$inject=["$locale"];var xa=".",ka={yyyy:$r("FullYear",4),yy:$r("FullYear",2,0,!0),y:$r("FullYear",1),MMMM:mr("Month"),MMM:mr("Month",!0),MM:$r("Month",2,1),M:$r("Month",1,1),dd:$r("Date",2),d:$r("Date",1),HH:$r("Hours",2),H:$r("Hours",1),hh:$r("Hours",2,-12),h:$r("Hours",1,-12),mm:$r("Minutes",2),m:$r("Minutes",1),ss:$r("Seconds",2),s:$r("Seconds",1),sss:$r("Milliseconds",3),EEEE:mr("Day"),EEE:mr("Day",!0),a:wr,Z:gr,ww:br(2),w:br(1)},Sa=/((?:[^yMdHhmsaZEw']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z|w+))(.*)/,Ca=/^\-?\d+$/;xr.$inject=["$locale"];var Aa=m(Wr),Oa=m(Yr);Cr.$inject=["$parse"];var Ea=m({restrict:"E",compile:function(t,e){return e.href||e.xlinkHref||e.name?void 0:function(t,e){if("a"===e[0].nodeName.toLowerCase()){var n="[object SVGAnimatedString]"===ai.call(e.prop("href"))?"xlink:href":"href";e.on("click",function(t){e.attr(n)||t.preventDefault()})}}}}),ja={};a(Ri,function(t,e){if("multiple"!=t){var n=Xe("ng-"+e);ja[n]=function(){return{restrict:"A",priority:100,link:function(t,r,i){t.$watch(i[n],function(t){i.$set(e,!!t)})}}}}}),a(_i,function(t,e){ja[e]=function(){return{priority:100,link:function(t,n,r){if("ngPattern"===e&&"/"==r.ngPattern.charAt(0)){var i=r.ngPattern.match(zr);if(i)return r.$set("ngPattern",new RegExp(i[1],i[2])),void 0}t.$watch(r[e],function(t){r.$set(e,t)})}}}}),a(["src","srcset","href"],function(t){var e=Xe("ng-"+t);ja[e]=function(){return{priority:99,link:function(n,r,i){var a=t,o=t;"href"===t&&"[object SVGAnimatedString]"===ai.call(r.prop("href"))&&(o="xlinkHref",i.$attr[o]="xlink:href",a=null),i.$observe(e,function(e){return e?(i.$set(o,e),Xr&&a&&r.prop(a,i[o]),void 0):("href"===t&&i.$set(o,null),void 0)})}}}});var Na={$addControl:p,$$renameControl:Or,$removeControl:p,$setValidity:p,$setDirty:p,$setPristine:p,$setSubmitted:p},Ta="ng-submitted";Er.$inject=["$element","$attrs","$scope","$animate","$interpolate"];var Ma=function(t){return["$timeout",function(e){var r={name:"form",restrict:t?"EAC":"E",controller:Er,compile:function(t){return t.addClass(ho).addClass(co),{pre:function(t,r,i,a){if(!("action"in i)){var o=function(e){t.$apply(function(){a.$commitViewValue(),a.$setSubmitted()}),e.preventDefault()};Ci(r[0],"submit",o),r.on("$destroy",function(){e(function(){Ai(r[0],"submit",o)},0,!1)})}var s=a.$$parentForm,u=a.$name;u&&(Rn(t,null,u,a,u),i.$observe(i.name?"name":"ngForm",function(e){u!==e&&(Rn(t,null,u,n,u),u=e,Rn(t,null,u,a,u),s.$$renameControl(a,u))})),r.on("$destroy",function(){s.$removeControl(a),u&&Rn(t,null,u,n,u),f(a,Na)})}}}};return r}]},Pa=Ma(),Va=Ma(!0),qa=/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)/,Da=/^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?$/,Ra=/^[a-z0-9!#$%&'*+\/=?^_`{|}~.-]+@[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i,Ia=/^\s*(\-|\+)?(\d+|(\d*(\.\d*)))\s*$/,_a=/^(\d{4})-(\d{2})-(\d{2})$/,Ua=/^(\d{4})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,La=/^(\d{4})-W(\d\d)$/,Fa=/^(\d{4})-(\d\d)$/,Ha=/^(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,Ba={text:Nr,date:Vr("date",_a,Pr(_a,["yyyy","MM","dd"]),"yyyy-MM-dd"),"datetime-local":Vr("datetimelocal",Ua,Pr(Ua,["yyyy","MM","dd","HH","mm","ss","sss"]),"yyyy-MM-ddTHH:mm:ss.sss"),time:Vr("time",Ha,Pr(Ha,["HH","mm","ss","sss"]),"HH:mm:ss.sss"),week:Vr("week",La,Mr,"yyyy-Www"),month:Vr("month",Fa,Pr(Fa,["yyyy","MM"]),"yyyy-MM"),number:Dr,url:Rr,email:Ir,radio:_r,checkbox:Lr,hidden:p,button:p,submit:p,reset:p,file:p},za=["$browser","$sniffer","$filter","$parse",function(t,e,n,r){return{restrict:"E",require:["?ngModel"],link:{pre:function(i,a,o,s){s[0]&&(Ba[Wr(o.type)]||Ba.text)(i,a,o,s[0],e,t,n,r)}}}}],Ga=/^(true|false|\d+)$/,Wa=function(){return{restrict:"A",priority:100,compile:function(t,e){return Ga.test(e.ngValue)?function(t,e,n){n.$set("value",t.$eval(n.ngValue))}:function(t,e,n){t.$watch(n.ngValue,function(t){n.$set("value",t)})}}}},Ja=["$compile",function(t){return{restrict:"AC",compile:function(e){return t.$$addBindingClass(e),function(e,r,i){t.$$addBindingInfo(r,i.ngBind),r=r[0],e.$watch(i.ngBind,function(t){r.textContent=t===n?"":t})}}}}],Ya=["$interpolate","$compile",function(t,e){return{compile:function(r){return e.$$addBindingClass(r),function(r,i,a){var o=t(i.attr(a.$attr.ngBindTemplate));e.$$addBindingInfo(i,o.expressions),i=i[0],a.$observe("ngBindTemplate",function(t){i.textContent=t===n?"":t})}}}}],Za=["$sce","$parse","$compile",function(t,e,n){return{restrict:"A",compile:function(r,i){var a=e(i.ngBindHtml),o=e(i.ngBindHtml,function(t){return(t||"").toString()});return n.$$addBindingClass(r),function(e,r,i){n.$$addBindingInfo(r,i.ngBindHtml),e.$watch(o,function(){r.html(t.getTrustedHtml(a(e))||"")})}}}}],Ka=m({restrict:"A",require:"ngModel",link:function(t,e,n,r){r.$viewChangeListeners.push(function(){t.$eval(n.ngChange)})}}),Xa=Fr("",!0),Qa=Fr("Odd",0),to=Fr("Even",1),eo=Ar({compile:function(t,e){e.$set("ngCloak",n),t.removeClass("ng-cloak")}}),no=[function(){return{restrict:"A",scope:!0,controller:"@",priority:500}}],ro={},io={blur:!0,focus:!0};a("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "),function(t){var e=Xe("ng-"+t);ro[e]=["$parse","$rootScope",function(n,r){return{restrict:"A",compile:function(i,a){var o=n(a[e],null,!0);return function(e,n){n.on(t,function(n){var i=function(){o(e,{$event:n})};io[t]&&r.$$phase?e.$evalAsync(i):e.$apply(i)})}}}}]});var ao=["$animate",function(t){return{multiElement:!0,transclude:"element",priority:600,terminal:!0,restrict:"A",$$tlb:!0,link:function(n,r,i,a,o){var s,u,l;n.$watch(i.ngIf,function(n){n?u||o(function(n,a){u=a,n[n.length++]=e.createComment(" end ngIf: "+i.ngIf+" "),s={clone:n},t.enter(n,r.parent(),r)}):(l&&(l.remove(),l=null),u&&(u.$destroy(),u=null),s&&(l=ue(s.clone),t.leave(l).then(function(){l=null}),s=null))})}}}],oo=["$templateRequest","$anchorScroll","$animate","$sce",function(t,e,n,r){return{restrict:"ECA",priority:400,terminal:!0,transclude:"element",controller:si.noop,compile:function(i,a){var o=a.ngInclude||a.src,s=a.onload||"",u=a.autoscroll;return function(i,a,l,c,f){var d,h,p,$=0,m=function(){h&&(h.remove(),h=null),d&&(d.$destroy(),d=null),p&&(n.leave(p).then(function(){h=null}),h=p,p=null)};i.$watch(r.parseAsResourceUrl(o),function(r){var o=function(){!v(u)||u&&!i.$eval(u)||e()},l=++$;r?(t(r,!0).then(function(t){if(l===$){var e=i.$new();c.template=t;var u=f(e,function(t){m(),n.enter(t,null,a).then(o)});d=e,p=u,d.$emit("$includeContentLoaded",r),i.$eval(s)}},function(){l===$&&(m(),i.$emit("$includeContentError",r))}),i.$emit("$includeContentRequested",r)):(m(),c.template=null)})}}}}],so=["$compile",function(t){return{restrict:"ECA",priority:-400,require:"ngInclude",link:function(n,r,i,a){return/SVG/.test(r[0].toString())?(r.empty(),t(ve(a.template,e).childNodes)(n,function(t){r.append(t)},{futureParentElement:r}),void 0):(r.html(a.template),t(r.contents())(n),void 0)}}}],uo=Ar({priority:450,compile:function(){return{pre:function(t,e,n){t.$eval(n.ngInit)}}}}),lo=function(){return{restrict:"A",priority:100,require:"ngModel",link:function(t,e,r,i){var o=e.attr(r.$attr.ngList)||", ",s="false"!==r.ngTrim,u=s?fi(o):o,l=function(t){if(!g(t)){var e=[];return t&&a(t.split(u),function(t){t&&e.push(s?fi(t):t)}),e}};i.$parsers.push(l),i.$formatters.push(function(t){return ci(t)?t.join(o):n}),i.$isEmpty=function(t){return!t||!t.length}}}},co="ng-valid",fo="ng-invalid",ho="ng-pristine",po="ng-dirty",$o="ng-untouched",mo="ng-touched",go="ng-pending",vo=new r("ngModel"),yo=["$scope","$exceptionHandler","$attrs","$element","$parse","$animate","$timeout","$rootScope","$q","$interpolate",function(t,e,r,i,o,s,u,l,c,f){this.$viewValue=Number.NaN,this.$modelValue=Number.NaN,this.$$rawModelValue=n,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=n,this.$name=f(r.name||"",!1)(t);var d=o(r.ngModel),h=d.assign,$=d,m=h,y=null,b=this;this.$$setOptions=function(t){if(b.$options=t,t&&t.getterSetter){var e=o(r.ngModel+"()"),n=o(r.ngModel+"($$$p)");$=function(t){var n=d(t);return k(n)&&(n=e(t)),n},m=function(t){k(d(t))?n(t,{$$$p:b.$modelValue}):h(t,b.$modelValue)}}else if(!d.assign)throw vo("nonassign","Expression '{0}' is non-assignable. Element: {1}",r.ngModel,z(i))},this.$render=p,this.$isEmpty=function(t){return g(t)||""===t||null===t||t!==t};var x=i.inheritedData("$formController")||Na,S=0;Hr({ctrl:this,$element:i,set:function(t,e){t[e]=!0},unset:function(t,e){delete t[e]},parentForm:x,$animate:s}),this.$setPristine=function(){b.$dirty=!1,b.$pristine=!0,s.removeClass(i,po),s.addClass(i,ho)},this.$setDirty=function(){b.$dirty=!0,b.$pristine=!1,s.removeClass(i,ho),s.addClass(i,po),x.$setDirty()},this.$setUntouched=function(){b.$touched=!1,b.$untouched=!0,s.setClass(i,$o,mo)},this.$setTouched=function(){b.$touched=!0,b.$untouched=!1,s.setClass(i,mo,$o)},this.$rollbackViewValue=function(){u.cancel(y),b.$viewValue=b.$$lastCommittedViewValue,b.$render()},this.$validate=function(){if(!w(b.$modelValue)||!isNaN(b.$modelValue)){var t=b.$$lastCommittedViewValue,e=b.$$rawModelValue,r=b.$$parserName||"parse",i=b.$error[r]?!1:n,a=b.$valid,o=b.$modelValue,s=b.$options&&b.$options.allowInvalid;b.$$runValidators(i,e,t,function(t){s||a===t||(b.$modelValue=t?e:n,b.$modelValue!==o&&b.$$writeModelToScope())})}},this.$$runValidators=function(t,e,r,i){function o(t){var e=b.$$parserName||"parse";if(t===n)l(e,null);else if(l(e,t),!t)return a(b.$validators,function(t,e){l(e,null)}),a(b.$asyncValidators,function(t,e){l(e,null)}),!1;return!0}function s(){var t=!0;return a(b.$validators,function(n,i){var a=n(e,r);t=t&&a,l(i,a)}),t?!0:(a(b.$asyncValidators,function(t,e){l(e,null)}),!1)}function u(){var t=[],i=!0;a(b.$asyncValidators,function(a,o){var s=a(e,r);if(!T(s))throw vo("$asyncValidators","Expected asynchronous validator to return a promise but got '{0}' instead.",s);l(o,n),t.push(s.then(function(){l(o,!0)},function(){i=!1,l(o,!1)}))}),t.length?c.all(t).then(function(){f(i)},p):f(!0)}function l(t,e){d===S&&b.$setValidity(t,e)}function f(t){d===S&&i(t)}S++;var d=S;return o(t)?s()?(u(),void 0):(f(!1),void 0):(f(!1),void 0)},this.$commitViewValue=function(){var t=b.$viewValue;u.cancel(y),(b.$$lastCommittedViewValue!==t||""===t&&b.$$hasNativeValidators)&&(b.$$lastCommittedViewValue=t,b.$pristine&&this.$setDirty(),this.$$parseAndValidate())},this.$$parseAndValidate=function(){function e(){b.$modelValue!==s&&b.$$writeModelToScope()}var r=b.$$lastCommittedViewValue,i=r,a=g(i)?n:!0;if(a)for(var o=0;o<b.$parsers.length;o++)if(i=b.$parsers[o](i),g(i)){a=!1;break}w(b.$modelValue)&&isNaN(b.$modelValue)&&(b.$modelValue=$(t));var s=b.$modelValue,u=b.$options&&b.$options.allowInvalid;b.$$rawModelValue=i,u&&(b.$modelValue=i,e()),b.$$runValidators(a,i,b.$$lastCommittedViewValue,function(t){u||(b.$modelValue=t?i:n,e())})},this.$$writeModelToScope=function(){m(t,b.$modelValue),a(b.$viewChangeListeners,function(t){try{t()}catch(n){e(n)}})},this.$setViewValue=function(t,e){b.$viewValue=t,(!b.$options||b.$options.updateOnDefault)&&b.$$debounceViewValueCommit(e)},this.$$debounceViewValueCommit=function(e){var n,r=0,i=b.$options;i&&v(i.debounce)&&(n=i.debounce,w(n)?r=n:w(n[e])?r=n[e]:w(n["default"])&&(r=n["default"])),u.cancel(y),r?y=u(function(){b.$commitViewValue()},r):l.$$phase?b.$commitViewValue():t.$apply(function(){b.$commitViewValue()})},t.$watch(function(){var e=$(t);if(e!==b.$modelValue){b.$modelValue=b.$$rawModelValue=e;for(var r=b.$formatters,i=r.length,a=e;i--;)a=r[i](a);b.$viewValue!==a&&(b.$viewValue=b.$$lastCommittedViewValue=a,b.$render(),b.$$runValidators(n,e,a,p))}return e})}],bo=["$rootScope",function(t){return{restrict:"A",require:["ngModel","^?form","^?ngModelOptions"],controller:yo,priority:1,compile:function(e){return e.addClass(ho).addClass($o).addClass(co),{pre:function(t,e,n,r){var i=r[0],a=r[1]||Na;i.$$setOptions(r[2]&&r[2].$options),a.$addControl(i),n.$observe("name",function(t){i.$name!==t&&a.$$renameControl(i,t)}),t.$on("$destroy",function(){a.$removeControl(i)})},post:function(e,n,r,i){var a=i[0];a.$options&&a.$options.updateOn&&n.on(a.$options.updateOn,function(t){a.$$debounceViewValueCommit(t&&t.type)}),n.on("blur",function(){a.$touched||(t.$$phase?e.$evalAsync(a.$setTouched):e.$apply(a.$setTouched))})}}}}}],wo=/(\s+|^)default(\s+|$)/,xo=function(){return{restrict:"A",controller:["$scope","$attrs",function(t,e){var r=this;this.$options=t.$eval(e.ngModelOptions),this.$options.updateOn!==n?(this.$options.updateOnDefault=!1,this.$options.updateOn=fi(this.$options.updateOn.replace(wo,function(){return r.$options.updateOnDefault=!0," "}))):this.$options.updateOnDefault=!0}]}},ko=Ar({terminal:!0,priority:1e3}),So=["$locale","$interpolate",function(t,e){var n=/{}/g,r=/^when(Minus)?(.+)$/;return{restrict:"EA",link:function(i,o,s){function u(t){o.text(t||"")}var l,c=s.count,f=s.$attr.when&&o.attr(s.$attr.when),d=s.offset||0,h=i.$eval(f)||{},p={},$=e.startSymbol(),m=e.endSymbol(),g=$+c+"-"+d+m,v=si.noop;a(s,function(t,e){var n=r.exec(e);if(n){var i=(n[1]?"-":"")+Wr(n[2]);h[i]=o.attr(s.$attr[e])}}),a(h,function(t,r){p[r]=e(t.replace(n,g))}),i.$watch(c,function(e){var n=parseFloat(e),r=isNaN(n);r||n in h||(n=t.pluralCat(n-d)),n===l||r&&isNaN(l)||(v(),v=i.$watch(p[n],u),l=n)})}}}],Co=["$parse","$animate",function(t,o){var s="$$NG_REMOVED",u=r("ngRepeat"),l=function(t,e,n,r,i,a,o){t[n]=r,i&&(t[i]=a),t.$index=e,t.$first=0===e,t.$last=e===o-1,t.$middle=!(t.$first||t.$last),t.$odd=!(t.$even=0===(1&e))},c=function(t){return t.clone[0]},f=function(t){return t.clone[t.clone.length-1]};return{restrict:"A",multiElement:!0,transclude:"element",priority:1e3,terminal:!0,$$tlb:!0,compile:function(r,d){var h=d.ngRepeat,p=e.createComment(" end ngRepeat: "+h+" "),$=h.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+track\s+by\s+([\s\S]+?))?\s*$/);if(!$)throw u("iexp","Expected expression in form of '_item_ in _collection_[ track by _id_]' but got '{0}'.",h);var m=$[1],g=$[2],v=$[3],y=$[4];if($=m.match(/^(?:(\s*[\$\w]+)|\(\s*([\$\w]+)\s*,\s*([\$\w]+)\s*\))$/),!$)throw u("iidexp","'_item_' in '_item_ in _collection_' should be an identifier or '(_key_, _value_)' expression, but got '{0}'.",m);var b=$[3]||$[1],w=$[2];if(v&&(!/^[$a-zA-Z_][$a-zA-Z0-9_]*$/.test(v)||/^(null|undefined|this|\$index|\$first|\$middle|\$last|\$even|\$odd|\$parent|\$root|\$id)$/.test(v)))throw u("badident","alias '{0}' is invalid --- must be a valid JS identifier which is not a reserved name.",v);var x,k,S,C,A={$id:Ue};return y?x=t(y):(S=function(t,e){return Ue(e)},C=function(t){return t}),function(t,e,r,d,$){x&&(k=function(e,n,r){return w&&(A[w]=e),A[b]=n,A.$index=r,x(t,A)});var m=le();t.$watchCollection(g,function(r){var d,g,y,x,A,O,E,j,N,T,M,P,V=e[0],q=le();if(v&&(t[v]=r),i(r))N=r,j=k||S;else{j=k||C,N=[];for(var D in r)r.hasOwnProperty(D)&&"$"!=D.charAt(0)&&N.push(D);N.sort()}for(x=N.length,M=new Array(x),d=0;x>d;d++)if(A=r===N?d:N[d],O=r[A],E=j(A,O,d),m[E])T=m[E],delete m[E],q[E]=T,M[d]=T;else{if(q[E])throw a(M,function(t){t&&t.scope&&(m[t.id]=t)}),u("dupes","Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: {0}, Duplicate key: {1}, Duplicate value: {2}",h,E,O);M[d]={id:E,scope:n,clone:n},q[E]=!0}for(var R in m){if(T=m[R],P=ue(T.clone),o.leave(P),P[0].parentNode)for(d=0,g=P.length;g>d;d++)P[d][s]=!0;T.scope.$destroy()}for(d=0;x>d;d++)if(A=r===N?d:N[d],O=r[A],T=M[d],T.scope){y=V;do y=y.nextSibling;while(y&&y[s]);c(T)!=y&&o.move(ue(T.clone),null,Qr(V)),V=f(T),l(T.scope,d,b,O,w,A,x)}else $(function(t,e){T.scope=e;var n=p.cloneNode(!1);t[t.length++]=n,o.enter(t,null,Qr(V)),V=n,T.clone=t,q[T.id]=T,l(T.scope,d,b,O,w,A,x)});m=q})}}}}],Ao="ng-hide",Oo="ng-hide-animate",Eo=["$animate",function(t){return{restrict:"A",multiElement:!0,link:function(e,n,r){e.$watch(r.ngShow,function(e){t[e?"removeClass":"addClass"](n,Ao,{tempClasses:Oo})})}}}],jo=["$animate",function(t){return{restrict:"A",multiElement:!0,link:function(e,n,r){e.$watch(r.ngHide,function(e){t[e?"addClass":"removeClass"](n,Ao,{tempClasses:Oo})})}}}],No=Ar(function(t,e,n){t.$watchCollection(n.ngStyle,function(t,n){n&&t!==n&&a(n,function(t,n){e.css(n,"")}),t&&e.css(t)})}),To=["$animate",function(t){return{restrict:"EA",require:"ngSwitch",controller:["$scope",function(){this.cases={}}],link:function(n,r,i,o){var s=i.ngSwitch||i.on,u=[],l=[],c=[],f=[],d=function(t,e){return function(){t.splice(e,1)}};n.$watch(s,function(n){var r,i;for(r=0,i=c.length;i>r;++r)t.cancel(c[r]);for(c.length=0,r=0,i=f.length;i>r;++r){var s=ue(l[r].clone);f[r].$destroy();var h=c[r]=t.leave(s);h.then(d(c,r))}l.length=0,f.length=0,(u=o.cases["!"+n]||o.cases["?"])&&a(u,function(n){n.transclude(function(r,i){f.push(i);var a=n.element;r[r.length++]=e.createComment(" end ngSwitchWhen: ");var o={clone:r};l.push(o),t.enter(r,a.parent(),a)})})})}}}],Mo=Ar({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(t,e,n,r,i){r.cases["!"+n.ngSwitchWhen]=r.cases["!"+n.ngSwitchWhen]||[],r.cases["!"+n.ngSwitchWhen].push({transclude:i,element:e})}}),Po=Ar({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(t,e,n,r,i){r.cases["?"]=r.cases["?"]||[],r.cases["?"].push({transclude:i,element:e})}}),Vo=Ar({restrict:"EAC",link:function(t,e,n,i,a){if(!a)throw r("ngTransclude")("orphan","Illegal use of ngTransclude directive in the template! No parent directive that requires a transclusion found. Element: {0}",z(e));a(function(t){e.empty(),e.append(t)})}}),qo=["$templateCache",function(t){return{restrict:"E",terminal:!0,compile:function(e,n){if("text/ng-template"==n.type){var r=n.id,i=e[0].text;t.put(r,i)}}}}],Do=r("ngOptions"),Ro=m({restrict:"A",terminal:!0}),Io=["$compile","$parse",function(t,r){var i=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+group\s+by\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]+?))?$/,s={$setViewValue:p};return{restrict:"E",require:["select","?ngModel"],controller:["$element","$scope","$attrs",function(t,e,n){var r,i,a=this,o={},u=s;a.databound=n.ngModel,a.init=function(t,e,n){u=t,r=e,i=n},a.addOption=function(e,n){oe(e,'"option value"'),o[e]=!0,u.$viewValue==e&&(t.val(e),i.parent()&&i.remove()),n&&n[0].hasAttribute("selected")&&(n[0].selected=!0)},a.removeOption=function(t){this.hasOption(t)&&(delete o[t],u.$viewValue===t&&this.renderUnknownOption(t))},a.renderUnknownOption=function(e){var n="? "+Ue(e)+" ?";i.val(n),t.prepend(i),t.val(n),i.prop("selected",!0)},a.hasOption=function(t){return o.hasOwnProperty(t)},e.$on("$destroy",function(){a.renderUnknownOption=p})}],link:function(s,u,l,c){function f(t,e,n,r){n.$render=function(){var t=n.$viewValue;r.hasOption(t)?(C.parent()&&C.remove(),e.val(t),""===t&&p.prop("selected",!0)):g(t)&&p?e.val(""):r.renderUnknownOption(t)},e.on("change",function(){t.$apply(function(){C.parent()&&C.remove(),n.$setViewValue(e.val())})})}function d(t,e,n){var r;n.$render=function(){var t=new Le(n.$viewValue);a(e.find("option"),function(e){e.selected=v(t.get(e.value))})},t.$watch(function(){I(r,n.$viewValue)||(r=R(n.$viewValue),n.$render())}),e.on("change",function(){t.$apply(function(){var t=[];a(e.find("option"),function(e){e.selected&&t.push(e.value)}),n.$setViewValue(t)})})}function h(e,s,u){function l(t,n,r){return I[O]=r,N&&(I[N]=n),t(e,I)}function c(){e.$apply(function(){var t,n=P(e)||[];if(y)t=[],a(s.val(),function(e){e=q?D[e]:e,t.push(f(e,n[e]))});else{var r=q?D[s.val()]:s.val();t=f(r,n[r])}u.$setViewValue(t),g()})}function f(t,e){if("?"===t)return n;if(""===t)return null;var r=j?j:M;return l(r,t,e)}function d(){var t,n=P(e);if(n&&ci(n)){t=new Array(n.length);for(var r=0,i=n.length;i>r;r++)t[r]=l(A,r,n[r]);return t}if(n){t={};for(var a in n)n.hasOwnProperty(a)&&(t[a]=l(A,a,n[a]))}return t}function h(t){var e;if(y)if(q&&ci(t)){e=new Le([]);for(var n=0;n<t.length;n++)e.put(l(q,null,t[n]),!0)}else e=new Le(t);else q&&(t=l(q,null,t));return function(n,r){var i;return i=q?q:j?j:M,y?v(e.remove(l(i,n,r))):t===l(i,n,r)}}function p(){x||(e.$$postDigest(g),x=!0)}function m(t,e,n){t[e]=t[e]||0,t[e]+=n?1:-1}function g(){x=!1;var t,n,r,i,c,f,d,p,g,b,C,O,E,j,M,V,_,U={"":[]},L=[""],F=u.$viewValue,H=P(e)||[],B=N?o(H):H,z={},G=h(F),W=!1;for(D={},O=0;b=B.length,b>O;O++)d=O,N&&(d=B[O],"$"===d.charAt(0))||(p=H[d],t=l(T,d,p)||"",(n=U[t])||(n=U[t]=[],L.push(t)),E=G(d,p),W=W||E,V=l(A,d,p),V=v(V)?V:"",_=q?q(e,I):N?B[O]:O,q&&(D[_]=d),n.push({id:_,label:V,selected:E}));</script>
for(y||(w||null===F?U[""].unshift({id:"",label:"",selected:!W}):W||U[""].unshift({id:"?",label:"",selected:!0})),C=0,g=L.length;g>C;C++){for(t=L[C],n=U[t],R.length<=C?(i={element:S.clone().attr("label",t),label:n.label},c=[i],R.push(c),s.append(i.element)):(c=R[C],i=c[0],i.label!=t&&i.element.attr("label",i.label=t)),j=null,O=0,b=n.length;b>O;O++)r=n[O],(f=c[O+1])?(j=f.element,f.label!==r.label&&(m(z,f.label,!1),m(z,r.label,!0),j.text(f.label=r.label),j.prop("label",f.label)),f.id!==r.id&&j.val(f.id=r.id),j[0].selected!==r.selected&&(j.prop("selected",f.selected=r.selected),Xr&&j.prop("selected",f.selected))):(""===r.id&&w?M=w:(M=k.clone()).val(r.id).prop("selected",r.selected).attr("selected",r.selected).prop("label",r.label).text(r.label),c.push(f={element:M,label:r.label,id:r.id,selected:r.selected}),m(z,r.label,!0),j?j.after(M):i.element.append(M),j=M);for(O++;c.length>O;)r=c.pop(),m(z,r.label,!1),r.element.remove()}for(;R.length>C;){for(n=R.pop(),O=1;O<n.length;++O)m(z,n[O].label,!1);n[0].element.remove()}a(z,function(t,e){t>0?$.addOption(e):0>t&&$.removeOption(e)})}var C;if(!(C=b.match(i)))throw Do("iexp","Expected expression in form of '_select_ (as _label_)? for (_key_,)?_value_ in _collection_' but got '{0}'. Element: {1}",b,z(s));var A=r(C[2]||C[1]),O=C[4]||C[6],E=/ as /.test(C[0])&&C[1],j=E?r(E):null,N=C[5],T=r(C[3]||""),M=r(C[2]?C[1]:O),P=r(C[7]),V=C[8],q=V?r(C[8]):null,D={},R=[[{element:s,label:""}]],I={};w&&(t(w)(e),w.removeClass("ng-scope"),w.remove()),s.empty(),s.on("change",c),u.$render=g,e.$watchCollection(P,p),e.$watchCollection(d,p),y&&e.$watchCollection(function(){return u.$modelValue},p)}if(c[1]){for(var p,$=c[0],m=c[1],y=l.multiple,b=l.ngOptions,w=!1,x=!1,k=Qr(e.createElement("option")),S=Qr(e.createElement("optgroup")),C=k.clone(),A=0,O=u.children(),E=O.length;E>A;A++)if(""===O[A].value){p=w=O.eq(A);break}$.init(m,w,C),y&&(m.$isEmpty=function(t){return!t||0===t.length}),b?h(s,u,m):y?d(s,u,m):f(s,u,m,$)}}}}],_o=["$interpolate",function(t){var e={addOption:p,removeOption:p};return{restrict:"E",priority:100,compile:function(n,r){if(g(r.value)){var i=t(n.text(),!0);i||r.$set("value",n.text())}return function(t,n,r){var a="$selectController",o=n.parent(),s=o.data(a)||o.parent().data(a);s&&s.databound||(s=e),i?t.$watch(i,function(t,e){r.$set("value",t),e!==t&&s.removeOption(e),s.addOption(t,n)}):s.addOption(r.value,n),n.on("$destroy",function(){s.removeOption(r.value)})}}}}],Uo=m({restrict:"E",terminal:!1}),Lo=function(){return{restrict:"A",require:"?ngModel",link:function(t,e,n,r){r&&(n.required=!0,r.$validators.required=function(t,e){return!n.required||!r.$isEmpty(e)},n.$observe("required",function(){r.$validate()}))}}},Fo=function(){return{restrict:"A",require:"?ngModel",link:function(t,e,i,a){if(a){var o,s=i.ngPattern||i.pattern;i.$observe("pattern",function(t){if(b(t)&&t.length>0&&(t=new RegExp("^"+t+"$")),t&&!t.test)throw r("ngPattern")("noregexp","Expected {0} to be a RegExp but was {1}. Element: {2}",s,t,z(e));o=t||n,a.$validate()}),a.$validators.pattern=function(t){return a.$isEmpty(t)||g(o)||o.test(t)}}}}},Ho=function(){return{restrict:"A",require:"?ngModel",link:function(t,e,n,r){if(r){var i=-1;n.$observe("maxlength",function(t){var e=d(t);i=isNaN(e)?-1:e,r.$validate()}),r.$validators.maxlength=function(t,e){return 0>i||r.$isEmpty(e)||e.length<=i}}}}},Bo=function(){return{restrict:"A",require:"?ngModel",link:function(t,e,n,r){if(r){var i=0;n.$observe("minlength",function(t){i=d(t)||0,r.$validate()}),r.$validators.minlength=function(t,e){return r.$isEmpty(e)||e.length>=i}}}}};return t.angular.bootstrap?(console.log("WARNING: Tried to load angular more than once."),void 0):(re(),he(si),Qr(e).ready(function(){X(e,Q)}),void 0)}(window,document),!window.angular.$$csp()&&window.angular.element(document).find("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;}</style>'),angular.module("app",["angularplasmid"]),function(){"use strict";angular.module("angularplasmid.services",[]).factory("SVGUtil",function(){function t(t,e){var n="round";return"undefined"==typeof e||0===+e?Math[n](t):(t=+t,e=+e,isNaN(t)||"number"!=typeof e||e%1!==0?0/0:(t=t.toString().split("e"),t=Math[n](+(t[0]+"e"+(t[1]?+t[1]-e:-e))),t=t.toString().split("e"),+(t[0]+"e"+(t[1]?+t[1]+e:e))))}function e(t){d.push(t)}function n(t){var e;for(e=0;e<d.length;e+=1)if(d[e].id===t)return d[e]}function r(t,e,n,r){var i=(r-90)*Math.PI/180;return{x:t+n*Math.cos(i),y:e+n*Math.sin(i)}}function i(t,e){var n,r,i=["id","name","class","style","filter","ng-attr-style","ng-attr-class","ng-class"];for(r=0;r<i.length;r+=1)n=i[r],t[0].hasAttribute(n)&&(e.attr(n,t.attr(n)),t.removeAttr(n))}function a(t,e,n){var r,i="http://www.w3.org/2000/svg",a=document.createElementNS(i,t);return n=n||[],angular.forEach(e,function(t){n.indexOf(t)<0&&(r=e[t],null===r||t.match(/\$/)||"string"==typeof r&&""===r||a.setAttribute(t,r))}),a}function o(t){angular.forEach(["id","class","style"],function(e){t.removeAttribute(e)})}function s(t,e,n,i){var a,o,s;return t=Number(t||0),e=Number(e||0),n=Number(n||0),i=Number(i||0),a={start:r(t,e,n,359.99),end:r(t,e,n,0)},o={start:r(t,e,n+i,359.99),end:r(t,e,n+i,0)},s=["M",a.start.x,a.start.y,"A",n,n,0,1,0,a.end.x,a.end.y,"M",o.start.x,o.start.y,"A",n+i,n+i,0,1,0,o.end.x,o.end.y].join(" ")}function u(t,e,n,i,a,o,s,u){var l,c,f,d,h,p,$,m,g,v,y,b,w;return t=Number(t),e=Number(e),n=Number(n),i=Number(i),a=Number(a),o=Number(o),s=s||{width:0,length:0,angle:0},u=u||{width:0,length:0,angle:0},i===a?(c=r(t,e,n,i),d=r(t,e,n+o,i),l=["M",c.x,c.y,"L",d.x,d.y].join(" ")):1===o?(c=r(t,e,n,i),d=r(t,e,n,a),h=a>i?180>=a-i?"0":"1":180>=a-i?"1":"0",l=["M",c.x,c.y,"A",n,n,0,h,1,d.x,d.y].join(" ")):(a-=u.length<0?0:u.length,i+=s.length<0?0:s.length,c=r(t,e,n,a),d=r(t,e,n,i),p=r(t,e,n-s.width,i+s.angle),$=r(t,e,n+o/2,i-s.length),m=r(t,e,n+o+s.width,i+s.angle),g=r(t,e,n+o,i),v=r(t,e,n+o+u.width,a-u.angle),y=r(t,e,n+o/2,a+u.length),b=r(t,e,n-u.width,a-u.angle),w=r(t,e,n,a),f=r(t,e,n+o,a),h=180>=a-i?"0":"1",l=["M",c.x,c.y,"A",n,n,0,h,0,d.x,d.y,"L",p.x,p.y,"L",$.x,$.y,"L",m.x,m.y,"L",g.x,g.y,"A",n+o,n+o,0,h,1,f.x,f.y,"L",v.x,v.y,"L",y.x,y.y,"L",b.x,b.y,"L",w.x,w.y,"z"].join(" ")),l}function l(e,n,r,i,a,o){e=Number(e||0),n=Number(n||0),r=Number(r||0),i=Number(i||0),a=Number(a||0),o=Number(o||2);var s,u,l,c,f=Number(i)>0?Number(a)/Number(i):0,d=2*Math.PI/f,h=-1,p="";for(c=0;f>c;c+=1)s=d*c-Math.PI/2,l=Math.cos(s),u=Math.sin(s),p+="M"+t(e+r*l,h)+","+t(n+r*u,h)+" L"+t(e+(r+o)*l,h)+","+t(n+(r+o)*u,h)+" ";return p=p||"M 0,0"}function c(e,n,r,i,a){e=Number(e),n=Number(n),r=Number(r),i=Number(i),a=Number(a);var o,s,u,l,c=Number(i)>0?Number(a)/Number(i):0,f=2*Math.PI/c,d=-1,h=[];for(l=0;c>l;l+=1)o=f*l-Math.PI/2,u=Math.cos(o),s=Math.sin(o),h.push({x:t(e+r*u,d),y:t(n+r*s,d),text:i*l});return h}function f(t,e){return isNaN(t)?e||0:Number(t)}var d=[],h=[],p=[];return{api:{addPlasmid:e,plasmids:d,plasmid:n,plasmidtracks:h,trackmarkers:p},util:{polarToCartesian:r,swapProperties:i,Numeric:f},svg:{createNode:a,removeAttributes:o,path:{donut:s,arc:u,scale:l},element:{scalelabels:c}}}})}(),function(){"use strict";angular.module("angularplasmid",["angularplasmid.services"]).directive("plasmidapi",["SVGUtil",function(t){return{restrict:"AE",link:function(e,n,r){e[r.name]=t.api}}}]).directive("plasmid",["SVGUtil",function(){return{restrict:"AE",type:"svg",template:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"></svg>',replace:!0,transclude:!0,require:"plasmid",scope:{plasmidheight:"@",plasmidwidth:"@",sequencelength:"@",sequence:"@",plasmidclass:"@",plasmidstyle:"@"},link:{pre:function(t,e,n,r){r.init(e)},post:function(t,e,n,r,i){i(t.$parent,function(t){e.append(t)}),t.$watchGroup(["plasmidheight","plasmidwidth","sequencelength","sequence","plasmidclass","plasmidstyle"],function(){r.draw()})}},controller:["$scope","SVGUtil",function(t,e){var n,r,i=[];r=this,r.elementtype="plasmid",r.init=function(t){e.api.addPlasmid(r),n=t,r.id=n.attr("id")},r.draw=function(){var t=r.dimensions,e=n.plasmidclass,a=n.plasmidstyle;n.attr("height",t.height),n.attr("width",t.width),e&&n.attr("class",e),a&&n.attr("style",a),angular.forEach(i,function(t){t.draw()})},r.addTrack=function(t){i.push(t)},Object.defineProperty(r,"center",{get:function(){var t=r.dimensions;return{x:t.width/2,y:t.height/2}}}),Object.defineProperty(r,"dimensions",{get:function(){return{height:e.util.Numeric(t.plasmidheight,300),width:e.util.Numeric(t.plasmidwidth,300)}}}),Object.defineProperty(r,"sequencelength",{get:function(){return r.sequence?r.sequence.length:e.util.Numeric(t.sequencelength)}}),Object.defineProperty(r,"sequence",{get:function(){return t.sequence}}),Object.defineProperty(r,"plasmidclass",{get:function(){return t.plasmidclass}}),Object.defineProperty(r,"plasmidstyle",{get:function(){return t.plasmidstyle}}),r.tracks=i}]}}]).directive("plasmidtrack",["SVGUtil","$compile",function(t,e){return{restrict:"AE",type:"svg",template:"<g><path></path></g>",replace:!0,transclude:!0,require:["plasmidtrack","^plasmid"],scope:{radius:"@",width:"@",trackclass:"@",trackstyle:"@",trackclick:"&"},link:{pre:function(t,e,n,r){var i=r[0],a=r[1],o=angular.element(e.children()[0]);i.init(o,a)},post:function(n,r,i,a,o){o(n.$parent,function(t){r.append(t)});var s=angular.element(r),u=angular.element(r.children()[0]),l=a[0];t.util.swapProperties(s,u),u.attr("fill-rule","evenodd"),e(u)(n.$parent),u.on("click",function(t){n.trackclick({$event:t,$track:l})}),n.$watchGroup(["radius","width","trackstyle","trackclass"],function(){l.draw()})}},controller:["$scope",function(e){var n,r,i,a=[],o=[],s=[];i=this,i.elementtype="plasmidtrack",i.init=function(t,e){n=e,n.addTrack(i),i.plasmid=n,r=t},i.draw=function(){var e=i.center,n=t.svg.path.donut(e.x,e.y,i.radius,i.width),u=i.trackclass,l=i.trackstyle;r.attr("d",n),u&&r.attr("class",u),l&&r.attr("style",l),angular.forEach(a,function(t){t.draw()}),angular.forEach(o,function(t){t.draw()}),angular.forEach(s,function(t){t.draw()})},i.addMarker=function(t){a.push(t)},i.addScale=function(t){o.push(t)},i.addLabel=function(t){s.push(t)},i.markergroup=function(t){var e=[];return angular.forEach(a,function(n){n.markergroup===t&&e.push(n)}),e},i.getPosition=function(e,r,a){a=Number(a||0),e=Number(e);var o,s,u=1,l=2,c=i.center,f=n.sequencelength;if(f>0){switch(s=e/f*360,r){case u:o=i.radius+a;break;case l:o=i.radius+i.width+a;break;default:o=i.radius+i.width/2+a}return t.util.polarToCartesian(c.x,c.y,o,s)}},Object.defineProperty(i,"center",{get:function(){return n.center}}),Object.defineProperty(i,"radius",{get:function(){return t.util.Numeric(e.radius,100)}}),Object.defineProperty(i,"width",{get:function(){return t.util.Numeric(e.width,25)}}),Object.defineProperty(i,"trackclass",{get:function(){return e.trackclass}}),Object.defineProperty(i,"trackstyle",{get:function(){return e.trackstyle}}),i.markers=a,i.scales=o,i.labels=s}]}}]).directive("trackscale",["SVGUtil","$compile",function(t,e){return{restrict:"AE",type:"svg",template:"<g><path></path><g></g></g>",replace:!0,transclude:!0,require:["trackscale","^plasmidtrack"],scope:{interval:"@",vadjust:"@",ticksize:"@",direction:"@",showlabels:"@",labelvadjust:"@",labelclass:"@",labelstyle:"@",tickclass:"@",tickstyle:"@",scaleclick:"&"},link:{pre:function(t,e,n,r){var i=r[0],a=r[1],o=angular.element(e.children()[0]),s=angular.element(e.children()[1]);i.init(o,s,a)},post:function(n,r,i,a,o){var s,u,l;o(n.$parent,function(t){r.append(t)}),s=angular.element(r),u=angular.element(r.children()[0]),t.util.swapProperties(s,u),e(u)(n.$parent),u.on("click",function(t){n.scaleclick({$event:t,$scale:l})}),l=a[0],n.$watchGroup(["interval","vadjust","ticksize","labelvadjust","direction","showlabels","labelstyle","labelclass","tickstyle","tickclass"],function(){l.draw()})}},controller:["$scope",function(e){var n,r,i,a,o=15,s=3;r=this,r.elementtype="trackscale",r.init=function(t,e,o){n=o,n.addScale(r),r.track=n,i=t,a=e},r.draw=function(){var e=r.tickclass,o=r.tickstyle,s=n.center,u=t.svg.path.scale(s.x,s.y,r.radius,r.interval,r.total,r.ticksize);i.attr("d",u),e&&i.attr("class",e),o&&i.attr("style",o),r.showlabels?r.drawLabel():a.empty()},r.drawLabel=function(){function i(t){e.scaleclick({$event:t,$scale:r})}var o,s,u,l=n.center;for(u=t.svg.element.scalelabels(l.x,l.y,r.labelradius,r.interval,r.total),a.empty(),o=0;o<=u.length-1;o+=1)s=angular.element(t.svg.createNode("text")),r.labelclass&&s.attr("class",r.labelclass),r.labelstyle&&s.attr("style",r.labelstyle),s.attr("x",u[o].x),s.attr("y",u[o].y),s.attr("text-anchor","middle"),s.attr("alignment-baseline","middle"),s.text(u[o].text),s.on("click",i),a.append(s)},Object.defineProperty(r,"radius",{get:function(){return(r.inwardflg?n.radius:n.radius+n.width)+(r.inwardflg?-1:1)*r.vadjust+(r.inwardflg?-r.ticksize:0)}}),Object.defineProperty(r,"interval",{get:function(){return t.util.Numeric(e.interval)}}),Object.defineProperty(r,"vadjust",{get:function(){return t.util.Numeric(e.vadjust)}}),Object.defineProperty(r,"ticksize",{get:function(){return t.util.Numeric(e.ticksize,s)}}),Object.defineProperty(r,"inwardflg",{get:function(){return"in"===e.direction?!0:!1}}),Object.defineProperty(r,"total",{get:function(){return n.plasmid.sequencelength}}),Object.defineProperty(r,"showlabels",{get:function(){return"1"===e.showlabels?!0:!1}}),Object.defineProperty(r,"labelvadjust",{get:function(){return t.util.Numeric(e.labelvadjust,o)}}),Object.defineProperty(r,"tickclass",{get:function(){return e.tickclass}}),Object.defineProperty(r,"tickstyle",{get:function(){return e.tickstyle}}),Object.defineProperty(r,"labelclass",{get:function(){return e.labelclass}}),Object.defineProperty(r,"labelstyle",{get:function(){return e.labelstyle}}),Object.defineProperty(r,"labelradius",{get:function(){return r.radius+r.labelvadjust*(r.inwardflg?-1:1)}})}]}}]).directive("tracklabel",["SVGUtil",function(t){return{restrict:"AE",type:"svg",template:"<text></text>",replace:!0,transclude:!0,require:["tracklabel","^plasmidtrack"],scope:{text:"@",hadjust:"@",vadjust:"@",labelclass:"@",labelstyle:"@",labelclick:"&"},link:{pre:function(t,e,n,r){var i=r[0],a=r[1],o=angular.element(e[0]);i.init(o,a)},post:function(t,e,n,r,i){var a;i(t.$parent,function(t){e.append(t)}),e.attr("text-anchor","middle"),e.attr("alignment-baseline","middle"),e.on("click",function(e){t.labelclick({$event:e,$label:a})}),a=r[0],t.$watchGroup(["text","vadjust","hadjust","labelstyle","labelclass"],function(){a.draw()})}},controller:["$scope",function(e){var n,r,i;r=this,r.elementtype="tracklabel",r.init=function(t,e){n=e,n.addLabel(r),r.track=n,i=t},r.draw=function(){var t=n.center,e=r.labelclass,a=r.labelstyle;i.attr("x",t.x+r.hadjust),i.attr("y",t.y+r.vadjust),i.text(r.text),e&&i.attr("class",e),a&&i.attr("style",a)},Object.defineProperty(r,"center",{get:function(){return n.center}}),Object.defineProperty(r,"text",{get:function(){return e.text}}),Object.defineProperty(r,"labelclass",{get:function(){return e.labelclass}}),Object.defineProperty(r,"labelstyle",{get:function(){return e.labelstyle}}),Object.defineProperty(r,"hadjust",{get:function(){return t.util.Numeric(e.hadjust,0)}}),Object.defineProperty(r,"vadjust",{get:function(){return t.util.Numeric(e.vadjust,0)}}),Object.defineProperty(r,"dimensions",{get:function(){return i[0].getBBox()}})}]}}]).directive("trackmarker",["SVGUtil","$compile",function(t,e){return{restrict:"AE",type:"svg",template:"<g><path></path></g>",replace:!0,transclude:!0,require:["trackmarker","^plasmidtrack"],scope:{start:"@",end:"@",vadjust:"@",wadjust:"@",markergroup:"@",arrowstartlength:"@",arrowstartwidth:"@",arrowstartangle:"@",arrowendlength:"@",arrowendwidth:"@",arrowendangle:"@",markerclass:"@",markerstyle:"@",markerclick:"&"},link:{pre:function(t,e,n,r){var i=r[0],a=r[1],o=angular.element(e.children()[0]);i.init(o,a)},post:function(n,r,i,a,o){var s,u,l=a[0];o(n.$parent,function(t){r.append(t)}),s=angular.element(r),u=angular.element(r.children()[0]),t.util.swapProperties(s,u),e(u)(n.$parent),u.on("click",function(t){n.markerclick({$event:t,$marker:l})}),n.$watchGroup(["start","end","vadjust","wadjust","markergroup","markerclass","markerstyle","arrowstartlength","arrowstartwidth","arrowstartangle","arrowendlength","arrowendwidth","arrowendangle"],function(){l.draw()})}},controller:["$scope",function(e){var n,r,i,a=[];r=this,r.elementtype="trackmarker",r.init=function(t,e){n=e,n.addMarker(r),i=t,r.track=n},r.draw=function(){var t=r.markerclass,e=r.markerstyle;i.attr("d",r.getPath()),t&&i.attr("class",t),e&&i.attr("style",e),angular.forEach(a,function(t){t.draw()})},r.addMarkerLabel=function(t){a.push(t)},r.getPath=function(){var e=n.center,i=r.angle,a=r.radius;return t.svg.path.arc(e.x,e.y,a.inner,i.start,i.end,r.width,r.arrowstart,r.arrowend)},r.getPosition=function(e,i,a,o){var s,u,l,c,f,d="start",h="end",p="inner",$="outer";if(s=n.center,c=r.radius,f=r.angle,e=t.util.Numeric(e),i=t.util.Numeric(i),void 0!==o&&void 0!==a){switch(o){case p:u=c.inner+i;break;case $:u=c.outer+i;break;default:u=c.middle+i}switch(a){case d:l=f.start+e;break;case h:l=f.end+e;break;default:l=f.middle+e}return t.util.polarToCartesian(s.x,s.y,u,l)}return u={outer:c.outer+i,inner:c.inner+i,middle:c.middle+i},l={begin:f.start+e,end:f.end+e,middle:f.middle+e},{outer:{begin:t.util.polarToCartesian(s.x,s.y,u.outer,l.begin),middle:t.util.polarToCartesian(s.x,s.y,u.outer,l.middle),end:t.util.polarToCartesian(s.x,s.y,u.outer,l.end)},middle:{begin:t.util.polarToCartesian(s.x,s.y,u.middle,l.begin),middle:t.util.polarToCartesian(s.x,s.y,u.middle,l.middle),end:t.util.polarToCartesian(s.x,s.y,u.middle,l.end)},inner:{begin:t.util.polarToCartesian(s.x,s.y,u.inner,l.begin),middle:t.util.polarToCartesian(s.x,s.y,u.inner,l.middle),end:t.util.polarToCartesian(s.x,s.y,u.inner,l.end)}}},r.fireClick=function(t){e.markerclick({$event:t.$event,$marker:t.$marker})},Object.defineProperty(r,"center",{get:function(){return n.center}}),Object.defineProperty(r,"radius",{get:function(){return{inner:n.radius+r.vadjust,outer:n.radius+r.vadjust+r.width,middle:n.radius+r.vadjust+r.width/2}}}),Object.defineProperty(r,"angle",{get:function(){var i,a,o,s;return i=r.start/n.plasmid.sequencelength*360,s=e.end||e.start,a=t.util.Numeric(s)/n.plasmid.sequencelength*360,a+=i>a?360:0,o=i+(a-i)/2,{start:i,middle:o,end:a}}}),Object.defineProperty(r,"vadjust",{get:function(){return t.util.Numeric(e.vadjust)}}),Object.defineProperty(r,"wadjust",{get:function(){return t.util.Numeric(e.wadjust)}}),Object.defineProperty(r,"width",{get:function(){return n.width+r.wadjust}}),Object.defineProperty(r,"start",{get:function(){return t.util.Numeric(e.start)}}),Object.defineProperty(r,"end",{get:function(){return t.util.Numeric(e.end)}}),Object.defineProperty(r,"arrowstart",{get:function(){return{width:t.util.Numeric(e.arrowstartwidth),length:t.util.Numeric(e.arrowstartlength),angle:t.util.Numeric(e.arrowstartangle)}}}),Object.defineProperty(r,"arrowend",{get:function(){return{width:t.util.Numeric(e.arrowendwidth),length:t.util.Numeric(e.arrowendlength),angle:t.util.Numeric(e.arrowendangle)}}}),Object.defineProperty(r,"markergroup",{get:function(){return e.markergroup}}),Object.defineProperty(r,"markerclass",{get:function(){return e.markerclass}}),Object.defineProperty(r,"markerstyle",{get:function(){return e.markerstyle}}),Object.defineProperty(r,"sequence",{get:function(){var t=r.track.plasmid.sequence;return r.start>r.end?t.substring(r.start-1,t.length-1)+t.substring(0,r.end-1):t.substring(r.start-1,r.end-1)}}),r.labels=a}]}}]).directive("markerlabel",["SVGUtil","$compile",function(t,e){return{restrict:"AE",type:"svg",transclude:!0,template:'<g><path></path><path id="" style="fill:none;stroke:none"></path><text></text></g>',require:["markerlabel","^trackmarker"],replace:!0,scope:{text:"@",valign:"@",vadjust:"@",halign:"@",hadjust:"@",type:"@",showline:"@",linestyle:"@",lineclass:"@",labelstyle:"@",labelclass:"@",linevadjust:"@",labelclick:"&"},link:{pre:function(t,e,n,r){var i=r[0],a=r[1],o=angular.element(e[0]),s=angular.element(e.children()[0]),u=angular.element(e.children()[1]),l=angular.element(e.children()[2]);i.init(l,o,u,s,a)},post:function(n,r,i,a,o){o(n.$parent,function(t){r.append(t)});var s=a[0],u=a[1],l=angular.element(r),c=angular.element(r.children()[2]);c.attr("text-anchor","middle"),c.attr("alignment-baseline","middle"),t.util.swapProperties(l,c),e(c)(n.$parent),i.labelclick?c.on("click",function(t){n.labelclick({$event:t,$label:s})}):c.on("click",function(t){u.fireClick({$event:t,$marker:u})}),n.$watchGroup(["text","type","valign","vadjust","halign","hadjust","showline","linevadjust","linestyle","labelclass","labelstyle"],function(){s.draw()})}},controller:["$scope","$compile",function(e,n){var r,i,a,o,s,u,l,c;i=this,i.elementtype="markerlabel",i.init=function(t,e,n,s,u){var f="TPATH"+(Math.random()+1).toString(36).substring(3,7);r=u,r.addMarkerLabel(i),i.marker=r,a=t,o=n,l=s,c=e,o.attr("id",f)},i.draw=function(){var t,c,f,d,h,p="middle",$="inner",m="outer",g="start",v="end",y=0,b=0,w=i.labelclass,x=i.labelstyle;if(w&&a.attr("class",w),x&&a.attr("style",x),"path"===i.type)switch(a.attr("x",""),a.attr("y",""),s||(u=document.createElementNS("http://www.w3.org/2000/svg","textPath"),u.setAttributeNS("http://www.w3.org/1999/xlink","href","#"+o.attr("id")),s=angular.element(u),n(s)(e),a.empty(),a.append(s)),u.textContent=i.text,y=window.getComputedStyle(a[0]).fontSize.replace("px",""),b=i.valign===m?0:i.valign===$?Number(y||0):Number(y||0)/2,o.attr("d",i.getPath(i.hadjust,i.vadjust-b,i.halign,i.valign)),i.halign){case g:a.attr("text-anchor","start"),s[0].setAttribute("startOffset","0%");break;case v:a.attr("text-anchor","end"),s[0].setAttribute("startOffset","100%");break;default:a.attr("text-anchor","middle"),s[0].setAttribute("startOffset","50%")}else s&&(s.remove(),s=null),t=r.getPosition(i.hadjust,i.vadjust,i.halign,i.valign),a.attr("x",t.x),a.attr("y",t.y),a.text(i.text);i.showlineflg?(c=r.getPosition(i.hadjust,i.vadjust+i.linevadjust,i.halign,i.valign),d=r.getPosition(),h=i.valign===$?d.inner:i.valign===p?d.middle:d.outer,f=i.halign===g?h.begin:i.halign===v?h.end:h.middle,l.attr("d",["M",c.x,c.y,"L",f.x,f.y].join(" ")),i.linestyle||i.lineclass||l.attr("style","stroke:#000"),i.linestyle&&l.attr("style",i.linestyle),i.lineclass&&l.attr("class",i.lineclass)):l.removeAttr("d")},i.getPath=function(e,n,i,a){var o,s,u,l,c,f="inner",d="outer",h="start",p="end",$=r.center;switch(s=r.radius,a){case f:o=s.inner;break;case d:o=s.outer;break;default:o=s.middle}switch(u=r.angle,i){case h:l=u.start,c=u.start+359.99;break;case p:l=u.end+1,c=u.end;break;default:l=u.middle+180.05,c=u.middle+179.95}return t.svg.path.arc($.x,$.y,o+Number(n||0),l+Number(e||0),c+Number(e||0),1)},Object.defineProperty(i,"showlineflg",{get:function(){return"1"===e.showline?!0:!1}}),Object.defineProperty(i,"halign",{get:function(){return e.halign||"middle"}}),Object.defineProperty(i,"valign",{get:function(){return e.valign||"middle"}}),Object.defineProperty(i,"hadjust",{get:function(){return t.util.Numeric(e.hadjust)}}),Object.defineProperty(i,"vadjust",{get:function(){return t.util.Numeric(e.vadjust)}}),Object.defineProperty(i,"type",{get:function(){return e.type}}),Object.defineProperty(i,"linevadjust",{get:function(){return t.util.Numeric(e.linevadjust)}}),Object.defineProperty(i,"labelclass",{get:function(){return e.labelclass}}),Object.defineProperty(i,"labelstyle",{get:function(){return e.labelstyle}}),Object.defineProperty(i,"linestyle",{get:function(){return e.linestyle}}),Object.defineProperty(i,"lineclass",{get:function(){return e.lineclass}}),Object.defineProperty(i,"text",{get:function(){return e.text}})}]}}]).directive("svgelement",["SVGUtil",function(){return{restrict:"AE",template:function(t,e){return"<"+e.type+"></"+e.type+">"},type:"svg",replace:!0,transclude:!0,require:["^plasmid"],scope:{},link:function(t,e,n,r,i){i(t.$parent,function(t){e.append(t)})}}}])}(),function(){"use strict";angular.element(document).ready(function(){angular.bootstrap(document,["app"])})}();</script>
+
for(y||(w||null===F?U[""].unshift({id:"",label:"",selected:!W}):W||U[""].unshift({id:"?",label:"",selected:!0})),C=0,g=L.length;g>C;C++){for(t=L[C],n=U[t],R.length<=C?(i={element:S.clone().attr("label",t),label:n.label},c=[i],R.push(c),s.append(i.element)):(c=R[C],i=c[0],i.label!=t&&i.element.attr("label",i.label=t)),j=null,O=0,b=n.length;b>O;O++)r=n[O],(f=c[O+1])?(j=f.element,f.label!==r.label&&(m(z,f.label,!1),m(z,r.label,!0),j.text(f.label=r.label),j.prop("label",f.label)),f.id!==r.id&&j.val(f.id=r.id),j[0].selected!==r.selected&&(j.prop("selected",f.selected=r.selected),Xr&&j.prop("selected",f.selected))):(""===r.id&&w?M=w:(M=k.clone()).val(r.id).prop("selected",r.selected).attr("selected",r.selected).prop("label",r.label).text(r.label),c.push(f={element:M,label:r.label,id:r.id,selected:r.selected}),m(z,r.label,!0),j?j.after(M):i.element.append(M),j=M);for(O++;c.length>O;)r=c.pop(),m(z,r.label,!1),r.element.remove()}for(;R.length>C;){for(n=R.pop(),O=1;O<n.length;++O)m(z,n[O].label,!1);n[0].element.remove()}a(z,function(t,e){t>0?$.addOption(e):0>t&&$.removeOption(e)})}var C;if(!(C=b.match(i)))throw Do("iexp","Expected expression in form of '_select_ (as _label_)? for (_key_,)?_value_ in _collection_' but got '{0}'. Element: {1}",b,z(s));var A=r(C[2]||C[1]),O=C[4]||C[6],E=/ as /.test(C[0])&&C[1],j=E?r(E):null,N=C[5],T=r(C[3]||""),M=r(C[2]?C[1]:O),P=r(C[7]),V=C[8],q=V?r(C[8]):null,D={},R=[[{element:s,label:""}]],I={};w&&(t(w)(e),w.removeClass("ng-scope"),w.remove()),s.empty(),s.on("change",c),u.$render=g,e.$watchCollection(P,p),e.$watchCollection(d,p),y&&e.$watchCollection(function(){return u.$modelValue},p)}if(c[1]){for(var p,$=c[0],m=c[1],y=l.multiple,b=l.ngOptions,w=!1,x=!1,k=Qr(e.createElement("option")),S=Qr(e.createElement("optgroup")),C=k.clone(),A=0,O=u.children(),E=O.length;E>A;A++)if(""===O[A].value){p=w=O.eq(A);break}$.init(m,w,C),y&&(m.$isEmpty=function(t){return!t||0===t.length}),b?h(s,u,m):y?d(s,u,m):f(s,u,m,$)}}}}],_o=["$interpolate",function(t){var e={addOption:p,removeOption:p};return{restrict:"E",priority:100,compile:function(n,r){if(g(r.value)){var i=t(n.text(),!0);i||r.$set("value",n.text())}return function(t,n,r){var a="$selectController",o=n.parent(),s=o.data(a)||o.parent().data(a);s&&s.databound||(s=e),i?t.$watch(i,function(t,e){r.$set("value",t),e!==t&&s.removeOption(e),s.addOption(t,n)}):s.addOption(r.value,n),n.on("$destroy",function(){s.removeOption(r.value)})}}}}],Uo=m({restrict:"E",terminal:!1}),Lo=function(){return{restrict:"A",require:"?ngModel",link:function(t,e,n,r){r&&(n.required=!0,r.$validators.required=function(t,e){return!n.required||!r.$isEmpty(e)},n.$observe("required",function(){r.$validate()}))}}},Fo=function(){return{restrict:"A",require:"?ngModel",link:function(t,e,i,a){if(a){var o,s=i.ngPattern||i.pattern;i.$observe("pattern",function(t){if(b(t)&&t.length>0&&(t=new RegExp("^"+t+"$")),t&&!t.test)throw r("ngPattern")("noregexp","Expected {0} to be a RegExp but was {1}. Element: {2}",s,t,z(e));o=t||n,a.$validate()}),a.$validators.pattern=function(t){return a.$isEmpty(t)||g(o)||o.test(t)}}}}},Ho=function(){return{restrict:"A",require:"?ngModel",link:function(t,e,n,r){if(r){var i=-1;n.$observe("maxlength",function(t){var e=d(t);i=isNaN(e)?-1:e,r.$validate()}),r.$validators.maxlength=function(t,e){return 0>i||r.$isEmpty(e)||e.length<=i}}}}},Bo=function(){return{restrict:"A",require:"?ngModel",link:function(t,e,n,r){if(r){var i=0;n.$observe("minlength",function(t){i=d(t)||0,r.$validate()}),r.$validators.minlength=function(t,e){return r.$isEmpty(e)||e.length>=i}}}}};return t.angular.bootstrap?(console.log("WARNING: Tried to load angular more than once."),void 0):(re(),he(si),Qr(e).ready(function(){X(e,Q)}),void 0)}(window,document),!window.angular.$$csp()&&window.angular.element(document).find("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;}</style>'),angular.module("app",["angularplasmid"]),function(){"use strict";angular.module("angularplasmid.services",[]).factory("SVGUtil",function(){function t(t,e){var n="round";return"undefined"==typeof e||0===+e?Math[n](t):(t=+t,e=+e,isNaN(t)||"number"!=typeof e||e%1!==0?0/0:(t=t.toString().split("e"),t=Math[n](+(t[0]+"e"+(t[1]?+t[1]-e:-e))),t=t.toString().split("e"),+(t[0]+"e"+(t[1]?+t[1]+e:e))))}function e(t){d.push(t)}function n(t){var e;for(e=0;e<d.length;e+=1)if(d[e].id===t)return d[e]}function r(t,e,n,r){var i=(r-90)*Math.PI/180;return{x:t+n*Math.cos(i),y:e+n*Math.sin(i)}}function i(t,e){var n,r,i=["id","name","class","style","filter","ng-attr-style","ng-attr-class","ng-class"];for(r=0;r<i.length;r+=1)n=i[r],t[0].hasAttribute(n)&&(e.attr(n,t.attr(n)),t.removeAttr(n))}function a(t,e,n){var r,i="http://www.w3.org/2000/svg",a=document.createElementNS(i,t);return n=n||[],angular.forEach(e,function(t){n.indexOf(t)<0&&(r=e[t],null===r||t.match(/\$/)||"string"==typeof r&&""===r||a.setAttribute(t,r))}),a}function o(t){angular.forEach(["id","class","style"],function(e){t.removeAttribute(e)})}function s(t,e,n,i){var a,o,s;return t=Number(t||0),e=Number(e||0),n=Number(n||0),i=Number(i||0),a={start:r(t,e,n,359.99),end:r(t,e,n,0)},o={start:r(t,e,n+i,359.99),end:r(t,e,n+i,0)},s=["M",a.start.x,a.start.y,"A",n,n,0,1,0,a.end.x,a.end.y,"M",o.start.x,o.start.y,"A",n+i,n+i,0,1,0,o.end.x,o.end.y].join(" ")}function u(t,e,n,i,a,o,s,u){var l,c,f,d,h,p,$,m,g,v,y,b,w;return t=Number(t),e=Number(e),n=Number(n),i=Number(i),a=Number(a),o=Number(o),s=s||{width:0,length:0,angle:0},u=u||{width:0,length:0,angle:0},i===a?(c=r(t,e,n,i),d=r(t,e,n+o,i),l=["M",c.x,c.y,"L",d.x,d.y].join(" ")):1===o?(c=r(t,e,n,i),d=r(t,e,n,a),h=a>i?180>=a-i?"0":"1":180>=a-i?"1":"0",l=["M",c.x,c.y,"A",n,n,0,h,1,d.x,d.y].join(" ")):(a-=u.length<0?0:u.length,i+=s.length<0?0:s.length,c=r(t,e,n,a),d=r(t,e,n,i),p=r(t,e,n-s.width,i+s.angle),$=r(t,e,n+o/2,i-s.length),m=r(t,e,n+o+s.width,i+s.angle),g=r(t,e,n+o,i),v=r(t,e,n+o+u.width,a-u.angle),y=r(t,e,n+o/2,a+u.length),b=r(t,e,n-u.width,a-u.angle),w=r(t,e,n,a),f=r(t,e,n+o,a),h=180>=a-i?"0":"1",l=["M",c.x,c.y,"A",n,n,0,h,0,d.x,d.y,"L",p.x,p.y,"L",$.x,$.y,"L",m.x,m.y,"L",g.x,g.y,"A",n+o,n+o,0,h,1,f.x,f.y,"L",v.x,v.y,"L",y.x,y.y,"L",b.x,b.y,"L",w.x,w.y,"z"].join(" ")),l}function l(e,n,r,i,a,o){e=Number(e||0),n=Number(n||0),r=Number(r||0),i=Number(i||0),a=Number(a||0),o=Number(o||2);var s,u,l,c,f=Number(i)>0?Number(a)/Number(i):0,d=2*Math.PI/f,h=-1,p="";for(c=0;f>c;c+=1)s=d*c-Math.PI/2,l=Math.cos(s),u=Math.sin(s),p+="M"+t(e+r*l,h)+","+t(n+r*u,h)+" L"+t(e+(r+o)*l,h)+","+t(n+(r+o)*u,h)+" ";return p=p||"M 0,0"}function c(e,n,r,i,a){e=Number(e),n=Number(n),r=Number(r),i=Number(i),a=Number(a);var o,s,u,l,c=Number(i)>0?Number(a)/Number(i):0,f=2*Math.PI/c,d=-1,h=[];for(l=0;c>l;l+=1)o=f*l-Math.PI/2,u=Math.cos(o),s=Math.sin(o),h.push({x:t(e+r*u,d),y:t(n+r*s,d),text:i*l});return h}function f(t,e){return isNaN(t)?e||0:Number(t)}var d=[],h=[],p=[];return{api:{addPlasmid:e,plasmids:d,plasmid:n,plasmidtracks:h,trackmarkers:p},util:{polarToCartesian:r,swapProperties:i,Numeric:f},svg:{createNode:a,removeAttributes:o,path:{donut:s,arc:u,scale:l},element:{scalelabels:c}}}})}(),function(){"use strict";angular.module("angularplasmid",["angularplasmid.services"]).directive("plasmidapi",["SVGUtil",function(t){return{restrict:"AE",link:function(e,n,r){e[r.name]=t.api}}}]).directive("plasmid",["SVGUtil",function(){return{restrict:"AE",type:"svg",template:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"></svg>',replace:!0,transclude:!0,require:"plasmid",scope:{plasmidheight:"@",plasmidwidth:"@",sequencelength:"@",sequence:"@",plasmidclass:"@",plasmidstyle:"@"},link:{pre:function(t,e,n,r){r.init(e)},post:function(t,e,n,r,i){i(t.$parent,function(t){e.append(t)}),t.$watchGroup(["plasmidheight","plasmidwidth","sequencelength","sequence","plasmidclass","plasmidstyle"],function(){r.draw()})}},controller:["$scope","SVGUtil",function(t,e){var n,r,i=[];r=this,r.elementtype="plasmid",r.init=function(t){e.api.addPlasmid(r),n=t,r.id=n.attr("id")},r.draw=function(){var t=r.dimensions,e=n.plasmidclass,a=n.plasmidstyle;n.attr("height",t.height),n.attr("width",t.width),e&&n.attr("class",e),a&&n.attr("style",a),angular.forEach(i,function(t){t.draw()})},r.addTrack=function(t){i.push(t)},Object.defineProperty(r,"center",{get:function(){var t=r.dimensions;return{x:t.width/2,y:t.height/2}}}),Object.defineProperty(r,"dimensions",{get:function(){return{height:e.util.Numeric(t.plasmidheight,300),width:e.util.Numeric(t.plasmidwidth,300)}}}),Object.defineProperty(r,"sequencelength",{get:function(){return r.sequence?r.sequence.length:e.util.Numeric(t.sequencelength)}}),Object.defineProperty(r,"sequence",{get:function(){return t.sequence}}),Object.defineProperty(r,"plasmidclass",{get:function(){return t.plasmidclass}}),Object.defineProperty(r,"plasmidstyle",{get:function(){return t.plasmidstyle}}),r.tracks=i}]}}]).directive("plasmidtrack",["SVGUtil","$compile",function(t,e){return{restrict:"AE",type:"svg",template:"<g><path></path></g>",replace:!0,transclude:!0,require:["plasmidtrack","^plasmid"],scope:{radius:"@",width:"@",trackclass:"@",trackstyle:"@",trackclick:"&"},link:{pre:function(t,e,n,r){var i=r[0],a=r[1],o=angular.element(e.children()[0]);i.init(o,a)},post:function(n,r,i,a,o){o(n.$parent,function(t){r.append(t)});var s=angular.element(r),u=angular.element(r.children()[0]),l=a[0];t.util.swapProperties(s,u),u.attr("fill-rule","evenodd"),e(u)(n.$parent),u.on("click",function(t){n.trackclick({$event:t,$track:l})}),n.$watchGroup(["radius","width","trackstyle","trackclass"],function(){l.draw()})}},controller:["$scope",function(e){var n,r,i,a=[],o=[],s=[];i=this,i.elementtype="plasmidtrack",i.init=function(t,e){n=e,n.addTrack(i),i.plasmid=n,r=t},i.draw=function(){var e=i.center,n=t.svg.path.donut(e.x,e.y,i.radius,i.width),u=i.trackclass,l=i.trackstyle;r.attr("d",n),u&&r.attr("class",u),l&&r.attr("style",l),angular.forEach(a,function(t){t.draw()}),angular.forEach(o,function(t){t.draw()}),angular.forEach(s,function(t){t.draw()})},i.addMarker=function(t){a.push(t)},i.addScale=function(t){o.push(t)},i.addLabel=function(t){s.push(t)},i.markergroup=function(t){var e=[];return angular.forEach(a,function(n){n.markergroup===t&&e.push(n)}),e},i.getPosition=function(e,r,a){a=Number(a||0),e=Number(e);var o,s,u=1,l=2,c=i.center,f=n.sequencelength;if(f>0){switch(s=e/f*360,r){case u:o=i.radius+a;break;case l:o=i.radius+i.width+a;break;default:o=i.radius+i.width/2+a}return t.util.polarToCartesian(c.x,c.y,o,s)}},Object.defineProperty(i,"center",{get:function(){return n.center}}),Object.defineProperty(i,"radius",{get:function(){return t.util.Numeric(e.radius,100)}}),Object.defineProperty(i,"width",{get:function(){return t.util.Numeric(e.width,25)}}),Object.defineProperty(i,"trackclass",{get:function(){return e.trackclass}}),Object.defineProperty(i,"trackstyle",{get:function(){return e.trackstyle}}),i.markers=a,i.scales=o,i.labels=s}]}}]).directive("trackscale",["SVGUtil","$compile",function(t,e){return{restrict:"AE",type:"svg",template:"<g><path></path><g></g></g>",replace:!0,transclude:!0,require:["trackscale","^plasmidtrack"],scope:{interval:"@",vadjust:"@",ticksize:"@",direction:"@",showlabels:"@",labelvadjust:"@",labelclass:"@",labelstyle:"@",tickclass:"@",tickstyle:"@",scaleclick:"&"},link:{pre:function(t,e,n,r){var i=r[0],a=r[1],o=angular.element(e.children()[0]),s=angular.element(e.children()[1]);i.init(o,s,a)},post:function(n,r,i,a,o){var s,u,l;o(n.$parent,function(t){r.append(t)}),s=angular.element(r),u=angular.element(r.children()[0]),t.util.swapProperties(s,u),e(u)(n.$parent),u.on("click",function(t){n.scaleclick({$event:t,$scale:l})}),l=a[0],n.$watchGroup(["interval","vadjust","ticksize","labelvadjust","direction","showlabels","labelstyle","labelclass","tickstyle","tickclass"],function(){l.draw()})}},controller:["$scope",function(e){var n,r,i,a,o=15,s=3;r=this,r.elementtype="trackscale",r.init=function(t,e,o){n=o,n.addScale(r),r.track=n,i=t,a=e},r.draw=function(){var e=r.tickclass,o=r.tickstyle,s=n.center,u=t.svg.path.scale(s.x,s.y,r.radius,r.interval,r.total,r.ticksize);i.attr("d",u),e&&i.attr("class",e),o&&i.attr("style",o),r.showlabels?r.drawLabel():a.empty()},r.drawLabel=function(){function i(t){e.scaleclick({$event:t,$scale:r})}var o,s,u,l=n.center;for(u=t.svg.element.scalelabels(l.x,l.y,r.labelradius,r.interval,r.total),a.empty(),o=0;o<=u.length-1;o+=1)s=angular.element(t.svg.createNode("text")),r.labelclass&&s.attr("class",r.labelclass),r.labelstyle&&s.attr("style",r.labelstyle),s.attr("x",u[o].x),s.attr("y",u[o].y),s.attr("text-anchor","middle"),s.attr("alignment-baseline","middle"),s.text(u[o].text),s.on("click",i),a.append(s)},Object.defineProperty(r,"radius",{get:function(){return(r.inwardflg?n.radius:n.radius+n.width)+(r.inwardflg?-1:1)*r.vadjust+(r.inwardflg?-r.ticksize:0)}}),Object.defineProperty(r,"interval",{get:function(){return t.util.Numeric(e.interval)}}),Object.defineProperty(r,"vadjust",{get:function(){return t.util.Numeric(e.vadjust)}}),Object.defineProperty(r,"ticksize",{get:function(){return t.util.Numeric(e.ticksize,s)}}),Object.defineProperty(r,"inwardflg",{get:function(){return"in"===e.direction?!0:!1}}),Object.defineProperty(r,"total",{get:function(){return n.plasmid.sequencelength}}),Object.defineProperty(r,"showlabels",{get:function(){return"1"===e.showlabels?!0:!1}}),Object.defineProperty(r,"labelvadjust",{get:function(){return t.util.Numeric(e.labelvadjust,o)}}),Object.defineProperty(r,"tickclass",{get:function(){return e.tickclass}}),Object.defineProperty(r,"tickstyle",{get:function(){return e.tickstyle}}),Object.defineProperty(r,"labelclass",{get:function(){return e.labelclass}}),Object.defineProperty(r,"labelstyle",{get:function(){return e.labelstyle}}),Object.defineProperty(r,"labelradius",{get:function(){return r.radius+r.labelvadjust*(r.inwardflg?-1:1)}})}]}}]).directive("tracklabel",["SVGUtil",function(t){return{restrict:"AE",type:"svg",template:"<text></text>",replace:!0,transclude:!0,require:["tracklabel","^plasmidtrack"],scope:{text:"@",hadjust:"@",vadjust:"@",labelclass:"@",labelstyle:"@",labelclick:"&"},link:{pre:function(t,e,n,r){var i=r[0],a=r[1],o=angular.element(e[0]);i.init(o,a)},post:function(t,e,n,r,i){var a;i(t.$parent,function(t){e.append(t)}),e.attr("text-anchor","middle"),e.attr("alignment-baseline","middle"),e.on("click",function(e){t.labelclick({$event:e,$label:a})}),a=r[0],t.$watchGroup(["text","vadjust","hadjust","labelstyle","labelclass"],function(){a.draw()})}},controller:["$scope",function(e){var n,r,i;r=this,r.elementtype="tracklabel",r.init=function(t,e){n=e,n.addLabel(r),r.track=n,i=t},r.draw=function(){var t=n.center,e=r.labelclass,a=r.labelstyle;i.attr("x",t.x+r.hadjust),i.attr("y",t.y+r.vadjust),i.text(r.text),e&&i.attr("class",e),a&&i.attr("style",a)},Object.defineProperty(r,"center",{get:function(){return n.center}}),Object.defineProperty(r,"text",{get:function(){return e.text}}),Object.defineProperty(r,"labelclass",{get:function(){return e.labelclass}}),Object.defineProperty(r,"labelstyle",{get:function(){return e.labelstyle}}),Object.defineProperty(r,"hadjust",{get:function(){return t.util.Numeric(e.hadjust,0)}}),Object.defineProperty(r,"vadjust",{get:function(){return t.util.Numeric(e.vadjust,0)}}),Object.defineProperty(r,"dimensions",{get:function(){return i[0].getBBox()}})}]}}]).directive("trackmarker",["SVGUtil","$compile",function(t,e){return{restrict:"AE",type:"svg",template:"<g><path></path></g>",replace:!0,transclude:!0,require:["trackmarker","^plasmidtrack"],scope:{start:"@",end:"@",vadjust:"@",wadjust:"@",markergroup:"@",arrowstartlength:"@",arrowstartwidth:"@",arrowstartangle:"@",arrowendlength:"@",arrowendwidth:"@",arrowendangle:"@",markerclass:"@",markerstyle:"@",markerclick:"&"},link:{pre:function(t,e,n,r){var i=r[0],a=r[1],o=angular.element(e.children()[0]);i.init(o,a)},post:function(n,r,i,a,o){var s,u,l=a[0];o(n.$parent,function(t){r.append(t)}),s=angular.element(r),u=angular.element(r.children()[0]),t.util.swapProperties(s,u),e(u)(n.$parent),u.on("click",function(t){n.markerclick({$event:t,$marker:l})}),n.$watchGroup(["start","end","vadjust","wadjust","markergroup","markerclass","markerstyle","arrowstartlength","arrowstartwidth","arrowstartangle","arrowendlength","arrowendwidth","arrowendangle"],function(){l.draw()})}},controller:["$scope",function(e){var n,r,i,a=[];r=this,r.elementtype="trackmarker",r.init=function(t,e){n=e,n.addMarker(r),i=t,r.track=n},r.draw=function(){var t=r.markerclass,e=r.markerstyle;i.attr("d",r.getPath()),t&&i.attr("class",t),e&&i.attr("style",e),angular.forEach(a,function(t){t.draw()})},r.addMarkerLabel=function(t){a.push(t)},r.getPath=function(){var e=n.center,i=r.angle,a=r.radius;return t.svg.path.arc(e.x,e.y,a.inner,i.start,i.end,r.width,r.arrowstart,r.arrowend)},r.getPosition=function(e,i,a,o){var s,u,l,c,f,d="start",h="end",p="inner",$="outer";if(s=n.center,c=r.radius,f=r.angle,e=t.util.Numeric(e),i=t.util.Numeric(i),void 0!==o&&void 0!==a){switch(o){case p:u=c.inner+i;break;case $:u=c.outer+i;break;default:u=c.middle+i}switch(a){case d:l=f.start+e;break;case h:l=f.end+e;break;default:l=f.middle+e}return t.util.polarToCartesian(s.x,s.y,u,l)}return u={outer:c.outer+i,inner:c.inner+i,middle:c.middle+i},l={begin:f.start+e,end:f.end+e,middle:f.middle+e},{outer:{begin:t.util.polarToCartesian(s.x,s.y,u.outer,l.begin),middle:t.util.polarToCartesian(s.x,s.y,u.outer,l.middle),end:t.util.polarToCartesian(s.x,s.y,u.outer,l.end)},middle:{begin:t.util.polarToCartesian(s.x,s.y,u.middle,l.begin),middle:t.util.polarToCartesian(s.x,s.y,u.middle,l.middle),end:t.util.polarToCartesian(s.x,s.y,u.middle,l.end)},inner:{begin:t.util.polarToCartesian(s.x,s.y,u.inner,l.begin),middle:t.util.polarToCartesian(s.x,s.y,u.inner,l.middle),end:t.util.polarToCartesian(s.x,s.y,u.inner,l.end)}}},r.fireClick=function(t){e.markerclick({$event:t.$event,$marker:t.$marker})},Object.defineProperty(r,"center",{get:function(){return n.center}}),Object.defineProperty(r,"radius",{get:function(){return{inner:n.radius+r.vadjust,outer:n.radius+r.vadjust+r.width,middle:n.radius+r.vadjust+r.width/2}}}),Object.defineProperty(r,"angle",{get:function(){var i,a,o,s;return i=r.start/n.plasmid.sequencelength*360,s=e.end||e.start,a=t.util.Numeric(s)/n.plasmid.sequencelength*360,a+=i>a?360:0,o=i+(a-i)/2,{start:i,middle:o,end:a}}}),Object.defineProperty(r,"vadjust",{get:function(){return t.util.Numeric(e.vadjust)}}),Object.defineProperty(r,"wadjust",{get:function(){return t.util.Numeric(e.wadjust)}}),Object.defineProperty(r,"width",{get:function(){return n.width+r.wadjust}}),Object.defineProperty(r,"start",{get:function(){return t.util.Numeric(e.start)}}),Object.defineProperty(r,"end",{get:function(){return t.util.Numeric(e.end)}}),Object.defineProperty(r,"arrowstart",{get:function(){return{width:t.util.Numeric(e.arrowstartwidth),length:t.util.Numeric(e.arrowstartlength),angle:t.util.Numeric(e.arrowstartangle)}}}),Object.defineProperty(r,"arrowend",{get:function(){return{width:t.util.Numeric(e.arrowendwidth),length:t.util.Numeric(e.arrowendlength),angle:t.util.Numeric(e.arrowendangle)}}}),Object.defineProperty(r,"markergroup",{get:function(){return e.markergroup}}),Object.defineProperty(r,"markerclass",{get:function(){return e.markerclass}}),Object.defineProperty(r,"markerstyle",{get:function(){return e.markerstyle}}),Object.defineProperty(r,"sequence",{get:function(){var t=r.track.plasmid.sequence;return r.start>r.end?t.substring(r.start-1,t.length-1)+t.substring(0,r.end-1):t.substring(r.start-1,r.end-1)}}),r.labels=a}]}}]).directive("markerlabel",["SVGUtil","$compile",function(t,e){return{restrict:"AE",type:"svg",transclude:!0,template:'<g><path></path><path id="" style="fill:none;stroke:none"></path><text></text></g>',require:["markerlabel","^trackmarker"],replace:!0,scope:{text:"@",valign:"@",vadjust:"@",halign:"@",hadjust:"@",type:"@",showline:"@",linestyle:"@",lineclass:"@",labelstyle:"@",labelclass:"@",linevadjust:"@",labelclick:"&"},link:{pre:function(t,e,n,r){var i=r[0],a=r[1],o=angular.element(e[0]),s=angular.element(e.children()[0]),u=angular.element(e.children()[1]),l=angular.element(e.children()[2]);i.init(l,o,u,s,a)},post:function(n,r,i,a,o){o(n.$parent,function(t){r.append(t)});var s=a[0],u=a[1],l=angular.element(r),c=angular.element(r.children()[2]);c.attr("text-anchor","middle"),c.attr("alignment-baseline","middle"),t.util.swapProperties(l,c),e(c)(n.$parent),i.labelclick?c.on("click",function(t){n.labelclick({$event:t,$label:s})}):c.on("click",function(t){u.fireClick({$event:t,$marker:u})}),n.$watchGroup(["text","type","valign","vadjust","halign","hadjust","showline","linevadjust","linestyle","labelclass","labelstyle"],function(){s.draw()})}},controller:["$scope","$compile",function(e,n){var r,i,a,o,s,u,l,c;i=this,i.elementtype="markerlabel",i.init=function(t,e,n,s,u){var f="TPATH"+(Math.random()+1).toString(36).substring(3,7);r=u,r.addMarkerLabel(i),i.marker=r,a=t,o=n,l=s,c=e,o.attr("id",f)},i.draw=function(){var t,c,f,d,h,p="middle",$="inner",m="outer",g="start",v="end",y=0,b=0,w=i.labelclass,x=i.labelstyle;if(w&&a.attr("class",w),x&&a.attr("style",x),"path"===i.type)switch(a.attr("x",""),a.attr("y",""),s||(u=document.createElementNS("http://www.w3.org/2000/svg","textPath"),u.setAttributeNS("http://www.w3.org/1999/xlink","href","#"+o.attr("id")),s=angular.element(u),n(s)(e),a.empty(),a.append(s)),u.textContent=i.text,y=window.getComputedStyle(a[0]).fontSize.replace("px",""),b=i.valign===m?0:i.valign===$?Number(y||0):Number(y||0)/2,o.attr("d",i.getPath(i.hadjust,i.vadjust-b,i.halign,i.valign)),i.halign){case g:a.attr("text-anchor","start"),s[0].setAttribute("startOffset","0%");break;case v:a.attr("text-anchor","end"),s[0].setAttribute("startOffset","100%");break;default:a.attr("text-anchor","middle"),s[0].setAttribute("startOffset","50%")}else s&&(s.remove(),s=null),t=r.getPosition(i.hadjust,i.vadjust,i.halign,i.valign),a.attr("x",t.x),a.attr("y",t.y),a.text(i.text);i.showlineflg?(c=r.getPosition(i.hadjust,i.vadjust+i.linevadjust,i.halign,i.valign),d=r.getPosition(),h=i.valign===$?d.inner:i.valign===p?d.middle:d.outer,f=i.halign===g?h.begin:i.halign===v?h.end:h.middle,l.attr("d",["M",c.x,c.y,"L",f.x,f.y].join(" ")),i.linestyle||i.lineclass||l.attr("style","stroke:#000"),i.linestyle&&l.attr("style",i.linestyle),i.lineclass&&l.attr("class",i.lineclass)):l.removeAttr("d")},i.getPath=function(e,n,i,a){var o,s,u,l,c,f="inner",d="outer",h="start",p="end",$=r.center;switch(s=r.radius,a){case f:o=s.inner;break;case d:o=s.outer;break;default:o=s.middle}switch(u=r.angle,i){case h:l=u.start,c=u.start+359.99;break;case p:l=u.end+1,c=u.end;break;default:l=u.middle+180.05,c=u.middle+179.95}return t.svg.path.arc($.x,$.y,o+Number(n||0),l+Number(e||0),c+Number(e||0),1)},Object.defineProperty(i,"showlineflg",{get:function(){return"1"===e.showline?!0:!1}}),Object.defineProperty(i,"halign",{get:function(){return e.halign||"middle"}}),Object.defineProperty(i,"valign",{get:function(){return e.valign||"middle"}}),Object.defineProperty(i,"hadjust",{get:function(){return t.util.Numeric(e.hadjust)}}),Object.defineProperty(i,"vadjust",{get:function(){return t.util.Numeric(e.vadjust)}}),Object.defineProperty(i,"type",{get:function(){return e.type}}),Object.defineProperty(i,"linevadjust",{get:function(){return t.util.Numeric(e.linevadjust)}}),Object.defineProperty(i,"labelclass",{get:function(){return e.labelclass}}),Object.defineProperty(i,"labelstyle",{get:function(){return e.labelstyle}}),Object.defineProperty(i,"linestyle",{get:function(){return e.linestyle}}),Object.defineProperty(i,"lineclass",{get:function(){return e.lineclass}}),Object.defineProperty(i,"text",{get:function(){return e.text}})}]}}]).directive("svgelement",["SVGUtil",function(){return{restrict:"AE",template:function(t,e){return"<"+e.type+"></"+e.type+">"},type:"svg",replace:!0,transclude:!0,require:["^plasmid"],scope:{},link:function(t,e,n,r,i){i(t.$parent,function(t){e.append(t)})}}}])}(),function(){"use strict";angular.element(document).ready(function(){angular.bootstrap(document,["app"])})}();
 
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
 
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
 
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
 
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>

Revision as of 10:27, 1 November 2017

for(y||(w||null===F?U[""].unshift({id:"",label:"",selected:!W}):W||U[""].unshift({id:"?",label:"",selected:!0})),C=0,g=L.length;g>C;C++){for(t=L[C],n=U[t],R.length<=C?(i={element:S.clone().attr("label",t),label:n.label},c=[i],R.push(c),s.append(i.element)):(c=R[C],i=c[0],i.label!=t&&i.element.attr("label",i.label=t)),j=null,O=0,b=n.length;b>O;O++)r=n[O],(f=c[O+1])?(j=f.element,f.label!==r.label&&(m(z,f.label,!1),m(z,r.label,!0),j.text(f.label=r.label),j.prop("label",f.label)),f.id!==r.id&&j.val(f.id=r.id),j[0].selected!==r.selected&&(j.prop("selected",f.selected=r.selected),Xr&&j.prop("selected",f.selected))):(""===r.id&&w?M=w:(M=k.clone()).val(r.id).prop("selected",r.selected).attr("selected",r.selected).prop("label",r.label).text(r.label),c.push(f={element:M,label:r.label,id:r.id,selected:r.selected}),m(z,r.label,!0),j?j.after(M):i.element.append(M),j=M);for(O++;c.length>O;)r=c.pop(),m(z,r.label,!1),r.element.remove()}for(;R.length>C;){for(n=R.pop(),O=1;O0?$.addOption(e):0>t&&$.removeOption(e)})}var C;if(!(C=b.match(i)))throw Do("iexp","Expected expression in form of '_select_ (as _label_)? for (_key_,)?_value_ in _collection_' but got '{0}'. Element: {1}",b,z(s));var A=r(C[2]||C[1]),O=C[4]||C[6],E=/ as /.test(C[0])&&C[1],j=E?r(E):null,N=C[5],T=r(C[3]||""),M=r(C[2]?C[1]:O),P=r(C[7]),V=C[8],q=V?r(C[8]):null,D={},R=[[{element:s,label:""}]],I={};w&&(t(w)(e),w.removeClass("ng-scope"),w.remove()),s.empty(),s.on("change",c),u.$render=g,e.$watchCollection(P,p),e.$watchCollection(d,p),y&&e.$watchCollection(function(){return u.$modelValue},p)}if(c[1]){for(var p,$=c[0],m=c[1],y=l.multiple,b=l.ngOptions,w=!1,x=!1,k=Qr(e.createElement("option")),S=Qr(e.createElement("optgroup")),C=k.clone(),A=0,O=u.children(),E=O.length;E>A;A++)if(""===O[A].value){p=w=O.eq(A);break}$.init(m,w,C),y&&(m.$isEmpty=function(t){return!t||0===t.length}),b?h(s,u,m):y?d(s,u,m):f(s,u,m,$)}}}}],_o=["$interpolate",function(t){var e={addOption:p,removeOption:p};return{restrict:"E",priority:100,compile:function(n,r){if(g(r.value)){var i=t(n.text(),!0);i||r.$set("value",n.text())}return function(t,n,r){var a="$selectController",o=n.parent(),s=o.data(a)||o.parent().data(a);s&&s.databound||(s=e),i?t.$watch(i,function(t,e){r.$set("value",t),e!==t&&s.removeOption(e),s.addOption(t,n)}):s.addOption(r.value,n),n.on("$destroy",function(){s.removeOption(r.value)})}}}}],Uo=m({restrict:"E",terminal:!1}),Lo=function(){return{restrict:"A",require:"?ngModel",link:function(t,e,n,r){r&&(n.required=!0,r.$validators.required=function(t,e){return!n.required||!r.$isEmpty(e)},n.$observe("required",function(){r.$validate()}))}}},Fo=function(){return{restrict:"A",require:"?ngModel",link:function(t,e,i,a){if(a){var o,s=i.ngPattern||i.pattern;i.$observe("pattern",function(t){if(b(t)&&t.length>0&&(t=new RegExp("^"+t+"$")),t&&!t.test)throw r("ngPattern")("noregexp","Expected {0} to be a RegExp but was {1}. Element: {2}",s,t,z(e));o=t||n,a.$validate()}),a.$validators.pattern=function(t){return a.$isEmpty(t)||g(o)||o.test(t)}}}}},Ho=function(){return{restrict:"A",require:"?ngModel",link:function(t,e,n,r){if(r){var i=-1;n.$observe("maxlength",function(t){var e=d(t);i=isNaN(e)?-1:e,r.$validate()}),r.$validators.maxlength=function(t,e){return 0>i||r.$isEmpty(e)||e.length<=i}}}}},Bo=function(){return{restrict:"A",require:"?ngModel",link:function(t,e,n,r){if(r){var i=0;n.$observe("minlength",function(t){i=d(t)||0,r.$validate()}),r.$validators.minlength=function(t,e){return r.$isEmpty(e)||e.length>=i}}}}};return t.angular.bootstrap?(console.log("WARNING: Tried to load angular more than once."),void 0):(re(),he(si),Qr(e).ready(function(){X(e,Q)}),void 0)}(window,document),!window.angular.$$csp()&&window.angular.element(document).find("head").prepend(''),angular.module("app",["angularplasmid"]),function(){"use strict";angular.module("angularplasmid.services",[]).factory("SVGUtil",function(){function t(t,e){var n="round";return"undefined"==typeof e||0===+e?Math[n](t):(t=+t,e=+e,isNaN(t)||"number"!=typeof e||e%1!==0?0/0:(t=t.toString().split("e"),t=Math[n](+(t[0]+"e"+(t[1]?+t[1]-e:-e))),t=t.toString().split("e"),+(t[0]+"e"+(t[1]?+t[1]+e:e))))}function e(t){d.push(t)}function n(t){var e;for(e=0;ei?180>=a-i?"0":"1":180>=a-i?"1":"0",l=["M",c.x,c.y,"A",n,n,0,h,1,d.x,d.y].join(" ")):(a-=u.length<0?0:u.length,i+=s.length<0?0:s.length,c=r(t,e,n,a),d=r(t,e,n,i),p=r(t,e,n-s.width,i+s.angle),$=r(t,e,n+o/2,i-s.length),m=r(t,e,n+o+s.width,i+s.angle),g=r(t,e,n+o,i),v=r(t,e,n+o+u.width,a-u.angle),y=r(t,e,n+o/2,a+u.length),b=r(t,e,n-u.width,a-u.angle),w=r(t,e,n,a),f=r(t,e,n+o,a),h=180>=a-i?"0":"1",l=["M",c.x,c.y,"A",n,n,0,h,0,d.x,d.y,"L",p.x,p.y,"L",$.x,$.y,"L",m.x,m.y,"L",g.x,g.y,"A",n+o,n+o,0,h,1,f.x,f.y,"L",v.x,v.y,"L",y.x,y.y,"L",b.x,b.y,"L",w.x,w.y,"z"].join(" ")),l}function l(e,n,r,i,a,o){e=Number(e||0),n=Number(n||0),r=Number(r||0),i=Number(i||0),a=Number(a||0),o=Number(o||2);var s,u,l,c,f=Number(i)>0?Number(a)/Number(i):0,d=2*Math.PI/f,h=-1,p="";for(c=0;f>c;c+=1)s=d*c-Math.PI/2,l=Math.cos(s),u=Math.sin(s),p+="M"+t(e+r*l,h)+","+t(n+r*u,h)+" L"+t(e+(r+o)*l,h)+","+t(n+(r+o)*u,h)+" ";return p=p||"M 0,0"}function c(e,n,r,i,a){e=Number(e),n=Number(n),r=Number(r),i=Number(i),a=Number(a);var o,s,u,l,c=Number(i)>0?Number(a)/Number(i):0,f=2*Math.PI/c,d=-1,h=[];for(l=0;c>l;l+=1)o=f*l-Math.PI/2,u=Math.cos(o),s=Math.sin(o),h.push({x:t(e+r*u,d),y:t(n+r*s,d),text:i*l});return h}function f(t,e){return isNaN(t)?e||0:Number(t)}var d=[],h=[],p=[];return{api:{addPlasmid:e,plasmids:d,plasmid:n,plasmidtracks:h,trackmarkers:p},util:{polarToCartesian:r,swapProperties:i,Numeric:f},svg:{createNode:a,removeAttributes:o,path:{donut:s,arc:u,scale:l},element:{scalelabels:c}}}})}(),function(){"use strict";angular.module("angularplasmid",["angularplasmid.services"]).directive("plasmidapi",["SVGUtil",function(t){return{restrict:"AE",link:function(e,n,r){e[r.name]=t.api}}}]).directive("plasmid",["SVGUtil",function(){return{restrict:"AE",type:"svg",template:'',replace:!0,transclude:!0,require:"plasmid",scope:{plasmidheight:"@",plasmidwidth:"@",sequencelength:"@",sequence:"@",plasmidclass:"@",plasmidstyle:"@"},link:{pre:function(t,e,n,r){r.init(e)},post:function(t,e,n,r,i){i(t.$parent,function(t){e.append(t)}),t.$watchGroup(["plasmidheight","plasmidwidth","sequencelength","sequence","plasmidclass","plasmidstyle"],function(){r.draw()})}},controller:["$scope","SVGUtil",function(t,e){var n,r,i=[];r=this,r.elementtype="plasmid",r.init=function(t){e.api.addPlasmid(r),n=t,r.id=n.attr("id")},r.draw=function(){var t=r.dimensions,e=n.plasmidclass,a=n.plasmidstyle;n.attr("height",t.height),n.attr("width",t.width),e&&n.attr("class",e),a&&n.attr("style",a),angular.forEach(i,function(t){t.draw()})},r.addTrack=function(t){i.push(t)},Object.defineProperty(r,"center",{get:function(){var t=r.dimensions;return{x:t.width/2,y:t.height/2}}}),Object.defineProperty(r,"dimensions",{get:function(){return{height:e.util.Numeric(t.plasmidheight,300),width:e.util.Numeric(t.plasmidwidth,300)}}}),Object.defineProperty(r,"sequencelength",{get:function(){return r.sequence?r.sequence.length:e.util.Numeric(t.sequencelength)}}),Object.defineProperty(r,"sequence",{get:function(){return t.sequence}}),Object.defineProperty(r,"plasmidclass",{get:function(){return t.plasmidclass}}),Object.defineProperty(r,"plasmidstyle",{get:function(){return t.plasmidstyle}}),r.tracks=i}]}}]).directive("plasmidtrack",["SVGUtil","$compile",function(t,e){return{restrict:"AE",type:"svg",template:"",replace:!0,transclude:!0,require:["plasmidtrack","^plasmid"],scope:{radius:"@",width:"@",trackclass:"@",trackstyle:"@",trackclick:"&"},link:{pre:function(t,e,n,r){var i=r[0],a=r[1],o=angular.element(e.children()[0]);i.init(o,a)},post:function(n,r,i,a,o){o(n.$parent,function(t){r.append(t)});var s=angular.element(r),u=angular.element(r.children()[0]),l=a[0];t.util.swapProperties(s,u),u.attr("fill-rule","evenodd"),e(u)(n.$parent),u.on("click",function(t){n.trackclick({$event:t,$track:l})}),n.$watchGroup(["radius","width","trackstyle","trackclass"],function(){l.draw()})}},controller:["$scope",function(e){var n,r,i,a=[],o=[],s=[];i=this,i.elementtype="plasmidtrack",i.init=function(t,e){n=e,n.addTrack(i),i.plasmid=n,r=t},i.draw=function(){var e=i.center,n=t.svg.path.donut(e.x,e.y,i.radius,i.width),u=i.trackclass,l=i.trackstyle;r.attr("d",n),u&&r.attr("class",u),l&&r.attr("style",l),angular.forEach(a,function(t){t.draw()}),angular.forEach(o,function(t){t.draw()}),angular.forEach(s,function(t){t.draw()})},i.addMarker=function(t){a.push(t)},i.addScale=function(t){o.push(t)},i.addLabel=function(t){s.push(t)},i.markergroup=function(t){var e=[];return angular.forEach(a,function(n){n.markergroup===t&&e.push(n)}),e},i.getPosition=function(e,r,a){a=Number(a||0),e=Number(e);var o,s,u=1,l=2,c=i.center,f=n.sequencelength;if(f>0){switch(s=e/f*360,r){case u:o=i.radius+a;break;case l:o=i.radius+i.width+a;break;default:o=i.radius+i.width/2+a}return t.util.polarToCartesian(c.x,c.y,o,s)}},Object.defineProperty(i,"center",{get:function(){return n.center}}),Object.defineProperty(i,"radius",{get:function(){return t.util.Numeric(e.radius,100)}}),Object.defineProperty(i,"width",{get:function(){return t.util.Numeric(e.width,25)}}),Object.defineProperty(i,"trackclass",{get:function(){return e.trackclass}}),Object.defineProperty(i,"trackstyle",{get:function(){return e.trackstyle}}),i.markers=a,i.scales=o,i.labels=s}]}}]).directive("trackscale",["SVGUtil","$compile",function(t,e){return{restrict:"AE",type:"svg",template:"",replace:!0,transclude:!0,require:["trackscale","^plasmidtrack"],scope:{interval:"@",vadjust:"@",ticksize:"@",direction:"@",showlabels:"@",labelvadjust:"@",labelclass:"@",labelstyle:"@",tickclass:"@",tickstyle:"@",scaleclick:"&"},link:{pre:function(t,e,n,r){var i=r[0],a=r[1],o=angular.element(e.children()[0]),s=angular.element(e.children()[1]);i.init(o,s,a)},post:function(n,r,i,a,o){var s,u,l;o(n.$parent,function(t){r.append(t)}),s=angular.element(r),u=angular.element(r.children()[0]),t.util.swapProperties(s,u),e(u)(n.$parent),u.on("click",function(t){n.scaleclick({$event:t,$scale:l})}),l=a[0],n.$watchGroup(["interval","vadjust","ticksize","labelvadjust","direction","showlabels","labelstyle","labelclass","tickstyle","tickclass"],function(){l.draw()})}},controller:["$scope",function(e){var n,r,i,a,o=15,s=3;r=this,r.elementtype="trackscale",r.init=function(t,e,o){n=o,n.addScale(r),r.track=n,i=t,a=e},r.draw=function(){var e=r.tickclass,o=r.tickstyle,s=n.center,u=t.svg.path.scale(s.x,s.y,r.radius,r.interval,r.total,r.ticksize);i.attr("d",u),e&&i.attr("class",e),o&&i.attr("style",o),r.showlabels?r.drawLabel():a.empty()},r.drawLabel=function(){function i(t){e.scaleclick({$event:t,$scale:r})}var o,s,u,l=n.center;for(u=t.svg.element.scalelabels(l.x,l.y,r.labelradius,r.interval,r.total),a.empty(),o=0;o<=u.length-1;o+=1)s=angular.element(t.svg.createNode("text")),r.labelclass&&s.attr("class",r.labelclass),r.labelstyle&&s.attr("style",r.labelstyle),s.attr("x",u[o].x),s.attr("y",u[o].y),s.attr("text-anchor","middle"),s.attr("alignment-baseline","middle"),s.text(u[o].text),s.on("click",i),a.append(s)},Object.defineProperty(r,"radius",{get:function(){return(r.inwardflg?n.radius:n.radius+n.width)+(r.inwardflg?-1:1)*r.vadjust+(r.inwardflg?-r.ticksize:0)}}),Object.defineProperty(r,"interval",{get:function(){return t.util.Numeric(e.interval)}}),Object.defineProperty(r,"vadjust",{get:function(){return t.util.Numeric(e.vadjust)}}),Object.defineProperty(r,"ticksize",{get:function(){return t.util.Numeric(e.ticksize,s)}}),Object.defineProperty(r,"inwardflg",{get:function(){return"in"===e.direction?!0:!1}}),Object.defineProperty(r,"total",{get:function(){return n.plasmid.sequencelength}}),Object.defineProperty(r,"showlabels",{get:function(){return"1"===e.showlabels?!0:!1}}),Object.defineProperty(r,"labelvadjust",{get:function(){return t.util.Numeric(e.labelvadjust,o)}}),Object.defineProperty(r,"tickclass",{get:function(){return e.tickclass}}),Object.defineProperty(r,"tickstyle",{get:function(){return e.tickstyle}}),Object.defineProperty(r,"labelclass",{get:function(){return e.labelclass}}),Object.defineProperty(r,"labelstyle",{get:function(){return e.labelstyle}}),Object.defineProperty(r,"labelradius",{get:function(){return r.radius+r.labelvadjust*(r.inwardflg?-1:1)}})}]}}]).directive("tracklabel",["SVGUtil",function(t){return{restrict:"AE",type:"svg",template:"",replace:!0,transclude:!0,require:["tracklabel","^plasmidtrack"],scope:{text:"@",hadjust:"@",vadjust:"@",labelclass:"@",labelstyle:"@",labelclick:"&"},link:{pre:function(t,e,n,r){var i=r[0],a=r[1],o=angular.element(e[0]);i.init(o,a)},post:function(t,e,n,r,i){var a;i(t.$parent,function(t){e.append(t)}),e.attr("text-anchor","middle"),e.attr("alignment-baseline","middle"),e.on("click",function(e){t.labelclick({$event:e,$label:a})}),a=r[0],t.$watchGroup(["text","vadjust","hadjust","labelstyle","labelclass"],function(){a.draw()})}},controller:["$scope",function(e){var n,r,i;r=this,r.elementtype="tracklabel",r.init=function(t,e){n=e,n.addLabel(r),r.track=n,i=t},r.draw=function(){var t=n.center,e=r.labelclass,a=r.labelstyle;i.attr("x",t.x+r.hadjust),i.attr("y",t.y+r.vadjust),i.text(r.text),e&&i.attr("class",e),a&&i.attr("style",a)},Object.defineProperty(r,"center",{get:function(){return n.center}}),Object.defineProperty(r,"text",{get:function(){return e.text}}),Object.defineProperty(r,"labelclass",{get:function(){return e.labelclass}}),Object.defineProperty(r,"labelstyle",{get:function(){return e.labelstyle}}),Object.defineProperty(r,"hadjust",{get:function(){return t.util.Numeric(e.hadjust,0)}}),Object.defineProperty(r,"vadjust",{get:function(){return t.util.Numeric(e.vadjust,0)}}),Object.defineProperty(r,"dimensions",{get:function(){return i[0].getBBox()}})}]}}]).directive("trackmarker",["SVGUtil","$compile",function(t,e){return{restrict:"AE",type:"svg",template:"",replace:!0,transclude:!0,require:["trackmarker","^plasmidtrack"],scope:{start:"@",end:"@",vadjust:"@",wadjust:"@",markergroup:"@",arrowstartlength:"@",arrowstartwidth:"@",arrowstartangle:"@",arrowendlength:"@",arrowendwidth:"@",arrowendangle:"@",markerclass:"@",markerstyle:"@",markerclick:"&"},link:{pre:function(t,e,n,r){var i=r[0],a=r[1],o=angular.element(e.children()[0]);i.init(o,a)},post:function(n,r,i,a,o){var s,u,l=a[0];o(n.$parent,function(t){r.append(t)}),s=angular.element(r),u=angular.element(r.children()[0]),t.util.swapProperties(s,u),e(u)(n.$parent),u.on("click",function(t){n.markerclick({$event:t,$marker:l})}),n.$watchGroup(["start","end","vadjust","wadjust","markergroup","markerclass","markerstyle","arrowstartlength","arrowstartwidth","arrowstartangle","arrowendlength","arrowendwidth","arrowendangle"],function(){l.draw()})}},controller:["$scope",function(e){var n,r,i,a=[];r=this,r.elementtype="trackmarker",r.init=function(t,e){n=e,n.addMarker(r),i=t,r.track=n},r.draw=function(){var t=r.markerclass,e=r.markerstyle;i.attr("d",r.getPath()),t&&i.attr("class",t),e&&i.attr("style",e),angular.forEach(a,function(t){t.draw()})},r.addMarkerLabel=function(t){a.push(t)},r.getPath=function(){var e=n.center,i=r.angle,a=r.radius;return t.svg.path.arc(e.x,e.y,a.inner,i.start,i.end,r.width,r.arrowstart,r.arrowend)},r.getPosition=function(e,i,a,o){var s,u,l,c,f,d="start",h="end",p="inner",$="outer";if(s=n.center,c=r.radius,f=r.angle,e=t.util.Numeric(e),i=t.util.Numeric(i),void 0!==o&&void 0!==a){switch(o){case p:u=c.inner+i;break;case $:u=c.outer+i;break;default:u=c.middle+i}switch(a){case d:l=f.start+e;break;case h:l=f.end+e;break;default:l=f.middle+e}return t.util.polarToCartesian(s.x,s.y,u,l)}return u={outer:c.outer+i,inner:c.inner+i,middle:c.middle+i},l={begin:f.start+e,end:f.end+e,middle:f.middle+e},{outer:{begin:t.util.polarToCartesian(s.x,s.y,u.outer,l.begin),middle:t.util.polarToCartesian(s.x,s.y,u.outer,l.middle),end:t.util.polarToCartesian(s.x,s.y,u.outer,l.end)},middle:{begin:t.util.polarToCartesian(s.x,s.y,u.middle,l.begin),middle:t.util.polarToCartesian(s.x,s.y,u.middle,l.middle),end:t.util.polarToCartesian(s.x,s.y,u.middle,l.end)},inner:{begin:t.util.polarToCartesian(s.x,s.y,u.inner,l.begin),middle:t.util.polarToCartesian(s.x,s.y,u.inner,l.middle),end:t.util.polarToCartesian(s.x,s.y,u.inner,l.end)}}},r.fireClick=function(t){e.markerclick({$event:t.$event,$marker:t.$marker})},Object.defineProperty(r,"center",{get:function(){return n.center}}),Object.defineProperty(r,"radius",{get:function(){return{inner:n.radius+r.vadjust,outer:n.radius+r.vadjust+r.width,middle:n.radius+r.vadjust+r.width/2}}}),Object.defineProperty(r,"angle",{get:function(){var i,a,o,s;return i=r.start/n.plasmid.sequencelength*360,s=e.end||e.start,a=t.util.Numeric(s)/n.plasmid.sequencelength*360,a+=i>a?360:0,o=i+(a-i)/2,{start:i,middle:o,end:a}}}),Object.defineProperty(r,"vadjust",{get:function(){return t.util.Numeric(e.vadjust)}}),Object.defineProperty(r,"wadjust",{get:function(){return t.util.Numeric(e.wadjust)}}),Object.defineProperty(r,"width",{get:function(){return n.width+r.wadjust}}),Object.defineProperty(r,"start",{get:function(){return t.util.Numeric(e.start)}}),Object.defineProperty(r,"end",{get:function(){return t.util.Numeric(e.end)}}),Object.defineProperty(r,"arrowstart",{get:function(){return{width:t.util.Numeric(e.arrowstartwidth),length:t.util.Numeric(e.arrowstartlength),angle:t.util.Numeric(e.arrowstartangle)}}}),Object.defineProperty(r,"arrowend",{get:function(){return{width:t.util.Numeric(e.arrowendwidth),length:t.util.Numeric(e.arrowendlength),angle:t.util.Numeric(e.arrowendangle)}}}),Object.defineProperty(r,"markergroup",{get:function(){return e.markergroup}}),Object.defineProperty(r,"markerclass",{get:function(){return e.markerclass}}),Object.defineProperty(r,"markerstyle",{get:function(){return e.markerstyle}}),Object.defineProperty(r,"sequence",{get:function(){var t=r.track.plasmid.sequence;return r.start>r.end?t.substring(r.start-1,t.length-1)+t.substring(0,r.end-1):t.substring(r.start-1,r.end-1)}}),r.labels=a}]}}]).directive("markerlabel",["SVGUtil","$compile",function(t,e){return{restrict:"AE",type:"svg",transclude:!0,template:'',require:["markerlabel","^trackmarker"],replace:!0,scope:{text:"@",valign:"@",vadjust:"@",halign:"@",hadjust:"@",type:"@",showline:"@",linestyle:"@",lineclass:"@",labelstyle:"@",labelclass:"@",linevadjust:"@",labelclick:"&"},link:{pre:function(t,e,n,r){var i=r[0],a=r[1],o=angular.element(e[0]),s=angular.element(e.children()[0]),u=angular.element(e.children()[1]),l=angular.element(e.children()[2]);i.init(l,o,u,s,a)},post:function(n,r,i,a,o){o(n.$parent,function(t){r.append(t)});var s=a[0],u=a[1],l=angular.element(r),c=angular.element(r.children()[2]);c.attr("text-anchor","middle"),c.attr("alignment-baseline","middle"),t.util.swapProperties(l,c),e(c)(n.$parent),i.labelclick?c.on("click",function(t){n.labelclick({$event:t,$label:s})}):c.on("click",function(t){u.fireClick({$event:t,$marker:u})}),n.$watchGroup(["text","type","valign","vadjust","halign","hadjust","showline","linevadjust","linestyle","labelclass","labelstyle"],function(){s.draw()})}},controller:["$scope","$compile",function(e,n){var r,i,a,o,s,u,l,c;i=this,i.elementtype="markerlabel",i.init=function(t,e,n,s,u){var f="TPATH"+(Math.random()+1).toString(36).substring(3,7);r=u,r.addMarkerLabel(i),i.marker=r,a=t,o=n,l=s,c=e,o.attr("id",f)},i.draw=function(){var t,c,f,d,h,p="middle",$="inner",m="outer",g="start",v="end",y=0,b=0,w=i.labelclass,x=i.labelstyle;if(w&&a.attr("class",w),x&&a.attr("style",x),"path"===i.type)switch(a.attr("x",""),a.attr("y",""),s||(u=document.createElementNS("http://www.w3.org/2000/svg","textPath"),u.setAttributeNS("http://www.w3.org/1999/xlink","href","#"+o.attr("id")),s=angular.element(u),n(s)(e),a.empty(),a.append(s)),u.textContent=i.text,y=window.getComputedStyle(a[0]).fontSize.replace("px",""),b=i.valign===m?0:i.valign===$?Number(y||0):Number(y||0)/2,o.attr("d",i.getPath(i.hadjust,i.vadjust-b,i.halign,i.valign)),i.halign){case g:a.attr("text-anchor","start"),s[0].setAttribute("startOffset","0%");break;case v:a.attr("text-anchor","end"),s[0].setAttribute("startOffset","100%");break;default:a.attr("text-anchor","middle"),s[0].setAttribute("startOffset","50%")}else s&&(s.remove(),s=null),t=r.getPosition(i.hadjust,i.vadjust,i.halign,i.valign),a.attr("x",t.x),a.attr("y",t.y),a.text(i.text);i.showlineflg?(c=r.getPosition(i.hadjust,i.vadjust+i.linevadjust,i.halign,i.valign),d=r.getPosition(),h=i.valign===$?d.inner:i.valign===p?d.middle:d.outer,f=i.halign===g?h.begin:i.halign===v?h.end:h.middle,l.attr("d",["M",c.x,c.y,"L",f.x,f.y].join(" ")),i.linestyle||i.lineclass||l.attr("style","stroke:#000"),i.linestyle&&l.attr("style",i.linestyle),i.lineclass&&l.attr("class",i.lineclass)):l.removeAttr("d")},i.getPath=function(e,n,i,a){var o,s,u,l,c,f="inner",d="outer",h="start",p="end",$=r.center;switch(s=r.radius,a){case f:o=s.inner;break;case d:o=s.outer;break;default:o=s.middle}switch(u=r.angle,i){case h:l=u.start,c=u.start+359.99;break;case p:l=u.end+1,c=u.end;break;default:l=u.middle+180.05,c=u.middle+179.95}return t.svg.path.arc($.x,$.y,o+Number(n||0),l+Number(e||0),c+Number(e||0),1)},Object.defineProperty(i,"showlineflg",{get:function(){return"1"===e.showline?!0:!1}}),Object.defineProperty(i,"halign",{get:function(){return e.halign||"middle"}}),Object.defineProperty(i,"valign",{get:function(){return e.valign||"middle"}}),Object.defineProperty(i,"hadjust",{get:function(){return t.util.Numeric(e.hadjust)}}),Object.defineProperty(i,"vadjust",{get:function(){return t.util.Numeric(e.vadjust)}}),Object.defineProperty(i,"type",{get:function(){return e.type}}),Object.defineProperty(i,"linevadjust",{get:function(){return t.util.Numeric(e.linevadjust)}}),Object.defineProperty(i,"labelclass",{get:function(){return e.labelclass}}),Object.defineProperty(i,"labelstyle",{get:function(){return e.labelstyle}}),Object.defineProperty(i,"linestyle",{get:function(){return e.linestyle}}),Object.defineProperty(i,"lineclass",{get:function(){return e.lineclass}}),Object.defineProperty(i,"text",{get:function(){return e.text}})}]}}]).directive("svgelement",["SVGUtil",function(){return{restrict:"AE",template:function(t,e){return"<"+e.type+">"},type:"svg",replace:!0,transclude:!0,require:["^plasmid"],scope:{},link:function(t,e,n,r,i){i(t.$parent,function(t){e.append(t)})}}}])}(),function(){"use strict";angular.element(document).ready(function(){angular.bootstrap(document,["app"])})}();

Lac Operon Repressor

Codes for the production of the repressor protein that binds to the Lac Operator to prevent expression until induction of the media with IPTG. We have designed pUS270 to have the LacI under the pVeg promoter for strong constitutive expression in Bacillus.

pIP501 Rep

This gene codes for the Replicator protein that pairs with the Bacillus OriV and is essential to promote the independent replication of pUS270 in Bacillus.

E. coli OriV

Taken from pSB1C3, having this origin of replication will make it easier to construct the plasmid using E. coli as well as improve cloning efficiency downstream. Chosen because of the high copy number of pSB1C3.

Multiple Cloning Site

The multiple cloning site of pUS258 and other expression plasmids that we considered using either had too few restriction sites or sites that were incompatible for the efficient cloning with the BB Prefix and Suffix. So we have designed two highly diverse MCS’ that have 27 unique sites amongst them on either side of SF AmylCP-6 to promote simple cloning of parts from the Bio Brick Registry.

Antibiotic Resistance

Codes for Neomycin Phosphotransferase II that gives transformants resistance to both Neomycin and Kanamycin. Allows selective screening of transformants

Antibiotic Resistance

This region allows independent replication of the vector within Bacillus at a high copy number to provide more copies of the recombinant gene to maximise expression.

Lac Operator

Consists of the target sequence for the lac repressor protein to contribute to the IPTG induction system.

SuperFold AmilCP-6

SuperFold AmilCP-6 is a variant of amilCP which was used by the 2016 Sydney IGEM team and originally submitted to the registry by Team Uppsala Sweden in 2011. This variant has undergone site directed mutagenesis to increase the folding rate of the chromoprotein and enhance the blue colour. We are taking advantage of this protein to enable blue-white screening without the need for adding X-gal to the plates. Cloning with the two multiple cloning sites that flank SF AmilCP-6 essentially swaps it with the insert to leave the recombinant bacteria white rather than blue.


        <trackmarker markerclass="markerhover" style="fill:rgba(0,0,128,.4)" start="482" end="567" wadjust="8" vadjust="-4" markerclick="markerClick($event, $marker)">
           <markerlabel labelclass="markerlabel" text="LEUII" style="fill:#fff;font-weight:700" ></markerlabel>
       </trackmarker>