function DropDownList(n,t){function c(){return r}function l(n){r=n;f.text(n)}function a(){(new TimelineLite).to(e,1,{autoAlpha:1,ease:Expo.easeOut}).to(s,.6,{scaleY:1,ease:Expo.easeOut},0)}function v(){(new TimelineLite).to(e,1,{autoAlpha:0,ease:Expo.easeOut}).to(s,.6,{scaleY:0,ease:Expo.easeOut},0)}function o(n,t,i,r){(new TimelineLite).to(n,t,{color:i,backgroundColor:r,ease:Power4.easeOut})}function h(){i==u&&(o($(u).find(".listVal"),.5,"rgb(20,40,200)","rgb(235,235,235)"),v(),u=null)}var i,u,e,f,s,r,y=function(){if(i=$(n),!i.length)return console.log("InitDropDownList: can't init list for "+n),1;if(f=i.find(".listVal"),!f.length)return console.log("InitDropDownList: can't init list for "+n),2;if(s=i.find(".listItemsWrap"),!s.length)return console.log("InitDropDownList: can't init list for "+n),3;if(e=i.find(".listItem"),!e.length)return console.log("InitDropDownList: can't init list for "+n),4;r=f.text();i.on({click:function(){i!=u&&(o($(this).find(".listVal"),.5,"rgb(255,255,255)","rgba(20,40,200,1)"),a(),setTimeout(function(){u=i},0))}});f.on({mouseenter:function(){i!=u&&o(this,.7,"rgb(255,255,255)","rgba(20,40,200,1)")},mouseleave:function(){i!=u&&o(this,.7,"rgb(20,40,200)","rgb(235,235,235)")}});e.on({mouseenter:function(){o(this,.7,"rgb(255,255,255)","rgba(20,40,200,1)")},mouseleave:function(){o(this,1,"rgb(100,100,100)","rgba(20,40,200,0)")},click:function(){var i=$(this),n;r=i.attr("selectvalue");r=r===undefined?i.text():r;f.text(r);t!==undefined&&(n=i.attr("callbackvalue"),n===undefined&&(n=r),t(n))}});$("body").on({click:h});return 0},p=function(){i.length&&(i.off("click"),$("body").off("click",h),e.off("click"),f.off("click"))};return{InitDropDownList:y,GetValue:c,SetValue:l,DestroyDropDownList:p}}function SelectList(n,t){function s(){return i}function o(n,t,i){var r=$(n),f=r.find(".selectTitle"),u=r.find(".selectInfo"),e=r.find(".selectBg");(new TimelineLite).to(f,.5,{color:t,ease:Expo.easeOut}).to(e,.5,{autoAlpha:i,ease:Expo.easeOut},0);u.length&&TweenLite.to(u,.5,{color:t,ease:Expo.easeOut})}function e(n,t,i){var r=$(n),f=r.find(".selectTitle"),u=r.find(".selectInfo"),e=r.find(".selectBg");(new TimelineLite).set(f,{color:t}).set(e,{autoAlpha:i});u.length&&TweenLite.set(u,{color:t})}function f(n,t,i){var r=$(n),f=r.find(".selectTitle"),u=r.find(".selectInfo");(new TimelineLite).to(n,.5,{backgroundColor:i,ease:Expo.easeOut}).to(f,.5,{color:t,ease:Expo.easeOut},0);u.length&&TweenLite.to(u,.5,{color:t,ease:Expo.easeOut})}function h(){if(u=$(n).find(".select"),!u.length)return 1;r=$(n).find('.select[state="selected"]');u.each(function(){var n=$(this);n.attr("state")=="selected"&&(i=n.attr("selectvalue"),i=i===undefined?$this.find(".selectTitle").text():i,e(n,"rgb(255,255,255)",1))});u.on({mouseenter:function(){$(this).attr("state")!="selected"&&f(this,"rgb(20,40,200)","rgba(255,255,255,1)")},mouseleave:function(){$(this).attr("state")!="selected"&&f(this,"rgb(100,100,100)","rgba(255,255,255,0)")},click:function(){var n=$(this);n.attr("state")!="selected"&&(o(r,"rgb(100,100,100)",0),f(r,"rgb(100,100,100)","rgba(255,255,255,0)"),r.attr("state",""),n.attr("state","selected"),o(this,"rgb(255,255,255)",1),i=n.attr("selectvalue"),i=i===undefined?n.find(".selectTitle").text():i,t!==undefined&&t(i),r=n)}});return 0}function c(n){n!==i&&(e(r,"rgb(100,100,100)",0),f(r,"rgb(100,100,100)","rgba(255,255,255,0)"),r.attr("state",""),u.each(function(){var t=$(this),u=t.attr("selectvalue");u=u===undefined?$this.find(".selectTitle").text():u;u===n&&(t.attr("state","selected"),e(t,"rgb(255,255,255)",1),i=n,r=t)}))}function l(){u.length&&u.off("mouseenter mouseleave click")}var u,i,r;return{InitSelectList:h,GetValue:s,SetValue:c,DestroySelectList:l}}function SelectIconList(n,t){function h(){return u}function e(n,t,i,r,u){var f=$(n),e=f.find(".selectBg"),o=f.find(".iconGray"),s=f.find(".iconBlue"),h=f.find(".iconWhite");(new TimelineLite).to(e,.6,{autoAlpha:t,ease:Expo.easeOut}).to(o,.6,{autoAlpha:i,ease:Expo.easeOut},0).to(s,.6,{autoAlpha:r,ease:Expo.easeOut},0).to(h,.6,{autoAlpha:u,ease:Expo.easeOut},0)}function o(n,t,i,r){var u=$(n),f=u.find(".iconGray"),e=u.find(".iconBlue");(new TimelineLite).to(n,.5,{backgroundColor:r,ease:Expo.easeOut}).to(f,.7,{autoAlpha:t,ease:Power4.easeOut},0).to(e,.7,{autoAlpha:i,ease:Power4.easeOut},0)}function s(n){n.attr("state")!=="selected"&&(e(r,0,1,0,0),o(r,1,0,"rgba(255,255,255,0)"),r.attr("state",""),n.attr("state","selected"),e(n,1,0,0,1),u=n.attr("selectvalue"),t!==undefined&&t(u),r=n)}function c(){var t=$(n);if(i=t.find(".selectIcon"),r=t.find('.selectIcon[state="selected"]'),u=r.attr("selectvalue"),i.each(function(){var n=$(this);n.attr("state")=="selected"&&e(n,1,0,0,1);f[n.attr("selectvalue")]=n}),i.length)i.on({mouseenter:function(){$(this).attr("state")!="selected"&&o(this,0,1,"rgba(255,255,255,1)")},mouseleave:function(){$(this).attr("state")!="selected"&&o(this,1,0,"rgba(255,255,255,0)")},click:function(){s($(this))}})}function l(n){var t=f[n];typeof t!="undefined"&&s(t)}function a(n){var t=f[n];typeof t!="undefined"&&TweenLite.set(t,{display:"none"})}function v(n){var t=f[n];typeof t!="undefined"&&TweenLite.set(t,{display:"block"})}function y(){i.length&&i.off("mouseenter mouseleave click")}var i,u,r,f={};return{InitSelectList:c,GetValue:h,SetValue:l,HideItem:a,ShowItem:v,DestroySelectList:y}}function SliderBar(n,t,i){function a(){h=n.width()-r.width();u=h/(t-1);v(f)}function b(){return f}function o(n){return n!=f&&n>=0&&n<t?(f=n,i!==undefined&&i(n),!0):!1}function v(t){o(t);var i=t*u,f=(i+r.width()/2)/n.width()*100+"%";TweenLite.set(r,{x:i});TweenLite.set(e,{width:f})}function y(t){if(o(t)){var i=t*u,f=(i+r.width()/2)/n.width()*100+"%";TweenLite.to(r,l,{x:i});TweenLite.to(e,l,{width:f})}}function k(t){if(o(t)){var i=t*u,f=(i+r.width()/2)/n.width()*100+"%";TweenLite.set(r,{x:i});TweenLite.set(e,{width:f})}}function p(n){if(!s&&!r.is(n.target)){var t=n.pageX-$(this).offset().left,i=Math.max(Math.floor((t+u/2)/u),0);y(i)}}function w(){var n,i;s=!0;n=(this.x-this.minX)/(this.maxX-this.minX);TweenLite.set(e,{width:n*100+"%"});i=Math.round(n*(t-1));o(i)}function d(){$(window).off("resize",a);n.off("click",p);for(var t=0;c.length;++t)c[0].kill()}var c;if(!n.length)return undefined;var f,l=.5,s=!1,r=n.find(".sliderHandle"),e=n.find(".sliderBg"),h=n.width()-r.width(),u=h/(t-1);$(window).on("resize",a);v(0);n.on("click",p);return c=Draggable.create(r,{type:"x",zIndexBoost:!1,edgeResistance:1,bounds:n,throwProps:!0,velocity:.7,cursor:"pointer",onDrag:w,onThrowUpdate:w,onThrowComplete:function(){s=!1},snap:{x:function(n){return this.minX+Math.round((n-this.minX)/u)*u}}}),{GetIndex:b,SetIndex:y,InstantSetIndex:k,Destroy:d}}function Checkbox(n,t,i){function c(n,t){u=n;o=t}function s(n){(new TimelineLite).to(r,.4,{backgroundColor:n,ease:Expo.easeOut})}function h(n){n!==i&&f(i)}function f(n){n?new TimelineMax({onComplete:h,onCompleteParams:[n]}).staggerFromTo(e,.4,{drawSVG:"0%",autoAlpha:0},{drawSVG:"100%",autoAlpha:1,ease:Expo.easeOut},.12):new TimelineLite({onComplete:h,onCompleteParams:[n]}).staggerTo(e,.4,{drawSVG:"100% 100%",ease:Expo.easeOut},.12)}function l(n){i=n;f(i)}function a(){i&&u||(i=!i,f(i),typeof t!="undefined"&&(u?t(o):t(i)))}function v(){r.length&&r.off("mouseenter mouseleave click")}var r=$(n),e,u,o;if(r){typeof i=="undefined"&&(i=!1);e=r.find("line");u=!1;i&&f(i);r.on({mouseenter:function(){s("rgba(255,255,255,1)")},mouseleave:function(){s("rgba(255,255,255,0)")},click:function(){a()}});return{SetRadioGroupMode:c,GetRadioIndex:function(){return o},SetState:l,IsChecked:function(){return i},DestroyCheckbox:v}}}function RadioGroup(n){function r(r){typeof t!="undefined"&&t.SetState(!1);t=i[r];n(r)}function u(n,u,f){var e=Checkbox(n,r,f);e.SetRadioGroupMode(!0,u);f===!0&&(t=e);i[u]=e}function f(n){t=i[n];t.SetState(!0)}function e(){for(var n in i)i[n].DestroyCheckbox()}var i={},t;return{AddCheckbox:u,SetSelectedIndex:f,DestroyRadioGroup:e}}function Button(n){function r(){n.off("mouseenter mouseleave click")}if(n.length){var t=n.find(".btnBg"),i=!0;n.on({mouseenter:function(){(new TimelineLite).to(t,.6,{scaleX:1,ease:Expo.easeOut},0)},mouseleave:function(){(new TimelineLite).to(t,.6,{scaleX:0,ease:Expo.easeOut},0)},click:function(){(new TimelineLite).to(n,.1,{scale:.96,ease:Expo.easeOut}).to(n,.1,{scale:1,ease:Expo.easeOut})}});return{Destroy:r}}}function PhoneConfirmClass(){function y(h){t=h;s=t.find(".status");d=t.attr("phoneconfirmed")==="true";f=t.find(".phoneNumberInput");e=t.find(".phoneConfirmRow");n=t.find(".confirmCodeInfo");c=t.find(".phoneCodeInput");i=t.find(".btnPhoneVerification");r=t.find(".phoneConfirmWrapper");o=t.find(".btnPhoneVerificationCode");u=$("#VerifyPhoneForm");l=u.find("#PhoneNumber");a=u.find("#Code");i.on({click:nt});o.on({click:w});f.on({input:tt})}function g(n){typeof t=="undefined"&&y(n)}function nt(t){t.preventDefault();BigdReachGoalYaCounter("ym-phone-confirm-start");(new TimelineLite).set(e,{display:"block"}).to(e,h,{height:b,ease:"Expo1"}).set(e,{height:"auto"});var u=f.val();if(u.length===0){n.html(BIGD.PHONE_NUMBER_IS_EMPTY_STRING);return}i.off("click");TweenLite.set(i,{display:"none"});n.html(BIGD.VERIFICATION_CODE_SENDING_STRING);$.ajax({dataType:"json",url:BIGD.SENDPHONEVERIFICATION_URL,data:{phoneNumber:u},timeout:BIGD.AJAX_TIMEOUT}).done(function(t){t.result=="success"?(n.html(BIGD.PHONECALL_PROCESSING_STRING),l.val(u),(new TimelineLite).set(r,{display:"block"}).to(r,h,{height:k,ease:"Expo1"}).set(r,{height:"auto"}),setTimeout(p,v)):t.result=="maxcallsmade"?n.html(BIGD.PHONECALLS_EXCEEDED_STRING):n.html(BIGD.FAILED_PHONEVERIFICATION_STRING)}).fail(function(){n.html(BIGD.FAILED_PHONEVERIFICATION_STRING)})}function p(){$.ajax({type:"POST",url:BIGD.PHONECALL_STATUS_URL,timeout:BIGD.AJAX_TIMEOUT}).done(function(t){t.status==="success"?n.html(BIGD.PHONECALL_SUCCEDED):t.status==="failed"?n.html(BIGD.PHONECALL_FAILD):t.status==="processing"&&setTimeout(p,v)}).fail(function(){n.html(BIGD.PHONECALL_FAILD)})}function w(t){t.preventDefault();var i=c.val();if(i.length===0){n.html(BIGD.PHONE_CODE_IS_EMPTY_STRING);return}a.val(i);n.html(BIGD.VERIFICATION_CODE_CHECKING_STRING);o.off("click");$.ajax({method:"POST",url:u.attr("action"),data:u.serialize(),timeout:BIGD.AJAX_TIMEOUT}).done(function(t){t.result=="success"?(n.html(BIGD.PHONEVERIFED_STRING),(new TimelineLite).to(r,h,{height:0,ease:"Expo1"}).set(r,{display:"none"}),s.text(BIGD.PHONE_CONFIRMED_STRING),BigdReachGoalYaCounter("ym-phone-confirm-success")):n.html(BIGD.PHONEVERIFICATION_UNSUCCESSFULL_STRING)}).fail(function(){n.html(BIGD.PHONEVERIFICATION_UNSUCCESSFULL_STRING)}).always(function(){o.on({click:w})})}function tt(){s.text(BIGD.PHONE_NOTCONFIRMED_STRING);TweenLite.set(i,{display:"block"});f.off("input")}function it(){i.off("click")}var t,s,f,n,c,e,i,r,o,u,l,a,h=.5,b=140,k=40,d,v=5e3;return{Init:y,EnsureInit:g,Destroy:it}}function OneLineLoader(n){var t=OneLineLoaderClass();return t.Init(n),t}function OneLineLoaderClass(){function u(n){t=n;i=t.find(".oneLineLoaderDigits");r=t.find(".oneLineLoaderStatus")}function f(){TweenLite.set(t,{display:"block"});n=new TimelineMax({repeat:-1});n.to(i,4,{scrambleText:{text:"101",chars:"10",revealDelay:4,tweenLength:!0,speed:.4,ease:Linear.easeNone}},0)}function e(){TweenLite.set(t,{display:"none"});n.kill();n=null}function o(n){r.text(n)}function s(){n&&n.pause()}function h(){n&&n.play()}function c(){n&&(n.kill(),n=null)}var t,i,r,n;return{Init:u,ShowLoader:f,HideLoader:e,SetStatusText:o,Pause:s,Play:h,Destroy:c}}function BigdButton(n){var t=BigdButtonClass();return t.Init(n),t}function BigdButtonClass(){function o(t){n=t;u=n.hasClass("bigd-button-dark");e=n.find(".bigd-button-label");i=n.find(".bigd-button-background");n.on({mouseenter:s,mouseleave:h,click:c})}function s(){t&&(f=!0,(new TimelineLite).to(i,.6,{scaleX:1,ease:Expo.easeOut},0))}function h(){f&&(new TimelineLite).to(i,.6,{scaleX:0,ease:Expo.easeOut},0)}function c(i){t&&(i.preventDefault(),(new TimelineLite).to(n,.1,{scale:.96,ease:Expo.easeOut}).to(n,.1,{scale:1,ease:Expo.easeOut}),r&&r())}function l(n){r=n}function a(){t||(u?n.addClass("bigd-button-dark"):n.addClass("bigd-button"),n.removeClass("bigd-disabled-button"),t=!0)}function v(){t&&(n.addClass("bigd-disabled-button"),u?n.removeClass("bigd-button-dark"):n.removeClass("bigd-button"),t=!1)}function y(){n.off("mouseenter mouseleave click")}var n,e,i,t=!0,r,f=!1,u=!1;return{Init:o,Enable:a,Disable:v,SetOnClickEventListener:l,Destroy:y}}function Graph(n,t,i,r){if(!n.length)return undefined;var u=GraphClass();return u.Init(n,t,i,r),u}function GraphClass(){function f(u,f,e,o){i=f;t=e;n=AmCharts.makeChart(u[0],{type:"serial",theme:"light",path:"/Content/js/amchart/",pathToImages:"Content/img/amcharts/",chartScrollbar:{autoGridCount:!0,graph:"g0",scrollbarHeight:40},valueAxes:[{axisAlpha:.2,dashLength:1,position:"left",title:o,minimum:-.1}],legend:{useGraphSettings:!1},mouseWheelZoomEnabled:!1,chartCursor:{categoryBalloonDateFormat:"JJ:NN, DD MMMM"},categoryField:i,categoryAxis:{parseDates:!0,axisColor:"#DADADA",minPeriod:"mm"},"export":{enabled:!0}});n.addListener("dataUpdated",r);r()}function r(){n.dataProvider!==undefined&&n.zoomToIndexes(0,n.dataProvider.length-1)}function e(r){function e(n){return function(t,i){return t[n]<i[n]?-1:t[n]>i[n]?1:0}}r.sort(e(i));n.dataProvider=r;n.graphs=[];for(var f=0;f<t.length;++f)n.graphs.push({id:"g"+f,hidden:!1,lineColor:u[f%u.length],balloonText:"[[value]]",type:"step",title:t[f].title,valueField:t[f].value,balloon:{drop:!0}});n.legend.enabled=t.length>1?!0:!1;n.validateData()}function o(){n.removeListener("dataUpdated",r);n.clear();n=null}var u=["#FF0000","#0000FF","#00FF00","#00FFFF","#FF00FF","#FFFF00"],n,i,t;return{Init:f,SetData:e,Destroy:o}}function Panels(){function i(n,i,r){function s(){var r=!u;t();r&&(e(n,i),u=!0)}function h(){u&&(e(n,r),u=!1)}function e(n,t){var i=n.find(".content");(new TimelineLite).to(n,1.1,t.panel,0).to(i,1.1,t.content,.2)}function l(){f.off("click")}function a(){return u}var o=n.find("#confirmButton"),f=n.find("#cancelButton"),u=!1,c=Object.assign(r.panel,i.content);(new TimelineLite).set(n,c);f.on("click",t);return{panel:n,confirmButton:o,cancelButton:f,IsOpen:a,Open:s,Close:h,Destroy:l}}function r(t,r,u){var f=i(t,r,u);return n.push(f),f}function t(){for(var t in n)n[t].Close()}function u(){for(var t in n)n[t].Destroy();n=[]}var n=[];return{AddPanel:r,Destroy:u,CloseAll:t}}function MyServersLoader(n){function h(){i||(i=!0,(new TimelineLite).set(n,{autoAlpha:1,display:"block"}).set(t,{drawSVG:"0%",strokeOpacity:1}),r=new TimelineMax({repeat:-1}).to(o,4,{scrambleText:{text:"101",chars:"10",revealDelay:4,tweenLength:!0,speed:.4,ease:Linear.easeNone}},0),u=new TimelineMax({repeat:-1}).to(t,2,{drawSVG:"100%",ease:Linear.easeNone}).to(t,2,{drawSVG:"100% 100%",ease:Linear.easeNone}).set(t,{drawSVG:"0%",ease:Linear.easeNone}))}function f(){i&&(i=!1,(new TimelineLite).to(n,1,{autoAlpha:0,ease:Power4.easeOut}).to(e,1,{yPercent:100,ease:Power4.easeOut}),r.stop(),r.kill(),u.kill())}function c(n){s.text(n)}function l(){f()}var e=n.find(".loader"),a=n.find("svg"),t=n.find(".loaderSquare"),o=n.find(".loaderDigits"),s=n.find(".loaderText"),v=n.find(".loaderBar"),i=!1,r,u;return{ShowLoader:h,HideLoader:f,SetLoaderText:c,Destroy:l}}function ControlIcon(n){var t=ControlIconClass();return t.Init(n),t}function ControlIconClass(){function l(l){n=l;t=n.find("img");e=n.find(".iconGray");o=n.find(".iconBlue");u=!1;i=n.find(".tooltip");r=i.find(".tooltipWrap");n.on({mouseenter:function(){s(0,1,1.1)},mouseleave:function(){s(1,0,1)},mousedown:function(){h(t,.95)},mouseup:function(){h(t,1.1)},click:function(){f&&f()}});if(i.length)i.on({mouseenter:function(){a()},mouseleave:function(){c()},click:function(){c()}})}function s(n,i,r){(new TimelineLite).to(t,.01,{willChange:"transform"},0).to(e,.6,{autoAlpha:n,ease:Expo.easeOut},0).to(o,.6,{autoAlpha:i,ease:Expo.easeOut},0).to(t,.6,{scale:r,ease:Expo.easeOut},0).to(t,.01,{willChange:"auto"})}function h(n,t){(new TimelineLite).to(n,.15,{scale:t,ease:Expo.easeOut})}function a(){(new TimelineLite).set(r,{display:"block"}).to(r,.5,{x:0,autoAlpha:1,ease:Expo.easeInOut})}function c(){(new TimelineLite).to(r,.5,{x:10,autoAlpha:0,ease:Expo.easeInOut})}function v(t){u!==t&&(t?(new TimelineLite).set(n,{display:"block"}):(new TimelineLite).set(n,{display:"none"}),u=t)}function y(n){f=n}function p(){n.off("mouseenter mouseleave mousedown mouseup click");i.off("mouseenter mouseleave click")}var n,t,e,o,u,i,r,f;return{Init:l,SetVisibility:v,SetOnClickListener:y,Destroy:p}}function LeftIconPanel(n,t,i){var r=LeftIconPanelClass();return r.Init(n,t,i),r}function LeftIconPanelClass(){function v(r,u,e){i=ControlIcon(r);f=ControlIcon(e);n=u;h=n.find(".content");t=new TimelineLite;t.set(n,{xPercent:-100});f.SetVisibility(!0);i.SetOnClickListener(k);f.SetOnClickListener(l)}function y(){return s}function p(n){s=n}function w(n){c=n}function b(){return r===e}function k(){r===e?l():r===o&&a()}function l(){t.clear();t.to(n,u,{xPercent:-100,ease:Expo.easeInOut}).to(h,u,{autoAlpha:0,ease:Expo.easeInOut},.2).set(n,{display:"none"});r=o}function a(){typeof c!="undefined"&&c(s);t.clear();t.set(n,{display:"block"}).to(n,u,{xPercent:0,autoAlpha:1,ease:Expo.easeInOut}).to(h,u,{autoAlpha:1,ease:Expo.easeInOut},.2);r=e}function d(){i.SetVisibility(!0)}function g(){i.SetVisibility(!1)}function nt(){i.Destroy();f.Destroy();t.clear()}var u=1.1,e=0,o=1,s,i,f,n,h,t,c,r=o;return{Init:v,GetPanelId:y,SetPanelId:p,SetOnPanelOpenCallback:w,IsPanelOpened:b,ShowBigIcon:d,HideBigIcon:g,OpenPanel:a,ClosePanel:l,Destroy:nt}}function ServerPanel(n,t){var i=ServerPanelClass();return i.Init(n,t),i}function ServerPanelClass(){function tt(u,f){n=u;r=f;c=n.find(".content");e=ControlIcon(n.find(".panelCloseIconWrap").find(".serverControlIcon"));r===p?i=v:r===w?i=d:r===b?i=g:r===k&&(i=nt);t=new TimelineLite;t.set(n,i.INIT_PANEL);e.SetVisibility(!0);e.SetOnClickListener(a)}function it(){return h}function rt(n){h=n}function ut(n){l=n}function ft(){return u===o}function et(){u===o?a():u===s&&y()}function a(){t.clear();t.to(n,f,i.CLOSE_PANEL).to(c,f,{autoAlpha:0,ease:Expo.easeInOut},.2).set(n,{display:"none"});u=s}function y(){typeof l!="undefined"&&l(h);t.clear();t.set(n,{display:"block"}).to(n,f,i.OPEN_PANEL).to(c,f,{autoAlpha:1,ease:Expo.easeInOut},.2);u=o}function ot(){bigIcon.SetVisibility(!0)}function st(){bigIcon.SetVisibility(!1)}function ht(){e.Destroy();t.clear()}var f=1.1,o=0,s=1,p=1,w=2,b=3,k=4,v={INIT_PANEL:{xPercent:-100},OPEN_PANEL:{xPercent:0,autoAlpha:1,ease:Expo.easeInOut},CLOSE_PANEL:{xPercent:-100,ease:Expo.easeInOut}},d={INIT_PANEL:{yPercent:-100},OPEN_PANEL:{yPercent:0,autoAlpha:1,ease:Expo.easeInOut},CLOSE_PANEL:{yPercent:-100,ease:Expo.easeInOut}},g={INIT_PANEL:{xPercent:100},OPEN_PANEL:{xPercent:0,autoAlpha:1,ease:Expo.easeInOut},CLOSE_PANEL:{xPercent:100,ease:Expo.easeInOut}},nt={INIT_PANEL:{yPercent:100},OPEN_PANEL:{yPercent:0,autoAlpha:1,ease:Expo.easeInOut},CLOSE_PANEL:{yPercent:100,ease:Expo.easeInOut}},r,h,e,n,c,t,l,i=v,u=s;return{Init:tt,OpenOrClose:et,GetPanelId:it,SetPanelId:rt,SetOnPanelOpenCallback:ut,IsPanelOpened:ft,ShowBigIcon:ot,HideBigIcon:st,OpenPanel:y,ClosePanel:a,Destroy:ht}}function PanelsManager(){var n=PanelsManagerClass();return n.Init(),n}function PanelsManagerClass(){function i(){}function r(t){for(var i=0;i<n.length;++i)n[i].IsPanelOpened()&&n[i].GetPanelId()!=t&&n[i].ClosePanel()}function u(i){i.SetPanelId(t);++t;i.SetOnPanelOpenCallback(r);n.push(i)}function f(){t=0;n=[]}var t=0,n=[];return{Init:i,RegisterPanel:u,Destroy:f}}function ServerState(n){var t=ServerStateClass();return t.Init(n),t}function ServerStateClass(){function h(n){u=n}function e(){n===f&&(n=i);$.ajax({method:"POST",url:BIGD.MYSERVERS_GETSTATE_AJAX_URL,data:{id:u},timeout:o}).done(function(n){for(var i=0;i<t.length;++i)t[i](n)}).fail(function(){for(var i={result:"failed"},n=0;n<t.length;++n)t[n](i)}).always(function(){n===i&&(n=r)})}function c(){n===r?(n=i,e()):n===i&&(n=f,setTimeout(e,s))}function l(n){t.push(n)}function a(){return u}function v(){t=[]}var o=1e4,s=1e3,r=1,i=2,f=3,u,t=[],n=r;return{Init:h,GetServerId:a,GetStateAjax:c,AddStateAjaxCallback:l,Destroy:v}}function ProlongServer(n){var t=ProlongServerClass();return t.Init(n),t}function ProlongServerClass(){function s(s){r=ServerPanel(s,4);u=SelectIconList(s.find(".payMethodsWrap"),l);n=BigdButton(s.find(".prolong-confirm-button"));t=s.find(".ProlongServerForm");i=s.find(".prolongConsole");f=t.find(".PaymentMethod");e=t.find(".prolongFormCost");o=s.find(".prolongCostSpan");u.InitSelectList();n.SetOnClickEventListener(v)}function h(){return r}function c(){r.OpenPanel()}function l(n){f.val(n)}function a(n){o.text(n);e.val(n)}function v(){n.Disable();i.empty();$.ajax({method:"POST",url:t.attr("action"),data:t.serialize(),timeout:BIGD.AJAX_TIMEOUT}).done(function(n){var t=n.result,r;t==="paymentformgenerated"?(r=$(n.paymentFormHtml),$("body").append(r),r.submit()):t==="success"?i.text(n.message):t=="payredirecturl"?window.location.href=n.redirectUrl:(t==="notenoughbalance"||t==="failed")&&i.text(n.message)}).fail(function(){i.text(BIGD.AJAX_FAILED_STRING)}).always(function(){n.Enable()})}function y(){r.Destroy();u.DestroySelectList();n.Destroy()}var r,u,n,t,f,i,e,o;return{Init:s,GetServerPanel:h,SetServerCost:a,OpenPanel:c,Destroy:y}}function TurnOffServer(n,t,i){var r=TurnOffServerClass();return r.Init(n,t,i),r}function TurnOffServerClass(){function w(u,o,h){f=o;e=LeftIconPanel(u,o,f.find(".serverControlIcon"));t=BigdButton(f.find(".turn-on-button"));i=BigdButton(f.find(".turn-off-button"));t.Disable();i.Disable();r=h;r.AddStateAjaxCallback(k);var c=f.find(".content");n=c.find(".serverStateLabel");s=c.find(".updateStateHref");t.SetOnClickEventListener(g);i.SetOnClickEventListener(nt);s.on({click:d})}function b(){return e}function k(f){if(f.result==="failed"){n.text(BIGD.UNKNOWN_STRING);u=o;t.Disable();i.Disable();return}if(f.dbState!=="On"){n.text(BIGD.NOTAVAILABLE_STRING);u=o;t.Disable();i.Disable();return}var e=!1;if(f.vmState==="Running"?u!==l?(n.text(BIGD.RUNNING_STRING),u=y,t.Disable(),i.Enable()):e=!0:f.vmState==="Off"?u!==c?(n.text(BIGD.OFF_STRING),u=p,t.Enable(),i.Disable()):e=!0:f.vmState==="HostServerOffline"&&n.text(BIGD.UNKNOWN_STRING),e){if(a>v){n.text(BIGD.UNKNOWN_STRING);u=o;t.Disable();i.Disable();return}++a;r.GetStateAjax()}}function d(t){t.preventDefault();n.text(BIGD.REFRESHING_STRING);r.GetStateAjax()}function g(){t.Disable();n.text(BIGD.TURNING_ON_STRING);$.ajax({method:"POST",url:BIGD.MYSERVERS_SETSTATE_AJAX_URL,data:{id:r.GetServerId(),state:"Running"},timeout:h}).done(function(t){t.result==="Success"?u=c:n.text(BIGD.UNKNOWN_STRING)}).fail(function(){n.text(BIGD.UNKNOWN_STRING)}).always(function(){r.GetStateAjax()})}function nt(){i.Disable();n.text(BIGD.TURNING_OFF_STRING);$.ajax({method:"POST",url:BIGD.MYSERVERS_SETSTATE_AJAX_URL,data:{id:r.GetServerId(),state:"Off"},timeout:h}).done(function(t){t.result==="Success"?u=l:n.text(BIGD.UNKNOWN_STRING)}).fail(function(){n.text(BIGD.UNKNOWN_STRING)}).always(function(){r.GetStateAjax()})}function tt(){e.ShowBigIcon()}function it(){e.HideBigIcon()}function rt(){t.Destroy();i.Destroy();r.Destroy();e.Destroy();s.off("click")}var h=1e4,v=60,o=1,c=2,y=3,l=4,p=5,f,e,t,i,r,n,s,u=o,a=0;return{Init:w,GetPanel:b,ShowTurnOffIcon:tt,HideTurnOffIcon:it,Destroy:rt}}function RestartServer(n,t,i){var r=RestartServerClass();return r.Init(n,t,i),r}function RestartServerClass(){function v(r,e,s){o=e;u=LeftIconPanel(r,e,o.find(".serverControlIcon"));var c=o.find(".content");n=c.find(".serverStateLabel");h=c.find(".updateStateHref");f=c.find(".restartServerInfoLabel");t=BigdButton(o.find(".reload-button"));t.Disable();i=s;i.AddStateAjaxCallback(p);t.SetOnClickEventListener(w);h.on({click:b})}function y(){return u}function p(u){if(u.result==="failed"){n.text(BIGD.UNKNOWN_STRING);r=e;t.Disable();return}if(u.dbState!=="On"){n.text(BIGD.NOTAVAILABLE_STRING);r=e;t.Disable();return}var o=!1;if(u.vmState==="Running"?(n.text(BIGD.RUNNING_STRING),r=a,f.text(BIGD.RELOAD_CONFIRM_STRING),t.Enable()):(r===s?o=!0:(u.vmState==="Off"?n.text(BIGD.OFF_STRING):n.text(BIGD.UNKNOWN_STRING),f.text(BIGD.NEED_ON_FOR_RELOAD_STRING)),t.Disable()),o){if(c>GET_STATE_LIMIT){n.text(BIGD.UNKNOWN_STRING);r=e;t.Disable();return}++c;i.GetStateAjax()}}function w(){t.Disable();n.text(BIGD.RELOADING_STRING);$.ajax({method:"POST",url:BIGD.MYSERVERS_SETSTATE_AJAX_URL,data:{id:i.GetServerId(),state:"Reset"},timeout:l}).done(function(t){t.result==="Success"?r=s:(n.text(BIGD.UNKNOWN_STRING),f.text(BIGD.NEED_ON_FOR_RELOAD_STRING))}).fail(function(){n.text(BIGD.UNKNOWN_STRING);f.text(BIGD.NEED_ON_FOR_RELOAD_STRING)}).always(function(){i.GetStateAjax()})}function b(t){t.preventDefault();n.text(BIGD.REFRESHING_STRING);i.GetStateAjax()}function k(){u.ShowBigIcon()}function d(){u.HideBigIcon()}function g(){u.Destroy()}var l=1e4,e=1,s=2,a=3,i,o,u,n,h,f,t,r=e,c=0;return{Init:v,GetPanel:y,ShowRestartIcon:k,HideRestartIcon:d,Destroy:g}}function ReinstallOs(n,t,i){var r=ReinstallOsClass();return r.Init(n,t,i),r}function ReinstallOsClass(){function l(e,o,s){u=s;i=o;r=LeftIconPanel(e,o,i.find(".serverControlIcon"));f=SelectIconList(i.find(".orderOsWrap"));f.InitSelectList();h=i.find(".reinstallOsPassword");n=BigdButton(i.find(".reinstall-os-button"));n.Disable();t=i.find(".reinstallOsStatus");u.AddStateAjaxCallback(a);n.SetOnClickEventListener(v)}function a(i){if(i.result==="failed"){t.text(BIGD.REINSTALL_OS_WRONGSTATE);return}i.dbState==="New"||i.dbState==="Configured"?t.text(BIGD.CREATING_STRING+": "+i.createProgress+"%"):i.dbState==="On"&&(e===s?(e=o,t.text(BIGD.REINSTALL_OS_COMPLETED)):t.text(""),n.Enable())}function v(){n.Disable();t.text(BIGD.QUERY_IN_PROGRESS_STRING);$.ajax({method:"POST",url:BIGD.MYSERVERS_REINSTALLOS_AJAX_URL,data:{id:u.GetServerId(),OSId:f.GetValue(),password:h.val()},timeout:c}).done(function(i){i.result==="success"?(e=s,u.GetStateAjax()):i.result==="wrongpassword"?(t.text(BIGD.WRONG_PASSWORD_STRING),n.Enable()):i.result==="notavailable"?(t.text(BIGD.REINSTALL_OS_NOTAVAILABLE),n.Enable()):i.result==="paymentexpired"?(t.text(BIGD.REINSTALL_OS_PAYMENTEXPIRED),n.Enable()):i.result==="paymentexpiring"?(t.text(BIGD.REINSTALL_OS_PAYMENTEXPIRING),n.Enable()):i.result==="daylimit"?(t.text(BIGD.REINSTALL_OS_DAYLIMIT),n.Enable()):i.result==="monthlimit"?(t.text(BIGD.REINSTALL_OS_MONTHLIMIT),n.Enable()):i.result==="failed"&&(t.text(BIGD.AJAX_FAILED_STRING),n.Enable())}).fail(function(){t.text(BIGD.AJAX_FAILED_STRING);n.Enable()}).always(function(){})}function y(){return r}function p(){r.ShowBigIcon()}function w(){r.HideBigIcon()}function b(){r.Destroy();f.DestroySelectList();n.Destroy()}var c=1e4,o=0,s=1,u,i,r,f,h,n,t,e=o;return{Init:l,ShowReinstallOsIcon:p,HideReinstallOsIcon:w,GetPanel:y,Destroy:b}}function DeleteServer(n,t,i){var r=DeleteServerClass();return r.Init(n,t,i),r}function DeleteServerClass(){function o(e,o,h){u=h;i=o;r=LeftIconPanel(e,o,i.find(".serverControlIcon"));f=i.find(".deleteServerPassword");n=BigdButton(i.find(".delete-server-button"));t=i.find(".deleteServerStatus");n.SetOnClickEventListener(s)}function s(){n.Disable();t.text(BIGD.DELETE_SERVER_QUERY_STRING);$.ajax({method:"POST",url:BIGD.MYSERVERS_DELETE_AJAX_URL,data:{id:u,password:f.val()},timeout:e}).done(function(i){i.result==="success"&&t.text(BIGD.DELETE_SERVER_SUCCESS_STRING);i.result==="wrongpassword"?(t.text(BIGD.WRONG_PASSWORD_STRING),n.Enable()):i.result==="failed"&&(t.text(BIGD.DELETE_SERVER_FAILED_STRING),n.Enable())}).fail(function(){t.text(BIGD.AJAX_FAILED_STRING);n.Enable()}).always(function(){})}function h(){return r}function c(){r.ShowBigIcon()}function l(){r.Destroy();n.Destroy()}var e=1e4,u,i,r,f,n,t;return{Init:o,ShowDeleteServerIcon:c,GetPanel:h,Destroy:l}}function ConfigServer(n,t,i){var r=ConfigServerClass();return r.Init(n,t,i),r}function ConfigServerClass(){function kt(c,y,k){l=k;a=c;at=y;n=at;ft=n.find(".content");i=BigdButton(n.find(".change-config-button"));i.Disable();t=n.find(".serverReconfigureConsole");d=ControlIcon(n.find(".serverControlIcon"));var rt=a.find("circle");p=DropDownList(n.find(".listFreq"),h);p.InitDropDownList();vt=p.GetValue();r=DropDownList(n.find(".listCores"),h);r.InitDropDownList();g=r.GetValue();u=DropDownList(n.find(".listRam"),h);u.InitDropDownList();nt=u.GetValue();f=DropDownList(n.find(".listDisk"),h);f.InitDropDownList();tt=f.GetValue();w=DropDownList(n.find(".listDiskType"),h);w.InitDropDownList();yt=w.GetValue();e=DropDownList(n.find(".listIp"),h);e.InitDropDownList();it=e.GetValue();o=DropDownList(n.find(".listDdos"),h);o.InitDropDownList();b=o.GetValue().trim();v=n.find(".changeConfigPassword");s=new TimelineLite;s.set(n,{yPercent:-100});d.SetVisibility(!0);a.on({mouseenter:function(){(new TimelineMax).staggerTo(rt,.6,{xPercent:120,ease:Expo.easeOut},.03)},mouseleave:function(){(new TimelineMax).staggerTo(rt,.6,{xPercent:0,ease:Expo.easeOut},.03)},click:fi});i.SetOnClickEventListener(gt);d.SetOnClickListener(st);l.AddStateAjaxCallback(dt)}function h(){c();ni()}function dt(n){if(n.result==="failed"){t.text(BIGD.REINSTALL_OS_WRONGSTATE);return}if(n.configurationUpdating==="True")l.GetStateAjax();else if(ot===lt){t.text(BIGD.CHANGE_CONFIG_SUCCESS_STRING);v.val("");g=r.GetValue();nt=u.GetValue();tt=f.GetValue();it=e.GetValue();b=o.GetValue().trim();var i=0;b!==BIGD.DDOSPROTECTIONNONE_STRING&&(i=Math.round(parseFloat(b)/.5));pt(g,nt,tt,it,i);ot=ct}}function wt(){i.Disable()}function c(){vt===p.GetValue()&&g===r.GetValue()&&nt===u.GetValue()&&tt===f.GetValue()&&yt===w.GetValue()&&it===e.GetValue()&&b===o.GetValue().trim()?i.Disable():i.Enable()}function gt(){wt();t.text(BIGD.QUERY_IN_PROGRESS_STRING);var n=v.val();if(n.length===0){t.text(BIGD.NEED_PASSWORD_STRING);i.Enable();return}$.ajax({method:"POST",url:BIGD.MYSERVERS_CHANGECONFIG_AJAX_URL,data:{id:l.GetServerId(),cpu:r.GetValue(),ram:u.GetValue(),drive:f.GetValue(),ips:e.GetValue(),ddos:o.GetValue().trim(),password:v.val()},timeout:ht}).done(function(n){n.result==="success"?(t.text(BIGD.CHANGE_CONFIGURATION_STARTED_STRING),ot=lt,l.GetStateAjax()):n.result==="wrongpassword"?(t.text(BIGD.WRONG_PASSWORD_STRING),c()):n.result==="notavailable"?(t.text(BIGD.CHANGE_CONFIG_NOT_AVAILABLE_STRING),c()):n.result==="rejected"?(t.text(n.rejectReason),c()):n.result==="failed"&&(t.text(BIGD.AJAX_FAILED_STRING),c())}).fail(function(){t.text(BIGD.AJAX_FAILED_STRING);c()}).always(function(){})}function ni(){wt();t.text(BIGD.CHANGE_CONFIG_GETTING_PRICE_STRING);$.ajax({method:"POST",url:BIGD.MYSERVERS_CHANGECONFIG_GETPRICE_AJAX_URL,data:{id:l.GetServerId(),cpu:r.GetValue(),ram:u.GetValue(),drive:f.GetValue(),ips:e.GetValue(),ddos:o.GetValue().trim(),password:v.val()},timeout:ht}).done(function(n){t.text(n.message)}).fail(function(){t.text(BIGD.AJAX_FAILED_STRING)}).always(function(){c()})}function ti(){return panelId}function ii(n){panelId=n}function ri(n){et=n}function ui(){return y===rt}function fi(){y===rt?st():y===ut&&bt()}function st(){s.clear();s.to(n,k,{yPercent:-100,ease:Expo.easeInOut}).to(ft,k,{autoAlpha:0,ease:Expo.easeInOut},.2).set(n,{display:"none"});y=ut}function bt(){typeof et!="undefined"&&et(panelId);s.clear();s.set(n,{display:"block"}).to(n,k,{yPercent:0,autoAlpha:1,ease:Expo.easeInOut}).to(ft,k,{autoAlpha:1,ease:Expo.easeInOut},.2);y=rt}function ei(){TweenLite.set(a,{visibility:"visible"})}function oi(){TweenLite.set(a,{visibility:"hidden"})}function si(n){pt=n}function hi(){s.clear();d.Destroy();i.Destroy();p.DestroyDropDownList();r.DestroyDropDownList();u.DestroyDropDownList();f.DestroyDropDownList();w.DestroyDropDownList();e.DestroyDropDownList();o.DestroyDropDownList();a.off("mouseenter mouseleave click")}var ht=1e4,k=1.1,rt=0,ut=1,ct=0,lt=1,l,a,at,i,t,v,n,ft,d,s,et,y=ut,p,r,u,f,w,e,o,vt,g,nt,tt,yt,it,b,pt,ot=ct;return{Init:kt,GetPanelId:ti,SetPanelId:ii,SetOnPanelOpenCallback:ri,IsPanelOpened:ui,OpenPanel:bt,ClosePanel:st,ShowConfigIcon:ei,HideConfigIcon:oi,SetOnConfigChangedCallback:si,Destroy:hi}}function StatsInfo(n,t){var i=StatsInfoClass();return i.Init(n,t),i}function StatsInfoClass(){function r(r,f){n=ServerPanel(r,3);t=BigdButton(r.find(".full-stat-button"));i=f;t.SetOnClickEventListener(u)}function u(){i.OpenPanel()}function f(){n.OpenOrClose()}function e(){return n}function o(){n.Destroy();t.Destroy()}var n,t,i;return{Init:r,OpenOrClose:f,GetServerPanel:e,Destroy:o}}function StatsGraphs(n,t){var i=StatsGraphsClass();return i.Init(n,t),i}function StatsGraphsClass(){function v(r,u){f=u;n=r;t=ServerPanel(n,3);i=n.find(".statGraphComment");e=n.find(".cpuGraph");o=n.find(".trafficGraph");h=n.find(".diskGraph");l=n.find(".diskLoadGraph")}function y(){$.ajax({method:"POST",url:BIGD.MYSERVERS_GETSTATISTICS_AJAX_URL,data:{id:f},timeout:BIGD.GET_STAT_AJAX_TIMEOUT}).done(function(n){n.result==="success"?p(n):n.result==="failed"&&i.text(BIGD.AJAX_FAILED_STRING)}).fail(function(){i.text(BIGD.AJAX_FAILED_STRING)})}function p(n){u=!0;r=Graph(e,"dateTime",[{title:"",value:"load"}],"%");r.SetData(n.cpuLoad);s=Graph(o,"dateTime",[{title:BIGD.INBOUND_STRING,value:"inbound"},{title:BIGD.OUTBOUND_STRING,value:"outbound"}],BIGD.MB_STRING);s.SetData(n.traffic);c=Graph(h,"dateTime",[{title:BIGD.WRITE_STRING,value:"write"},{title:BIGD.READ_STRING,value:"read"}],BIGD.MB_STRING);c.SetData(n.disk);a=Graph(l,"dateTime",[{title:"",value:"iops"}],"IOPS");a.SetData(n.diskLoad)}function w(){t.OpenPanel();u||y()}function b(){return t}function k(){t.Destroy();u&&r.Destroy()}var f,t,n,i,e,r,o,s,h,c,l,a,u=!1;return{Init:v,OpenPanel:w,GetServerPanel:b,Destroy:k}}function ShowPassword(n,t){var i=ShowPasswordClass();return i.Init(n,t),i}function ShowPasswordClass(){function o(e,o){f=o;i=ServerPanel(e,3);n=BigdButton(e.find(".show-password-confirm-button"));u=e.find(".showPasswordInput");r=e.find(".showVpsPasswordForm");t=e.find(".showPasswordConsole");n.SetOnClickEventListener(c)}function s(){i.OpenPanel()}function h(){return i}function c(){n.Disable();t.text("");var o=u.val();if(o.length===0){t.text(BIGD.NEED_PASSWORD_STRING);n.Enable();return}$.ajax({method:"POST",url:r.attr("action"),data:r.serialize(),timeout:e}).done(function(n){n.result==="success"?(f(n.vpsPassword),i.ClosePanel()):n.result==="wrongpassword"?t.text(BIGD.WRONG_PASSWORD_STRING):n.result==="failed"&&t.text(BIGD.AJAX_FAILED_STRING)}).fail(function(){t.text(BIGD.AJAX_FAILED_STRING)}).always(function(){n.Enable()})}function l(){i.Destroy();n.Destroy()}var e=1e4,i,r,u,n,t,f;return{Init:o,OpenPanel:s,GetServerPanel:h,Destroy:l}}function RegeneratePassword(n,t,i,r){var u=RegeneratePasswordClass();return u.Init(n,t,i,r),u}function RegeneratePasswordClass(){function l(e,c,l,a){s=l;h=a;o=c;i=ServerPanel(e,3);t=BigdButton(e.find(".regenerate-password-confirm-button"));r=e.find(".regenerateShowPasswordHref");u=e.find(".regeneratePasswordForm");f=e.find(".regeneratePasswordInput");n=e.find(".regeneratePasswordConsole");o.AddStateAjaxCallback(y);t.SetOnClickEventListener(p);r.on({click:w})}function a(){i.OpenPanel()}function v(){return i}function y(i){i.vmState==="Running"?e&&(t.Enable(),n.empty(),e=!1):(t.Disable(),n.text(BIGD.REGENERATE_PASSWORD_SERVER_OFFLINE),e=!0)}function p(){t.Disable();n.text("");var r=f.val();if(r.length===0){n.text(BIGD.NEED_PASSWORD_STRING);t.Enable();return}$.ajax({method:"POST",url:u.attr("action"),data:u.serialize(),timeout:c}).done(function(t){t.result==="success"?(n.text(BIGD.REGENERATE_PASSWORD_SUCCESS),f.val(""),s(t.password),i.ClosePanel()):t.result==="wrongpassword"?n.text(BIGD.WRONG_PASSWORD_STRING):t.result==="failed"&&n.text(BIGD.AJAX_FAILED_STRING)}).fail(function(){n.text(BIGD.AJAX_FAILED_STRING)}).always(function(){t.Enable()})}function w(n){n.preventDefault();h()}function b(){i.Destroy();t.Destroy();r.off("click")}var c=1e4,o,i,r,t,u,f,n,s,h,e=!1;return{Init:l,OpenPanel:a,GetServerPanel:v,Destroy:b}}function PayPeriod(n,t,i,r){var u=PayPeriodClass();return u.Init(n,t,i,r),u}function PayPeriodClass(){function k(b,k,d,g){c=b;p=g;n=d;u=ServerPanel(k,2);o=SelectList(k.find(".payPeriodSelect"),w);o.InitSelectList();i=o.GetValue();r=i;h=BigdButton(k.find(".pay-period-select-cancel-button"));t=BigdButton(k.find(".pay-period-select-save-button"));t.Disable();l=k.find(".priceMonth1");a=k.find(".priceMonth3");v=k.find(".priceMonth6");y=k.find(".priceMonth12");f=k.find(".resultPriceSpan");e=k.find(".resultPeriod");s=k.find(".payPeriodConsole");w(i);h.SetOnClickEventListener(nt);t.SetOnClickEventListener(tt)}function d(){var t=PRICE_CALC.Calculate(n,1),i=PRICE_CALC.Calculate(n,3),r=PRICE_CALC.Calculate(n,6),f=PRICE_CALC.Calculate(n,12);l.text(t.month);a.text(i.month);v.text(r.month);y.text(f.month);u.OpenPanel()}function g(){return u}function w(u){var o,s,h,c;u==="Month_1"?(o=PRICE_CALC.Calculate(n,1),f.text(o.total),e.text(BIGD.RUB_FOR_1MONTH_STRING)):u==="Month_3"?(s=PRICE_CALC.Calculate(n,3),f.text(s.total),e.text(BIGD.RUB_FOR_3MONTH_STRING)):u==="Month_6"?(h=PRICE_CALC.Calculate(n,6),f.text(h.total),e.text(BIGD.RUB_FOR_6MONTH_STRING)):u==="Year_1"&&(c=PRICE_CALC.Calculate(n,12),f.text(c.total),e.text(BIGD.RUB_FOR_12MONTH_STRING));i=u;i!==r?t.Enable():t.Disable()}function nt(){u.ClosePanel()}function tt(){t.Disable();$.ajax({method:"POST",url:BIGD.SET_PAY_PERIOD_URL,data:{id:c,period:i},timeout:b}).done(function(n){n.result==="success"?(r=i,s.text(BIGD.PAYPERIOD_CHANGED_STRING),p(i),u.ClosePanel()):n.result==="failed"&&s.text(BIGD.AJAX_FAILED_STRING)}).fail(function(){s.text(BIGD.AJAX_FAILED_STRING)}).always(function(){t.Enable()})}function it(t){n=t}function rt(){return r==="Month_1"?1:r==="Month_3"?3:r==="Month_6"?6:r==="Year_1"?12:(console.log("PayPeriodClass.getCurrentPeriodMonths unknown currentPeriod: "+r),1)}function ut(){u.Destroy();o.DestroySelectList();h.Destroy();t.Destroy()}var b=1e4,c,u,o,h,t,n,l,a,v,y,i,r,f,e,s,p;return{Init:k,OpenPanel:d,GetServerPanel:g,SetPriceConfig:it,GetCurrentPeriodMonths:rt,Destroy:ut}}function ServerDescription(n,t){var i=ServerDescriptionClass();return i.Init(n,t),i}function ServerDescriptionClass(){function c(i,h){e=i;t=h;n=t.find(".description");r=t.find(".descriptionInputSpan");u=t.find(".saveDescriptionSpan");f=t.find(".cancelDescriptionSpan");o=t.find(".saveDescriptionHref");s=t.find(".cancelDescriptionHref");n.on({focus:l});o.on({click:a});s.on({click:v})}function l(){i=n.val();TweenLite.set(u,{display:"inline"});TweenLite.set(f,{display:"inline"});TweenLite.set(r,{borderWidth:2})}function a(t){t.preventDefault();TweenLite.set(u,{display:"none"});TweenLite.set(f,{display:"none"});TweenLite.set(r,{borderWidth:0});$.ajax({method:"POST",url:BIGD.MYSERVERS_SETDESCRIPTION_AJAX_URL,data:{id:e,description:n.val()},timeout:h}).done(function(t){t.result==="success"?i=n.text():t.result==="failed"&&n.text(i)}).fail(function(){n.text(i)})}function v(t){t.preventDefault();TweenLite.set(u,{display:"none"});TweenLite.set(f,{display:"none"});TweenLite.set(r,{borderWidth:0});n.val(i)}function y(){n.off("focus")}var h=1e4,e,t,n,r,u,f,o,s,i;return{Init:c,Destroy:y}}function ServerScreen(n,t){var i=ServerScreenClass();return i.Init(n,t),i}function ServerScreenClass(){function e(f,e){r=e;u=f.find(".serverViewScreenshot");n=f.find(".screenHrefWrapper");t=f.find(".updateScreenHref");i=f.find(".screenConsoleDiv");t.on({click:o})}function o(n){n.preventDefault();f()}function s(n,t){return Math.floor(Math.random()*(t-n+1))+n}function f(){TweenLite.set(n,{display:"none"});TweenLite.set(i,{display:"block"});var t=new Image;t.onload=function(){u.attr("src",this.src);TweenLite.set(n,{display:"block"});TweenLite.set(i,{display:"none"})};t.src=BIGD.GET_SERVER_SCREEN_URL+"?id="+r+"&timestamp="+s(1,1e5)}function h(){t.off("click")}var r,u,n,t,i;return{Init:e,UpdateScreen:f,Destroy:h}}function ServerConsole(n,t){var i=ServerConsoleClass();return i.Init(n,t),i}function ServerConsoleClass(){function e(t,r){n=r;i=t.find(".screenConsoleHref");i.on({click:o})}function o(n){n.preventDefault();s()}function s(){var i=BIGD_VM_CONSOLES[n];i?i.window.focus():(BIGD_VM_CONSOLES[n]={window:window.open("/console/"+n,"vmConsole"+n,"left=150,top=30,width=1024,height=906,scrollbars=yes,resizable=yes"),session:null},t=window.setInterval(h,u))}function h(){var i=BIGD_VM_CONSOLES[n],u;i&&i.window&&i.window.closed&&(u=i.window.consoleWindow.getSessionId(),BIGD_VM_CONSOLES[n]=null,u&&$.ajax({method:"POST",url:r,data:{sessionId:u},timeout:f}).done(function(n){n.success||console.log("checkClose -> failed")}).fail(function(n){console.log("checkClose failed -> "+n)}),window.clearInterval(t),t=null)}function c(){i.off("click");t&&window.clearInterval(t)}var n,i,t=null,r="/console-closesession",u=500,f=1e4;return{Init:e,Destroy:c}}function BackupServer(n){var t=BackupServerClass();return t.Init(n),t}function BackupServerClass(){function lt(w){i=ServerPanel(w,2);s=w.find(".saveBackupForm");h=w.find(".backupPasswordInput");tt=w.find(".intervalTypeInput");it=w.find(".dayOfWeekInput");rt=w.find(".daysPeriodInput");ut=w.find(".dayOfMonthInput");r=w.find(".copiesCountInput");c=parseInt(r.val());u=SelectList(w.find(".backupPeriodSelect"),ht);u.InitSelectList();l=SelectList(w.find(".dayOfWeek"),function(n){it.val(n)});l.InitSelectList();a=DropDownList(w.find(".daysPeriodList"),function(n){rt.val(n)});a.InitDropDownList();v=DropDownList(w.find(".dayOfMonthList"),function(n){ut.val(n)});v.InitDropDownList();y=DropDownList(w.find(".copiesCountList"),yt);y.InitDropDownList();f=w.find(".periodDailyWrap");e=w.find(".dayOfWeek");o=w.find(".dayOfMonthWrap");b=w.find(".pricePerMonthSpan");et=parseFloat(b.text());ot=w.find(".backupAdditionalPaySpan");d=w.find(".backupAdditionalCommentSpan");ft=w.find(".backcupTotalVolumeSpan");t=BigdButton(w.find(".save-backup-button"));p=BigdButton(w.find(".cancel-backup-button"));n=w.find(".backupConsole");t.SetOnClickEventListener(pt);p.SetOnClickEventListener(wt);ht(u.GetValue())}function at(){return i}function vt(){i.OpenPanel()}function yt(t){var f=parseInt(t),i,u;f===0&&c!==0&&n.text(BIGD.BACKUP_REMOVE_WARNING);r.val(t);i=PRICE_CALC.GetBackupPrice(t*k,w);b.text(Math.round(i/w));ft.text(t*k);u=i-et;u<0?d.text(BIGD.BACKUP_WITHDRAWAL_STRING):d.text(BIGD.BACKUP_ADDITIONAL_PAY_STRING);ot.text(Math.abs(Math.round(u*st)))}function ht(n){tt.val(n);n==="Daily"?(TweenLite.set(f,{display:"block"}),TweenLite.set(e,{display:"none"}),TweenLite.set(o,{display:"none"})):n==="Weekly"?(TweenLite.set(f,{display:"none"}),TweenLite.set(e,{display:"block"}),TweenLite.set(o,{display:"none"})):n==="Monthly"&&(TweenLite.set(f,{display:"none"}),TweenLite.set(e,{display:"none"}),TweenLite.set(o,{display:"block"}))}function pt(){t.Disable();n.text(BIGD.SAVING_DATA_STRING);var i=h.val();if(i.length===0){n.text(BIGD.NEED_PASSWORD_STRING);t.Enable();return}$.ajax({method:"POST",url:s.attr("action"),data:s.serialize(),timeout:ct}).done(function(t){t.result==="wrongpassword"?n.text(BIGD.WRONG_PASSWORD_STRING):t.result==="notpaid"?n.text(BIGD.BACKUP_NOTPAID_STRING):t.result==="needprolong"?n.text(BIGD.BACKUP_NEEDPROLONG_STRING):t.result==="notenoughbalance"?n.text(BIGD.INSUFFICIENT_FOUNDS_STRING):t.result==="backupadded"?(n.text(BIGD.BACKUP_ADDED_STRING),nt()):t.result==="backupupdated"?(n.text(BIGD.BACKUP_UPDATED_STRING),nt()):t.result==="backupremoved"?(n.text(BIGD.BACKUP_REMOVED_STRING),nt()):t.result==="failed"&&n.text(BIGD.AJAX_FAILED_STRING)}).fail(function(){n.text(BIGD.AJAX_FAILED_STRING)}).always(function(){t.Enable()})}function wt(){i.ClosePanel()}function bt(n){w=n}function kt(n){k=n}function dt(n){st=n}function gt(n){g=n}function nt(){h.val("");c=parseInt(r.val());typeof g!="undefined"&&g(parseInt(r.val()))}function ni(){i.Destroy();u.DestroySelectList();l.DestroySelectList();a.DestroyDropDownList();v.DestroyDropDownList();y.DestroyDropDownList();t.Destroy();p.Destroy()}var ct=1e4,i,s,h,tt,it,rt,ut,r,c,u,l,f,e,o,a,v,y,t,p,n,ft,w=1,b,et,k,ot,d,st,g;return{Init:lt,GetServerPanel:at,OpenPanel:vt,SetPayPeriod:bt,SetDiskCapacity:kt,SetMoneyRemaining:dt,SetBackupUpdatedCallback:gt,Destroy:ni}}function Server(n,t){if(!n.length)return undefined;var i=ServerClass();return i.Init(n,t),i}function ServerClass(){function gt(gt,ni){var yi,ai,pi,wi,bi,ki,di,gi,nr,tr,ir,rr,vi;f=ni;s=gt.attr("creatinginprogress")==="true";wt=parseFloat(gt.attr("moneyremaining"));r=gt.find(".serverStateLabel");bt=gt.attr("tariffId");o=MyServersLoader(gt.find(".loaderWrap"));i=ServerState(f);t=PanelsManager();et=gt.find(".configCpu").find(".configVal");ot=gt.find(".configRam").find(".configVal");st=gt.find(".configDisk").find(".configVal");ht=gt.find(".configIp").find(".configVal");yi=gt.find(".configDisk").find(".driveType").text()==="SSD";ut=gt.find(".serverCostSpan");p=gt.find(".payPeriodSpan");n={tariffId:bt,premium:!1,cpu:parseInt(et.text()),ram:parseFloat(ot.text()),vram:0,drive:parseInt(st.text()),ssd:yi,ip:parseInt(ht.text()),additional:[]};ai=parseInt(gt.attr("ddos"));ai!==0&&n.additional.push({id:4,count:ai});pi=gt.find(".iconOnOff").find(".serverControlIcon");wi=gt.find(".turnOffServer");c=TurnOffServer(pi,wi,i);t.RegisterPanel(c.GetPanel());bi=gt.find(".iconReset").find(".serverControlIcon");ki=gt.find(".restartServer");l=RestartServer(bi,ki,i);t.RegisterPanel(l.GetPanel());di=gt.find(".iconReinstallOs").find(".serverControlIcon");gi=gt.find(".reinstallOs");a=ReinstallOs(di,gi,i);t.RegisterPanel(a.GetPanel());nr=gt.find(".iconDelete").find(".serverControlIcon");tr=gt.find(".deleteServer");d=DeleteServer(nr,tr,f);t.RegisterPanel(d.GetPanel());ir=gt.find(".serverIconConfig");rr=gt.find(".serverConfigWrap");v=ConfigServer(ir,rr,i);t.RegisterPanel(v);u=PayPeriod(f,gt.find(".payPeriod"),n,hi);t.RegisterPanel(u.GetServerPanel());rt=gt.find(".changePaymentPeriodHref");yt=ServerDescription(f,gt.find(".serverTitle"));vi=gt.find(".serverView");ft=ServerScreen(vi,f);pt=ServerConsole(vi,f);y=ShowPassword(gt.find(".showPassword"),ri);t.RegisterPanel(y.GetServerPanel());tt=RegeneratePassword(gt.find(".regeneratePassword"),i,ei,oi);t.RegisterPanel(tt.GetServerPanel());g=StatsGraphs(gt.find(".infoStats"),f);t.RegisterPanel(g.GetServerPanel());w=ControlIcon(gt.find(".iconStats").find(".serverControlIcon"));nt=StatsInfo(gt.find(".infoShortStats"),g);w.SetOnClickListener(nt.OpenOrClose);t.RegisterPanel(nt.GetServerPanel());h=ProlongServer(gt.find(".prolongServer"));t.RegisterPanel(h.GetServerPanel());e=BackupServer(gt.find(".backupPanel"));e.SetDiskCapacity(n.drive);e.SetPayPeriod(u.GetCurrentPeriodMonths());e.SetMoneyRemaining(wt);e.SetBackupUpdatedCallback(ci);t.RegisterPanel(e.GetServerPanel());ct=BigdButton(gt.find(".prolong-server-button"));lt=BigdButton(gt.find(".backup-button"));b=BigdButton(gt.find(".show-password-button"));at=BigdButton(gt.find(".regenerate-password-button"));vt=gt.find(".passwordField");dt=gt.find(".regenerate-password-errors");k=gt.find(".backupStatusSpan");s?o.ShowLoader():kt();d.ShowDeleteServerIcon();it=gt.find(".serverConsole").find(".updateStateHref");v.SetOnConfigChangedCallback(ui);it.on({click:ti});rt.on({click:si});ct.SetOnClickEventListener(h.OpenPanel);lt.SetOnClickEventListener(e.OpenPanel);b.SetOnClickEventListener(ii);at.SetOnClickEventListener(fi);i.AddStateAjaxCallback(li);i.GetStateAjax();ft.UpdateScreen()}function kt(){c.ShowTurnOffIcon();l.ShowRestartIcon();a.ShowReinstallOsIcon();v.ShowConfigIcon();w.SetVisibility(!0)}function ni(){c.HideTurnOffIcon();l.HideRestartIcon();a.HideReinstallOsIcon();w.SetVisibility(!1)}function ti(n){n.preventDefault();r.text(BIGD.REFRESHING_STRING);i.GetStateAjax()}function ii(){y.OpenPanel()}function ri(n){vt.text(n);b.Disable()}function ui(t,i,r,f,e){et.text(t);ot.text(i);st.text(r);ht.text(f);n.cpu=t;n.ram=i;n.drive=r;n.ip=f;n.additional=[];e!==0&&n.additional.push({id:4,count:e});u.SetPriceConfig(n)}function fi(){tt.OpenPanel()}function ei(n){vt.text(n);b.Disable()}function oi(){y.OpenPanel()}function si(n){n.preventDefault();u.OpenPanel()}function hi(t){var i;t==="Month_1"?(i=PRICE_CALC.Calculate(n,1).total,p.text(BIGD.PAYPERIOD_1MONTH_STRING)):t==="Month_3"?(i=PRICE_CALC.Calculate(n,3).total,p.text(BIGD.PAYPERIOD_3MONTH_STRING)):t==="Month_6"?(i=PRICE_CALC.Calculate(n,6).total,p.text(BIGD.PAYPERIOD_6MONTH_STRING)):t==="Year_1"&&(i=PRICE_CALC.Calculate(n,12).total,p.text(BIGD.PAYPERIOD_12MONTH_STRING));e.SetPayPeriod(u.GetCurrentPeriodMonths());ut.text(i);h.SetServerCost(i)}function ci(t){for(var r=[],f,i=0;i<n.additional.length;++i)n.additional[i].id!==6&&r.push(n.additional[i]);t===0?(k.text(BIGD.OFF_STRING),k.removeClass("colorBlue200")):(k.text(BIGD.RUNNING_STRING),k.addClass("colorBlue200"),r.push({id:6,count:t*n.drive}));n.additional=r;f=PRICE_CALC.Calculate(n,u.GetCurrentPeriodMonths()).total;ut.text(f);h.SetServerCost(f);u.SetPriceConfig(n)}function li(n){var t=n;if(t.configurationUpdating==="True"){s||(r.text(BIGD.CONFIGURATION_UPDATE_STRING),o.SetLoaderText(BIGD.CHANGE_CONFIGURATION_STARTED_STRING),o.ShowLoader(),ni(),s=!0);i.GetStateAjax();return}if(t.dbState==="New"||t.dbState==="Configured"){o.ShowLoader();r.text(BIGD.CREATING_STRING+": "+t.createProgress+"%");i.GetStateAjax();return}if(t.dbState==="ContactVerificationError"){r.text(BIGD.CONTACTVERIFY_ERROR_STRING);return}if(t.dbState==="AvailableResourcesError"){r.text(BIGD.INSUFFICIENT_RESOURCES_STRING);return}if(t.dbState==="PaymentError"){r.text(BIGD.INSUFFICIENT_FOUNDS_STRING);return}if(t.dbState==="Blocked"){r.text(BIGD.SERVER_BLOCKED_STRING);return}if(t.dbState==="On"){if(s&&(o.HideLoader(),kt(),s=!1),t.vmState==="Running"){r.text(BIGD.RUNNING_STRING);return}if(t.vmState==="Off"){r.text(BIGD.OFF_STRING);return}r.text(BIGD.UNKNOWN_STRING);return}}function ai(){i.Destroy();o.Destroy();rt.off("click");it.off("click");t.Destroy();c.Destroy();l.Destroy();a.Destroy();d.Destroy();v.Destroy();nt.Destroy();g.Destroy();w.Destroy();u.Destroy();y.Destroy();tt.Destroy();yt.Destroy();ft.Destroy();pt.Destroy();h.Destroy();ct.Destroy();lt.Destroy();b.Destroy();at.Destroy()}var f,s,i,t,c,l,a,d,v,g,nt,h,e,y,tt,u,r,o,it,rt,ut,p,yt,ft,pt,w,et,ot,st,ht,n,ct,lt,b,at,vt,dt,wt,bt,k;return{Init:gt,Destroy:ai}}function SettingsNavigation(){function i(n){(new TimelineLite).to(t,.6,{y:100,autoAlpha:0,ease:Power4.easeOut}).to(t,.01,{display:"none"}).to(n,.01,{display:"block"}).to(n,.6,{y:0,autoAlpha:1,ease:Power4.easeOut});t=n}function r(n,t,i){(new TimelineLite).to(n,.6,{color:t,backgroundColor:i,ease:Expo.easeOut})}var n,u,t,f=function(){if(n=$("#accSett"),n.length){var e=n.find("#accSettNavWrap"),o=e.find(".accSettNav"),h=n.find(".accSettContent"),u=n.find("#accSettPersonal"),s=n.find("#accSettChangePass"),f=n.find("#accSettPartner"),c=n.find("#accPartner");u.hasClass("accSettVisible")?t=u:f.hasClass("accSettVisible")&&(t=f);o.on({mouseenter:function(){var n=$(this);n.attr("state")!="selected"&&r(this,"rgb(255,255,255)","rgb(20,40,190)")},mouseleave:function(){var n=$(this);n.attr("state")!="selected"&&r(this,"rgb(100,100,100)","rgb(255,255,255)")},click:function(){var n=$(this),e=n.attr("id"),t=n.parent().find('.accSettNav[state="selected"]');if(n.attr("state")!="selected"){r(t,"rgb(100,100,100)","rgb(255,255,255)");t.attr("state","");n.attr("state","selected");switch(e){case"accPersonalInfo":i(u);break;case"accChangePass":i(s);break;case"accPartner":i(f)}}}})}},e=function(){n!=undefined&&n.length&&u.off("mouseenter mouseleave click")};return{InitAccountSettings:f,DestroyAccountSettings:e}}function SettingsPersonal(){function u(){y.empty()}function t(n){y.append("<div>"+n+"<\/div>")}function g(i){i.preventDefault();u();t(BIGD.SAVING_DATA_STRING);$.ajax({method:"POST",url:n.attr("action"),data:n.serialize(),timeout:BIGD.AJAX_TIMEOUT}).done(function(n){n.result=="success"?(u(),t(BIGD.SAVING_DATA_SUCCESS_STRING)):n.result=="failed"&&(u(),t(BIGD.SAVING_DATA_FAILED_STRING))}).fail(function(){u();t(BIGD.SAVING_DATA_FAILED_STRING)}).always(function(){})}function nt(n){a.val(n)}function tt(){var t,u,p,k,tt,it,rt;if(i=$("#accSettPersonal"),i.length){n=i.find("#accSettForm");v=i.find("#savePersonalButton");y=i.find("#personalConsole");a=n.find("#Sex");r=RadioGroup(nt);r.AddCheckbox("#maleCheckbox",w);r.AddCheckbox("#femaleCheckbox",b);a.val()==w?r.SetSelectedIndex(w):a.val()==b&&r.SetSelectedIndex(b);t=n.find("#BirthDay");f=DropDownList("#birthDayList",function(n){t.val(n)});f.InitDropDownList();t.val()!=0&&f.SetValue(t.val());u=n.find("#BirthMonth");e=DropDownList("#birthMonthList",function(n){u.val(n)});e.InitDropDownList();u.val()!=0&&e.SetValue($("#birthMonthList").find("[callbackvalue='"+u.val()+"']").text());p=n.find("#BirthYear");o=DropDownList("#birthYearList",function(n){p.val(n)});o.InitDropDownList();p.val()!=0&&o.SetValue(p.val());k=n.find("#Country");s=DropDownList("#countryList",function(n){k.val(n)});s.InitDropDownList();k.val()&&s.SetValue(k.val());tt=n.find("#PassportDay");h=DropDownList("#passportDayList",function(n){tt.val(n)});h.InitDropDownList();tt.val()!=0&&h.SetValue(tt.val());it=n.find("#PassportMonth");c=DropDownList("#passportMonthList",function(n){it.val(n)});c.InitDropDownList();it.val()!=0&&c.SetValue($("#passportMonthList").find("[callbackvalue='"+it.val()+"']").text());rt=n.find("#PassportYear");l=DropDownList("#passportYearList",function(n){rt.val(n)});l.InitDropDownList();rt.val()!=0&&l.SetValue(rt.val());d.EnsureInit($("#settingsPhoneConfirmDiv"));v.on({click:g})}}function it(){i.length&&(v.off("click"),r.DestroyRadioGroup(),f.DestroyDropDownList(),e.DestroyDropDownList(),o.DestroyDropDownList(),s.DestroyDropDownList(),h.DestroyDropDownList(),c.DestroyDropDownList(),l.DestroyDropDownList())}var i,n,v,y,r,f,e,o,s,h,c,l,p,k,d=PhoneConfirmClass(),a,w=1,b=2;return{InitPersonalSettings:tt,DestroyPersonalSettings:it}}function SettingsChangePassword(){function u(){r.empty()}function i(n){r.append("<div>"+n+"<\/div>")}function f(r){r.preventDefault();t.prop("disabled",!0);u();i(BIGD.SAVING_DATA_STRING);$.ajax({method:"POST",url:n.attr("action"),data:n.serialize(),timeout:BIGD.AJAX_TIMEOUT}).done(function(n){if(u(),n.result==="success")i(BIGD.PASSWORDCHANGED_STRING);else if(n.result==="failed")for(var t=0;t<n.errors.length;++t)i(n.errors[t]);else i(BIGD.SAVING_DATA_FAILED_STRING)}).fail(function(){u();i(BIGD.SAVING_DATA_FAILED_STRING)}).always(function(){t.prop("disabled",!1)})}function e(){if(n=$("#accChagePassForm"),n.length){r=n.find("#changePasswordConsole");t=n.find("#changePasswordButton");t.on({click:f})}}function o(){n.length&&t.off("click")}var n,r,t;return{InitSettingsChangePassword:e,DestroySettingsChangePassword:o}}function SettingsPartner(n){var t=SettingsPartnerClass();return t.Init(n),t}function SettingsPartnerClass(){function o(e){r=e.find(".partnerIncomeSpan");u=e.find(".partnerWithdrawnSpan");f=e.find(".partnerWithdrawAvailable");t=BigdButton(e.find(".withdraw-partner-button"));n=e.find(".bigdPartnerConsole");i=e.find(".withdrawPartnerForm");t.SetOnClickEventListener(s)}function s(){t.Disable();n.text(BIGD.QUERY_IN_PROGRESS_STRING);$.ajax({method:"POST",url:i.attr("action"),data:i.serialize(),timeout:e}).done(function(t){t.result==="success"?(r.text(t.partnerincome),u.text(t.partnerwithdrawn),f.text(t.withdrawavailable),n.text(BIGD.PARTNER_SUCCESS_STRING)):t.result==="notenoughmoney"?n.text(BIGD.PARTHER_NOTENOUGHMONEY_STRING):t.result==="failed"&&n.text(BIGD.AJAX_FAILED_STRING)}).fail(function(){n.text(BIGD.AJAX_FAILED_STRING)}).always(function(){t.Enable()})}function h(){t.Destroy()}var e=1e4,r,u,f,t,n,i;return{Init:o,Destroy:h}}function CompanyIndex(n){var t=CompanyIndexClass();return t.Init(n),t}function CompanyIndexClass(){function g(p){var ut,ft,et,ot,st,ht,g;(n=p,n.length)&&(s=BigdButton(n.find(".edit-company-info-button")),o=BigdButton(n.find(".download-company-contract-button")),f=n.find(".companyDepositForm"),b=f.find(".depositInputAmount"),r=BigdButton(n.find(".generate-company-bill-button")),w=n.find(".downloadContractConsole"),i=n.find(".companyDepositConsole"),d=n.find(".downloadFrame"),t=n.find(".companyActForm"),ut=t.find(".periodStartDayHidden"),h=DropDownList(".periodStartDayList",function(n){ut.val(n)}),h.InitDropDownList(),ft=t.find(".periodStartMonthHidden"),c=DropDownList(".periodStartMonthList",function(n){ft.val(n)}),c.InitDropDownList(),et=t.find(".periodStartYearHidden"),l=DropDownList(".periodStartYearList",function(n){et.val(n)}),l.InitDropDownList(),ot=t.find(".periodFinishDayHidden"),a=DropDownList(".periodFinishDayList",function(n){ot.val(n)}),a.InitDropDownList(),st=t.find(".periodFinishMonthHidden"),v=DropDownList(".periodFinishMonthList",function(n){st.val(n)}),v.InitDropDownList(),ht=t.find(".periodFinishYearHidden"),y=DropDownList(".periodFinishYearList",function(n){ht.val(n)}),y.InitDropDownList(),g=t.find(".withStampAndSignHidden"),k=Checkbox(".stampAndSignCheckbox",function(n){n?g.val("True"):g.val("False")}),u=n.find(".companyActConsole"),e=BigdButton(t.find(".generate-company-act-button")),s.SetOnClickEventListener(nt),o.SetOnClickEventListener(tt),r.SetOnClickEventListener(it),e.SetOnClickEventListener(rt))}function nt(){location=BIGD.EDIT_COMPANY_INFO_URL}function tt(){w.text(BIGD.DOCUMENT_GENERATING_STRING);location=BIGD.COMPANY_CONTRACT_PDF_URL}function it(){if(b.val()===""){i.text(BIGD.NEED_AMOUNT_STRING);return}r.Disable();i.text(BIGD.DOCUMENT_GENERATING_STRING);$.ajax({method:"POST",url:f.attr("action"),data:f.serialize(),timeout:p}).done(function(n){n.result==="success"?location=BIGD.COMPANY_INVOICE_PDF_URL:n.result==="maxattempts"?i.text(BIGD.MAX_INVOICE_ATTEMPTS_STRING):n.result==="failed"&&i.text(BIGD.AJAX_FAILED_STRING)}).fail(function(){i.text(BIGD.AJAX_FAILED_STRING)}).always(function(){r.Enable()})}function rt(){e.Disable();$.ajax({method:"POST",url:t.attr("action"),data:t.serialize(),timeout:p}).done(function(n){if(n.result==="success")location=BIGD.COMPANY_ACT_COMPARE_PDF_URL;else if(n.result==="maxattempts")u.text(BIGD.MAX_INVOICE_ATTEMPTS_STRING);else if(n.result==="failed"){u.empty();for(var t=0;t<n.errors.length;++t)u.append("<div>"+n.errors[t]+"<\/div>")}}).fail(function(){u.text(BIGD.AJAX_FAILED_STRING)}).always(function(){e.Enable()})}function ut(){n.length&&(s.Destroy(),o.Destroy(),r.Destroy(),h.DestroyDropDownList(),c.DestroyDropDownList(),l.DestroyDropDownList(),a.DestroyDropDownList(),v.DestroyDropDownList(),y.DestroyDropDownList(),k.DestroyCheckbox())}var p=3e4,n,o,w,s,f,b,r,i,d,t,h,c,l,a,v,y,k,e,u;return{Init:g,Destroy:ut}}function CompanyInfoForm(n){var t=CompanyInfoFormClass();return t.Init(n),t}function CompanyInfoFormClass(){function h(s){var a,v,h,w,y,p;(f=s,f.length)&&(e=s.find(".companyForm"),a=s.find(".registerDayHidden"),i=DropDownList(".registerDayList",function(n){a.val(n)}),i.InitDropDownList(),v=parseInt(a.val()),v!==0&&i.SetValue(v),h=s.find(".registerMonthHidden"),r=DropDownList(".registerMonthList",function(n){h.val(n)}),r.InitDropDownList(),w=parseInt(h.val()),w!==0&&r.SetValue(s.find(".registerMonthList").find("[callbackvalue='"+h.val()+"']").text()),y=s.find(".registerYearHidden"),u=DropDownList(".registerYearList",function(n){y.val(n)}),u.InitDropDownList(),p=parseInt(y.val()),p!==0&&u.SetValue(p),n=BigdButton(s.find(".save-company-info-button")),o=BigdButton(s.find(".cancel-company-info-button")),t=s.find(".infoFormConsole"),n.SetOnClickEventListener(c),o.SetOnClickEventListener(l))}function c(){n.Disable();$.ajax({method:"POST",url:e.attr("action"),data:e.serialize(),timeout:s}).done(function(n){if(n.result==="success")t.text(BIGD.SAVING_DATA_SUCCESS_STRING),location=BIGD.COMPANY_INFO_URL;else if(n.result==="failed"){t.empty();for(var i=0;i<n.errors.length;++i)t.append("<div>"+n.errors[i]+"<\/div>")}}).fail(function(){t.text(BIGD.AJAX_FAILED_STRING)}).always(function(){n.Enable()})}function l(){location=BIGD.COMPANY_INFO_URL}function a(){f.length&&(i.DestroyDropDownList(),r.DestroyDropDownList(),u.DestroyDropDownList(),n.Destroy(),o.Destroy())}var s=1e4,f,e,i,r,u,n,o,t;return{Init:h,Destroy:a}}function CompanyClass(){function i(){n=CompanyIndex($(".companyMainContent"));t=CompanyInfoForm($(".companyContent"))}function r(){n.Destroy();t.Destroy()}var n,t;return{Init:i,Destroy:r}}function WaypointedLink(n,t,i,r,u){var f=WaypointedLinkClass();return f.Init(n,t),f.SetWaipointCallback(i,f),f.SetScrollStartedCallback(r,f),f.SetScrollFinishedCallback(u),f}function WaypointedLinkClass(){function v(t,o){n=t;i=o;r=n.find(".sideNavLinkTitle");u=n.find(".sideNavLinkLine");n.on({click:l});f=i.waypoint(b,{offset:"15%"});e=i.waypoint(k,{offset:"50%"})}function y(n,i){t=n;o=i}function p(n,t){s=n;h=t}function w(n){c=n}function l(){s(h);a();var n=i.offset().top-($("#subNavWrap").height()+$("#topBar").height()+10);new TimelineLite({onComplete:c}).to(window,1,{scrollTo:n,ease:Expo.easeInOut})}function b(n){n==="up"&&typeof t!="undefined"&&t(o)}function k(n){n==="down"&&typeof t!="undefined"&&t(o)}function a(){(new TimelineLite).to(r,.7,{color:"rgb(20,40,200)",ease:Expo.easeOut}).to(u,.7,{scaleX:1,ease:Expo.easeOut},0)}function d(){(new TimelineLite).to(r,.7,{color:"rgb(75,75,75)",ease:Expo.easeOut}).to(u,.7,{scaleX:0,ease:Expo.easeOut},0)}function g(){var t;for(n.off("click"),t=0;t<f.length;++t)f[t].destroy();for(t=0;t<e.length;++t)e[t].destroy()}var n,i,r,u,f,e,t,o,s,h,c;return{Init:v,HighlightLink:a,UnhighlightLink:d,SetWaipointCallback:y,SetScrollStartedCallback:p,SetScrollFinishedCallback:w,OnLinkClicked:l,Destroy:g}}function Datacenter(){var t=$(".datacenterPage"),n;if(typeof t!="undefined")return n=DatacenterClass(),n.Init(t),n}function DatacenterClass(){function tt(e){f=e;n=f.find(".sideNavWrap");u=f.find("#datacenterText");o=WaypointedLink(n.find("#linkEquipment"),u.find("#datacenterEquipment"),t,i,r);w=WaypointedLink(n.find("#linkEthernet"),u.find("#datacenterEthernet"),t,i,r);b=WaypointedLink(n.find("#linkCooling"),u.find("#datacenterCooling"),t,i,r);k=WaypointedLink(n.find("#linkFirefighting"),u.find("#datacenterFirefighting"),t,i,r);d=WaypointedLink(n.find("#linkGenerator"),u.find("#datacenterGenerator"),t,i,r);g=WaypointedLink(n.find("#linkEnergy"),u.find("#datacenterEnergy"),t,i,r);nt=WaypointedLink(n.find("#linkSecurity"),u.find("#datacenterSecurity"),t,i,r);s=WaypointedLink(n.find("#linkVideo"),f.find("#datacenterVideo"),t,i,r);h=WaypointedLink(n.find("#linkDatacenter"),f.find("#datacenterDatacenter"),t,i,r);c=WaypointedLink(n.find("#linkLicense"),f.find("#datacenterLicense"),t,i,r);var l=$("#subNavWrap");a=l.find("#datacenterEquipmentNavLink");a.on({click:function(){o.OnLinkClicked()}});v=l.find("#datacenterVideoNavLink");v.on({click:function(){s.OnLinkClicked()}});y=l.find("#datacenterDatacenterNavLink");y.on({click:function(){h.OnLinkClicked()}});p=l.find("#datacenterLicenseNavLink");p.on({click:function(){c.OnLinkClicked()}})}function t(n){l||(e&&e.UnhighlightLink(),n.HighlightLink(),e=n)}function i(n){l=!0;e&&e.UnhighlightLink();e=n}function r(){l=!1}function it(){o.Destroy();w.Destroy();b.Destroy();k.Destroy();d.Destroy();g.Destroy();nt.Destroy();s.Destroy();h.Destroy();c.Destroy();a.off("click");v.off("click");y.off("click");p.off("click")}var f,n,u,o,w,b,k,d,g,nt,s,h,c,e,l=!1,a,v,y,p;return{Init:tt,Destroy:it}}function ContactPanel(){var n=ContactPanelClass();return n.Init(),n}function ContactPanelClass(){function wt(){if((t=$("#iconContact"),t.length)&&(k=$("#mobNavIconContact"),k.length)){n=$("#blockContact");p=$("#iconContactTooltip");r=t.find("svg");d=n.find(".formMask");g=t.find("#iconContactNotebook");nt=t.find("#iconContactChat");tt=t.find("#iconContactHead");it=t.find("#iconContactBody");rt=t.find("#iconContactLineBorder");o=t.find(".iconContactLine");w=t.find("circle");c=t.find("#iconContactLine3");l=t.find("#iconContactLine2");a=t.find("#iconContactLine1");s=n.find("#contactConsole");h=n.find("#formContact");v=n.find("#contactSendButton");et=n.find("#contactEmailSent");ht=h.find("#CaptchaToken");lt=n.find(".navBlock");at=n.find(".helpdeskNavBlock");ut=new TimelineMax({paused:!0,repeat:-1}).staggerFromTo(w,.3,{y:1},{y:-1,ease:Power1.easeOut},.1).staggerFromTo(w,.3,{y:-1},{y:1,ease:Power1.easeOut},.1,.3);ft=new TimelineMax({paused:!0,repeat:-1}).to(o,1,{y:"+=5",ease:Power1.easeOut},2).to(c,1,{opacity:0,ease:Power1.easeOut},2).set(c,{y:"-=15"}).set(c,{drawSVG:"0%",opacity:1}).to(c,1,{drawSVG:"100%"}).to(o,1,{y:"+=5",ease:Power1.easeOut}).to(l,1,{opacity:0,ease:Power1.easeOut},"-=1").set(l,{y:"-=15"}).set(l,{drawSVG:"0%",opacity:1}).to(l,1,{drawSVG:"100%"}).to(o,1,{y:"+=5",ease:Power1.easeOut}).to(a,1,{opacity:0,ease:Power1.easeOut},"-=1").set(a,{y:"-=15"}).set(a,{drawSVG:"0%",opacity:1}).to(a,1,{drawSVG:"100%"});ct=new bigd.HelpdeskPanel(n.find(".helpdeskNavContent"));BIGD.isAuthorized&&(TweenLite.set(lt,{display:"none"}),TweenLite.set(at,{display:"block"}));t.on({click:function(){i==e&&(y=!0,yt())},mouseenter:function(){i==e&&kt()},mouseleave:function(){i==e&&dt()}});k.on({click:function(){i==e&&(y=!0,yt())}});v.on({click:pt});n.on("click",function(){ot=!0});$("html").on("click",vt)}}function vt(){(i===st||i===b)&&(y?y=!1:ot?ot=!1:bt())}function yt(){var t=function(){i=st;y=!1};f&&(f.kill(),f=null);u&&(u.kill(),u=null);new TimelineLite({onComplete:t}).set(n,{display:"block"}).set(r,{willChange:"transform"}).to(n,1,{x:0,xPercent:0,ease:Expo.easeInOut},0).set(p,{display:"none"},0).to(r,1,{scale:1.7,xPercent:-80,ease:Expo.easeInOut},0).to(d,1,{autoAlpha:0,ease:Expo.easeOut},.5).set(r,{willChange:"auto"}).to(g,.3,{y:0,opacity:1,ease:Expo.easeOut},.8).to(nt,.6,{y:0,opacity:1,ease:Expo.easeOut},.4).to(tt,1.3,{drawSVG:"100% 0%",fillOpacity:1,ease:Power4.easeOut},1.2).to(it,1.3,{drawSVG:"100% 0%",fillOpacity:1,ease:Power4.easeOut},1.2).to(rt,1.3,{drawSVG:"100% 0%",fillOpacity:1,ease:Power4.easeOut},.8);TweenMax.staggerTo(o,.7,{drawSVG:"100%",ease:Power4.easeOut,delay:1.2},.1);ut.delay(.5).play();ft.delay(.8).play();i=b;BIGD.RECAPTCHA.SetSubmitCallback(ii);BIGD.RECAPTCHA.LoadCaptcha()}function bt(){var t=function(){i=e};new TimelineLite({onComplete:t}).set(r,{willChange:"transform"}).to(d,1,{autoAlpha:1,ease:Expo.easeOut},0).to(n,1,{xPercent:100,ease:Expo.easeInOut},0).to(r,1,{scale:1,xPercent:0,ease:Expo.easeInOut},0).set(r,{willChange:"auto"}).to(g,.2,{y:20,opacity:0,ease:Expo.easeOut},.4).to(nt,.2,{y:27,opacity:1,ease:Expo.easeOut},.4).to(tt,.01,{drawSVG:"50% 50%",fillOpacity:0,ease:Power4.easeOut},1).to(it,.01,{drawSVG:"50% 50%",fillOpacity:0,ease:Power4.easeOut},1).to(o,.01,{drawSVG:"0%",fillOpacity:0,ease:Power4.easeOut},1).to(rt,.01,{drawSVG:"0%",fillOpacity:0,ease:Power4.easeOut},1).set(n,{display:"none"});setTimeout(function(){ut.pause().seek(0);ft.pause().seek(0);TweenLite.to(w,.3,{y:0})},500);i=b}function kt(){f&&(f.kill(),f=null);u=(new TimelineLite).set(n,{display:"block"}).to(n,.6,{xPercent:95,ease:Expo.easeOut}).set(p,{display:"block"},0).to(r,.6,{scale:1.35,xPercent:-27.5,ease:Expo.easeOut},0)}function dt(){u&&(u.kill(),u=null);f=(new TimelineLite).to(n,.6,{xPercent:100,ease:Expo.easeOut}).set(p,{display:"none"},0).to(r,.6,{scale:1,xPercent:0,ease:Expo.easeOut},0).set(n,{display:"none"})}function gt(n){TweenLite.set(s,{display:"block"});for(var t=0;t<n.length;++t)s.append("<div>"+n[t]+"<\/div>")}function ni(n){TweenLite.set(s,{display:"block"});s.append("<div>"+n+"<\/div>")}function ti(){(new TimelineLite).to(h,.3,{autoAlpha:0}).set(et,{display:"block"}).to(et,.3,{autoAlpha:1},0).set(h,{display:"none"})}function pt(n){n.preventDefault();BIGD.RECAPTCHA.Execute()}function ii(n){s.empty();v.off("click");ht.val(n);$.ajax({method:"POST",url:h.attr("action"),data:h.serialize(),timeout:BIGD.AJAX_TIMEOUT}).done(function(n){n.result=="success"?ti():n.result=="failed"&&(gt(n.errors),BIGD.RECAPTCHA.LoadCaptcha())}).fail(function(){ni(BIGD.AJAX_FAILED_STRING);BIGD.RECAPTCHA.LoadCaptcha()}).always(function(){v.on({click:pt})})}function ri(){t.off("click mouseenter mouseleave");v.off("click");$("html").off("click",vt);ct.destroy()}var st=1,b=2,e=3,n,p,t,k,r,d,g,nt,tt,it,rt,o,ut,ft,w,c,l,a,s,h,v,et,ht,u,f,i=e,ot=!1,y=!1,ct,lt,at;return{Init:wt,Destroy:ri}}function refreshDbCache(n){$.ajax({method:"POST",url:"/system_Reload.h",data:{key:"7b2a8ce9-1e40-46ed-8cb7-9cdbbc2fd52c",type:n},timeout:BIGD.AJAX_TIMEOUT}).done(function(){console.log(n+" DB refresh done...")})}function refreshPromocodesDbCache(n){$.ajax({method:"POST",url:"/system_Reload.h",data:{key:"7b2a8ce9-1e40-46ed-8cb7-9cdbbc2fd52c",type:"promocode",id:n},timeout:BIGD.AJAX_TIMEOUT}).done(function(){console.log("PromocodesDB refresh done...")})}function HelpdeskNavigation(n){var t=HelpdeskNavigationClass();return t.Init(n),t}function HelpdeskNavigationClass(){function i(i){n=i;t=n.find('.helpdeskNavigation[state="selected"]')}function r(){t.attr("state","")}function u(){}var n,t;return{Init:i,Deselect:r,Destroy:u}}function HelpdeskNewTicket(n){var t=HelpdeskNewTicketClass();return t.Init(n),t}function HelpdeskNewTicketClass(){function p(u){f=u;l=HelpdeskNavigation(f.find(".helpdeskNavigationWrapper"));t=f.find(".helpdeskNewTicketSection");r=t.find(".helpdeskForm");e=r.find("#Topic");o=r.find("#Text");n=t.find(".helpdeskFormConsole");a=new bigd.HelpdeskAttachedFile(t.find(".attachedFileChoose"),t.find(".attachedFilesContainer"),n);i=BigdButton(t.find(".helpdesk-send-button"));i.SetOnClickEventListener(w)}function w(){if(n.empty(),e.val()===""){n.text(h);return}if(o.val()===""){n.text(c);return}i.Disable();$.ajax({method:"POST",url:r.attr("action"),data:r.serialize(),timeout:v}).done(function(t){t.result==="failed"?n.text(u):t.result==="success"&&(e.val(""),o.val(""),s&&s())}).fail(function(){n.text(u)}).always(function(){i.Enable()})}function b(n){s=n}function k(){a.Destroy();l.Destroy();i.Destroy()}var v=1e4,h,c,u,y,f,l,t,i,r,e,o,n,a,s;return{Init:p,Destroy:k,SetTopicIsEmptyString:function(n){h=n},SetTextIsEmptyString:function(n){c=n},SetAjaxFailedString:function(n){u=n},SetSupportSuccessString:function(n){y=n},SetTicketCreatedCallback:b}}function HelpdeskTicketInfo(n){var t=HelpdeskTicketInfoClass();return t.Init(n),t}function HelpdeskTicketInfoClass(){function l(r){n=r;f=n.find(".ticketInfoResponseForm");o=n.find(".replyInput");i=n.find(".helpdeskResponseFormConsole");s=new bigd.HelpdeskAttachedFile(n.find(".attachedFileChoose"),n.find(".attachedFilesContainer"),i);t=BigdButton(n.find(".helpdesk-response-button"));t.SetOnClickEventListener(a)}function a(){if(i.empty(),o.val()===""){i.text(e);return}t.Disable();$.ajax({method:"POST",url:f.attr("action"),data:f.serialize(),timeout:h}).done(function(n){n.result==="failed"?(i.text(u),t.Enable()):n.result==="success"&&r&&r()}).fail(function(){i.text(u);t.Enable()})}function v(n){r=n}function y(){s.destroy();t.Destroy();r=null}var h=1e4,e,u,c,n,f,o,t,i,s,r=null;return{Init:l,Destroy:y,SetTextIsEmptyString:function(n){e=n},SetAjaxFailedString:function(n){u=n},SetSupportSuccessString:function(n){c=n},SetTicketRepliedCallback:v}}var _gsScope,SUBNAVIGATION,BIGD_VM_CONSOLES,SETTINGS,DATACENTER,NOT_AUTHORIZED,CONTACT_PANEL,PRICE_CALC,bigd;!function(n,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=n.document?t(n,!0):function(n){if(!n.document)throw new Error("jQuery requires a window with a document");return t(n)}:t(n)}("undefined"!=typeof window?window:this,function(n,t){"use strict";function rr(n,t){t=t||u;var i=t.createElement("script");i.text=n;t.head.appendChild(i).parentNode.removeChild(i)}function fi(n){var t=!!n&&"length"in n&&n.length,r=i.type(n);return"function"!==r&&!i.isWindow(n)&&("array"===r||0===t||"number"==typeof t&&t>0&&t-1 in n)}function l(n,t){return n.nodeName&&n.nodeName.toLowerCase()===t.toLowerCase()}function oi(n,t,r){return i.isFunction(t)?i.grep(n,function(n,i){return!!t.call(n,i,n)!==r}):t.nodeType?i.grep(n,function(n){return n===t!==r}):"string"!=typeof t?i.grep(n,function(n){return ot.call(t,n)>-1!==r}):or.test(t)?i.filter(t,n,r):(t=i.filter(t,n),i.grep(n,function(n){return ot.call(t,n)>-1!==r&&1===n.nodeType}))}function vr(n,t){while((n=n[t])&&1!==n.nodeType);return n}function ne(n){var t={};return i.each(n.match(h)||[],function(n,i){t[i]=!0}),t}function nt(n){return n}function pt(n){throw n;}function yr(n,t,r,u){var f;try{n&&i.isFunction(f=n.promise)?f.call(n).done(t).fail(r):n&&i.isFunction(f=n.then)?f.call(n,t,r):t.apply(void 0,[n].slice(u))}catch(n){r.apply(void 0,[n])}}function bt(){u.removeEventListener("DOMContentLoaded",bt);n.removeEventListener("load",bt);i.ready()}function ht(){this.expando=i.expando+ht.uid++}function re(n){return"true"===n||"false"!==n&&("null"===n?null:n===+n+""?+n:te.test(n)?JSON.parse(n):n)}function wr(n,t,i){var r;if(void 0===i&&1===n.nodeType)if(r="data-"+t.replace(ie,"-$&").toLowerCase(),i=n.getAttribute(r),"string"==typeof i){try{i=re(i)}catch(u){}e.set(n,t,i)}else i=void 0;return i}function dr(n,t,r,u){var h,e=1,l=20,c=u?function(){return u.cur()}:function(){return i.css(n,t,"")},s=c(),o=r&&r[3]||(i.cssNumber[t]?"":"px"),f=(i.cssNumber[t]||"px"!==o&&+s)&&ct.exec(i.css(n,t));if(f&&f[3]!==o){o=o||f[3];r=r||[];f=+s||1;do e=e||".5",f/=e,i.style(n,t,f+o);while(e!==(e=c()/s)&&1!==e&&--l)}return r&&(f=+f||+s||0,h=r[1]?f+(r[1]+1)*r[2]:+r[2],u&&(u.unit=o,u.start=f,u.end=h)),h}function ue(n){var r,f=n.ownerDocument,u=n.nodeName,t=si[u];return t?t:(r=f.body.appendChild(f.createElement(u)),t=i.css(r,"display"),r.parentNode.removeChild(r),"none"===t&&(t="block"),si[u]=t,t)}function tt(n,t){for(var e,u,f=[],i=0,o=n.length;i<o;i++)u=n[i],u.style&&(e=u.style.display,t?("none"===e&&(f[i]=r.get(u,"display")||null,f[i]||(u.style.display="")),""===u.style.display&&kt(u)&&(f[i]=ue(u))):"none"!==e&&(f[i]="none",r.set(u,"display",e)));for(i=0;i<o;i++)null!=f[i]&&(n[i].style.display=f[i]);return n}function o(n,t){var r;return r="undefined"!=typeof n.getElementsByTagName?n.getElementsByTagName(t||"*"):"undefined"!=typeof n.querySelectorAll?n.querySelectorAll(t||"*"):[],void 0===t||t&&l(n,t)?i.merge([n],r):r}function ci(n,t){for(var i=0,u=n.length;i<u;i++)r.set(n[i],"globalEval",!t||r.get(t[i],"globalEval"))}function iu(n,t,r,u,f){for(var e,s,p,a,w,v,h=t.createDocumentFragment(),y=[],l=0,b=n.length;l<b;l++)if(e=n[l],e||0===e)if("object"===i.type(e))i.merge(y,e.nodeType?[e]:e);else if(tu.test(e)){for(s=s||h.appendChild(t.createElement("div")),p=(gr.exec(e)||["",""])[1].toLowerCase(),a=c[p]||c._default,s.innerHTML=a[1]+i.htmlPrefilter(e)+a[2],v=a[0];v--;)s=s.lastChild;i.merge(y,s.childNodes);s=h.firstChild;s.textContent=""}else y.push(t.createTextNode(e));for(h.textContent="",l=0;e=y[l++];)if(u&&i.inArray(e,u)>-1)f&&f.push(e);else if(w=i.contains(e.ownerDocument,e),s=o(h.appendChild(e),"script"),w&&ci(s),r)for(v=0;e=s[v++];)nu.test(e.type||"")&&r.push(e);return h}function gt(){return!0}function it(){return!1}function uu(){try{return u.activeElement}catch(n){}}function li(n,t,r,u,f,e){var o,s;if("object"==typeof t){"string"!=typeof r&&(u=u||r,r=void 0);for(s in t)li(n,s,r,u,t[s],e);return n}if(null==u&&null==f?(f=r,u=r=void 0):null==f&&("string"==typeof r?(f=u,u=void 0):(f=u,u=r,r=void 0)),f===!1)f=it;else if(!f)return n;return 1===e&&(o=f,f=function(n){return i().off(n),o.apply(this,arguments)},f.guid=o.guid||(o.guid=i.guid++)),n.each(function(){i.event.add(this,t,f,u,r)})}function fu(n,t){return l(n,"table")&&l(11!==t.nodeType?t:t.firstChild,"tr")?i(">tbody",n)[0]||n:n}function ae(n){return n.type=(null!==n.getAttribute("type"))+"/"+n.type,n}function ve(n){var t=ce.exec(n.type);return t?n.type=t[1]:n.removeAttribute("type"),n}function eu(n,t){var u,c,f,s,h,l,a,o;if(1===t.nodeType){if(r.hasData(n)&&(s=r.access(n),h=r.set(t,s),o=s.events)){delete h.handle;h.events={};for(f in o)for(u=0,c=o[f].length;u<c;u++)i.event.add(t,f,o[f][u])}e.hasData(n)&&(l=e.access(n),a=i.extend({},l),e.set(t,a))}}function ye(n,t){var i=t.nodeName.toLowerCase();"input"===i&&hi.test(n.type)?t.checked=n.checked:"input"!==i&&"textarea"!==i||(t.defaultValue=n.defaultValue)}function rt(n,t,u,e){t=nr.apply([],t);var l,p,c,a,s,w,h=0,v=n.length,k=v-1,y=t[0],b=i.isFunction(y);if(b||v>1&&"string"==typeof y&&!f.checkClone&&he.test(y))return n.each(function(i){var r=n.eq(i);b&&(t[0]=y.call(this,i,r.html()));rt(r,t,u,e)});if(v&&(l=iu(t,n[0].ownerDocument,!1,n,e),p=l.firstChild,1===l.childNodes.length&&(l=p),p||e)){for(c=i.map(o(l,"script"),ae),a=c.length;h<v;h++)s=l,h!==k&&(s=i.clone(s,!0,!0),a&&i.merge(c,o(s,"script"))),u.call(n[h],s,h);if(a)for(w=c[c.length-1].ownerDocument,i.map(c,ve),h=0;h<a;h++)s=c[h],nu.test(s.type||"")&&!r.access(s,"globalEval")&&i.contains(w,s)&&(s.src?i._evalUrl&&i._evalUrl(s.src):rr(s.textContent.replace(le,""),w))}return n}function ou(n,t,r){for(var u,e=t?i.filter(t,n):n,f=0;null!=(u=e[f]);f++)r||1!==u.nodeType||i.cleanData(o(u)),u.parentNode&&(r&&i.contains(u.ownerDocument,u)&&ci(o(u,"script")),u.parentNode.removeChild(u));return n}function lt(n,t,r){var o,s,h,u,e=n.style;return r=r||ni(n),r&&(u=r.getPropertyValue(t)||r[t],""!==u||i.contains(n.ownerDocument,n)||(u=i.style(n,t)),!f.pixelMarginRight()&&ai.test(u)&&su.test(t)&&(o=e.width,s=e.minWidth,h=e.maxWidth,e.minWidth=e.maxWidth=e.width=u,u=r.width,e.width=o,e.minWidth=s,e.maxWidth=h)),void 0!==u?u+"":u}function hu(n,t){return{get:function(){return n()?void delete this.get:(this.get=t).apply(this,arguments)}}}function be(n){if(n in vu)return n;for(var i=n[0].toUpperCase()+n.slice(1),t=au.length;t--;)if(n=au[t]+i,n in vu)return n}function yu(n){var t=i.cssProps[n];return t||(t=i.cssProps[n]=be(n)||n),t}function pu(n,t,i){var r=ct.exec(t);return r?Math.max(0,r[2]-(i||0))+(r[3]||"px"):t}function wu(n,t,r,u,f){for(var o=0,e=r===(u?"border":"content")?4:"width"===t?1:0;e<4;e+=2)"margin"===r&&(o+=i.css(n,r+b[e],!0,f)),u?("content"===r&&(o-=i.css(n,"padding"+b[e],!0,f)),"margin"!==r&&(o-=i.css(n,"border"+b[e]+"Width",!0,f))):(o+=i.css(n,"padding"+b[e],!0,f),"padding"!==r&&(o+=i.css(n,"border"+b[e]+"Width",!0,f)));return o}function bu(n,t,r){var o,e=ni(n),u=lt(n,t,e),s="border-box"===i.css(n,"boxSizing",!1,e);return ai.test(u)?u:(o=s&&(f.boxSizingReliable()||u===n.style[t]),u=parseFloat(u)||0,u+wu(n,t,r||(s?"border":"content"),o,e)+"px")}function s(n,t,i,r,u){return new s.prototype.init(n,t,i,r,u)}function vi(){ti&&(u.hidden===!1&&n.requestAnimationFrame?n.requestAnimationFrame(vi):n.setTimeout(vi,i.fx.interval),i.fx.tick())}function gu(){return n.setTimeout(function(){ut=void 0}),ut=i.now()}function ii(n,t){var r,u=0,i={height:n};for(t=t?1:0;u<4;u+=2-t)r=b[u],i["margin"+r]=i["padding"+r]=n;return t&&(i.opacity=i.width=n),i}function nf(n,t,i){for(var u,f=(a.tweeners[t]||[]).concat(a.tweeners["*"]),r=0,e=f.length;r<e;r++)if(u=f[r].call(i,t,n))return u}function ke(n,t,u){var f,y,w,c,b,s,o,l,k="width"in t||"height"in t,v=this,p={},h=n.style,a=n.nodeType&&kt(n),e=r.get(n,"fxshow");u.queue||(c=i._queueHooks(n,"fx"),null==c.unqueued&&(c.unqueued=0,b=c.empty.fire,c.empty.fire=function(){c.unqueued||b()}),c.unqueued++,v.always(function(){v.always(function(){c.unqueued--;i.queue(n,"fx").length||c.empty.fire()})}));for(f in t)if(y=t[f],ku.test(y)){if(delete t[f],w=w||"toggle"===y,y===(a?"hide":"show")){if("show"!==y||!e||void 0===e[f])continue;a=!0}p[f]=e&&e[f]||i.style(n,f)}if(s=!i.isEmptyObject(t),s||!i.isEmptyObject(p)){k&&1===n.nodeType&&(u.overflow=[h.overflow,h.overflowX,h.overflowY],o=e&&e.display,null==o&&(o=r.get(n,"display")),l=i.css(n,"display"),"none"===l&&(o?l=o:(tt([n],!0),o=n.style.display||o,l=i.css(n,"display"),tt([n]))),("inline"===l||"inline-block"===l&&null!=o)&&"none"===i.css(n,"float")&&(s||(v.done(function(){h.display=o}),null==o&&(l=h.display,o="none"===l?"":l)),h.display="inline-block"));u.overflow&&(h.overflow="hidden",v.always(function(){h.overflow=u.overflow[0];h.overflowX=u.overflow[1];h.overflowY=u.overflow[2]}));s=!1;for(f in p)s||(e?"hidden"in e&&(a=e.hidden):e=r.access(n,"fxshow",{display:o}),w&&(e.hidden=!a),a&&tt([n],!0),v.done(function(){a||tt([n]);r.remove(n,"fxshow");for(f in p)i.style(n,f,p[f])})),s=nf(a?e[f]:0,f,v),f in e||(e[f]=s.start,a&&(s.end=s.start,s.start=0))}}function de(n,t){var r,f,e,u,o;for(r in n)if(f=i.camelCase(r),e=t[f],u=n[r],Array.isArray(u)&&(e=u[1],u=n[r]=u[0]),r!==f&&(n[f]=u,delete n[r]),o=i.cssHooks[f],o&&"expand"in o){u=o.expand(u);delete n[f];for(r in u)r in n||(n[r]=u[r],t[r]=e)}else t[f]=e}function a(n,t,r){var e,o,s=0,l=a.prefilters.length,f=i.Deferred().always(function(){delete c.elem}),c=function(){if(o)return!1;for(var s=ut||gu(),t=Math.max(0,u.startTime+u.duration-s),h=t/u.duration||0,i=1-h,r=0,e=u.tweens.length;r<e;r++)u.tweens[r].run(i);return f.notifyWith(n,[u,i,t]),i<1&&e?t:(e||f.notifyWith(n,[u,1,0]),f.resolveWith(n,[u]),!1)},u=f.promise({elem:n,props:i.extend({},t),opts:i.extend(!0,{specialEasing:{},easing:i.easing._default},r),originalProperties:t,originalOptions:r,startTime:ut||gu(),duration:r.duration,tweens:[],createTween:function(t,r){var f=i.Tween(n,u.opts,t,r,u.opts.specialEasing[t]||u.opts.easing);return u.tweens.push(f),f},stop:function(t){var i=0,r=t?u.tweens.length:0;if(o)return this;for(o=!0;i<r;i++)u.tweens[i].run(1);return t?(f.notifyWith(n,[u,1,0]),f.resolveWith(n,[u,t])):f.rejectWith(n,[u,t]),this}}),h=u.props;for(de(h,u.opts.specialEasing);s<l;s++)if(e=a.prefilters[s].call(u,n,h,u.opts))return i.isFunction(e.stop)&&(i._queueHooks(u.elem,u.opts.queue).stop=i.proxy(e.stop,e)),e;return i.map(h,nf,u),i.isFunction(u.opts.start)&&u.opts.start.call(n,u),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always),i.fx.timer(i.extend(c,{elem:n,anim:u,queue:u.opts.queue})),u}function k(n){var t=n.match(h)||[];return t.join(" ")}function d(n){return n.getAttribute&&n.getAttribute("class")||""}function wi(n,t,r,u){var f;if(Array.isArray(t))i.each(t,function(t,i){r||ge.test(n)?u(n,i):wi(n+"["+("object"==typeof i&&null!=i?t:"")+"]",i,r,u)});else if(r||"object"!==i.type(t))u(n,t);else for(f in t)wi(n+"["+f+"]",t[f],r,u)}function cf(n){return function(t,r){"string"!=typeof t&&(r=t,t="*");var u,f=0,e=t.toLowerCase().match(h)||[];if(i.isFunction(r))while(u=e[f++])"+"===u[0]?(u=u.slice(1)||"*",(n[u]=n[u]||[]).unshift(r)):(n[u]=n[u]||[]).push(r)}}function lf(n,t,r,u){function e(s){var h;return f[s]=!0,i.each(n[s]||[],function(n,i){var s=i(t,r,u);return"string"!=typeof s||o||f[s]?o?!(h=s):void 0:(t.dataTypes.unshift(s),e(s),!1)}),h}var f={},o=n===bi;return e(t.dataTypes[0])||!f["*"]&&e("*")}function di(n,t){var r,u,f=i.ajaxSettings.flatOptions||{};for(r in t)void 0!==t[r]&&((f[r]?n:u||(u={}))[r]=t[r]);return u&&i.extend(!0,n,u),n}function so(n,t,i){for(var e,u,f,o,s=n.contents,r=n.dataTypes;"*"===r[0];)r.shift(),void 0===e&&(e=n.mimeType||t.getResponseHeader("Content-Type"));if(e)for(u in s)if(s[u]&&s[u].test(e)){r.unshift(u);break}if(r[0]in i)f=r[0];else{for(u in i){if(!r[0]||n.converters[u+" "+r[0]]){f=u;break}o||(o=u)}f=f||o}if(f)return f!==r[0]&&r.unshift(f),i[f]}function ho(n,t,i,r){var h,u,f,s,e,o={},c=n.dataTypes.slice();if(c[1])for(f in n.converters)o[f.toLowerCase()]=n.converters[f];for(u=c.shift();u;)if(n.responseFields[u]&&(i[n.responseFields[u]]=t),!e&&r&&n.dataFilter&&(t=n.dataFilter(t,n.dataType)),e=u,u=c.shift())if("*"===u)u=e;else if("*"!==e&&e!==u){if(f=o[e+" "+u]||o["* "+u],!f)for(h in o)if(s=h.split(" "),s[1]===u&&(f=o[e+" "+s[0]]||o["* "+s[0]])){f===!0?f=o[h]:o[h]!==!0&&(u=s[0],c.unshift(s[1]));break}if(f!==!0)if(f&&n.throws)t=f(t);else try{t=f(t)}catch(l){return{state:"parsererror",error:f?l:"No conversion from "+e+" to "+u}}}return{state:"success",data:t}}var p=[],u=n.document,pf=Object.getPrototypeOf,w=p.slice,nr=p.concat,ui=p.push,ot=p.indexOf,vt={},tr=vt.toString,yt=vt.hasOwnProperty,ir=yt.toString,wf=ir.call(Object),f={},ur="3.2.0",i=function(n,t){return new i.fn.init(n,t)},bf=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,kf=/^-ms-/,df=/-([a-z])/g,gf=function(n,t){return t.toUpperCase()},y,ei,or,sr,hr,cr,lr,ar,h,pr,wt,v,st,si,tu,ut,ti,ku,du,tf,ft,rf,uf,ff,yi,af,et,gi,ri,vf,yf;i.fn=i.prototype={jquery:ur,constructor:i,length:0,toArray:function(){return w.call(this)},get:function(n){return null==n?w.call(this):n<0?this[n+this.length]:this[n]},pushStack:function(n){var t=i.merge(this.constructor(),n);return t.prevObject=this,t},each:function(n){return i.each(this,n)},map:function(n){return this.pushStack(i.map(this,function(t,i){return n.call(t,i,t)}))},slice:function(){return this.pushStack(w.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(n){var i=this.length,t=+n+(n<0?i:0);return this.pushStack(t>=0&&t<i?[this[t]]:[])},end:function(){return this.prevObject||this.constructor()},push:ui,sort:p.sort,splice:p.splice};i.extend=i.fn.extend=function(){var e,f,r,t,o,s,n=arguments[0]||{},u=1,c=arguments.length,h=!1;for("boolean"==typeof n&&(h=n,n=arguments[u]||{},u++),"object"==typeof n||i.isFunction(n)||(n={}),u===c&&(n=this,u--);u<c;u++)if(null!=(e=arguments[u]))for(f in e)r=n[f],t=e[f],n!==t&&(h&&t&&(i.isPlainObject(t)||(o=Array.isArray(t)))?(o?(o=!1,s=r&&Array.isArray(r)?r:[]):s=r&&i.isPlainObject(r)?r:{},n[f]=i.extend(h,s,t)):void 0!==t&&(n[f]=t));return n};i.extend({expando:"jQuery"+(ur+Math.random()).replace(/\D/g,""),isReady:!0,error:function(n){throw new Error(n);},noop:function(){},isFunction:function(n){return"function"===i.type(n)},isWindow:function(n){return null!=n&&n===n.window},isNumeric:function(n){var t=i.type(n);return("number"===t||"string"===t)&&!isNaN(n-parseFloat(n))},isPlainObject:function(n){var t,i;return!(!n||"[object Object]"!==tr.call(n))&&(!(t=pf(n))||(i=yt.call(t,"constructor")&&t.constructor,"function"==typeof i&&ir.call(i)===wf))},isEmptyObject:function(n){var t;for(t in n)return!1;return!0},type:function(n){return null==n?n+"":"object"==typeof n||"function"==typeof n?vt[tr.call(n)]||"object":typeof n},globalEval:function(n){rr(n)},camelCase:function(n){return n.replace(kf,"ms-").replace(df,gf)},each:function(n,t){var r,i=0;if(fi(n)){for(r=n.length;i<r;i++)if(t.call(n[i],i,n[i])===!1)break}else for(i in n)if(t.call(n[i],i,n[i])===!1)break;return n},trim:function(n){return null==n?"":(n+"").replace(bf,"")},makeArray:function(n,t){var r=t||[];return null!=n&&(fi(Object(n))?i.merge(r,"string"==typeof n?[n]:n):ui.call(r,n)),r},inArray:function(n,t,i){return null==t?-1:ot.call(t,n,i)},merge:function(n,t){for(var u=+t.length,i=0,r=n.length;i<u;i++)n[r++]=t[i];return n.length=r,n},grep:function(n,t,i){for(var u,f=[],r=0,e=n.length,o=!i;r<e;r++)u=!t(n[r],r),u!==o&&f.push(n[r]);return f},map:function(n,t,i){var e,u,r=0,f=[];if(fi(n))for(e=n.length;r<e;r++)u=t(n[r],r,i),null!=u&&f.push(u);else for(r in n)u=t(n[r],r,i),null!=u&&f.push(u);return nr.apply([],f)},guid:1,proxy:function(n,t){var u,f,r;if("string"==typeof t&&(u=n[t],t=n,n=u),i.isFunction(n))return f=w.call(arguments,2),r=function(){return n.apply(t||this,f.concat(w.call(arguments)))},r.guid=n.guid=n.guid||i.guid++,r},now:Date.now,support:f});"function"==typeof Symbol&&(i.fn[Symbol.iterator]=p[Symbol.iterator]);i.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(n,t){vt["[object "+t+"]"]=t.toLowerCase()});y=function(n){function u(n,t,r,u){var s,w,l,a,d,y,g,p=t&&t.ownerDocument,v=t?t.nodeType:9;if(r=r||[],"string"!=typeof n||!n||1!==v&&9!==v&&11!==v)return r;if(!u&&((t?t.ownerDocument||t:c)!==i&&b(t),t=t||i,h)){if(11!==v&&(d=cr.exec(n)))if(s=d[1]){if(9===v){if(!(l=t.getElementById(s)))return r;if(l.id===s)return r.push(l),r}else if(p&&(l=p.getElementById(s))&&et(t,l)&&l.id===s)return r.push(l),r}else{if(d[2])return k.apply(r,t.getElementsByTagName(n)),r;if((s=d[3])&&e.getElementsByClassName&&t.getElementsByClassName)return k.apply(r,t.getElementsByClassName(s)),r}if(e.qsa&&!lt[n+" "]&&(!o||!o.test(n))){if(1!==v)p=t,g=n;else if("object"!==t.nodeName.toLowerCase()){for((a=t.getAttribute("id"))?a=a.replace(vi,yi):t.setAttribute("id",a=f),y=ft(n),w=y.length;w--;)y[w]="#"+a+" "+yt(y[w]);g=y.join(",");p=ni.test(n)&&ri(t.parentNode)||t}if(g)try{return k.apply(r,p.querySelectorAll(g)),r}catch(nt){}finally{a===f&&t.removeAttribute("id")}}}return si(n.replace(at,"$1"),t,r,u)}function ti(){function n(r,u){return i.push(r+" ")>t.cacheLength&&delete n[i.shift()],n[r+" "]=u}var i=[];return n}function l(n){return n[f]=!0,n}function a(n){var t=i.createElement("fieldset");try{return!!n(t)}catch(r){return!1}finally{t.parentNode&&t.parentNode.removeChild(t);t=null}}function ii(n,i){for(var r=n.split("|"),u=r.length;u--;)t.attrHandle[r[u]]=i}function wi(n,t){var i=t&&n,r=i&&1===n.nodeType&&1===t.nodeType&&n.sourceIndex-t.sourceIndex;if(r)return r;if(i)while(i=i.nextSibling)if(i===t)return-1;return n?1:-1}function ar(n){return function(t){var i=t.nodeName.toLowerCase();return"input"===i&&t.type===n}}function vr(n){return function(t){var i=t.nodeName.toLowerCase();return("input"===i||"button"===i)&&t.type===n}}function bi(n){return function(t){return"form"in t?t.parentNode&&t.disabled===!1?"label"in t?"label"in t.parentNode?t.parentNode.disabled===n:t.disabled===n:t.isDisabled===n||t.isDisabled!==!n&&lr(t)===n:t.disabled===n:"label"in t&&t.disabled===n}}function it(n){return l(function(t){return t=+t,l(function(i,r){for(var u,f=n([],i.length,t),e=f.length;e--;)i[u=f[e]]&&(i[u]=!(r[u]=i[u]))})})}function ri(n){return n&&"undefined"!=typeof n.getElementsByTagName&&n}function ki(){}function yt(n){for(var t=0,r=n.length,i="";t<r;t++)i+=n[t].value;return i}function pt(n,t,i){var r=t.dir,u=t.next,e=u||r,o=i&&"parentNode"===e,s=di++;return t.first?function(t,i,u){while(t=t[r])if(1===t.nodeType||o)return n(t,i,u);return!1}:function(t,i,h){var c,l,a,y=[v,s];if(h){while(t=t[r])if((1===t.nodeType||o)&&n(t,i,h))return!0}else while(t=t[r])if(1===t.nodeType||o)if(a=t[f]||(t[f]={}),l=a[t.uniqueID]||(a[t.uniqueID]={}),u&&u===t.nodeName.toLowerCase())t=t[r]||t;else{if((c=l[e])&&c[0]===v&&c[1]===s)return y[2]=c[2];if(l[e]=y,y[2]=n(t,i,h))return!0}return!1}}function ui(n){return n.length>1?function(t,i,r){for(var u=n.length;u--;)if(!n[u](t,i,r))return!1;return!0}:n[0]}function yr(n,t,i){for(var r=0,f=t.length;r<f;r++)u(n,t[r],i);return i}function wt(n,t,i,r,u){for(var e,o=[],f=0,s=n.length,h=null!=t;f<s;f++)(e=n[f])&&(i&&!i(e,r,u)||(o.push(e),h&&t.push(f)));return o}function fi(n,t,i,r,u,e){return r&&!r[f]&&(r=fi(r)),u&&!u[f]&&(u=fi(u,e)),l(function(f,e,o,s){var l,c,a,p=[],y=[],w=e.length,b=f||yr(t||"*",o.nodeType?[o]:o,[]),v=!n||!f&&t?b:wt(b,p,n,o,s),h=i?u||(f?n:w||r)?[]:e:v;if(i&&i(v,h,o,s),r)for(l=wt(h,y),r(l,[],o,s),c=l.length;c--;)(a=l[c])&&(h[y[c]]=!(v[y[c]]=a));if(f){if(u||n){if(u){for(l=[],c=h.length;c--;)(a=h[c])&&l.push(v[c]=a);u(null,h=[],l,s)}for(c=h.length;c--;)(a=h[c])&&(l=u?nt(f,a):p[c])>-1&&(f[l]=!(e[l]=a))}}else h=wt(h===e?h.splice(w,h.length):h),u?u(null,e,h,s):k.apply(e,h)})}function ei(n){for(var o,u,r,s=n.length,h=t.relative[n[0].type],c=h||t.relative[" "],i=h?1:0,l=pt(function(n){return n===o},c,!0),a=pt(function(n){return nt(o,n)>-1},c,!0),e=[function(n,t,i){var r=!h&&(i||t!==ht)||((o=t).nodeType?l(n,t,i):a(n,t,i));return o=null,r}];i<s;i++)if(u=t.relative[n[i].type])e=[pt(ui(e),u)];else{if(u=t.filter[n[i].type].apply(null,n[i].matches),u[f]){for(r=++i;r<s;r++)if(t.relative[n[r].type])break;return fi(i>1&&ui(e),i>1&&yt(n.slice(0,i-1).concat({value:" "===n[i-2].type?"*":""})).replace(at,"$1"),u,i<r&&ei(n.slice(i,r)),r<s&&ei(n=n.slice(r)),r<s&&yt(n))}e.push(u)}return ui(e)}function pr(n,r){var f=r.length>0,e=n.length>0,o=function(o,s,c,l,a){var y,nt,d,g=0,p="0",tt=o&&[],w=[],it=ht,rt=o||e&&t.find.TAG("*",a),ut=v+=null==it?1:Math.random()||.1,ft=rt.length;for(a&&(ht=s===i||s||a);p!==ft&&null!=(y=rt[p]);p++){if(e&&y){for(nt=0,s||y.ownerDocument===i||(b(y),c=!h);d=n[nt++];)if(d(y,s||i,c)){l.push(y);break}a&&(v=ut)}f&&((y=!d&&y)&&g--,o&&tt.push(y))}if(g+=p,f&&p!==g){for(nt=0;d=r[nt++];)d(tt,w,s,c);if(o){if(g>0)while(p--)tt[p]||w[p]||(w[p]=nr.call(l));w=wt(w)}k.apply(l,w);a&&!o&&w.length>0&&g+r.length>1&&u.uniqueSort(l)}return a&&(v=ut,ht=it),tt};return f?l(o):o}var rt,e,t,st,oi,ft,bt,si,ht,w,ut,b,i,s,h,o,d,ct,et,f="sizzle"+1*new Date,c=n.document,v=0,di=0,hi=ti(),ci=ti(),lt=ti(),kt=function(n,t){return n===t&&(ut=!0),0},gi={}.hasOwnProperty,g=[],nr=g.pop,tr=g.push,k=g.push,li=g.slice,nt=function(n,t){for(var i=0,r=n.length;i<r;i++)if(n[i]===t)return i;return-1},dt="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",r="[\\x20\\t\\r\\n\\f]",tt="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",ai="\\["+r+"*("+tt+")(?:"+r+"*([*^$|!~]?=)"+r+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+tt+"))|)"+r+"*\\]",gt=":("+tt+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+ai+")*)|.*)\\)|)",ir=new RegExp(r+"+","g"),at=new RegExp("^"+r+"+|((?:^|[^\\\\])(?:\\\\.)*)"+r+"+$","g"),rr=new RegExp("^"+r+"*,"+r+"*"),ur=new RegExp("^"+r+"*([>+~]|"+r+")"+r+"*"),fr=new RegExp("="+r+"*([^\\]'\"]*?)"+r+"*\\]","g"),er=new RegExp(gt),or=new RegExp("^"+tt+"$"),vt={ID:new RegExp("^#("+tt+")"),CLASS:new RegExp("^\\.("+tt+")"),TAG:new RegExp("^("+tt+"|[*])"),ATTR:new RegExp("^"+ai),PSEUDO:new RegExp("^"+gt),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+r+"*(even|odd|(([+-]|)(\\d*)n|)"+r+"*(?:([+-]|)"+r+"*(\\d+)|))"+r+"*\\)|)","i"),bool:new RegExp("^(?:"+dt+")$","i"),needsContext:new RegExp("^"+r+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+r+"*((?:-\\d)?\\d*)"+r+"*\\)|)(?=[^-]|$)","i")},sr=/^(?:input|select|textarea|button)$/i,hr=/^h\d$/i,ot=/^[^{]+\{\s*\[native \w/,cr=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ni=/[+~]/,y=new RegExp("\\\\([\\da-f]{1,6}"+r+"?|("+r+")|.)","ig"),p=function(n,t,i){var r="0x"+t-65536;return r!==r||i?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},vi=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,yi=function(n,t){return t?"\0"===n?"�":n.slice(0,-1)+"\\"+n.charCodeAt(n.length-1).toString(16)+" ":"\\"+n},pi=function(){b()},lr=pt(function(n){return n.disabled===!0&&("form"in n||"label"in n)},{dir:"parentNode",next:"legend"});try{k.apply(g=li.call(c.childNodes),c.childNodes);g[c.childNodes.length].nodeType}catch(wr){k={apply:g.length?function(n,t){tr.apply(n,li.call(t))}:function(n,t){for(var i=n.length,r=0;n[i++]=t[r++];);n.length=i-1}}}e=u.support={};oi=u.isXML=function(n){var t=n&&(n.ownerDocument||n).documentElement;return!!t&&"HTML"!==t.nodeName};b=u.setDocument=function(n){var v,u,l=n?n.ownerDocument||n:c;return l!==i&&9===l.nodeType&&l.documentElement?(i=l,s=i.documentElement,h=!oi(i),c!==i&&(u=i.defaultView)&&u.top!==u&&(u.addEventListener?u.addEventListener("unload",pi,!1):u.attachEvent&&u.attachEvent("onunload",pi)),e.attributes=a(function(n){return n.className="i",!n.getAttribute("className")}),e.getElementsByTagName=a(function(n){return n.appendChild(i.createComment("")),!n.getElementsByTagName("*").length}),e.getElementsByClassName=ot.test(i.getElementsByClassName),e.getById=a(function(n){return s.appendChild(n).id=f,!i.getElementsByName||!i.getElementsByName(f).length}),e.getById?(t.filter.ID=function(n){var t=n.replace(y,p);return function(n){return n.getAttribute("id")===t}},t.find.ID=function(n,t){if("undefined"!=typeof t.getElementById&&h){var i=t.getElementById(n);return i?[i]:[]}}):(t.filter.ID=function(n){var t=n.replace(y,p);return function(n){var i="undefined"!=typeof n.getAttributeNode&&n.getAttributeNode("id");return i&&i.value===t}},t.find.ID=function(n,t){if("undefined"!=typeof t.getElementById&&h){var i,u,f,r=t.getElementById(n);if(r){if(i=r.getAttributeNode("id"),i&&i.value===n)return[r];for(f=t.getElementsByName(n),u=0;r=f[u++];)if(i=r.getAttributeNode("id"),i&&i.value===n)return[r]}return[]}}),t.find.TAG=e.getElementsByTagName?function(n,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(n):e.qsa?t.querySelectorAll(n):void 0}:function(n,t){var i,r=[],f=0,u=t.getElementsByTagName(n);if("*"===n){while(i=u[f++])1===i.nodeType&&r.push(i);return r}return u},t.find.CLASS=e.getElementsByClassName&&function(n,t){if("undefined"!=typeof t.getElementsByClassName&&h)return t.getElementsByClassName(n)},d=[],o=[],(e.qsa=ot.test(i.querySelectorAll))&&(a(function(n){s.appendChild(n).innerHTML="<a id='"+f+"'><\/a><select id='"+f+"-\r\\' msallowcapture=''><option selected=''><\/option><\/select>";n.querySelectorAll("[msallowcapture^='']").length&&o.push("[*^$]="+r+"*(?:''|\"\")");n.querySelectorAll("[selected]").length||o.push("\\["+r+"*(?:value|"+dt+")");n.querySelectorAll("[id~="+f+"-]").length||o.push("~=");n.querySelectorAll(":checked").length||o.push(":checked");n.querySelectorAll("a#"+f+"+*").length||o.push(".#.+[+~]")}),a(function(n){n.innerHTML="<a href='' disabled='disabled'><\/a><select disabled='disabled'><option/><\/select>";var t=i.createElement("input");t.setAttribute("type","hidden");n.appendChild(t).setAttribute("name","D");n.querySelectorAll("[name=d]").length&&o.push("name"+r+"*[*^$|!~]?=");2!==n.querySelectorAll(":enabled").length&&o.push(":enabled",":disabled");s.appendChild(n).disabled=!0;2!==n.querySelectorAll(":disabled").length&&o.push(":enabled",":disabled");n.querySelectorAll("*,:x");o.push(",.*:")})),(e.matchesSelector=ot.test(ct=s.matches||s.webkitMatchesSelector||s.mozMatchesSelector||s.oMatchesSelector||s.msMatchesSelector))&&a(function(n){e.disconnectedMatch=ct.call(n,"*");ct.call(n,"[s!='']:x");d.push("!=",gt)}),o=o.length&&new RegExp(o.join("|")),d=d.length&&new RegExp(d.join("|")),v=ot.test(s.compareDocumentPosition),et=v||ot.test(s.contains)?function(n,t){var r=9===n.nodeType?n.documentElement:n,i=t&&t.parentNode;return n===i||!(!i||1!==i.nodeType||!(r.contains?r.contains(i):n.compareDocumentPosition&&16&n.compareDocumentPosition(i)))}:function(n,t){if(t)while(t=t.parentNode)if(t===n)return!0;return!1},kt=v?function(n,t){if(n===t)return ut=!0,0;var r=!n.compareDocumentPosition-!t.compareDocumentPosition;return r?r:(r=(n.ownerDocument||n)===(t.ownerDocument||t)?n.compareDocumentPosition(t):1,1&r||!e.sortDetached&&t.compareDocumentPosition(n)===r?n===i||n.ownerDocument===c&&et(c,n)?-1:t===i||t.ownerDocument===c&&et(c,t)?1:w?nt(w,n)-nt(w,t):0:4&r?-1:1)}:function(n,t){if(n===t)return ut=!0,0;var r,u=0,o=n.parentNode,s=t.parentNode,f=[n],e=[t];if(!o||!s)return n===i?-1:t===i?1:o?-1:s?1:w?nt(w,n)-nt(w,t):0;if(o===s)return wi(n,t);for(r=n;r=r.parentNode;)f.unshift(r);for(r=t;r=r.parentNode;)e.unshift(r);while(f[u]===e[u])u++;return u?wi(f[u],e[u]):f[u]===c?-1:e[u]===c?1:0},i):i};u.matches=function(n,t){return u(n,null,null,t)};u.matchesSelector=function(n,t){if((n.ownerDocument||n)!==i&&b(n),t=t.replace(fr,"='$1']"),e.matchesSelector&&h&&!lt[t+" "]&&(!d||!d.test(t))&&(!o||!o.test(t)))try{var r=ct.call(n,t);if(r||e.disconnectedMatch||n.document&&11!==n.document.nodeType)return r}catch(f){}return u(t,i,null,[n]).length>0};u.contains=function(n,t){return(n.ownerDocument||n)!==i&&b(n),et(n,t)};u.attr=function(n,r){(n.ownerDocument||n)!==i&&b(n);var f=t.attrHandle[r.toLowerCase()],u=f&&gi.call(t.attrHandle,r.toLowerCase())?f(n,r,!h):void 0;return void 0!==u?u:e.attributes||!h?n.getAttribute(r):(u=n.getAttributeNode(r))&&u.specified?u.value:null};u.escape=function(n){return(n+"").replace(vi,yi)};u.error=function(n){throw new Error("Syntax error, unrecognized expression: "+n);};u.uniqueSort=function(n){var r,u=[],t=0,i=0;if(ut=!e.detectDuplicates,w=!e.sortStable&&n.slice(0),n.sort(kt),ut){while(r=n[i++])r===n[i]&&(t=u.push(i));while(t--)n.splice(u[t],1)}return w=null,n};st=u.getText=function(n){var r,i="",u=0,t=n.nodeType;if(t){if(1===t||9===t||11===t){if("string"==typeof n.textContent)return n.textContent;for(n=n.firstChild;n;n=n.nextSibling)i+=st(n)}else if(3===t||4===t)return n.nodeValue}else while(r=n[u++])i+=st(r);return i};t=u.selectors={cacheLength:50,createPseudo:l,match:vt,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(n){return n[1]=n[1].replace(y,p),n[3]=(n[3]||n[4]||n[5]||"").replace(y,p),"~="===n[2]&&(n[3]=" "+n[3]+" "),n.slice(0,4)},CHILD:function(n){return n[1]=n[1].toLowerCase(),"nth"===n[1].slice(0,3)?(n[3]||u.error(n[0]),n[4]=+(n[4]?n[5]+(n[6]||1):2*("even"===n[3]||"odd"===n[3])),n[5]=+(n[7]+n[8]||"odd"===n[3])):n[3]&&u.error(n[0]),n},PSEUDO:function(n){var i,t=!n[6]&&n[2];return vt.CHILD.test(n[0])?null:(n[3]?n[2]=n[4]||n[5]||"":t&&er.test(t)&&(i=ft(t,!0))&&(i=t.indexOf(")",t.length-i)-t.length)&&(n[0]=n[0].slice(0,i),n[2]=t.slice(0,i)),n.slice(0,3))}},filter:{TAG:function(n){var t=n.replace(y,p).toLowerCase();return"*"===n?function(){return!0}:function(n){return n.nodeName&&n.nodeName.toLowerCase()===t}},CLASS:function(n){var t=hi[n+" "];return t||(t=new RegExp("(^|"+r+")"+n+"("+r+"|$)"))&&hi(n,function(n){return t.test("string"==typeof n.className&&n.className||"undefined"!=typeof n.getAttribute&&n.getAttribute("class")||"")})},ATTR:function(n,t,i){return function(r){var f=u.attr(r,n);return null==f?"!="===t:!t||(f+="","="===t?f===i:"!="===t?f!==i:"^="===t?i&&0===f.indexOf(i):"*="===t?i&&f.indexOf(i)>-1:"$="===t?i&&f.slice(-i.length)===i:"~="===t?(" "+f.replace(ir," ")+" ").indexOf(i)>-1:"|="===t&&(f===i||f.slice(0,i.length+1)===i+"-"))}},CHILD:function(n,t,i,r,u){var s="nth"!==n.slice(0,3),o="last"!==n.slice(-4),e="of-type"===t;return 1===r&&0===u?function(n){return!!n.parentNode}:function(t,i,h){var p,w,y,c,a,b,k=s!==o?"nextSibling":"previousSibling",d=t.parentNode,nt=e&&t.nodeName.toLowerCase(),g=!h&&!e,l=!1;if(d){if(s){while(k){for(c=t;c=c[k];)if(e?c.nodeName.toLowerCase()===nt:1===c.nodeType)return!1;b=k="only"===n&&!b&&"nextSibling"}return!0}if(b=[o?d.firstChild:d.lastChild],o&&g){for(c=d,y=c[f]||(c[f]={}),w=y[c.uniqueID]||(y[c.uniqueID]={}),p=w[n]||[],a=p[0]===v&&p[1],l=a&&p[2],c=a&&d.childNodes[a];c=++a&&c&&c[k]||(l=a=0)||b.pop();)if(1===c.nodeType&&++l&&c===t){w[n]=[v,a,l];break}}else if(g&&(c=t,y=c[f]||(c[f]={}),w=y[c.uniqueID]||(y[c.uniqueID]={}),p=w[n]||[],a=p[0]===v&&p[1],l=a),l===!1)while(c=++a&&c&&c[k]||(l=a=0)||b.pop())if((e?c.nodeName.toLowerCase()===nt:1===c.nodeType)&&++l&&(g&&(y=c[f]||(c[f]={}),w=y[c.uniqueID]||(y[c.uniqueID]={}),w[n]=[v,l]),c===t))break;return l-=u,l===r||l%r==0&&l/r>=0}}},PSEUDO:function(n,i){var e,r=t.pseudos[n]||t.setFilters[n.toLowerCase()]||u.error("unsupported pseudo: "+n);return r[f]?r(i):r.length>1?(e=[n,n,"",i],t.setFilters.hasOwnProperty(n.toLowerCase())?l(function(n,t){for(var u,f=r(n,i),e=f.length;e--;)u=nt(n,f[e]),n[u]=!(t[u]=f[e])}):function(n){return r(n,0,e)}):r}},pseudos:{not:l(function(n){var t=[],r=[],i=bt(n.replace(at,"$1"));return i[f]?l(function(n,t,r,u){for(var e,o=i(n,null,u,[]),f=n.length;f--;)(e=o[f])&&(n[f]=!(t[f]=e))}):function(n,u,f){return t[0]=n,i(t,null,f,r),t[0]=null,!r.pop()}}),has:l(function(n){return function(t){return u(n,t).length>0}}),contains:l(function(n){return n=n.replace(y,p),function(t){return(t.textContent||t.innerText||st(t)).indexOf(n)>-1}}),lang:l(function(n){return or.test(n||"")||u.error("unsupported lang: "+n),n=n.replace(y,p).toLowerCase(),function(t){var i;do if(i=h?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return i=i.toLowerCase(),i===n||0===i.indexOf(n+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var i=n.location&&n.location.hash;return i&&i.slice(1)===t.id},root:function(n){return n===s},focus:function(n){return n===i.activeElement&&(!i.hasFocus||i.hasFocus())&&!!(n.type||n.href||~n.tabIndex)},enabled:bi(!1),disabled:bi(!0),checked:function(n){var t=n.nodeName.toLowerCase();return"input"===t&&!!n.checked||"option"===t&&!!n.selected},selected:function(n){return n.parentNode&&n.parentNode.selectedIndex,n.selected===!0},empty:function(n){for(n=n.firstChild;n;n=n.nextSibling)if(n.nodeType<6)return!1;return!0},parent:function(n){return!t.pseudos.empty(n)},header:function(n){return hr.test(n.nodeName)},input:function(n){return sr.test(n.nodeName)},button:function(n){var t=n.nodeName.toLowerCase();return"input"===t&&"button"===n.type||"button"===t},text:function(n){var t;return"input"===n.nodeName.toLowerCase()&&"text"===n.type&&(null==(t=n.getAttribute("type"))||"text"===t.toLowerCase())},first:it(function(){return[0]}),last:it(function(n,t){return[t-1]}),eq:it(function(n,t,i){return[i<0?i+t:i]}),even:it(function(n,t){for(var i=0;i<t;i+=2)n.push(i);return n}),odd:it(function(n,t){for(var i=1;i<t;i+=2)n.push(i);return n}),lt:it(function(n,t,i){for(var r=i<0?i+t:i;--r>=0;)n.push(r);return n}),gt:it(function(n,t,i){for(var r=i<0?i+t:i;++r<t;)n.push(r);return n})}};t.pseudos.nth=t.pseudos.eq;for(rt in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})t.pseudos[rt]=ar(rt);for(rt in{submit:!0,reset:!0})t.pseudos[rt]=vr(rt);return ki.prototype=t.filters=t.pseudos,t.setFilters=new ki,ft=u.tokenize=function(n,i){var e,f,s,o,r,h,c,l=ci[n+" "];if(l)return i?0:l.slice(0);for(r=n,h=[],c=t.preFilter;r;){(!e||(f=rr.exec(r)))&&(f&&(r=r.slice(f[0].length)||r),h.push(s=[]));e=!1;(f=ur.exec(r))&&(e=f.shift(),s.push({value:e,type:f[0].replace(at," ")}),r=r.slice(e.length));for(o in t.filter)(f=vt[o].exec(r))&&(!c[o]||(f=c[o](f)))&&(e=f.shift(),s.push({value:e,type:o,matches:f}),r=r.slice(e.length));if(!e)break}return i?r.length:r?u.error(n):ci(n,h).slice(0)},bt=u.compile=function(n,t){var r,u=[],e=[],i=lt[n+" "];if(!i){for(t||(t=ft(n)),r=t.length;r--;)i=ei(t[r]),i[f]?u.push(i):e.push(i);i=lt(n,pr(e,u));i.selector=n}return i},si=u.select=function(n,i,r,u){var o,f,e,l,a,c="function"==typeof n&&n,s=!u&&ft(n=c.selector||n);if(r=r||[],1===s.length){if(f=s[0]=s[0].slice(0),f.length>2&&"ID"===(e=f[0]).type&&9===i.nodeType&&h&&t.relative[f[1].type]){if(i=(t.find.ID(e.matches[0].replace(y,p),i)||[])[0],!i)return r;c&&(i=i.parentNode);n=n.slice(f.shift().value.length)}for(o=vt.needsContext.test(n)?0:f.length;o--;){if(e=f[o],t.relative[l=e.type])break;if((a=t.find[l])&&(u=a(e.matches[0].replace(y,p),ni.test(f[0].type)&&ri(i.parentNode)||i))){if(f.splice(o,1),n=u.length&&yt(f),!n)return k.apply(r,u),r;break}}}return(c||bt(n,s))(u,i,!h,r,!i||ni.test(n)&&ri(i.parentNode)||i),r},e.sortStable=f.split("").sort(kt).join("")===f,e.detectDuplicates=!!ut,b(),e.sortDetached=a(function(n){return 1&n.compareDocumentPosition(i.createElement("fieldset"))}),a(function(n){return n.innerHTML="<a href='#'><\/a>","#"===n.firstChild.getAttribute("href")})||ii("type|href|height|width",function(n,t,i){if(!i)return n.getAttribute(t,"type"===t.toLowerCase()?1:2)}),e.attributes&&a(function(n){return n.innerHTML="<input/>",n.firstChild.setAttribute("value",""),""===n.firstChild.getAttribute("value")})||ii("value",function(n,t,i){if(!i&&"input"===n.nodeName.toLowerCase())return n.defaultValue}),a(function(n){return null==n.getAttribute("disabled")})||ii(dt,function(n,t,i){var r;if(!i)return n[t]===!0?t.toLowerCase():(r=n.getAttributeNode(t))&&r.specified?r.value:null}),u}(n);i.find=y;i.expr=y.selectors;i.expr[":"]=i.expr.pseudos;i.uniqueSort=i.unique=y.uniqueSort;i.text=y.getText;i.isXMLDoc=y.isXML;i.contains=y.contains;i.escapeSelector=y.escape;var g=function(n,t,r){for(var u=[],f=void 0!==r;(n=n[t])&&9!==n.nodeType;)if(1===n.nodeType){if(f&&i(n).is(r))break;u.push(n)}return u},fr=function(n,t){for(var i=[];n;n=n.nextSibling)1===n.nodeType&&n!==t&&i.push(n);return i},er=i.expr.match.needsContext;ei=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;or=/^.[^:#\[\.,]*$/;i.filter=function(n,t,r){var u=t[0];return r&&(n=":not("+n+")"),1===t.length&&1===u.nodeType?i.find.matchesSelector(u,n)?[u]:[]:i.find.matches(n,i.grep(t,function(n){return 1===n.nodeType}))};i.fn.extend({find:function(n){var t,r,u=this.length,f=this;if("string"!=typeof n)return this.pushStack(i(n).filter(function(){for(t=0;t<u;t++)if(i.contains(f[t],this))return!0}));for(r=this.pushStack([]),t=0;t<u;t++)i.find(n,f[t],r);return u>1?i.uniqueSort(r):r},filter:function(n){return this.pushStack(oi(this,n||[],!1))},not:function(n){return this.pushStack(oi(this,n||[],!0))},is:function(n){return!!oi(this,"string"==typeof n&&er.test(n)?i(n):n||[],!1).length}});hr=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;cr=i.fn.init=function(n,t,r){var f,e;if(!n)return this;if(r=r||sr,"string"==typeof n){if(f="<"===n[0]&&">"===n[n.length-1]&&n.length>=3?[null,n,null]:hr.exec(n),!f||!f[1]&&t)return!t||t.jquery?(t||r).find(n):this.constructor(t).find(n);if(f[1]){if(t=t instanceof i?t[0]:t,i.merge(this,i.parseHTML(f[1],t&&t.nodeType?t.ownerDocument||t:u,!0)),ei.test(f[1])&&i.isPlainObject(t))for(f in t)i.isFunction(this[f])?this[f](t[f]):this.attr(f,t[f]);return this}return e=u.getElementById(f[2]),e&&(this[0]=e,this.length=1),this}return n.nodeType?(this[0]=n,this.length=1,this):i.isFunction(n)?void 0!==r.ready?r.ready(n):n(i):i.makeArray(n,this)};cr.prototype=i.fn;sr=i(u);lr=/^(?:parents|prev(?:Until|All))/;ar={children:!0,contents:!0,next:!0,prev:!0};i.fn.extend({has:function(n){var t=i(n,this),r=t.length;return this.filter(function(){for(var n=0;n<r;n++)if(i.contains(this,t[n]))return!0})},closest:function(n,t){var r,f=0,o=this.length,u=[],e="string"!=typeof n&&i(n);if(!er.test(n))for(;f<o;f++)for(r=this[f];r&&r!==t;r=r.parentNode)if(r.nodeType<11&&(e?e.index(r)>-1:1===r.nodeType&&i.find.matchesSelector(r,n))){u.push(r);break}return this.pushStack(u.length>1?i.uniqueSort(u):u)},index:function(n){return n?"string"==typeof n?ot.call(i(n),this[0]):ot.call(this,n.jquery?n[0]:n):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(n,t){return this.pushStack(i.uniqueSort(i.merge(this.get(),i(n,t))))},addBack:function(n){return this.add(null==n?this.prevObject:this.prevObject.filter(n))}});i.each({parent:function(n){var t=n.parentNode;return t&&11!==t.nodeType?t:null},parents:function(n){return g(n,"parentNode")},parentsUntil:function(n,t,i){return g(n,"parentNode",i)},next:function(n){return vr(n,"nextSibling")},prev:function(n){return vr(n,"previousSibling")},nextAll:function(n){return g(n,"nextSibling")},prevAll:function(n){return g(n,"previousSibling")},nextUntil:function(n,t,i){return g(n,"nextSibling",i)},prevUntil:function(n,t,i){return g(n,"previousSibling",i)},siblings:function(n){return fr((n.parentNode||{}).firstChild,n)},children:function(n){return fr(n.firstChild)},contents:function(n){return l(n,"iframe")?n.contentDocument:(l(n,"template")&&(n=n.content||n),i.merge([],n.childNodes))}},function(n,t){i.fn[n]=function(r,u){var f=i.map(this,t,r);return"Until"!==n.slice(-5)&&(u=r),u&&"string"==typeof u&&(f=i.filter(u,f)),this.length>1&&(ar[n]||i.uniqueSort(f),lr.test(n)&&f.reverse()),this.pushStack(f)}});h=/[^\x20\t\r\n\f]+/g;i.Callbacks=function(n){n="string"==typeof n?ne(n):i.extend({},n);var e,r,h,u,t=[],o=[],f=-1,c=function(){for(u=u||n.once,h=e=!0;o.length;f=-1)for(r=o.shift();++f<t.length;)t[f].apply(r[0],r[1])===!1&&n.stopOnFalse&&(f=t.length,r=!1);n.memory||(r=!1);e=!1;u&&(t=r?[]:"")},s={add:function(){return t&&(r&&!e&&(f=t.length-1,o.push(r)),function u(r){i.each(r,function(r,f){i.isFunction(f)?n.unique&&s.has(f)||t.push(f):f&&f.length&&"string"!==i.type(f)&&u(f)})}(arguments),r&&!e&&c()),this},remove:function(){return i.each(arguments,function(n,r){for(var u;(u=i.inArray(r,t,u))>-1;)t.splice(u,1),u<=f&&f--}),this},has:function(n){return n?i.inArray(n,t)>-1:t.length>0},empty:function(){return t&&(t=[]),this},disable:function(){return u=o=[],t=r="",this},disabled:function(){return!t},lock:function(){return u=o=[],r||e||(t=r=""),this},locked:function(){return!!u},fireWith:function(n,t){return u||(t=t||[],t=[n,t.slice?t.slice():t],o.push(t),e||c()),this},fire:function(){return s.fireWith(this,arguments),this},fired:function(){return!!h}};return s};i.extend({Deferred:function(t){var u=[["notify","progress",i.Callbacks("memory"),i.Callbacks("memory"),2],["resolve","done",i.Callbacks("once memory"),i.Callbacks("once memory"),0,"resolved"],["reject","fail",i.Callbacks("once memory"),i.Callbacks("once memory"),1,"rejected"]],e="pending",f={state:function(){return e},always:function(){return r.done(arguments).fail(arguments),this},"catch":function(n){return f.then(null,n)},pipe:function(){var n=arguments;return i.Deferred(function(t){i.each(u,function(u,f){var e=i.isFunction(n[f[4]])&&n[f[4]];r[f[1]](function(){var n=e&&e.apply(this,arguments);n&&i.isFunction(n.promise)?n.promise().progress(t.notify).done(t.resolve).fail(t.reject):t[f[0]+"With"](this,e?[n]:arguments)})});n=null}).promise()},then:function(t,r,f){function o(t,r,u,f){return function(){var s=this,h=arguments,l=function(){var n,c;if(!(t<e)){if(n=u.apply(s,h),n===r.promise())throw new TypeError("Thenable self-resolution");c=n&&("object"==typeof n||"function"==typeof n)&&n.then;i.isFunction(c)?f?c.call(n,o(e,r,nt,f),o(e,r,pt,f)):(e++,c.call(n,o(e,r,nt,f),o(e,r,pt,f),o(e,r,nt,r.notifyWith))):(u!==nt&&(s=void 0,h=[n]),(f||r.resolveWith)(s,h))}},c=f?l:function(){try{l()}catch(n){i.Deferred.exceptionHook&&i.Deferred.exceptionHook(n,c.stackTrace);t+1>=e&&(u!==pt&&(s=void 0,h=[n]),r.rejectWith(s,h))}};t?c():(i.Deferred.getStackHook&&(c.stackTrace=i.Deferred.getStackHook()),n.setTimeout(c))}}var e=0;return i.Deferred(function(n){u[0][3].add(o(0,n,i.isFunction(f)?f:nt,n.notifyWith));u[1][3].add(o(0,n,i.isFunction(t)?t:nt));u[2][3].add(o(0,n,i.isFunction(r)?r:pt))}).promise()},promise:function(n){return null!=n?i.extend(n,f):f}},r={};return i.each(u,function(n,t){var i=t[2],o=t[5];f[t[1]]=i.add;o&&i.add(function(){e=o},u[3-n][2].disable,u[0][2].lock);i.add(t[3].fire);r[t[0]]=function(){return r[t[0]+"With"](this===r?void 0:this,arguments),this};r[t[0]+"With"]=i.fireWith}),f.promise(r),t&&t.call(r,r),r},when:function(n){var f=arguments.length,t=f,e=Array(t),u=w.call(arguments),r=i.Deferred(),o=function(n){return function(t){e[n]=this;u[n]=arguments.length>1?w.call(arguments):t;--f||r.resolveWith(e,u)}};if(f<=1&&(yr(n,r.done(o(t)).resolve,r.reject,!f),"pending"===r.state()||i.isFunction(u[t]&&u[t].then)))return r.then();while(t--)yr(u[t],o(t),r.reject);return r.promise()}});pr=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;i.Deferred.exceptionHook=function(t,i){n.console&&n.console.warn&&t&&pr.test(t.name)&&n.console.warn("jQuery.Deferred exception: "+t.message,t.stack,i)};i.readyException=function(t){n.setTimeout(function(){throw t;})};wt=i.Deferred();i.fn.ready=function(n){return wt.then(n)["catch"](function(n){i.readyException(n)}),this};i.extend({isReady:!1,readyWait:1,ready:function(n){(n===!0?--i.readyWait:i.isReady)||(i.isReady=!0,n!==!0&&--i.readyWait>0||wt.resolveWith(u,[i]))}});i.ready.then=wt.then;"complete"===u.readyState||"loading"!==u.readyState&&!u.documentElement.doScroll?n.setTimeout(i.ready):(u.addEventListener("DOMContentLoaded",bt),n.addEventListener("load",bt));v=function(n,t,r,u,f,e,o){var s=0,c=n.length,h=null==r;if("object"===i.type(r)){f=!0;for(s in r)v(n,t,s,r[s],!0,e,o)}else if(void 0!==u&&(f=!0,i.isFunction(u)||(o=!0),h&&(o?(t.call(n,u),t=null):(h=t,t=function(n,t,r){return h.call(i(n),r)})),t))for(;s<c;s++)t(n[s],r,o?u:u.call(n[s],s,t(n[s],r)));return f?n:h?t.call(n):c?t(n[0],r):e};st=function(n){return 1===n.nodeType||9===n.nodeType||!+n.nodeType};ht.uid=1;ht.prototype={cache:function(n){var t=n[this.expando];return t||(t={},st(n)&&(n.nodeType?n[this.expando]=t:Object.defineProperty(n,this.expando,{value:t,configurable:!0}))),t},set:function(n,t,r){var u,f=this.cache(n);if("string"==typeof t)f[i.camelCase(t)]=r;else for(u in t)f[i.camelCase(u)]=t[u];return f},get:function(n,t){return void 0===t?this.cache(n):n[this.expando]&&n[this.expando][i.camelCase(t)]},access:function(n,t,i){return void 0===t||t&&"string"==typeof t&&void 0===i?this.get(n,t):(this.set(n,t,i),void 0!==i?i:t)},remove:function(n,t){var u,r=n[this.expando];if(void 0!==r){if(void 0!==t)for(Array.isArray(t)?t=t.map(i.camelCase):(t=i.camelCase(t),t=(t in r)?[t]:t.match(h)||[]),u=t.length;u--;)delete r[t[u]];(void 0===t||i.isEmptyObject(r))&&(n.nodeType?n[this.expando]=void 0:delete n[this.expando])}},hasData:function(n){var t=n[this.expando];return void 0!==t&&!i.isEmptyObject(t)}};var r=new ht,e=new ht,te=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,ie=/[A-Z]/g;i.extend({hasData:function(n){return e.hasData(n)||r.hasData(n)},data:function(n,t,i){return e.access(n,t,i)},removeData:function(n,t){e.remove(n,t)},_data:function(n,t,i){return r.access(n,t,i)},_removeData:function(n,t){r.remove(n,t)}});i.fn.extend({data:function(n,t){var o,f,s,u=this[0],h=u&&u.attributes;if(void 0===n){if(this.length&&(s=e.get(u),1===u.nodeType&&!r.get(u,"hasDataAttrs"))){for(o=h.length;o--;)h[o]&&(f=h[o].name,0===f.indexOf("data-")&&(f=i.camelCase(f.slice(5)),wr(u,f,s[f])));r.set(u,"hasDataAttrs",!0)}return s}return"object"==typeof n?this.each(function(){e.set(this,n)}):v(this,function(t){var i;if(u&&void 0===t){if((i=e.get(u,n),void 0!==i)||(i=wr(u,n),void 0!==i))return i}else this.each(function(){e.set(this,n,t)})},null,t,arguments.length>1,null,!0)},removeData:function(n){return this.each(function(){e.remove(this,n)})}});i.extend({queue:function(n,t,u){var f;if(n)return t=(t||"fx")+"queue",f=r.get(n,t),u&&(!f||Array.isArray(u)?f=r.access(n,t,i.makeArray(u)):f.push(u)),f||[]},dequeue:function(n,t){t=t||"fx";var r=i.queue(n,t),e=r.length,u=r.shift(),f=i._queueHooks(n,t),o=function(){i.dequeue(n,t)};"inprogress"===u&&(u=r.shift(),e--);u&&("fx"===t&&r.unshift("inprogress"),delete f.stop,u.call(n,o,f));!e&&f&&f.empty.fire()},_queueHooks:function(n,t){var u=t+"queueHooks";return r.get(n,u)||r.access(n,u,{empty:i.Callbacks("once memory").add(function(){r.remove(n,[t+"queue",u])})})}});i.fn.extend({queue:function(n,t){var r=2;return"string"!=typeof n&&(t=n,n="fx",r--),arguments.length<r?i.queue(this[0],n):void 0===t?this:this.each(function(){var r=i.queue(this,n,t);i._queueHooks(this,n);"fx"===n&&"inprogress"!==r[0]&&i.dequeue(this,n)})},dequeue:function(n){return this.each(function(){i.dequeue(this,n)})},clearQueue:function(n){return this.queue(n||"fx",[])},promise:function(n,t){var u,e=1,o=i.Deferred(),f=this,s=this.length,h=function(){--e||o.resolveWith(f,[f])};for("string"!=typeof n&&(t=n,n=void 0),n=n||"fx";s--;)u=r.get(f[s],n+"queueHooks"),u&&u.empty&&(e++,u.empty.add(h));return h(),o.promise(t)}});var br=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ct=new RegExp("^(?:([+-])=|)("+br+")([a-z%]*)$","i"),b=["Top","Right","Bottom","Left"],kt=function(n,t){return n=t||n,"none"===n.style.display||""===n.style.display&&i.contains(n.ownerDocument,n)&&"none"===i.css(n,"display")},kr=function(n,t,i,r){var f,u,e={};for(u in t)e[u]=n.style[u],n.style[u]=t[u];f=i.apply(n,r||[]);for(u in t)n.style[u]=e[u];return f};si={};i.fn.extend({show:function(){return tt(this,!0)},hide:function(){return tt(this)},toggle:function(n){return"boolean"==typeof n?n?this.show():this.hide():this.each(function(){kt(this)?i(this).show():i(this).hide()})}});var hi=/^(?:checkbox|radio)$/i,gr=/<([a-z][^\/\0>\x20\t\r\n\f]+)/i,nu=/^$|\/(?:java|ecma)script/i,c={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,"",""]};c.optgroup=c.option;c.tbody=c.tfoot=c.colgroup=c.caption=c.thead;c.th=c.td;tu=/<|&#?\w+;/;!function(){var i=u.createDocumentFragment(),n=i.appendChild(u.createElement("div")),t=u.createElement("input");t.setAttribute("type","radio");t.setAttribute("checked","checked");t.setAttribute("name","t");n.appendChild(t);f.checkClone=n.cloneNode(!0).cloneNode(!0).lastChild.checked;n.innerHTML="<textarea>x<\/textarea>";f.noCloneChecked=!!n.cloneNode(!0).lastChild.defaultValue}();var dt=u.documentElement,fe=/^key/,ee=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,ru=/^([^.]*)(?:\.(.+)|)/;i.event={global:{},add:function(n,t,u,f,e){var v,y,w,p,b,c,s,l,o,k,d,a=r.get(n);if(a)for(u.handler&&(v=u,u=v.handler,e=v.selector),e&&i.find.matchesSelector(dt,e),u.guid||(u.guid=i.guid++),(p=a.events)||(p=a.events={}),(y=a.handle)||(y=a.handle=function(t){if("undefined"!=typeof i&&i.event.triggered!==t.type)return i.event.dispatch.apply(n,arguments)}),t=(t||"").match(h)||[""],b=t.length;b--;)w=ru.exec(t[b])||[],o=d=w[1],k=(w[2]||"").split(".").sort(),o&&(s=i.event.special[o]||{},o=(e?s.delegateType:s.bindType)||o,s=i.event.special[o]||{},c=i.extend({type:o,origType:d,data:f,handler:u,guid:u.guid,selector:e,needsContext:e&&i.expr.match.needsContext.test(e),namespace:k.join(".")},v),(l=p[o])||(l=p[o]=[],l.delegateCount=0,s.setup&&s.setup.call(n,f,k,y)!==!1||n.addEventListener&&n.addEventListener(o,y)),s.add&&(s.add.call(n,c),c.handler.guid||(c.handler.guid=u.guid)),e?l.splice(l.delegateCount++,0,c):l.push(c),i.event.global[o]=!0)},remove:function(n,t,u,f,e){var y,k,c,v,p,s,l,a,o,b,d,w=r.hasData(n)&&r.get(n);if(w&&(v=w.events)){for(t=(t||"").match(h)||[""],p=t.length;p--;)if(c=ru.exec(t[p])||[],o=d=c[1],b=(c[2]||"").split(".").sort(),o){for(l=i.event.special[o]||{},o=(f?l.delegateType:l.bindType)||o,a=v[o]||[],c=c[2]&&new RegExp("(^|\\.)"+b.join("\\.(?:.*\\.|)")+"(\\.|$)"),k=y=a.length;y--;)s=a[y],!e&&d!==s.origType||u&&u.guid!==s.guid||c&&!c.test(s.namespace)||f&&f!==s.selector&&("**"!==f||!s.selector)||(a.splice(y,1),s.selector&&a.delegateCount--,l.remove&&l.remove.call(n,s));k&&!a.length&&(l.teardown&&l.teardown.call(n,b,w.handle)!==!1||i.removeEvent(n,o,w.handle),delete v[o])}else for(o in v)i.event.remove(n,o+t[p],u,f,!0);i.isEmptyObject(v)&&r.remove(n,"handle events")}},dispatch:function(n){var t=i.event.fix(n),u,c,s,e,f,l,h=new Array(arguments.length),a=(r.get(this,"events")||{})[t.type]||[],o=i.event.special[t.type]||{};for(h[0]=t,u=1;u<arguments.length;u++)h[u]=arguments[u];if(t.delegateTarget=this,!o.preDispatch||o.preDispatch.call(this,t)!==!1){for(l=i.event.handlers.call(this,t,a),u=0;(e=l[u++])&&!t.isPropagationStopped();)for(t.currentTarget=e.elem,c=0;(f=e.handlers[c++])&&!t.isImmediatePropagationStopped();)t.rnamespace&&!t.rnamespace.test(f.namespace)||(t.handleObj=f,t.data=f.data,s=((i.event.special[f.origType]||{}).handle||f.handler).apply(e.elem,h),void 0!==s&&(t.result=s)===!1&&(t.preventDefault(),t.stopPropagation()));return o.postDispatch&&o.postDispatch.call(this,t),t.result}},handlers:function(n,t){var f,e,u,o,s,c=[],h=t.delegateCount,r=n.target;if(h&&r.nodeType&&!("click"===n.type&&n.button>=1))for(;r!==this;r=r.parentNode||this)if(1===r.nodeType&&("click"!==n.type||r.disabled!==!0)){for(o=[],s={},f=0;f<h;f++)e=t[f],u=e.selector+" ",void 0===s[u]&&(s[u]=e.needsContext?i(u,this).index(r)>-1:i.find(u,this,null,[r]).length),s[u]&&o.push(e);o.length&&c.push({elem:r,handlers:o})}return r=this,h<t.length&&c.push({elem:r,handlers:t.slice(h)}),c},addProp:function(n,t){Object.defineProperty(i.Event.prototype,n,{enumerable:!0,configurable:!0,get:i.isFunction(t)?function(){if(this.originalEvent)return t(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[n]},set:function(t){Object.defineProperty(this,n,{enumerable:!0,configurable:!0,writable:!0,value:t})}})},fix:function(n){return n[i.expando]?n:new i.Event(n)},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==uu()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===uu()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if(hi.test(this.type)&&this.click&&l(this,"input"))return this.click(),!1},_default:function(n){return l(n.target,"a")}},beforeunload:{postDispatch:function(n){void 0!==n.result&&n.originalEvent&&(n.originalEvent.returnValue=n.result)}}}};i.removeEvent=function(n,t,i){n.removeEventListener&&n.removeEventListener(t,i)};i.Event=function(n,t){return this instanceof i.Event?(n&&n.type?(this.originalEvent=n,this.type=n.type,this.isDefaultPrevented=n.defaultPrevented||void 0===n.defaultPrevented&&n.returnValue===!1?gt:it,this.target=n.target&&3===n.target.nodeType?n.target.parentNode:n.target,this.currentTarget=n.currentTarget,this.relatedTarget=n.relatedTarget):this.type=n,t&&i.extend(this,t),this.timeStamp=n&&n.timeStamp||i.now(),void(this[i.expando]=!0)):new i.Event(n,t)};i.Event.prototype={constructor:i.Event,isDefaultPrevented:it,isPropagationStopped:it,isImmediatePropagationStopped:it,isSimulated:!1,preventDefault:function(){var n=this.originalEvent;this.isDefaultPrevented=gt;n&&!this.isSimulated&&n.preventDefault()},stopPropagation:function(){var n=this.originalEvent;this.isPropagationStopped=gt;n&&!this.isSimulated&&n.stopPropagation()},stopImmediatePropagation:function(){var n=this.originalEvent;this.isImmediatePropagationStopped=gt;n&&!this.isSimulated&&n.stopImmediatePropagation();this.stopPropagation()}};i.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(n){var t=n.button;return null==n.which&&fe.test(n.type)?null!=n.charCode?n.charCode:n.keyCode:!n.which&&void 0!==t&&ee.test(n.type)?1&t?1:2&t?3:4&t?2:0:n.which}},i.event.addProp);i.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(n,t){i.event.special[n]={delegateType:t,bindType:t,handle:function(n){var u,f=this,r=n.relatedTarget,e=n.handleObj;return r&&(r===f||i.contains(f,r))||(n.type=e.origType,u=e.handler.apply(this,arguments),n.type=t),u}}});i.fn.extend({on:function(n,t,i,r){return li(this,n,t,i,r)},one:function(n,t,i,r){return li(this,n,t,i,r,1)},off:function(n,t,r){var u,f;if(n&&n.preventDefault&&n.handleObj)return u=n.handleObj,i(n.delegateTarget).off(u.namespace?u.origType+"."+u.namespace:u.origType,u.selector,u.handler),this;if("object"==typeof n){for(f in n)this.off(f,t,n[f]);return this}return t!==!1&&"function"!=typeof t||(r=t,t=void 0),r===!1&&(r=it),this.each(function(){i.event.remove(this,n,r,t)})}});var oe=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,se=/<script|<style|<link/i,he=/checked\s*(?:[^=]|=\s*.checked.)/i,ce=/^true\/(.*)/,le=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;i.extend({htmlPrefilter:function(n){return n.replace(oe,"<$1><\/$2>")},clone:function(n,t,r){var u,c,s,e,h=n.cloneNode(!0),l=i.contains(n.ownerDocument,n);if(!(f.noCloneChecked||1!==n.nodeType&&11!==n.nodeType||i.isXMLDoc(n)))for(e=o(h),s=o(n),u=0,c=s.length;u<c;u++)ye(s[u],e[u]);if(t)if(r)for(s=s||o(n),e=e||o(h),u=0,c=s.length;u<c;u++)eu(s[u],e[u]);else eu(n,h);return e=o(h,"script"),e.length>0&&ci(e,!l&&o(n,"script")),h},cleanData:function(n){for(var u,t,f,s=i.event.special,o=0;void 0!==(t=n[o]);o++)if(st(t)){if(u=t[r.expando]){if(u.events)for(f in u.events)s[f]?i.event.remove(t,f):i.removeEvent(t,f,u.handle);t[r.expando]=void 0}t[e.expando]&&(t[e.expando]=void 0)}}});i.fn.extend({detach:function(n){return ou(this,n,!0)},remove:function(n){return ou(this,n)},text:function(n){return v(this,function(n){return void 0===n?i.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=n)})},null,n,arguments.length)},append:function(){return rt(this,arguments,function(n){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=fu(this,n);t.appendChild(n)}})},prepend:function(){return rt(this,arguments,function(n){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=fu(this,n);t.insertBefore(n,t.firstChild)}})},before:function(){return rt(this,arguments,function(n){this.parentNode&&this.parentNode.insertBefore(n,this)})},after:function(){return rt(this,arguments,function(n){this.parentNode&&this.parentNode.insertBefore(n,this.nextSibling)})},empty:function(){for(var n,t=0;null!=(n=this[t]);t++)1===n.nodeType&&(i.cleanData(o(n,!1)),n.textContent="");return this},clone:function(n,t){return n=null!=n&&n,t=null==t?n:t,this.map(function(){return i.clone(this,n,t)})},html:function(n){return v(this,function(n){var t=this[0]||{},r=0,u=this.length;if(void 0===n&&1===t.nodeType)return t.innerHTML;if("string"==typeof n&&!se.test(n)&&!c[(gr.exec(n)||["",""])[1].toLowerCase()]){n=i.htmlPrefilter(n);try{for(;r<u;r++)t=this[r]||{},1===t.nodeType&&(i.cleanData(o(t,!1)),t.innerHTML=n);t=0}catch(f){}}t&&this.empty().append(n)},null,n,arguments.length)},replaceWith:function(){var n=[];return rt(this,arguments,function(t){var r=this.parentNode;i.inArray(this,n)<0&&(i.cleanData(o(this)),r&&r.replaceChild(t,this))},n)}});i.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(n,t){i.fn[n]=function(n){for(var u,f=[],e=i(n),o=e.length-1,r=0;r<=o;r++)u=r===o?this:this.clone(!0),i(e[r])[t](u),ui.apply(f,u.get());return this.pushStack(f)}});var su=/^margin/,ai=new RegExp("^("+br+")(?!px)[a-z%]+$","i"),ni=function(t){var i=t.ownerDocument.defaultView;return i&&i.opener||(i=n),i.getComputedStyle(t)};!function(){function r(){if(t){t.style.cssText="box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%";t.innerHTML="";dt.appendChild(e);var i=n.getComputedStyle(t);o="1%"!==i.top;c="2px"===i.marginLeft;s="4px"===i.width;t.style.marginRight="50%";h="4px"===i.marginRight;dt.removeChild(e);t=null}}var o,s,h,c,e=u.createElement("div"),t=u.createElement("div");t.style&&(t.style.backgroundClip="content-box",t.cloneNode(!0).style.backgroundClip="",f.clearCloneStyle="content-box"===t.style.backgroundClip,e.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",e.appendChild(t),i.extend(f,{pixelPosition:function(){return r(),o},boxSizingReliable:function(){return r(),s},pixelMarginRight:function(){return r(),h},reliableMarginLeft:function(){return r(),c}}))}();var pe=/^(none|table(?!-c[ea]).+)/,cu=/^--/,we={position:"absolute",visibility:"hidden",display:"block"},lu={letterSpacing:"0",fontWeight:"400"},au=["Webkit","Moz","ms"],vu=u.createElement("div").style;i.extend({cssHooks:{opacity:{get:function(n,t){if(t){var i=lt(n,"opacity");return""===i?"1":i}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{float:"cssFloat"},style:function(n,t,r,u){if(n&&3!==n.nodeType&&8!==n.nodeType&&n.style){var e,s,o,c=i.camelCase(t),l=cu.test(t),h=n.style;return l||(t=yu(c)),o=i.cssHooks[t]||i.cssHooks[c],void 0===r?o&&"get"in o&&void 0!==(e=o.get(n,!1,u))?e:h[t]:(s=typeof r,"string"===s&&(e=ct.exec(r))&&e[1]&&(r=dr(n,t,e),s="number"),null!=r&&r===r&&("number"===s&&(r+=e&&e[3]||(i.cssNumber[c]?"":"px")),f.clearCloneStyle||""!==r||0!==t.indexOf("background")||(h[t]="inherit"),o&&"set"in o&&void 0===(r=o.set(n,r,u))||(l?h.setProperty(t,r):h[t]=r)),void 0)}},css:function(n,t,r,u){var f,o,e,s=i.camelCase(t),h=cu.test(t);return h||(t=yu(s)),e=i.cssHooks[t]||i.cssHooks[s],e&&"get"in e&&(f=e.get(n,!0,r)),void 0===f&&(f=lt(n,t,u)),"normal"===f&&t in lu&&(f=lu[t]),""===r||r?(o=parseFloat(f),r===!0||isFinite(o)?o||0:f):f}});i.each(["height","width"],function(n,t){i.cssHooks[t]={get:function(n,r,u){if(r)return!pe.test(i.css(n,"display"))||n.getClientRects().length&&n.getBoundingClientRect().width?bu(n,t,u):kr(n,we,function(){return bu(n,t,u)})},set:function(n,r,u){var f,e=u&&ni(n),o=u&&wu(n,t,u,"border-box"===i.css(n,"boxSizing",!1,e),e);return o&&(f=ct.exec(r))&&"px"!==(f[3]||"px")&&(n.style[t]=r,r=i.css(n,t)),pu(n,r,o)}}});i.cssHooks.marginLeft=hu(f.reliableMarginLeft,function(n,t){if(t)return(parseFloat(lt(n,"marginLeft"))||n.getBoundingClientRect().left-kr(n,{marginLeft:0},function(){return n.getBoundingClientRect().left}))+"px"});i.each({margin:"",padding:"",border:"Width"},function(n,t){i.cssHooks[n+t]={expand:function(i){for(var r=0,f={},u="string"==typeof i?i.split(" "):[i];r<4;r++)f[n+b[r]+t]=u[r]||u[r-2]||u[0];return f}};su.test(n)||(i.cssHooks[n+t].set=pu)});i.fn.extend({css:function(n,t){return v(this,function(n,t,r){var f,e,o={},u=0;if(Array.isArray(t)){for(f=ni(n),e=t.length;u<e;u++)o[t[u]]=i.css(n,t[u],!1,f);return o}return void 0!==r?i.style(n,t,r):i.css(n,t)},n,t,arguments.length>1)}});i.Tween=s;s.prototype={constructor:s,init:function(n,t,r,u,f,e){this.elem=n;this.prop=r;this.easing=f||i.easing._default;this.options=t;this.start=this.now=this.cur();this.end=u;this.unit=e||(i.cssNumber[r]?"":"px")},cur:function(){var n=s.propHooks[this.prop];return n&&n.get?n.get(this):s.propHooks._default.get(this)},run:function(n){var t,r=s.propHooks[this.prop];return this.pos=this.options.duration?t=i.easing[this.easing](n,this.options.duration*n,0,1,this.options.duration):t=n,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),r&&r.set?r.set(this):s.propHooks._default.set(this),this}};s.prototype.init.prototype=s.prototype;s.propHooks={_default:{get:function(n){var t;return 1!==n.elem.nodeType||null!=n.elem[n.prop]&&null==n.elem.style[n.prop]?n.elem[n.prop]:(t=i.css(n.elem,n.prop,""),t&&"auto"!==t?t:0)},set:function(n){i.fx.step[n.prop]?i.fx.step[n.prop](n):1!==n.elem.nodeType||null==n.elem.style[i.cssProps[n.prop]]&&!i.cssHooks[n.prop]?n.elem[n.prop]=n.now:i.style(n.elem,n.prop,n.now+n.unit)}}};s.propHooks.scrollTop=s.propHooks.scrollLeft={set:function(n){n.elem.nodeType&&n.elem.parentNode&&(n.elem[n.prop]=n.now)}};i.easing={linear:function(n){return n},swing:function(n){return.5-Math.cos(n*Math.PI)/2},_default:"swing"};i.fx=s.prototype.init;i.fx.step={};ku=/^(?:toggle|show|hide)$/;du=/queueHooks$/;i.Animation=i.extend(a,{tweeners:{"*":[function(n,t){var i=this.createTween(n,t);return dr(i.elem,n,ct.exec(t),i),i}]},tweener:function(n,t){i.isFunction(n)?(t=n,n=["*"]):n=n.match(h);for(var r,u=0,f=n.length;u<f;u++)r=n[u],a.tweeners[r]=a.tweeners[r]||[],a.tweeners[r].unshift(t)},prefilters:[ke],prefilter:function(n,t){t?a.prefilters.unshift(n):a.prefilters.push(n)}});i.speed=function(n,t,r){var u=n&&"object"==typeof n?i.extend({},n):{complete:r||!r&&t||i.isFunction(n)&&n,duration:n,easing:r&&t||t&&!i.isFunction(t)&&t};return i.fx.off?u.duration=0:"number"!=typeof u.duration&&(u.duration=u.duration in i.fx.speeds?i.fx.speeds[u.duration]:i.fx.speeds._default),null!=u.queue&&u.queue!==!0||(u.queue="fx"),u.old=u.complete,u.complete=function(){i.isFunction(u.old)&&u.old.call(this);u.queue&&i.dequeue(this,u.queue)},u};i.fn.extend({fadeTo:function(n,t,i,r){return this.filter(kt).css("opacity",0).show().end().animate({opacity:t},n,i,r)},animate:function(n,t,u,f){var s=i.isEmptyObject(n),o=i.speed(t,u,f),e=function(){var t=a(this,i.extend({},n),o);(s||r.get(this,"finish"))&&t.stop(!0)};return e.finish=e,s||o.queue===!1?this.each(e):this.queue(o.queue,e)},stop:function(n,t,u){var f=function(n){var t=n.stop;delete n.stop;t(u)};return"string"!=typeof n&&(u=t,t=n,n=void 0),t&&n!==!1&&this.queue(n||"fx",[]),this.each(function(){var s=!0,t=null!=n&&n+"queueHooks",o=i.timers,e=r.get(this);if(t)e[t]&&e[t].stop&&f(e[t]);else for(t in e)e[t]&&e[t].stop&&du.test(t)&&f(e[t]);for(t=o.length;t--;)o[t].elem!==this||null!=n&&o[t].queue!==n||(o[t].anim.stop(u),s=!1,o.splice(t,1));!s&&u||i.dequeue(this,n)})},finish:function(n){return n!==!1&&(n=n||"fx"),this.each(function(){var t,e=r.get(this),u=e[n+"queue"],o=e[n+"queueHooks"],f=i.timers,s=u?u.length:0;for(e.finish=!0,i.queue(this,n,[]),o&&o.stop&&o.stop.call(this,!0),t=f.length;t--;)f[t].elem===this&&f[t].queue===n&&(f[t].anim.stop(!0),f.splice(t,1));for(t=0;t<s;t++)u[t]&&u[t].finish&&u[t].finish.call(this);delete e.finish})}});i.each(["toggle","show","hide"],function(n,t){var r=i.fn[t];i.fn[t]=function(n,i,u){return null==n||"boolean"==typeof n?r.apply(this,arguments):this.animate(ii(t,!0),n,i,u)}});i.each({slideDown:ii("show"),slideUp:ii("hide"),slideToggle:ii("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(n,t){i.fn[n]=function(n,i,r){return this.animate(t,n,i,r)}});i.timers=[];i.fx.tick=function(){var r,n=0,t=i.timers;for(ut=i.now();n<t.length;n++)r=t[n],r()||t[n]!==r||t.splice(n--,1);t.length||i.fx.stop();ut=void 0};i.fx.timer=function(n){i.timers.push(n);i.fx.start()};i.fx.interval=13;i.fx.start=function(){ti||(ti=!0,vi())};i.fx.stop=function(){ti=null};i.fx.speeds={slow:600,fast:200,_default:400};i.fn.delay=function(t,r){return t=i.fx?i.fx.speeds[t]||t:t,r=r||"fx",this.queue(r,function(i,r){var u=n.setTimeout(i,t);r.stop=function(){n.clearTimeout(u)}})},function(){var n=u.createElement("input"),t=u.createElement("select"),i=t.appendChild(u.createElement("option"));n.type="checkbox";f.checkOn=""!==n.value;f.optSelected=i.selected;n=u.createElement("input");n.value="t";n.type="radio";f.radioValue="t"===n.value}();ft=i.expr.attrHandle;i.fn.extend({attr:function(n,t){return v(this,i.attr,n,t,arguments.length>1)},removeAttr:function(n){return this.each(function(){i.removeAttr(this,n)})}});i.extend({attr:function(n,t,r){var u,f,e=n.nodeType;if(3!==e&&8!==e&&2!==e)return"undefined"==typeof n.getAttribute?i.prop(n,t,r):(1===e&&i.isXMLDoc(n)||(f=i.attrHooks[t.toLowerCase()]||(i.expr.match.bool.test(t)?tf:void 0)),void 0!==r?null===r?void i.removeAttr(n,t):f&&"set"in f&&void 0!==(u=f.set(n,r,t))?u:(n.setAttribute(t,r+""),r):f&&"get"in f&&null!==(u=f.get(n,t))?u:(u=i.find.attr(n,t),null==u?void 0:u))},attrHooks:{type:{set:function(n,t){if(!f.radioValue&&"radio"===t&&l(n,"input")){var i=n.value;return n.setAttribute("type",t),i&&(n.value=i),t}}}},removeAttr:function(n,t){var i,u=0,r=t&&t.match(h);if(r&&1===n.nodeType)while(i=r[u++])n.removeAttribute(i)}});tf={set:function(n,t,r){return t===!1?i.removeAttr(n,r):n.setAttribute(r,r),r}};i.each(i.expr.match.bool.source.match(/\w+/g),function(n,t){var r=ft[t]||i.find.attr;ft[t]=function(n,t,i){var f,e,u=t.toLowerCase();return i||(e=ft[u],ft[u]=f,f=null!=r(n,t,i)?u:null,ft[u]=e),f}});rf=/^(?:input|select|textarea|button)$/i;uf=/^(?:a|area)$/i;i.fn.extend({prop:function(n,t){return v(this,i.prop,n,t,arguments.length>1)},removeProp:function(n){return this.each(function(){delete this[i.propFix[n]||n]})}});i.extend({prop:function(n,t,r){var f,u,e=n.nodeType;if(3!==e&&8!==e&&2!==e)return 1===e&&i.isXMLDoc(n)||(t=i.propFix[t]||t,u=i.propHooks[t]),void 0!==r?u&&"set"in u&&void 0!==(f=u.set(n,r,t))?f:n[t]=r:u&&"get"in u&&null!==(f=u.get(n,t))?f:n[t]},propHooks:{tabIndex:{get:function(n){var t=i.find.attr(n,"tabindex");return t?parseInt(t,10):rf.test(n.nodeName)||uf.test(n.nodeName)&&n.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}});f.optSelected||(i.propHooks.selected={get:function(n){var t=n.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(n){var t=n.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}});i.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){i.propFix[this.toLowerCase()]=this});i.fn.extend({addClass:function(n){var o,t,r,u,f,s,e,c=0;if(i.isFunction(n))return this.each(function(t){i(this).addClass(n.call(this,t,d(this)))});if("string"==typeof n&&n)for(o=n.match(h)||[];t=this[c++];)if(u=d(t),r=1===t.nodeType&&" "+k(u)+" "){for(s=0;f=o[s++];)r.indexOf(" "+f+" ")<0&&(r+=f+" ");e=k(r);u!==e&&t.setAttribute("class",e)}return this},removeClass:function(n){var o,r,t,u,f,s,e,c=0;if(i.isFunction(n))return this.each(function(t){i(this).removeClass(n.call(this,t,d(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof n&&n)for(o=n.match(h)||[];r=this[c++];)if(u=d(r),t=1===r.nodeType&&" "+k(u)+" "){for(s=0;f=o[s++];)while(t.indexOf(" "+f+" ")>-1)t=t.replace(" "+f+" "," ");e=k(t);u!==e&&r.setAttribute("class",e)}return this},toggleClass:function(n,t){var u=typeof n;return"boolean"==typeof t&&"string"===u?t?this.addClass(n):this.removeClass(n):i.isFunction(n)?this.each(function(r){i(this).toggleClass(n.call(this,r,d(this),t),t)}):this.each(function(){var t,e,f,o;if("string"===u)for(e=0,f=i(this),o=n.match(h)||[];t=o[e++];)f.hasClass(t)?f.removeClass(t):f.addClass(t);else void 0!==n&&"boolean"!==u||(t=d(this),t&&r.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||n===!1?"":r.get(this,"__className__")||""))})},hasClass:function(n){for(var t,r=0,i=" "+n+" ";t=this[r++];)if(1===t.nodeType&&(" "+k(d(t))+" ").indexOf(i)>-1)return!0;return!1}});ff=/\r/g;i.fn.extend({val:function(n){var t,r,f,u=this[0];return arguments.length?(f=i.isFunction(n),this.each(function(r){var u;1===this.nodeType&&(u=f?n.call(this,r,i(this).val()):n,null==u?u="":"number"==typeof u?u+="":Array.isArray(u)&&(u=i.map(u,function(n){return null==n?"":n+""})),t=i.valHooks[this.type]||i.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&void 0!==t.set(this,u,"value")||(this.value=u))})):u?(t=i.valHooks[u.type]||i.valHooks[u.nodeName.toLowerCase()],t&&"get"in t&&void 0!==(r=t.get(u,"value"))?r:(r=u.value,"string"==typeof r?r.replace(ff,""):null==r?"":r)):void 0}});i.extend({valHooks:{option:{get:function(n){var t=i.find.attr(n,"value");return null!=t?t:k(i.text(n))}},select:{get:function(n){for(var e,t,o=n.options,u=n.selectedIndex,f="select-one"===n.type,s=f?null:[],h=f?u+1:o.length,r=u<0?h:f?u:0;r<h;r++)if(t=o[r],(t.selected||r===u)&&!t.disabled&&(!t.parentNode.disabled||!l(t.parentNode,"optgroup"))){if(e=i(t).val(),f)return e;s.push(e)}return s},set:function(n,t){for(var u,r,f=n.options,e=i.makeArray(t),o=f.length;o--;)r=f[o],(r.selected=i.inArray(i.valHooks.option.get(r),e)>-1)&&(u=!0);return u||(n.selectedIndex=-1),e}}}});i.each(["radio","checkbox"],function(){i.valHooks[this]={set:function(n,t){if(Array.isArray(t))return n.checked=i.inArray(i(n).val(),t)>-1}};f.checkOn||(i.valHooks[this].get=function(n){return null===n.getAttribute("value")?"on":n.value})});yi=/^(?:focusinfocus|focusoutblur)$/;i.extend(i.event,{trigger:function(t,f,e,o){var w,s,c,b,a,v,l,p=[e||u],h=yt.call(t,"type")?t.type:t,y=yt.call(t,"namespace")?t.namespace.split("."):[];if(s=c=e=e||u,3!==e.nodeType&&8!==e.nodeType&&!yi.test(h+i.event.triggered)&&(h.indexOf(".")>-1&&(y=h.split("."),h=y.shift(),y.sort()),a=h.indexOf(":")<0&&"on"+h,t=t[i.expando]?t:new i.Event(h,"object"==typeof t&&t),t.isTrigger=o?2:3,t.namespace=y.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+y.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=e),f=null==f?[t]:i.makeArray(f,[t]),l=i.event.special[h]||{},o||!l.trigger||l.trigger.apply(e,f)!==!1)){if(!o&&!l.noBubble&&!i.isWindow(e)){for(b=l.delegateType||h,yi.test(b+h)||(s=s.parentNode);s;s=s.parentNode)p.push(s),c=s;c===(e.ownerDocument||u)&&p.push(c.defaultView||c.parentWindow||n)}for(w=0;(s=p[w++])&&!t.isPropagationStopped();)t.type=w>1?b:l.bindType||h,v=(r.get(s,"events")||{})[t.type]&&r.get(s,"handle"),v&&v.apply(s,f),v=a&&s[a],v&&v.apply&&st(s)&&(t.result=v.apply(s,f),t.result===!1&&t.preventDefault());return t.type=h,o||t.isDefaultPrevented()||l._default&&l._default.apply(p.pop(),f)!==!1||!st(e)||a&&i.isFunction(e[h])&&!i.isWindow(e)&&(c=e[a],c&&(e[a]=null),i.event.triggered=h,e[h](),i.event.triggered=void 0,c&&(e[a]=c)),t.result}},simulate:function(n,t,r){var u=i.extend(new i.Event,r,{type:n,isSimulated:!0});i.event.trigger(u,null,t)}});i.fn.extend({trigger:function(n,t){return this.each(function(){i.event.trigger(n,t,this)})},triggerHandler:function(n,t){var r=this[0];if(r)return i.event.trigger(n,t,r,!0)}});i.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(n,t){i.fn[t]=function(n,i){return arguments.length>0?this.on(t,null,n,i):this.trigger(t)}});i.fn.extend({hover:function(n,t){return this.mouseenter(n).mouseleave(t||n)}});f.focusin="onfocusin"in n;f.focusin||i.each({focus:"focusin",blur:"focusout"},function(n,t){var u=function(n){i.event.simulate(t,n.target,i.event.fix(n))};i.event.special[t]={setup:function(){var i=this.ownerDocument||this,f=r.access(i,t);f||i.addEventListener(n,u,!0);r.access(i,t,(f||0)+1)},teardown:function(){var i=this.ownerDocument||this,f=r.access(i,t)-1;f?r.access(i,t,f):(i.removeEventListener(n,u,!0),r.remove(i,t))}}});var at=n.location,ef=i.now(),pi=/\?/;i.parseXML=function(t){var r;if(!t||"string"!=typeof t)return null;try{r=(new n.DOMParser).parseFromString(t,"text/xml")}catch(u){r=void 0}return r&&!r.getElementsByTagName("parsererror").length||i.error("Invalid XML: "+t),r};var ge=/\[\]$/,of=/\r?\n/g,no=/^(?:submit|button|image|reset|file)$/i,to=/^(?:input|select|textarea|keygen)/i;i.param=function(n,t){var r,u=[],f=function(n,t){var r=i.isFunction(t)?t():t;u[u.length]=encodeURIComponent(n)+"="+encodeURIComponent(null==r?"":r)};if(Array.isArray(n)||n.jquery&&!i.isPlainObject(n))i.each(n,function(){f(this.name,this.value)});else for(r in n)wi(r,n[r],t,f);return u.join("&")};i.fn.extend({serialize:function(){return i.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var n=i.prop(this,"elements");return n?i.makeArray(n):this}).filter(function(){var n=this.type;return this.name&&!i(this).is(":disabled")&&to.test(this.nodeName)&&!no.test(n)&&(this.checked||!hi.test(n))}).map(function(n,t){var r=i(this).val();return null==r?null:Array.isArray(r)?i.map(r,function(n){return{name:t.name,value:n.replace(of,"\r\n")}}):{name:t.name,value:r.replace(of,"\r\n")}}).get()}});var io=/%20/g,ro=/#.*$/,uo=/([?&])_=[^&]*/,fo=/^(.*?):[ \t]*([^\r\n]*)$/gm,eo=/^(?:GET|HEAD)$/,oo=/^\/\//,sf={},bi={},hf="*/".concat("*"),ki=u.createElement("a");return ki.href=at.href,i.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:at.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(at.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":hf,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":i.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(n,t){return t?di(di(n,i.ajaxSettings),t):di(i.ajaxSettings,n)},ajaxPrefilter:cf(sf),ajaxTransport:cf(bi),ajax:function(t,r){function b(t,r,u,h){var y,rt,g,p,b,l=r;s||(s=!0,d&&n.clearTimeout(d),a=void 0,k=h||"",e.readyState=t>0?4:0,y=t>=200&&t<300||304===t,u&&(p=so(f,e,u)),p=ho(f,p,e,y),y?(f.ifModified&&(b=e.getResponseHeader("Last-Modified"),b&&(i.lastModified[o]=b),b=e.getResponseHeader("etag"),b&&(i.etag[o]=b)),204===t||"HEAD"===f.type?l="nocontent":304===t?l="notmodified":(l=p.state,rt=p.data,g=p.error,y=!g)):(g=l,!t&&l||(l="error",t<0&&(t=0))),e.status=t,e.statusText=(r||l)+"",y?tt.resolveWith(c,[rt,l,e]):tt.rejectWith(c,[e,l,g]),e.statusCode(w),w=void 0,v&&nt.trigger(y?"ajaxSuccess":"ajaxError",[e,f,y?rt:g]),it.fireWith(c,[e,l]),v&&(nt.trigger("ajaxComplete",[e,f]),--i.active||i.event.trigger("ajaxStop")))}"object"==typeof t&&(r=t,t=void 0);r=r||{};var a,o,k,y,d,l,s,v,g,p,f=i.ajaxSetup({},r),c=f.context||f,nt=f.context&&(c.nodeType||c.jquery)?i(c):i.event,tt=i.Deferred(),it=i.Callbacks("once memory"),w=f.statusCode||{},rt={},ut={},ft="canceled",e={readyState:0,getResponseHeader:function(n){var t;if(s){if(!y)for(y={};t=fo.exec(k);)y[t[1].toLowerCase()]=t[2];t=y[n.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return s?k:null},setRequestHeader:function(n,t){return null==s&&(n=ut[n.toLowerCase()]=ut[n.toLowerCase()]||n,rt[n]=t),this},overrideMimeType:function(n){return null==s&&(f.mimeType=n),this},statusCode:function(n){var t;if(n)if(s)e.always(n[e.status]);else for(t in n)w[t]=[w[t],n[t]];return this},abort:function(n){var t=n||ft;return a&&a.abort(t),b(0,t),this}};if(tt.promise(e),f.url=((t||f.url||at.href)+"").replace(oo,at.protocol+"//"),f.type=r.method||r.type||f.method||f.type,f.dataTypes=(f.dataType||"*").toLowerCase().match(h)||[""],null==f.crossDomain){l=u.createElement("a");try{l.href=f.url;l.href=l.href;f.crossDomain=ki.protocol+"//"+ki.host!=l.protocol+"//"+l.host}catch(et){f.crossDomain=!0}}if(f.data&&f.processData&&"string"!=typeof f.data&&(f.data=i.param(f.data,f.traditional)),lf(sf,f,r,e),s)return e;v=i.event&&f.global;v&&0==i.active++&&i.event.trigger("ajaxStart");f.type=f.type.toUpperCase();f.hasContent=!eo.test(f.type);o=f.url.replace(ro,"");f.hasContent?f.data&&f.processData&&0===(f.contentType||"").indexOf("application/x-www-form-urlencoded")&&(f.data=f.data.replace(io,"+")):(p=f.url.slice(o.length),f.data&&(o+=(pi.test(o)?"&":"?")+f.data,delete f.data),f.cache===!1&&(o=o.replace(uo,"$1"),p=(pi.test(o)?"&":"?")+"_="+ef+++p),f.url=o+p);f.ifModified&&(i.lastModified[o]&&e.setRequestHeader("If-Modified-Since",i.lastModified[o]),i.etag[o]&&e.setRequestHeader("If-None-Match",i.etag[o]));(f.data&&f.hasContent&&f.contentType!==!1||r.contentType)&&e.setRequestHeader("Content-Type",f.contentType);e.setRequestHeader("Accept",f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+("*"!==f.dataTypes[0]?", "+hf+"; q=0.01":""):f.accepts["*"]);for(g in f.headers)e.setRequestHeader(g,f.headers[g]);if(f.beforeSend&&(f.beforeSend.call(c,e,f)===!1||s))return e.abort();if(ft="abort",it.add(f.complete),e.done(f.success),e.fail(f.error),a=lf(bi,f,r,e)){if(e.readyState=1,v&&nt.trigger("ajaxSend",[e,f]),s)return e;f.async&&f.timeout>0&&(d=n.setTimeout(function(){e.abort("timeout")},f.timeout));try{s=!1;a.send(rt,b)}catch(et){if(s)throw et;b(-1,et)}}else b(-1,"No Transport");return e},getJSON:function(n,t,r){return i.get(n,t,r,"json")},getScript:function(n,t){return i.get(n,void 0,t,"script")}}),i.each(["get","post"],function(n,t){i[t]=function(n,r,u,f){return i.isFunction(r)&&(f=f||u,u=r,r=void 0),i.ajax(i.extend({url:n,type:t,dataType:f,data:r,success:u},i.isPlainObject(n)&&n))}}),i._evalUrl=function(n){return i.ajax({url:n,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,throws:!0})},i.fn.extend({wrapAll:function(n){var t;return this[0]&&(i.isFunction(n)&&(n=n.call(this[0])),t=i(n,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var n=this;n.firstElementChild;)n=n.firstElementChild;return n}).append(this)),this},wrapInner:function(n){return i.isFunction(n)?this.each(function(t){i(this).wrapInner(n.call(this,t))}):this.each(function(){var t=i(this),r=t.contents();r.length?r.wrapAll(n):t.append(n)})},wrap:function(n){var t=i.isFunction(n);return this.each(function(r){i(this).wrapAll(t?n.call(this,r):n)})},unwrap:function(n){return this.parent(n).not("body").each(function(){i(this).replaceWith(this.childNodes)}),this}}),i.expr.pseudos.hidden=function(n){return!i.expr.pseudos.visible(n)},i.expr.pseudos.visible=function(n){return!!(n.offsetWidth||n.offsetHeight||n.getClientRects().length)},i.ajaxSettings.xhr=function(){try{return new n.XMLHttpRequest}catch(t){}},af={0:200,1223:204},et=i.ajaxSettings.xhr(),f.cors=!!et&&"withCredentials"in et,f.ajax=et=!!et,i.ajaxTransport(function(t){var i,r;if(f.cors||et&&!t.crossDomain)return{send:function(u,f){var o,e=t.xhr();if(e.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(o in t.xhrFields)e[o]=t.xhrFields[o];t.mimeType&&e.overrideMimeType&&e.overrideMimeType(t.mimeType);t.crossDomain||u["X-Requested-With"]||(u["X-Requested-With"]="XMLHttpRequest");for(o in u)e.setRequestHeader(o,u[o]);i=function(n){return function(){i&&(i=r=e.onload=e.onerror=e.onabort=e.onreadystatechange=null,"abort"===n?e.abort():"error"===n?"number"!=typeof e.status?f(0,"error"):f(e.status,e.statusText):f(af[e.status]||e.status,e.statusText,"text"!==(e.responseType||"text")||"string"!=typeof e.responseText?{binary:e.response}:{text:e.responseText},e.getAllResponseHeaders()))}};e.onload=i();r=e.onerror=i("error");void 0!==e.onabort?e.onabort=r:e.onreadystatechange=function(){4===e.readyState&&n.setTimeout(function(){i&&r()})};i=i("abort");try{e.send(t.hasContent&&t.data||null)}catch(s){if(i)throw s;}},abort:function(){i&&i()}}}),i.ajaxPrefilter(function(n){n.crossDomain&&(n.contents.script=!1)}),i.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(n){return i.globalEval(n),n}}}),i.ajaxPrefilter("script",function(n){void 0===n.cache&&(n.cache=!1);n.crossDomain&&(n.type="GET")}),i.ajaxTransport("script",function(n){if(n.crossDomain){var r,t;return{send:function(f,e){r=i("<script>").prop({charset:n.scriptCharset,src:n.url}).on("load error",t=function(n){r.remove();t=null;n&&e("error"===n.type?404:200,n.type)});u.head.appendChild(r[0])},abort:function(){t&&t()}}}}),gi=[],ri=/(=)\?(?=&|$)|\?\?/,i.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var n=gi.pop()||i.expando+"_"+ef++;return this[n]=!0,n}}),i.ajaxPrefilter("json jsonp",function(t,r,u){var f,e,o,s=t.jsonp!==!1&&(ri.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&ri.test(t.data)&&"data");if(s||"jsonp"===t.dataTypes[0])return f=t.jsonpCallback=i.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(ri,"$1"+f):t.jsonp!==!1&&(t.url+=(pi.test(t.url)?"&":"?")+t.jsonp+"="+f),t.converters["script json"]=function(){return o||i.error(f+" was not called"),o[0]},t.dataTypes[0]="json",e=n[f],n[f]=function(){o=arguments},u.always(function(){void 0===e?i(n).removeProp(f):n[f]=e;t[f]&&(t.jsonpCallback=r.jsonpCallback,gi.push(f));o&&i.isFunction(e)&&e(o[0]);o=e=void 0}),"script"}),f.createHTMLDocument=function(){var n=u.implementation.createHTMLDocument("").body;return n.innerHTML="<form><\/form><form><\/form>",2===n.childNodes.length}(),i.parseHTML=function(n,t,r){if("string"!=typeof n)return[];"boolean"==typeof t&&(r=t,t=!1);var s,e,o;return t||(f.createHTMLDocument?(t=u.implementation.createHTMLDocument(""),s=t.createElement("base"),s.href=u.location.href,t.head.appendChild(s)):t=u),e=ei.exec(n),o=!r&&[],e?[t.createElement(e[1])]:(e=iu([n],t,o),o&&o.length&&i(o).remove(),i.merge([],e.childNodes))},i.fn.load=function(n,t,r){var u,o,s,f=this,e=n.indexOf(" ");return e>-1&&(u=k(n.slice(e)),n=n.slice(0,e)),i.isFunction(t)?(r=t,t=void 0):t&&"object"==typeof t&&(o="POST"),f.length>0&&i.ajax({url:n,type:o||"GET",dataType:"html",data:t}).done(function(n){s=arguments;f.html(u?i("<div>").append(i.parseHTML(n)).find(u):n)}).always(r&&function(n,t){f.each(function(){r.apply(this,s||[n.responseText,t,n])})}),this},i.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(n,t){i.fn[t]=function(n){return this.on(t,n)}}),i.expr.pseudos.animated=function(n){return i.grep(i.timers,function(t){return n===t.elem}).length},i.offset={setOffset:function(n,t,r){var e,o,s,h,u,c,v,l=i.css(n,"position"),a=i(n),f={};"static"===l&&(n.style.position="relative");u=a.offset();s=i.css(n,"top");c=i.css(n,"left");v=("absolute"===l||"fixed"===l)&&(s+c).indexOf("auto")>-1;v?(e=a.position(),h=e.top,o=e.left):(h=parseFloat(s)||0,o=parseFloat(c)||0);i.isFunction(t)&&(t=t.call(n,r,i.extend({},u)));null!=t.top&&(f.top=t.top-u.top+h);null!=t.left&&(f.left=t.left-u.left+o);"using"in t?t.using.call(n,f):a.css(f)}},i.fn.extend({offset:function(n){if(arguments.length)return void 0===n?this:this.each(function(t){i.offset.setOffset(this,n,t)});var r,u,f,e,t=this[0];if(t)return t.getClientRects().length?(f=t.getBoundingClientRect(),r=t.ownerDocument,u=r.documentElement,e=r.defaultView,{top:f.top+e.pageYOffset-u.clientTop,left:f.left+e.pageXOffset-u.clientLeft}):{top:0,left:0}},position:function(){if(this[0]){var t,r,u=this[0],n={top:0,left:0};return"fixed"===i.css(u,"position")?r=u.getBoundingClientRect():(t=this.offsetParent(),r=this.offset(),l(t[0],"html")||(n=t.offset()),n={top:n.top+i.css(t[0],"borderTopWidth",!0),left:n.left+i.css(t[0],"borderLeftWidth",!0)}),{top:r.top-n.top-i.css(u,"marginTop",!0),left:r.left-n.left-i.css(u,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var n=this.offsetParent;n&&"static"===i.css(n,"position");)n=n.offsetParent;return n||dt})}}),i.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(n,t){var r="pageYOffset"===t;i.fn[n]=function(u){return v(this,function(n,u,f){var e;return i.isWindow(n)?e=n:9===n.nodeType&&(e=n.defaultView),void 0===f?e?e[t]:n[u]:void(e?e.scrollTo(r?e.pageXOffset:f,r?f:e.pageYOffset):n[u]=f)},n,u,arguments.length)}}),i.each(["top","left"],function(n,t){i.cssHooks[t]=hu(f.pixelPosition,function(n,r){if(r)return r=lt(n,t),ai.test(r)?i(n).position()[t]+"px":r})}),i.each({Height:"height",Width:"width"},function(n,t){i.each({padding:"inner"+n,content:t,"":"outer"+n},function(r,u){i.fn[u]=function(f,e){var o=arguments.length&&(r||"boolean"!=typeof f),s=r||(f===!0||e===!0?"margin":"border");return v(this,function(t,r,f){var e;return i.isWindow(t)?0===u.indexOf("outer")?t["inner"+n]:t.document.documentElement["client"+n]:9===t.nodeType?(e=t.documentElement,Math.max(t.body["scroll"+n],e["scroll"+n],t.body["offset"+n],e["offset"+n],e["client"+n])):void 0===f?i.css(t,r,s):i.style(t,r,f,s)},t,o?f:void 0,o)}})}),i.fn.extend({bind:function(n,t,i){return this.on(n,null,t,i)},unbind:function(n,t){return this.off(n,null,t)},delegate:function(n,t,i,r){return this.on(t,n,i,r)},undelegate:function(n,t,i){return 1===arguments.length?this.off(n,"**"):this.off(t,n||"**",i)},holdReady:function(n){n?i.readyWait++:i.ready(!0)}}),i.isArray=Array.isArray,i.parseJSON=JSON.parse,i.nodeName=l,"function"==typeof define&&define.amd&&define("jquery",[],function(){return i}),vf=n.jQuery,yf=n.$,i.noConflict=function(t){return n.$===i&&(n.$=yf),t&&n.jQuery===i&&(n.jQuery=vf),i},t||(n.jQuery=n.$=i),i});window.Modernizr=function(n,t,i){function l(n){c.cssText=n}function at(n,t){return l(y.join(n+";")+(t||""))}function h(n,t){return typeof n===t}function v(n,t){return!!~(""+n).indexOf(t)}function ut(n,t){var u,r;for(u in n)if(r=n[u],!v(r,"-")&&c[r]!==i)return t=="pfx"?r:!0;return!1}function vt(n,t,r){var f,u;for(f in n)if(u=t[n[f]],u!==i)return r===!1?n[f]:h(u,"function")?u.bind(r||t):u;return!1}function f(n,t,i){var r=n.charAt(0).toUpperCase()+n.slice(1),u=(n+" "+st.join(r+" ")+r).split(" ");return h(t,"string")||h(t,"undefined")?ut(u,t):(u=(n+" "+ht.join(r+" ")+r).split(" "),vt(u,t,i))}function yt(){u.input=function(i){for(var r=0,u=i.length;r<u;r++)w[i[r]]=i[r]in o;return w.list&&(w.list=!!t.createElement("datalist")&&!!n.HTMLDataListElement),w}("autocomplete autofocus list placeholder max min multiple pattern required step".split(" "));u.inputtypes=function(n){for(var u=0,r,f,e,h=n.length;u<h;u++)o.setAttribute("type",f=n[u]),r=o.type!=="text",r&&(o.value=g,o.style.cssText="position:absolute;visibility:hidden;",/^range$/.test(f)&&o.style.WebkitAppearance!==i?(s.appendChild(o),e=t.defaultView,r=e.getComputedStyle&&e.getComputedStyle(o,null).WebkitAppearance!=="textfield"&&o.offsetHeight!==0,s.removeChild(o)):/^(search|tel)$/.test(f)||(r=/^(url|email)$/.test(f)?o.checkValidity&&o.checkValidity()===!1:o.value!=g)),ct[n[u]]=!!r;return ct}("search tel url email datetime date month week time datetime-local number range color".split(" "))}var u={},d=!0,s=t.documentElement,e="modernizr",ft=t.createElement(e),c=ft.style,o=t.createElement("input"),g=":)",et={}.toString,y=" -webkit- -moz- -o- -ms- ".split(" "),ot="Webkit Moz O ms",st=ot.split(" "),ht=ot.toLowerCase().split(" "),p={svg:"http://www.w3.org/2000/svg"},r={},ct={},w={},nt=[],tt=nt.slice,b,a=function(n,i,r,u){var l,a,c,v,f=t.createElement("div"),h=t.body,o=h||t.createElement("body");if(parseInt(r,10))while(r--)c=t.createElement("div"),c.id=u?u[r]:e+(r+1),f.appendChild(c);return l=["&#173;",'<style id="s',e,'">',n,"<\/style>"].join(""),f.id=e,(h?f:o).innerHTML+=l,o.appendChild(f),h||(o.style.background="",o.style.overflow="hidden",v=s.style.overflow,s.style.overflow="hidden",s.appendChild(o)),a=i(f,n),h?f.parentNode.removeChild(f):(o.parentNode.removeChild(o),s.style.overflow=v),!!a},pt=function(t){var i=n.matchMedia||n.msMatchMedia,r;return i?i(t)&&i(t).matches||!1:(a("@media "+t+" { #"+e+" { position: absolute; } }",function(t){r=(n.getComputedStyle?getComputedStyle(t,null):t.currentStyle).position=="absolute"}),r)},lt=function(){function n(n,u){u=u||t.createElement(r[n]||"div");n="on"+n;var f=n in u;return f||(u.setAttribute||(u=t.createElement("div")),u.setAttribute&&u.removeAttribute&&(u.setAttribute(n,""),f=h(u[n],"function"),h(u[n],"undefined")||(u[n]=i),u.removeAttribute(n))),u=null,f}var r={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return n}(),it={}.hasOwnProperty,rt,k;rt=!h(it,"undefined")&&!h(it.call,"undefined")?function(n,t){return it.call(n,t)}:function(n,t){return t in n&&h(n.constructor.prototype[t],"undefined")};Function.prototype.bind||(Function.prototype.bind=function(n){var t=this,i,r;if(typeof t!="function")throw new TypeError;return i=tt.call(arguments,1),r=function(){var f,e,u;return this instanceof r?(f=function(){},f.prototype=t.prototype,e=new f,u=t.apply(e,i.concat(tt.call(arguments))),Object(u)===u?u:e):t.apply(n,i.concat(tt.call(arguments)))},r});r.flexbox=function(){return f("flexWrap")};r.canvas=function(){var n=t.createElement("canvas");return!!n.getContext&&!!n.getContext("2d")};r.canvastext=function(){return!!u.canvas&&!!h(t.createElement("canvas").getContext("2d").fillText,"function")};r.webgl=function(){return!!n.WebGLRenderingContext};r.touch=function(){var i;return"ontouchstart"in n||n.DocumentTouch&&t instanceof DocumentTouch?i=!0:a(["@media (",y.join("touch-enabled),("),e,")","{#modernizr{top:9px;position:absolute}}"].join(""),function(n){i=n.offsetTop===9}),i};r.geolocation=function(){return"geolocation"in navigator};r.postmessage=function(){return!!n.postMessage};r.websqldatabase=function(){return!!n.openDatabase};r.indexedDB=function(){return!!f("indexedDB",n)};r.hashchange=function(){return lt("hashchange",n)&&(t.documentMode===i||t.documentMode>7)};r.history=function(){return!!n.history&&!!history.pushState};r.draganddrop=function(){var n=t.createElement("div");return"draggable"in n||"ondragstart"in n&&"ondrop"in n};r.websockets=function(){return"WebSocket"in n||"MozWebSocket"in n};r.rgba=function(){return l("background-color:rgba(150,255,150,.5)"),v(c.backgroundColor,"rgba")};r.hsla=function(){return l("background-color:hsla(120,40%,100%,.5)"),v(c.backgroundColor,"rgba")||v(c.backgroundColor,"hsla")};r.multiplebgs=function(){return l("background:url(https://),url(https://),red url(https://)"),/(url\s*\(.*?){3}/.test(c.background)};r.backgroundsize=function(){return f("backgroundSize")};r.borderimage=function(){return f("borderImage")};r.borderradius=function(){return f("borderRadius")};r.boxshadow=function(){return f("boxShadow")};r.textshadow=function(){return t.createElement("div").style.textShadow===""};r.opacity=function(){return at("opacity:.55"),/^0.55$/.test(c.opacity)};r.cssanimations=function(){return f("animationName")};r.csscolumns=function(){return f("columnCount")};r.cssgradients=function(){var n="background-image:";return l((n+"-webkit- ".split(" ").join("gradient(linear,left top,right bottom,from(#9f9),to(white));"+n)+y.join("linear-gradient(left top,#9f9, white);"+n)).slice(0,-n.length)),v(c.backgroundImage,"gradient")};r.cssreflections=function(){return f("boxReflect")};r.csstransforms=function(){return!!f("transform")};r.csstransforms3d=function(){var n=!!f("perspective");return n&&"webkitPerspective"in s.style&&a("@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}",function(t){n=t.offsetLeft===9&&t.offsetHeight===3}),n};r.csstransitions=function(){return f("transition")};r.fontface=function(){var n;return a('@font-face {font-family:"font";src:url("https://")}',function(i,r){var f=t.getElementById("smodernizr"),u=f.sheet||f.styleSheet,e=u?u.cssRules&&u.cssRules[0]?u.cssRules[0].cssText:u.cssText||"":"";n=/src/i.test(e)&&e.indexOf(r.split(" ")[0])===0}),n};r.generatedcontent=function(){var n;return a(["#",e,"{font:0/0 a}#",e,':after{content:"',g,'";visibility:hidden;font:3px/1 a}'].join(""),function(t){n=t.offsetHeight>=3}),n};r.video=function(){var i=t.createElement("video"),n=!1;try{(n=!!i.canPlayType)&&(n=new Boolean(n),n.ogg=i.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,""),n.h264=i.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,""),n.webm=i.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,""))}catch(r){}return n};r.audio=function(){var i=t.createElement("audio"),n=!1;try{(n=!!i.canPlayType)&&(n=new Boolean(n),n.ogg=i.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),n.mp3=i.canPlayType("audio/mpeg;").replace(/^no$/,""),n.wav=i.canPlayType('audio/wav; codecs="1"').replace(/^no$/,""),n.m4a=(i.canPlayType("audio/x-m4a;")||i.canPlayType("audio/aac;")).replace(/^no$/,""))}catch(r){}return n};r.localstorage=function(){try{return localStorage.setItem(e,e),localStorage.removeItem(e),!0}catch(n){return!1}};r.sessionstorage=function(){try{return sessionStorage.setItem(e,e),sessionStorage.removeItem(e),!0}catch(n){return!1}};r.webworkers=function(){return!!n.Worker};r.applicationcache=function(){return!!n.applicationCache};r.svg=function(){return!!t.createElementNS&&!!t.createElementNS(p.svg,"svg").createSVGRect};r.inlinesvg=function(){var n=t.createElement("div");return n.innerHTML="<svg/>",(n.firstChild&&n.firstChild.namespaceURI)==p.svg};r.smil=function(){return!!t.createElementNS&&/SVGAnimate/.test(et.call(t.createElementNS(p.svg,"animate")))};r.svgclippaths=function(){return!!t.createElementNS&&/SVGClipPath/.test(et.call(t.createElementNS(p.svg,"clipPath")))};for(k in r)rt(r,k)&&(b=k.toLowerCase(),u[b]=r[k](),nt.push((u[b]?"":"no-")+b));return u.input||yt(),u.addTest=function(n,t){if(typeof n=="object")for(var r in n)rt(n,r)&&u.addTest(r,n[r]);else{if(n=n.toLowerCase(),u[n]!==i)return u;t=typeof t=="function"?t():t;typeof d!="undefined"&&d&&(s.className+=" "+(t?"":"no-")+n);u[n]=t}return u},l(""),ft=o=null,function(n,t){function v(n,t){var i=n.createElement("p"),r=n.getElementsByTagName("head")[0]||n.documentElement;return i.innerHTML="x<style>"+t+"<\/style>",r.insertBefore(i.lastChild,r.firstChild)}function s(){var n=r.elements;return typeof n=="string"?n.split(" "):n}function u(n){var t=a[n[l]];return t||(t={},o++,n[l]=o,a[o]=t),t}function h(n,r,f){if(r||(r=t),i)return r.createElement(n);f||(f=u(r));var e;return e=f.cache[n]?f.cache[n].cloneNode():b.test(n)?(f.cache[n]=f.createElem(n)).cloneNode():f.createElem(n),e.canHaveChildren&&!w.test(n)&&!e.tagUrn?f.frag.appendChild(e):e}function y(n,r){if(n||(n=t),i)return n.createDocumentFragment();r=r||u(n);for(var e=r.frag.cloneNode(),f=0,o=s(),h=o.length;f<h;f++)e.createElement(o[f]);return e}function p(n,t){t.cache||(t.cache={},t.createElem=n.createElement,t.createFrag=n.createDocumentFragment,t.frag=t.createFrag());n.createElement=function(i){return r.shivMethods?h(i,n,t):t.createElem(i)};n.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+s().join().replace(/[\w\-]+/g,function(n){return t.createElem(n),t.frag.createElement(n),'c("'+n+'")'})+");return n}")(r,t.frag)}function c(n){n||(n=t);var f=u(n);return r.shivCSS&&!e&&!f.hasCSS&&(f.hasCSS=!!v(n,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),i||p(n,f),n}var f=n.html5||{},w=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,b=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,e,l="_html5shiv",o=0,a={},i,r;(function(){try{var n=t.createElement("a");n.innerHTML="<xyz><\/xyz>";e="hidden"in n;i=n.childNodes.length==1||function(){t.createElement("a");var n=t.createDocumentFragment();return typeof n.cloneNode=="undefined"||typeof n.createDocumentFragment=="undefined"||typeof n.createElement=="undefined"}()}catch(r){e=!0;i=!0}})();r={elements:f.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video",version:"3.7.0",shivCSS:f.shivCSS!==!1,supportsUnknownElements:i,shivMethods:f.shivMethods!==!1,type:"default",shivDocument:c,createElement:h,createDocumentFragment:y};n.html5=r;c(t)}(this,t),u._version="2.8.3",u._prefixes=y,u._domPrefixes=ht,u._cssomPrefixes=st,u.mq=pt,u.hasEvent=lt,u.testProp=function(n){return ut([n])},u.testAllProps=f,u.testStyles=a,u.prefixed=function(n,t,i){return t?f(n,t,i):f(n,"pfx")},s.className=s.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(d?" js "+nt.join(" "):""),u}(this,this.document),function(n,t,i){function h(n){return"[object Function]"==y.call(n)}function c(n){return"string"==typeof n}function l(){}function w(n){return!n||"loaded"==n||"complete"==n||"uninitialized"==n}function e(){var n=a.shift();v=1;n?n.t?s(function(){("c"==n.t?u.injectCss:u.injectJs)(n.s,0,n.a,n.x,n.e,1)},0):(n(),e()):v=0}function ut(n,i,f,h,c,l,y){function k(t){if(!nt&&w(p.readyState)&&(tt.r=nt=1,!v&&e(),p.onload=p.onreadystatechange=null,t)){"img"!=n&&s(function(){g.removeChild(p)},50);for(var u in r[i])r[i].hasOwnProperty(u)&&r[i][u].onload()}}var y=y||u.errorTimeout,p=t.createElement(n),nt=0,b=0,tt={t:f,s:i,e:c,a:l,x:y};1===r[i]&&(b=1,r[i]=[]);"object"==n?p.data=i:(p.src=i,p.type=n);p.width=p.height="0";p.onerror=p.onload=p.onreadystatechange=function(){k.call(this,b)};a.splice(h,0,tt);"img"!=n&&(b||2===r[i]?(g.insertBefore(p,d?null:o),s(k,y)):r[i].push(p))}function ft(n,t,i,r,u){return v=0,t=t||"j",c(n)?ut("c"==t?et:nt,n,t,this.i++,i,r,u):(a.splice(this.i++,0,n),1==a.length&&e()),this}function b(){var n=u;return n.loader={load:ft,i:0},n}var f=t.documentElement,s=n.setTimeout,o=t.getElementsByTagName("script")[0],y={}.toString,a=[],v=0,k="MozAppearance"in f.style,d=k&&!!t.createRange().compareNode,g=d?f:o.parentNode,f=n.opera&&"[object Opera]"==y.call(n.opera),f=!!t.attachEvent&&!f,nt=k?"object":f?"script":"img",et=f?"script":nt,tt=Array.isArray||function(n){return"[object Array]"==y.call(n)},p=[],r={},it={timeout:function(n,t){return t.length&&(n.timeout=t[0]),n}},rt,u;u=function(n){function a(n){for(var n=n.split("!"),f=p.length,t=n.pop(),e=n.length,t={url:t,origUrl:t,prefixes:n},u,r,i=0;i<e;i++)r=n[i].split("="),(u=it[r.shift()])&&(t=u(t,r));for(i=0;i<f;i++)t=p[i](t);return t}function f(n,t,u,f,e){var o=a(n),s=o.autoCallback;o.url.split(".").pop().split("?").shift();o.bypass||(t&&(t=h(t)?t:t[n]||t[f]||t[n.split("/").pop().split("?")[0]]),o.instead?o.instead(n,t,u,f,e):(r[o.url]?o.noexec=!0:r[o.url]=1,u.load(o.url,o.forceCSS||!o.forceJS&&"css"==o.url.split(".").pop().split("?").shift()?"c":i,o.noexec,o.attrs,o.timeout),(h(t)||h(s))&&u.load(function(){b();t&&t(o.origUrl,e,f);s&&s(o.origUrl,e,f);r[o.url]=2})))}function s(n,t){function a(n,o){if(n){if(c(n))o||(i=function(){var n=[].slice.call(arguments);s.apply(this,n);u()}),f(n,i,t,0,e);else if(Object(n)===n)for(r in v=function(){var t=0,i;for(i in n)n.hasOwnProperty(i)&&t++;return t}(),n)n.hasOwnProperty(r)&&(!o&&!--v&&(h(i)?i=function(){var n=[].slice.call(arguments);s.apply(this,n);u()}:i[r]=function(n){return function(){var t=[].slice.call(arguments);n&&n.apply(this,t);u()}}(s[r])),f(n[r],i,t,r,e))}else o||u()}var e=!!n.test,o=n.load||n.both,i=n.callback||l,s=i,u=n.complete||l,v,r;a(e?n.yep:n.nope,!!o);o&&a(o)}var e,t,o=this.yepnope.loader;if(c(n))f(n,0,o,0);else if(tt(n))for(e=0;e<n.length;e++)t=n[e],c(t)?f(t,0,o,0):tt(t)?u(t):Object(t)===t&&s(t,o);else Object(n)===n&&s(n,o)};u.addPrefix=function(n,t){it[n]=t};u.addFilter=function(n){p.push(n)};u.errorTimeout=1e4;null==t.readyState&&t.addEventListener&&(t.readyState="loading",t.addEventListener("DOMContentLoaded",rt=function(){t.removeEventListener("DOMContentLoaded",rt,0);t.readyState="complete"},0));n.yepnope=b();n.yepnope.executeStack=e;n.yepnope.injectJs=function(n,i,r,f,h,c){var a=t.createElement("script"),v,y,f=f||u.errorTimeout;a.src=n;for(y in r)a.setAttribute(y,r[y]);i=c?e:i||l;a.onreadystatechange=a.onload=function(){!v&&w(a.readyState)&&(v=1,i(),a.onload=a.onreadystatechange=null)};s(function(){v||(v=1,i(1))},f);h?a.onload():o.parentNode.insertBefore(a,o)};n.yepnope.injectCss=function(n,i,r,u,f,h){var u=t.createElement("link"),c,i=h?e:i||l;u.href=n;u.rel="stylesheet";u.type="text/css";for(c in r)u.setAttribute(c,r[c]);f||(o.parentNode.insertBefore(u,o),s(i,0))}}(this,document);Modernizr.load=function(){yepnope.apply(window,[].slice.call(arguments,0))};!function(n){"use strict";n.matchMedia=n.matchMedia||function(n){var u,i=n.documentElement,f=i.firstElementChild||i.firstChild,r=n.createElement("body"),t=n.createElement("div");return t.id="mq-test-1",t.style.cssText="position:absolute;top:-100em",r.style.background="none",r.appendChild(t),function(n){return t.innerHTML='&shy;<style media="'+n+'"> #mq-test-1 { width: 42px; }<\/style>',i.insertBefore(r,f),u=42===t.offsetWidth,i.removeChild(r),{matches:u,media:n}}}(n.document)}(this),function(n){"use strict";function p(){y(!0)}var t={};n.respond=t;t.update=function(){};var f=[],it=function(){var t=!1;try{t=new n.XMLHttpRequest}catch(i){t=new n.ActiveXObject("Microsoft.XMLHTTP")}return function(){return t}}(),w=function(n,t){var i=it();i&&(i.open("GET",n,!0),i.onreadystatechange=function(){4!==i.readyState||200!==i.status&&304!==i.status||t(i.responseText)},4!==i.readyState&&i.send(null))},b=function(n){return n.replace(t.regex.minmaxwh,"").match(t.regex.other)};if(t.ajax=w,t.queue=f,t.unsupportedmq=b,t.regex={media:/@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi,keyframes:/@(?:\-(?:o|moz|webkit)\-)?keyframes[^\{]+\{(?:[^\{\}]*\{[^\}\{]*\})+[^\}]*\}/gi,comments:/\/\*[^*]*\*+([^/][^*]*\*+)*\//gi,urls:/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,findStyles:/@media *([^\{]+)\{([\S\s]+?)$/,only:/(only\s+)?([a-zA-Z]+)\s?/,minw:/\(\s*min\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/,maxw:/\(\s*max\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/,minmaxwh:/\(\s*m(in|ax)\-(height|width)\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/gi,other:/\([^\)]*\)/g},t.mediaQueriesSupported=n.matchMedia&&null!==n.matchMedia("only all")&&n.matchMedia("only all").matches,!t.mediaQueriesSupported){var c,k,l,i=n.document,r=i.documentElement,e=[],o=[],u=[],a={},d=30,s=i.getElementsByTagName("head")[0]||r,rt=i.getElementsByTagName("base")[0],h=s.getElementsByTagName("link"),v=function(){var u,t=i.createElement("div"),n=i.body,o=r.style.fontSize,e=n&&n.style.fontSize,f=!1;return t.style.cssText="position:absolute;font-size:1em;width:1em",n||(n=f=i.createElement("body"),n.style.background="none"),r.style.fontSize="100%",n.style.fontSize="100%",n.appendChild(t),f&&r.insertBefore(n,r.firstChild),u=t.offsetWidth,f?r.removeChild(n):n.removeChild(t),r.style.fontSize=o,e&&(n.style.fontSize=e),u=l=parseFloat(u)},y=function(t){var rt="clientWidth",ut=r[rt],ft="CSS1Compat"===i.compatMode&&ut||i.body[rt]||ut,p={},ct=h[h.length-1],et=(new Date).getTime(),tt,g,nt,f,it;if(t&&c&&d>et-c)return n.clearTimeout(k),k=n.setTimeout(y,d),void 0;c=et;for(tt in e)if(e.hasOwnProperty(tt)){var a=e[tt],w=a.minw,b=a.maxw,ot=null===w,st=null===b,ht="em";w&&(w=parseFloat(w)*(w.indexOf(ht)>-1?l||v():1));b&&(b=parseFloat(b)*(b.indexOf(ht)>-1?l||v():1));a.hasquery&&(ot&&st||!(ot||ft>=w)||!(st||b>=ft))||(p[a.media]||(p[a.media]=[]),p[a.media].push(o[a.rules]))}for(g in u)u.hasOwnProperty(g)&&u[g]&&u[g].parentNode===s&&s.removeChild(u[g]);u.length=0;for(nt in p)p.hasOwnProperty(nt)&&(f=i.createElement("style"),it=p[nt].join("\n"),f.type="text/css",f.media=nt,s.insertBefore(f,ct.nextSibling),f.styleSheet?f.styleSheet.cssText=it:f.appendChild(i.createTextNode(it)),u.push(f))},g=function(n,i,r){var h=n.replace(t.regex.comments,"").replace(t.regex.keyframes,"").match(t.regex.media),c=h&&h.length||0,l,a,f,v,u,p,w,s;for(i=i.substring(0,i.lastIndexOf("/")),l=function(n){return n.replace(t.regex.urls,"$1"+i+"$2$3")},a=!c&&r,i.length&&(i+="/"),a&&(c=1),f=0;c>f;f++)for(a?(v=r,o.push(l(n))):(v=h[f].match(t.regex.findStyles)&&RegExp.$1,o.push(RegExp.$2&&l(RegExp.$2))),p=v.split(","),w=p.length,s=0;w>s;s++)u=p[s],b(u)||e.push({media:u.split("(")[0].match(t.regex.only)&&RegExp.$2||"all",rules:o.length-1,hasquery:u.indexOf("(")>-1,minw:u.match(t.regex.minw)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:u.match(t.regex.maxw)&&parseFloat(RegExp.$1)+(RegExp.$2||"")});y()},nt=function(){if(f.length){var t=f.shift();w(t.href,function(i){g(i,t.href,t.media);a[t.href]=!0;n.setTimeout(function(){nt()},0)})}},tt=function(){for(var r=0;r<h.length;r++){var i=h[r],t=i.href,u=i.media,e=i.rel&&"stylesheet"===i.rel.toLowerCase();t&&e&&!a[t]&&(i.styleSheet&&i.styleSheet.rawCssText?(g(i.styleSheet.rawCssText,t,u),a[t]=!0):(!/^([a-zA-Z:]*\/\/)/.test(t)&&!rt||t.replace(RegExp.$1,"").split("/")[0]===n.location.host)&&("//"===t.substring(0,2)&&(t=n.location.protocol+t),f.push({href:t,media:u})))}nt()};tt();t.update=tt;t.getEmValue=v;n.addEventListener?n.addEventListener("resize",p,!1):n.attachEvent&&n.attachEvent("onresize",p)}}(this);_gsScope="undefined"!=typeof module&&module.exports&&"undefined"!=typeof global?global:this||window;(_gsScope._gsQueue||(_gsScope._gsQueue=[])).push(function(){"use strict";_gsScope._gsDefine("TweenMax",["core.Animation","core.SimpleTimeline","TweenLite"],function(n,t,i){var s=function(n){for(var i=[],r=n.length,t=0;t!==r;i.push(n[t++]));return i},l=function(n,t,i){var u,r,f=n.cycle;for(u in f)r=f[u],n[u]="function"==typeof r?r(i,t[i]):r[i%r.length];delete n.cycle},r=function(n,t,u){i.call(this,n,t,u);this._cycle=0;this._yoyo=this.vars.yoyo===!0;this._repeat=this.vars.repeat||0;this._repeatDelay=this.vars.repeatDelay||0;this._dirty=!0;this.render=r.prototype.render},f=1e-10,e=i._internals,a=e.isSelector,v=e.isArray,u=r.prototype=i.to({},.1,{}),y=[],o,h,c;return r.version="1.19.1",u.constructor=r,u.kill()._gc=!1,r.killTweensOf=r.killDelayedCallsTo=i.killTweensOf,r.getTweensOf=i.getTweensOf,r.lagSmoothing=i.lagSmoothing,r.ticker=i.ticker,r.render=i.render,u.invalidate=function(){return this._yoyo=this.vars.yoyo===!0,this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._uncache(!0),i.prototype.invalidate.call(this)},u.updateTo=function(n,t){var u,h=this.ratio,f=this.vars.immediateRender||n.immediateRender,e,o,s,r;t&&this._startTime<this._timeline._time&&(this._startTime=this._timeline._time,this._uncache(!1),this._gc?this._enabled(!0,!1):this._timeline.insert(this,this._startTime-this._delay));for(u in n)this.vars[u]=n[u];if(this._initted||f)if(t)this._initted=!1,f&&this.render(0,!0,!0);else if(this._gc&&this._enabled(!0,!1),this._notifyPluginsOfEnabled&&this._firstPT&&i._onPluginEvent("_onDisable",this),this._time/this._duration>.998)e=this._totalTime,this.render(0,!0,!1),this._initted=!1,this.render(e,!0,!1);else if(this._initted=!1,this._init(),this._time>0||f)for(s=1/(1-h),r=this._firstPT;r;)o=r.s+r.c,r.c*=s,r.s=o-r.c,r=r._next;return this},u.render=function(n,t,i){this._initted||0===this._duration&&this.vars.repeat&&this.invalidate();var a,s,o,y,r,c,v,p,k=this._dirty?this.totalDuration():this._totalDuration,w=this._time,l=this._totalTime,b=this._cycle,u=this._duration,h=this._rawPrevTime;if(n>=k-1e-7&&n>=0?(this._totalTime=k,this._cycle=this._repeat,this._yoyo&&0!=(1&this._cycle)?(this._time=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0):(this._time=u,this.ratio=this._ease._calcEnd?this._ease.getRatio(1):1),this._reversed||(a=!0,s="onComplete",i=i||this._timeline.autoRemoveChildren),0===u&&(this._initted||!this.vars.lazy||i)&&(this._startTime===this._timeline._duration&&(n=0),(0>h||0>=n&&n>=-1e-7||h===f&&"isPause"!==this.data)&&h!==n&&(i=!0,h>f&&(s="onReverseComplete")),this._rawPrevTime=p=!t||n||h===n?n:f)):1e-7>n?(this._totalTime=this._time=this._cycle=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0,(0!==l||0===u&&h>0)&&(s="onReverseComplete",a=this._reversed),0>n&&(this._active=!1,0===u&&(this._initted||!this.vars.lazy||i)&&(h>=0&&(i=!0),this._rawPrevTime=p=!t||n||h===n?n:f)),this._initted||(i=!0)):(this._totalTime=this._time=n,0!==this._repeat&&(y=u+this._repeatDelay,this._cycle=this._totalTime/y>>0,0!==this._cycle&&this._cycle===this._totalTime/y&&n>=l&&this._cycle--,this._time=this._totalTime-this._cycle*y,this._yoyo&&0!=(1&this._cycle)&&(this._time=u-this._time),this._time>u?this._time=u:this._time<0&&(this._time=0)),this._easeType?(r=this._time/u,c=this._easeType,v=this._easePower,(1===c||3===c&&r>=.5)&&(r=1-r),3===c&&(r*=2),1===v?r*=r:2===v?r*=r*r:3===v?r*=r*r*r:4===v&&(r*=r*r*r*r),this.ratio=1===c?1-r:2===c?r:this._time/u<.5?r/2:1-r/2):this.ratio=this._ease.getRatio(this._time/u)),w===this._time&&!i&&b===this._cycle)return void(l!==this._totalTime&&this._onUpdate&&(t||this._callback("onUpdate")));if(!this._initted){if(this._init(),!this._initted||this._gc)return;if(!i&&this._firstPT&&(this.vars.lazy!==!1&&this._duration||this.vars.lazy&&!this._duration))return this._time=w,this._totalTime=l,this._rawPrevTime=h,this._cycle=b,e.lazyTweens.push(this),void(this._lazy=[n,t]);this._time&&!a?this.ratio=this._ease.getRatio(this._time/u):a&&this._ease._calcEnd&&(this.ratio=this._ease.getRatio(0===this._time?0:1))}for(this._lazy!==!1&&(this._lazy=!1),this._active||!this._paused&&this._time!==w&&n>=0&&(this._active=!0),0===l&&(2===this._initted&&n>0&&this._init(),this._startAt&&(n>=0?this._startAt.render(n,t,i):s||(s="_dummyGS")),this.vars.onStart&&(0!==this._totalTime||0===u)&&(t||this._callback("onStart"))),o=this._firstPT;o;)o.f?o.t[o.p](o.c*this.ratio+o.s):o.t[o.p]=o.c*this.ratio+o.s,o=o._next;this._onUpdate&&(0>n&&this._startAt&&this._startTime&&this._startAt.render(n,t,i),t||(this._totalTime!==l||s)&&this._callback("onUpdate"));this._cycle!==b&&(t||this._gc||this.vars.onRepeat&&this._callback("onRepeat"));s&&(!this._gc||i)&&(0>n&&this._startAt&&!this._onUpdate&&this._startTime&&this._startAt.render(n,t,i),a&&(this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!t&&this.vars[s]&&this._callback(s),0===u&&this._rawPrevTime===f&&p!==f&&(this._rawPrevTime=0))},r.to=function(n,t,i){return new r(n,t,i)},r.from=function(n,t,i){return i.runBackwards=!0,i.immediateRender=0!=i.immediateRender,new r(n,t,i)},r.fromTo=function(n,t,i,u){return u.startAt=i,u.immediateRender=0!=u.immediateRender&&0!=i.immediateRender,new r(n,t,u)},r.staggerTo=r.allTo=function(n,t,u,f,e,o,h){f=f||0;var b,c,p,w,d=0,g=[],nt=function(){u.onComplete&&u.onComplete.apply(u.onCompleteScope||this,arguments);e.apply(h||u.callbackScope||this,o||y)},tt=u.cycle,k=u.startAt&&u.startAt.cycle;for(v(n)||("string"==typeof n&&(n=i.selector(n)||n),a(n)&&(n=s(n))),n=n||[],0>f&&(n=s(n),n.reverse(),f*=-1),b=n.length-1,p=0;b>=p;p++){c={};for(w in u)c[w]=u[w];if(tt&&(l(c,n,p),null!=c.duration&&(t=c.duration,delete c.duration)),k){k=c.startAt={};for(w in u.startAt)k[w]=u.startAt[w];l(c.startAt,n,p)}c.delay=d+(c.delay||0);p===b&&e&&(c.onComplete=nt);g[p]=new r(n[p],t,c);d+=f}return g},r.staggerFrom=r.allFrom=function(n,t,i,u,f,e,o){return i.runBackwards=!0,i.immediateRender=0!=i.immediateRender,r.staggerTo(n,t,i,u,f,e,o)},r.staggerFromTo=r.allFromTo=function(n,t,i,u,f,e,o,s){return u.startAt=i,u.immediateRender=0!=u.immediateRender&&0!=i.immediateRender,r.staggerTo(n,t,u,f,e,o,s)},r.delayedCall=function(n,t,i,u,f){return new r(t,0,{delay:n,onComplete:t,onCompleteParams:i,callbackScope:u,onReverseComplete:t,onReverseCompleteParams:i,immediateRender:!1,useFrames:f,overwrite:0})},r.set=function(n,t){return new r(n,0,t)},r.isTweening=function(n){return i.getTweensOf(n,!0).length>0},o=function(n,t){for(var u=[],f=0,r=n._first;r;)r instanceof i?u[f++]=r:(t&&(u[f++]=r),u=u.concat(o(r,t)),f=u.length),r=r._next;return u},h=r.getAllTweens=function(t){return o(n._rootTimeline,t).concat(o(n._rootFramesTimeline,t))},r.killAll=function(n,i,r,u){null==i&&(i=!0);null==r&&(r=!0);for(var o,f,s=h(0!=u),c=s.length,l=i&&r&&u,e=0;c>e;e++)f=s[e],(l||f instanceof t||(o=f.target===f.vars.onComplete)&&r||i&&!o)&&(n?f.totalTime(f._reversed?0:f.totalDuration()):f._enabled(!1,!1))},r.killChildTweensOf=function(n,t){if(null!=n){var f,o,h,u,l,c=e.tweenLookup;if("string"==typeof n&&(n=i.selector(n)||n),a(n)&&(n=s(n)),v(n))for(u=n.length;--u>-1;)r.killChildTweensOf(n[u],t);else{f=[];for(h in c)for(o=c[h].target.parentNode;o;)o===n&&(f=f.concat(c[h].tweens)),o=o.parentNode;for(l=f.length,u=0;l>u;u++)t&&f[u].totalTime(f[u].totalDuration()),f[u]._enabled(!1,!1)}}},c=function(n,i,r,u){i=i!==!1;r=r!==!1;u=u!==!1;for(var e,f,o=h(u),c=i&&r&&u,s=o.length;--s>-1;)f=o[s],(c||f instanceof t||(e=f.target===f.vars.onComplete)&&r||i&&!e)&&f.paused(n)},r.pauseAll=function(n,t,i){c(!0,n,t,i)},r.resumeAll=function(n,t,i){c(!1,n,t,i)},r.globalTimeScale=function(t){var r=n._rootTimeline,u=i.ticker.time;return arguments.length?(t=t||f,r._startTime=u-(u-r._startTime)*r._timeScale/t,r=n._rootFramesTimeline,u=i.ticker.frame,r._startTime=u-(u-r._startTime)*r._timeScale/t,r._timeScale=n._rootTimeline._timeScale=t,t):r._timeScale},u.progress=function(n,t){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&0!=(1&this._cycle)?1-n:n)+this._cycle*(this._duration+this._repeatDelay),t):this._time/this.duration()},u.totalProgress=function(n,t){return arguments.length?this.totalTime(this.totalDuration()*n,t):this._totalTime/this.totalDuration()},u.time=function(n,t){return arguments.length?(this._dirty&&this.totalDuration(),n>this._duration&&(n=this._duration),this._yoyo&&0!=(1&this._cycle)?n=this._duration-n+this._cycle*(this._duration+this._repeatDelay):0!==this._repeat&&(n+=this._cycle*(this._duration+this._repeatDelay)),this.totalTime(n,t)):this._time},u.duration=function(t){return arguments.length?n.prototype.duration.call(this,t):this._duration},u.totalDuration=function(n){return arguments.length?-1===this._repeat?this:this.duration((n-this._repeat*this._repeatDelay)/(this._repeat+1)):(this._dirty&&(this._totalDuration=-1===this._repeat?999999999999:this._duration*(this._repeat+1)+this._repeatDelay*this._repeat,this._dirty=!1),this._totalDuration)},u.repeat=function(n){return arguments.length?(this._repeat=n,this._uncache(!0)):this._repeat},u.repeatDelay=function(n){return arguments.length?(this._repeatDelay=n,this._uncache(!0)):this._repeatDelay},u.yoyo=function(n){return arguments.length?(this._yoyo=n,this):this._yoyo},r},!0);_gsScope._gsDefine("TimelineLite",["core.Animation","core.SimpleTimeline","TweenLite"],function(n,t,i){var u=function(n){t.call(this,n);this._labels={};this.autoRemoveChildren=this.vars.autoRemoveChildren===!0;this.smoothChildTiming=this.vars.smoothChildTiming===!0;this._sortChildren=!0;this._onUpdate=this.vars.onUpdate;var r,u,i=this.vars;for(u in i)r=i[u],f(r)&&-1!==r.join("").indexOf("{self}")&&(i[u]=this._swapSelfInParams(r));f(i.tweens)&&this.add(i.tweens,0,i.align,i.stagger)},e=1e-10,o=i._internals,y=u._internals={},p=o.isSelector,f=o.isArray,h=o.lazyTweens,c=o.lazyRender,s=_gsScope._gsDefine.globals,l=function(n){var t,i={};for(t in n)i[t]=n[t];return i},a=function(n,t,i){var u,r,f=n.cycle;for(u in f)r=f[u],n[u]="function"==typeof r?r(i,t[i]):r[i%r.length];delete n.cycle},w=y.pauseCallback=function(){},v=function(n){for(var i=[],r=n.length,t=0;t!==r;i.push(n[t++]));return i},r=u.prototype=new t;return u.version="1.19.1",r.constructor=u,r.kill()._gc=r._forcingPlayhead=r._hasPause=!1,r.to=function(n,t,r,u){var f=r.repeat&&s.TweenMax||i;return t?this.add(new f(n,t,r),u):this.set(n,r,u)},r.from=function(n,t,r,u){return this.add((r.repeat&&s.TweenMax||i).from(n,t,r),u)},r.fromTo=function(n,t,r,u,f){var e=u.repeat&&s.TweenMax||i;return t?this.add(e.fromTo(n,t,r,u),f):this.set(n,u,f)},r.staggerTo=function(n,t,r,f,e,o,s,h){var c,y,w=new u({onComplete:o,onCompleteParams:s,callbackScope:h,smoothChildTiming:this.smoothChildTiming}),b=r.cycle;for("string"==typeof n&&(n=i.selector(n)||n),n=n||[],p(n)&&(n=v(n)),f=f||0,0>f&&(n=v(n),n.reverse(),f*=-1),y=0;y<n.length;y++)c=l(r),c.startAt&&(c.startAt=l(c.startAt),c.startAt.cycle&&a(c.startAt,n,y)),b&&(a(c,n,y),null!=c.duration&&(t=c.duration,delete c.duration)),w.to(n[y],t,c,y*f);return this.add(w,e)},r.staggerFrom=function(n,t,i,r,u,f,e,o){return i.immediateRender=0!=i.immediateRender,i.runBackwards=!0,this.staggerTo(n,t,i,r,u,f,e,o)},r.staggerFromTo=function(n,t,i,r,u,f,e,o,s){return r.startAt=i,r.immediateRender=0!=r.immediateRender&&0!=i.immediateRender,this.staggerTo(n,t,r,u,f,e,o,s)},r.call=function(n,t,r,u){return this.add(i.delayedCall(0,n,t,r),u)},r.set=function(n,t,r){return r=this._parseTimeOrLabel(r,0,!0),null==t.immediateRender&&(t.immediateRender=r===this._time&&!this._paused),this.add(new i(n,0,t),r)},u.exportRoot=function(n,t){n=n||{};null==n.smoothChildTiming&&(n.smoothChildTiming=!0);var r,o,f=new u(n),e=f._timeline;for(null==t&&(t=!0),e._remove(f,!0),f._startTime=0,f._rawPrevTime=f._time=f._totalTime=e._time,r=e._first;r;)o=r._next,t&&r instanceof i&&r.target===r.vars.onComplete||f.add(r,r._startTime-r._delay),r=o;return e.add(f,0),f},r.add=function(r,e,o,s){var l,v,a,h,c,y;if("number"!=typeof e&&(e=this._parseTimeOrLabel(e,0,!0,r)),!(r instanceof n)){if(r instanceof Array||r&&r.push&&f(r)){for(o=o||"normal",s=s||0,l=e,v=r.length,a=0;v>a;a++)f(h=r[a])&&(h=new u({tweens:h})),this.add(h,l),"string"!=typeof h&&"function"!=typeof h&&("sequence"===o?l=h._startTime+h.totalDuration()/h._timeScale:"start"===o&&(h._startTime-=h.delay())),l+=s;return this._uncache(!0)}if("string"==typeof r)return this.addLabel(r,e);if("function"!=typeof r)throw"Cannot add "+r+" into the timeline; it is not a tween, timeline, function, or string.";r=i.delayedCall(0,r)}if(t.prototype.add.call(this,r,e),(this._gc||this._time===this._duration)&&!this._paused&&this._duration<this.duration())for(c=this,y=c.rawTime()>r._startTime;c._timeline;)y&&c._timeline.smoothChildTiming?c.totalTime(c._totalTime,!0):c._gc&&c._enabled(!0,!1),c=c._timeline;return this},r.remove=function(t){var r,i;if(t instanceof n)return this._remove(t,!1),r=t._timeline=t.vars.useFrames?n._rootFramesTimeline:n._rootTimeline,t._startTime=(t._paused?t._pauseTime:r._time)-(t._reversed?t.totalDuration()-t._totalTime:t._totalTime)/t._timeScale,this;if(t instanceof Array||t&&t.push&&f(t)){for(i=t.length;--i>-1;)this.remove(t[i]);return this}return"string"==typeof t?this.removeLabel(t):this.kill(null,t)},r._remove=function(n,i){t.prototype._remove.call(this,n,i);var r=this._last;return r?this._time>this.duration()&&(this._time=this._duration,this._totalTime=this._totalDuration):this._time=this._totalTime=this._duration=this._totalDuration=0,this},r.append=function(n,t){return this.add(n,this._parseTimeOrLabel(null,t,!0,n))},r.insert=r.insertMultiple=function(n,t,i,r){return this.add(n,t||0,i,r)},r.appendMultiple=function(n,t,i,r){return this.add(n,this._parseTimeOrLabel(null,t,!0,n),i,r)},r.addLabel=function(n,t){return this._labels[n]=this._parseTimeOrLabel(t),this},r.addPause=function(n,t,r,u){var f=i.delayedCall(0,w,r,u||this);return f.vars.onComplete=f.vars.onReverseComplete=t,f.data="isPause",this._hasPause=!0,this.add(f,n)},r.removeLabel=function(n){return delete this._labels[n],this},r.getLabelTime=function(n){return null!=this._labels[n]?this._labels[n]:-1},r._parseTimeOrLabel=function(t,i,r,u){var e;if(u instanceof n&&u.timeline===this)this.remove(u);else if(u&&(u instanceof Array||u.push&&f(u)))for(e=u.length;--e>-1;)u[e]instanceof n&&u[e].timeline===this&&this.remove(u[e]);if("string"==typeof i)return this._parseTimeOrLabel(i,r&&"number"==typeof t&&null==this._labels[i]?t-this.duration():0,r);if(i=i||0,"string"==typeof t&&(isNaN(t)||null!=this._labels[t])){if(e=t.indexOf("="),-1===e)return null==this._labels[t]?r?this._labels[t]=this.duration()+i:i:this._labels[t]+i;i=parseInt(t.charAt(e-1)+"1",10)*Number(t.substr(e+1));t=e>1?this._parseTimeOrLabel(t.substr(0,e-1),0,r):this.duration()}else null==t&&(t=this.duration());return Number(t)+i},r.seek=function(n,t){return this.totalTime("number"==typeof n?n:this._parseTimeOrLabel(n),t!==!1)},r.stop=function(){return this.paused(!0)},r.gotoAndPlay=function(n,t){return this.play(n,t)},r.gotoAndStop=function(n,t){return this.pause(n,t)},r.render=function(n,t,i){this._gc&&this._enabled(!0,!1);var r,s,v,f,l,u,a,y=this._dirty?this.totalDuration():this._totalDuration,o=this._time,w=this._startTime,b=this._timeScale,p=this._paused;if(n>=y-1e-7&&n>=0)this._totalTime=this._time=y,this._reversed||this._hasPausedChild()||(s=!0,f="onComplete",l=!!this._timeline.autoRemoveChildren,0===this._duration&&(0>=n&&n>=-1e-7||this._rawPrevTime<0||this._rawPrevTime===e)&&this._rawPrevTime!==n&&this._first&&(l=!0,this._rawPrevTime>e&&(f="onReverseComplete"))),this._rawPrevTime=this._duration||!t||n||this._rawPrevTime===n?n:e,n=y+.0001;else if(1e-7>n)if(this._totalTime=this._time=0,(0!==o||0===this._duration&&this._rawPrevTime!==e&&(this._rawPrevTime>0||0>n&&this._rawPrevTime>=0))&&(f="onReverseComplete",s=this._reversed),0>n)this._active=!1,this._timeline.autoRemoveChildren&&this._reversed?(l=s=!0,f="onReverseComplete"):this._rawPrevTime>=0&&this._first&&(l=!0),this._rawPrevTime=n;else{if(this._rawPrevTime=this._duration||!t||n||this._rawPrevTime===n?n:e,0===n&&s)for(r=this._first;r&&0===r._startTime;)r._duration||(s=!1),r=r._next;n=0;this._initted||(l=!0)}else{if(this._hasPause&&!this._forcingPlayhead&&!t){if(n>=o)for(r=this._first;r&&r._startTime<=n&&!u;)r._duration||"isPause"!==r.data||r.ratio||0===r._startTime&&0===this._rawPrevTime||(u=r),r=r._next;else for(r=this._last;r&&r._startTime>=n&&!u;)r._duration||"isPause"===r.data&&r._rawPrevTime>0&&(u=r),r=r._prev;u&&(this._time=n=u._startTime,this._totalTime=n+this._cycle*(this._totalDuration+this._repeatDelay))}this._totalTime=this._time=this._rawPrevTime=n}if(this._time!==o&&this._first||i||l||u){if(this._initted||(this._initted=!0),this._active||!this._paused&&this._time!==o&&n>0&&(this._active=!0),0===o&&this.vars.onStart&&(0===this._time&&this._duration||t||this._callback("onStart")),a=this._time,a>=o)for(r=this._first;r&&(v=r._next,a===this._time&&(!this._paused||p));)(r._active||r._startTime<=a&&!r._paused&&!r._gc)&&(u===r&&this.pause(),r._reversed?r.render((r._dirty?r.totalDuration():r._totalDuration)-(n-r._startTime)*r._timeScale,t,i):r.render((n-r._startTime)*r._timeScale,t,i)),r=v;else for(r=this._last;r&&(v=r._prev,a===this._time&&(!this._paused||p));){if(r._active||r._startTime<=o&&!r._paused&&!r._gc){if(u===r){for(u=r._prev;u&&u.endTime()>this._time;)u.render(u._reversed?u.totalDuration()-(n-u._startTime)*u._timeScale:(n-u._startTime)*u._timeScale,t,i),u=u._prev;u=null;this.pause()}r._reversed?r.render((r._dirty?r.totalDuration():r._totalDuration)-(n-r._startTime)*r._timeScale,t,i):r.render((n-r._startTime)*r._timeScale,t,i)}r=v}this._onUpdate&&(t||(h.length&&c(),this._callback("onUpdate")));f&&(this._gc||(w===this._startTime||b!==this._timeScale)&&(0===this._time||y>=this.totalDuration())&&(s&&(h.length&&c(),this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!t&&this.vars[f]&&this._callback(f)))}},r._hasPausedChild=function(){for(var n=this._first;n;){if(n._paused||n instanceof u&&n._hasPausedChild())return!0;n=n._next}return!1},r.getChildren=function(n,t,r,u){u=u||-9999999999;for(var e=[],f=this._first,o=0;f;)f._startTime<u||(f instanceof i?t!==!1&&(e[o++]=f):(r!==!1&&(e[o++]=f),n!==!1&&(e=e.concat(f.getChildren(!0,t,r)),o=e.length))),f=f._next;return e},r.getTweensOf=function(n,t){var r,u,f=this._gc,e=[],o=0;for(f&&this._enabled(!0,!0),r=i.getTweensOf(n),u=r.length;--u>-1;)(r[u].timeline===this||t&&this._contains(r[u]))&&(e[o++]=r[u]);return f&&this._enabled(!1,!0),e},r.recent=function(){return this._recent},r._contains=function(n){for(var t=n.timeline;t;){if(t===this)return!0;t=t.timeline}return!1},r.shiftChildren=function(n,t,i){i=i||0;for(var u,r=this._first,f=this._labels;r;)r._startTime>=i&&(r._startTime+=n),r=r._next;if(t)for(u in f)f[u]>=i&&(f[u]+=n);return this._uncache(!0)},r._kill=function(n,t){if(!n&&!t)return this._enabled(!1,!1);for(var i=t?this.getTweensOf(t):this.getChildren(!0,!0,!1),r=i.length,u=!1;--r>-1;)i[r]._kill(n,t)&&(u=!0);return u},r.clear=function(n){var t=this.getChildren(!1,!0,!0),i=t.length;for(this._time=this._totalTime=0;--i>-1;)t[i]._enabled(!1,!1);return n!==!1&&(this._labels={}),this._uncache(!0)},r.invalidate=function(){for(var t=this._first;t;)t.invalidate(),t=t._next;return n.prototype.invalidate.call(this)},r._enabled=function(n,i){if(n===this._gc)for(var r=this._first;r;)r._enabled(n,!0),r=r._next;return t.prototype._enabled.call(this,n,i)},r.totalTime=function(){this._forcingPlayhead=!0;var t=n.prototype.totalTime.apply(this,arguments);return this._forcingPlayhead=!1,t},r.duration=function(n){return arguments.length?(0!==this.duration()&&0!==n&&this.timeScale(this._duration/n),this):(this._dirty&&this.totalDuration(),this._duration)},r.totalDuration=function(n){if(!arguments.length){if(this._dirty){for(var f,r,i=0,t=this._last,u=999999999999;t;)f=t._prev,t._dirty&&t.totalDuration(),t._startTime>u&&this._sortChildren&&!t._paused?this.add(t,t._startTime-t._delay):u=t._startTime,t._startTime<0&&!t._paused&&(i-=t._startTime,this._timeline.smoothChildTiming&&(this._startTime+=t._startTime/this._timeScale),this.shiftChildren(-t._startTime,!1,-9999999999),u=0),r=t._startTime+t._totalDuration/t._timeScale,r>i&&(i=r),t=f;this._duration=this._totalDuration=i;this._dirty=!1}return this._totalDuration}return n&&this.totalDuration()?this.timeScale(this._totalDuration/n):this},r.paused=function(t){if(!t)for(var i=this._first,r=this._time;i;)i._startTime===r&&"isPause"===i.data&&(i._rawPrevTime=0),i=i._next;return n.prototype.paused.apply(this,arguments)},r.usesFrames=function(){for(var t=this._timeline;t._timeline;)t=t._timeline;return t===n._rootFramesTimeline},r.rawTime=function(n){return n&&(this._paused||this._repeat&&this.time()>0&&this.totalProgress()<1)?this._totalTime%(this._duration+this._repeatDelay):this._paused?this._totalTime:(this._timeline.rawTime(n)-this._startTime)*this._timeScale},u},!0);_gsScope._gsDefine("TimelineMax",["TimelineLite","TweenLite","easing.Ease"],function(n,t,i){var f=function(t){n.call(this,t);this._repeat=this.vars.repeat||0;this._repeatDelay=this.vars.repeatDelay||0;this._cycle=0;this._yoyo=this.vars.yoyo===!0;this._dirty=!0},u=1e-10,e=t._internals,o=e.lazyTweens,s=e.lazyRender,h=_gsScope._gsDefine.globals,c=new i(null,null,1,0),r=f.prototype=new n;return r.constructor=f,r.kill()._gc=!1,f.version="1.19.1",r.invalidate=function(){return this._yoyo=this.vars.yoyo===!0,this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._uncache(!0),n.prototype.invalidate.call(this)},r.addCallback=function(n,i,r,u){return this.add(t.delayedCall(0,n,r,u),i)},r.removeCallback=function(n,t){if(n)if(null==t)this._kill(null,n);else for(var i=this.getTweensOf(n,!1),r=i.length,u=this._parseTimeOrLabel(t);--r>-1;)i[r]._startTime===u&&i[r]._enabled(!1,!1);return this},r.removePause=function(t){return this.removeCallback(n._internals.pauseCallback,t)},r.tweenTo=function(n,i){i=i||{};var f,e,r,u={ease:c,useFrames:this.usesFrames(),immediateRender:!1},o=i.repeat&&h.TweenMax||t;for(e in i)u[e]=i[e];return u.time=this._parseTimeOrLabel(n),f=Math.abs(Number(u.time)-this._time)/this._timeScale||.001,r=new o(this,f,u),u.onStart=function(){r.target.paused(!0);r.vars.time!==r.target.time()&&f===r.duration()&&r.duration(Math.abs(r.vars.time-r.target.time())/r.target._timeScale);i.onStart&&i.onStart.apply(i.onStartScope||i.callbackScope||r,i.onStartParams||[])},r},r.tweenFromTo=function(n,t,i){i=i||{};n=this._parseTimeOrLabel(n);i.startAt={onComplete:this.seek,onCompleteParams:[n],callbackScope:this};i.immediateRender=i.immediateRender!==!1;var r=this.tweenTo(t,i);return r.duration(Math.abs(r.vars.time-n)/this._timeScale||.001)},r.render=function(n,t,i){this._gc&&this._enabled(!0,!1);var r,y,w,l,a,b,f,k,g=this._dirty?this.totalDuration():this._totalDuration,e=this._duration,h=this._time,d=this._totalTime,it=this._startTime,rt=this._timeScale,c=this._rawPrevTime,nt=this._paused,v=this._cycle;if(n>=g-1e-7&&n>=0)this._locked||(this._totalTime=g,this._cycle=this._repeat),this._reversed||this._hasPausedChild()||(y=!0,l="onComplete",a=!!this._timeline.autoRemoveChildren,0===this._duration&&(0>=n&&n>=-1e-7||0>c||c===u)&&c!==n&&this._first&&(a=!0,c>u&&(l="onReverseComplete"))),this._rawPrevTime=this._duration||!t||n||this._rawPrevTime===n?n:u,this._yoyo&&0!=(1&this._cycle)?this._time=n=0:(this._time=e,n=e+.0001);else if(1e-7>n)if(this._locked||(this._totalTime=this._cycle=0),this._time=0,(0!==h||0===e&&c!==u&&(c>0||0>n&&c>=0)&&!this._locked)&&(l="onReverseComplete",y=this._reversed),0>n)this._active=!1,this._timeline.autoRemoveChildren&&this._reversed?(a=y=!0,l="onReverseComplete"):c>=0&&this._first&&(a=!0),this._rawPrevTime=n;else{if(this._rawPrevTime=e||!t||n||this._rawPrevTime===n?n:u,0===n&&y)for(r=this._first;r&&0===r._startTime;)r._duration||(y=!1),r=r._next;n=0;this._initted||(a=!0)}else if(0===e&&0>c&&(a=!0),this._time=this._rawPrevTime=n,this._locked||(this._totalTime=n,0!==this._repeat&&(b=e+this._repeatDelay,this._cycle=this._totalTime/b>>0,0!==this._cycle&&this._cycle===this._totalTime/b&&n>=d&&this._cycle--,this._time=this._totalTime-this._cycle*b,this._yoyo&&0!=(1&this._cycle)&&(this._time=e-this._time),this._time>e?(this._time=e,n=e+.0001):this._time<0?this._time=n=0:n=this._time)),this._hasPause&&!this._forcingPlayhead&&!t&&e>n){if(n=this._time,n>=h||this._repeat&&v!==this._cycle)for(r=this._first;r&&r._startTime<=n&&!f;)r._duration||"isPause"!==r.data||r.ratio||0===r._startTime&&0===this._rawPrevTime||(f=r),r=r._next;else for(r=this._last;r&&r._startTime>=n&&!f;)r._duration||"isPause"===r.data&&r._rawPrevTime>0&&(f=r),r=r._prev;f&&(this._time=n=f._startTime,this._totalTime=n+this._cycle*(this._totalDuration+this._repeatDelay))}if(this._cycle!==v&&!this._locked){var p=this._yoyo&&0!=(1&v),ut=p===(this._yoyo&&0!=(1&this._cycle)),ft=this._totalTime,tt=this._cycle,et=this._rawPrevTime,ot=this._time;if(this._totalTime=v*e,this._cycle<v?p=!p:this._totalTime+=e,this._time=h,this._rawPrevTime=0===e?c-.0001:c,this._cycle=v,this._locked=!0,h=p?0:e,this.render(h,t,0===e),t||this._gc||this.vars.onRepeat&&(this._cycle=tt,this._locked=!1,this._callback("onRepeat")),h!==this._time)return;if(ut&&(this._cycle=v,this._locked=!0,h=p?e+.0001:-.0001,this.render(h,!0,!1)),this._locked=!1,this._paused&&!nt)return;this._time=ot;this._totalTime=ft;this._cycle=tt;this._rawPrevTime=et}if(!(this._time!==h&&this._first||i||a||f))return void(d!==this._totalTime&&this._onUpdate&&(t||this._callback("onUpdate")));if(this._initted||(this._initted=!0),this._active||!this._paused&&this._totalTime!==d&&n>0&&(this._active=!0),0===d&&this.vars.onStart&&(0===this._totalTime&&this._totalDuration||t||this._callback("onStart")),k=this._time,k>=h)for(r=this._first;r&&(w=r._next,k===this._time&&(!this._paused||nt));)(r._active||r._startTime<=this._time&&!r._paused&&!r._gc)&&(f===r&&this.pause(),r._reversed?r.render((r._dirty?r.totalDuration():r._totalDuration)-(n-r._startTime)*r._timeScale,t,i):r.render((n-r._startTime)*r._timeScale,t,i)),r=w;else for(r=this._last;r&&(w=r._prev,k===this._time&&(!this._paused||nt));){if(r._active||r._startTime<=h&&!r._paused&&!r._gc){if(f===r){for(f=r._prev;f&&f.endTime()>this._time;)f.render(f._reversed?f.totalDuration()-(n-f._startTime)*f._timeScale:(n-f._startTime)*f._timeScale,t,i),f=f._prev;f=null;this.pause()}r._reversed?r.render((r._dirty?r.totalDuration():r._totalDuration)-(n-r._startTime)*r._timeScale,t,i):r.render((n-r._startTime)*r._timeScale,t,i)}r=w}this._onUpdate&&(t||(o.length&&s(),this._callback("onUpdate")));l&&(this._locked||this._gc||(it===this._startTime||rt!==this._timeScale)&&(0===this._time||g>=this.totalDuration())&&(y&&(o.length&&s(),this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!t&&this.vars[l]&&this._callback(l)))},r.getActive=function(n,t,i){null==n&&(n=!0);null==t&&(t=!0);null==i&&(i=!1);for(var u,f=[],e=this.getChildren(n,t,i),o=0,s=e.length,r=0;s>r;r++)u=e[r],u.isActive()&&(f[o++]=u);return f},r.getLabelAfter=function(n){n||0!==n&&(n=this._time);for(var i=this.getLabelsArray(),r=i.length,t=0;r>t;t++)if(i[t].time>n)return i[t].name;return null},r.getLabelBefore=function(n){null==n&&(n=this._time);for(var t=this.getLabelsArray(),i=t.length;--i>-1;)if(t[i].time<n)return t[i].name;return null},r.getLabelsArray=function(){var n,t=[],i=0;for(n in this._labels)t[i++]={time:this._labels[n],name:n};return t.sort(function(n,t){return n.time-t.time}),t},r.invalidate=function(){return this._locked=!1,n.prototype.invalidate.call(this)},r.progress=function(n,t){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&0!=(1&this._cycle)?1-n:n)+this._cycle*(this._duration+this._repeatDelay),t):this._time/this.duration()},r.totalProgress=function(n,t){return arguments.length?this.totalTime(this.totalDuration()*n,t):this._totalTime/this.totalDuration()},r.totalDuration=function(t){return arguments.length?-1!==this._repeat&&t?this.timeScale(this.totalDuration()/t):this:(this._dirty&&(n.prototype.totalDuration.call(this),this._totalDuration=-1===this._repeat?999999999999:this._duration*(this._repeat+1)+this._repeatDelay*this._repeat),this._totalDuration)},r.time=function(n,t){return arguments.length?(this._dirty&&this.totalDuration(),n>this._duration&&(n=this._duration),this._yoyo&&0!=(1&this._cycle)?n=this._duration-n+this._cycle*(this._duration+this._repeatDelay):0!==this._repeat&&(n+=this._cycle*(this._duration+this._repeatDelay)),this.totalTime(n,t)):this._time},r.repeat=function(n){return arguments.length?(this._repeat=n,this._uncache(!0)):this._repeat},r.repeatDelay=function(n){return arguments.length?(this._repeatDelay=n,this._uncache(!0)):this._repeatDelay},r.yoyo=function(n){return arguments.length?(this._yoyo=n,this):this._yoyo},r.currentLabel=function(n){return arguments.length?this.seek(n,!0):this.getLabelBefore(this._time+1e-8)},f},!0),function(){var h=180/Math.PI,n=[],t=[],i=[],f={},c=_gsScope._gsDefine.globals,u=function(n,t,i,r){i===r&&(i=r-(r-t)/1e6);n===t&&(t=n+(i-n)/1e6);this.a=n;this.b=t;this.c=i;this.d=r;this.da=r-n;this.ca=i-n;this.ba=t-n},l=",x,y,z,left,top,right,bottom,marginTop,marginLeft,marginRight,marginBottom,paddingLeft,paddingTop,paddingRight,paddingBottom,backgroundPosition,backgroundPosition_y,",e=function(n,t,i,r){var e={a:n},u={},f={},o={c:r},s=(n+t)/2,a=(t+i)/2,h=(i+r)/2,c=(s+a)/2,l=(a+h)/2,v=(l-c)/8;return e.b=s+(n-s)/4,u.b=c+v,e.c=u.a=(e.b+u.b)/2,u.c=f.a=(c+l)/2,f.b=l-v,o.b=h+(r-h)/4,f.c=o.a=(f.b+o.b)/2,[e,u,f,o]},a=function(r,u,f,o,s){for(var y,c,nt,h,p,b,g,tt,l,k,d,it,rt=r.length-1,w=0,a=r[0].a,v=0;rt>v;v++)h=r[w],y=h.a,c=h.d,nt=r[w+1].d,s?(k=n[v],d=t[v],it=(d+k)*u*.25/(o?.5:i[v]||.5),p=c-(c-y)*(o?.5*u:0!==k?it/k:0),b=c+(nt-c)*(o?.5*u:0!==d?it/d:0),g=c-(p+((b-p)*(3*k/(k+d)+.5)/4||0))):(p=c-(c-y)*u*.5,b=c+(nt-c)*u*.5,g=c-(p+b)/2),p+=g,b+=g,h.c=tt=p,h.b=0!==v?a:a=h.a+.6*(h.c-h.a),h.da=c-y,h.ca=tt-y,h.ba=a-y,f?(l=e(y,a,tt,c),r.splice(w,1,l[0],l[1],l[2],l[3]),w+=4):w++,a=b;h=r[w];h.b=a;h.c=a+.4*(h.d-a);h.da=h.d-h.a;h.ca=h.c-h.a;h.ba=a-h.a;f&&(l=e(h.a,a,h.c,h.d),r.splice(w,1,l[0],l[1],l[2],l[3]))},v=function(i,r,f,e){var c,o,l,s,v,a,h=[];if(e)for(i=[e].concat(i),o=i.length;--o>-1;)"string"==typeof(a=i[o][r])&&"="===a.charAt(1)&&(i[o][r]=e[r]+Number(a.charAt(0)+a.substr(2)));if(c=i.length-2,0>c)return h[0]=new u(i[0][r],0,0,i[-1>c?0:1][r]),h;for(o=0;c>o;o++)l=i[o][r],s=i[o+1][r],h[o]=new u(l,0,0,s),f&&(v=i[o+2][r],n[o]=(n[o]||0)+(s-l)*(s-l),t[o]=(t[o]||0)+(v-s)*(v-s));return h[o]=new u(i[o][r],0,0,i[o+1][r]),h},o=function(r,u,e,o,s,h){var c,y,w,p,g,nt,k,tt,d={},b=[],it=h||r[0];s="string"==typeof s?","+s+",":l;null==u&&(u=1);for(y in r[0])b.push(y);if(r.length>1){for(tt=r[r.length-1],k=!0,c=b.length;--c>-1;)if(y=b[c],Math.abs(it[y]-tt[y])>.05){k=!1;break}k&&(r=r.concat(),h&&r.unshift(h),r.push(r[1]),h=r[r.length-3])}for(n.length=t.length=i.length=0,c=b.length;--c>-1;)y=b[c],f[y]=-1!==s.indexOf(","+y+","),d[y]=v(r,y,f[y],h);for(c=n.length;--c>-1;)n[c]=Math.sqrt(n[c]),t[c]=Math.sqrt(t[c]);if(!o){for(c=b.length;--c>-1;)if(f[y])for(w=d[b[c]],nt=w.length-1,p=0;nt>p;p++)g=w[p+1].da/t[p]+w[p].da/n[p]||0,i[p]=(i[p]||0)+g*g;for(c=i.length;--c>-1;)i[c]=Math.sqrt(i[c])}for(c=b.length,p=e?4:1;--c>-1;)y=b[c],w=d[y],a(w,u,e,o,f[y]),k&&(w.splice(0,p),w.splice(w.length-p,p));return d},y=function(n,t,i){t=t||"soft";var o,a,v,w,f,y,r,c,s,e,h,b={},l="cubic"===t?3:2,k="soft"===t,p=[];if(k&&i&&(n=[i].concat(n)),null==n||n.length<l+1)throw"invalid Bezier data";for(s in n[0])p.push(s);for(y=p.length;--y>-1;){for(s=p[y],b[s]=f=[],e=0,c=n.length,r=0;c>r;r++)o=null==i?n[r][s]:"string"==typeof(h=n[r][s])&&"="===h.charAt(1)?i[s]+Number(h.charAt(0)+h.substr(2)):Number(h),k&&r>1&&c-1>r&&(f[e++]=(o+f[e-2])/2),f[e++]=o;for(c=e-l+1,e=0,r=0;c>r;r+=l)o=f[r],a=f[r+1],v=f[r+2],w=2===l?0:f[r+3],f[e++]=h=3===l?new u(o,a,v,w):new u(o,(2*a+o)/3,(2*a+v)/3,v);f.length=e}return b},p=function(n,t,i){for(var e,s,o,a,v,y,r,u,h,f,c,p=1/i,l=n.length;--l>-1;)for(f=n[l],o=f.a,a=f.d-o,v=f.c-o,y=f.b-o,e=s=0,u=1;i>=u;u++)r=p*u,h=1-r,e=s-(s=(r*r*a+3*h*(r*v+h*y))*r),c=l*i+u-1,t[c]=(t[c]||0)+e*e},w=function(n,t){t=t>>0||6;var s,i,h,r,f=[],c=[],u=0,e=0,a=t-1,l=[],o=[];for(s in n)p(n[s],f,t);for(h=f.length,i=0;h>i;i++)u+=Math.sqrt(f[i]),r=i%t,o[r]=u,r===a&&(e+=u,r=i/t>>0,l[r]=o,c[r]=e,u=0,o=[]);return{length:e,lengths:c,segments:l}},r=_gsScope._gsDefine.plugin({propName:"bezier",priority:-1,version:"1.3.7",API:2,global:!0,init:function(n,t,i){var c;this._target=n;t instanceof Array&&(t={values:t});this._func={};this._mod={};this._props=[];this._timeRes=null==t.timeResolution?6:parseInt(t.timeResolution,10);var r,a,f,e,l,s=t.values||[],h={},v=s[0],u=t.autoRotate||i.vars.orientToBezier;this._autoRotate=u?u instanceof Array?u:[["x","y","rotation",u===!0?0:Number(u)||0]]:null;for(r in v)this._props.push(r);for(f=this._props.length;--f>-1;)r=this._props[f],this._overwriteProps.push(r),a=this._func[r]="function"==typeof n[r],h[r]=a?n[r.indexOf("set")||"function"!=typeof n["get"+r.substr(3)]?r:"get"+r.substr(3)]():parseFloat(n[r]),l||h[r]!==s[0][r]&&(l=h);if((this._beziers="cubic"!==t.type&&"quadratic"!==t.type&&"soft"!==t.type?o(s,isNaN(t.curviness)?1:t.curviness,!1,"thruBasic"===t.type,t.correlate,l):y(s,t.type,h),this._segCount=this._beziers[r].length,this._timeRes)&&(c=w(this._beziers,this._timeRes),this._length=c.length,this._lengths=c.lengths,this._segments=c.segments,this._l1=this._li=this._s1=this._si=0,this._l2=this._lengths[0],this._curSeg=this._segments[0],this._s2=this._curSeg[0],this._prec=1/this._curSeg.length),u=this._autoRotate)for(this._initialRotations=[],u[0]instanceof Array||(this._autoRotate=u=[u]),f=u.length;--f>-1;){for(e=0;3>e;e++)r=u[f][e],this._func[r]="function"==typeof n[r]?n[r.indexOf("set")||"function"!=typeof n["get"+r.substr(3)]?r:"get"+r.substr(3)]:!1;r=u[f][2];this._initialRotations[f]=(this._func[r]?this._func[r].call(this._target):this._target[r])||0;this._overwriteProps.push(r)}return this._startRatio=i.vars.runBackwards?1:0,!0},set:function(n){var c,d,t,u,i,r,o,w,v,f,l=this._segCount,g=this._func,a=this._target,it=n!==this._startRatio,e,b,k,y,p,nt,tt,s;if(this._timeRes){if(v=this._lengths,f=this._curSeg,n*=this._length,t=this._li,n>this._l2&&l-1>t){for(w=l-1;w>t&&(this._l2=v[++t])<=n;);this._l1=v[t-1];this._li=t;this._curSeg=f=this._segments[t];this._s2=f[this._s1=this._si=0]}else if(n<this._l1&&t>0){for(;t>0&&(this._l1=v[--t])>=n;);0===t&&n<this._l1?this._l1=0:t++;this._l2=v[t];this._li=t;this._curSeg=f=this._segments[t];this._s1=f[(this._si=f.length-1)-1]||0;this._s2=f[this._si]}if(c=t,n-=this._l1,t=this._si,n>this._s2&&t<f.length-1){for(w=f.length-1;w>t&&(this._s2=f[++t])<=n;);this._s1=f[t-1];this._si=t}else if(n<this._s1&&t>0){for(;t>0&&(this._s1=f[--t])>=n;);0===t&&n<this._s1?this._s1=0:t++;this._s2=f[t];this._si=t}r=(t+(n-this._s1)/(this._s2-this._s1))*this._prec||0}else c=0>n?0:n>=1?l-1:l*n>>0,r=(n-c*(1/l))*l;for(d=1-r,t=this._props.length;--t>-1;)u=this._props[t],i=this._beziers[u][c],o=(r*r*i.da+3*d*(r*i.ca+d*i.ba))*r+i.a,this._mod[u]&&(o=this._mod[u](o,a)),g[u]?a[u](o):a[u]=o;if(this._autoRotate)for(s=this._autoRotate,t=s.length;--t>-1;)u=s[t][2],nt=s[t][3]||0,tt=s[t][4]===!0?1:h,i=this._beziers[s[t][0]],e=this._beziers[s[t][1]],i&&e&&(i=i[c],e=e[c],b=i.a+(i.b-i.a)*r,y=i.b+(i.c-i.b)*r,b+=(y-b)*r,y+=(i.c+(i.d-i.c)*r-y)*r,k=e.a+(e.b-e.a)*r,p=e.b+(e.c-e.b)*r,k+=(p-k)*r,p+=(e.c+(e.d-e.c)*r-p)*r,o=it?Math.atan2(p-k,y-b)*tt+nt:this._initialRotations[t],this._mod[u]&&(o=this._mod[u](o,a)),g[u]?a[u](o):a[u]=o)}}),s=r.prototype;r.bezierThrough=o;r.cubicToQuadratic=e;r._autoCSS=!0;r.quadraticToCubic=function(n,t,i){return new u(n,(2*t+n)/3,(2*t+i)/3,i)};r._cssRegister=function(){var t=c.CSSPlugin;if(t){var n=t._internals,i=n._parseToProxy,u=n._setPluginRatio,f=n.CSSPropTween;n._registerComplexSpecialProp("bezier",{parser:function(n,t,e,o,s,h){t instanceof Array&&(t={values:t});h=new r;var a,v,l,p=t.values,y=p.length-1,w=[],c={};if(0>y)return s;for(a=0;y>=a;a++)l=i(n,p[a],o,s,h,y!==a),w[a]=l.end;for(v in t)c[v]=t[v];return c.values=w,s=new f(n,"bezier",0,0,l.pt,2),s.data=l,s.plugin=h,s.setRatio=u,0===c.autoRotate&&(c.autoRotate=!0),!c.autoRotate||c.autoRotate instanceof Array||(a=c.autoRotate===!0?0:Number(c.autoRotate),c.autoRotate=null!=l.end.left?[["left","top","rotation",a,!1]]:null!=l.end.x?[["x","y","rotation",a,!1]]:!1),c.autoRotate&&(o._transform||o._enableTransforms(!1),l.autoRotate=o._target._gsTransform,l.proxy.rotation=l.autoRotate.rotation||0,o._overwriteProps.push("rotation")),h._onInitTween(l.proxy,c,o._tween),s}})}};s._mod=function(n){for(var t,i=this._overwriteProps,r=i.length;--r>-1;)t=n[i[r]],t&&"function"==typeof t&&(this._mod[i[r]]=t)};s._kill=function(n){var r,t,i=this._props;for(r in this._beziers)if(r in n)for(delete this._beziers[r],delete this._func[r],t=i.length;--t>-1;)i[t]===r&&i.splice(t,1);if(i=this._autoRotate)for(t=i.length;--t>-1;)n[i[t][2]]&&i.splice(t,1);return this._super._kill.call(this,n)}}();_gsScope._gsDefine("plugins.CSSPlugin",["plugins.TweenPlugin","TweenLite"],function(n,t){var ct,ti,e,oi,r=function(){n.call(this,"css");this._overwriteProps.length=0;this.setRatio=r.prototype.setRatio},ru=_gsScope._gsDefine.globals,v={},i=r.prototype=new n("css"),gr,ht,nu,tu,iu,ni;i.constructor=r;r.version="1.19.1";r.API=2;r.defaultTransformPerspective=0;r.defaultSkewType="compensated";r.defaultSmoothOrigin=!0;i="px";r.suffixMap={top:i,right:i,bottom:i,left:i,width:i,height:i,fontSize:i,padding:i,margin:i,perspective:i,lineHeight:""};var si,er,hi,ci,or,ot,it,nt,lt=/(?:\-|\.|\b)(\d|\.|e\-)+/g,li=/(?:\d|\-\d|\.\d|\-\.\d|\+=\d|\-=\d|\+=.\d|\-=\.\d)+/g,ai=/(?:\+=|\-=|\-|\b)[\d\-\.]+[a-zA-Z0-9]*(?:%|\b)/gi,vi=/(?![+-]?\d*\.?\d+|[+-]|e[+-]\d+)[^0-9]/g,at=/(?:\d|\-|\+|=|#|\.)*/g,yi=/opacity *= *([^)]*)/i,uu=/opacity:([^;]*)/i,fu=/alpha\(opacity *=.+?\)/i,eu=/^(rgb|hsl)/,sr=/([A-Z])/g,hr=/-([a-z])/gi,ou=/(^(?:url\(\"|url\())|(?:(\"\))$|\)$)/gi,cr=function(n,t){return t.toUpperCase()},su=/(?:Left|Right|Width)/i,hu=/(M11|M12|M21|M22)=[\d\-\.e]+/gi,cu=/progid\:DXImageTransform\.Microsoft\.Matrix\(.+?\)/i,k=/,(?=[^\)]*(?:\(|$))/gi,lu=/[\s,\(]/i,a=Math.PI/180,rt=180/Math.PI,ii={},au={style:{}},y=_gsScope.document||{createElement:function(){return au}},ri=function(n,t){return y.createElementNS?y.createElementNS(t||"http://www.w3.org/1999/xhtml",n):y.createElement(n)},d=ri("div"),pi=ri("img"),p=r._internals={_specialProps:v},g=(_gsScope.navigator||{}).userAgent||"",ut=function(){var t=g.indexOf("Android"),n=ri("a");return hi=-1!==g.indexOf("Safari")&&-1===g.indexOf("Chrome")&&(-1===t||parseFloat(g.substr(t+8,2))>3),or=hi&&parseFloat(g.substr(g.indexOf("Version/")+8,2))<6,ci=-1!==g.indexOf("Firefox"),(/MSIE ([0-9]{1,}[\.0-9]{0,})/.exec(g)||/Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/.exec(g))&&(ot=parseFloat(RegExp.$1)),n?(n.style.cssText="top:1px;opacity:.55;",/^0.55/.test(n.style.opacity)):!1}(),lr=function(n){return yi.test("string"==typeof n?n:(n.currentStyle?n.currentStyle.filter:n.style.filter)||"")?parseFloat(RegExp.$1)/100:1},ar=function(n){_gsScope.console&&console.log(n)},vr="",wi="",vt=function(n,t){t=t||d;var r,i,u=t.style;if(void 0!==u[n])return n;for(n=n.charAt(0).toUpperCase()+n.substr(1),r=["O","Moz","ms","Ms","Webkit"],i=5;--i>-1&&void 0===u[r[i]+n];);return i>=0?(wi=3===i?"ms":r[i],vr="-"+wi.toLowerCase()+"-",wi+n):null},ft=y.defaultView?y.defaultView.getComputedStyle:function(){},u=r.getStyle=function(n,t,i,r,u){var f;return ut||"opacity"!==t?(!r&&n.style[t]?f=n.style[t]:(i=i||ft(n))?f=i[t]||i.getPropertyValue(t)||i.getPropertyValue(t.replace(sr,"-$1").toLowerCase()):n.currentStyle&&(f=n.currentStyle[t]),null==u||f&&"none"!==f&&"auto"!==f&&"auto auto"!==f?f:u):lr(n)},w=p.convertToPixels=function(n,i,f,e,o){if("px"===e||!e)return f;if("auto"===e||!f)return 0;var s,h,a,l=su.test(i),c=n,v=d.style,p=0>f,b=1===f;if(p&&(f=-f),b&&(f*=100),"%"===e&&-1!==i.indexOf("border"))s=f/100*(l?n.clientWidth:n.clientHeight);else{if(v.cssText="border:0 solid red;position:"+u(n,"position")+";line-height:0;","%"!==e&&c.appendChild&&"v"!==e.charAt(0)&&"rem"!==e)v[l?"borderLeftWidth":"borderTopWidth"]=f+e;else{if(c=n.parentNode||y.body,h=c._gsCache,a=t.ticker.frame,h&&l&&h.time===a)return h.width*f/100;v[l?"width":"height"]=f+e}c.appendChild(d);s=parseFloat(d[l?"offsetWidth":"offsetHeight"]);c.removeChild(d);l&&"%"===e&&r.cacheWidths!==!1&&(h=c._gsCache=c._gsCache||{},h.time=a,h.width=s/f*100);0!==s||o||(s=w(n,i,f,e,!0))}return b&&(s/=100),p?-s:s},yr=p.calculateOffset=function(n,t,i){if("absolute"!==u(n,"position",i))return 0;var r="left"===t?"Left":"Top",f=u(n,"margin"+r,i);return n["offset"+r]-(w(n,t,parseFloat(f),f.replace(at,""))||0)},yt=function(n,t){var r,u,f,i={};if(t=t||ft(n,null))if(r=t.length)for(;--r>-1;)f=t[r],(-1===f.indexOf("-transform")||tr===f)&&(i[f.replace(hr,cr)]=t.getPropertyValue(f));else for(r in t)(-1===r.indexOf("Transform")||h===r)&&(i[r]=t[r]);else if(t=n.currentStyle||n.style)for(r in t)"string"==typeof r&&void 0===i[r]&&(i[r.replace(hr,cr)]=t[r]);return ut||(i.opacity=lr(n)),u=gt(n,t,!1),i.rotation=u.rotation,i.skewX=u.skewX,i.scaleX=u.scaleX,i.scaleY=u.scaleY,i.x=u.x,i.y=u.y,b&&(i.z=u.z,i.rotationX=u.rotationX,i.rotationY=u.rotationY,i.scaleZ=u.scaleZ),i.filters&&delete i.filters,i},bi=function(n,t,i,r,u){var e,f,o,s={},h=n.style;for(f in i)"cssText"!==f&&"length"!==f&&isNaN(f)&&(t[f]!==(e=i[f])||u&&u[f])&&-1===f.indexOf("Origin")&&("number"==typeof e||"string"==typeof e)&&(s[f]="auto"!==e||"left"!==f&&"top"!==f?""!==e&&"auto"!==e&&"none"!==e||"string"!=typeof t[f]||""===t[f].replace(vi,"")?e:0:yr(n,f),void 0!==h[f]&&(o=new nr(h,f,h[f],o)));if(r)for(f in r)"className"!==f&&(s[f]=r[f]);return{difs:s,firstMPT:o}},vu={width:["Left","Right"],height:["Top","Bottom"]},yu=["marginLeft","marginRight","marginTop","marginBottom"],pu=function(n,t,i){if("svg"===(n.nodeName+"").toLowerCase())return(i||ft(n))[t]||0;if(n.getCTM&&rr(n))return n.getBBox()[t]||0;var r=parseFloat("width"===t?n.offsetWidth:n.offsetHeight),f=vu[t],e=f.length;for(i=i||ft(n,null);--e>-1;)r-=parseFloat(u(n,"padding"+f[e],i,!0))||0,r-=parseFloat(u(n,"border"+f[e]+"Width",i,!0))||0;return r},et=function(n,t){if("contain"===n||"auto"===n||"auto auto"===n)return n+" ";(null==n||""===n)&&(n="0 0");var f,r=n.split(" "),i=-1!==n.indexOf("left")?"0%":-1!==n.indexOf("right")?"100%":r[0],u=-1!==n.indexOf("top")?"0%":-1!==n.indexOf("bottom")?"100%":r[1];if(r.length>3&&!t){for(r=n.split(", ").join(",").split(","),n=[],f=0;f<r.length;f++)n.push(et(r[f]));return n.join(",")}return null==u?u="center"===i?"50%":"0":"center"===u&&(u="50%"),("center"===i||isNaN(parseFloat(i))&&-1===(i+"").indexOf("="))&&(i="50%"),n=i+" "+u+(r.length>2?" "+r[2]:""),t&&(t.oxp=-1!==i.indexOf("%"),t.oyp=-1!==u.indexOf("%"),t.oxr="="===i.charAt(1),t.oyr="="===u.charAt(1),t.ox=parseFloat(i.replace(vi,"")),t.oy=parseFloat(u.replace(vi,"")),t.v=n),t||n},pt=function(n,t){return"function"==typeof n&&(n=n(nt,it)),"string"==typeof n&&"="===n.charAt(1)?parseInt(n.charAt(0)+"1",10)*parseFloat(n.substr(2)):parseFloat(n)-parseFloat(t)||0},c=function(n,t){return"function"==typeof n&&(n=n(nt,it)),null==n?t:"string"==typeof n&&"="===n.charAt(1)?parseInt(n.charAt(0)+"1",10)*parseFloat(n.substr(2))+t:parseFloat(n)||0},wt=function(n,t,i,r){var f,o,u,e,s,h=1e-6;return"function"==typeof n&&(n=n(nt,it)),null==n?e=t:"number"==typeof n?e=n:(f=360,o=n.split("_"),s="="===n.charAt(1),u=(s?parseInt(n.charAt(0)+"1",10)*parseFloat(o[0].substr(2)):parseFloat(o[0]))*(-1===n.indexOf("rad")?1:rt)-(s?0:t),o.length&&(r&&(r[i]=t+u),-1!==n.indexOf("short")&&(u%=f,u!==u%(f/2)&&(u=0>u?u+f:u-f)),-1!==n.indexOf("_cw")&&0>u?u=(u+9999999999*f)%f-(u/f|0)*f:-1!==n.indexOf("ccw")&&u>0&&(u=(u-9999999999*f)%f-(u/f|0)*f)),e=t+u),h>e&&e>-h&&(e=0),e},bt={aqua:[0,255,255],lime:[0,255,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,255],navy:[0,0,128],white:[255,255,255],fuchsia:[255,0,255],olive:[128,128,0],yellow:[255,255,0],orange:[255,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[255,0,0],pink:[255,192,203],cyan:[0,255,255],transparent:[255,255,255,0]},ki=function(n,t,i){return n=0>n?n+1:n>1?n-1:n,255*(1>6*n?t+(i-t)*n*6:.5>n?i:2>3*n?t+(i-t)*(2/3-n)*6:t)+.5|0},ui=r.parseColor=function(n,t){var i,u,r,f,o,h,e,s,c,l,a;if(n)if("number"==typeof n)i=[n>>16,n>>8&255,255&n];else{if(","===n.charAt(n.length-1)&&(n=n.substr(0,n.length-1)),bt[n])i=bt[n];else if("#"===n.charAt(0))4===n.length&&(u=n.charAt(1),r=n.charAt(2),f=n.charAt(3),n="#"+u+u+r+r+f+f),n=parseInt(n.substr(1),16),i=[n>>16,n>>8&255,255&n];else if("hsl"===n.substr(0,3))if(i=a=n.match(lt),t){if(-1!==n.indexOf("="))return n.match(li)}else o=Number(i[0])%360/360,h=Number(i[1])/100,e=Number(i[2])/100,r=.5>=e?e*(h+1):e+h-e*h,u=2*e-r,i.length>3&&(i[3]=Number(n[3])),i[0]=ki(o+1/3,u,r),i[1]=ki(o,u,r),i[2]=ki(o-1/3,u,r);else i=n.match(lt)||bt.transparent;i[0]=Number(i[0]);i[1]=Number(i[1]);i[2]=Number(i[2]);i.length>3&&(i[3]=Number(i[3]))}else i=bt.black;return t&&!a&&(u=i[0]/255,r=i[1]/255,f=i[2]/255,s=Math.max(u,r,f),c=Math.min(u,r,f),e=(s+c)/2,s===c?o=h=0:(l=s-c,h=e>.5?l/(2-s-c):l/(s+c),o=s===u?(r-f)/l+(f>r?6:0):s===r?(f-u)/l+2:(u-r)/l+4,o*=60),i[0]=o+.5|0,i[1]=100*h+.5|0,i[2]=100*e+.5|0),i},pr=function(n,t){for(var i,f,e=n.match(l)||[],r=0,o=e.length?"":n,u=0;u<e.length;u++)i=e[u],f=n.substr(r,n.indexOf(i,r)-r),r+=f.length+i.length,i=ui(i,t),3===i.length&&i.push(1),o+=f+(t?"hsla("+i[0]+","+i[1]+"%,"+i[2]+"%,"+i[3]:"rgba("+i.join(","))+")";return o+n.substr(r)},l="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3}){1,2}\\b";for(i in bt)l+="|"+i+"\\b";l=new RegExp(l+")","gi");r.colorStringFilter=function(n){var t,i=n[0]+n[1];l.test(i)&&(t=-1!==i.indexOf("hsl(")||-1!==i.indexOf("hsla("),n[0]=pr(n[0],t),n[1]=pr(n[1],t));l.lastIndex=0};t.defaultStringFilter||(t.defaultStringFilter=r.colorStringFilter);var di=function(n,t,i,r){if(null==n)return function(n){return n};var e,s=t?(n.match(l)||[""])[0]:"",f=n.split(s).join("").match(ai)||[],h=n.substr(0,n.indexOf(f[0])),c=")"===n.charAt(n.length-1)?")":"",o=-1!==n.indexOf(" ")?" ":",",u=f.length,a=u>0?f[0].replace(lt,""):"";return u?e=t?function(n){var p,v,t,y;if("number"==typeof n)n+=a;else if(r&&k.test(n)){for(y=n.replace(k,"|").split("|"),t=0;t<y.length;t++)y[t]=e(y[t]);return y.join(",")}if(p=(n.match(l)||[s])[0],v=n.split(p).join("").match(ai)||[],t=v.length,u>t--)for(;++t<u;)v[t]=i?v[(t-1)/2|0]:f[t];return h+v.join(o)+o+p+c+(-1!==n.indexOf("inset")?" inset":"")}:function(n){var s,l,t;if("number"==typeof n)n+=a;else if(r&&k.test(n)){for(l=n.replace(k,"|").split("|"),t=0;t<l.length;t++)l[t]=e(l[t]);return l.join(",")}if(s=n.match(ai)||[],t=s.length,u>t--)for(;++t<u;)s[t]=i?s[(t-1)/2|0]:f[t];return h+s.join(o)+c}:function(n){return n}},gi=function(n){return n=n.split(","),function(t,i,r,u,f,e,o){var s,h=(i+"").split(" ");for(o={},s=0;4>s;s++)o[n[s]]=h[s]=h[s]||h[(s-1)/2>>0];return u.parse(t,o,f,e)}},nr=(p._setPluginRatio=function(n){this.plugin.setRatio(n);for(var r,t,f,e,o,u=this.data,s=u.proxy,i=u.firstMPT,h=1e-6;i;)r=s[i.v],i.r?r=Math.round(r):h>r&&r>-h&&(r=0),i.t[i.p]=r,i=i._next;if(u.autoRotate&&(u.autoRotate.rotation=u.mod?u.mod(s.rotation,this.t):s.rotation),1===n||0===n)for(i=u.firstMPT,o=1===n?"e":"b";i;){if(t=i.t,t.type){if(1===t.type){for(e=t.xs0+t.s+t.xs1,f=1;f<t.l;f++)e+=t["xn"+f]+t["xs"+(f+1)];t[o]=e}}else t[o]=t.s+t.xs0;i=i._next}},function(n,t,i,r,u){this.t=n;this.p=t;this.v=i;this.r=u;r&&(r._prev=this,this._next=r)}),o=(p._parseToProxy=function(n,t,i,r,u,f){var c,e,o,s,v,h=r,l={},a={},y=i._transform,p=ii;for(i._transform=null,ii=t,r=v=i.parse(n,t,r,u),ii=p,f&&(i._transform=y,h&&(h._prev=null,h._prev&&(h._prev._next=null)));r&&r!==h;){if(r.type<=1&&(e=r.p,a[e]=r.s+r.c,l[e]=r.s,f||(s=new nr(r,"s",e,s,r.r),r.c=0),1===r.type))for(c=r.l;--c>0;)o="xn"+c,e=r.p+"_"+o,a[e]=r.data[o],l[e]=r[o],f||(s=new nr(r,o,e,s,r.rxp[o]));r=r._next}return{proxy:l,end:a,firstMPT:s,pt:v}},p.CSSPropTween=function(n,t,i,r,u,f,e,s,h,c,l){this.t=n;this.p=t;this.s=i;this.c=r;this.n=e||t;n instanceof o||oi.push(this.n);this.r=s;this.type=f||0;h&&(this.pr=h,ct=!0);this.b=void 0===c?i:c;this.e=void 0===l?i+r:l;u&&(this._next=u,u._prev=this)}),fi=function(n,t,i,r,u,f){var e=new o(n,t,i,r-i,u,-1,f);return e.b=i,e.e=e.xs0=r,e},kt=r.parseComplex=function(n,t,i,u,f,e,s,h,c,a){i=i||e||"";"function"==typeof u&&(u=u(nt,it));s=new o(n,t,0,0,s,a?2:1,null,!1,h,i,u);u+="";f&&l.test(u+i)&&(u=[i,u],r.colorStringFilter(u),i=u[0],u=u[1]);var p,g,tt,v,y,ot,st,ft,b,ht,rt,w,ct,d=i.split(", ").join(",").split(" "),et=u.split(", ").join(",").split(" "),at=d.length,vt=si!==!1;for((-1!==u.indexOf(",")||-1!==i.indexOf(","))&&(d=d.join(" ").replace(k,", ").split(" "),et=et.join(" ").replace(k,", ").split(" "),at=d.length),at!==et.length&&(d=(e||"").split(" "),at=d.length),s.plugin=c,s.setRatio=a,l.lastIndex=0,p=0;at>p;p++)if(v=d[p],y=et[p],ft=parseFloat(v),ft||0===ft)s.appendXtra("",ft,pt(y,ft),y.replace(li,""),vt&&-1!==y.indexOf("px"),!0);else if(f&&l.test(v))w=y.indexOf(")")+1,w=")"+(w?y.substr(w):""),ct=-1!==y.indexOf("hsl")&&ut,v=ui(v,ct),y=ui(y,ct),b=v.length+y.length>6,b&&!ut&&0===y[3]?(s["xs"+s.l]+=s.l?" transparent":"transparent",s.e=s.e.split(et[p]).join("transparent")):(ut||(b=!1),ct?s.appendXtra(b?"hsla(":"hsl(",v[0],pt(y[0],v[0]),",",!1,!0).appendXtra("",v[1],pt(y[1],v[1]),"%,",!1).appendXtra("",v[2],pt(y[2],v[2]),b?"%,":"%"+w,!1):s.appendXtra(b?"rgba(":"rgb(",v[0],y[0]-v[0],",",!0,!0).appendXtra("",v[1],y[1]-v[1],",",!0).appendXtra("",v[2],y[2]-v[2],b?",":w,!0),b&&(v=v.length<4?1:v[3],s.appendXtra("",v,(y.length<4?1:y[3])-v,w,!1))),l.lastIndex=0;else if(ot=v.match(lt)){if(st=y.match(li),!st||st.length!==ot.length)return s;for(tt=0,g=0;g<ot.length;g++)rt=ot[g],ht=v.indexOf(rt,tt),s.appendXtra(v.substr(tt,ht-tt),Number(rt),pt(st[g],rt),"",vt&&"px"===v.substr(ht+rt.length,2),0===g),tt=ht+rt.length;s["xs"+s.l]+=v.substr(tt)}else s["xs"+s.l]+=s.l||s["xs"+s.l]?" "+y:y;if(-1!==u.indexOf("=")&&s.data){for(w=s.xs0+s.data.s,p=1;p<s.l;p++)w+=s["xs"+p]+s.data["xn"+p];s.e=w+s["xs"+p]}return s.l||(s.type=-1,s.xs0=s.e),s.xfirst||s},s=9;for(i=o.prototype,i.l=i.pr=0;--s>0;)i["xn"+s]=0,i["xs"+s]="";i.xs0="";i._next=i._prev=i.xfirst=i.data=i.plugin=i.setRatio=i.rxp=null;i.appendXtra=function(n,t,i,r,u,f){var e=this,s=e.l;return e["xs"+s]+=f&&(s||e["xs"+s])?" "+n:n||"",i||0===s||e.plugin?(e.l++,e.type=e.setRatio?2:1,e["xs"+e.l]=r||"",s>0?(e.data["xn"+s]=t+i,e.rxp["xn"+s]=u,e["xn"+s]=t,e.plugin||(e.xfirst=new o(e,"xn"+s,t,i,e.xfirst||e,0,e.n,u,e.pr),e.xfirst.xs0=0),e):(e.data={s:t+i},e.rxp={},e.s=t,e.c=i,e.r=u,e)):(e["xs"+s]+=t+(r||""),e)};var wr=function(n,t){t=t||{};this.p=t.prefix?vt(n)||n:n;v[n]=v[this.p]=this;this.format=t.formatter||di(t.defaultValue,t.color,t.collapsible,t.multi);t.parser&&(this.parse=t.parser);this.clrs=t.color;this.multi=t.multi;this.keyword=t.keyword;this.dflt=t.defaultValue;this.pr=t.priority||0},f=p._registerComplexSpecialProp=function(n,t,i){"object"!=typeof t&&(t={parser:i});var r,e,u=n.split(","),f=t.defaultValue;for(i=i||[f],r=0;r<u.length;r++)t.prefix=0===r&&t.prefix,t.defaultValue=i[r]||f,e=new wr(u[r],t)},wu=p._registerPluginProp=function(n){if(!v[n]){var t=n.charAt(0).toUpperCase()+n.substr(1)+"Plugin";f(n,{parser:function(n,i,r,u,f,e,o){var s=ru.com.greensock.plugins[t];return s?(s._cssRegister(),v[r].parse(n,i,r,u,f,e,o)):(ar("Error: "+t+" js file not loaded."),f)}})}};i=wr.prototype;i.parseComplex=function(n,t,i,r,u,f){var e,o,s,a,c,l,h=this.keyword;if(this.multi&&(k.test(i)||k.test(t)?(o=t.replace(k,"|").split("|"),s=i.replace(k,"|").split("|")):h&&(o=[t],s=[i])),s){for(a=s.length>o.length?s.length:o.length,e=0;a>e;e++)t=o[e]=o[e]||this.dflt,i=s[e]=s[e]||this.dflt,h&&(c=t.indexOf(h),l=i.indexOf(h),c!==l&&(-1===l?o[e]=o[e].split(h).join(""):-1===c&&(o[e]+=" "+h)));t=o.join(", ");i=s.join(", ")}return kt(n,this.p,t,i,this.clrs,this.dflt,r,this.pr,u,f)};i.parse=function(n,t,i,r,f,o){return this.parseComplex(n.style,this.format(u(n,this.p,e,!1,this.dflt)),this.format(t),f,o)};r.registerSpecialProp=function(n,t,i){f(n,{parser:function(n,r,u,f,e,s){var h=new o(n,u,0,0,e,2,u,!1,i);return h.plugin=s,h.setRatio=t(n,r,f._tween,u),h},priority:i})};r.useSVGTransformAttr=!0;var tt,br="scaleX,scaleY,scaleZ,x,y,z,skewX,skewY,rotation,rotationX,rotationY,perspective,xPercent,yPercent".split(","),h=vt("transform"),tr=vr+"transform",dt=vt("transformOrigin"),b=null!==vt("perspective"),ei=p.Transform=function(){this.perspective=parseFloat(r.defaultTransformPerspective)||0;this.force3D=r.defaultForce3D!==!1&&b?r.defaultForce3D||"auto":!1},bu=_gsScope.SVGElement,kr=function(n,t,i){var r,u=y.createElementNS("http://www.w3.org/2000/svg",n),f=/([a-z])([A-Z])/g;for(r in i)u.setAttributeNS(null,r.replace(f,"$1-$2").toLowerCase(),i[r]);return t.appendChild(u),u},st=y.documentElement||{},ku=function(){var t,n,r,i=ot||/Android/i.test(g)&&!_gsScope.chrome;return y.createElementNS&&!i&&(t=kr("svg",st),n=kr("rect",t,{width:100,height:50,x:100}),r=n.getBoundingClientRect().width,n.style[dt]="50% 50%",n.style[h]="scaleX(0.5)",i=r===n.getBoundingClientRect().width&&!(ci&&b),st.removeChild(t)),i}(),ir=function(n,t,i,u,f,e){var l,a,v,y,p,w,o,b,k,d,g,c,nt,tt,s=n._gsTransform,h=fr(n,!0);s&&(nt=s.xOrigin,tt=s.yOrigin);(!u||(l=u.split(" ")).length<2)&&(o=n.getBBox(),0===o.x&&0===o.y&&o.width+o.height===0&&(o={x:parseFloat(n.hasAttribute("x")?n.getAttribute("x"):n.hasAttribute("cx")?n.getAttribute("cx"):0)||0,y:parseFloat(n.hasAttribute("y")?n.getAttribute("y"):n.hasAttribute("cy")?n.getAttribute("cy"):0)||0,width:0,height:0}),t=et(t).split(" "),l=[(-1!==t[0].indexOf("%")?parseFloat(t[0])/100*o.width:parseFloat(t[0]))+o.x,(-1!==t[1].indexOf("%")?parseFloat(t[1])/100*o.height:parseFloat(t[1]))+o.y]);i.xOrigin=y=parseFloat(l[0]);i.yOrigin=p=parseFloat(l[1]);u&&h!==ur&&(w=h[0],o=h[1],b=h[2],k=h[3],d=h[4],g=h[5],c=w*k-o*b,c&&(a=y*(k/c)+p*(-b/c)+(b*g-k*d)/c,v=y*(-o/c)+p*(w/c)-(w*g-o*d)/c,y=i.xOrigin=l[0]=a,p=i.yOrigin=l[1]=v));s&&(e&&(i.xOffset=s.xOffset,i.yOffset=s.yOffset,s=i),f||f!==!1&&r.defaultSmoothOrigin!==!1?(a=y-nt,v=p-tt,s.xOffset+=a*h[0]+v*h[2]-a,s.yOffset+=a*h[1]+v*h[3]-v):s.xOffset=s.yOffset=0);e||n.setAttribute("data-svg-origin",l.join(" "))},dr=function(n){var t,i=ri("svg",this.ownerSVGElement.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),r=this.parentNode,u=this.nextSibling,f=this.style.cssText;if(st.appendChild(i),i.appendChild(this),this.style.display="block",n)try{t=this.getBBox();this._originalGetBBox=this.getBBox;this.getBBox=dr}catch(e){}else this._originalGetBBox&&(t=this._originalGetBBox());return u?r.insertBefore(this,u):r.appendChild(this),st.removeChild(i),this.style.cssText=f,t},du=function(n){try{return n.getBBox()}catch(t){return dr.call(n,!0)}},rr=function(n){return!(!(bu&&n.getCTM&&du(n))||n.parentNode&&!n.ownerSVGElement)},ur=[1,0,0,1,0,0],fr=function(n,t){var f,i,r,e,c,l,a=n._gsTransform||new ei,v=1e5,o=n.style;if(h?i=u(n,tr,null,!0):n.currentStyle&&(i=n.currentStyle.filter.match(hu),i=i&&4===i.length?[i[0].substr(4),Number(i[2].substr(4)),Number(i[1].substr(4)),i[3].substr(4),a.x||0,a.y||0].join(","):""),f=!i||"none"===i||"matrix(1, 0, 0, 1, 0, 0)"===i,f&&h&&((l="none"===ft(n).display)||!n.parentNode)&&(l&&(e=o.display,o.display="block"),n.parentNode||(c=1,st.appendChild(n)),i=u(n,tr,null,!0),f=!i||"none"===i||"matrix(1, 0, 0, 1, 0, 0)"===i,e?o.display=e:l&&ht(o,"display"),c&&st.removeChild(n)),(a.svg||n.getCTM&&rr(n))&&(f&&-1!==(o[h]+"").indexOf("matrix")&&(i=o[h],f=0),r=n.getAttribute("transform"),f&&r&&(-1!==r.indexOf("matrix")?(i=r,f=0):-1!==r.indexOf("translate")&&(i="matrix(1,0,0,1,"+r.match(/(?:\-|\b)[\d\-\.e]+\b/gi).join(",")+")",f=0))),f)return ur;for(r=(i||"").match(lt)||[],s=r.length;--s>-1;)e=Number(r[s]),r[s]=(c=e-(e|=0))?(c*v+(0>c?-.5:.5)|0)/v+e:e;return t&&r.length>6?[r[0],r[1],r[4],r[5],r[12],r[13]]:r},gt=p.getTransform=function(n,i,f,e){if(n._gsTransform&&f&&!e)return n._gsTransform;var s,pt,kt,gt,ut,nt,o=f?n._gsTransform||new ei:new ei,ni=o.scaleX<0,ti=2e-5,ft=1e5,fi=b?parseFloat(u(n,dt,i,!1,"0 0 0").split(" ")[2])||o.zOrigin||0:0,oi=parseFloat(r.defaultTransformPerspective)||0;if(o.svg=!(!n.getCTM||!rr(n)),o.svg&&(ir(n,u(n,dt,i,!1,"50% 50%")+"",o,n.getAttribute("data-svg-origin")),tt=r.useSVGTransformAttr||ku),s=fr(n),s!==ur){if(16===s.length){var wt,et,bt,c,l,k=s[0],p=s[1],st=s[2],si=s[3],it=s[4],v=s[5],d=s[6],hi=s[7],ct=s[8],w=s[9],y=s[10],ii=s[12],ri=s[13],ot=s[14],g=s[11],a=Math.atan2(d,y);o.zOrigin&&(ot=-o.zOrigin,ii=ct*ot-s[12],ri=w*ot-s[13],ot=y*ot+o.zOrigin-s[14]);o.rotationX=a*rt;a&&(c=Math.cos(-a),l=Math.sin(-a),wt=it*c+ct*l,et=v*c+w*l,bt=d*c+y*l,ct=it*-l+ct*c,w=v*-l+w*c,y=d*-l+y*c,g=hi*-l+g*c,it=wt,v=et,d=bt);a=Math.atan2(-st,y);o.rotationY=a*rt;a&&(c=Math.cos(-a),l=Math.sin(-a),wt=k*c-ct*l,et=p*c-w*l,bt=st*c-y*l,w=p*l+w*c,y=st*l+y*c,g=si*l+g*c,k=wt,p=et,st=bt);a=Math.atan2(p,k);o.rotation=a*rt;a&&(c=Math.cos(-a),l=Math.sin(-a),k=k*c+it*l,et=p*c+v*l,v=p*-l+v*c,d=st*-l+d*c,p=et);o.rotationX&&Math.abs(o.rotationX)+Math.abs(o.rotation)>359.9&&(o.rotationX=o.rotation=0,o.rotationY=180-o.rotationY);o.scaleX=(Math.sqrt(k*k+p*p)*ft+.5|0)/ft;o.scaleY=(Math.sqrt(v*v+w*w)*ft+.5|0)/ft;o.scaleZ=(Math.sqrt(d*d+y*y)*ft+.5|0)/ft;o.rotationX||o.rotationY?o.skewX=0:(o.skewX=it||v?Math.atan2(it,v)*rt+o.rotation:o.skewX||0,Math.abs(o.skewX)>90&&Math.abs(o.skewX)<270&&(ni?(o.scaleX*=-1,o.skewX+=o.rotation<=0?180:-180,o.rotation+=o.rotation<=0?180:-180):(o.scaleY*=-1,o.skewX+=o.skewX<=0?180:-180)));o.perspective=g?1/(0>g?-g:g):0;o.x=ii;o.y=ri;o.z=ot;o.svg&&(o.x-=o.xOrigin-(o.xOrigin*k-o.yOrigin*it),o.y-=o.yOrigin-(o.yOrigin*p-o.xOrigin*v))}else if(!b||e||!s.length||o.x!==s[4]||o.y!==s[5]||!o.rotationX&&!o.rotationY){var ui=s.length>=6,lt=ui?s[0]:1,at=s[1]||0,vt=s[2]||0,yt=ui?s[3]:1;o.x=s[4]||0;o.y=s[5]||0;kt=Math.sqrt(lt*lt+at*at);gt=Math.sqrt(yt*yt+vt*vt);ut=lt||at?Math.atan2(at,lt)*rt:o.rotation||0;nt=vt||yt?Math.atan2(vt,yt)*rt+ut:o.skewX||0;Math.abs(nt)>90&&Math.abs(nt)<270&&(ni?(kt*=-1,nt+=0>=ut?180:-180,ut+=0>=ut?180:-180):(gt*=-1,nt+=0>=nt?180:-180));o.scaleX=kt;o.scaleY=gt;o.rotation=ut;o.skewX=nt;b&&(o.rotationX=o.rotationY=o.z=0,o.perspective=oi,o.scaleZ=1);o.svg&&(o.x-=o.xOrigin-(o.xOrigin*lt+o.yOrigin*vt),o.y-=o.yOrigin-(o.xOrigin*at+o.yOrigin*yt))}o.zOrigin=fi;for(pt in o)o[pt]<ti&&o[pt]>-ti&&(o[pt]=0)}return f&&(n._gsTransform=o,o.svg&&(tt&&n.style[h]?t.delayedCall(.001,function(){ht(n.style,h)}):!tt&&n.getAttribute("transform")&&t.delayedCall(.001,function(){n.removeAttribute("transform")}))),o},gu=function(n){var o,p,t=this.data,nt=-t.rotation*a,ut=nt+t.skewX*a,e=1e5,h=(Math.cos(nt)*t.scaleX*e|0)/e,u=(Math.sin(nt)*t.scaleX*e|0)/e,f=(Math.sin(ut)*-t.scaleY*e|0)/e,c=(Math.cos(ut)*t.scaleY*e|0)/e,d=this.t.style,g=this.t.currentStyle,k,y,ft,et;if(g){p=u;u=-f;f=-p;o=g.filter;d.filter="";var i,r,l=this.t.offsetWidth,v=this.t.offsetHeight,tt="absolute"!==g.position,b="progid:DXImageTransform.Microsoft.Matrix(M11="+h+", M12="+u+", M21="+f+", M22="+c,it=t.x+l*t.xPercent/100,rt=t.y+v*t.yPercent/100;if(null!=t.ox&&(i=(t.oxp?l*t.ox*.01:t.ox)-l/2,r=(t.oyp?v*t.oy*.01:t.oy)-v/2,it+=i-(i*h+r*u),rt+=r-(i*f+r*c)),tt?(i=l/2,r=v/2,b+=", Dx="+(i-(i*h+r*u)+it)+", Dy="+(r-(i*f+r*c)+rt)+")"):b+=", sizingMethod='auto expand')",d.filter=-1!==o.indexOf("DXImageTransform.Microsoft.Matrix(")?o.replace(cu,b):b+" "+o,(0===n||1===n)&&1===h&&0===u&&0===f&&1===c&&(tt&&-1===b.indexOf("Dx=0, Dy=0")||yi.test(o)&&100!==parseFloat(RegExp.$1)||-1===o.indexOf(o.indexOf("Alpha"))&&d.removeAttribute("filter")),!tt)for(et=8>ot?1:-1,i=t.ieOffsetX||0,r=t.ieOffsetY||0,t.ieOffsetX=Math.round((l-((0>h?-h:h)*l+(0>u?-u:u)*v))/2+it),t.ieOffsetY=Math.round((v-((0>c?-c:c)*v+(0>f?-f:f)*l))/2+rt),s=0;4>s;s++)y=yu[s],k=g[y],p=-1!==k.indexOf("px")?parseFloat(k):w(this.t,y,parseFloat(k),k.replace(at,""))||0,ft=p!==t[y]?2>s?-t.ieOffsetX:-t.ieOffsetY:2>s?i-t.ieOffsetX:r-t.ieOffsetY,d[y]=(t[y]=Math.round(p-ft*(0===s||2===s?1:et)))+"px"}},nf=p.set3DTransformRatio=p.setTransformRatio=function(n){var r,c,l,nt,v,y,it,vt,yt,ut,pt,wt,ft,ct,i,f,e,ni,g,o,s,bt,et,t=this.data,kt=this.t.style,u=t.rotation,dt=t.rotationX,gt=t.rotationY,k=t.scaleX,d=t.scaleY,rt=t.scaleZ,p=t.x,w=t.y,ot=t.z,lt=t.svg,st=t.perspective,ti=t.force3D,ht=t.skewY,at=t.skewX;if(ht&&(at+=ht,u+=ht),((1===n||0===n)&&"auto"===ti&&(this.tween._totalTime===this.tween._totalDuration||!this.tween._totalTime)||!ti)&&!ot&&!st&&!gt&&!dt&&1===rt||tt&&lt||!b)return void(u||at||lt?(u*=a,bt=at*a,et=1e5,c=Math.cos(u)*k,v=Math.sin(u)*k,l=Math.sin(u-bt)*-d,y=Math.cos(u-bt)*d,bt&&"simple"===t.skewType&&(r=Math.tan(bt-ht*a),r=Math.sqrt(1+r*r),l*=r,y*=r,ht&&(r=Math.tan(ht*a),r=Math.sqrt(1+r*r),c*=r,v*=r)),lt&&(p+=t.xOrigin-(t.xOrigin*c+t.yOrigin*l)+t.xOffset,w+=t.yOrigin-(t.xOrigin*v+t.yOrigin*y)+t.yOffset,tt&&(t.xPercent||t.yPercent)&&(i=this.t.getBBox(),p+=.01*t.xPercent*i.width,w+=.01*t.yPercent*i.height),i=1e-6,i>p&&p>-i&&(p=0),i>w&&w>-i&&(w=0)),g=(c*et|0)/et+","+(v*et|0)/et+","+(l*et|0)/et+","+(y*et|0)/et+","+p+","+w+")",lt&&tt?this.t.setAttribute("transform","matrix("+g):kt[h]=(t.xPercent||t.yPercent?"translate("+t.xPercent+"%,"+t.yPercent+"%) matrix(":"matrix(")+g):kt[h]=(t.xPercent||t.yPercent?"translate("+t.xPercent+"%,"+t.yPercent+"%) matrix(":"matrix(")+k+",0,0,"+d+","+p+","+w+")");if(ci&&(i=.0001,i>k&&k>-i&&(k=rt=2e-5),i>d&&d>-i&&(d=rt=2e-5),!st||t.z||t.rotationX||t.rotationY||(st=0)),u||at)u*=a,f=c=Math.cos(u),e=v=Math.sin(u),at&&(u-=at*a,f=Math.cos(u),e=Math.sin(u),"simple"===t.skewType&&(r=Math.tan((at-ht)*a),r=Math.sqrt(1+r*r),f*=r,e*=r,t.skewY&&(r=Math.tan(ht*a),r=Math.sqrt(1+r*r),c*=r,v*=r))),l=-e,y=f;else{if(!(gt||dt||1!==rt||st||lt))return void(kt[h]=(t.xPercent||t.yPercent?"translate("+t.xPercent+"%,"+t.yPercent+"%) translate3d(":"translate3d(")+p+"px,"+w+"px,"+ot+"px)"+(1!==k||1!==d?" scale("+k+","+d+")":""));c=y=1;l=v=0}ut=1;nt=it=vt=yt=pt=wt=0;ft=st?-1/st:0;ct=t.zOrigin;i=1e-6;o=",";s="0";u=gt*a;u&&(f=Math.cos(u),e=Math.sin(u),vt=-e,pt=ft*-e,nt=c*e,it=v*e,ut=f,ft*=f,c*=f,v*=f);u=dt*a;u&&(f=Math.cos(u),e=Math.sin(u),r=l*f+nt*e,ni=y*f+it*e,yt=ut*e,wt=ft*e,nt=l*-e+nt*f,it=y*-e+it*f,ut*=f,ft*=f,l=r,y=ni);1!==rt&&(nt*=rt,it*=rt,ut*=rt,ft*=rt);1!==d&&(l*=d,y*=d,yt*=d,wt*=d);1!==k&&(c*=k,v*=k,vt*=k,pt*=k);(ct||lt)&&(ct&&(p+=nt*-ct,w+=it*-ct,ot+=ut*-ct+ct),lt&&(p+=t.xOrigin-(t.xOrigin*c+t.yOrigin*l)+t.xOffset,w+=t.yOrigin-(t.xOrigin*v+t.yOrigin*y)+t.yOffset),i>p&&p>-i&&(p=s),i>w&&w>-i&&(w=s),i>ot&&ot>-i&&(ot=0));g=t.xPercent||t.yPercent?"translate("+t.xPercent+"%,"+t.yPercent+"%) matrix3d(":"matrix3d(";g+=(i>c&&c>-i?s:c)+o+(i>v&&v>-i?s:v)+o+(i>vt&&vt>-i?s:vt);g+=o+(i>pt&&pt>-i?s:pt)+o+(i>l&&l>-i?s:l)+o+(i>y&&y>-i?s:y);dt||gt||1!==rt?(g+=o+(i>yt&&yt>-i?s:yt)+o+(i>wt&&wt>-i?s:wt)+o+(i>nt&&nt>-i?s:nt),g+=o+(i>it&&it>-i?s:it)+o+(i>ut&&ut>-i?s:ut)+o+(i>ft&&ft>-i?s:ft)+o):g+=",0,0,0,0,1,0,";g+=p+o+w+o+ot+o+(st?1+-ot/st:1)+")";kt[h]=g};for(i=ei.prototype,i.x=i.y=i.z=i.skewX=i.skewY=i.rotation=i.rotationX=i.rotationY=i.zOrigin=i.xPercent=i.yPercent=i.xOffset=i.yOffset=0,i.scaleX=i.scaleY=i.scaleZ=1,f("transform,scale,scaleX,scaleY,scaleZ,x,y,z,rotation,rotationX,rotationY,rotationZ,skewX,skewY,shortRotation,shortRotationX,shortRotationY,shortRotationZ,transformOrigin,svgOrigin,transformPerspective,directionalRotation,parseTransform,force3D,skewType,xPercent,yPercent,smoothOrigin",{parser:function(n,t,i,f,s,l,a){var pt,st;if(f._lastParsedTransform===a)return s;f._lastParsedTransform=a;st=a.scale&&"function"==typeof a.scale?a.scale:0;"function"==typeof a[i]&&(pt=a[i],a[i]=t);st&&(a.scale=st(nt,n));var w,rt,at,vt,ot,ut,ft,ht,g,yt=n._gsTransform,bt=n.style,kt=1e-6,ni=br.length,v=a,ct={},lt="transformOrigin",p=gt(n,e,!0,v.parseTransform),k=v.transform&&("function"==typeof v.transform?v.transform(nt,it):v.transform);if(f._transform=p,k&&"string"==typeof k&&h)rt=d.style,rt[h]=k,rt.display="block",rt.position="absolute",y.body.appendChild(d),w=gt(d,null,!1),p.svg&&(ut=p.xOrigin,ft=p.yOrigin,w.x-=p.xOffset,w.y-=p.yOffset,(v.transformOrigin||v.svgOrigin)&&(k={},ir(n,et(v.transformOrigin),k,v.svgOrigin,v.smoothOrigin,!0),ut=k.xOrigin,ft=k.yOrigin,w.x-=k.xOffset-p.xOffset,w.y-=k.yOffset-p.yOffset),(ut||ft)&&(ht=fr(d,!0),w.x-=ut-(ut*ht[0]+ft*ht[2]),w.y-=ft-(ut*ht[1]+ft*ht[3]))),y.body.removeChild(d),w.perspective||(w.perspective=p.perspective),null!=v.xPercent&&(w.xPercent=c(v.xPercent,p.xPercent)),null!=v.yPercent&&(w.yPercent=c(v.yPercent,p.yPercent));else if("object"==typeof v){if(w={scaleX:c(null!=v.scaleX?v.scaleX:v.scale,p.scaleX),scaleY:c(null!=v.scaleY?v.scaleY:v.scale,p.scaleY),scaleZ:c(v.scaleZ,p.scaleZ),x:c(v.x,p.x),y:c(v.y,p.y),z:c(v.z,p.z),xPercent:c(v.xPercent,p.xPercent),yPercent:c(v.yPercent,p.yPercent),perspective:c(v.transformPerspective,p.perspective)},ot=v.directionalRotation,null!=ot)if("object"==typeof ot)for(rt in ot)v[rt]=ot[rt];else v.rotation=ot;"string"==typeof v.x&&-1!==v.x.indexOf("%")&&(w.x=0,w.xPercent=c(v.x,p.xPercent));"string"==typeof v.y&&-1!==v.y.indexOf("%")&&(w.y=0,w.yPercent=c(v.y,p.yPercent));w.rotation=wt("rotation"in v?v.rotation:"shortRotation"in v?v.shortRotation+"_short":"rotationZ"in v?v.rotationZ:p.rotation,p.rotation,"rotation",ct);b&&(w.rotationX=wt("rotationX"in v?v.rotationX:"shortRotationX"in v?v.shortRotationX+"_short":p.rotationX||0,p.rotationX,"rotationX",ct),w.rotationY=wt("rotationY"in v?v.rotationY:"shortRotationY"in v?v.shortRotationY+"_short":p.rotationY||0,p.rotationY,"rotationY",ct));w.skewX=wt(v.skewX,p.skewX);w.skewY=wt(v.skewY,p.skewY)}for(b&&null!=v.force3D&&(p.force3D=v.force3D,vt=!0),p.skewType=v.skewType||p.skewType||r.defaultSkewType,at=p.force3D||p.z||p.rotationX||p.rotationY||w.z||w.rotationX||w.rotationY||w.perspective,at||null==v.scale||(w.scaleZ=1);--ni>-1;)g=br[ni],k=w[g]-p[g],(k>kt||-kt>k||null!=v[g]||null!=ii[g])&&(vt=!0,s=new o(p,g,p[g],k,s),g in ct&&(s.e=ct[g]),s.xs0=0,s.plugin=l,f._overwriteProps.push(s.n));return k=v.transformOrigin,p.svg&&(k||v.svgOrigin)&&(ut=p.xOffset,ft=p.yOffset,ir(n,et(k),w,v.svgOrigin,v.smoothOrigin),s=fi(p,"xOrigin",(yt?p:w).xOrigin,w.xOrigin,s,lt),s=fi(p,"yOrigin",(yt?p:w).yOrigin,w.yOrigin,s,lt),(ut!==p.xOffset||ft!==p.yOffset)&&(s=fi(p,"xOffset",yt?ut:p.xOffset,p.xOffset,s,lt),s=fi(p,"yOffset",yt?ft:p.yOffset,p.yOffset,s,lt)),k="0px 0px"),(k||b&&at&&p.zOrigin)&&(h?(vt=!0,g=dt,k=(k||u(n,g,e,!1,"50% 50%"))+"",s=new o(bt,g,0,0,s,-1,lt),s.b=bt[g],s.plugin=l,b?(rt=p.zOrigin,k=k.split(" "),p.zOrigin=(k.length>2&&(0===rt||"0px"!==k[2])?parseFloat(k[2]):rt)||0,s.xs0=s.e=k[0]+" "+(k[1]||"50%")+" 0px",s=new o(p,"zOrigin",0,0,s,-1,s.n),s.b=rt,s.xs0=s.e=p.zOrigin):s.xs0=s.e=k):et(k+"",p)),vt&&(f._transformType=p.svg&&tt||!at&&3!==this._transformType?2:3),pt&&(a[i]=pt),st&&(a.scale=st),s},prefix:!0}),f("boxShadow",{defaultValue:"0px 0px 0px 0px #999",prefix:!0,color:!0,multi:!0,keyword:"inset"}),f("borderRadius",{defaultValue:"0px",parser:function(n,t,i,r,f){t=this.format(t);var tt,l,d,h,o,s,p,a,it,rt,c,v,g,b,k,nt,y=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"],ut=n.style;for(it=parseFloat(n.offsetWidth),rt=parseFloat(n.offsetHeight),tt=t.split(" "),l=0;l<y.length;l++)this.p.indexOf("border")&&(y[l]=vt(y[l])),o=h=u(n,y[l],e,!1,"0px"),-1!==o.indexOf(" ")&&(h=o.split(" "),o=h[0],h=h[1]),s=d=tt[l],p=parseFloat(o),v=o.substr((p+"").length),g="="===s.charAt(1),g?(a=parseInt(s.charAt(0)+"1",10),s=s.substr(2),a*=parseFloat(s),c=s.substr((a+"").length-(0>a?1:0))||""):(a=parseFloat(s),c=s.substr((a+"").length)),""===c&&(c=ti[i]||v),c!==v&&(b=w(n,"borderLeft",p,v),k=w(n,"borderTop",p,v),"%"===c?(o=b/it*100+"%",h=k/rt*100+"%"):"em"===c?(nt=w(n,"borderLeft",1,"em"),o=b/nt+"em",h=k/nt+"em"):(o=b+"px",h=k+"px"),g&&(s=parseFloat(o)+a+c,d=parseFloat(h)+a+c)),f=kt(ut,y[l],o+" "+h,s+" "+d,!1,"0px",f);return f},prefix:!0,formatter:di("0px 0px 0px 0px",!1,!0)}),f("borderBottomLeftRadius,borderBottomRightRadius,borderTopLeftRadius,borderTopRightRadius",{defaultValue:"0px",parser:function(n,t,i,r,f){return kt(n.style,i,this.format(u(n,i,e,!1,"0px 0px")),this.format(t),!1,"0px",f)},prefix:!0,formatter:di("0px 0px",!1,!0)}),f("backgroundPosition",{defaultValue:"0 0",parser:function(n,t,i,r,f,o){var c,b,h,y,p,l,w="background-position",a=e||ft(n,null),s=this.format((a?ot?a.getPropertyValue(w+"-x")+" "+a.getPropertyValue(w+"-y"):a.getPropertyValue(w):n.currentStyle.backgroundPositionX+" "+n.currentStyle.backgroundPositionY)||"0 0"),v=this.format(t);if(-1!==s.indexOf("%")!=(-1!==v.indexOf("%"))&&v.split(",").length<2&&(l=u(n,"backgroundImage").replace(ou,""),l&&"none"!==l)){for(c=s.split(" "),b=v.split(" "),pi.setAttribute("src",l),h=2;--h>-1;)s=c[h],y=-1!==s.indexOf("%"),y!==(-1!==b[h].indexOf("%"))&&(p=0===h?n.offsetWidth-pi.width:n.offsetHeight-pi.height,c[h]=y?parseFloat(s)/100*p+"px":parseFloat(s)/p*100+"%");s=c.join(" ")}return this.parseComplex(n.style,s,v,f,o)},formatter:et}),f("backgroundSize",{defaultValue:"0 0",formatter:function(n){return n+="",et(-1===n.indexOf(" ")?n+" "+n:n)}}),f("perspective",{defaultValue:"0px",prefix:!0}),f("perspectiveOrigin",{defaultValue:"50% 50%",prefix:!0}),f("transformStyle",{prefix:!0}),f("backfaceVisibility",{prefix:!0}),f("userSelect",{prefix:!0}),f("margin",{parser:gi("marginTop,marginRight,marginBottom,marginLeft")}),f("padding",{parser:gi("paddingTop,paddingRight,paddingBottom,paddingLeft")}),f("clip",{defaultValue:"rect(0px,0px,0px,0px)",parser:function(n,t,i,r,f,o){var c,s,h;return 9>ot?(s=n.currentStyle,h=8>ot?" ":",",c="rect("+s.clipTop+h+s.clipRight+h+s.clipBottom+h+s.clipLeft+")",t=this.format(t).split(",").join(h)):(c=this.format(u(n,this.p,e,!1,this.dflt)),t=this.format(t)),this.parseComplex(n.style,c,t,f,o)}}),f("textShadow",{defaultValue:"0px 0px 0px #999",color:!0,multi:!0}),f("autoRound,strictUnits",{parser:function(n,t,i,r,u){return u}}),f("border",{defaultValue:"0px solid #000",parser:function(n,t,i,r,f,o){var s=u(n,"borderTopWidth",e,!1,"0px"),c=this.format(t).split(" "),h=c[0].replace(at,"");return"px"!==h&&(s=parseFloat(s)/w(n,"borderTopWidth",1,h)+h),this.parseComplex(n.style,this.format(s+" "+u(n,"borderTopStyle",e,!1,"solid")+" "+u(n,"borderTopColor",e,!1,"#000")),c.join(" "),f,o)},color:!0,formatter:function(n){var t=n.split(" ");return t[0]+" "+(t[1]||"solid")+" "+(n.match(l)||["#000"])[0]}}),f("borderWidth",{parser:gi("borderTopWidth,borderRightWidth,borderBottomWidth,borderLeftWidth")}),f("float,cssFloat,styleFloat",{parser:function(n,t,i,r,u){var f=n.style,e="cssFloat"in f?"cssFloat":"styleFloat";return new o(f,e,0,0,u,-1,i,!1,0,f[e],t)}}),gr=function(n){var f,i=this.t,t=i.filter||u(this.data,"filter")||"",r=this.s+this.c*n|0;100===r&&(-1===t.indexOf("atrix(")&&-1===t.indexOf("radient(")&&-1===t.indexOf("oader(")?(i.removeAttribute("filter"),f=!u(this.data,"filter")):(i.filter=t.replace(fu,""),f=!0));f||(this.xn1&&(i.filter=t=t||"alpha(opacity="+r+")"),-1===t.indexOf("pacity")?0===r&&this.xn1||(i.filter=t+" alpha(opacity="+r+")"):i.filter=t.replace(yi,"opacity="+r))},f("opacity,alpha,autoAlpha",{defaultValue:"1",parser:function(n,t,i,r,f,s){var h=parseFloat(u(n,"opacity",e,!1,"1")),c=n.style,l="autoAlpha"===i;return"string"==typeof t&&"="===t.charAt(1)&&(t=("-"===t.charAt(0)?-1:1)*parseFloat(t.substr(2))+h),l&&1===h&&"hidden"===u(n,"visibility",e)&&0!==t&&(h=0),ut?f=new o(c,"opacity",h,t-h,f):(f=new o(c,"opacity",100*h,100*(t-h),f),f.xn1=l?1:0,c.zoom=1,f.type=2,f.b="alpha(opacity="+f.s+")",f.e="alpha(opacity="+(f.s+f.c)+")",f.data=n,f.plugin=s,f.setRatio=gr),l&&(f=new o(c,"visibility",0,0,f,-1,null,!1,0,0!==h?"inherit":"hidden",0===t?"hidden":"inherit"),f.xs0="inherit",r._overwriteProps.push(f.n),r._overwriteProps.push(i)),f}}),ht=function(n,t){t&&(n.removeProperty?(("ms"===t.substr(0,2)||"webkit"===t.substr(0,6))&&(t="-"+t),n.removeProperty(t.replace(sr,"-$1").toLowerCase())):n.removeAttribute(t))},nu=function(n){if(this.t._gsClassPT=this,1===n||0===n){this.t.setAttribute("class",0===n?this.b:this.e);for(var t=this.data,i=this.t.style;t;)t.v?i[t.p]=t.v:ht(i,t.p),t=t._next;1===n&&this.t._gsClassPT===this&&(this.t._gsClassPT=null)}else this.t.getAttribute("class")!==this.e&&this.t.setAttribute("class",this.e)},f("className",{parser:function(n,t,i,r,u,f,s){var c,y,l,a,h,v=n.getAttribute("class")||"",p=n.style.cssText;if(u=r._classNamePT=new o(n,i,0,0,u,2),u.setRatio=nu,u.pr=-11,ct=!0,u.b=v,y=yt(n,e),l=n._gsClassPT){for(a={},h=l.data;h;)a[h.p]=1,h=h._next;l.setRatio(1)}return n._gsClassPT=u,u.e="="!==t.charAt(1)?t:v.replace(new RegExp("(?:\\s|^)"+t.substr(2)+"(?![\\w-])"),"")+("+"===t.charAt(0)?" "+t.substr(2):""),n.setAttribute("class",u.e),c=bi(n,y,yt(n),s,a),n.setAttribute("class",v),u.data=c.firstMPT,n.style.cssText=p,u=u.xfirst=r.parse(n,c.difs,u,f)}}),tu=function(n){if((1===n||0===n)&&this.data._totalTime===this.data._totalDuration&&"isFromStart"!==this.data.data){var i,t,r,u,f,e=this.t.style,o=v.transform.parse;if("all"===this.e)e.cssText="",u=!0;else for(i=this.e.split(" ").join("").split(","),r=i.length;--r>-1;)t=i[r],v[t]&&(v[t].parse===o?u=!0:t="transformOrigin"===t?dt:v[t].p),ht(e,t);u&&(ht(e,h),f=this.t._gsTransform,f&&(f.svg&&(this.t.removeAttribute("data-svg-origin"),this.t.removeAttribute("transform")),delete this.t._gsTransform))}},f("clearProps",{parser:function(n,t,i,r,u){return u=new o(n,i,0,0,u,2),u.setRatio=tu,u.e=t,u.pr=-10,u.data=r._tween,ct=!0,u}}),i="bezier,throwProps,physicsProps,physics2D".split(","),s=i.length;s--;)wu(i[s]);return i=r.prototype,i._firstPT=i._lastParsedTransform=i._transform=null,i._onInitTween=function(n,t,i,f){if(!n.nodeType)return!1;this._target=it=n;this._tween=i;this._vars=t;nt=f;si=t.autoRound;ct=!1;ti=t.suffixMap||r.suffixMap;e=ft(n,"");oi=this._overwriteProps;var a,c,s,y,b,k,w,p,d,l=n.style;if(er&&""===l.zIndex&&(a=u(n,"zIndex",e),("auto"===a||""===a)&&this._addLazySet(l,"zIndex",0)),"string"==typeof t&&(y=l.cssText,a=yt(n,e),l.cssText=y+";"+t,a=bi(n,a,yt(n)).difs,!ut&&uu.test(t)&&(a.opacity=parseFloat(RegExp.$1)),t=a,l.cssText=y),this._firstPT=t.className?c=v.className.parse(n,t.className,"className",this,null,null,t):c=this.parse(n,t,null),this._transformType){for(d=3===this._transformType,h?hi&&(er=!0,""===l.zIndex&&(w=u(n,"zIndex",e),("auto"===w||""===w)&&this._addLazySet(l,"zIndex",0)),or&&this._addLazySet(l,"WebkitBackfaceVisibility",this._vars.WebkitBackfaceVisibility||(d?"visible":"hidden"))):l.zoom=1,s=c;s&&s._next;)s=s._next;p=new o(n,"transform",0,0,null,2);this._linkCSSP(p,null,s);p.setRatio=h?nf:gu;p.data=this._transform||gt(n,e,!0);p.tween=i;p.pr=-1;oi.pop()}if(ct){for(;c;){for(k=c._next,s=y;s&&s.pr>c.pr;)s=s._next;(c._prev=s?s._prev:b)?c._prev._next=c:y=c;(c._next=s)?s._prev=c:b=c;c=k}this._firstPT=y}return!0},i.parse=function(n,t,i,r){var f,d,h,c,a,s,y,l,p,b,k=n.style;for(f in t)s=t[f],"function"==typeof s&&(s=s(nt,it)),d=v[f],d?i=d.parse(n,s,f,this,i,r,t):(a=u(n,f,e)+"",p="string"==typeof s,"color"===f||"fill"===f||"stroke"===f||-1!==f.indexOf("Color")||p&&eu.test(s)?(p||(s=ui(s),s=(s.length>3?"rgba(":"rgb(")+s.join(",")+")"),i=kt(k,f,a,s,!0,"transparent",i,0,r)):p&&lu.test(s)?i=kt(k,f,a,s,!0,null,i,0,r):(h=parseFloat(a),y=h||0===h?a.substr((h+"").length):"",(""===a||"auto"===a)&&("width"===f||"height"===f?(h=pu(n,f,e),y="px"):"left"===f||"top"===f?(h=yr(n,f,e),y="px"):(h="opacity"!==f?0:1,y="")),b=p&&"="===s.charAt(1),b?(c=parseInt(s.charAt(0)+"1",10),s=s.substr(2),c*=parseFloat(s),l=s.replace(at,"")):(c=parseFloat(s),l=p?s.replace(at,""):""),""===l&&(l=f in ti?ti[f]:y),s=c||0===c?(b?c+h:c)+l:t[f],y!==l&&""!==l&&(c||0===c)&&h&&(h=w(n,f,h,y),"%"===l?(h/=w(n,f,100,"%")/100,t.strictUnits!==!0&&(a=h+"%")):"em"===l||"rem"===l||"vw"===l||"vh"===l?h/=w(n,f,1,l):"px"!==l&&(c=w(n,f,c,l),l="px"),b&&(c||0===c)&&(s=c+h+l)),b&&(c+=h),!h&&0!==h||!c&&0!==c?void 0!==k[f]&&(s||s+""!="NaN"&&null!=s)?(i=new o(k,f,c||h||0,0,i,-1,f,!1,0,a,s),i.xs0="none"!==s||"display"!==f&&-1===f.indexOf("Style")?s:a):ar("invalid "+f+" tween value: "+t[f]):(i=new o(k,f,h,c-h,i,0,f,si!==!1&&("px"===l||"zIndex"===f),0,a,s),i.xs0=l))),r&&i&&!i.plugin&&(i.plugin=r);return i},i.setRatio=function(n){var r,u,i,t=this._firstPT,f=1e-6;if(1!==n||this._tween._time!==this._tween._duration&&0!==this._tween._time)if(n||this._tween._time!==this._tween._duration&&0!==this._tween._time||this._tween._rawPrevTime===-1e-6)for(;t;){if(r=t.c*n+t.s,t.r?r=Math.round(r):f>r&&r>-f&&(r=0),t.type)if(1===t.type)if(i=t.l,2===i)t.t[t.p]=t.xs0+r+t.xs1+t.xn1+t.xs2;else if(3===i)t.t[t.p]=t.xs0+r+t.xs1+t.xn1+t.xs2+t.xn2+t.xs3;else if(4===i)t.t[t.p]=t.xs0+r+t.xs1+t.xn1+t.xs2+t.xn2+t.xs3+t.xn3+t.xs4;else if(5===i)t.t[t.p]=t.xs0+r+t.xs1+t.xn1+t.xs2+t.xn2+t.xs3+t.xn3+t.xs4+t.xn4+t.xs5;else{for(u=t.xs0+r+t.xs1,i=1;i<t.l;i++)u+=t["xn"+i]+t["xs"+(i+1)];t.t[t.p]=u}else-1===t.type?t.t[t.p]=t.xs0:t.setRatio&&t.setRatio(n);else t.t[t.p]=r+t.xs0;t=t._next}else for(;t;)2!==t.type?t.t[t.p]=t.b:t.setRatio(n),t=t._next;else for(;t;){if(2!==t.type)if(t.r&&-1!==t.type)if(r=Math.round(t.s+t.c),t.type){if(1===t.type){for(i=t.l,u=t.xs0+r+t.xs1,i=1;i<t.l;i++)u+=t["xn"+i]+t["xs"+(i+1)];t.t[t.p]=u}}else t.t[t.p]=r+t.xs0;else t.t[t.p]=t.e;else t.setRatio(n);t=t._next}},i._enableTransforms=function(n){this._transform=this._transform||gt(this._target,e,!0);this._transformType=this._transform.svg&&tt||!n&&3!==this._transformType?2:3},iu=function(){this.t[this.p]=this.e;this.data._linkCSSP(this,this._next,null,!0)},i._addLazySet=function(n,t,i){var r=this._firstPT=new o(n,t,0,0,this._firstPT,2);r.e=i;r.setRatio=iu;r.data=this},i._linkCSSP=function(n,t,i,r){return n&&(t&&(t._prev=n),n._next&&(n._next._prev=n._prev),n._prev?n._prev._next=n._next:this._firstPT===n&&(this._firstPT=n._next,r=!0),i?i._next=n:r||null!==this._firstPT||(this._firstPT=n),n._next=t,n._prev=i),n},i._mod=function(n){for(var t=this._firstPT;t;)"function"==typeof n[t.p]&&n[t.p]===Math.round&&(t.r=1),t=t._next},i._kill=function(t){var i,f,r,u=t;if(t.autoAlpha||t.alpha){u={};for(f in t)u[f]=t[f];u.opacity=1;u.autoAlpha&&(u.visibility=1)}for(t.className&&(i=this._classNamePT)&&(r=i.xfirst,r&&r._prev?this._linkCSSP(r._prev,i._next,r._prev._prev):r===this._firstPT&&(this._firstPT=i._next),i._next&&this._linkCSSP(i._next,i._next._next,r._prev),this._classNamePT=null),i=this._firstPT;i;)i.plugin&&i.plugin!==f&&i.plugin._kill&&(i.plugin._kill(t),f=i.plugin),i=i._next;return n.prototype._kill.call(this,u)},ni=function(n,t,i){var e,u,r,f;if(n.slice)for(u=n.length;--u>-1;)ni(n[u],t,i);else for(e=n.childNodes,u=e.length;--u>-1;)r=e[u],f=r.type,r.style&&(t.push(yt(r)),i&&i.push(r)),1!==f&&9!==f&&11!==f||!r.childNodes.length||ni(r,t,i)},r.cascadeTo=function(n,i,r){var u,f,e,h,o=t.to(n,i,r),l=[o],c=[],a=[],s=[],v=t._internals.reservedProps;for(n=o._targets||o.target,ni(n,c,s),o.render(i,!0,!0),ni(n,a),o.render(0,!0,!0),o._enabled(!0),u=s.length;--u>-1;)if(f=bi(s[u],c[u],a[u]),f.firstMPT){f=f.difs;for(e in r)v[e]&&(f[e]=r[e]);h={};for(e in f)h[e]=c[u][e];l.push(t.fromTo(s[u],i,h,f))}return l},n.activate([r]),r},!0),function(){var t=_gsScope._gsDefine.plugin({propName:"roundProps",version:"1.6.0",priority:-1,API:2,init:function(n,t,i){return this._tween=i,!0}}),i=function(n){for(;n;)n.f||n.blob||(n.m=Math.round),n=n._next},n=t.prototype;n._onInitAllProps=function(){for(var f,n,r,t=this._tween,e=t.vars.roundProps.join?t.vars.roundProps:t.vars.roundProps.split(","),u=e.length,o={},s=t._propLookup.roundProps;--u>-1;)o[e[u]]=Math.round;for(u=e.length;--u>-1;)for(f=e[u],n=t._firstPT;n;)r=n._next,n.pg?n.t._mod(o):n.n===f&&(2===n.f&&n.t?i(n.t._firstPT):(this._add(n.t,f,n.s,n.c),r&&(r._prev=n._prev),n._prev?n._prev._next=r:t._firstPT===n&&(t._firstPT=r),n._next=n._prev=null,t._propLookup[f]=s)),n=r;return!1};n._add=function(n,t,i,r){this._addTween(n,t,i,i+r,t,Math.round);this._overwriteProps.push(t)}}(),function(){_gsScope._gsDefine.plugin({propName:"attr",API:2,version:"0.6.0",init:function(n,t,i,r){var u,f;if("function"!=typeof n.setAttribute)return!1;for(u in t)f=t[u],"function"==typeof f&&(f=f(r,n)),this._addTween(n,"setAttribute",n.getAttribute(u)+"",f+"",u,!1,u),this._overwriteProps.push(u);return!0}})}();_gsScope._gsDefine.plugin({propName:"directionalRotation",version:"0.3.0",API:2,init:function(n,t,i,r){"object"!=typeof t&&(t={rotation:t});this.finals={};var f,o,h,s,u,c,e=t.useRadians===!0?2*Math.PI:360,l=1e-6;for(f in t)"useRadians"!==f&&(s=t[f],"function"==typeof s&&(s=s(r,n)),c=(s+"").split("_"),o=c[0],h=parseFloat("function"!=typeof n[f]?n[f]:n[f.indexOf("set")||"function"!=typeof n["get"+f.substr(3)]?f:"get"+f.substr(3)]()),s=this.finals[f]="string"==typeof o&&"="===o.charAt(1)?h+parseInt(o.charAt(0)+"1",10)*Number(o.substr(2)):Number(o)||0,u=s-h,c.length&&(o=c.join("_"),-1!==o.indexOf("short")&&(u%=e,u!==u%(e/2)&&(u=0>u?u+e:u-e)),-1!==o.indexOf("_cw")&&0>u?u=(u+9999999999*e)%e-(u/e|0)*e:-1!==o.indexOf("ccw")&&u>0&&(u=(u-9999999999*e)%e-(u/e|0)*e)),(u>l||-l>u)&&(this._addTween(n,f,h,h+u,f),this._overwriteProps.push(f)));return!0},set:function(n){var t;if(1!==n)this._super.setRatio.call(this,n);else for(t=this._firstPT;t;)t.f?t.t[t.p](this.finals[t.p]):t.t[t.p]=this.finals[t.p],t=t._next}})._autoCSS=!0;_gsScope._gsDefine("easing.Back",["easing.Ease"],function(n){var f,u,s,a=_gsScope.GreenSockGlobals||_gsScope,p=a.com.greensock,v=2*Math.PI,y=Math.PI/2,r=p._class,t=function(t,i){var u=r("easing."+t,function(){},!0),f=u.prototype=new n;return f.constructor=u,f.getRatio=i,u},h=n.register||function(){},e=function(n,t,i,u){var f=r("easing."+n,{easeOut:new t,easeIn:new i,easeInOut:new u},!0);return h(f,n),f},c=function(n,t,i){this.t=n;this.v=t;i&&(this.next=i,i.prev=this,this.c=i.v-t,this.gap=i.t-n)},l=function(t,i){var u=r("easing."+t,function(n){this._p1=n||0===n?n:1.70158;this._p2=1.525*this._p1},!0),f=u.prototype=new n;return f.constructor=u,f.getRatio=i,f.config=function(n){return new u(n)},u},w=e("Back",l("BackOut",function(n){return(n-=1)*n*((this._p1+1)*n+this._p1)+1}),l("BackIn",function(n){return n*n*((this._p1+1)*n-this._p1)}),l("BackInOut",function(n){return(n*=2)<1?.5*n*n*((this._p2+1)*n-this._p2):.5*((n-=2)*n*((this._p2+1)*n+this._p2)+2)})),o=r("easing.SlowMo",function(n,t,i){t=t||0===t?t:.7;null==n?n=.7:n>1&&(n=1);this._p=1!==n?t:0;this._p1=(1-n)/2;this._p2=n;this._p3=this._p1+this._p2;this._calcEnd=i===!0},!0),i=o.prototype=new n;return i.constructor=o,i.getRatio=function(n){var t=n+(.5-n)*this._p;return n<this._p1?this._calcEnd?1-(n=1-n/this._p1)*n:t-(n=1-n/this._p1)*n*n*n*t:n>this._p3?this._calcEnd?1-(n=(n-this._p3)/this._p1)*n:t+(n-t)*(n=(n-this._p3)/this._p1)*n*n*n:this._calcEnd?1:t},o.ease=new o(.7,.7),i.config=o.config=function(n,t,i){return new o(n,t,i)},f=r("easing.SteppedEase",function(n){n=n||1;this._p1=1/n;this._p2=n+1},!0),i=f.prototype=new n,i.constructor=f,i.getRatio=function(n){return 0>n?n=0:n>=1&&(n=.999999999),(this._p2*n>>0)*this._p1},i.config=f.config=function(n){return new f(n)},u=r("easing.RoughEase",function(t){t=t||{};for(var i,r,u,f,h,e,l=t.taper||"none",a=[],w=0,v=0|(t.points||20),o=v,y=t.randomize!==!1,b=t.clamp===!0,p=t.template instanceof n?t.template:null,s="number"==typeof t.strength?.4*t.strength:.4;--o>-1;)i=y?Math.random():1/v*o,r=p?p.getRatio(i):i,"none"===l?u=s:"out"===l?(f=1-i,u=f*f*s):"in"===l?u=i*i*s:.5>i?(f=2*i,u=f*f*.5*s):(f=2*(1-i),u=f*f*.5*s),y?r+=Math.random()*u-.5*u:o%2?r+=.5*u:r-=.5*u,b&&(r>1?r=1:0>r&&(r=0)),a[w++]={x:i,y:r};for(a.sort(function(n,t){return n.x-t.x}),e=new c(1,1,null),o=v;--o>-1;)h=a[o],e=new c(h.x,h.y,e);this._prev=new c(0,0,0!==e.t?e:e.next)},!0),i=u.prototype=new n,i.constructor=u,i.getRatio=function(n){var t=this._prev;if(n>t.t){for(;t.next&&n>=t.t;)t=t.next;t=t.prev}else for(;t.prev&&n<=t.t;)t=t.prev;return this._prev=t,t.v+(n-t.t)/t.gap*t.c},i.config=function(n){return new u(n)},u.ease=new u,e("Bounce",t("BounceOut",function(n){return 1/2.75>n?7.5625*n*n:2/2.75>n?7.5625*(n-=1.5/2.75)*n+.75:2.5/2.75>n?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375}),t("BounceIn",function(n){return(n=1-n)<1/2.75?1-7.5625*n*n:2/2.75>n?1-(7.5625*(n-=1.5/2.75)*n+.75):2.5/2.75>n?1-(7.5625*(n-=2.25/2.75)*n+.9375):1-(7.5625*(n-=2.625/2.75)*n+.984375)}),t("BounceInOut",function(n){var t=.5>n;return n=t?1-2*n:2*n-1,n=1/2.75>n?7.5625*n*n:2/2.75>n?7.5625*(n-=1.5/2.75)*n+.75:2.5/2.75>n?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375,t?.5*(1-n):.5*n+.5})),e("Circ",t("CircOut",function(n){return Math.sqrt(1-(n-=1)*n)}),t("CircIn",function(n){return-(Math.sqrt(1-n*n)-1)}),t("CircInOut",function(n){return(n*=2)<1?-.5*(Math.sqrt(1-n*n)-1):.5*(Math.sqrt(1-(n-=2)*n)+1)})),s=function(t,i,u){var f=r("easing."+t,function(n,t){this._p1=n>=1?n:1;this._p2=(t||u)/(1>n?n:1);this._p3=this._p2/v*(Math.asin(1/this._p1)||0);this._p2=v/this._p2},!0),e=f.prototype=new n;return e.constructor=f,e.getRatio=i,e.config=function(n,t){return new f(n,t)},f},e("Elastic",s("ElasticOut",function(n){return this._p1*Math.pow(2,-10*n)*Math.sin((n-this._p3)*this._p2)+1},.3),s("ElasticIn",function(n){return-(this._p1*Math.pow(2,10*(n-=1))*Math.sin((n-this._p3)*this._p2))},.3),s("ElasticInOut",function(n){return(n*=2)<1?-.5*this._p1*Math.pow(2,10*(n-=1))*Math.sin((n-this._p3)*this._p2):this._p1*Math.pow(2,-10*(n-=1))*Math.sin((n-this._p3)*this._p2)*.5+1},.45)),e("Expo",t("ExpoOut",function(n){return 1-Math.pow(2,-10*n)}),t("ExpoIn",function(n){return Math.pow(2,10*(n-1))-.001}),t("ExpoInOut",function(n){return(n*=2)<1?.5*Math.pow(2,10*(n-1)):.5*(2-Math.pow(2,-10*(n-1)))})),e("Sine",t("SineOut",function(n){return Math.sin(n*y)}),t("SineIn",function(n){return-Math.cos(n*y)+1}),t("SineInOut",function(n){return-.5*(Math.cos(Math.PI*n)-1)})),r("easing.EaseLookup",{find:function(t){return n.map[t]}},!0),h(a.SlowMo,"SlowMo","ease,"),h(u,"RoughEase","ease,"),h(f,"SteppedEase","ease,"),w},!0)});_gsScope._gsDefine&&_gsScope._gsQueue.pop()(),function(n,t){"use strict";var g={},ut=n.document,ht=n.GreenSockGlobals=n.GreenSockGlobals||n,at,o,yt,ot,c;if(!ht.TweenLite){var s,f,i,u,h,gt=function(n){for(var r=n.split("."),i=ht,t=0;t<r.length;t++)i[r[t]]=i=i[r[t]]||{};return i},y=gt("com.greensock"),e=1e-10,ni=function(n){for(var i=[],r=n.length,t=0;t!==r;i.push(n[t++]));return i},ti=function(){},nt=function(){var n=Object.prototype.toString,t=n.call([]);return function(i){return null!=i&&(i instanceof Array||"object"==typeof i&&!!i.push&&n.call(i)===t)}}(),tt={},ii=function(i,r,u,f){this.sc=tt[i]?tt[i].sc:[];tt[i]=this;this.gsClass=null;this.func=u;var e=[];this.check=function(o){for(var l,a,c,h,v,s=r.length,y=s;--s>-1;)(l=tt[r[s]]||new ii(r[s],[])).gsClass?(e[s]=l.gsClass,y--):o&&l.sc.push(this);if(0===y&&u){if(a=("com.greensock."+i).split("."),c=a.pop(),h=gt(a.join("."))[c]=this.gsClass=u.apply(u,e),f)if(ht[c]=g[c]=h,v="undefined"!=typeof module&&module.exports,!v&&"function"==typeof define&&define.amd)define((n.GreenSockAMDPath?n.GreenSockAMDPath+"/":"")+i.split(".").pop(),[],function(){return h});else if(v)if(i===t){module.exports=g[t]=h;for(s in g)h[s]=g[s]}else g[t]&&(g[t][c]=h);for(s=0;s<this.sc.length;s++)this.sc[s].check()}};this.check(!0)},ct=n._gsDefine=function(n,t,i,r){return new ii(n,t,i,r)},l=y._class=function(n,t,i){return t=t||function(){},ct(n,[],function(){return t},i),t};ct.globals=ht;var ri=[0,0,1,1],a=l("easing.Ease",function(n,t,i,r){this._func=n;this._type=i||0;this._power=r||0;this._params=t?ri.concat(t):ri},!0),ft=a.map={},lt=a.register=function(n,t,i,r){for(var o,u,e,f,s=t.split(","),h=s.length,c=(i||"easeIn,easeOut,easeInOut").split(",");--h>-1;)for(u=s[h],o=r?l("easing."+u,null,!0):y.easing[u]||{},e=c.length;--e>-1;)f=c[e],ft[u+"."+f]=ft[f+u]=o[f]=n.getRatio?n:n[f]||new n};for(i=a.prototype,i._calcEnd=!1,i.getRatio=function(n){if(this._func)return this._params[0]=n,this._func.apply(null,this._params);var i=this._type,r=this._power,t=1===i?1-n:2===i?n:.5>n?2*n:2*(1-n);return 1===r?t*=t:2===r?t*=t*t:3===r?t*=t*t*t:4===r&&(t*=t*t*t*t),1===i?1-t:2===i?t:.5>n?t/2:1-t/2},s=["Linear","Quad","Cubic","Quart","Quint,Strong"],f=s.length;--f>-1;)i=s[f]+",Power"+f,lt(new a(null,null,1,f),i,"easeOut",!0),lt(new a(null,null,2,f),i,"easeIn"+(0===f?",easeNone":"")),lt(new a(null,null,3,f),i,"easeInOut");ft.linear=y.easing.Linear.easeIn;ft.swing=y.easing.Quad.easeInOut;at=l("events.EventDispatcher",function(n){this._listeners={};this._eventTarget=n||this});i=at.prototype;i.addEventListener=function(n,t,i,r,f){f=f||0;var s,o,e=this._listeners[n],c=0;for(this!==u||h||u.wake(),null==e&&(this._listeners[n]=e=[]),o=e.length;--o>-1;)s=e[o],s.c===t&&s.s===i?e.splice(o,1):0===c&&s.pr<f&&(c=o+1);e.splice(c,0,{c:t,s:i,up:r,pr:f})};i.removeEventListener=function(n,t){var i,r=this._listeners[n];if(r)for(i=r.length;--i>-1;)if(r[i].c===t)return void r.splice(i,1)};i.dispatchEvent=function(n){var r,u,t,i=this._listeners[n];if(i)for(r=i.length,r>1&&(i=i.slice(0)),u=this._eventTarget;--r>-1;)t=i[r],t&&(t.up?t.c.call(t.s||u,{type:n,target:u}):t.c.call(t.s||u))};var et=n.requestAnimationFrame,vt=n.cancelAnimationFrame,it=Date.now||function(){return(new Date).getTime()},w=it();for(s=["ms","moz","webkit","o"],f=s.length;--f>-1&&!et;)et=n[s[f]+"RequestAnimationFrame"],vt=n[s[f]+"CancelAnimationFrame"]||n[s[f]+"CancelRequestAnimationFrame"];l("Ticker",function(n,t){var r,a,f,s,c,i=this,v=it(),o=t!==!1&&et?"auto":!1,l=500,p=33,b="tick",y=function(n){var t,e,u=it()-w;u>l&&(v+=u-p);w+=u;i.time=(w-v)/1e3;t=i.time-c;(!r||t>0||n===!0)&&(i.frame++,c+=t+(t>=s?.004:s-t),e=!0);n!==!0&&(f=a(y));e&&i.dispatchEvent(b)};at.call(i);i.time=i.frame=0;i.tick=function(){y(!0)};i.lagSmoothing=function(n,t){l=n||1/e;p=Math.min(t,l,0)};i.sleep=function(){null!=f&&(o&&vt?vt(f):clearTimeout(f),a=ti,f=null,i===u&&(h=!1))};i.wake=function(n){null!==f?i.sleep():n?v+=-w+(w=it()):i.frame>10&&(w=it()-l+5);a=0===r?ti:o&&et?et:function(n){return setTimeout(n,1e3*(c-i.time)+1|0)};i===u&&(h=!0);y(2)};i.fps=function(n){return arguments.length?(r=n,s=1/(r||60),c=this.time+s,void i.wake()):r};i.useRAF=function(n){return arguments.length?(i.sleep(),o=n,void i.fps(r)):o};i.fps(n);setTimeout(function(){"auto"===o&&i.frame<5&&"hidden"!==ut.visibilityState&&i.useRAF(!1)},1500)});i=y.Ticker.prototype=new y.events.EventDispatcher;i.constructor=y.Ticker;o=l("core.Animation",function(n,t){if(this.vars=t=t||{},this._duration=this._totalDuration=n||0,this._delay=Number(t.delay)||0,this._timeScale=1,this._active=t.immediateRender===!0,this.data=t.data,this._reversed=t.reversed===!0,p){h||u.wake();var i=this.vars.useFrames?d:p;i.add(this,i._time);this.vars.paused&&this.paused(!0)}});u=o.ticker=new y.Ticker;i=o.prototype;i._dirty=i._gc=i._initted=i._paused=!1;i._totalTime=i._time=0;i._rawPrevTime=-1;i._next=i._last=i._onUpdate=i._timeline=i.timeline=null;i._paused=!1;yt=function(){h&&it()-w>2e3&&u.wake();setTimeout(yt,2e3)};yt();i.play=function(n,t){return null!=n&&this.seek(n,t),this.reversed(!1).paused(!1)};i.pause=function(n,t){return null!=n&&this.seek(n,t),this.paused(!0)};i.resume=function(n,t){return null!=n&&this.seek(n,t),this.paused(!1)};i.seek=function(n,t){return this.totalTime(Number(n),t!==!1)};i.restart=function(n,t){return this.reversed(!1).paused(!1).totalTime(n?-this._delay:0,t!==!1,!0)};i.reverse=function(n,t){return null!=n&&this.seek(n||this.totalDuration(),t),this.reversed(!0).paused(!1)};i.render=function(){};i.invalidate=function(){return this._time=this._totalTime=0,this._initted=this._gc=!1,this._rawPrevTime=-1,(this._gc||!this.timeline)&&this._enabled(!0),this};i.isActive=function(){var t,n=this._timeline,i=this._startTime;return!n||!this._gc&&!this._paused&&n.isActive()&&(t=n.rawTime(!0))>=i&&t<i+this.totalDuration()/this._timeScale};i._enabled=function(n,t){return h||u.wake(),this._gc=!n,this._active=this.isActive(),t!==!0&&(n&&!this.timeline?this._timeline.add(this,this._startTime-this._delay):!n&&this.timeline&&this._timeline._remove(this,!0)),!1};i._kill=function(){return this._enabled(!1,!1)};i.kill=function(n,t){return this._kill(n,t),this};i._uncache=function(n){for(var t=n?this:this.timeline;t;)t._dirty=!0,t=t.timeline;return this};i._swapSelfInParams=function(n){for(var t=n.length,i=n.concat();--t>-1;)"{self}"===n[t]&&(i[t]=this);return i};i._callback=function(n){var i=this.vars,r=i[n],t=i[n+"Params"],u=i[n+"Scope"]||i.callbackScope||this,f=t?t.length:0;switch(f){case 0:r.call(u);break;case 1:r.call(u,t[0]);break;case 2:r.call(u,t[0],t[1]);break;default:r.apply(u,t)}};i.eventCallback=function(n,t,i,r){if("on"===(n||"").substr(0,2)){var u=this.vars;if(1===arguments.length)return u[n];null==t?delete u[n]:(u[n]=t,u[n+"Params"]=nt(i)&&-1!==i.join("").indexOf("{self}")?this._swapSelfInParams(i):i,u[n+"Scope"]=r);"onUpdate"===n&&(this._onUpdate=t)}return this};i.delay=function(n){return arguments.length?(this._timeline.smoothChildTiming&&this.startTime(this._startTime+n-this._delay),this._delay=n,this):this._delay};i.duration=function(n){return arguments.length?(this._duration=this._totalDuration=n,this._uncache(!0),this._timeline.smoothChildTiming&&this._time>0&&this._time<this._duration&&0!==n&&this.totalTime(this._totalTime*(n/this._duration),!0),this):(this._dirty=!1,this._duration)};i.totalDuration=function(n){return this._dirty=!1,arguments.length?this.duration(n):this._totalDuration};i.time=function(n,t){return arguments.length?(this._dirty&&this.totalDuration(),this.totalTime(n>this._duration?this._duration:n,t)):this._time};i.totalTime=function(n,t,i){if(h||u.wake(),!arguments.length)return this._totalTime;if(this._timeline){if(0>n&&!i&&(n+=this.totalDuration()),this._timeline.smoothChildTiming){this._dirty&&this.totalDuration();var f=this._totalDuration,r=this._timeline;if(n>f&&!i&&(n=f),this._startTime=(this._paused?this._pauseTime:r._time)-(this._reversed?f-n:n)/this._timeScale,r._dirty||this._uncache(!1),r._timeline)for(;r._timeline;)r._timeline._time!==(r._startTime+r._totalTime)/r._timeScale&&r.totalTime(r._totalTime,!0),r=r._timeline}this._gc&&this._enabled(!0,!1);(this._totalTime!==n||0===this._duration)&&(v.length&&rt(),this.render(n,t,!1),v.length&&rt())}return this};i.progress=i.totalProgress=function(n,t){var i=this.duration();return arguments.length?this.totalTime(i*n,t):i?this._time/i:this.ratio};i.startTime=function(n){return arguments.length?(n!==this._startTime&&(this._startTime=n,this.timeline&&this.timeline._sortChildren&&this.timeline.add(this,n-this._delay)),this):this._startTime};i.endTime=function(n){return this._startTime+(0!=n?this.totalDuration():this.duration())/this._timeScale};i.timeScale=function(n){if(!arguments.length)return this._timeScale;if(n=n||e,this._timeline&&this._timeline.smoothChildTiming){var t=this._pauseTime,i=t||0===t?t:this._timeline.totalTime();this._startTime=i-(i-this._startTime)*this._timeScale/n}return this._timeScale=n,this._uncache(!1)};i.reversed=function(n){return arguments.length?(n!=this._reversed&&(this._reversed=n,this.totalTime(this._timeline&&!this._timeline.smoothChildTiming?this.totalDuration()-this._totalTime:this._totalTime,!0)),this):this._reversed};i.paused=function(n){if(!arguments.length)return this._paused;var t,r,i=this._timeline;return n!=this._paused&&i&&(h||n||u.wake(),t=i.rawTime(),r=t-this._pauseTime,!n&&i.smoothChildTiming&&(this._startTime+=r,this._uncache(!1)),this._pauseTime=n?t:null,this._paused=n,this._active=this.isActive(),!n&&0!==r&&this._initted&&this.duration()&&(t=i.smoothChildTiming?this._totalTime:(t-this._startTime)/this._timeScale,this.render(t,t===this._totalTime,!0))),this._gc&&!n&&this._enabled(!0,!1),this};ot=l("core.SimpleTimeline",function(n){o.call(this,0,n);this.autoRemoveChildren=this.smoothChildTiming=!0});i=ot.prototype=new o;i.constructor=ot;i.kill()._gc=!1;i._first=i._last=i._recent=null;i._sortChildren=!1;i.add=i.insert=function(n,t){var i,r;if(n._startTime=Number(t||0)+n._delay,n._paused&&this!==n._timeline&&(n._pauseTime=n._startTime+(this.rawTime()-n._startTime)/n._timeScale),n.timeline&&n.timeline._remove(n,!0),n.timeline=n._timeline=this,n._gc&&n._enabled(!0,!0),i=this._last,this._sortChildren)for(r=n._startTime;i&&i._startTime>r;)i=i._prev;return i?(n._next=i._next,i._next=n):(n._next=this._first,this._first=n),n._next?n._next._prev=n:this._last=n,n._prev=i,this._recent=n,this._timeline&&this._uncache(!0),this};i._remove=function(n,t){return n.timeline===this&&(t||n._enabled(!1,!0),n._prev?n._prev._next=n._next:this._first===n&&(this._first=n._next),n._next?n._next._prev=n._prev:this._last===n&&(this._last=n._prev),n._next=n._prev=n.timeline=null,n===this._recent&&(this._recent=this._last),this._timeline&&this._uncache(!0)),this};i.render=function(n,t,i){var u,r=this._first;for(this._totalTime=this._time=this._rawPrevTime=n;r;)u=r._next,(r._active||n>=r._startTime&&!r._paused)&&(r._reversed?r.render((r._dirty?r.totalDuration():r._totalDuration)-(n-r._startTime)*r._timeScale,t,i):r.render((n-r._startTime)*r._timeScale,t,i)),r=u};i.rawTime=function(){return h||u.wake(),this._totalTime};var r=l("TweenLite",function(t,i,u){if(o.call(this,i,u),this.render=r.prototype.render,null==t)throw"Cannot tween a null target.";this.target=t="string"!=typeof t?t:r.selector(t)||t;var s,f,h,l=t.jquery||t.length&&t!==n&&t[0]&&(t[0]===n||t[0].nodeType&&t[0].style&&!t.nodeType),c=this.vars.overwrite;if(this._overwrite=c=null==c?si[r.defaultOverwrite]:"number"==typeof c?c>>0:si[c],(l||t instanceof Array||t.push&&nt(t))&&"number"!=typeof t[0])for(this._targets=h=ni(t),this._propLookup=[],this._siblings=[],s=0;s<h.length;s++)f=h[s],f?"string"!=typeof f?f.length&&f!==n&&f[0]&&(f[0]===n||f[0].nodeType&&f[0].style&&!f.nodeType)?(h.splice(s--,1),this._targets=h=h.concat(ni(f))):(this._siblings[s]=st(f,this,!1),1===c&&this._siblings[s].length>1&&dt(f,this,null,1,this._siblings[s])):(f=h[s--]=r.selector(f),"string"==typeof f&&h.splice(s+1,1)):h.splice(s--,1);else this._propLookup={},this._siblings=st(t,this,!1),1===c&&this._siblings.length>1&&dt(t,this,null,1,this._siblings);(this.vars.immediateRender||0===i&&0===this._delay&&this.vars.immediateRender!==!1)&&(this._time=-e,this.render(Math.min(0,-this._delay)))},!0),pt=function(t){return t&&t.length&&t!==n&&t[0]&&(t[0]===n||t[0].nodeType&&t[0].style&&!t.nodeType)},ai=function(n,t){var i,r={};for(i in n)kt[i]||i in t&&"transform"!==i&&"x"!==i&&"y"!==i&&"width"!==i&&"height"!==i&&"className"!==i&&"border"!==i||!(!b[i]||b[i]&&b[i]._autoCSS)||(r[i]=n[i],delete n[i]);n.css=r};i=r.prototype=new o;i.constructor=r;i.kill()._gc=!1;i.ratio=0;i._firstPT=i._targets=i._overwrittenProps=i._startAt=null;i._notifyPluginsOfEnabled=i._lazy=!1;r.version="1.19.1";r.defaultEase=i._ease=new a(null,null,1,1);r.defaultOverwrite="auto";r.ticker=u;r.autoSleep=120;r.lagSmoothing=function(n,t){u.lagSmoothing(n,t)};r.selector=n.$||n.jQuery||function(t){var i=n.$||n.jQuery;return i?(r.selector=i,i(t)):"undefined"==typeof ut?t:ut.querySelectorAll?ut.querySelectorAll(t):ut.getElementById("#"===t.charAt(0)?t.substr(1):t)};var v=[],wt={},ui=/(?:(-|-=|\+=)?\d*\.?\d*(?:e[\-+]?\d+)?)[0-9]/gi,fi=function(n){for(var i,t=this._firstPT,r=1e-6;t;)i=t.blob?1===n?this.end:n?this.join(""):this.start:t.c*n+t.s,t.m?i=t.m(i,this._target||t.t):r>i&&i>-r&&!t.blob&&(i=0),t.f?t.fp?t.t[t.p](t.fp,i):t.t[t.p](i):t.t[t.p]=i,t=t._next},ei=function(n,t,i,r){var l,v,a,e,y,c,f,u=[],s=0,o="",h=0;for(u.start=n,u.end=t,n=u[0]=n+"",t=u[1]=t+"",i&&(i(u),n=u[0],t=u[1]),u.length=0,l=n.match(ui)||[],v=t.match(ui)||[],r&&(r._next=null,r.blob=1,u._firstPT=u._applyPT=r),y=v.length,e=0;y>e;e++)f=v[e],c=t.substr(s,t.indexOf(f,s)-s),o+=c||!e?c:",",s+=c.length,h?h=(h+1)%5:"rgba("===c.substr(-5)&&(h=1),f===l[e]||l.length<=e?o+=f:(o&&(u.push(o),o=""),a=parseFloat(l[e]),u.push(a),u._firstPT={_next:u._firstPT,t:u,p:u.length-1,s:a,c:("="===f.charAt(1)?parseInt(f.charAt(0)+"1",10)*parseFloat(f.substr(2)):parseFloat(f)-a)||0,f:0,m:h&&4>h?Math.round:0}),s+=f.length;return o+=t.substr(s),o&&u.push(o),u.setRatio=fi,u},oi=function(n,t,i,u,f,e,o,s,h){"function"==typeof u&&(u=u(h||0,n));var y,p=typeof n[t],v="function"!==p?"":t.indexOf("set")||"function"!=typeof n["get"+t.substr(3)]?t:"get"+t.substr(3),l="get"!==i?i:v?o?n[v](o):n[v]():n[t],a="string"==typeof u&&"="===u.charAt(1),c={t:n,p:t,s:l,f:"function"===p,pg:0,n:f||t,m:e?"function"==typeof e?e:Math.round:0,pr:0,c:a?parseInt(u.charAt(0)+"1",10)*parseFloat(u.substr(2)):parseFloat(u)-l||0};return("number"!=typeof l||"number"!=typeof u&&!a)&&(o||isNaN(l)||!a&&isNaN(u)||"boolean"==typeof l||"boolean"==typeof u?(c.fp=o,y=ei(l,a?c.s+c.c:u,s||r.defaultStringFilter,c),c={t:y,p:"setRatio",s:0,c:1,f:2,pg:0,n:f||t,pr:0,m:0}):(c.s=parseFloat(l),a||(c.c=parseFloat(u)-c.s||0))),c.c?((c._next=this._firstPT)&&(c._next._prev=c),this._firstPT=c,c):void 0},bt=r._internals={isArray:nt,isSelector:pt,lazyTweens:v,blobDif:ei},b=r._plugins={},k=bt.tweenLookup={},vi=0,kt=bt.reservedProps={ease:1,delay:1,overwrite:1,onComplete:1,onCompleteParams:1,onCompleteScope:1,useFrames:1,runBackwards:1,startAt:1,onUpdate:1,onUpdateParams:1,onUpdateScope:1,onStart:1,onStartParams:1,onStartScope:1,onReverseComplete:1,onReverseCompleteParams:1,onReverseCompleteScope:1,onRepeat:1,onRepeatParams:1,onRepeatScope:1,easeParams:1,yoyo:1,immediateRender:1,repeat:1,repeatDelay:1,data:1,paused:1,reversed:1,autoCSS:1,lazy:1,onOverwrite:1,callbackScope:1,stringFilter:1,id:1},si={none:0,all:1,auto:2,concurrent:3,allOnStart:4,preexisting:5,"true":1,"false":0},d=o._rootFramesTimeline=new ot,p=o._rootTimeline=new ot,hi=30,rt=bt.lazyRender=function(){var n,t=v.length;for(wt={};--t>-1;)n=v[t],n&&n._lazy!==!1&&(n.render(n._lazy[0],n._lazy[1],!0),n._lazy=!1);v.length=0};p._startTime=u.time;d._startTime=u.frame;p._active=d._active=!0;setTimeout(rt,1);o._updateRoot=r.render=function(){var i,t,n;if(v.length&&rt(),p.render((u.time-p._startTime)*p._timeScale,!1,!1),d.render((u.frame-d._startTime)*d._timeScale,!1,!1),v.length&&rt(),u.frame>=hi){hi=u.frame+(parseInt(r.autoSleep,10)||120);for(n in k){for(t=k[n].tweens,i=t.length;--i>-1;)t[i]._gc&&t.splice(i,1);0===t.length&&delete k[n]}if(n=p._first,(!n||n._paused)&&r.autoSleep&&!d._first&&1===u._listeners.tick.length){for(;n&&n._paused;)n=n._next;n||u.sleep()}}};u.addEventListener("tick",o._updateRoot);var st=function(n,t,i){var r,f,u=n._gsTweenID;if(k[u||(n._gsTweenID=u="t"+vi++)]||(k[u]={target:n,tweens:[]}),t&&(r=k[u].tweens,r[f=r.length]=t,i))for(;--f>-1;)r[f]===t&&r.splice(f,1);return k[u].tweens},ci=function(n,t,i,u){var e,o,f=n.vars.onOverwrite;return f&&(e=f(n,t,i,u)),f=r.onOverwrite,f&&(o=f(n,t,i,u)),e!==!1&&o!==!1},dt=function(n,t,i,r,u){var o,s,f,y;if(1===r||r>=4){for(y=u.length,o=0;y>o;o++)if((f=u[o])!==t)f._gc||f._kill(null,n,t)&&(s=!0);else if(5===r)break;return s}var h,c=t._startTime+e,l=[],a=0,v=0===t._duration;for(o=u.length;--o>-1;)(f=u[o])===t||f._gc||f._paused||(f._timeline!==t._timeline?(h=h||li(t,0,v),0===li(f,h,v)&&(l[a++]=f)):f._startTime<=c&&f._startTime+f.totalDuration()/f._timeScale>c&&((v||!f._initted)&&c-f._startTime<=2e-10||(l[a++]=f)));for(o=a;--o>-1;)if(f=l[o],2===r&&f._kill(i,n,t)&&(s=!0),2!==r||!f._firstPT&&f._initted){if(2!==r&&!ci(f,t))continue;f._enabled(!1,!1)&&(s=!0)}return s},li=function(n,t,i){for(var u=n._timeline,f=u._timeScale,r=n._startTime;u._timeline;){if(r+=u._startTime,f*=u._timeScale,u._paused)return-100;u=u._timeline}return r/=f,r>t?r-t:i&&r===t||!n._initted&&2*e>r-t?e:(r+=n.totalDuration()/n._timeScale/f)>t+e?0:r-t-e};if(i._init=function(){var u,h,n,f,e,c,t=this.vars,s=this._overwrittenProps,l=this._duration,o=!!t.immediateRender,i=t.ease;if(t.startAt){this._startAt&&(this._startAt.render(-1,!0),this._startAt.kill());e={};for(f in t.startAt)e[f]=t.startAt[f];if(e.overwrite=!1,e.immediateRender=!0,e.lazy=o&&t.lazy!==!1,e.startAt=e.delay=null,this._startAt=r.to(this.target,0,e),o)if(this._time>0)this._startAt=null;else if(0!==l)return}else if(t.runBackwards&&0!==l)if(this._startAt)this._startAt.render(-1,!0),this._startAt.kill(),this._startAt=null;else{0!==this._time&&(o=!1);n={};for(f in t)kt[f]&&"autoCSS"!==f||(n[f]=t[f]);if(n.overwrite=0,n.data="isFromStart",n.lazy=o&&t.lazy!==!1,n.immediateRender=o,this._startAt=r.to(this.target,0,n),o){if(0===this._time)return}else this._startAt._init(),this._startAt._enabled(!1),this.vars.immediateRender&&(this._startAt=null)}if(this._ease=i=i?i instanceof a?i:"function"==typeof i?new a(i,t.easeParams):ft[i]||r.defaultEase:r.defaultEase,t.easeParams instanceof Array&&i.config&&(this._ease=i.config.apply(i,t.easeParams)),this._easeType=this._ease._type,this._easePower=this._ease._power,this._firstPT=null,this._targets)for(c=this._targets.length,u=0;c>u;u++)this._initProps(this._targets[u],this._propLookup[u]={},this._siblings[u],s?s[u]:null,u)&&(h=!0);else h=this._initProps(this.target,this._propLookup,this._siblings,s,0);if(h&&r._onPluginEvent("_onInitAllProps",this),s&&(this._firstPT||"function"!=typeof this.target&&this._enabled(!1,!1)),t.runBackwards)for(n=this._firstPT;n;)n.s+=n.c,n.c=-n.c,n=n._next;this._onUpdate=t.onUpdate;this._initted=!0},i._initProps=function(t,i,r,u,f){var e,c,l,o,h,s;if(null==t)return!1;wt[t._gsTweenID]&&rt();this.vars.css||t.style&&t!==n&&t.nodeType&&b.css&&this.vars.autoCSS!==!1&&ai(this.vars,t);for(e in this.vars)if(s=this.vars[e],kt[e])s&&(s instanceof Array||s.push&&nt(s))&&-1!==s.join("").indexOf("{self}")&&(this.vars[e]=s=this._swapSelfInParams(s,this));else if(b[e]&&(o=new b[e])._onInitTween(t,this.vars[e],this,f)){for(this._firstPT=h={_next:this._firstPT,t:o,p:"setRatio",s:0,c:1,f:1,n:e,pg:1,pr:o._priority,m:0},c=o._overwriteProps.length;--c>-1;)i[o._overwriteProps[c]]=this._firstPT;(o._priority||o._onInitAllProps)&&(l=!0);(o._onDisable||o._onEnable)&&(this._notifyPluginsOfEnabled=!0);h._next&&(h._next._prev=h)}else i[e]=oi.call(this,t,e,"get",s,e,0,null,this.vars.stringFilter,f);return u&&this._kill(u,t)?this._initProps(t,i,r,u,f):this._overwrite>1&&this._firstPT&&r.length>1&&dt(t,this,i,this._overwrite,r)?(this._kill(i,t),this._initProps(t,i,r,u,f)):(this._firstPT&&(this.vars.lazy!==!1&&this._duration||this.vars.lazy&&!this._duration)&&(wt[t._gsTweenID]=!0),l)},i.render=function(n,t,i){var h,s,u,y,c=this._time,f=this._duration,o=this._rawPrevTime;if(n>=f-1e-7&&n>=0)this._totalTime=this._time=f,this.ratio=this._ease._calcEnd?this._ease.getRatio(1):1,this._reversed||(h=!0,s="onComplete",i=i||this._timeline.autoRemoveChildren),0===f&&(this._initted||!this.vars.lazy||i)&&(this._startTime===this._timeline._duration&&(n=0),(0>o||0>=n&&n>=-1e-7||o===e&&"isPause"!==this.data)&&o!==n&&(i=!0,o>e&&(s="onReverseComplete")),this._rawPrevTime=y=!t||n||o===n?n:e);else if(1e-7>n)this._totalTime=this._time=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0,(0!==c||0===f&&o>0)&&(s="onReverseComplete",h=this._reversed),0>n&&(this._active=!1,0===f&&(this._initted||!this.vars.lazy||i)&&(o>=0&&(o!==e||"isPause"!==this.data)&&(i=!0),this._rawPrevTime=y=!t||n||o===n?n:e)),this._initted||(i=!0);else if(this._totalTime=this._time=n,this._easeType){var r=n/f,l=this._easeType,a=this._easePower;(1===l||3===l&&r>=.5)&&(r=1-r);3===l&&(r*=2);1===a?r*=r:2===a?r*=r*r:3===a?r*=r*r*r:4===a&&(r*=r*r*r*r);this.ratio=1===l?1-r:2===l?r:.5>n/f?r/2:1-r/2}else this.ratio=this._ease.getRatio(n/f);if(this._time!==c||i){if(!this._initted){if(this._init(),!this._initted||this._gc)return;if(!i&&this._firstPT&&(this.vars.lazy!==!1&&this._duration||this.vars.lazy&&!this._duration))return this._time=this._totalTime=c,this._rawPrevTime=o,v.push(this),void(this._lazy=[n,t]);this._time&&!h?this.ratio=this._ease.getRatio(this._time/f):h&&this._ease._calcEnd&&(this.ratio=this._ease.getRatio(0===this._time?0:1))}for(this._lazy!==!1&&(this._lazy=!1),this._active||!this._paused&&this._time!==c&&n>=0&&(this._active=!0),0===c&&(this._startAt&&(n>=0?this._startAt.render(n,t,i):s||(s="_dummyGS")),this.vars.onStart&&(0!==this._time||0===f)&&(t||this._callback("onStart"))),u=this._firstPT;u;)u.f?u.t[u.p](u.c*this.ratio+u.s):u.t[u.p]=u.c*this.ratio+u.s,u=u._next;this._onUpdate&&(0>n&&this._startAt&&n!==-.0001&&this._startAt.render(n,t,i),t||(this._time!==c||h||i)&&this._callback("onUpdate"));s&&(!this._gc||i)&&(0>n&&this._startAt&&!this._onUpdate&&n!==-.0001&&this._startAt.render(n,t,i),h&&(this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!t&&this.vars[s]&&this._callback(s),0===f&&this._rawPrevTime===e&&y!==e&&(this._rawPrevTime=0))}},i._kill=function(n,t,i){if("all"===n&&(n=null),null==n&&(null==t||t===this.target))return this._lazy=!1,this._enabled(!1,!1);t="string"!=typeof t?t||this._targets||this.target:r.selector(t)||t;var f,s,o,u,e,c,l,a,h,v=i&&this._time&&i._startTime===this._startTime&&this._timeline===i._timeline;if((nt(t)||pt(t))&&"number"!=typeof t[0])for(f=t.length;--f>-1;)this._kill(n,t[f],i)&&(c=!0);else{if(this._targets){for(f=this._targets.length;--f>-1;)if(t===this._targets[f]){e=this._propLookup[f]||{};this._overwrittenProps=this._overwrittenProps||[];s=this._overwrittenProps[f]=n?this._overwrittenProps[f]||{}:"all";break}}else{if(t!==this.target)return!1;e=this._propLookup;s=this._overwrittenProps=n?this._overwrittenProps||{}:"all"}if(e){if(l=n||e,a=n!==s&&"all"!==s&&n!==e&&("object"!=typeof n||!n._tempKill),i&&(r.onOverwrite||this.vars.onOverwrite)){for(o in l)e[o]&&(h||(h=[]),h.push(o));if((h||!n)&&!ci(this,i,t,h))return!1}for(o in l)(u=e[o])&&(v&&(u.f?u.t[u.p](u.s):u.t[u.p]=u.s,c=!0),u.pg&&u.t._kill(l)&&(c=!0),u.pg&&0!==u.t._overwriteProps.length||(u._prev?u._prev._next=u._next:u===this._firstPT&&(this._firstPT=u._next),u._next&&(u._next._prev=u._prev),u._next=u._prev=null),delete e[o]),a&&(s[o]=1);!this._firstPT&&this._initted&&this._enabled(!1,!1)}}return c},i.invalidate=function(){return this._notifyPluginsOfEnabled&&r._onPluginEvent("_onDisable",this),this._firstPT=this._overwrittenProps=this._startAt=this._onUpdate=null,this._notifyPluginsOfEnabled=this._active=this._lazy=!1,this._propLookup=this._targets?{}:[],o.prototype.invalidate.call(this),this.vars.immediateRender&&(this._time=-e,this.render(Math.min(0,-this._delay))),this},i._enabled=function(n,t){if(h||u.wake(),n&&this._gc){var i,f=this._targets;if(f)for(i=f.length;--i>-1;)this._siblings[i]=st(f[i],this,!0);else this._siblings=st(this.target,this,!0)}return o.prototype._enabled.call(this,n,t),this._notifyPluginsOfEnabled&&this._firstPT?r._onPluginEvent(n?"_onEnable":"_onDisable",this):!1},r.to=function(n,t,i){return new r(n,t,i)},r.from=function(n,t,i){return i.runBackwards=!0,i.immediateRender=0!=i.immediateRender,new r(n,t,i)},r.fromTo=function(n,t,i,u){return u.startAt=i,u.immediateRender=0!=u.immediateRender&&0!=i.immediateRender,new r(n,t,u)},r.delayedCall=function(n,t,i,u,f){return new r(t,0,{delay:n,onComplete:t,onCompleteParams:i,callbackScope:u,onReverseComplete:t,onReverseCompleteParams:i,immediateRender:!1,lazy:!1,useFrames:f,overwrite:0})},r.set=function(n,t){return new r(n,0,t)},r.getTweensOf=function(n,t){if(null==n)return[];n="string"!=typeof n?n:r.selector(n)||n;var i,u,f,e;if((nt(n)||pt(n))&&"number"!=typeof n[0]){for(i=n.length,u=[];--i>-1;)u=u.concat(r.getTweensOf(n[i],t));for(i=u.length;--i>-1;)for(e=u[i],f=i;--f>-1;)e===u[f]&&u.splice(i,1)}else for(u=st(n).concat(),i=u.length;--i>-1;)(u[i]._gc||t&&!u[i].isActive())&&u.splice(i,1);return u},r.killTweensOf=r.killDelayedCallsTo=function(n,t,i){"object"==typeof t&&(i=t,t=!1);for(var u=r.getTweensOf(n,t),f=u.length;--f>-1;)u[f]._kill(i,n)},c=l("plugins.TweenPlugin",function(n,t){this._overwriteProps=(n||"").split(",");this._propName=this._overwriteProps[0];this._priority=t||0;this._super=c.prototype},!0),i=c.prototype,c.version="1.19.0",c.API=2,i._firstPT=null,i._addTween=oi,i.setRatio=fi,i._kill=function(n){var i,r=this._overwriteProps,t=this._firstPT;if(null!=n[this._propName])this._overwriteProps=[];else for(i=r.length;--i>-1;)null!=n[r[i]]&&r.splice(i,1);for(;t;)null!=n[t.n]&&(t._next&&(t._next._prev=t._prev),t._prev?(t._prev._next=t._next,t._prev=null):this._firstPT===t&&(this._firstPT=t._next)),t=t._next;return!1},i._mod=i._roundProps=function(n){for(var i,t=this._firstPT;t;)i=n[this._propName]||null!=t.n&&n[t.n.split(this._propName+"_").join("")],i&&"function"==typeof i&&(2===t.f?t.t._applyPT.m=i:t.m=i),t=t._next},r._onPluginEvent=function(n,t){var f,r,u,e,o,i=t._firstPT;if("_onInitAllProps"===n){for(;i;){for(o=i._next,r=u;r&&r.pr>i.pr;)r=r._next;(i._prev=r?r._prev:e)?i._prev._next=i:u=i;(i._next=r)?r._prev=i:e=i;i=o}i=t._firstPT=u}for(;i;)i.pg&&"function"==typeof i.t[n]&&i.t[n]()&&(f=!0),i=i._next;return f},c.activate=function(n){for(var t=n.length;--t>-1;)n[t].API===c.API&&(b[(new n[t])._propName]=n[t]);return!0},ct.plugin=function(n){if(!(n&&n.propName&&n.init&&n.API))throw"illegal plugin definition.";var i,r=n.propName,e=n.priority||0,o=n.overwriteProps,u={init:"_onInitTween",set:"setRatio",kill:"_kill",round:"_mod",mod:"_mod",initAll:"_onInitAllProps"},t=l("plugins."+r.charAt(0).toUpperCase()+r.substr(1)+"Plugin",function(){c.call(this,r,e);this._overwriteProps=o||[]},n.global===!0),f=t.prototype=new c(r);f.constructor=t;t.API=n.API;for(i in u)"function"==typeof n[i]&&(f[u[i]]=n[i]);return t.version=n.version,c.activate([t]),t},s=n._gsQueue){for(f=0;f<s.length;f++)s[f]();for(i in tt)tt[i].func||n.console.log("GSAP encountered missing dependency: "+i)}h=!1}}("undefined"!=typeof module&&module.exports&&"undefined"!=typeof global?global:this||window,"TweenMax"),function(){function ri(){n.keyboardSupport&&c("keydown",ot)}function k(){var i,o,a,l;if(!b&&document.body){b=!0;var t=document.body,e=document.documentElement,f=window.innerHeight,v=t.scrollHeight;r=document.compatMode.indexOf("CSS")>=0?e:t;u=t;ri();top!=self?s=!0:vi&&v>f&&(t.offsetHeight<=f||e.offsetHeight<=f)&&(i=document.createElement("div"),i.style.cssText="position:absolute; z-index:-10000; top:0; left:0; right:0; height:"+r.scrollHeight+"px",document.body.appendChild(i),h=function(){o||(o=setTimeout(function(){ut||(i.style.height="0",i.style.height=r.scrollHeight+"px",o=null)},500))},setTimeout(h,10),c("resize",h),a={attributes:!0,childList:!0,characterData:!1},w=new si(h),w.observe(t,a),r.offsetHeight<=f&&(l=document.createElement("div"),l.style.clear="both",t.appendChild(l)));n.fixedBackground||ut||(t.style.backgroundAttachment="scroll",e.style.backgroundAttachment="scroll")}}function ui(){w&&w.disconnect();l(v,et);l("mousedown",st);l("keydown",ot);l("resize",h);l("load",k)}function ft(t,i,r){var s,f,u,h,e;(fi(i,r),n.accelerationMax!=1&&(s=Date.now(),f=s-g,f<n.accelerationDelta&&(u=(1+50/f)/2,u>1&&(u=Math.min(u,n.accelerationMax),i*=u,r*=u)),g=Date.now()),o.push({x:i,y:r,lastX:i<0?.99:-.99,lastY:r<0?.99:-.99,start:Date.now()}),d)||(h=t===document.body,e=function(){for(var w=Date.now(),s=0,c=0,a,v,f=0;f<o.length;f++){var u=o[f],y=w-u.start,p=y>=n.animationTime,l=p?1:y/n.animationTime;n.pulseAlgorithm&&(l=ci(l));a=u.x*l-u.lastX>>0;v=u.y*l-u.lastY>>0;s+=a;c+=v;u.lastX+=a;u.lastY+=v;p&&(o.splice(f,1),f--)}h?window.scrollBy(s,c):(s&&(t.scrollLeft+=s),c&&(t.scrollTop+=c));i||r||(o=[]);o.length?kt(e,t,1e3/n.frameRate+1):d=!1},kt(e,t,0),d=!0)}function et(t){var e,r,i,o;if((b||k(),e=t.target,t.defaultPrevented||t.ctrlKey)||f(u,"embed")||f(e,"embed")&&/\.pdf/i.test(e.src)||f(u,"object")||e.shadowRoot)return!0;if(r=-t.wheelDeltaX||t.deltaX||0,i=-t.wheelDeltaY||t.deltaY||0,ti&&(t.wheelDeltaX&&a(t.wheelDeltaX,120)&&(r=-120*(t.wheelDeltaX/Math.abs(t.wheelDeltaX))),t.wheelDeltaY&&a(t.wheelDeltaY,120)&&(i=-120*(t.wheelDeltaY/Math.abs(t.wheelDeltaY)))),r||i||(i=-t.wheelDelta||0),t.deltaMode===1&&(r*=40,i*=40),o=at(e),!o)return s&&it?(Object.defineProperty(t,"target",{value:window.frameElement}),parent.wheel(t)):!0;if(ei(i))return!0;Math.abs(r)>1.2&&(r*=n.stepSize/120);Math.abs(i)>1.2&&(i*=n.stepSize/120);ft(o,r,i);t.preventDefault();lt()}function ot(i){var r=i.target,w=i.ctrlKey||i.altKey||i.metaKey||i.shiftKey&&i.keyCode!==t.spacebar,v,c,h,p,a;if((document.body.contains(u)||(u=document.activeElement),v=/^(textarea|select|embed|object)$/i,c=/^(button|submit|radio|checkbox|file|color|image)$/i,i.defaultPrevented||v.test(r.nodeName)||f(r,"input")&&!c.test(r.type)||f(u,"video")||oi(i)||r.isContentEditable||w)||(f(r,"button")||f(r,"input")&&c.test(r.type))&&i.keyCode===t.spacebar||f(r,"input")&&r.type=="radio"&&ii[i.keyCode])return!0;var y,l=0,e=0,o=at(u);if(!o)return s&&it?parent.keydown(i):!0;h=o.clientHeight;o==document.body&&(h=window.innerHeight);switch(i.keyCode){case t.up:e=-n.arrowScroll;break;case t.down:e=n.arrowScroll;break;case t.spacebar:y=i.shiftKey?1:-1;e=-y*h*.9;break;case t.pageup:e=-h*.9;break;case t.pagedown:e=h*.9;break;case t.home:e=-o.scrollTop;break;case t.end:p=o.scrollHeight-o.scrollTop;a=p-h;e=a>0?a+10:0;break;case t.left:l=-n.arrowScroll;break;case t.right:l=n.arrowScroll;break;default:return!0}ft(o,l,e);i.preventDefault();lt()}function st(n){u=n.target}function lt(){clearTimeout(ct);ct=setInterval(function(){nt={}},1e3)}function tt(n,t){for(var i=n.length;i--;)nt[ht(n[i])]=t;return t}function at(n){var t=[],e=document.body,o=r.scrollHeight,i,u,f;do{if(i=nt[ht(n)],i)return tt(t,i);if(t.push(n),o===n.scrollHeight){if(u=yt(r)&&yt(e),f=u||pt(r),s&&vt(r)||!s&&f)return tt(t,hi())}else if(vt(n)&&pt(n))return tt(t,n)}while(n=n.parentElement)}function vt(n){return n.clientHeight+10<n.scrollHeight}function yt(n){var t=getComputedStyle(n,"").getPropertyValue("overflow-y");return t!=="hidden"}function pt(n){var t=getComputedStyle(n,"").getPropertyValue("overflow-y");return t==="scroll"||t==="auto"}function c(n,t){window.addEventListener(n,t,!1)}function l(n,t){window.removeEventListener(n,t,!1)}function f(n,t){return(n.nodeName||"").toLowerCase()===t.toLowerCase()}function fi(n,t){n=n>0?1:-1;t=t>0?1:-1;(p.x!==n||p.y!==t)&&(p.x=n,p.y=t,o=[],g=0)}function ei(n){if(n)return i.length||(i=[n,n,n]),n=Math.abs(n),i.push(n),i.shift(),clearTimeout(wt),wt=setTimeout(function(){try{localStorage.SS_deltaBuffer=i.join(",")}catch(n){}},1e3),!bt(120)&&!bt(100)}function a(n,t){return Math.floor(n/t)==n/t}function bt(n){return a(i[0],n)&&a(i[1],n)&&a(i[2],n)}function oi(n){var t=n.target,i=!1;if(document.URL.indexOf("www.youtube.com/watch")!=-1)do if(i=t.classList&&t.classList.contains("html5-video-controls"),i)break;while(t=t.parentNode);return i}function dt(t){var i,r,u;return t=t*n.pulseScale,t<1?i=t-(1-Math.exp(-t)):(r=Math.exp(-1),t-=1,u=1-Math.exp(-t),i=r+u*(1-r)),i*n.pulseNormalize}function ci(t){return t>=1?1:t<=0?0:(n.pulseNormalize==1&&(n.pulseNormalize/=dt(1)),dt(t))}function y(t){for(var i in t)rt.hasOwnProperty(i)&&(n[i]=t[i])}var rt={frameRate:150,animationTime:500,stepSize:60,pulseAlgorithm:!0,pulseScale:4,pulseNormalize:1,accelerationDelta:50,accelerationMax:3,keyboardSupport:!0,arrowScroll:50,fixedBackground:!0,excluded:""},n=rt,ut=!1,s=!1,p={x:0,y:0},b=!1,r=document.documentElement,u,w,h,i=[],ti=/^Mac/.test(navigator.platform),t={left:37,up:38,right:39,down:40,spacebar:32,pageup:33,pagedown:34,end:35,home:36},ii={37:1,38:1,39:1,40:1},o=[],d=!1,g=Date.now(),ht=function(){var n=0;return function(t){return t.uniqueID||(t.uniqueID=n++)}}(),nt={},ct,wt;if(window.localStorage&&localStorage.SS_deltaBuffer)try{i=localStorage.SS_deltaBuffer.split(",")}catch(pi){}var kt=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(n,t,i){window.setTimeout(n,i||1e3/60)}}(),si=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver,hi=function(){var n;return function(){var t,i,r;return n||(t=document.createElement("div"),t.style.cssText="height:10000px;width:1px;",document.body.appendChild(t),i=document.body.scrollTop,r=document.documentElement.scrollTop,window.scrollBy(0,3),n=document.body.scrollTop!=i?document.body:document.documentElement,window.scrollBy(0,-3),document.body.removeChild(t)),n}}();var e=window.navigator.userAgent,gt=/Edge/.test(e),it=/chrome/i.test(e)&&!gt,ni=/safari/i.test(e)&&!gt,li=/mobile/i.test(e),ai=/Windows NT 6.1/i.test(e)&&/rv:11/i.test(e),vi=ni&&(/Version\/8/i.test(e)||/Version\/9/i.test(e)),yi=(it||ni||ai)&&!li,v;"onwheel"in document.createElement("div")?v="wheel":"onmousewheel"in document.createElement("div")&&(v="mousewheel");v&&yi&&(c(v,et),c("mousedown",st),c("load",k));y.destroy=ui;window.SmoothScrollOptions&&y(window.SmoothScrollOptions);typeof define=="function"&&define.amd?define(function(){return y}):"object"==typeof exports?module.exports=y:window.SmoothScroll=y}();!function(){"use strict";function n(r){if(!r)throw new Error("No options passed to Waypoint constructor");if(!r.element)throw new Error("No element option passed to Waypoint constructor");if(!r.handler)throw new Error("No handler option passed to Waypoint constructor");this.key="waypoint-"+i;this.options=n.Adapter.extend({},n.defaults,r);this.element=this.options.element;this.adapter=new n.Adapter(this.element);this.callback=r.handler;this.axis=this.options.horizontal?"horizontal":"vertical";this.enabled=this.options.enabled;this.triggerPoint=null;this.group=n.Group.findOrCreate({name:this.options.group,axis:this.axis});this.context=n.Context.findOrCreateByElement(this.options.context);n.offsetAliases[this.options.offset]&&(this.options.offset=n.offsetAliases[this.options.offset]);this.group.add(this);this.context.add(this);t[this.key]=this;i+=1}var i=0,t={};n.prototype.queueTrigger=function(n){this.group.queueTrigger(this,n)};n.prototype.trigger=function(n){this.enabled&&this.callback&&this.callback.apply(this,n)};n.prototype.destroy=function(){this.context.remove(this);this.group.remove(this);delete t[this.key]};n.prototype.disable=function(){return this.enabled=!1,this};n.prototype.enable=function(){return this.context.refresh(),this.enabled=!0,this};n.prototype.next=function(){return this.group.next(this)};n.prototype.previous=function(){return this.group.previous(this)};n.invokeAll=function(n){var r=[],u,i,f;for(u in t)r.push(t[u]);for(i=0,f=r.length;f>i;i++)r[i][n]()};n.destroyAll=function(){n.invokeAll("destroy")};n.disableAll=function(){n.invokeAll("disable")};n.enableAll=function(){n.Context.refreshAll();for(var i in t)t[i].enabled=!0;return this};n.refreshAll=function(){n.Context.refreshAll()};n.viewportHeight=function(){return window.innerHeight||document.documentElement.clientHeight};n.viewportWidth=function(){return document.documentElement.clientWidth};n.adapters=[];n.defaults={context:window,continuous:!0,enabled:!0,group:"default",horizontal:!1,offset:0};n.offsetAliases={"bottom-in-view":function(){return this.context.innerHeight()-this.adapter.outerHeight()},"right-in-view":function(){return this.context.innerWidth()-this.adapter.outerWidth()}};window.Waypoint=n}(),function(){"use strict";function f(n){window.setTimeout(n,1e3/60)}function n(u){this.element=u;this.Adapter=t.Adapter;this.adapter=new this.Adapter(u);this.key="waypoint-context-"+r;this.didScroll=!1;this.didResize=!1;this.oldScroll={x:this.adapter.scrollLeft(),y:this.adapter.scrollTop()};this.waypoints={vertical:{},horizontal:{}};u.waypointContextKey=this.key;i[u.waypointContextKey]=this;r+=1;t.windowContext||(t.windowContext=!0,t.windowContext=new n(window));this.createThrottledScrollHandler();this.createThrottledResizeHandler()}var r=0,i={},t=window.Waypoint,u=window.onload;n.prototype.add=function(n){var t=n.options.horizontal?"horizontal":"vertical";this.waypoints[t][n.key]=n;this.refresh()};n.prototype.checkEmpty=function(){var n=this.Adapter.isEmptyObject(this.waypoints.horizontal),t=this.Adapter.isEmptyObject(this.waypoints.vertical),r=this.element==this.element.window;n&&t&&!r&&(this.adapter.off(".waypoints"),delete i[this.key])};n.prototype.createThrottledResizeHandler=function(){function i(){n.handleResize();n.didResize=!1}var n=this;this.adapter.on("resize.waypoints",function(){n.didResize||(n.didResize=!0,t.requestAnimationFrame(i))})};n.prototype.createThrottledScrollHandler=function(){function i(){n.handleScroll();n.didScroll=!1}var n=this;this.adapter.on("scroll.waypoints",function(){(!n.didScroll||t.isTouch)&&(n.didScroll=!0,t.requestAnimationFrame(i))})};n.prototype.handleResize=function(){t.Context.refreshAll()};n.prototype.handleScroll=function(){var u={},i={horizontal:{newScroll:this.adapter.scrollLeft(),oldScroll:this.oldScroll.x,forward:"right",backward:"left"},vertical:{newScroll:this.adapter.scrollTop(),oldScroll:this.oldScroll.y,forward:"down",backward:"up"}},r,f,n,s;for(r in i){var t=i[r],h=t.newScroll>t.oldScroll,c=h?t.forward:t.backward;for(f in this.waypoints[r])if(n=this.waypoints[r][f],null!==n.triggerPoint){var e=t.oldScroll<n.triggerPoint,o=t.newScroll>=n.triggerPoint,l=e&&o,a=!e&&!o;(l||a)&&(n.queueTrigger(c),u[n.group.id]=n.group)}}for(s in u)u[s].flushTriggers();this.oldScroll={x:i.horizontal.newScroll,y:i.vertical.newScroll}};n.prototype.innerHeight=function(){return this.element==this.element.window?t.viewportHeight():this.adapter.innerHeight()};n.prototype.remove=function(n){delete this.waypoints[n.axis][n.key];this.checkEmpty()};n.prototype.innerWidth=function(){return this.element==this.element.window?t.viewportWidth():this.adapter.innerWidth()};n.prototype.destroy=function(){var t=[],i,r,n,u;for(i in this.waypoints)for(r in this.waypoints[i])t.push(this.waypoints[i][r]);for(n=0,u=t.length;u>n;n++)t[n].destroy()};n.prototype.refresh=function(){var o,u=this.element==this.element.window,l=u?void 0:this.adapter.offset(),f={},e,i,a;this.handleScroll();o={horizontal:{contextOffset:u?0:l.left,contextScroll:u?0:this.oldScroll.x,contextDimension:this.innerWidth(),oldScroll:this.oldScroll.x,forward:"right",backward:"left",offsetProp:"left"},vertical:{contextOffset:u?0:l.top,contextScroll:u?0:this.oldScroll.y,contextDimension:this.innerHeight(),oldScroll:this.oldScroll.y,forward:"down",backward:"up",offsetProp:"top"}};for(e in o){i=o[e];for(a in this.waypoints[e]){var v,s,h,y,p,n=this.waypoints[e][a],r=n.options.offset,w=n.triggerPoint,b=0,c=null==w;n.element!==n.element.window&&(b=n.adapter.offset()[i.offsetProp]);"function"==typeof r?r=r.apply(n):"string"==typeof r&&(r=parseFloat(r),n.options.offset.indexOf("%")>-1&&(r=Math.ceil(i.contextDimension*r/100)));v=i.contextScroll-i.contextOffset;n.triggerPoint=Math.floor(b+v-r);s=w<i.oldScroll;h=n.triggerPoint>=i.oldScroll;y=s&&h;p=!s&&!h;!c&&y?(n.queueTrigger(i.backward),f[n.group.id]=n.group):!c&&p?(n.queueTrigger(i.forward),f[n.group.id]=n.group):c&&i.oldScroll>=n.triggerPoint&&(n.queueTrigger(i.forward),f[n.group.id]=n.group)}}return t.requestAnimationFrame(function(){for(var n in f)f[n].flushTriggers()}),this};n.findOrCreateByElement=function(t){return n.findByElement(t)||new n(t)};n.refreshAll=function(){for(var n in i)i[n].refresh()};n.findByElement=function(n){return i[n.waypointContextKey]};window.onload=function(){u&&u();n.refreshAll()};t.requestAnimationFrame=function(n){var t=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||f;t.call(window,n)};t.Context=n}(),function(){"use strict";function i(n,t){return n.triggerPoint-t.triggerPoint}function u(n,t){return t.triggerPoint-n.triggerPoint}function n(n){this.name=n.name;this.axis=n.axis;this.id=this.name+"-"+this.axis;this.waypoints=[];this.clearTriggerQueues();r[this.axis][this.name]=this}var r={vertical:{},horizontal:{}},t=window.Waypoint;n.prototype.add=function(n){this.waypoints.push(n)};n.prototype.clearTriggerQueues=function(){this.triggerQueues={up:[],down:[],left:[],right:[]}};n.prototype.flushTriggers=function(){var n,t,e,r,o,f;for(n in this.triggerQueues)for(t=this.triggerQueues[n],e="up"===n||"left"===n,t.sort(e?u:i),r=0,o=t.length;o>r;r+=1)f=t[r],(f.options.continuous||r===t.length-1)&&f.trigger([n]);this.clearTriggerQueues()};n.prototype.next=function(n){this.waypoints.sort(i);var r=t.Adapter.inArray(n,this.waypoints),u=r===this.waypoints.length-1;return u?null:this.waypoints[r+1]};n.prototype.previous=function(n){this.waypoints.sort(i);var r=t.Adapter.inArray(n,this.waypoints);return r?this.waypoints[r-1]:null};n.prototype.queueTrigger=function(n,t){this.triggerQueues[t].push(n)};n.prototype.remove=function(n){var i=t.Adapter.inArray(n,this.waypoints);i>-1&&this.waypoints.splice(i,1)};n.prototype.first=function(){return this.waypoints[0]};n.prototype.last=function(){return this.waypoints[this.waypoints.length-1]};n.findOrCreate=function(t){return r[t.axis][t.name]||new n(t)};t.Group=n}(),function(){"use strict";function n(n){this.$element=t(n)}var t=window.jQuery,i=window.Waypoint;t.each(["innerHeight","innerWidth","off","offset","on","outerHeight","outerWidth","scrollLeft","scrollTop"],function(t,i){n.prototype[i]=function(){var n=Array.prototype.slice.call(arguments);return this.$element[i].apply(this.$element,n)}});t.each(["extend","inArray","isEmptyObject"],function(i,r){n[r]=t[r]});i.adapters.push({name:"jquery",Adapter:n});i.Adapter=n}(),function(){"use strict";function n(n){return function(){var r=[],i=arguments[0];return n.isFunction(arguments[0])&&(i=n.extend({},arguments[1]),i.handler=arguments[0]),this.each(function(){var u=n.extend({},i,{element:this});"string"==typeof u.context&&(u.context=n(this).closest(u.context)[0]);r.push(new t(u))}),r}}var t=window.Waypoint;window.jQuery&&(window.jQuery.fn.waypoint=n(window.jQuery));window.Zepto&&(window.Zepto.fn.waypoint=n(window.Zepto))}();!function(){"use strict";function t(){}function n(t){this.options=i.Adapter.extend({},n.defaults,t);this.axis=this.options.horizontal?"horizontal":"vertical";this.waypoints=[];this.element=this.options.element;this.createWaypoints()}var i=window.Waypoint;n.prototype.createWaypoints=function(){for(var i,t={vertical:[{down:"enter",up:"exited",offset:"100%"},{down:"entered",up:"exit",offset:"bottom-in-view"},{down:"exit",up:"entered",offset:0},{down:"exited",up:"enter",offset:function(){return-this.adapter.outerHeight()}}],horizontal:[{right:"enter",left:"exited",offset:"100%"},{right:"entered",left:"exit",offset:"right-in-view"},{right:"exit",left:"entered",offset:0},{right:"exited",left:"enter",offset:function(){return-this.adapter.outerWidth()}}]},n=0,r=t[this.axis].length;r>n;n++)i=t[this.axis][n],this.createWaypoint(i)};n.prototype.createWaypoint=function(n){var t=this;this.waypoints.push(new i({context:this.options.context,element:this.options.element,enabled:this.options.enabled,handler:function(n){return function(i){t.options[n[i]].call(t,i)}}(n),offset:n.offset,horizontal:this.options.horizontal}))};n.prototype.destroy=function(){for(var n=0,t=this.waypoints.length;t>n;n++)this.waypoints[n].destroy();this.waypoints=[]};n.prototype.disable=function(){for(var n=0,t=this.waypoints.length;t>n;n++)this.waypoints[n].disable()};n.prototype.enable=function(){for(var n=0,t=this.waypoints.length;t>n;n++)this.waypoints[n].enable()};n.defaults={context:window,enabled:!0,enter:t,entered:t,exit:t,exited:t};i.Inview=n}();!function(){"use strict";function n(t,r){function s(n,t){return function(){return n.apply(t,arguments)}}var o;if(r=r||{},this.trackingClick=!1,this.trackingClickStart=0,this.targetElement=null,this.touchStartX=0,this.touchStartY=0,this.lastTouchIdentifier=0,this.touchBoundary=r.touchBoundary||10,this.layer=t,this.tapDelay=r.tapDelay||200,this.tapTimeout=r.tapTimeout||700,!n.notNeeded(t)){for(var f=["onMouse","onClick","onTouchStart","onTouchMove","onTouchEnd","onTouchCancel"],e=this,u=0,h=f.length;h>u;u++)e[f[u]]=s(e[f[u]],e);i&&(t.addEventListener("mouseover",this.onMouse,!0),t.addEventListener("mousedown",this.onMouse,!0),t.addEventListener("mouseup",this.onMouse,!0));t.addEventListener("click",this.onClick,!0);t.addEventListener("touchstart",this.onTouchStart,!1);t.addEventListener("touchmove",this.onTouchMove,!1);t.addEventListener("touchend",this.onTouchEnd,!1);t.addEventListener("touchcancel",this.onTouchCancel,!1);Event.prototype.stopImmediatePropagation||(t.removeEventListener=function(n,i,r){var u=Node.prototype.removeEventListener;"click"===n?u.call(t,n,i.hijacked||i,r):u.call(t,n,i,r)},t.addEventListener=function(n,i,r){var u=Node.prototype.addEventListener;"click"===n?u.call(t,n,i.hijacked||(i.hijacked=function(n){n.propagationStopped||i(n)}),r):u.call(t,n,i,r)});"function"==typeof t.onclick&&(o=t.onclick,t.addEventListener("click",function(n){o(n)},!1),t.onclick=null)}}var r=navigator.userAgent.indexOf("Windows Phone")>=0,i=navigator.userAgent.indexOf("Android")>0&&!r,t=/iP(ad|hone|od)/.test(navigator.userAgent)&&!r,u=t&&/OS 4_\d(_\d)?/.test(navigator.userAgent),f=t&&/OS [6-7]_\d/.test(navigator.userAgent),e=navigator.userAgent.indexOf("BB10")>0;n.prototype.needsClick=function(n){switch(n.nodeName.toLowerCase()){case"button":case"select":case"textarea":if(n.disabled)return!0;break;case"input":if(t&&"file"===n.type||n.disabled)return!0;break;case"label":case"iframe":case"video":return!0}return/\bneedsclick\b/.test(n.className)};n.prototype.needsFocus=function(n){switch(n.nodeName.toLowerCase()){case"textarea":return!0;case"select":return!i;case"input":switch(n.type){case"button":case"checkbox":case"file":case"image":case"radio":case"submit":return!1}return!n.disabled&&!n.readOnly;default:return/\bneedsfocus\b/.test(n.className)}};n.prototype.sendClick=function(n,t){var r,i;document.activeElement&&document.activeElement!==n&&document.activeElement.blur();i=t.changedTouches[0];r=document.createEvent("MouseEvents");r.initMouseEvent(this.determineEventType(n),!0,!0,window,1,i.screenX,i.screenY,i.clientX,i.clientY,!1,!1,!1,!1,0,null);r.forwardedTouchEvent=!0;n.dispatchEvent(r)};n.prototype.determineEventType=function(n){return i&&"select"===n.tagName.toLowerCase()?"mousedown":"click"};n.prototype.focus=function(n){var i;t&&n.setSelectionRange&&0!==n.type.indexOf("date")&&"time"!==n.type&&"month"!==n.type?(i=n.value.length,n.setSelectionRange(i,i)):n.focus()};n.prototype.updateScrollParent=function(n){var i,t;if(i=n.fastClickScrollParent,!i||!i.contains(n)){t=n;do{if(t.scrollHeight>t.offsetHeight){i=t;n.fastClickScrollParent=t;break}t=t.parentElement}while(t)}i&&(i.fastClickLastScrollTop=i.scrollTop)};n.prototype.getTargetElementFromEventTarget=function(n){return n.nodeType===Node.TEXT_NODE?n.parentNode:n};n.prototype.onTouchStart=function(n){var r,i,f;if(n.targetTouches.length>1)return!0;if(r=this.getTargetElementFromEventTarget(n.target),i=n.targetTouches[0],t){if(f=window.getSelection(),f.rangeCount&&!f.isCollapsed)return!0;if(!u){if(i.identifier&&i.identifier===this.lastTouchIdentifier)return n.preventDefault(),!1;this.lastTouchIdentifier=i.identifier;this.updateScrollParent(r)}}return this.trackingClick=!0,this.trackingClickStart=n.timeStamp,this.targetElement=r,this.touchStartX=i.pageX,this.touchStartY=i.pageY,n.timeStamp-this.lastClickTime<this.tapDelay&&n.preventDefault(),!0};n.prototype.touchHasMoved=function(n){var t=n.changedTouches[0],i=this.touchBoundary;return Math.abs(t.pageX-this.touchStartX)>i||Math.abs(t.pageY-this.touchStartY)>i?!0:!1};n.prototype.onTouchMove=function(n){return this.trackingClick?((this.targetElement!==this.getTargetElementFromEventTarget(n.target)||this.touchHasMoved(n))&&(this.trackingClick=!1,this.targetElement=null),!0):!0};n.prototype.findControl=function(n){return void 0!==n.control?n.control:n.htmlFor?document.getElementById(n.htmlFor):n.querySelector("button, input:not([type=hidden]), keygen, meter, output, progress, select, textarea")};n.prototype.onTouchEnd=function(n){var h,c,e,o,s,r=this.targetElement;if(!this.trackingClick)return!0;if(n.timeStamp-this.lastClickTime<this.tapDelay)return this.cancelNextClick=!0,!0;if(n.timeStamp-this.trackingClickStart>this.tapTimeout)return!0;if(this.cancelNextClick=!1,this.lastClickTime=n.timeStamp,c=this.trackingClickStart,this.trackingClick=!1,this.trackingClickStart=0,f&&(s=n.changedTouches[0],r=document.elementFromPoint(s.pageX-window.pageXOffset,s.pageY-window.pageYOffset)||r,r.fastClickScrollParent=this.targetElement.fastClickScrollParent),e=r.tagName.toLowerCase(),"label"===e){if(h=this.findControl(r)){if(this.focus(r),i)return!1;r=h}}else if(this.needsFocus(r))return n.timeStamp-c>100||t&&window.top!==window&&"input"===e?(this.targetElement=null,!1):(this.focus(r),this.sendClick(r,n),t&&"select"===e||(this.targetElement=null,n.preventDefault()),!1);return t&&!u&&(o=r.fastClickScrollParent,o&&o.fastClickLastScrollTop!==o.scrollTop)?!0:(this.needsClick(r)||(n.preventDefault(),this.sendClick(r,n)),!1)};n.prototype.onTouchCancel=function(){this.trackingClick=!1;this.targetElement=null};n.prototype.onMouse=function(n){return this.targetElement?n.forwardedTouchEvent?!0:n.cancelable&&(!this.needsClick(this.targetElement)||this.cancelNextClick)?(n.stopImmediatePropagation?n.stopImmediatePropagation():n.propagationStopped=!0,n.stopPropagation(),n.preventDefault(),!1):!0:!0};n.prototype.onClick=function(n){var t;return this.trackingClick?(this.targetElement=null,this.trackingClick=!1,!0):"submit"===n.target.type&&0===n.detail?!0:(t=this.onMouse(n),t||(this.targetElement=null),t)};n.prototype.destroy=function(){var n=this.layer;i&&(n.removeEventListener("mouseover",this.onMouse,!0),n.removeEventListener("mousedown",this.onMouse,!0),n.removeEventListener("mouseup",this.onMouse,!0));n.removeEventListener("click",this.onClick,!0);n.removeEventListener("touchstart",this.onTouchStart,!1);n.removeEventListener("touchmove",this.onTouchMove,!1);n.removeEventListener("touchend",this.onTouchEnd,!1);n.removeEventListener("touchcancel",this.onTouchCancel,!1)};n.notNeeded=function(n){var t,u,r,f;return"undefined"==typeof window.ontouchstart?!0:(u=+(/Chrome\/([0-9]+)/.exec(navigator.userAgent)||[,0])[1])&&(!i||(t=document.querySelector("meta[name=viewport]"))&&(-1!==t.content.indexOf("user-scalable=no")||u>31&&document.documentElement.scrollWidth<=window.outerWidth))?!0:e&&(r=navigator.userAgent.match(/Version\/([0-9]*)\.([0-9]*)/),r[1]>=10&&r[2]>=3&&(t=document.querySelector("meta[name=viewport]")))&&(-1!==t.content.indexOf("user-scalable=no")||document.documentElement.scrollWidth<=window.outerWidth)?!0:"none"===n.style.msTouchAction||"manipulation"===n.style.touchAction?!0:(f=+(/Firefox\/([0-9]+)/.exec(navigator.userAgent)||[,0])[1],f>=27&&(t=document.querySelector("meta[name=viewport]"),t&&(-1!==t.content.indexOf("user-scalable=no")||document.documentElement.scrollWidth<=window.outerWidth))?!0:"none"===n.style.touchAction||"manipulation"===n.style.touchAction?!0:!1)};n.attach=function(t,i){return new n(t,i)};"function"==typeof define&&"object"==typeof define.amd&&define.amd?define(function(){return n}):"undefined"!=typeof module&&module.exports?(module.exports=n.attach,module.exports.FastClick=n):window.FastClick=n}();_gsScope="undefined"!=typeof module&&module.exports&&"undefined"!=typeof global?global:this||window;(_gsScope._gsQueue||(_gsScope._gsQueue=[])).push(function(){"use strict";_gsScope._gsDefine("easing.CustomEase",["easing.Ease"],function(n){var e=/(?:(-|-=|\+=)?\d*\.?\d*(?:e[\-+]?\d+)?)[0-9]/gi,o=/[achlmqstvz]|(-?\d*\.?\d*(?:e[\-+]?\d+)?)[0-9]/gi,s=/[\+\-]?\d*\.?\d+e[\+\-]?\d+/gi,h=/[cLlsS]/g,u="CustomEase only accepts Cubic Bezier data.",i=function(n,t,r,u,f,e,o,s,h,c,l){var w,b=(n+r)/2,k=(t+u)/2,d=(r+f)/2,g=(u+e)/2,nt=(f+o)/2,tt=(e+s)/2,it=(b+d)/2,rt=(k+g)/2,ut=(d+nt)/2,ft=(g+tt)/2,y=(it+ut)/2,p=(rt+ft)/2,a=o-n,v=s-t,et=Math.abs((r-o)*v-(u-s)*a),ot=Math.abs((f-o)*v-(e-s)*a);return c||(c=[{x:n,y:t},{x:o,y:s}],l=1),c.splice(l||c.length-1,0,{x:y,y:p}),(et+ot)*(et+ot)>h*(a*a+v*v)&&(w=c.length,i(n,t,b,k,it,rt,y,p,h,c,l),i(y,p,ut,ft,nt,tt,o,s,h,c,l+1+(c.length-w))),c},c=function(n){for(var h,c,l,v,t,y,p,w,k,d,a=(n+"").replace(s,function(n){var t=+n;return.0001>t&&t>-.0001?0:t}).match(o)||[],b=[],f=0,e=0,g=a.length,i=2,r=0;g>r;r++)if(w=l,isNaN(a[r])?(l=a[r].toUpperCase(),v=l!==a[r]):r--,h=+a[r+1],c=+a[r+2],v&&(h+=f,c+=e),r||(y=h,p=c),"M"===l)t&&t.length<8&&(b.length-=1,i=0),f=y=h,e=p=c,t=[h,c],i=2,b.push(t),r+=2,l="L";else if("C"===l)t||(t=[0,0]),t[i++]=h,t[i++]=c,v||(f=e=0),t[i++]=f+1*a[r+3],t[i++]=e+1*a[r+4],t[i++]=f+=1*a[r+5],t[i++]=e+=1*a[r+6],r+=6;else if("S"===l)"C"===w||"S"===w?(k=f-t[i-4],d=e-t[i-3],t[i++]=f+k,t[i++]=e+d):(t[i++]=f,t[i++]=e),t[i++]=h,t[i++]=c,v||(f=e=0),t[i++]=f+=1*a[r+3],t[i++]=e+=1*a[r+4],r+=4;else{if("L"!==l&&"Z"!==l)throw u;"Z"===l&&(h=y,c=p,t.closed=!0);("L"===l||Math.abs(f-h)>.5||Math.abs(e-c)>.5)&&(t[i++]=f+(h-f)/3,t[i++]=e+(c-e)/3,t[i++]=f+2*(h-f)/3,t[i++]=e+2*(c-e)/3,t[i++]=h,t[i++]=c,"L"===l&&(r+=2));f=h;e=c}return b[0]},l=function(n){for(var r=n.length,i=999999999999,t=1;r>t;t+=6)+n[t]<i&&(i=+n[t]);return i},a=function(n,t,i){i||0===i||(i=Math.max(+n[n.length-1],+n[1]));for(var o=-1*+n[0],e=-i,u=n.length,s=1/(+n[u-2]+o),f=-t||(Math.abs(+n[u-1]-+n[1])<.01*(+n[u-2]-+n[0])?l(n)+e:+n[u-1]+e),f=f?1/f:-s,r=0;u>r;r+=2)n[r]=(+n[r]+o)*s,n[r+1]=(+n[r+1]+e)*f},f=function(n){var t=this.lookup[n*this.l|0]||this.lookup[this.l-1];return t.nx<n&&(t=t.n),t.y+(n-t.x)/t.cx*t.cy},t=function(t,i,r){this._calcEnd=!0;this.id=t;t&&(n.map[t]=this);this.getRatio=f;this.setData(i,r)},r=t.prototype=new n;return r.constructor=t,r.setData=function(n,t){n=n||"0,0,1,1";var l,y,w,r,b,k,o,s,d,g,v=n.match(e),p=1,f=[];if(t=t||{},g=t.precision||1,this.data=n,this.lookup=[],this.points=f,this.fast=1>=g,(h.test(n)||-1!==n.indexOf("M")&&-1===n.indexOf("C"))&&(v=c(n)),l=v.length,4===l)v.unshift(0,0),v.push(1,1),l=8;else if((l-2)%6)throw u;for((0!=+v[0]||1!=+v[l-2])&&a(v,t.height,t.originY),this.rawBezier=v,r=2;l>r;r+=6)y={x:+v[r-2],y:+v[r-1]},w={x:+v[r+4],y:+v[r+5]},f.push(y,w),i(y.x,y.y,+v[r],+v[r+1],+v[r+2],+v[r+3],w.x,w.y,1/(2e5*g),f,f.length-1);for(l=f.length,r=0;l>r;r++)o=f[r],s=f[r-1]||o,o.x>s.x||s.y!==o.y&&s.x===o.x||o===s?(s.cx=o.x-s.x,s.cy=o.y-s.y,s.n=o,s.nx=o.x,this.fast&&r>1&&Math.abs(s.cy/s.cx-f[r-2].cy/f[r-2].cx)>2&&(this.fast=!1),s.cx<p&&(s.cx?p=s.cx:(s.cx=.001,r===l-1&&(s.x-=.001,p=Math.min(p,.001),this.fast=!1)))):(f.splice(r--,1),l--);if(l=1/p+1|0,this.l=l,b=1/l,k=0,o=f[0],this.fast){for(r=0;l>r;r++)d=r*b,o.nx<d&&(o=f[++k]),y=o.y+(d-o.x)/o.cx*o.cy,this.lookup[r]={x:d,cx:b,y:y,cy:0,nx:9},r&&(this.lookup[r-1].cy=y-this.lookup[r-1].y);this.lookup[l-1].cy=f[f.length-1].y-y}else{for(r=0;l>r;r++)o.nx<r*b&&(o=f[++k]),this.lookup[r]=o;k<f.length-1&&(this.lookup[r-1]=f[f.length-2])}return this._calcEnd=1!==f[f.length-1].y||0!==f[0].y,this},r.getRatio=f,r.getSVGData=function(n){return t.getSVGData(this,n)},t.create=function(n,i,r){return new t(n,i,r)},t.version="0.2.1",t.bezierToPoints=i,t.get=function(t){return n.map[t]},t.getSVGData=function(t,i){i=i||{};var f,w,u,l,v,y,e,k,o,s,r=1e3,b=i.width||100,h=i.height||100,a=i.x||0,c=(i.y||0)+h,p=i.path;if(i.invert&&(h=-h,c=0),t=t.getRatio?t:n.map[t]||console.log("No ease found: ",t),t.rawBezier){for(f=[],e=t.rawBezier.length,u=0;e>u;u+=2)f.push(((a+t.rawBezier[u]*b)*r|0)/r+","+((c+t.rawBezier[u+1]*-h)*r|0)/r);f[0]="M"+f[0];f[1]="C"+f[1]}else for(f=["M"+a+","+c],e=Math.max(5,200*(i.precision||1)),l=1/e,e+=2,k=5/e,o=((a+l*b)*r|0)/r,s=((c+t.getRatio(l)*-h)*r|0)/r,w=(s-c)/(o-a),u=2;e>u;u++)v=((a+u*l*b)*r|0)/r,y=((c+t.getRatio(u*l)*-h)*r|0)/r,(Math.abs((y-s)/(v-o)-w)>k||u===e-1)&&(f.push(o+","+s),w=(y-s)/(v-o)),o=v,s=y;return p&&("string"==typeof p?document.querySelector(p):p).setAttribute("d",f.join(" ")),f.join(" ")},t},!0)});_gsScope._gsDefine&&_gsScope._gsQueue.pop()(),function(n){"use strict";var t=function(){return(_gsScope.GreenSockGlobals||_gsScope)[n]};"function"==typeof define&&define.amd?define(["TweenLite"],t):"undefined"!=typeof module&&module.exports&&(require("../TweenLite.js"),module.exports=t())}("CustomEase");_gsScope="undefined"!=typeof module&&module.exports&&"undefined"!=typeof global?global:this||window;(_gsScope._gsQueue||(_gsScope._gsQueue=[])).push(function(){"use strict";_gsScope._gsDefine("utils.Draggable",["events.EventDispatcher","TweenLite","plugins.CSSPlugin"],function(n,t,i){var pi,ti,a,g,ot,wi,ii,bi,ri,wr={css:{}},br={css:{}},kr={css:{}},dr={css:{}},ki=_gsScope._gsDefine.globals,ui={},gr={style:{}},r=_gsScope.document||{createElement:function(){return gr}},u=r.documentElement||{},fi=function(n){return r.createElementNS?r.createElementNS("http://www.w3.org/1999/xhtml",n):r.createElement(n)},l=fi("div"),nu=[],di=function(){return!1},gi=180/Math.PI,st=999999999999999,rt=Date.now||function(){return(new Date).getTime()},y=!(r.addEventListener||!r.all),nt=r.createElement("div"),d=[],ut={},tu=0,iu=/^(?:a|input|textarea|button|select)$/i,ht=0,ct=-1!==navigator.userAgent.toLowerCase().indexOf("android"),nr=0,v={},p={},ru=function(n){if("string"==typeof n&&(n=t.selector(n)),!n||n.nodeType)return[n];for(var r=[],u=n.length,i=0;i!==u;r.push(n[i++]));return r},tr=function(n,t){var i,r={};if(t)for(i in n)r[i]=n[i]*t;else for(i in n)r[i]=n[i];return r},ir=function(){for(var n=d.length;--n>-1;)d[n]()},uu=function(n){d.push(n);1===d.length&&t.ticker.addEventListener("tick",ir,this,!1,1)},rr=function(n){for(var i=d.length;--i>-1;)d[i]===n&&d.splice(i,1);t.to(ur,0,{overwrite:"all",delay:15,onComplete:ur})},ur=function(){d.length||t.ticker.removeEventListener("tick",ir)},fu=function(n,t){var i;for(i in t)void 0===n[i]&&(n[i]=t[i]);return n},lt=function(){return null!=window.pageYOffset?window.pageYOffset:null!=r.scrollTop?r.scrollTop:u.scrollTop||r.body.scrollTop||0},at=function(){return null!=window.pageXOffset?window.pageXOffset:null!=r.scrollLeft?r.scrollLeft:u.scrollLeft||r.body.scrollLeft||0},ei=function(n,t){h(n,"scroll",t);ft(n.parentNode)||ei(n.parentNode,t)},oi=function(n,t){f(n,"scroll",t);ft(n.parentNode)||oi(n.parentNode,t)},ft=function(n){return!(n&&n!==u&&n!==r&&n!==r.body&&n!==window&&n.nodeType&&n.parentNode)},fr=function(n,t){var i="x"===t?"Width":"Height",f="scroll"+i,e="client"+i,o=r.body;return Math.max(0,ft(n)?Math.max(u[f],o[f])-(window["inner"+i]||u[e]||o[e]):n[f]-n[e])},vt=function(n){var t=ft(n),i=fr(n,"x"),r=fr(n,"y");t?n=p:vt(n.parentNode);n._gsMaxScrollX=i;n._gsMaxScrollY=r;n._gsScrollX=n.scrollLeft||0;n._gsScrollY=n.scrollTop||0},si=function(n,t){return n=n||window.event,ui.pageX=n.clientX+r.body.scrollLeft+u.scrollLeft,ui.pageY=n.clientY+r.body.scrollTop+u.scrollTop,t&&(n.returnValue=!1),ui},w=function(n){return n?("string"==typeof n&&(n=t.selector(n)),n.length&&n!==window&&n[0]&&n[0].style&&!n.nodeType&&(n=n[0]),n===window||n.nodeType&&n.style?n:null):n},yt=function(n,t){var r,i,u,f=n.style;if(void 0===f[t]){for(u=["O","Moz","ms","Ms","Webkit"],i=5,r=t.charAt(0).toUpperCase()+t.substr(1);--i>-1&&void 0===f[u[i]+r];);if(0>i)return"";pi=3===i?"ms":u[i];t=pi+r}return t},b=function(n,t,i){var r=n.style;r&&(void 0===r[t]&&(t=yt(n,t)),null==i?r.removeProperty?r.removeProperty(t.replace(/([A-Z])/g,"-$1").toLowerCase()):r.removeAttribute(t):void 0!==r[t]&&(r[t]=i))},et=r.defaultView?r.defaultView.getComputedStyle:di,eu=/(?:Left|Right|Width)/i,ou=/(?:\d|\-|\+|=|#|\.)*/g,er=function(n,t,i,u,f){if("px"===u||!u)return i;if("auto"===u||!i)return 0;var o,s=eu.test(t),h=n,c=l.style,a=0>i;return a&&(i=-i),"%"===u&&-1!==t.indexOf("border")?o=i/100*(s?n.clientWidth:n.clientHeight):(c.cssText="border:0 solid red;position:"+e(n,"position",!0)+";line-height:0;","%"!==u&&h.appendChild?c[s?"borderLeftWidth":"borderTopWidth"]=i+u:(h=n.parentNode||r.body,c[s?"width":"height"]=i+u),h.appendChild(l),o=parseFloat(l[s?"offsetWidth":"offsetHeight"]),h.removeChild(l),0!==o||f||(o=er(n,t,i,u,!0))),a?-o:o},su=function(n,t){if("absolute"!==e(n,"position",!0))return 0;var i="left"===t?"Left":"Top",r=e(n,"margin"+i,!0);return n["offset"+i]-(er(n,t,parseFloat(r),(r+"").replace(ou,""))||0)},e=function(n,t,i){var u,r=(n._gsTransform||{})[t];return r||0===r?r:(n.style[t]?r=n.style[t]:(u=et(n))?(r=u.getPropertyValue(t.replace(/([A-Z])/g,"-$1").toLowerCase()),r=r||u.length?r:u[t]):n.currentStyle&&(r=n.currentStyle[t]),"auto"!==r||"top"!==t&&"left"!==t||(r=su(n,t)),i?r:parseFloat(r)||0)},o=function(n,t,i){var r=n.vars,u=r[i],f=n._listeners[t];"function"==typeof u&&u.apply(r[i+"Scope"]||r.callbackScope||n,r[i+"Params"]||[n.pointerEvent]);f&&n.dispatchEvent(t)},or=function(n,t){var i,r,u,f=w(n);return f?yu(f,t):void 0!==n.left?(u=tt(t),{left:n.left-u.x,top:n.top-u.y,width:n.width,height:n.height}):(r=n.min||n.minX||n.minRotation||0,i=n.min||n.minY||0,{left:r,top:i,width:(n.max||n.maxX||n.maxRotation||0)-r,height:(n.max||n.maxY||0)-i})},sr=function(){if(!r.createElementNS)return g=0,void(ot=!1);var i,o,f,l,t=fi("div"),n=r.createElementNS("http://www.w3.org/2000/svg","svg"),h=fi("div"),e=t.style,c=r.body||u;r.body&&s&&(e.position="absolute",c.appendChild(h),h.appendChild(t),l=t.offsetParent,h.style[s]="rotate(1deg)",bi=t.offsetParent===l,h.style.position="absolute",e.height="10px",l=t.offsetTop,h.style.border="5px solid red",ii=l!==t.offsetTop,c.removeChild(h));e=n.style;n.setAttributeNS(null,"width","400px");n.setAttributeNS(null,"height","400px");n.setAttributeNS(null,"viewBox","0 0 400 400");e.display="block";e.boxSizing="border-box";e.border="0px solid red";e.transform="none";t.style.cssText="width:100px;height:100px;overflow:scroll;-ms-overflow-style:none;";c.appendChild(t);t.appendChild(n);f=n.createSVGPoint().matrixTransform(n.getScreenCTM());o=f.y;t.scrollTop=100;f.x=f.y=0;f=f.matrixTransform(n.getScreenCTM());wi=o-f.y<100.1?0:o-f.y-150;t.removeChild(n);c.removeChild(t);c.appendChild(n);i=n.getScreenCTM();o=i.e;e.border="50px solid red";i=n.getScreenCTM();0===o&&0===i.e&&0===i.f&&1===i.a?(g=1,ot=!0):(g=o!==i.e?1:0,ot=1!==i.a);c.removeChild(n)},hu=""!==yt(l,"perspective"),hr=yt(l,"transformOrigin").replace(/^ms/g,"Ms").replace(/([A-Z])/g,"-$1").toLowerCase(),s=yt(l,"transform"),cu=s.replace(/^ms/g,"Ms").replace(/([A-Z])/g,"-$1").toLowerCase(),hi={},cr={},lu=window.SVGElement,ci=function(n){return!!(lu&&"function"==typeof n.getBBox&&n.getCTM&&(!n.parentNode||n.parentNode.getBBox&&n.parentNode.getCTM))},au=(/MSIE ([0-9]{1,}[\.0-9]{0,})/.exec(navigator.userAgent)||/Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/.exec(navigator.userAgent))&&parseFloat(RegExp.$1)<11,li=[],pt=[],wt=function(n){if(!n.getBoundingClientRect||!n.parentNode||!s)return{offsetTop:0,offsetLeft:0,scaleX:1,scaleY:1,offsetParent:u};if(c.cacheSVGData!==!1&&n._dCache&&n._dCache.lastUpdate===t.ticker.frame)return n._dCache;var a,y,v,o,l,w,p,h,d,nt,b,k,f=n,i=ai(n);if(i.lastUpdate=t.ticker.frame,n.getBBox&&!i.isSVGRoot){for(f=n.parentNode,a=n.getBBox();f&&"svg"!==(f.nodeName+"").toLowerCase();)f=f.parentNode;return o=wt(f),i.offsetTop=a.y*o.scaleY,i.offsetLeft=a.x*o.scaleX,i.scaleX=o.scaleX,i.scaleY=o.scaleY,i.offsetParent=f||u,i}for(v=i.offsetParent,v===r.body&&(v=u),pt.length=li.length=0;f&&(l=e(f,s,!0),"matrix(1, 0, 0, 1, 0, 0)"!==l&&"none"!==l&&"translate3d(0px, 0px, 0px)"!==l&&(pt.push(f),li.push(f.style[s]),f.style[s]="none"),f!==v);)f=f.parentNode;for(y=v.getBoundingClientRect(),l=n.getScreenCTM(),h=n.createSVGPoint(),p=h.matrixTransform(l),h.x=h.y=10,h=h.matrixTransform(l),i.scaleX=(h.x-p.x)/10,i.scaleY=(h.y-p.y)/10,void 0===g&&sr(),i.borderBox&&!ot&&n.getAttribute("width")&&(o=et(n)||{},d=parseFloat(o.borderLeftWidth)+parseFloat(o.borderRightWidth)||0,nt=parseFloat(o.borderTopWidth)+parseFloat(o.borderBottomWidth)||0,b=parseFloat(o.width)||0,k=parseFloat(o.height)||0,i.scaleX*=(b-d)/b,i.scaleY*=(k-nt)/k),wi?(a=n.getBoundingClientRect(),i.offsetLeft=a.left-y.left,i.offsetTop=a.top-y.top):(i.offsetLeft=p.x-y.left,i.offsetTop=p.y-y.top),i.offsetParent=v,w=pt.length;--w>-1;)pt[w].style[s]=li[w];return i},tt=function(n,i){if(i=i||{},!n||n===u||!n.parentNode||n===window)return{x:0,y:0};var o=et(n),r=hr&&o?o.getPropertyValue(hr):"50% 50%",s=r.split(" "),f=-1!==r.indexOf("left")?"0%":-1!==r.indexOf("right")?"100%":s[0],e=-1!==r.indexOf("top")?"0%":-1!==r.indexOf("bottom")?"100%":s[1];return("center"===e||null==e)&&(e="50%"),("center"===f||isNaN(parseFloat(f)))&&(f="50%"),n.getBBox&&ci(n)?(n._gsTransform||(t.set(n,{x:"+=0",overwrite:!1}),void 0===n._gsTransform.xOrigin&&console.log("Draggable requires at least GSAP 1.17.0")),r=n.getBBox(),i.x=n._gsTransform.xOrigin-r.x,i.y=n._gsTransform.yOrigin-r.y):(n.getBBox&&-1!==(f+e).indexOf("%")&&(n=n.getBBox(),n={offsetWidth:n.width,offsetHeight:n.height}),i.x=-1!==f.indexOf("%")?n.offsetWidth*parseFloat(f)/100:parseFloat(f),i.y=-1!==e.indexOf("%")?n.offsetHeight*parseFloat(e)/100:parseFloat(e)),i},ai=function(n){if(c.cacheSVGData!==!1&&n._dCache&&n._dCache.lastUpdate===t.ticker.frame)return n._dCache;var i,r=n._dCache=n._dCache||{},f=et(n),e=n.getBBox&&ci(n),o="svg"===(n.nodeName+"").toLowerCase();if(r.isSVG=e,r.isSVGRoot=o,r.borderBox="border-box"===f.boxSizing,r.computedStyle=f,o)i=n.parentNode||u,i.insertBefore(l,n),r.offsetParent=l.offsetParent||u,i.removeChild(l);else if(e){for(i=n.parentNode;i&&"svg"!==(i.nodeName+"").toLowerCase();)i=i.parentNode;r.offsetParent=i}else r.offsetParent=n.offsetParent;return r},vi=function(n,t,i,f){if(n===window||!n||!n.style||!n.parentNode)return[1,0,0,1,0,0];var o,b,l,k,a,v,y,d,nt,tt,it,rt,ut,ft,c=n._dCache||ai(n),h=n.parentNode,p=h._dCache||ai(h),w=c.computedStyle,et=c.isSVG?p.offsetParent:h.offsetParent;return o=c.isSVG&&-1!==(n.style[s]+"").indexOf("matrix")?n.style[s]:w?w.getPropertyValue(cu):n.currentStyle?n.currentStyle[s]:"1,0,0,1,0,0",n.getBBox&&-1!==(n.getAttribute("transform")+"").indexOf("matrix")&&(o=n.getAttribute("transform")),o=(o+"").match(/(?:\-|\.|\b)(\d|\.|e\-)+/g)||[1,0,0,1,0,0],o.length>6&&(o=[o[0],o[1],o[4],o[5],o[12],o[13]]),f?o[4]=o[5]=0:c.isSVG&&(a=n._gsTransform)&&(a.xOrigin||a.yOrigin)&&(o[0]=parseFloat(o[0]),o[1]=parseFloat(o[1]),o[2]=parseFloat(o[2]),o[3]=parseFloat(o[3]),o[4]=parseFloat(o[4])-(a.xOrigin-(a.xOrigin*o[0]+a.yOrigin*o[2])),o[5]=parseFloat(o[5])-(a.yOrigin-(a.xOrigin*o[1]+a.yOrigin*o[3]))),t&&(void 0===g&&sr(),l=c.isSVG||c.isSVGRoot?wt(n):n,c.isSVG?(k=n.getBBox(),tt=p.isSVGRoot?{x:0,y:0}:h.getBBox(),l={offsetLeft:k.x-tt.x,offsetTop:k.y-tt.y,offsetParent:c.offsetParent}):c.isSVGRoot?(it=parseInt(w.borderTopWidth,10)||0,rt=parseInt(w.borderLeftWidth,10)||0,ut=(o[0]-g)*rt+o[2]*it,ft=o[1]*rt+(o[3]-g)*it,v=t.x,y=t.y,d=v-(v*o[0]+y*o[2]),nt=y-(v*o[1]+y*o[3]),o[4]=parseFloat(o[4])+d,o[5]=parseFloat(o[5])+nt,t.x-=d,t.y-=nt,v=l.scaleX,y=l.scaleY,t.x*=v,t.y*=y,o[0]*=v,o[1]*=y,o[2]*=v,o[3]*=y,au||(t.x+=ut,t.y+=ft)):!ii&&n.offsetParent&&(t.x+=parseInt(e(n.offsetParent,"borderLeftWidth"),10)||0,t.y+=parseInt(e(n.offsetParent,"borderTopWidth"),10)||0),b=h===u||h===r.body,o[4]=Number(o[4])+t.x+(l.offsetLeft||0)-i.x-(b?0:h.scrollLeft||0),o[5]=Number(o[5])+t.y+(l.offsetTop||0)-i.y-(b?0:h.scrollTop||0),h&&"fixed"===e(n,"position",w)&&(o[4]+=at(),o[5]+=lt()),!h||h===u||et!==l.offsetParent||p.isSVG||bi&&"100100"!==vi(h).join("")||(l=p.isSVGRoot?wt(h):h,o[4]-=l.offsetLeft||0,o[5]-=l.offsetTop||0,ii||!p.offsetParent||c.isSVG||c.isSVGRoot||(o[4]-=parseInt(e(p.offsetParent,"borderLeftWidth"),10)||0,o[5]-=parseInt(e(p.offsetParent,"borderTopWidth"),10)||0))),o},bt=function(n,t){if(!n||n===window||!n.parentNode)return[1,0,0,1,0,0];for(var f,e,o,s,c,l,r,h,a=tt(n,hi),v=tt(n.parentNode,cr),i=vi(n,a,v);(n=n.parentNode)&&n.parentNode&&n!==u;)a=v,v=tt(n.parentNode,a===hi?cr:hi),r=vi(n,a,v),f=i[0],e=i[1],o=i[2],s=i[3],c=i[4],l=i[5],i[0]=f*r[0]+e*r[2],i[1]=f*r[1]+e*r[3],i[2]=o*r[0]+s*r[2],i[3]=o*r[1]+s*r[3],i[4]=c*r[0]+l*r[2]+r[4],i[5]=c*r[1]+l*r[3]+r[5];return t&&(f=i[0],e=i[1],o=i[2],s=i[3],c=i[4],l=i[5],h=f*s-e*o,i[0]=s/h,i[1]=-e/h,i[2]=-o/h,i[3]=f/h,i[4]=(o*l-s*c)/h,i[5]=-(f*l-e*c)/h),i},vu=function(n,t,i,r,u){n=w(n);var f=bt(n,!1,u),e=t.x,o=t.y;return i&&(tt(n,t),e-=t.x,o-=t.y),r=r===!0?t:r||{},r.x=e*f[0]+o*f[2]+f[4],r.y=e*f[1]+o*f[3]+f[5],r},kt=function(n,t,i){var r=n.x*t[0]+n.y*t[2]+t[4],u=n.x*t[1]+n.y*t[3]+t[5];return n.x=r*i[0]+u*i[2]+i[4],n.y=r*i[1]+u*i[3]+i[5],n},yu=function(n,t,i){if(!(n=w(n)))return null;t=w(t);var ft,f,s,e,h,a,p,b,k,d,g,ot,c,l,o,it,rt,st,ht,ct,ut,nt,vt=n.getBBox&&ci(n);if(n===window)e=lt(),f=at(),s=f+(u.clientWidth||n.innerWidth||r.body.clientWidth||0),h=e+((n.innerHeight||0)-20<u.clientHeight?u.clientHeight:n.innerHeight||r.body.clientHeight||0);else{if(void 0===t||t===window)return n.getBoundingClientRect();ft=tt(n);f=-ft.x;e=-ft.y;vt?(ot=n.getBBox(),c=ot.width,l=ot.height):"svg"!==(n.nodeName+"").toLowerCase()&&n.offsetWidth?(c=n.offsetWidth,l=n.offsetHeight):(ut=et(n),c=parseFloat(ut.width),l=parseFloat(ut.height));s=f+c;h=e+l;"svg"!==n.nodeName.toLowerCase()||y||(o=wt(n),nt=o.computedStyle||{},st=(n.getAttribute("viewBox")||"0 0").split(" "),ht=parseFloat(st[0]),ct=parseFloat(st[1]),it=parseFloat(nt.borderLeftWidth)||0,rt=parseFloat(nt.borderTopWidth)||0,s-=c-(c-it)/o.scaleX-ht,h-=l-(l-rt)/o.scaleY-ct,f-=it/o.scaleX-ht,e-=rt/o.scaleY-ct,ut&&(s+=(parseFloat(nt.borderRightWidth)+it)/o.scaleX,h+=(rt+parseFloat(nt.borderBottomWidth))/o.scaleY))}return n===t?{left:f,top:e,width:s-f,height:h-e}:(a=bt(n),p=bt(t,!0),b=kt({x:f,y:e},a,p),k=kt({x:s,y:e},a,p),d=kt({x:s,y:h},a,p),g=kt({x:f,y:h},a,p),f=Math.min(b.x,k.x,d.x,g.x),e=Math.min(b.y,k.y,d.y,g.y),v.x=v.y=0,i&&tt(t,v),{left:f+v.x,top:e+v.y,width:Math.max(b.x,k.x,d.x,g.x)-f,height:Math.max(b.y,k.y,d.y,g.y)-e})},lr=function(n){return n&&n.length&&n[0]&&(n[0].nodeType&&n[0].style&&!n.nodeType||n[0].length&&n[0][0])?!0:!1},pu=function(n){for(var t,i,u=[],f=n.length,r=0;f>r;r++)if(t=n[r],lr(t))for(i=t.length,i=0;i<t.length;i++)u.push(t[i]);else t&&0!==t.length&&u.push(t);return u},ar="ontouchstart"in u&&"orientation"in window,dt=function(n){for(var r=n.split(","),u=(void 0!==l.onpointerdown?"pointerdown,pointermove,pointerup,pointercancel":void 0!==l.onmspointerdown?"MSPointerDown,MSPointerMove,MSPointerUp,MSPointerCancel":n).split(","),i={},t=8;--t>-1;)i[r[t]]=u[t],i[u[t]]=r[t];return i}("touchstart,touchmove,touchend,touchcancel"),h=function(n,t,i,r){n.addEventListener?n.addEventListener(dt[t]||t,i,r):n.attachEvent&&n.attachEvent("on"+t,i)},f=function(n,t,i){n.removeEventListener?n.removeEventListener(dt[t]||t,i):n.detachEvent&&n.detachEvent("on"+t,i)},wu=function(n,t){for(var i=n.length;--i>-1;)if(n[i].identifier===t)return!0;return!1},vr=function(n){ti=n.touches&&ht<n.touches.length;f(n.target,"touchend",vr)},yr=function(n){ti=n.touches&&ht<n.touches.length;h(n.target,"touchend",vr)},yi=function(n,t,i,r,u,f){var s,e,h,o={};if(t)if(1!==u&&t instanceof Array){if(o.end=s=[],h=t.length,"object"==typeof t[0])for(e=0;h>e;e++)s[e]=tr(t[e],u);else for(e=0;h>e;e++)s[e]=t[e]*u;i+=1.1;r-=1.1}else o.end="function"==typeof t?function(i){var f,e,r=t.call(n,i);if(1!==u&&"object"==typeof r){f={};for(e in r)f[e]=r[e]*u;r=f}return r}:t;return(i||0===i)&&(o.max=i),(r||0===r)&&(o.min=r),f&&(o.velocity=0),o},pr=function(n){var t;return n&&n.getAttribute&&"BODY"!==n.nodeName?"true"===(t=n.getAttribute("data-clickable"))||"false"!==t&&(n.onclick||iu.test(n.nodeName+"")||"true"===n.getAttribute("contentEditable"))?!0:pr(n.parentNode):!1},gt=function(n,t){for(var i,r=n.length;--r>-1;)i=n[r],i.ondragstart=i.onselectstart=t?null:di,b(i,"userSelect",t?"text":"none")},bu=function(){var i,n=r.createElement("div"),u=r.createElement("div"),t=u.style,f=r.body||l;return t.display="inline-block",t.position="relative",n.style.cssText=u.innerHTML="width:90px; height:40px; padding:10px; overflow:auto; visibility: hidden",n.appendChild(u),f.appendChild(n),ri=u.offsetHeight+18>n.scrollHeight,t.width="100%",s||(t.paddingRight="500px",i=n.scrollLeft=n.scrollWidth-n.clientWidth,t.left="-90px",i=i!==n.scrollLeft),f.removeChild(n),i}(),ku=function(n,i){n=w(n);i=i||{};var nt,tt,it,d,l,g,h=r.createElement("div"),u=h.style,o=n.firstChild,c=0,f=0,v=n.scrollTop,p=n.scrollLeft,rt=n.scrollWidth,ut=n.scrollHeight,a=0,b=0,k=0;hu&&i.force3D!==!1?(l="translate3d(",g="px,0px)"):s&&(l="translate(",g="px)");this.scrollTop=function(n,t){return arguments.length?void this.top(-n,t):-this.top()};this.scrollLeft=function(n,t){return arguments.length?void this.left(-n,t):-this.left()};this.left=function(r,e){if(!arguments.length)return-(n.scrollLeft+f);var o=n.scrollLeft-p,h=f;return(o>2||-2>o)&&!e?(p=n.scrollLeft,t.killTweensOf(this,!0,{left:1,scrollLeft:1}),this.left(-p),void(i.onKill&&i.onKill())):(r=-r,0>r?(f=r-.5|0,r=0):r>b?(f=r-b|0,r=b):f=0,(f||h)&&(l?this._suspendTransforms||(u[s]=l+-f+"px,"+-c+g):u.left=-f+"px",bu&&f+a>=0&&(u.paddingRight=f+a+"px")),n.scrollLeft=0|r,void(p=n.scrollLeft))};this.top=function(r,e){if(!arguments.length)return-(n.scrollTop+c);var o=n.scrollTop-v,h=c;return(o>2||-2>o)&&!e?(v=n.scrollTop,t.killTweensOf(this,!0,{top:1,scrollTop:1}),this.top(-v),void(i.onKill&&i.onKill())):(r=-r,0>r?(c=r-.5|0,r=0):r>k?(c=r-k|0,r=k):c=0,(c||h)&&(l?this._suspendTransforms||(u[s]=l+-f+"px,"+-c+g):u.top=-c+"px"),n.scrollTop=0|r,void(v=n.scrollTop))};this.maxScrollTop=function(){return k};this.maxScrollLeft=function(){return b};this.disable=function(){for(o=h.firstChild;o;)d=o.nextSibling,n.appendChild(o),o=d;n===h.parentNode&&n.removeChild(h)};this.enable=function(){if(o=n.firstChild,o!==h){for(;o;)d=o.nextSibling,h.appendChild(o),o=d;n.appendChild(h);this.calibrate()}};this.calibrate=function(t){var i,r,o=n.clientWidth===nt;v=n.scrollTop;p=n.scrollLeft;(!o||n.clientHeight!==tt||h.offsetHeight!==it||rt!==n.scrollWidth||ut!==n.scrollHeight||t)&&((c||f)&&(i=this.left(),r=this.top(),this.left(-n.scrollLeft),this.top(-n.scrollTop)),(!o||t)&&(u.display="block",u.width="auto",u.paddingRight="0px",a=Math.max(0,n.scrollWidth-n.clientWidth),a&&(a+=e(n,"paddingLeft")+(ri?e(n,"paddingRight"):0))),u.display="inline-block",u.position="relative",u.overflow="visible",u.verticalAlign="top",u.width="100%",u.paddingRight=a+"px",ri&&(u.paddingBottom=e(n,"paddingBottom",!0)),y&&(u.zoom="1"),nt=n.clientWidth,tt=n.clientHeight,rt=n.scrollWidth,ut=n.scrollHeight,b=n.scrollWidth-nt,k=n.scrollHeight-tt,it=h.offsetHeight,u.display="block",(i||r)&&(this.left(i),this.top(r)))};this.content=h;this.element=n;this._suspendTransforms=!1;this.enable()},c=function(s,l){n.call(this,s);s=w(s);a||(a=ki.com.greensock.plugins.ThrowPropsPlugin);this.vars=l=tr(l||{});this.target=s;this.x=this.y=this.rotation=0;this.dragResistance=parseFloat(l.dragResistance)||0;this.edgeResistance=isNaN(l.edgeResistance)?1:parseFloat(l.edgeResistance)||0;this.lockAxis=l.lockAxis;this.autoScroll=l.autoScroll||0;this.lockedAxis=null;this.allowEventDefault=!!l.allowEventDefault;var vr,g,ai,vi,ui,wt,er,of,et,it,lt,ot,sr,bu,lu,fi,ou,yt,du,bi,di,hr,au,kt,d,sf,vf,yf,pi,hi,ci,gu,nf,hf,li=(l.type||(y?"top,left":"x,y")).toLowerCase(),ir=-1!==li.indexOf("x")||-1!==li.indexOf("y"),tt=-1!==li.indexOf("rotation"),gr=tt?"rotation":ir?"x":"left",iu=ir?"y":"top",at=-1!==li.indexOf("x")||-1!==li.indexOf("left")||"scroll"===li,ii=-1!==li.indexOf("y")||-1!==li.indexOf("top")||"scroll"===li,eu=l.minimumMovement||2,k=this,ri=ru(l.trigger||l.handle||s),su={},tf=0,ur=!1,cf=l.clickableTest||pr,fr=0,wi=function(n){var t,a,e,v,y,c,l,f,w,b;if(k.autoScroll&&k.isDragging&&(ur||yt))for(w=s,b=15*k.autoScroll,ur=!1,p.scrollTop=null!=window.pageYOffset?window.pageYOffset:null!=u.scrollTop?u.scrollTop:r.body.scrollTop,p.scrollLeft=null!=window.pageXOffset?window.pageXOffset:null!=u.scrollLeft?u.scrollLeft:r.body.scrollLeft,v=k.pointerX-p.scrollLeft,y=k.pointerY-p.scrollTop;w&&!a;)a=ft(w.parentNode),t=a?p:w.parentNode,e=a?{bottom:Math.max(u.clientHeight,window.innerHeight||0),right:Math.max(u.clientWidth,window.innerWidth||0),left:0,top:0}:t.getBoundingClientRect(),c=l=0,ii&&(f=t._gsMaxScrollY-t.scrollTop,0>f?l=f:y>e.bottom-40&&f?(ur=!0,l=Math.min(f,b*(1-Math.max(0,e.bottom-y)/40)|0)):y<e.top+40&&t.scrollTop&&(ur=!0,l=-Math.min(t.scrollTop,b*(1-Math.max(0,y-e.top)/40)|0)),l&&(t.scrollTop+=l)),at&&(f=t._gsMaxScrollX-t.scrollLeft,0>f?c=f:v>e.right-40&&f?(ur=!0,c=Math.min(f,b*(1-Math.max(0,e.right-v)/40)|0)):v<e.left+40&&t.scrollLeft&&(ur=!0,c=-Math.min(t.scrollLeft,b*(1-Math.max(0,v-e.left)/40)|0)),c&&(t.scrollLeft+=c)),a&&(c||l)&&(window.scrollTo(t.scrollLeft,t.scrollTop),cu(k.pointerX+c,k.pointerY+l)),w=t;if(yt){var i=k.x,h=k.y,d=1e-6;d>i&&i>-d&&(i=0);d>h&&h>-d&&(h=0);tt?(k.deltaX=i-pi.data.rotation,pi.data.rotation=k.rotation=i,pi.setRatio(1)):g?(ii&&(k.deltaY=h-g.top(),g.top(h)),at&&(k.deltaX=i-g.left(),g.left(i))):ir?(ii&&(k.deltaY=h-pi.data.y,pi.data.y=h),at&&(k.deltaX=i-pi.data.x,pi.data.x=i),pi.setRatio(1)):(ii&&(k.deltaY=h-parseFloat(s.style.top||0),s.style.top=h+"px"),at&&(k.deltaY=i-parseFloat(s.style.left||0),s.style.left=i+"px"));!of||n||gu||(gu=!0,o(k,"drag","onDrag"),gu=!1)}yt=!1},cr=function(n,i){var r,u=k.x,f=k.y;!s._gsTransform&&(ir||tt)&&t.set(s,{x:"+=0",overwrite:!1});ir?(k.y=s._gsTransform.y,k.x=s._gsTransform.x):tt?k.x=k.rotation=s._gsTransform.rotation:g?(k.y=g.top(),k.x=g.left()):(k.y=parseInt(s.style.top,10)||0,k.x=parseInt(s.style.left,10)||0);(bi||di||hr)&&!i&&(k.isDragging||k.isThrowing)&&(hr&&(v.x=k.x,v.y=k.y,r=hr(v),r.x!==k.x&&(k.x=r.x,yt=!0),r.y!==k.y&&(k.y=r.y,yt=!0)),bi&&(r=bi(k.x),r!==k.x&&(k.x=r,tt&&(k.rotation=r),yt=!0)),di&&(r=di(k.y),r!==k.y&&(k.y=r),yt=!0));yt&&wi(!0);n||(k.deltaX=k.x-u,k.deltaY=k.y-f,o(k,"throwupdate","onThrowUpdate"))},rf=function(){var t,i,n,r;er=!1;g?(g.calibrate(),k.minX=it=-g.maxScrollLeft(),k.minY=ot=-g.maxScrollTop(),k.maxX=et=k.maxY=lt=0,er=!0):l.bounds&&(t=or(l.bounds,s.parentNode),tt?(k.minX=it=t.left,k.maxX=et=t.left+t.width,k.minY=ot=k.maxY=lt=0):void 0!==l.bounds.maxX||void 0!==l.bounds.maxY?(t=l.bounds,k.minX=it=t.minX,k.minY=ot=t.minY,k.maxX=et=t.maxX,k.maxY=lt=t.maxY):(i=or(s,s.parentNode),k.minX=it=e(s,gr)+t.left-i.left,k.minY=ot=e(s,iu)+t.top-i.top,k.maxX=et=it+(t.width-i.width),k.maxY=lt=ot+(t.height-i.height)),it>et&&(k.minX=et,k.maxX=et=it,it=k.minX),ot>lt&&(k.minY=lt,k.maxY=lt=ot,ot=k.minY),tt&&(k.minRotation=it,k.maxRotation=et),er=!0);l.liveSnap&&(n=l.liveSnap===!0?l.snap||{}:l.liveSnap,r=n instanceof Array||"function"==typeof n,tt?(bi=ef(r?n:n.rotation,it,et,1),di=null):n.points?hr=kf(r?n:n.points,it,et,ot,lt,n.radius,g?-1:1):(at&&(bi=ef(r?n:n.x||n.left||n.scrollLeft,it,et,g?-1:1)),ii&&(di=ef(r?n:n.y||n.top||n.scrollTop,ot,lt,g?-1:1))))},pf=function(){k.isThrowing=!1;o(k,"throwcomplete","onThrowComplete")},wf=function(){k.isThrowing=!1},uf=function(n,t){var i,r,u,f;n&&a?(n===!0&&(i=l.snap||l.liveSnap||{},r=i instanceof Array||"function"==typeof i,n={resistance:(l.throwResistance||l.resistance||1e3)/(tt?10:1)},tt?n.rotation=yi(k,r?i:i.rotation,et,it,1,t):(at&&(n[gr]=yi(k,r?i:i.points||i.x||i.left||i.scrollLeft,et,it,g?-1:1,t||"x"===k.lockedAxis)),ii&&(n[iu]=yi(k,r?i:i.points||i.y||i.top||i.scrollTop,lt,ot,g?-1:1,t||"y"===k.lockedAxis)),(i.points||i instanceof Array&&"object"==typeof i[0])&&(n.linkedProps=gr+","+iu,n.radius=i.radius))),k.isThrowing=!0,f=isNaN(l.overshootTolerance)?1===l.edgeResistance?0:1-k.edgeResistance+.2:l.overshootTolerance,k.tween=u=a.to(g||s,{throwProps:n,ease:l.ease||ki.Power3.easeOut,onComplete:pf,onOverwrite:wf,onUpdate:l.fastMode?o:cr,onUpdateParams:l.fastMode?[k,"onthrowupdate","onThrowUpdate"]:i&&i.radius?[!1,!0]:nu},isNaN(l.maxDuration)?2:l.maxDuration,isNaN(l.minDuration)?0===f?0:.5:l.minDuration,f),l.fastMode||(g&&(g._suspendTransforms=!0),u.render(u.duration(),!0,!0),cr(!0,!0),k.endX=k.x,k.endY=k.y,tt&&(k.endRotation=k.x),u.play(0),cr(!0,!0),g&&(g._suspendTransforms=!1))):er&&k.applyBounds()},lf=function(n){var r,u,f,e,o,h,t,c,l,i=d||[1,0,0,1,0,0];d=bt(s.parentNode,!0);n&&k.isPressed&&i.join(",")!==d.join(",")&&(r=i[0],u=i[1],f=i[2],e=i[3],o=i[4],h=i[5],t=r*e-u*f,c=ai*(e/t)+vi*(-f/t)+(f*h-e*o)/t,l=ai*(-u/t)+vi*(r/t)+-(r*h-u*o)/t,vi=c*d[1]+l*d[3]+d[5],ai=c*d[0]+l*d[2]+d[4]);d[1]||d[2]||1!=d[0]||1!=d[3]||0!=d[4]||0!=d[5]||(d=null)},ff=function(){var n=1-k.edgeResistance;lf(!1);d&&(ai=k.pointerX*d[0]+k.pointerY*d[2]+d[4],vi=k.pointerX*d[1]+k.pointerY*d[3]+d[5]);yt&&(cu(k.pointerX,k.pointerY),wi(!0));g?(rf(),wt=g.top(),ui=g.left()):(yu()?(cr(!0,!0),rf()):k.applyBounds(),tt?(ou=vu(s,{x:0,y:0}),cr(!0,!0),ui=k.x,wt=k.y=Math.atan2(ou.y-k.pointerY,k.pointerX-ou.x)*gi):(vf=s.parentNode?s.parentNode.scrollTop||0:0,yf=s.parentNode?s.parentNode.scrollLeft||0:0,wt=e(s,iu),ui=e(s,gr)));er&&n&&(ui>et?ui=et+(ui-et)/n:it>ui&&(ui=it-(it-ui)/n),tt||(wt>lt?wt=lt+(wt-lt)/n:ot>wt&&(wt=ot-(ot-wt)/n)));k.startX=ui;k.startY=wt},yu=function(){return k.tween&&k.tween.isActive()},bf=function(){!nt.parentNode||yu()||k.isDragging||nt.parentNode.removeChild(nt)},ef=function(n,t,i,r){return"function"==typeof n?function(u){var f=k.isPressed?1-k.edgeResistance:1;return n.call(k,u>i?i+(u-i)*f:t>u?t+(u-t)*f:u)*r}:n instanceof Array?function(r){for(var f,u,e=n.length,o=0,s=st;--e>-1;)f=n[e],u=f-r,0>u&&(u=-u),s>u&&f>=t&&i>=f&&(o=e,s=u);return n[o]}:isNaN(n)?function(n){return n}:function(){return n*r}},kf=function(n,t,i,r,u,f,e){return f=f||st,"function"==typeof n?function(o){var c,a,v,l=k.isPressed?1-k.edgeResistance:1,s=o.x,h=o.y;return o.x=s=s>i?i+(s-i)*l:t>s?t+(s-t)*l:s,o.y=h=h>u?u+(h-u)*l:r>h?r+(h-r)*l:h,c=n.call(k,o),c!==o&&(o.x=c.x,o.y=c.y),1!==e&&(o.x*=e,o.y*=e),st>f&&(a=o.x-s,v=o.y-h,Math.sqrt(a*a+v*v)>f&&(o.x=s,o.y=h)),o}:n instanceof Array?function(t){for(var i,r,u,e,o=n.length,h=0,s=st;--o>-1;)u=n[o],i=u.x-t.x,r=u.y-t.y,e=Math.sqrt(i*i+r*r),s>e&&(h=o,s=e);return f>=s?n[h]:t}:function(n){return n}},hu=function(n){var i;if(!(!vr||k.isPressed||!n||("mousedown"===n.type||"pointerdown"===n.type)&&rt()-fr<30&&dt[k.pointerEvent.type])){if(sf=yu(),k.pointerEvent=n,dt[n.type]?(kt=-1!==n.type.indexOf("touch")?n.currentTarget||n.target:r,h(kt,"touchend",pt),h(kt,"touchmove",lr),h(kt,"touchcancel",pt),h(r,"touchstart",yr)):(kt=null,h(r,"mousemove",lr)),ci=null,h(r,"mouseup",pt),n&&n.target&&h(n.target,"mouseup",pt),au=cf.call(k,n.target)&&!l.dragClickables)return h(n.target,"change",pt),o(k,"press","onPress"),void gt(ri,!0);if(hi=kt&&at!==ii&&k.vars.allowNativeTouchScrolling!==!1?at?"y":"x":!1,y?n=si(n,!0):hi||k.allowEventDefault||(n.preventDefault(),n.preventManipulation&&n.preventManipulation()),n.changedTouches?(n=lu=n.changedTouches[0],fi=n.identifier):n.pointerId?fi=n.pointerId:lu=fi=null,ht++,uu(wi),vi=k.pointerY=n.pageY,ai=k.pointerX=n.pageX,(hi||k.autoScroll)&&vt(s.parentNode),s.parentNode&&(g||k.autoScroll&&!tt&&s.parentNode._gsMaxScrollX&&!nt.parentNode)&&!s.getBBox&&(nt.style.width=s.parentNode.scrollWidth+"px",s.parentNode.appendChild(nt)),ff(),k.tween&&k.tween.kill(),k.isThrowing=!1,t.killTweensOf(g||s,!0,su),g&&t.killTweensOf(s,!0,{scrollTo:1}),k.tween=k.lockedAxis=null,(l.zIndexBoost||!tt&&!g&&l.zIndexBoost!==!1)&&(s.style.zIndex=c.zIndex++),k.isPressed=!0,of=!(!l.onDrag&&!k._listeners.drag),!tt)for(i=ri.length;--i>-1;)b(ri[i],"cursor",l.cursor||"move");o(k,"press","onPress")}},lr=function(n){var f,r,u,t,e,o,i=n;if(vr&&!ti&&k.isPressed&&n){if(k.pointerEvent=n,f=n.changedTouches){if(n=f[0],n!==lu&&n.identifier!==fi){for(t=f.length;--t>-1&&(n=f[t]).identifier!==fi;);if(0>t)return}}else if(n.pointerId&&fi&&n.pointerId!==fi)return;if(y)n=si(n,!0);else{if(kt&&hi&&!ci&&(r=n.pageX,u=n.pageY,d&&(t=r*d[0]+u*d[2]+d[4],u=r*d[1]+u*d[3]+d[5],r=t),e=Math.abs(r-ai),o=Math.abs(u-vi),(e!==o&&(e>eu||o>eu)||ct&&hi===ci)&&(ci=e>o&&at?"x":"y",k.vars.lockAxisOnTouchScroll!==!1&&(k.lockedAxis="x"===ci?"y":"x","function"==typeof k.vars.onLockAxis&&k.vars.onLockAxis.call(k,i)),ct&&hi===ci)))return void pt(i);k.allowEventDefault||hi&&(!ci||hi===ci)||i.cancelable===!1||(i.preventDefault(),i.preventManipulation&&i.preventManipulation())}k.autoScroll&&(ur=!0);cu(n.pageX,n.pageY)}},cu=function(n,t){var f,e,r,i,h,u,c=1-k.dragResistance,s=1-k.edgeResistance;k.pointerX=n;k.pointerY=t;tt?(i=Math.atan2(ou.y-t,n-ou.x)*gi,h=k.y-i,k.y=i,h>180?wt-=360:-180>h&&(wt+=360),r=ui+(wt-i)*c):(d&&(u=n*d[0]+t*d[2]+d[4],t=n*d[1]+t*d[3]+d[5],n=u),e=t-vi,f=n-ai,eu>e&&e>-eu&&(e=0),eu>f&&f>-eu&&(f=0),(k.lockAxis||k.lockedAxis)&&(f||e)&&(u=k.lockedAxis,u||(k.lockedAxis=u=at&&Math.abs(f)>Math.abs(e)?"y":ii?"x":null,u&&"function"==typeof k.vars.onLockAxis&&k.vars.onLockAxis.call(k,k.pointerEvent)),"y"===u?e=0:"x"===u&&(f=0)),r=ui+f*c,i=wt+e*c);(bi||di||hr)&&(k.x!==r||k.y!==i&&!tt)?(hr&&(v.x=r,v.y=i,u=hr(v),r=u.x,i=u.y),bi&&(r=bi(r)),di&&(i=di(i))):er&&(r>et?r=et+(r-et)*s:it>r&&(r=it+(r-it)*s),tt||(i>lt?i=lt+(i-lt)*s:ot>i&&(i=ot+(i-ot)*s)));tt||(r=Math.round(r),i=Math.round(i));(k.x!==r||k.y!==i&&!tt)&&(tt?(k.endRotation=k.x=k.endX=r,yt=!0):(ii&&(k.y=k.endY=i,yt=!0),at&&(k.x=k.endX=r,yt=!0)),!k.isDragging&&k.isPressed&&(k.isDragging=!0,o(k,"dragstart","onDragStart")))},pt=function(n,i){if(vr&&k.isPressed&&(!n||null==fi||i||!(n.pointerId&&n.pointerId!==fi||n.changedTouches&&!wu(n.changedTouches,fi)))){k.isPressed=!1;var h,e,v,c,p,u=n,a=k.isDragging,w=t.delayedCall(.001,bf);if(kt?(f(kt,"touchend",pt),f(kt,"touchmove",lr),f(kt,"touchcancel",pt),f(r,"touchstart",yr)):f(r,"mousemove",lr),f(r,"mouseup",pt),n&&n.target&&f(n.target,"mouseup",pt),yt=!1,au)return n&&f(n.target,"change",pt),gt(ri,!1),o(k,"release","onRelease"),o(k,"click","onClick"),void(au=!1);if(rr(wi),!tt)for(e=ri.length;--e>-1;)b(ri[e],"cursor",l.cursor||"move");if(a&&(tf=nr=rt(),k.isDragging=!1),ht--,n){if(y&&(n=si(n,!1)),h=n.changedTouches,h&&(n=h[0],n!==lu&&n.identifier!==fi)){for(e=h.length;--e>-1&&(n=h[e]).identifier!==fi;);if(0>e)return}k.pointerEvent=u;k.pointerX=n.pageX;k.pointerY=n.pageY}return u&&!a?(sf&&(l.snap||l.bounds)&&uf(l.throwProps),o(k,"release","onRelease"),ct&&"touchmove"===u.type||(o(k,"click","onClick"),c=u.target||u.srcElement||s,fr=rt(),p=function(){fr!==nf&&k.enabled()&&!k.isPressed&&(c.click?c.click():r.createEvent&&(v=r.createEvent("MouseEvents"),v.initMouseEvent("click",!0,!0,window,1,k.pointerEvent.screenX,k.pointerEvent.screenY,k.pointerX,k.pointerY,!1,!1,!1,!1,0,null),c.dispatchEvent(v)))},ct||u.defaultPrevented||t.delayedCall(1e-5,p))):(uf(l.throwProps),y||k.allowEventDefault||!u||!l.dragClickables&&cf.call(k,u.target)||!a||hi&&(!ci||hi!==ci)||u.cancelable===!1||(u.preventDefault(),u.preventManipulation&&u.preventManipulation()),o(k,"release","onRelease")),yu()&&w.duration(k.tween.duration()),a&&o(k,"dragend","onDragEnd"),!0}},pu=function(n){if(n&&k.isDragging&&!g){var t=n.target||n.srcElement||s.parentNode,i=t.scrollLeft-t._gsScrollX,r=t.scrollTop-t._gsScrollY;(i||r)&&(d?(ai-=i*d[0]+r*d[2],vi-=r*d[3]+i*d[1]):(ai-=i,vi-=r),t._gsScrollX+=i,t._gsScrollY+=r,cu(k.pointerX,k.pointerY))}},af=function(n){var u=rt(),t=40>u-fr,f=40>u-tf,i=t&&nf===fr,e=!!n.preventDefault,o=k.pointerEvent&&k.pointerEvent.defaultPrevented,s=t&&hf===fr,r=n.isTrusted||null==n.isTrusted&&t&&i;return e&&(i||f&&k.vars.suppressClickOnDrag!==!1)&&n.stopImmediatePropagation(),!t||k.pointerEvent&&k.pointerEvent.defaultPrevented||i&&r===s?void((k.isPressed||f||t)&&(e?r&&n.detail&&t&&!o||(n.preventDefault(),n.preventManipulation&&n.preventManipulation()):n.returnValue=!1)):(r&&i&&(hf=fr),void(nf=fr))};du=c.get(this.target);du&&du.kill();this.startDrag=function(n){hu(n);k.isDragging||(k.isDragging=!0,o(k,"dragstart","onDragStart"))};this.drag=lr;this.endDrag=function(n){pt(n,!0)};this.timeSinceDrag=function(){return k.isDragging?0:(rt()-tf)/1e3};this.hitTest=function(n,t){return c.hitTest(k.target,n,t)};this.getDirection=function(n,t){var e,o,s,i,r,u,f="velocity"===n&&a?n:"object"!=typeof n||tt?"start":"element";return"element"===f&&(r=ni(k.target),u=ni(n)),e="start"===f?k.x-ui:"velocity"===f?a.getVelocity(this.target,gr):r.left+r.width/2-(u.left+u.width/2),tt?0>e?"counter-clockwise":"clockwise":(t=t||2,o="start"===f?k.y-wt:"velocity"===f?a.getVelocity(this.target,iu):r.top+r.height/2-(u.top+u.height/2),s=Math.abs(e/o),i=1/t>s?"":0>e?"left":"right",t>s&&(""!==i&&(i+="-"),i+=0>o?"up":"down"),i)};this.applyBounds=function(n){var i,f,o,e,t,h;if(n&&l.bounds!==n)return l.bounds=n,k.update(!0);if(cr(!0),rf(),er){if(i=k.x,f=k.y,i>et?i=et:it>i&&(i=it),f>lt?f=lt:ot>f&&(f=ot),(k.x!==i||k.y!==f)&&(o=!0,k.x=k.endX=i,tt?k.endRotation=i:k.y=k.endY=f,yt=!0,wi(!0),k.autoScroll&&!k.isDragging))for(vt(s.parentNode),e=s,p.scrollTop=null!=window.pageYOffset?window.pageYOffset:null!=u.scrollTop?u.scrollTop:r.body.scrollTop,p.scrollLeft=null!=window.pageXOffset?window.pageXOffset:null!=u.scrollLeft?u.scrollLeft:r.body.scrollLeft;e&&!h;)h=ft(e.parentNode),t=h?p:e.parentNode,ii&&t.scrollTop>t._gsMaxScrollY&&(t.scrollTop=t._gsMaxScrollY),at&&t.scrollLeft>t._gsMaxScrollX&&(t.scrollLeft=t._gsMaxScrollX),e=t;k.isThrowing&&(o||k.endX>et||k.endX<it||k.endY>lt||k.endY<ot)&&uf(l.throwProps,o)}return k};this.update=function(n,t,i){var r=k.x,u=k.y;return lf(!t),n?k.applyBounds():(yt&&i&&wi(!0),cr(!0)),t&&(cu(k.pointerX,k.pointerY),yt&&wi(!0)),k.isPressed&&!t&&(at&&Math.abs(r-k.x)>.01||ii&&Math.abs(u-k.y)>.01&&!tt)&&ff(),k.autoScroll&&(vt(s.parentNode),ur=k.isDragging,wi(!0)),k.autoScroll&&(oi(s,pu),ei(s,pu)),k};this.enable=function(n){var u,f,r;if("soft"!==n){for(f=ri.length;--f>-1;)r=ri[f],h(r,"mousedown",hu),h(r,"touchstart",hu),h(r,"click",af,!0),tt||b(r,"cursor",l.cursor||"move"),b(r,"touchCallout","none"),b(r,"touchAction",at===ii?"none":at?"pan-y":"pan-x");gt(ri,!1)}return ei(s,pu),vr=!0,a&&"soft"!==n&&a.track(g||s,ir?"x,y":tt?"rotation":"top,left"),g&&g.enable(),s._gsDragID=u="d"+tu++,ut[u]=this,g&&(g.element._gsDragID=u),t.set(s,{x:"+=0",overwrite:!1}),pi={t:s,data:y?bu:s._gsTransform,tween:{},setRatio:y?function(){t.set(s,sr)}:i._internals.setTransformRatio||i._internals.set3DTransformRatio},ff(),k.update(!0),k};this.disable=function(n){var t,i,u=k.isDragging;if(!tt)for(t=ri.length;--t>-1;)b(ri[t],"cursor",null);if("soft"!==n){for(t=ri.length;--t>-1;)i=ri[t],b(i,"touchCallout",null),b(i,"touchAction",null),f(i,"mousedown",hu),f(i,"touchstart",hu),f(i,"click",af);gt(ri,!0);kt&&(f(kt,"touchcancel",pt),f(kt,"touchend",pt),f(kt,"touchmove",lr));f(r,"mouseup",pt);f(r,"mousemove",lr)}return oi(s,pu),vr=!1,a&&"soft"!==n&&a.untrack(g||s,ir?"x,y":tt?"rotation":"top,left"),g&&g.disable(),rr(wi),k.isDragging=k.isPressed=au=!1,u&&o(k,"dragend","onDragEnd"),k};this.enabled=function(n,t){return arguments.length?n?k.enable(t):k.disable(t):vr};this.kill=function(){return k.isThrowing=!1,t.killTweensOf(g||s,!0,su),k.disable(),delete ut[s._gsDragID],k};-1!==li.indexOf("scroll")&&(g=this.scrollProxy=new ku(s,fu({onKill:function(){k.isPressed&&pt(null)}},l)),s.style.overflowY=ii&&!ar?"auto":"hidden",s.style.overflowX=at&&!ar?"auto":"hidden",s=g.content);l.force3D!==!1&&t.set(s,{force3D:!0});tt?su.rotation=1:(at&&(su[gr]=1),ii&&(su[iu]=1));tt?(sr=dr,bu=sr.css,sr.overwrite=!1):ir&&(sr=at&&ii?wr:at?br:kr,bu=sr.css,sr.overwrite=!1);this.enable()},k=c.prototype=new n;k.constructor=c;k.pointerX=k.pointerY=k.startX=k.startY=k.deltaX=k.deltaY=0;k.isDragging=k.isPressed=!1;c.version="0.15.0";c.zIndex=1e3;h(r,"touchcancel",function(){});h(r,"contextmenu",function(){var n;for(n in ut)ut[n].isPressed&&ut[n].endDrag()});c.create=function(n,i){"string"==typeof n&&(n=t.selector(n));for(var r=n&&0!==n.length?lr(n)?pu(n):[n]:[],u=r.length;--u>-1;)r[u]=new c(r[u],i);return r};c.get=function(n){return ut[(w(n)||{})._gsDragID]};c.timeSinceDrag=function(){return(rt()-nr)/1e3};var it={},du=function(n){var t,i,r=0,u=0;for(n=w(n),t=n.offsetWidth,i=n.offsetHeight;n;)r+=n.offsetTop,u+=n.offsetLeft,n=n.offsetParent;return{top:r,left:u,width:t,height:i}},ni=function(n,t){if(n===window)return it.left=it.top=0,it.width=it.right=u.clientWidth||n.innerWidth||r.body.clientWidth||0,it.height=it.bottom=(n.innerHeight||0)-20<u.clientHeight?u.clientHeight:n.innerHeight||r.body.clientHeight||0,it;var i=n.pageX!==t?{left:n.pageX-at(),top:n.pageY-lt(),right:n.pageX-at()+1,bottom:n.pageY-lt()+1}:n.nodeType||n.left===t||n.top===t?y?du(n):w(n).getBoundingClientRect():n;return i.right===t&&i.width!==t?(i.right=i.left+i.width,i.bottom=i.top+i.height):i.width===t&&(i={width:i.right-i.left,height:i.bottom-i.top,right:i.right,left:i.left,bottom:i.bottom,top:i.top}),i};return c.hitTest=function(n,t,i){if(n===t)return!1;var r,e,o,u=ni(n),f=ni(t),s=f.left>u.right||f.right<u.left||f.top>u.bottom||f.bottom<u.top;return s||!i?!s:(o=-1!==(i+"").indexOf("%"),i=parseFloat(i)||0,r={left:Math.max(u.left,f.left),top:Math.max(u.top,f.top)},r.width=Math.min(u.right,f.right)-r.left,r.height=Math.min(u.bottom,f.bottom)-r.top,r.width<0||r.height<0?!1:o?(i*=.01,e=r.width*r.height,e>=u.width*u.height*i||e>=f.width*f.height*i):r.width>i&&r.height>i)},nt.style.cssText="visibility:hidden;height:1px;top:-1px;pointer-events:none;position:relative;clear:both;",c},!0)});_gsScope._gsDefine&&_gsScope._gsQueue.pop()(),function(n){"use strict";var t=function(){return(_gsScope.GreenSockGlobals||_gsScope)[n]};"function"==typeof define&&define.amd?define(["TweenLite","CSSPlugin"],t):"undefined"!=typeof module&&module.exports&&(require("../TweenLite.js"),require("../plugins/CSSPlugin.js"),module.exports=t())}("Draggable");_gsScope="undefined"!=typeof module&&module.exports&&"undefined"!=typeof global?global:this||window;(_gsScope._gsQueue||(_gsScope._gsQueue=[])).push(function(){"use strict";function i(n,t,i,r,u,f){return i=(parseFloat(i)-parseFloat(n))*u,r=(parseFloat(r)-parseFloat(t))*f,Math.sqrt(i*i+r*r)}function r(n){return"string"!=typeof n&&n.nodeType||(n=_gsScope.TweenLite.selector(n),n.length&&(n=n[0])),n}function o(n,t,i){var r,u,f=n.indexOf(" ");return-1===f?(r=void 0!==i?i+"":n,u=n):(r=n.substr(0,f),u=n.substr(f+1)),r=-1!==r.indexOf("%")?parseFloat(r)/100*t:parseFloat(r),u=-1!==u.indexOf("%")?parseFloat(u)/100*t:parseFloat(u),r>u?[u,r]:[r,u]}function n(n){if(!n)return 0;n=r(n);var o,u,e,v,h,l,a,t=n.tagName.toLowerCase(),c=1,f=1;"non-scaling-stroke"===n.getAttribute("vector-effect")&&(f=n.getScreenCTM(),c=f.a,f=f.d);try{u=n.getBBox()}catch(y){}if(u&&(u.width||u.height)||"rect"!==t&&"circle"!==t&&"ellipse"!==t||(u={width:parseFloat(n.getAttribute("rect"===t?"width":"circle"===t?"r":"rx")),height:parseFloat(n.getAttribute("rect"===t?"height":"circle"===t?"r":"ry"))},"rect"!==t&&(u.width*=2,u.height*=2)),"path"===t)v=n.style.strokeDasharray,n.style.strokeDasharray="none",o=n.getTotalLength()||0,c!==f&&console.log("Warning: <path> length cannot be measured accurately when vector-effect is non-scaling-stroke and the element isn't proportionally scaled."),o*=(c+f)/2,n.style.strokeDasharray=v;else if("rect"===t)o=2*u.width*c+2*u.height*f;else if("line"===t)o=i(n.getAttribute("x1"),n.getAttribute("y1"),n.getAttribute("x2"),n.getAttribute("y2"),c,f);else if("polyline"===t||"polygon"===t)for(e=n.getAttribute("points").match(s)||[],"polygon"===t&&e.push(e[0],e[1]),o=0,h=2;h<e.length;h+=2)o+=i(e[h-2],e[h-1],e[h],e[h+1],c,f)||0;else("circle"===t||"ellipse"===t)&&(l=u.width/2*c,a=u.height/2*f,o=Math.PI*(3*(l+a)-Math.sqrt((3*l+a)*(l+3*a))));return o||0}function u(t,i){if(!t)return[0,0];t=r(t);i=i||n(t)+1;var o=e(t),u=o.strokeDasharray||"",s=parseFloat(o.strokeDashoffset),f=u.indexOf(",");return 0>f&&(f=u.indexOf(" ")),u=0>f?i:parseFloat(u.substr(0,f))||1e-5,u>i&&(u=i),[Math.max(0,-s),Math.max(0,u-s)]}var t,f=_gsScope.document,e=f.defaultView?f.defaultView.getComputedStyle:function(){},s=/(?:(-|-=|\+=)?\d*\.?\d*(?:e[\-+]?\d+)?)[0-9]/gi,h=-1!==((_gsScope.navigator||{}).userAgent||"").indexOf("Edge");t=_gsScope._gsDefine.plugin({propName:"drawSVG",API:2,version:"0.1.3",global:!0,overwriteProps:["drawSVG"],init:function(t,i,r,f){if(!t.getBBox)return!1;var c,s,a,v,l=n(t)+1;return this._style=t.style,"function"==typeof i&&(i=i(f,t)),i===!0||"true"===i?i="0 100%":i?-1===(i+"").indexOf(" ")&&(i="0 "+i):i="0 0",c=u(t,l),s=o(i,l,c[0]),this._length=l+10,0===c[0]&&0===s[0]?(a=Math.max(1e-5,s[1]-l),this._dash=l+a,this._offset=l-c[1]+a,this._addTween(this,"_offset",this._offset,l-s[1]+a,"drawSVG")):(this._dash=c[1]-c[0]||1e-6,this._offset=-c[0],this._addTween(this,"_dash",this._dash,s[1]-s[0]||1e-5,"drawSVG"),this._addTween(this,"_offset",this._offset,-s[0],"drawSVG")),h&&(v=e(t),s=v.strokeLinecap,"butt"!==s&&s!==v.strokeLinejoin&&(s=parseFloat(v.strokeMiterlimit),this._addTween(t.style,"strokeMiterlimit",s,s+.0001,"strokeMiterlimit"))),!0},set:function(n){this._firstPT&&(this._super.setRatio.call(this,n),this._style.strokeDashoffset=this._offset,this._style.strokeDasharray=1===n||0===n?this._offset<.001&&this._length-this._dash<=10?"none":this._offset===this._dash?"0px, 999999px":this._dash+"px,"+this._length+"px":this._dash+"px,"+this._length+"px")}});t.getLength=n;t.getPosition=u});_gsScope._gsDefine&&_gsScope._gsQueue.pop()(),function(n){"use strict";var t=function(){return(_gsScope.GreenSockGlobals||_gsScope)[n]};"function"==typeof define&&define.amd?define(["TweenLite"],t):"undefined"!=typeof module&&module.exports&&(require("../TweenLite.js"),module.exports=t())}("DrawSVGPlugin");_gsScope="undefined"!=typeof module&&module.exports&&"undefined"!=typeof global?global:this||window;(_gsScope._gsQueue||(_gsScope._gsQueue=[])).push(function(){"use strict";var o=Math.PI/180,v=180/Math.PI,it=/[achlmqstvz]|(-?\d*\.?\d*(?:e[\-+]?\d+)?)[0-9]/gi,r=/(?:(-|-=|\+=)?\d*\.?\d*(?:e[\-+]?\d+)?)[0-9]/gi,rt=/(^[#\.]|[a-y][a-z])/gi,ut=/[achlmqstvz]/gi,ft=/[\+\-]?\d*\.?\d+e[\+\-]?\d+/gi,s=_gsScope._gsDefine.globals.TweenLite,t=function(n){_gsScope.console&&console.log(n)},et=function(n,t){var s,h,f,i,r,c,l=Math.ceil(Math.abs(t)/90),e=0,u=[];for(n*=o,t*=o,s=t/l,h=4/3*Math.sin(s/2)/(1+Math.cos(s/2)),c=0;l>c;c++)f=n+c*s,i=Math.cos(f),r=Math.sin(f),u[e++]=i-h*r,u[e++]=r+h*i,f+=s,i=Math.cos(f),r=Math.sin(f),u[e++]=i+h*r,u[e++]=r-h*i,u[e++]=i,u[e++]=r;return u},ot=function(n,t,i,r,u,f,e,s,h){var k,it,vt,y;if(n!==s||t!==h){i=Math.abs(i);r=Math.abs(r);var wt=u%360*o,w=Math.cos(wt),b=Math.sin(wt),bt=(n-s)/2,kt=(t-h)/2,d=w*bt+b*kt,g=-b*bt+w*kt,nt=i*i,tt=r*r,st=d*d,ht=g*g,ct=st/nt+ht/tt;ct>1&&(i=Math.sqrt(ct)*i,r=Math.sqrt(ct)*r,nt=i*i,tt=r*r);k=f===e?-1:1;it=(nt*tt-nt*ht-tt*st)/(nt*ht+tt*st);0>it&&(it=0);var dt=k*Math.sqrt(it),rt=dt*(i*g/r),ut=dt*-(r*d/i),gt=(n+s)/2,ni=(t+h)/2,ti=gt+(w*rt-b*ut),ii=ni+(b*rt+w*ut),l=(d-rt)/i,a=(g-ut)/r,ft=(-d-rt)/i,ot=(-g-ut)/r,lt=Math.sqrt(l*l+a*a),at=l;k=0>a?-1:1;vt=k*Math.acos(at/lt)*v;lt=Math.sqrt((l*l+a*a)*(ft*ft+ot*ot));at=l*ft+a*ot;k=0>l*ot-a*ft?-1:1;y=k*Math.acos(at/lt)*v;!e&&y>0?y-=360:e&&0>y&&(y+=360);y%=360;vt%=360;for(var yt,pt,c=et(vt,y),ri=w*i,ui=b*i,fi=b*-r,ei=w*r,oi=c.length-2,p=0;oi>p;p+=2)yt=c[p],pt=c[p+1],c[p]=yt*ri+pt*fi+ti,c[p+1]=yt*ui+pt*ei+ii;return c[c.length-2]=s,c[c.length-1]=h,c}},f=function(n){var e,p,s,o,c,v,i,w,b,l,a,k,d,h=(n+"").replace(ft,function(n){var t=+n;return.0001>t&&t>-.0001?0:t}).match(it)||[],y=[],f=0,u=0,nt=h.length,r=2,g=0;if(!n||!isNaN(h[0])||isNaN(h[1]))return t("ERROR: malformed path data: "+n),y;for(e=0;nt>e;e++)if(d=c,isNaN(h[e])?(c=h[e].toUpperCase(),v=c!==h[e]):e--,s=+h[e+1],o=+h[e+2],v&&(s+=f,o+=u),0===e&&(w=s,b=o),"M"===c)i&&i.length<8&&(y.length-=1,r=0),f=w=s,u=b=o,i=[s,o],g+=r,r=2,y.push(i),e+=2,c="L";else if("C"===c)i||(i=[0,0]),i[r++]=s,i[r++]=o,v||(f=u=0),i[r++]=f+1*h[e+3],i[r++]=u+1*h[e+4],i[r++]=f+=1*h[e+5],i[r++]=u+=1*h[e+6],e+=6;else if("S"===c)"C"===d||"S"===d?(l=f-i[r-4],a=u-i[r-3],i[r++]=f+l,i[r++]=u+a):(i[r++]=f,i[r++]=u),i[r++]=s,i[r++]=o,v||(f=u=0),i[r++]=f+=1*h[e+3],i[r++]=u+=1*h[e+4],e+=4;else if("Q"===c)l=s-f,a=o-u,i[r++]=f+2*l/3,i[r++]=u+2*a/3,v||(f=u=0),f+=1*h[e+3],u+=1*h[e+4],l=s-f,a=o-u,i[r++]=f+2*l/3,i[r++]=u+2*a/3,i[r++]=f,i[r++]=u,e+=4;else if("T"===c)l=f-i[r-4],a=u-i[r-3],i[r++]=f+l,i[r++]=u+a,l=f+1.5*l-s,a=u+1.5*a-o,i[r++]=s+2*l/3,i[r++]=o+2*a/3,i[r++]=f=s,i[r++]=u=o,e+=2;else if("H"===c)o=u,i[r++]=f+(s-f)/3,i[r++]=u+(o-u)/3,i[r++]=f+2*(s-f)/3,i[r++]=u+2*(o-u)/3,i[r++]=f=s,i[r++]=o,e+=1;else if("V"===c)o=s,s=f,v&&(o+=u-f),i[r++]=s,i[r++]=u+(o-u)/3,i[r++]=s,i[r++]=u+2*(o-u)/3,i[r++]=s,i[r++]=u=o,e+=1;else if("L"===c||"Z"===c)"Z"===c&&(s=w,o=b,i.closed=!0),("L"===c||Math.abs(f-s)>.5||Math.abs(u-o)>.5)&&(i[r++]=f+(s-f)/3,i[r++]=u+(o-u)/3,i[r++]=f+2*(s-f)/3,i[r++]=u+2*(o-u)/3,i[r++]=s,i[r++]=o,"L"===c&&(e+=2)),f=s,u=o;else if("A"===c){if(k=ot(f,u,1*h[e+1],1*h[e+2],1*h[e+3],1*h[e+4],1*h[e+5],(v?f:0)+1*h[e+6],(v?u:0)+1*h[e+7]))for(p=0;p<k.length;p++)i[r++]=k[p];f=i[r-2];u=i[r-1];e+=7}else t("Error: malformed path data: "+n);return y.totalPoints=g+r,y},e=function(n,t){for(var c,l,a,v,u,f,p,w,e,o,s,h,i,y=0,b=n.length,k=t/((b-2)/6),r=2;b>r;r+=6)for(y+=k;y>.999999;)c=n[r-2],l=n[r-1],a=n[r],v=n[r+1],u=n[r+2],f=n[r+3],p=n[r+4],w=n[r+5],i=1/(Math.floor(y)+1),e=c+(a-c)*i,s=a+(u-a)*i,e+=(s-e)*i,s+=(u+(p-u)*i-s)*i,o=l+(v-l)*i,h=v+(f-v)*i,o+=(h-o)*i,h+=(f+(w-f)*i-h)*i,n.splice(r,4,c+(a-c)*i,l+(v-l)*i,e,o,e+(s-e)*i,o+(h-o)*i,s,h,u+(p-u)*i,f+(w-f)*i),r+=6,b+=6,y--;return n},y=function(n){for(var e,r,i,f="",o=n.length,t=100,u=0;o>u;u++){for(i=n[u],f+="M"+i[0]+","+i[1]+" C",e=i.length,r=2;e>r;r++)f+=(i[r++]*t|0)/t+","+(i[r++]*t|0)/t+" "+(i[r++]*t|0)/t+","+(i[r++]*t|0)/t+" "+(i[r++]*t|0)/t+","+(i[r]*t|0)/t+" ";i.closed&&(f+="z")}return f},u=function(n){for(var i=[],t=n.length-1,r=0;--t>-1;)i[r++]=n[t],i[r++]=n[t+1],t--;for(t=0;r>t;t++)n[t]=i[t];n.reversed=n.reversed?!1:!0},p=function(n){for(var i=n.length,r=0,u=0,t=0;i>t;t++)r+=n[t++],u+=n[t];return[r/(i/2),u/(i/2)]},i=function(n){for(var t,i,s=n.length,u=n[0],e=u,f=n[1],o=f,r=6;s>r;r+=6)t=n[r],i=n[r+1],t>u?u=t:e>t&&(e=t),i>f?f=i:o>i&&(o=i);return n.centerX=(u+e)/2,n.centerY=(f+o)/2,n.size=(u-e)*(f-o)},w=function(n){for(var h,t,i,r,e,c=n.length,u=n[0][0],o=u,f=n[0][1],s=f;--c>-1;)for(e=n[c],h=e.length,r=6;h>r;r+=6)t=e[r],i=e[r+1],t>u?u=t:o>t&&(o=t),i>f?f=i:s>i&&(s=i);return n.centerX=(u+o)/2,n.centerY=(f+s)/2,n.size=(u-o)*(f-s)},st=function(n,t){return t.length-n.length},b=function(n,t){var r=n.size||i(n),u=t.size||i(t);return Math.abs(u-r)<(r+u)/20?t.centerX-n.centerX||t.centerY-n.centerY:u-r},k=function(n,t){var i,r,u=n.slice(0),f=n.length,e=f-2;for(t=0|t,i=0;f>i;i++)r=(i+t)%e,n[i++]=u[r],n[i]=u[r+1]},h=function(n,t,i,r,u){var e,f,o,s,h=n.length,c=0,l=h-2;for(i*=6,f=0;h>f;f+=6)e=(f+i)%l,s=n[e]-(t[f]-r),o=n[e+1]-(t[f+1]-u),c+=Math.sqrt(o*o+s*s);return c},ht=function(n,t,i){for(var o,f,a=n.length,v=p(n),y=p(t),s=y[0]-v[0],c=y[1]-v[1],e=h(n,t,0,s,c),l=0,r=6;a>r;r+=6)f=h(n,t,r/6,s,c),e>f&&(e=f,l=r);if(i)for(o=n.slice(0),u(o),r=6;a>r;r+=6)f=h(o,t,r/6,s,c),e>f&&(e=f,l=-r);return l/6},ct=function(n,t,i){for(var u,f,e,o,r,s,h=n.length,c=99999999999,l=0,a=0;--h>-1;)for(u=n[h],s=u.length,r=0;s>r;r+=6)f=u[r]-t,e=u[r+1]-i,o=Math.sqrt(f*f+e*e),c>o&&(c=o,l=u[r],a=u[r+1]);return[l,a]},lt=function(n,t,r,u,f,e){for(var a,h,c,s,y=t.length,l=0,p=Math.min(n.size||i(n),t[r].size||i(t[r]))*u,v=999999999999,w=n.centerX+f,b=n.centerY+e,o=r;y>o&&(a=t[o].size||i(t[o]),!(p>a));o++)h=t[o].centerX-w,c=t[o].centerY-b,s=Math.sqrt(h*h+c*c),v>s&&(l=o,v=s);return s=t[l],t.splice(l,1),s},d=function(n,r,f,o){var c,s,tt,p,d,g,rt,v=r.length-n.length,a=v>0?r:n,l=v>0?n:r,ut=0,it="complexity"===o?st:b,ft="position"===o?0:"number"==typeof o?o:.8,h=l.length,y="object"==typeof f&&f.push?f.slice(0):[f],nt="reverse"===y[0]||y[0]<0,et="log"===f;if(l[0]){if(a.length>1&&(n.sort(it),r.sort(it),g=a.size||w(a),g=l.size||w(l),g=a.centerX-l.centerX,rt=a.centerY-l.centerY,it===b))for(h=0;h<l.length;h++)a.splice(h,0,lt(l[h],a,h,ft,g,rt));if(v)for(0>v&&(v=-v),a[0].length>l[0].length&&e(l[0],(a[0].length-l[0].length)/6|0),h=l.length;v>ut;)p=a[h].size||i(a[h]),tt=ct(l,a[h].centerX,a[h].centerY),p=tt[0],d=tt[1],l[h++]=[p,d,p,d,p,d,p,d],l.totalPoints+=8,ut++;for(h=0;h<n.length;h++)c=r[h],s=n[h],v=c.length-s.length,0>v?e(c,-v/6|0):v>0&&e(s,v/6|0),nt&&!s.reversed&&u(s),f=y[h]||0===y[h]?y[h]:"auto",f&&(s.closed||Math.abs(s[0]-s[s.length-2])<.5&&Math.abs(s[1]-s[s.length-1])<.5?"auto"===f||"log"===f?(y[h]=f=ht(s,c,0===h),0>f&&(nt=!0,u(s),f=-f),k(s,6*f)):"reverse"!==f&&(h&&0>f&&u(s),k(s,6*(0>f?-f:f))):!nt&&("auto"===f&&Math.abs(c[0]-s[0])+Math.abs(c[1]-s[1])+Math.abs(c[c.length-2]-s[s.length-2])+Math.abs(c[c.length-1]-s[s.length-1])>Math.abs(c[0]-s[s.length-2])+Math.abs(c[1]-s[s.length-1])+Math.abs(c[c.length-2]-s[0])+Math.abs(c[c.length-1]-s[1])||f%2)?(u(s),y[h]=-1,nt=!0):"auto"===f?y[h]=0:"reverse"===f&&(y[h]=-1),s.closed!==c.closed&&(s.closed=c.closed=!1));return et&&t("shapeIndex:["+y.join(",")+"]"),y}},c=function(n,i,r,u){var e=f(n[0]),o=f(n[1]);d(e,o,i||0===i?i:"auto",r)&&(n[0]=y(e),n[1]=y(o),("log"===u||u===!0)&&t('precompile:["'+n[0]+'","'+n[1]+'"]'))},at=function(n,t,i){return t||i||n||0===n?function(r){c(r,n,t,i)}:c},vt=function(n,t){if(!t)return n;var f,i,e,o=n.match(r)||[],u=o.length,s="";for("reverse"===t?(i=u-1,f=-2):(i=(2*(parseInt(t,10)||0)+1+100*u)%u,f=2),e=0;u>e;e+=2)s+=o[i-1]+","+o[i]+" ",i=(i+f)%u;return s},g=function(n,t){var a,i,h,u,c,f,e,r=0,o=parseFloat(n[0]),s=parseFloat(n[1]),l=o+","+s+" ",v=.999999;for(h=n.length,a=.5*t/(.5*h-1),i=0;h-2>i;i+=2){if(r+=a,f=parseFloat(n[i+2]),e=parseFloat(n[i+3]),r>v)for(c=1/(Math.floor(r)+1),u=1;r>v;)l+=(o+(f-o)*c*u).toFixed(2)+","+(s+(e-s)*c*u).toFixed(2)+" ",r--,u++;l+=f+","+e+" ";o=f;s=e}return l},l=function(n){var i=n[0].match(r)||[],u=n[1].match(r)||[],t=u.length-i.length;t>0?n[0]=g(i,t):n[1]=g(u,-t)},yt=function(n){return isNaN(n)?l:function(t){l(t);t[1]=vt(t[1],parseInt(n,10))}},pt=function(n,t){var u=_gsScope.document.createElementNS("http://www.w3.org/2000/svg","path"),i=Array.prototype.slice.call(n.attributes),r=i.length;for(t=","+t+",";--r>-1;)-1===t.indexOf(","+i[r].nodeName+",")&&u.setAttributeNS(null,i[r].nodeName,i[r].nodeValue);return u},nt=function(n,t){var a,i,u,f,e,d,w,p,g,b,nt,tt,s,o,it,k,rt,c,l,ut,v,h=n.tagName.toLowerCase(),y=.552284749831;return"path"!==h&&n.getBBox?(d=pt(n,"x,y,width,height,cx,cy,rx,ry,r,x1,x2,y1,y2,points"),"rect"===h?(f=+n.getAttribute("rx")||0,e=+n.getAttribute("ry")||0,i=+n.getAttribute("x")||0,u=+n.getAttribute("y")||0,b=(+n.getAttribute("width")||0)-2*f,nt=(+n.getAttribute("height")||0)-2*e,f||e?(tt=i+f*(1-y),s=i+f,o=s+b,it=o+f*y,k=o+f,rt=u+e*(1-y),c=u+e,l=c+nt,ut=l+e*y,v=l+e,a="M"+k+","+c+" V"+l+" C"+[k,ut,it,v,o,v,o-(o-s)/3,v,s+(o-s)/3,v,s,v,tt,v,i,ut,i,l,i,l-(l-c)/3,i,c+(l-c)/3,i,c,i,rt,tt,u,s,u,s+(o-s)/3,u,o-(o-s)/3,u,o,u,it,u,k,rt,k,c].join(",")+"z"):a="M"+(i+b)+","+u+" v"+nt+" h"+-b+" v"+-nt+" h"+b+"z"):"circle"===h||"ellipse"===h?("circle"===h?(f=e=+n.getAttribute("r")||0,p=f*y):(f=+n.getAttribute("rx")||0,e=+n.getAttribute("ry")||0,p=e*y),i=+n.getAttribute("cx")||0,u=+n.getAttribute("cy")||0,w=f*y,a="M"+(i+f)+","+u+" C"+[i+f,u+p,i+w,u+e,i,u+e,i-w,u+e,i-f,u+p,i-f,u,i-f,u-p,i-w,u-e,i,u-e,i+w,u-e,i+f,u-p,i+f,u].join(",")+"z"):"line"===h?a="M"+n.getAttribute("x1")+","+n.getAttribute("y1")+" L"+n.getAttribute("x2")+","+n.getAttribute("y2"):("polyline"===h||"polygon"===h)&&(g=(n.getAttribute("points")+"").match(r)||[],i=g.shift(),u=g.shift(),a="M"+i+","+u+" L"+g.join(","),"polygon"===h&&(a+=","+i+","+u+"z")),d.setAttribute("d",a),t&&n.parentNode&&(n.parentNode.insertBefore(d,n),n.parentNode.removeChild(n)),d):n},a=function(n,i,u){var f,e,o="string"==typeof n;return(!o||rt.test(n)||(n.match(r)||[]).length<3)&&(f=o?s.selector(n):n&&n[0]?n:[n],f&&f[0]?(f=f[0],e=f.nodeName.toUpperCase(),i&&"PATH"!==e&&(f=nt(f,!1),e="PATH"),n=f.getAttribute("PATH"===e?"d":"points")||"",f===u&&(n=f.getAttributeNS(null,"data-original")||n)):(t("WARNING: invalid morph to: "+n),n=!1)),n},tt="Use MorphSVGPlugin.convertToPath(elementOrSelectorText) to convert to a path before morphing.",n=_gsScope._gsDefine.plugin({propName:"morphSVG",API:2,global:!0,version:"0.8.8",init:function(i,r,u,f){var e,o,h,s,c;return"function"!=typeof i.setAttribute?!1:("function"==typeof r&&(r=r(f,i)),e=i.nodeName.toUpperCase(),c="POLYLINE"===e||"POLYGON"===e,"PATH"===e||c?(o="PATH"===e?"d":"points",("string"==typeof r||r.getBBox||r[0])&&(r={shape:r}),s=a(r.shape||r.d||r.points||"","d"===o,i),c&&ut.test(s)?(t("WARNING: a <"+e+"> cannot accept path data. "+tt),!1):(s&&(this._target=i,i.getAttributeNS(null,"data-original")||i.setAttributeNS(null,"data-original",i.getAttribute(o)),h=this._addTween(i,"setAttribute",i.getAttribute(o)+"",s+"","morphSVG",!1,o,"object"==typeof r.precompile?function(n){n[0]=r.precompile[0];n[1]=r.precompile[1]}:"d"===o?at(r.shapeIndex,r.map||n.defaultMap,r.precompile):yt(r.shapeIndex)),h&&(this._overwriteProps.push("morphSVG"),h.end=s,h.endProp=o)),!0)):(t("WARNING: cannot morph a <"+e+"> SVG element. "+tt),!1))},set:function(n){var t;if(this._super.setRatio.call(this,n),1===n)for(t=this._firstPT;t;)t.end&&this._target.setAttribute(t.endProp,t.end),t=t._next}});n.pathFilter=c;n.pointsFilter=l;n.subdivideRawBezier=e;n.defaultMap="size";n.pathDataToRawBezier=function(n){return f(a(n,!0))};n.equalizeSegmentQuantity=d;n.convertToPath=function(n,t){"string"==typeof n&&(n=s.selector(n));for(var i=n&&0!==n.length?n.length&&n[0]&&n[0].nodeType?Array.prototype.slice.call(n,0):[n]:[],r=i.length;--r>-1;)i[r]=nt(i[r],t!==!1);return i};n.pathDataToBezier=function(n,t){var l,r,v,u,o,h,y,i,e=f(a(n,!0))[0]||[],c=0;if(t=t||{},i=t.align||t.relative,u=t.matrix||[1,0,0,1,0,0],o=t.offsetX||0,h=t.offsetY||0,"relative"===i||i===!0?(o-=e[0]*u[0]+e[1]*u[2],h-=e[0]*u[1]+e[1]*u[3],c="+="):(o+=u[4],h+=u[5],i&&(i="string"==typeof i?s.selector(i):i&&i[0]?i:[i],i&&i[0]&&(y=i[0].getBBox()||{x:0,y:0},o-=y.x,h-=y.y))),l=[],v=e.length,u)for(r=0;v>r;r+=2)l.push({x:c+(e[r]*u[0]+e[r+1]*u[2]+o),y:c+(e[r]*u[1]+e[r+1]*u[3]+h)});else for(r=0;v>r;r+=2)l.push({x:c+(e[r]+o),y:c+(e[r+1]+h)});return l}});_gsScope._gsDefine&&_gsScope._gsQueue.pop()(),function(n){"use strict";var t=function(){return(_gsScope.GreenSockGlobals||_gsScope)[n]};"function"==typeof define&&define.amd?define(["TweenLite"],t):"undefined"!=typeof module&&module.exports&&(require("../TweenLite.js"),module.exports=t())}("MorphSVGPlugin");_gsScope="undefined"!=typeof module&&module.exports&&"undefined"!=typeof global?global:this||window;(_gsScope._gsQueue||(_gsScope._gsQueue=[])).push(function(){"use strict";var u=function(n){var t=n.nodeType,i="";if(1===t||9===t||11===t){if("string"==typeof n.textContent)return n.textContent;for(n=n.firstChild;n;n=n.nextSibling)i+=u(n)}else if(3===t||4===t)return n.nodeValue;return i},f=function(n,t){for(var r=t.length,i="";--n>-1;)i+=t[Math.random()*r|0];return i},i=function(n){this.chars=n.split("");this.sets=[];this.length=50;for(var t=0;20>t;t++)this.sets[t]=f(80,this.chars);this.grow=function(n){for(t=0;20>t;t++)this.sets[t]+=f(n-this.length,this.chars);this.length=n}},r="ABCDEFGHIJKLMNOPQRSTUVWXYZ",e=r.toLowerCase(),t={upperCase:new i(r),lowerCase:new i(e),upperAndLowerCase:new i(r+e)},o=_gsScope._gsDefine.plugin({propName:"scrambleText",version:"0.4.0",API:2,overwriteProps:["scrambleText","text"],init:function(n,r,f,e){if(this._prop="innerHTML"in n?"innerHTML":"textContent"in n?"textContent":0,!this._prop)return!1;"function"==typeof r&&(r=r(e,n));this._target=n;"object"!=typeof r&&(r={text:r});var o,c,h,s;return this._delimiter=o=r.delimiter||"",this._original=u(n).replace(/\s+/g," ").split("&nbsp;").join("").split(o),this._text=(r.text||r.value||"").replace(/\s+/g," ").split(o),this._hasClass=!1,"string"==typeof r.newClass&&(this._newClass=r.newClass,this._hasClass=!0),"string"==typeof r.oldClass&&(this._oldClass=r.oldClass,this._hasClass=!0),c=this._text.length-this._original.length,this._length=this._original.join(o).length,this._lengthDif=this._text.join(o).length-this._length,this._fillChar=r.fillChar||r.chars&&-1!==r.chars.indexOf(" ")?"&nbsp;":"",this._charSet=s=t[r.chars||"upperCase"]||new i(r.chars),this._speed=.016/(r.speed||1),this._prevScrambleTime=0,this._setIndex=20*Math.random()|0,h=this._length+Math.max(this._lengthDif,0),h>s.length&&s.grow(h),this._chars=s.sets[this._setIndex],this._revealDelay=r.revealDelay||0,this._tweenLength=r.tweenLength!==!1,this._tween=f,this._rightToLeft=!!r.rightToLeft,!0},set:function(n){var i,f,t,o,s,e,h,c,l=this._text.length,u=this._delimiter,r=this._tween._time,a=r-this._prevScrambleTime;this._revealDelay&&(this._tween.vars.runBackwards&&(r=this._tween._duration-r),n=0===r?0:r<this._revealDelay?1e-6:r===this._tween._duration?1:this._tween._ease.getRatio((r-this._revealDelay)/(this._tween._duration-this._revealDelay)));0>n?n=0:n>1&&(n=1);this._rightToLeft&&(n=1-n);i=n*l+.5|0;n?((a>this._speed||a<-this._speed)&&(this._setIndex=(this._setIndex+(19*Math.random()|0))%20,this._chars=this._charSet.sets[this._setIndex],this._prevScrambleTime+=a),t=this._chars):t=this._original.join(u);this._rightToLeft?1!==n||!this._tween.vars.runBackwards&&"isFromStart"!==this._tween.data?(f=t.substr(0,this._length+(this._tweenLength?1-n*n*n:1)*this._lengthDif-(l-i)+.5|0),t=this._text.slice(i).join(u)):(f="",t=this._original.join(u)):(f=this._text.slice(0,i).join(u),t=t.substr(i,this._length+(this._tweenLength?1-(n=1-n)*n*n*n:1)*this._lengthDif-i+.5|0));this._hasClass?(h=this._rightToLeft?this._oldClass:this._newClass,c=this._rightToLeft?this._newClass:this._oldClass,o=h&&0!==i,s=c&&i!==l,e=(o?"<span class='"+h+"'>":"")+f+(o?"<\/span>":"")+(s?"<span class='"+c+"'>":"")+u+t+(s?"<\/span>":"")):e=f+u+t;this._target[this._prop]="&nbsp;"===this._fillChar&&-1!==e.indexOf("  ")?e.split("  ").join("&nbsp;&nbsp;"):e}}),n=o.prototype;n._newClass=n._oldClass="";for(n in t)t[n.toLowerCase()]=t[n],t[n.toUpperCase()]=t[n]});_gsScope._gsDefine&&_gsScope._gsQueue.pop()(),function(n){"use strict";var t=function(){return(_gsScope.GreenSockGlobals||_gsScope)[n]};"function"==typeof define&&define.amd?define(["TweenLite"],t):"undefined"!=typeof module&&module.exports&&(require("../TweenLite.js"),module.exports=t())}("ScrambleTextPlugin");_gsScope="undefined"!=typeof module&&module.exports&&"undefined"!=typeof global?global:this||window;(_gsScope._gsQueue||(_gsScope._gsQueue=[])).push(function(){"use strict";var t=document.documentElement,n=_gsScope,i=function(i,r){var u="x"===r?"Width":"Height",f="scroll"+u,o="client"+u,e=document.body;return i===n||i===t||i===e?Math.max(t[f],e[f])-(n["inner"+u]||t[o]||e[o]):i[f]-i["offset"+u]},o=function(t){return"string"==typeof t&&(t=TweenLite.selector(t)),t.length&&t!==n&&t[0]&&t[0].style&&!t.nodeType&&(t=t[0]),t===n||t.nodeType&&t.style?t:null},u=function(i,r){var u="scroll"+("x"===r?"Left":"Top");return i===n&&(null!=i.pageXOffset?u="page"+r.toUpperCase()+"Offset":i=null!=t[u]?t:document.body),function(){return i[u]}},f=function(i,r){var e=o(i).getBoundingClientRect(),s=!r||r===n||r===document.body,h=(s?t:r).getBoundingClientRect(),f={x:e.left-h.left,y:e.top-h.top};return!s&&r&&(f.x+=u(r,"x")(),f.y+=u(r,"y")()),f},e=function(n,t,r){var u=typeof n;return"number"===u||"string"===u&&"="===n.charAt(1)?n:"max"===n?i(t,r):Math.min(i(t,r),f(n,t)[r])},r=_gsScope._gsDefine.plugin({propName:"scrollTo",API:2,global:!0,version:"1.8.1",init:function(t,i,r){return this._wdw=t===n,this._target=t,this._tween=r,"object"!=typeof i?(i={y:i},"string"==typeof i.y&&"max"!==i.y&&"="!==i.y.charAt(1)&&(i.x=i.y)):i.nodeType&&(i={y:i,x:i}),this.vars=i,this._autoKill=i.autoKill!==!1,this.getX=u(t,"x"),this.getY=u(t,"y"),this.x=this.xPrev=this.getX(),this.y=this.yPrev=this.getY(),null!=i.x?(this._addTween(this,"x",this.x,e(i.x,t,"x")-(i.offsetX||0),"scrollTo_x",!0),this._overwriteProps.push("scrollTo_x")):this.skipX=!0,null!=i.y?(this._addTween(this,"y",this.y,e(i.y,t,"y")-(i.offsetY||0),"scrollTo_y",!0),this._overwriteProps.push("scrollTo_y")):this.skipY=!0,!0},set:function(t){this._super.setRatio.call(this,t);var f=this._wdw||!this.skipX?this.getX():this.xPrev,e=this._wdw||!this.skipY?this.getY():this.yPrev,o=e-this.yPrev,s=f-this.xPrev,u=r.autoKillThreshold;this.x<0&&(this.x=0);this.y<0&&(this.y=0);this._autoKill&&(!this.skipX&&(s>u||-u>s)&&f<i(this._target,"x")&&(this.skipX=!0),!this.skipY&&(o>u||-u>o)&&e<i(this._target,"y")&&(this.skipY=!0),this.skipX&&this.skipY&&(this._tween.kill(),this.vars.onAutoKill&&this.vars.onAutoKill.apply(this.vars.onAutoKillScope||this._tween,this.vars.onAutoKillParams||[])));this._wdw?n.scrollTo(this.skipX?f:this.x,this.skipY?e:this.y):(this.skipY||(this._target.scrollTop=this.y),this.skipX||(this._target.scrollLeft=this.x));this.xPrev=this.x;this.yPrev=this.y}}),s=r.prototype;r.max=i;r.getOffset=f;r.autoKillThreshold=7;s._kill=function(n){return n.scrollTo_x&&(this.skipX=!0),n.scrollTo_y&&(this.skipY=!0),this._super._kill.call(this,n)}});_gsScope._gsDefine&&_gsScope._gsQueue.pop()(),function(n){"use strict";var t=function(){return(_gsScope.GreenSockGlobals||_gsScope)[n]};"function"==typeof define&&define.amd?define(["TweenLite"],t):"undefined"!=typeof module&&module.exports&&(require("../TweenLite.js"),module.exports=t())}("ScrollToPlugin");_gsScope="undefined"!=typeof module&&module.exports&&"undefined"!=typeof global?global:this||window;!function(n){"use strict";var e=n.GreenSockGlobals||n,g=function(n){for(var r=n.split("."),i=e,t=0;t<r.length;t++)i[r[t]]=i=i[r[t]]||{};return i},nt=g("com.greensock.utils"),o=function(n){var t=n.nodeType,i="";if(1===t||9===t||11===t){if("string"==typeof n.textContent)return n.textContent;for(n=n.firstChild;n;n=n.nextSibling)i+=o(n)}else if(3===t||4===t)return n.nodeValue;return i},i=document,s=i.defaultView?i.defaultView.getComputedStyle:function(){},tt=/([A-Z])/g,t=function(n,t,i,r){var u;return(i=i||s(n,null))?(n=i.getPropertyValue(t.replace(tt,"-$1").toLowerCase()),u=n||i.length?n:i[t]):n.currentStyle&&(i=n.currentStyle,u=i[t]),r?u:parseInt(u,10)||0},h=function(n){return n.length&&n[0]&&(n[0].nodeType&&n[0].style&&!n.nodeType||n[0].length&&n[0][0])?!0:!1},it=function(n){for(var t,i,u=[],f=n.length,r=0;f>r;r++)if(t=n[r],h(t))for(i=t.length,i=0;i<t.length;i++)u.push(t[i]);else u.push(t);return u},rt=/(?:\r|\n|\t\t)/g,ut=/(?:\s\s+)/g,c=55296,ft=56319,et=56320,l=127462,a=127487,ot=127995,st=127999,v=function(n){return(n.charCodeAt(0)-c<<10)+(n.charCodeAt(1)-et)+65536},ht=i.all&&!i.addEventListener,ct=" style='position:relative;display:inline-block;"+(ht?"*display:inline;*zoom:1;'":"'"),y=function(n,t){n=n||"";var i=-1!==n.indexOf("++"),r=1;return i&&(n=n.split("++").join("")),function(){return"<"+t+ct+(n?" class='"+n+(i?r++:"")+"'>":">")}},r=nt.SplitText=e.SplitText=function(n,t){if("string"==typeof n&&(n=r.selector(n)),!n)throw"cannot split a null element.";this.elements=h(n)?it(n):[n];this.chars=[];this.words=[];this.lines=[];this._originals=[];this.vars=t||{};this.split(t)},u=function(n,t,i){var r=n.nodeType;if(1===r||9===r||11===r)for(n=n.firstChild;n;n=n.nextSibling)u(n,t,i);else(3===r||4===r)&&(n.nodeValue=n.nodeValue.split(t).join(i))},f=function(n,t){for(var i=t.length;--i>-1;)n.push(t[i])},p=function(n){for(var i=[],r=n.length,t=0;t!==r;i.push(n[t++]));return i},w=function(n,t,i){for(var r;n&&n!==t;){if(r=n._next||n.nextSibling)return r.textContent.charAt(0)===i;n=n.parentNode||n._parent}return!1},b=function(n){for(var t,r=p(n.childNodes),u=r.length,i=0;u>i;i++)t=r[i],t._isSplit?b(t):(i&&3===t.previousSibling.nodeType?t.previousSibling.nodeValue+=3===t.nodeType?t.nodeValue:t.firstChild.nodeValue:3!==t.nodeType&&n.insertBefore(t.firstChild,t),n.removeChild(t))},lt=function(n,r,e,o,h,c,l){var v,nt,tt,a,et,it,ft,vt,rt,y,yt,k,d=s(n),pt=t(n,"paddingLeft",d),wt=-999,ni=t(n,"borderBottomWidth",d)+t(n,"borderTopWidth",d),ti=t(n,"borderLeftWidth",d)+t(n,"borderRightWidth",d),ii=t(n,"paddingTop",d)+t(n,"paddingBottom",d),ri=t(n,"paddingLeft",d)+t(n,"paddingRight",d),ui=.2*t(n,"fontSize"),fi=t(n,"textAlign",d,!0),ct=[],bt=[],kt=[],lt=r.wordDelimiter||" ",dt=r.span?"span":"div",at=r.type||r.split||"chars,words,lines",g=h&&-1!==at.indexOf("lines")?[]:null,ut=-1!==at.indexOf("words"),ot=-1!==at.indexOf("chars"),p="absolute"===r.position||r.absolute===!0,st=r.linesClass,gt=-1!==(st||"").indexOf("++"),ht=[];for(g&&1===n.children.length&&n.children[0]._isSplit&&(n=n.children[0]),gt&&(st=st.split("++").join("")),nt=n.getElementsByTagName("*"),tt=nt.length,et=[],v=0;tt>v;v++)et[v]=nt[v];if(g||p)for(v=0;tt>v;v++)a=et[v],it=a.parentNode===n,(it||p||ot&&!ut)&&(k=a.offsetTop,g&&it&&Math.abs(k-wt)>ui&&"BR"!==a.nodeName&&(ft=[],g.push(ft),wt=k),p&&(a._x=a.offsetLeft,a._y=k,a._w=a.offsetWidth,a._h=a.offsetHeight),g&&((a._isSplit&&it||!ot&&it||ut&&it||!ut&&a.parentNode.parentNode===n&&!a.parentNode._isSplit)&&(ft.push(a),a._x-=pt,w(a,n,lt)&&(a._wordEnd=!0)),"BR"===a.nodeName&&a.nextSibling&&"BR"===a.nextSibling.nodeName&&g.push([])));for(v=0;tt>v;v++)a=et[v],it=a.parentNode===n,"BR"!==a.nodeName?(p&&(rt=a.style,ut||it||(a._x+=a.parentNode._x,a._y+=a.parentNode._y),rt.left=a._x+"px",rt.top=a._y+"px",rt.position="absolute",rt.display="block",rt.width=a._w+1+"px",rt.height=a._h+"px"),!ut&&ot?a._isSplit?(a._next=a.nextSibling,a.parentNode.appendChild(a)):a.parentNode._isSplit?(a._parent=a.parentNode,!a.previousSibling&&a.firstChild&&(a.firstChild._isFirst=!0),a.nextSibling&&" "===a.nextSibling.textContent&&!a.nextSibling.nextSibling&&ht.push(a.nextSibling),a._next=a.nextSibling&&a.nextSibling._isFirst?null:a.nextSibling,a.parentNode.removeChild(a),et.splice(v--,1),tt--):it||(k=!a.nextSibling&&w(a.parentNode,n,lt),a.parentNode._parent&&a.parentNode._parent.appendChild(a),k&&a.parentNode.appendChild(i.createTextNode(" ")),r.span&&(a.style.display="inline"),ct.push(a)):a.parentNode._isSplit&&!a._isSplit&&""!==a.innerHTML?bt.push(a):ot&&!a._isSplit&&(r.span&&(a.style.display="inline"),ct.push(a))):g||p?(a.parentNode&&a.parentNode.removeChild(a),et.splice(v--,1),tt--):ut||n.appendChild(a);for(v=ht.length;--v>-1;)ht[v].parentNode.removeChild(ht[v]);if(g){for(p&&(y=i.createElement(dt),n.appendChild(y),yt=y.offsetWidth+"px",k=y.offsetParent===n?0:n.offsetLeft,n.removeChild(y)),rt=n.style.cssText,n.style.cssText="display:none;";n.firstChild;)n.removeChild(n.firstChild);for(vt=" "===lt&&(!p||!ut&&!ot),v=0;v<g.length;v++){for(ft=g[v],y=i.createElement(dt),y.style.cssText="display:block;text-align:"+fi+";position:"+(p?"absolute;":"relative;"),st&&(y.className=st+(gt?v+1:"")),kt.push(y),tt=ft.length,nt=0;tt>nt;nt++)"BR"!==ft[nt].nodeName&&(a=ft[nt],y.appendChild(a),vt&&a._wordEnd&&y.appendChild(i.createTextNode(" ")),p&&(0===nt&&(y.style.top=a._y+"px",y.style.left=pt+k+"px"),a.style.top="0px",k&&(a.style.left=a._x-k+"px")));0===tt?y.innerHTML="&nbsp;":ut||ot||(b(y),u(y,String.fromCharCode(160)," "));p&&(y.style.width=yt,y.style.height=a._h+"px");n.appendChild(y)}n.style.cssText=rt}p&&(l>n.clientHeight&&(n.style.height=l-ii+"px",n.clientHeight<l&&(n.style.height=l+ni+"px")),c>n.clientWidth&&(n.style.width=c-ri+"px",n.clientWidth<c&&(n.style.width=c+ti+"px")));f(e,ct);f(o,bt);f(h,kt)},at=function(n,t,r,f){var e,h,s,w,g,y,nt,tt,p,it=t.span?"span":"div",lt=t.type||t.split||"chars,words,lines",et=(-1!==lt.indexOf("words"),-1!==lt.indexOf("chars")),vt="absolute"===t.position||t.absolute===!0,b=t.wordDelimiter||" ",k=" "!==b?"":vt?"&#173; ":" ",at=t.span?"<\/span>":"<\/div>",d=!0,ht=i.createElement("div"),ct=n.parentNode;for(ct.insertBefore(ht,n),ht.textContent=n.nodeValue,ct.removeChild(n),n=ht,e=o(n),nt=-1!==e.indexOf("<"),t.reduceWhiteSpace!==!1&&(e=e.replace(ut," ").replace(rt,"")),nt&&(e=e.split("<").join("{{LT}}")),g=e.length,h=(" "===e.charAt(0)?k:"")+r(),s=0;g>s;s++)if(y=e.charAt(s),y===b&&e.charAt(s-1)!==b&&s){for(h+=d?at:"",d=!1;e.charAt(s+1)===b;)h+=k,s++;s===g-1?h+=k:")"!==e.charAt(s+1)&&(h+=k+r(),d=!0)}else"{"===y&&"{{LT}}"===e.substr(s,6)?(h+=et?f()+"{{LT}}<\/"+it+">":"{{LT}}",s+=5):y.charCodeAt(0)>=c&&y.charCodeAt(0)<=ft||e.charCodeAt(s+1)>=65024&&e.charCodeAt(s+1)<=65039?(tt=v(e.substr(s,2)),p=v(e.substr(s+2,2)),w=tt>=l&&a>=tt&&p>=l&&a>=p||p>=ot&&st>=p?4:2,h+=et&&" "!==y?f()+e.substr(s,w)+"<\/"+it+">":e.substr(s,w),s+=w-1):h+=et&&" "!==y?f()+y+"<\/"+it+">":y;n.outerHTML=h+(d?at:"");nt&&u(ct,"{{LT}}","<")},k=function(n,i,r,u){var e,f,o=p(n.childNodes),s=o.length,h="absolute"===i.position||i.absolute===!0;if(3!==n.nodeType||s>1){for(i.absolute=!1,e=0;s>e;e++)f=o[e],(3!==f.nodeType||/\S+/.test(f.nodeValue))&&(h&&3!==f.nodeType&&"inline"===t(f,"display",null,!0)&&(f.style.display="inline-block",f.style.position="relative"),f._isSplit=!0,k(f,i,r,u));return i.absolute=h,void(n._isSplit=!0)}at(n,i,r,u)},d=r.prototype;d.split=function(n){this.isSplit&&this.revert();this.vars=n=n||this.vars;this._originals.length=this.chars.length=this.words.length=this.lines.length=0;for(var r,u,t,i=this.elements.length,f=n.span?"span":"div",e=("absolute"===n.position||n.absolute===!0,y(n.wordsClass,f)),o=y(n.charsClass,f);--i>-1;)t=this.elements[i],this._originals[i]=t.innerHTML,r=t.clientHeight,u=t.clientWidth,k(t,n,e,o),lt(t,n,this.chars,this.words,this.lines,u,r);return this.chars.reverse(),this.words.reverse(),this.lines.reverse(),this.isSplit=!0,this};d.revert=function(){if(!this._originals)throw"revert() call wasn't scoped properly.";for(var n=this._originals.length;--n>-1;)this.elements[n].innerHTML=this._originals[n];return this.chars=[],this.words=[],this.lines=[],this.isSplit=!1,this};r.selector=n.$||n.jQuery||function(t){var i=n.$||n.jQuery;return i?(r.selector=i,i(t)):"undefined"==typeof document?t:document.querySelectorAll?document.querySelectorAll(t):document.getElementById("#"===t.charAt(0)?t.substr(1):t)};r.version="0.5.6"}(_gsScope),function(n){"use strict";var t=function(){return(_gsScope.GreenSockGlobals||_gsScope)[n]};"function"==typeof define&&define.amd?define([],t):"undefined"!=typeof module&&module.exports&&(module.exports=t())}("SplitText");_gsScope="undefined"!=typeof module&&module.exports&&"undefined"!=typeof global?global:this||window;(_gsScope._gsQueue||(_gsScope._gsQueue=[])).push(function(){"use strict";_gsScope._gsDefine("plugins.ThrowPropsPlugin",["plugins.TweenPlugin","TweenLite","easing.Ease","utils.VelocityTracker"],function(n,t,i,r){var e,f,l,a,u=function(){n.call(this,"throwProps");this._overwriteProps.length=0},o=999999999999999,v=1e-10,g=_gsScope._gsDefine.globals,s=!1,y={x:1,y:1,z:2,scale:1,scaleX:1,scaleY:1,rotation:1,rotationZ:1,rotationX:2,rotationY:2,skewX:1,skewY:1,xPercent:1,yPercent:1},p=function(n,t,i,r,u){var e,f,c,l,s=t.length,a=0,h=o;if("object"==typeof n){for(;--s>-1;){e=t[s];f=0;for(c in n)l=e[c]-n[c],f+=l*l;h>f&&(a=s,h=f)}if(o>(u||o)&&u<Math.sqrt(h))return n}else for(;--s>-1;)e=t[s],f=e-n,0>f&&(f=-f),h>f&&e>=r&&i>=e&&(a=s,h=f);return t[a]},w=function(n,t,i,r,u,f){if("auto"===n.end)return n;var e,h,s=n.end;if(i=isNaN(i)?o:i,r=isNaN(r)?-o:r,"object"==typeof t){if(e=t.calculated?t:("function"==typeof s?s(t):p(t,s,i,r,f))||t,!t.calculated){for(h in e)t[h]=e[h];t.calculated=!0}e=e[u]}else e="function"==typeof s?s(t):s instanceof Array?p(t,s,i,r,f):Number(s);return e>i?e=i:r>e&&(e=r),{max:e,min:e,unitFactor:n.unitFactor}},b=function(n,t,i){for(var r in t)void 0===n[r]&&r!==i&&(n[r]=t[r]);return n},c=u.calculateChange=function(n,r,u,f){null==f&&(f=.05);var e=r instanceof i?r:r?new i(r):t.defaultEase;return u*f*n/e.getRatio(f)},k=u.calculateDuration=function(n,r,u,f,e){e=e||.05;var o=f instanceof i?f:f?new i(f):t.defaultEase;return Math.abs((r-n)*o.getRatio(e)/u/e)},d=u.calculateTweenDuration=function(n,f,e,o,h,l){if("string"==typeof n&&(n=t.selector(n)),!n)return 0;null==e&&(e=10);null==o&&(o=.2);null==h&&(h=1);n.length&&(n=n[0]||n);var y,a,ut,p,tt,it,ht,rt,d,ft,ot,vt,ct,nt=0,et=9999999999,g=f.throwProps||f,lt=f.ease instanceof i?f.ease:f.ease?new i(f.ease):t.defaultEase,at=isNaN(g.checkpoint)?.05:Number(g.checkpoint),st=isNaN(g.resistance)?u.defaultResistance:Number(g.resistance);if(g.linkedProps)for(vt=g.linkedProps.split(","),ot={},ct=0;ct<vt.length;ct++)y=vt[ct],a=g[y],a&&(void 0!==a.velocity&&"number"==typeof a.velocity?p=Number(a.velocity)||0:(d=d||r.getByTarget(n),p=d&&d.isTrackingProp(y)?d.getVelocity(y):0),tt=isNaN(a.resistance)?st:Number(a.resistance),ut=p*tt>0?p/tt:p/-tt,it="function"==typeof n[y]?n[y.indexOf("set")||"function"!=typeof n["get"+y.substr(3)]?y:"get"+y.substr(3)]():n[y]||0,ot[y]=it+c(p,lt,ut,at));for(y in g)"resistance"!==y&&"checkpoint"!==y&&"preventOvershoot"!==y&&"linkedProps"!==y&&"radius"!==y&&(a=g[y],"object"!=typeof a&&(d=d||r.getByTarget(n),d&&d.isTrackingProp(y)?a="number"==typeof a?{velocity:a}:{velocity:d.getVelocity(y)}:(p=Number(a)||0,ut=p*st>0?p/st:p/-st)),"object"==typeof a&&(void 0!==a.velocity&&"number"==typeof a.velocity?p=Number(a.velocity)||0:(d=d||r.getByTarget(n),p=d&&d.isTrackingProp(y)?d.getVelocity(y):0),tt=isNaN(a.resistance)?st:Number(a.resistance),ut=p*tt>0?p/tt:p/-tt,it="function"==typeof n[y]?n[y.indexOf("set")||"function"!=typeof n["get"+y.substr(3)]?y:"get"+y.substr(3)]():n[y]||0,ht=it+c(p,lt,ut,at),void 0!==a.end&&(a=w(a,ot&&y in ot?ot:ht,a.max,a.min,y,g.radius),(l||s)&&(g[y]=b(a,g[y],"end"))),void 0!==a.max&&ht>Number(a.max)+v?(ft=a.unitFactor||u.defaultUnitFactors[y]||1,rt=it>a.max&&a.min!==a.max||p*ft>-15&&45>p*ft?o+.1*(e-o):k(it,a.max,p,lt,at),et>rt+h&&(et=rt+h)):void 0!==a.min&&ht<Number(a.min)-v&&(ft=a.unitFactor||u.defaultUnitFactors[y]||1,rt=it<a.min&&a.min!==a.max||p*ft>-45&&15>p*ft?o+.1*(e-o):k(it,a.min,p,lt,at),et>rt+h&&(et=rt+h)),rt>nt&&(nt=rt)),ut>nt&&(nt=ut));return nt>et&&(nt=et),nt>e?e:o>nt?o:nt},h=u.prototype=new n("throwProps");return h.constructor=u,u.version="0.11.0",u.API=2,u._autoCSS=!0,u.defaultResistance=100,u.defaultUnitFactors={time:1e3,totalTime:1e3},u.track=function(n,t,i){return r.track(n,t,i)},u.untrack=function(n,t){r.untrack(n,t)},u.isTracking=function(n,t){return r.isTracking(n,t)},u.getVelocity=function(n,t){var i=r.getByTarget(n);return i?i.getVelocity(t):NaN},u._cssRegister=function(){var t=g.com.greensock.plugins.CSSPlugin;if(t){var n=t._internals,i=n._parseToProxy,o=n._setPluginRatio,s=n.CSSPropTween;n._registerComplexSpecialProp("throwProps",{parser:function(n,t,h,c,l,a){a=new u;var rt,p,v,k,w,b={},d={},g={},nt={},tt={},it={};f={};for(v in t)"resistance"!==v&&"preventOvershoot"!==v&&"linkedProps"!==v&&"radius"!==v&&(p=t[v],"object"==typeof p?(void 0!==p.velocity&&"number"==typeof p.velocity?b[v]=Number(p.velocity)||0:(w=w||r.getByTarget(n),b[v]=w&&w.isTrackingProp(v)?w.getVelocity(v):0),void 0!==p.end&&(nt[v]=p.end),void 0!==p.min&&(d[v]=p.min),void 0!==p.max&&(g[v]=p.max),p.preventOvershoot&&(it[v]=!0),void 0!==p.resistance&&(rt=!0,tt[v]=p.resistance)):"number"==typeof p?b[v]=p:(w=w||r.getByTarget(n),b[v]=w&&w.isTrackingProp(v)?w.getVelocity(v):p||0),y[v]&&c._enableTransforms(2===y[v]));k=i(n,b,c,l,a);e=k.proxy;b=k.end;for(v in e)f[v]={velocity:b[v],min:d[v],max:g[v],end:nt[v],resistance:tt[v],preventOvershoot:it[v]};return null!=t.resistance&&(f.resistance=t.resistance),null!=t.linkedProps&&(f.linkedProps=t.linkedProps),null!=t.radius&&(f.radius=t.radius),t.preventOvershoot&&(f.preventOvershoot=!0),l=new s(n,"throwProps",0,0,k.pt,2),c._overwriteProps.pop(),l.plugin=a,l.setRatio=o,l.data=k,a._onInitTween(e,f,c._tween),l}})}},u.to=function(n,i,r,u,o){i.throwProps||(i={throwProps:i});0===o&&(i.throwProps.preventOvershoot=!0);s=!0;var h=new t(n,u||1,i);return h.render(0,!0,!0),h.vars.css?(h.duration(d(e,{throwProps:f,ease:i.ease},r,u,o)),h._delay&&!h.vars.immediateRender?h.invalidate():l._onInitTween(e,a,h),s=!1,h):(h.kill(),h=new t(n,d(n,i,r,u,o),i),s=!1,h)},h._onInitTween=function(n,t,i,u){this.target=n;this._props=[];l=this;a=t;var f,e,h,nt,v,y,k,d,o,p,tt,g,it=i._ease,rt=isNaN(t.checkpoint)?.05:Number(t.checkpoint),ut=i._duration,ft=t.preventOvershoot,et=0;if(t.linkedProps)for(tt=t.linkedProps.split(","),p={},g=0;g<tt.length;g++)f=tt[g],e=t[f],e&&(void 0!==e.velocity&&"number"==typeof e.velocity?v=Number(e.velocity)||0:(o=o||r.getByTarget(n),v=o&&o.isTrackingProp(f)?o.getVelocity(f):0),h="function"==typeof n[f]?n[f.indexOf("set")||"function"!=typeof n["get"+f.substr(3)]?f:"get"+f.substr(3)]():n[f]||0,p[f]=h+c(v,it,ut,rt));for(f in t)if("resistance"!==f&&"checkpoint"!==f&&"preventOvershoot"!==f&&"linkedProps"!==f&&"radius"!==f){if(e=t[f],"function"==typeof e&&(e=e(u,n)),"number"==typeof e)v=Number(e)||0;else if("object"!=typeof e||isNaN(e.velocity)){if(o=o||r.getByTarget(n),!o||!o.isTrackingProp(f))throw"ERROR: No velocity was defined in the throwProps tween of "+n+" property: "+f;v=o.getVelocity(f)}else v=Number(e.velocity);y=c(v,it,ut,rt);d=0;nt="function"==typeof n[f];h=nt?n[f.indexOf("set")||"function"!=typeof n["get"+f.substr(3)]?f:"get"+f.substr(3)]():n[f];"object"==typeof e&&(k=h+y,void 0!==e.end&&(e=w(e,p&&f in p?p:k,e.max,e.min,f,t.radius),s&&(t[f]=b(e,t[f],"end"))),void 0!==e.max&&Number(e.max)<k?ft||e.preventOvershoot?y=e.max-h:d=e.max-h-y:void 0!==e.min&&Number(e.min)>k&&(ft||e.preventOvershoot?y=e.min-h:d=e.min-h-y));this._overwriteProps[et]=f;this._props[et++]={p:f,s:h,c1:y,c2:d,f:nt,r:!1}}return!0},h._kill=function(t){for(var i=this._props.length;--i>-1;)null!=t[this._props[i].p]&&this._props.splice(i,1);return n.prototype._kill.call(this,t)},h._mod=function(n){for(var t,i=this._props,r=i.length;--r>-1;)t=n[i[r].p]||n.throwProps,"function"==typeof t&&(i[r].m=t)},h.setRatio=function(n){for(var t,i,r=this._props.length;--r>-1;)t=this._props[r],i=t.s+t.c1*n+t.c2*n*n,t.m?i=t.m(i,this.target):1===n&&(i=(1e4*i+(0>i?-.5:.5)|0)/1e4),t.f?this.target[t.p](i):this.target[t.p]=i},n.activate([u]),u},!0);_gsScope._gsDefine("utils.VelocityTracker",["TweenLite"],function(n){var t,s,f,h,v=/([A-Z])/g,y={},c=_gsScope.document,l={x:1,y:1,z:2,scale:1,scaleX:1,scaleY:1,rotation:1,rotationZ:1,rotationX:2,rotationY:2,skewX:1,skewY:1,xPercent:1,yPercent:1},p=c.defaultView?c.defaultView.getComputedStyle:function(){},e=function(n,t,i){var r=(n._gsTransform||y)[t];return r||0===r?r:(n.style[t]?r=n.style[t]:(i=i||p(n,null))?r=i[t]||i.getPropertyValue(t)||i.getPropertyValue(t.replace(v,"-$1").toLowerCase()):n.currentStyle&&(r=n.currentStyle[t]),parseFloat(r)||0)},r=n.ticker,a=function(n,t,i){this.p=n;this.f=t;this.v1=this.v2=0;this.t1=this.t2=r.time;this.css=!1;this.type="";this._prev=null;i&&(this._next=i,i._prev=this)},w=function(){var o,n,i=t,u=r.time;if(u-f>=.03)for(h=f,f=u;i;){for(n=i._firstVP;n;)o=n.css?e(i.target,n.p):n.f?i.target[n.p]():i.target[n.p],(o!==n.v1||u-n.t1>.15)&&(n.v2=n.v1,n.v1=o,n.t2=n.t1,n.t1=u),n=n._next;i=i._next}},i=function(n){this._lookup={};this.target=n;this.elem=n.style&&n.nodeType?!0:!1;s||(r.addEventListener("tick",w,null,!1,-100),f=h=r.time,s=!0);t&&(this._next=t,t._prev=this);t=this},o=i.getByTarget=function(n){for(var i=t;i;){if(i.target===n)return i;i=i._next}},u=i.prototype;return u.addProp=function(t,i){if(!this._lookup[t]){var u=this.target,f="function"==typeof u[t],o=f?this._altProp(t):t,r=this._firstVP;this._firstVP=this._lookup[t]=this._lookup[o]=r=new a(o!==t&&0===t.indexOf("set")?o:t,f,r);r.css=this.elem&&(void 0!==this.target.style[r.p]||l[r.p]);r.css&&l[r.p]&&!u._gsTransform&&n.set(u,{x:"+=0",overwrite:!1});r.type=i||r.css&&0===t.indexOf("rotation")?"deg":"";r.v1=r.v2=r.css?e(u,r.p):f?u[r.p]():u[r.p]}},u.removeProp=function(n){var t=this._lookup[n];t&&(t._prev?t._prev._next=t._next:t===this._firstVP&&(this._firstVP=t._next),t._next&&(t._next._prev=t._prev),this._lookup[n]=0,t.f&&(this._lookup[this._altProp(n)]=0))},u.isTrackingProp=function(n){return this._lookup[n]instanceof a},u.getVelocity=function(n){var o,i,u,t=this._lookup[n],f=this.target;if(!t)throw"The velocity of "+n+" is not being tracked.";return o=t.css?e(f,t.p):t.f?f[t.p]():f[t.p],i=o-t.v2,("rad"===t.type||"deg"===t.type)&&(u="rad"===t.type?2*Math.PI:360,i%=u,i!==i%(u/2)&&(i=0>i?i+u:i-u)),i/(r.time-t.t2)},u._altProp=function(n){var t=n.substr(0,3),i=("get"===t?"set":"set"===t?"get":t)+n.substr(3);return"function"==typeof this.target[i]?i:n},i.getByTarget=function(i){var r=t;for("string"==typeof i&&(i=n.selector(i)),i.length&&i!==window&&i[0]&&i[0].style&&!i.nodeType&&(i=i[0]);r;){if(r.target===i)return r;r=r._next}},i.track=function(n,t,r){var u=o(n),e=t.split(","),f=e.length;for(r=(r||"").split(","),u||(u=new i(n));--f>-1;)u.addProp(e[f],r[f]||r[0]);return u},i.untrack=function(n,i){var r=o(n),u=(i||"").split(","),f=u.length;if(r){for(;--f>-1;)r.removeProp(u[f]);r._firstVP&&i||(r._prev?r._prev._next=r._next:r===t&&(t=r._next),r._next&&(r._next._prev=r._prev))}},i.isTracking=function(n,t){var i=o(n);return i?!t&&i._firstVP?!0:i.isTrackingProp(t):!1},i},!0)});_gsScope._gsDefine&&_gsScope._gsQueue.pop()(),function(n){"use strict";var t=function(){return(_gsScope.GreenSockGlobals||_gsScope)[n]};"function"==typeof define&&define.amd?define(["TweenLite"],t):"undefined"!=typeof module&&module.exports&&(require("../TweenLite.js"),module.exports=t())}("ThrowPropsPlugin"),function(){var n;window.AmCharts?n=window.AmCharts:(n={},window.AmCharts=n,n.themes={},n.maps={},n.inheriting={},n.charts=[],n.onReadyArray=[],n.useUTC=!1,n.updateRate=60,n.uid=0,n.lang={},n.translations={},n.mapTranslations={},n.windows={},n.initHandlers=[],n.amString="am",n.pmString="pm");n.Class=function(t){var i=function(){arguments[0]!==n.inheriting&&(this.events={},this.construct.apply(this,arguments))},r;t.inherits?(i.prototype=new t.inherits(n.inheriting),i.base=t.inherits.prototype,delete t.inherits):(i.prototype.createEvents=function(){for(var n=0;n<arguments.length;n++)this.events[arguments[n]]=[]},i.prototype.listenTo=function(n,t,i){this.removeListener(n,t,i);n.events[t].push({handler:i,scope:this})},i.prototype.addListener=function(n,t,i){this.removeListener(this,n,t);n&&this.events[n]&&this.events[n].push({handler:t,scope:i})},i.prototype.removeListener=function(n,t,i){if(n&&n.events&&(n=n.events[t]))for(t=n.length-1;0<=t;t--)n[t].handler===i&&n.splice(t,1)},i.prototype.fire=function(n){for(var r,i=this.events[n.type],t=0;t<i.length;t++)r=i[t],r.handler.call(r.scope,n)});for(r in t)i.prototype[r]=t[r];return i};n.addChart=function(t){window.requestAnimationFrame?n.animationRequested||(n.animationRequested=!0,window.requestAnimationFrame(n.update)):n.updateInt||(n.updateInt=setInterval(function(){n.update()},Math.round(1e3/n.updateRate)));n.charts.push(t)};n.removeChart=function(t){for(var i=n.charts,r=i.length-1;0<=r;r--)i[r]==t&&i.splice(r,1);0===i.length&&(n.requestAnimation&&(window.cancelAnimationFrame(n.requestAnimation),n.animationRequested=!1),n.updateInt&&(clearInterval(n.updateInt),n.updateInt=NaN))};n.isModern=!0;n.getIEVersion=function(){var n=0,t,i;return"Microsoft Internet Explorer"==navigator.appName&&(t=navigator.userAgent,i=/MSIE ([0-9]{1,}[.0-9]{0,})/,null!==i.exec(t)&&(n=parseFloat(RegExp.$1))),n};n.applyLang=function(t,i){var r=n.translations;i.dayNames=n.extend({},n.dayNames);i.shortDayNames=n.extend({},n.shortDayNames);i.monthNames=n.extend({},n.monthNames);i.shortMonthNames=n.extend({},n.shortMonthNames);i.amString="am";i.pmString="pm";r&&(r=r[t])&&(n.lang=r,i.langObj=r,r.monthNames&&(i.dayNames=n.extend({},r.dayNames),i.shortDayNames=n.extend({},r.shortDayNames),i.monthNames=n.extend({},r.monthNames),i.shortMonthNames=n.extend({},r.shortMonthNames)),r.am&&(i.amString=r.am),r.pm&&(i.pmString=r.pm));n.amString=i.amString;n.pmString=i.pmString};n.IEversion=n.getIEVersion();9>n.IEversion&&0<n.IEversion&&(n.isModern=!1,n.isIE=!0);n.dx=0;n.dy=0;(document.addEventListener||window.opera)&&(n.isNN=!0,n.isIE=!1,n.dx=.5,n.dy=.5);document.attachEvent&&(n.isNN=!1,n.isIE=!0,n.isModern||(n.dx=0,n.dy=0));window.chrome&&(n.chrome=!0);n.handleMouseUp=function(t){for(var r,u=n.charts,i=0;i<u.length;i++)r=u[i],r&&r.handleReleaseOutside&&r.handleReleaseOutside(t)};n.handleMouseMove=function(t){for(var r,u=n.charts,i=0;i<u.length;i++)r=u[i],r&&r.handleMouseMove&&r.handleMouseMove(t)};n.handleKeyUp=function(t){for(var r,u=n.charts,i=0;i<u.length;i++)r=u[i],r&&r.handleKeyUp&&r.handleKeyUp(t)};n.handleWheel=function(t){for(var i,u=n.charts,r=0;r<u.length;r++)if(i=u[r],i&&i.mouseIsOver){(i.mouseWheelScrollEnabled||i.mouseWheelZoomEnabled)&&i.handleWheel&&(i.handleMouseMove(t),i.handleWheel(t));break}};n.resetMouseOver=function(){for(var r,i=n.charts,t=0;t<i.length;t++)r=i[t],r&&(r.mouseIsOver=!1)};n.ready=function(t){n.onReadyArray.push(t)};n.handleLoad=function(){var i,t,r;for(n.isReady=!0,i=n.onReadyArray,t=0;t<i.length;t++)r=i[t],isNaN(n.processDelay)?r():setTimeout(r,n.processDelay*t);n.onReadyArray=[]};n.addInitHandler=function(t,i){n.initHandlers.push({method:t,types:i})};n.callInitHandler=function(t){var u=n.initHandlers,r,i;if(n.initHandlers)for(r=0;r<u.length;r++)i=u[r],i.types?n.isInArray(i.types,t.type)&&i.method(t):i.method(t)};n.getUniqueId=function(){return n.uid++,"AmChartsEl-"+n.uid};n.addGlobalListeners=function(){n.globalListenersAdded||(n.globalListenersAdded=!0,n.isNN&&(document.addEventListener("mousemove",n.handleMouseMove),document.addEventListener("keyup",n.handleKeyUp),document.addEventListener("mouseup",n.handleMouseUp,!0),window.addEventListener("load",n.handleLoad,!0)),n.isIE&&(document.attachEvent("onmousemove",n.handleMouseMove),document.attachEvent("onmouseup",n.handleMouseUp),window.attachEvent("onload",n.handleLoad)))};n.addGlobalListeners();n.addWheelListeners=function(){n.wheelIsListened||(n.isNN&&(window.addEventListener("DOMMouseScroll",n.handleWheel,{passive:!1,useCapture:!0}),document.addEventListener("mousewheel",n.handleWheel,{passive:!1,useCapture:!0})),n.isIE&&document.attachEvent("onmousewheel",n.handleWheel));n.wheelIsListened=!0};n.clear=function(){var i=n.charts,t;if(i)for(t=i.length-1;0<=t;t--)i[t].clear();n.updateInt&&clearInterval(n.updateInt);n.requestAnimation&&window.cancelAnimationFrame(n.requestAnimation);n.charts=[];n.isNN&&(document.removeEventListener("mousemove",n.handleMouseMove,!0),document.removeEventListener("keyup",n.handleKeyUp,!0),document.removeEventListener("mouseup",n.handleMouseUp,!0),window.removeEventListener("load",n.handleLoad,!0),window.removeEventListener("DOMMouseScroll",n.handleWheel,!0),document.removeEventListener("mousewheel",n.handleWheel,!0));n.isIE&&(document.detachEvent("onmousemove",n.handleMouseMove),document.detachEvent("onmouseup",n.handleMouseUp),window.detachEvent("onload",n.handleLoad));n.globalListenersAdded=!1;n.wheelIsListened=!1};n.makeChart=function(t,i,r){var e=i.type,f=i.theme,u;n.addGlobalListeners();n.isString(f)&&(f=n.themes[f],i.theme=f);switch(e){case"serial":u=new n.AmSerialChart(f);break;case"xy":u=new n.AmXYChart(f);break;case"pie":u=new n.AmPieChart(f);break;case"radar":u=new n.AmRadarChart(f);break;case"gauge":u=new n.AmAngularGauge(f);break;case"funnel":u=new n.AmFunnelChart(f);break;case"map":u=new n.AmMap(f);break;case"stock":u=new n.AmStockChart(f);break;case"gantt":u=new n.AmGanttChart(f)}return n.extend(u,i),n.isReady?isNaN(r)?u.write(t):setTimeout(function(){n.realWrite(u,t)},r):n.ready(function(){isNaN(r)?u.write(t):setTimeout(function(){n.realWrite(u,t)},r)}),u};n.realWrite=function(n,t){n.write(t)};n.updateCount=0;n.validateAt=Math.round(n.updateRate/10);n.update=function(){var i=n.charts,r,t;if(n.updateCount++,r=!1,n.updateCount==n.validateAt&&(r=!0,n.updateCount=0),i)for(t=i.length-1;0<=t;t--)i[t].update&&i[t].update(),r&&(i[t].autoResize?i[t].validateSize&&i[t].validateSize():i[t].premeasure&&i[t].premeasure());window.requestAnimationFrame&&(n.requestAnimation=window.requestAnimationFrame(n.update))};"complete"==document.readyState&&n.handleLoad()}(),function(){var n=window.AmCharts;n.toBoolean=function(n,t){if(void 0===n)return t;switch(String(n).toLowerCase()){case"true":case"yes":case"1":return!0;case"false":case"no":case"0":case null:return!1;default:return!!n}};n.removeFromArray=function(n,t){var i;if(void 0!==t&&void 0!==n)for(i=n.length-1;0<=i;i--)n[i]==t&&n.splice(i,1)};n.getPath=function(){var t=document.getElementsByTagName("script"),n,i;if(t)for(n=0;n<t.length;n++)if(i=t[n].src,-1!==i.search(/\/(amcharts|ammap)\.js/))return i.replace(/\/(amcharts|ammap)\.js.*/,"/")};n.normalizeUrl=function(n){return""!==n&&-1===n.search(/\/$/)?n+"/":n};n.isAbsolute=function(n){return 0===n.search(/^http[s]?:|^\//)};n.isInArray=function(n,t){for(var i=0;i<n.length;i++)if(n[i]==t)return!0;return!1};n.getDecimals=function(n){var t=0;return isNaN(n)||(n=String(n),-1!=n.indexOf("e-")?t=Number(n.split("-")[1]):-1!=n.indexOf(".")&&(t=n.split(".")[1].length)),t};n.wordwrap=function(t,i,r,u){var o,e,f,s;if(t+="",1>i)return t;for(o=-1,t=(s=t.split(/\r\n|\n|\r/)).length;++o<t;s[o]+=f){for(f=s[o],s[o]="";f.length>i;s[o]+=n.trim(f.slice(0,e))+((f=f.slice(e)).length?r:""))e=2==u||(e=f.slice(0,i+1).match(/\S*(\s)?$/))[1]?i:e.input.length-e[0].length||1==u&&i||e.input.length+(e=f.slice(i).match(/^\S*/))[0].length;f=n.trim(f)}return s.join(r)};n.trim=function(n){return n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")};n.wrappedText=function(t,i,r,u,f,e,o,s){var h=n.text(t,i,r,u,f,e,o),c,l;return h&&(c=h.getBBox(),c.width>s&&(l="\n",n.isModern||(l="<br>"),s=Math.floor(s/(c.width/i.length)),2<s&&(s-=2),i=n.wordwrap(i,s,l,!0),h.remove(),h=n.text(t,i,r,u,f,e,o))),h};n.getStyle=function(n,t){var i="";if(document.defaultView&&document.defaultView.getComputedStyle)try{i=document.defaultView.getComputedStyle(n,"").getPropertyValue(t)}catch(r){}else n.currentStyle&&(t=t.replace(/\-(\w)/g,function(n,t){return t.toUpperCase()}),i=n.currentStyle[t]);return i};n.removePx=function(n){if(void 0!==n)return Number(n.substring(0,n.length-2))};n.getURL=function(t,i){if(t)if("_self"!=i&&i)if("_top"==i&&window.top)window.top.location.href=t;else if("_parent"==i&&window.parent)window.parent.location.href=t;else if("_blank"==i)window.open(t);else{var r=document.getElementsByName(i)[0];r?r.src=t:(r=n.windows[i])?r.opener&&!r.opener.closed?r.location.href=t:n.windows[i]=window.open(t):n.windows[i]=window.open(t)}else window.location.href=t};n.ifArray=function(n){return n&&"object"==typeof n&&0<n.length?!0:!1};n.callMethod=function(n,t){for(var i,e,u,f,r=0;r<t.length;r++)if(i=t[r],i&&(i[n]&&i[n](),e=i.length,0<e))for(u=0;u<e;u++)f=i[u],f&&f[n]&&f[n]()};n.toNumber=function(n){return"number"==typeof n?n:Number(String(n).replace(/[^0-9\-.]+/g,""))};n.toColor=function(n){var t,i;if(""!==n&&void 0!==n)if(-1!=n.indexOf(","))for(n=n.split(","),t=0;t<n.length;t++)i=n[t].substring(n[t].length-6,n[t].length),n[t]="#"+i;else n=n.substring(n.length-6,n.length),n="#"+n;return n};n.toCoordinate=function(n,t,i){var r;return void 0!==n&&(n=String(n),i&&i<t&&(t=i),r=Number(n),-1!=n.indexOf("!")&&(r=t-Number(n.substr(1))),-1!=n.indexOf("%")&&(r=t*Number(n.substr(0,n.length-1))/100)),r};n.fitToBounds=function(n,t,i){return n<t&&(n=t),n>i&&(n=i),n};n.isDefined=function(n){return void 0===n?!1:!0};n.stripNumbers=function(n){return n.replace(/[0-9]+/g,"")};n.roundTo=function(n,t){if(0>t)return n;var i=Math.pow(10,t);return Math.round(n*i)/i};n.toFixed=function(n,t){var f=!1,i,r,u;if(0>n&&(f=!0,n=Math.abs(n)),i=String(Math.round(n*Math.pow(10,t))),0<t){if(r=i.length,r<t)for(u=0;u<t-r;u++)i="0"+i;return r=i.substring(0,i.length-t),""===r&&(r=0),i=r+"."+i.substring(i.length-t,i.length),f?"-"+i:i}return String(i)};n.formatDuration=function(t,i,r,u,f,e){var s=n.intervals,h=e.decimalSeparator,o;if(t>=s[i].contains)return o=t-Math.floor(t/s[i].contains)*s[i].contains,"ss"==i?(o=n.formatNumber(o,e),1==o.split(h)[0].length&&(o="0"+o)):o=n.roundTo(o,e.precision),("mm"==i||"hh"==i)&&10>o&&(o="0"+o),r=o+""+u[i]+""+r,t=Math.floor(t/s[i].contains),i=s[i].nextInterval,n.formatDuration(t,i,r,u,f,e);if("ss"==i&&(t=n.formatNumber(t,e),1==t.split(h)[0].length&&(t="0"+t)),"mm"==i&&(t=n.roundTo(t,e.precision)),("mm"==i||"hh"==i)&&10>t&&(t="0"+t),r=t+""+u[i]+""+r,s[f].count>s[i].count)for(t=s[i].count;t<s[f].count;t++)i=s[i].nextInterval,"ss"==i||"mm"==i||"hh"==i?r="00"+u[i]+""+r:"DD"==i&&(r="0"+u[i]+""+r);return":"==r.charAt(r.length-1)&&(r=r.substring(0,r.length-1)),r};n.formatNumber=function(t,i,r,u,f){var c,l,e,h,o,s;if(t=n.roundTo(t,i.precision),isNaN(r)&&(r=i.precision),c=i.decimalSeparator,i=i.thousandsSeparator,void 0==c&&(c=","),void 0==i&&(i=" "),l=0>t?"-":"",t=Math.abs(t),h=String(t),o=!1,-1!=h.indexOf("e")&&(o=!0),0<=r&&!o&&(h=n.toFixed(t,r)),e="",o)e=h;else{for(h=h.split("."),o=String(h[0]),s=o.length;0<=s;s-=3)e=s!=o.length?0!==s?o.substring(s-3,s)+i+e:o.substring(s-3,s)+e:o.substring(s-3,s);void 0!==h[1]&&(e=e+c+h[1]);void 0!==r&&0<r&&"0"!=e&&(e=n.addZeroes(e,c,r))}return e=l+e,""===l&&!0===u&&0!==t&&(e="+"+e),!0===f&&(e+="%"),e};n.addZeroes=function(t,i,r){return t=t.split(i),void 0===t[1]&&0<r&&(t[1]="0"),t[1].length<r?(t[1]+="0",n.addZeroes(t[0]+i+t[1],i,r)):void 0!==t[1]?t[0]+i+t[1]:t[0]};n.scientificToNormal=function(n){var t,i,r;if(n=String(n).split("e"),"-"==n[1].substr(0,1)){for(t="0.",i=0;i<Math.abs(Number(n[1]))-1;i++)t+="0";t+=n[0].split(".").join("")}else for(r=0,t=n[0].split("."),t[1]&&(r=t[1].length),t=n[0].split(".").join(""),i=0;i<Math.abs(Number(n[1]))-r;i++)t+="0";return t};n.toScientific=function(n,t){if(0===n)return"0";var r=Math.floor(Math.log(Math.abs(n))*Math.LOG10E),i=String(i).split(".").join(t);return String(i)+"e"+r};n.randomColor=function(){return"#"+("00000"+(16777216*Math.random()<<0).toString(16)).substr(-6)};n.hitTest=function(t,i,r){var u=!1,e=t.x,o=t.x+t.width,s=t.y,h=t.y+t.height,f=n.isInRectangle;return u||(u=f(e,s,i)),u||(u=f(e,h,i)),u||(u=f(o,s,i)),u||(u=f(o,h,i)),u||!0===r||(u=n.hitTest(i,t,!0)),u};n.isInRectangle=function(n,t,i){return n>=i.x-5&&n<=i.x+i.width+5&&t>=i.y-5&&t<=i.y+i.height+5?!0:!1};n.isPercents=function(n){if(-1!=String(n).indexOf("%"))return!0};n.formatValue=function(t,i,r,u,f,e,o,s){var c,l,h;if(i)for(void 0===f&&(f=""),c=0;c<r.length;c++)l=r[c],h=i[l],void 0!==h&&(h=e?n.addPrefix(h,s,o,u):n.formatNumber(h,u),t=t.replace(new RegExp("\\[\\["+f+""+l+"\\]\\]","g"),h));return t};n.formatDataContextValue=function(n,t){var u,r,i;if(n)for(u=n.match(/\[\[.*?\]\]/g),r=0;r<u.length;r++)i=u[r],i=i.substr(2,i.length-4),void 0!==t[i]&&(n=n.replace(new RegExp("\\[\\["+i+"\\]\\]","g"),t[i]));return n};n.massReplace=function(n,t){var i,r;for(i in t)t.hasOwnProperty(i)&&(r=t[i],void 0===r&&(r=""),n=n.replace(i,r));return n};n.cleanFromEmpty=function(n){return n.replace(/\[\[[^\]]*\]\]/g,"")};n.addPrefix=function(t,i,r,u,f){var h=n.formatNumber(t,u),c="",e,o,s;if(0===t)return"0";if(0>t&&(c="-"),t=Math.abs(t),1<t){for(e=i.length-1;-1<e;e--)if(t>=i[e].number&&(o=t/i[e].number,s=Number(u.precision),1>s&&(s=1),r=n.roundTo(o,s),s=n.formatNumber(r,{precision:-1,decimalSeparator:u.decimalSeparator,thousandsSeparator:u.thousandsSeparator}),!f||o==r)){h=c+""+s+""+i[e].prefix;break}}else for(e=0;e<r.length;e++)if(t<=r[e].number){o=t/r[e].number;s=Math.abs(Math.floor(Math.log(o)*Math.LOG10E));o=n.roundTo(o,s);h=c+""+o+""+r[e].prefix;break}return h};n.remove=function(n){n&&n.remove()};n.getEffect=function(n){return">"==n&&(n="easeOutSine"),"<"==n&&(n="easeInSine"),"elastic"==n&&(n="easeOutElastic"),n};n.getObjById=function(n,t){for(var u,r,i=0;i<n.length;i++)if(r=n[i],r.id==t){u=r;break}return u};n.applyTheme=function(t,i,r){i||(i=n.theme);try{i=JSON.parse(JSON.stringify(i))}catch(u){}i&&i[r]&&n.extend(t,i[r])};n.isString=function(n){return"string"==typeof n?!0:!1};n.extend=function(n,t,i){var r;n||(n={});for(r in t)i?n.hasOwnProperty(r)||(n[r]=t[r]):n[r]=t[r];return n};n.copyProperties=function(n,t){for(var i in n)n.hasOwnProperty(i)&&"events"!=i&&void 0!==n[i]&&"function"!=typeof n[i]&&"cname"!=i&&(t[i]=n[i])};n.processObject=function(t,i,r,u){if(!1==t instanceof i&&(t=u?n.extend(new i(r),t):n.extend(t,new i(r),!0),t.listeners))for(var f in t.listeners)i=t.listeners[f],t.addListener(i.event,i.method);return t};n.fixNewLines=function(n){var t=RegExp("\\n","g");return n&&(n=n.replace(t,"<br />")),n};n.fixBrakes=function(t){if(n.isModern){var i=RegExp("<br>","g");t&&(t=t.replace(i,"\n"))}else t=n.fixNewLines(t);return t};n.deleteObject=function(t,i){if(t&&((void 0===i||null===i)&&(i=20),0!==i))if("[object Array]"===Object.prototype.toString.call(t))for(var r=0;r<t.length;r++)n.deleteObject(t[r],i-1),t[r]=null;else if(t&&!t.tagName)try{for(r in t.theme=null,t)t[r]&&("object"==typeof t[r]&&n.deleteObject(t[r],i-1),"function"!=typeof t[r]&&(t[r]=null))}catch(u){}};n.bounce=function(n,t,i,r,u){return(t/=u)<1/2.75?7.5625*r*t*t+i:t<2/2.75?r*(7.5625*(t-=1.5/2.75)*t+.75)+i:t<2.5/2.75?r*(7.5625*(t-=2.25/2.75)*t+.9375)+i:r*(7.5625*(t-=2.625/2.75)*t+.984375)+i};n.easeInOutQuad=function(n,t,i,r,u){return(t/=u/2,1>t)?r/2*t*t+i:(t--,-r/2*(t*(t-2)-1)+i)};n.easeInSine=function(n,t,i,r,u){return-r*Math.cos(t/u*(Math.PI/2))+r+i};n.easeOutSine=function(n,t,i,r,u){return r*Math.sin(t/u*(Math.PI/2))+i};n.easeOutElastic=function(n,t,i,r,u){n=1.70158;var f=0,e=r;return 0===t?i:1==(t/=u)?i+r:(f||(f=.3*u),e<Math.abs(r)?(e=r,n=f/4):n=f/(2*Math.PI)*Math.asin(r/e),e*Math.pow(2,-10*t)*Math.sin(2*(t*u-n)*Math.PI/f)+r+i)};n.fixStepE=function(t){t=t.toExponential(0).split("e");var i=Number(t[1]);return 9==Number(t[0])&&i++,n.generateNumber(1,i)};n.generateNumber=function(n,t){for(var i="",u=0>t?Math.abs(t)-1:Math.abs(t),r=0;r<u;r++)i+="0";return 0>t?Number("0."+i+String(n)):Number(String(n)+i)};n.setCN=function(n,t,i,r){if(n.addClassNames&&t&&(t=t.node)&&i){var u=t.getAttribute("class");n=n.classNamePrefix+"-";r&&(n="");u?t.setAttribute("class",u+" "+n+i):t.setAttribute("class",n+i)}};n.removeCN=function(n,t,i){t&&(t=t.node)&&i&&(t=t.classList)&&t.remove(n.classNamePrefix+"-"+i)};n.parseDefs=function(t,i){var r,u,f;for(r in t)if(u=typeof t[r],0<t[r].length&&"object"==u)for(f=0;f<t[r].length;f++)u=document.createElementNS(n.SVG_NS,r),i.appendChild(u),n.parseDefs(t[r][f],u);else"object"==u?(u=document.createElementNS(n.SVG_NS,r),i.appendChild(u),n.parseDefs(t[r],u)):i.setAttribute(r,t[r])}}(),function(){var n=window.AmCharts;n.AxisBase=n.Class({construct:function(t){this.createEvents("clickItem","rollOverItem","rollOutItem","rollOverGuide","rollOutGuide","clickGuide");this.titleDY=this.y=this.x=this.dy=this.dx=0;this.axisThickness=1;this.axisColor="#000000";this.axisAlpha=1;this.gridCount=this.tickLength=5;this.gridAlpha=.15;this.gridThickness=1;this.gridColor="#000000";this.dashLength=0;this.labelFrequency=1;this.showLastLabel=this.showFirstLabel=!0;this.fillColor="#FFFFFF";this.fillAlpha=0;this.labelsEnabled=!0;this.labelRotation=0;this.autoGridCount=!0;this.offset=0;this.guides=[];this.visible=!0;this.counter=0;this.guides=[];this.ignoreAxisWidth=this.inside=!1;this.minHorizontalGap=75;this.minVerticalGap=35;this.titleBold=!0;this.minorGridEnabled=!1;this.minorGridAlpha=.07;this.autoWrap=!1;this.titleAlign="middle";this.labelOffset=0;this.bcn="axis-";this.centerLabels=!1;this.firstDayOfWeek=1;this.centerLabelOnFullPeriod=this.markPeriodChange=this.boldPeriodBeginning=!0;this.titleWidth=0;this.periods=[{period:"fff",count:1},{period:"fff",count:5},{period:"fff",count:10},{period:"fff",count:50},{period:"fff",count:100},{period:"fff",count:500},{period:"ss",count:1},{period:"ss",count:5},{period:"ss",count:10},{period:"ss",count:30},{period:"mm",count:1},{period:"mm",count:5},{period:"mm",count:10},{period:"mm",count:30},{period:"hh",count:1},{period:"hh",count:3},{period:"hh",count:6},{period:"hh",count:12},{period:"DD",count:1},{period:"DD",count:2},{period:"DD",count:3},{period:"DD",count:4},{period:"DD",count:5},{period:"WW",count:1},{period:"MM",count:1},{period:"MM",count:2},{period:"MM",count:3},{period:"MM",count:6},{period:"YYYY",count:1},{period:"YYYY",count:2},{period:"YYYY",count:5},{period:"YYYY",count:10},{period:"YYYY",count:50},{period:"YYYY",count:100}];this.dateFormats=[{period:"fff",format:"NN:SS.QQQ"},{period:"ss",format:"JJ:NN:SS"},{period:"mm",format:"JJ:NN"},{period:"hh",format:"JJ:NN"},{period:"DD",format:"MMM DD"},{period:"WW",format:"MMM DD"},{period:"MM",format:"MMM"},{period:"YYYY",format:"YYYY"}];this.nextPeriod={fff:"ss",ss:"mm",mm:"hh",hh:"DD",DD:"MM",MM:"YYYY"};n.applyTheme(this,t,"AxisBase")},zoom:function(n,t){this.start=n;this.end=t;this.dataChanged=!0;this.draw()},fixAxisPosition:function(){var n=this.position;"H"==this.orientation?("left"==n&&(n="bottom"),"right"==n&&(n="top")):("bottom"==n&&(n="left"),"top"==n&&(n="right"));this.position=n},init:function(){this.createBalloon()},draw:function(){var n=this.chart,t,i;this.prevBY=this.prevBX=NaN;this.allLabels=[];this.counter=0;this.destroy();this.fixAxisPosition();this.setBalloonBounds();this.labels=[];t=n.container;i=t.set();n.gridSet.push(i);this.set=i;t=t.set();n.axesLabelsSet.push(t);this.labelsSet=t;this.axisLine=new this.axisRenderer(this);this.autoGridCount?("V"==this.orientation?(n=this.height/this.minVerticalGap,3>n&&(n=3)):n=this.width/this.minHorizontalGap,this.gridCountR=Math.max(n,1)):this.gridCountR=this.gridCount;this.axisWidth=this.axisLine.axisWidth;this.addTitle()},setOrientation:function(n){this.orientation=n?"H":"V"},addTitle:function(){var i=this.title,t,r,u;this.titleLabel=null;i&&(t=this.chart,r=this.titleColor,void 0===r&&(r=t.color),u=this.titleFontSize,isNaN(u)&&(u=t.fontSize+1),i=n.text(t.container,i,r,t.fontFamily,u,this.titleAlign,this.titleBold),n.setCN(t,i,this.bcn+"title"),this.titleLabel=i)},positionTitle:function(){var f=this.titleLabel,r,e,t,i,h;if(f){i=this.labelsSet;t={};0<i.length()?t=i.getBBox():(t.x=0,t.y=0,t.width=this.width,t.height=this.height,n.VML&&(t.y+=this.y,t.x+=this.x));i.push(f);i=t.x;h=t.y;n.VML&&(h-=this.y,i-=this.x);var v=t.width,t=t.height,c=this.width,l=this.height,s=0,o=f.getBBox().height/2,a=this.inside,u=this.titleAlign;switch(this.position){case"top":r="left"==u?-1:"right"==u?c:c/2;e=h-10-o;break;case"bottom":r="left"==u?-1:"right"==u?c:c/2;e=h+t+10+o;break;case"left":r=i-10-o;a&&(r-=5);s=-90;e=("left"==u?l+1:"right"==u?-1:l/2)+this.titleDY;this.titleWidth=o+10;break;case"right":r=i+v+10+o;a&&(r+=7);e=("left"==u?l+2:"right"==u?-2:l/2)+this.titleDY;this.titleWidth=o+10;s=-90}this.marginsChanged?(f.translate(r,e),this.tx=r,this.ty=e):f.translate(this.tx,this.ty);this.marginsChanged=!1;isNaN(this.titleRotation)||(s=this.titleRotation);0!==s&&f.rotate(s)}},pushAxisItem:function(n,t){var i=this,r=n.graphics();0<r.length()&&(t?i.labelsSet.push(r):i.set.push(r));(r=n.getLabel())&&(i.labelsSet.push(r),r.click(function(t){i.handleMouse(t,n,"clickItem")}).touchend(function(t){i.handleMouse(t,n,"clickItem")}).mouseover(function(t){i.handleMouse(t,n,"rollOverItem")}).mouseout(function(t){i.handleMouse(t,n,"rollOutItem")}))},handleMouse:function(n,t,i){this.fire({type:i,value:t.value,serialDataItem:t.serialDataItem,axis:this,target:t.label,chart:this.chart,event:n})},addGuide:function(t){for(var i=this.guides,u=!1,f=i.length,r=0;r<i.length;r++)i[r]==t&&(u=!0,f=r);t=n.processObject(t,n.Guide,this.theme);t.id||(t.id="guideAuto"+f+"_"+(new Date).getTime());u||i.push(t)},removeGuide:function(n){for(var i=this.guides,t=0;t<i.length;t++)i[t]==n&&i.splice(t,1)},handleGuideOver:function(n){var t;clearTimeout(this.chart.hoverInt);t={x:0,y:0,width:0,height:0};n.graphics&&(t=n.graphics.getBBox());var r=this.x+t.x+t.width/2,t=this.y+t.y+t.height/2,i=n.fillColor;void 0===i&&(i=n.lineColor);this.chart.showBalloon(n.balloonText,i,!0,r,t);this.fire({type:"rollOverGuide",guide:n,chart:this.chart})},handleGuideOut:function(n){this.chart.hideBalloon();this.fire({type:"rollOutGuide",guide:n,chart:this.chart})},handleGuideClick:function(n){this.chart.hideBalloon();this.fire({type:"clickGuide",guide:n,chart:this.chart})},addEventListeners:function(n,t){var i=this;n.mouseover(function(){i.handleGuideOver(t)});n.mouseup(function(){i.handleGuideClick(t)});n.touchstart(function(){i.handleGuideOver(t)});n.mouseout(function(){i.handleGuideOut(t)})},getBBox:function(){var t;return this.labelsSet&&(t=this.labelsSet.getBBox()),t?n.VML||(t={x:t.x+this.x,y:t.y+this.y,width:t.width,height:t.height}):t={x:0,y:0,width:0,height:0},t},destroy:function(){n.remove(this.set);n.remove(this.labelsSet);var t=this.axisLine;t&&n.remove(t.axisSet);n.remove(this.grid0)},chooseMinorFrequency:function(n){for(var t=10;0<t;t--)if(n/t==Math.round(n/t))return n/t},parseDatesDraw:function(){var h,g=this.chart,tt=this.showFirstLabel,it=this.showLastLabel,r,t="",u=n.extractPeriod(this.minPeriod),c=n.getPeriodDuration(u.period,u.count),o,v,y,l,i,b=this.firstDayOfWeek,rt=this.boldPeriodBeginning,w,nt,k,d;h=this.minorGridEnabled;var a,ut=this.gridAlpha,p,s=this.choosePeriod(0),f=s.period,s=s.count,e=n.getPeriodDuration(f,s);if(e<c&&(f=u.period,s=u.count,e=c),u=f,"WW"==u&&(u="DD"),this.stepWidth=this.getStepWidth(this.timeDifference),w=Math.ceil(this.timeDifference/e)+5,nt=o=n.resetDateToMin(new Date(this.startTime-e),f,s,b).getTime(),(u==f&&1==s&&this.centerLabelOnFullPeriod||this.autoWrap||this.centerLabels)&&(y=e*this.stepWidth,this.autoWrap&&!this.centerLabels&&(y=-y)),this.cellWidth=c*this.stepWidth,l=Math.round(o/e),c=-1,l/2==Math.round(l/2)&&(c=-2,o-=e),l=this.firstTime,k=0,d=0,h&&1<s&&(a=this.chooseMinorFrequency(s),p=n.getPeriodDuration(f,a),"DD"==f&&(p+=n.getPeriodDuration("hh")),"fff"==f&&(p=1)),0<this.gridCountR)for(w-5-c>this.autoRotateCount&&!isNaN(this.autoRotateAngle)&&(this.labelRotationR=this.autoRotateAngle),h=c;h<=w;h++){if(i=l+e*(h+Math.floor((nt-l)/e))-k,"DD"==f&&(i+=36e5),i=n.resetDateToMin(new Date(i),f,s,b).getTime(),"MM"==f&&(r=(i-o)/e,1.5<=(i-o)/e&&(i=i-(r-1)*e+n.getPeriodDuration("DD",3),i=n.resetDateToMin(new Date(i),f,1).getTime(),k+=e)),r=(i-this.startTime)*this.stepWidth,"radar"==g.type){if(r=this.axisWidth-r,0>r||r>this.axisWidth)continue}else this.rotate?"date"==this.type&&"middle"==this.gridPosition&&(d=-e*this.stepWidth/2):"date"==this.type&&(r=this.axisWidth-r);if(t=!1,this.nextPeriod[u]&&(t=this.checkPeriodChange(this.nextPeriod[u],1,i,o,u)),o=!1,t&&this.markPeriodChange?(t=this.dateFormatsObject[this.nextPeriod[u]],this.twoLineMode&&(t=this.dateFormatsObject[u]+"\n"+t,t=n.fixBrakes(t)),o=!0):t=this.dateFormatsObject[u],rt||(o=!1),this.currentDateFormat=t,t=n.formatDate(new Date(i),t,g),(h!=c||tt)&&(h!=w||it)||(t=" "),this.labelFunction&&(t=this.labelFunction(t,new Date(i),this,f,s,v).toString()),this.boldLabels&&(o=!0),v=new this.axisItemRenderer(this,r,t,!1,y,d,!1,o),this.pushAxisItem(v),v=o=i,!isNaN(a))for(r=1;r<s;r+=a)this.gridAlpha=this.minorGridAlpha,t=i+p*r,t=n.resetDateToMin(new Date(t),f,a,b).getTime(),t=new this.axisItemRenderer(this,(t-this.startTime)*this.stepWidth,void 0,void 0,void 0,void 0,void 0,void 0,void 0,!0),this.pushAxisItem(t);this.gridAlpha=ut}},choosePeriod:function(t){var r=n.getPeriodDuration(this.periods[t].period,this.periods[t].count),i=this.periods;return this.timeDifference<r&&0<t?i[t-1]:Math.ceil(this.timeDifference/r)<=this.gridCountR?i[t]:t+1<i.length?this.choosePeriod(t+1):i[t]},getStepWidth:function(n){var t;return this.startOnAxis?(t=this.axisWidth/(n-1),1==n&&(t=this.axisWidth)):t=this.axisWidth/n,t},timeZoom:function(n,t){this.startTime=n;this.endTime=t},minDuration:function(){var t=n.extractPeriod(this.minPeriod);return n.getPeriodDuration(t.period,t.count)},checkPeriodChange:function(t,i,r,u,f){r=new Date(r);var o=new Date(u),e=this.firstDayOfWeek;return u=i,"DD"==t&&(i=1),r=n.resetDateToMin(r,t,i,e).getTime(),i=n.resetDateToMin(o,t,i,e).getTime(),"DD"==t&&"hh"!=f&&r-i<n.getPeriodDuration(t,u)-n.getPeriodDuration("hh",1)?!1:r!=i?!0:!1},generateDFObject:function(){var n,t;for(this.dateFormatsObject={},n=0;n<this.dateFormats.length;n++)t=this.dateFormats[n],this.dateFormatsObject[t.period]=t.format},hideBalloon:function(){this.balloon&&this.balloon.hide&&this.balloon.hide();this.prevBY=this.prevBX=NaN},formatBalloonText:function(n){return n},showBalloon:function(n,t,i,r){var u=this.offset,f;switch(this.position){case"bottom":t=this.height+u;break;case"top":t=-u;break;case"left":n=-u;break;case"right":n=this.width+u}if(i||(i=this.currentDateFormat),"V"==this.orientation){if(0>t||t>this.height)return;if(isNaN(t)){this.hideBalloon();return}t=this.adjustBalloonCoordinate(t,r);r=this.coordinateToValue(t)}else{if(0>n||n>this.width)return;if(isNaN(n)){this.hideBalloon();return}n=this.adjustBalloonCoordinate(n,r);r=this.coordinateToValue(n)}(u=this.chart.chartCursor)&&(f=u.index);this.balloon&&void 0!==r&&this.balloon.enabled&&(this.balloonTextFunction?(("date"==this.type||!0===this.parseDates)&&(r=new Date(r)),r=this.balloonTextFunction(r)):this.balloonText?r=this.formatBalloonText(this.balloonText,f,i):isNaN(r)||(r=this.formatValue(r,i)),(n!=this.prevBX||t!=this.prevBY)&&(this.balloon.setPosition(n,t),this.prevBX=n,this.prevBY=t,r&&this.balloon.showBalloon(r)))},adjustBalloonCoordinate:function(n){return n},createBalloon:function(){var i=this.chart,t=i.chartCursor;t&&(t=t.cursorPosition,"mouse"!=t&&(this.stickBalloonToCategory=!0),"start"==t&&(this.stickBalloonToStart=!0),"ValueAxis"==this.cname&&(this.stickBalloonToCategory=!1));this.balloon&&(this.balloon.destroy&&this.balloon.destroy(),n.extend(this.balloon,i.balloon,!0))},setBalloonBounds:function(){var n=this.balloon,f;if(n){f=this.chart;n.cornerRadius=0;n.shadowAlpha=0;n.borderThickness=1;n.borderAlpha=1;n.adjustBorderColor=!1;n.showBullet=!1;this.balloon=n;n.chart=f;n.mainSet=f.plotBalloonsSet;n.pointerWidth=this.tickLength;(this.parseDates||"date"==this.type)&&(n.pointerWidth=0);n.className=this.id;f="V";"V"==this.orientation&&(f="H");this.stickBalloonToCategory||(n.animationDuration=0);var t,i,r,u,s=this.inside,e=this.width,o=this.height;switch(this.position){case"bottom":t=0;i=e;s?(r=0,u=o):(r=o,u=o+1e3);break;case"top":t=0;i=e;s?(r=0,u=o):(r=-1e3,u=0);break;case"left":r=0;u=o;s?(t=0,i=e):(t=-1e3,i=0);break;case"right":r=0;u=o;s?(t=0,i=e):(t=e,i=e+1e3)}n.drop||(n.pointerOrientation=f);n.setBounds(t,r,i,u)}}})}(),function(){var n=window.AmCharts;n.ValueAxis=n.Class({inherits:n.AxisBase,construct:function(t){this.cname="ValueAxis";this.createEvents("axisChanged","logarithmicAxisFailed","axisZoomed","axisIntZoomed");n.ValueAxis.base.construct.call(this,t);this.dataChanged=!0;this.stackType="none";this.position="left";this.unitPosition="right";this.includeAllValues=this.recalculateToPercents=this.includeHidden=this.includeGuidesInMinMax=this.integersOnly=!1;this.durationUnits={DD:"d. ",hh:":",mm:":",ss:""};this.scrollbar=!1;this.baseValue=0;this.radarCategoriesEnabled=!0;this.axisFrequency=1;this.gridType="polygons";this.useScientificNotation=!1;this.axisTitleOffset=10;this.pointPosition="axis";this.minMaxMultiplier=1;this.logGridLimit=2;this.totalTextOffset=this.treatZeroAs=0;this.minPeriod="ss";this.relativeStart=0;this.relativeEnd=1;n.applyTheme(this,t,this.cname)},updateData:function(){0>=this.gridCountR&&(this.gridCountR=1);this.totals=[];this.data=this.chart.chartData;var t=this.chart;"xy"!=t.type&&(this.stackGraphs("smoothedLine"),this.stackGraphs("line"),this.stackGraphs("column"),this.stackGraphs("step"));this.recalculateToPercents&&this.recalculate();this.synchronizationMultiplier&&this.synchronizeWith?(n.isString(this.synchronizeWith)&&(this.synchronizeWith=t.getValueAxisById(this.synchronizeWith)),this.synchronizeWith&&(this.synchronizeWithAxis(this.synchronizeWith),this.foundGraphs=!0)):(this.foundGraphs=!1,this.getMinMax(),0===this.start&&this.end==this.data.length-1&&isNaN(this.minZoom)&&isNaN(this.maxZoom)||isNaN(this.fullMin)&&isNaN(this.fullMax))&&(this.fullMin=this.min,this.fullMax=this.max,"date"!=this.type&&this.strictMinMax&&(isNaN(this.minimum)||(this.fullMin=this.minimum),isNaN(this.maximum)||(this.fullMax=this.maximum)),this.logarithmic&&(this.fullMin=this.logMin,0===this.fullMin&&(this.fullMin=this.treatZeroAs)),"date"==this.type&&(this.minimumDate||(this.fullMin=this.minRR),this.maximumDate||(this.fullMax=this.maxRR),this.strictMinMax&&(this.minimumDate&&(this.fullMin=this.minimumDate.getTime()),this.maximumDate&&(this.fullMax=this.maximumDate.getTime()))))},draw:function(){var h,rt,v,b,u,p,e,y,r,o,s,nt,tt,k,c,d,w,it;if(n.ValueAxis.base.draw.call(this),h=this.chart,rt=this.set,this.labelRotationR=this.labelRotation,n.setCN(h,this.set,"value-axis value-axis-"+this.id),n.setCN(h,this.labelsSet,"value-axis value-axis-"+this.id),n.setCN(h,this.axisLine.axisSet,"value-axis value-axis-"+this.id),v=this.type,"duration"==v&&(this.duration="ss"),!0===this.dataChanged&&(this.updateData(),this.dataChanged=!1),"date"==v&&(this.logarithmic=!1,this.min=this.minRR,this.max=this.maxRR,this.reversed=!1,this.getDateMinMax()),this.logarithmic&&(b=this.treatZeroAs,u=this.getExtremes(0,this.data.length-1).min,!isNaN(this.minimum)&&this.minimum<u&&(u=this.minimum),this.logMin=u,this.minReal<u&&(this.minReal=u),isNaN(this.minReal)&&(this.minReal=u),0<b&&0===u&&(this.minReal=u=b),0>=u||0>=this.minimum)){this.fire({type:"logarithmicAxisFailed",chart:h});return}this.grid0=null;var i,t,l=h.dx,a=h.dy,b=!1,u=this.logarithmic;if(isNaN(this.min)||isNaN(this.max)||!this.foundGraphs||Infinity==this.min||-Infinity==this.max)b=!0;else{"date"==this.type&&this.min==this.max&&(this.max+=this.minDuration(),this.min-=this.minDuration());var ut=this.labelFrequency,ft=this.showFirstLabel,et=this.showLastLabel,g=1,f=0;if(this.minCalc=this.min,this.maxCalc=this.max,this.strictMinMax&&(isNaN(this.minimum)||(this.min=this.minimum),isNaN(this.maximum)||(this.max=this.maximum),this.min==this.max))return;for(isNaN(this.minZoom)||(this.minReal=this.min=this.minZoom),isNaN(this.maxZoom)||(this.max=this.maxZoom),this.logarithmic?(t=this.fullMin,e=this.fullMax,isNaN(this.minimum)||(t=this.minimum),isNaN(this.maximum)||(e=this.maximum),e=Math.log(e)*Math.LOG10E-Math.log(t)*Math.LOG10E,p=Math.log(this.max)/Math.LN10-Math.log(t)*Math.LOG10E,this.relativeStart=n.roundTo((Math.log(this.minReal)/Math.LN10-Math.log(t)*Math.LOG10E)/e,5),this.relativeEnd=n.roundTo(p/e,5)):(this.relativeStart=n.roundTo(n.fitToBounds((this.min-this.fullMin)/(this.fullMax-this.fullMin),0,1),5),this.relativeEnd=n.roundTo(n.fitToBounds((this.max-this.fullMin)/(this.fullMax-this.fullMin),0,1),5)),e=Math.round((this.maxCalc-this.minCalc)/this.step)+1,!0===u?(y=Math.log(this.max)*Math.LOG10E-Math.log(this.minReal)*Math.LOG10E,this.stepWidth=this.axisWidth/y,y>this.logGridLimit&&(e=Math.ceil(Math.log(this.max)*Math.LOG10E)+1,f=Math.round(Math.log(this.minReal)*Math.LOG10E),e>this.gridCountR&&(g=Math.ceil(e/this.gridCountR)))):this.stepWidth=this.axisWidth/(this.max-this.min),o=0,1>this.step&&-1<this.step&&(o=n.getDecimals(this.step)),this.integersOnly&&(o=0),o>this.maxDecCount&&(o=this.maxDecCount),p=this.precision,isNaN(p)||(o=p),isNaN(this.maxZoom)&&(this.max=n.roundTo(this.max,this.maxDecCount),this.min=n.roundTo(this.min,this.maxDecCount)),t={},t.precision=o,t.decimalSeparator=h.nf.decimalSeparator,t.thousandsSeparator=h.nf.thousandsSeparator,this.numberFormatter=t,this.exponential=!1,t=f;t<e;t+=g)nt=n.roundTo(this.step*t+this.min,o),-1!=String(nt).indexOf("e")&&(this.exponential=!0);if(this.duration&&(this.maxInterval=n.getMaxInterval(this.max,this.duration)),o=this.step,nt=this.minorGridAlpha,this.minorGridEnabled&&(s=this.getMinorGridStep(o,this.stepWidth*o)),this.autoGridCount||0!==this.gridCount)if("date"==v)this.generateDFObject(),this.timeDifference=this.max-this.min,this.maxTime=this.lastTime=this.max,this.startTime=this.firstTime=this.min,this.parseDatesDraw();else for(e>=this.autoRotateCount&&!isNaN(this.autoRotateAngle)&&(this.labelRotationR=this.autoRotateAngle),v=this.minCalc,u&&(e++,v=this.maxCalc-e*o),this.gridCountReal=e,t=this.startCount=f;t<e;t+=g)if((f=o*t+v,f=n.roundTo(f,this.maxDecCount+1),!this.integersOnly||Math.round(f)==f)&&(isNaN(p)||Number(n.toFixed(f,p))==f)){if(!0===u)if(y>this.logGridLimit){if(f=Math.pow(10,t),f>this.max)continue}else if(0>=f&&(f=v+o*t+o/2,0>=f))continue;if(r=this.formatValue(f,!1,t),Math.round(t/ut)!=t/ut&&(r=void 0),(0!==t||ft)&&(t!=e-1||et)||(r=" "),i=this.getCoordinate(f),this.rotate&&this.autoWrap&&(tt=this.stepWidth*o-10),r=new this.axisItemRenderer(this,i,r,void 0,tt,void 0,void 0,this.boldLabels),this.pushAxisItem(r),f==this.baseValue&&"radar"!=h.type&&(d=this.width,w=this.height,"H"==this.orientation?0<=i&&i<=d+1&&(k=[i,i,i+l],c=[w,0,a]):0<=i&&i<=w+1&&(k=[0,d,d+l],c=[i,i,i+a]),k&&(i=n.fitToBounds(2*this.gridAlpha,0,1),isNaN(this.zeroGridAlpha)||(i=this.zeroGridAlpha),i=n.line(h.container,k,c,this.gridColor,i,1,this.dashLength),i.translate(this.x,this.y),this.grid0=i,h.axesSet.push(i),i.toBack(),n.setCN(h,i,this.bcn+"zero-grid-"+this.id),n.setCN(h,i,this.bcn+"zero-grid"))),!isNaN(s)&&0<nt&&t<e-1){for(i=o/s,u&&(s=o*(t+g)+this.minCalc,s=n.roundTo(s,this.maxDecCount+1),y>this.logGridLimit&&(s=Math.pow(10,t+g)),i=9,s=(s-f)/i),d=this.gridAlpha,this.gridAlpha=this.minorGridAlpha,w=1;w<i;w++)it=this.getCoordinate(f+s*w),it=new this.axisItemRenderer(this,it,"",!1,0,0,!1,!1,0,!0),this.pushAxisItem(it);this.gridAlpha=d}}if(y=this.guides,tt=y.length,0<tt){for(k=this.fillAlpha,t=this.fillAlpha=0;t<tt;t++)c=y[t],l=NaN,s=c.above,isNaN(c.toValue)||(l=this.getCoordinate(c.toValue),r=new this.axisItemRenderer(this,l,"",!0,NaN,NaN,c),this.pushAxisItem(r,s)),a=NaN,isNaN(c.value)||(a=this.getCoordinate(c.value),r=new this.axisItemRenderer(this,a,c.label,!0,NaN,(l-a)/2,c),this.pushAxisItem(r,s)),isNaN(l)&&(a-=3,l=a+3),r&&(ut=r.label)&&this.addEventListeners(ut,c),isNaN(l-a)||0>a&&0>l||(l=new this.guideFillRenderer(this,a,l,c),this.pushAxisItem(l,s),s=l.graphics(),c.graphics=s,this.addEventListeners(s,c));this.fillAlpha=k}r=this.baseValue;this.min>this.baseValue&&this.max>this.baseValue&&(r=this.min);this.min<this.baseValue&&this.max<this.baseValue&&(r=this.max);u&&r<this.minReal&&(r=this.minReal);this.baseCoord=this.getCoordinate(r,!0);r={type:"axisChanged",target:this,chart:h};r.min=u?this.minReal:this.min;r.max=this.max;this.fire(r);this.axisCreated=!0}u=this.axisLine.set;r=this.labelsSet;rt.translate(this.x,this.y);r.translate(this.x,this.y);this.positionTitle();"radar"!=h.type&&u.toFront();!this.visible||b?(rt.hide(),u.hide(),r.hide()):(rt.show(),u.show(),r.show());this.axisY=this.y;this.axisX=this.x},getDateMinMax:function(){this.minimumDate&&(this.minimumDate instanceof Date||(this.minimumDate=n.getDate(this.minimumDate,this.chart.dataDateFormat,"fff")),this.min=this.minimumDate.getTime());this.maximumDate&&(this.maximumDate instanceof Date||(this.maximumDate=n.getDate(this.maximumDate,this.chart.dataDateFormat,"fff")),this.max=this.maximumDate.getTime())},formatValue:function(t,i,r){var u=this.exponential,o=this.logarithmic,f=this.numberFormatter,e=this.chart;if(f)return!0===this.logarithmic&&(u=-1!=String(t).indexOf("e")?!0:!1),this.useScientificNotation&&(u=!0),this.usePrefixes&&(u=!1),u?(r=-1==String(t).indexOf("e")?t.toExponential(15):String(t),u=r.split("e"),r=Number(u[0]),u=Number(u[1]),r=n.roundTo(r,14),i||isNaN(this.precision)||(r=n.roundTo(r,this.precision)),10==r&&(r=1,u+=1),r=r+"e"+u,0===t&&(r="0"),1==t&&(r="1")):(o&&(u=String(t).split("."),u[1]?(f.precision=u[1].length,0>r&&(f.precision=Math.abs(r)),i&&1<t&&(f.precision=0),i||isNaN(this.precision)||(f.precision=this.precision)):f.precision=-1),r=this.usePrefixes?n.addPrefix(t,e.prefixesOfBigNumbers,e.prefixesOfSmallNumbers,f,!i):n.formatNumber(t,f,f.precision)),this.duration&&(i&&(f.precision=0),r=n.formatDuration(t,this.duration,"",this.durationUnits,this.maxInterval,f)),"date"==this.type&&(r=n.formatDate(new Date(t),this.currentDateFormat,e)),this.recalculateToPercents?r+="%":(i=this.unit)&&(r="left"==this.unitPosition?i+r:r+i),this.labelFunction&&(r="date"==this.type?this.labelFunction(r,new Date(t),this).toString():this.labelFunction(t,r,this).toString()),r},getMinorGridStep:function(n,t){var f=[5,4,2],e,u,i,r;for(60>t&&f.shift(),e=Math.floor(Math.log(Math.abs(n))*Math.LOG10E),u=0;u<f.length;u++)if(i=n/f[u],r=Math.floor(Math.log(Math.abs(i))*Math.LOG10E),!(1<Math.abs(e-r)))if(1>n){if(r=Math.pow(10,-r)*i,r==Math.round(r))return i}else if(i==Math.round(i))return i;return 1},stackGraphs:function(t){var h=this.stackType,w,l;"stacked"==h&&(h="regular");"line"==h&&(h="none");"100% stacked"==h&&(h="100%");this.stackType=h;var c=[],o=[],s=[],a=[],f,y=this.chart.graphs,v,r,u,e,i,b=this.baseValue,p=!1;if(("line"==t||"step"==t||"smoothedLine"==t)&&(p=!0),p&&("regular"==h||"100%"==h))for(e=0;e<y.length;e++)u=y[e],u.stackGraph=null,u.hidden||(r=u.type,u.chart==this.chart&&u.valueAxis==this&&t==r&&u.stackable&&(v&&(u.stackGraph=v),v=u));for(u=this.start-10,v=this.end+10,e=this.data.length-1,u=n.fitToBounds(u,0,e),v=n.fitToBounds(v,0,e),i=u;i<=v;i++)for(w=0,e=0;e<y.length;e++)(u=y[e],u.hidden)?u.newStack&&(s[i]=NaN,o[i]=NaN):(r=u.type,u.chart==this.chart&&u.valueAxis==this&&t==r&&u.stackable)&&((r=this.data[i].axes[this.id].graphs[u.id],f=r.values.value,isNaN(f))?u.newStack&&(s[i]=NaN,o[i]=NaN):(l=n.getDecimals(f),w<l&&(w=l),isNaN(a[i])?a[i]=Math.abs(f):a[i]+=Math.abs(f),a[i]=n.roundTo(a[i],w),l=u.fillToGraph,p&&l&&(l=this.data[i].axes[this.id].graphs[l.id])&&(r.values.open=l.values.value),"regular"==h&&(p&&(isNaN(c[i])?(c[i]=f,r.values.close=f,r.values.open=this.baseValue):(r.values.close=isNaN(f)?c[i]:f+c[i],r.values.open=c[i],c[i]=r.values.close)),"column"==t&&(u.newStack&&(s[i]=NaN,o[i]=NaN),r.values.close=f,0>f?(r.values.close=f,isNaN(o[i])?r.values.open=b:(r.values.close+=o[i],r.values.open=o[i]),o[i]=r.values.close):(r.values.close=f,isNaN(s[i])?r.values.open=b:(r.values.close+=s[i],r.values.open=s[i]),s[i]=r.values.close)))));for(i=this.start;i<=this.end;i++)for(e=0;e<y.length;e++)(u=y[e],u.hidden)?u.newStack&&(s[i]=NaN,o[i]=NaN):(r=u.type,u.chart==this.chart&&u.valueAxis==this&&t==r&&u.stackable&&(r=this.data[i].axes[this.id].graphs[u.id],f=r.values.value,isNaN(f)||(c=f/a[i]*100,r.values.percents=c,r.values.total=a[i],u.newStack&&(s[i]=NaN,o[i]=NaN),"100%"==h&&(isNaN(o[i])&&(o[i]=0),isNaN(s[i])&&(s[i]=0),0>c?(r.values.close=n.fitToBounds(c+o[i],-100,100),r.values.open=o[i],o[i]=r.values.close):(r.values.close=n.fitToBounds(c+s[i],-100,100),r.values.open=s[i],s[i]=r.values.close)))))},recalculate:function(){for(var r=this.chart,a=r.graphs,u,e,i,f,s,h=0;h<a.length;h++)if(u=a[h],u.valueAxis==this){e="value";("candlestick"==u.type||"ohlc"==u.type)&&(e="open");var o,t,c=this.end+2,c=n.fitToBounds(this.end+1,0,this.data.length-1),f=this.start;if(0<f&&f--,t=this.start,u.compareFromStart&&(t=0),!isNaN(r.startTime)&&(i=r.categoryAxis)){var l=i.minDuration(),l=new Date(r.startTime+l/2),v=n.resetDateToMin(new Date(r.startTime),i.minPeriod).getTime();n.resetDateToMin(new Date(l),i.minPeriod).getTime()>v&&t++}for((i=r.recalculateFromDate)&&(i=n.getDate(i,r.dataDateFormat,"fff"),t=r.getClosestIndex(r.chartData,"time",i.getTime(),!0,0,r.chartData.length),c=r.chartData.length-1),i=t;i<=c&&(t=this.data[i].axes[this.id].graphs[u.id],o=t.values[e],u.recalculateValue&&(o=t.dataContext[u.valueField+u.recalculateValue]),isNaN(o));i++);for(this.recBaseValue=o,e=f;e<=c;e++){t=this.data[e].axes[this.id].graphs[u.id];t.percents={};f=t.values;for(s in f)t.percents[s]="percents"!=s?f[s]/o*100-100:f[s]}}},getMinMax:function(){for(var i=!1,u=this.chart,t=u.graphs,f,r=0;r<t.length;r++)f=t[r].type,("line"==f||"step"==f||"smoothedLine"==f)&&this.expandMinMax&&(i=!0);if(i&&(0<this.start&&this.start--,this.end<this.data.length-1&&this.end++),"serial"==u.type&&(!0!==u.categoryAxis.parseDates||i||this.end<this.data.length-1&&this.end++),this.includeAllValues&&(this.start=0,this.end=this.data.length-1),i=this.minMaxMultiplier,u=this.getExtremes(this.start,this.end),this.min=u.min,this.max=u.max,this.minRR=this.min,this.maxRR=this.max,i=(this.max-this.min)*(i-1),this.min-=i,this.max+=i,i=this.guides.length,this.includeGuidesInMinMax&&0<i)for(u=0;u<i;u++)t=this.guides[u],t.toValue<this.min&&(this.min=t.toValue),t.value<this.min&&(this.min=t.value),t.toValue>this.max&&(this.max=t.toValue),t.value>this.max&&(this.max=t.value);isNaN(this.minimum)||(this.min=this.minimum);isNaN(this.maximum)||(this.max=this.maximum);"date"==this.type&&this.getDateMinMax();this.min>this.max&&(i=this.max,this.max=this.min,this.min=i);isNaN(this.minZoom)||(this.min=this.minZoom);isNaN(this.maxZoom)||(this.max=this.maxZoom);this.minCalc=this.min;this.maxCalc=this.max;this.minReal=this.min;this.maxReal=this.max;0===this.min&&0===this.max&&(this.max=9);this.min>this.max&&(this.min=this.max-1);i=this.min;u=this.max;t=this.max-this.min;r=0===t?Math.pow(10,Math.floor(Math.log(Math.abs(this.max))*Math.LOG10E))/10:Math.pow(10,Math.floor(Math.log(Math.abs(t))*Math.LOG10E))/10;isNaN(this.maximum)&&(this.max=Math.ceil(this.max/r)*r+r);isNaN(this.minimum)&&(this.min=Math.floor(this.min/r)*r-r);0>this.min&&0<=i&&(this.min=0);0<this.max&&0>=u&&(this.max=0);"100%"==this.stackType&&(this.min=0>this.min?-100:0,this.max=0>this.max?0:100);t=this.max-this.min;r=Math.pow(10,Math.floor(Math.log(Math.abs(t))*Math.LOG10E))/10;this.step=Math.ceil(t/this.gridCountR/r)*r;t=Math.pow(10,Math.floor(Math.log(Math.abs(this.step))*Math.LOG10E));t=n.fixStepE(t);r=Math.ceil(this.step/t);5<r&&(r=10);5>=r&&2<r&&(r=5);this.step=Math.ceil(this.step/(t*r))*t*r;isNaN(this.setStep)||(this.step=this.setStep);1>t?(this.maxDecCount=Math.abs(Math.log(Math.abs(t))*Math.LOG10E),this.maxDecCount=Math.round(this.maxDecCount),this.step=n.roundTo(this.step,this.maxDecCount+1)):this.maxDecCount=0;this.min=this.step*Math.floor(this.min/this.step);this.max=this.step*Math.ceil(this.max/this.step);0>this.min&&0<=i&&(this.min=0);0<this.max&&0>=u&&(this.max=0);1<this.minReal&&1<this.max-this.minReal&&(this.minReal=Math.floor(this.minReal));t=Math.pow(10,Math.floor(Math.log(Math.abs(this.minReal))*Math.LOG10E));0===this.min&&(this.minReal=t);0===this.min&&1<this.minReal&&(this.minReal=1);0<this.min&&0<this.minReal-this.step&&(this.minReal=this.min+this.step<this.minReal?this.min+this.step:this.min);this.logarithmic&&(2<Math.log(u)*Math.LOG10E-Math.log(i)*Math.LOG10E?(this.minReal=this.min=Math.pow(10,Math.floor(Math.log(Math.abs(i))*Math.LOG10E)),this.maxReal=this.max=Math.pow(10,Math.ceil(Math.log(Math.abs(u))*Math.LOG10E))):(i=Math.pow(10,Math.floor(Math.log(Math.abs(i))*Math.LOG10E))/10,Math.pow(10,Math.floor(Math.log(Math.abs(this.min))*Math.LOG10E))/10<i&&(this.minReal=this.min=10*i)))},getExtremes:function(n,t){for(var u,f,o,s,r,i,e,h=n;h<=t;h++){o=this.data[h].axes[this.id].graphs;for(s in o)if(o.hasOwnProperty(s)&&(r=this.chart.graphsById[s],r.includeInMinMax&&(!r.hidden||this.includeHidden)))if(isNaN(u)&&(u=Infinity),isNaN(f)&&(f=-Infinity),this.foundGraphs=!0,r=o[s].values,this.recalculateToPercents&&(r=o[s].percents),this.minMaxField)i=r[this.minMaxField],i<u&&(u=i),i>f&&(f=i);else for(e in r)r.hasOwnProperty(e)&&"percents"!=e&&"total"!=e&&"error"!=e&&(i=r[e],i<u&&(u=i),i>f&&(f=i))}return{min:u,max:f}},zoomOut:function(n){this.maxZoom=this.minZoom=NaN;this.zoomToRelativeValues(0,1,n)},zoomToRelativeValues:function(n,t,i){var r;this.reversed&&(r=n,n=1-t,t=1-r);var u=this.fullMax,r=this.fullMin,f=r+(u-r)*n,e=r+(u-r)*t;return 0<=this.minimum&&0>f&&(f=0),this.logarithmic&&(isNaN(this.minimum)||(r=this.minimum),isNaN(this.maximum)||(u=this.maximum),u=Math.log(u)*Math.LOG10E-Math.log(r)*Math.LOG10E,f=Math.pow(10,u*n+Math.log(r)*Math.LOG10E),e=Math.pow(10,u*t+Math.log(r)*Math.LOG10E)),this.zoomToValues(f,e,i)},zoomToValues:function(t,i,r){var u,f,e;return i<t&&(u=i,i=t,t=u),f=this.fullMax,u=this.fullMin,this.relativeStart=n.roundTo((t-u)/(f-u),9),this.relativeEnd=n.roundTo((i-u)/(f-u),9),this.logarithmic&&(isNaN(this.minimum)||(u=this.minimum),isNaN(this.maximum)||(f=this.maximum),f=Math.log(f)*Math.LOG10E-Math.log(u)*Math.LOG10E,e=Math.log(i)/Math.LN10-Math.log(u)*Math.LOG10E,this.relativeStart=n.roundTo((Math.log(t)/Math.LN10-Math.log(u)*Math.LOG10E)/f,9),this.relativeEnd=n.roundTo(e/f,9)),this.minZoom!=t||this.maxZoom!=i?(this.minZoom=t,this.maxZoom=i,u={type:"axisZoomed"},u.chart=this.chart,u.valueAxis=this,u.startValue=t,u.endValue=i,u.relativeStart=this.relativeStart,u.relativeEnd=this.relativeEnd,this.prevStartValue==t&&this.prevEndValue==i||this.fire(u),this.prevStartValue=t,this.prevEndValue=i,r||(t={},n.copyProperties(u,t),t.type="axisIntZoomed",this.fire(t)),0===this.relativeStart&&1==this.relativeEnd&&(this.maxZoom=this.minZoom=NaN),!0):void 0},coordinateToValue:function(n){if(isNaN(n))return NaN;var i=this.axisWidth,t=this.stepWidth,u=this.reversed,f=this.rotate,r=this.min,e=this.minReal;return!0===this.logarithmic?Math.pow(10,(f?!0===u?(i-n)/t:n/t:!0===u?n/t:(i-n)/t)+Math.log(e)*Math.LOG10E):!0===u?f?r-(n-i)/t:n/t+r:f?n/t+r:r-(n-i)/t},getCoordinate:function(n,t){if(isNaN(n))return NaN;var i=this.rotate,e=this.reversed,f=this.axisWidth,u=this.stepWidth,r=this.min,o=this.minReal;return!0===this.logarithmic?(0===n&&(n=this.treatZeroAs),r=Math.log(n)*Math.LOG10E-Math.log(o)*Math.LOG10E,i=i?!0===e?f-u*r:u*r:!0===e?u*r:f-u*r):i=!0===e?i?f-u*(n-r):u*(n-r):i?u*(n-r):f-u*(n-r),1e7<Math.abs(i)&&(i=i/Math.abs(i)*1e7),t||(i=Math.round(i)),i},synchronizeWithAxis:function(n){this.synchronizeWith=n;this.listenTo(this.synchronizeWith,"axisChanged",this.handleSynchronization)},handleSynchronization:function(){if(this.synchronizeWith){n.isString(this.synchronizeWith)&&(this.synchronizeWith=this.chart.getValueAxisById(this.synchronizeWith));var t=this.synchronizeWith,i=t.min,u=t.max,t=t.step,r=this.synchronizationMultiplier;r&&(this.min=i*r,this.max=u*r,this.step=t*r,i=Math.abs(Math.log(Math.abs(Math.pow(10,Math.floor(Math.log(Math.abs(this.step))*Math.LOG10E))))*Math.LOG10E),this.maxDecCount=i=Math.round(i),this.draw())}}})}(),function(){var n=window.AmCharts;n.RecAxis=n.Class({construct:function(t){var f=t.chart,i=t.axisThickness,r=t.axisColor,c=t.axisAlpha,e=t.offset,l=t.dx,u=t.dy,o=t.x,s=t.y,h=t.height,v=t.width,a=f.container;"H"==t.orientation?(r=n.line(a,[0,v],[0,0],r,c,i),this.axisWidth=t.width,"bottom"==t.position?(u=i/2+e+h+s-1,i=o):(u=-i/2-e+s+u,i=l+o)):(this.axisWidth=t.height,"right"==t.position?(r=n.line(a,[0,0,-l],[0,h,h-u],r,c,i),u=s+u,i=i/2+e+l+v+o-1):(r=n.line(a,[0,0],[0,h],r,c,i),u=s,i=-i/2-e+o));r.translate(i,u);i=f.container.set();i.push(r);f.axesSet.push(i);n.setCN(f,r,t.bcn+"line");this.axisSet=i;this.set=r}})}(),function(){var n=window.AmCharts;n.RecItem=n.Class({construct:function(t,i,r,u,f,e,o,s,h,c,l,a){var g,ii,b,bt,ot,pt,nt,w;i=Math.round(i);g=t.chart;this.value=r;void 0==r&&(r="");h||(h=0);void 0==u&&(u=!0);ii=g.fontFamily;b=t.fontSize;void 0==b&&(b=g.fontSize);bt=t.color;void 0==bt&&(bt=g.color);void 0!==l&&(bt=l);ot=t.chart.container;pt=ot.set();this.set=pt;var ht=t.axisThickness,oi=t.axisColor,ni=t.axisAlpha,y=t.tickLength,dt=t.gridAlpha,gt=t.gridThickness,ri=t.gridColor,ui=t.dashLength,si=t.fillColor,ti=t.fillAlpha,hi=t.labelsEnabled;l=t.labelRotationR;var fi=t.counter,d=t.inside,ct=t.labelOffset,ft=t.dx,rt=t.dy,ci=t.orientation,lt=t.position,kt=t.previousCoord,it=t.height,at=t.width,et=t.offset,ut,st;o?(void 0!==o.id&&(a=g.classNamePrefix+"-guide-"+o.id),hi=!0,isNaN(o.tickLength)||(y=o.tickLength),void 0!=o.lineColor&&(ri=o.lineColor),void 0!=o.color&&(bt=o.color),isNaN(o.lineAlpha)||(dt=o.lineAlpha),isNaN(o.dashLength)||(ui=o.dashLength),isNaN(o.lineThickness)||(gt=o.lineThickness),!0===o.inside&&(d=!0,0<et&&(et=0)),isNaN(o.labelRotation)||(l=o.labelRotation),isNaN(o.fontSize)||(b=o.fontSize),o.position&&(lt=o.position),void 0!==o.boldLabel&&(s=o.boldLabel),isNaN(o.labelOffset)||(ct=o.labelOffset)):""===r&&(y=0);c&&!isNaN(t.minorTickLength)&&(y=t.minorTickLength);nt="start";0<f&&(nt="middle");t.centerLabels&&(nt="middle");var k=l*Math.PI/180,vt,yt,p=0,v=0,wt=0,tt=vt=0,ei=0;"V"==ci&&(l=0);hi&&""!==r&&(w=t.autoWrap&&0===l?n.wrappedText(ot,r,bt,ii,b,nt,s,Math.abs(f),0):n.text(ot,r,bt,ii,b,nt,s),nt=w.getBBox(),tt=nt.width,ei=nt.height);"H"==ci?(0<=i&&i<=at+1&&(0<y&&0<ni&&i+h<=at+1&&(ut=n.line(ot,[i+h,i+h],[0,y],oi,ni,gt),pt.push(ut)),0<dt&&(st=n.line(ot,[i,i+ft,i+ft],[it,it+rt,rt],ri,dt,gt,ui),pt.push(st))),v=0,p=i,o&&90==l&&d&&(p-=b),!1===u?(nt="start",v="bottom"==lt?d?v+y:v-y:d?v-y:v+y,p+=3,0<f&&(p+=f/2-3,nt="middle"),0<l&&(nt="middle")):nt="middle",1==fi&&0<ti&&!o&&!c&&kt<at&&(u=n.fitToBounds(i,0,at),kt=n.fitToBounds(kt,0,at),vt=u-kt,0<vt&&(yt=n.rect(ot,vt,t.height,si,ti),yt.translate(u-vt+ft,rt),pt.push(yt))),"bottom"==lt?(v+=it+b/2+et,d?(0<l?(v=it-tt/2*Math.sin(k)-y-3,t.centerRotatedLabels||(p+=tt/2*Math.cos(k)-2)):0>l?(v=it+tt*Math.sin(k)-y-1,p+=-tt*Math.cos(k)-ei*Math.sin(k)-4):v-=y+b+3+3,v-=ct):(0<l?(v=it+tt/2*Math.sin(k)+y+3,t.centerRotatedLabels||(p-=tt/2*Math.cos(k))):0>l?(v=it+y+3-tt/2*Math.sin(k)+2,p+=tt/2*Math.cos(k)):v+=y+ht+3+3,v+=ct)):(v+=rt+b/2-et,p+=ft,d?(0<l?(v=tt/2*Math.sin(k)+y+3,t.centerRotatedLabels||(p-=tt/2*Math.cos(k))):v+=y+3,v+=ct):(0<l?(v=-(tt/2)*Math.sin(k)-y-6,t.centerRotatedLabels||(p+=tt/2*Math.cos(k))):v-=y+b+3+ht+3,v-=ct)),"bottom"==lt?vt=(d?it-y-1:it+ht-1)+et:(wt=ft,vt=(d?rt:rt-y-ht+1)-et),e&&(p+=e),b=p,0<l&&(b+=tt/2*Math.cos(k)),w&&(e=0,d&&(e=tt/2*Math.cos(k)),b+e>at+2||0>b))&&(w.remove(),w=null):(0<=i&&i<=it+1&&(0<y&&0<ni&&i+h<=it+1&&(ut=n.line(ot,[0,y+1],[i+h,i+h],oi,ni,gt),pt.push(ut)),0<dt&&(st=n.line(ot,[0,ft,at+ft],[i,i+rt,i+rt],ri,dt,gt,ui),pt.push(st))),nt="end",(!0===d&&"left"==lt||!1===d&&"right"==lt)&&(nt="start"),v=i-ei/2+2,1==fi&&0<ti&&!o&&!c&&(u=n.fitToBounds(i,0,it),kt=n.fitToBounds(kt,0,it),k=u-kt,yt=n.polygon(ot,[0,t.width,t.width,0],[0,0,k,k],si,ti),yt.translate(ft,u-k+rt),pt.push(yt)),v+=b/2,"right"==lt?(p+=ft+at+et,v+=rt,d?(e||(v-=b/2+3),p=p-(y+4)-ct):(p+=y+4+ht,v-=2,p+=ct)):d?(p+=y+4-et,e||(v-=b/2+3),o&&(p+=ft,v+=rt),p+=ct):(p+=-y-ht-6-et,v-=2,p-=ct),ut&&("right"==lt?(wt+=ft+et+at-1,vt+=rt,wt=d?wt-ht:wt+ht):(wt-=et,d||(wt-=y+ht))),e&&(v+=e),d=-3,"right"==lt&&(d+=rt),w&&(v>it+1||v<d-b/10)&&(w.remove(),w=null));ut&&(ut.translate(wt,vt),n.setCN(g,ut,t.bcn+"tick"),n.setCN(g,ut,a,!0),o&&n.setCN(g,ut,"guide"));!1===t.visible&&(ut&&ut.remove(),w&&(w.remove(),w=null));w&&(w.attr({"text-anchor":nt}),w.translate(p,v,NaN,!0),0!==l&&w.rotate(-l,t.chart.backgroundColor),t.allLabels.push(w),this.label=w,n.setCN(g,w,t.bcn+"label"),n.setCN(g,w,a,!0),o&&n.setCN(g,w,"guide"));st&&(n.setCN(g,st,t.bcn+"grid"),n.setCN(g,st,a,!0),o&&n.setCN(g,st,"guide"));yt&&(n.setCN(g,yt,t.bcn+"fill"),n.setCN(g,yt,a,!0));c?st&&n.setCN(g,st,t.bcn+"grid-minor"):(t.counter=0===fi?1:0,t.previousCoord=i);0===this.set.node.childNodes.length&&this.set.remove()},graphics:function(){return this.set},getLabel:function(){return this.label}})}(),function(){var n=window.AmCharts;n.RecFill=n.Class({construct:function(t,i,r,u){var c=t.dx,l=t.dy,f=t.orientation,h=0,o,e,s;r<i&&(e=i,i=r,r=e);o=u.fillAlpha;isNaN(o)&&(o=0);e=t.chart.container;s=u.fillColor;"V"==f?(i=n.fitToBounds(i,0,t.height),r=n.fitToBounds(r,0,t.height)):(i=n.fitToBounds(i,0,t.width),r=n.fitToBounds(r,0,t.width));r-=i;isNaN(r)&&(r=4,h=2,o=0);0>r&&"object"==typeof s&&(s=s.join(",").split(",").reverse());"V"==f?(f=n.rect(e,t.width,r,s,o),f.translate(c,i-h+l)):(f=n.rect(e,r,t.height,s,o),f.translate(i-h+c,l));n.setCN(t.chart,f,"guide-fill");u.id&&n.setCN(t.chart,f,"guide-fill-"+u.id);this.set=e.set([f])},graphics:function(){return this.set},getLabel:function(){}})}(),function(){var n=window.AmCharts;n.AmChart=n.Class({construct:function(t){this.svgIcons=this.tapToActivate=!0;this.theme=t;this.classNamePrefix="amcharts";this.addClassNames=!1;this.version="3.21.15";n.addChart(this);this.createEvents("buildStarted","dataUpdated","init","rendered","drawn","failed","resized","animationFinished");this.height=this.width="100%";this.dataChanged=!0;this.chartCreated=!1;this.previousWidth=this.previousHeight=0;this.backgroundColor="#FFFFFF";this.borderAlpha=this.backgroundAlpha=0;this.color=this.borderColor="#000000";this.fontFamily="Verdana";this.fontSize=11;this.usePrefixes=!1;this.autoResize=!0;this.autoDisplay=!1;this.addCodeCredits=this.accessible=!0;this.touchStartTime=this.touchClickDuration=0;this.precision=-1;this.percentPrecision=2;this.decimalSeparator=".";this.thousandsSeparator=",";this.labels=[];this.allLabels=[];this.titles=[];this.marginRight=this.marginLeft=this.autoMarginOffset=0;this.timeOuts=[];this.creditsPosition="top-left";var r=document.createElement("div"),i=r.style;i.overflow="hidden";i.position="relative";i.textAlign="left";this.chartDiv=r;r=document.createElement("div");i=r.style;i.overflow="hidden";i.position="relative";i.textAlign="left";this.legendDiv=r;this.titleHeight=0;this.hideBalloonTime=150;this.handDrawScatter=2;this.cssScale=this.handDrawThickness=1;this.cssAngle=0;this.prefixesOfBigNumbers=[{number:1e3,prefix:"k"},{number:1e6,prefix:"M"},{number:1e9,prefix:"G"},{number:1e12,prefix:"T"},{number:1e15,prefix:"P"},{number:1e18,prefix:"E"},{number:1e21,prefix:"Z"},{number:1e24,prefix:"Y"}];this.prefixesOfSmallNumbers=[{number:1e-24,prefix:"y"},{number:1e-21,prefix:"z"},{number:1e-18,prefix:"a"},{number:1e-15,prefix:"f"},{number:1e-12,prefix:"p"},{number:1e-9,prefix:"n"},{number:1e-6,prefix:"μ"},{number:.001,prefix:"m"}];this.panEventsEnabled=!0;this.product="amcharts";this.animations=[];this.balloon=new n.AmBalloon(this.theme);this.balloon.chart=this;this.processTimeout=0;this.processCount=1e3;this.animatable=[];this.langObj={};n.applyTheme(this,t,"AmChart")},drawChart:function(){0<this.realWidth&&0<this.realHeight&&(this.drawBackground(),this.redrawLabels(),this.drawTitles(),this.brr(),this.renderFix(),this.chartDiv&&(this.boundingRect=this.chartDiv.getBoundingClientRect()))},makeAccessible:function(n,t,i){this.accessible&&n&&(i&&n.setAttr("role",i),n.setAttr("aria-label",t))},drawBackground:function(){var r,u;n.remove(this.background);var i=this.container,t=this.backgroundColor,f=this.backgroundAlpha,e=this.set;n.isModern||0!==f||(f=.001);r=this.updateWidth();this.realWidth=r;u=this.updateHeight();this.realHeight=u;t=n.polygon(i,[0,r-1,r-1,0],[0,0,u-1,u-1],t,f,1,this.borderColor,this.borderAlpha);n.setCN(this,t,"bg");this.background=t;e.push(t);(t=this.backgroundImage)&&(i=i.image(t,0,0,r,u),n.setCN(this,t,"bg-image"),this.bgImg=i,e.push(i))},drawTitles:function(t){var s=this.titles,u,f,i,r,e,o,h;if(this.titleHeight=0,n.ifArray(s)){for(u=20,f=0;f<s.length;f++)i=s[f],i=n.processObject(i,n.Title,this.theme),!1!==i.enabled&&(r=i.color,void 0===r&&(r=this.color),e=i.size,isNaN(e)&&(e=this.fontSize+2),isNaN(i.alpha),o=this.marginLeft,h=!0,void 0!==i.bold&&(h=i.bold),r=n.wrappedText(this.container,i.text,r,this.fontFamily,e,"middle",h,this.realWidth-35-this.marginRight-o),r.translate(o+(this.realWidth-this.marginRight-o)/2,u),r.node.style.pointerEvents="none",i.sprite=r,void 0!==i.tabIndex&&r.setAttr("tabindex",i.tabIndex),n.setCN(this,r,"title"),i.id&&n.setCN(this,r,"title-"+i.id),r.attr({opacity:i.alpha}),u+=r.getBBox().height+5,t?r.remove():this.freeLabelsSet.push(r));this.titleHeight=u-10}},write:function(n){var t=this,i,r;if(t.listeners)for(i=0;i<t.listeners.length;i++)r=t.listeners[i],t.addListener(r.event,r.method);t.fire({type:"buildStarted",chart:t});t.afterWriteTO&&clearTimeout(t.afterWriteTO);0<t.processTimeout?t.afterWriteTO=setTimeout(function(){t.afterWrite.call(t,n)},t.processTimeout):t.afterWrite(n)},afterWrite:function(t){var f,s,i;if(f="object"!=typeof t?document.getElementById(t):t){for(;f.firstChild;)f.removeChild(f.firstChild);this.div=f;f.style.overflow="hidden";f.style.textAlign="left";t=this.chartDiv;var o=this.legendDiv,r=this.legend,u=o.style,e=t.style;if(this.measure(),this.previousHeight=this.divRealHeight,this.previousWidth=this.divRealWidth,i=document.createElement("div"),s=i.style,s.position="relative",this.containerDiv=i,i.className=this.classNamePrefix+"-main-div",t.className=this.classNamePrefix+"-chart-div",f.appendChild(i),(f=this.exportConfig)&&n.AmExport&&!this.AmExport&&(this.AmExport=new n.AmExport(this,f)),this.amExport&&n.AmExport&&(this.AmExport=n.extend(this.amExport,new n.AmExport(this),!0)),this.AmExport&&this.AmExport.init&&this.AmExport.init(),r){if(r=this.addLegend(r,r.divId),r.enabled)switch(u.left=null,u.top=null,u.right=null,e.left=null,e.right=null,e.top=null,u.position="relative",e.position="relative",s.width="100%",s.height="100%",r.position){case"bottom":i.appendChild(t);i.appendChild(o);break;case"top":i.appendChild(o);i.appendChild(t);break;case"absolute":u.position="absolute";e.position="absolute";void 0!==r.left&&(u.left=r.left+"px");void 0!==r.right&&(u.right=r.right+"px");void 0!==r.top&&(u.top=r.top+"px");void 0!==r.bottom&&(u.bottom=r.bottom+"px");r.marginLeft=0;r.marginRight=0;i.appendChild(t);i.appendChild(o);break;case"right":u.position="relative";e.position="absolute";i.appendChild(t);i.appendChild(o);break;case"left":u.position="absolute";e.position="relative";i.appendChild(t);i.appendChild(o);break;case"outside":i.appendChild(t)}else i.appendChild(t);this.prevLegendPosition=r.position}else i.appendChild(t);this.listenersAdded||(this.addListeners(),this.listenersAdded=!0);(this.mouseWheelScrollEnabled||this.mouseWheelZoomEnabled)&&n.addWheelListeners();this.initChart()}},createLabelsSet:function(){n.remove(this.labelsSet);this.labelsSet=this.container.set();this.freeLabelsSet.push(this.labelsSet)},initChart:function(){this.balloon=n.processObject(this.balloon,n.AmBalloon,this.theme);window.AmCharts_path&&(this.path=window.AmCharts_path);void 0===this.path&&(this.path=n.getPath());void 0===this.path&&(this.path="amcharts/");this.path=n.normalizeUrl(this.path);void 0===this.pathToImages&&(this.pathToImages=this.path+"images/");this.initHC||(n.callInitHandler(this),this.initHC=!0);n.applyLang(this.language,this);var t=this.numberFormatter;t&&(isNaN(t.precision)||(this.precision=t.precision),void 0!==t.thousandsSeparator&&(this.thousandsSeparator=t.thousandsSeparator),void 0!==t.decimalSeparator&&(this.decimalSeparator=t.decimalSeparator));(t=this.percentFormatter)&&!isNaN(t.precision)&&(this.percentPrecision=t.precision);this.nf={precision:this.precision,thousandsSeparator:this.thousandsSeparator,decimalSeparator:this.decimalSeparator};this.pf={precision:this.percentPrecision,thousandsSeparator:this.thousandsSeparator,decimalSeparator:this.decimalSeparator};this.destroy();(t=this.container)?(t.container.innerHTML="",t.width=this.realWidth,t.height=this.realHeight,t.addDefs(this),this.chartDiv.appendChild(t.container)):t=new n.AmDraw(this.chartDiv,this.realWidth,this.realHeight,this);this.container=t;this.extension=".png";this.svgIcons&&n.SVG&&(this.extension=".svg");this.checkDisplay();this.checkTransform(this.div);t.chart=this;n.VML||n.SVG?(t.handDrawn=this.handDrawn,t.handDrawScatter=this.handDrawScatter,t.handDrawThickness=this.handDrawThickness,n.remove(this.set),this.set=t.set(),n.remove(this.gridSet),this.gridSet=t.set(),n.remove(this.cursorLineSet),this.cursorLineSet=t.set(),n.remove(this.graphsBehindSet),this.graphsBehindSet=t.set(),n.remove(this.bulletBehindSet),this.bulletBehindSet=t.set(),n.remove(this.columnSet),this.columnSet=t.set(),n.remove(this.graphsSet),this.graphsSet=t.set(),n.remove(this.trendLinesSet),this.trendLinesSet=t.set(),n.remove(this.axesSet),this.axesSet=t.set(),n.remove(this.cursorSet),this.cursorSet=t.set(),n.remove(this.scrollbarsSet),this.scrollbarsSet=t.set(),n.remove(this.bulletSet),this.bulletSet=t.set(),n.remove(this.freeLabelsSet),this.freeLabelsSet=t.set(),n.remove(this.axesLabelsSet),this.axesLabelsSet=t.set(),n.remove(this.balloonsSet),this.balloonsSet=t.set(),n.remove(this.plotBalloonsSet),this.plotBalloonsSet=t.set(),n.remove(this.zoomButtonSet),this.zoomButtonSet=t.set(),n.remove(this.zbSet),this.zbSet=null,n.remove(this.linkSet),this.linkSet=t.set()):this.fire({type:"failed",chart:this})},premeasure:function(){var n=this.div,t,i;if(n){try{this.boundingRect=this.chartDiv.getBoundingClientRect()}catch(r){}t=n.offsetWidth;i=n.offsetHeight;n.clientHeight&&(t=n.clientWidth,i=n.clientHeight);(t!=this.mw||i!=this.mh)&&(this.mw=t,this.mh=i,this.measure())}},measure:function(){var t=this.div;if(t){var f=this.chartDiv,i=t.offsetWidth,r=t.offsetHeight,e=this.container;t.clientHeight&&(i=t.clientWidth,r=t.clientHeight);var r=Math.round(r),i=Math.round(i),t=Math.round(n.toCoordinate(this.width,i)),u=Math.round(n.toCoordinate(this.height,r));(i!=this.previousWidth||r!=this.previousHeight)&&0<t&&0<u&&(f.style.width=t+"px",f.style.height=u+"px",f.style.padding=0,e&&e.setSize(t,u),this.balloon=n.processObject(this.balloon,n.AmBalloon,this.theme));this.balloon&&this.balloon.setBounds&&this.balloon.setBounds(2,2,t-2,u);this.updateWidth();this.balloon.chart=this;this.realWidth=t;this.realHeight=u;this.divRealWidth=i;this.divRealHeight=r}},checkDisplay:function(){if(this.autoDisplay&&this.container){var t=n.rect(this.container,10,10),i=t.getBBox();0===i.width&&0===i.height&&(this.divRealHeight=this.divRealWidth=this.realHeight=this.realWidth=0,this.previousWidth=this.previousHeight=NaN);t.remove()}},checkTransform:function(n){var t;if(this.autoTransform&&window.getComputedStyle&&n){if(n.style&&(t=window.getComputedStyle(n,null),t&&(t=t.getPropertyValue("-webkit-transform")||t.getPropertyValue("-moz-transform")||t.getPropertyValue("-ms-transform")||t.getPropertyValue("-o-transform")||t.getPropertyValue("transform"))&&"none"!==t)){var i=t.split("(")[1].split(")")[0].split(","),t=i[0],i=i[1],t=Math.sqrt(t*t+i*i);isNaN(t)||(this.cssScale*=t)}n.parentNode&&this.checkTransform(n.parentNode)}},destroy:function(){this.chartDiv.innerHTML="";this.clearTimeOuts();this.legend&&this.legend.destroy&&this.legend.destroy()},clearTimeOuts:function(){var t=this.timeOuts,n;if(t)for(n=0;n<t.length;n++)clearTimeout(t[n]);this.timeOuts=[]},clear:function(t){try{document.removeEventListener("touchstart",this.docfn1,!0);document.removeEventListener("touchend",this.docfn2,!0)}catch(i){}if(n.callMethod("clear",[this.chartScrollbar,this.scrollbarV,this.scrollbarH,this.chartCursor]),this.chartCursor=this.scrollbarH=this.scrollbarV=this.chartScrollbar=null,this.clearTimeOuts(),this.container&&(this.container.remove(this.chartDiv),this.container.remove(this.legendDiv)),t||n.removeChart(this),t=this.div)for(;t.firstChild;)t.removeChild(t.firstChild);this.legend&&this.legend.destroy&&this.legend.destroy();this.AmExport&&this.AmExport.clear&&this.AmExport.clear()},setMouseCursor:function(t){"auto"==t&&n.isNN&&(t="default");this.chartDiv.style.cursor=t;this.legendDiv.style.cursor=t},redrawLabels:function(){var t,n;for(this.labels=[],t=this.allLabels,this.createLabelsSet(),n=0;n<t.length;n++)this.drawLabel(t[n])},drawLabel:function(t){var i=this;if(i.container&&!1!==t.enabled){t=n.processObject(t,n.Label,i.theme);var u=t.y,r=t.text,f=t.align,s=t.size,h=t.color,e=t.rotation,c=t.alpha,l=t.bold,o=n.toCoordinate(t.x,i.realWidth),u=n.toCoordinate(u,i.realHeight);o||(o=0);u||(u=0);void 0===h&&(h=i.color);isNaN(s)&&(s=i.fontSize);f||(f="start");"left"==f&&(f="start");"right"==f&&(f="end");"center"==f&&(f="middle",e?u=i.realHeight-u+u/2:o=i.realWidth/2-o);void 0===c&&(c=1);void 0===e&&(e=0);u+=s/2;r=n.text(i.container,r,h,i.fontFamily,s,f,l,c);r.translate(o,u);void 0!==t.tabIndex&&r.setAttr("tabindex",t.tabIndex);n.setCN(i,r,"label");t.id&&n.setCN(i,r,"label-"+t.id);0!==e&&r.rotate(e);t.url?(r.setAttr("cursor","pointer"),r.click(function(){n.getURL(t.url,i.urlTarget)})):r.node.style.pointerEvents="none";i.labelsSet.push(r);i.labels.push(r)}},addLabel:function(n,t,i,r,u,f,e,o,s,h){n={x:n,y:t,text:i,align:r,size:u,color:f,alpha:o,rotation:e,bold:s,url:h,enabled:!0};this.container&&this.drawLabel(n);this.allLabels.push(n)},clearLabels:function(){for(var t=this.labels,n=t.length-1;0<=n;n--)t[n].remove();this.labels=[];this.allLabels=[]},updateHeight:function(){var n=this.divRealHeight,t=this.legend,i;return t&&(i=this.legendDiv.offsetHeight,t=t.position,("top"==t||"bottom"==t)&&(n-=i,(0>n||isNaN(n))&&(n=0),this.chartDiv.style.height=n+"px")),n},updateWidth:function(){var n=this.divRealWidth,e=this.divRealHeight,i=this.legend,t,r;if(i){t=this.legendDiv;r=t.offsetWidth;isNaN(i.width)||(r=i.width);i.ieW&&(r=i.ieW);var o=t.offsetHeight,t=t.style,u=this.chartDiv.style,f=i.position;("right"==f||"left"==f)&&void 0===i.divId&&(n-=r,(0>n||isNaN(n))&&(n=0),u.width=n+"px",this.balloon&&this.balloon.setBounds&&this.balloon.setBounds(2,2,n-2,this.realHeight),"left"==f?(u.left=r+"px",t.left="0px"):(u.left="0px",t.left=n+"px"),e>o&&(t.top=(e-o)/2+"px"))}return n},getTitleHeight:function(){return this.drawTitles(!0),this.titleHeight},addTitle:function(n,t,i,r,u){return isNaN(t)&&(t=this.fontSize+2),n={text:n,size:t,color:i,alpha:r,bold:u,enabled:!0},this.titles.push(n),n},handleWheel:function(n){var t=0;n||(n=window.event);n.wheelDelta?t=n.wheelDelta/120:n.detail&&(t=-n.detail/3);t&&this.handleWheelReal(t,n.shiftKey);n.preventDefault&&n.preventDefault()},handleWheelReal:function(){},handleDocTouchStart:function(){this.handleMouseMove();this.tmx=this.mouseX;this.tmy=this.mouseY;this.touchStartTime=(new Date).getTime()},handleDocTouchEnd:function(){-.5<this.tmx&&this.tmx<this.divRealWidth+1&&0<this.tmy&&this.tmy<this.divRealHeight?(this.handleMouseMove(),4>Math.abs(this.mouseX-this.tmx)&&4>Math.abs(this.mouseY-this.tmy)?(this.tapped=!0,this.panRequired&&this.panEventsEnabled&&this.chartDiv&&(this.chartDiv.style.msTouchAction="none",this.chartDiv.style.touchAction="none")):this.mouseIsOver||this.resetTouchStyle()):(this.tapped=!1,this.resetTouchStyle())},resetTouchStyle:function(){this.panEventsEnabled&&this.chartDiv&&(this.chartDiv.style.msTouchAction="auto",this.chartDiv.style.touchAction="auto")},checkTouchDuration:function(n){var t=this,i=(new Date).getTime();if(n)if(n.touches)t.isTouchEvent=!0;else if(!t.isTouchEvent)return!0;if(i-t.touchStartTime>t.touchClickDuration)return!0;setTimeout(function(){t.resetTouchDuration()},300)},resetTouchDuration:function(){this.isTouchEvent=!1},checkTouchMoved:function(){if(4<Math.abs(this.mouseX-this.tmx)||4<Math.abs(this.mouseY-this.tmy))return!0},addListeners:function(){var n=this,t=n.chartDiv;document.addEventListener?("ontouchstart"in document.documentElement&&(t.addEventListener("touchstart",function(t){n.handleTouchStart.call(n,t)},!0),t.addEventListener("touchmove",function(t){n.handleMouseMove.call(n,t)},!0),t.addEventListener("touchend",function(t){n.handleTouchEnd.call(n,t)},!0),n.docfn1=function(t){n.handleDocTouchStart.call(n,t)},n.docfn2=function(t){n.handleDocTouchEnd.call(n,t)},document.addEventListener("touchstart",n.docfn1,!0),document.addEventListener("touchend",n.docfn2,!0)),t.addEventListener("mousedown",function(t){n.mouseIsOver=!0;n.handleMouseMove.call(n,t);n.handleMouseDown.call(n,t);n.handleDocTouchStart.call(n,t)},!0),t.addEventListener("mouseover",function(t){n.handleMouseOver.call(n,t)},!0),t.addEventListener("mouseout",function(t){n.handleMouseOut.call(n,t)},!0),t.addEventListener("mouseup",function(t){n.handleDocTouchEnd.call(n,t)},!0)):(t.attachEvent("onmousedown",function(t){n.handleMouseDown.call(n,t)}),t.attachEvent("onmouseover",function(t){n.handleMouseOver.call(n,t)}),t.attachEvent("onmouseout",function(t){n.handleMouseOut.call(n,t)}))},dispDUpd:function(){this.skipEvents||(this.dispatchDataUpdated&&(this.dispatchDataUpdated=!1,this.fire({type:"dataUpdated",chart:this})),this.chartCreated||(this.chartCreated=!0,this.fire({type:"init",chart:this})),!this.chartRendered&&0<this.divRealWidth&&0<this.divRealHeight&&(this.fire({type:"rendered",chart:this}),this.chartRendered=!0),this.fire({type:"drawn",chart:this}));this.skipEvents=!1},validateSize:function(){var n=this,t,i;n.premeasure();n.checkDisplay();n.cssScale=1;n.cssAngle=0;n.checkTransform(n.div);(n.divRealWidth!=n.previousWidth||n.divRealHeight!=n.previousHeight)&&(t=n.legend,0<n.realWidth&&0<n.realHeight&&(n.sizeChanged=!0,t&&(n.legendInitTO&&clearTimeout(n.legendInitTO),i=setTimeout(function(){t.invalidateSize()},10),n.timeOuts.push(i),n.legendInitTO=i),n.marginsUpdated=!1,clearTimeout(n.initTO),i=setTimeout(function(){n.initChart()},10),n.timeOuts.push(i),n.initTO=i),n.renderFix(),t&&t.renderFix&&t.renderFix(),n.positionCred(),clearTimeout(n.resizedTO),n.resizedTO=setTimeout(function(){n.fire({type:"resized",chart:n})},10),n.previousHeight=n.divRealHeight,n.previousWidth=n.divRealWidth)},invalidateSize:function(){this.previousHeight=this.previousWidth=NaN;this.invalidateSizeReal()},invalidateSizeReal:function(){var n=this,t;n.marginsUpdated=!1;clearTimeout(n.validateTO);t=setTimeout(function(){n.validateSize()},5);n.timeOuts.push(t);n.validateTO=t},validateData:function(n){this.chartCreated&&(this.dataChanged=!0,this.marginsUpdated=!1,this.initChart(n))},validateNow:function(n,t){this.initTO&&clearTimeout(this.initTO);n&&(this.dataChanged=!0,this.marginsUpdated=!1);this.skipEvents=t;this.chartRendered=!1;var i=this.legend;i&&i.position!=this.prevLegendPosition&&(this.previousWidth=this.mw=0,i.invalidateSize&&(i.invalidateSize(),this.validateSize()));this.write(this.div)},showItem:function(n){n.hidden=!1;this.initChart()},hideItem:function(n){n.hidden=!0;this.initChart()},hideBalloon:function(){var n=this;clearTimeout(n.hoverInt);clearTimeout(n.balloonTO);n.hoverInt=setTimeout(function(){n.hideBalloonReal.call(n)},n.hideBalloonTime)},cleanChart:function(){},hideBalloonReal:function(){var n=this.balloon;n&&n.hide&&n.hide()},showBalloon:function(n,t,i,r,u){var f=this;clearTimeout(f.balloonTO);clearTimeout(f.hoverInt);f.balloonTO=setTimeout(function(){f.showBalloonReal.call(f,n,t,i,r,u)},1)},showBalloonReal:function(n,t,i,r,u){this.handleMouseMove();var f=this.balloon;f.enabled&&(f.followCursor(!1),f.changeColor(t),!i||f.fixedPosition?(f.setPosition(r,u),isNaN(r)||isNaN(u)?f.followCursor(!0):f.followCursor(!1)):f.followCursor(!0),n&&f.showBalloon(n))},handleMouseOver:function(){this.outTO&&clearTimeout(this.outTO);n.resetMouseOver();this.mouseIsOver=!0},handleMouseOut:function(){var t=this;n.resetMouseOver();t.outTO&&clearTimeout(t.outTO);t.outTO=setTimeout(function(){t.handleMouseOutReal()},10)},handleMouseOutReal:function(){this.mouseIsOver=!1},handleMouseMove:function(n){var t,i,r,u,f;if(n||(n=window.event),this.mouse2Y=this.mouse2X=NaN,n){if(n.touches){if(f=n.touches.item(1),f&&this.panEventsEnabled&&this.boundingRect&&(r=f.clientX-this.boundingRect.left,u=f.clientY-this.boundingRect.top),n=n.touches.item(0),!n)return}else this.wasTouched=!1;this.boundingRect&&n.clientX&&(t=n.clientX-this.boundingRect.left,i=n.clientY-this.boundingRect.top);isNaN(r)?this.mouseX=t:(this.mouseX=Math.min(t,r),this.mouse2X=Math.max(t,r));isNaN(u)?this.mouseY=i:(this.mouseY=Math.min(i,u),this.mouse2Y=Math.max(i,u));this.autoTransform&&(this.mouseX/=this.cssScale,this.mouseY/=this.cssScale)}},handleTouchStart:function(n){this.hideBalloonReal();n&&(n.touches&&this.tapToActivate&&!this.tapped||!this.panRequired)||(this.handleMouseMove(n),this.handleMouseDown(n))},handleTouchEnd:function(t){this.wasTouched=!0;this.handleMouseMove(t);n.resetMouseOver();this.handleReleaseOutside(t)},handleReleaseOutside:function(){this.handleDocTouchEnd.call(this)},handleMouseDown:function(t){n.resetMouseOver();this.mouseIsOver=!0;t&&t.preventDefault&&(this.panEventsEnabled?t.preventDefault():t.touches||t.preventDefault())},handleKeyUp:function(){},addLegend:function(t,i){t=n.processObject(t,n.AmLegend,this.theme);t.divId=i;t.ieW=0;var r;return r="object"!=typeof i&&i?document.getElementById(i):i,this.legend=t,t.chart=this,r?(t.div=r,t.position="outside",t.autoMargins=!1):t.div=this.legendDiv,t},removeLegend:function(){this.legend=void 0;this.previousWidth=0;this.legendDiv.innerHTML=""},handleResize:function(){(n.isPercents(this.width)||n.isPercents(this.height))&&this.invalidateSizeReal();this.renderFix()},renderFix:function(){if(!n.VML){var t=this.container;t&&t.renderFix()}},getSVG:function(){if(n.hasSVG)return this.container},animate:function(t,i,r,u,f,e,o){return t["an_"+i]&&n.removeFromArray(this.animations,t["an_"+i]),r={obj:t,frame:0,attribute:i,from:r,to:u,time:f,effect:e,suffix:o},t["an_"+i]=r,this.animations.push(r),r},setLegendData:function(n){var t=this.legend;t&&t.setData(n)},stopAnim:function(t){n.removeFromArray(this.animations,t)},updateAnimations:function(){var i;if(this.container&&this.container.update(),this.animations)for(i=this.animations.length-1;0<=i;i--){var t=this.animations[i],r=n.updateRate*t.time,e=t.frame+1,u=t.obj,f=t.attribute;if(e<=r){t.frame++;var o=Number(t.from),s=Number(t.to)-o,r=n[t.effect](0,e,o,s,r);0===s?(this.animations.splice(i,1),u.node.style[f]=Number(t.to)+t.suffix):u.node.style[f]=r+t.suffix}else u.node.style[f]=Number(t.to)+t.suffix,u.animationFinished=!0,this.animations.splice(i,1)}},update:function(){var n,i,t,r;if(this.updateAnimations(),n=this.animatable,0<n.length){for(i=!0,t=n.length-1;0<=t;t--)r=n[t],r&&(r.animationFinished?n.splice(t,1):i=!1);i&&(this.fire({type:"animationFinished",chart:this}),this.animatable=[])}},inIframe:function(){try{return window.self!==window.top}catch(n){return!0}},brr:function(){var n,i,t,r;this.hideCredits||(n="amcharts.com",t=window.location.hostname.split("."),2<=t.length&&(i=t[t.length-2]+"."+t[t.length-1]),this.amLink&&(t=this.amLink.parentNode)&&t.removeChild(this.amLink),(i!=n||!0===this.inIframe())&&(i=n="http://www."+n,t="JavaScript charts",r="JS chart by amCharts","ammap"==this.product&&(i=n+"/javascript-maps/",t="Interactive JavaScript maps",r="JS map by amCharts"),n=document.createElement("a"),r=document.createTextNode(r),n.setAttribute("href",i),n.setAttribute("title",t),this.urlTarget&&n.setAttribute("target",this.urlTarget),n.appendChild(r),this.chartDiv.appendChild(n),this.amLink=n,n=n.style,n.position="absolute",n.textDecoration="none",n.color=this.color,n.fontFamily=this.fontFamily,n.fontSize="11px",n.opacity=.7,n.display="block",this.positionCred()))},positionCred:function(){var t=this.amLink,n,i;if(t){var f=this.creditsPosition,s=t.style,h=t.offsetWidth,t=t.offsetHeight,r=0,u=0,e=this.realWidth,o=this.realHeight,n=this.type;("serial"==n||"xy"==n||"gantt"==n)&&(r=this.marginLeftReal,u=this.marginTopReal,e=r+this.plotAreaWidth,o=u+this.plotAreaHeight);n=5+r;i=u+5;"bottom-left"==f&&(n=5+r,i=o-t-3);"bottom-right"==f&&(n=e-h-5,i=o-t-3);"top-right"==f&&(n=e-h-5,i=u+5);s.left=n+"px";s.top=i+"px"}}});n.Slice=n.Class({construct:function(){}});n.SerialDataItem=n.Class({construct:function(){}});n.GraphDataItem=n.Class({construct:function(){}});n.Guide=n.Class({construct:function(t){this.cname="Guide";n.applyTheme(this,t,this.cname)}});n.Title=n.Class({construct:function(t){this.cname="Title";n.applyTheme(this,t,this.cname)}});n.Label=n.Class({construct:function(t){this.cname="Label";n.applyTheme(this,t,this.cname)}})}(),function(){var n=window.AmCharts;n.AmGraph=n.Class({construct:function(t){this.cname="AmGraph";this.createEvents("rollOverGraphItem","rollOutGraphItem","clickGraphItem","doubleClickGraphItem","rightClickGraphItem","clickGraph","rollOverGraph","rollOutGraph");this.type="line";this.stackable=!0;this.columnCount=1;this.columnIndex=0;this.centerCustomBullets=this.showBalloon=!0;this.maxBulletSize=50;this.minBulletSize=4;this.balloonText="[[value]]";this.hidden=this.scrollbar=this.animationPlayed=!1;this.pointPosition="middle";this.depthCount=1;this.includeInMinMax=!0;this.negativeBase=0;this.visibleInLegend=!0;this.showAllValueLabels=!1;this.showBulletsAt=this.showBalloonAt="close";this.lineThickness=1;this.dashLength=0;this.connect=!0;this.lineAlpha=1;this.bullet="none";this.bulletBorderThickness=2;this.bulletBorderAlpha=0;this.bulletAlpha=1;this.bulletSize=8;this.cornerRadiusTop=this.hideBulletsCount=this.bulletOffset=0;this.cursorBulletAlpha=1;this.gradientOrientation="vertical";this.dy=this.dx=0;this.periodValue="";this.clustered=!0;this.periodSpan=1;this.accessibleLabel="[[title]] [[category]] [[value]]";this.accessibleSkipText="Press enter to skip [[title]]";this.y=this.x=0;this.switchable=!0;this.minDistance=.8;this.tcc=1;this.labelRotation=0;this.labelAnchor="auto";this.labelOffset=3;this.bcn="graph-";this.dateFormat="MMM DD, YYYY";this.noRounding=!0;n.applyTheme(this,t,this.cname)},init:function(){this.createBalloon()},draw:function(){var t=this.chart,e,r,u,i,f;t.isRolledOverBullet=!1;e=t.type;t.drawGraphs&&(isNaN(this.precision)||(this.numberFormatter?this.numberFormatter.precision=this.precision:this.numberFormatter={precision:this.precision,decimalSeparator:t.decimalSeparator,thousandsSeparator:t.thousandsSeparator}),r=t.container,this.container=r,this.destroy(),u=r.set(),this.set=u,u.translate(this.x,this.y),i=r.set(),this.bulletSet=i,i.translate(this.x,this.y),this.behindColumns?(t.graphsBehindSet.push(u),t.bulletBehindSet.push(i)):(t.graphsSet.push(u),t.bulletSet.push(i)),f=this.bulletAxis,n.isString(f)&&(this.bulletAxis=t.getValueAxisById(f)),r=r.set(),n.remove(this.columnsSet),this.columnsSet=r,n.setCN(t,u,"graph-"+this.type),n.setCN(t,u,"graph-"+this.id),n.setCN(t,i,"graph-"+this.type),n.setCN(t,i,"graph-"+this.id),this.columnsArray=[],this.ownColumns=[],this.allBullets=[],this.animationArray=[],i=this.labelPosition,i||(f=this.valueAxis.stackType,i="top","column"==this.type&&(t.rotate&&(i="right"),"100%"==f||"regular"==f)&&(i="middle"),this.labelPosition=i),n.ifArray(this.data)&&(t=!1,"xy"==e?this.xAxis.axisCreated&&this.yAxis.axisCreated&&(t=!0):this.valueAxis.axisCreated&&(t=!0),!this.hidden&&t&&this.createGraph()),u.push(r))},createGraph:function(){var t=this,r=t.chart,i;if(t.startAlpha=r.startAlpha,t.seqAn=r.sequencedAnimation,t.baseCoord=t.valueAxis.baseCoord,void 0===t.fillAlphas&&(t.fillAlphas=0),t.bulletColorR=t.bulletColor,void 0===t.bulletColorR&&(t.bulletColorR=t.lineColorR,t.bulletColorNegative=t.negativeLineColor),void 0===t.bulletAlpha&&(t.bulletAlpha=t.lineAlpha),("step"==i||n.VML)&&(t.noRounding=!1),i=r.type,"gantt"==i&&(i="serial"),clearTimeout(t.playedTO),!isNaN(t.valueAxis.min)&&!isNaN(t.valueAxis.max)){switch(i){case"serial":t.categoryAxis&&(t.createSerialGraph(),"candlestick"==t.type&&1>t.valueAxis.minMaxMultiplier&&t.positiveClip(t.set));break;case"radar":t.createRadarGraph();break;case"xy":t.createXYGraph()}t.playedTO=setTimeout(function(){t.setAnimationPlayed.call(t)},500*t.chart.startDuration)}},setAnimationPlayed:function(){this.animationPlayed=!0},createXYGraph:function(){var s=[],h=[],e=this.xAxis,c=this.yAxis,r,t,o;for(this.pmh=c.height,this.pmw=e.width,this.pmy=this.pmx=0,r=this.start;r<=this.end;r++){var i=this.data[r].axes[e.id].graphs[this.id],n=i.values,u=n.x,t=n.y,n=e.getCoordinate(u,this.noRounding),f=c.getCoordinate(t,this.noRounding);isNaN(u)||isNaN(t)||!(s.push(n),h.push(f),i.x=n,i.y=f,u=this.createBullet(i,n,f,r),t=this.labelText)||(t=this.createLabel(i,t),o=0,u&&(o=u.size),this.positionLabel(i,n,f,t,o))}this.drawLineGraph(s,h);this.launchAnimation()},createRadarGraph:function(){for(var w=this.valueAxis.stackType,o=[],s=[],h=[],c=[],a,v,l,y,i,t,p,f=this.start;f<=this.end;f++)if(i=this.data[f].axes[this.valueAxis.id].graphs[this.id],"none"==w||"3d"==w?t=i.values.value:(t=i.values.close,p=i.values.open),isNaN(t))this.connect||(this.drawLineGraph(o,s,h,c),o=[],s=[],h=[],c=[]);else{var r=this.valueAxis.getCoordinate(t,this.noRounding)-this.height,r=r*this.valueAxis.rMultiplier,n=-360/(this.end-this.start+1)*f;if("middle"==this.valueAxis.pointPosition&&(n-=180/(this.end-this.start+1)),t=r*Math.sin(n/180*Math.PI),r*=Math.cos(n/180*Math.PI),o.push(t),s.push(r),!isNaN(p)){var u=this.valueAxis.getCoordinate(p,this.noRounding)-this.height,u=u*this.valueAxis.rMultiplier,e=u*Math.sin(n/180*Math.PI),n=u*Math.cos(n/180*Math.PI);h.push(e);c.push(n);isNaN(l)&&(l=e);isNaN(y)&&(y=n)}n=this.createBullet(i,t,r,f);i.x=t;i.y=r;(e=this.labelText)&&(e=this.createLabel(i,e),u=0,n&&(u=n.size),this.positionLabel(i,t,r,e,u));isNaN(a)&&(a=t);isNaN(v)&&(v=r)}o.push(a);s.push(v);isNaN(l)||(h.push(l),c.push(y));this.drawLineGraph(o,s,h,c);this.launchAnimation()},positionLabel:function(n,t,i,r,u){var f;if(r){var w=this.chart,p=this.valueAxis,c="middle",y=!1,l=this.labelPosition,e=r.getBBox(),s=this.chart.rotate,h=n.isNegative,o=this.fontSize;void 0===o&&(o=this.chart.fontSize);i-=e.height/2-o/2-1;void 0!==n.labelIsNegative&&(h=n.labelIsNegative);switch(l){case"right":l=s?h?"left":"right":"right";break;case"top":l=s?"top":h?"bottom":"top";break;case"bottom":l=s?"bottom":h?"top":"bottom";break;case"left":l=s?h?"right":"left":"left"}var o=n.columnGraphics,a=0,v=0;o&&(a=o.x,v=o.y);f=this.labelOffset;switch(l){case"right":c="start";t+=u/2+f;break;case"top":i=p.reversed?i+(u/2+e.height/2+f):i-(u/2+e.height/2+f);break;case"bottom":i=p.reversed?i-(u/2+e.height/2+f):i+(u/2+e.height/2+f);break;case"left":c="end";t-=u/2+f;break;case"inside":"column"==this.type&&(y=!0,s?h?(c="end",t=a-3-f):(c="start",t=a+3+f):i=h?v+7+f:v-10-f);break;case"middle":"column"==this.type&&(y=!0,s?t-=(t-a)/2+f-3:i-=(i-v)/2+f-3)}return"auto"!=this.labelAnchor&&(c=this.labelAnchor),r.attr({"text-anchor":c}),this.labelRotation&&r.rotate(this.labelRotation),r.translate(t,i),!this.showAllValueLabels&&o&&y&&(e=r.getBBox(),e.height>n.columnHeight||e.width>n.columnWidth)&&(r.remove(),r=null),r&&"radar"!=w.type&&(s?((0>i||i>this.height)&&(r.remove(),r=null),!this.showAllValueLabels&&r&&(0>t||t>this.width)&&(r.remove(),r=null)):((0>t||t>this.width)&&(r.remove(),r=null),!this.showAllValueLabels&&r&&(0>i||i>this.height)&&(r.remove(),r=null))),r&&this.allBullets.push(r),r}},getGradRotation:function(){var n=270;return"horizontal"==this.gradientOrientation&&(n=0),this.gradientRotation=n},createSerialGraph:function(){var tf,eu,hr,bi,df,ki,gf,u,hu,rr,uf,ai,yt,lr,of,re,sf,io,ti,fo,eo,wr,lu,ue,fe,ht,ee,oe,se,br,kr,dr,ve,ye,pe,ho,we,be,di,gr;this.dashLengthSwitched=this.fillColorsSwitched=this.lineColorSwitched=void 0;var it=this.chart,fr=this.id,gi=this.index,ii=this.data,lt=this.chart.container,s=this.valueAxis,k=this.type,w=this.columnWidthReal,ei=this.showBulletsAt;isNaN(this.columnWidth)||(w=this.columnWidth);isNaN(w)&&(w=.8);var nr=this.useNegativeColorIfDown,d=this.width,nt=this.height,yo=this.y,tt=this.rotate,yi=this.columnCount,yu=n.toCoordinate(this.cornerRadiusTop,w/2),lf=this.connect,c=[],a=[],ar,nu,af,tu,tr=this.chart.graphs.length,iu,ft=this.dx/this.tcc,at=this.dy/this.tcc,vt=s.stackType,er=this.start,vr=this.end,pi=this.scrollbar,ru="graph-column-";pi&&(ru="scrollbar-graph-column-");var ke=this.categoryAxis,de=this.baseCoord,pu=this.negativeBase,rt=this.columnIndex,et=this.lineThickness,ri=this.lineAlpha,wu=this.lineColorR,si=this.dashLength,or=this.set,ge,bu=this.getGradRotation(),hi=this.chart.columnSpacing,ut=ke.cellWidth,no=(ut*w-yi)/yi;hi>no&&(hi=no);var g,t,ku,vf=nt,yf=d,du=0,pf=0,wf=0,bf=0,gu=0,nf=0,kf=this.fillColorsR,sr=this.negativeFillColors,wi=this.negativeLineColor,uu=this.fillAlphas,fu=this.negativeFillAlphas;if("object"==typeof uu&&(uu=uu[0]),"object"==typeof fu&&(fu=fu[0]),tf=this.noRounding,"step"==k&&(tf=!1),eu=s.getCoordinate(s.min),s.logarithmic&&(eu=s.getCoordinate(s.minReal)),this.minCoord=eu,this.resetBullet&&(this.bullet="none"),pi||"line"!=k&&"smoothedLine"!=k&&"step"!=k||(1==ii.length&&"step"!=k&&"none"==this.bullet&&(this.bullet="round",this.resetBullet=!0),!sr&&void 0==wi||nr)||(hr=pu,hr>s.max&&(hr=s.max),hr<s.min&&(hr=s.min),s.logarithmic&&(hr=s.minReal),bi=s.getCoordinate(hr)+.5,df=s.getCoordinate(s.max),tt?(vf=nt,yf=Math.abs(df-bi),wf=nt,bf=Math.abs(eu-bi),nf=pf=0,s.reversed?(du=0,gu=bi):(du=bi,gu=0)):(yf=d,vf=Math.abs(df-bi),bf=d,wf=Math.abs(eu-bi),gu=du=0,s.reversed?(nf=yo,pf=bi):nf=bi)),ki=Math.round,this.pmx=ki(du),this.pmy=ki(pf),this.pmh=ki(vf),this.pmw=ki(yf),this.nmx=ki(gu),this.nmy=ki(nf),this.nmh=ki(wf),this.nmw=ki(bf),n.isModern||(this.nmy=this.nmx=0,this.nmh=this.height),this.clustered||(yi=1),w="column"==k?(ut*w-hi*(yi-1))/yi:ut*w,1>w&&(w=1),gf=this.fixedColumnWidth,isNaN(gf)||(w=gf),"line"==k||"step"==k||"smoothedLine"==k){if(0<er){for(u=er-1;-1<u;u--)if(g=ii[u],t=g.axes[s.id].graphs[fr],ku=t.values.value,!isNaN(ku)){er=u;break}if(this.lineColorField)for(u=er;-1<u;u--)if(g=ii[u],t=g.axes[s.id].graphs[fr],t.lineColor){this.lineColorSwitched=t.lineColor;void 0===this.bulletColor&&(this.bulletColorSwitched=this.lineColorSwitched);break}if(this.fillColorsField)for(u=er;-1<u;u--)if(g=ii[u],t=g.axes[s.id].graphs[fr],t.fillColors){this.fillColorsSwitched=t.fillColors;break}if(this.dashLengthField)for(u=er;-1<u;u--)if(g=ii[u],t=g.axes[s.id].graphs[fr],!isNaN(t.dashLength)){this.dashLengthSwitched=t.dashLength;break}}if(vr<ii.length-1)for(u=vr+1;u<ii.length;u++)if(g=ii[u],t=g.axes[s.id].graphs[fr],ku=t.values.value,!isNaN(ku)){vr=u;break}}vr<ii.length-1&&vr++;var v=[],y=[],ir=!1;("line"==k||"step"==k||"smoothedLine"==k)&&(this.stackable&&"regular"==vt||"100%"==vt||this.fillToGraph)&&(ir=!0);var to=this.noStepRisers,ou=-1e3,su=-1e3,rf=this.minDistance,cr=!0,yr=!1;for(u=er;u<=vr;u++){if(g=ii[u],t=g.axes[s.id].graphs[fr],t.index=u,rr=NaN,nr&&void 0==this.openField)for(uf=u+1;uf<ii.length&&(!ii[uf]||!(hu=ii[u+1].axes[s.id].graphs[fr])||!hu.values||(rr=hu.values.value,isNaN(rr)));uf++);var l,h,e,b,yt=NaN,i=NaN,r=NaN,o=NaN,f=NaN,pt=NaN,wt=NaN,bt=NaN,kt=NaN,ui=NaN,ci=NaN,ot=NaN,st=NaN,p=NaN,ne=NaN,te=NaN,dt=NaN,ht=void 0,ur=kf,pr=uu,li=wu,fi,gt,ie=this.proCandlesticks,ff=this.topRadius,oi=nt-1,ct=d-1,cu=this.pattern;if(void 0!=t.pattern&&(cu=t.pattern),isNaN(t.alpha)||(pr=t.alpha),isNaN(t.dashLength)||(si=t.dashLength),ai=t.values,s.recalculateToPercents&&(ai=t.percents),"none"==vt&&(rt=isNaN(t.columnIndex)?this.columnIndex:t.columnIndex),ai){if(p=this.stackable&&"none"!=vt&&"3d"!=vt?ai.close:ai.value,("candlestick"==k||"ohlc"==k)&&(p=ai.close,te=ai.low,wt=s.getCoordinate(te),ne=ai.high,kt=s.getCoordinate(ne)),dt=ai.open,r=s.getCoordinate(p,tf),isNaN(dt)||(f=s.getCoordinate(dt,tf),nr&&"regular"!=vt&&"100%"!=vt&&(rr=dt,dt=f=NaN)),nr&&(void 0==this.openField?hu&&(hu.isNegative=rr<p?!0:!1,isNaN(rr)&&(t.isNegative=!cr)):t.isNegative=rr>p?!0:!1),!pi)switch(this.showBalloonAt){case"close":t.y=r;break;case"open":t.y=f;break;case"high":t.y=kt;break;case"low":t.y=wt}yt=g.x[ke.id];lr=this.periodSpan-1;"step"!=k||isNaN(g.cellWidth)||(ut=g.cellWidth);var ni=Math.floor(ut/2)+Math.floor(lr*ut/2),vi=ni,ef=0;"left"==this.stepDirection&&(ef=(2*ut+lr*ut)/2,yt-=ef);"center"==this.stepDirection&&(ef=ut/2,yt-=ef);"start"==this.pointPosition&&(yt-=ut/2+Math.floor(lr*ut/2),ni=0,vi=Math.floor(ut)+Math.floor(lr*ut));"end"==this.pointPosition&&(yt+=ut/2+Math.floor(lr*ut/2),ni=Math.floor(ut)+Math.floor(lr*ut),vi=0);to&&(of=this.columnWidth,isNaN(of)||(ni*=of,vi*=of));pi||(t.x=yt);-1e5>yt&&(yt=-1e5);yt>d+1e5&&(yt=d+1e5);tt?(i=r,o=f,f=r=yt,isNaN(dt)&&!this.fillToGraph&&(o=de),pt=wt,bt=kt):(o=i=yt,isNaN(dt)&&!this.fillToGraph&&(f=de));(!ie&&p<dt||ie&&p<ge)&&(t.isNegative=!0,sr&&(ur=sr),fu&&(pr=fu),void 0!=wi&&(li=wi));yr=!1;isNaN(p)||(nr?p>rr?(cr&&(yr=!0),cr=!1):(cr||(yr=!0),cr=!0):t.isNegative=p<pu?!0:!1,ge=p);re=!1;pi&&it.chartScrollbar.ignoreCustomColors&&(re=!0);re||(void 0!=t.color&&(ur=t.color),t.fillColors&&(ur=t.fillColors));r=n.fitToBounds(r,-3e4,3e4);switch(k){case"line":isNaN(p)?lf||(this.drawLineGraph(c,a,v,y),c=[],a=[],v=[],y=[]):((Math.abs(i-ou)>=rf||Math.abs(r-su)>=rf)&&(c.push(i),a.push(r),ou=i,su=r),ui=i,ci=r,ot=i,st=r,!ir||isNaN(f)||isNaN(o)||(v.push(o),y.push(f)),(yr||void 0!=t.lineColor&&t.lineColor!=this.lineColorSwitched||void 0!=t.fillColors&&t.fillColors!=this.fillColorsSwitched||!isNaN(t.dashLength))&&(this.drawLineGraph(c,a,v,y),c=[i],a=[r],v=[],y=[],!ir||isNaN(f)||isNaN(o)||(v.push(o),y.push(f)),nr?(cr?(this.lineColorSwitched=wu,this.fillColorsSwitched=kf):(this.lineColorSwitched=wi,this.fillColorsSwitched=sr),void 0===this.bulletColor&&(this.bulletColorSwitched=wu)):(this.lineColorSwitched=t.lineColor,this.fillColorsSwitched=t.fillColors,void 0===this.bulletColor&&(this.bulletColorSwitched=this.lineColorSwitched)),this.dashLengthSwitched=t.dashLength),t.gap&&(this.drawLineGraph(c,a,v,y),c=[],a=[],v=[],y=[],su=ou=-1e3));break;case"smoothedLine":isNaN(p)?lf||(this.drawSmoothedGraph(c,a,v,y),c=[],a=[],v=[],y=[]):((Math.abs(i-ou)>=rf||Math.abs(r-su)>=rf)&&(c.push(i),a.push(r),ou=i,su=r),ui=i,ci=r,ot=i,st=r,!ir||isNaN(f)||isNaN(o)||(v.push(o),y.push(f)),(yr||void 0!=t.lineColor&&t.lineColor!=this.lineColorSwitched||void 0!=t.fillColors&&t.fillColors!=this.fillColorsSwitched||!isNaN(t.dashLength))&&(this.drawSmoothedGraph(c,a,v,y),c=[i],a=[r],v=[],y=[],!ir||isNaN(f)||isNaN(o)||(v.push(o),y.push(f)),this.lineColorSwitched=t.lineColor,this.fillColorsSwitched=t.fillColors,this.dashLengthSwitched=t.dashLength),t.gap&&(this.drawSmoothedGraph(c,a,v,y),c=[],a=[],v=[],y=[]));break;case"step":isNaN(p)?lf||((1>=this.periodSpan||1<this.periodSpan&&i-ar>ni+vi)&&(ar=nu=NaN),this.drawLineGraph(c,a,v,y),c=[],a=[],v=[],y=[]):(tt?(isNaN(ar)||(c.push(ar),a.push(r-ni)),a.push(r-ni),c.push(i),a.push(r+vi),c.push(i),!ir||isNaN(f)||isNaN(o)||(isNaN(af)||(v.push(af),y.push(f-ni)),v.push(o),y.push(f-ni),v.push(o),y.push(f+vi))):(isNaN(nu)||(a.push(nu),c.push(i-ni)),c.push(i-ni),a.push(r),c.push(i+vi),a.push(r),!ir||isNaN(f)||isNaN(o)||(isNaN(tu)||(v.push(o-ni),y.push(tu)),v.push(o-ni),y.push(f),v.push(o+vi),y.push(f))),ar=i,nu=r,af=o,tu=f,ui=i,ci=r,ot=i,st=r,(yr||void 0!=t.lineColor||void 0!=t.fillColors||!isNaN(t.dashLength))&&(sf=c[c.length-2],io=a[a.length-2],c.pop(),a.pop(),v.pop(),y.pop(),this.drawLineGraph(c,a,v,y),c=[sf],a=[io],v=[],y=[],ir&&(v=[sf,sf+ni+vi],y=[tu,tu]),tt?(a.push(r+vi),c.push(i)):(c.push(i+vi),a.push(r)),this.lineColorSwitched=t.lineColor,this.fillColorsSwitched=t.fillColors,this.dashLengthSwitched=t.dashLength,nr&&(cr?(this.lineColorSwitched=wu,this.fillColorsSwitched=kf):(this.lineColorSwitched=wi,this.fillColorsSwitched=sr))),(to||t.gap)&&(ar=nu=NaN,t.gap&&2>=c.length||this.drawLineGraph(c,a,v,y),c=[],a=[],v=[],y=[]));break;case"column":if(fi=li,void 0!=t.lineColor&&(fi=t.lineColor),!isNaN(p)){nr||(t.isNegative=p<pu?!0:!1);t.isNegative&&(sr&&(ur=sr),void 0!=wi&&(fi=wi));var ro=s.min,uo=s.max,hf=dt;isNaN(hf)&&(hf=pu);p<ro&&hf<ro||p>uo&&hf>uo||(tt?("3d"==vt?(h=r-(yi/2-this.depthCount+1)*(w+hi)+hi/2+at*rt,l=o+ft*rt,ti=rt):(h=Math.floor(r-(yi/2-rt)*(w+hi)+hi/2),l=o,ti=0),e=w,ui=i,ci=h+w/2,ot=i,st=h+w/2,h+e>nt+ti*at&&(e=nt-h+ti*at),h<ti*at&&(e+=h,h=ti*at),b=i-o,fo=l,l=n.fitToBounds(l,0,d),b+=fo-l,b=n.fitToBounds(b,-l,d-l+ft*rt),t.labelIsNegative=0>b?!0:!1,0===b&&1/p==1/-0&&(t.labelIsNegative=!0),isNaN(g.percentWidthValue)||(e=this.height*g.percentWidthValue/100,h=yt-e/2,ci=h+e/2),e=n.roundTo(e,2),b=n.roundTo(b,2),h<nt&&0<e&&(ht=new n.Cuboid(lt,b,e,ft-it.d3x,at-it.d3y,ur,pr,et,fi,ri,bu,yu,tt,si,cu,ff,ru),t.columnWidth=Math.abs(b),t.columnHeight=Math.abs(e))):("3d"==vt?(l=i-(yi/2-this.depthCount+1)*(w+hi)+hi/2+ft*rt,h=f+at*rt,ti=rt):(l=i-(yi/2-rt)*(w+hi)+hi/2,h=f,ti=0),e=w,ui=l+w/2,ci=r,ot=l+w/2,st=r,l+e>d+ti*ft&&(e=d-l+ti*ft),l<ti*ft&&(e+=l-ti*ft,l=ti*ft),b=r-f,t.labelIsNegative=0<b?!0:!1,0===b&&1/p!=1/Math.abs(p)&&(t.labelIsNegative=!0),eo=h,h=n.fitToBounds(h,this.dy,nt),b+=eo-h,b=n.fitToBounds(b,-h+at*ti,nt-h),isNaN(g.percentWidthValue)||(e=this.width*g.percentWidthValue/100,l=yt-e/2,ui=l+e/2),e=n.roundTo(e,2),b=n.roundTo(b,2),l<d+rt*ft&&0<e&&(this.showOnAxis&&(h-=at/2),ht=new n.Cuboid(lt,e,b,ft-it.d3x,at-it.d3y,ur,pr,et,fi,this.lineAlpha,bu,yu,tt,si,cu,ff,ru),t.columnHeight=Math.abs(b),t.columnWidth=Math.abs(e))));ht&&(gt=ht.set,n.setCN(it,ht.set,"graph-"+this.type),n.setCN(it,ht.set,"graph-"+this.id),t.className&&n.setCN(it,ht.set,t.className,!0),t.columnGraphics=gt,l=n.roundTo(l,2),h=n.roundTo(h,2),gt.translate(l,h),(t.url||this.showHandOnHover)&&gt.setAttr("cursor","pointer"),pi||("none"==vt&&(iu=tt?(this.end+1-u)*tr-gi:tr*u+gi),"3d"==vt&&(tt?(iu=(this.end+1-u)*tr-gi-1e3*this.depthCount,ui+=ft*rt,ot+=ft*rt,t.y+=ft*rt):(iu=(tr-gi)*(u+1)+1e3*this.depthCount,ci+=at*rt,st+=at*rt,t.y+=at*rt)),("regular"==vt||"100%"==vt)&&(iu=tt?0<ai.value?(this.end+1-u)*tr+gi+1e3*this.depthCount:(this.end+1-u)*tr-gi+1e3*this.depthCount:0<ai.value?tr*u+gi:tr*u-gi),this.columnsArray.push({column:ht,depth:iu}),t.x=tt?h+e/2:l+e/2,this.ownColumns.push(ht),this.animateColumns(ht,u,i,o,r,f),this.addListeners(gt,t),void 0!==this.tabIndex&&gt.setAttr("tabindex",this.tabIndex)),this.columnsSet.push(gt))}break;case"candlestick":if(!isNaN(dt)&&!isNaN(p)){if(fi=li,void 0!=t.lineColor&&(fi=t.lineColor),ui=i,st=ci=r,ot=i,tt){if("open"==ei&&(ot=o),"high"==ei&&(ot=bt),"low"==ei&&(ot=pt),i=n.fitToBounds(i,0,ct),o=n.fitToBounds(o,0,ct),pt=n.fitToBounds(pt,0,ct),bt=n.fitToBounds(bt,0,ct),0===i&&0===o&&0===pt&&0===bt)continue;if(i==ct&&o==ct&&pt==ct&&bt==ct)continue;h=r-w/2;l=o;e=w;h+e>nt&&(e=nt-h);0>h&&(e+=h,h=0);h<nt&&0<e&&(p>dt?(ue=[i,bt],fe=[o,pt]):(ue=[o,bt],fe=[i,pt]),!isNaN(bt)&&!isNaN(pt)&&r<nt&&0<r&&(wr=n.line(lt,ue,[r,r],fi,ri,et),lu=n.line(lt,fe,[r,r],fi,ri,et)),b=i-o,ht=new n.Cuboid(lt,b,e,ft,at,ur,uu,et,fi,ri,bu,yu,tt,si,cu,ff,ru))}else{if("open"==ei&&(st=f),"high"==ei&&(st=kt),"low"==ei&&(st=wt),r=n.fitToBounds(r,0,oi),f=n.fitToBounds(f,0,oi),wt=n.fitToBounds(wt,0,oi),kt=n.fitToBounds(kt,0,oi),0===r&&0===f&&0===wt&&0===kt)continue;if(r==oi&&f==oi&&wt==oi&&kt==oi)continue;l=i-w/2;h=f+et/2;e=w;l+e>d&&(e=d-l);0>l&&(e+=l,l=0);b=r-f;l<d&&0<e&&(ie&&p>=dt&&(pr=0),ht=new n.Cuboid(lt,e,b,ft,at,ur,pr,et,fi,ri,bu,yu,tt,si,cu,ff,ru),p>dt?(ee=[r,kt],oe=[f,wt]):(ee=[f,kt],oe=[r,wt]),!isNaN(kt)&&!isNaN(wt)&&i<d&&0<i&&(wr=n.line(lt,[i,i],ee,fi,ri,et),lu=n.line(lt,[i,i],oe,fi,ri,et),n.setCN(it,wr,this.bcn+"line-high"),t.className&&n.setCN(it,wr,t.className,!0),n.setCN(it,lu,this.bcn+"line-low"),t.className&&n.setCN(it,lu,t.className,!0)))}ht&&(gt=ht.set,t.columnGraphics=gt,or.push(gt),gt.translate(l,h-et/2),(t.url||this.showHandOnHover)&&gt.setAttr("cursor","pointer"),wr&&(or.push(wr),or.push(lu)),pi||(t.x=tt?h+e/2:l+e/2,this.animateColumns(ht,u,i,o,r,f),this.addListeners(gt,t),void 0!==this.tabIndex&&gt.setAttr("tabindex",this.tabIndex)))}break;case"ohlc":if(!(isNaN(dt)||isNaN(ne)||isNaN(te)||isNaN(p))){if(se=lt.set(),or.push(se),p<dt&&(t.isNegative=!0,void 0!=wi&&(li=wi)),void 0!=t.lineColor&&(li=t.lineColor),tt){if(st=r,ot=i,"open"==ei&&(ot=o),"high"==ei&&(ot=bt),"low"==ei&&(ot=pt),pt=n.fitToBounds(pt,0,ct),bt=n.fitToBounds(bt,0,ct),0===i&&0===o&&0===pt&&0===bt)continue;if(i==ct&&o==ct&&pt==ct&&bt==ct)continue;var he=r-w/2,he=n.fitToBounds(he,0,nt),oo=n.fitToBounds(r,0,nt),ce=r+w/2,ce=n.fitToBounds(ce,0,nt);0<=o&&o<=ct&&(kr=n.line(lt,[o,o],[he,oo],li,ri,et,si));0<r&&r<nt&&(br=n.line(lt,[pt,bt],[r,r],li,ri,et,si));0<=i&&i<=ct&&(dr=n.line(lt,[i,i],[oo,ce],li,ri,et,si))}else{st=r;"open"==ei&&(st=f);"high"==ei&&(st=kt);"low"==ei&&(st=wt);var ot=i,wt=n.fitToBounds(wt,0,oi),kt=n.fitToBounds(kt,0,oi),le=i-w/2,le=n.fitToBounds(le,0,d),so=n.fitToBounds(i,0,d),ae=i+w/2,ae=n.fitToBounds(ae,0,d);0<=f&&f<=oi&&(kr=n.line(lt,[le,so],[f,f],li,ri,et,si));0<i&&i<d&&(br=n.line(lt,[i,i],[wt,kt],li,ri,et,si));0<=r&&r<=oi&&(dr=n.line(lt,[so,ae],[r,r],li,ri,et,si))}or.push(kr);or.push(br);or.push(dr);n.setCN(it,kr,this.bcn+"stroke-open");n.setCN(it,dr,this.bcn+"stroke-close");n.setCN(it,br,this.bcn+"stroke");t.className&&n.setCN(it,se,t.className,!0);br&&this.addListeners(br,t);dr&&this.addListeners(dr,t);kr&&this.addListeners(kr,t);ui=i;ci=r}}if(!pi&&!isNaN(p)&&(ve=this.hideBulletsCount,(this.end-this.start<=ve||0===ve)&&(ye=this.createBullet(t,ot,st,u),pe=this.labelText,!pe||isNaN(ui)||isNaN(ui)||(ho=this.createLabel(t,pe),we=0,ye&&(we=ye.size),this.positionLabel(t,ui,ci,ho,we)),("regular"==vt||"100%"==vt)&&(be=s.totalText,be&&(di=this.createLabel(t,be,s.totalTextColor),n.setCN(it,di,this.bcn+"label-total"),this.allBullets.push(di),di))))){var co=di.getBBox(),lo=co.width,ao=co.height,au,vu,cf=s.totalTextOffset,vo=s.totals[u];vo&&vo.remove();gr=0;"column"!=k&&(gr=this.bulletSize);tt?(vu=ci,au=0>p?i-lo/2-2-gr-cf:i+lo/2+3+gr+cf):(au=ui,vu=0>p?r+ao/2+gr+cf:r-ao/2-3-gr-cf);di.translate(au,vu);s.totals[u]=di;tt?(0>vu||vu>nt)&&di.remove():(0>au||au>d)&&di.remove()}}}this.lastDataItem=t;("line"==k||"step"==k||"smoothedLine"==k)&&("smoothedLine"==k?this.drawSmoothedGraph(c,a,v,y):this.drawLineGraph(c,a,v,y),pi||this.launchAnimation());this.bulletsHidden&&this.hideBullets();this.customBulletsHidden&&this.hideCustomBullets()},animateColumns:function(n,t){var i=this,r=i.chart.startDuration;0<r&&!i.animationPlayed&&(i.seqAn?(n.set.hide(),i.animationArray.push(n),r=setTimeout(function(){i.animate.call(i)},r/(i.end-i.start+1)*(t-i.start)*1e3),i.timeOuts.push(r)):i.animate(n),i.chart.animatable.push(n))},createLabel:function(t,i,r){var f=this.chart,u=t.labelColor,e;return u||(u=this.color),u||(u=f.color),r&&(u=r),r=this.fontSize,void 0===r&&(this.fontSize=r=f.fontSize),e=this.labelFunction,i=f.formatString(i,t),i=n.cleanFromEmpty(i),e&&(i=e(t,i)),void 0!==i&&""!==i?(t=n.text(this.container,i,u,f.fontFamily,r),t.node.style.pointerEvents="none",n.setCN(f,t,this.bcn+"label"),this.bulletSet.push(t),t):void 0},positiveClip:function(n){n.clipRect(this.pmx,this.pmy,this.pmw,this.pmh)},negativeClip:function(n){n.clipRect(this.nmx,this.nmy,this.nmw,this.nmh)},drawLineGraph:function(t,i,r,u){var f=this,y,a,k;if(1<t.length){var h=f.noRounding,v=f.set,l=f.chart,p=f.container,w=p.set(),b=p.set();v.push(b);v.push(w);var c=f.lineAlpha,e=f.lineThickness,v=f.fillAlphas,nt=f.lineColorR,o=f.negativeLineAlpha;isNaN(o)&&(o=c);y=f.lineColorSwitched;y&&(nt=y);y=f.fillColorsR;a=f.fillColorsSwitched;a&&(y=a);k=f.dashLength;(a=f.dashLengthSwitched)&&(k=a);var a=f.negativeLineColor,d=f.negativeFillColors,g=f.negativeFillAlphas,s=f.baseCoord;0!==f.negativeBase&&(s=f.valueAxis.getCoordinate(f.negativeBase,h),s>f.height&&(s=f.height),0>s&&(s=0));c=n.line(p,t,i,nt,c,e,k,!1,!1,h);c.node.setAttribute("stroke-linejoin","round");n.setCN(l,c,f.bcn+"stroke");w.push(c);w.click(function(n){f.handleGraphEvent(n,"clickGraph")}).mouseover(function(n){f.handleGraphEvent(n,"rollOverGraph")}).mouseout(function(n){f.handleGraphEvent(n,"rollOutGraph")}).touchmove(function(n){f.chart.handleMouseMove(n)}).touchend(function(n){f.chart.handleTouchEnd(n)});void 0===a||f.useNegativeColorIfDown||(e=n.line(p,t,i,a,o,e,k,!1,!1,h),e.node.setAttribute("stroke-linejoin","round"),n.setCN(l,e,f.bcn+"stroke"),n.setCN(l,e,f.bcn+"stroke-negative"),b.push(e));(0<v||0<g)&&(e=t.join(";").split(";"),o=i.join(";").split(";"),c=l.type,"serial"==c||"radar"==c?0<r.length?(r.reverse(),u.reverse(),e=t.concat(r),o=i.concat(u)):"radar"==c?(o.push(0),e.push(0)):f.rotate?(o.push(o[o.length-1]),e.push(s),o.push(o[0]),e.push(s),o.push(o[0]),e.push(e[0])):(e.push(e[e.length-1]),o.push(s),e.push(e[0]),o.push(s),e.push(t[0]),o.push(o[0])):"xy"==c&&(i=f.fillToAxis)&&(n.isString(i)&&(i=l.getValueAxisById(i)),"H"==i.orientation?(s="top"==i.position?0:i.height,e.push(e[e.length-1]),o.push(s),e.push(e[0]),o.push(s),e.push(t[0]),o.push(o[0])):(s="left"==i.position?0:i.width,o.push(o[o.length-1]),e.push(s),o.push(o[0]),e.push(s),o.push(o[0]),e.push(e[0]))),t=f.gradientRotation,0<v&&(i=n.polygon(p,e,o,y,v,1,"#000",0,t,h),i.pattern(f.pattern,NaN,l.path),n.setCN(l,i,f.bcn+"fill"),w.push(i),i.toBack()),d||void 0!==a)&&(isNaN(g)&&(g=v),d||(d=a),h=n.polygon(p,e,o,d,g,1,"#000",0,t,h),n.setCN(l,h,f.bcn+"fill"),n.setCN(l,h,f.bcn+"fill-negative"),h.pattern(f.pattern,NaN,l.path),b.push(h),h.toBack(),b.click(function(n){f.handleGraphEvent(n,"clickGraph")}).mouseover(function(n){f.handleGraphEvent(n,"rollOverGraph")}).mouseout(function(n){f.handleGraphEvent(n,"rollOutGraph")}).touchmove(function(n){f.chart.handleMouseMove(n)}).touchend(function(n){f.chart.handleTouchEnd(n)}));f.applyMask(b,w)}},applyMask:function(n,t){var i=n.length();"serial"!=this.chart.type||this.scrollbar||(this.positiveClip(t),0<i&&this.negativeClip(n))},drawSmoothedGraph:function(t,i,r,u){var k;if(1<t.length){var l=this.set,c=this.chart,f=this.container,a=f.set(),v=f.set();l.push(v);l.push(a);var s=this.lineAlpha,e=this.lineThickness,l=this.dashLength,d=this.fillAlphas,o=this.lineColorR,y=this.fillColorsR,p=this.negativeLineColor,w=this.negativeFillColors,g=this.negativeFillAlphas,b=this.baseCoord,h=this.lineColorSwitched;h&&(o=h);(h=this.fillColorsSwitched)&&(y=h);k=this.negativeLineAlpha;isNaN(k)&&(k=s);h=this.getGradRotation();s=new n.Bezier(f,t,i,o,s,e,y,0,l,void 0,h);n.setCN(c,s,this.bcn+"stroke");a.push(s.path);void 0!==p&&(e=new n.Bezier(f,t,i,p,k,e,y,0,l,void 0,h),n.setCN(c,e,this.bcn+"stroke"),n.setCN(c,e,this.bcn+"stroke-negative"),v.push(e.path));0<d&&(e=t.join(";").split(";"),s=i.join(";").split(";"),o="",0<r.length?(r.push("M"),u.push("M"),r.reverse(),u.reverse(),e=t.concat(r),s=i.concat(u)):(this.rotate?(o+=" L"+b+","+i[i.length-1],o+=" L"+b+","+i[0]):(o+=" L"+t[t.length-1]+","+b,o+=" L"+t[0]+","+b),o+=" L"+t[0]+","+i[0]),t=new n.Bezier(f,e,s,NaN,0,0,y,d,l,o,h),n.setCN(c,t,this.bcn+"fill"),t.path.pattern(this.pattern,NaN,c.path),a.push(t.path),w||void 0!==p)&&(g||(g=d),w||(w=p),f=new n.Bezier(f,e,s,NaN,0,0,w,g,l,o,h),f.path.pattern(this.pattern,NaN,c.path),n.setCN(c,f,this.bcn+"fill"),n.setCN(c,f,this.bcn+"fill-negative"),v.push(f.path));this.applyMask(v,a)}},launchAnimation:function(){var t=this,i=t.chart.startDuration,r,u;0<i&&!t.animationPlayed&&(r=t.set,u=t.bulletSet,n.VML||(r.attr({opacity:t.startAlpha}),u.attr({opacity:t.startAlpha})),r.hide(),u.hide(),t.seqAn?(i=setTimeout(function(){t.animateGraphs.call(t)},t.index*i*1e3),t.timeOuts.push(i)):t.animateGraphs())},animateGraphs:function(){var u=this.chart,n=this.set,t=this.bulletSet,i=this.x,r=this.y,f,e;n.show();t.show();f=u.startDuration;e=u.startEffect;n&&(this.rotate?(n.translate(-1e3,r),t.translate(-1e3,r)):(n.translate(i,-1e3),t.translate(i,-1e3)),n.animate({opacity:1,translate:i+","+r},f,e),t.animate({opacity:1,translate:i+","+r},f,e),u.animatable.push(n))},animate:function(t){var r=this.chart,i=this.animationArray;!t&&0<i.length&&(t=i[0],i.shift());i=n[n.getEffect(r.startEffect)];r=r.startDuration;t&&(this.rotate?t.animateWidth(r,i):t.animateHeight(r,i),t.set.show())},legendKeyColor:function(){var t=this.legendColor,n=this.lineAlpha;return void 0===t&&(t=this.lineColorR,0===n&&(n=this.fillColorsR)&&(t="object"==typeof n?n[0]:n)),t},legendKeyAlpha:function(){var n=this.legendAlpha;return void 0===n&&(n=this.lineAlpha,this.fillAlphas>n&&(n=this.fillAlphas),0===n&&(n=this.bulletAlpha),0===n&&(n=1)),n},createBullet:function(t,i,r){var u,y;if(!isNaN(i)&&!isNaN(r)&&("none"!=this.bullet||this.customBullet||t.bullet||t.customBullet)){var h=this.chart,o=this.container,l=this.bulletOffset,e=this.bulletSize;isNaN(t.bulletSize)||(e=t.bulletSize);var a=t.values.value,f=this.maxValue,s=this.minValue,v=this.maxBulletSize,c=this.minBulletSize;isNaN(f)||(isNaN(a)||(e=(a-s)/(f-s)*(v-c)+c),s==f&&(e=v));f=e;this.bulletAxis&&(e=t.values.error,isNaN(e)||(a=e),e=this.bulletAxis.stepWidth*a);e<this.minBulletSize&&(e=this.minBulletSize);this.rotate?i=t.isNegative?i-l:i+l:r=t.isNegative?r+l:r-l;c=this.bulletColorR;t.lineColor&&void 0===this.bulletColor&&(this.bulletColorSwitched=t.lineColor);this.bulletColorSwitched&&(c=this.bulletColorSwitched);t.isNegative&&void 0!==this.bulletColorNegative&&(c=this.bulletColorNegative);void 0!==t.color&&(c=t.color);"xy"==h.type&&this.valueField&&(u=this.pattern,t.pattern&&(u=t.pattern));l=this.bullet;t.bullet&&(l=t.bullet);var a=this.bulletBorderThickness,s=this.bulletBorderColorR,v=this.bulletBorderAlpha,p=this.bulletAlpha;return s||(s=c),this.useLineColorForBulletBorder&&(s=this.lineColorR,t.isNegative&&this.negativeLineColor&&(s=this.negativeLineColor),this.lineColorSwitched&&(s=this.lineColorSwitched)),y=t.alpha,isNaN(y)||(p=y),u=n.bullet(o,l,e,c,p,a,s,v,f,0,u,h.path),f=this.customBullet,t.customBullet&&(f=t.customBullet),f&&(u&&u.remove(),"function"==typeof f?(f=new f,f.chart=h,t.bulletConfig&&(f.availableSpace=r,f.graph=this,f.graphDataItem=t,f.bulletY=r,t.bulletConfig.minCoord=this.minCoord-r,f.bulletConfig=t.bulletConfig),f.write(o),u&&f.showBullet&&f.set.push(u),t.customBulletGraphics=f.cset,u=f.set):(u=o.set(),f=o.image(f,0,0,e,e),u.push(f),this.centerCustomBullets&&f.translate(-e/2,-e/2))),u&&((t.url||this.showHandOnHover)&&u.setAttr("cursor","pointer"),("serial"==h.type||"gantt"==h.type)&&(-.5>i||i>this.width||r<-e/2||r>this.height)&&(u.remove(),u=null),u&&(this.bulletSet.push(u),u.translate(i,r),this.addListeners(u,t),this.allBullets.push(u)),t.bx=i,t.by=r,n.setCN(h,u,this.bcn+"bullet"),t.className&&n.setCN(h,u,t.className,!0)),u?(u.size=e||0,(h=this.bulletHitAreaSize)&&(o=n.circle(o,h,"#FFFFFF",.001,0),o.translate(i,r),t.hitBullet=o,this.bulletSet.push(o),this.addListeners(o,t)),t.bulletGraphics=u,void 0!==this.tabIndex&&u.setAttr("tabindex",this.tabIndex)):u={size:0},u.graphDataItem=t,u}},showBullets:function(){var t=this.allBullets,n;for(this.bulletsHidden=!1,n=0;n<t.length;n++)t[n].show()},hideBullets:function(){var t=this.allBullets,n;for(this.bulletsHidden=!0,n=0;n<t.length;n++)t[n].hide()},showCustomBullets:function(){var i=this.allBullets,n,t;for(this.customBulletsHidden=!1,n=0;n<i.length;n++)t=i[n].graphDataItem,t&&t.customBulletGraphics&&t.customBulletGraphics.show()},hideCustomBullets:function(){var i=this.allBullets,n,t;for(this.customBulletsHidden=!0,n=0;n<i.length;n++)t=i[n].graphDataItem,t&&t.customBulletGraphics&&t.customBulletGraphics.hide()},addListeners:function(n,t){var i=this,r,u;n.mouseover(function(n){i.handleRollOver(t,n)}).mouseout(function(n){i.handleRollOut(t,n)}).touchend(function(n){i.handleRollOver(t,n);i.chart.panEventsEnabled&&i.handleClick(t,n)}).touchstart(function(n){i.handleRollOver(t,n)}).click(function(n){i.handleClick(t,n)}).dblclick(function(n){i.handleDoubleClick(t,n)}).contextmenu(function(n){i.handleRightClick(t,n)});r=i.chart;r.accessible&&i.accessibleLabel&&(u=r.formatString(i.accessibleLabel,t),r.makeAccessible(n,u))},handleRollOver:function(n,t){var i,r;this.handleGraphEvent(t,"rollOverGraph");n&&(i=this.chart,n.bulletConfig&&(i.isRolledOverBullet=!0),r={type:"rollOverGraphItem",item:n,index:n.index,graph:this,target:this,chart:this.chart,event:t},this.fire(r),i.fire(r),clearTimeout(i.hoverInt),(i=i.chartCursor)&&i.valueBalloonsEnabled||this.showGraphBalloon(n,"V",!0))},handleRollOut:function(n,t){var i=this.chart,r;n&&(r={type:"rollOutGraphItem",item:n,index:n.index,graph:this,target:this,chart:this.chart,event:t},this.fire(r),i.fire(r),i.isRolledOverBullet=!1);this.handleGraphEvent(t,"rollOutGraph");(i=i.chartCursor)&&i.valueBalloonsEnabled||this.hideBalloon()},handleClick:function(t,i){if(!this.chart.checkTouchMoved()&&this.chart.checkTouchDuration(i)){if(t){var r={type:"clickGraphItem",item:t,index:t.index,graph:this,target:this,chart:this.chart,event:i};this.fire(r);this.chart.fire(r);n.getURL(t.url,this.urlTarget)}this.handleGraphEvent(i,"clickGraph")}},handleGraphEvent:function(n,t){var i={type:t,graph:this,target:this,chart:this.chart,event:n};this.fire(i);this.chart.fire(i)},handleRightClick:function(n,t){if(n){var i={type:"rightClickGraphItem",item:n,index:n.index,graph:this,target:this,chart:this.chart,event:t};this.fire(i);this.chart.fire(i)}},handleDoubleClick:function(n,t){if(n){var i={type:"doubleClickGraphItem",item:n,index:n.index,graph:this,target:this,chart:this.chart,event:t};this.fire(i);this.chart.fire(i)}},zoom:function(n,t){this.start=n;this.end=t;this.draw()},changeOpacity:function(n){var t=this.set,i,r;if(t&&t.setAttr("opacity",n),t=this.ownColumns)for(i=0;i<t.length;i++)r=t[i].set,r&&r.setAttr("opacity",n);(t=this.bulletSet)&&t.setAttr("opacity",n)},destroy:function(){var t,i;if(n.remove(this.set),n.remove(this.bulletSet),t=this.timeOuts,t)for(i=0;i<t.length;i++)clearTimeout(t[i]);this.timeOuts=[]},createBalloon:function(){var i=this.chart,t;this.balloon?this.balloon.destroy&&this.balloon.destroy():this.balloon={};t=this.balloon;n.extend(t,i.balloon,!0);t.chart=i;t.mainSet=i.plotBalloonsSet;t.className=this.id},hideBalloon:function(){var n=this,t=n.chart;t.chartCursor?t.chartCursor.valueBalloonsEnabled||t.hideBalloon():t.hideBalloon();clearTimeout(n.hoverInt);n.hoverInt=setTimeout(function(){n.hideBalloonReal.call(n)},t.hideBalloonTime)},hideBalloonReal:function(){this.balloon&&this.balloon.hide();this.fixBulletSize()},fixBulletSize:function(){var t,i,r;n.isModern&&(t=this.resizedDItem,t&&(i=t.bulletGraphics,i&&!i.doNotScale&&(i.translate(t.bx,t.by,1),r=this.bulletAlpha,isNaN(t.alpha)||(r=t.alpha),i.setAttr("fill-opacity",r),i.setAttr("stroke-opacity",this.bulletBorderAlpha))),this.resizedDItem=null)},showGraphBalloon:function(t,i,r,u,f){var o,l;if(t){var s=this.chart,e=this.balloon,h=0,c=0,o=s.chartCursor,a=!0;if(o?o.valueBalloonsEnabled||(e=s.balloon,h=this.x,c=this.y,a=!1):(e=s.balloon,h=this.x,c=this.y,a=!1),clearTimeout(this.hoverInt),s.chartCursor&&(this.currentDataItem=t,"serial"==s.type&&s.isRolledOverBullet&&s.chartCursor.valueBalloonsEnabled)){this.hideBalloonReal();return}this.resizeBullet(t,u,f);e&&e.enabled&&this.showBalloon&&!this.hidden?(o=s.formatString(this.balloonText,t,!0),l=this.balloonFunction,l&&(o=l(t,t.graph)),o&&(o=n.cleanFromEmpty(o)),o&&""!==o?(u=s.getBalloonColor(this,t),e.drop||(e.pointerOrientation=i),i=t.x,f=t.y,s.rotate&&(i=t.y,f=t.x),i+=h,f+=c,isNaN(i)||isNaN(f)?this.hideBalloonReal():(t=this.width,l=this.height,a&&e.setBounds(h,c,t+h,l+c),e.changeColor(u),e.setPosition(i,f),e.fixPrevious(),e.fixedPosition&&(r=!1),!r&&"radar"!=s.type&&(i<h-.5||i>t+h||f<c-.5||f>l+c)?(e.showBalloon(o),e.hide(0)):(e.followCursor(r),e.showBalloon(o)))):(this.hideBalloonReal(),e.hide(),this.resizeBullet(t,u,f))):this.hideBalloonReal()}},resizeBullet:function(t,i,r){if(this.fixBulletSize(),t&&n.isModern&&(1!=i||!isNaN(r))){var u=t.bulletGraphics;u&&!u.doNotScale&&(u.translate(t.bx,t.by,i),isNaN(r)||(u.setAttr("fill-opacity",r),u.setAttr("stroke-opacity",r)),this.resizedDItem=t)}}})}(),function(){var n=window.AmCharts;n.ChartCursor=n.Class({construct:function(t){this.cname="ChartCursor";this.createEvents("changed","zoomed","onHideCursor","onShowCursor","draw","selected","moved","panning","zoomStarted");this.enabled=!0;this.cursorAlpha=1;this.selectionAlpha=.2;this.cursorColor="#CC0000";this.categoryBalloonAlpha=1;this.color="#FFFFFF";this.type="cursor";this.zoomed=!1;this.zoomable=!0;this.pan=!1;this.categoryBalloonDateFormat="MMM DD, YYYY";this.categoryBalloonText="[[category]]";this.categoryBalloonEnabled=this.valueBalloonsEnabled=!0;this.rolledOver=!1;this.cursorPosition="middle";this.bulletsEnabled=this.skipZoomDispatch=!1;this.bulletSize=8;this.selectWithoutZooming=this.oneBalloonOnly=!1;this.graphBulletSize=1.7;this.animationDuration=.3;this.zooming=!1;this.adjustment=0;this.avoidBalloonOverlapping=!0;this.leaveCursor=!1;this.leaveAfterTouch=!0;this.valueZoomable=!1;this.balloonPointerOrientation="horizontal";this.hLineEnabled=this.vLineEnabled=!0;this.vZoomEnabled=this.hZoomEnabled=!1;n.applyTheme(this,t,this.cname)},draw:function(){var t,i;this.destroy();t=this.chart;t.panRequired=!0;i=t.container;this.rotate=t.rotate;this.container=i;this.prevLineHeight=this.prevLineWidth=NaN;i=i.set();i.translate(this.x,this.y);this.set=i;t.cursorSet.push(i);this.createElements();n.isString(this.limitToGraph)&&(this.limitToGraph=n.getObjById(t.graphs,this.limitToGraph),this.fullWidth=!1,this.cursorPosition="middle");this.pointer=this.balloonPointerOrientation.substr(0,1).toUpperCase();this.isHidden=!1;this.hideLines();this.valueLineAxis||(this.valueLineAxis=t.valueAxes[0])},createElements:function(){var t=this,i=t.chart,h=i.dx,c=i.dy,u=t.width,s=t.height,f,r,e=t.cursorAlpha,o=t.valueLineAlpha;t.rotate?(f=o,r=e):(r=o,f=e);"xy"==i.type&&(r=e,void 0!==o&&(r=o),f=e);t.vvLine=n.line(t.container,[h,0,0],[c,0,s],t.cursorColor,f,1);n.setCN(i,t.vvLine,"cursor-line");n.setCN(i,t.vvLine,"cursor-line-vertical");t.hhLine=n.line(t.container,[0,u,u+h],[0,0,c],t.cursorColor,r,1);n.setCN(i,t.hhLine,"cursor-line");n.setCN(i,t.hhLine,"cursor-line-horizontal");t.vLine=t.rotate?t.vvLine:t.hhLine;t.set.push(t.vvLine);t.set.push(t.hhLine);t.set.node.style.pointerEvents="none";t.fullLines=t.container.set();i=i.cursorLineSet;i.push(t.fullLines);i.translate(t.x,t.y);i.clipRect(-1,-1,u+2,s+2);void 0!==t.tabIndex&&(i.setAttr("tabindex",t.tabIndex),i.keyup(function(n){t.handleKeys(n)}).focus(function(){t.showCursor()}).blur(function(){t.hideCursor()}));t.set.clipRect(0,0,u,s)},handleKeys:function(t){var i=this.prevIndex,r=this.chart,u;r&&(u=r.chartData,u&&(isNaN(i)&&(i=u.length-1),37!=t.keyCode&&40!=t.keyCode||i--,39!=t.keyCode&&38!=t.keyCode||i++,i=n.fitToBounds(i,r.startIndex,r.endIndex),(t=this.chart.chartData[i])&&this.setPosition(t.x.categoryAxis),this.prevIndex=i))},update:function(){var n=this.chart,t,i,r;if(n&&(t=n.mouseX-this.x,i=n.mouseY-this.y,this.mouseX=t,this.mouseY=i,this.mouse2X=n.mouse2X-this.x,this.mouse2Y=n.mouse2Y-this.y,n.chartData&&0<n.chartData.length)){if(this.mouseIsOver()?(this.hideGraphBalloons=!1,this.rolledOver=r=!0,this.updateDrawing(),this.vvLine&&isNaN(this.fx)&&(n.rotate||!this.limitToGraph)&&this.vvLine.translate(t,0),!this.hhLine||!isNaN(this.fy)||n.rotate&&this.limitToGraph||this.hhLine.translate(0,i),isNaN(this.mouse2X)?this.dispatchMovedEvent(t,i):r=!1):this.forceShow||this.hideCursor(),this.zooming){if(!isNaN(this.mouse2X)){isNaN(this.mouse2X0)||this.dispatchPanEvent();return}if(this.pan){this.dispatchPanEvent();return}(this.hZoomEnabled||this.vZoomEnabled)&&this.zooming&&this.updateSelection()}r&&this.showCursor()}},updateDrawing:function(){if(this.drawing&&this.chart.setMouseCursor("crosshair"),this.drawingNow&&(n.remove(this.drawingLine),1<Math.abs(this.drawStartX-this.mouseX)||1<Math.abs(this.drawStartY-this.mouseY))){var t=this.chart,i=t.marginTop,t=t.marginLeft;this.drawingLine=n.line(this.container,[this.drawStartX+t,this.mouseX+t],[this.drawStartY+i,this.mouseY+i],this.cursorColor,1,1)}},fixWidth:function(t){if(this.fullWidth&&this.prevLineWidth!=t){var i=this.vvLine,r=0;i&&(i.remove(),r=i.x);i=this.container.set();i.translate(r,0);r=n.rect(this.container,t,this.height,this.cursorColor,this.cursorAlpha,this.cursorAlpha,this.cursorColor);n.setCN(this.chart,r,"cursor-fill");r.translate(-t/2-1,0);i.push(r);this.vvLine=i;this.fullLines.push(i);this.prevLineWidth=t}},fixHeight:function(t){if(this.fullWidth&&this.prevLineHeight!=t){var i=this.hhLine,r=0;i&&(i.remove(),r=i.y);i=this.container.set();i.translate(0,r);r=n.rect(this.container,this.width,t,this.cursorColor,this.cursorAlpha);r.translate(0,-t/2);i.push(r);this.fullLines.push(i);this.hhLine=i;this.prevLineHeight=t}},fixVLine:function(n,t){var i,r,u;!isNaN(n)&&this.vvLine&&(isNaN(this.prevLineX)?(i=0,r=this.mouseX,this.limitToGraph&&(u=this.chart.categoryAxis,u&&(this.chart.rotate||(i="bottom"==u.position?this.height:-this.height),r=n)),this.vvLine.translate(r,i)):this.prevLineX!=n&&this.vvLine.translate(this.prevLineX,this.prevLineY),this.fx=n,this.prevLineX!=n&&(i=this.animationDuration,this.zooming&&(i=0),this.vvLine.stop(),this.vvLine.animate({translate:n+","+t},i,"easeOutSine"),this.prevLineX=n,this.prevLineY=t))},fixHLine:function(n,t){var i,r,u;!isNaN(n)&&this.hhLine&&(isNaN(this.prevLineY)?(i=0,r=this.mouseY,this.limitToGraph&&(u=this.chart.categoryAxis,u&&(this.chart.rotate&&(i="right"==u.position?this.width:-this.width),r=n)),this.hhLine.translate(i,r)):this.prevLineY!=n&&this.hhLine.translate(this.prevLineX,this.prevLineY),this.fy=n,this.prevLineY!=n&&(i=this.animationDuration,this.zooming&&(i=0),this.hhLine.stop(),this.hhLine.animate({translate:t+","+n},i,"easeOutSine"),this.prevLineY=n,this.prevLineX=t))},hideCursor:function(n){this.forceShow=!1;this.chart.wasTouched&&this.leaveAfterTouch||this.isHidden||this.leaveCursor||(this.hideCursorReal(),n?this.chart.handleCursorHide():this.fire({target:this,chart:this.chart,type:"onHideCursor"}),this.chart.setMouseCursor("auto"))},hideCursorReal:function(){this.hideLines();this.isHidden=!0;this.index=this.prevLineY=this.prevLineX=this.mouseY0=this.mouseX0=this.fy=this.fx=NaN},hideLines:function(){this.vvLine&&this.vvLine.hide();this.hhLine&&this.hhLine.hide();this.fullLines&&this.fullLines.hide();this.isHidden=!0;this.chart.handleCursorHide()},showCursor:function(n){!this.drawing&&this.enabled&&(this.vLineEnabled&&this.vvLine&&this.vvLine.show(),this.hLineEnabled&&this.hhLine&&this.hhLine.show(),this.isHidden=!1,this.updateFullLine(),n||this.fire({target:this,chart:this.chart,type:"onShowCursor"}),this.pan&&this.chart.setMouseCursor("move"))},updateFullLine:function(){this.zooming&&this.fullWidth&&this.selection&&(this.rotate?0<this.selection.height&&this.hhLine.hide():0<this.selection.width&&this.vvLine.hide())},updateSelection:function(){var i,t;if(!this.pan&&this.enabled){i=this.mouseX;t=this.mouseY;isNaN(this.fx)||(i=this.fx);isNaN(this.fy)||(t=this.fy);this.clearSelection();var r=this.mouseX0,u=this.mouseY0,f=this.width,e=this.height,i=n.fitToBounds(i,0,f),t=n.fitToBounds(t,0,e),o;i<r&&(o=i,i=r,r=o);t<u&&(o=t,t=u,u=o);this.hZoomEnabled?f=i-r:r=0;this.vZoomEnabled?e=t-u:u=0;isNaN(this.mouse2X)&&0<Math.abs(f)&&0<Math.abs(e)&&(i=this.chart,t=n.rect(this.container,f,e,this.cursorColor,this.selectionAlpha),n.setCN(i,t,"cursor-selection"),t.width=f,t.height=e,t.translate(r,u),this.set.push(t),this.selection=t);this.updateFullLine()}},mouseIsOver:function(){var n=this.mouseX,t=this.mouseY;return this.justReleased?(this.justReleased=!1,!0):this.mouseIsDown?!0:this.chart.mouseIsOver?0<n&&n<this.width&&0<t&&t<this.height?!0:(this.handleMouseOut(),!1):(this.handleMouseOut(),!1)},fixPosition:function(){this.prevY=this.prevX=NaN},handleMouseDown:function(){if(this.update(),this.mouseIsOver())if(this.mouseIsDown=!0,this.mouseX0=this.mouseX,this.mouseY0=this.mouseY,this.mouse2X0=this.mouse2X,this.mouse2Y0=this.mouse2Y,this.drawing)this.drawStartY=this.mouseY,this.drawStartX=this.mouseX,this.drawingNow=!0;else if(this.dispatchMovedEvent(this.mouseX,this.mouseY),!this.pan&&isNaN(this.mouse2X0)&&(isNaN(this.fx)||(this.mouseX0=this.fx),isNaN(this.fy)||(this.mouseY0=this.fy)),this.hZoomEnabled||this.vZoomEnabled){this.zooming=!0;var n={chart:this.chart,target:this,type:"zoomStarted"};n.x=this.mouseX/this.width;n.y=this.mouseY/this.height;this.index0=n.index=this.index;this.timestamp0=this.timestamp;this.fire(n)}},registerInitialMouse:function(){},handleReleaseOutside:function(){if(this.mouseIsDown=!1,this.drawingNow){this.drawingNow=!1;n.remove(this.drawingLine);var t=this.drawStartX,i=this.drawStartY,r=this.mouseX,u=this.mouseY,f=this.chart;(2<Math.abs(t-r)||2<Math.abs(i-u))&&this.fire({type:"draw",target:this,chart:f,initialX:t,initialY:i,finalX:r,finalY:u})}this.zooming&&(this.zooming=!1,this.selectWithoutZooming?this.dispatchZoomEvent("selected"):(this.hZoomEnabled||this.vZoomEnabled)&&this.dispatchZoomEvent("zoomed"),this.rolledOver&&this.dispatchMovedEvent(this.mouseX,this.mouseY));this.mouse2Y0=this.mouse2X0=this.mouseY0=this.mouseX0=NaN},dispatchZoomEvent:function(n){var t,o;if(!this.pan&&(t=this.selection,t&&3<Math.abs(t.width)&&3<Math.abs(t.height))){var i=Math.min(this.index,this.index0),r=Math.max(this.index,this.index0),s=i,h=r,f=this.chart,u=f.chartData,e=f.categoryAxis;e&&e.parseDates&&!e.equalSpacing&&(s=u[i]?u[i].time:Math.min(this.timestamp0,this.timestamp),h=u[r]?f.getEndTime(u[r].time):Math.max(this.timestamp0,this.timestamp));t={type:n,chart:this.chart,target:this,end:h,start:s,startIndex:i,endIndex:r,selectionHeight:t.height,selectionWidth:t.width,selectionY:t.y,selectionX:t.x};this.hZoomEnabled&&4<Math.abs(this.mouseX0-this.mouseX)&&(t.startX=this.mouseX0/this.width,t.endX=this.mouseX/this.width,o=!0);this.vZoomEnabled&&4<Math.abs(this.mouseY0-this.mouseY)&&(t.startY=1-this.mouseY0/this.height,t.endY=1-this.mouseY/this.height,o=!0);o&&(this.prevY=this.prevX=NaN,this.fire(t),"selected"!=n&&this.clearSelection());this.hideCursor()}},dispatchMovedEvent:function(n,t,i,r){var f,e,u;n=Math.round(n);t=Math.round(t);this.isHidden||n==this.prevX&&t==this.prevY&&"changed"!=i||(i||(i="moved"),f=this.fx,e=this.fy,isNaN(f)&&(f=n),isNaN(e)&&(e=t),u=!1,this.zooming&&this.pan&&(u=!0),u={hidden:this.isHidden,type:i,chart:this.chart,target:this,x:n,y:t,finalX:f,finalY:e,zooming:this.zooming,panning:u,mostCloseGraph:this.mostCloseGraph,index:this.index,skip:r,hideBalloons:this.hideGraphBalloons},this.prevIndex=this.index,this.rotate?(u.position=t,u.finalPosition=e):(u.position=n,u.finalPosition=f),this.prevX=n,this.prevY=t,r?this.chart.handleCursorMove(u):(this.fire(u),"changed"==i&&this.chart.fire(u)))},dispatchPanEvent:function(){if(this.mouseIsDown){var u=n.roundTo((this.mouseX-this.mouseX0)/this.width,3),f=n.roundTo((this.mouseY-this.mouseY0)/this.height,3),t=n.roundTo((this.mouse2X-this.mouse2X0)/this.width,3),i=n.roundTo((this.mouse2Y-this.mouse2Y0)/this.height,2),r=!1;0!==Math.abs(u)&&0!==Math.abs(f)&&(r=!0);(this.prevDeltaX==u||this.prevDeltaY==f)&&(r=!1);isNaN(t)||isNaN(i)||(0!==Math.abs(t)&&0!==Math.abs(i)&&(r=!0),this.prevDelta2X!=t&&this.prevDelta2Y!=i)||(r=!1);r&&(this.hideLines(),this.fire({type:"panning",chart:this.chart,target:this,deltaX:u,deltaY:f,delta2X:t,delta2Y:i,index:this.index}),this.prevDeltaX=u,this.prevDeltaY=f,this.prevDelta2X=t,this.prevDelta2Y=i)}},clearSelection:function(){var n=this.selection;n&&(n.width=0,n.height=0,n.remove())},destroy:function(){this.clear();n.remove(this.selection);this.selection=null;clearTimeout(this.syncTO);n.remove(this.set)},clear:function(){},setTimestamp:function(n){this.timestamp=n},setIndex:function(n,t){n!=this.index&&(this.index=n,t||this.isHidden||this.dispatchMovedEvent(this.mouseX,this.mouseY,"changed"))},handleMouseOut:function(){this.enabled&&this.rolledOver&&(this.leaveCursor||this.setIndex(void 0),this.forceShow=!1,this.hideCursor(),this.rolledOver=!1)},showCursorAt:function(n){var t=this.chart.categoryAxis;t&&this.setPosition(t.categoryToCoordinate(n),n)},setPosition:function(n,t){var i=this.chart,r=i.categoryAxis,u,f;r&&(void 0===t&&(t=r.coordinateToValue(n)),r.showBalloonAt(t,n),this.forceShow=!0,r.stickBalloonToCategory?i.rotate?this.fixHLine(n,0):this.fixVLine(n,0):(this.showCursor(),i.rotate?this.hhLine.translate(0,n):this.vvLine.translate(n,0)),i.rotate?u=n:f=n,i.rotate?(this.vvLine&&this.vvLine.hide(),this.hhLine&&this.hhLine.show()):(this.hhLine&&this.hhLine.hide(),this.vvLine&&this.vvLine.show()),this.updateFullLine(),this.isHidden=!1,this.dispatchMovedEvent(f,u,"moved",!0))},enableDrawing:function(n){this.enabled=!n;this.hideCursor();this.drawing=n},syncWithCursor:function(n,t){clearTimeout(this.syncTO);n&&(n.isHidden?this.hideCursor(!0):this.syncWithCursorReal(n,t))},isZooming:function(n){this.zooming=n},syncWithCursorReal:function(n,t){var u=n.vvLine,f=n.hhLine,i,r;this.index=n.index;this.forceShow=!0;this.zooming&&this.pan||this.showCursor(!0);this.hideGraphBalloons=t;this.justReleased=n.justReleased;this.zooming=n.zooming;this.index0=n.index0;this.mouseX0=n.mouseX0;this.mouseY0=n.mouseY0;this.mouse2X0=n.mouse2X0;this.mouse2Y0=n.mouse2Y0;this.timestamp0=n.timestamp0;this.prevDeltaX=n.prevDeltaX;this.prevDeltaY=n.prevDeltaY;this.prevDelta2X=n.prevDelta2X;this.prevDelta2Y=n.prevDelta2Y;this.fx=n.fx;this.fy=n.fy;n.zooming&&this.updateSelection();i=n.mouseX;r=n.mouseY;this.rotate?(i=NaN,this.vvLine&&this.vvLine.hide(),this.hhLine&&f&&(isNaN(n.fy)?this.hhLine.translate(0,n.mouseY):this.fixHLine(n.fy,0))):(r=NaN,this.hhLine&&this.hhLine.hide(),this.vvLine&&u&&(isNaN(n.fx)?this.vvLine.translate(n.mouseX,0):this.fixVLine(n.fx,0)));this.dispatchMovedEvent(i,r,"moved",!0)}})}(),function(){var n=window.AmCharts;n.SimpleChartScrollbar=n.Class({construct:function(t){this.createEvents("zoomed","zoomStarted","zoomEnded");this.backgroundColor="#D4D4D4";this.backgroundAlpha=1;this.selectedBackgroundColor="#EFEFEF";this.scrollDuration=this.selectedBackgroundAlpha=1;this.resizeEnabled=!0;this.hideResizeGrips=!1;this.scrollbarHeight=20;this.updateOnReleaseOnly=!1;9>document.documentMode&&(this.updateOnReleaseOnly=!0);this.dragIconHeight=this.dragIconWidth=35;this.dragIcon="dragIconRoundBig";this.dragCursorHover="cursor: move; cursor: grab; cursor: -moz-grab; cursor: -webkit-grab;";this.dragCursorDown="cursor: move; cursor: grab; cursor: -moz-grabbing; cursor: -webkit-grabbing;";this.vResizeCursor="ns-resize";this.hResizeCursor="ew-resize";this.enabled=!0;this.percentStart=this.offset=0;this.percentEnd=1;n.applyTheme(this,t,"SimpleChartScrollbar")},getPercents:function(){var n=this.getDBox(),t=n.x,i=n.y,r=n.width,n=n.height;this.rotate?(t=1-i/this.height,i=1-(i+n)/this.height):(i=t/this.width,t=(t+r)/this.width);this.percentStart=i;this.percentEnd=t},draw:function(){var t=this,o,s,f,h,i,c,l,a,v;if(t.destroy(),t.enabled){var r=t.chart.container,e=t.rotate,u=t.chart;u.panRequired=!0;o=r.set();t.set=o;e?n.setCN(u,o,"scrollbar-vertical"):n.setCN(u,o,"scrollbar-horizontal");u.scrollbarsSet.push(o);e?(s=t.scrollbarHeight,f=u.plotAreaHeight):(f=t.scrollbarHeight,s=u.plotAreaWidth);t.width=s;(t.height=f)&&s&&(i=n.rect(r,s,f,t.backgroundColor,t.backgroundAlpha,1,t.backgroundColor,t.backgroundAlpha),n.setCN(u,i,"scrollbar-bg"),t.bg=i,o.push(i),i=n.rect(r,s,f,"#000",.005),o.push(i),t.invisibleBg=i,i.click(function(){t.handleBgClick()}).mouseover(function(){t.handleMouseOver()}).mouseout(function(){t.handleMouseOut()}).touchend(function(){t.handleBgClick()}),i=n.rect(r,s,f,t.selectedBackgroundColor,t.selectedBackgroundAlpha),n.setCN(u,i,"scrollbar-bg-selected"),t.selectedBG=i,o.push(i),s=n.rect(r,s,f,"#000",.005),t.dragger=s,o.push(s),s.mousedown(function(n){t.handleDragStart(n)}).mouseup(function(){t.handleDragStop()}).mouseover(function(){t.handleDraggerOver()}).mouseout(function(){t.handleMouseOut()}).touchstart(function(n){t.handleDragStart(n)}).touchend(function(){t.handleDragStop()}),f=u.pathToImages,i=t.dragIcon.replace(/\.[a-z]*$/i,""),n.isAbsolute(i)&&(f=""),e?(h=f+i+"H"+u.extension,f=t.dragIconWidth,e=t.dragIconHeight):(h=f+i+u.extension,e=t.dragIconWidth,f=t.dragIconHeight),i=r.image(h,0,0,e,f),n.setCN(u,i,"scrollbar-grip-left"),h=r.image(h,0,0,e,f),n.setCN(u,h,"scrollbar-grip-right"),c=10,l=20,u.panEventsEnabled&&(c=25,l=t.scrollbarHeight),a=n.rect(r,c,l,"#000",.005),v=n.rect(r,c,l,"#000",.005),v.translate(-(c-e)/2,-(l-f)/2),a.translate(-(c-e)/2,-(l-f)/2),e=r.set([i,v]),r=r.set([h,a]),t.iconLeft=e,o.push(t.iconLeft),t.iconRight=r,o.push(r),t.updateGripCursor(!1),u.makeAccessible(e,t.accessibleLabel),u.makeAccessible(r,t.accessibleLabel),u.makeAccessible(s,t.accessibleLabel),e.setAttr("role","menuitem"),r.setAttr("role","menuitem"),s.setAttr("role","menuitem"),void 0!==t.tabIndex&&(e.setAttr("tabindex",t.tabIndex),e.keyup(function(n){t.handleKeys(n,1,0)})),void 0!==t.tabIndex&&(s.setAttr("tabindex",t.tabIndex),s.keyup(function(n){t.handleKeys(n,1,1)})),void 0!==t.tabIndex&&(r.setAttr("tabindex",t.tabIndex),r.keyup(function(n){t.handleKeys(n,0,1)})),e.mousedown(function(){t.leftDragStart()}).mouseup(function(){t.leftDragStop()}).mouseover(function(){t.iconRollOver()}).mouseout(function(){t.iconRollOut()}).touchstart(function(){t.leftDragStart()}).touchend(function(){t.leftDragStop()}),r.mousedown(function(){t.rightDragStart()}).mouseup(function(){t.rightDragStop()}).mouseover(function(){t.iconRollOver()}).mouseout(function(){t.iconRollOut()}).touchstart(function(){t.rightDragStart()}).touchend(function(){t.rightDragStop()}),n.ifArray(u.chartData)?o.show():o.hide(),t.hideDragIcons(),t.clipDragger(!1));o.translate(t.x,t.y);o.node.style.msTouchAction="none";o.node.style.touchAction="none"}},handleKeys:function(n,t,i){var r,u;if(this.getPercents(),r=this.percentStart,u=this.percentEnd,this.rotate)var f=u,u=r,r=f;(37==n.keyCode||40==n.keyCode)&&(r-=.02*t,u-=.02*i);(39==n.keyCode||38==n.keyCode)&&(r+=.02*t,u+=.02*i);this.rotate&&(n=u,u=r,r=n);isNaN(u)||isNaN(r)||this.percentZoom(r,u,!0)},updateScrollbarSize:function(n,t){if(!isNaN(n)&&!isNaN(t)){n=Math.round(n);t=Math.round(t);var i=this.dragger,r,u,f,e,o;this.rotate?(r=0,u=n,f=this.width+1,e=t-n,i.setAttr("height",t-n),i.setAttr("y",u)):(r=n,u=0,f=t-n,e=this.height+1,o=t-n,i.setAttr("x",r),i.setAttr("width",o));this.clipAndUpdate(r,u,f,e)}},update:function(){var n,l=!1,i,t,r=this.x,u=this.y,f=this.dragger,e=this.getDBox(),o;if(e){i=e.x+r;t=e.y+u;var a=e.width,e=e.height,v=this.rotate,s=this.chart,h=this.width,c=this.height,y=s.mouseX,s=s.mouseY;n=this.initialMouse;this.forceClip&&this.clipDragger(!0);this.dragging&&(o=this.initialCoord,v?(n=o+(s-n),0>n&&(n=0),o=c-e,n>o&&(n=o),f.setAttr("y",n)):(n=o+(y-n),0>n&&(n=0),o=h-a,(n>o||isNaN(n))&&(n=o),f.setAttr("x",n)),this.clipDragger(!0));this.resizingRight&&(v?(n=s-t,!isNaN(this.maxHeight)&&n>this.maxHeight&&(n=this.maxHeight),n+t>c+u&&(n=c-t+u),0>n)?(this.resizingRight=!1,l=this.resizingLeft=!0):((0===n||isNaN(n))&&(n=.1),f.setAttr("height",n)):(n=y-i,!isNaN(this.maxWidth)&&n>this.maxWidth&&(n=this.maxWidth),n+i>h+r&&(n=h-i+r),0>n)?(this.resizingRight=!1,l=this.resizingLeft=!0):((0===n||isNaN(n))&&(n=.1),f.setAttr("width",n)),this.clipDragger(!0));this.resizingLeft&&(v?(i=t,t=s,t<u&&(t=u),isNaN(t)&&(t=u),t>c+u&&(t=c+u),n=!0===l?i-t:e+i-t,!isNaN(this.maxHeight)&&n>this.maxHeight&&(n=this.maxHeight,t=i),0>n)?(this.resizingRight=!0,this.resizingLeft=!1,f.setAttr("y",i+e-u)):((0===n||isNaN(n))&&(n=.1),f.setAttr("y",t-u),f.setAttr("height",n)):(t=y,t<r&&(t=r),isNaN(t)&&(t=r),t>h+r&&(t=h+r),n=!0===l?i-t:a+i-t,!isNaN(this.maxWidth)&&n>this.maxWidth&&(n=this.maxWidth,t=i),0>n)?(this.resizingRight=!0,this.resizingLeft=!1,f.setAttr("x",i+a-r)):((0===n||isNaN(n))&&(n=.1),f.setAttr("x",t-r),f.setAttr("width",n)),this.clipDragger(!0))}},stopForceClip:function(){this.animating=this.forceClip=!1},clipDragger:function(n){var t=this.getDBox();if(t){var i=t.x,r=t.y,u=t.width,t=t.height,f=!1;this.rotate?(i=0,u=this.width+1,this.clipY!=r||this.clipH!=t)&&(f=!0):(r=0,t=this.height+1,this.clipX!=i||this.clipW!=u)&&(f=!0);f&&this.clipAndUpdate(i,r,u,t);n&&(this.updateOnReleaseOnly||this.dispatchScrollbarEvent())}},maskGraphs:function(){},clipAndUpdate:function(n,t,i,r){this.clipX=n;this.clipY=t;this.clipW=i;this.clipH=r;this.selectedBG.setAttr("width",i);this.selectedBG.setAttr("height",r);this.selectedBG.translate(n,t);this.updateDragIconPositions();this.maskGraphs(n,t,i,r)},dispatchScrollbarEvent:function(){var i;if(this.skipEvent)this.skipEvent=!1;else{i=this.chart;i.hideBalloon();var n=this.getDBox(),r=n.x,u=n.y,t=n.width,n=n.height;this.getPercents();this.rotate?(r=u,t=this.height/n):t=this.width/t;i={type:"zoomed",position:r,chart:i,target:this,multiplier:t,relativeStart:this.percentStart,relativeEnd:this.percentEnd};(this.percentStart!=this.prevPercentStart||this.percentEnd!=this.prevPercentEnd||this.prevMultiplier!=t)&&(this.fire(i),this.prevPercentStart=this.percentStart,this.prevPercentEnd=this.percentEnd,this.prevMultiplier=t)}},updateDragIconPositions:function(){var i=this.getDBox(),u=i.x,f=i.y,e=this.iconLeft,o=this.iconRight,n,t,r=this.scrollbarHeight;this.rotate?(n=this.dragIconWidth,t=this.dragIconHeight,e.translate((r-t)/2,f-n/2),o.translate((r-t)/2,f+i.height-n/2)):(n=this.dragIconHeight,t=this.dragIconWidth,e.translate(u-t/2,(r-n)/2),o.translate(u-t/2+i.width,(r-n)/2))},showDragIcons:function(){this.resizeEnabled&&(this.iconLeft.show(),this.iconRight.show())},hideDragIcons:function(){this.resizingLeft||this.resizingRight||this.dragging||((this.hideResizeGrips||!this.resizeEnabled)&&(this.iconLeft.hide(),this.iconRight.hide()),this.removeCursors())},removeCursors:function(){this.chart.setMouseCursor("auto")},fireZoomEvent:function(n){this.fire({type:n,chart:this.chart,target:this})},percentZoom:function(t,i,r){if(t=n.fitToBounds(t,0,i),i=n.fitToBounds(i,t,1),this.dragger&&this.enabled){this.dragger.stop();isNaN(t)&&(t=0);isNaN(i)&&(i=1);var u,f;this.rotate?(u=this.height,i=u-u*i,f=u-u*t):(u=this.width,f=u*i,i=u*t);this.updateScrollbarSize(i,f);this.clipDragger(!1);this.getPercents();r&&this.dispatchScrollbarEvent()}},destroy:function(){this.clear();n.remove(this.set);n.remove(this.iconRight);n.remove(this.iconLeft)},clear:function(){},handleDragStart:function(){var t,i;this.enabled&&(this.fireZoomEvent("zoomStarted"),t=this.chart,this.dragger.stop(),this.removeCursors(),n.isModern&&(this.dragger.node.style.cssText=this.dragCursorDown),this.dragging=!0,i=this.getDBox(),this.rotate?(this.initialCoord=i.y,this.initialMouse=t.mouseY):(this.initialCoord=i.x,this.initialMouse=t.mouseX))},handleDragStop:function(){this.updateOnReleaseOnly&&(this.update(),this.skipEvent=!1,this.dispatchScrollbarEvent());this.dragging=!1;this.mouseIsOver&&this.removeCursors();n.isModern&&(this.dragger.node.style.cssText=this.dragCursorHover);this.update();this.fireZoomEvent("zoomEnded")},handleDraggerOver:function(){this.handleMouseOver();n.isModern&&(this.dragger.node.style.cssText=this.dragCursorHover)},leftDragStart:function(){this.fireZoomEvent("zoomStarted");this.dragger.stop();this.resizingLeft=!0;this.updateGripCursor(!0)},updateGripCursor:function(t){n.isModern&&(t=this.rotate?t?this.vResizeCursorDown:this.vResizeCursorHover:t?this.hResizeCursorDown:this.hResizeCursorHover)&&(this.iconRight&&(this.iconRight.node.style.cssText=t),this.iconLeft&&(this.iconLeft.node.style.cssText=t))},leftDragStop:function(){this.resizingLeft&&(this.resizingLeft=!1,this.mouseIsOver||this.removeCursors(),this.updateOnRelease(),this.fireZoomEvent("zoomEnded"));this.updateGripCursor(!1)},rightDragStart:function(){this.fireZoomEvent("zoomStarted");this.dragger.stop();this.resizingRight=!0;this.updateGripCursor(!0)},rightDragStop:function(){this.resizingRight&&(this.resizingRight=!1,this.mouseIsOver||this.removeCursors(),this.updateOnRelease(),this.fireZoomEvent("zoomEnded"));this.updateGripCursor(!1)},iconRollOut:function(){this.removeCursors()},iconRollOver:function(){this.rotate?this.vResizeCursor&&this.chart.setMouseCursor(this.vResizeCursor):this.hResizeCursor&&this.chart.setMouseCursor(this.hResizeCursor);this.handleMouseOver()},getDBox:function(){if(this.dragger)return this.dragger.getBBox()},handleBgClick:function(){var t=this,r,i,u,f,e,o;if(!t.resizingRight&&!t.resizingLeft){t.zooming=!0;u=t.scrollDuration;f=t.dragger;r=t.getDBox();e=r.height;o=r.width;i=t.chart;var h=t.y,c=t.x,s=t.rotate;s?(r="y",i=i.mouseY-e/2-h,i=n.fitToBounds(i,0,t.height-e)):(r="x",i=i.mouseX-o/2-c,i=n.fitToBounds(i,0,t.width-o));t.updateOnReleaseOnly?(t.skipEvent=!1,f.setAttr(r,i),t.dispatchScrollbarEvent(),t.clipDragger()):(t.animating=!0,i=Math.round(i),s?f.animate({y:i},u,">"):f.animate({x:i},u,">"),t.forceClip=!0,clearTimeout(t.forceTO),t.forceTO=setTimeout(function(){t.stopForceClip.call(t)},5e3*u))}},updateOnRelease:function(){this.updateOnReleaseOnly&&(this.update(),this.skipEvent=!1,this.dispatchScrollbarEvent())},handleReleaseOutside:function(){this.set&&((this.resizingLeft||this.resizingRight||this.dragging)&&(this.dragging=this.resizingRight=this.resizingLeft=!1,this.updateOnRelease(),this.removeCursors()),this.animating=this.mouseIsOver=!1,this.hideDragIcons(),this.update())},handleMouseOver:function(){this.mouseIsOver=!0;this.showDragIcons()},handleMouseOut:function(){this.mouseIsOver=!1;this.hideDragIcons();this.removeCursors()}})}(),function(){var n=window.AmCharts;n.ChartScrollbar=n.Class({inherits:n.SimpleChartScrollbar,construct:function(t){this.cname="ChartScrollbar";n.ChartScrollbar.base.construct.call(this,t);this.graphLineColor="#BBBBBB";this.graphLineAlpha=0;this.graphFillColor="#BBBBBB";this.graphFillAlpha=1;this.selectedGraphLineColor="#888888";this.selectedGraphLineAlpha=0;this.selectedGraphFillColor="#888888";this.selectedGraphFillAlpha=1;this.gridCount=0;this.gridColor="#FFFFFF";this.gridAlpha=.7;this.skipEvent=this.autoGridCount=!1;this.color="#FFFFFF";this.scrollbarCreated=!1;this.oppositeAxis=!0;this.accessibleLabel="Zoom chart using cursor arrows";n.applyTheme(this,t,this.cname)},init:function(){var t=this.categoryAxis,r=this.chart,i=this.gridAxis,u;t||("CategoryAxis"==this.gridAxis.cname?(this.catScrollbar=!0,t=new n.CategoryAxis,t.id="scrollbar"):(t=new n.ValueAxis,t.data=r.chartData,t.id=i.id,t.type=i.type,t.maximumDate=i.maximumDate,t.minimumDate=i.minimumDate,t.minPeriod=i.minPeriod,t.minMaxField=i.minMaxField),this.categoryAxis=t);t.chart=r;u=r.categoryAxis;u&&(t.firstDayOfWeek=u.firstDayOfWeek);t.dateFormats=i.dateFormats;t.markPeriodChange=i.markPeriodChange;t.boldPeriodBeginning=i.boldPeriodBeginning;t.labelFunction=i.labelFunction;t.axisItemRenderer=n.RecItem;t.axisRenderer=n.RecAxis;t.guideFillRenderer=n.RecFill;t.inside=!0;t.fontSize=this.fontSize;t.tickLength=0;t.axisAlpha=0;n.isString(this.graph)&&(this.graph=n.getObjById(r.graphs,this.graph));(t=this.graph)&&this.catScrollbar&&(i=this.valueAxis,i||(this.valueAxis=i=new n.ValueAxis,i.visible=!1,i.scrollbar=!0,i.axisItemRenderer=n.RecItem,i.axisRenderer=n.RecAxis,i.guideFillRenderer=n.RecFill,i.labelsEnabled=!1,i.chart=r),r=this.unselectedGraph,r||(r=new n.AmGraph,r.scrollbar=!0,this.unselectedGraph=r,r.negativeBase=t.negativeBase,r.noStepRisers=t.noStepRisers),r=this.selectedGraph,r||(r=new n.AmGraph,r.scrollbar=!0,this.selectedGraph=r,r.negativeBase=t.negativeBase,r.noStepRisers=t.noStepRisers));this.scrollbarCreated=!0},draw:function(){var t=this,e,r,h,c,w,b,i,v;if(n.ChartScrollbar.base.draw.call(t),t.enabled){t.scrollbarCreated||t.init();var s=t.chart,o=s.chartData,f=t.categoryAxis,l=t.rotate,h=t.x,c=t.y,y=t.width,p=t.height,u=t.gridAxis,a=t.set;if(f.setOrientation(!l),f.parseDates=u.parseDates,"ValueAxis"==t.categoryAxis.cname&&(f.rotate=!l),f.equalSpacing=u.equalSpacing,f.minPeriod=u.minPeriod,f.startOnAxis=u.startOnAxis,f.width=y-1,f.height=p,f.gridCount=t.gridCount,f.gridColor=t.gridColor,f.gridAlpha=t.gridAlpha,f.color=t.color,f.tickLength=0,f.axisAlpha=0,f.autoGridCount=t.autoGridCount,f.parseDates&&!f.equalSpacing&&f.timeZoom(s.firstTime,s.lastTime),f.minimum=t.gridAxis.fullMin,f.maximum=t.gridAxis.fullMax,f.strictMinMax=!0,f.zoom(0,o.length-1),(u=t.graph)&&t.catScrollbar){for(e=t.valueAxis,r=u.valueAxis,e.id=r.id,e.rotate=l,e.setOrientation(l),e.width=y,e.height=p,e.dataProvider=o,e.reversed=r.reversed,e.logarithmic=r.logarithmic,e.gridAlpha=0,e.axisAlpha=0,a.push(e.set),l?(e.y=c,e.x=0):(e.x=h,e.y=0),h=Infinity,c=-Infinity,w=0;w<o.length;w++){b=o[w].axes[r.id].graphs[u.id].values;for(i in b)b.hasOwnProperty(i)&&"percents"!=i&&"total"!=i&&(v=b[i],v<h&&(h=v),v>c&&(c=v))}Infinity!=h&&(e.minimum=h);-Infinity!=c&&(e.maximum=c+.1*(c-h));h==c&&(--e.minimum,e.maximum+=1);void 0!==t.minimum&&(e.minimum=t.minimum);void 0!==t.maximum&&(e.maximum=t.maximum);e.zoom(0,o.length-1);i=t.unselectedGraph;i.id=u.id;i.bcn="scrollbar-graph-";i.rotate=l;i.chart=s;i.data=o;i.valueAxis=e;i.chart=u.chart;i.categoryAxis=t.categoryAxis;i.periodSpan=u.periodSpan;i.valueField=u.valueField;i.openField=u.openField;i.closeField=u.closeField;i.highField=u.highField;i.lowField=u.lowField;i.lineAlpha=t.graphLineAlpha;i.lineColorR=t.graphLineColor;i.fillAlphas=t.graphFillAlpha;i.fillColorsR=t.graphFillColor;i.connect=u.connect;i.hidden=u.hidden;i.width=y;i.height=p;i.pointPosition=u.pointPosition;i.stepDirection=u.stepDirection;i.periodSpan=u.periodSpan;r=t.selectedGraph;r.id=u.id;r.bcn=i.bcn+"selected-";r.rotate=l;r.chart=s;r.data=o;r.valueAxis=e;r.chart=u.chart;r.categoryAxis=f;r.periodSpan=u.periodSpan;r.valueField=u.valueField;r.openField=u.openField;r.closeField=u.closeField;r.highField=u.highField;r.lowField=u.lowField;r.lineAlpha=t.selectedGraphLineAlpha;r.lineColorR=t.selectedGraphLineColor;r.fillAlphas=t.selectedGraphFillAlpha;r.fillColorsR=t.selectedGraphFillColor;r.connect=u.connect;r.hidden=u.hidden;r.width=y;r.height=p;r.pointPosition=u.pointPosition;r.stepDirection=u.stepDirection;r.periodSpan=u.periodSpan;s=t.graphType;s||(s=u.type);i.type=s;r.type=s;o=o.length-1;i.zoom(0,o);r.zoom(0,o);r.set.click(function(){t.handleBackgroundClick()}).mouseover(function(){t.handleMouseOver()}).mouseout(function(){t.handleMouseOut()});i.set.click(function(){t.handleBackgroundClick()}).mouseover(function(){t.handleMouseOver()}).mouseout(function(){t.handleMouseOut()});a.push(i.set);a.push(r.set)}a.push(f.set);a.push(f.labelsSet);t.bg.toBack();t.invisibleBg.toFront();t.dragger.toFront();t.iconLeft.toFront();t.iconRight.toFront()}},timeZoom:function(t,i,r){this.startTime=t;this.endTime=i;this.timeDifference=i-t;this.skipEvent=!n.toBoolean(r);this.zoomScrollbar();this.dispatchScrollbarEvent()},zoom:function(n,t){this.start=n;this.end=t;this.skipEvent=!0;this.zoomScrollbar()},dispatchScrollbarEvent:function(){var f,t,h,r;if(this.categoryAxis&&"ValueAxis"==this.categoryAxis.cname)n.ChartScrollbar.base.dispatchScrollbarEvent.call(this);else if(this.skipEvent)this.skipEvent=!1;else{f=this.chart.chartData;r=this.dragger.getBBox();t=r.x;var e=r.y,u=r.width,r=r.height,o=this.chart;this.rotate?(t=e,h=r):h=u;u={type:"zoomed",target:this};u.chart=o;var i=this.categoryAxis,c=this.stepWidth,r=o.minSelectedTime,s=o.maxSelectedTime,e=!1;i.parseDates&&!i.equalSpacing?(f=o.lastTime,o=o.firstTime,i=Math.round(t/c)+o,t=this.dragging?i+this.timeDifference:Math.round((t+h)/c)+o,i>t&&(i=t),0<r&&t-i<r&&(t=Math.round(i+(t-i)/2),e=Math.round(r/2),i=t-e,t+=e,e=!0),0<s&&t-i>s&&(t=Math.round(i+(t-i)/2),e=Math.round(s/2),i=t-e,t+=e,e=!0),t>f&&(t=f),t-r<i&&(i=t-r),i<o&&(i=o),i+r>t&&(t=i+r),i!=this.startTime||t!=this.endTime)&&(this.startTime=i,this.endTime=t,u.start=i,u.end=t,u.startDate=new Date(i),u.endDate=new Date(t),this.fire(u)):(s=c/2,i.startOnAxis||(t+=s,h-=s),r=i.xToIndex(t),i.startOnAxis||(t=i.getCoordinate(r)-s),t=i.xToIndex(t+h),(r!=this.start||this.end!=t)&&(i.startOnAxis&&(this.resizingRight&&r==t&&t++,this.resizingLeft&&r==t&&(0<r?r--:t=1)),t==f.length&&(t=f.length-1),r==t&&t==f.length-1&&(r=t-1),this.start=r,this.end=this.dragging?this.start+this.difference:t,u.start=this.start,u.end=this.end,i.parseDates&&(f[this.start]&&(u.startDate=new Date(f[this.start].time)),f[this.end]&&(u.endDate=new Date(f[this.end].time))),this.fire(u)),this.percentStart=r,this.percentEnd=t);e&&this.zoomScrollbar(!0)}},zoomScrollbar:function(n){var u,t,r,i;(!(this.dragging||this.resizingLeft||this.resizingRight||this.animating)||n)&&this.dragger&&this.enabled&&(r=this.chart,n=r.chartData,i=this.categoryAxis,i.parseDates&&!i.equalSpacing?(n=i.stepWidth,t=r.firstTime,u=n*(this.startTime-t),t=n*(this.endTime-t)):(n[this.start]&&(u=n[this.start].x[i.id]),n[this.end]&&(t=n[this.end].x[i.id]),n=i.stepWidth,i.startOnAxis||(r=n/2,u-=r,t+=r)),this.stepWidth=n,isNaN(u)||isNaN(t)||this.updateScrollbarSize(u,t))},maskGraphs:function(n,t,i,r){var u=this.selectedGraph;u&&u.set.clipRect(n,t,i,r)},handleDragStart:function(){n.ChartScrollbar.base.handleDragStart.call(this);this.difference=this.end-this.start;this.timeDifference=this.endTime-this.startTime;0>this.timeDifference&&(this.timeDifference=0)},handleBackgroundClick:function(){n.ChartScrollbar.base.handleBackgroundClick.call(this);this.dragging||(this.difference=this.end-this.start,this.timeDifference=this.endTime-this.startTime,0>this.timeDifference&&(this.timeDifference=0))}})}(),function(){var n=window.AmCharts;n.AmBalloon=n.Class({construct:function(t){this.cname="AmBalloon";this.enabled=!0;this.fillColor="#FFFFFF";this.fillAlpha=.8;this.borderThickness=2;this.borderColor="#FFFFFF";this.borderAlpha=1;this.cornerRadius=0;this.maxWidth=220;this.horizontalPadding=8;this.verticalPadding=4;this.pointerWidth=6;this.pointerOrientation="V";this.color="#000000";this.adjustBorderColor=!0;this.show=this.follow=this.showBullet=!1;this.bulletSize=3;this.shadowAlpha=.4;this.shadowColor="#000000";this.fadeOutDuration=this.animationDuration=.3;this.fixedPosition=!0;this.offsetY=6;this.offsetX=1;this.textAlign="center";this.disableMouseEvents=!0;this.deltaSignX=this.deltaSignY=1;n.isModern||(this.offsetY*=1.5);this.sdy=this.sdx=0;n.applyTheme(this,t,this.cname)},draw:function(){var f=this.pointToX,s=this.pointToY,a,o,w,i,r,p,ut,st,t;if(n.isModern||(this.drop=!1),a=this.chart,n.VML&&(this.fadeOutDuration=0),this.xAnim&&a.stopAnim(this.xAnim),this.yAnim&&a.stopAnim(this.yAnim),this.sdy=this.sdx=0,!isNaN(f)){var ot=this.follow,v=a.container,y=this.set;if(n.remove(y),this.removeDiv(),y=v.set(),y.node.style.pointerEvents="none",this.set=y,this.mainSet?(this.mainSet.push(this.set),this.sdx=this.mainSet.x,this.sdy=this.mainSet.y):a.balloonsSet.push(y),this.show){var e=this.l,b=this.t,k=this.r,g=this.b,o=this.balloonColor,c=this.fillColor,rt=this.borderColor,tt=c;void 0!=o&&(this.adjustBorderColor?tt=rt=o:c=o);var d=this.horizontalPadding,it=this.verticalPadding,h=this.pointerWidth,l=this.pointerOrientation,nt=this.cornerRadius,u=a.fontFamily,t=this.fontSize;void 0==t&&(t=a.fontSize);o=document.createElement("div");w=a.classNamePrefix;o.className=w+"-balloon-div";this.className&&(o.className=o.className+" "+w+"-balloon-div-"+this.className);w=o.style;this.disableMouseEvents&&(w.pointerEvents="none");w.position="absolute";i=this.minWidth;r=document.createElement("div");o.appendChild(r);p=r.style;isNaN(i)||(p.minWidth=i-2*d+"px");p.textAlign=this.textAlign;p.maxWidth=this.maxWidth+"px";p.fontSize=t+"px";p.color=this.color;p.fontFamily=u;r.innerHTML=this.text;a.chartDiv.appendChild(o);this.textDiv=o;p=o.offsetWidth;ut=o.offsetHeight;o.clientHeight&&(p=o.clientWidth,ut=o.clientHeight);u=ut+2*it;r=p+2*d;!isNaN(i)&&r<i&&(r=i);window.opera&&(u+=2);st=!1;t=this.offsetY;a.handDrawn&&(t+=a.handDrawScatter+2);"H"!=l?(i=f-r/2,s<b+u+10&&"down"!=l?(st=!0,ot&&(s+=t),t=s+h,this.deltaSignY=-1):(ot&&(s-=t),t=s-u-h,this.deltaSignY=1)):(2*h>u&&(h=u/2),t=s-u/2,f<e+(k-e)/2?(i=f+h,this.deltaSignX=-1):(i=f-r-h,this.deltaSignX=1));t+u>=g&&(t=g-u);t<b&&(t=b);i<e&&(i=e);i+r>k&&(i=k-r);var b=t+it,g=i+d,ft=this.shadowAlpha,ct=this.shadowColor,d=this.borderThickness,lt=this.bulletSize,et,it=this.fillAlpha,ht=this.borderAlpha;this.showBullet&&(et=n.circle(v,lt,tt,it),y.push(et));this.drop?(e=r/1.6,k=0,"V"==l&&(l="down"),"H"==l&&(l="left"),"down"==l&&(i=f+1,t=s-e-e/3),"up"==l&&(k=180,i=f+1,t=s+e+e/3),"left"==l&&(k=270,i=f+e+e/3+2,t=s),"right"==l&&(k=90,i=f-e-e/3+2,t=s),b=t-ut/2+1,g=i-p/2-1,c=n.drop(v,e,k,c,it,d,rt,ht)):0<nt||0===h?(0<ft&&(f=n.rect(v,r,u,c,0,d+1,ct,ft,nt),n.isModern?f.translate(1,1):f.translate(4,4),y.push(f)),c=n.rect(v,r,u,c,it,d,rt,ht,nt)):(tt=[],nt=[],"H"!=l?(e=f-i,e>r-h&&(e=r-h),e<h&&(e=h),tt=[0,e-h,f-i,e+h,r,r,0,0],nt=st?[0,0,s-t,0,0,u,u,0]:[u,u,s-t,u,u,0,0,u]):(l=s-t,l>u-h&&(l=u-h),l<h&&(l=h),nt=[0,l-h,s-t,l+h,u,u,0,0],tt=f<e+(k-e)/2?[0,0,i<f?0:f-i,0,0,r,r,0]:[r,r,i+r>f?r:f-i,r,r,0,0,r]),0<ft&&(f=n.polygon(v,tt,nt,c,0,d,ct,ft),f.translate(1,1),y.push(f)),c=n.polygon(v,tt,nt,c,it,d,rt,ht));this.bg=c;y.push(c);c.toFront();n.setCN(a,c,"balloon-bg");this.className&&n.setCN(a,c,"balloon-bg-"+this.className);v=1*this.deltaSignX;g+=this.sdx;b+=this.sdy;w.left=g+"px";w.top=b+"px";y.translate(i-v,t,1,!0);c=c.getBBox();this.bottom=t+u+1;this.yPos=c.y+t;et&&et.translate(this.pointToX-i+v,s-t);s=this.animationDuration;0<this.animationDuration&&!ot&&!isNaN(this.prevX)&&(y.translate(this.prevX,this.prevY,NaN,!0),y.animate({translate:i-v+","+t},s,"easeOutSine"),o&&(w.left=this.prevTX+"px",w.top=this.prevTY+"px",this.xAnim=a.animate({node:o},"left",this.prevTX,g,s,"easeOutSine","px"),this.yAnim=a.animate({node:o},"top",this.prevTY,b,s,"easeOutSine","px")));this.prevX=i-v;this.prevY=t;this.prevTX=g;this.prevTY=b}}},fixPrevious:function(){this.rPrevX=this.prevX;this.rPrevY=this.prevY;this.rPrevTX=this.prevTX;this.rPrevTY=this.prevTY},restorePrevious:function(){this.prevX=this.rPrevX;this.prevY=this.rPrevY;this.prevTX=this.rPrevTX;this.prevTY=this.rPrevTY},followMouse:function(){var n,t,i;if(this.follow&&this.show&&(n=this.chart.mouseX-this.offsetX*this.deltaSignX-this.sdx,t=this.chart.mouseY-this.sdy,this.pointToX=n,this.pointToY=t,n!=this.previousX||t!=this.previousY))if(this.previousX=n,this.previousY=t,0===this.cornerRadius)this.draw();else if(i=this.set,i){var r=i.getBBox(),n=n-r.width/2,u=t-r.height-10;n<this.l&&(n=this.l);n>this.r-r.width&&(n=this.r-r.width);u<this.t&&(u=t+10);i.translate(n,u);t=this.textDiv.style;t.left=n+this.horizontalPadding+"px";t.top=u+this.verticalPadding+"px"}},changeColor:function(n){this.balloonColor=n},setBounds:function(n,t,i,r){this.l=n;this.t=t;this.r=i;this.b=r;this.destroyTO&&clearTimeout(this.destroyTO)},showBalloon:function(n){(this.text!=n||this.positionChanged)&&(this.text=n,this.isHiding=!1,this.show=!0,this.destroyTO&&clearTimeout(this.destroyTO),n=this.chart,this.fadeAnim1&&n.stopAnim(this.fadeAnim1),this.fadeAnim2&&n.stopAnim(this.fadeAnim2),this.draw(),this.positionChanged=!1)},hide:function(n){var t=this,r,i;t.text=void 0;isNaN(n)&&(n=t.fadeOutDuration);r=t.chart;0<n&&!t.isHiding?(t.isHiding=!0,t.destroyTO&&clearTimeout(t.destroyTO),t.destroyTO=setTimeout(function(){t.destroy.call(t)},1e3*n),t.follow=!1,t.show=!1,i=t.set,i&&(i.setAttr("opacity",t.fillAlpha),t.fadeAnim1=i.animate({opacity:0},n,"easeInSine")),t.textDiv&&(t.fadeAnim2=r.animate({node:t.textDiv},"opacity",1,0,n,"easeInSine",""))):(t.show=!1,t.follow=!1,t.destroy())},setPosition:function(n,t){(n!=this.pointToX||t!=this.pointToY)&&(this.previousX=this.pointToX,this.previousY=this.pointToY,this.pointToX=n,this.pointToY=t,this.positionChanged=!0)},followCursor:function(n){var t=this,i,r;t.follow=n;clearInterval(t.interval);i=t.chart.mouseX-t.sdx;r=t.chart.mouseY-t.sdy;!isNaN(i)&&n&&(t.pointToX=i-t.offsetX*t.deltaSignX,t.pointToY=r,t.followMouse(),t.interval=setInterval(function(){t.followMouse.call(t)},40))},removeDiv:function(){if(this.textDiv){var n=this.textDiv.parentNode;n&&n.removeChild(this.textDiv)}},destroy:function(){clearInterval(this.interval);n.remove(this.set);this.removeDiv();this.set=null}})}(),function(){var n=window.AmCharts;n.AmCoordinateChart=n.Class({inherits:n.AmChart,construct:function(t){n.AmCoordinateChart.base.construct.call(this,t);this.theme=t;this.createEvents("rollOverGraphItem","rollOutGraphItem","clickGraphItem","doubleClickGraphItem","rightClickGraphItem","clickGraph","rollOverGraph","rollOutGraph");this.startAlpha=1;this.startDuration=0;this.startEffect="elastic";this.sequencedAnimation=!0;this.colors="#FF6600 #FCD202 #B0DE09 #0D8ECF #2A0CD0 #CD0D74 #CC0000 #00CC00 #0000CC #DDDDDD #999999 #333333 #990000".split(" ");this.balloonDateFormat="MMM DD, YYYY";this.valueAxes=[];this.graphs=[];this.guides=[];this.gridAboveGraphs=!1;n.applyTheme(this,t,"AmCoordinateChart")},initChart:function(){n.AmCoordinateChart.base.initChart.call(this);this.drawGraphs=!0;var t=this.categoryAxis;t&&(this.categoryAxis=n.processObject(t,n.CategoryAxis,this.theme));this.processValueAxes();this.createValueAxes();this.processGraphs();this.processGuides();n.VML&&(this.startAlpha=1);this.setLegendData(this.graphs);this.gridAboveGraphs&&(this.gridSet.toFront(),this.bulletSet.toFront(),this.balloonsSet.toFront())},createValueAxes:function(){if(0===this.valueAxes.length){var t=new n.ValueAxis;this.addValueAxis(t)}},parseData:function(){this.processValueAxes();this.processGraphs()},parseSerialData:function(n){var i,t;if(this.chartData=[],n)if(0<this.processTimeout)for(1>this.processCount&&(this.processCount=1),i=n.length/this.processCount,this.parseCount=Math.ceil(i)-1,t=0;t<i;t++)this.delayParseSerialData(n,t);else this.parseCount=0,this.parsePartSerialData(n,0,n.length,0);else this.onDataUpdated()},delayParseSerialData:function(n,t){var i=this,r=i.processCount;setTimeout(function(){i.parsePartSerialData.call(i,n,t*r,(t+1)*r,t)},i.processTimeout)},parsePartSerialData:function(t,i,r,u){var w,tt,e,it,rt,ut,l,ft,b,ht,et,a,ot,v,f,s,st,k,y,d,h,ct,o,g,c,at;r>t.length&&(r=t.length);var p=this.graphs,lt={},nt=this.seriesIdField;for(nt||(nt=this.categoryField),w=!1,e=this.categoryAxis,e&&(w=e.parseDates,it=e.forceShowField,ut=e.classNameField,rt=e.labelColorField,tt=e.categoryFunction),b={},w&&(l=n.extractPeriod(e.minPeriod),ft=l.period,l=l.count,ht=n.getPeriodDuration(ft,l)),et={},this.lookupTable=et,ot=this.dataDateFormat,v={},a=i;a<r;a++)if(f={},s=t[a],i=s[this.categoryField],f.dataContext=s,f.category=tt?tt(i,s,e):String(i),it&&(f.forceShow=s[it]),ut&&(f.className=s[ut]),rt&&(f.labelColor=s[rt]),et[s[nt]]=f,!w||(e.categoryFunction?i=e.categoryFunction(i,s,e):(!ot||i instanceof Date||(i=i.toString()+" |"),i=n.getDate(i,ot,e.minPeriod)),i=n.resetDateToMin(i,ft,l,e.firstDayOfWeek),f.category=i,f.time=i.getTime(),!isNaN(f.time))){for(st=this.valueAxes,f.axes={},f.x={},k=0;k<st.length;k++)for(y=st[k].id,f.axes[y]={},f.axes[y].graphs={},d=0;d<p.length;d++)if(i=p[d],h=i.id,c=1.1,isNaN(i.gapPeriod)||(c=i.gapPeriod),ct=i.periodValue,i.valueAxis.id==y){if(f.axes[y].graphs[h]={},o={},o.index=a,g=s,i.dataProvider&&(g=lt),o.values=this.processValues(g,i,ct),!i.connect||i.forceGap&&!isNaN(i.gapPeriod))if(v&&v[h]&&0<c&&f.time-b[h]>=ht*c&&(v[h].gap=!0),i.forceGap){c=0;for(at in o.values)c++;0<c&&(b[h]=f.time,v[h]=o)}else b[h]=f.time,v[h]=o;this.processFields(i,o,g);o.category=f.category;o.serialDataItem=f;o.graph=i;f.axes[y].graphs[h]=o}this.chartData[a]=f}if(this.parseCount==u){for(t=0;t<p.length;t++)i=p[t],i.dataProvider&&this.parseGraphData(i);this.dataChanged=!1;this.dispatchDataUpdated=!0;this.onDataUpdated()}},processValues:function(t,i,r){var s={},f,c=!1,h,o,u,e;for("candlestick"!=i.type&&"ohlc"!=i.type||""===r||(c=!0),h="value error open close low high".split(" "),o=0;o<h.length;o++)u=h[o],"value"!=u&&"error"!=u&&c&&(r=u.charAt(0).toUpperCase()+u.slice(1)),e=t[i[u+"Field"]+r],null!==e&&(f=Number(e),isNaN(f)||(s[u]=f),"date"==i.valueAxis.type&&void 0!==e&&(f=n.getDate(e,i.chart.dataDateFormat),s[u]=f.getTime()));return s},parseGraphData:function(n){var e=n.dataProvider,t=n.seriesIdField,r;for(t||(t=this.seriesIdField),t||(t=this.categoryField),r=0;r<e.length;r++){var u=e[r],f=this.lookupTable[String(u[t])],i=n.valueAxis.id;f&&(i=f.axes[i].graphs[n.id],i.serialDataItem=f,i.values=this.processValues(u,n,n.periodValue),this.processFields(n,i,u))}},addValueAxis:function(n){n.chart=this;this.valueAxes.push(n);this.validateData()},removeValueAxesAndGraphs:function(){for(var t=this.valueAxes,n=t.length-1;-1<n;n--)this.removeValueAxis(t[n])},removeValueAxis:function(n){for(var i=this.graphs,r,t=i.length-1;0<=t;t--)r=i[t],r&&r.valueAxis==n&&this.removeGraph(r);for(i=this.valueAxes,t=i.length-1;0<=t;t--)i[t]==n&&i.splice(t,1);this.validateData()},addGraph:function(n){this.graphs.push(n);this.chooseGraphColor(n,this.graphs.length-1);this.validateData()},removeGraph:function(n){for(var i=this.graphs,t=i.length-1;0<=t;t--)i[t]==n&&(i.splice(t,1),n.destroy());this.validateData()},handleValueAxisZoom:function(){},processValueAxes:function(){for(var r=this.valueAxes,t,i=0;i<r.length;i++)t=r[i],t=n.processObject(t,n.ValueAxis,this.theme),r[i]=t,t.chart=this,t.init(),this.listenTo(t,"axisIntZoomed",this.handleValueAxisZoom),t.id||(t.id="valueAxisAuto"+i+"_"+(new Date).getTime()),void 0===t.usePrefixes&&(t.usePrefixes=this.usePrefixes)},processGuides:function(){var u=this.guides,f=this.categoryAxis,r,t,i;if(u)for(r=0;r<u.length;r++)t=u[r],(void 0!==t.category||void 0!==t.date)&&f&&f.addGuide(t),t.id||(t.id="guideAuto"+r+"_"+(new Date).getTime()),i=t.valueAxis,i?(n.isString(i)&&(i=this.getValueAxisById(i)),i?i.addGuide(t):this.valueAxes[0].addGuide(t)):isNaN(t.value)||this.valueAxes[0].addGuide(t)},processGraphs:function(){var r=this.graphs,i,t;for(this.graphsById={},i=0;i<r.length;i++)t=r[i],t=n.processObject(t,n.AmGraph,this.theme),r[i]=t,this.chooseGraphColor(t,i),t.chart=this,t.init(),n.isString(t.valueAxis)&&(t.valueAxis=this.getValueAxisById(t.valueAxis)),t.valueAxis||(t.valueAxis=this.valueAxes[0]),t.id||(t.id="graphAuto"+i+"_"+(new Date).getTime()),this.graphsById[t.id]=t},formatString:function(t,i,r){var e=i.graph,u=e.valueAxis,f;return u.duration&&u.maxInterval&&i.values.value&&(f=u.numberFormatter,f||(f=chart.nf),u=n.formatDuration(i.values.value,u.duration,"",u.durationUnits,u.maxInterval,f),t=t.split("[[value]]").join(u)),t=n.massReplace(t,{"[[title]]":e.title,"[[description]]":i.description}),t=r?n.fixNewLines(t):n.fixBrakes(t),n.cleanFromEmpty(t)},getBalloonColor:function(t,i,r){var u=t.lineColor,f=t.balloonColor;return r&&(f=u),r=t.fillColorsR,"object"==typeof r?u=r[0]:void 0!==r&&(u=r),i.isNegative&&(r=t.negativeLineColor,t=t.negativeFillColors,"object"==typeof t?r=t[0]:void 0!==t&&(r=t),void 0!==r&&(u=r)),void 0!==i.color&&(u=i.color),void 0!==i.lineColor&&(u=i.lineColor),i=i.fillColors,void 0!==i&&(u=i,n.ifArray(i)&&(u=i[0])),void 0===f&&(f=u),f},getGraphById:function(t){return n.getObjById(this.graphs,t)},getValueAxisById:function(t){return n.getObjById(this.valueAxes,t)},processFields:function(t,i,r){var f,u,o,e;for(t.itemColors&&(f=t.itemColors,u=i.index,i.color=u<f.length?f[u]:n.randomColor()),f="lineColor color alpha fillColors description bullet customBullet bulletSize bulletConfig url labelColor dashLength pattern gap className columnIndex".split(" "),u=0;u<f.length;u++)o=f[u],e=t[o+"Field"],e&&(e=r[e],n.isDefined(e)&&(i[o]=e));i.dataContext=r},chooseGraphColor:function(t,i){if(t.lineColor)t.lineColorR=t.lineColor;else{var r;r=this.colors.length>i?this.colors[i]:t.lineColorR?t.lineColorR:n.randomColor();t.lineColorR=r}t.fillColorsR=t.fillColors?t.fillColors:t.lineColorR;t.bulletBorderColorR=t.bulletBorderColor?t.bulletBorderColor:t.useLineColorForBulletBorder?t.lineColorR:t.bulletColor;t.bulletColorR=t.bulletColor?t.bulletColor:t.lineColorR;(r=this.patterns)&&(t.pattern=r[i])},handleLegendEvent:function(n){var r=n.type,t,i;if(n=n.dataItem){t=n.hidden;i=n.showBalloon;switch(r){case"clickMarker":this.textClickEnabled&&(i?this.hideGraphsBalloon(n):this.showGraphsBalloon(n));break;case"clickLabel":i?this.hideGraphsBalloon(n):this.showGraphsBalloon(n);break;case"rollOverItem":t||this.highlightGraph(n);break;case"rollOutItem":t||this.unhighlightGraph();break;case"hideItem":this.hideGraph(n);break;case"showItem":this.showGraph(n)}}},highlightGraph:function(n){var r=this.graphs,t,i,u;if(r&&(i=.2,this.legend&&(i=this.legend.rollOverGraphAlpha),1!=i))for(t=0;t<r.length;t++)u=r[t],u!=n&&u.changeOpacity(i)},unhighlightGraph:function(){var n,t;if(this.legend&&(n=this.legend.rollOverGraphAlpha),1!=n)for(n=this.graphs,t=0;t<n.length;t++)n[t].changeOpacity(1)},showGraph:function(n){n.switchable&&(n.hidden=!1,this.dataChanged=!0,"xy"!=this.type&&(this.marginsUpdated=!1),this.chartCreated&&this.initChart())},hideGraph:function(n){n.switchable&&(this.dataChanged=!0,"xy"!=this.type&&(this.marginsUpdated=!1),n.hidden=!0,this.chartCreated&&this.initChart())},hideGraphsBalloon:function(n){n.showBalloon=!1;this.updateLegend()},showGraphsBalloon:function(n){n.showBalloon=!0;this.updateLegend()},updateLegend:function(){this.legend&&this.legend.invalidateSize()},resetAnimation:function(){var n,t;if(this.animatable=[],n=this.graphs,n)for(t=0;t<n.length;t++)n[t].animationPlayed=!1},animateAgain:function(){this.resetAnimation();this.validateNow()}})}(),function(){var n=window.AmCharts;n.TrendLine=n.Class({construct:function(t){this.cname="TrendLine";this.createEvents("click","rollOver","rollOut");this.isProtected=!1;this.dashLength=0;this.lineColor="#00CC00";this.lineThickness=this.lineAlpha=1;n.applyTheme(this,t,this.cname)},draw:function(){var t=this;t.destroy();var s=t.chart,f=s.container,h,c,i,e,o=t.categoryAxis,l=t.initialDate,a=t.initialCategory,r=t.finalDate,u=t.finalCategory,v=t.valueAxis,y=t.valueAxisX,p=t.initialXValue,w=t.finalXValue,b=t.initialValue,k=t.finalValue,d=v.recalculateToPercents,g=s.dataDateFormat;o&&(l&&(l=n.getDate(l,g,"fff"),t.initialDate=l,h=o.dateToCoordinate(l)),a&&(h=o.categoryToCoordinate(a)),r&&(r=n.getDate(r,g,"fff"),t.finalDate=r,c=o.dateToCoordinate(r)),u&&(c=o.categoryToCoordinate(u)));y&&!d&&(isNaN(p)||(h=y.getCoordinate(p)),isNaN(w)||(c=y.getCoordinate(w)));v&&!d&&(isNaN(b)||(i=v.getCoordinate(b)),isNaN(k)||(e=v.getCoordinate(k)));isNaN(h)||isNaN(c)||isNaN(i)||isNaN(i)||(s.rotate?(o=[i,e],e=[h,c]):(o=[h,c],e=[i,e]),i=n.line(f,o,e,t.lineColor,t.lineAlpha,t.lineThickness,t.dashLength),h=o,c=e,r=o[1]-o[0],u=e[1]-e[0],0===r&&(r=.01),0===u&&(u=.01),l=r/Math.abs(r),a=u/Math.abs(u),u=Math.PI/2-Math.asin(r/(r*u/Math.abs(r*u)*Math.sqrt(Math.pow(r,2)+Math.pow(u,2)))),r=Math.abs(5*Math.cos(u)),u=Math.abs(5*Math.sin(u)),h.push(o[1]-l*u,o[0]-l*u),c.push(e[1]+a*r,e[0]+a*r),e=n.polygon(f,h,c,"#ffffff",.005,0),f=f.set([e,i]),f.translate(s.marginLeftReal,s.marginTopReal),s.trendLinesSet.push(f),n.setCN(s,i,"trend-line"),n.setCN(s,i,"trend-line-"+t.id),t.line=i,t.set=f,(i=t.initialImage)&&(i=n.processObject(i,n.Image,t.theme),i.chart=s,i.draw(),i.translate(h[0]+i.offsetX,c[0]+i.offsetY),f.push(i.set)),(i=t.finalImage)&&(i=n.processObject(i,n.Image,t.theme),i.chart=s,i.draw(),i.translate(h[1]+i.offsetX,c[1]+i.offsetY),f.push(i.set)),f.mouseup(function(){t.handleLineClick()}).mouseover(function(){t.handleLineOver()}).mouseout(function(){t.handleLineOut()}),f.touchend&&f.touchend(function(){t.handleLineClick()}),f.clipRect(0,0,s.plotAreaWidth,s.plotAreaHeight))},handleLineClick:function(){this.fire({type:"click",trendLine:this,chart:this.chart})},handleLineOver:function(){var n=this.rollOverColor;void 0!==n&&this.line.attr({stroke:n});this.balloonText&&(clearTimeout(this.chart.hoverInt),n=this.line.getBBox(),this.chart.showBalloon(this.balloonText,this.lineColor,!0,this.x+n.x+n.width/2,this.y+n.y+n.height/2));this.fire({type:"rollOver",trendLine:this,chart:this.chart})},handleLineOut:function(){this.line.attr({stroke:this.lineColor});this.balloonText&&this.chart.hideBalloon();this.fire({type:"rollOut",trendLine:this,chart:this.chart})},destroy:function(){n.remove(this.set)}})}(),function(){var n=window.AmCharts;n.Image=n.Class({construct:function(t){this.cname="Image";this.height=this.width=20;this.rotation=this.offsetY=this.offsetX=0;this.balloonColor=this.color="#000000";this.opacity=1;n.applyTheme(this,t,this.cname)},draw:function(){var n=this,i,t,r;n.set&&n.set.remove();i=n.chart.container;n.set=i.set();n.url?(t=i.image(n.url,0,0,n.width,n.height),r=1):n.svgPath&&(t=i.path(n.svgPath),t.setAttr("fill",n.color),t.setAttr("stroke",n.outlineColor),i=t.getBBox(),r=Math.min(n.width/i.width,n.height/i.height));t&&(t.setAttr("opacity",n.opacity),n.set.rotate(n.rotation),t.translate(-n.width/2,-n.height/2,r),n.balloonText&&t.mouseover(function(){n.chart.showBalloon(n.balloonText,n.balloonColor,!0)}).mouseout(function(){n.chart.hideBalloon()}).touchend(function(){n.chart.hideBalloon()}).touchstart(function(){n.chart.showBalloon(n.balloonText,n.balloonColor,!0)}),n.set.push(t))},translate:function(n,t){this.set&&this.set.translate(n,t)}})}(),function(){var n=window.AmCharts;n.circle=function(t,i,r,u,f,e,o,s,h){return 0>=i&&(i=.001),(void 0==f||0===f)&&(f=.01),void 0===e&&(e="#000000"),void 0===o&&(o=0),u={fill:r,stroke:e,"fill-opacity":u,"stroke-width":f,"stroke-opacity":o},t=isNaN(h)?t.circle(0,0,i).attr(u):t.ellipse(0,0,i,h).attr(u),s&&t.gradient("radialGradient",[r,n.adjustLuminosity(r,-.6)]),t};n.text=function(t,i,r,u,f,e,o,s){return e||(e="middle"),"right"==e&&(e="end"),"left"==e&&(e="start"),isNaN(s)&&(s=1),void 0!==i&&(i=String(i),n.isIE&&!n.isModern&&(i=i.replace("&amp;","&"),i=i.replace("&","&amp;"))),r={fill:r,"font-family":u,"font-size":f+"px",opacity:s},!0===o&&(r["font-weight"]="bold"),r["text-anchor"]=e,t.text(i,r)};n.polygon=function(t,i,r,u,f,e,o,s,h,c,l){isNaN(e)&&(e=.01);isNaN(s)&&(s=f);var a=u,v=!1;for("object"==typeof a&&1<a.length&&(v=!0,a=a[0]),void 0===o&&(o=a),f={fill:a,stroke:o,"fill-opacity":f,"stroke-width":e,"stroke-opacity":s},void 0!==l&&0<l&&(f["stroke-dasharray"]=l),l=n.dx,e=n.dy,t.handDrawn&&(r=n.makeHD(i,r,t.handDrawScatter),i=r[0],r=r[1]),o=Math.round,c&&(o=Number),s="M"+(o(i[0])+l)+","+(o(r[0])+e),a=1;a<i.length;a++)c&&(i[a]=n.roundTo(i[a],5),r[a]=n.roundTo(r[a],5)),s+=" L"+(o(i[a])+l)+","+(o(r[a])+e);return t=t.path(s+" Z").attr(f),v&&t.gradient("linearGradient",u,h),t};n.rect=function(t,i,r,u,f,e,o,s,h,c,l){var a,p,v,y;return isNaN(i)||isNaN(r)?t.set():(isNaN(e)&&(e=0),void 0===h&&(h=0),void 0===c&&(c=270),isNaN(f)&&(f=0),a=u,p=!1,"object"==typeof a&&(a=a[0],p=!0),void 0===o&&(o=a),void 0===s&&(s=f),i=Math.round(i),r=Math.round(r),v=0,y=0,0>i&&(i=Math.abs(i),v=-i),0>r&&(r=Math.abs(r),y=-r),v+=n.dx,y+=n.dy,f={fill:a,stroke:o,"fill-opacity":f,"stroke-opacity":s},void 0!==l&&0<l&&(f["stroke-dasharray"]=l),t=t.rect(v,y,i,r,h,e).attr(f),p&&t.gradient("linearGradient",u,c),t)};n.bullet=function(t,i,r,u,f,e,o,s,h,c,l,a,v){var y;"circle"==i&&(i="round");switch(i){case"round":y=n.circle(t,r/2,u,f,e,o,s);break;case"square":y=n.polygon(t,[-r/2,r/2,r/2,-r/2],[r/2,r/2,-r/2,-r/2],u,f,e,o,s,c-180,void 0,v);break;case"rectangle":y=n.polygon(t,[-r,r,r,-r],[r/2,r/2,-r/2,-r/2],u,f,e,o,s,c-180,void 0,v);break;case"diamond":y=n.polygon(t,[-r/2,0,r/2,0],[0,-r/2,0,r/2],u,f,e,o,s);break;case"triangleUp":y=n.triangle(t,r,0,u,f,e,o,s);break;case"triangleDown":y=n.triangle(t,r,180,u,f,e,o,s);break;case"triangleLeft":y=n.triangle(t,r,270,u,f,e,o,s);break;case"triangleRight":y=n.triangle(t,r,90,u,f,e,o,s);break;case"bubble":y=n.circle(t,r/2,u,f,e,o,s,!0);break;case"line":y=n.line(t,[-r/2,r/2],[0,0],u,f,e,o,s);break;case"yError":y=t.set();y.push(n.line(t,[0,0],[-r/2,r/2],u,f,e));y.push(n.line(t,[-h,h],[-r/2,-r/2],u,f,e));y.push(n.line(t,[-h,h],[r/2,r/2],u,f,e));break;case"xError":y=t.set();y.push(n.line(t,[-r/2,r/2],[0,0],u,f,e));y.push(n.line(t,[-r/2,-r/2],[-h,h],u,f,e));y.push(n.line(t,[r/2,r/2],[-h,h],u,f,e))}return y&&y.pattern(l,NaN,a),y};n.triangle=function(n,t,i,r,u,f,e,o){(void 0===f||0===f)&&(f=1);void 0===e&&(e="#000");void 0===o&&(o=0);r={fill:r,stroke:e,"fill-opacity":u,"stroke-width":f,"stroke-opacity":o};t/=2;var s;return 0===i&&(s=" M"+-t+","+t+" L0,"+-t+" L"+t+","+t+" Z"),180==i&&(s=" M"+-t+","+-t+" L0,"+t+" L"+t+","+-t+" Z"),90==i&&(s=" M"+-t+","+-t+" L"+t+",0 L"+-t+","+t+" Z"),270==i&&(s=" M"+-t+",0 L"+t+","+t+" L"+t+","+-t+" Z"),n.path(s).attr(r)};n.line=function(t,i,r,u,f,e,o,s,h,c,l){if(t.handDrawn&&!l)return n.handDrawnLine(t,i,r,u,f,e,o,s,h,c,l);for(e={fill:"none","stroke-width":e},void 0!==o&&0<o&&(e["stroke-dasharray"]=o),isNaN(f)||(e["stroke-opacity"]=f),u&&(e.stroke=u),u=Math.round,c&&(u=Number,i[0]=n.roundTo(i[0],5),r[0]=n.roundTo(r[0],5)),c=n.dx,f=n.dy,o="M"+(u(i[0])+c)+","+(u(r[0])+f),s=1;s<i.length;s++)i[s]=n.roundTo(i[s],5),r[s]=n.roundTo(r[s],5),o+=" L"+(u(i[s])+c)+","+(u(r[s])+f);return n.VML?t.path(o,void 0,!0).attr(e):(h&&(o+=" M0,0 L0,0"),t.path(o).attr(e))};n.makeHD=function(n,t,i){for(var a,c=[],l=[],r=1;r<n.length;r++)for(var o=Number(n[r-1]),s=Number(t[r-1]),u=Number(n[r]),f=Number(t[r]),h=Math.round(Math.sqrt(Math.pow(u-o,2)+Math.pow(f-s,2))/50)+1,u=(u-o)/h,f=(f-s)/h,e=0;e<=h;e++)a=s+e*f+Math.random()*i,c.push(o+e*u+Math.random()*i),l.push(a);return[c,l]};n.handDrawnLine=function(t,i,r,u,f,e,o,s,h,c){for(var p=t.set(),l=1;l<i.length;l++)for(var y=[i[l-1],i[l]],a=[r[l-1],r[l]],a=n.makeHD(y,a,t.handDrawScatter),y=a[0],a=a[1],v=1;v<y.length;v++)p.push(n.line(t,[y[v-1],y[v]],[a[v-1],a[v]],u,f,e+Math.random()*t.handDrawThickness-t.handDrawThickness/2,o,s,h,c,!0));return p};n.doNothing=function(n){return n};n.drop=function(n,t,i,r,u,f,e,o){var s=1/180*Math.PI,h=i-20,v=Math.sin(h*s)*t,y=Math.cos(h*s)*t,p=Math.sin((h+40)*s)*t,w=Math.cos((h+40)*s)*t,a=.8*t,c=-t/3,l=t/3;return 0===i&&(c=-c,l=0),180==i&&(l=0),90==i&&(c=0),270==i&&(c=0,l=-l),i={fill:r,stroke:e,"stroke-width":f,"stroke-opacity":o,"fill-opacity":u},t="M"+v+","+y+" A"+t+","+t+",0,1,1,"+p+","+w+(" A"+a+","+a+",0,0,0,"+(Math.sin((h+20)*s)*t+l)+","+(Math.cos((h+20)*s)*t+c)),t+=" A"+a+","+a+",0,0,0,"+v+","+y,n.path(t,void 0,void 0,"1000,1000").attr(i)};n.wedge=function(t,i,r,u,f,e,o,s,h,c,l,a,v,y){var p=Math.round,st,ut,ct,ht,lt;e=p(e);o=p(o);s=p(s);var k=p(o/e*s),et=n.VML,b=359.5+e/100;359.94<b&&(b=359.94);f>=b&&(f=b);var w=1/180*Math.PI,b=i+Math.sin(u*w)*s,d=r-Math.cos(u*w)*k,g=i+Math.sin(u*w)*e,nt=r-Math.cos(u*w)*o,tt=i+Math.sin((u+f)*w)*e,it=r-Math.cos((u+f)*w)*o,rt=i+Math.sin((u+f)*w)*s,w=r-Math.cos((u+f)*w)*k,ft={fill:n.adjustLuminosity(c.fill,-.2),"stroke-opacity":0,"fill-opacity":c["fill-opacity"]},ot=0;if(180<Math.abs(f)&&(ot=1),u=t.set(),et&&(b=p(10*b),g=p(10*g),tt=p(10*tt),rt=p(10*rt),d=p(10*d),nt=p(10*nt),it=p(10*it),w=p(10*w),i=p(10*i),h=p(10*h),r=p(10*r),e*=10,o*=10,s*=10,k*=10,1>Math.abs(f)&&1>=Math.abs(tt-g)&&1>=Math.abs(it-nt)&&(st=!0)),f="",a&&(ft["fill-opacity"]=0,ft["stroke-opacity"]=c["stroke-opacity"]/2,ft.stroke=c.stroke),0<h){for(ut=" M"+b+","+(d+h)+" L"+g+","+(nt+h),et?(st||(ut+=" A"+(i-e)+","+(h+r-o)+","+(i+e)+","+(h+r+o)+","+g+","+(nt+h)+","+tt+","+(it+h)),ut+=" L"+rt+","+(w+h),0<s&&(st||(ut+=" B"+(i-s)+","+(h+r-k)+","+(i+s)+","+(h+r+k)+","+rt+","+(h+w)+","+b+","+(h+d)))):(ut+=" A"+e+","+o+",0,"+ot+",1,"+tt+","+(it+h)+" L"+rt+","+(w+h),0<s&&(ut+=" A"+s+","+k+",0,"+ot+",0,"+b+","+(d+h))),ut+=" Z",ct=h,et&&(ct/=10),ht=0;ht<ct;ht+=10)lt=t.path(ut,void 0,void 0,"1000,1000").attr(ft),u.push(lt),lt.translate(0,-ht);ut=t.path(" M"+b+","+d+" L"+b+","+(d+h)+" L"+g+","+(nt+h)+" L"+g+","+nt+" L"+b+","+d+" Z",void 0,void 0,"1000,1000").attr(ft);h=t.path(" M"+tt+","+it+" L"+tt+","+(it+h)+" L"+rt+","+(w+h)+" L"+rt+","+w+" L"+tt+","+it+" Z",void 0,void 0,"1000,1000").attr(ft);u.push(ut);u.push(h)}if(et?(st||(f=" A"+p(i-e)+","+p(r-o)+","+p(i+e)+","+p(r+o)+","+p(g)+","+p(nt)+","+p(tt)+","+p(it)),o=" M"+p(b)+","+p(d)+" L"+p(g)+","+p(nt)+f+" L"+p(rt)+","+p(w)):o=" M"+b+","+d+" L"+g+","+nt+(" A"+e+","+o+",0,"+ot+",1,"+tt+","+it)+" L"+rt+","+w,0<s&&(et?st||(o+=" B"+(i-s)+","+(r-k)+","+(i+s)+","+(r+k)+","+rt+","+w+","+b+","+d):o+=" A"+s+","+k+",0,"+ot+",0,"+b+","+d),t.handDrawn&&(s=n.line(t,[b,g],[d,nt],c.stroke,c.thickness*Math.random()*t.handDrawThickness,c["stroke-opacity"]),u.push(s)),t=t.path(o+" Z",void 0,void 0,"1000,1000").attr(c),l){for(s=[],k=0;k<l.length;k++)s.push(n.adjustLuminosity(c.fill,l[k]));"radial"!=y||n.isModern||(s=[]);0<s.length&&t.gradient(y+"Gradient",s)}return n.isModern&&"radial"==y&&t.grad&&(t.grad.setAttribute("gradientUnits","userSpaceOnUse"),t.grad.setAttribute("r",e),t.grad.setAttribute("cx",i),t.grad.setAttribute("cy",r)),t.pattern(a,NaN,v),u.wedge=t,u.push(t),u};n.rgb2hex=function(n){return(n=n.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i))&&4===n.length?"#"+("0"+parseInt(n[1],10).toString(16)).slice(-2)+("0"+parseInt(n[2],10).toString(16)).slice(-2)+("0"+parseInt(n[3],10).toString(16)).slice(-2):""};n.adjustLuminosity=function(t,i){t&&-1!=t.indexOf("rgb")&&(t=n.rgb2hex(t));t=String(t).replace(/[^0-9a-f]/gi,"");6>t.length&&(t=String(t[0])+String(t[0])+String(t[1])+String(t[1])+String(t[2])+String(t[2]));i=i||0;for(var f="#",r,u=0;3>u;u++)r=parseInt(t.substr(2*u,2),16),r=Math.round(Math.min(Math.max(0,r+r*i),255)).toString(16),f+=("00"+r).substr(r.length);return f}}(),function(){var n=window.AmCharts;n.Bezier=n.Class({construct:function(t,i,r,u,f,e,o,s,h,c,l){var v=t.chart,a=n.bezierX,y=n.bezierY,p,w;for(isNaN(v.bezierX)||(a=v.bezierX),isNaN(v.bezierY)||(y=v.bezierY),isNaN(a)&&(v.rotate?(a=20,y=4):(y=20,a=4)),"object"==typeof o&&1<o.length&&(w=!0,p=o,o=o[0]),"object"==typeof s&&(s=s[0]),0===s&&(o="none"),e={fill:o,"fill-opacity":s,"stroke-width":e},void 0!==h&&0<h&&(e["stroke-dasharray"]=h),isNaN(f)||(e["stroke-opacity"]=f),u&&(e.stroke=u),u="M"+Math.round(i[0])+","+Math.round(r[0])+" ",f=[],h=0;h<i.length;h++)isNaN(i[h])||isNaN(r[h])?(u+=this.drawSegment(f,a,y),h<i.length-1&&(u+="L"+i[h+1]+","+r[h+1]+" "),f=[]):f.push({x:Number(i[h]),y:Number(r[h])});u+=this.drawSegment(f,a,y);c&&(u+=c);this.path=t.path(u).attr(e);this.node=this.path.node;w&&this.path.gradient("linearGradient",p,l)},drawSegment:function(n,t,i){var h="",e;if(2<n.length)for(e=0;e<n.length-1;e++){var r=[],f=n[e-1],u=n[e],o=n[e+1],s=n[e+2];0===e?(r.push({x:u.x,y:u.y}),r.push({x:u.x,y:u.y}),r.push({x:o.x,y:o.y}),r.push({x:s.x,y:s.y})):e>=n.length-2?(r.push({x:f.x,y:f.y}),r.push({x:u.x,y:u.y}),r.push({x:o.x,y:o.y}),r.push({x:o.x,y:o.y})):(r.push({x:f.x,y:f.y}),r.push({x:u.x,y:u.y}),r.push({x:o.x,y:o.y}),r.push({x:s.x,y:s.y}));f=[];u=Math.round;f.push({x:u(r[1].x),y:u(r[1].y)});f.push({x:u((-r[0].x+t*r[1].x+r[2].x)/t),y:u((-r[0].y+i*r[1].y+r[2].y)/i)});f.push({x:u((r[1].x+t*r[2].x-r[3].x)/t),y:u((r[1].y+i*r[2].y-r[3].y)/i)});f.push({x:u(r[2].x),y:u(r[2].y)});h+="C"+f[1].x+","+f[1].y+","+f[2].x+","+f[2].y+","+f[3].x+","+f[3].y+" "}else 1<n.length&&(h+="L"+n[1].x+","+n[1].y);return h}})}(),function(){var n=window.AmCharts;n.AmDraw=n.Class({construct:function(t,i,r,u){n.SVG_NS="http://www.w3.org/2000/svg";n.SVG_XLINK="http://www.w3.org/1999/xlink";n.hasSVG=!!document.createElementNS&&!!document.createElementNS(n.SVG_NS,"svg").createSVGRect;1>i&&(i=10);1>r&&(r=10);this.div=t;this.width=i;this.height=r;this.rBin=document.createElement("div");n.hasSVG?(n.SVG=!0,i=this.createSvgElement("svg"),t.appendChild(i),this.container=i,this.addDefs(u),this.R=new n.SVGRenderer(this)):n.isIE&&n.VMLRenderer&&(n.VML=!0,n.vmlStyleSheet||(document.namespaces.add("amvml","urn:schemas-microsoft-com:vml"),31>document.styleSheets.length?(i=document.createStyleSheet(),i.addRule(".amvml","behavior:url(#default#VML); display:inline-block; antialias:true"),n.vmlStyleSheet=i):document.styleSheets[0].addRule(".amvml","behavior:url(#default#VML); display:inline-block; antialias:true")),this.container=t,this.R=new n.VMLRenderer(this,u),this.R.disableSelection(t))},createSvgElement:function(t){return document.createElementNS(n.SVG_NS,t)},circle:function(t,i,r,u){var f=new n.AmDObject("circle",this);return f.attr({r:r,cx:t,cy:i}),this.addToContainer(f.node,u),f},ellipse:function(t,i,r,u,f){var e=new n.AmDObject("ellipse",this);return e.attr({rx:r,ry:u,cx:t,cy:i}),this.addToContainer(e.node,f),e},setSize:function(n,t){0<n&&0<t&&(this.container.style.width=n+"px",this.container.style.height=t+"px")},rect:function(t,i,r,u,f,e,o){var s=new n.AmDObject("rect",this);return n.VML&&(f=Math.round(100*f/Math.min(r,u)),r+=2*e,u+=2*e,s.bw=e,s.node.style.marginLeft=-e,s.node.style.marginTop=-e),1>r&&(r=1),1>u&&(u=1),s.attr({x:t,y:i,width:r,height:u,rx:f,ry:f,"stroke-width":e}),this.addToContainer(s.node,o),s},image:function(t,i,r,u,f,e){var o=new n.AmDObject("image",this);return o.attr({x:i,y:r,width:u,height:f}),this.R.path(o,t),this.addToContainer(o.node,e),o},addToContainer:function(n,t){t||(t=this.container);t.appendChild(n)},text:function(n,t,i){return this.R.text(n,t,i)},path:function(t,i,r,u){var f=new n.AmDObject("path",this);return u||(u="100,100"),f.attr({cs:u}),r?f.attr({dd:t}):f.attr({d:t}),this.addToContainer(f.node,i),f},set:function(n){return this.R.set(n)},remove:function(n){if(n){var t=this.rBin;t.appendChild(n);t.innerHTML=""}},renderFix:function(){var i=this.container,n=i.style;n.top="0px";n.left="0px";try{var t=i.getBoundingClientRect(),r=t.left-Math.round(t.left),u=t.top-Math.round(t.top);r&&(n.left=r+"px");u&&(n.top=u+"px")}catch(f){}},update:function(){this.R.update()},addDefs:function(t){var i,r,u;n.hasSVG&&(i=this.createSvgElement("desc"),r=this.container,r.setAttribute("version","1.1"),r.style.position="absolute",this.setSize(this.width,this.height),t.accessibleTitle&&(u=this.createSvgElement("text"),r.appendChild(u),u.innerHTML=t.accessibleTitle,u.style.opacity=0),n.rtl&&(r.setAttribute("direction","rtl"),r.style.left="auto",r.style.right="0px"),t&&(t.addCodeCredits&&i.appendChild(document.createTextNode("JavaScript chart by amCharts "+t.version)),t.accessibleDescription&&(i.innerHTML="",i.appendChild(document.createTextNode(t.accessibleDescription))),r.appendChild(i),t.defs&&(i=this.createSvgElement("defs"),r.appendChild(i),n.parseDefs(t.defs,i),this.defs=i)))}})}(),function(){var n=window.AmCharts;n.AmDObject=n.Class({construct:function(n,t){this.D=t;this.R=t.R;this.node=this.R.create(this,n);this.y=this.x=0;this.scale=1},attr:function(n){return this.R.attr(this,n),this},getAttr:function(n){return this.node.getAttribute(n)},setAttr:function(n,t){return this.R.setAttr(this,n,t),this},clipRect:function(n,t,i,r){this.R.clipRect(this,n,t,i,r)},translate:function(n,t,i,r){r||(n=Math.round(n),t=Math.round(t));this.R.move(this,n,t,i);this.x=n;this.y=t;this.scale=i;this.angle&&this.rotate(this.angle)},rotate:function(n,t){this.R.rotate(this,n,t);this.angle=n},animate:function(t,i,r){var u,f,e;for(u in t)t.hasOwnProperty(u)&&(f=u,e=t[u],r=n.getEffect(r),this.R.animate(this,f,e,i,r))},push:function(n){var t,i;n&&(t=this.node,t.appendChild(n.node),i=n.clipPath,i&&t.appendChild(i),(n=n.grad)&&t.appendChild(n))},text:function(n){this.R.setText(this,n)},remove:function(){this.stop();this.R.remove(this)},clear:function(){var n=this.node;if(n.hasChildNodes())for(;1<=n.childNodes.length;)n.removeChild(n.firstChild)},hide:function(){this.setAttr("visibility","hidden")},show:function(){this.setAttr("visibility","visible")},getBBox:function(){return this.R.getBBox(this)},toFront:function(){var n=this.node,t;n&&(this.prevNextNode=n.nextSibling,t=n.parentNode,t&&t.appendChild(n))},toPrevious:function(){var n=this.node;n&&this.prevNextNode&&(n=n.parentNode)&&n.insertBefore(this.prevNextNode,null)},toBack:function(){var n=this.node,t,i;n&&(this.prevNextNode=n.nextSibling,t=n.parentNode,t&&(i=t.firstChild,i&&t.insertBefore(n,i)))},mouseover:function(n){return this.R.addListener(this,"mouseover",n),this},mouseout:function(n){return this.R.addListener(this,"mouseout",n),this},click:function(n){return this.R.addListener(this,"click",n),this},dblclick:function(n){return this.R.addListener(this,"dblclick",n),this},mousedown:function(n){return this.R.addListener(this,"mousedown",n),this},mouseup:function(n){return this.R.addListener(this,"mouseup",n),this},touchmove:function(n){return this.R.addListener(this,"touchmove",n),this},touchstart:function(n){return this.R.addListener(this,"touchstart",n),this},touchend:function(n){return this.R.addListener(this,"touchend",n),this},keyup:function(n){return this.R.addListener(this,"keyup",n),this},focus:function(n){return this.R.addListener(this,"focus",n),this},blur:function(n){return this.R.addListener(this,"blur",n),this},contextmenu:function(n){return this.node.addEventListener?this.node.addEventListener("contextmenu",n,!0):this.R.addListener(this,"contextmenu",n),this},stop:function(){n.removeFromArray(this.R.animations,this.an_translate);n.removeFromArray(this.R.animations,this.an_y);n.removeFromArray(this.R.animations,this.an_x)},length:function(){return this.node.childNodes.length},gradient:function(n,t,i){this.R.gradient(this,n,t,i)},pattern:function(n,t,i){n&&this.R.pattern(this,n,t,i)}})}(),function(){var n=window.AmCharts;n.VMLRenderer=n.Class({construct:function(n,t){this.chart=t;this.D=n;this.cNames={circle:"oval",ellipse:"oval",rect:"roundrect",path:"shape"};this.styleMap={x:"left",y:"top",width:"width",height:"height","font-family":"fontFamily","font-size":"fontSize",visibility:"visibility"}},create:function(n,t){var i,r,u;return"group"==t?(i=document.createElement("div"),n.type="div"):"text"==t?(i=document.createElement("div"),n.type="text"):"image"==t?(i=document.createElement("img"),n.type="image"):(n.type="shape",n.shapeType=this.cNames[t],i=document.createElement("amvml:"+this.cNames[t]),r=document.createElement("amvml:stroke"),i.appendChild(r),n.stroke=r,u=document.createElement("amvml:fill"),i.appendChild(u),n.fill=u,u.className="amvml",r.className="amvml",i.className="amvml"),i.style.position="absolute",i.style.top=0,i.style.left=0,i},path:function(n,t){n.node.setAttribute("src",t)},setAttr:function(t,i,r){var o,e;if(void 0!==r){8===document.documentMode&&(o=!0);var s=t.node,f=t.type,u=s.style;if("r"==i&&(u.width=2*r,u.height=2*r),"oval"==t.shapeType&&("rx"==i&&(u.width=2*r),"ry"==i&&(u.height=2*r)),"roundrect"==t.shapeType&&("width"!=i&&"height"!=i||--r),"cursor"==i&&(u.cursor=r),"cx"==i&&(u.left=r-n.removePx(u.width)/2),"cy"==i&&(u.top=r-n.removePx(u.height)/2),e=this.styleMap[i],"width"==e&&0>r&&(r=0),void 0!==e&&(u[e]=r),"text"==f&&("text-anchor"==i&&(t.anchor=r,e=s.clientWidth,"end"==r&&(u.marginLeft=-e+"px"),"middle"==r&&(u.marginLeft=-(e/2)+"px",u.textAlign="center"),"start"==r&&(u.marginLeft="0px")),"fill"==i&&(u.color=r),"font-weight"==i&&(u.fontWeight=r)),u=t.children)for(e=0;e<u.length;e++)u[e].setAttr(i,r);"shape"==f&&("cs"==i&&(s.style.width="100px",s.style.height="100px",s.setAttribute("coordsize",r)),"d"==i&&s.setAttribute("path",this.svgPathToVml(r)),"dd"==i&&s.setAttribute("path",r),f=t.stroke,t=t.fill,"stroke"==i&&(o?f.color=r:f.setAttribute("color",r)),"stroke-width"==i&&(o?f.weight=r:f.setAttribute("weight",r)),"stroke-opacity"==i&&(o?f.opacity=r:f.setAttribute("opacity",r)),"stroke-dasharray"==i&&(u="solid",0<r&&3>r&&(u="dot"),3<=r&&6>=r&&(u="dash"),6<r&&(u="longdash"),o?f.dashstyle=u:f.setAttribute("dashstyle",u)),("fill-opacity"==i||"opacity"==i)&&(0===r?o?t.on=!1:t.setAttribute("on",!1):o?t.opacity=r:t.setAttribute("opacity",r)),"fill"==i&&(o?t.color=r:t.setAttribute("color",r)),"rx"==i&&(o?s.arcSize=r+"%":s.setAttribute("arcsize",r+"%")))}},attr:function(n,t){for(var i in t)t.hasOwnProperty(i)&&this.setAttr(n,i,t[i])},text:function(t,i,r){var u=new n.AmDObject("text",this.D),f=u.node;return f.style.whiteSpace="pre",f.innerHTML=t,this.D.addToContainer(f,r),this.attr(u,i),u},getBBox:function(n){return this.getBox(n.node)},getBox:function(n){var h=n.offsetLeft,c=n.offsetTop,o=n.offsetWidth,s=n.offsetHeight,i,r,u,e,t,f;if(n.hasChildNodes()){for(e=0;e<n.childNodes.length;e++)i=this.getBox(n.childNodes[e]),t=i.x,isNaN(t)||(isNaN(r)?r=t:t<r&&(r=t)),f=i.y,isNaN(f)||(isNaN(u)?u=f:f<u&&(u=f)),t=i.width+t,isNaN(t)||(o=Math.max(o,t)),i=i.height+f,isNaN(i)||(s=Math.max(s,i));0>r&&(h+=r);0>u&&(c+=u)}return{x:h,y:c,width:o,height:s}},setText:function(n,t){var i=n.node;i&&(i.innerHTML=t);this.setAttr(n,"text-anchor",n.anchor)},addListener:function(n,t,i){n.node["on"+t]=i},move:function(t,i,r){var u=t.node,f=u.style;"text"==t.type&&(r-=n.removePx(f.fontSize)/2-1);"oval"==t.shapeType&&(i-=n.removePx(f.width)/2,r-=n.removePx(f.height)/2);t=t.bw;isNaN(t)||(i-=t,r-=t);isNaN(i)||isNaN(r)||(u.style.left=i+"px",u.style.top=r+"px")},svgPathToVml:function(n){var l=n.split(" "),u,i,o;for(n="",i=Math.round,o=0;o<l.length;o++){var f=l[o],r=f.substring(0,1),f=f.substring(1),t=f.split(","),e=i(t[0])+","+i(t[1]);if("M"==r&&(n+=" m "+e),"L"==r&&(n+=" l "+e),"Z"==r&&(n+=" x e"),"Q"==r){var a=u.length,c=u[a-1],s=t[0],h=t[1],e=t[2],v=t[3];u=i(u[a-2]/3+2/3*s);c=i(c/3+2/3*h);s=i(2/3*s+e/3);h=i(2/3*h+v/3);n+=" c "+u+","+c+","+s+","+h+","+e+","+v}"C"==r&&(n+=" c "+t[0]+","+t[1]+","+t[2]+","+t[3]+","+t[4]+","+t[5]);"A"==r&&(n+=" wa "+f);"B"==r&&(n+=" at "+f);u=t}return n},animate:function(n,t,i,r,u){var f=n.node,e=this.chart,o;n.animationFinished=!1;"translate"==t&&(t=i.split(","),i=t[1],o=f.offsetTop,e.animate(n,"left",f.offsetLeft,t[0],r,u,"px"),e.animate(n,"top",o,i,r,u,"px"))},clipRect:function(n,t,i,r,u){n=n.node;0===t&&0===i?(n.style.width=r+"px",n.style.height=u+"px",n.style.overflow="hidden"):n.style.clip="rect("+i+"px "+(t+r)+"px "+(i+u)+"px "+t+"px)"},rotate:function(t,i,r){var u;if(0!==Number(i)){u=t.node;t=u.style;r||(r=this.getBGColor(u.parentNode));t.backgroundColor=r;t.paddingLeft=1;r=i*Math.PI/180;var e=Math.cos(r),o=Math.sin(r),s=n.removePx(t.left),h=n.removePx(t.top),f=u.offsetWidth,u=u.offsetHeight;i/=Math.abs(i);t.left=s+f/2-f/2*Math.cos(r)-i*u/2*Math.sin(r)+3;t.top=h-i*f/2*Math.sin(r)+i*u/2*Math.sin(r);t.cssText=t.cssText+"; filter:progid:DXImageTransform.Microsoft.Matrix(M11='"+e+"', M12='"+-o+"', M21='"+o+"', M22='"+e+"', sizingmethod='auto expand');"}},getBGColor:function(n){var t="#FFFFFF",i;return n.style&&(i=n.style.backgroundColor,""!==i?t=i:n.parentNode&&(t=this.getBGColor(n.parentNode))),t},set:function(t){var r=new n.AmDObject("group",this.D),i;if(this.D.container.appendChild(r.node),t)for(i=0;i<t.length;i++)r.push(t[i]);return r},gradient:function(n,t,i,r){var f="",u;for("radialGradient"==t&&(t="gradientradial",i.reverse()),"linearGradient"==t&&(t="gradient"),u=0;u<i.length;u++)f+=Math.round(100*u/(i.length-1))+"% "+i[u],u<i.length-1&&(f+=",");n=n.fill;90==r?r=0:270==r?r=180:180==r?r=90:0===r&&(r=270);8===document.documentMode?(n.type=t,n.angle=r):(n.setAttribute("type",t),n.setAttribute("angle",r));f&&(n.colors.value=f)},remove:function(n){n.clipPath&&this.D.remove(n.clipPath);this.D.remove(n.node)},disableSelection:function(n){n.onselectstart=function(){return!1};n.style.cursor="default"},pattern:function(t,i,r,u){r=t.node;t=t.fill;var f="none";i.color&&(f=i.color);r.fillColor=f;i=i.url;n.isAbsolute(i)||(i=u+i);8===document.documentMode?(t.type="tile",t.src=i):(t.setAttribute("type","tile"),t.setAttribute("src",i))},update:function(){}})}(),function(){var n=window.AmCharts;n.SVGRenderer=n.Class({construct:function(n){this.D=n;this.animations=[]},create:function(t,i){return document.createElementNS(n.SVG_NS,i)},attr:function(n,t){for(var i in t)t.hasOwnProperty(i)&&this.setAttr(n,i,t[i])},setAttr:function(n,t,i){void 0!==i&&n.node.setAttribute(t,i)},animate:function(t,i,r,u,f){t.animationFinished=!1;var e=t.node;t["an_"+i]&&n.removeFromArray(this.animations,t["an_"+i]);"translate"==i?(e=(e=e.getAttribute("transform"))?String(e).substring(10,e.length-1):"0,0",e=e.split(", ").join(" "),e=e.split(" ").join(","),0===e&&(e="0,0")):e=Number(e.getAttribute(i));r={obj:t,frame:0,attribute:i,from:e,to:r,time:u,effect:f};this.animations.push(r);t["an_"+i]=r},update:function(){for(var c=this.animations,e=c.length-1;0<=e;e--){var t=c[e],o=t.time*n.updateRate,s=t.frame+1,h=t.obj,f=t.attribute,r,i,u;if(s<=o){if(t.frame++,"translate"==f){if(r=t.from.split(","),f=Number(r[0]),r=Number(r[1]),isNaN(r)&&(r=0),i=t.to.split(","),u=Number(i[0]),i=Number(i[1]),u=0==u-f?u:Math.round(n[t.effect](0,s,f,u-f,o)),t=0==i-r?i:Math.round(n[t.effect](0,s,r,i-r,o)),f="transform",isNaN(u)||isNaN(t))continue;t="translate("+u+","+t+")"}else i=Number(t.from),r=Number(t.to),u=r-i,t=n[t.effect](0,s,i,u,o),isNaN(t)&&(t=r),0===u&&this.animations.splice(e,1);this.setAttr(h,f,t)}else"translate"==f?(i=t.to.split(","),u=Number(i[0]),i=Number(i[1]),h.translate(u,i)):(r=Number(t.to),this.setAttr(h,f,r)),h.animationFinished=!0,this.animations.splice(e,1)}},getBBox:function(n){if(n=n.node)try{return n.getBBox()}catch(t){}return{width:0,height:0,x:0,y:0}},path:function(t,i){t.node.setAttributeNS(n.SVG_XLINK,"xlink:href",i)},clipRect:function(t,i,r,u,f){var e=t.node,o=t.clipPath,s;o&&this.D.remove(o);s=e.parentNode;s&&(e=document.createElementNS(n.SVG_NS,"clipPath"),o=n.getUniqueId(),e.setAttribute("id",o),this.D.rect(i,r,u,f,0,0,e),s.appendChild(e),i="#",n.baseHref&&!n.isIE&&(i=this.removeTarget(window.location.href)+i),this.setAttr(t,"clip-path","url("+i+o+")"),this.clipPathC++,t.clipPath=e)},text:function(t,i,r){var u=new n.AmDObject("text",this.D),o,f,e;for(t=String(t).split("\n"),o=n.removePx(i["font-size"]),f=0;f<t.length;f++)e=this.create(null,"tspan"),e.appendChild(document.createTextNode(t[f])),e.setAttribute("y",(o+2)*f+Math.round(o/2)),e.setAttribute("x",0),u.node.appendChild(e);return u.node.setAttribute("y",Math.round(o/2)),this.attr(u,i),this.D.addToContainer(u.node,r),u},setText:function(n,t){var i=n.node;i&&(i.removeChild(i.firstChild),i.appendChild(document.createTextNode(t)))},move:function(n,t,i,r){isNaN(t)&&(t=0);isNaN(i)&&(i=0);t="translate("+t+","+i+")";r&&(t=t+" scale("+r+")");this.setAttr(n,"transform",t)},rotate:function(n,t){var r=n.node.getAttribute("transform"),i="rotate("+t+")";r&&(i=r+" "+i);this.setAttr(n,"transform",i)},set:function(t){var r=new n.AmDObject("g",this.D),i;if(this.D.container.appendChild(r.node),t)for(i=0;i<t.length;i++)r.push(t[i]);return r},addListener:function(n,t,i){n.node["on"+t]=i},gradient:function(t,i,r,u){var s=t.node,e=t.grad;if(e&&this.D.remove(e),i=document.createElementNS(n.SVG_NS,i),e=n.getUniqueId(),i.setAttribute("id",e),!isNaN(u)){var f=0,o=0,h=0,c=0;90==u?h=100:270==u?c=100:180==u?f=100:0===u&&(o=100);i.setAttribute("x1",f+"%");i.setAttribute("x2",o+"%");i.setAttribute("y1",h+"%");i.setAttribute("y2",c+"%")}for(u=0;u<r.length;u++)f=document.createElementNS(n.SVG_NS,"stop"),o=100*u/(r.length-1),0===u&&(o=0),f.setAttribute("offset",o+"%"),f.setAttribute("stop-color",r[u]),i.appendChild(f);s.parentNode.appendChild(i);r="#";n.baseHref&&!n.isIE&&(r=this.removeTarget(window.location.href)+r);s.setAttribute("fill","url("+r+e+")");t.grad=i},removeTarget:function(n){return n.split("#")[0]},pattern:function(t,i,r,u){var c=t.node,f,h,o,s;isNaN(r)&&(r=1);f=t.patternNode;f&&this.D.remove(f);var f=document.createElementNS(n.SVG_NS,"pattern"),l=n.getUniqueId(),e=i;i.url&&(e=i.url);n.isAbsolute(e)||-1!=e.indexOf("data:image")||(e=u+e);u=Number(i.width);isNaN(u)&&(u=4);h=Number(i.height);isNaN(h)&&(h=4);u/=r;h/=r;r=i.x;isNaN(r)&&(r=0);o=-Math.random()*Number(i.randomX);isNaN(o)||(r=o);o=i.y;isNaN(o)&&(o=0);s=-Math.random()*Number(i.randomY);isNaN(s)||(o=s);f.setAttribute("id",l);f.setAttribute("width",u);f.setAttribute("height",h);f.setAttribute("patternUnits","userSpaceOnUse");f.setAttribute("xlink:href",e);i.color&&(s=document.createElementNS(n.SVG_NS,"rect"),s.setAttributeNS(null,"height",u),s.setAttributeNS(null,"width",h),s.setAttributeNS(null,"fill",i.color),f.appendChild(s));this.D.image(e,0,0,u,h,f).translate(r,o);e="#";n.baseHref&&!n.isIE&&(e=this.removeTarget(window.location.href)+e);c.setAttribute("fill","url("+e+l+")");t.patternNode=f;c.parentNode.appendChild(f)},remove:function(n){n.clipPath&&this.D.remove(n.clipPath);n.grad&&this.D.remove(n.grad);n.patternNode&&this.D.remove(n.patternNode);this.D.remove(n.node)}})}(),function(){var n=window.AmCharts;n.AmLegend=n.Class({construct:function(t){this.enabled=!0;this.cname="AmLegend";this.createEvents("rollOverMarker","rollOverItem","rollOutMarker","rollOutItem","showItem","hideItem","clickMarker","clickLabel");this.position="bottom";this.borderColor=this.color="#000000";this.borderAlpha=0;this.markerLabelGap=5;this.verticalGap=10;this.align="left";this.horizontalGap=0;this.spacing=10;this.markerDisabledColor="#AAB3B3";this.markerType="square";this.markerSize=16;this.markerBorderThickness=this.markerBorderAlpha=1;this.marginBottom=this.marginTop=0;this.marginLeft=this.marginRight=20;this.autoMargins=!0;this.valueWidth=50;this.switchable=!0;this.switchType="x";this.switchColor="#FFFFFF";this.rollOverColor="#CC0000";this.reversedOrder=!1;this.labelText="[[title]]";this.valueText="[[value]]";this.accessibleLabel="[[title]]";this.useMarkerColorForLabels=!1;this.rollOverGraphAlpha=1;this.textClickEnabled=!1;this.equalWidths=!0;this.backgroundColor="#FFFFFF";this.backgroundAlpha=0;this.useGraphSettings=!1;this.showEntries=!0;this.labelDx=0;n.applyTheme(this,t,this.cname)},setData:function(n){this.legendData=n;this.invalidateSize()},invalidateSize:function(){this.destroy();this.entries=[];this.valueLabels=[];var t=this.legendData;this.enabled&&(n.ifArray(t)||n.ifArray(this.data))&&this.drawLegend()},drawLegend:function(){var t=this.chart,r=this.position,u=this.width,s=t.divRealWidth,i=t.divRealHeight,f=this.div,e=this.legendData,o;if(this.data&&(e=this.combineLegend?this.legendData.concat(this.data):this.data),isNaN(this.fontSize)&&(this.fontSize=t.fontSize),this.maxColumnsReal=this.maxColumns,"right"==r||"left"==r?(this.maxColumnsReal=1,this.autoMargins&&(this.marginLeft=this.marginRight=10)):this.autoMargins&&(this.marginRight=t.marginRight,this.marginLeft=t.marginLeft,o=t.autoMarginOffset,"bottom"==r?(this.marginBottom=o,this.marginTop=0):(this.marginTop=o,this.marginBottom=0)),u=void 0!==u?n.toCoordinate(u,s):"right"!=r&&"left"!=r?t.realWidth:0<this.ieW?this.ieW:t.realWidth,"outside"==r?(u=f.offsetWidth,i=f.offsetHeight,f.clientHeight&&(u=f.clientWidth,i=f.clientHeight)):(isNaN(u)||(f.style.width=u+"px"),f.className="amChartsLegend "+t.classNamePrefix+"-legend-div"),this.divWidth=u,(r=this.container)?(r.container.innerHTML="",f.appendChild(r.container),r.width=u,r.height=i,r.setSize(u,i),r.addDefs(t)):r=new n.AmDraw(f,u,i,t),this.container=r,this.lx=0,this.ly=8,i=this.markerSize,i>this.fontSize&&(this.ly=i/2-1),0<i&&(this.lx+=i+this.markerLabelGap),this.titleWidth=0,(i=this.title)&&(i=n.text(this.container,i,this.color,t.fontFamily,this.fontSize,"start",!0),n.setCN(t,i,"legend-title"),i.translate(this.marginLeft,this.marginTop+this.verticalGap+this.ly+1),t=i.getBBox(),this.titleWidth=t.width+15,this.titleHeight=t.height+6),this.index=this.maxLabelWidth=0,this.showEntries){for(t=0;t<e.length;t++)this.createEntry(e[t]);for(t=this.index=0;t<e.length;t++)this.createValue(e[t])}this.arrangeEntries();this.updateValues()},arrangeEntries:function(){var f=this.position,e=this.marginLeft+this.titleWidth,c=this.marginRight,o=this.marginTop,ut=this.marginBottom,s=this.horizontalGap,tt=this.div,y=this.divWidth,h=this.maxColumnsReal,nt=this.verticalGap,i=this.spacing,ft=y-c-e,it=0,p=0,rt=this.container,w,b,l,t,r,u,g,v;for(this.set&&this.set.remove(),w=rt.set(),this.set=w,b=rt.set(),w.push(b),l=this.entries,r=0;r<l.length;r++)t=l[r].getBBox(),u=t.width,u>it&&(it=u),t=t.height,t>p&&(p=t);var u=p=0,k=s,d=0,a=0;for(r=0;r<l.length;r++)g=l[r],this.reversedOrder&&(g=l[l.length-r-1]),t=g.getBBox(),this.equalWidths?v=u*(it+i+this.markerLabelGap):(v=k,k=k+t.width+s+i),v+t.width>ft&&0<r&&0!==u&&(p++,v=u=0,k=v+t.width+s+i,d=d+a+nt,a=0),t.height>a&&(a=t.height),g.translate(v,d),u++,!isNaN(h)&&u>=h&&(u=0,p++,d=d+a+nt,k=s,a=0),b.push(g);t=b.getBBox();h=t.height+2*nt-1;"left"==f||"right"==f?(i=t.width+2*s,y=i+e+c,tt.style.width=y+"px",this.ieW=y):i=y-e-c-1;c=n.polygon(this.container,[0,i,i,0],[0,0,h,h],this.backgroundColor,this.backgroundAlpha,1,this.borderColor,this.borderAlpha);n.setCN(this.chart,c,"legend-bg");w.push(c);w.translate(e,o);c.toBack();e=s;("top"==f||"bottom"==f||"absolute"==f||"outside"==f)&&("center"==this.align?e=s+(i-t.width)/2:"right"==this.align&&(e=s+i-t.width));b.translate(e,nt+1);this.titleHeight>h&&(h=this.titleHeight);o=h+o+ut+1;0>o&&(o=0);"absolute"!=f&&"outside"!=f&&o>this.chart.divRealHeight&&(tt.style.top="0px");tt.style.height=Math.round(o)+"px";rt.setSize(this.divWidth,o)},createEntry:function(t){var f,b,s,l,u,y,d,h,a;if(!1!==t.visibleInLegend&&!t.hideFromLegend){var i=this,e=i.chart,v=i.useGraphSettings,p=t.markerType;p&&(v=!1);t.legendEntryWidth=i.markerSize;p||(p=i.markerType);f=t.color;b=t.alpha;t.legendKeyColor&&(f=t.legendKeyColor());t.legendKeyAlpha&&(b=t.legendKeyAlpha());!0===t.hidden&&(s=f=i.markerDisabledColor);l=t.pattern;y=t.customMarker;y||(y=i.customMarker);var o=i.container,r=i.markerSize,c=0,k=0,w=r/2;v?(v=t.type,i.switchType=void 0,"line"==v||"step"==v||"smoothedLine"==v||"ohlc"==v?(u=o.set(),t.hidden||(f=t.lineColorR,s=t.bulletBorderColorR),c=n.line(o,[0,2*r],[r/2,r/2],f,t.lineAlpha,t.lineThickness,t.dashLength),n.setCN(e,c,"graph-stroke"),u.push(c),t.bullet&&(t.hidden||(f=t.bulletColorR),c=n.bullet(o,t.bullet,t.bulletSize,f,t.bulletAlpha,t.bulletBorderThickness,s,t.bulletBorderAlpha))&&(n.setCN(e,c,"graph-bullet"),c.translate(r+1,r/2),u.push(c)),w=0,c=r,k=r/3):(t.getGradRotation&&(u=t.getGradRotation(),0===u&&(u=180)),c=t.fillColorsR,!0===t.hidden&&(c=f),(u=i.createMarker("rectangle",c,t.fillAlphas,t.lineThickness,f,t.lineAlpha,u,l,t.dashLength))&&(w=r,u.translate(w,r/2)),c=r),n.setCN(e,u,"graph-"+v),n.setCN(e,u,"graph-"+t.id)):y?u=o.image(y,0,0,r,r):(isNaN(i.gradientRotation)||(d=180+i.gradientRotation),(u=i.createMarker(p,f,b,void 0,void 0,void 0,d,l))&&u.translate(r/2,r/2));n.setCN(e,u,"legend-marker");i.addListeners(u,t);o=o.set([u]);i.switchable&&t.switchable&&o.setAttr("cursor","pointer");void 0!==t.id&&n.setCN(e,o,"legend-item-"+t.id);n.setCN(e,o,t.className,!0);s=i.switchType;s&&"none"!=s&&0<r&&("x"==s?(h=i.createX(),h.translate(r/2,r/2)):h=i.createV(),h.dItem=t,!0!==t.hidden?"x"==s?h.hide():h.show():"x"!=s&&h.hide(),i.switchable||h.hide(),i.addListeners(h,t),t.legendSwitch=h,o.push(h),n.setCN(e,h,"legend-switch"));s=i.color;t.showBalloon&&i.textClickEnabled&&void 0!==i.selectedColor&&(s=i.selectedColor);i.useMarkerColorForLabels&&!l&&(s=f);!0===t.hidden&&(s=i.markerDisabledColor);f=n.massReplace(i.labelText,{"[[title]]":t.title});void 0!==i.tabIndex&&(o.setAttr("tabindex",i.tabIndex),o.setAttr("role","menuitem"),o.keyup(function(n){13==n.keyCode&&i.clickMarker(t,n)}));e.accessible&&i.accessibleLabel&&(l=n.massReplace(i.accessibleLabel,{"[[title]]":t.title}),e.makeAccessible(o,l));l=i.fontSize;u&&(r<=l&&(r=r/2+i.ly-l/2+(l+2-r)/2-k,u.translate(w,r),h&&h.translate(h.x,r)),t.legendEntryWidth=u.getBBox().width);f&&(f=n.fixBrakes(f),t.legendTextReal=f,a=i.labelWidth,a=isNaN(a)?n.text(i.container,f,s,e.fontFamily,l,"start"):n.wrappedText(i.container,f,s,e.fontFamily,l,"start",!1,a,0),n.setCN(e,a,"legend-label"),a.translate(i.lx+c,i.ly),o.push(a),i.labelDx=c,e=a.getBBox().width,i.maxLabelWidth<e&&(i.maxLabelWidth=e));i.entries[i.index]=o;t.legendEntry=i.entries[i.index];t.legendMarker=u;t.legendLabel=a;i.index++}},addListeners:function(n,t){var i=this;n&&n.mouseover(function(n){i.rollOverMarker(t,n)}).mouseout(function(n){i.rollOutMarker(t,n)}).click(function(n){i.clickMarker(t,n)})},rollOverMarker:function(n,t){this.switchable&&this.dispatch("rollOverMarker",n,t);this.dispatch("rollOverItem",n,t)},rollOutMarker:function(n,t){this.switchable&&this.dispatch("rollOutMarker",n,t);this.dispatch("rollOutItem",n,t)},clickMarker:function(n,t){this.switchable&&(!0===n.hidden?this.dispatch("showItem",n,t):this.dispatch("hideItem",n,t));this.dispatch("clickMarker",n,t)},rollOverLabel:function(n,t){n.hidden||this.textClickEnabled&&n.legendLabel&&n.legendLabel.attr({fill:this.rollOverColor});this.dispatch("rollOverItem",n,t)},rollOutLabel:function(n,t){if(!n.hidden&&this.textClickEnabled&&n.legendLabel){var i=this.color;void 0!==this.selectedColor&&n.showBalloon&&(i=this.selectedColor);this.useMarkerColorForLabels&&(i=n.lineColor,void 0===i&&(i=n.color));n.legendLabel.attr({fill:i})}this.dispatch("rollOutItem",n,t)},clickLabel:function(n,t){this.textClickEnabled?n.hidden||this.dispatch("clickLabel",n,t):this.switchable&&(!0===n.hidden?this.dispatch("showItem",n,t):this.dispatch("hideItem",n,t))},dispatch:function(n,t,i){n={type:n,dataItem:t,target:this,event:i,chart:this.chart};this.chart&&this.chart.handleLegendEvent(n);this.fire(n)},createValue:function(t){var i=this,r=i.fontSize,o=i.chart,u,f,s;if(!1!==t.visibleInLegend&&!t.hideFromLegend){u=i.maxLabelWidth;f=0;i.forceWidth&&(u=i.labelWidth);i.equalWidths||(i.valueAlign="left");f={x:0,y:0,width:0,height:0};t.legendLabel&&(f=t.legendLabel.getBBox());"left"==i.valueAlign&&(u=f.width);var f=f.height,h=u,e=i.markerSize;if(e<r+7&&(e=r+7,n.VML&&(e+=3)),i.valueText&&0<i.valueWidth){s=i.color;i.useMarkerColorForValues&&(s=t.color,t.legendKeyColor&&(s=t.legendKeyColor()));!0===t.hidden&&(s=i.markerDisabledColor);var l=i.valueText,u=u+i.lx+i.labelDx+i.markerLabelGap+i.valueWidth,c="end";"left"==i.valueAlign&&(u-=i.valueWidth,c="start");r=n.text(i.container,l,s,i.chart.fontFamily,r,c);n.setCN(o,r,"legend-value");r.translate(u,i.ly);i.entries[i.index].push(r);h+=i.valueWidth+2*i.markerLabelGap;r.dItem=t;i.valueLabels.push(r);e<f+5&&(e=f+5)}i.index++;o=i.container.rect(t.legendEntryWidth,0,h,e,0,0).attr({stroke:"none",fill:"#fff","fill-opacity":.005});o.dItem=t;i.entries[i.index-1].push(o);o.mouseover(function(n){i.rollOverLabel(t,n)}).mouseout(function(n){i.rollOutLabel(t,n)}).click(function(n){i.clickLabel(t,n)})}},createV:function(){var t=this.markerSize;return n.polygon(this.container,[t/5,t/2,t-t/5,t/2],[t/3,t-t/5,t/5,t/1.7],this.switchColor)},createX:function(){var t=(this.markerSize-4)/2,i={stroke:this.switchColor,"stroke-width":3},r=this.container,u=n.line(r,[-t,t],[-t,t]).attr(i),t=n.line(r,[-t,t],[t,-t]).attr(i);return this.container.set([u,t])},createMarker:function(t,i,r,u,f,e,o,s,h){var c=this.markerSize,l=this.container;return f||(f=this.markerBorderColor),f||(f=i),isNaN(u)&&(u=this.markerBorderThickness),isNaN(e)&&(e=this.markerBorderAlpha),n.bullet(l,t,c,i,r,u,f,e,c,o,s,this.chart.path,h)},validateNow:function(){this.invalidateSize()},updateValues:function(){var h=this.valueLabels,o=this.chart,s,l=this.data,i,t,r,u,f,c,e;if(h)for(s=0;s<h.length;s++)i=h[s],t=i.dItem,t.periodDataItem=void 0,t.periodPercentDataItem=void 0,r=" ",l?t.value?i.text(t.value):i.text(""):(u=null,void 0!==t.type?(u=t.currentDataItem,f=this.periodValueText,t.legendPeriodValueText&&(f=t.legendPeriodValueText),t.legendPeriodValueTextR&&(f=t.legendPeriodValueTextR),u?(r=this.valueText,t.legendValueText&&(r=t.legendValueText),t.legendValueTextR&&(r=t.legendValueTextR),r=o.formatString(r,u)):f&&o.formatPeriodString&&(f=n.massReplace(f,{"[[title]]":t.title}),r=o.formatPeriodString(f,t))):r=o.formatString(this.valueText,t),f=t,u&&(f=u),c=this.valueFunction,c&&(r=c(f,r,o.periodDataItem)),this.useMarkerColorForLabels&&!u&&t.lastDataItem&&(u=t.lastDataItem),u?e=o.getBalloonColor(t,u):t.legendKeyColor&&(e=t.legendKeyColor()),t.legendColorFunction&&(e=t.legendColorFunction(f,r,t.periodDataItem,t.periodPercentDataItem)),i.text(r),!t.pattern&&(this.useMarkerColorForValues&&i.setAttr("fill",e),this.useMarkerColorForLabels)&&((i=t.legendMarker)&&(i.setAttr("fill",e),i.setAttr("stroke",e)),(i=t.legendLabel)&&(t.hidden?i.setAttr("fill",this.markerDisabledColor):i.setAttr("fill",e))))},renderFix:function(){if(!n.VML&&this.enabled){var t=this.container;t&&t.renderFix()}},destroy:function(){this.div.innerHTML="";n.remove(this.set)}})}(),function(){var n=window.AmCharts;n.formatMilliseconds=function(n,t){if(-1!=n.indexOf("fff")){var i=t.getMilliseconds(),r=String(i);10>i&&(r="00"+i);10<=i&&100>i&&(r="0"+i);n=n.replace(/fff/g,r)}return n};n.extractPeriod=function(t){var i=n.stripNumbers(t),r=1;return i!=t&&(r=Number(t.slice(0,t.indexOf(i)))),{period:i,count:r}};n.getDate=function(t,i,r){return t instanceof Date?n.newDate(t,r):i&&isNaN(t)?n.stringToDate(t,i):new Date(t)};n.daysInMonth=function(n){return new Date(n.getYear(),n.getMonth()+1,0).getDate()};n.newDate=function(n,t){return t&&-1==t.indexOf("fff")?new Date(n):new Date(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds())};n.resetDateToMin=function(t,i,r,u){void 0===u&&(u=1);var l,c,h,s,o,e,f;n.useUTC?(l=t.getUTCFullYear(),c=t.getUTCMonth(),h=t.getUTCDate(),s=t.getUTCHours(),o=t.getUTCMinutes(),e=t.getUTCSeconds(),f=t.getUTCMilliseconds(),t=t.getUTCDay()):(l=t.getFullYear(),c=t.getMonth(),h=t.getDate(),s=t.getHours(),o=t.getMinutes(),e=t.getSeconds(),f=t.getMilliseconds(),t=t.getDay());switch(i){case"YYYY":l=Math.floor(l/r)*r;c=0;h=1;f=e=o=s=0;break;case"MM":c=Math.floor(c/r)*r;h=1;f=e=o=s=0;break;case"WW":h=t>=u?h-t+u:h-(7+t)+u;f=e=o=s=0;break;case"DD":f=e=o=s=0;break;case"hh":s=Math.floor(s/r)*r;f=e=o=0;break;case"mm":o=Math.floor(o/r)*r;f=e=0;break;case"ss":e=Math.floor(e/r)*r;f=0;break;case"fff":f=Math.floor(f/r)*r}return n.useUTC?(t=new Date,t.setUTCFullYear(l,c,h),t.setUTCHours(s,o,e,f)):t=new Date(l,c,h,s,o,e,f),t};n.getPeriodDuration=function(n,t){void 0===t&&(t=1);var i;switch(n){case"YYYY":i=316224e5;break;case"MM":i=26784e5;break;case"WW":i=6048e5;break;case"DD":i=864e5;break;case"hh":i=36e5;break;case"mm":i=6e4;break;case"ss":i=1e3;break;case"fff":i=1}return i*t};n.intervals={s:{nextInterval:"ss",contains:1e3},ss:{nextInterval:"mm",contains:60,count:0},mm:{nextInterval:"hh",contains:60,count:1},hh:{nextInterval:"DD",contains:24,count:2},DD:{nextInterval:"",contains:Infinity,count:3}};n.getMaxInterval=function(t,i){var r=n.intervals;return t>=r[i].contains?(t=Math.round(t/r[i].contains),i=r[i].nextInterval,n.getMaxInterval(t,i)):"ss"==i?r[i].nextInterval:i};n.dayNames="Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" ");n.shortDayNames="Sun Mon Tue Wed Thu Fri Sat".split(" ");n.monthNames="January February March April May June July August September October November December".split(" ");n.shortMonthNames="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" ");n.getWeekNumber=function(n){n=new Date(n);n.setHours(0,0,0);n.setDate(n.getDate()+4-(n.getDay()||7));var t=new Date(n.getFullYear(),0,1);return Math.ceil(((n-t)/864e5+1)/7)};n.stringToDate=function(t,i){var r={},u=[{pattern:"YYYY",period:"year"},{pattern:"YY",period:"year"},{pattern:"MM",period:"month"},{pattern:"M",period:"month"},{pattern:"DD",period:"date"},{pattern:"D",period:"date"},{pattern:"JJ",period:"hours"},{pattern:"J",period:"hours"},{pattern:"HH",period:"hours"},{pattern:"H",period:"hours"},{pattern:"KK",period:"hours"},{pattern:"K",period:"hours"},{pattern:"LL",period:"hours"},{pattern:"L",period:"hours"},{pattern:"NN",period:"minutes"},{pattern:"N",period:"minutes"},{pattern:"SS",period:"seconds"},{pattern:"S",period:"seconds"},{pattern:"QQQ",period:"milliseconds"},{pattern:"QQ",period:"milliseconds"},{pattern:"Q",period:"milliseconds"}],c=!0,s=i.indexOf("AA"),e,o,f,h;for(-1!=s&&(t.substr(s,2),"pm"==t.toLowerCase&&(c=!1)),s=i,f=0;f<u.length;f++)o=u[f].period,r[o]=0,"date"==o&&(r[o]=1);for(f=0;f<u.length;f++)(e=u[f].pattern,o=u[f].period,-1!=i.indexOf(e))&&(h=n.getFromDateString(e,t,s),i=i.replace(e,""),("KK"==e||"K"==e||"LL"==e||"L"==e)&&(c||(h+=12)),r[o]=h);return n.useUTC?(u=new Date,u.setUTCFullYear(r.year,r.month,r.date),u.setUTCHours(r.hours,r.minutes,r.seconds,r.milliseconds)):u=new Date(r.year,r.month,r.date,r.hours,r.minutes,r.seconds,r.milliseconds),u};n.getFromDateString=function(n,t,i){if(void 0!==t)return i=i.indexOf(n),t=String(t),t=t.substr(i,n.length),"0"==t.charAt(0)&&(t=t.substr(1,t.length-1)),t=Number(t),isNaN(t)&&(t=0),-1!=n.indexOf("M")&&t--,t};n.formatDate=function(t,i,r){var s,l,c,v,a,e,o,y,h,p,w,u,f;return r||(r=n),h=n.getWeekNumber(t),n.useUTC?(s=t.getUTCFullYear(),l=t.getUTCMonth(),c=t.getUTCDate(),v=t.getUTCDay(),a=t.getUTCHours(),e=t.getUTCMinutes(),o=t.getUTCSeconds(),y=t.getUTCMilliseconds()):(s=t.getFullYear(),l=t.getMonth(),c=t.getDate(),v=t.getDay(),a=t.getHours(),e=t.getMinutes(),o=t.getSeconds(),y=t.getMilliseconds()),p=String(s).substr(2,2),w="0"+v,i=i.replace(/W/g,h),h=a,24==h&&(h=0),u=h,10>u&&(u="0"+u),i=i.replace(/JJ/g,u),i=i.replace(/J/g,h),u=a,0===u&&(u=24,-1!=i.indexOf("H")&&(c--,0===c&&(s=new Date(t),s.setDate(s.getDate()-1),l=s.getMonth(),c=s.getDate(),s=s.getFullYear()))),t=l+1,9>l&&(t="0"+t),h=c,10>c&&(h="0"+c),f=u,10>f&&(f="0"+f),i=i.replace(/HH/g,f),i=i.replace(/H/g,u),u=a,11<u&&(u-=12),f=u,10>f&&(f="0"+f),i=i.replace(/KK/g,f),i=i.replace(/K/g,u),u=a,0===u&&(u=12),12<u&&(u-=12),f=u,10>f&&(f="0"+f),i=i.replace(/LL/g,f),i=i.replace(/L/g,u),u=e,10>u&&(u="0"+u),i=i.replace(/NN/g,u),i=i.replace(/N/g,e),e=o,10>e&&(e="0"+e),i=i.replace(/SS/g,e),i=i.replace(/S/g,o),o=y,10>o?o="00"+o:100>o&&(o="0"+o),e=y,10>e&&(e="00"+e),i=i.replace(/A/g,"@A@"),i=i.replace(/QQQ/g,o),i=i.replace(/QQ/g,e),i=i.replace(/Q/g,y),i=i.replace(/YYYY/g,"@IIII@"),i=i.replace(/YY/g,"@II@"),i=i.replace(/MMMM/g,"@XXXX@"),i=i.replace(/MMM/g,"@XXX@"),i=i.replace(/MM/g,"@XX@"),i=i.replace(/M/g,"@X@"),i=i.replace(/DD/g,"@RR@"),i=i.replace(/D/g,"@R@"),i=i.replace(/EEEE/g,"@PPPP@"),i=i.replace(/EEE/g,"@PPP@"),i=i.replace(/EE/g,"@PP@"),i=i.replace(/E/g,"@P@"),i=i.replace(/@IIII@/g,s),i=i.replace(/@II@/g,p),i=i.replace(/@XXXX@/g,r.monthNames[l]),i=i.replace(/@XXX@/g,r.shortMonthNames[l]),i=i.replace(/@XX@/g,t),i=i.replace(/@X@/g,l+1),i=i.replace(/@RR@/g,h),i=i.replace(/@R@/g,c),i=i.replace(/@PPPP@/g,r.dayNames[v]),i=i.replace(/@PPP@/g,r.shortDayNames[v]),i=i.replace(/@PP@/g,w),i=i.replace(/@P@/g,v),12>a?i.replace(/@A@/g,r.amString):i.replace(/@A@/g,r.pmString)};n.changeDate=function(t,i,r,u,f){var e,o,s;if(n.useUTC)return n.changeUTCDate(t,i,r,u,f);e=-1;void 0===u&&(u=!0);void 0===f&&(f=!1);!0===u&&(e=1);switch(i){case"YYYY":t.setFullYear(t.getFullYear()+r*e);u||f||t.setDate(t.getDate()+1);break;case"MM":if(i=t.getMonth(),o=t.getFullYear(),t.setMonth(i+r*e),s=t.getMonth(),u&&s-i>r)for(;t.getMonth()-i>r;)t.setDate(t.getDate()-1);o==t.getFullYear()&&t.getMonth()>i+r*e&&t.setDate(t.getDate()-1);u||f||t.setDate(t.getDate()+1);break;case"DD":t.setDate(t.getDate()+r*e);break;case"WW":t.setDate(t.getDate()+r*e*7);break;case"hh":t.setHours(t.getHours()+r*e);break;case"mm":t.setMinutes(t.getMinutes()+r*e);break;case"ss":t.setSeconds(t.getSeconds()+r*e);break;case"fff":t.setMilliseconds(t.getMilliseconds()+r*e)}return t};n.changeUTCDate=function(n,t,i,r,u){var f=-1;void 0===r&&(r=!0);void 0===u&&(u=!1);!0===r&&(f=1);switch(t){case"YYYY":n.setUTCFullYear(n.getUTCFullYear()+i*f);r||u||n.setUTCDate(n.getUTCDate()+1);break;case"MM":t=n.getUTCMonth();n.setUTCMonth(n.getUTCMonth()+i*f);n.getUTCMonth()>t+i*f&&n.setUTCDate(n.getUTCDate()-1);r||u||n.setUTCDate(n.getUTCDate()+1);break;case"DD":n.setUTCDate(n.getUTCDate()+i*f);break;case"WW":n.setUTCDate(n.getUTCDate()+i*f*7);break;case"hh":n.setUTCHours(n.getUTCHours()+i*f);break;case"mm":n.setUTCMinutes(n.getUTCMinutes()+i*f);break;case"ss":n.setUTCSeconds(n.getUTCSeconds()+i*f);break;case"fff":n.setUTCMilliseconds(n.getUTCMilliseconds()+i*f)}return n}}(),function(){var n=window.AmCharts;n.AmRectangularChart=n.Class({inherits:n.AmCoordinateChart,construct:function(t){n.AmRectangularChart.base.construct.call(this,t);this.theme=t;this.createEvents("zoomed","changed");this.marginRight=this.marginBottom=this.marginTop=this.marginLeft=20;this.depth3D=this.angle=0;this.plotAreaFillColors="#FFFFFF";this.plotAreaFillAlphas=0;this.plotAreaBorderColor="#000000";this.plotAreaBorderAlpha=0;this.maxZoomFactor=20;this.zoomOutButtonImageSize=19;this.zoomOutButtonImage="lens";this.zoomOutText="Show all";this.zoomOutButtonColor="#e5e5e5";this.zoomOutButtonAlpha=0;this.zoomOutButtonRollOverAlpha=1;this.zoomOutButtonPadding=8;this.trendLines=[];this.autoMargins=!0;this.marginsUpdated=!1;this.autoMarginOffset=10;n.applyTheme(this,t,"AmRectangularChart")},initChart:function(){n.AmRectangularChart.base.initChart.call(this);this.updateDxy();!this.marginsUpdated&&this.autoMargins&&(this.resetMargins(),this.drawGraphs=!1);this.processScrollbars();this.updateMargins();this.updatePlotArea();this.updateScrollbars();this.updateTrendLines();this.updateChartCursor();this.updateValueAxes();this.scrollbarOnly||this.updateGraphs()},drawChart:function(){if(n.AmRectangularChart.base.drawChart.call(this),this.drawPlotArea(),n.ifArray(this.chartData)){var t=this.chartCursor;t&&t.draw()}},resetMargins:function(){var i={},n,t,r,u;if("xy"==this.type){for(t=this.xAxes,r=this.yAxes,n=0;n<t.length;n++)u=t[n],u.ignoreAxisWidth||(u.setOrientation(!0),u.fixAxisPosition(),i[u.position]=!0);for(n=0;n<r.length;n++)t=r[n],t.ignoreAxisWidth||(t.setOrientation(!1),t.fixAxisPosition(),i[t.position]=!0)}else{for(r=this.valueAxes,n=0;n<r.length;n++)t=r[n],t.ignoreAxisWidth||(t.setOrientation(this.rotate),t.fixAxisPosition(),i[t.position]=!0);(n=this.categoryAxis)&&!n.ignoreAxisWidth&&(n.setOrientation(!this.rotate),n.fixAxisPosition(),n.fixAxisPosition(),i[n.position]=!0)}i.left&&(this.marginLeft=0);i.right&&(this.marginRight=0);i.top&&(this.marginTop=0);i.bottom&&(this.marginBottom=0);this.fixMargins=i},measureMargins:function(){for(var f=this.valueAxes,t=this.autoMarginOffset,o=this.fixMargins,s=this.realWidth,h=this.realHeight,i=t,r=t,u=s,n=h,e=0;e<f.length;e++)f[e].handleSynchronization(),n=this.getAxisBounds(f[e],i,u,r,n),i=Math.round(n.l),u=Math.round(n.r),r=Math.round(n.t),n=Math.round(n.b);(f=this.categoryAxis)&&(n=this.getAxisBounds(f,i,u,r,n),i=Math.round(n.l),u=Math.round(n.r),r=Math.round(n.t),n=Math.round(n.b));o.left&&i<t&&(this.marginLeft=Math.round(-i+t),!isNaN(this.minMarginLeft)&&this.marginLeft<this.minMarginLeft&&(this.marginLeft=this.minMarginLeft));o.right&&u>=s-t&&(this.marginRight=Math.round(u-s+t),!isNaN(this.minMarginRight)&&this.marginRight<this.minMarginRight&&(this.marginRight=this.minMarginRight));o.top&&r<t+this.titleHeight&&(this.marginTop=Math.round(this.marginTop-r+t+this.titleHeight),!isNaN(this.minMarginTop)&&this.marginTop<this.minMarginTop&&(this.marginTop=this.minMarginTop));o.bottom&&n>h-t&&(this.marginBottom=Math.round(this.marginBottom+n-h+t),!isNaN(this.minMarginBottom)&&this.marginBottom<this.minMarginBottom&&(this.marginBottom=this.minMarginBottom));this.initChart()},getAxisBounds:function(n,t,i,r,u){if(!n.ignoreAxisWidth){var f=n.labelsSet,e=n.tickLength;if(n.inside&&(e=0),f)switch(f=n.getBBox(),n.position){case"top":n=f.y;r>n&&(r=n);break;case"bottom":n=f.y+f.height;u<n&&(u=n);break;case"right":n=f.x+f.width+e+3;i<n&&(i=n);break;case"left":n=f.x-e;t>n&&(t=n)}}return{l:t,t:r,r:i,b:u}},drawZoomOutButton:function(){var t=this,r,i,u,o;if(!t.zbSet){r=t.container.set();t.zoomButtonSet.push(r);var f=t.color,h=t.fontSize,a=t.zoomOutButtonImageSize,l=t.zoomOutButtonImage.replace(/\.[a-z]*$/i,""),v=t.langObj.zoomOutText||t.zoomOutText,e=t.zoomOutButtonColor,c=t.zoomOutButtonAlpha,i=t.zoomOutButtonFontSize,s=t.zoomOutButtonPadding;for(isNaN(i)||(h=i),(i=t.zoomOutButtonFontColor)&&(f=i),i=t.zoomOutButton,i&&(i.fontSize&&(h=i.fontSize),i.color&&(f=i.color),i.backgroundColor&&(e=i.backgroundColor),isNaN(i.backgroundAlpha)||(t.zoomOutButtonRollOverAlpha=i.backgroundAlpha)),o=i=0,o=t.pathToImages,l&&((n.isAbsolute(l)||void 0===o)&&(o=""),u=t.container.image(o+l+t.extension,0,0,a,a),n.setCN(t,u,"zoom-out-image"),r.push(u),u=u.getBBox(),i=u.width+5),void 0!==v&&(f=n.text(t.container,v,f,t.fontFamily,h,"start"),n.setCN(t,f,"zoom-out-label"),h=f.getBBox(),o=u?u.height/2-3:h.height/2,f.translate(i,o),r.push(f)),u=r.getBBox(),f=1,n.isModern||(f=0),e=n.rect(t.container,u.width+2*s+5,u.height+2*s-2,e,1,1,e,f),e.setAttr("opacity",c),e.translate(-s,-s),n.setCN(t,e,"zoom-out-bg"),r.push(e),e.toBack(),t.zbBG=e,u=e.getBBox(),r.translate(t.marginLeftReal+t.plotAreaWidth-u.width+s,t.marginTopReal+s),r.hide(),r.mouseover(function(){t.rollOverZB()}).mouseout(function(){t.rollOutZB()}).click(function(){t.clickZB()}).touchstart(function(){t.rollOverZB()}).touchend(function(){t.rollOutZB();t.clickZB()}),c=0;c<r.length;c++)r[c].attr({cursor:"pointer"});void 0!==t.zoomOutButtonTabIndex&&(r.setAttr("tabindex",t.zoomOutButtonTabIndex),r.setAttr("role","menuitem"),r.keyup(function(n){13==n.keyCode&&t.clickZB()}));t.zbSet=r}},rollOverZB:function(){this.rolledOverZB=!0;this.zbBG.setAttr("opacity",this.zoomOutButtonRollOverAlpha)},rollOutZB:function(){this.rolledOverZB=!1;this.zbBG.setAttr("opacity",this.zoomOutButtonAlpha)},clickZB:function(){this.rolledOverZB=!1;this.zoomOut()},zoomOut:function(){this.zoomOutValueAxes()},drawPlotArea:function(){var i=this.dx,u=this.dy,e=this.marginLeftReal,s=this.marginTopReal,r=this.plotAreaWidth-1,o=this.plotAreaHeight-1,t=this.plotAreaFillColors,f=this.plotAreaFillAlphas,h=this.plotAreaBorderColor,c=this.plotAreaBorderAlpha;"object"==typeof f&&(f=f[0]);t=n.polygon(this.container,[0,r,r,0,0],[0,0,o,o,0],t,f,1,h,c,this.plotAreaGradientAngle);n.setCN(this,t,"plot-area");t.translate(e+i,s+u);this.set.push(t);0!==i&&0!==u&&(t=this.plotAreaFillColors,"object"==typeof t&&(t=t[0]),t=n.adjustLuminosity(t,-.15),r=n.polygon(this.container,[0,i,r+i,r,0],[0,u,u,0,0],t,f,1,h,c),n.setCN(this,r,"plot-area-bottom"),r.translate(e,s+o),this.set.push(r),i=n.polygon(this.container,[0,0,i,i,0],[0,o,o+u,u,0],t,f,1,h,c),n.setCN(this,i,"plot-area-left"),i.translate(e,s),this.set.push(i));(e=this.bbset)&&this.scrollbarOnly&&e.remove()},updatePlotArea:function(){var n=this.updateWidth(),t=this.updateHeight(),i=this.container;this.realWidth=n;this.realWidth=t;i&&this.container.setSize(n,t);var i=this.marginLeftReal,r=this.marginTopReal,n=n-i-this.marginRightReal-this.dx,t=t-r-this.marginBottomReal;1>n&&(n=1);1>t&&(t=1);this.plotAreaWidth=Math.round(n);this.plotAreaHeight=Math.round(t);this.plotBalloonsSet.translate(i,r)},updateDxy:function(){this.dx=Math.round(this.depth3D*Math.cos(this.angle*Math.PI/180));this.dy=Math.round(-this.depth3D*Math.sin(this.angle*Math.PI/180));this.d3x=Math.round(this.columnSpacing3D*Math.cos(this.angle*Math.PI/180));this.d3y=Math.round(-this.columnSpacing3D*Math.sin(this.angle*Math.PI/180))},updateMargins:function(){var n=this.getTitleHeight();this.titleHeight=n;this.marginTopReal=this.marginTop-this.dy;this.fixMargins&&!this.fixMargins.top&&(this.marginTopReal+=n);this.marginBottomReal=this.marginBottom;this.marginLeftReal=this.marginLeft;this.marginRightReal=this.marginRight},updateValueAxes:function(){for(var i=this.valueAxes,t,n=0;n<i.length;n++)t=i[n],this.setAxisRenderers(t),this.updateObjectSize(t)},setAxisRenderers:function(t){t.axisRenderer=n.RecAxis;t.guideFillRenderer=n.RecFill;t.axisItemRenderer=n.RecItem;t.marginsChanged=!0},updateGraphs:function(){for(var i=this.graphs,t,n=0;n<i.length;n++)t=i[n],t.index=n,t.rotate=this.rotate,this.updateObjectSize(t)},updateObjectSize:function(n){n.width=this.plotAreaWidth-1;n.height=this.plotAreaHeight-1;n.x=this.marginLeftReal;n.y=this.marginTopReal;n.dx=this.dx;n.dy=this.dy},updateChartCursor:function(){var t=this.chartCursor;t&&(t=n.processObject(t,n.ChartCursor,this.theme),this.updateObjectSize(t),this.addChartCursor(t),t.chart=this)},processScrollbars:function(){var t=this.chartScrollbar;t&&(t=n.processObject(t,n.ChartScrollbar,this.theme),this.addChartScrollbar(t))},updateScrollbars:function(){},removeChartCursor:function(){n.callMethod("destroy",[this.chartCursor]);this.chartCursor=null},zoomTrendLines:function(){for(var i=this.trendLines,n,t=0;t<i.length;t++)n=i[t],n.valueAxis.recalculateToPercents?n.set&&n.set.hide():(n.x=this.marginLeftReal,n.y=this.marginTopReal,n.draw())},handleCursorValueZoom:function(){},addTrendLine:function(n){this.trendLines.push(n)},zoomOutValueAxes:function(){for(var t=this.valueAxes,n=0;n<t.length;n++)t[n].zoomOut()},removeTrendLine:function(n){for(var i=this.trendLines,t=i.length-1;0<=t;t--)i[t]==n&&i.splice(t,1)},adjustMargins:function(n,t){var r=n.position,i=n.scrollbarHeight+n.offset;n.enabled&&("top"==r?t?this.marginLeftReal+=i:this.marginTopReal+=i:t?this.marginRightReal+=i:this.marginBottomReal+=i)},getScrollbarPosition:function(n,t,i){var r="bottom",u="top";n.oppositeAxis||(u=r,r="top");n.position=t?"bottom"==i||"left"==i?r:u:"top"==i||"right"==i?r:u},updateChartScrollbar:function(n,t){if(n){n.rotate=t;var i=this.marginTopReal,u=this.marginLeftReal,f=n.scrollbarHeight,e=this.dx,o=this.dy,r=n.offset;"top"==n.position?t?(n.y=i,n.x=u-f-r):(n.y=i-f+o-r,n.x=u+e):t?(n.y=i+o,n.x=u+this.plotAreaWidth+e+r):(n.y=i+this.plotAreaHeight+r,n.x=this.marginLeftReal)}},showZB:function(n){var t=this.zbSet;n&&(t=this.zoomOutText,""!==t&&t&&this.drawZoomOutButton());(t=this.zbSet)&&(this.zoomButtonSet.push(t),n?t.show():t.hide(),this.rollOutZB())},handleReleaseOutside:function(t){n.AmRectangularChart.base.handleReleaseOutside.call(this,t);(t=this.chartCursor)&&t.handleReleaseOutside&&t.handleReleaseOutside()},handleMouseDown:function(t){n.AmRectangularChart.base.handleMouseDown.call(this,t);var i=this.chartCursor;i&&i.handleMouseDown&&!this.rolledOverZB&&i.handleMouseDown(t)},update:function(){n.AmRectangularChart.base.update.call(this);this.chartCursor&&this.chartCursor.update&&this.chartCursor.update()},handleScrollbarValueZoom:function(n){this.relativeZoomValueAxes(n.target.valueAxes,n.relativeStart,n.relativeEnd);this.zoomAxesAndGraphs()},zoomValueScrollbar:function(n){if(n&&n.enabled){var t=n.valueAxes[0],i=t.relativeStart,r=t.relativeEnd;t.reversed&&(r=1-i,i=1-t.relativeEnd);n.percentZoom(i,r)}},zoomAxesAndGraphs:function(){if(!this.scrollbarOnly){for(var t=this.valueAxes,n=0;n<t.length;n++)t[n].zoom(this.start,this.end);for(t=this.graphs,n=0;n<t.length;n++)t[n].zoom(this.start,this.end);(n=this.chartCursor)&&n.clearSelection();this.zoomTrendLines()}},handleValueAxisZoomReal:function(n,t){var i=n.relativeStart,r=n.relativeEnd;if(i>r)var u=i,i=r,r=u;this.relativeZoomValueAxes(t,i,r);this.updateAfterValueZoom()},updateAfterValueZoom:function(){this.zoomAxesAndGraphs();this.zoomScrollbar()},relativeZoomValueAxes:function(t,i,r){var u,f,e;if(this.hideBalloonReal(),i=n.fitToBounds(i,0,1),r=n.fitToBounds(r,0,1),i>r&&(u=i,i=r,r=u),u=1/this.maxZoomFactor,f=n.getDecimals(u)+4,r-i<u&&(r=i+(r-i)/2,i=r-u/2,r+=u/2,1<r&&(i-=r-1,r=1),0>i&&(i=0,r=u)),i=n.roundTo(i,f),r=n.roundTo(r,f),u=!1,t){for(f=0;f<t.length;f++)e=t[f].zoomToRelativeValues(i,r,!0),e&&(u=e);this.showZB()}return u},addChartCursor:function(t){n.callMethod("destroy",[this.chartCursor]);t&&(this.listenTo(t,"moved",this.handleCursorMove),this.listenTo(t,"zoomed",this.handleCursorZoom),this.listenTo(t,"zoomStarted",this.handleCursorZoomStarted),this.listenTo(t,"panning",this.handleCursorPanning),this.listenTo(t,"onHideCursor",this.handleCursorHide));this.chartCursor=t},handleCursorChange:function(){},handleCursorMove:function(n){for(var r=this.valueAxes,i,t=0;t<r.length;t++)n.panning||(i=r[t],i&&i.showBalloon&&i.showBalloon(n.x,n.y))},handleCursorZoom:function(n){if(this.skipZoomed)this.skipZoomed=!1;else{var t=this.startX0,r=this.endX0,u=this.endY0,i=this.startY0,f=n.startX,e=n.endX,o=n.startY,s=n.endY;this.startX0=this.endX0=this.startY0=this.endY0=NaN;this.handleCursorZoomReal(t+f*(r-t),t+e*(r-t),i+o*(u-i),i+s*(u-i),n)}},handleCursorHide:function(){for(var t=this.valueAxes,n=0;n<t.length;n++)t[n].hideBalloon();for(t=this.graphs,n=0;n<t.length;n++)t[n].hideBalloonReal()}})}(),function(){var n=window.AmCharts;n.AmSerialChart=n.Class({inherits:n.AmRectangularChart,construct:function(t){this.type="serial";n.AmSerialChart.base.construct.call(this,t);this.cname="AmSerialChart";this.theme=t;this.columnSpacing=5;this.columnSpacing3D=0;this.columnWidth=.8;var i=new n.CategoryAxis(t);i.chart=this;this.categoryAxis=i;this.zoomOutOnDataUpdate=!0;this.mouseWheelZoomEnabled=this.mouseWheelScrollEnabled=this.rotate=this.skipZoom=!1;this.minSelectedTime=0;n.applyTheme(this,t,this.cname)},initChart:function(){n.AmSerialChart.base.initChart.call(this);this.updateCategoryAxis(this.categoryAxis,this.rotate,"categoryAxis");this.dataChanged?this.parseData():this.onDataUpdated();this.drawGraphs=!0},onDataUpdated:function(){for(var u=this.countColumns(),n=this.chartData,r=this.graphs,i,t=0;t<r.length;t++)i=r[t],i.data=n,i.columnCount=u;0<n.length&&(this.firstTime=this.getStartTime(n[0].time),this.lastTime=this.getEndTime(n[n.length-1].time));this.drawChart();this.autoMargins&&!this.marginsUpdated?(this.marginsUpdated=!0,this.measureMargins()):this.dispDUpd()},syncGrid:function(){var u,t,i,o,r,f,e;if(this.synchronizeGrid&&(u=this.valueAxes,0<u.length)){for(o=0,i=0;i<u.length;i++)t=u[i],o<t.gridCountReal&&(o=t.gridCountReal);for(r=!1,i=0;i<u.length;i++)(t=u[i],t.gridCountReal<o)&&(f=(o-t.gridCountReal)/2,e=r=f,0!=f-Math.round(f)&&(r-=.5,e+=.5),0<=t.min&&0>t.min-r*t.step&&(e+=r,r=0),0>=t.max&&0<t.max+e*t.step&&(r+=e,e=0),f=n.getDecimals(t.step),t.minimum=n.roundTo(t.min-r*t.step,f),t.maximum=n.roundTo(t.max+e*t.step,f),t.setStep=t.step,r=t.strictMinMax=!0);for(r&&this.updateAfterValueZoom(),i=0;i<u.length;i++)t=u[i],t.minimum=NaN,t.maximum=NaN,t.setStep=NaN,t.strictMinMax=!1}},handleWheelReal:function(n,t){var e,o;if(!this.wheelBusy){var s=this.categoryAxis,u=s.parseDates,r=s.minDuration(),i=1,f=1;this.mouseWheelZoomEnabled?t||(i=-1):t&&(i=-1);o=this.chartCursor;o&&(o.mouseIsOver()?(e=o.mouseX,o=o.mouseY,i!=f&&(e=this.rotate?o/this.plotAreaHeight:e/this.plotAreaWidth,i*=e,f*=1-e),e=.05*(this.end-this.start),u&&(e=.05*(this.endTime-this.startTime)/r),1>e&&(e=1),i*=e,f*=e,(!u||s.equalSpacing)&&(i=Math.round(i),f=Math.round(f)),o=this.chartData.length,s=this.lastTime,e=this.firstTime,0>n?u?(o=this.endTime-this.startTime,u=this.startTime+i*r,r=this.endTime+f*r,0<f&&0<i&&r>=s&&(r=s,u=s-o),this.zoomToDates(new Date(u),new Date(r))):(0<f&&0<i&&this.end>=o-1&&(i=f=0),u=this.start+i,r=this.end+f,this.zoomToIndexes(u,r)):u?(o=this.endTime-this.startTime,u=this.startTime-i*r,r=this.endTime-f*r,0<f&&0<i&&u<=e&&(u=e,r=e+o),this.zoomToDates(new Date(u),new Date(r))):(0<f&&0<i&&1>this.start&&(i=f=0),u=this.start-i,r=this.end-f,this.zoomToIndexes(u,r))):this.handleMouseOut())}},validateData:function(t){this.marginsUpdated=!1;this.zoomOutOnDataUpdate&&!t&&(this.endTime=this.end=this.startTime=this.start=NaN);var r=t=!1,u=!1,i=this.chartScrollbar;i&&(i.dragging&&(t=!0,i.handleDragStop()),i.resizingRight&&(u=!0,i.rightDragStop()),i.resizingLeft&&(r=!0,i.leftDragStop()));n.AmSerialChart.base.validateData.call(this);t&&i.handleDragStart();u&&i.rightDragStart();r&&i.leftDragStart()},drawChart:function(){var u,r,t,i;0<this.realWidth&&0<this.realHeight?(n.AmSerialChart.base.drawChart.call(this),u=this.chartData,n.ifArray(u)&&(r=this.chartScrollbar,r&&(this.marginsUpdated||!this.autoMargins)&&r.draw(),(r=this.valueScrollbar)&&r.draw(),r=u.length-1,t=this.categoryAxis,t.parseDates&&!t.equalSpacing?(t=this.startTime,i=this.endTime,isNaN(t)||isNaN(i))&&(t=this.firstTime,i=this.lastTime):(t=this.start,i=this.end,(isNaN(t)||isNaN(i))&&(i=t=NaN),isNaN(t)&&(isNaN(this.startTime)||(t=this.getClosestIndex(u,"time",this.startTime,!0,0,u.length))),isNaN(i)&&(isNaN(this.endTime)||(i=this.getClosestIndex(u,"time",this.endTime,!1,0,u.length))),(isNaN(t)||isNaN(i))&&(t=0,i=r)),this.endTime=this.startTime=this.end=this.start=void 0,this.zoom(t,i))):this.cleanChart()},cleanChart:function(){n.callMethod("destroy",[this.valueAxes,this.graphs,this.categoryAxis,this.chartScrollbar,this.chartCursor,this.valueScrollbar])},updateCategoryAxis:function(n,t,i){n.chart=this;n.id=i;n.rotate=t;n.setOrientation(!this.rotate);n.init();this.setAxisRenderers(n);this.updateObjectSize(n)},updateValueAxes:function(){var u,i,r,t;for(n.AmSerialChart.base.updateValueAxes.call(this),u=this.valueAxes,i=0;i<u.length;i++)r=u[i],t=this.rotate,r.rotate=t,r.setOrientation(t),t=this.categoryAxis,(!t.startOnAxis||t.parseDates)&&(r.expandMinMax=!0)},getStartTime:function(t){var i=this.categoryAxis;return n.resetDateToMin(new Date(t),i.minPeriod,1,i.firstDayOfWeek).getTime()},getEndTime:function(t){var i=n.extractPeriod(this.categoryAxis.minPeriod);return n.changeDate(new Date(t),i.period,i.count,!0).getTime()-1},updateMargins:function(){n.AmSerialChart.base.updateMargins.call(this);var t=this.chartScrollbar;t&&(this.getScrollbarPosition(t,this.rotate,this.categoryAxis.position),this.adjustMargins(t,this.rotate));(t=this.valueScrollbar)&&(this.getScrollbarPosition(t,!this.rotate,this.valueAxes[0].position),this.adjustMargins(t,!this.rotate))},updateScrollbars:function(){n.AmSerialChart.base.updateScrollbars.call(this);this.updateChartScrollbar(this.chartScrollbar,this.rotate);this.updateChartScrollbar(this.valueScrollbar,!this.rotate)},zoom:function(n,t){var i=this.categoryAxis;i.parseDates&&!i.equalSpacing?(this.timeZoom(n,t),isNaN(n)&&this.zoomOutValueAxes()):this.indexZoom(n,t);(i=this.chartCursor)&&(i.pan||i.hideCursorReal());this.updateLegendValues()},timeZoom:function(t,i){var u=this.maxSelectedTime,e,r;if(isNaN(u)||(i!=this.endTime&&i-t>u&&(t=i-u),t!=this.startTime&&i-t>u&&(i=t+u)),r=this.minSelectedTime,0<r&&i-t<r&&(e=Math.round(t+(i-t)/2),r=Math.round(r/2),t=e-r,i=e+r),r=this.chartData,e=this.categoryAxis,n.ifArray(r)&&(t!=this.startTime||i!=this.endTime)){var f=e.minDuration(),s=this.firstTime,o=this.lastTime;t||(t=s,isNaN(u)||(t=o-u));i||(i=o);t>o&&(t=o);i<s&&(i=s);t<s&&(t=s);i>o&&(i=o);i<t&&(i=t+f);i-t<f/5&&(i<o?i=t+f/5:t=i-f/5);this.startTime=t;this.endTime=i;u=r.length-1;f=this.getClosestIndex(r,"time",t,!0,0,u);r=this.getClosestIndex(r,"time",i,!1,f,u);e.timeZoom(t,i);e.zoom(f,r);this.start=n.fitToBounds(f,0,u);this.end=n.fitToBounds(r,0,u);this.zoomAxesAndGraphs();this.zoomScrollbar();this.fixCursor();this.showZB();this.syncGrid();this.updateColumnsDepth();this.dispatchTimeZoomEvent()}},showZB:function(){var i,t=this.categoryAxis;t&&t.parseDates&&!t.equalSpacing&&(this.startTime>this.firstTime&&(i=!0),this.endTime<this.lastTime&&(i=!0));0<this.start&&(i=!0);this.end<this.chartData.length-1&&(i=!0);(t=this.valueAxes)&&(t=t[0],isNaN(t.relativeStart)||(0!==n.roundTo(t.relativeStart,3)&&(i=!0),1!=n.roundTo(t.relativeEnd,3)&&(i=!0)));n.AmSerialChart.base.showZB.call(this,i)},updateAfterValueZoom:function(){n.AmSerialChart.base.updateAfterValueZoom.call(this);this.updateColumnsDepth()},indexZoom:function(n,t){var r=this.maxSelectedSeries,i=!1,u;isNaN(r)||(t!=this.end&&t-n>r&&(n=t-r,i=!0),n!=this.start&&t-n>r&&(t=n+r,i=!0));i&&(i=this.chartScrollbar)&&i.dragger&&(u=i.dragger.getBBox(),i.maxWidth=u.width,i.maxHeight=u.height);(n!=this.start||t!=this.end)&&(i=this.chartData.length-1,isNaN(n)&&(n=0,isNaN(r)||(n=i-r)),isNaN(t)&&(t=i),t<n&&(t=n),t>i&&(t=i),n>i&&(n=i-1),0>n&&(n=0),this.start=n,this.end=t,this.categoryAxis.zoom(n,t),this.zoomAxesAndGraphs(),this.zoomScrollbar(),this.fixCursor(),0!==n||t!=this.chartData.length-1?this.showZB(!0):this.showZB(!1),this.syncGrid(),this.updateColumnsDepth(),this.dispatchIndexZoomEvent())},updateGraphs:function(){var r,i,t;for(n.AmSerialChart.base.updateGraphs.call(this),r=this.graphs,i=0;i<r.length;i++)t=r[i],t.columnWidthReal=this.columnWidth,t.categoryAxis=this.categoryAxis,n.isString(t.fillToGraph)&&(t.fillToGraph=this.graphsById[t.fillToGraph])},zoomAxesAndGraphs:function(){n.AmSerialChart.base.zoomAxesAndGraphs.call(this);this.updateColumnsDepth()},updateColumnsDepth:function(){var i,r,u,t,f;if(0!==this.depth3D||0!==this.angle){for(r=this.graphs,this.columnsArray=[],i=0;i<r.length;i++)if(u=r[i],t=u.columnsArray,t)for(f=0;f<t.length;f++)this.columnsArray.push(t[f]);if(this.columnsArray.sort(this.compareDepth),r=this.columnsSet,0<this.columnsArray.length){for(t=this.container.set(),this.columnSet.push(t),i=0;i<this.columnsArray.length;i++)t.push(this.columnsArray[i].column.set);u&&t.translate(u.x,u.y);this.columnsSet=t}n.remove(r)}},compareDepth:function(n,t){return n.depth>t.depth?1:-1},zoomScrollbar:function(){var n=this.chartScrollbar,i=this.categoryAxis,t;n&&(this.zoomedByScrollbar||(t=n.dragger,t&&t.stop()),this.zoomedByScrollbar=!1,i.parseDates&&!i.equalSpacing?n.timeZoom(this.startTime,this.endTime):n.zoom(this.start,this.end));this.zoomValueScrollbar(this.valueScrollbar)},updateTrendLines:function(){for(var r=this.trendLines,t,i=0;i<r.length;i++)t=r[i],t=n.processObject(t,n.TrendLine,this.theme),r[i]=t,t.chart=this,t.id||(t.id="trendLineAuto"+i+"_"+(new Date).getTime()),n.isString(t.valueAxis)&&(t.valueAxis=this.getValueAxisById(t.valueAxis)),t.valueAxis||(t.valueAxis=this.valueAxes[0]),t.categoryAxis=this.categoryAxis},validateNow:function(t,i){t&&this.zoomOutOnDataUpdate&&(this.endTime=this.end=this.startTime=this.start=NaN);n.AmSerialChart.base.validateNow.call(this,t,i)},countColumns:function(){for(var i=0,h=this.valueAxes.length,e=this.graphs.length,n,r,s=!1,u,f,t,o=0;o<h;o++){if(r=this.valueAxes[o],f=r.stackType,t=0,"100%"==f||"regular"==f)for(s=!1,u=0;u<e;u++)n=this.graphs[u],n.tcc=1,n.valueAxis==r&&"column"==n.type&&(!s&&n.stackable&&(i++,s=!0),(!n.stackable&&n.clustered||n.newStack&&0!==t)&&i++,n.columnIndex=i-1,n.clustered||(n.columnIndex=0),t++);if("none"==f||"3d"==f){for(t=!1,u=0;u<e;u++)n=this.graphs[u],n.valueAxis==r&&"column"==n.type&&(n.clustered?(n.tcc=1,n.newStack&&(i=0),n.hidden||(n.columnIndex=i,i++)):n.hidden||(t=!0,n.tcc=1,n.columnIndex=0));t&&0===i&&(i=1)}if("3d"==f){for(r=1,t=0;t<e;t++)n=this.graphs[t],n.newStack&&r++,n.depthCount=r,n.tcc=i;i=r}if("regular"==f||"100%"==f)for(r=10,t=0;t<e;t++)n=this.graphs[t],n.newStack&&r--,n.depthCount=r,n.tcc=i}return i},parseData:function(){n.AmSerialChart.base.parseData.call(this);this.parseSerialData(this.dataProvider)},getCategoryIndexByValue:function(n){for(var i=this.chartData,t=0;t<i.length;t++)if(i[t].category==n)return t},handleScrollbarZoom:function(n){this.zoomedByScrollbar=!0;this.zoom(n.start,n.end)},dispatchTimeZoomEvent:function(){var t;if(this.drawGraphs&&(this.prevStartTime!=this.startTime||this.prevEndTime!=this.endTime)){t={type:"zoomed"};t.startDate=new Date(this.startTime);t.endDate=new Date(this.endTime);t.startIndex=this.start;t.endIndex=this.end;this.startIndex=this.start;this.endIndex=this.end;this.startDate=t.startDate;this.endDate=t.endDate;this.prevStartTime=this.startTime;this.prevEndTime=this.endTime;var i=this.categoryAxis,r=n.extractPeriod(i.minPeriod).period,i=i.dateFormatsObject[r];t.startValue=n.formatDate(t.startDate,i,this);t.endValue=n.formatDate(t.endDate,i,this);t.chart=this;t.target=this;this.fire(t)}},dispatchIndexZoomEvent:function(){var i,t;this.drawGraphs&&(this.prevStartIndex!=this.start||this.prevEndIndex!=this.end)&&(this.startIndex=this.start,this.endIndex=this.end,i=this.chartData,!n.ifArray(i)||isNaN(this.start)||isNaN(this.end)||(t={chart:this,target:this,type:"zoomed"},t.startIndex=this.start,t.endIndex=this.end,t.startValue=i[this.start].category,t.endValue=i[this.end].category,this.categoryAxis.parseDates&&(this.startTime=i[this.start].time,this.endTime=i[this.end].time,t.startDate=new Date(this.startTime),t.endDate=new Date(this.endTime)),this.prevStartIndex=this.start,this.prevEndIndex=this.end,this.fire(t)))},updateLegendValues:function(){this.legend&&this.legend.updateValues()},getClosestIndex:function(n,t,i,r,u,f){0>u&&(u=0);f>n.length-1&&(f=n.length-1);var e=u+Math.round((f-u)/2),o=n[e][t];return i==o?e:1>=f-u?r?u:Math.abs(n[u][t]-i)<Math.abs(n[f][t]-i)?u:f:i==o?e:i<o?this.getClosestIndex(n,t,i,r,u,e):this.getClosestIndex(n,t,i,r,e,f)},zoomToIndexes:function(n,t){var r=this.chartData,i;r&&(i=r.length,0<i&&(0>n&&(n=0),t>i-1&&(t=i-1),i=this.categoryAxis,i.parseDates&&!i.equalSpacing?this.zoom(r[n].time,this.getEndTime(r[t].time)):this.zoom(n,t)))},zoomToDates:function(t,i){var r=this.chartData,u;r&&(this.categoryAxis.equalSpacing?(u=this.getClosestIndex(r,"time",t.getTime(),!0,0,r.length),i=n.resetDateToMin(i,this.categoryAxis.minPeriod,1),r=this.getClosestIndex(r,"time",i.getTime(),!1,0,r.length),this.zoom(u,r)):this.zoom(t.getTime(),i.getTime()))},zoomToCategoryValues:function(n,t){this.chartData&&this.zoom(this.getCategoryIndexByValue(n),this.getCategoryIndexByValue(t))},formatPeriodString:function(t,i){var h,r,u,f;if(i){i.periodDataItem={};i.periodPercentDataItem={};var tt=["value","open","low","high","close"],it="value open low high close average sum count".split(" "),ft=i.valueAxis,et=this.chartData,w=i.numberFormatter;for(w||(w=this.nf),h=0;h<tt.length;h++){for(var s=tt[h],e=0,b=0,o=0,k=0,d,rt,c,l,a,g,ut,v,y,p,nt=this.start;nt<=this.end;nt++)f=et[nt],f&&(r=f.axes[ft.id].graphs[i.id],r&&(r.values&&(u=r.values[s],f=f.x.categoryAxis,this.rotate?(0>f||f>r.graph.height)&&(u=NaN):(0>f||f>r.graph.width)&&(u=NaN),isNaN(u)||(isNaN(d)&&(d=u),rt=u,(isNaN(c)||c>u)&&(c=u),(isNaN(l)||l<u)&&(l=u),a=n.getDecimals(e),f=n.getDecimals(u),e+=u,e=n.roundTo(e,Math.max(a,f)),b++,a=e/b)),r.percents&&(r=r.percents[s],!isNaN(r))&&(isNaN(g)&&(g=r),ut=r,(isNaN(v)||v>r)&&(v=r),(isNaN(y)||y<r)&&(y=r),p=n.getDecimals(o),u=n.getDecimals(r),o+=r,o=n.roundTo(o,Math.max(p,u)),k++,p=o/k)));e={open:d,close:rt,high:l,low:c,average:a,sum:e,count:b};o={open:g,close:ut,high:y,low:v,average:p,sum:o,count:k};t=n.formatValue(t,e,it,w,s+"\\.",this.usePrefixes,this.prefixesOfSmallNumbers,this.prefixesOfBigNumbers);t=n.formatValue(t,o,it,this.pf,"percents\\."+s+"\\.");i.periodDataItem[s]=e;i.periodPercentDataItem[s]=o}}return n.cleanFromEmpty(t)},formatString:function(t,i,r){var o,e,u,f;if(i)return o=i.graph,void 0!==t&&(-1!=t.indexOf("[[category]]")&&(e=i.serialDataItem.category,this.categoryAxis.parseDates&&(u=this.balloonDateFormat,f=this.chartCursor,f&&f.categoryBalloonDateFormat&&(u=f.categoryBalloonDateFormat),u=n.formatDate(e,u,this),-1!=u.indexOf("fff")&&(u=n.formatMilliseconds(u,e)),e=u),t=t.replace(/\[\[category\]\]/g,String(e.replace("$","$$$")))),e=o.numberFormatter,e||(e=this.nf),u=i.graph.valueAxis,(f=u.duration)&&!isNaN(i.values.value)&&u.maxInterval&&(f=n.formatDuration(i.values.value,f,"",u.durationUnits,u.maxInterval,e),t=t.replace(RegExp("\\[\\[value\\]\\]","g"),f)),"date"==u.type&&(u=n.formatDate(new Date(i.values.value),o.dateFormat,this),f=RegExp("\\[\\[value\\]\\]","g"),t=t.replace(f,u),u=n.formatDate(new Date(i.values.open),o.dateFormat,this),f=RegExp("\\[\\[open\\]\\]","g"),t=t.replace(f,u)),o="value open low high close total".split(" "),u=this.pf,t=n.formatValue(t,i.percents,o,u,"percents\\."),t=n.formatValue(t,i.values,o,e,"",this.usePrefixes,this.prefixesOfSmallNumbers,this.prefixesOfBigNumbers),t=n.formatValue(t,i.values,["percents"],u),-1!=t.indexOf("[[")&&(t=n.formatDataContextValue(t,i.dataContext)),-1!=t.indexOf("[[")&&i.graph.customData&&(t=n.formatDataContextValue(t,i.graph.customData)),t=n.AmSerialChart.base.formatString.call(this,t,i,r)),t},updateChartCursor:function(){var i,r;if(n.AmSerialChart.base.updateChartCursor.call(this),i=this.chartCursor,r=this.categoryAxis,i){var o=i.categoryBalloonAlpha,u=i.categoryBalloonColor,s=i.color;void 0===u&&(u=i.cursorColor);var f=i.valueZoomable,t=i.zoomable,e=i.valueLineEnabled;if(this.rotate?(i.vLineEnabled=e,i.hZoomEnabled=f,i.vZoomEnabled=t):(i.hLineEnabled=e,i.vZoomEnabled=f,i.hZoomEnabled=t),i.valueLineBalloonEnabled)for(e=0;e<this.valueAxes.length;e++)f=this.valueAxes[e],(t=f.balloon)||(t={}),t=n.extend(t,this.balloon,!0),t.fillColor=u,t.balloonColor=u,t.fillAlpha=o,t.borderColor=u,t.color=s,f.balloon=t;else for(t=0;t<this.valueAxes.length;t++)f=this.valueAxes[t],f.balloon&&(f.balloon=null);r&&(r.balloonTextFunction=i.categoryBalloonFunction,i.categoryLineAxis=r,r.balloonText=i.categoryBalloonText,i.categoryBalloonEnabled&&((t=r.balloon)||(t={}),t=n.extend(t,this.balloon,!0),t.fillColor=u,t.balloonColor=u,t.fillAlpha=o,t.borderColor=u,t.color=s,r.balloon=t),r.balloon&&(r.balloon.enabled=i.categoryBalloonEnabled))}},addChartScrollbar:function(t){n.callMethod("destroy",[this.chartScrollbar]);t&&(t.chart=this,this.listenTo(t,"zoomed",this.handleScrollbarZoom));this.rotate?void 0===t.width&&(t.width=t.scrollbarHeight):void 0===t.height&&(t.height=t.scrollbarHeight);t.gridAxis=this.categoryAxis;this.chartScrollbar=t},addValueScrollbar:function(t){n.callMethod("destroy",[this.valueScrollbar]);t&&(t.chart=this,this.listenTo(t,"zoomed",this.handleScrollbarValueZoom),this.listenTo(t,"zoomStarted",this.handleCursorZoomStarted));var i=t.scrollbarHeight;this.rotate?void 0===t.height&&(t.height=i):void 0===t.width&&(t.width=i);t.gridAxis||(t.gridAxis=this.valueAxes[0]);t.valueAxes=this.valueAxes;this.valueScrollbar=t},removeChartScrollbar:function(){n.callMethod("destroy",[this.chartScrollbar]);this.chartScrollbar=null},removeValueScrollbar:function(){n.callMethod("destroy",[this.valueScrollbar]);this.valueScrollbar=null},handleReleaseOutside:function(t){n.AmSerialChart.base.handleReleaseOutside.call(this,t);n.callMethod("handleReleaseOutside",[this.chartScrollbar,this.valueScrollbar])},update:function(){n.AmSerialChart.base.update.call(this);this.chartScrollbar&&this.chartScrollbar.update&&this.chartScrollbar.update();this.valueScrollbar&&this.valueScrollbar.update&&this.valueScrollbar.update()},processScrollbars:function(){n.AmSerialChart.base.processScrollbars.call(this);var t=this.valueScrollbar;t&&(t=n.processObject(t,n.ChartScrollbar,this.theme),t.id="valueScrollbar",this.addValueScrollbar(t))},handleValueAxisZoom:function(n){this.handleValueAxisZoomReal(n,this.valueAxes)},zoomOut:function(){n.AmSerialChart.base.zoomOut.call(this);this.zoom();this.syncGrid()},getNextItem:function(n){var t=n.index,i=this.chartData,r=n.graph;if(t+1<i.length)for(t+=1;t<i.length;t++)if((n=i[t])&&(n=n.axes[r.valueAxis.id].graphs[r.id],!isNaN(n.y)))return n},handleCursorZoomReal:function(n,t,i,r,u){var o=u.target,f,e;this.rotate?(isNaN(n)||isNaN(t)||this.relativeZoomValueAxes(this.valueAxes,n,t)&&this.updateAfterValueZoom(),o.vZoomEnabled&&(f=u.start,e=u.end)):(isNaN(i)||isNaN(r)||this.relativeZoomValueAxes(this.valueAxes,i,r)&&this.updateAfterValueZoom(),o.hZoomEnabled&&(f=u.start,e=u.end));isNaN(f)||isNaN(e)||(n=this.categoryAxis,n.parseDates&&!n.equalSpacing?this.zoomToDates(new Date(f),new Date(e)):this.zoomToIndexes(f,e))},handleCursorZoomStarted:function(){var n=this.valueAxes;if(n){var n=n[0],t=n.relativeStart,i=n.relativeEnd;n.reversed&&(t=1-n.relativeEnd,i=1-n.relativeStart);this.rotate?(this.startX0=t,this.endX0=i):(this.startY0=t,this.endY0=i)}this.categoryAxis&&(this.start0=this.start,this.end0=this.end,this.startTime0=this.startTime,this.endTime0=this.endTime)},fixCursor:function(){this.chartCursor&&this.chartCursor.fixPosition();this.prevCursorItem=null},handleCursorMove:function(t){var u,c,f,s,e,r,i,o,h,l,a;if(n.AmSerialChart.base.handleCursorMove.call(this,t),u=t.target,c=this.categoryAxis,t.panning)this.handleCursorHide(t);else if(this.chartData&&!u.isHidden){if(f=this.graphs,f&&(s=c.xToIndex(this.rotate?t.y:t.x),s=this.chartData[s])){if(u.oneBalloonOnly&&u.valueBalloonsEnabled){for(h=Infinity,e=f.length-1;0<=e;e--)if(r=f[e],r.balloon.enabled&&r.showBalloon&&!r.hidden){if(i=r.valueAxis.id,i=s.axes[i].graphs[r.id],u.showNextAvailable&&isNaN(i.y)&&(i=this.getNextItem(i),!i))continue;i=i.y;"top"==r.showBalloonAt&&(i=0);"bottom"==r.showBalloonAt&&(i=this.height);l=u.mouseX;a=u.mouseY;i=this.rotate?Math.abs(l-i):Math.abs(a-i);i<h&&(h=i,o=r)}u.mostCloseGraph=o}if(this.prevCursorItem!=s||o!=this.prevMostCloseGraph){for(h=[],e=0;e<f.length;e++){if(r=f[e],i=r.valueAxis.id,i=s.axes[i].graphs[r.id],u.showNextAvailable&&isNaN(i.y)&&(i=this.getNextItem(i),!i&&r.balloon)){r.balloon.hide();continue}o&&r!=o?(r.showGraphBalloon(i,u.pointer,!1,u.graphBulletSize,u.graphBulletAlpha),r.balloon.hide(0)):u.valueBalloonsEnabled?(r.balloon.showBullet=u.bulletsEnabled,r.balloon.bulletSize=u.bulletSize/2,t.hideBalloons||(r.showGraphBalloon(i,u.pointer,!1,u.graphBulletSize,u.graphBulletAlpha),r.balloon.set&&h.push({balloon:r.balloon,y:r.balloon.pointToY}))):(r.currentDataItem=i,r.resizeBullet(i,u.graphBulletSize,u.graphBulletAlpha))}u.avoidBalloonOverlapping&&this.arrangeBalloons(h);this.prevCursorItem=s}this.prevMostCloseGraph=o}f=n.fitToBounds(t.x,0,u.width);o=n.fitToBounds(t.y,0,u.height);c.showBalloon(f,o,u.categoryBalloonDateFormat,t.skip);this.updateLegendValues()}},handleCursorHide:function(t){n.AmSerialChart.base.handleCursorHide.call(this,t);t=this.categoryAxis;this.prevCursorItem=null;this.updateLegendValues();t&&t.hideBalloon();t=this.graphs;for(var i=0;i<t.length;i++)t[i].currentDataItem=null},handleCursorPanning:function(t){var c=t.target,i,s=t.deltaX,h=t.deltaY,r=t.delta2X,e=t.delta2Y,f,a,l;if(t=!1,this.rotate){isNaN(r)&&(r=s,t=!0);f=this.endX0;i=this.startX0;var u=f-i,f=f-u*r,o=u;t||(o=0);t=n.fitToBounds(i-u*s,0,1-o)}else isNaN(e)&&(e=h,t=!0),f=this.endY0,i=this.startY0,u=f-i,f+=u*h,o=u,t||(o=0),t=n.fitToBounds(i+u*e,0,1-o);i=n.fitToBounds(f,o,1);c.valueZoomable&&(a=this.relativeZoomValueAxes(this.valueAxes,t,i));i=this.categoryAxis;this.rotate&&(s=h,r=e);t=!1;isNaN(r)&&(r=s,t=!0);c.zoomable&&(0<Math.abs(s)||0<Math.abs(r))&&(i.parseDates&&!i.equalSpacing?(e=this.startTime0,h=this.endTime0,i=h-e,r*=i,u=this.firstTime,f=this.lastTime,o=i,t||(o=0),t=Math.round(n.fitToBounds(e-i*s,u,f-o)),r=Math.round(n.fitToBounds(h-r,u+o,f)),this.startTime!=t||this.endTime!=r)&&(l={chart:this,target:c,type:"zoomed",start:t,end:r},this.skipZoomed=!0,c.fire(l),this.zoom(t,r),l=!0):(e=this.start0,h=this.end0,i=h-e,s=Math.round(i*s),r=Math.round(i*r),u=this.chartData.length-1,t||(i=0),t=n.fitToBounds(e-s,0,u-i),i=n.fitToBounds(h-r,i,u),this.start!=t||this.end!=i)&&(this.skipZoomed=!0,c.fire({chart:this,target:c,type:"zoomed",start:t,end:i}),this.zoom(t,i),l=!0));!l&&a&&this.updateAfterValueZoom()},arrangeBalloons:function(n){var r=this.plotAreaHeight,i,t,u,f,e,o;for(n.sort(this.compareY),f=this.plotAreaWidth,e=n.length,i=0;i<e;i++)t=n[i].balloon,t.setBounds(0,0,f,r),t.restorePrevious(),t.draw(),r=t.yPos-3;for(n.reverse(),i=0;i<e;i++)t=n[i].balloon,r=t.bottom,o=t.bottom-t.yPos,0<i&&r-o<u+3&&t.setBounds&&(t.setBounds(0,u+3,f,u+o+3),t.restorePrevious(),t.draw()),t.set&&t.set.show(),u=t.bottom},compareY:function(n,t){return n.y<t.y?1:-1}})}(),function(){var n=window.AmCharts;n.Cuboid=n.Class({construct:function(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y,p,w){this.set=n.set();this.container=n;this.h=Math.round(i);this.w=Math.round(t);this.dx=r;this.dy=u;this.colors=f;this.alpha=e;this.bwidth=o;this.bcolor=s;this.balpha=h;this.dashLength=v;this.topRadius=p;this.pattern=y;this.rotate=a;this.bcn=w;a?0>t&&0===c&&(c=180):0>i&&270==c&&(c=90);this.gradientRotation=c;0===r&&0===u&&(this.cornerRadius=l);this.draw()},draw:function(){var pt=this.set,l,nt,st,ft,et,ht,y,ct,lt,bt,c,w,b,tt,ut,at,vt,yt;pt.clear();var r=this.container,d=r.chart,t=this.w,i=this.h,f=this.dx,e=this.dy,v=this.colors,u=this.alpha,o=this.bwidth,s=this.bcolor,h=this.balpha,it=this.gradientRotation,wt=this.cornerRadius,g=this.dashLength,ot=this.pattern,k=this.topRadius,rt=this.bcn,p=v,a=v;for("object"==typeof v&&(p=v[0],a=v[v.length-1]),bt=u,ot&&(u=0),ut=this.rotate,(0<Math.abs(f)||0<Math.abs(e))&&(isNaN(k)?(y=a,a=n.adjustLuminosity(p,-.2),a=n.adjustLuminosity(p,-.2),l=n.polygon(r,[0,f,t+f,t,0],[0,e,e,0,0],a,u,1,s,0,it),0<h&&(lt=n.line(r,[0,f,t+f],[0,e,e],s,h,o,g)),nt=n.polygon(r,[0,0,t,t,0],[0,i,i,0,0],a,u,1,s,0,it),nt.translate(f,e),0<h&&(st=n.line(r,[f,f],[e,e+i],s,h,o,g)),ft=n.polygon(r,[0,0,f,f,0],[0,i,i+e,e,0],a,u,1,s,0,it),et=n.polygon(r,[t,t,t+f,t+f,t],[0,i,i+e,e,0],a,u,1,s,0,it),0<h&&(ht=n.line(r,[t,t+f,t+f,t],[0,e,i+e,i],s,h,o,g)),a=n.adjustLuminosity(y,.2),y=n.polygon(r,[0,f,t+f,t,0],[i,i+e,i+e,i,i],a,u,1,s,0,it),0<h&&(ct=n.line(r,[0,f,t+f],[i,i+e,i+e],s,h,o,g))):(ut?(at=i/2,a=f/2,yt=i/2,vt=t+f/2,w=Math.abs(i/2),c=Math.abs(f/2)):(a=t/2,at=e/2,vt=t/2,yt=i+e/2+1,c=Math.abs(t/2),w=Math.abs(e/2)),b=c*k,tt=w*k,.1<c&&.1<c&&(l=n.circle(r,c,p,u,o,s,h,!1,w),l.translate(a,at)),.1<b&&.1<b&&(y=n.circle(r,b,n.adjustLuminosity(p,.5),u,o,s,h,!1,tt),y.translate(vt,yt)))),u=bt,1>Math.abs(i)&&(i=0),1>Math.abs(t)&&(t=0),!isNaN(k)&&(0<Math.abs(f)||0<Math.abs(e))?(v=[p],v={fill:v,stroke:s,"stroke-width":o,"stroke-opacity":h,"fill-opacity":u},ut?(u="M0,0 L"+t+","+(i/2-i/2*k),o=" B",0<t&&(o=" A"),n.VML?(u+=o+Math.round(t-b)+","+Math.round(i/2-tt)+","+Math.round(t+b)+","+Math.round(i/2+tt)+","+t+",0,"+t+","+i,u=u+(" L0,"+i)+(o+Math.round(-c)+","+Math.round(i/2-w)+","+Math.round(c)+","+Math.round(i/2+w)+",0,"+i+",0,0")):(u+="A"+b+","+tt+",0,0,0,"+t+","+(i-i/2*(1-k))+"L0,"+i,u+="A"+c+","+w+",0,0,1,0,0"),c=90):(o=t/2-t/2*k,u="M0,0 L"+o+","+i,n.VML?(u="M0,0 L"+o+","+i,o=" B",0>i&&(o=" A"),u+=o+Math.round(t/2-b)+","+Math.round(i-tt)+","+Math.round(t/2+b)+","+Math.round(i+tt)+",0,"+i+","+t+","+i,u+=" L"+t+",0",u+=o+Math.round(t/2+c)+","+Math.round(w)+","+Math.round(t/2-c)+","+Math.round(-w)+","+t+",0,0,0"):(u+="A"+b+","+tt+",0,0,0,"+(t-t/2*(1-k))+","+i+"L"+t+",0",u+="A"+c+","+w+",0,0,1,0,0"),c=180),r=r.path(u).attr(v),r.gradient("linearGradient",[p,n.adjustLuminosity(p,-.3),n.adjustLuminosity(p,-.3),p],c),ut?r.translate(f/2,0):r.translate(0,e/2)):r=0===i?n.line(r,[0,t],[0,0],s,h,o,g):0===t?n.line(r,[0,0],[0,i],s,h,o,g):0<wt?n.rect(r,t,i,v,u,o,s,h,wt,it,g):n.polygon(r,[0,0,t,t,0],[0,i,i,0,0],v,u,o,s,h,it,!1,g),t=isNaN(k)?0>i?[l,lt,nt,st,ft,et,ht,y,ct,r]:[y,ct,nt,st,ft,et,l,lt,ht,r]:ut?0<t?[l,r,y]:[y,r,l]:0>i?[l,r,y]:[y,r,l],n.setCN(d,r,rt+"front"),n.setCN(d,nt,rt+"back"),n.setCN(d,y,rt+"top"),n.setCN(d,l,rt+"bottom"),n.setCN(d,ft,rt+"left"),n.setCN(d,et,rt+"right"),l=0;l<t.length;l++)(nt=t[l])&&(pt.push(nt),n.setCN(d,nt,rt+"element"));ot&&r.pattern(ot,NaN,d.path)},width:function(n){isNaN(n)&&(n=0);this.w=Math.round(n);this.draw()},height:function(n){isNaN(n)&&(n=0);this.h=Math.round(n);this.draw()},animateHeight:function(t,i){var r=this;r.animationFinished=!1;r.easing=i;r.totalFrames=t*n.updateRate;r.rh=r.h;r.frame=0;r.height(1);setTimeout(function(){r.updateHeight.call(r)},1e3/n.updateRate)},updateHeight:function(){var t=this,i;t.frame++;i=t.totalFrames;t.frame<=i?(i=t.easing(0,t.frame,1,t.rh-1,i),t.height(i),window.requestAnimationFrame?window.requestAnimationFrame(function(){t.updateHeight.call(t)}):setTimeout(function(){t.updateHeight.call(t)},1e3/n.updateRate)):(t.height(t.rh),t.animationFinished=!0)},animateWidth:function(t,i){var r=this;r.animationFinished=!1;r.easing=i;r.totalFrames=t*n.updateRate;r.rw=r.w;r.frame=0;r.width(1);setTimeout(function(){r.updateWidth.call(r)},1e3/n.updateRate)},updateWidth:function(){var t=this,i;t.frame++;i=t.totalFrames;t.frame<=i?(i=t.easing(0,t.frame,1,t.rw-1,i),t.width(i),window.requestAnimationFrame?window.requestAnimationFrame(function(){t.updateWidth.call(t)}):setTimeout(function(){t.updateWidth.call(t)},1e3/n.updateRate)):(t.width(t.rw),t.animationFinished=!0)}})}(),function(){var n=window.AmCharts;n.CategoryAxis=n.Class({inherits:n.AxisBase,construct:function(t){this.cname="CategoryAxis";n.CategoryAxis.base.construct.call(this,t);this.minPeriod="DD";this.equalSpacing=this.parseDates=!1;this.position="bottom";this.startOnAxis=!1;this.gridPosition="middle";this.safeDistance=30;this.stickBalloonToCategory=!1;n.applyTheme(this,t,this.cname)},draw:function(){var l,t,a,k,nt,tt,p,ut,ft;if(n.CategoryAxis.base.draw.call(this),this.generateDFObject(),l=this.chart.chartData,this.data=l,this.labelRotationR=this.labelRotation,this.type=null,n.ifArray(l)){a=this.chart;"scrollbar"!=this.id?(n.setCN(a,this.set,"category-axis"),n.setCN(a,this.labelsSet,"category-axis"),n.setCN(a,this.axisLine.axisSet,"category-axis")):this.bcn=this.id+"-";var e=this.start,w=this.labelFrequency,g=0,r=this.end-e+1,v=this.gridCountR,i=this.showFirstLabel,y=this.showLastLabel,c,o="",o=n.extractPeriod(this.minPeriod),p=n.getPeriodDuration(o.period,o.count),h,b,it,s,f,rt=this.rotate,u=this.firstDayOfWeek,d=this.boldPeriodBeginning;if(t=n.resetDateToMin(new Date(l[l.length-1].time+1.05*p),this.minPeriod,1,u).getTime(),this.firstTime=a.firstTime,this.endTime>t&&(this.endTime=t),f=this.minorGridEnabled,b=this.gridAlpha,k=0,nt=0,this.widthField)for(t=this.start;t<=this.end;t++)(s=this.data[t])&&(tt=Number(this.data[t].dataContext[this.widthField]),isNaN(tt)||(k+=tt,s.widthValue=tt));if(this.parseDates&&!this.equalSpacing)this.lastTime=l[l.length-1].time,this.maxTime=n.resetDateToMin(new Date(this.lastTime+1.05*p),this.minPeriod,1,u).getTime(),this.timeDifference=this.endTime-this.startTime,this.parseDatesDraw();else if(this.parseDates){if(this.parseDates&&this.equalSpacing){if(g=this.start,this.startTime=this.data[this.start].time,this.endTime=this.data[this.end].time,this.timeDifference=this.endTime-this.startTime,t=this.choosePeriod(0),w=t.period,h=t.count,t=n.getPeriodDuration(w,h),t<p&&(w=o.period,h=o.count,t=p),b=w,"WW"==b&&(b="DD"),this.currentDateFormat=this.dateFormatsObject[b],this.stepWidth=this.getStepWidth(r),v=Math.ceil(this.timeDifference/t)+1,o=n.resetDateToMin(new Date(this.startTime-t),w,h,u).getTime(),this.cellWidth=this.getStepWidth(r),r=Math.round(o/t),e=-1,r/2==Math.round(r/2)&&(e=-2,o-=t),r=this.start,r/2==Math.round(r/2)&&r--,0>r&&(r=0),nt=this.end+2,nt>=this.data.length&&(nt=this.data.length),l=!1,l=!i,this.previousPos=-1e3,20<this.labelRotationR&&(this.safeDistance=5),tt=r,this.data[r].time!=n.resetDateToMin(new Date(this.data[r].time),w,h,u).getTime())for(p=0,ut=o,t=r;t<nt;t++)s=this.data[t].time,this.checkPeriodChange(w,h,s,ut)&&(p++,2<=p&&(tt=t,t=nt),ut=s);if(f&&1<h&&(s=this.chooseMinorFrequency(h),n.getPeriodDuration(w,s)),0<this.gridCountR)for(t=r;t<nt;t++)(s=this.data[t].time,this.checkPeriodChange(w,h,s,o)&&t>=tt)&&(r=this.getCoordinate(t-this.start),f=!1,this.nextPeriod[b]&&(f=this.checkPeriodChange(this.nextPeriod[b],1,s,o,b))&&n.resetDateToMin(new Date(s),this.nextPeriod[b],1,u).getTime()!=s&&(f=!1),p=!1,f&&this.markPeriodChange?(f=this.dateFormatsObject[this.nextPeriod[b]],p=!0):f=this.dateFormatsObject[b],o=n.formatDate(new Date(s),f,a),(t!=e||i)&&(t!=v||y)||(o=" "),l?l=!1:(d||(p=!1),r-this.previousPos>this.safeDistance*Math.cos(this.labelRotationR*Math.PI/180)&&(this.labelFunction&&(o=this.labelFunction(o,new Date(s),this,w,h,it)),this.boldLabels&&(p=!0),c=new this.axisItemRenderer(this,r,o,void 0,void 0,void 0,void 0,p),f=c.graphics(),this.pushAxisItem(c),f=f.getBBox().width,n.isModern||(f-=r),this.previousPos=r+f)),it=o=s)}}else if(this.cellWidth=this.getStepWidth(r),r<v&&(v=r),g+=this.start,this.stepWidth=this.getStepWidth(r),0<v)for(u=Math.floor(r/v),s=this.chooseMinorFrequency(u),r=g,r/2==Math.round(r/2)&&r--,0>r&&(r=0),d=0,this.widthField&&(r=this.start,u=1),this.end-r+1>=this.autoRotateCount&&(this.labelRotationR=this.autoRotateAngle),t=r;t<=this.end+2;t++){if(v=!1,0<=t&&t<this.data.length?(h=this.data[t],o=h.category,v=h.forceShow):o="",f&&!isNaN(s))if(t/s==Math.round(t/s)||v)t/u==Math.round(t/u)||v||(this.gridAlpha=this.minorGridAlpha,o=void 0);else continue;else if(t/u!=Math.round(t/u)&&!v)continue;r=this.getCoordinate(t-g);v=0;"start"==this.gridPosition&&(r-=this.cellWidth/2,v=this.cellWidth/2);c=!0;it=v;"start"==this.tickPosition&&(it=0,c=!1,v=0);(t!=e||i)&&(t!=this.end||y)||(o=void 0);Math.round(d/w)!=d/w&&(o=void 0);d++;l=this.cellWidth;rt&&(l=NaN,this.ignoreAxisWidth||!a.autoMargins)&&(l="right"==this.position?a.marginRight-this.titleWidth:a.marginLeft-this.titleWidth,l-=this.tickLength+10);this.labelFunction&&h&&(o=this.labelFunction(o,h,this));o=n.fixBrakes(o);p=!1;this.boldLabels&&(p=!0);t>this.end&&"start"==this.tickPosition&&(o=" ");this.rotate&&this.inside&&(v-=2);isNaN(h.widthValue)||(h.percentWidthValue=h.widthValue/k*100,l=this.rotate?this.height*h.widthValue/k:this.width*h.widthValue/k,r=nt,nt+=l,it=v=l/2);c=new this.axisItemRenderer(this,r,o,c,l,v,void 0,p,it,!1,h.labelColor,h.className);c.serialDataItem=h;this.pushAxisItem(c);this.gridAlpha=b}for(t=i=0;t<this.data.length;t++)(s=this.data[t])&&(this.parseDates&&!this.equalSpacing?(y=s.time,e=this.cellWidth,"MM"==this.minPeriod&&(e=864e5*n.daysInMonth(new Date(y))*this.stepWidth,s.cellWidth=e),y=Math.round((y-this.startTime)*this.stepWidth+e/2)):y=this.getCoordinate(t-g),s.x[this.id]=y);if(this.widthField)for(t=this.start;t<=this.end;t++)s=this.data[t],e=s.widthValue,s.percentWidthValue=e/k*100,this.rotate?(y=this.height*e/k/2+i,i=this.height*e/k+i):(y=this.width*e/k/2+i,i=this.width*e/k+i),s.x[this.id]=y;for(k=this.guides.length,t=0;t<k;t++)(i=this.guides[t],u=u=u=f=e=NaN,y=i.above,i.toCategory&&(u=a.getCategoryIndexByValue(i.toCategory),isNaN(u)||(e=this.getCoordinate(u-g),i.expand&&(e+=this.cellWidth/2),c=new this.axisItemRenderer(this,e,"",!0,NaN,NaN,i),this.pushAxisItem(c,y))),i.category&&(u=a.getCategoryIndexByValue(i.category),isNaN(u)||(f=this.getCoordinate(u-g),i.expand&&(f-=this.cellWidth/2),u=(e-f)/2,c=new this.axisItemRenderer(this,f,i.label,!0,NaN,u,i),this.pushAxisItem(c,y))),d=a.dataDateFormat,i.toDate&&(!d||i.toDate instanceof Date||(i.toDate=i.toDate.toString()+" |"),i.toDate=n.getDate(i.toDate,d),this.equalSpacing?(u=a.getClosestIndex(this.data,"time",i.toDate.getTime(),!1,0,this.data.length-1),isNaN(u)||(e=this.getCoordinate(u-g))):e=(i.toDate.getTime()-this.startTime)*this.stepWidth,c=new this.axisItemRenderer(this,e,"",!0,NaN,NaN,i),this.pushAxisItem(c,y)),i.date&&(!d||i.date instanceof Date||(i.date=i.date.toString()+" |"),i.date=n.getDate(i.date,d),this.equalSpacing?(u=a.getClosestIndex(this.data,"time",i.date.getTime(),!1,0,this.data.length-1),isNaN(u)||(f=this.getCoordinate(u-g))):f=(i.date.getTime()-this.startTime)*this.stepWidth,u=(e-f)/2,c=!0,i.toDate&&(c=!1),c="H"==this.orientation?new this.axisItemRenderer(this,f,i.label,c,2*u,NaN,i):new this.axisItemRenderer(this,f,i.label,!1,NaN,u,i),this.pushAxisItem(c,y)),c&&(u=c.label)&&this.addEventListeners(u,i),0<e||0<f)&&(u=!1,this.rotate?(e<this.height||f<this.height)&&(u=!0):(e<this.width||f<this.width)&&(u=!0),u&&(e=new this.guideFillRenderer(this,f,e,i),f=e.graphics(),this.pushAxisItem(e,y),i.graphics=f,f.index=t,this.addEventListeners(f,i)));(a=a.chartCursor)&&(rt?a.fixHeight(this.cellWidth):(a.fixWidth(this.cellWidth),a.fullWidth&&this.balloon&&(this.balloon.minWidth=this.cellWidth)));this.previousHeight=ft}this.axisCreated=!0;this.set.translate(this.x,this.y);this.labelsSet.translate(this.x,this.y);this.labelsSet.show();this.positionTitle();(rt=this.axisLine.set)&&rt.toFront();ft=this.getBBox().height;2<ft-this.previousHeight&&this.autoWrap&&!this.parseDates&&(this.axisCreated=this.chart.marginsUpdated=!1)},xToIndex:function(t){var f=this.data,e=this.chart,s=e.rotate,r=this.stepWidth,i,u,o;if(this.parseDates&&!this.equalSpacing)t=this.startTime+Math.round(t/r)-this.minDuration()/2,i=e.getClosestIndex(f,"time",t,!1,this.start,this.end+1);else if(this.widthField)for(e=Infinity,r=this.start;r<=this.end;r++)u=this.data[r],u&&(u=Math.abs(u.x[this.id]-t),u<e&&(e=u,i=r));else this.startOnAxis||(t-=r/2),i=this.start+Math.round(t/r);return i=n.fitToBounds(i,0,f.length-1),f[i]&&(o=f[i].x[this.id]),s?o>this.height+1&&i--:o>this.width+1&&i--,0>o&&i++,n.fitToBounds(i,0,f.length-1)},dateToCoordinate:function(n){return this.parseDates&&!this.equalSpacing?(n.getTime()-this.startTime)*this.stepWidth:this.parseDates&&this.equalSpacing?(n=this.chart.getClosestIndex(this.data,"time",n.getTime(),!1,0,this.data.length-1),this.getCoordinate(n-this.start)):NaN},categoryToCoordinate:function(n){if(this.chart){if(this.parseDates)return this.dateToCoordinate(new Date(n));if(n=this.chart.getCategoryIndexByValue(n),!isNaN(n))return this.getCoordinate(n-this.start)}else return NaN},coordinateToDate:function(n){return this.equalSpacing?(n=this.xToIndex(n),new Date(this.data[n].time)):new Date(this.startTime+n/this.stepWidth)},coordinateToValue:function(n){return n=this.xToIndex(n),(n=this.data[n])?this.parseDates?n.time:n.category:void 0},getCoordinate:function(n){return n*=this.stepWidth,this.startOnAxis||(n+=this.stepWidth/2),Math.round(n)},formatValue:function(t,i){return i||(i=this.currentDateFormat),this.parseDates&&(t=n.formatDate(new Date(t),i,this.chart)),t},showBalloonAt:function(n,t){return void 0===t&&(t=this.parseDates?this.dateToCoordinate(new Date(n)):this.categoryToCoordinate(n)),this.adjustBalloonCoordinate(t)},formatBalloonText:function(t,i,r){var u="",f="",s=this.chart,e=this.data[i],o;return e&&(this.parseDates?(u=n.formatDate(e.category,r,s),i=n.changeDate(new Date(e.category),this.minPeriod,1),f=n.formatDate(i,r,s),-1!=u.indexOf("fff")&&(u=n.formatMilliseconds(u,e.category),f=n.formatMilliseconds(f,i))):(this.data[i+1]&&(o=this.data[i+1]),u=n.fixNewLines(e.category),o&&(f=n.fixNewLines(o.category)))),t=t.replace(/\[\[category\]\]/g,String(u)),t.replace(/\[\[toCategory\]\]/g,String(f))},adjustBalloonCoordinate:function(n,t){var e=this.xToIndex(n),r=this.chart.chartCursor,f,i,u,o;return this.stickBalloonToCategory&&(f=this.data[e],f&&(n=f.x[this.id]),this.stickBalloonToStart&&(n-=this.cellWidth/2),i=0,r&&(u=r.limitToGraph,u&&(o=u.valueAxis.id,u.hidden||(i=f.axes[o].graphs[u.id].y)),this.rotate?("left"==this.position?(u&&(i-=r.width),0<i&&(i=0)):0>i&&(i=0),r.fixHLine(n,i)):("top"==this.position?(u&&(i-=r.height),0<i&&(i=0)):0>i&&(i=0),r.fullWidth&&(n+=1),r.fixVLine(n,i)))),r&&!t&&(r.setIndex(e),this.parseDates&&r.setTimestamp(this.coordinateToDate(n).getTime())),n}})}();AmCharts.themes.light={themeName:"light",AmChart:{color:"#000000",backgroundColor:"#FFFFFF"},AmCoordinateChart:{colors:["#67b7dc","#fdd400","#84b761","#cc4748","#cd82ad","#2f4074","#448e4d","#b7b83f","#b9783f","#b93e3d","#913167"]},AmStockChart:{colors:["#67b7dc","#fdd400","#84b761","#cc4748","#cd82ad","#2f4074","#448e4d","#b7b83f","#b9783f","#b93e3d","#913167"]},AmSlicedChart:{colors:["#67b7dc","#fdd400","#84b761","#cc4748","#cd82ad","#2f4074","#448e4d","#b7b83f","#b9783f","#b93e3d","#913167"],outlineAlpha:1,outlineThickness:2,labelTickColor:"#000000",labelTickAlpha:.3},AmRectangularChart:{zoomOutButtonColor:"#000000",zoomOutButtonRollOverAlpha:.15,zoomOutButtonImage:"lens"},AxisBase:{axisColor:"#000000",axisAlpha:.3,gridAlpha:.1,gridColor:"#000000"},ChartScrollbar:{backgroundColor:"#000000",backgroundAlpha:.12,graphFillAlpha:.5,graphLineAlpha:0,selectedBackgroundColor:"#FFFFFF",selectedBackgroundAlpha:.4,gridAlpha:.15},ChartCursor:{cursorColor:"#000000",color:"#FFFFFF",cursorAlpha:.5},AmLegend:{color:"#000000"},AmGraph:{lineAlpha:.9},GaugeArrow:{color:"#000000",alpha:.8,nailAlpha:0,innerRadius:"40%",nailRadius:15,startWidth:15,borderAlpha:.8,nailBorderAlpha:0},GaugeAxis:{tickColor:"#000000",tickAlpha:1,tickLength:15,minorTickLength:8,axisThickness:3,axisColor:"#000000",axisAlpha:1,bandAlpha:.8},TrendLine:{lineColor:"#c03246",lineAlpha:.8},AreasSettings:{alpha:.8,color:"#67b7dc",colorSolid:"#003767",unlistedAreasAlpha:.4,unlistedAreasColor:"#000000",outlineColor:"#FFFFFF",outlineAlpha:.5,outlineThickness:.5,rollOverColor:"#3c5bdc",rollOverOutlineColor:"#FFFFFF",selectedOutlineColor:"#FFFFFF",selectedColor:"#f15135",unlistedAreasOutlineColor:"#FFFFFF",unlistedAreasOutlineAlpha:.5},LinesSettings:{color:"#000000",alpha:.8},ImagesSettings:{alpha:.8,labelColor:"#000000",color:"#000000",labelRollOverColor:"#3c5bdc"},ZoomControl:{buttonFillAlpha:.7,buttonIconColor:"#a7a7a7"},SmallMap:{mapColor:"#000000",rectangleColor:"#f15135",backgroundColor:"#FFFFFF",backgroundAlpha:.7,borderThickness:1,borderAlpha:.8},PeriodSelector:{color:"#000000"},PeriodButton:{color:"#000000",background:"transparent",opacity:.7,border:"1px solid rgba(0, 0, 0, .3)",MozBorderRadius:"5px",borderRadius:"5px",margin:"1px",outline:"none",boxSizing:"border-box"},PeriodButtonSelected:{color:"#000000",backgroundColor:"#b9cdf5",border:"1px solid rgba(0, 0, 0, .3)",MozBorderRadius:"5px",borderRadius:"5px",margin:"1px",outline:"none",opacity:1,boxSizing:"border-box"},PeriodInputField:{color:"#000000",background:"transparent",border:"1px solid rgba(0, 0, 0, .3)",outline:"none"},DataSetSelector:{color:"#000000",selectedBackgroundColor:"#b9cdf5",rollOverBackgroundColor:"#a8b0e4"},DataSetCompareList:{color:"#000000",lineHeight:"100%",boxSizing:"initial",webkitBoxSizing:"initial",border:"1px solid rgba(0, 0, 0, .3)"},DataSetSelect:{border:"1px solid rgba(0, 0, 0, .3)",outline:"none"}};AmCharts.translations["export"]||(AmCharts.translations["export"]={});AmCharts.translations["export"].en||(AmCharts.translations["export"].en={"fallback.save.text":"CTRL + C to copy the data into the clipboard.","fallback.save.image":"Rightclick -> Save picture as... to save the image.","capturing.delayed.menu.label":"{{duration}}","capturing.delayed.menu.title":"Click to cancel","menu.label.print":"Print","menu.label.undo":"Undo","menu.label.redo":"Redo","menu.label.cancel":"Cancel","menu.label.save.image":"Download as ...","menu.label.save.data":"Save as ...","menu.label.draw":"Annotate ...","menu.label.draw.change":"Change ...","menu.label.draw.add":"Add ...","menu.label.draw.shapes":"Shape ...","menu.label.draw.colors":"Color ...","menu.label.draw.widths":"Size ...","menu.label.draw.opacities":"Opacity ...","menu.label.draw.text":"Text","menu.label.draw.modes":"Mode ...","menu.label.draw.modes.pencil":"Pencil","menu.label.draw.modes.line":"Line","menu.label.draw.modes.arrow":"Arrow","label.saved.from":"Saved from: "}),function(){AmCharts["export"]=function(n,t){var r,i={name:"export",version:"1.4.76",libs:{async:!0,autoLoad:!0,reload:!1,resources:["fabric.js/fabric.min.js","FileSaver.js/FileSaver.min.js",{"jszip/jszip.min.js":["xlsx/xlsx.min.js"],"pdfmake/pdfmake.min.js":["pdfmake/vfs_fonts.js"]}],namespaces:{"pdfmake.min.js":"pdfMake","jszip.min.js":"JSZip","xlsx.min.js":"XLSX","fabric.min.js":"fabric","FileSaver.min.js":"saveAs"},loadTimeout:1e4,unsupportedIE9libs:["pdfmake.min.js","jszip.min.js","xlsx.min.js"]},config:{},setup:{chart:n,hasBlob:!1,wrapper:!1,isIE:!!window.document.documentMode,IEversion:window.document.documentMode,hasTouch:"object"==typeof window.Touch,focusedMenuItem:void 0,hasClasslist:"classList"in document.createElement("_")},drawing:{enabled:!1,undos:[],redos:[],buffer:{position:{x1:0,y1:0,x2:0,y2:0,xD:0,yD:0}},handler:{undo:function(){var n=i.drawing.undos.pop(),t;if(n){if(n.selectable=!0,i.drawing.redos.push(n),"added"==n.action)i.setup.fabric.remove(n.target);else{if(!n.target.changed&&"added:modified"==n.action)return void i.drawing.handler.undo();t=JSON.parse(n.state);n.target.recentState=n.state;n.target instanceof fabric.Group?(t=i.prepareGroupState(t),n.target.set(t),i.drawing.handler.change({color:t.cfg.color,width:t.cfg.width,opacity:t.cfg.opacity},!0,n.target)):n.target.set(t)}i.setup.fabric.renderAll()}},redo:function(){var n=i.drawing.redos.pop(),t;if(n){if(n.selectable=!0,i.drawing.undos.push(n),"added"==n.action)i.setup.fabric.add(n.target);else if("added:modified"==n.action)return void i.drawing.handler.redo();t=JSON.parse(n.state);n.target.recentState=n.state;n.target instanceof fabric.Group?(t=i.prepareGroupState(t),n.target.set(t),i.drawing.handler.change({color:t.cfg.color,width:t.cfg.width,opacity:t.cfg.opacity},!0,n.target)):n.target.set(t);i.setup.fabric.renderAll()}},done:function(){i.drawing.enabled=!1;i.drawing.buffer.enabled=!1;i.drawing.undos=[];i.drawing.redos=[];i.createMenu(i.config.menu);i.setup.fabric.deactivateAll();i.isElement(i.setup.wrapper)&&i.isElement(i.setup.wrapper.parentNode)&&i.setup.wrapper.parentNode.removeChild&&(i.setup.wrapper.parentNode.removeChild(i.setup.wrapper),i.setup.wrapper=!1)},add:function(n){var t=i.deepMerge({top:i.setup.fabric.height/2,left:i.setup.fabric.width/2},n||{}),r=-1==t.url.indexOf(".svg")?fabric.Image.fromURL:fabric.loadSVGFromURL;r(t.url,function(n,r){var u=void 0===r?n:fabric.util.groupSVGElements(n,r),f=!1;(u.height>i.setup.fabric.height||u.width>i.setup.fabric.width)&&(f=i.setup.fabric.height/2/u.height);t.top>i.setup.fabric.height&&(t.top=i.setup.fabric.height/2);t.left>i.setup.fabric.width&&(t.left=i.setup.fabric.width/2);i.drawing.buffer.isDrawing=!0;u.set({originX:"center",originY:"center",top:t.top,left:t.left,width:f?u.width*f:u.width,height:f?u.height*f:u.height,fill:i.drawing.color});i.setup.fabric.add(u)})},change:function(n,t,r){var s,f,h,u=i.deepMerge({},n||{}),e=r||i.drawing.buffer.target,o=e?e._objects?e._objects:[e]:null;if(u.mode&&(i.drawing.mode=u.mode),u.width&&(i.drawing.width=u.width,i.drawing.fontSize=u.fontSize=3*u.width,1==i.drawing.width&&(i.drawing.fontSize=u.fontSize=i.defaults.fabric.drawing.fontSize)),u.fontSize&&(i.drawing.fontSize=u.fontSize),u.color&&(i.drawing.color=u.color),u.opacity&&(i.drawing.opacity=u.opacity),h=i.getRGBA(i.drawing.color),h.pop(),h.push(i.drawing.opacity),i.drawing.color="rgba("+h.join()+")",i.setup.fabric.freeDrawingBrush.color=i.drawing.color,i.setup.fabric.freeDrawingBrush.width=i.drawing.width,e){for(s=JSON.parse(e.recentState).cfg,s&&(u.color=u.color||s.color,u.width=u.width||s.width,u.opacity=u.opacity||s.opacity,u.fontSize=u.fontSize||s.fontSize,h=i.getRGBA(u.color),h.pop(),h.push(u.opacity),u.color="rgba("+h.join()+")"),e.changed=!0,f=0;f<o.length;f++)o[f]instanceof fabric.Text||o[f]instanceof fabric.PathGroup||o[f]instanceof fabric.Triangle?((u.color||u.opacity)&&o[f].set({fill:u.color}),u.fontSize&&o[f].set({fontSize:u.fontSize})):(o[f]instanceof fabric.Path||o[f]instanceof fabric.Line)&&(e instanceof fabric.Group?(u.color||u.opacity)&&o[f].set({stroke:u.color}):((u.color||u.opacity)&&o[f].set({stroke:u.color}),u.width&&o[f].set({strokeWidth:u.width})));t||(s=JSON.stringify(i.deepMerge(i.getState(e),{cfg:{color:u.color,width:u.width,opacity:u.opacity}})),e.recentState=s,i.drawing.redos=[],i.drawing.undos.push({action:"modified",target:e,state:s}));i.setup.fabric.renderAll()}},text:function(n){var r=i.deepMerge({text:i.i18l("menu.label.draw.text"),top:i.setup.fabric.height/2,left:i.setup.fabric.width/2,fontSize:i.drawing.fontSize,fontFamily:i.setup.chart.fontFamily||"Verdana",fill:i.drawing.color},n||{}),t;return r.click=function(){},t=new fabric.IText(r.text,r),i.drawing.buffer.isDrawing=!0,i.setup.fabric.add(t),i.setup.fabric.setActiveObject(t),t.selectAll(),t.enterEditing(),t},line:function(n){var r,s,f,e,t=i.deepMerge({x1:i.setup.fabric.width/2-i.setup.fabric.width/10,x2:i.setup.fabric.width/2+i.setup.fabric.width/10,y1:i.setup.fabric.height/2,y2:i.setup.fabric.height/2,angle:90,strokeLineCap:i.drawing.lineCap,arrow:i.drawing.arrow,color:i.drawing.color,width:i.drawing.width,group:[]},n||{}),o=new fabric.Line([t.x1,t.y1,t.x2,t.y2],{stroke:t.color,strokeWidth:t.width,strokeLineCap:t.strokeLineCap}),u;if(t.group.push(o),t.arrow&&(t.angle=t.angle?t.angle:i.getAngle(t.x1,t.y1,t.x2,t.y2),"start"==t.arrow?(f=t.y1+t.width/2,e=t.x1+t.width/2):"middle"==t.arrow?(f=t.y2+t.width/2-(t.y2-t.y1)/2,e=t.x2+t.width/2-(t.x2-t.x1)/2):(f=t.y2+t.width/2,e=t.x2+t.width/2),s=new fabric.Triangle({top:f,left:e,fill:t.color,height:7*t.width,width:7*t.width,angle:t.angle,originX:"center",originY:"bottom"}),t.group.push(s)),i.drawing.buffer.isDrawing=!0,"config"!=t.action)return t.arrow?(u=new fabric.Group(t.group),u.set({cfg:t,fill:t.color,action:t.action,selectable:!0,known:"change"==t.action}),"change"==t.action&&i.setup.fabric.setActiveObject(u),i.setup.fabric.add(u),u):(i.setup.fabric.add(o),o);for(r=0;r<t.group.length;r++)t.group[r].ignoreUndo=!0,i.setup.fabric.add(t.group[r]);return t}}},defaults:{position:"top-right",fileName:"amCharts",action:"download",overflow:!0,path:(n.path||"")+"plugins/export/",formats:{JPG:{mimeType:"image/jpg",extension:"jpg",capture:!0},PNG:{mimeType:"image/png",extension:"png",capture:!0},SVG:{mimeType:"text/xml",extension:"svg",capture:!0},PDF:{mimeType:"application/pdf",extension:"pdf",capture:!0},CSV:{mimeType:"text/plain",extension:"csv"},JSON:{mimeType:"text/plain",extension:"json"},XLSX:{mimeType:"application/octet-stream",extension:"xlsx"}},fabric:{backgroundColor:"#FFFFFF",removeImages:!0,forceRemoveImages:!1,selection:!1,loadTimeout:5e3,drawing:{enabled:!0,arrow:"end",lineCap:"butt",mode:"pencil",modes:["pencil","line","arrow"],color:"#000000",colors:["#000000","#FFFFFF","#FF0000","#00FF00","#0000FF"],shapes:["11.svg","14.svg","16.svg","17.svg","20.svg","27.svg"],width:1,fontSize:11,widths:[1,5,10,15],opacity:1,opacities:[1,.8,.6,.4,.2],menu:void 0,autoClose:!0},border:{fill:"",fillOpacity:0,stroke:"#000000",strokeWidth:1,strokeOpacity:1}},pdfMake:{images:{},pageOrientation:"portrait",pageMargins:40,pageOrigin:!0,pageSize:"A4",pageSizes:{"4A0":[4767.87,6740.79],"2A0":[3370.39,4767.87],A0:[2383.94,3370.39],A1:[1683.78,2383.94],A2:[1190.55,1683.78],A3:[841.89,1190.55],A4:[595.28,841.89],A5:[419.53,595.28],A6:[297.64,419.53],A7:[209.76,297.64],A8:[147.4,209.76],A9:[104.88,147.4],A10:[73.7,104.88],B0:[2834.65,4008.19],B1:[2004.09,2834.65],B2:[1417.32,2004.09],B3:[1000.63,1417.32],B4:[708.66,1000.63],B5:[498.9,708.66],B6:[354.33,498.9],B7:[249.45,354.33],B8:[175.75,249.45],B9:[124.72,175.75],B10:[87.87,124.72],C0:[2599.37,3676.54],C1:[1836.85,2599.37],C2:[1298.27,1836.85],C3:[918.43,1298.27],C4:[649.13,918.43],C5:[459.21,649.13],C6:[323.15,459.21],C7:[229.61,323.15],C8:[161.57,229.61],C9:[113.39,161.57],C10:[79.37,113.39],RA0:[2437.8,3458.27],RA1:[1729.13,2437.8],RA2:[1218.9,1729.13],RA3:[864.57,1218.9],RA4:[609.45,864.57],SRA0:[2551.18,3628.35],SRA1:[1814.17,2551.18],SRA2:[1275.59,1814.17],SRA3:[907.09,1275.59],SRA4:[637.8,907.09],EXECUTIVE:[521.86,756],FOLIO:[612,936],LEGAL:[612,1008],LETTER:[612,792],TABLOID:[792,1224]}},menu:void 0,divId:null,menuReviver:null,menuWalker:null,fallback:!0,keyListener:!0,fileListener:!0,compress:!0,debug:!1},listenersToRemove:[],i18l:function(n,t){var r=t?t:i.setup.chart.language?i.setup.chart.language:"en",u=AmCharts.translations[i.name][r]||AmCharts.translations[i.name].en;return u[n]||n},prepareGroupState:function(n){return n=n||{},delete n.width,delete n.strokeWidth,n},getState:function(n){var t=n.saveState();return t._stateProperties||t.originalState},download:function(n,t,r){if(window.saveAs&&i.setup.hasBlob)i.toBlob({data:n,type:t},function(n){saveAs(n,r)});else if(i.config.fallback&&"text/plain"==t){var u=document.createElement("div"),f=document.createElement("div"),e=document.createElement("textarea");f.innerHTML=i.i18l("fallback.save.text");u.appendChild(f);u.appendChild(e);f.setAttribute("class","amcharts-export-fallback-message");u.setAttribute("class","amcharts-export-fallback");i.setup.chart.containerDiv.appendChild(u);e.setAttribute("readonly","");e.value=n;e.focus();e.select();i.createMenu([{"class":"export-main export-close",label:"Done",click:function(){i.createMenu(i.config.menu);i.isElement(i.setup.chart.containerDiv)&&i.setup.chart.containerDiv.removeChild(u)}}])}else if(i.config.fallback&&"image"==t.split("/")[0]){var u=document.createElement("div"),f=document.createElement("div"),o=i.toImage({data:n});f.innerHTML=i.i18l("fallback.save.image");u.appendChild(f);u.appendChild(o);f.setAttribute("class","amcharts-export-fallback-message");u.setAttribute("class","amcharts-export-fallback");i.setup.chart.containerDiv.appendChild(u);i.createMenu([{"class":"export-main export-close",label:"Done",click:function(){i.createMenu(i.config.menu);i.isElement(i.setup.chart.containerDiv)&&i.setup.chart.containerDiv.removeChild(u)}}])}else throw new Error("Unable to create file. Ensure saveAs (FileSaver.js) is supported.");return n},loadResource:function(n,t){function s(){i.handleLog(["amCharts[export]: Loading error on ",this.src||this.href].join(""))}function h(){if(t)for(u=0;u<t.length;u++)i.loadResource(t[u])}var u,e,r,f,o,l,c=-1==n.indexOf("//")?[i.libs.path,n].join(""):n;for(-1==n.indexOf(".js")?-1!=n.indexOf(".css")&&(r=document.createElement("link"),r.setAttribute("type","text/css"),r.setAttribute("rel","stylesheet"),r.setAttribute("href",c)):(r=document.createElement("script"),r.setAttribute("type","text/javascript"),r.setAttribute("src",c),i.libs.async&&r.setAttribute("async","")),u=0;u<document.head.childNodes.length;u++)if(f=document.head.childNodes[u],o=!!f&&(f.src||f.href),l=!!f&&f.tagName,f&&o&&-1!=o.indexOf(n)){i.libs.reload&&document.head.removeChild(f);e=!0;break}Object.keys(i.libs.namespaces).some(function(t){var u=i.libs.namespaces[t],f=n.toLowerCase(),r=t.toLowerCase();if(-1!=f.indexOf(r)){if(i.setup.isIE&&9>=i.setup.IEversion&&i.libs.unsupportedIE9libs&&-1!=i.libs.unsupportedIE9libs.indexOf(r))return!1;if(void 0!==window[u])return e=!0,!0}});(!e||i.libs.reload)&&(r.addEventListener("load",h),i.addListenerToRemove("load",r,h),r.addEventListener("error",s),i.addListenerToRemove("error",r,s),document.head.appendChild(r))},addListenerToRemove:function(n,t,r){i.listenersToRemove.push({node:t,method:r,event:n})},loadDependencies:function(){var n;if(i.libs.autoLoad)for(n=0;n<i.libs.resources.length;n++)i.libs.resources[n]instanceof Object?Object.keys(i.libs.resources[n]).some(function(t){i.loadResource(t,i.libs.resources[n][t])}):i.loadResource(i.libs.resources[n])},pxToNumber:function(n,t){if(n||!t)return+(n+"").replace("px","")||0},numberToPx:function(n){return n+"px"},cloneObject:function(n){var r,t,u,f;return r=Array.isArray(n)?[]:{},Object.keys(n).some(function(e){t=n[e];u="object"==typeof t;f=t instanceof Date;r[e]=u&&!f?i.cloneObject(t):t}),r},deepMerge:function(n,t,r){var u,f=t instanceof Array?"array":"object";return n instanceof Object||n instanceof Array?(Object.keys(t).some(function(e){return"array"==f&&isNaN(e)?!1:void(u=t[e],(n&&void 0==n[e]||r)&&(u instanceof Array?n[e]=[]:u instanceof Function?n[e]=function(){}:u instanceof Date?n[e]=new Date:u instanceof Object?n[e]={}:u instanceof Number?n[e]=new Number:u instanceof String&&(n[e]=new String)),(u instanceof Object||u instanceof Array)&&!(u instanceof Function||u instanceof Date||i.isElement(u))&&"chart"!=e&&"scope"!=e?i.deepMerge(n[e],u,r):n instanceof Array&&!r?n.push(u):n&&(n[e]=u))}),n):n},isElement:function(n){return n instanceof Object&&n&&1===n.nodeType},isHashbanged:function(n){var t=(n+"").replace(/\"/g,"");return"url"==t.slice(0,3)&&t.slice(t.indexOf("#")+1,t.length-1)},isPressed:function(n){return"mousemove"==n.type&&1===n.which||(i.drawing.buffer.isPressed="touchmove"==n.type||1===n.buttons||1===n.button||1===n.which?!0:!1),i.drawing.buffer.isPressed},removeImage:function(n){return n&&(i.config.fabric.forceRemoveImages||i.config.fabric.removeImages&&i.isTainted(n)||i.setup.isIE&&(10==i.setup.IEversion||11==i.setup.IEversion)&&-1!=n.toLowerCase().indexOf(".svg"))?!0:!1},isTainted:function(n){var t=(window.location.origin||window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:""))+"";return n&&(-1!=t.indexOf(":\\")||-1!=n.indexOf(":\\")||-1!=t.indexOf("file://")||-1!=n.indexOf("file://")||-1!=n.indexOf("//")&&-1==n.indexOf(t.replace(/.*:/,"")))?!0:!1},isSupported:function(){return!!i.config.enabled&&(i.setup.isIE&&9>=i.setup.IEversion&&(!Array.prototype.indexOf||!document.head||!1===i.config.fallback)?!1:!0)},getAngle:function(n,t,i,r){var e,f=i-n,u=r-t;return e=0==f?0==u?0:0<u?Math.PI/2:3*Math.PI/2:0==u?0<f?0:Math.PI:0>f?Math.atan(u/f)+Math.PI:0>u?Math.atan(u/f)+2*Math.PI:Math.atan(u/f),180*e/Math.PI},gatherAttribute:function(n,t,r,u){var f,u=u?u:0,r=r?r:3;return n&&(f=n.getAttribute(t),!f&&u<r)?i.gatherAttribute(n.parentNode,t,r,u+1):f},gatherClassName:function(n,t,r,u){var f,u=u?u:0,r=r?r:3;if(i.isElement(n)){if(f=-1!=(n.getAttribute("class")||"").split(" ").indexOf(t),!f&&u<r)return i.gatherClassName(n.parentNode,t,r,u+1);f&&(f=n)}return f},gatherElements:function(n,t,r){for(var f,u,h,a,e,o,s=0;s<n.children.length;s++)if(u=n.children[s],"clipPath"==u.tagName){for(h={},a=fabric.parseTransformAttribute(i.gatherAttribute(u,"transform")),f=0;f<u.childNodes.length;f++)u.childNodes[f].setAttribute("fill","transparent"),h={x:i.pxToNumber(u.childNodes[f].getAttribute("x")),y:i.pxToNumber(u.childNodes[f].getAttribute("y")),width:i.pxToNumber(u.childNodes[f].getAttribute("width")),height:i.pxToNumber(u.childNodes[f].getAttribute("height"))};n.clippings[u.id]={svg:u,bbox:h,transform:a}}else if("pattern"==u.tagName){for(e={node:u,source:u.getAttribute("xlink:href"),width:+u.getAttribute("width"),height:+u.getAttribute("height"),repeat:"repeat",offsetX:0,offsetY:0},f=0;f<u.childNodes.length;f++)"rect"==u.childNodes[f].tagName?e.fill=u.childNodes[f].getAttribute("fill"):"image"==u.childNodes[f].tagName&&(o=fabric.parseAttributes(u.childNodes[f],fabric.SHARED_ATTRIBUTES),o.transformMatrix&&(e.offsetX=o.transformMatrix[4],e.offsetY=o.transformMatrix[5]));i.removeImage(e.source)?n.patterns[u.id]=e.fill?e.fill:"transparent":n.patterns[e.node.id]=e}else if("image"==u.tagName)r.included++,fabric.Image.fromURL(u.getAttribute("xlink:href"),function(){r.loaded++});else for(o=["fill","stroke"],f=0;f<o.length;f++){var c=o[f],l=u.getAttribute(c),v=i.getRGBA(l),y=i.isHashbanged(l);!l||v||y||(u.setAttribute(c,"none"),u.setAttribute(c+"-opacity","0"))}return n},getRGBA:function(n,t){return"none"!=n&&"transparent"!=n&&!i.isHashbanged(n)&&(n=new fabric.Color(n),n._source)&&(t?n:n.getSource())},gatherPosition:function(n,t){var u,r=i.drawing.buffer.position,f=fabric.util.invertTransform(i.setup.fabric.viewportTransform);return"touchmove"==n.type&&("touches"in n?n=n.touches[0]:"changedTouches"in n&&(n=n.changedTouches[0])),u=fabric.util.transformPoint(i.setup.fabric.getPointer(n,!0),f),1==t&&(r.x1=u.x,r.y1=u.y),r.x2=u.x,r.y2=u.y,r.xD=0>r.x1-r.x2?-1*(r.x1-r.x2):r.x1-r.x2,r.yD=0>r.y1-r.y2?-1*(r.y1-r.y2):r.y1-r.y2,r},modifyFabric:function(){fabric.ElementsParser.prototype.resolveGradient=function(n,t){var u=n.get(t),f,r;/^url\(/.test(u)&&(f=u.slice(u.indexOf("#")+1,u.length-1),fabric.gradientDefs[this.svgUid][f]&&(r=fabric.Gradient.fromElement(fabric.gradientDefs[this.svgUid][f],n),r.coords.y1&&"pie"!=i.setup.chart.type&&(r.coords.y2=-1*r.coords.y1,r.coords.y1=0),n.set(t,r)))};fabric.Text.fromElement=function(n,t){var u,o,r,e,i,f;if(!n)return null;if(u=fabric.parseAttributes(n,fabric.Text.ATTRIBUTE_NAMES),t=fabric.util.object.extend(t?fabric.util.object.clone(t):{},u),t.top=t.top||0,t.left=t.left||0,"dx"in u&&(t.left+=u.dx),"dy"in u&&(t.top+=u.dy),"fontSize"in t||(t.fontSize=fabric.Text.DEFAULT_SVG_FONT_SIZE),t.originX||(t.originX="left"),o="",r=[],"textContent"in n)if(n.childNodes)for(e=0;e<n.childNodes.length;e++)r.push(n.childNodes[e].textContent);else r.push(n.textContent);else"firstChild"in n&&null!==n.firstChild&&"data"in n.firstChild&&null!==n.firstChild.data&&r.push(n.firstChild.data);return o=r.join("\n"),i=new fabric.Text(o,t),f=0,"left"===i.originX&&(f=i.getWidth()/2),"right"===i.originX&&(f=-i.getWidth()/2),1<r.length?i.set({left:i.getLeft()+f,top:i.getTop()+i.fontSize*(r.length-1)*(.18+i._fontSizeFraction),textAlign:t.originX,lineHeight:1<r.length?.965:1.16}):i.set({left:i.getLeft()+f,top:i.getTop()-i.getHeight()/2+i.fontSize*(.18+i._fontSizeFraction)}),i}},capture:function(n,t){var f,o=i.deepMerge(i.deepMerge({},i.config.fabric),n||{}),h=[],u={x:0,y:0,pX:0,pY:0,lX:0,lY:0,width:i.setup.chart.divRealWidth,height:i.setup.chart.divRealHeight},c={loaded:0,included:0},e={items:[],width:0,height:0,maxWidth:0,maxHeight:0},a,l,s,v,r;if(!i.handleNamespace("fabric",{scope:this,cb:i.capture,args:arguments}))return!1;for(i.modifyFabric(),i.handleCallback(o.beforeCapture,o),a=i.setup.chart.containerDiv.getElementsByTagName("svg"),f=0;f<a.length;f++)r={svg:a[f],parent:a[f].parentNode,children:a[f].getElementsByTagName("*"),offset:{x:0,y:0},patterns:{},clippings:{},has:{legend:!1,panel:!1,scrollbar:!1}},r.has.legend=i.gatherClassName(r.parent,i.setup.chart.classNamePrefix+"-legend-div",1),r.has.panel=i.gatherClassName(r.parent,i.setup.chart.classNamePrefix+"-stock-panel-div"),r.has.scrollbar=i.gatherClassName(r.parent,i.setup.chart.classNamePrefix+"-scrollbar-chart-div"),r=i.gatherElements(r,o,c),h.push(r);if(i.config.legend){if("stock"==i.setup.chart.type)for(f=0;f<i.setup.chart.panels.length;f++)i.setup.chart.panels[f].stockLegend&&i.setup.chart.panels[f].stockLegend.divId&&e.items.push(i.setup.chart.panels[f].stockLegend);else i.setup.chart.legend&&i.setup.chart.legend.divId&&e.items.push(i.setup.chart.legend);for(f=0;f<e.items.length;f++)l=e.items[f],r={svg:l.container.container,parent:l.container.container.parentNode,children:l.container.container.getElementsByTagName("*"),offset:{x:0,y:0},legend:{id:f,type:-1==["top","left"].indexOf(i.config.legend.position)?"push":"unshift",position:i.config.legend.position,width:i.config.legend.width?i.config.legend.width:l.container.div.offsetWidth,height:i.config.legend.height?i.config.legend.height:l.container.div.offsetHeight},patterns:{},clippings:{},has:{legend:!1,panel:!1,scrollbar:!1}},e.width+=r.legend.width,e.height+=r.legend.height,e.maxWidth=r.legend.width>e.maxWidth?r.legend.width:e.maxWidth,e.maxHeight=r.legend.height>e.maxHeight?r.legend.height:e.maxHeight,r=i.gatherElements(r,o,c),h[r.legend.type](r);-1==["top","bottom"].indexOf(i.config.legend.position)?-1==["left","right"].indexOf(i.config.legend.position)?(u.height+=e.height,u.width+=e.maxWidth):(u.width+=e.maxWidth,u.height=e.height>u.height?e.height:u.height):(u.width=e.maxWidth>u.width?e.maxWidth:u.width,u.height+=e.height)}for((i.drawing.enabled=o.drawing.enabled="draw"==o.action,i.drawing.buffer.enabled=i.drawing.enabled,i.setup.wrapper=document.createElement("div"),i.setup.wrapper.setAttribute("class",i.setup.chart.classNamePrefix+"-export-canvas"),i.setup.chart.containerDiv.appendChild(i.setup.wrapper),"stock"==i.setup.chart.type)&&(s={top:0,right:0,bottom:0,left:0},i.setup.chart.leftContainer&&(u.width-=i.setup.chart.leftContainer.offsetWidth,s.left=i.setup.chart.leftContainer.offsetWidth+2*i.setup.chart.panelsSettings.panelSpacing),i.setup.chart.rightContainer&&(u.width-=i.setup.chart.rightContainer.offsetWidth,s.right=i.setup.chart.rightContainer.offsetWidth+2*i.setup.chart.panelsSettings.panelSpacing),i.setup.chart.periodSelector&&-1!=["top","bottom"].indexOf(i.setup.chart.periodSelector.position)&&(u.height-=i.setup.chart.periodSelector.offsetHeight+i.setup.chart.panelsSettings.panelSpacing,s[i.setup.chart.periodSelector.position]+=i.setup.chart.periodSelector.offsetHeight+i.setup.chart.panelsSettings.panelSpacing),i.setup.chart.dataSetSelector&&-1!=["top","bottom"].indexOf(i.setup.chart.dataSetSelector.position)&&(u.height-=i.setup.chart.dataSetSelector.offsetHeight,s[i.setup.chart.dataSetSelector.position]+=i.setup.chart.dataSetSelector.offsetHeight),i.setup.wrapper.style.paddingTop=i.numberToPx(s.top),i.setup.wrapper.style.paddingRight=i.numberToPx(s.right),i.setup.wrapper.style.paddingBottom=i.numberToPx(s.bottom),i.setup.wrapper.style.paddingLeft=i.numberToPx(s.left)),i.setup.canvas=document.createElement("canvas"),i.setup.wrapper.appendChild(i.setup.canvas),v=i.removeFunctionsFromObject(i.deepMerge({width:u.width,height:u.height,isDrawingMode:!0},o)),i.setup.fabric=new fabric.Canvas(i.setup.canvas,v),i.deepMerge(i.setup.fabric,o),i.deepMerge(i.setup.fabric.freeDrawingBrush,o.drawing),i.deepMerge(i.drawing,o.drawing),i.drawing.handler.change(o.drawing),i.setup.fabric.on("mouse:down",function(n){i.gatherPosition(n.e,1);i.drawing.buffer.pressedTS=+new Date;i.isPressed(n.e);i.drawing.buffer.isDrawing=!1;i.drawing.buffer.isDrawingTimer=setTimeout(function(){i.drawing.buffer.isSelected||(i.drawing.buffer.isDrawing=!0)},200)}),i.setup.fabric.on("mouse:move",function(n){var r=i.gatherPosition(n.e,2),u,e,o,t;if(i.isPressed(n.e),i.drawing.buffer.isPressed&&!i.drawing.buffer.isSelected&&(i.drawing.buffer.isDrawing=!0,!i.drawing.buffer.line&&"pencil"!=i.drawing.mode&&(5<r.xD||5<r.yD)&&(i.setup.fabric.isDrawingMode=!1,i.setup.fabric._isCurrentlyDrawing=!1,i.drawing.buffer.ignoreUndoOnMouseUp=!0,i.setup.fabric.freeDrawingBrush.onMouseUp(),i.setup.fabric.remove(i.setup.fabric._objects.pop()),i.drawing.buffer.line=i.drawing.handler.line({x1:r.x1,y1:r.y1,x2:r.x2,y2:r.y2,arrow:"line"!=i.drawing.mode&&i.drawing.arrow,action:"config"}))),i.drawing.buffer.isSelected&&(i.setup.fabric.isDrawingMode=!1),i.drawing.buffer.line){for(t=i.drawing.buffer.line,t.x2=r.x2,t.y2=r.y2,f=0;f<t.group.length;f++)u=t.group[f],u instanceof fabric.Line?u.set({x2:t.x2,y2:t.y2}):u instanceof fabric.Triangle&&(t.angle=i.getAngle(t.x1,t.y1,t.x2,t.y2)+90,"start"==t.arrow?(e=t.y1+t.width/2,o=t.x1+t.width/2):"middle"==t.arrow?(e=t.y2+t.width/2-(t.y2-t.y1)/2,o=t.x2+t.width/2-(t.x2-t.x1)/2):(e=t.y2+t.width/2,o=t.x2+t.width/2),u.set({top:e,left:o,angle:t.angle}));i.setup.fabric.renderAll()}}),i.setup.fabric.on("mouse:up",function(n){if(!i.drawing.buffer.isDrawing){var t=i.setup.fabric.findTarget(n.e);t&&t.selectable&&i.setup.fabric.setActiveObject(t)}if(i.drawing.buffer.line){for(f=0;f<i.drawing.buffer.line.group.length;f++)i.drawing.buffer.line.group[f].remove();delete i.drawing.buffer.line.action;delete i.drawing.buffer.line.group;i.drawing.handler.line(i.drawing.buffer.line)}i.drawing.buffer.line=!1;i.drawing.buffer.hasLine=!1;i.drawing.buffer.isPressed=!1;clearTimeout(i.drawing.buffer.isDrawingTimer);i.drawing.buffer.isDrawing=!1}),i.setup.fabric.on("object:selected",function(n){i.drawing.buffer.isSelected=!0;i.drawing.buffer.target=n.target;i.setup.fabric.isDrawingMode=!1}),i.setup.fabric.on("selection:cleared",function(){i.drawing.buffer.target=!1;i.drawing.buffer.isSelected&&(i.setup.fabric._isCurrentlyDrawing=!1);i.drawing.buffer.isSelected=!1;i.setup.fabric.isDrawingMode=!0}),i.setup.fabric.on("path:created",function(n){var t=n.path;if(!i.drawing.buffer.isDrawing||i.drawing.buffer.hasLine)return i.setup.fabric.remove(t),void i.setup.fabric.renderAll()}),i.setup.fabric.on("object:added",function(n){var t=n.target,r=i.deepMerge(i.getState(t),{cfg:{color:i.drawing.color,width:i.drawing.width,opacity:i.drawing.opacity,fontSize:i.drawing.fontSize}});return r=JSON.stringify(r),t.recentState=r,i.drawing.buffer.ignoreUndoOnMouseUp||!i.drawing.buffer.isDrawing?void(i.drawing.buffer.ignoreUndoOnMouseUp=!1):void(t.selectable&&!t.known&&!t.ignoreUndo&&(t.isAnnotation=!0,i.drawing.undos.push({action:"added",target:t,state:r}),i.drawing.undos.push({action:"added:modified",target:t,state:r}),i.drawing.redos=[]),t.known=!0,i.setup.fabric.isDrawingMode=!0)}),i.setup.fabric.on("object:modified",function(n){var t=n.target,u,r;console.log(t);u=JSON.parse(t.recentState);r=i.deepMerge(i.getState(t),{cfg:u.cfg});r=JSON.stringify(r);t.recentState=r;i.drawing.undos.push({action:"modified",target:t,state:r});i.drawing.redos=[]}),i.setup.fabric.on("text:changed",function(n){var t=n.target;clearTimeout(t.timer);t.timer=setTimeout(function(){var n=JSON.stringify(i.getState(t));t.recentState=n;i.drawing.redos=[];i.drawing.undos.push({action:"modified",target:t,state:n})},250)}),i.drawing.enabled?(i.setup.wrapper.setAttribute("class",i.setup.chart.classNamePrefix+"-export-canvas active"),i.setup.wrapper.style.backgroundColor=o.backgroundColor,i.setup.wrapper.style.display="block"):(i.setup.wrapper.setAttribute("class",i.setup.chart.classNamePrefix+"-export-canvas"),i.setup.wrapper.style.display="none"),f=0;f<h.length;f++)r=h[f],"stock"==i.setup.chart.type&&i.setup.chart.legendSettings.position?-1==["top","bottom"].indexOf(i.setup.chart.legendSettings.position)?-1!=["left","right"].indexOf(i.setup.chart.legendSettings.position)&&(r.offset.y=i.pxToNumber(r.parent.style.top)+u.pY,r.offset.x=i.pxToNumber(r.parent.style.left)+u.pX,r.has.legend?u.pY+=i.pxToNumber(r.has.panel.style.height)+i.setup.chart.panelsSettings.panelSpacing:r.has.scrollbar&&(r.offset.y-=i.setup.chart.panelsSettings.panelSpacing)):r.parent.style.top&&r.parent.style.left?(r.offset.y=i.pxToNumber(r.parent.style.top),r.offset.x=i.pxToNumber(r.parent.style.left)):(r.offset.x=u.x,r.offset.y=u.y,u.y+=i.pxToNumber(r.parent.style.height),r.has.panel?(u.pY=i.pxToNumber(r.has.panel.style.marginTop),r.offset.y+=u.pY):r.has.scrollbar&&(r.offset.y+=u.pY)):("absolute"==r.parent.style.position?(r.offset.absolute=!0,r.offset.top=i.pxToNumber(r.parent.style.top),r.offset.right=i.pxToNumber(r.parent.style.right,!0),r.offset.bottom=i.pxToNumber(r.parent.style.bottom,!0),r.offset.left=i.pxToNumber(r.parent.style.left),r.offset.width=i.pxToNumber(r.parent.style.width),r.offset.height=i.pxToNumber(r.parent.style.height)):r.parent.style.top&&r.parent.style.left?(r.offset.y=i.pxToNumber(r.parent.style.top),r.offset.x=i.pxToNumber(r.parent.style.left)):r.legend?("left"==r.legend.position?u.x=e.maxWidth:"right"==r.legend.position?r.offset.x=u.width-e.maxWidth:"top"==r.legend.position?u.y+=r.legend.height:"bottom"==r.legend.position&&(r.offset.y=u.height-e.height),r.offset.y+=u.lY,u.lY+=r.legend.height):(r.offset.x=u.x,r.offset.y=u.y+u.pY,u.y+=i.pxToNumber(r.parent.style.height)),r.has.legend&&r.has.panel&&r.has.panel.style.marginTop?(u.y+=i.pxToNumber(r.has.panel.style.marginTop),r.offset.y+=i.pxToNumber(r.has.panel.style.marginTop)):i.setup.chart.legend&&-1!=["left","right"].indexOf(i.setup.chart.legend.position)&&(r.offset.y=i.pxToNumber(r.parent.style.top),r.offset.x=i.pxToNumber(r.parent.style.left))),fabric.parseSVGDocument(r.svg,function(n){return function(r,f){var e,s=fabric.util.groupSVGElements(r,f),d=[],p={selectable:!1,isCoreElement:!0},v,b,w,g,nt;for(n.offset.absolute?(p.top=void 0===n.offset.bottom?n.offset.top:u.height-n.offset.height-n.offset.bottom,p.left=void 0===n.offset.right?n.offset.left:u.width-n.offset.width-n.offset.right):(p.top=n.offset.y,p.left=n.offset.x),e=0;e<s.paths.length;e++){if(v=null,s.paths[e]){if(i.removeImage(s.paths[e]["xlink:href"]))continue;s.paths[e].fill instanceof Object?"radial"==s.paths[e].fill.type&&-1==["pie","gauge"].indexOf(i.setup.chart.type)&&(s.paths[e].fill.coords.r2=-1*s.paths[e].fill.coords.r1,s.paths[e].fill.coords.r1=0,s.paths[e].set({opacity:s.paths[e].fillOpacity})):(v=i.isHashbanged(s.paths[e].fill))&&n.patterns&&n.patterns[v]&&(b=n.patterns[v],c.included++,fabric.Image.fromURL(b.source,function(n,t){return function(r){var u,f;c.loaded++;r.set({top:n.offsetY,left:n.offsetX,width:n.width,height:n.height});i.setup.fabric._isRetinaScaling()&&r.set({top:n.offsetY/2,left:n.offsetX/2,scaleX:.5,scaleY:.5});u=new fabric.StaticCanvas(void 0,{backgroundColor:n.fill,width:r.getWidth(),height:r.getHeight()});u.add(r);f=new fabric.Pattern({source:u.getElement(),offsetX:s.paths[t].width/2,offsetY:s.paths[t].height/2,repeat:"repeat"});s.paths[t].set({fill:f,opacity:s.paths[t].fillOpacity})}}(b,e)));(v=i.isHashbanged(s.paths[e].clipPath))&&n.clippings&&n.clippings[v]&&(function(t,i){var r=s.paths[t].toSVG;s.paths[t].toSVG=function(t){return r.apply(this,[function(r){return t(r,n.clippings[i])}])}}(e,v),s.paths[e].set({clipTo:function(t,r){return function(u){var e=n.clippings[r],o=this.transformMatrix||[1,0,0,1,0,0],f={top:e.bbox.y,left:e.bbox.x,width:e.bbox.width,height:e.bbox.height};"map"==i.setup.chart.type&&(f.top+=e.transform[5],f.left+=e.transform[4]);e.bbox.x&&o[4]&&e.bbox.y&&o[5]&&(f.top-=o[5],f.left-=o[4]);void 0!==i.setup.chart.smoothCustomBullets&&this.className==i.setup.chart.classNamePrefix+"-graph-bullet"&&"image"==s.paths[t].svg.tagName?(radius=e.svg.firstChild.rx.baseVal.value/2+2,u.beginPath(),u.moveTo(f.left+radius,f.top),u.lineTo(f.left+f.width-radius,f.top),u.quadraticCurveTo(f.left+f.width,f.top,f.left+f.width,f.top+radius),u.lineTo(f.left+f.width,f.top+f.height-radius),u.quadraticCurveTo(f.left+f.width,f.top+f.height,f.left+f.width-radius,f.top+f.height),u.lineTo(f.left+radius,f.top+f.height),u.quadraticCurveTo(f.left,f.top+f.height,f.left,f.top+f.height-radius),u.lineTo(f.left,f.top+radius),u.quadraticCurveTo(f.left,f.top,f.left+radius,f.top),u.closePath()):u.rect(f.left,f.top,f.width,f.height)}}(e,v)}))}d.push(s.paths[e])}if(s.paths=d,s.set(p),i.setup.fabric.add(s),n.svg.parentNode&&n.svg.parentNode.getElementsByTagName)for(w=n.svg.parentNode.getElementsByClassName(i.setup.chart.classNamePrefix+"-balloon-div"),e=0;e<w.length;e++)if(o.balloonFunction instanceof Function)o.balloonFunction.apply(i,[w[e],n]);else{var a=w[e],l=fabric.parseStyleAttribute(a),y=fabric.parseStyleAttribute(a.childNodes[0]),k=new fabric.Text(a.innerText||a.textContent||a.innerHTML,{selectable:!1,top:i.pxToNumber(l.top)+n.offset.y,left:i.pxToNumber(l.left)+n.offset.x,fill:y.color,fontSize:i.pxToNumber(y.fontSize||y["font-size"]),fontFamily:y.fontFamily||y["font-family"],textAlign:y["text-align"],isCoreElement:!0});i.setup.fabric.add(k)}if(n.svg.nextSibling&&"A"==n.svg.nextSibling.tagName){var a=n.svg.nextSibling,l=fabric.parseStyleAttribute(a),k=new fabric.Text(a.innerText||a.textContent||a.innerHTML,{selectable:!1,top:i.pxToNumber(l.top)+n.offset.y,left:i.pxToNumber(l.left)+n.offset.x,fill:l.color,fontSize:i.pxToNumber(l.fontSize||l["font-size"]),fontFamily:l.fontFamily||l["font-family"],opacity:l.opacity,isCoreElement:!0});n.has.scrollbar||i.setup.fabric.add(k)}(h.pop(),h.length)||(g=+new Date,nt=setInterval(function(){var n=+new Date;(c.loaded==c.included||n-g>i.config.fabric.loadTimeout)&&(clearTimeout(nt),i.handleBorder(o),i.handleCallback(o.afterCapture,o),i.setup.fabric.renderAll(),i.handleCallback(t,o))},AmCharts.updateRate))}}(r),function(n,t){var r,h=i.gatherAttribute(n,"class"),c=i.gatherAttribute(n,"visibility"),l=i.gatherAttribute(n,"clip-path"),e;for(t.className=h+"",t.classList=(h+"").split(" "),t.clipPath=l,t.svg=n,e=["fill","stroke"],r=0;r<e.length;r++){var u=e[r],a=(n.getAttribute(u)||"none")+"",s=+(n.getAttribute(u+"-opacity")||"1"),f=i.getRGBA(a);"hidden"==c&&(t.opacity=0,s=0);f&&(f.pop(),f.push(s),t[u]="rgba("+f.join()+")",t[u+i.capitalize("opacity")]=s)}i.handleCallback(o.reviver,t,n)})},toCanvas:function(n,t){var u=i.deepMerge({},n||{}),r=i.setup.canvas;return i.handleCallback(t,r,u),r},toImage:function(n,t){var r=i.deepMerge({format:"png",quality:1,multiplier:i.config.multiplier},n||{}),f=r.data,u=document.createElement("img");return!!i.handleNamespace("fabric",{scope:this,cb:i.toImage,args:arguments})&&(r.data||(f=r.lossless||"svg"==r.format?i.toSVG(i.deepMerge(r,{getBase64:!0})):i.setup.fabric.toDataURL(r)),u.setAttribute("src",f),i.handleCallback(t,u,r),u)},toBlob:function(n,t){var u,r=i.deepMerge({data:"empty",type:"text/plain"},n||{}),f=/^data:.+;base64,(.*)$/.exec(r.data);return f&&(r.data=f[0],r.type=r.data.slice(5,r.data.indexOf(",")-7),r.data=i.toByteArray({data:r.data.slice(r.data.indexOf(",")+1,r.data.length)})),u=r.getByteArray?r.data:new Blob([r.data],{type:r.type}),i.handleCallback(t,u,r),u},toJPG:function(n,t){var r=i.deepMerge({format:"jpeg",quality:1,multiplier:i.config.multiplier},n||{}),u;return r.format=r.format.toLowerCase(),(/iP(hone|od|ad)/.test(navigator.platform)&&(r.multiplier=1),!!i.handleNamespace("fabric",{scope:this,cb:i.toJPG,args:arguments}))&&(u=i.setup.fabric.toDataURL(r),i.handleCallback(t,u,r),u)},toPNG:function(n,t){var r,u=i.deepMerge({format:"png",quality:1,multiplier:i.config.multiplier},n||{});return(/iP(hone|od|ad)/.test(navigator.platform)&&(u.multiplier=1),!!i.handleNamespace("fabric",{scope:this,cb:i.toPNG,args:arguments}))&&(r=i.setup.fabric.toDataURL(u),i.handleCallback(t,r,u),r)},toSVG:function(n,t){var r,f=[],e=[],u=i.deepMerge({compress:i.config.compress,reviver:function(n,t){var d=new RegExp(/\bstyle=(['"])(.*?)\1/),v=d.exec(n)[0].slice(7,-1),r=v.split(";"),u=[],p,w,k;for(i1=0;i1<r.length;i1++)if(r[i1]){var y=r[i1].replace(/\s/g,"").split(":"),s=y[0],o=y[1];-1==["fill","stroke"].indexOf(s)?"opactiy"!=s&&u.push(r[i1]):(o=i.getRGBA(o,!0),o)?(p="#"+o.toHex(),w=o._source[3],u.push([s,p].join(":")),u.push([s+"-opacity",w].join(":"))):u.push(r[i1])}if(n=n.replace(v,u.join(";")),t&&t.svg){var l=t.svg.id,h=2,a=n.slice(-h);"/>"!=a&&(h=3,a=n.slice(-h));var g=n.slice(0,n.length-h),b=' clip-path="url(#'+l+')" ',c=i.gatherAttribute(t.svg,"class");(c=c?c.split(" "):[],n=-1==c.indexOf(i.setup.chart.classNamePrefix+"-graph-line")?"<g "+b+">"+n+"<\/g>":g+b+a,-1==e.indexOf(l))&&(k=(new XMLSerializer).serializeToString(t.svg),f.push(k),e.push(l))}return n}},n||{}),o,s;return i.handleNamespace("fabric",{scope:this,cb:i.toSVG,args:arguments})?((r=i.setup.fabric.toSVG(u,u.reviver),f.length)&&(o=r.slice(0,r.length-6),s=r.slice(-6),r=o+f.join("")+s),u.compress&&(r=r.replace(/[\t\r\n]+/g,"")),u.getBase64&&(r="data:image/svg+xml;base64,"+btoa(r)),i.handleCallback(t,r,u),r):!1},toPDF:function(n,t){function s(n){if("number"==typeof n||n instanceof Number)n={left:n,right:n,top:n,bottom:n};else if(n instanceof Array)if(2===n.length)n={left:n[0],top:n[1],right:n[0],bottom:n[1]};else if(4===n.length)n={left:n[0],top:n[1],right:n[2],bottom:n[3]};else throw"Invalid pageMargins definition";else n={left:i.defaults.pdfMake.pageMargins,top:i.defaults.pdfMake.pageMargins,right:i.defaults.pdfMake.pageMargins,bottom:i.defaults.pdfMake.pageMargins};return n}function h(n,t){var r=i.defaults.pdfMake.pageSizes[(n+"").toUpperCase()].slice();if(!r)throw new Error('The given pageSize "'+n+'" does not exist!');return"landscape"==t&&r.reverse(),r}var o,r=i.deepMerge(i.deepMerge({multiplier:i.config.multiplier||2,pageOrigin:void 0===i.config.pageOrigin},i.config.pdfMake),n||{},!0);if(/iP(hone|od|ad)/.test(navigator.platform)&&(r.multiplier=1),!i.handleNamespace("pdfMake",{scope:this,cb:i.toPDF,args:arguments}))return!1;if(r.images.reference=i.toPNG(r),!r.content){var u=[],f=h(r.pageSize,r.pageOrientation),e=s(r.pageMargins);f[0]-=e.left+e.right;f[1]-=e.top+e.bottom;r.pageOrigin&&(u.push(i.i18l("label.saved.from")),u.push(window.location.href),f[1]-=2*14.064);u.push({image:"reference",fit:f});r.content=u}return o=new pdfMake.createPdf(r),t&&o.getDataUrl(function(n){return function(){n.apply(i,arguments)}}(t)),o},toPRINT:function(n,t){var r,u=i.deepMerge({delay:1,lossless:!1},n||{}),e=i.toImage(u),o=[],f=document.body.childNodes,h=document.documentElement.scrollTop||document.body.scrollTop,s;for(e.setAttribute("style","width: 100%; max-height: 100%;"),r=0;r<f.length;r++)i.isElement(f[r])&&(o[r]=f[r].style.display,f[r].style.display="none");return document.body.appendChild(e),u.delay*=1e3,s=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,s&&1e3>u.delay&&(u.delay=1e3),setTimeout(function(){window.print();setTimeout(function(){for(r=0;r<f.length;r++)i.isElement(f[r])&&(f[r].style.display=o[r]);document.body.removeChild(e);document.documentElement.scrollTop=document.body.scrollTop=h;i.handleCallback(t,e,u)},u.delay)},u.delay),e},toJSON:function(n,t){var r=i.deepMerge({dateFormat:i.config.dateFormat||"dateObject"},n||{},!0),u={};return!!i.handleNamespace("JSON",{scope:this,cb:i.toJSON,args:arguments})&&(r.data=void 0===r.data?i.getChartData(r):r.data,u=JSON.stringify(r.data,void 0,"\t"),i.handleCallback(t,u,r),u)},toCSV:function(n,t){var r=i.deepMerge({delimiter:",",quotes:!0,escape:!0,withHeader:!0},n||{},!0),u=[],f="";return u=i.toArray(r),Object.keys(u).some(function(n){isNaN(n)||(f+=u[n].join(r.delimiter)+"\n")}),i.handleCallback(t,f,r),f},toXLSX:function(n,t){function o(n,t){t&&(n+=1462);var i=Date.parse(n),r=6e4*n.getTimezoneOffset();return(i-r-new Date(Date.UTC(1899,11,30)))/864e5}var u=i.deepMerge({name:"amCharts",dateFormat:i.config.dateFormat||"dateObject",withHeader:!0,stringify:!1},n||{},!0),e=[],r="",f={SheetNames:[],Sheets:{}};return!!i.handleNamespace("XLSX",{scope:this,cb:i.toXLSX,args:arguments})&&(e=i.toArray(u),f.SheetNames.push(u.name),f.Sheets[u.name]=function(n){for(var u,t,e,f={},i={s:{c:1e7,r:1e7},e:{c:0,r:0}},r=0;r!=n.length;++r)for(u=0;u!=n[r].length;++u)i.s.r>r&&(i.s.r=r),i.s.c>u&&(i.s.c=u),i.e.r<r&&(i.e.r=r),i.e.c<u&&(i.e.c=u),t={v:n[r][u]},null!=t.v&&(e=XLSX.utils.encode_cell({c:u,r:r}),"number"==typeof t.v?t.t="n":"boolean"==typeof t.v?t.t="b":t.v instanceof Date?(t.t="n",t.z=XLSX.SSF._table[14],t.v=o(t.v)):t.v instanceof Object?(t.t="s",t.v=JSON.stringify(t.v)):t.t="s",f[e]=t);return 1e7>i.s.c&&(f["!ref"]=XLSX.utils.encode_range(i)),f}(e),r=XLSX.write(f,{bookType:"xlsx",bookSST:!0,type:"base64"}),r="data:application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;base64,"+r,i.handleCallback(t,r,u),r)},toArray:function(n,t){function s(n){return"string"==typeof n&&(r.escape&&(n=n.replace('"','""')),r.quotes&&(n=['"',n,'"'].join(""))),n}var e,r=i.deepMerge({withHeader:!1,stringify:!0,escape:!1,quotes:!1},n||{},!0),o=[],f=[],u=[],h=i.config.processData;return r.processData=function(n,t){var r=t.exportFields||Object.keys(t.dataFieldsMap),u,o;for(e=0;e<r.length;e++)u=r[e],o=t.dataFieldsTitlesMap[u],f.push(o);return h?i.handleCallback(h,n,t):n},r.data=void 0===r.data?i.getChartData(r):i.processData(r),r.withHeader&&(u=[],Object.keys(f).some(function(n){isNaN(n)||u.push(s(f[n]))}),o.push(u)),Object.keys(r.data).some(function(n){u=[];isNaN(n)||(Object.keys(f).some(function(t){if(!isNaN(t)){var t=f[t],i=r.data[n][t];i=null==i?"":r.stringify?i+"":i;u.push(s(i))}}),o.push(u))}),i.handleCallback(t,o,r),o},toByteArray:function(n,t){function r(n){var t=n.charCodeAt(0);return t===c?62:t===l?63:t<u?-1:t<u+10?t-u+26+26:t<o+26?t-o:t<e+26?t-e+26:void 0}var f=i.deepMerge({},n||{}),h="undefined"==typeof Uint8Array?Array:Uint8Array,c="+".charCodeAt(0),l="/".charCodeAt(0),u="0".charCodeAt(0),e="a".charCodeAt(0),o="A".charCodeAt(0),s=function(n){function u(n){e[l++]=n}var t,s,c,i,f,e,o,l;if(0<n.length%4)throw new Error("Invalid string. Length must be a multiple of 4");for(o=n.length,f="="===n.charAt(o-2)?2:"="===n.charAt(o-1)?1:0,e=new h(3*n.length/4-f),c=0<f?n.length-4:n.length,l=0,t=0,s=0;t<c;t+=4,s+=3)i=r(n.charAt(t))<<18|r(n.charAt(t+1))<<12|r(n.charAt(t+2))<<6|r(n.charAt(t+3)),u((16711680&i)>>16),u((65280&i)>>8),u(255&i);return 2===f?(i=r(n.charAt(t))<<2|r(n.charAt(t+1))>>4,u(255&i)):1==f&&(i=r(n.charAt(t))<<10|r(n.charAt(t+1))<<4|r(n.charAt(t+2))>>2,u(255&i>>8),u(255&i)),e}(f.data);return i.handleCallback(t,s,f),s},removeFunctionsFromObject:function(n){return Object.keys(n).some(function(t){"function"==typeof n[t]&&delete n[t]}),n},handleCallback:function(n){var t,r=[];if(n&&n instanceof Function){for(t=0;t<arguments.length;t++)0<t&&r.push(arguments[t]);return n.apply(i,r)}},handleLog:function(n){!0===i.config.debug&&console.log(n)},handleNamespace:function(n,t){function f(){var s=+new Date;r=!!(n in u);"pdfMake"==n&&r&&(r=u.pdfMake.vfs);r?(clearTimeout(e),t.cb.apply(t.scope,t.args),i.handleLog(['AmCharts [export]: Namespace "',n,'" showed up in: ',u+""].join(""))):s-o<i.libs.loadTimeout?e=setTimeout(f,250):i.handleLog(['AmCharts [export]: Gave up waiting for "',n,'" in: ',u+""].join(""))}var e,u=i.config.scope||window,r=!1,o=+new Date;return r=!!(n in u),r||(i.handleLog(['AmCharts [export]: Could not find "',n,'" in: ',u+""].join("")),f()),r},handleBorder:function(n){if(i.config.border instanceof Object){var t=i.deepMerge(i.defaults.fabric.border,n.border||{},!0),r=new fabric.Rect;t.width=i.setup.fabric.width-t.strokeWidth;t.height=i.setup.fabric.height-t.strokeWidth;r.set(t);i.setup.fabric.add(r)}},handleDropbox:function(n){if(i.drawing.enabled)if(n.preventDefault(),n.stopPropagation(),"dragover"==n.type)i.setup.wrapper.setAttribute("class",i.setup.chart.classNamePrefix+"-export-canvas active dropbox");else if(i.setup.wrapper.setAttribute("class",i.setup.chart.classNamePrefix+"-export-canvas active"),"drop"==n.type&&n.dataTransfer.files.length)for(var t,r=0;r<n.dataTransfer.files.length;r++)t=new FileReader,t.onloadend=function(r){return function(){i.drawing.handler.add({url:t.result,top:n.layerY-10*r,left:n.layerX-10*r})}}(r),t.readAsDataURL(n.dataTransfer.files[r])},handleReady:function(n){var t=this,i=+new Date;t.handleCallback(n,"data",!1);Object.keys(t.libs.namespaces).some(function(r){var u=t.libs.namespaces[r];(function(r){var u=setInterval(function(){var f=+new Date;(f-i>t.libs.loadTimeout||r in window)&&(clearTimeout(u),t.handleCallback(n,r,f-i>t.libs.loadTimeout))},AmCharts.updateRate)})(u)})},getChartData:function(n){function o(n,t,r){function u(n,t){return-1==f.dataFields.indexOf(n)?n:u([n,".",t].join(""))}n&&f.exportTitles&&"gantt"!=i.setup.chart.type&&(e=u(n,r),f.dataFieldsMap[e]=n,f.dataFields.push(e),f.titles[e]=t||e)}var t,r,s,p,f=i.deepMerge({data:[],titles:{},dateFields:[],dataFields:[],dataFieldsMap:{},exportTitles:i.config.exportTitles,exportFields:i.config.exportFields,exportSelection:i.config.exportSelection,columnNames:i.config.columnNames},n||{},!0),h=["valueField","openField","closeField","highField","lowField","xField","yField"],w,c,e,v,l,u,a,y;if(0==f.data.length)if("stock"==i.setup.chart.type){for(f.data=i.cloneObject(i.setup.chart.mainDataSet.dataProvider),o(i.setup.chart.mainDataSet.categoryField),f.dateFields.push(i.setup.chart.mainDataSet.categoryField),t=0;t<i.setup.chart.mainDataSet.fieldMappings.length;t++)for(c=i.setup.chart.mainDataSet.fieldMappings[t],r=0;r<i.setup.chart.panels.length;r++)for(w=i.setup.chart.panels[r],s=0;s<w.stockGraphs.length;s++)for(u=w.stockGraphs[s],i4=0;i4<h.length;i4++)u[h[i4]]==c.toField&&o(c.fromField,u.title,h[i4]);if(i.setup.chart.comparedGraphs.length){for(p=[],t=0;t<f.data.length;t++)p.push(f.data[t][i.setup.chart.mainDataSet.categoryField]);for(t=0;t<i.setup.chart.comparedGraphs.length;t++)for(u=i.setup.chart.comparedGraphs[t],r=0;r<u.dataSet.dataProvider.length;r++){var k=u.dataSet.categoryField,d=u.dataSet.dataProvider[r][k],b=p.indexOf(d);if(-1!=b)for(s=0;s<u.dataSet.fieldMappings.length;s++)c=u.dataSet.fieldMappings[s],e=u.dataSet.id+"_"+c.toField,f.data[b][e]=u.dataSet.dataProvider[r][c.fromField],f.titles[e]||o(e,u.dataSet.title)}}}else if("gantt"==i.setup.chart.type){for(o(i.setup.chart.categoryField),v=i.setup.chart.segmentsField,t=0;t<i.setup.chart.dataProvider.length;t++)if(l=i.setup.chart.dataProvider[t],l[v])for(r=0;r<l[v].length;r++)l[v][r][i.setup.chart.categoryField]=l[i.setup.chart.categoryField],f.data.push(l[v][r]);for(t=0;t<i.setup.chart.graphs.length;t++)for(u=i.setup.chart.graphs[t],r=0;r<h.length;r++){var a=h[r],y=u[a],g=u.title;o(y,u.title,a)}}else if(-1!=["pie","funnel"].indexOf(i.setup.chart.type))f.data=i.setup.chart.dataProvider,o(i.setup.chart.titleField),f.dateFields.push(i.setup.chart.titleField),o(i.setup.chart.valueField);else if("map"!=i.setup.chart.type)for(f.data=i.setup.chart.dataProvider,i.setup.chart.categoryAxis&&(o(i.setup.chart.categoryField,i.setup.chart.categoryAxis.title),!1!==i.setup.chart.categoryAxis.parseDates&&f.dateFields.push(i.setup.chart.categoryField)),t=0;t<i.setup.chart.graphs.length;t++)for(u=i.setup.chart.graphs[t],r=0;r<h.length;r++)a=h[r],y=u[a],o(y,u.title,a);return i.processData(f)},getAnnotations:function(n,t){for(var e=i.deepMerge({},n||{},!0),u=[],f,r=0;r<i.setup.fabric._objects.length;r++)i.setup.fabric._objects[r].isCoreElement||(f=i.setup.fabric._objects[r].toJSON(),i.handleCallback(e.reviver,f,r),u.push(f));return i.handleCallback(t,u),u},setAnnotations:function(n,t){var r=i.deepMerge({data:[]},n||{},!0);return fabric.util.enlivenObjects(r.data,function(n){n.forEach(function(n,t){i.handleCallback(r.reviver,n,t);i.setup.fabric.add(n)});i.handleCallback(t,r)}),r.data},processData:function(t){var f,o,r=i.deepMerge({data:[],titles:{},dateFields:[],dataFields:[],dataFieldsMap:{},dataFieldsTitlesMap:{},dataDateFormat:i.setup.chart.dataDateFormat,dateFormat:i.config.dateFormat||i.setup.chart.dataDateFormat||"YYYY-MM-DD",exportTitles:i.config.exportTitles,exportFields:i.config.exportFields,exportSelection:i.config.exportSelection,columnNames:i.config.columnNames,processData:i.config.processData},t||{},!0),l,s,h;if(r.data.length){for(f=0;f<r.data.length;f++)Object.keys(r.data[f]).some(function(n){-1==r.dataFields.indexOf(n)&&(r.dataFields.push(n),r.dataFieldsMap[n]=n)});for(void 0!==r.exportFields&&(r.dataFields=r.exportFields.filter(function(n){return-1!=r.dataFields.indexOf(n)})),l=[],f=0;f<r.data.length;f++){for(s={},h=!1,o=0;o<r.dataFields.length;o++){var e=r.dataFields[o],a=r.dataFieldsMap[e],c=r.columnNames&&r.columnNames[e]||r.titles[e]||e,u=r.data[f][a];null==u&&(u=void 0);r.exportTitles&&"gantt"!=i.setup.chart.type&&c in s&&(c+=["( ",e," )"].join(""));-1!=r.dateFields.indexOf(a)&&(r.dataDateFormat&&(u instanceof String||"string"==typeof u)?u=AmCharts.stringToDate(u,r.dataDateFormat):r.dateFormat&&(u instanceof Number||"number"==typeof u)&&(u=new Date(u)),r.exportSelection&&(u instanceof Date?(u<n.startDate||u>n.endDate)&&(h=!0):(f<n.startIndex||f>n.endIndex)&&(h=!0)),r.dateFormat&&"dateObject"!=r.dateFormat&&u instanceof Date&&(u=AmCharts.formatDate(u,r.dateFormat)));r.dataFieldsTitlesMap[a]=c;s[c]=u}h||l.push(s)}r.data=l}return void 0!==r.processData&&(r.data=i.handleCallback(r.processData,r.data,r)),r.data},capitalize:function(n){return n.charAt(0).toUpperCase()+n.slice(1).toLowerCase()},createMenu:function(t,r){function u(t,r){for(var s,y=document.createElement("ul"),v,h,o,k,d,c=0;c<t.length;c++){var e="string"==typeof t[c]?{format:t[c]}:t[c],l=document.createElement("li"),a=document.createElement("a"),w=document.createElement("img"),p=document.createElement("span"),b=((e.action?e.action:e.format)+"").toLowerCase();if(e.format=(e.format+"").toUpperCase(),l.addEventListener("mouseleave",function(){this.classList.remove("active")}),a.addEventListener("focus",function(){var n,t;if(!i.setup.hasTouch){for(i.setup.focusedMenuItem=this,n=this.parentNode,"UL"!=n.tagName&&(n=n.parentNode),t=n.getElementsByTagName("li"),c=0;c<t.length;c++)t[c].classList.remove("active");this.parentNode.classList.add("active");this.parentNode.parentNode.parentNode.classList.add("active")}}),i.config.formats[e.format]?e=i.deepMerge({label:e.icon?"":e.format,format:e.format,mimeType:i.config.formats[e.format].mimeType,extension:i.config.formats[e.format].extension,capture:i.config.formats[e.format].capture,action:i.config.action,fileName:i.config.fileName},e):!e.label&&(e.label=e.label?e.label:i.i18l("menu.label."+b)),-1!=["CSV","JSON","XLSX"].indexOf(e.format)&&-1!=["map","gauge"].indexOf(i.setup.chart.type))continue;else if(!i.setup.hasBlob&&"UNDEFINED"!=e.format&&e.mimeType&&"image"!=e.mimeType.split("/")[0]&&"text/plain"!=e.mimeType)continue;if("draw"==e.action)i.config.fabric.drawing.enabled?(e.menu=e.menu?e.menu:i.config.fabric.drawing.menu,e.click=function(n){return function(){this.capture(n,function(){this.createMenu(n.menu)})}}(e)):e.menu=[];else if(!e.populated&&e.action&&-1!=e.action.indexOf("draw."))for(v=e.action.split(".")[1],h=e[v]||i.config.fabric.drawing[v]||[],e.menu=[],e.populated=!0,s=0;s<h.length;s++)o={label:h[s]},"shapes"==v?(k=-1==h[s].indexOf("//"),d=(k?i.config.path+"shapes/":"")+h[s],o.action="add",o.url=d,o.icon=d,o.ignore=k,o["class"]="export-drawing-shape"):"colors"==v?(o.style="background-color: "+h[s],o.action="change",o.color=h[s],o["class"]="export-drawing-color"):"widths"==v?(o.action="change",o.width=h[s],o.label=document.createElement("span"),o.label.style.width=i.numberToPx(h[s]),o.label.style.height=i.numberToPx(h[s]),o["class"]="export-drawing-width"):"opacities"==v?(o.style="opacity: "+h[s],o.action="change",o.opacity=h[s],o.label=100*h[s]+"%",o["class"]="export-drawing-opacity"):"modes"==v&&(o.label=i.i18l("menu.label.draw.modes."+h[s]),o.click=function(n){return function(){i.drawing.mode=n}}(h[s]),o["class"]="export-drawing-mode"),e.menu.push(o);else e.click||e.menu||e.items||(i.drawing.handler[b]instanceof Function?(e.action=b,e.click=function(n){return function(){this.drawing.handler[n.action](n);"cancel"!=n.action&&this.createMenu(this.config.fabric.drawing.menu)}}(e)):i.drawing.enabled?e.click=function(n){return function(){this.config.drawing.autoClose&&this.drawing.handler.done();this["to"+n.format](n,function(t){"download"==n.action&&this.download(t,n.mimeType,[n.fileName,n.extension].join("."))})}}(e):"UNDEFINED"!=e.format&&(e.click=function(n){return function(){if(n.capture||"print"==n.action||"PRINT"==n.format)this.capture(n,function(){this.drawing.handler.done();this["to"+n.format](n,function(t){"download"==n.action&&this.download(t,n.mimeType,[n.fileName,n.extension].join("."))})});else if(this["to"+n.format])this["to"+n.format](n,function(t){this.download(t,n.mimeType,[n.fileName,n.extension].join("."))});else throw new Error("Invalid format. Could not determine output type.");}}(e)));(void 0===e.menu||e.menu.length)&&(a.setAttribute("href","#"),i.setup.hasTouch&&l.classList?(a.addEventListener("touchend",function(n,t){return function(r){return r.preventDefault(),"draw"!=t.action&&"PRINT"!=t.format&&("UNDEFINED"==t.format||!t.capture)||i.drawing.enabled||isNaN(t.delay)&&isNaN(i.config.delay)?void n.apply(i,[r,t]):(t.delay=isNaN(t.delay)?i.config.delay:t.delay,void i.delay(t,n))}}(e.click||function(n){n.preventDefault()},e)),a.addEventListener("touchend",function(n){return function(t){function o(n){return n.classList.contains("export-main")||n.classList.contains("export-drawing")}var u,s;t.preventDefault();var r=n.elements.li,h=function(n){var t=n.parentNode.parentNode,i=t.classList;return"LI"==t.tagName&&i.contains("active")}(r),l=function(n){var r=n.parentNode.children,t,i;for(c=0;c<r.length;c++)if(t=r[c],i=t.classList,t!==n&&i.contains("active"))return i.remove("active"),!0;return!1}(r),e=function(n){return 0<n.getElementsByTagName("ul").length}(r);if((o(r)||!e)&&i.setup.menu.classList.toggle("active"),!h||!e)for(;f.length;)u=f.pop(),s=o(u),s?!e&&u.classList.remove("active"):u!==r&&u.classList.remove("active");f.push(r);e&&r.classList.toggle("active")}}(e))):a.addEventListener("click",function(n,t){return function(r){return r.preventDefault(),"draw"!=t.action&&"PRINT"!=t.format&&("UNDEFINED"==t.format||!t.capture)||i.drawing.enabled||isNaN(t.delay)&&isNaN(i.config.delay)?void n.apply(i,[r,t]):(t.delay=isNaN(t.delay)?i.config.delay:t.delay,void i.delay(t,n))}}(e.click||function(n){n.preventDefault()},e)),l.appendChild(a),i.isElement(e.label)?p.appendChild(e.label):p.innerHTML=e.label,e["class"]&&(l.className=e["class"]),e.style&&l.setAttribute("style",e.style),e.icon&&(w.setAttribute("src",(e.ignore||-1!=e.icon.slice(0,10).indexOf("//")?"":n.pathToImages)+e.icon),a.appendChild(w)),e.label&&a.appendChild(p),e.title&&a.setAttribute("title",e.title),i.config.menuReviver&&(l=i.config.menuReviver.apply(i,[e,l])),e.elements={li:l,a:a,img:w,span:p},(e.menu||e.items)&&"draw"!=e.action?u(e.menu||e.items,l).childNodes.length&&y.appendChild(l):y.appendChild(l))}return y.childNodes.length&&r.appendChild(y),y}var f=[];return r||("string"==typeof i.config.divId?i.config.divId=r=document.getElementById(i.config.divId):r=i.isElement(i.config.divId)?i.config.divId:i.setup.chart.containerDiv),i.isElement(i.setup.menu)?i.setup.menu.innerHTML="":i.setup.menu=document.createElement("div"),i.setup.menu.setAttribute("class",i.setup.chart.classNamePrefix+"-export-menu "+i.setup.chart.classNamePrefix+"-export-menu-"+i.config.position+" amExportButton"),i.config.menuWalker&&(u=i.config.menuWalker),u.apply(this,[t,i.setup.menu]),i.setup.menu.childNodes.length&&r.appendChild(i.setup.menu),i.setup.menu},delay:function(n,t){var u,f,r=i.deepMerge({delay:3,precision:2},n||{}),o=+new Date,s=i.createMenu([{label:i.i18l("capturing.delayed.menu.label").replace("{{duration}}",AmCharts.toFixed(r.delay,r.precision)),title:i.i18l("capturing.delayed.menu.title"),"class":"export-delayed-capturing",click:function(){clearTimeout(u);clearTimeout(f);i.createMenu(i.config.menu)}}]),e=s.getElementsByTagName("a")[0];u=setInterval(function(){var n=r.delay-(+new Date-o)/1e3;0>=n?(clearTimeout(u),"draw"!=r.action&&i.createMenu(i.config.menu)):e&&(e.innerHTML=i.i18l("capturing.delayed.menu.label").replace("{{duration}}",AmCharts.toFixed(n,2)))},AmCharts.updateRate);f=setTimeout(function(){t.apply(i,arguments)},1e3*r.delay)},migrateSetup:function(n){function i(n){Object.keys(n).some(function(r){var u=n[r];"export"==r.slice(0,6)&&u?t.menu.push(r.slice(6)):"userCFG"==r?i(u):"menuItems"==r?t.menu=u:"libs"==r?t.libs=u:"string"==typeof r&&(t[r]=u)})}var t={enabled:!0,migrated:!0,libs:{autoLoad:!0},menu:[]};return i(n),t},clear:function(){var n,t;for(void 0!==i.setup.fabric&&i.setup.fabric.removeListeners(),n=0;n<i.listenersToRemove.length;n++)t=i.listenersToRemove[n],t.node.removeEventListener(t.event,t.method);i.isElement(i.setup.wrapper)&&i.isElement(i.setup.wrapper.parentNode)&&i.setup.wrapper.parentNode.removeChild&&i.setup.wrapper.parentNode.removeChild(i.setup.wrapper);i.isElement(i.setup.menu)&&i.isElement(i.setup.wrapper.parentNode)&&i.setup.wrapper.parentNode.removeChild&&i.setup.menu.parentNode.removeChild(i.setup.menu);i.listenersToRemove=[];i.setup.chart.AmExport=void 0;i.setup.chart.export=void 0;i.setup=void 0},loadListeners:function(){function n(n){n&&(n.set({top:n.top+10,left:n.left+10}),i.setup.fabric.add(n))}i.config.keyListener&&"attached"!=i.config.keyListener&&(i.docListener=function(t){function u(n,t){for(i1=0;i1<n.length;i1++){var i=n[i1];i.parentNode.classList.remove("active");0!=i1||t||i.focus()}}function f(n){i.setup.focusedMenuItem&&i.setup.focusedMenuItem.nextSibling&&(i.setup.focusedMenuItem.parentNode.classList.add("active"),u(i.setup.focusedMenuItem.nextSibling.getElementsByTagName("a"),n))}function e(n){i.setup.focusedMenuItem&&i.setup.focusedMenuItem.parentNode.parentNode.parentNode&&(i.setup.focusedMenuItem.parentNode.classList.add("active"),u(i.setup.focusedMenuItem.parentNode.parentNode.parentNode.getElementsByTagName("a"),n))}function s(n){i.setup.focusedMenuItem&&i.setup.focusedMenuItem.parentNode.nextSibling&&(i.setup.focusedMenuItem.parentNode.classList.remove("active"),u(i.setup.focusedMenuItem.parentNode.nextSibling.getElementsByTagName("a"),n))}function h(n){i.setup.focusedMenuItem&&i.setup.focusedMenuItem.parentNode.previousSibling&&(i.setup.focusedMenuItem.parentNode.classList.remove("active"),u(i.setup.focusedMenuItem.parentNode.previousSibling.getElementsByTagName("a"),n))}function c(){function n(t){if(i.isElement(t)){try{t.blur()}catch(r){}t.parentNode&&t.parentNode.classList.remove("active");t.classList.contains("amExportButton")||n(t.parentNode)}}i.setup.focusedMenuItem&&(n(i.setup.focusedMenuItem),i.setup.focusedMenuItem=void 0)}var r=i.drawing.buffer.target,l=-1!=["top-left","bottom-left"].indexOf(i.config.position),o=-1!=["top-right","bottom-right"].indexOf(i.config.position);if(i.setup.focusedMenuItem&&-1!=[37,38,39,40,13,9,27].indexOf(t.keyCode)){if(9==t.keyCode)return void(i.setup.focusedMenuItem.nextSibling?t.shiftKey&&i.setup.focusedMenuItem.parentNode.classList.remove("active"):(i.setup.focusedMenuItem.parentNode.classList.remove("active"),!i.setup.focusedMenuItem.parentNode.nextSibling&&(i.setup.focusedMenuItem.parentNode.classList.remove("active"),i.setup.focusedMenuItem.parentNode.parentNode.parentNode.classList.remove("active"))));13==t.keyCode&&i.setup.focusedMenuItem.nextSibling&&f();37==t.keyCode&&(o?f():e());39==t.keyCode&&(o?e():f());40==t.keyCode&&s();38==t.keyCode&&h();27==t.keyCode&&c()}(8==t.keyCode||46==t.keyCode)&&r?(t.preventDefault(),i.setup.fabric.remove(r)):27==t.keyCode&&i.drawing.enabled?(t.preventDefault(),i.drawing.buffer.isSelected?i.setup.fabric.discardActiveObject():i.drawing.handler.done()):67==t.keyCode&&(t.metaKey||t.ctrlKey)&&r?i.drawing.buffer.copy=r:88==t.keyCode&&(t.metaKey||t.ctrlKey)&&r?(i.drawing.buffer.copy=r,i.setup.fabric.remove(r)):86==t.keyCode&&(t.metaKey||t.ctrlKey)?i.drawing.buffer.copy&&n(i.drawing.buffer.copy.clone(n)):90==t.keyCode&&(t.metaKey||t.ctrlKey)&&(t.preventDefault(),t.shiftKey?i.drawing.handler.redo():i.drawing.handler.undo())},i.config.keyListener="attached",document.addEventListener("keydown",i.docListener),i.addListenerToRemove("keydown",document,i.docListener));i.config.fileListener&&(i.setup.chart.containerDiv.addEventListener("dragover",i.handleDropbox),i.addListenerToRemove("dragover",i.setup.chart.containerDiv,i.handleDropbox),i.setup.chart.containerDiv.addEventListener("dragleave",i.handleDropbox),i.addListenerToRemove("dragleave",i.setup.chart.containerDiv,i.handleDropbox),i.setup.chart.containerDiv.addEventListener("drop",i.handleDropbox),i.addListenerToRemove("drop",i.setup.chart.containerDiv,i.handleDropbox))},init:function(){clearTimeout(r);r=setInterval(function(){i.setup&&i.setup.chart.containerDiv&&(clearTimeout(r),i.config.enabled&&(i.setup.chart.AmExport=i,i.config.overflow&&(i.setup.chart.div.style.overflow="visible"),i.loadListeners(),i.createMenu(i.config.menu),i.handleReady(i.config.onReady)))},AmCharts.updateRate)},construct:function(){i.drawing.handler.cancel=i.drawing.handler.done;try{i.setup.hasBlob=!!new Blob}catch(n){}window.safari=window.safari?window.safari:{};i.defaults.fabric.drawing.fontSize=i.setup.chart.fontSize||11;i.config.drawing=i.deepMerge(i.defaults.fabric.drawing,i.config.drawing||{},!0);i.config.border&&(i.config.border=i.deepMerge(i.defaults.fabric.border,i.config.border||{},!0));i.deepMerge(i.defaults.fabric,i.config,!0);i.deepMerge(i.defaults.fabric,i.config.fabric||{},!0);i.deepMerge(i.defaults.pdfMake,i.config,!0);i.deepMerge(i.defaults.pdfMake,i.config.pdfMake||{},!0);i.deepMerge(i.libs,i.config.libs||{},!0);i.config.drawing=i.defaults.fabric.drawing;i.config.fabric=i.defaults.fabric;i.config.pdfMake=i.defaults.pdfMake;i.config=i.deepMerge(i.defaults,i.config,!0);i.config.fabric.drawing.enabled&&void 0===i.config.fabric.drawing.menu&&(i.config.fabric.drawing.menu=[],i.deepMerge(i.config.fabric.drawing.menu,[{"class":"export-drawing",menu:[{label:i.i18l("menu.label.draw.add"),menu:[{label:i.i18l("menu.label.draw.shapes"),action:"draw.shapes"},{label:i.i18l("menu.label.draw.text"),action:"text"}]},{label:i.i18l("menu.label.draw.change"),menu:[{label:i.i18l("menu.label.draw.modes"),action:"draw.modes"},{label:i.i18l("menu.label.draw.colors"),action:"draw.colors"},{label:i.i18l("menu.label.draw.widths"),action:"draw.widths"},{label:i.i18l("menu.label.draw.opacities"),action:"draw.opacities"},"UNDO","REDO"]},{label:i.i18l("menu.label.save.image"),menu:["PNG","JPG","SVG","PDF"]},"PRINT","CANCEL"]}]));void 0===i.config.menu&&(i.config.menu=[],i.deepMerge(i.config,{menu:[{"class":"export-main",menu:[{label:i.i18l("menu.label.save.image"),menu:["PNG","JPG","SVG","PDF"]},{label:i.i18l("menu.label.save.data"),menu:["CSV","XLSX","JSON"]},{label:i.i18l("menu.label.draw"),action:"draw",menu:i.config.fabric.drawing.menu},{format:"PRINT",label:i.i18l("menu.label.print")}]}]}));i.libs.path||(i.libs.path=i.config.path+"libs/");i.setup.hasClasslist||i.libs.resources.push("classList.js/classList.min.js");i.isSupported()&&(i.loadDependencies(i.libs.resources,i.libs.reload),i.setup.chart.addClassNames=!0,i.setup.chart[i.name]=i,i.init())}};if(t)i.config=t;else if(i.setup.chart[i.name])i.config=i.setup.chart[i.name];else if(i.setup.chart.amExport||i.setup.chart.exportConfig)i.config=i.migrateSetup(i.setup.chart.amExport||i.setup.chart.exportConfig);else return;return i.construct(),i.deepMerge(this,i)}}();AmCharts.addInitHandler(function(n){new AmCharts["export"](n)},["pie","serial","xy","funnel","radar","gauge","stock","map","gantt"]);$(".btn").each(function(n,t){Button($(t))});SUBNAVIGATION=function(){function t(n,t,i,r){var u=$(n),e=u.find(".subNavLinkTitle"),f=u.find(".subNavLinkBg");(new TimelineLite).to(f,.01,{transformOrigin:r}).to(f,.7,{scaleX:t,ease:Expo.easeOut},0).to(e,.7,{color:i,ease:Expo.easeOut},0)}function u(){i.length&&i.off("mouseenter mouseleave click")}var n,i,r=function(){var i;if(n=$("#subNavWrap"),n.length){var r=n.find(".subNavLink"),u=n.find('.subNavLink[state="opened"]').find(".subNavLinkBg"),f=n.find("#subNav1"),e=n.find("#subNav2"),o=n.find("#subNav3"),s=n.find("#subNav4");TweenLite.set(u,{scaleX:1});i=n.find('.subNavLink[state="opened"]');r.on({mouseenter:function(){$(this).attr("state")!="opened"&&t(this,1,"rgb(255,255,255)","0% 50%")},mouseleave:function(){$(this).attr("state")!="opened"&&t(this,0,"rgb(20,40,200)","0% 50%")},click:function(){var n=$(this);n.attr("state")!="opened"&&(t(i,0,"rgb(20,40,200)","100% 50%"),i.attr("state",""),n.attr("state","opened"),t(this,1,"rgb(255,255,255)","0% 50%"),i=n)}})}};return{InitSubNavigation:r,DestroySubNavigation:u}}();var SHAREDBAR=function(){function r(){var n=(new TimelineMax).to(t,1.5,{scrambleText:{text:"BIGD",chars:"10",revealDelay:.4,tweenLength:!0,speed:.4,newClass:"logoStrong",ease:Linear.easeNone}},0).to(i,1.5,{scrambleText:{text:".host",chars:"01",revealDelay:.4,tweenLength:!0,speed:.4,newClass:"logoLight",ease:Linear.easeNone}},0)}function u(){n.on({mouseenter:function(){r()},click:function(n){n.preventDefault();location.href=BIGD.HOME_INDEX_URL}})}function f(){console.log("SHAREDBAR.destroySharedBar this function is not supposed to be called.");n.off("mouseenter")}if(typeof SHAREDBAR!="undefined")return console.log("SHAREDBAR is allready defined!"),null;var n=$("#logo"),t=n.find(".logoStrong"),i=n.find(".logoLight");return{InitSharedBar:u,DestroySharedBar:f}}(),NAVIGATION=function(){function p(){FAQ.InitFaq();MY_SERVERS.InitMyServers();MY_BALANCE.InitBalance()}function it(){FAQ.DestroyFaq();MY_SERVERS.DestroyMyServers();MY_BALANCE.DestroyBalance()}function w(){h&&c&&(it(),tt.html(y),p(),window.history.pushState&&window.history.pushState({foo:"bar"},"",l),TweenLite.to(s,1.2,{scaleY:0,ease:Expo.easeInOut,onComplete:function(){o=e}}))}function rt(n,t){(t=typeof t!="undefined"?t:f,o==e)&&(o=nt,h=!1,c=!1,l=n,t==f&&TweenLite.to(s,1.2,{scaleY:1,ease:Expo.easeInOut,onComplete:function(){h=!0;w()}}),$.ajax({url:n,timeout:g}).done(function(n){c=!0;y=n;w()}).fail(function(){window.location.href=l}))}function ut(){TweenLite.set(s,{autoAlpha:1,transformOrigin:"50% 0%",scaleY:0});p()}function ft(){console.log("NAVIGATION.DestroyNavigation is not supposed to be called.")}function n(n,t,i,r){var u=$(n),f=u.find(".navLinkTitle"),e=u.find(".navLinkBg");(new TimelineLite).to(e,.7,{scaleX:i,ease:Expo.easeOut},0).to(f,.7,{color:r,ease:Expo.easeOut},0).to(n,.5,{x:t,ease:Expo.easeOut},0)}function ht(n){TweenLite.to(window,.8,{scrollTo:{y:n,offsetY:ot.height(),autoKill:!1},ease:Power3.easeOut})}function at(){function n(){t=a}new TimelineMax({onComplete:n}).set(u,{display:"block"}).to(b,.5,{yPercent:100,ease:"Expo1"});t=k}function d(){function n(){t=v}new TimelineMax({onComplete:n}).to(b,.5,{yPercent:0,ease:"Expo1"}).set(u,{display:"none"});t=k}if(typeof NAVIGATION!="undefined")return console.log("NAVIGATION is allready defined!"),null;var g=5e3,f=1,e=1,nt=2,o=e,s=$("#maskContent"),tt=$("#mainCointainer"),h=!1,c=!1,y="",l="";var i=$("#nav"),et=i.find(".navLink"),ot=i.find("#topBar"),st=i.find("#leftBarTestBtn"),r=$('.navLink[state="opened"]');et.on({mouseenter:function(){var t=$(this),i=parseInt(t.css("padding"));t!=r&&(t.hasClass("navLinkRight")?n(this,-i,1,"rgb(255,255,255)"):t.hasClass("topLink")?n(this,-i,1,"rgb(20,40,190)"):t.hasClass("leftLink")?n(this,0,1,"rgb(255,255,255)"):n(this,i,1,"rgb(255,255,255)"))},mouseleave:function(){var t=$(this);t!=r&&(t.hasClass("navLinkRight")?n(this,0,0,"rgb(20,40,190)"):t.hasClass("testAccessOpened")?n(this,0,1,"rgb(255,255,255)"):t.hasClass("topLink")?n(this,0,0,"rgb(255,255,255)"):t.hasClass("leftLink")?n(this,0,0,"rgb(20,40,190)"):n(this,0,0,"rgb(75,75,75)"))},click:function(){r&&n(r,0,0,"rgb(255,255,255)");r=this}});st.on({click:function(){HOME_PAGE.SelectTestPeriod();ht(configServer)}});var ct=i.find("#mobNavIconMenu"),lt=i.find(".mobNavIconClose"),u=i.find("#mobNavWrap"),b=u.find(".mobNavContent"),vt=u.find(".mobNavLink"),a=1,k=2,v=3,t=v;CustomEase.create("Expo1","M0,602c90,0,127-33,149-202C199.34114,13.28852,199,2,400,2");ct.on({click:function(){t==v?at():t==a&&d()}});lt.on({click:function(){t==a&&d()}});return{TRANSITION_BLUE_MASK:f,TRANSITION_TRANSPARENCY:2,InitNavigation:ut,DestroyNavigation:ft,ChangeBigdPage:rt}}(),PASSPORT=function(){function l(){var i=function(){r=vi;c=!1};new TimelineLite({onComplete:i}).set(n,{display:"block"}).set(t,{willChange:"transform"}).to(n,1,{x:0,xPercent:0,ease:Expo.easeInOut},0).to(t,1,{scale:1.7,xPercent:-80,ease:Expo.easeInOut},0).set(a,{display:"none"},0).to(pt,1,{autoAlpha:0,ease:Expo.easeOut},.5).set(t,{willChange:"auto"});BIGD.isAuthorized||(new TimelineLite).set(t,{willChange:"transform"}).to(at,.5,{y:0,autoAlpha:1,ease:Expo.easeOut},.8).to(v,.5,{y:0,autoAlpha:1,ease:Expo.easeOut},.8).to(y,1.3,{drawSVG:"100% 0%",fillOpacity:1,ease:Power4.easeOut},1.2).to(p,1.3,{drawSVG:"100% 0%",fillOpacity:1,ease:Power4.easeOut},1.2).set(t,{willChange:"auto"});r=vt}function or(){var i=function(){r=s};new TimelineLite({onComplete:i}).set(t,{willChange:"transform"}).to(pt,1,{autoAlpha:1,ease:Expo.easeOut},0).to(n,1,{xPercent:100,ease:Expo.easeInOut},0).to(t,1,{scale:1,xPercent:0,ease:Expo.easeInOut},0).set(t,{willChange:"auto"}).set(n,{display:"none"});BIGD.isAuthorized||(new TimelineLite).set(t,{willChange:"transform"}).to(at,.3,{y:10,autoAlpha:0,ease:Power4.easeOut},.4).to(v,.3,{y:10,autoAlpha:0,ease:Power4.easeOut},.4).to(y,.01,{drawSVG:"50% 50%",fillOpacity:0,ease:Power4.easeOut},1.2).to(p,.01,{drawSVG:"50% 50%",ease:Power4.easeOut},1.2).set(t,{willChange:"auto"});r=vt}function sr(){e&&(e.kill(),e=null);f&&(f.kill(),f=null);f=(new TimelineLite).set(n,{display:"block"}).set(t,{willChange:"transform"}).to(n,.6,{xPercent:95,ease:Expo.easeOut}).set(a,{display:"block"},0).to(t,.6,{scale:1.35,xPercent:-27.5,ease:Expo.easeOut},0).set(t,{willChange:"auto"})}function hr(){e&&(e.kill(),e=null);f&&(f.kill(),f=null);e=(new TimelineLite).set(t,{willChange:"transform"}).to(n,.6,{xPercent:100,ease:Expo.easeOut}).set(a,{display:"none"},0).to(t,.6,{scale:1,xPercent:0,ease:Expo.easeOut},0).set(t,{willChange:"auto"}).set(n,{display:"none"})}function yi(){(r==vi||r==vt)&&(c?c=!1:yt?yt=!1:or())}function pi(){BIGD.isAuthorized?(a.text(BIGD.USER_EMAIL),(new TimelineLite).set(w,{display:"none"}).set(v,{y:0,autoAlpha:1}).set(y,{drawSVG:"100% 0%",fillOpacity:1}).set(p,{drawSVG:"100% 0%",fillOpacity:1}),ki()):(a.text(BIGD.ACCOUNT_STRING),(new TimelineLite).set(v,{y:10,autoAlpha:0}).set(y,{drawSVG:"50% 50%",fillOpacity:0}).set(p,{drawSVG:"50% 50%",fillOpacity:0}))}function u(n){(new TimelineLite).to(h,.3,{autoAlpha:0}).set(h,{display:"none"}).set(n,{display:"block"}).to(n,.3,{autoAlpha:1},0);h=n}function cr(n){(new TimelineLite).set(h,{autoAlpha:0}).set(n,{autoAlpha:1}).set(h,{autoAlpha:0});h=n}function lr(n){nu(n)}function ar(n){n.preventDefault();BIGD.RECAPTCHA.SetSubmitCallback(lr);BIGD.RECAPTCHA.LoadCaptcha();u(tt)}function o(n){n.preventDefault();u(w)}function vr(n){iu(n)}function yr(n){n.preventDefault();BIGD.RECAPTCHA.SetSubmitCallback(vr);BIGD.RECAPTCHA.LoadCaptcha();u(nt)}function ct(){u(ur)}function pr(n){tu(n)}function wi(n){n!==undefined&&n.preventDefault();BIGD.RECAPTCHA.SetSubmitCallback(pr);BIGD.RECAPTCHA.LoadCaptcha();u(ut)}function bi(){u(er)}function wr(){(new TimelineLite).to(i.parent(),.6,{autoAlpha:1,ease:Expo.easeOut});i.append("<p>"+BIGD.EMAIL_CONFIRMED_STRING+"<\/p>");l()}function br(){(new TimelineLite).to(i.parent(),.6,{autoAlpha:1,ease:Expo.easeOut});i.empty();i.append("<p>"+BIGD.NEED_LOGIN_FOR_ORDER_STRING+"<\/p>");c=!0;l()}function kr(n){ru(n)}function dr(){u(ot);BIGD.RECAPTCHA.SetSubmitCallback(kr);BIGD.RECAPTCHA.LoadCaptcha();l()}function gr(){u(ei)}function ki(){cr(ei)}function di(n){n.preventDefault();i.empty();rr.empty();it.off("click");(new TimelineLite).to(i.parent(),.6,{autoAlpha:1,ease:Expo.easeOut});i.append("<p>"+BIGD.LOGIN_PROCESSING_STRING+"<\/p>");$.ajax({method:"POST",url:w.attr("action"),data:w.serialize(),timeout:BIGD.AJAX_TIMEOUT}).done(function(n){if(n.result=="success")location=BIGD.MYSERVERS_INDEX_URL;else if(n.result=="confirmemail")ct();else if(n.result=="failed"){i.empty();for(var t=0;t<n.errors.length;++t)i.append("<p>"+n.errors[t]+"<\/p>")}else console.log("Unknown loginAjaxResult.result")}).fail(function(){(new TimelineLite).set(i.parent(),{autoAlpha:1});i.append("<p>"+BIGD.AJAX_FAILED_STRING+"<\/p>")}).always(function(){it.on("click",di)})}function gi(n){n.preventDefault();BigdReachGoalYaCounter("ym-register");BIGD.RECAPTCHA.Execute()}function nu(n){console.log("Processing registration.");b.empty();rt.off("click");tt.find("#CaptchaToken").val(n);$.ajax({method:"POST",url:tt.attr("action"),data:tt.serialize(),timeout:BIGD.AJAX_TIMEOUT}).done(function(n){if(n.result=="success")ct();else if(n.result=="failed"){(new TimelineLite).to(b.parent(),.6,{autoAlpha:1,ease:Expo.easeOut});for(var t=0;t<n.errors.length;++t)b.append("<p>"+n.errors[t]+"<\/p>");BIGD.RECAPTCHA.LoadCaptcha()}else console.log("Unknown registerAjaxResult.result")}).fail(function(){(new TimelineLite).to(b.parent(),.6,{autoAlpha:1,ease:Expo.easeOut});b.append("<p>"+BIGD.AJAX_FAILED_STRING+"<\/p>");BIGD.RECAPTCHA.LoadCaptcha()}).always(function(){rt.on({click:gi})})}function nr(n){n.preventDefault();BIGD.RECAPTCHA.Execute()}function tu(n){k.empty();ft.off("click");ut.find("#CaptchaToken").val(n);$.ajax({method:"POST",url:ut.attr("action"),data:ut.serialize(),timeout:BIGD.AJAX_TIMEOUT}).done(function(n){if(n.result=="success")ct();else if(n.result=="failed"){(new TimelineLite).to(k.parent(),.6,{autoAlpha:1,ease:Expo.easeOut});for(var t=0;t<n.errors.length;++t)k.append("<p>"+n.errors[t]+"<\/p>");BIGD.RECAPTCHA.LoadCaptcha()}else console.log("Unknown resendConfirmEmailAjaxResult.result")}).fail(function(){(new TimelineLite).to(k.parent(),.6,{autoAlpha:1,ease:Expo.easeOut});k.append("<p>"+BIGD.AJAX_FAILED_STRING+"<\/p>");BIGD.RECAPTCHA.LoadCaptcha()}).always(function(){ft.on("click",nr)})}function tr(n){n.preventDefault();BIGD.RECAPTCHA.Execute()}function iu(n){console.log("Processing forgot password.");d.empty();et.off("click");nt.find("#CaptchaToken").val(n);$.ajax({method:"POST",url:nt.attr("action"),data:nt.serialize(),timeout:BIGD.AJAX_TIMEOUT}).done(function(n){if(n.result=="success")bi();else if(n.result=="failed"){(new TimelineLite).to(d.parent(),.6,{autoAlpha:1,ease:Expo.easeOut});for(var t=0;t<n.errors.length;++t)d.append("<p>"+n.errors[t]+"<\/p>");BIGD.RECAPTCHA.LoadCaptcha()}else console.log("Unknown onForgotPasswordButtonClicked.result")}).fail(function(){(new TimelineLite).to(d.parent(),.6,{autoAlpha:1,ease:Expo.easeOut});d.append("<p>"+BIGD.AJAX_FAILED_STRING+"<\/p>");BIGD.RECAPTCHA.LoadCaptcha()}).always(function(){et.on("click",tr)})}function ir(n){n.preventDefault();BIGD.RECAPTCHA.Execute()}function ru(n){console.log("Processing submit reset password.");g.empty();st.off("click");ot.find("#CaptchaToken").val(n);$.ajax({method:"POST",url:ot.attr("action"),data:ot.serialize(),timeout:BIGD.AJAX_TIMEOUT}).done(function(n){if(n.result=="success")u(ui);else if(n.result=="failed"){(new TimelineLite).to(g.parent(),.6,{autoAlpha:1,ease:Expo.easeOut});for(var t=0;t<n.errors.length;++t)g.append("<p>"+n.errors[t]+"<\/p>");BIGD.RECAPTCHA.LoadCaptcha()}else console.log("Unknown onResetPasswordButtonClicked.result")}).fail(function(){(new TimelineLite).to(g.parent(),.6,{autoAlpha:1,ease:Expo.easeOut});g.append("<p>"+BIGD.AJAX_FAILED_STRING+"<\/p>");BIGD.RECAPTCHA.LoadCaptcha()}).always(function(){st.on("click",ir)})}function uu(n){n.preventDefault();ht.prop("disabled",!0);$.ajax({method:"POST",url:wt.attr("action"),data:wt.serialize(),timeout:BIGD.AJAX_TIMEOUT}).done(function(n){n.result=="success"&&(location=BIGD.HOME_INDEX_URL)}).always(function(){ht.prop("disabled",!1)})}function fu(n){n?li.val("True"):li.val("False")}var n=$("#blockLogin"),lt=$("#iconLogin"),a=$("#iconLoginTooltip"),t=lt.find("svg"),at=t.find("#iconLoginChair"),v=t.find("#iconLoginTable"),y=t.find("#iconLoginNotebookBorder"),p=t.find("#iconLoginNotebookCircle"),su=t.find("#iconLoginNotebookSquare"),hu=t.find("#iconLoginNotebookTriangle"),pt=n.find(".formMask"),w=n.find("#formLogin"),wt=n.find("#LogoutForm"),nt=n.find("#ForgotPasswordForm"),tt=n.find("#RegisterForm"),bt=n.find("#ForgotPasswordHref"),kt=n.find("#ForgotPasswordHrefBack"),dt=n.find("#RegisterHref"),gt=n.find("#RegisterHrefBack"),it=n.find("#AccountLoginButton"),i=n.find("#LoginFormErrors"),rr=n.find("#LoginFormSuccess"),b=n.find("#RegisterFormErrors"),rt=n.find("#RegisterButton"),ur=n.find("#EmailConfirmationSent"),ni=n.find("#RegisterSuccessHrefBack"),ut=n.find("#ResendConfirmEmailForm"),fr=n.find("#ResendConfirmEmailHrefBack"),k=n.find("#ResendConfirmEmailErrors"),ft=n.find("#ResendConfirmEmailButton"),ti=n.find("#EmailConfirmationSentResendHref"),et=n.find("#ForgotPasswordButton"),d=n.find("#ForgotPasswordErrors"),er=n.find("#ForgotPasswordEmailSent"),ii=n.find("#ForgotPasswordEmailSentHrefBack"),ot=n.find("#ResetPasswordForm"),st=n.find("#ResetPasswordButton"),ri=n.find("#ResetPasswordFormHrefBack"),g=n.find("#ResetPasswordFormErrors"),ui=n.find("#PasswordReseted"),fi=n.find("#PasswordResetedHrefBack"),ei=n.find("#AccountBlockMenu"),ht=$("#LogoutHref"),oi=$("#btnPassportMyServers"),si=$("#btnPassportBalance"),hi=$("#btnPassportOrder"),ci=$("#btnPassportSettings"),li=n.find("#RememberMe"),ai,vi=1,vt=2,s=3,r=s,yt=!1,h=w,f,e,c=!1,eu=function(){(new TimelineLite).set([n,blockContact],{xPercent:100}).set(at,{y:10}).set(v,{y:10}).set(y,{drawSVG:"50% 50%",fillOpacity:0}).set(p,{drawSVG:"50% 50%"});pi();lt.on({click:function(){r==s&&(c=!0,l())},mouseenter:function(){r==s&&sr()},mouseleave:function(){r==s&&hr()}});$("#mobNavIconLogin").on({click:function(){r==s&&(c=!0,l())}});n.on("click",function(){yt=!0});$("html").on("click",yi);dt.on("click",ar);gt.on("click",o);bt.on("click",yr);kt.on("click",o);it.on("click",di);rt.on("click",gi);ni.on("click",o);fr.on("click",o);ft.on("click",nr);ti.on("click",wi);et.on("click",tr);ii.on("click",o);st.on("click",ir);fi.on("click",o);ri.on("click",o);ht.on("click",uu);oi.on("click",function(){location=BIGD.MYSERVERS_INDEX_URL});si.on("click",function(){location=BIGD.BALANCE_INDEX_URL});hi.on("click",function(){location=BIGD.ORDER_SERVER_URL});ci.on("click",function(){location=BIGD.SETTINGS_INDEX_URL});ai=Checkbox("#rememberMeCheckbox",fu)},ou=function(){console.log("PASSPORT.DestroyPassport is not supposed to be called.");lt.off("click mouseenter mouseleave");n.off("click");$("html").off("click",yi);dt.off("click");gt.off("click");bt.off("click");kt.off("click");it.off("click");rt.off("click");ni.off("click");ft.off("click");ti.off("click");et.off("click");ii.off("click");st.off("click");fi.off("click");ri.off("click");ht.off("click");oi.off("click");si.off("click");hi.off("click");ci.off("click");ai.DestroyCheckbox()};return{InitPassport:eu,DestroyPassport:ou,UpdateAuthorizationStatus:pi,ShowEmailConfirmed:wr,ShowResetPasswordForm:dr,ShowNeedRegistration:br,OpenBlockLogin:l,ShowEmailConfirmationSent:ct,ShowResendConfirmEmailForm:wi,ShowForgotPasswordEmailSent:bi,ShowAccountBlockMenu:gr,InstantShowAccountBlockMenu:ki}}(),FAQ=function(){function t(n,t,i,r,u){var f=$(n),o=f.find(".questionTitle"),e=f.find(".questionBg");(new TimelineLite).to(e,.01,{transformOrigin:r}).fromTo(e,.4,{scaleY:t},{scaleY:i,ease:Expo.easeOut},.01).to(o,.4,{color:u,ease:Expo.easeOut},.01)}function r(n,t,i,r){(new TimelineMax).to(n,.3,{autoAlpha:i,ease:Expo.easeOut}).set(n,{display:"none"}).set($("body"),{scrollTo:0}).set(t,{display:"block"}).to(t,.3,{autoAlpha:r,ease:Expo.easeOut})}function e(n){(new TimelineLite).to(i,.3,{autoAlpha:0,ease:Power4.easeOut,onComplete:o,onCompleteParams:[n]}).to(i,.3,{autoAlpha:1,ease:Power4.easeOut})}function o(n){var t=$(n).find(".answerHidden").text();i.text(t)}function s(){(new TimelineLite).to(i,.3,{autoAlpha:0,ease:Power4.easeOut,onComplete:h}).to(i,.3,{autoAlpha:1,ease:Power4.easeOut})}function h(){i.text(u)}var n,i,f,u,c=function(){function h(n,t,i,r){var u=$(n).find(".answerHidden");(new TimelineLite).to(u,.8,{autoAlpha:t,ease:Expo.easeOut},r).to(n,.8,{height:i,ease:Expo.easeInOut},0)}var d;if(n=$("#faq"),n.length){i=n.find("#answer");f=n.find("#answerDefault");u=n.find("#answerDefault").text();var g=n.find("#questionsWrap"),a=n.find(".questionWrap"),nt=n.find(".question"),o=n.find('.question[state="opened"]'),v=$("#subNavWrap").find(".faqLink"),c=n.find(".faqList"),y=n.find("#faqListCommon"),p=n.find("#faqListTech"),w=n.find("#faqListBlock"),b=n.find("#faqListPayment"),tt=n.find("#answerWrap"),k=n.find("#answerBg"),l=$("#support"),it=(new TimelineLite).set(l,{right:"1%"}).set(l.find(".navLinkBg"),{scaleX:1});v.on({click:function(){var n=$(this),i=n.parent(".subNav").attr("id");if(n.attr("state")!="opened"){t(o,1,0,"50% 100%","rgb(75,75,75)");h(o,0,60,0);o.attr("state","");o=$();s();switch(i){case"subNav1":r(c,y,0,1);break;case"subNav2":r(c,p,0,1);break;case"subNav3":r(c,w,0,1);break;case"subNav4":r(c,b,0,1)}}}});a.on({mouseenter:function(n){var i=$(this),r=i.width(),u=i.height(),f=(n.pageX-i.offset().left-r/2)*(r>u?u/r:1),e=(n.pageY-i.offset().top-u/2)*(u>r?r/u:1),o=Math.round(Math.atan2(e,f)/1.57079633+5)%4;if(i.attr("state")!="opened")switch(o){case 0:t(this,0,1,"50% 0%","rgb(20,40,200)");break;case 1:t(this,0,1,"50% 0%","rgb(20,40,200)");break;case 2:t(this,0,1,"50% 100%","rgb(20,40,200)");break;case 3:t(this,0,1,"50% 0%","rgb(20,40,200)")}},mouseleave:function(n){var i=$(this),r=i.width(),u=i.height(),f=(n.pageX-i.offset().left-r/2)*(r>u?u/r:1),e=(n.pageY-i.offset().top-u/2)*(u>r?r/u:1),o=Math.round(Math.atan2(e,f)/1.57079633+5)%4;if(i.attr("state")!="opened")switch(o){case 0:t(this,1,0,"50% 0%","rgb(75,75,75)");break;case 1:t(this,1,0,"50% 0%","rgb(75,75,75)");break;case 2:t(this,1,0,"50% 100%","rgb(75,75,75)");break;case 3:t(this,1,0,"50% 0%","rgb(75,75,75)")}},click:function(){var n=$(this),i=$(window).width(),u=n.find(".questionTitle"),f=n.find(".answerHidden"),r=n.find(".question").outerHeight();console.log(r);n.attr("state")!="opened"&&i>950?(o.attr("state",""),t(o,1,0,"50% 100%","rgb(75,75,75)"),e(this),n.attr("state","opened"),o=n):n.attr("state")=="opened"&&i<=950?(h(n,0,60,0),n.attr("state",""),o=$()):n.attr("state")!="opened"&&i<=950&&(t(o,1,0,"50% 100%","rgb(75,75,75)"),h(o,0,60,0),o.attr("state",""),n.attr("state","opened"),h(this,1,r,.3),o=n)}});$(window).on({resize:function(){t(o,1,0,"50% 100%","rgb(75,75,75)");h(o,0,60,0);o.attr("state","");o=$()}});d=new TimelineMax({delay:.1}).to(k,1.2,{scaleY:1,ease:Expo.easeInOut}).to(i,.3,{autoAlpha:1,ease:Power3.easeOut},.8)}},l=function(){var n=$("#faq"),t,i;n.length&&(t=n.find(".question"),i=n.find(".faqLink"),t.off("mouseenter mouseleave click"),i.off("click"))};return{InitFaq:c,DestroyFaq:l}}();BIGD_VM_CONSOLES={};var MY_SERVERS=function(){var n={},t=$("#btnOrderServerHref"),i=function(){var i=$("#myServersWrap");if(i.length&&(PRICE_CALC.SetTariffs(BIGD_TARRIFFS),i.find(".serverWrap").each(function(){var t=Server($(this),this.id);t!==undefined&&(n[this.id]=t)}),t.length))t.on("click",function(){location=BIGD.ORDER_SERVER_URL})},r=function(){var r=$("#myServersWrap"),i;if(r.length){for(i in n)n[i].Destroy();n={};t.length&&t.off("click")}};return{InitMyServers:i,DestroyMyServers:r}}(),MY_BALANCE=function(){function l(){n.empty()}function c(t){n.append(t);var i=n.outerHeight();h||((new TimelineLite).to(e,.5,{height:i,ease:Power4.easeOut}).to(n,.5,{autoAlpha:1,ease:Power4.easeOut},.25),h=!0)}function a(n){n.preventDefault();l();$.ajax({method:"POST",url:t.attr("action"),data:t.serialize(),timeout:BIGD.AJAX_TIMEOUT}).done(function(n){var t=n.result,i;t=="paymentformgenerated"?(i=$(n.paymentFormHtml),$("body").append(i),i.submit()):t=="payredirecturl"?window.location.href=n.redirectUrl:t=="failed"&&c(n.message)}).fail(function(){c(BIGD.AJAX_FAILED_STRING)}).always(function(){console.log("Order completed.")})}function v(){var h=$("#accBalance");if(h.length){t=h.find("#DepositBalanceForm");o=t.find("#PaymentMethod");s=t.find("#Amount");r=SelectIconList(h.find("#paymentSystemId"),function(n){o.val(n)});r.InitSelectList();e=h.find(".consoleWrap");n=h.find("#balanceConsole");u=h.find("#depositBalanceBtn");u.on({click:a});i=h.find("#inputBalanceAdd");i.on({input:function(){s.val(i.val())}});f=BigdButton(h.find(".balance-company-button"));f.SetOnClickEventListener(function(){location=BIGD.COMPANY_INFO_URL})}}function y(){r.DestroySelectList();u.off("click");i.off("input");f.Destroy()}var r,e,n,u,t,o,s,i,h=!1,f,p=function(){$.ajax({method:"POST",url:BIGD.BALANCE_URL,timeout:BIGD.AJAX_TIMEOUT}).done(function(n){var t=$("#accBalance");t.length&&t.replaceWith(n)}).fail(function(){}).always(function(){})},w=function(){$.ajax({method:"POST",url:BIGD.BALANCE_HISTORY_URL,timeout:BIGD.AJAX_TIMEOUT}).done(function(n){var t=$("#tableBalance");t.length&&t.replaceWith(n)}).fail(function(){}).always(function(){})},b=function(){$.ajax({method:"POST",url:BIGD.BALANCE_BALANCECREDIT_URL,timeout:BIGD.AJAX_TIMEOUT}).done(function(n){var t=$("#balanceCreditWrap");t.length&&t.replaceWith(n)}).fail(function(){}).always(function(){})};return{InitBalance:v,ReloadBalance:p,ReloadHistory:w,ReloadBalanceCredit:b,DestroyBalance:y}}(),INTRO=function(){function n(n){n=n||window.event;n.preventDefault&&n.preventDefault();n.returnValue=!1}function f(t){if(u[t.keyCode])return n(t),!1}function e(){window.addEventListener&&window.addEventListener("DOMMouseScroll",n,!1);window.onwheel=n;document.onscroll=n;window.onmousewheel=document.onmousewheel=n;window.ontouchmove=n;document.onkeydown=f}function c(){window.removeEventListener&&window.removeEventListener("DOMMouseScroll",n,!1);window.onmousewheel=document.onmousewheel=null;window.onwheel=null;window.ontouchmove=null;document.onkeydown=null}function l(){if($("#intro").length){var u=$(window),a=u.width(),v=u.height(),f=$("#intro"),l=f.find(".introLetters"),n=f.find("#introBg");TweenLite.set(introLogo,{transformOrigin:"50% 100%"});i=new TimelineMax({onStart:e}).to(n,2,{scaleY:1,ease:"Expo1"}).to("#B",.2,{autoAlpha:1},"-=0.7").to(B,.6,{scrambleText:{text:"B",chars:"10",speed:.1,revealDelay:.6,tweenLength:!0,newClass:"introLettersStrong"}},"-=0.7").to("#I",.2,{autoAlpha:1},"-=0.5").to(I,.6,{scrambleText:{text:"I",chars:"01",speed:.1,revealDelay:.6,tweenLength:!0,newClass:"introLettersStrong"}},"-=0.5").to("#G",.2,{autoAlpha:1},"-=0.5").to(G,.6,{scrambleText:{text:"G",chars:"10",speed:.1,revealDelay:.6,tweenLength:!0,newClass:"introLettersStrong"}},"-=0.5").to("#D",.2,{autoAlpha:1},"-=0.5").to(D,.6,{scrambleText:{text:"D",chars:"01",speed:.1,revealDelay:.6,newClass:"introLettersStrong"}},"-=0.5").to("#dot",.2,{autoAlpha:1},"-=0.5").to(dot,.6,{scrambleText:{text:".",chars:"10",speed:.1,revealDelay:.6,tweenLength:!0,newClass:"introLettersLight"}},"-=0.5").to("#h",.2,{autoAlpha:1},"-=0.5").to(h,.6,{scrambleText:{text:"h",chars:"01",speed:.1,revealDelay:.6,tweenLength:!0,newClass:"introLettersLight"}},"-=0.5").to("#o",.2,{autoAlpha:1},"-=0.5").to(o,.6,{scrambleText:{text:"o",chars:"10",speed:.1,revealDelay:.6,tweenLength:!0,newClass:"introLettersLight"}},"-=0.5").to("#s",.2,{autoAlpha:1},"-=0.5").to(s,.6,{scrambleText:{text:"s",chars:"01",speed:.1,revealDelay:.6,tweenLength:!0,newClass:"introLettersLight"}},"-=0.5").to("#t",.2,{autoAlpha:1},"-=0.5").to(t,.6,{scrambleText:{text:"t",chars:"10",speed:.1,revealDelay:.6,tweenLength:!0,newClass:"introLettersLight"}},"-=0.5").set("#maskPage",{autoAlpha:0}).set(n,{transformOrigin:"50% 0%"}).set(window,{scrollTo:{y:0,autoKill:!1}}).staggerTo(l,1.4,{autoAlpha:0,y:-200,ease:Expo.easeOut},.03,"+=0.7").to(n,1.5,{scaleY:0,ease:"Expo1"},"-=1").to("#intro",.7,{autoAlpha:0,ease:Expo.easeOut,onStart:c},"-=0.3");r=i.totalDuration()}}var i,r,u={37:1,38:1,39:1,40:1};return{Init:l}}(),PARRALAX=function(){function t(n,t){var i=($(t).offset().top-($(window).height()+n))/12;TweenLite.to(t,.1,{y:i,ease:Expo.easeOut})}function i(){if($(".parallax").length){n=$(".parallax");TweenLite.set(n,{yPercent:0});$(window).on({scroll:function(){var i=window.pageYOffset||document.documentElement.scrollTop;t(i,n)}})}}var n;return{Init:i}}(),HOME_PAGE=function(){function ht(){function ui(){yt.revert();pt.revert()}function a(n,t,i){(new TimelineLite).to(ii,t,{scale:i,ease:Power2.easeOut})}function fi(t){var r=t+ORDER_CONFIG_LIMITS.MIN_CPU,i;$("#valueCpu").text(r);n.cpu=r;f();i=0;ht.each(function(){i<=t?TweenLite.to($(this),w,{attr:{fill:"#143CC8"}}):TweenLite.to($(this),w,{attr:{fill:"#C8C8C8"}});++i})}function ei(t){var r=t+ORDER_CONFIG_LIMITS.MIN_RAM,i;$("#valueRam").text(r);n.ram=r;f();i=0;lt.each(function(){i<=t?TweenLite.to($(this),b,{attr:{fill:"#143CC8"}}):TweenLite.to($(this),b,{attr:{fill:"#C8C8C8"}});++i})}function oi(t){$("#valueDisk").text(l[t]);n.drive=l[t];f()}function si(t){$("#valueIp").text(t+1);n.ip=t+1;f();var i=0;dt.each(function(){i<=t?TweenLite.to($(this),k,{attr:{fill:"#143CC8"}}):TweenLite.to($(this),k,{attr:{fill:"#C8C8C8"}});++i})}var ri,bt,ht,lt,l;if($("#homePage").length){PRICE_CALC.SetTariffs(BIGD_TARRIFFS);d=$("#orderPayTotal");g=$("#orderPayMonth");nt=$("#abatementMonth1");tt=$("#abatementMonth3");it=$("#abatementMonth6");rt=$("#abatementMonth12");c=!1;var at=$(window),hi=at.width(),ci=at.height(),h=$("#header"),gt=h.find("#headerText"),ni=h.find(".headerTitle"),ti=h.find(".headerSubTitle"),ii=h.find("#headerBg"),vt=$("#topBar");if(ft=vt.height(),ut=vt.find("#order"),!BIGD.isAuthorized)ut.on({click:ct});s=$("#testPriceLimitDiv");ri=new Waypoint.Inview({element:h,enter:function(){a(h,60,1.2)},exited:function(){a(h,1,1)}});a(h,60,1.2);var yt=new SplitText(ni,{type:"chars"}),pt=new SplitText(ti,{type:"chars"}),li=new TimelineMax({onComplete:ui}).set(gt,{autoAlpha:1}).staggerFrom(yt.chars,2,{x:50,autoAlpha:0,ease:Power3.easeOut},.05,0).staggerFrom(pt.chars,1,{x:20,autoAlpha:0,ease:Power3.easeOut},.02,1);n={premium:!1,cpu:ORDER_CONFIG_LIMITS.INIT_CPU,ram:ORDER_CONFIG_LIMITS.INIT_RAM,vram:0,drive:ORDER_CONFIG_LIMITS.DISK_SIZES[ORDER_CONFIG_LIMITS.INIT_DISK_SIZE_INDEX],ssd:!1,ip:1,additional:[]};var ot=$("#hdd"),st=$("#ssd"),wt=$("#diskTypeSpan");ot.on("click",function(){n.ssd=!1;f();ot.removeClass("colorGray175");st.addClass("colorGray175");wt.text("SATA III RAID")});st.on("click",function(){n.ssd=!0;f();ot.addClass("colorGray175");st.removeClass("colorGray175");wt.text("SAS")});bt=$("#orderButton");bt.on("click",function(){var r=PRICE_CALC.Calculate(n,1),t,i;if(parseInt(o.GetValue())===1&&!et(n,r.total)){(new TimelineLite).to(s,.4,{opacity:.3}).to(s,.4,{opacity:1});return}t="";t+="cpu="+n.cpu;t+="&premium="+n.premium;t+="&ram="+n.ram;t+="&drive="+n.drive;t+="&ssd="+n.ssd;t+="&ip="+n.ip;t+="&os="+e.GetValue();t+="&period="+o.GetValue();BIGD.isAuthorized?(i=BIGD.ORDER_SERVER_URL+"?"+t,window.location.href=i):(BigdReachGoalYaCounter("ym-order-main"),document.cookie="OrderConfiguration="+t,PASSPORT.ShowNeedRegistration())});e=SelectIconList(".orderOsWrap");e.InitSelectList();ht=$("#iconCpu").find(".iconCpu");ht.each(function(){TweenLite.set($(this),{attr:{fill:"#C8C8C8"},className:"-=iconCpuSt1"})});lt=$("#iconRam").find(".iconRam");lt.each(function(){TweenLite.set($(this),{attr:{fill:"#C8C8C8"},className:"-=iconRamSt0"})});l=ORDER_CONFIG_LIMITS.DISK_SIZES;var kt=$("#iconDiskDisk"),ai=new TimelineMax({repeat:-1}).set(kt,{transformOrigin:"50% 50%"}).to(kt,5,{rotationZ:1e4,ease:Expo.easeInOut}),dt=$("#iconIp").find(".iconIp");dt.each(function(){TweenLite.set($(this),{attr:{fill:"#C8C8C8"},className:"-=iconIpSt1"})});t=SliderBar($("#cpuSlider"),ORDER_CONFIG_LIMITS.MAX_CPU-ORDER_CONFIG_LIMITS.MIN_CPU+1,fi);t.SetIndex(ORDER_CONFIG_LIMITS.INIT_CPU-ORDER_CONFIG_LIMITS.MIN_CPU);i=SliderBar($("#ramSlider"),ORDER_CONFIG_LIMITS.MAX_RAM-ORDER_CONFIG_LIMITS.MIN_RAM+1,ei);i.SetIndex(ORDER_CONFIG_LIMITS.INIT_RAM-ORDER_CONFIG_LIMITS.MIN_RAM);r=SliderBar($("#diskSlider"),l.length,oi);r.SetIndex(ORDER_CONFIG_LIMITS.INIT_DISK_SIZE_INDEX);u=SliderBar($("#ipSlider"),16,si);u.SetIndex(0);v=$("#configSimple");v.on("click",function(){t&&t.SetIndex(0);i&&i.SetIndex(0);r&&r.SetIndex(0);u&&u.SetIndex(0)});y=$("#configAverage");y.on("click",function(){t&&t.SetIndex(2);i&&i.SetIndex(2);r&&r.SetIndex(2);u&&u.SetIndex(0)});p=$("#configPowerfull");p.on("click",function(){t&&t.SetIndex(4);i&&i.SetIndex(4);r&&r.SetIndex(6);u&&u.SetIndex(0)});o=SelectList("#orderPeriodWrap",function(){c&&f()});o.InitSelectList();c=!0;f()}}function h(n){s.append("<div>"+n+"<\/div>")}function et(n,t){s.empty();var i=!0;return Number(t)>Number(BIGD_TARRIFFS.maxTestPrice)&&(h(BIGD.MAX_TEST_PRICE_ERROR+BIGD_TARRIFFS.maxTestPrice+" RUB"),i=!1),n.cpu>BIGD_TARRIFFS.maxTestCpu&&(h(BIGD.MAX_TEST_CPU_ERROR+BIGD_TARRIFFS.maxTestCpu),i=!1),n.ram>BIGD_TARRIFFS.maxTestRam&&(h(BIGD.MAX_TEST_RAM_ERROR+BIGD_TARRIFFS.maxTestRam),i=!1),n.drive>BIGD_TARRIFFS.maxTestDisk&&(h(BIGD.MAX_TEST_DISK_ERROR+BIGD_TARRIFFS.maxTestDisk),i=!1),n.ip>BIGD_TARRIFFS.maxTestIp&&(h(BIGD.MAX_TEST_IP_ERROR+BIGD_TARRIFFS.maxTestIp),i=!1),i}function ct(n){n.preventDefault();TweenLite.to(window,.8,{scrollTo:{y:configServer,offsetY:ft,autoKill:!1},ease:Power3.easeOut})}function f(){if(c!==!0)return!1;n.cpu<2||n.ram<2?l||(e.GetValue()===a&&e.SetValue(ot),e.HideItem(a),l=!0):n.cpu>=2&&n.ram>=2&&l&&(e.ShowItem(a),l=!1);PRICE_CALC.WaitTariffs(function(){var r=PRICE_CALC.Calculate(n,12),u=PRICE_CALC.Calculate(n,6),f=PRICE_CALC.Calculate(n,3),i=PRICE_CALC.Calculate(n,1),s=PRICE_CALC.Calculate(n,0),t,e=parseInt(o.GetValue());if(e===1)t=i,et(n,i.total);else switch(e){case 2:t=i;break;case 3:t=f;break;case 4:t=u;break;case 5:t=r}nt.text(Math.round(i.month));tt.text(Math.round(f.month));it.text(Math.round(u.month));rt.text(Math.round(r.month));d.text(t.total);g.text(t.month)})}function lt(){o.SetValue("1");f()}function at(){t&&t.Destroy();i&&i.Destroy();r&&r.Destroy();u&&u.Destroy();v.off("click");y.off("click");p.off("click");hddSwitchButton.off("click");ssdSwitchButton.off("click");st.off("click");o.DestroySelectList();e.DestroySelectList()}var ot="1",a="2",w=.6,b=.6,k=.6,e,t,i,r,u,v,y,p,o,st,s,d,g,nt,tt,it,rt,c,n,ut,ft,l=!1;return{Init:ht,Destroy:at,SelectTestPeriod:lt}}();SETTINGS=function(){function u(){n.InitAccountSettings();t.InitPersonalSettings();i.InitSettingsChangePassword();r.Init($(".accountSettingsPartner"))}function f(){n.DestroyAccountSettings();t.DestroyPersonalSettings();i.DestroySettingsChangePassword();r.Destroy()}var n=SettingsNavigation(),t=SettingsPersonal(),i=SettingsChangePassword(),r=SettingsPartnerClass();return{InitSettings:u,DestroySettings:f}}();var COMPANY=CompanyClass(),ORDERSERVER=function(){function t(){PRICE_CALC.WaitTariffs(function(){var t={premium:v.GetValue()==="3.4",cpu:y.GetValue(),ram:p.GetValue(),vram:0,drive:w.GetValue(),ssd:b.GetValue()==="SSD",ip:k.GetValue(),additional:[]};i.GetValue().trim()!==BIGD.DDOSPROTECTIONNONE_STRING&&t.additional.push({id:4,count:Math.round(i.GetValue()/.5)});t.cpu<2||t.ram<2?c||(r.GetValue()===a&&r.SetValue(ht),r.HideItem(a),c=!0):t.cpu>=2&&t.ram>=2&&c&&(r.ShowItem(a),c=!1);var e=PRICE_CALC.Calculate(t,12),o=PRICE_CALC.Calculate(t,6),s=PRICE_CALC.Calculate(t,3),f=PRICE_CALC.Calculate(t,1),h=PRICE_CALC.Calculate(t,0),u;n.GetValue()==="TestPeriod"?u=f:n.GetValue()==="Month_1"?u=f:n.GetValue()==="Month_3"?u=s:n.GetValue()==="Month_6"?u=o:n.GetValue()==="Year_1"&&(u=e);at.text(PRICE_CALC.Round2(f.month*3-s.total));vt.text(PRICE_CALC.Round2(f.month*6-o.total));yt.text(PRICE_CALC.Round2(f.month*12-e.total));ct.text(u.total);lt.text(u.month)})}function g(n){h.append(n);tt||(h.css("visibility","visible"),tt=!0)}function pt(n){n=="TestPeriod"?s&&(TweenLite.set(e,{height:e.height()}),ot=u.height(),(new TimelineLite).to(u,l,{height:0,ease:"Expo1"}).set(u,{display:"none"}).set(f,{display:"block"}).to(f,l,{height:et}).set(f,{height:"auto"}).set(e,{height:"auto"}),ft.EnsureInit(ut),s=!1):s||(TweenLite.set(e,{height:e.height()}),et=f.height(),(new TimelineLite).to(f,l,{height:0,ease:"Expo1"}).set(f,{display:"none"}).set(u,{display:"block"}).to(u,l,{height:ot,ease:"Expo1"}).set(u,{height:"auto"}).set(e,{height:"auto"}),s=!0)}function st(t){t.preventDefault();h.empty();o.off("click");n.GetValue()==="TestPeriod"?BigdReachGoalYaCounter("ym-order-test"):BigdReachGoalYaCounter("ym-order-paid");var i=$("#OrderServerForm");$.ajax({method:"POST",url:i.attr("action"),data:i.serialize(),timeout:BIGD.AJAX_TIMEOUT}).done(function(n){var t=n.result,i;t=="creationstarted"?(g(BIGD.SERVER_CREATION_SUCCESSFULL),location=BIGD.MYSERVERS_INDEX_URL):t=="paymentformgenerated"?(i=$(n.paymentFormHtml),$("body").append(i),i.submit()):t=="payredirecturl"?window.location.href=n.redirectUrl:(t=="notenoughbalance"||t=="testnotavailable"||t=="testcostexceeded"||t=="testcpuexceeded"||t=="testramexceeded"||t=="testdiskexceeded"||t=="testipexceeded"||t=="usercannottest"||t=="needphoneconfirm"||t=="failed")&&g(n.message)}).fail(function(){g(BIGD.AJAX_FAILED_STRING)}).always(function(){o.on({click:st})})}var ht="1",a="2",v,y,p,w,b,k,i,nt,n,r,d,o,h,tt=!1,it,rt,c=!1,ct=$("#orderPayTotal"),lt=$("#orderPayMonth"),at=$("#abatementMonth3"),vt=$("#abatementMonth6"),yt=$("#abatementMonth12"),u=$("#payMethodsWrap"),f=$("#balancePhoneConfirmWrap"),e=$("#orderServerLeftBlock"),ut=$("#orderPhoneConfirmDiv"),ft=PhoneConfirmClass(),et=200,ot=150,s=!0,l=.5,wt=function(){var u=$("#OrderServerForm");if(u.length){h=$("#orderConsole");var l=u.find("#DatacenterId"),a=u.find("#Cpu"),g=u.find("#Premium"),tt=u.find("#Ram"),et=u.find("#Drive"),ot=u.find("#Ssd"),ht=u.find("#Ip"),f=u.find("#DdosProtectionCount"),ct=u.find("#OsId"),lt=u.find("#PaymentPeriod"),at=u.find("#PaymentMethod"),e=u.find("#PublicOfferChecked"),c=u.find("#PersonalDataChecked");(v=DropDownList("#listFreq",function(n){g.val(n==="3.4");t()})).InitDropDownList();(y=DropDownList("#listCores",function(n){a.val(n);t()})).InitDropDownList();(p=DropDownList("#listRam",function(n){tt.val(n);t()})).InitDropDownList();(w=DropDownList("#listDisk",function(n){et.val(n);t()})).InitDropDownList();(b=DropDownList("#listDiskType",function(n){ot.val(n==="SSD");t()})).InitDropDownList();(k=DropDownList("#listIp",function(n){ht.val(n);t()})).InitDropDownList();i=DropDownList("#listDdos",function(n){n=="zero"?(i.SetValue(BIGD.DDOSPROTECTIONNONE_STRING),f.val(0)):f.val(Math.round(n/.5));t()});i.InitDropDownList();(nt=SelectList("#orderDataCenterWrap",function(n){l.val(n)})).InitSelectList();(n=SelectList("#orderPeriodWrap",function(n){lt.val(n);t();pt(n)})).InitSelectList();n.GetValue()==="TestPeriod"&&(s=!1,ft.EnsureInit(ut));(r=SelectIconList(".orderOsWrap",function(n){ct.val(n)})).InitSelectList();d=SelectIconList("#payMethodsWrap",function(n){at.val(n)});d.InitSelectList();o=$("#btnOrderServer");o.on({click:st});it=Checkbox("#publicOfferCheckbox",function(n){n?e.val("True"):e.val("False")});rt=Checkbox("#personalDataCheckbox",function(n){n?c.val("True"):c.val("False")});t()}},bt=function(){v.DestroyDropDownList();y.DestroyDropDownList();p.DestroyDropDownList();w.DestroyDropDownList();b.DestroyDropDownList();k.DestroyDropDownList();i.DestroyDropDownList();nt.DestroySelectList();n.DestroySelectList();r.DestroySelectList();d.DestroySelectList();it.DestroyCheckbox();rt.DestroyCheckbox();o.off("click")};return{InitOrderServer:wt,DestroyOrderServer:bt}}(),Agreement=function(){var n=function(){function n(n){var n=$(n),t=i.find('.sideNavLink[state="selected"]');t.attr("state","");p(t,"rgb(75,75,75)",0);n.attr("state","selected");p(n,"rgb(20,40,200)",1)}function r(n){var t=$(n),i=t.offset().top-parseInt(t.css("margin-top"))-($("#subNavWrap").height()+$("#topBar").height());(new TimelineLite).to(window,1,{scrollTo:i,ease:Expo.easeInOut})}function t(n){var t=$(n),i=t.offset().top-parseInt(t.css("margin-top"))-($("#subNavWrap").height()+$("#topBar").height());(new TimelineLite).to(window,1,{scrollTo:i,ease:Expo.easeInOut})}function p(n,t,i){var r=$(n),u=r.find(".sideNavLinkTitle"),f=r.find(".sideNavLinkLine");(new TimelineLite).to(u,.7,{color:t,ease:Expo.easeOut}).to(f,.7,{scaleX:i,ease:Expo.easeOut},0)}var w=$("#agreementMain");if(w.length){var i=$(".sideNavWrap"),u=i.find(".sideNavLink"),u=i.find(".sideNavLink"),b=$("#subNavWrap").find(".agreementLink"),f=$("#agreementSubject"),et=$("#linkagreementSubject"),e=$("#agreementGeneralTerms"),k=$("#linkAgreementGeneralTerms"),o=$("#agreementObligations"),d=$("#linkAgreementObligations"),s=$("#agreementServiceOrder"),g=$("#linkAgreementServiceOrder"),h=$("#agreementServicePrice"),nt=$("#linkAgreementServicePrice"),c=$("#agreementResponsibility"),tt=$("#linkAgreementResponsibility"),l=$("#agreementForceMajeure"),it=$("#linkAgreementForceMajeure"),a=$("#agreementTerm"),rt=$("#linkAgreementTerm"),v=$("#agreementOtherConditions"),ut=$("#linkAgreementOtherConditions"),y=$("#agreementRequisites"),ft=$("#linkAgreementRequisites");b.on({click:function(){var n=$(this),t=n.attr("id"),i=n.attr("state");switch(t){case"agreementLinkMain":r("#agreementMain");break;case"agreementLinkAppendix1":r("#agreementAppendix1");break;case"agreementLinkAppendix2":r("#agreementAppendix2");break;case"agreementLinkDownload":location=BIGD.DOWNLOAD_AGREEMENT_URL}}});u.on({click:function(){var n=$(this).attr("id");switch(n){case"linkAgreementSubject":t(f);break;case"linkAgreementGeneralTerms":t(e);break;case"linkAgreementObligations":t(o);break;case"linkAgreementServiceOrder":t(s);break;case"linkAgreementServicePrice":t(h);break;case"linkAgreementResponsibility":t(c);break;case"linkAgreementForceMajeure":t(l);break;case"linkAgreementTerm":t(a);break;case"linkAgreementOtherConditions":t(v);break;case"linkAgreementRequisites":t(y)}}});f.waypoint(function(){n(linkAgreementSubject)},{offset:"50%"});e.waypoint(function(){n(k)},{offset:"50%"});o.waypoint(function(){n(d)},{offset:"50%"});s.waypoint(function(){n(g)},{offset:"50%"});h.waypoint(function(){n(nt)},{offset:"50%"});c.waypoint(function(){n(tt)},{offset:"50%"});l.waypoint(function(){n(it)},{offset:"50%"});a.waypoint(function(){n(rt)},{offset:"50%"});v.waypoint(function(){n(ut)},{offset:"50%"});y.waypoint(function(){n(ft)},{offset:"50%"})}},t=function(){var n=$("#agreementMain");!n.length};return{InitAgreement:n,DestroyAgreement:t}}();NOT_AUTHORIZED=function(){function t(){if(n=$("#btnLoginAgain"),n.length)n.on({click:i})}function i(n){n.preventDefault();PASSPORT.OpenBlockLogin()}function r(){n.off("click")}var n;return{Init:t,Destroy:r}}();bigd=bigd||{};bigd.HelpdeskPanel=function(n){this.helpdeskNavContent=n;var t=n.find(".helpdeskNavMenuWrapper");this.newTicketButton=t.find(".newTicketButton");this.ticketsListButton=t.find(".ticketsListButton");this.newTicketContainer=n.find(".newTicketContainer");this.ticketsListLoadingText=n.find(".ticketsListLoadingText");this.ticketsListContainer=n.find(".ticketsListContainer");this.ticketInfoContainer=n.find(".ticketInfoContainer");this.ticketCreateSuccessContainer=n.find(".ticketCreateSuccessContainer");this.ticketsListHref=this.ticketCreateSuccessContainer.find(".ticketsListHref");this.ticketInfoHref=null;this.helpdeskNewTicket=HelpdeskNewTicket(this.newTicketContainer);this.helpdeskNewTicket.SetTopicIsEmptyString(this.TOPIC_IS_EMPTY_STRING);this.helpdeskNewTicket.SetTextIsEmptyString(this.TEXT_IS_EMPTY_STRING);this.helpdeskNewTicket.SetAjaxFailedString(this.AJAX_FAILED_STRING);this.helpdeskNewTicket.SetSupportSuccessString(this.SUPPORT_SUCCESS_STRING);this.helpdeskNewTicket.SetTicketCreatedCallback(this.showTicketCreatedDiv.bind(this));this.helpdeskTicketInfo=null;this.selectedButton=this.NO_BUTTON;this.newTicketButton.attr("state")==="selected"?this.selectedButton=this.NEW_TICKET_BUTTON:this.ticketsListButton.attr("state")==="selected"&&(this.selectedButton=this.TICKET_LIST_BUTTON);this.newTicketButton.on("click",this.newTicketButtonClicked.bind(this));this.ticketsListButton.on("click",this.ticketsListButtonClicked.bind(this));this.ticketsListHref.on("click",this.ticketsListButtonClicked.bind(this))};bigd.HelpdeskPanel.prototype.NO_BUTTON=0;bigd.HelpdeskPanel.prototype.NEW_TICKET_BUTTON=1;bigd.HelpdeskPanel.prototype.TICKET_LIST_BUTTON=2;bigd.HelpdeskPanel.prototype.TICKETS_LIST_URL="/Helpdesk/TicketsList";bigd.HelpdeskPanel.prototype.TICKETS_LIST_LOADING_STRING="Tickets list is loading. It can takes several seconds.";bigd.HelpdeskPanel.prototype.TICKET_INFO_LOADING_STRING="Ticket is loading. It can takes several seconds.";bigd.HelpdeskPanel.prototype.REQUEST_ERROR_STRING="Request Error. Please, try again later.";bigd.HelpdeskPanel.prototype.TOPIC_IS_EMPTY_STRING="Topic is required.";bigd.HelpdeskPanel.prototype.TEXT_IS_EMPTY_STRING="Text message is required.";bigd.HelpdeskPanel.prototype.AJAX_FAILED_STRING="Request failed. Try again later.";bigd.HelpdeskPanel.prototype.SUPPORT_SUCCESS_STRING="New ticket has created.";bigd.HelpdeskPanel.prototype.newTicketButtonClicked=function(n){(n.preventDefault(),this.selectedButton!==this.NEW_TICKET_BUTTON)&&(this.selectedButton=this.NEW_TICKET_BUTTON,this.detachTicketInfoHrefs(),this.newTicketButton.attr("state","selected"),this.ticketsListButton.attr("state",""),this.helpdeskTicketInfo!==null&&(this.helpdeskTicketInfo.Destroy(),this.helpdeskTicketInfo=null),TweenLite.set(this.newTicketContainer,{display:"block"}),TweenLite.set(this.ticketsListLoadingText,{display:"none"}),this.ticketsListContainer.html(""),this.ticketInfoContainer.html(""),TweenLite.set(this.ticketCreateSuccessContainer,{display:"none"}))};bigd.HelpdeskPanel.prototype.ticketsListButtonClicked=function(n){(n.preventDefault(),this.selectedButton!==this.TICKET_LIST_BUTTON)&&(this.selectedButton=this.TICKET_LIST_BUTTON,this.detachTicketInfoHrefs(),this.newTicketButton.attr("state",""),this.ticketsListButton.attr("state","selected"),this.helpdeskTicketInfo!==null&&(this.helpdeskTicketInfo.Destroy(),this.helpdeskTicketInfo=null),TweenLite.set(this.newTicketContainer,{display:"none"}),this.ticketsListLoadingText.text(this.TICKETS_LIST_LOADING_STRING),TweenLite.set(this.ticketsListLoadingText,{display:"block"}),this.ticketInfoContainer.html(""),TweenLite.set(this.ticketCreateSuccessContainer,{display:"none"}),$.ajax({method:"GET",url:this.TICKETS_LIST_URL,timeout:this.AJAX_TIMEOUT}).done(function(n){TweenLite.set(this.ticketsListLoadingText,{display:"none"});this.ticketsListContainer.html(n);this.ticketInfoHref=this.ticketsListContainer.find(".ticketInfoHref");for(var t=0;t<this.ticketInfoHref.length;++t)this.ticketInfoHref.eq(t).on("click",this.ticketInfoHrefClicked.bind(this,this.ticketInfoHref[t].href))}.bind(this)).fail(function(){this.ticketsListLoadingText.text(this.REQUEST_ERROR_STRING)}.bind(this)))};bigd.HelpdeskPanel.prototype.detachTicketInfoHrefs=function(){$.isEmptyObject(this.ticketInfoHref)||(this.ticketInfoHref.off("click"),this.ticketInfoHref=null)};bigd.HelpdeskPanel.prototype.ticketInfoHrefClicked=function(n,t){t.preventDefault();this.detachTicketInfoHrefs();this.ticketsListButton.attr("state","");this.ticketsListContainer.html("");this.selectedButton=this.NO_BUTTON;this.ticketsListLoadingText.text(this.TICKET_INFO_LOADING_STRING);TweenLite.set(this.ticketsListLoadingText,{display:"block"});$.ajax({method:"GET",url:n,timeout:this.AJAX_TIMEOUT}).done(function(n){TweenLite.set(this.ticketsListLoadingText,{display:"none"});this.ticketInfoContainer.html(n);this.helpdeskTicketInfo=HelpdeskTicketInfo(this.ticketInfoContainer.find(".ticketInfoSection"));this.helpdeskTicketInfo.SetTicketRepliedCallback(this.showTicketCreatedDiv.bind(this))}.bind(this)).fail(function(){this.ticketsListLoadingText.text(this.REQUEST_ERROR_STRING)}.bind(this))};bigd.HelpdeskPanel.prototype.showTicketCreatedDiv=function(){this.detachTicketInfoHrefs();this.ticketsListButton.attr("state","");this.newTicketButton.attr("state","");this.ticketsListContainer.html("");this.selectedButton=this.NO_BUTTON;TweenLite.set(this.newTicketContainer,{display:"none"});this.helpdeskTicketInfo!==null&&(this.helpdeskTicketInfo.Destroy(),this.helpdeskTicketInfo=null);this.ticketInfoContainer.html("");TweenLite.set(this.ticketCreateSuccessContainer,{display:"block"})};bigd.HelpdeskPanel.prototype.destroy=function(){this.newTicketButton.off("click");this.ticketsListButton.off("click");this.helpdeskNewTicket.Destroy();this.helpdeskTicketInfo!==null&&(this.helpdeskTicketInfo.Destroy(),this.helpdeskTicketInfo=null)};CONTACT_PANEL=ContactPanelClass();window.onload=function(){NAVIGATION.InitNavigation();SUBNAVIGATION.InitSubNavigation();PASSPORT.InitPassport();SHAREDBAR.InitSharedBar();SETTINGS.InitSettings();ORDERSERVER.InitOrderServer();HOME_PAGE.Init();PARRALAX.Init();Agreement.InitAgreement();NOT_AUTHORIZED.Init();CONTACT_PANEL.Init();DATACENTER=Datacenter();COMPANY.Init();BIGD.isEmailConfirmationPage&&(BigdReachGoalYaCounter("ym-email-confirm"),PASSPORT.ShowEmailConfirmed());BIGD.isResetPasswordPage&&PASSPORT.ShowResetPasswordForm()};$(function(){$(document).ajaxError(function(n,t){t.status==403&&(location=BIGD.NOT_AUTHORIZED_URL)})});PRICE_CALC=function(){function i(t){return t?n.discounts.hasOwnProperty(t)?1-n.discounts[t]:1:1}function r(n){return Math.round(n*100)/100}function f(u,f){var o,e,v,l,h,a,c,s;if(n===undefined||t)return{total:0,month:0,status:"Failed"};for(o=u.premium?n.premium:n.regular,u.hasOwnProperty("tariffId")&&(o=n.serversTariffs[u.tariffId]),e=0,e+=u.cpu*o.cpu,e+=u.ram*o.ram,e+=u.vram*o.vram,e+=u.drive*(u.ssd?o.ssd:o.hdd),e+=(u.ip-1)*o.ip,e*=f,e*=i(f),v=0,l=0;l<u.additional.length;++l)h=u.additional[l],h.id!==undefined&&h.count!==undefined&&(a=n.additional[h.id],a!==undefined&&(c=0,c+=a.price*h.count,c*=f,a.applyDiscount&&(c*=i(f)))),v+=c;return s=0,s=e+v,monthPrice=f!=0?s/f:s,s=r(s),monthPrice=r(monthPrice),{total:s,month:monthPrice,status:"Success"}}function e(t,r){var e=n.additional[u],f=0;return typeof e=="undefined"?(console.log("Backup additional service with id: "+u+" is not found."),f):(f+=e.price*t,f*=r,e.applyDiscount&&(f*=i(r)),f)}function o(){$.ajax({method:"POST",url:BIGD.GETTARIFFS_URL,timeout:BIGD.AJAX_TIMEOUT}).done(function(t){console.log(t);n=t}).fail(function(){}).always(function(){})}function s(i){function u(){n===undefined&&(f-=r)>=0?(o(),setTimeout(u,r)):(t=!1,i())}if(!t){if(n!==undefined){i();return}t=!0;var f=1e4,r=1e3;u()}}function h(t){n=t}var u=6,n,t=!1;return{Calculate:f,WaitTariffs:s,Round2:r,SetTariffs:h,GetBackupPrice:e}}();bigd=bigd||{};bigd.HelpdeskAttachedFileView=function(n,t,i){this.attachedFilesContainer=n;this.objectIndex=t;this.deleteButton=null;this.attachedFileRow=null;this.fileUploadProgress=null;this.fileName=null;this.onFileDeletedCallback=i};bigd.HelpdeskAttachedFileView.prototype.AJAX_TIMEOUT=1e4;bigd.HelpdeskAttachedFileView.prototype.UPLOAD_URL="/Helpdesk/UploadFile";bigd.HelpdeskAttachedFileView.prototype.REMOVE_UPLOADED_URL="/Helpdesk/RemoveUploadedFile";bigd.HelpdeskAttachedFileView.prototype.UPLOAD_ERROR_STRING="Upload error";bigd.HelpdeskAttachedFileView.prototype.renderHtml=function(n){this.fileName=n;var t='<div class="helpdeskAttachedFile attachedFileRow'+this.objectIndex+'"><div class="attachedFileColumn">'+n+'<\/div><div class="attachedFileColumn">Загрузка: <span class="helpdesk-upload-progress-'+this.objectIndex+'">0%<\/span><\/div><div class="attachedFileColumn"><div class="bigd-button helpdesk-delete-file-button helpdesk-delete-file-'+this.objectIndex+'"><div class="bigd-button-label">Удалить<\/div><div class="bigd-button-background"><\/div><\/div><\/div><\/div>';this.attachedFilesContainer.append(t);this.attachedFileRow=this.attachedFilesContainer.find(".attachedFileRow"+this.objectIndex);this.fileUploadProgress=this.attachedFilesContainer.find(".helpdesk-upload-progress-"+this.objectIndex);this.deleteButton=BigdButton(this.attachedFilesContainer.find(".helpdesk-delete-file-"+this.objectIndex));this.deleteButton.SetOnClickEventListener(this.onDeleteButtonClicked.bind(this))};bigd.HelpdeskAttachedFileView.prototype.onFileUploadProgress=function(n){var t=n.loaded/n.total*100;this.fileUploadProgress.text(t+"%")};bigd.HelpdeskAttachedFileView.prototype.onFileUploadComplete=function(n){var t="100%";n&&(t=this.UPLOAD_ERROR_STRING);this.fileUploadProgress.text(t)};bigd.HelpdeskAttachedFileView.prototype.uploadFile=function(n){FileAPI.upload({url:this.UPLOAD_URL,files:{file:n},progress:this.onFileUploadProgress.bind(this),complete:this.onFileUploadComplete.bind(this)})};bigd.HelpdeskAttachedFileView.prototype.onDeleteButtonClicked=function(){$.ajax({method:"GET",url:this.REMOVE_UPLOADED_URL,data:{filename:this.fileName},timeout:this.AJAX_TIMEOUT}).done(function(n){console.log("File removed with result: "+n)}).fail(function(){console.log("File remove failed!")});this.onFileDeletedCallback(this.objectIndex);this.destroy();this.attachedFileRow.remove()};bigd.HelpdeskAttachedFileView.prototype.destroy=function(){this.deleteButton.Destroy()};bigd=bigd||{};bigd.HelpdeskAttachedFile=function(n,t,i){this.inputFile=n;this.attachedFilesContainer=t;this.errorConsole=i;this.attachedFileIndex=0;this.attachedFileCount=0;this.helpdeskAttachedFileViews={};this.init()};bigd.HelpdeskAttachedFile.prototype.AJAX_TIMEOUT=1e4;bigd.HelpdeskAttachedFile.prototype.MAX_FILES_COUNT=3;bigd.HelpdeskAttachedFile.prototype.MAX_FILES_ERROR_STRING="Max number of attached files is 3.";bigd.HelpdeskAttachedFile.prototype.MAX_FILE_SIZE=1048576;bigd.HelpdeskAttachedFile.prototype.MAX_FILE_SIZE_ERROR_STRING="Max size of attached file is 1 MB.";bigd.HelpdeskAttachedFile.prototype.init=function(){FileAPI.event.on(this.inputFile.get(0),"change",this.onMailRuFileApiChoose.bind(this))};bigd.HelpdeskAttachedFile.prototype.onMailRuFileApiChoose=function(n){var t,i,r;if(this.errorConsole.text(""),t=FileAPI.getFiles(n),this.attachedFileCount+t.length>this.MAX_FILES_COUNT){this.errorConsole.text(this.MAX_FILES_ERROR_STRING);return}for(i=0;i<t.length;++i){if(t[i].size>this.MAX_FILE_SIZE){this.errorConsole.text(this.MAX_FILE_SIZE_ERROR_STRING);continue}r=new bigd.HelpdeskAttachedFileView(this.attachedFilesContainer,this.attachedFileIndex,this.onAttachedFileDeleted.bind(this));r.renderHtml(t[i].name);this.helpdeskAttachedFileViews[this.attachedFileIndex]=r;this.attachedFileIndex+=1;this.attachedFileCount+=1;r.uploadFile(t[i])}};bigd.HelpdeskAttachedFile.prototype.onAttachedFileDeleted=function(n){delete this.helpdeskAttachedFileViews[n];this.attachedFileCount-=1};bigd.HelpdeskAttachedFile.prototype.destroy=function(){FileAPI.event.off(this.inputFile.get(0),"change",this.onMailRuFileApiChoose);for(var n=0;n<this.helpdeskAttachedFileViews.length;++n)this.helpdeskAttachedFileViews[n].destroy();this.helpdeskAttachedFileViews=null}