YOP Poll - Version 6.0.9

Version Description

  • fixed issue with cloning polls
  • fixed issue with editing poll duplicating new elements
  • fixed issue with display results tag
  • fixed issue with resetting settings when plugin was disabled
  • fixed issue with customizing skin throwing an error on saving poll
  • fixed issue with results not sorting "View Results" option
  • fixed issue with recaptcha
  • fixed issue with font size
  • fixed issue with color for messages
  • fixed issue with tracking ids
  • improved email notifications
  • added a new option for blocks
  • added labels to answers for better user experience
Download this release

Release Info

Developer yourownprogrammer
Plugin Icon 128x128 YOP Poll
Version 6.0.9
Comparing to
See all releases

Code changes from version 6.0.8 to 6.0.9

admin/admin.php CHANGED
@@ -82,6 +82,10 @@ class YOP_Poll_Admin {
82
$maintenance = new YOP_POLL_Maintenance();
83
$maintenance->update_to_version_6_0_8();
84
}
85
}
86
}
87
public function load_translations() {
82
$maintenance = new YOP_POLL_Maintenance();
83
$maintenance->update_to_version_6_0_8();
84
}
85
+ if ( true === version_compare( $installed_version, '6.0.9', '<' ) ) {
86
+ $maintenance = new YOP_POLL_Maintenance();
87
+ $maintenance->update_to_version_6_0_9();
88
+ }
89
}
90
}
91
public function load_translations() {
admin/assets/js/admin.min.js CHANGED
@@ -1 +1 @@
1
- if(function(t){"function"==typeof define&&define.amd?define(["jquery","jquery-ui"],t):t(jQuery)}(function($){if($.ui.timepicker=$.ui.timepicker||{},!$.ui.timepicker.version){$.extend($.ui,{timepicker:{version:"1.6.3"}});var Timepicker=function(){this.regional=[],this.regional[""]={currentText:"Now",closeText:"Done",amNames:["AM","A"],pmNames:["PM","P"],timeFormat:"HH:mm",timeSuffix:"",timeOnlyTitle:"Choose Time",timeText:"Time",hourText:"Hour",minuteText:"Minute",secondText:"Second",millisecText:"Millisecond",microsecText:"Microsecond",timezoneText:"Time Zone",isRTL:!1},this._defaults={showButtonPanel:!0,timeOnly:!1,timeOnlyShowDate:!1,showHour:null,showMinute:null,showSecond:null,showMillisec:null,showMicrosec:null,showTimezone:null,showTime:!0,stepHour:1,stepMinute:1,stepSecond:1,stepMillisec:1,stepMicrosec:1,hour:0,minute:0,second:0,millisec:0,microsec:0,timezone:null,hourMin:0,minuteMin:0,secondMin:0,millisecMin:0,microsecMin:0,hourMax:23,minuteMax:59,secondMax:59,millisecMax:999,microsecMax:999,minDateTime:null,maxDateTime:null,maxTime:null,minTime:null,onSelect:null,hourGrid:0,minuteGrid:0,secondGrid:0,millisecGrid:0,microsecGrid:0,alwaysSetTime:!0,separator:" ",altFieldTimeOnly:!0,altTimeFormat:null,altSeparator:null,altTimeSuffix:null,altRedirectFocus:!0,pickerTimeFormat:null,pickerTimeSuffix:null,showTimepicker:!0,timezoneList:null,addSliderAccess:!1,sliderAccessArgs:null,controlType:"slider",oneLine:!1,defaultValue:null,parse:"strict",afterInject:null},$.extend(this._defaults,this.regional[""])};$.extend(Timepicker.prototype,{$input:null,$altInput:null,$timeObj:null,inst:null,hour_slider:null,minute_slider:null,second_slider:null,millisec_slider:null,microsec_slider:null,timezone_select:null,maxTime:null,minTime:null,hour:0,minute:0,second:0,millisec:0,microsec:0,timezone:null,hourMinOriginal:null,minuteMinOriginal:null,secondMinOriginal:null,millisecMinOriginal:null,microsecMinOriginal:null,hourMaxOriginal:null,minuteMaxOriginal:null,secondMaxOriginal:null,millisecMaxOriginal:null,microsecMaxOriginal:null,ampm:"",formattedDate:"",formattedTime:"",formattedDateTime:"",timezoneList:null,units:["hour","minute","second","millisec","microsec"],support:{},control:null,setDefaults:function(t){return extendRemove(this._defaults,t||{}),this},_newInst:function($input,opts){var tp_inst=new Timepicker,inlineSettings={},fns={},overrides,i;for(var attrName in this._defaults)if(this._defaults.hasOwnProperty(attrName)){var attrValue=$input.attr("time:"+attrName);if(attrValue)try{inlineSettings[attrName]=eval(attrValue)}catch(t){inlineSettings[attrName]=attrValue}}for(i in overrides={beforeShow:function(t,e){if($.isFunction(tp_inst._defaults.evnts.beforeShow))return tp_inst._defaults.evnts.beforeShow.call($input[0],t,e,tp_inst)},onChangeMonthYear:function(t,e,i){$.isFunction(tp_inst._defaults.evnts.onChangeMonthYear)&&tp_inst._defaults.evnts.onChangeMonthYear.call($input[0],t,e,i,tp_inst)},onClose:function(t,e){!0===tp_inst.timeDefined&&""!==$input.val()&&tp_inst._updateDateTime(e),$.isFunction(tp_inst._defaults.evnts.onClose)&&tp_inst._defaults.evnts.onClose.call($input[0],t,e,tp_inst)}},overrides)overrides.hasOwnProperty(i)&&(fns[i]=opts[i]||this._defaults[i]||null);tp_inst._defaults=$.extend({},this._defaults,inlineSettings,opts,overrides,{evnts:fns,timepicker:tp_inst}),tp_inst.amNames=$.map(tp_inst._defaults.amNames,function(t){return t.toUpperCase()}),tp_inst.pmNames=$.map(tp_inst._defaults.pmNames,function(t){return t.toUpperCase()}),tp_inst.support=detectSupport(tp_inst._defaults.timeFormat+(tp_inst._defaults.pickerTimeFormat?tp_inst._defaults.pickerTimeFormat:"")+(tp_inst._defaults.altTimeFormat?tp_inst._defaults.altTimeFormat:"")),"string"==typeof tp_inst._defaults.controlType?("slider"===tp_inst._defaults.controlType&&void 0===$.ui.slider&&(tp_inst._defaults.controlType="select"),tp_inst.control=tp_inst._controls[tp_inst._defaults.controlType]):tp_inst.control=tp_inst._defaults.controlType;var timezoneList=[-720,-660,-600,-570,-540,-480,-420,-360,-300,-270,-240,-210,-180,-120,-60,0,60,120,180,210,240,270,300,330,345,360,390,420,480,525,540,570,600,630,660,690,720,765,780,840];null!==tp_inst._defaults.timezoneList&&(timezoneList=tp_inst._defaults.timezoneList);var tzl=timezoneList.length,tzi=0,tzv=null;if(0<tzl&&"object"!=typeof timezoneList[0])for(;tzi<tzl;tzi++)tzv=timezoneList[tzi],timezoneList[tzi]={value:tzv,label:$.timepicker.timezoneOffsetString(tzv,tp_inst.support.iso8601)};return tp_inst._defaults.timezoneList=timezoneList,tp_inst.timezone=null!==tp_inst._defaults.timezone?$.timepicker.timezoneOffsetNumber(tp_inst._defaults.timezone):-1*(new Date).getTimezoneOffset(),tp_inst.hour=tp_inst._defaults.hour<tp_inst._defaults.hourMin?tp_inst._defaults.hourMin:tp_inst._defaults.hour>tp_inst._defaults.hourMax?tp_inst._defaults.hourMax:tp_inst._defaults.hour,tp_inst.minute=tp_inst._defaults.minute<tp_inst._defaults.minuteMin?tp_inst._defaults.minuteMin:tp_inst._defaults.minute>tp_inst._defaults.minuteMax?tp_inst._defaults.minuteMax:tp_inst._defaults.minute,tp_inst.second=tp_inst._defaults.second<tp_inst._defaults.secondMin?tp_inst._defaults.secondMin:tp_inst._defaults.second>tp_inst._defaults.secondMax?tp_inst._defaults.secondMax:tp_inst._defaults.second,tp_inst.millisec=tp_inst._defaults.millisec<tp_inst._defaults.millisecMin?tp_inst._defaults.millisecMin:tp_inst._defaults.millisec>tp_inst._defaults.millisecMax?tp_inst._defaults.millisecMax:tp_inst._defaults.millisec,tp_inst.microsec=tp_inst._defaults.microsec<tp_inst._defaults.microsecMin?tp_inst._defaults.microsecMin:tp_inst._defaults.microsec>tp_inst._defaults.microsecMax?tp_inst._defaults.microsecMax:tp_inst._defaults.microsec,tp_inst.ampm="",tp_inst.$input=$input,tp_inst._defaults.altField&&(tp_inst.$altInput=$(tp_inst._defaults.altField),!0===tp_inst._defaults.altRedirectFocus&&tp_inst.$altInput.css({cursor:"pointer"}).focus(function(){$input.trigger("focus")})),0!==tp_inst._defaults.minDate&&0!==tp_inst._defaults.minDateTime||(tp_inst._defaults.minDate=new Date),0!==tp_inst._defaults.maxDate&&0!==tp_inst._defaults.maxDateTime||(tp_inst._defaults.maxDate=new Date),void 0!==tp_inst._defaults.minDate&&tp_inst._defaults.minDate instanceof Date&&(tp_inst._defaults.minDateTime=new Date(tp_inst._defaults.minDate.getTime())),void 0!==tp_inst._defaults.minDateTime&&tp_inst._defaults.minDateTime instanceof Date&&(tp_inst._defaults.minDate=new Date(tp_inst._defaults.minDateTime.getTime())),void 0!==tp_inst._defaults.maxDate&&tp_inst._defaults.maxDate instanceof Date&&(tp_inst._defaults.maxDateTime=new Date(tp_inst._defaults.maxDate.getTime())),void 0!==tp_inst._defaults.maxDateTime&&tp_inst._defaults.maxDateTime instanceof Date&&(tp_inst._defaults.maxDate=new Date(tp_inst._defaults.maxDateTime.getTime())),tp_inst.$input.bind("focus",function(){tp_inst._onFocus()}),tp_inst},_addTimePicker:function(t){var e=$.trim(this.$altInput&&this._defaults.altFieldTimeOnly?this.$input.val()+" "+this.$altInput.val():this.$input.val());this.timeDefined=this._parseTime(e),this._limitMinMaxDateTime(t,!1),this._injectTimePicker(),this._afterInject()},_parseTime:function(e,t){if(this.inst||(this.inst=$.datepicker._getInst(this.$input[0])),t||!this._defaults.timeOnly){var i=$.datepicker._get(this.inst,"dateFormat");try{var n=parseDateTimeInternal(i,this._defaults.timeFormat,e,$.datepicker._getFormatConfig(this.inst),this._defaults);if(!n.timeObj)return!1;$.extend(this,n.timeObj)}catch(t){return $.timepicker.log("Error parsing the date/time string: "+t+"\ndate/time string = "+e+"\ntimeFormat = "+this._defaults.timeFormat+"\ndateFormat = "+i),!1}return!0}var a=$.datepicker.parseTime(this._defaults.timeFormat,e,this._defaults);return!!a&&($.extend(this,a),!0)},_afterInject:function(){var t=this.inst.settings;$.isFunction(t.afterInject)&&t.afterInject.call(this)},_injectTimePicker:function(){var t=this.inst.dpDiv,e=this.inst.settings,o=this,r="",i="",n=null,a={},s={},l=null,d=0,c=0;if(0===t.find("div.ui-timepicker-div").length&&e.showTimepicker){var u=" ui_tpicker_unit_hide",h='<div class="ui-timepicker-div'+(e.isRTL?" ui-timepicker-rtl":"")+(e.oneLine&&"select"===e.controlType?" ui-timepicker-oneLine":"")+'"><dl><dt class="ui_tpicker_time_label'+(e.showTime?"":u)+'">'+e.timeText+'</dt><dd class="ui_tpicker_time '+(e.showTime?"":u)+'"><input class="ui_tpicker_time_input" '+(e.timeInput?"":"disabled")+"/></dd>";for(d=0,c=this.units.length;d<c;d++){if(n=null!==e["show"+(i=(r=this.units[d]).substr(0,1).toUpperCase()+r.substr(1))]?e["show"+i]:this.support[r],a[r]=parseInt(e[r+"Max"]-(e[r+"Max"]-e[r+"Min"])%e["step"+i],10),s[r]=0,h+='<dt class="ui_tpicker_'+r+"_label"+(n?"":u)+'">'+e[r+"Text"]+'</dt><dd class="ui_tpicker_'+r+(n?"":u)+'"><div class="ui_tpicker_'+r+"_slider"+(n?"":u)+'"></div>',n&&0<e[r+"Grid"]){if(h+='<div style="padding-left: 1px"><table class="ui-tpicker-grid-label"><tr>',"hour"===r)for(var p=e[r+"Min"];p<=a[r];p+=parseInt(e[r+"Grid"],10)){s[r]++;var f=$.datepicker.formatTime(this.support.ampm?"hht":"HH",{hour:p},e);h+='<td data-for="'+r+'">'+f+"</td>"}else for(var m=e[r+"Min"];m<=a[r];m+=parseInt(e[r+"Grid"],10))s[r]++,h+='<td data-for="'+r+'">'+(m<10?"0":"")+m+"</td>";h+="</tr></table></div>"}h+="</dd>"}var g=null!==e.showTimezone?e.showTimezone:this.support.timezone;h+='<dt class="ui_tpicker_timezone_label'+(g?"":u)+'">'+e.timezoneText+"</dt>",h+='<dd class="ui_tpicker_timezone'+(g?"":u)+'"></dd>';var v=$(h+="</dl></div>");for(!0===e.timeOnly&&(v.prepend('<div class="ui-widget-header ui-helper-clearfix ui-corner-all"><div class="ui-datepicker-title">'+e.timeOnlyTitle+"</div></div>"),t.find(".ui-datepicker-header, .ui-datepicker-calendar").hide()),d=0,c=o.units.length;d<c;d++)n=null!==e["show"+(i=(r=o.units[d]).substr(0,1).toUpperCase()+r.substr(1))]?e["show"+i]:this.support[r],o[r+"_slider"]=o.control.create(o,v.find(".ui_tpicker_"+r+"_slider"),r,o[r],e[r+"Min"],a[r],e["step"+i]),n&&0<e[r+"Grid"]&&(l=100*s[r]*e[r+"Grid"]/(a[r]-e[r+"Min"]),v.find(".ui_tpicker_"+r+" table").css({width:l+"%",marginLeft:e.isRTL?"0":l/(-2*s[r])+"%",marginRight:e.isRTL?l/(-2*s[r])+"%":"0",borderCollapse:"collapse"}).find("td").click(function(t){var e=$(this),i=e.html(),n=parseInt(i.replace(/[^0-9]/g),10),a=i.replace(/[^apm]/gi),s=e.data("for");"hour"===s&&(-1!==a.indexOf("p")&&n<12?n+=12:-1!==a.indexOf("a")&&12===n&&(n=0)),o.control.value(o,o[s+"_slider"],r,n),o._onTimeChange(),o._onSelectHandler()}).css({cursor:"pointer",width:100/s[r]+"%",textAlign:"center",overflow:"hidden"}));if(this.timezone_select=v.find(".ui_tpicker_timezone").append("<select></select>").find("select"),$.fn.append.apply(this.timezone_select,$.map(e.timezoneList,function(t,e){return $("<option />").val("object"==typeof t?t.value:t).text("object"==typeof t?t.label:t)})),void 0!==this.timezone&&null!==this.timezone&&""!==this.timezone)-1*new Date(this.inst.selectedYear,this.inst.selectedMonth,this.inst.selectedDay,12).getTimezoneOffset()===this.timezone?selectLocalTimezone(o):this.timezone_select.val(this.timezone);else void 0!==this.hour&&null!==this.hour&&""!==this.hour?this.timezone_select.val(e.timezone):selectLocalTimezone(o);this.timezone_select.change(function(){o._onTimeChange(),o._onSelectHandler(),o._afterInject()});var b=t.find(".ui-datepicker-buttonpane");if(b.length?b.before(v):t.append(v),this.$timeObj=v.find(".ui_tpicker_time_input"),this.$timeObj.change(function(){var t=o.inst.settings.timeFormat,e=$.datepicker.parseTime(t,this.value),i=new Date;e?(i.setHours(e.hour),i.setMinutes(e.minute),i.setSeconds(e.second),$.datepicker._setTime(o.inst,i)):(this.value=o.formattedTime,this.blur())}),null!==this.inst){var y=this.timeDefined;this._onTimeChange(),this.timeDefined=y}if(this._defaults.addSliderAccess){var w=this._defaults.sliderAccessArgs,x=this._defaults.isRTL;w.isRTL=x,setTimeout(function(){if(0===v.find(".ui-slider-access").length){v.find(".ui-slider:visible").sliderAccess(w);var o=v.find(".ui-slider-access:eq(0)").outerWidth(!0);o&&v.find("table:visible").each(function(){var t=$(this),e=t.outerWidth(),i=t.css(x?"marginRight":"marginLeft").toString().replace("%",""),n=e-o,a=i*n/e+"%",s={width:n,marginRight:0,marginLeft:0};s[x?"marginRight":"marginLeft"]=a,t.css(s)})}},10)}o._limitMinMaxDateTime(this.inst,!0)}},_limitMinMaxDateTime:function(t,e){var i=this._defaults,n=new Date(t.selectedYear,t.selectedMonth,t.selectedDay);if(this._defaults.showTimepicker){if(null!==$.datepicker._get(t,"minDateTime")&&void 0!==$.datepicker._get(t,"minDateTime")&&n){var a=$.datepicker._get(t,"minDateTime"),s=new Date(a.getFullYear(),a.getMonth(),a.getDate(),0,0,0,0);null!==this.hourMinOriginal&&null!==this.minuteMinOriginal&&null!==this.secondMinOriginal&&null!==this.millisecMinOriginal&&null!==this.microsecMinOriginal||(this.hourMinOriginal=i.hourMin,this.minuteMinOriginal=i.minuteMin,this.secondMinOriginal=i.secondMin,this.millisecMinOriginal=i.millisecMin,this.microsecMinOriginal=i.microsecMin),t.settings.timeOnly||s.getTime()===n.getTime()?(this._defaults.hourMin=a.getHours(),this.hour<=this._defaults.hourMin?(this.hour=this._defaults.hourMin,this._defaults.minuteMin=a.getMinutes(),this.minute<=this._defaults.minuteMin?(this.minute=this._defaults.minuteMin,this._defaults.secondMin=a.getSeconds(),this.second<=this._defaults.secondMin?(this.second=this._defaults.secondMin,this._defaults.millisecMin=a.getMilliseconds(),this.millisec<=this._defaults.millisecMin?(this.millisec=this._defaults.millisecMin,this._defaults.microsecMin=a.getMicroseconds()):(this.microsec<this._defaults.microsecMin&&(this.microsec=this._defaults.microsecMin),this._defaults.microsecMin=this.microsecMinOriginal)):(this._defaults.millisecMin=this.millisecMinOriginal,this._defaults.microsecMin=this.microsecMinOriginal)):(this._defaults.secondMin=this.secondMinOriginal,this._defaults.millisecMin=this.millisecMinOriginal,this._defaults.microsecMin=this.microsecMinOriginal)):(this._defaults.minuteMin=this.minuteMinOriginal,this._defaults.secondMin=this.secondMinOriginal,this._defaults.millisecMin=this.millisecMinOriginal,this._defaults.microsecMin=this.microsecMinOriginal)):(this._defaults.hourMin=this.hourMinOriginal,this._defaults.minuteMin=this.minuteMinOriginal,this._defaults.secondMin=this.secondMinOriginal,this._defaults.millisecMin=this.millisecMinOriginal,this._defaults.microsecMin=this.microsecMinOriginal)}if(null!==$.datepicker._get(t,"maxDateTime")&&void 0!==$.datepicker._get(t,"maxDateTime")&&n){var o=$.datepicker._get(t,"maxDateTime"),r=new Date(o.getFullYear(),o.getMonth(),o.getDate(),0,0,0,0);null!==this.hourMaxOriginal&&null!==this.minuteMaxOriginal&&null!==this.secondMaxOriginal&&null!==this.millisecMaxOriginal||(this.hourMaxOriginal=i.hourMax,this.minuteMaxOriginal=i.minuteMax,this.secondMaxOriginal=i.secondMax,this.millisecMaxOriginal=i.millisecMax,this.microsecMaxOriginal=i.microsecMax),t.settings.timeOnly||r.getTime()===n.getTime()?(this._defaults.hourMax=o.getHours(),this.hour>=this._defaults.hourMax?(this.hour=this._defaults.hourMax,this._defaults.minuteMax=o.getMinutes(),this.minute>=this._defaults.minuteMax?(this.minute=this._defaults.minuteMax,this._defaults.secondMax=o.getSeconds(),this.second>=this._defaults.secondMax?(this.second=this._defaults.secondMax,this._defaults.millisecMax=o.getMilliseconds(),this.millisec>=this._defaults.millisecMax?(this.millisec=this._defaults.millisecMax,this._defaults.microsecMax=o.getMicroseconds()):(this.microsec>this._defaults.microsecMax&&(this.microsec=this._defaults.microsecMax),this._defaults.microsecMax=this.microsecMaxOriginal)):(this._defaults.millisecMax=this.millisecMaxOriginal,this._defaults.microsecMax=this.microsecMaxOriginal)):(this._defaults.secondMax=this.secondMaxOriginal,this._defaults.millisecMax=this.millisecMaxOriginal,this._defaults.microsecMax=this.microsecMaxOriginal)):(this._defaults.minuteMax=this.minuteMaxOriginal,this._defaults.secondMax=this.secondMaxOriginal,this._defaults.millisecMax=this.millisecMaxOriginal,this._defaults.microsecMax=this.microsecMaxOriginal)):(this._defaults.hourMax=this.hourMaxOriginal,this._defaults.minuteMax=this.minuteMaxOriginal,this._defaults.secondMax=this.secondMaxOriginal,this._defaults.millisecMax=this.millisecMaxOriginal,this._defaults.microsecMax=this.microsecMaxOriginal)}if(null!==t.settings.minTime){var l=new Date("01/01/1970 "+t.settings.minTime);this.hour<l.getHours()?(this.hour=this._defaults.hourMin=l.getHours(),this.minute=this._defaults.minuteMin=l.getMinutes()):this.hour===l.getHours()&&this.minute<l.getMinutes()?this.minute=this._defaults.minuteMin=l.getMinutes():this._defaults.hourMin<l.getHours()?(this._defaults.hourMin=l.getHours(),this._defaults.minuteMin=l.getMinutes()):this._defaults.hourMin===l.getHours()===this.hour&&this._defaults.minuteMin<l.getMinutes()?this._defaults.minuteMin=l.getMinutes():this._defaults.minuteMin=0}if(null!==t.settings.maxTime){var d=new Date("01/01/1970 "+t.settings.maxTime);this.hour>d.getHours()?(this.hour=this._defaults.hourMax=d.getHours(),this.minute=this._defaults.minuteMax=d.getMinutes()):this.hour===d.getHours()&&this.minute>d.getMinutes()?this.minute=this._defaults.minuteMax=d.getMinutes():this._defaults.hourMax>d.getHours()?(this._defaults.hourMax=d.getHours(),this._defaults.minuteMax=d.getMinutes()):this._defaults.hourMax===d.getHours()===this.hour&&this._defaults.minuteMax>d.getMinutes()?this._defaults.minuteMax=d.getMinutes():this._defaults.minuteMax=59}if(void 0!==e&&!0===e){var c=parseInt(this._defaults.hourMax-(this._defaults.hourMax-this._defaults.hourMin)%this._defaults.stepHour,10),u=parseInt(this._defaults.minuteMax-(this._defaults.minuteMax-this._defaults.minuteMin)%this._defaults.stepMinute,10),h=parseInt(this._defaults.secondMax-(this._defaults.secondMax-this._defaults.secondMin)%this._defaults.stepSecond,10),p=parseInt(this._defaults.millisecMax-(this._defaults.millisecMax-this._defaults.millisecMin)%this._defaults.stepMillisec,10),f=parseInt(this._defaults.microsecMax-(this._defaults.microsecMax-this._defaults.microsecMin)%this._defaults.stepMicrosec,10);this.hour_slider&&(this.control.options(this,this.hour_slider,"hour",{min:this._defaults.hourMin,max:c,step:this._defaults.stepHour}),this.control.value(this,this.hour_slider,"hour",this.hour-this.hour%this._defaults.stepHour)),this.minute_slider&&(this.control.options(this,this.minute_slider,"minute",{min:this._defaults.minuteMin,max:u,step:this._defaults.stepMinute}),this.control.value(this,this.minute_slider,"minute",this.minute-this.minute%this._defaults.stepMinute)),this.second_slider&&(this.control.options(this,this.second_slider,"second",{min:this._defaults.secondMin,max:h,step:this._defaults.stepSecond}),this.control.value(this,this.second_slider,"second",this.second-this.second%this._defaults.stepSecond)),this.millisec_slider&&(this.control.options(this,this.millisec_slider,"millisec",{min:this._defaults.millisecMin,max:p,step:this._defaults.stepMillisec}),this.control.value(this,this.millisec_slider,"millisec",this.millisec-this.millisec%this._defaults.stepMillisec)),this.microsec_slider&&(this.control.options(this,this.microsec_slider,"microsec",{min:this._defaults.microsecMin,max:f,step:this._defaults.stepMicrosec}),this.control.value(this,this.microsec_slider,"microsec",this.microsec-this.microsec%this._defaults.stepMicrosec))}}},_onTimeChange:function(){if(this._defaults.showTimepicker){var t=!!this.hour_slider&&this.control.value(this,this.hour_slider,"hour"),e=!!this.minute_slider&&this.control.value(this,this.minute_slider,"minute"),i=!!this.second_slider&&this.control.value(this,this.second_slider,"second"),n=!!this.millisec_slider&&this.control.value(this,this.millisec_slider,"millisec"),a=!!this.microsec_slider&&this.control.value(this,this.microsec_slider,"microsec"),s=!!this.timezone_select&&this.timezone_select.val(),o=this._defaults,r=o.pickerTimeFormat||o.timeFormat,l=o.pickerTimeSuffix||o.timeSuffix;"object"==typeof t&&(t=!1),"object"==typeof e&&(e=!1),"object"==typeof i&&(i=!1),"object"==typeof n&&(n=!1),"object"==typeof a&&(a=!1),"object"==typeof s&&(s=!1),!1!==t&&(t=parseInt(t,10)),!1!==e&&(e=parseInt(e,10)),!1!==i&&(i=parseInt(i,10)),!1!==n&&(n=parseInt(n,10)),!1!==a&&(a=parseInt(a,10)),!1!==s&&(s=s.toString());var d=o[t<12?"amNames":"pmNames"][0],c=t!==parseInt(this.hour,10)||e!==parseInt(this.minute,10)||i!==parseInt(this.second,10)||n!==parseInt(this.millisec,10)||a!==parseInt(this.microsec,10)||0<this.ampm.length&&t<12!=(-1!==$.inArray(this.ampm.toUpperCase(),this.amNames))||null!==this.timezone&&s!==this.timezone.toString();if(c&&(!1!==t&&(this.hour=t),!1!==e&&(this.minute=e),!1!==i&&(this.second=i),!1!==n&&(this.millisec=n),!1!==a&&(this.microsec=a),!1!==s&&(this.timezone=s),this.inst||(this.inst=$.datepicker._getInst(this.$input[0])),this._limitMinMaxDateTime(this.inst,!0)),this.support.ampm&&(this.ampm=d),this.formattedTime=$.datepicker.formatTime(o.timeFormat,this,o),this.$timeObj&&(r===o.timeFormat?this.$timeObj.val(this.formattedTime+l):this.$timeObj.val($.datepicker.formatTime(r,this,o)+l),this.$timeObj[0].setSelectionRange)){var u=this.$timeObj[0].selectionStart,h=this.$timeObj[0].selectionEnd;this.$timeObj[0].setSelectionRange(u,h)}this.timeDefined=!0,c&&this._updateDateTime()}},_onSelectHandler:function(){var t=this._defaults.onSelect||this.inst.settings.onSelect,e=this.$input?this.$input[0]:null;t&&e&&t.apply(e,[this.formattedDateTime,this])},_updateDateTime:function(t){var e=0<(t=this.inst||t).currentYear?new Date(t.currentYear,t.currentMonth,t.currentDay):new Date(t.selectedYear,t.selectedMonth,t.selectedDay),i=$.datepicker._daylightSavingAdjust(e),n=$.datepicker._get(t,"dateFormat"),a=$.datepicker._getFormatConfig(t),s=null!==i&&this.timeDefined;this.formattedDate=$.datepicker.formatDate(n,null===i?new Date:i,a);var o=this.formattedDate;if(""===t.lastVal&&(t.currentYear=t.selectedYear,t.currentMonth=t.selectedMonth,t.currentDay=t.selectedDay),!0===this._defaults.timeOnly&&!1===this._defaults.timeOnlyShowDate?o=this.formattedTime:(!0!==this._defaults.timeOnly&&(this._defaults.alwaysSetTime||s)||!0===this._defaults.timeOnly&&!0===this._defaults.timeOnlyShowDate)&&(o+=this._defaults.separator+this.formattedTime+this._defaults.timeSuffix),this.formattedDateTime=o,this._defaults.showTimepicker)if(this.$altInput&&!1===this._defaults.timeOnly&&!0===this._defaults.altFieldTimeOnly)this.$altInput.val(this.formattedTime),this.$input.val(this.formattedDate);else if(this.$altInput){this.$input.val(o);var r="",l=null!==this._defaults.altSeparator?this._defaults.altSeparator:this._defaults.separator,d=null!==this._defaults.altTimeSuffix?this._defaults.altTimeSuffix:this._defaults.timeSuffix;this._defaults.timeOnly||(r=this._defaults.altFormat?$.datepicker.formatDate(this._defaults.altFormat,null===i?new Date:i,a):this.formattedDate)&&(r+=l),null!==this._defaults.altTimeFormat?r+=$.datepicker.formatTime(this._defaults.altTimeFormat,this,this._defaults)+d:r+=this.formattedTime+d,this.$altInput.val(r)}else this.$input.val(o);else this.$input.val(this.formattedDate);this.$input.trigger("change")},_onFocus:function(){if(!this.$input.val()&&this._defaults.defaultValue){this.$input.val(this._defaults.defaultValue);var t=$.datepicker._getInst(this.$input.get(0)),e=$.datepicker._get(t,"timepicker");if(e&&e._defaults.timeOnly&&t.input.val()!==t.lastVal)try{$.datepicker._updateDatepicker(t)}catch(t){$.timepicker.log(t)}}},_controls:{slider:{create:function(i,t,n,e,a,s,o){var r=i._defaults.isRTL;return t.prop("slide",null).slider({orientation:"horizontal",value:r?-1*e:e,min:r?-1*s:a,max:r?-1*a:s,step:o,slide:function(t,e){i.control.value(i,$(this),n,r?-1*e.value:e.value),i._onTimeChange()},stop:function(t,e){i._onSelectHandler()}})},options:function(t,e,i,n,a){if(t._defaults.isRTL){if("string"==typeof n)return"min"===n||"max"===n?void 0!==a?e.slider(n,-1*a):Math.abs(e.slider(n)):e.slider(n);var s=n.min,o=n.max;return n.min=n.max=null,void 0!==s&&(n.max=-1*s),void 0!==o&&(n.min=-1*o),e.slider(n)}return"string"==typeof n&&void 0!==a?e.slider(n,a):e.slider(n)},value:function(t,e,i,n){return t._defaults.isRTL?void 0!==n?e.slider("value",-1*n):Math.abs(e.slider("value")):void 0!==n?e.slider("value",n):e.slider("value")}},select:{create:function(e,t,i,n,a,s,o){for(var r='<select class="ui-timepicker-select ui-state-default ui-corner-all" data-unit="'+i+'" data-min="'+a+'" data-max="'+s+'" data-step="'+o+'">',l=e._defaults.pickerTimeFormat||e._defaults.timeFormat,d=a;d<=s;d+=o)r+='<option value="'+d+'"'+(d===n?" selected":"")+">",r+="hour"===i?$.datepicker.formatTime($.trim(l.replace(/[^ht ]/gi,"")),{hour:d},e._defaults):"millisec"===i||"microsec"===i||10<=d?d:"0"+d.toString(),r+="</option>";return r+="</select>",t.children("select").remove(),$(r).appendTo(t).change(function(t){e._onTimeChange(),e._onSelectHandler(),e._afterInject()}),t},options:function(t,e,i,n,a){var s={},o=e.children("select");if("string"==typeof n){if(void 0===a)return o.data(n);s[n]=a}else s=n;return t.control.create(t,e,o.data("unit"),o.val(),0<=s.min?s.min:o.data("min"),s.max||o.data("max"),s.step||o.data("step"))},value:function(t,e,i,n){var a=e.children("select");return void 0!==n?a.val(n):a.val()}}}}),$.fn.extend({timepicker:function(t){t=t||{};var e=Array.prototype.slice.call(arguments);return"object"==typeof t&&(e[0]=$.extend(t,{timeOnly:!0})),$(this).each(function(){$.fn.datetimepicker.apply($(this),e)})},datetimepicker:function(e){var i=arguments;return"string"==typeof(e=e||{})?"getDate"===e||"option"===e&&2===i.length&&"string"==typeof i[1]?$.fn.datepicker.apply($(this[0]),i):this.each(function(){var t=$(this);t.datepicker.apply(t,i)}):this.each(function(){var t=$(this);t.datepicker($.timepicker._newInst(t,e)._defaults)})}}),$.datepicker.parseDateTime=function(t,e,i,n,a){var s=parseDateTimeInternal(t,e,i,n,a);if(s.timeObj){var o=s.timeObj;s.date.setHours(o.hour,o.minute,o.second,o.millisec),s.date.setMicroseconds(o.microsec)}return s.date},$.datepicker.parseTime=function(t,e,i){var n=extendRemove(extendRemove({},$.timepicker._defaults),i||{}),a=(t.replace(/\'.*?\'/g,"").indexOf("Z"),function(t,e,s){var i,n="^"+t.toString().replace(/([hH]{1,2}|mm?|ss?|[tT]{1,2}|[zZ]|[lc]|'.*?')/g,function(t){var e,i,n,a=t.length;switch(t.charAt(0).toLowerCase()){case"h":case"m":case"s":return 1===a?"(\\d?\\d)":"(\\d{"+a+"})";case"l":case"c":return"(\\d?\\d?\\d)";case"z":return"(z|[-+]\\d\\d:?\\d\\d|\\S+)?";case"t":return e=s.amNames,i=s.pmNames,n=[],e&&$.merge(n,e),i&&$.merge(n,i),"("+(n=$.map(n,function(t){return t.replace(/[.*+?|()\[\]{}\\]/g,"\\amp;")})).join("|")+")?";default:return"("+t.replace(/\'/g,"").replace(/(\.|\$|\^|\\|\/|\(|\)|\[|\]|\?|\+|\*)/g,function(t){return"\\"+t})+")?"}}).replace(/\s/g,"\\s?")+s.timeSuffix+"quot;,a=function(t){var e=t.toLowerCase().match(/(h{1,2}|m{1,2}|s{1,2}|l{1}|c{1}|t{1,2}|z|'.*?')/g),i={h:-1,m:-1,s:-1,l:-1,c:-1,t:-1,z:-1};if(e)for(var n=0;n<e.length;n++)-1===i[e[n].toString().charAt(0)]&&(i[e[n].toString().charAt(0)]=n+1);return i}(t),o="",r={hour:0,minute:0,second:0,millisec:0,microsec:0};return!!(i=e.match(new RegExp(n,"i")))&&(-1!==a.t&&(void 0===i[a.t]||0===i[a.t].length?(o="",r.ampm=""):(o=-1!==$.inArray(i[a.t].toUpperCase(),$.map(s.amNames,function(t,e){return t.toUpperCase()}))?"AM":"PM",r.ampm=s["AM"===o?"amNames":"pmNames"][0])),-1!==a.h&&("AM"===o&&"12"===i[a.h]?r.hour=0:"PM"===o&&"12"!==i[a.h]?r.hour=parseInt(i[a.h],10)+12:r.hour=Number(i[a.h])),-1!==a.m&&(r.minute=Number(i[a.m])),-1!==a.s&&(r.second=Number(i[a.s])),-1!==a.l&&(r.millisec=Number(i[a.l])),-1!==a.c&&(r.microsec=Number(i[a.c])),-1!==a.z&&void 0!==i[a.z]&&(r.timezone=$.timepicker.timezoneOffsetNumber(i[a.z])),r)});return"function"==typeof n.parse?n.parse(t,e,n):"loose"===n.parse?function(e,i,n){try{var t=new Date("2012-01-01 "+i);if(isNaN(t.getTime())&&(t=new Date("2012-01-01T"+i),isNaN(t.getTime())&&(t=new Date("01/01/2012 "+i),isNaN(t.getTime()))))throw"Unable to parse time with native Date: "+i;return{hour:t.getHours(),minute:t.getMinutes(),second:t.getSeconds(),millisec:t.getMilliseconds(),microsec:t.getMicroseconds(),timezone:-1*t.getTimezoneOffset()}}catch(t){try{return a(e,i,n)}catch(t){$.timepicker.log("Unable to parse \ntimeString: "+i+"\ntimeFormat: "+e)}}return!1}(t,e,n):a(t,e,n)},$.datepicker.formatTime=function(t,e,i){i=i||{},i=$.extend({},$.timepicker._defaults,i),e=$.extend({hour:0,minute:0,second:0,millisec:0,microsec:0,timezone:null},e);var n=t,a=i.amNames[0],s=parseInt(e.hour,10);return 11<s&&(a=i.pmNames[0]),n=n.replace(/(?:HH?|hh?|mm?|ss?|[tT]{1,2}|[zZ]|[lc]|'.*?')/g,function(t){switch(t){case"HH":return("0"+s).slice(-2);case"H":return s;case"hh":return("0"+convert24to12(s)).slice(-2);case"h":return convert24to12(s);case"mm":return("0"+e.minute).slice(-2);case"m":return e.minute;case"ss":return("0"+e.second).slice(-2);case"s":return e.second;case"l":return("00"+e.millisec).slice(-3);case"c":return("00"+e.microsec).slice(-3);case"z":return $.timepicker.timezoneOffsetString(null===e.timezone?i.timezone:e.timezone,!1);case"Z":return $.timepicker.timezoneOffsetString(null===e.timezone?i.timezone:e.timezone,!0);case"T":return a.charAt(0).toUpperCase();case"TT":return a.toUpperCase();case"t":return a.charAt(0).toLowerCase();case"tt":return a.toLowerCase();default:return t.replace(/'/g,"")}})},$.datepicker._base_selectDate=$.datepicker._selectDate,$.datepicker._selectDate=function(t,e){var i,n=this._getInst($(t)[0]),a=this._get(n,"timepicker");a&&n.settings.showTimepicker?(a._limitMinMaxDateTime(n,!0),i=n.inline,n.inline=n.stay_open=!0,this._base_selectDate(t,e),n.inline=i,n.stay_open=!1,this._notifyChange(n),this._updateDatepicker(n)):this._base_selectDate(t,e)},$.datepicker._base_updateDatepicker=$.datepicker._updateDatepicker,$.datepicker._updateDatepicker=function(t){var e=t.input[0];if(!($.datepicker._curInst&&$.datepicker._curInst!==t&&$.datepicker._datepickerShowing&&$.datepicker._lastInput!==e||"boolean"==typeof t.stay_open&&!1!==t.stay_open)){this._base_updateDatepicker(t);var i=this._get(t,"timepicker");i&&i._addTimePicker(t)}},$.datepicker._base_doKeyPress=$.datepicker._doKeyPress,$.datepicker._doKeyPress=function(t){var e=$.datepicker._getInst(t.target),i=$.datepicker._get(e,"timepicker");if(i&&$.datepicker._get(e,"constrainInput")){var n=i.support.ampm,a=null!==i._defaults.showTimezone?i._defaults.showTimezone:i.support.timezone,s=$.datepicker._possibleChars($.datepicker._get(e,"dateFormat")),o=i._defaults.timeFormat.toString().replace(/[hms]/g,"").replace(/TT/g,n?"APM":"").replace(/Tt/g,n?"AaPpMm":"").replace(/tT/g,n?"AaPpMm":"").replace(/T/g,n?"AP":"").replace(/tt/g,n?"apm":"").replace(/t/g,n?"ap":"")+" "+i._defaults.separator+i._defaults.timeSuffix+(a?i._defaults.timezoneList.join(""):"")+i._defaults.amNames.join("")+i._defaults.pmNames.join("")+s,r=String.fromCharCode(void 0===t.charCode?t.keyCode:t.charCode);return t.ctrlKey||r<" "||!s||-1<o.indexOf(r)}return $.datepicker._base_doKeyPress(t)},$.datepicker._base_updateAlternate=$.datepicker._updateAlternate,$.datepicker._updateAlternate=function(t){var e=this._get(t,"timepicker");if(e){var i=e._defaults.altField;if(i){e._defaults.altFormat||e._defaults.dateFormat;var n=this._getDate(t),a=$.datepicker._getFormatConfig(t),s="",o=e._defaults.altSeparator?e._defaults.altSeparator:e._defaults.separator,r=e._defaults.altTimeSuffix?e._defaults.altTimeSuffix:e._defaults.timeSuffix,l=null!==e._defaults.altTimeFormat?e._defaults.altTimeFormat:e._defaults.timeFormat;s+=$.datepicker.formatTime(l,e,e._defaults)+r,e._defaults.timeOnly||e._defaults.altFieldTimeOnly||null===n||(s=e._defaults.altFormat?$.datepicker.formatDate(e._defaults.altFormat,n,a)+o+s:e.formattedDate+o+s),$(i).val(t.input.val()?s:"")}}else $.datepicker._base_updateAlternate(t)},$.datepicker._base_doKeyUp=$.datepicker._doKeyUp,$.datepicker._doKeyUp=function(t){var e=$.datepicker._getInst(t.target),i=$.datepicker._get(e,"timepicker");if(i&&i._defaults.timeOnly&&e.input.val()!==e.lastVal)try{$.datepicker._updateDatepicker(e)}catch(t){$.timepicker.log(t)}return $.datepicker._base_doKeyUp(t)},$.datepicker._base_gotoToday=$.datepicker._gotoToday,$.datepicker._gotoToday=function(t){var e=this._getInst($(t)[0]);this._base_gotoToday(t);var i=this._get(e,"timepicker");if(i){var n=$.timepicker.timezoneOffsetNumber(i.timezone),a=new Date;a.setMinutes(a.getMinutes()+a.getTimezoneOffset()+parseInt(n,10)),this._setTime(e,a),this._setDate(e,a),i._onSelectHandler()}},$.datepicker._disableTimepickerDatepicker=function(t){var e=this._getInst(t);if(e){var i=this._get(e,"timepicker");$(t).datepicker("getDate"),i&&(e.settings.showTimepicker=!1,i._defaults.showTimepicker=!1,i._updateDateTime(e))}},$.datepicker._enableTimepickerDatepicker=function(t){var e=this._getInst(t);if(e){var i=this._get(e,"timepicker");$(t).datepicker("getDate"),i&&(e.settings.showTimepicker=!0,i._defaults.showTimepicker=!0,i._addTimePicker(e),i._updateDateTime(e))}},$.datepicker._setTime=function(t,e){var i=this._get(t,"timepicker");if(i){var n=i._defaults;i.hour=e?e.getHours():n.hour,i.minute=e?e.getMinutes():n.minute,i.second=e?e.getSeconds():n.second,i.millisec=e?e.getMilliseconds():n.millisec,i.microsec=e?e.getMicroseconds():n.microsec,i._limitMinMaxDateTime(t,!0),i._onTimeChange(),i._updateDateTime(t)}},$.datepicker._setTimeDatepicker=function(t,e,i){var n=this._getInst(t);if(n){var a,s=this._get(n,"timepicker");if(s)this._setDateFromField(n),e&&("string"==typeof e?(s._parseTime(e,i),(a=new Date).setHours(s.hour,s.minute,s.second,s.millisec),a.setMicroseconds(s.microsec)):(a=new Date(e.getTime())).setMicroseconds(e.getMicroseconds()),"Invalid Date"===a.toString()&&(a=void 0),this._setTime(n,a))}},$.datepicker._base_setDateDatepicker=$.datepicker._setDateDatepicker,$.datepicker._setDateDatepicker=function(t,e){var i=this._getInst(t),n=e;if(i){"string"==typeof e&&((n=new Date(e)).getTime()||(this._base_setDateDatepicker.apply(this,arguments),n=$(t).datepicker("getDate")));var a,s=this._get(i,"timepicker");n instanceof Date?(a=new Date(n.getTime())).setMicroseconds(n.getMicroseconds()):a=n,s&&a&&(s.support.timezone||null!==s._defaults.timezone||(s.timezone=-1*a.getTimezoneOffset()),n=$.timepicker.timezoneAdjust(n,$.timepicker.timezoneOffsetString(-n.getTimezoneOffset()),s.timezone),a=$.timepicker.timezoneAdjust(a,$.timepicker.timezoneOffsetString(-a.getTimezoneOffset()),s.timezone)),this._updateDatepicker(i),this._base_setDateDatepicker.apply(this,arguments),this._setTimeDatepicker(t,a,!0)}},$.datepicker._base_getDateDatepicker=$.datepicker._getDateDatepicker,$.datepicker._getDateDatepicker=function(t,e){var i=this._getInst(t);if(i){var n=this._get(i,"timepicker");if(n){void 0===i.lastVal&&this._setDateFromField(i,e);var a=this._getDate(i),s=null;return s=n.$altInput&&n._defaults.altFieldTimeOnly?n.$input.val()+" "+n.$altInput.val():"INPUT"!==n.$input.get(0).tagName&&n.$altInput?n.$altInput.val():n.$input.val(),a&&n._parseTime(s,!i.settings.timeOnly)&&(a.setHours(n.hour,n.minute,n.second,n.millisec),a.setMicroseconds(n.microsec),null!=n.timezone&&(n.support.timezone||null!==n._defaults.timezone||(n.timezone=-1*a.getTimezoneOffset()),a=$.timepicker.timezoneAdjust(a,n.timezone,$.timepicker.timezoneOffsetString(-a.getTimezoneOffset())))),a}return this._base_getDateDatepicker(t,e)}},$.datepicker._base_parseDate=$.datepicker.parseDate,$.datepicker.parseDate=function(e,i,n){var a;try{a=this._base_parseDate(e,i,n)}catch(t){if(!(0<=t.indexOf(":")))throw t;a=this._base_parseDate(e,i.substring(0,i.length-(t.length-t.indexOf(":")-2)),n),$.timepicker.log("Error parsing the date string: "+t+"\ndate string = "+i+"\ndate format = "+e)}return a},$.datepicker._base_formatDate=$.datepicker._formatDate,$.datepicker._formatDate=function(t,e,i,n){var a=this._get(t,"timepicker");return a?(a._updateDateTime(t),a.$input.val()):this._base_formatDate(t)},$.datepicker._base_optionDatepicker=$.datepicker._optionDatepicker,$.datepicker._optionDatepicker=function(t,e,i){var n,a=this._getInst(t);if(!a)return null;var s=this._get(a,"timepicker");if(s){var o,r,l,d,c=null,u=null,h=null,p=s._defaults.evnts,f={};if("string"==typeof e){if("minDate"===e||"minDateTime"===e)c=i;else if("maxDate"===e||"maxDateTime"===e)u=i;else if("onSelect"===e)h=i;else if(p.hasOwnProperty(e)){if(void 0===i)return p[e];f[e]=i,n={}}}else if("object"==typeof e)for(o in e.minDate?c=e.minDate:e.minDateTime?c=e.minDateTime:e.maxDate?u=e.maxDate:e.maxDateTime&&(u=e.maxDateTime),p)p.hasOwnProperty(o)&&e[o]&&(f[o]=e[o]);for(o in f)f.hasOwnProperty(o)&&(p[o]=f[o],n||(n=$.extend({},e)),delete n[o]);if(n&&isEmptyObject(n))return;if(c?(c=0===c?new Date:new Date(c),s._defaults.minDate=c,s._defaults.minDateTime=c):u?(u=0===u?new Date:new Date(u),s._defaults.maxDate=u,s._defaults.maxDateTime=u):h&&(s._defaults.onSelect=h),c||u)return l=(d=$(t)).datetimepicker("getDate"),r=this._base_optionDatepicker.call($.datepicker,t,n||e,i),d.datetimepicker("setDate",l),r}return void 0===i?this._base_optionDatepicker.call($.datepicker,t,e):this._base_optionDatepicker.call($.datepicker,t,n||e,i)};var isEmptyObject=function(t){var e;for(e in t)if(t.hasOwnProperty(e))return!1;return!0},extendRemove=function(t,e){for(var i in $.extend(t,e),e)null!==e[i]&&void 0!==e[i]||(t[i]=e[i]);return t},detectSupport=function(t){var e=t.replace(/'.*?'/g,"").toLowerCase(),i=function(t,e){return-1!==t.indexOf(e)};return{hour:i(e,"h"),minute:i(e,"m"),second:i(e,"s"),millisec:i(e,"l"),microsec:i(e,"c"),timezone:i(e,"z"),ampm:i(e,"t")&&i(t,"h"),iso8601:i(t,"Z")}},convert24to12=function(t){return 0===(t%=12)&&(t=12),String(t)},computeEffectiveSetting=function(t,e){return t&&t[e]?t[e]:$.timepicker._defaults[e]},splitDateTime=function(t,e){var i=computeEffectiveSetting(e,"separator"),n=computeEffectiveSetting(e,"timeFormat").split(i).length,a=t.split(i),s=a.length;return 1<s?{dateString:a.splice(0,s-n).join(i),timeString:a.splice(0,n).join(i)}:{dateString:t,timeString:""}},parseDateTimeInternal=function(t,e,i,n,a){var s,o,r;if(o=splitDateTime(i,a),s=$.datepicker._base_parseDate(t,o.dateString,n),""===o.timeString)return{date:s};if(!(r=$.datepicker.parseTime(e,o.timeString,a)))throw"Wrong time format";return{date:s,timeObj:r}},selectLocalTimezone=function(t,e){if(t&&t.timezone_select){var i=e||new Date;t.timezone_select.val(-i.getTimezoneOffset())}};$.timepicker=new Timepicker,$.timepicker.timezoneOffsetString=function(t,e){if(isNaN(t)||840<t||t<-720)return t;var i=t%60,n=(t-i)/60,a=e?":":"",s=(0<=t?"+":"-")+("0"+Math.abs(n)).slice(-2)+a+("0"+Math.abs(i)).slice(-2);return"+00:00"===s?"Z":s},$.timepicker.timezoneOffsetNumber=function(t){var e=t.toString().replace(":","");return"Z"===e.toUpperCase()?0:/^(\-|\+)\d{4}#x2F;.test(e)?("-"===e.substr(0,1)?-1:1)*(60*parseInt(e.substr(1,2),10)+parseInt(e.substr(3,2),10)):parseInt(t,10)},$.timepicker.timezoneAdjust=function(t,e,i){var n=$.timepicker.timezoneOffsetNumber(e),a=$.timepicker.timezoneOffsetNumber(i);return isNaN(a)||t.setMinutes(t.getMinutes()+-n- -a),t},$.timepicker.timeRange=function(t,e,i){return $.timepicker.handleRange("timepicker",t,e,i)},$.timepicker.datetimeRange=function(t,e,i){$.timepicker.handleRange("datetimepicker",t,e,i)},$.timepicker.dateRange=function(t,e,i){$.timepicker.handleRange("datepicker",t,e,i)},$.timepicker.handleRange=function(r,l,d,c){c=$.extend({},{minInterval:0,maxInterval:0,start:{},end:{}},c);var t=!1;function i(t,e){var i=l[r]("getDate"),n=d[r]("getDate"),a=t[r]("getDate");if(null!==i){var s=new Date(i.getTime()),o=new Date(i.getTime());s.setMilliseconds(s.getMilliseconds()+c.minInterval),o.setMilliseconds(o.getMilliseconds()+c.maxInterval),0<c.minInterval&&n<s?d[r]("setDate",s):0<c.maxInterval&&o<n?d[r]("setDate",o):n<i&&e[r]("setDate",a)}}function e(t,e,i){if(t.val()){var n=t[r].call(t,"getDate");null!==n&&0<c.minInterval&&("minDate"===i&&n.setMilliseconds(n.getMilliseconds()+c.minInterval),"maxDate"===i&&n.setMilliseconds(n.getMilliseconds()-c.minInterval)),n.getTime&&e[r].call(e,"option",i,n)}}return"timepicker"===r&&(t=!0,r="datetimepicker"),$.fn[r].call(l,$.extend({timeOnly:t,onClose:function(t,e){i($(this),d)},onSelect:function(t){e($(this),d,"minDate")}},c,c.start)),$.fn[r].call(d,$.extend({timeOnly:t,onClose:function(t,e){i($(this),l)},onSelect:function(t){e($(this),l,"maxDate")}},c,c.end)),i(l,d),e(l,d,"minDate"),e(d,l,"maxDate"),$([l.get(0),d.get(0)])},$.timepicker.log=function(){window.console&&window.console.log&&window.console.log.apply&&window.console.log.apply(window.console,Array.prototype.slice.call(arguments))},$.timepicker._util={_extendRemove:extendRemove,_isEmptyObject:isEmptyObject,_convert24to12:convert24to12,_detectSupport:detectSupport,_selectLocalTimezone:selectLocalTimezone,_computeEffectiveSetting:computeEffectiveSetting,_splitDateTime:splitDateTime,_parseDateTimeInternal:parseDateTimeInternal},Date.prototype.getMicroseconds||(Date.prototype.microseconds=0,Date.prototype.getMicroseconds=function(){return this.microseconds},Date.prototype.setMicroseconds=function(t){return this.setMilliseconds(this.getMilliseconds()+Math.floor(t/1e3)),this.microseconds=t%1e3,this}),$.timepicker.version="1.6.3"}}),"undefined"==typeof jQuery)throw new Error("Bootstrap requires jQuery");function date(t,e){var n,i,a=["Sun","Mon","Tues","Wednes","Thurs","Fri","Satur","January","February","March","April","May","June","July","August","September","October","November","December"],s=/\\?(.?)/gi,o=function(t,e){return i[t]?i[t]():e},r=function(t,e){for(t=String(t);t.length<e;)t="0"+t;return t};i={d:function(){return r(i.j(),2)},D:function(){return i.l().slice(0,3)},j:function(){return n.getDate()},l:function(){return a[i.w()]+"day"},N:function(){return i.w()||7},S:function(){var t=i.j(),e=t%10;return e<=3&&1===parseInt(t%100/10,10)&&(e=0),["st","nd","rd"][e-1]||"th"},w:function(){return n.getDay()},z:function(){var t=new Date(i.Y(),i.n()-1,i.j()),e=new Date(i.Y(),0,1);return Math.round((t-e)/864e5)},W:function(){var t=new Date(i.Y(),i.n()-1,i.j()-i.N()+3),e=new Date(t.getFullYear(),0,4);return r(1+Math.round((t-e)/864e5/7),2)},F:function(){return a[6+i.n()]},m:function(){return r(i.n(),2)},M:function(){return i.F().slice(0,3)},n:function(){return n.getMonth()+1},t:function(){return new Date(i.Y(),i.n(),0).getDate()},L:function(){var t=i.Y();return t%4==0&t%100!=0|t%400==0},o:function(){var t=i.n(),e=i.W();return i.Y()+(12===t&&e<9?1:1===t&&9<e?-1:0)},Y:function(){return n.getFullYear()},y:function(){return i.Y().toString().slice(-2)},a:function(){return 11<n.getHours()?"pm":"am"},A:function(){return i.a().toUpperCase()},B:function(){var t=3600*n.getUTCHours(),e=60*n.getUTCMinutes(),i=n.getUTCSeconds();return r(Math.floor((t+e+i+3600)/86.4)%1e3,3)},g:function(){return i.G()%12||12},G:function(){return n.getHours()},h:function(){return r(i.g(),2)},H:function(){return r(i.G(),2)},i:function(){return r(n.getMinutes(),2)},s:function(){return r(n.getSeconds(),2)},u:function(){return r(1e3*n.getMilliseconds(),6)},e:function(){throw new Error("Not supported (see source code of date() for timezone on how to add support)")},I:function(){return new Date(i.Y(),0)-Date.UTC(i.Y(),0)!=new Date(i.Y(),6)-Date.UTC(i.Y(),6)?1:0},O:function(){var t=n.getTimezoneOffset(),e=Math.abs(t);return(0<t?"-":"+")+r(100*Math.floor(e/60)+e%60,4)},P:function(){var t=i.O();return t.substr(0,3)+":"+t.substr(3,2)},T:function(){return"UTC"},Z:function(){return 60*-n.getTimezoneOffset()},c:function(){return"Y-m-d\\TH:i:sP".replace(s,o)},r:function(){return"D, d M Y H:i:s O".replace(s,o)},U:function(){return n/1e3|0}};var l,d;return l=t,n=void 0===(d=e)?new Date:d instanceof Date?new Date(d):new Date(1e3*d),l.replace(s,o)}function strtotime(t,e){var i,n,a,s,c,u,h,o,r,l;if(!t)return!1;t=t.replace(/^\s+|\s+#x2F;g,"").replace(/\s{2,}/g," ").replace(/[\t\r\n]/g,"").toLowerCase();var d=new RegExp(["^(\\d{1,4})","([\\-\\.\\/:])","(\\d{1,2})","([\\-\\.\\/:])","(\\d{1,4})","(?:\\s(\\d{1,2}):(\\d{2})?:?(\\d{2})?)?","(?:\\s([A-Z]+)?)?quot;].join(""));if((n=t.match(d))&&n[2]===n[4])if(1901<n[1])switch(n[2]){case"-":return!(12<n[3]||31<n[5])&&new Date(n[1],parseInt(n[3],10)-1,n[5],n[6]||0,n[7]||0,n[8]||0,n[9]||0)/1e3;case".":return!1;case"/":return!(12<n[3]||31<n[5])&&new Date(n[1],parseInt(n[3],10)-1,n[5],n[6]||0,n[7]||0,n[8]||0,n[9]||0)/1e3}else if(1901<n[5])switch(n[2]){case"-":case".":return!(12<n[3]||31<n[1])&&new Date(n[5],parseInt(n[3],10)-1,n[1],n[6]||0,n[7]||0,n[8]||0,n[9]||0)/1e3;case"/":return!(12<n[1]||31<n[3])&&new Date(n[5],parseInt(n[1],10)-1,n[3],n[6]||0,n[7]||0,n[8]||0,n[9]||0)/1e3}else switch(n[2]){case"-":return!(12<n[3]||31<n[5]||n[1]<70&&38<n[1])&&(s=0<=n[1]&&n[1]<=38?+n[1]+2e3:n[1],new Date(s,parseInt(n[3],10)-1,n[5],n[6]||0,n[7]||0,n[8]||0,n[9]||0)/1e3);case".":return 70<=n[5]?!(12<n[3]||31<n[1])&&new Date(n[5],parseInt(n[3],10)-1,n[1],n[6]||0,n[7]||0,n[8]||0,n[9]||0)/1e3:n[5]<60&&!n[6]&&(!(23<n[1]||59<n[3])&&(a=new Date,new Date(a.getFullYear(),a.getMonth(),a.getDate(),n[1]||0,n[3]||0,n[5]||0,n[9]||0)/1e3));case"/":return!(12<n[1]||31<n[3]||n[5]<70&&38<n[5])&&(s=0<=n[5]&&n[5]<=38?+n[5]+2e3:n[5],new Date(s,parseInt(n[1],10)-1,n[3],n[6]||0,n[7]||0,n[8]||0,n[9]||0)/1e3);case":":return!(23<n[1]||59<n[3]||59<n[5])&&(a=new Date,new Date(a.getFullYear(),a.getMonth(),a.getDate(),n[1]||0,n[3]||0,n[5]||0)/1e3)}if("now"===t)return null===e||isNaN(e)?(new Date).getTime()/1e3|0:0|e;if(!isNaN(i=Date.parse(t)))return i/1e3|0;if(d=new RegExp(["^([0-9]{4}-[0-9]{2}-[0-9]{2})","[ t]","([0-9]{2}:[0-9]{2}:[0-9]{2}(\\.[0-9]+)?)","([\\+-][0-9]{2}(:[0-9]{2})?|z)"].join("")),(n=t.match(d))&&("z"===n[4]?n[4]="Z":n[4].match(/^([\+-][0-9]{2})#x2F;)&&(n[4]=n[4]+":00"),!isNaN(i=Date.parse(n[1]+"T"+n[2]+n[4]))))return i/1e3|0;function p(t){var e,i,n,a,s=t.split(" "),o=s[0],r=s[1].substring(0,3),l=/\d+/.test(o),d=("last"===o?-1:1)*("ago"===s[2]?-1:1);if(l&&(d*=parseInt(o,10)),h.hasOwnProperty(r)&&!s[1].match(/^mon(day|\.)?#x2F;i))return c["set"+h[r]](c["get"+h[r]]()+d);if("wee"===r)return c.setDate(c.getDate()+7*d);if("next"===o||"last"===o)e=o,i=d,void 0!==(a=u[r])&&(0==(n=a-c.getDay())?n=7*i:0<n&&"last"===e?n-=7:n<0&&"next"===e&&(n+=7),c.setDate(c.getDate()+n));else if(!l)return!1;return!0}if(c=e?new Date(1e3*e):new Date,u={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6},h={yea:"FullYear",mon:"Month",day:"Date",hou:"Hours",min:"Minutes",sec:"Seconds"},"([+-]?\\d+\\s"+(r="(years?|months?|weeks?|days?|hours?|minutes?|min|seconds?|sec|sunday|sun\\.?|monday|mon\\.?|tuesday|tue\\.?|wednesday|wed\\.?|thursday|thu\\.?|friday|fri\\.?|saturday|sat\\.?)")+"|(last|next)\\s"+r+")(\\sago)?",!(n=t.match(new RegExp("([+-]?\\d+\\s(years?|months?|weeks?|days?|hours?|minutes?|min|seconds?|sec|sunday|sun\\.?|monday|mon\\.?|tuesday|tue\\.?|wednesday|wed\\.?|thursday|thu\\.?|friday|fri\\.?|saturday|sat\\.?)|(last|next)\\s(years?|months?|weeks?|days?|hours?|minutes?|min|seconds?|sec|sunday|sun\\.?|monday|mon\\.?|tuesday|tue\\.?|wednesday|wed\\.?|thursday|thu\\.?|friday|fri\\.?|saturday|sat\\.?))(\\sago)?","gi"))))return!1;for(l=0,o=n.length;l<o;l++)if(!p(n[l]))return!1;return c.getTime()/1e3}function gMakeSheet(t){var e=document.createElement("style");return null!=t&&e.setAttribute("media",t),e.appendChild(document.createTextNode("")),document.head.appendChild(e),e.sheet}function gAddStyleToSheet(t,e,i,n){for(var a in"all"===t||null===t?t=[sheet,smSheet,mdSheet,lgSheet]:void 0!==t.cssRules&&(t=[t]),t)"object"==typeof t[a]&&"text/css"===t[a].type&&(t[a].insertRule?t[a].insertRule(e+"{"+i+"}",n):t[a].addRule(e,i,n))}!function(n){"use strict";n.fn.emulateTransitionEnd=function(t){var e=!1,i=this;n(this).one(n.support.transition.end,function(){e=!0});return setTimeout(function(){e||n(i).trigger(n.support.transition.end)},t),this},n(function(){n.support.transition=function(){var t=document.createElement("bootstrap"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var i in e)if(void 0!==t.style[i])return{end:e[i]}}()})}(jQuery),function(s){"use strict";var e='[data-dismiss="alert"]',n=function(t){s(t).on("click",e,this.close)};n.prototype.close=function(t){var e=s(this),i=e.attr("data-target");i||(i=(i=e.attr("href"))&&i.replace(/.*(?=#[^\s]*$)/,""));var n=s(i);function a(){n.trigger("closed.bs.alert").remove()}t&&t.preventDefault(),n.length||(n=e.hasClass("alert")?e:e.parent()),n.trigger(t=s.Event("close.bs.alert")),t.isDefaultPrevented()||(n.removeClass("in"),s.support.transition&&n.hasClass("fade")?n.one(s.support.transition.end,a).emulateTransitionEnd(150):a())};var t=s.fn.alert;s.fn.alert=function(i){return this.each(function(){var t=s(this),e=t.data("bs.alert");e||t.data("bs.alert",e=new n(this)),"string"==typeof i&&e[i].call(t)})},s.fn.alert.Constructor=n,s.fn.alert.noConflict=function(){return s.fn.alert=t,this},s(document).on("click.bs.alert.data-api",e,n.prototype.close)}(jQuery),function(a){"use strict";var s=function(t,e){this.$element=a(t),this.options=a.extend({},s.DEFAULTS,e)};s.DEFAULTS={loadingText:"loading..."},s.prototype.setState=function(t){var e="disabled",i=this.$element,n=i.is("input")?"val":"html",a=i.data();t+="Text",a.resetText||i.data("resetText",i[n]()),i[n](a[t]||this.options[t]),setTimeout(function(){"loadingText"==t?i.addClass(e).attr(e,e):i.removeClass(e).removeAttr(e)},0)},s.prototype.toggle=function(){var t=this.$element.closest('[data-toggle="buttons"]'),e=!0;if(t.length){var i=this.$element.find("input");"radio"===i.prop("type")&&(i.prop("checked")&&this.$element.hasClass("active")?e=!1:t.find(".active").removeClass("active")),e&&i.prop("checked",!this.$element.hasClass("active")).trigger("change")}e&&this.$element.toggleClass("active")};var t=a.fn.button;a.fn.button=function(n){return this.each(function(){var t=a(this),e=t.data("bs.button"),i="object"==typeof n&&n;e||t.data("bs.button",e=new s(this,i)),"toggle"==n?e.toggle():n&&e.setState(n)})},a.fn.button.Constructor=s,a.fn.button.noConflict=function(){return a.fn.button=t,this},a(document).on("click.bs.button.data-api","[data-toggle^=button]",function(t){var e=a(t.target);e.hasClass("btn")||(e=e.closest(".btn")),e.button("toggle"),t.preventDefault()})}(jQuery),function(d){"use strict";var s=function(t,e){this.$element=d(t),this.$indicators=this.$element.find(".carousel-indicators"),this.options=e,this.paused=this.sliding=this.interval=this.$active=this.$items=null,"hover"==this.options.pause&&this.$element.on("mouseenter",d.proxy(this.pause,this)).on("mouseleave",d.proxy(this.cycle,this))};s.DEFAULTS={interval:5e3,pause:"hover",wrap:!0},s.prototype.cycle=function(t){return t||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(d.proxy(this.next,this),this.options.interval)),this},s.prototype.getActiveIndex=function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},s.prototype.to=function(t){var e=this,i=this.getActiveIndex();if(!(t>this.$items.length-1||t<0))return this.sliding?this.$element.one("slid.bs.carousel",function(){e.to(t)}):i==t?this.pause().cycle():this.slide(i<t?"next":"prev",d(this.$items[t]))},s.prototype.pause=function(t){return t||(this.paused=!0),this.$element.find(".next, .prev").length&&d.support.transition.end&&(this.$element.trigger(d.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},s.prototype.next=function(){if(!this.sliding)return this.slide("next")},s.prototype.prev=function(){if(!this.sliding)return this.slide("prev")},s.prototype.slide=function(t,e){var i=this.$element.find(".item.active"),n=e||i[t](),a=this.interval,s="next"==t?"left":"right",o="next"==t?"first":"last",r=this;if(!n.length){if(!this.options.wrap)return;n=this.$element.find(".item")[o]()}this.sliding=!0,a&&this.pause();var l=d.Event("slide.bs.carousel",{relatedTarget:n[0],direction:s});if(!n.hasClass("active")){if(this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid.bs.carousel",function(){var t=d(r.$indicators.children()[r.getActiveIndex()]);t&&t.addClass("active")})),d.support.transition&&this.$element.hasClass("slide")){if(this.$element.trigger(l),l.isDefaultPrevented())return;n.addClass(t),n[0].offsetWidth,i.addClass(s),n.addClass(s),i.one(d.support.transition.end,function(){n.removeClass([t,s].join(" ")).addClass("active"),i.removeClass(["active",s].join(" ")),r.sliding=!1,setTimeout(function(){r.$element.trigger("slid.bs.carousel")},0)}).emulateTransitionEnd(600)}else{if(this.$element.trigger(l),l.isDefaultPrevented())return;i.removeClass("active"),n.addClass("active"),this.sliding=!1,this.$element.trigger("slid.bs.carousel")}return a&&this.cycle(),this}};var t=d.fn.carousel;d.fn.carousel=function(a){return this.each(function(){var t=d(this),e=t.data("bs.carousel"),i=d.extend({},s.DEFAULTS,t.data(),"object"==typeof a&&a),n="string"==typeof a?a:i.slide;e||t.data("bs.carousel",e=new s(this,i)),"number"==typeof a?e.to(a):n?e[n]():i.interval&&e.pause().cycle()})},d.fn.carousel.Constructor=s,d.fn.carousel.noConflict=function(){return d.fn.carousel=t,this},d(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",function(t){var e,i=d(this),n=d(i.attr("data-target")||(e=i.attr("href"))&&e.replace(/.*(?=#[^\s]+$)/,"")),a=d.extend({},n.data(),i.data()),s=i.attr("data-slide-to");s&&(a.interval=!1),n.carousel(a),(s=i.attr("data-slide-to"))&&n.data("bs.carousel").to(s),t.preventDefault()}),d(window).on("load",function(){d('[data-ride="carousel"]').each(function(){var t=d(this);t.carousel(t.data())})})}(jQuery),function(d){"use strict";var a=function(t,e){this.$element=d(t),this.options=d.extend({},a.DEFAULTS,e),this.transitioning=null,this.options.parent&&(this.$parent=d(this.options.parent)),this.options.toggle&&this.toggle()};a.DEFAULTS={toggle:!0},a.prototype.dimension=function(){return this.$element.hasClass("width")?"width":"height"},a.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var t=d.Event("show.bs.collapse");if(this.$element.trigger(t),!t.isDefaultPrevented()){var e=this.$parent&&this.$parent.find("> .panel > .in");if(e&&e.length){var i=e.data("bs.collapse");if(i&&i.transitioning)return;e.collapse("hide"),i||e.data("bs.collapse",null)}var n=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[n](0),this.transitioning=1;var a=function(){this.$element.removeClass("collapsing").addClass("in")[n]("auto"),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!d.support.transition)return a.call(this);var s=d.camelCase(["scroll",n].join("-"));this.$element.one(d.support.transition.end,d.proxy(a,this)).emulateTransitionEnd(350)[n](this.$element[0][s])}}},a.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var t=d.Event("hide.bs.collapse");if(this.$element.trigger(t),!t.isDefaultPrevented()){var e=this.dimension();this.$element[e](this.$element[e]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"),this.transitioning=1;var i=function(){this.transitioning=0,this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse")};if(!d.support.transition)return i.call(this);this.$element[e](0).one(d.support.transition.end,d.proxy(i,this)).emulateTransitionEnd(350)}}},a.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var t=d.fn.collapse;d.fn.collapse=function(n){return this.each(function(){var t=d(this),e=t.data("bs.collapse"),i=d.extend({},a.DEFAULTS,t.data(),"object"==typeof n&&n);e||t.data("bs.collapse",e=new a(this,i)),"string"==typeof n&&e[n]()})},d.fn.collapse.Constructor=a,d.fn.collapse.noConflict=function(){return d.fn.collapse=t,this},d(document).on("click.bs.collapse.data-api","[data-toggle=collapse]",function(t){var e,i=d(this),n=i.attr("data-target")||t.preventDefault()||(e=i.attr("href"))&&e.replace(/.*(?=#[^\s]+$)/,""),a=d(n),s=a.data("bs.collapse"),o=s?"toggle":i.data(),r=i.attr("data-parent"),l=r&&d(r);s&&s.transitioning||(l&&l.find('[data-toggle=collapse][data-parent="'+r+'"]').not(i).addClass("collapsed"),i[a.hasClass("in")?"addClass":"removeClass"]("collapsed")),a.collapse(o)})}(jQuery),function(o){"use strict";var r="[data-toggle=dropdown]",n=function(t){o(t).on("click.bs.dropdown",this.toggle)};function a(){o(".dropdown-backdrop").remove(),o(r).each(function(t){var e=l(o(this));e.hasClass("open")&&(e.trigger(t=o.Event("hide.bs.dropdown")),t.isDefaultPrevented()||e.removeClass("open").trigger("hidden.bs.dropdown"))})}function l(t){var e=t.attr("data-target");e||(e=(e=t.attr("href"))&&/#/.test(e)&&e.replace(/.*(?=#[^\s]*$)/,""));var i=e&&o(e);return i&&i.length?i:t.parent()}n.prototype.toggle=function(t){var e=o(this);if(!e.is(".disabled, :disabled")){var i=l(e),n=i.hasClass("open");if(a(),!n){if("ontouchstart"in document.documentElement&&!i.closest(".navbar-nav").length&&o('<div class="dropdown-backdrop"/>').insertAfter(o(this)).on("click",a),i.trigger(t=o.Event("show.bs.dropdown")),t.isDefaultPrevented())return;i.toggleClass("open").trigger("shown.bs.dropdown"),e.focus()}return!1}},n.prototype.keydown=function(t){if(/(38|40|27)/.test(t.keyCode)){var e=o(this);if(t.preventDefault(),t.stopPropagation(),!e.is(".disabled, :disabled")){var i=l(e),n=i.hasClass("open");if(!n||n&&27==t.keyCode)return 27==t.which&&i.find(r).focus(),e.click();var a=o("[role=menu] li:not(.divider):visible a",i);if(a.length){var s=a.index(a.filter(":focus"));38==t.keyCode&&0<s&&s--,40==t.keyCode&&s<a.length-1&&s++,~s||(s=0),a.eq(s).focus()}}}};var t=o.fn.dropdown;o.fn.dropdown=function(i){return this.each(function(){var t=o(this),e=t.data("bs.dropdown");e||t.data("bs.dropdown",e=new n(this)),"string"==typeof i&&e[i].call(t)})},o.fn.dropdown.Constructor=n,o.fn.dropdown.noConflict=function(){return o.fn.dropdown=t,this},o(document).on("click.bs.dropdown.data-api",a).on("click.bs.dropdown.data-api",".dropdown form",function(t){t.stopPropagation()}).on("click.bs.dropdown.data-api",r,n.prototype.toggle).on("keydown.bs.dropdown.data-api",r+", [role=menu]",n.prototype.keydown)}(jQuery),function(s){"use strict";var o=function(t,e){this.options=e,this.$element=s(t),this.$backdrop=this.isShown=null,this.options.remote&&this.$element.load(this.options.remote)};o.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},o.prototype.toggle=function(t){return this[this.isShown?"hide":"show"](t)},o.prototype.show=function(i){var n=this,t=s.Event("show.bs.modal",{relatedTarget:i});this.$element.trigger(t),this.isShown||t.isDefaultPrevented()||(this.isShown=!0,this.escape(),this.$element.on("click.dismiss.modal",'[data-dismiss="modal"]',s.proxy(this.hide,this)),this.backdrop(function(){var t=s.support.transition&&n.$element.hasClass("fade");n.$element.parent().length||n.$element.appendTo("#yop-main-area"),n.$element.show(),t&&n.$element[0].offsetWidth,n.$element.addClass("in").attr("aria-hidden",!1),n.enforceFocus();var e=s.Event("shown.bs.modal",{relatedTarget:i});t?n.$element.find(".modal-dialog").one(s.support.transition.end,function(){n.$element.focus().trigger(e)}).emulateTransitionEnd(300):n.$element.focus().trigger(e)}))},o.prototype.hide=function(t){t&&t.preventDefault(),t=s.Event("hide.bs.modal"),this.$element.trigger(t),this.isShown&&!t.isDefaultPrevented()&&(this.isShown=!1,this.escape(),s(document).off("focusin.bs.modal"),this.$element.removeClass("in").attr("aria-hidden",!0).off("click.dismiss.modal"),s.support.transition&&this.$element.hasClass("fade")?this.$element.one(s.support.transition.end,s.proxy(this.hideModal,this)).emulateTransitionEnd(300):this.hideModal())},o.prototype.enforceFocus=function(){s(document).off("focusin.bs.modal").on("focusin.bs.modal",s.proxy(function(t){this.$element[0]===t.target||this.$element.has(t.target).length||this.$element.focus()},this))},o.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.bs.modal",s.proxy(function(t){27==t.which&&this.hide()},this)):this.isShown||this.$element.off("keyup.dismiss.bs.modal")},o.prototype.hideModal=function(){var t=this;this.$element.hide(),this.backdrop(function(){t.removeBackdrop(),t.$element.trigger("hidden.bs.modal")})},o.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},o.prototype.backdrop=function(t){var e=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var i=s.support.transition&&e;if(this.$backdrop=s('<div class="modal-backdrop '+e+'" />').appendTo(document.body),this.$element.on("click.dismiss.modal",s.proxy(function(t){t.target===t.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus.call(this.$element[0]):this.hide.call(this))},this)),i&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!t)return;i?this.$backdrop.one(s.support.transition.end,t).emulateTransitionEnd(150):t()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),s.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(s.support.transition.end,t).emulateTransitionEnd(150):t()):t&&t()};var t=s.fn.modal;s.fn.modal=function(n,a){return this.each(function(){var t=s(this),e=t.data("bs.modal"),i=s.extend({},o.DEFAULTS,t.data(),"object"==typeof n&&n);e||t.data("bs.modal",e=new o(this,i)),"string"==typeof n?e[n](a):i.show&&e.show(a)})},s.fn.modal.Constructor=o,s.fn.modal.noConflict=function(){return s.fn.modal=t,this},s(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(t){var e=s(this),i=e.attr("href"),n=s(e.attr("data-target")||i&&i.replace(/.*(?=#[^\s]+$)/,"")),a=n.data("modal")?"toggle":s.extend({remote:!/#/.test(i)&&i},n.data(),e.data());t.preventDefault(),n.modal(a,this).one("hide",function(){e.is(":visible")&&e.focus()})}),s(document).on("show.bs.modal",".modal",function(){s(document.body).addClass("modal-open")}).on("hidden.bs.modal",".modal",function(){s(document.body).removeClass("modal-open")})}(jQuery),function(m){"use strict";var a=function(t,e){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null,this.init("tooltip",t,e)};a.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},a.prototype.init=function(t,e,i){this.enabled=!0,this.type=t,this.$element=m(e),this.options=this.getOptions(i);for(var n=this.options.trigger.split(" "),a=n.length;a--;){var s=n[a];if("click"==s)this.$element.on("click."+this.type,this.options.selector,m.proxy(this.toggle,this));else if("manual"!=s){var o="hover"==s?"mouseenter":"focus",r="hover"==s?"mouseleave":"blur";this.$element.on(o+"."+this.type,this.options.selector,m.proxy(this.enter,this)),this.$element.on(r+"."+this.type,this.options.selector,m.proxy(this.leave,this))}}this.options.selector?this._options=m.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},a.prototype.getDefaults=function(){return a.DEFAULTS},a.prototype.getOptions=function(t){return(t=m.extend({},this.getDefaults(),this.$element.data(),t)).delay&&"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),t},a.prototype.getDelegateOptions=function(){var i={},n=this.getDefaults();return this._options&&m.each(this._options,function(t,e){n[t]!=e&&(i[t]=e)}),i},a.prototype.enter=function(t){var e=t instanceof this.constructor?t:m(t.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);if(clearTimeout(e.timeout),e.hoverState="in",!e.options.delay||!e.options.delay.show)return e.show();e.timeout=setTimeout(function(){"in"==e.hoverState&&e.show()},e.options.delay.show)},a.prototype.leave=function(t){var e=t instanceof this.constructor?t:m(t.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);if(clearTimeout(e.timeout),e.hoverState="out",!e.options.delay||!e.options.delay.hide)return e.hide();e.timeout=setTimeout(function(){"out"==e.hoverState&&e.hide()},e.options.delay.hide)},a.prototype.show=function(){var t=m.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){if(this.$element.trigger(t),t.isDefaultPrevented())return;var e=this.tip();this.setContent(),this.options.animation&&e.addClass("fade");var i="function"==typeof this.options.placement?this.options.placement.call(this,e[0],this.$element[0]):this.options.placement,n=/\s?auto?\s?/i,a=n.test(i);a&&(i=i.replace(n,"")||"top"),e.detach().css({top:0,left:0,display:"block"}).addClass(i),this.options.container?e.appendTo(this.options.container):e.insertAfter(this.$element);var s=this.getPosition(),o=e[0].offsetWidth,r=e[0].offsetHeight;if(a){var l=this.$element.parent(),d=i,c=document.documentElement.scrollTop||document.body.scrollTop,u="body"==this.options.container?window.innerWidth:l.outerWidth(),h="body"==this.options.container?window.innerHeight:l.outerHeight(),p="body"==this.options.container?0:l.offset().left;i="bottom"==i&&s.top+s.height+r-c>h?"top":"top"==i&&s.top-c-r<0?"bottom":"right"==i&&s.right+o>u?"left":"left"==i&&s.left-o<p?"right":i,e.removeClass(d).addClass(i)}var f=this.getCalculatedOffset(i,s,o,r);this.applyPlacement(f,i),this.$element.trigger("shown.bs."+this.type)}},a.prototype.applyPlacement=function(t,e){var i,n=this.tip(),a=n[0].offsetWidth,s=n[0].offsetHeight,o=parseInt(n.css("margin-top"),10),r=parseInt(n.css("margin-left"),10);isNaN(o)&&(o=0),isNaN(r)&&(r=0),t.top=t.top+o,t.left=t.left+r,n.offset(t).addClass("in");var l=n[0].offsetWidth,d=n[0].offsetHeight;if("top"==e&&d!=s&&(i=!0,t.top=t.top+s-d),/bottom|top/.test(e)){var c=0;t.left<0&&(c=-2*t.left,t.left=0,n.offset(t),l=n[0].offsetWidth,d=n[0].offsetHeight),this.replaceArrow(c-a+l,l,"left")}else this.replaceArrow(d-s,d,"top");i&&n.offset(t)},a.prototype.replaceArrow=function(t,e,i){this.arrow().css(i,t?50*(1-t/e)+"%":"")},a.prototype.setContent=function(){var t=this.tip(),e=this.getTitle();t.find(".tooltip-inner")[this.options.html?"html":"text"](e),t.removeClass("fade in top bottom left right")},a.prototype.hide=function(){var t=this,e=this.tip(),i=m.Event("hide.bs."+this.type);function n(){"in"!=t.hoverState&&e.detach()}if(this.$element.trigger(i),!i.isDefaultPrevented())return e.removeClass("in"),m.support.transition&&this.$tip.hasClass("fade")?e.one(m.support.transition.end,n).emulateTransitionEnd(150):n(),this.$element.trigger("hidden.bs."+this.type),this},a.prototype.fixTitle=function(){var t=this.$element;(t.attr("title")||"string"!=typeof t.attr("data-original-title"))&&t.attr("data-original-title",t.attr("title")||"").attr("title","")},a.prototype.hasContent=function(){return this.getTitle()},a.prototype.getPosition=function(){var t=this.$element[0];return m.extend({},"function"==typeof t.getBoundingClientRect?t.getBoundingClientRect():{width:t.offsetWidth,height:t.offsetHeight},this.$element.offset())},a.prototype.getCalculatedOffset=function(t,e,i,n){return"bottom"==t?{top:e.top+e.height,left:e.left+e.width/2-i/2}:"top"==t?{top:e.top-n,left:e.left+e.width/2-i/2}:"left"==t?{top:e.top+e.height/2-n/2,left:e.left-i}:{top:e.top+e.height/2-n/2,left:e.left+e.width}},a.prototype.getTitle=function(){var t=this.$element,e=this.options;return t.attr("data-original-title")||("function"==typeof e.title?e.title.call(t[0]):e.title)},a.prototype.tip=function(){return this.$tip=this.$tip||m(this.options.template)},a.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},a.prototype.validate=function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},a.prototype.enable=function(){this.enabled=!0},a.prototype.disable=function(){this.enabled=!1},a.prototype.toggleEnabled=function(){this.enabled=!this.enabled},a.prototype.toggle=function(t){var e=t?m(t.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type):this;e.tip().hasClass("in")?e.leave(e):e.enter(e)},a.prototype.destroy=function(){this.hide().$element.off("."+this.type).removeData("bs."+this.type)};var t=m.fn.tooltip;m.fn.tooltip=function(n){return this.each(function(){var t=m(this),e=t.data("bs.tooltip"),i="object"==typeof n&&n;e||t.data("bs.tooltip",e=new a(this,i)),"string"==typeof n&&e[n]()})},m.fn.tooltip.Constructor=a,m.fn.tooltip.noConflict=function(){return m.fn.tooltip=t,this}}(jQuery),function(a){"use strict";var s=function(t,e){this.init("popover",t,e)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");s.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),((s.prototype=a.extend({},a.fn.tooltip.Constructor.prototype)).constructor=s).prototype.getDefaults=function(){return s.DEFAULTS},s.prototype.setContent=function(){var t=this.tip(),e=this.getTitle(),i=this.getContent();t.find(".popover-title")[this.options.html?"html":"text"](e),t.find(".popover-content")[this.options.html?"html":"text"](i),t.removeClass("fade top bottom left right in"),t.find(".popover-title").html()||t.find(".popover-title").hide()},s.prototype.hasContent=function(){return this.getTitle()||this.getContent()},s.prototype.getContent=function(){var t=this.$element,e=this.options;return t.attr("data-content")||("function"==typeof e.content?e.content.call(t[0]):e.content)},s.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},s.prototype.tip=function(){return this.$tip||(this.$tip=a(this.options.template)),this.$tip};var t=a.fn.popover;a.fn.popover=function(n){return this.each(function(){var t=a(this),e=t.data("bs.popover"),i="object"==typeof n&&n;e||t.data("bs.popover",e=new s(this,i)),"string"==typeof n&&e[n]()})},a.fn.popover.Constructor=s,a.fn.popover.noConflict=function(){return a.fn.popover=t,this}}(jQuery),function(s){"use strict";function a(t,e){var i,n=s.proxy(this.process,this);this.$element=s(t).is("body")?s(window):s(t),this.$body=s("body"),this.$scrollElement=this.$element.on("scroll.bs.scroll-spy.data-api",n),this.options=s.extend({},a.DEFAULTS,e),this.selector=(this.options.target||(i=s(t).attr("href"))&&i.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.offsets=s([]),this.targets=s([]),this.activeTarget=null,this.refresh(),this.process()}a.DEFAULTS={offset:10},a.prototype.refresh=function(){var n=this.$element[0]==window?"offset":"position";this.offsets=s([]),this.targets=s([]);var a=this;this.$body.find(this.selector).map(function(){var t=s(this),e=t.data("target")||t.attr("href"),i=/^#\w/.test(e)&&s(e);return i&&i.length&&[[i[n]().top+(!s.isWindow(a.$scrollElement.get(0))&&a.$scrollElement.scrollTop()),e]]||null}).sort(function(t,e){return t[0]-e[0]}).each(function(){a.offsets.push(this[0]),a.targets.push(this[1])})},a.prototype.process=function(){var t,e=this.$scrollElement.scrollTop()+this.options.offset,i=(this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight)-this.$scrollElement.height(),n=this.offsets,a=this.targets,s=this.activeTarget;if(i<=e)return s!=(t=a.last()[0])&&this.activate(t);for(t=n.length;t--;)s!=a[t]&&e>=n[t]&&(!n[t+1]||e<=n[t+1])&&this.activate(a[t])},a.prototype.activate=function(t){this.activeTarget=t,s(this.selector).parents(".active").removeClass("active");var e=this.selector+'[data-target="'+t+'"],'+this.selector+'[href="'+t+'"]',i=s(e).parents("li").addClass("active");i.parent(".dropdown-menu").length&&(i=i.closest("li.dropdown").addClass("active")),i.trigger("activate.bs.scrollspy")};var t=s.fn.scrollspy;s.fn.scrollspy=function(n){return this.each(function(){var t=s(this),e=t.data("bs.scrollspy"),i="object"==typeof n&&n;e||t.data("bs.scrollspy",e=new a(this,i)),"string"==typeof n&&e[n]()})},s.fn.scrollspy.Constructor=a,s.fn.scrollspy.noConflict=function(){return s.fn.scrollspy=t,this},s(window).on("load",function(){s('[data-spy="scroll"]').each(function(){var t=s(this);t.scrollspy(t.data())})})}(jQuery),function(o){"use strict";var n=function(t){this.element=o(t)};n.prototype.show=function(){var t=this.element,e=t.closest("ul:not(.dropdown-menu)"),i=t.data("target");if(i||(i=(i=t.attr("href"))&&i.replace(/.*(?=#[^\s]*$)/,"")),!t.parent("li").hasClass("active")){var n=e.find(".active:last a")[0],a=o.Event("show.bs.tab",{relatedTarget:n});if(t.trigger(a),!a.isDefaultPrevented()){var s=o(i);this.activate(t.parent("li"),e),this.activate(s,s.parent(),function(){t.trigger({type:"shown.bs.tab",relatedTarget:n})})}}},n.prototype.activate=function(t,e,i){var n=e.find("> .active"),a=i&&o.support.transition&&n.hasClass("fade");function s(){n.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),t.addClass("active"),a?(t[0].offsetWidth,t.addClass("in")):t.removeClass("fade"),t.parent(".dropdown-menu")&&t.closest("li.dropdown").addClass("active"),i&&i()}a?n.one(o.support.transition.end,s).emulateTransitionEnd(150):s(),n.removeClass("in")};var t=o.fn.tab;o.fn.tab=function(i){return this.each(function(){var t=o(this),e=t.data("bs.tab");e||t.data("bs.tab",e=new n(this)),"string"==typeof i&&e[i]()})},o.fn.tab.Constructor=n,o.fn.tab.noConflict=function(){return o.fn.tab=t,this},o(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(t){t.preventDefault(),o(this).tab("show")})}(jQuery),function(r){"use strict";var l=function(t,e){this.options=r.extend({},l.DEFAULTS,e),this.$window=r(window).on("scroll.bs.affix.data-api",r.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",r.proxy(this.checkPositionWithEventLoop,this)),this.$element=r(t),this.affixed=this.unpin=null,this.checkPosition()};l.RESET="affix affix-top affix-bottom",l.DEFAULTS={offset:0},l.prototype.checkPositionWithEventLoop=function(){setTimeout(r.proxy(this.checkPosition,this),1)},l.prototype.checkPosition=function(){if(this.$element.is(":visible")){var t=r(document).height(),e=this.$window.scrollTop(),i=this.$element.offset(),n=this.options.offset,a=n.top,s=n.bottom;"object"!=typeof n&&(s=a=n),"function"==typeof a&&(a=n.top()),"function"==typeof s&&(s=n.bottom());var o=!(null!=this.unpin&&e+this.unpin<=i.top)&&(null!=s&&i.top+this.$element.height()>=t-s?"bottom":null!=a&&e<=a&&"top");this.affixed!==o&&(this.unpin&&this.$element.css("top",""),this.affixed=o,this.unpin="bottom"==o?i.top-e:null,this.$element.removeClass(l.RESET).addClass("affix"+(o?"-"+o:"")),"bottom"==o&&this.$element.offset({top:document.body.offsetHeight-s-this.$element.height()}))}};var t=r.fn.affix;r.fn.affix=function(n){return this.each(function(){var t=r(this),e=t.data("bs.affix"),i="object"==typeof n&&n;e||t.data("bs.affix",e=new l(this,i)),"string"==typeof n&&e[n]()})},r.fn.affix.Constructor=l,r.fn.affix.noConflict=function(){return r.fn.affix=t,this},r(window).on("load",function(){r('[data-spy="affix"]').each(function(){var t=r(this),e=t.data();e.offset=e.offset||{},e.offsetBottom&&(e.offset.bottom=e.offsetBottom),e.offsetTop&&(e.offset.top=e.offsetTop),t.affix(e)})})}(jQuery),function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof exports?module.exports=t(require("jquery")):t(jQuery)}(function(x){"use strict";function i(t){var e=t.parent();t.removeData("minicolors-initialized").removeData("minicolors-settings").removeProp("size").removeClass("minicolors-input"),e.before(t).remove()}function n(t){var e=t.parent(),i=e.find(".minicolors-panel"),n=t.data("minicolors-settings");!t.data("minicolors-initialized")||t.prop("disabled")||e.hasClass("minicolors-inline")||e.hasClass("minicolors-focus")||(a(),e.addClass("minicolors-focus"),i.stop(!0,!0).fadeIn(n.showSpeed,function(){n.show&&n.show.call(t.get(0))}))}function a(){x(".minicolors-focus").each(function(){var t=x(this),e=t.find(".minicolors-input"),i=t.find(".minicolors-panel"),n=e.data("minicolors-settings");i.fadeOut(n.hideSpeed,function(){n.hide&&n.hide.call(e.get(0)),t.removeClass("minicolors-focus")})})}function s(t,e,i){var n,a,s,o,r=t.parents(".minicolors").find(".minicolors-input"),l=r.data("minicolors-settings"),d=t.find("[class$=-picker]"),c=t.offset().left,u=t.offset().top,h=Math.round(e.pageX-c),p=Math.round(e.pageY-u),f=i?l.animationSpeed:0;e.originalEvent.changedTouches&&(h=e.originalEvent.changedTouches[0].pageX-c,p=e.originalEvent.changedTouches[0].pageY-u),h<0&&(h=0),p<0&&(p=0),h>t.width()&&(h=t.width()),p>t.height()&&(p=t.height()),t.parent().is(".minicolors-slider-wheel")&&d.parent().is(".minicolors-grid")&&(n=75-h,a=75-p,s=Math.sqrt(n*n+a*a),(o=Math.atan2(a,n))<0&&(o+=2*Math.PI),75<s&&(h=(s=75)-75*Math.cos(o),p=75-75*Math.sin(o)),h=Math.round(h),p=Math.round(p)),t.is(".minicolors-grid")?d.stop(!0).animate({top:p+"px",left:h+"px"},f,l.animationEasing,function(){m(r,t)}):d.stop(!0).animate({top:p+"px"},f,l.animationEasing,function(){m(r,t)})}function m(t,e){function i(t,e){var i,n;return t.length&&e?(i=t.offset().left,n=t.offset().top,{x:i-e.offset().left+t.outerWidth()/2,y:n-e.offset().top+t.outerHeight()/2}):null}var n,a,s,o,r,l,d,c=t.val(),u=t.attr("data-opacity"),h=t.parent(),p=t.data("minicolors-settings"),f=h.find(".minicolors-input-swatch"),m=h.find(".minicolors-grid"),g=h.find(".minicolors-slider"),v=h.find(".minicolors-opacity-slider"),b=m.find("[class$=-picker]"),y=g.find("[class$=-picker]"),w=v.find("[class$=-picker]"),x=i(b,m),k=i(y,g),C=i(w,v);if(e.is(".minicolors-grid, .minicolors-slider, .minicolors-opacity-slider")){switch(p.control){case"wheel":o=m.width()/2-x.x,r=m.height()/2-x.y,l=Math.sqrt(o*o+r*r),(d=Math.atan2(r,o))<0&&(d+=2*Math.PI),75<l&&(l=75,x.x=69-75*Math.cos(d),x.y=69-75*Math.sin(d)),a=M(l/.75,0,100),c=E({h:n=M(180*d/Math.PI,0,360),s:a,b:s=M(100-Math.floor(k.y*(100/g.height())),0,100)}),g.css("backgroundColor",E({h:n,s:a,b:100}));break;case"saturation":c=E({h:n=M(parseInt(x.x*(360/m.width()),10),0,360),s:a=M(100-Math.floor(k.y*(100/g.height())),0,100),b:s=M(100-Math.floor(x.y*(100/m.height())),0,100)}),g.css("backgroundColor",E({h:n,s:100,b:s})),h.find(".minicolors-grid-inner").css("opacity",a/100);break;case"brightness":c=E({h:n=M(parseInt(x.x*(360/m.width()),10),0,360),s:a=M(100-Math.floor(x.y*(100/m.height())),0,100),b:s=M(100-Math.floor(k.y*(100/g.height())),0,100)}),g.css("backgroundColor",E({h:n,s:a,b:100})),h.find(".minicolors-grid-inner").css("opacity",1-s/100);break;default:c=E({h:n=M(360-parseInt(k.y*(360/g.height()),10),0,360),s:a=M(Math.floor(x.x*(100/m.width())),0,100),b:s=M(100-Math.floor(x.y*(100/m.height())),0,100)}),m.css("backgroundColor",E({h:n,s:100,b:100}))}_(t,c,u=p.opacity?parseFloat(1-C.y/v.height()).toFixed(2):1)}else f.find("span").css({backgroundColor:c,opacity:u}),S(t,c,u)}function _(t,e,i){var n,a=t.parent(),s=t.data("minicolors-settings"),o=a.find(".minicolors-input-swatch");s.opacity&&t.attr("data-opacity",i),e="rgb"===s.format?(n=D(e)?P(e,!0):L(C(e,!0)),i=""===t.attr("data-opacity")?1:M(parseFloat(t.attr("data-opacity")).toFixed(2),0,1),!isNaN(i)&&s.opacity||(i=1),t.minicolors("rgbObject").a<=1&&n&&s.opacity?"rgba("+n.r+", "+n.g+", "+n.b+", "+parseFloat(i)+")":"rgb("+n.r+", "+n.g+", "+n.b+")"):(D(e)&&(e=I(e)),k(e,s.letterCase)),t.val(e),o.find("span").css({backgroundColor:e,opacity:i}),S(t,e,i)}function d(t,e){var i,n,a,s,o,r,l,d,c,u,h=t.parent(),p=t.data("minicolors-settings"),f=h.find(".minicolors-input-swatch"),m=h.find(".minicolors-grid"),g=h.find(".minicolors-slider"),v=h.find(".minicolors-opacity-slider"),b=m.find("[class$=-picker]"),y=g.find("[class$=-picker]"),w=v.find("[class$=-picker]");switch(D(t.val())?(i=I(t.val()),(o=M(parseFloat(T(t.val())).toFixed(2),0,1))&&t.attr("data-opacity",o)):i=k(C(t.val(),!0),p.letterCase),i||(i=k(A(p.defaultValue,!0),p.letterCase)),n=function(t){var e=function(t){var e={h:0,s:0,b:0},i=Math.min(t.r,t.g,t.b),n=Math.max(t.r,t.g,t.b),a=n-i;e.b=n,e.s=0!==n?255*a/n:0,0!==e.s?t.r===n?e.h=(t.g-t.b)/a:t.g===n?e.h=2+(t.b-t.r)/a:e.h=4+(t.r-t.g)/a:e.h=-1;e.h*=60,e.h<0&&(e.h+=360);return e.s*=100/255,e.b*=100/255,e}(L(t));0===e.s&&(e.h=360);return e}(i),s=p.keywords?x.map(p.keywords.split(","),function(t){return x.trim(t.toLowerCase())}):[],r=""!==t.val()&&-1<x.inArray(t.val().toLowerCase(),s)?k(t.val()):D(t.val())?P(t.val()):i,e||t.val(r),p.opacity&&(a=""===t.attr("data-opacity")?1:M(parseFloat(t.attr("data-opacity")).toFixed(2),0,1),isNaN(a)&&(a=1),t.attr("data-opacity",a),f.find("span").css("opacity",a),d=M(v.height()-v.height()*a,0,v.height()),w.css("top",d+"px")),"transparent"===t.val().toLowerCase()&&f.find("span").css("opacity",0),f.find("span").css("backgroundColor",i),p.control){case"wheel":c=M(Math.ceil(.75*n.s),0,m.height()/2),u=n.h*Math.PI/180,l=M(75-Math.cos(u)*c,0,m.width()),d=M(75-Math.sin(u)*c,0,m.height()),b.css({top:d+"px",left:l+"px"}),d=150-n.b/(100/m.height()),""===i&&(d=0),y.css("top",d+"px"),g.css("backgroundColor",E({h:n.h,s:n.s,b:100}));break;case"saturation":l=M(5*n.h/12,0,150),d=M(m.height()-Math.ceil(n.b/(100/m.height())),0,m.height()),b.css({top:d+"px",left:l+"px"}),d=M(g.height()-n.s*(g.height()/100),0,g.height()),y.css("top",d+"px"),g.css("backgroundColor",E({h:n.h,s:100,b:n.b})),h.find(".minicolors-grid-inner").css("opacity",n.s/100);break;case"brightness":l=M(5*n.h/12,0,150),d=M(m.height()-Math.ceil(n.s/(100/m.height())),0,m.height()),b.css({top:d+"px",left:l+"px"}),d=M(g.height()-n.b*(g.height()/100),0,g.height()),y.css("top",d+"px"),g.css("backgroundColor",E({h:n.h,s:n.s,b:100})),h.find(".minicolors-grid-inner").css("opacity",1-n.b/100);break;default:l=M(Math.ceil(n.s/(100/m.width())),0,m.width()),d=M(m.height()-Math.ceil(n.b/(100/m.height())),0,m.height()),b.css({top:d+"px",left:l+"px"}),d=M(g.height()-n.h/(360/g.height()),0,g.height()),y.css("top",d+"px"),m.css("backgroundColor",E({h:n.h,s:100,b:100}))}t.data("minicolors-initialized")&&S(t,r,a)}function S(t,e,i){var n,a,s=t.data("minicolors-settings"),o=t.data("minicolors-lastChange");if(!o||o.value!==e||o.opacity!==i){if(t.data("minicolors-lastChange",{value:e,opacity:i}),s.swatches&&0!==s.swatches.length){for(n=D(e)?P(e,!0):L(e),-1,a=0;a<s.swatches.length;++a)if(n.r===s.swatches[a].r&&n.g===s.swatches[a].g&&n.b===s.swatches[a].b&&n.a===s.swatches[a].a){a;break}t.parent().find(".minicolors-swatches .minicolors-swatch").removeClass("selected"),-1!==a&&t.parent().find(".minicolors-swatches .minicolors-swatch").eq(a).addClass("selected")}s.change&&(s.changeDelay?(clearTimeout(t.data("minicolors-changeTimeout")),t.data("minicolors-changeTimeout",setTimeout(function(){s.change.call(t.get(0),e,i)},s.changeDelay))):s.change.call(t.get(0),e,i)),t.trigger("change").trigger("input")}}function k(t,e){return"uppercase"===e?t.toUpperCase():t.toLowerCase()}function C(t,e){return(t=t.replace(/^#/g,"")).match(/^[A-F0-9]{3,6}/gi)?3!==t.length&&6!==t.length?"":(3===t.length&&e&&(t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2]),"#"+t):""}function P(t,e){var i=t.replace(/[^\d,.]/g,"").split(",");return i[0]=M(parseInt(i[0],10),0,255),i[1]=M(parseInt(i[1],10),0,255),i[2]=M(parseInt(i[2],10),0,255),i[3]&&(i[3]=M(parseFloat(i[3],10),0,1)),e?{r:i[0],g:i[1],b:i[2],a:i[3]?i[3]:null}:void 0!==i[3]&&i[3]<=1?"rgba("+i[0]+", "+i[1]+", "+i[2]+", "+i[3]+")":"rgb("+i[0]+", "+i[1]+", "+i[2]+")"}function A(t,e){return D(t)?P(t):C(t,e)}function M(t,e,i){return t<e&&(t=e),i<t&&(t=i),t}function D(t){var e=t.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i);return!(!e||4!==e.length)}function T(t){return(t=t.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+(\.\d{1,2})?|\.\d{1,2})[\s+]?/i))&&6===t.length?t[4]:"1"}function I(t){return(t=t.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i))&&4===t.length?"#"+("0"+parseInt(t[1],10).toString(16)).slice(-2)+("0"+parseInt(t[2],10).toString(16)).slice(-2)+("0"+parseInt(t[3],10).toString(16)).slice(-2):""}function c(t){var i=[t.r.toString(16),t.g.toString(16),t.b.toString(16)];return x.each(i,function(t,e){1===e.length&&(i[t]="0"+e)}),"#"+i.join("")}function E(t){return c(function(t){var e={},i=Math.round(t.h),n=Math.round(255*t.s/100),a=Math.round(255*t.b/100);if(0===n)e.r=e.g=e.b=a;else{var s=a,o=(255-n)*a/255,r=i%60*(s-o)/60;360===i&&(i=0),i<60?(e.r=s,e.b=o,e.g=o+r):i<120?(e.g=s,e.b=o,e.r=s-r):i<180?(e.g=s,e.r=o,e.b=o+r):i<240?(e.b=s,e.r=o,e.g=s-r):i<300?(e.b=s,e.g=o,e.r=o+r):e.b=i<360?(e.r=s,e.g=o,s-r):(e.r=0,e.g=0)}return{r:Math.round(e.r),g:Math.round(e.g),b:Math.round(e.b)}}(t))}function L(t){return{r:(t=parseInt(-1<t.indexOf("#")?t.substring(1):t,16))>>16,g:(65280&t)>>8,b:255&t}}x.minicolors={defaults:{animationSpeed:50,animationEasing:"swing",change:null,changeDelay:0,control:"hue",dataUris:!0,defaultValue:"",format:"hex",hide:null,hideSpeed:100,inline:!1,keywords:"",letterCase:"lowercase",opacity:!1,position:"bottom left",show:null,showSpeed:100,theme:"default",swatches:[]}},x.extend(x.fn,{minicolors:function(t,e){switch(t){case"destroy":return x(this).each(function(){i(x(this))}),x(this);case"hide":return a(),x(this);case"opacity":return void 0===e?x(this).attr("data-opacity"):(x(this).each(function(){d(x(this).attr("data-opacity",e))}),x(this));case"rgbObject":return function(t){var e=L(C(x(t).val(),!0)),i=x(t).attr("data-opacity");if(!e)return null;void 0!==i&&x.extend(e,{a:parseFloat(i)});return e}(x(this));case"rgbString":case"rgbaString":return function(t,e){var i=L(C(x(t).val(),!0)),n=x(t).attr("data-opacity");if(!i)return null;void 0===n&&(n=1);return e?"rgba("+i.r+", "+i.g+", "+i.b+", "+parseFloat(n)+")":"rgb("+i.r+", "+i.g+", "+i.b+")"}(x(this),"rgbaString"===t);case"settings":return void 0===e?x(this).data("minicolors-settings"):(x(this).each(function(){var t=x(this).data("minicolors-settings")||{};i(x(this)),x(this).minicolors(x.extend(!0,t,e))}),x(this));case"show":return n(x(this).eq(0)),x(this);case"value":return void 0===e?x(this).val():(x(this).each(function(){"object"==typeof e&&null!==typeof e?(e.opacity&&x(this).attr("data-opacity",M(e.opacity,0,1)),e.color&&x(this).val(e.color)):x(this).val(e),d(x(this))}),x(this));default:return"create"!==t&&(e=t),x(this).each(function(){!function(e,t){var i,n,a,s,o,r=x('<div class="minicolors" />'),l=x.minicolors.defaults;if(e.data("minicolors-initialized"))return;t=x.extend(!0,{},l,t),r.addClass("minicolors-theme-"+t.theme).toggleClass("minicolors-with-opacity",t.opacity).toggleClass("minicolors-no-data-uris",!0!==t.dataUris),void 0!==t.position&&x.each(t.position.split(" "),function(){r.addClass("minicolors-position-"+this)});i="rgb"===t.format?t.opacity?"25":"20":t.keywords?"11":"7";e.addClass("minicolors-input").data("minicolors-initialized",!1).data("minicolors-settings",t).prop("size",i).wrap(r).after('<div class="minicolors-panel minicolors-slider-'+t.control+'"><div class="minicolors-slider minicolors-sprite"><div class="minicolors-picker"></div></div><div class="minicolors-opacity-slider minicolors-sprite"><div class="minicolors-picker"></div></div><div class="minicolors-grid minicolors-sprite"><div class="minicolors-grid-inner"></div><div class="minicolors-picker"><div></div></div></div></div>'),t.inline||(e.after('<span class="minicolors-swatch minicolors-sprite minicolors-input-swatch"><span class="minicolors-swatch-color"></span></span>'),e.next(".minicolors-input-swatch").on("click",function(t){t.preventDefault(),e.focus()}));if((s=e.parent().find(".minicolors-panel")).on("selectstart",function(){return!1}).end(),t.swatches&&0!==t.swatches.length)for(7<t.swatches.length&&(t.swatches.length=7),s.addClass("minicolors-with-swatches"),n=x('<ul class="minicolors-swatches"></ul>').appendTo(s),o=0;o<t.swatches.length;++o)a=D(a=t.swatches[o])?P(a,!0):L(C(a,!0)),x('<li class="minicolors-swatch minicolors-sprite"><span class="minicolors-swatch-color"></span></li>').appendTo(n).data("swatch-color",t.swatches[o]).find(".minicolors-swatch-color").css({backgroundColor:c(a),opacity:a.a}),t.swatches[o]=a;t.inline&&e.parent().addClass("minicolors-inline");d(e,!1),e.data("minicolors-initialized",!0)}(x(this),e)}),x(this)}}}),x(document).on("mousedown.minicolors touchstart.minicolors",function(t){x(t.target).parents().add(t.target).hasClass("minicolors")||a()}).on("mousedown.minicolors touchstart.minicolors",".minicolors-grid, .minicolors-slider, .minicolors-opacity-slider",function(t){var e=x(this);t.preventDefault(),x(document).data("minicolors-target",e),s(e,t,!0)}).on("mousemove.minicolors touchmove.minicolors",function(t){var e=x(document).data("minicolors-target");e&&s(e,t)}).on("mouseup.minicolors touchend.minicolors",function(){x(this).removeData("minicolors-target")}).on("click.minicolors",".minicolors-swatches li",function(t){t.preventDefault();var e=x(this),i=e.parents(".minicolors").find(".minicolors-input"),n=e.data("swatch-color");_(i,n,T(n)),d(i)}).on("mousedown.minicolors touchstart.minicolors",".minicolors-input-swatch",function(t){var e=x(this).parent().find(".minicolors-input");t.preventDefault(),n(e)}).on("focus.minicolors",".minicolors-input",function(){var t=x(this);t.data("minicolors-initialized")&&n(t)}).on("blur.minicolors",".minicolors-input",function(){var t,e,i,n,a,s=x(this),o=s.data("minicolors-settings");s.data("minicolors-initialized")&&(t=o.keywords?x.map(o.keywords.split(","),function(t){return x.trim(t.toLowerCase())}):[],a=""!==s.val()&&-1<x.inArray(s.val().toLowerCase(),t)?s.val():null===(i=D(s.val())?P(s.val(),!0):(e=C(s.val(),!0))?L(e):null)?o.defaultValue:"rgb"===o.format?o.opacity?P("rgba("+i.r+","+i.g+","+i.b+","+s.attr("data-opacity")+")"):P("rgb("+i.r+","+i.g+","+i.b+")"):c(i),n=o.opacity?s.attr("data-opacity"):1,"transparent"===a.toLowerCase()&&(n=0),s.closest(".minicolors").find(".minicolors-input-swatch > span").css("opacity",n),s.val(a),""===s.val()&&s.val(A(o.defaultValue,!0)),s.val(k(s.val(),o.letterCase)))}).on("keydown.minicolors",".minicolors-input",function(t){var e=x(this);if(e.data("minicolors-initialized"))switch(t.keyCode){case 9:a();break;case 13:case 27:a(),e.blur()}}).on("keyup.minicolors",".minicolors-input",function(){var t=x(this);t.data("minicolors-initialized")&&d(t,!0)}).on("paste.minicolors",".minicolors-input",function(){var t=x(this);t.data("minicolors-initialized")&&setTimeout(function(){d(t,!0)},1)})}),function(t,e){"use strict";"undefined"!=typeof module&&module.exports?"undefined"!=typeof process&&"electron"in process.versions?t.BootstrapDialog=e(t.jQuery):module.exports=e(require("jquery"),require("bootstrap")):"function"==typeof define&&define.amd?define("bootstrap-dialog",["jquery","bootstrap"],function(t){return e(t)}):t.BootstrapDialog=e(t.jQuery)}(this,function(r){"use strict";var i=r.fn.modal.Constructor,e=function(t,e){i.call(this,t,e)};e.getModalVersion=function(){return void 0===r.fn.modal.Constructor.VERSION?"v3.1":/3\.2\.\d+/.test(r.fn.modal.Constructor.VERSION)?"v3.2":/3\.3\.[1,2]/.test(r.fn.modal.Constructor.VERSION)?"v3.3":"v3.3.4"},e.ORIGINAL_BODY_PADDING=parseInt(r("body").css("padding-right")||0,10),(e.METHODS_TO_OVERRIDE={})["v3.1"]={},e.METHODS_TO_OVERRIDE["v3.2"]={hide:function(t){(t&&t.preventDefault(),t=r.Event("hide.bs.modal"),this.$element.trigger(t),this.isShown&&!t.isDefaultPrevented())&&(this.isShown=!1,0===this.getGlobalOpenedDialogs().length&&this.$body.removeClass("modal-open"),this.resetScrollbar(),this.escape(),r(document).off("focusin.bs.modal"),this.$element.removeClass("in").attr("aria-hidden",!0).off("click.dismiss.bs.modal"),r.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",r.proxy(this.hideModal,this)).emulateTransitionEnd(300):this.hideModal())}},e.METHODS_TO_OVERRIDE["v3.3"]={setScrollbar:function(){var t=e.ORIGINAL_BODY_PADDING;this.bodyIsOverflowing&&this.$body.css("padding-right",t+this.scrollbarWidth)},resetScrollbar:function(){0===this.getGlobalOpenedDialogs().length&&this.$body.css("padding-right",e.ORIGINAL_BODY_PADDING)},hideModal:function(){this.$element.hide(),this.backdrop(r.proxy(function(){0===this.getGlobalOpenedDialogs().length&&this.$body.removeClass("modal-open"),this.resetAdjustments(),this.resetScrollbar(),this.$element.trigger("hidden.bs.modal")},this))}},e.METHODS_TO_OVERRIDE["v3.3.4"]=r.extend({},e.METHODS_TO_OVERRIDE["v3.3"]),e.prototype={constructor:e,getGlobalOpenedDialogs:function(){var i=[];return r.each(s.dialogs,function(t,e){e.isRealized()&&e.isOpened()&&i.push(e)}),i}},e.prototype=r.extend(e.prototype,i.prototype,e.METHODS_TO_OVERRIDE[e.getModalVersion()]);var s=function(t){this.defaultOptions=r.extend(!0,{id:s.newGuid(),buttons:[],data:{},onshow:null,onshown:null,onhide:null,onhidden:null},s.defaultOptions),this.indexedButtons={},this.registeredButtonHotkeys={},this.draggableData={isMouseDown:!1,mouseOffset:{}},this.realized=!1,this.opened=!1,this.initOptions(t),this.holdThisInstance()};return s.BootstrapDialogModal=e,s.NAMESPACE="bootstrap-dialog",s.TYPE_DEFAULT="type-default",s.TYPE_INFO="type-info",s.TYPE_PRIMARY="type-primary",s.TYPE_SUCCESS="type-success",s.TYPE_WARNING="type-warning",s.TYPE_DANGER="type-danger",s.DEFAULT_TEXTS={},s.DEFAULT_TEXTS[s.TYPE_DEFAULT]="Information",s.DEFAULT_TEXTS[s.TYPE_INFO]="Information",s.DEFAULT_TEXTS[s.TYPE_PRIMARY]="Information",s.DEFAULT_TEXTS[s.TYPE_SUCCESS]="Success",s.DEFAULT_TEXTS[s.TYPE_WARNING]="Warning",s.DEFAULT_TEXTS[s.TYPE_DANGER]="Danger",s.DEFAULT_TEXTS.OK="OK",s.DEFAULT_TEXTS.CANCEL="Cancel",s.DEFAULT_TEXTS.CONFIRM="Confirmation",s.SIZE_NORMAL="size-normal",s.SIZE_SMALL="size-small",s.SIZE_WIDE="size-wide",s.SIZE_LARGE="size-large",s.BUTTON_SIZES={},s.BUTTON_SIZES[s.SIZE_NORMAL]="",s.BUTTON_SIZES[s.SIZE_SMALL]="",s.BUTTON_SIZES[s.SIZE_WIDE]="",s.BUTTON_SIZES[s.SIZE_LARGE]="btn-lg",s.ICON_SPINNER="glyphicon glyphicon-asterisk",s.defaultOptions={type:s.TYPE_PRIMARY,size:s.SIZE_NORMAL,cssClass:"",title:null,message:null,nl2br:!0,closable:!0,closeByBackdrop:!0,closeByKeyboard:!0,closeIcon:"&#215;",spinicon:s.ICON_SPINNER,autodestroy:!0,draggable:!1,animate:!0,description:"",tabindex:-1},s.configDefaultOptions=function(t){s.defaultOptions=r.extend(!0,s.defaultOptions,t)},s.dialogs={},s.openAll=function(){r.each(s.dialogs,function(t,e){e.open()})},s.closeAll=function(){r.each(s.dialogs,function(t,e){e.close()})},s.getDialog=function(t){var e=null;return void 0!==s.dialogs[t]&&(e=s.dialogs[t]),e},s.setDialog=function(t){return s.dialogs[t.getId()]=t},s.addDialog=function(t){return s.setDialog(t)},s.moveFocus=function(){var i=null;r.each(s.dialogs,function(t,e){e.isRealized()&&e.isOpened()&&(i=e)}),null!==i&&i.getModal().focus()},s.METHODS_TO_OVERRIDE={},s.METHODS_TO_OVERRIDE["v3.1"]={handleModalBackdropEvent:function(){return this.getModal().on("click",{dialog:this},function(t){t.target===this&&t.data.dialog.isClosable()&&t.data.dialog.canCloseByBackdrop()&&t.data.dialog.close()}),this},updateZIndex:function(){if(this.isOpened()){var i=0;r.each(s.dialogs,function(t,e){e.isRealized()&&e.isOpened()&&i++});var t=this.getModal(),e=t.data("bs.modal").$backdrop;t.css("z-index",1050+20*(i-1)),e.css("z-index",1040+20*(i-1))}return this},open:function(){return!this.isRealized()&&this.realize(),this.getModal().modal("show"),this.updateZIndex(),this}},s.METHODS_TO_OVERRIDE["v3.2"]={handleModalBackdropEvent:s.METHODS_TO_OVERRIDE["v3.1"].handleModalBackdropEvent,updateZIndex:s.METHODS_TO_OVERRIDE["v3.1"].updateZIndex,open:s.METHODS_TO_OVERRIDE["v3.1"].open},s.METHODS_TO_OVERRIDE["v3.3"]={},s.METHODS_TO_OVERRIDE["v3.3.4"]=r.extend({},s.METHODS_TO_OVERRIDE["v3.1"]),s.prototype={constructor:s,initOptions:function(t){return this.options=r.extend(!0,this.defaultOptions,t),this},holdThisInstance:function(){return s.addDialog(this),this},initModalStuff:function(){return this.setModal(this.createModal()).setModalDialog(this.createModalDialog()).setModalContent(this.createModalContent()).setModalHeader(this.createModalHeader()).setModalBody(this.createModalBody()).setModalFooter(this.createModalFooter()),this.getModal().append(this.getModalDialog()),this.getModalDialog().append(this.getModalContent()),this.getModalContent().append(this.getModalHeader()).append(this.getModalBody()).append(this.getModalFooter()),this},createModal:function(){var t=r('<div class="modal" role="dialog" aria-hidden="true"></div>');return t.prop("id",this.getId()),t.attr("aria-labelledby",this.getId()+"_title"),t},getModal:function(){return this.$modal},setModal:function(t){return this.$modal=t,this},createModalDialog:function(){return r('<div class="modal-dialog"></div>')},getModalDialog:function(){return this.$modalDialog},setModalDialog:function(t){return this.$modalDialog=t,this},createModalContent:function(){return r('<div class="modal-content"></div>')},getModalContent:function(){return this.$modalContent},setModalContent:function(t){return this.$modalContent=t,this},createModalHeader:function(){return r('<div class="modal-header"></div>')},getModalHeader:function(){return this.$modalHeader},setModalHeader:function(t){return this.$modalHeader=t,this},createModalBody:function(){return r('<div class="modal-body"></div>')},getModalBody:function(){return this.$modalBody},setModalBody:function(t){return this.$modalBody=t,this},createModalFooter:function(){return r('<div class="modal-footer"></div>')},getModalFooter:function(){return this.$modalFooter},setModalFooter:function(t){return this.$modalFooter=t,this},createDynamicContent:function(t){var e=null;return"string"==typeof(e="function"==typeof t?t.call(t,this):t)&&(e=this.formatStringContent(e)),e},formatStringContent:function(t){return this.options.nl2br?t.replace(/\r\n/g,"<br />").replace(/[\r\n]/g,"<br />"):t},setData:function(t,e){return this.options.data[t]=e,this},getData:function(t){return this.options.data[t]},setId:function(t){return this.options.id=t,this},getId:function(){return this.options.id},getType:function(){return this.options.type},setType:function(t){return this.options.type=t,this.updateType(),this},updateType:function(){if(this.isRealized()){var t=[s.TYPE_DEFAULT,s.TYPE_INFO,s.TYPE_PRIMARY,s.TYPE_SUCCESS,s.TYPE_WARNING,s.TYPE_DANGER];this.getModal().removeClass(t.join(" ")).addClass(this.getType())}return this},getSize:function(){return this.options.size},setSize:function(t){return this.options.size=t,this.updateSize(),this},updateSize:function(){if(this.isRealized()){var o=this;this.getModal().removeClass(s.SIZE_NORMAL).removeClass(s.SIZE_SMALL).removeClass(s.SIZE_WIDE).removeClass(s.SIZE_LARGE),this.getModal().addClass(this.getSize()),this.getModalDialog().removeClass("modal-sm"),this.getSize()===s.SIZE_SMALL&&this.getModalDialog().addClass("modal-sm"),this.getModalDialog().removeClass("modal-lg"),this.getSize()===s.SIZE_WIDE&&this.getModalDialog().addClass("modal-lg"),r.each(this.options.buttons,function(t,e){var i=o.getButton(e.id),n=["btn-lg","btn-sm","btn-xs"],a=!1;if("string"==typeof e.cssClass){var s=e.cssClass.split(" ");r.each(s,function(t,e){-1!==r.inArray(e,n)&&(a=!0)})}a||(i.removeClass(n.join(" ")),i.addClass(o.getButtonSize()))})}return this},getCssClass:function(){return this.options.cssClass},setCssClass:function(t){return this.options.cssClass=t,this},getTitle:function(){return this.options.title},setTitle:function(t){return this.options.title=t,this.updateTitle(),this},updateTitle:function(){if(this.isRealized()){var t=null!==this.getTitle()?this.createDynamicContent(this.getTitle()):this.getDefaultText();this.getModalHeader().find("."+this.getNamespace("title")).html("").append(t).prop("id",this.getId()+"_title")}return this},getMessage:function(){return this.options.message},setMessage:function(t){return this.options.message=t,this.updateMessage(),this},updateMessage:function(){if(this.isRealized()){var t=this.createDynamicContent(this.getMessage());this.getModalBody().find("."+this.getNamespace("message")).html("").append(t)}return this},isClosable:function(){return this.options.closable},setClosable:function(t){return this.options.closable=t,this.updateClosable(),this},setCloseByBackdrop:function(t){return this.options.closeByBackdrop=t,this},canCloseByBackdrop:function(){return this.options.closeByBackdrop},setCloseByKeyboard:function(t){return this.options.closeByKeyboard=t,this},canCloseByKeyboard:function(){return this.options.closeByKeyboard},isAnimate:function(){return this.options.animate},setAnimate:function(t){return this.options.animate=t,this},updateAnimate:function(){return this.isRealized()&&this.getModal().toggleClass("fade",this.isAnimate()),this},getSpinicon:function(){return this.options.spinicon},setSpinicon:function(t){return this.options.spinicon=t,this},addButton:function(t){return this.options.buttons.push(t),this},addButtons:function(t){var i=this;return r.each(t,function(t,e){i.addButton(e)}),this},getButtons:function(){return this.options.buttons},setButtons:function(t){return this.options.buttons=t,this.updateButtons(),this},getButton:function(t){return void 0!==this.indexedButtons[t]?this.indexedButtons[t]:null},getButtonSize:function(){return void 0!==s.BUTTON_SIZES[this.getSize()]?s.BUTTON_SIZES[this.getSize()]:""},updateButtons:function(){return this.isRealized()&&(0===this.getButtons().length?this.getModalFooter().hide():this.getModalFooter().show().find("."+this.getNamespace("footer")).html("").append(this.createFooterButtons())),this},isAutodestroy:function(){return this.options.autodestroy},setAutodestroy:function(t){this.options.autodestroy=t},getDescription:function(){return this.options.description},setDescription:function(t){return this.options.description=t,this},setTabindex:function(t){return this.options.tabindex=t,this},getTabindex:function(){return this.options.tabindex},updateTabindex:function(){return this.isRealized()&&this.getModal().attr("tabindex",this.getTabindex()),this},getDefaultText:function(){return s.DEFAULT_TEXTS[this.getType()]},getNamespace:function(t){return s.NAMESPACE+"-"+t},createHeaderContent:function(){var t=r("<div></div>");return t.addClass(this.getNamespace("header")),t.append(this.createTitleContent()),t.prepend(this.createCloseButton()),t},createTitleContent:function(){var t=r("<div></div>");return t.addClass(this.getNamespace("title")),t},createCloseButton:function(){var t=r("<div></div>");t.addClass(this.getNamespace("close-button"));var e=r('<button class="close"></button>');return e.append(this.options.closeIcon),t.append(e),t.on("click",{dialog:this},function(t){t.data.dialog.close()}),t},createBodyContent:function(){var t=r("<div></div>");return t.addClass(this.getNamespace("body")),t.append(this.createMessageContent()),t},createMessageContent:function(){var t=r("<div></div>");return t.addClass(this.getNamespace("message")),t},createFooterContent:function(){var t=r("<div></div>");return t.addClass(this.getNamespace("footer")),t},createFooterButtons:function(){var n=this,a=r("<div></div>");return a.addClass(this.getNamespace("footer-buttons")),this.indexedButtons={},r.each(this.options.buttons,function(t,e){e.id||(e.id=s.newGuid());var i=n.createButton(e);n.indexedButtons[e.id]=i,a.append(i)}),a},createButton:function(t){var e=r('<button class="btn"></button>');return e.prop("id",t.id),e.data("button",t),void 0!==t.icon&&""!==r.trim(t.icon)&&e.append(this.createButtonIcon(t.icon)),void 0!==t.label&&e.append(t.label),void 0!==t.cssClass&&""!==r.trim(t.cssClass)?e.addClass(t.cssClass):e.addClass("btn-default"),void 0!==t.hotkey&&(this.registeredButtonHotkeys[t.hotkey]=e),e.on("click",{dialog:this,$button:e,button:t},function(t){var e=t.data.dialog,i=t.data.$button,n=i.data("button");if(n.autospin&&i.toggleSpin(!0),"function"==typeof n.action)return n.action.call(i,e,t)}),this.enhanceButton(e),void 0!==t.enabled&&e.toggleEnable(t.enabled),e},enhanceButton:function(n){return n.dialog=this,n.toggleEnable=function(t){return void 0!==t?this.prop("disabled",!t).toggleClass("disabled",!t):this.prop("disabled",!this.prop("disabled")),this},n.enable=function(){return this.toggleEnable(!0),this},n.disable=function(){return this.toggleEnable(!1),this},n.toggleSpin=function(t){var e=this.dialog,i=this.find("."+e.getNamespace("button-icon"));return void 0===t&&(t=!(0<n.find(".icon-spin").length)),t?(i.hide(),n.prepend(e.createButtonIcon(e.getSpinicon()).addClass("icon-spin"))):(i.show(),n.find(".icon-spin").remove()),this},n.spin=function(){return this.toggleSpin(!0),this},n.stopSpin=function(){return this.toggleSpin(!1),this},this},createButtonIcon:function(t){var e=r("<span></span>");return e.addClass(this.getNamespace("button-icon")).addClass(t),e},enableButtons:function(i){return r.each(this.indexedButtons,function(t,e){e.toggleEnable(i)}),this},updateClosable:function(){return this.isRealized()&&this.getModalHeader().find("."+this.getNamespace("close-button")).toggle(this.isClosable()),this},onShow:function(t){return this.options.onshow=t,this},onShown:function(t){return this.options.onshown=t,this},onHide:function(t){return this.options.onhide=t,this},onHidden:function(t){return this.options.onhidden=t,this},isRealized:function(){return this.realized},setRealized:function(t){return this.realized=t,this},isOpened:function(){return this.opened},setOpened:function(t){return this.opened=t,this},handleModalEvents:function(){return this.getModal().on("show.bs.modal",{dialog:this},function(t){var e=t.data.dialog;if(e.setOpened(!0),e.isModalEvent(t)&&"function"==typeof e.options.onshow){var i=e.options.onshow(e);return!1===i&&e.setOpened(!1),i}}),this.getModal().on("shown.bs.modal",{dialog:this},function(t){var e=t.data.dialog;e.isModalEvent(t)&&"function"==typeof e.options.onshown&&e.options.onshown(e)}),this.getModal().on("hide.bs.modal",{dialog:this},function(t){var e=t.data.dialog;if(e.setOpened(!1),e.isModalEvent(t)&&"function"==typeof e.options.onhide){var i=e.options.onhide(e);return!1===i&&e.setOpened(!0),i}}),this.getModal().on("hidden.bs.modal",{dialog:this},function(t){var e=t.data.dialog;e.isModalEvent(t)&&"function"==typeof e.options.onhidden&&e.options.onhidden(e),e.isAutodestroy()&&(e.setRealized(!1),delete s.dialogs[e.getId()],r(this).remove()),s.moveFocus()}),this.handleModalBackdropEvent(),this.getModal().on("keyup",{dialog:this},function(t){27===t.which&&t.data.dialog.isClosable()&&t.data.dialog.canCloseByKeyboard()&&t.data.dialog.close()}),this.getModal().on("keyup",{dialog:this},function(t){var e=t.data.dialog;if(void 0!==e.registeredButtonHotkeys[t.which]){var i=r(e.registeredButtonHotkeys[t.which]);!i.prop("disabled")&&i.focus().trigger("click")}}),this},handleModalBackdropEvent:function(){return this.getModal().on("click",{dialog:this},function(t){r(t.target).hasClass("modal-backdrop")&&t.data.dialog.isClosable()&&t.data.dialog.canCloseByBackdrop()&&t.data.dialog.close()}),this},isModalEvent:function(t){return void 0!==t.namespace&&"bs.modal"===t.namespace},makeModalDraggable:function(){return this.options.draggable&&(this.getModalHeader().addClass(this.getNamespace("draggable")).on("mousedown",{dialog:this},function(t){var e=t.data.dialog;e.draggableData.isMouseDown=!0;var i=e.getModalDialog().offset();e.draggableData.mouseOffset={top:t.clientY-i.top,left:t.clientX-i.left}}),this.getModal().on("mouseup mouseleave",{dialog:this},function(t){t.data.dialog.draggableData.isMouseDown=!1}),r("body").on("mousemove",{dialog:this},function(t){var e=t.data.dialog;e.draggableData.isMouseDown&&e.getModalDialog().offset({top:t.clientY-e.draggableData.mouseOffset.top,left:t.clientX-e.draggableData.mouseOffset.left})})),this},realize:function(){return this.initModalStuff(),this.getModal().addClass(s.NAMESPACE).addClass(this.getCssClass()),this.updateSize(),this.getDescription()&&this.getModal().attr("aria-describedby",this.getDescription()),this.getModalFooter().append(this.createFooterContent()),this.getModalHeader().append(this.createHeaderContent()),this.getModalBody().append(this.createBodyContent()),this.getModal().data("bs.modal",new e(this.getModal(),{backdrop:"static",keyboard:!1,show:!1})),this.makeModalDraggable(),this.handleModalEvents(),this.setRealized(!0),this.updateButtons(),this.updateType(),this.updateTitle(),this.updateMessage(),this.updateClosable(),this.updateAnimate(),this.updateSize(),this.updateTabindex(),this},open:function(){return!this.isRealized()&&this.realize(),this.getModal().modal("show"),this},close:function(){return!this.isRealized()&&this.realize(),this.getModal().modal("hide"),this}},s.prototype=r.extend(s.prototype,s.METHODS_TO_OVERRIDE[e.getModalVersion()]),s.newGuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)})},s.show=function(t){return new s(t).open()},s.alert=function(){var t={},e={type:s.TYPE_PRIMARY,title:null,message:null,closable:!1,draggable:!1,buttonLabel:s.DEFAULT_TEXTS.OK,callback:null};t="object"==typeof arguments[0]&&arguments[0].constructor==={}.constructor?r.extend(!0,e,arguments[0]):r.extend(!0,e,{message:arguments[0],callback:void 0!==arguments[1]?arguments[1]:null});var i=new s(t);return i.setData("callback",t.callback),i.addButton({label:t.buttonLabel,action:function(t){return("function"!=typeof t.getData("callback")||!1!==t.getData("callback").call(this,!0))&&(t.setData("btnClicked",!0),t.close())}}),"function"==typeof i.options.onhide?i.onHide(function(t){var e=!0;return!t.getData("btnClicked")&&t.isClosable()&&"function"==typeof t.getData("callback")&&(e=t.getData("callback")(!1)),!1!==e&&(e=this.onhide(t))}.bind({onhide:i.options.onhide})):i.onHide(function(t){var e=!0;return!t.getData("btnClicked")&&t.isClosable()&&"function"==typeof t.getData("callback")&&(e=t.getData("callback")(!1)),e}),i.open()},s.confirm=function(){var t={},e={type:s.TYPE_PRIMARY,title:null,message:null,closable:!1,draggable:!1,btnCancelLabel:s.DEFAULT_TEXTS.CANCEL,btnCancelClass:null,btnOKLabel:s.DEFAULT_TEXTS.OK,btnOKClass:null,callback:null};null===(t="object"==typeof arguments[0]&&arguments[0].constructor==={}.constructor?r.extend(!0,e,arguments[0]):r.extend(!0,e,{message:arguments[0],callback:void 0!==arguments[1]?arguments[1]:null})).btnOKClass&&(t.btnOKClass=["btn",t.type.split("-")[1]].join("-"));var i=new s(t);return i.setData("callback",t.callback),i.addButton({label:t.btnCancelLabel,cssClass:t.btnCancelClass,action:function(t){return("function"!=typeof t.getData("callback")||!1!==t.getData("callback").call(this,!1))&&t.close()}}),i.addButton({label:t.btnOKLabel,cssClass:t.btnOKClass,action:function(t){return("function"!=typeof t.getData("callback")||!1!==t.getData("callback").call(this,!0))&&t.close()}}),i.open()},s.warning=function(t,e){return new s({type:s.TYPE_WARNING,message:t}).open()},s.danger=function(t,e){return new s({type:s.TYPE_DANGER,message:t}).open()},s.success=function(t,e){return new s({type:s.TYPE_SUCCESS,message:t}).open()},s}),function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof exports?t(require("jquery")):t(jQuery)}(function(i){var t=function(){if(i&&i.fn&&i.fn.select2&&i.fn.select2.amd)var t=i.fn.select2.amd;var e,a,d;return t&&t.requirejs||(t?a=t:t={},function(h){var s,o,p,f,m={},g={},v={},b={},i=Object.prototype.hasOwnProperty,n=[].slice,y=/\.js#x2F;;function w(t,e){return i.call(t,e)}function r(t,e){var i,n,a,s,o,r,l,d,c,u,h,p=e&&e.split("/"),f=v.map,m=f&&f["*"]||{};if(t&&"."===t.charAt(0))if(e){for(o=(t=t.split("/")).length-1,v.nodeIdCompat&&y.test(t[o])&&(t[o]=t[o].replace(y,"")),t=p.slice(0,p.length-1).concat(t),c=0;c<t.length;c+=1)if("."===(h=t[c]))t.splice(c,1),c-=1;else if(".."===h){if(1===c&&(".."===t[2]||".."===t[0]))break;0<c&&(t.splice(c-1,2),c-=2)}t=t.join("/")}else 0===t.indexOf("./")&&(t=t.substring(2));if((p||m)&&f){for(c=(i=t.split("/")).length;0<c;c-=1){if(n=i.slice(0,c).join("/"),p)for(u=p.length;0<u;u-=1)if((a=f[p.slice(0,u).join("/")])&&(a=a[n])){s=a,r=c;break}if(s)break;!l&&m&&m[n]&&(l=m[n],d=c)}!s&&l&&(s=l,r=d),s&&(i.splice(0,r,s),t=i.join("/"))}return t}function x(e,i){return function(){var t=n.call(arguments,0);return"string"!=typeof t[0]&&1===t.length&&t.push(null),o.apply(h,t.concat([e,i]))}}function k(e){return function(t){m[e]=t}}function C(t){if(w(g,t)){var e=g[t];delete g[t],b[t]=!0,s.apply(h,e)}if(!w(m,t)&&!w(b,t))throw new Error("No "+t);return m[t]}function l(t){var e,i=t?t.indexOf("!"):-1;return-1<i&&(e=t.substring(0,i),t=t.substring(i+1,t.length)),[e,t]}p=function(t,e){var i,n,a=l(t),s=a[0];return t=a[1],s&&(i=C(s=r(s,e))),s?t=i&&i.normalize?i.normalize(t,(n=e,function(t){return r(t,n)})):r(t,e):(s=(a=l(t=r(t,e)))[0],t=a[1],s&&(i=C(s))),{f:s?s+"!"+t:t,n:t,pr:s,p:i}},f={require:function(t){return x(t)},exports:function(t){var e=m[t];return void 0!==e?e:m[t]={}},module:function(t){return{id:t,uri:"",exports:m[t],config:(e=t,function(){return v&&v.config&&v.config[e]||{}})};var e}},s=function(t,e,i,n){var a,s,o,r,l,d,c=[],u=typeof i;if(n=n||t,"undefined"===u||"function"===u){for(e=!e.length&&i.length?["require","exports","module"]:e,l=0;l<e.length;l+=1)if("require"===(s=(r=p(e[l],n)).f))c[l]=f.require(t);else if("exports"===s)c[l]=f.exports(t),d=!0;else if("module"===s)a=c[l]=f.module(t);else if(w(m,s)||w(g,s)||w(b,s))c[l]=C(s);else{if(!r.p)throw new Error(t+" missing "+s);r.p.load(r.n,x(n,!0),k(s),{}),c[l]=m[s]}o=i?i.apply(m[t],c):void 0,t&&(a&&a.exports!==h&&a.exports!==m[t]?m[t]=a.exports:o===h&&d||(m[t]=o))}else t&&(m[t]=i)},e=a=o=function(t,e,i,n,a){if("string"==typeof t)return f[t]?f[t](e):C(p(t,e).f);if(!t.splice){if((v=t).deps&&o(v.deps,v.callback),!e)return;e.splice?(t=e,e=i,i=null):t=h}return e=e||function(){},"function"==typeof i&&(i=n,n=a),n?s(h,t,e,i):setTimeout(function(){s(h,t,e,i)},4),o},o.config=function(t){return o(t)},e._defined=m,(d=function(t,e,i){if("string"!=typeof t)throw new Error("See almond README: incorrect module build, no module name");e.splice||(i=e,e=[]),w(m,t)||w(g,t)||(g[t]=[t,e,i])}).amd={jQuery:!0}}(),t.requirejs=e,t.require=a,t.define=d),t.define("almond",function(){}),t.define("jquery",[],function(){var t=i||$;return null==t&&console&&console.error&&console.error("Select2: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before Select2 on your web page."),t}),t.define("select2/utils",["jquery"],function(s){var t={};function c(t){var e=t.prototype,i=[];for(var n in e){"function"==typeof e[n]&&("constructor"!==n&&i.push(n))}return i}t.Extend=function(t,e){var i={}.hasOwnProperty;function n(){this.constructor=t}for(var a in e)i.call(e,a)&&(t[a]=e[a]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},t.Decorate=function(n,a){var t=c(a),e=c(n);function s(){var t=Array.prototype.unshift,e=a.prototype.constructor.length,i=n.prototype.constructor;0<e&&(t.call(arguments,n.prototype.constructor),i=a.prototype.constructor),i.apply(this,arguments)}a.displayName=n.displayName,s.prototype=new function(){this.constructor=s};for(var i=0;i<e.length;i++){var o=e[i];s.prototype[o]=n.prototype[o]}for(var r=function(t){var e=function(){};t in s.prototype&&(e=s.prototype[t]);var i=a.prototype[t];return function(){return Array.prototype.unshift.call(arguments,e),i.apply(this,arguments)}},l=0;l<t.length;l++){var d=t[l];s.prototype[d]=r(d)}return s};var e=function(){this.listeners={}};return e.prototype.on=function(t,e){this.listeners=this.listeners||{},t in this.listeners?this.listeners[t].push(e):this.listeners[t]=[e]},e.prototype.trigger=function(t){var e=Array.prototype.slice,i=e.call(arguments,1);this.listeners=this.listeners||{},null==i&&(i=[]),0===i.length&&i.push({}),(i[0]._type=t)in this.listeners&&this.invoke(this.listeners[t],e.call(arguments,1)),"*"in this.listeners&&this.invoke(this.listeners["*"],arguments)},e.prototype.invoke=function(t,e){for(var i=0,n=t.length;i<n;i++)t[i].apply(this,e)},t.Observable=e,t.generateChars=function(t){for(var e="",i=0;i<t;i++){e+=Math.floor(36*Math.random()).toString(36)}return e},t.bind=function(t,e){return function(){t.apply(e,arguments)}},t._convertData=function(t){for(var e in t){var i=e.split("-"),n=t;if(1!==i.length){for(var a=0;a<i.length;a++){var s=i[a];(s=s.substring(0,1).toLowerCase()+s.substring(1))in n||(n[s]={}),a==i.length-1&&(n[s]=t[e]),n=n[s]}delete t[e]}}return t},t.hasScroll=function(t,e){var i=s(e),n=e.style.overflowX,a=e.style.overflowY;return(n!==a||"hidden"!==a&&"visible"!==a)&&("scroll"===n||"scroll"===a||(i.innerHeight()<e.scrollHeight||i.innerWidth()<e.scrollWidth))},t.escapeMarkup=function(t){var e={"\\":"&#92;","&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#47;"};return"string"!=typeof t?t:String(t).replace(/[&<>"'\/\\]/g,function(t){return e[t]})},t.appendMany=function(t,e){if("1.7"===s.fn.jquery.substr(0,3)){var i=s();s.map(e,function(t){i=i.add(t)}),e=i}t.append(e)},t}),t.define("select2/results",["jquery","./utils"],function(h,t){function n(t,e,i){this.$element=t,this.data=i,this.options=e,n.__super__.constructor.call(this)}return t.Extend(n,t.Observable),n.prototype.render=function(){var t=h('<ul class="select2-results__options" role="tree"></ul>');return this.options.get("multiple")&&t.attr("aria-multiselectable","true"),this.$results=t},n.prototype.clear=function(){this.$results.empty()},n.prototype.displayMessage=function(t){var e=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var i=h('<li role="treeitem" aria-live="assertive" class="select2-results__option"></li>'),n=this.options.get("translations").get(t.message);i.append(e(n(t.args))),i[0].className+=" select2-results__message",this.$results.append(i)},n.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},n.prototype.append=function(t){this.hideLoading();var e=[];if(null!=t.results&&0!==t.results.length){t.results=this.sort(t.results);for(var i=0;i<t.results.length;i++){var n=t.results[i],a=this.option(n);e.push(a)}this.$results.append(e)}else 0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"})},n.prototype.position=function(t,e){e.find(".select2-results").append(t)},n.prototype.sort=function(t){return this.options.get("sorter")(t)},n.prototype.highlightFirstItem=function(){var t=this.$results.find(".select2-results__option[aria-selected]"),e=t.filter("[aria-selected=true]");0<e.length?e.first().trigger("mouseenter"):t.first().trigger("mouseenter"),this.ensureHighlightVisible()},n.prototype.setClasses=function(){var e=this;this.data.current(function(t){var n=h.map(t,function(t){return t.id.toString()});e.$results.find(".select2-results__option[aria-selected]").each(function(){var t=h(this),e=h.data(this,"data"),i=""+e.id;null!=e.element&&e.element.selected||null==e.element&&-1<h.inArray(i,n)?t.attr("aria-selected","true"):t.attr("aria-selected","false")})})},n.prototype.showLoading=function(t){this.hideLoading();var e={disabled:!0,loading:!0,text:this.options.get("translations").get("searching")(t)},i=this.option(e);i.className+=" loading-results",this.$results.prepend(i)},n.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},n.prototype.option=function(t){var e=document.createElement("li");e.className="select2-results__option";var i={role:"treeitem","aria-selected":"false"};for(var n in t.disabled&&(delete i["aria-selected"],i["aria-disabled"]="true"),null==t.id&&delete i["aria-selected"],null!=t._resultId&&(e.id=t._resultId),t.title&&(e.title=t.title),t.children&&(i.role="group",i["aria-label"]=t.text,delete i["aria-selected"]),i){var a=i[n];e.setAttribute(n,a)}if(t.children){var s=h(e),o=document.createElement("strong");o.className="select2-results__group";h(o);this.template(t,o);for(var r=[],l=0;l<t.children.length;l++){var d=t.children[l],c=this.option(d);r.push(c)}var u=h("<ul></ul>",{class:"select2-results__options select2-results__options--nested"});u.append(r),s.append(o),s.append(u)}else this.template(t,e);return h.data(e,"data",t),e},n.prototype.bind=function(e,t){var l=this,i=e.id+"-results";this.$results.attr("id",i),e.on("results:all",function(t){l.clear(),l.append(t.data),e.isOpen()&&(l.setClasses(),l.highlightFirstItem())}),e.on("results:append",function(t){l.append(t.data),e.isOpen()&&l.setClasses()}),e.on("query",function(t){l.hideMessages(),l.showLoading(t)}),e.on("select",function(){e.isOpen()&&(l.setClasses(),l.highlightFirstItem())}),e.on("unselect",function(){e.isOpen()&&(l.setClasses(),l.highlightFirstItem())}),e.on("open",function(){l.$results.attr("aria-expanded","true"),l.$results.attr("aria-hidden","false"),l.setClasses(),l.ensureHighlightVisible()}),e.on("close",function(){l.$results.attr("aria-expanded","false"),l.$results.attr("aria-hidden","true"),l.$results.removeAttr("aria-activedescendant")}),e.on("results:toggle",function(){var t=l.getHighlightedResults();0!==t.length&&t.trigger("mouseup")}),e.on("results:select",function(){var t=l.getHighlightedResults();if(0!==t.length){var e=t.data("data");"true"==t.attr("aria-selected")?l.trigger("close",{}):l.trigger("select",{data:e})}}),e.on("results:previous",function(){var t=l.getHighlightedResults(),e=l.$results.find("[aria-selected]"),i=e.index(t);if(0!==i){var n=i-1;0===t.length&&(n=0);var a=e.eq(n);a.trigger("mouseenter");var s=l.$results.offset().top,o=a.offset().top,r=l.$results.scrollTop()+(o-s);0===n?l.$results.scrollTop(0):o-s<0&&l.$results.scrollTop(r)}}),e.on("results:next",function(){var t=l.getHighlightedResults(),e=l.$results.find("[aria-selected]"),i=e.index(t)+1;if(!(i>=e.length)){var n=e.eq(i);n.trigger("mouseenter");var a=l.$results.offset().top+l.$results.outerHeight(!1),s=n.offset().top+n.outerHeight(!1),o=l.$results.scrollTop()+s-a;0===i?l.$results.scrollTop(0):a<s&&l.$results.scrollTop(o)}}),e.on("results:focus",function(t){t.element.addClass("select2-results__option--highlighted")}),e.on("results:message",function(t){l.displayMessage(t)}),h.fn.mousewheel&&this.$results.on("mousewheel",function(t){var e=l.$results.scrollTop(),i=l.$results.get(0).scrollHeight-e+t.deltaY,n=0<t.deltaY&&e-t.deltaY<=0,a=t.deltaY<0&&i<=l.$results.height();n?(l.$results.scrollTop(0),t.preventDefault(),t.stopPropagation()):a&&(l.$results.scrollTop(l.$results.get(0).scrollHeight-l.$results.height()),t.preventDefault(),t.stopPropagation())}),this.$results.on("mouseup",".select2-results__option[aria-selected]",function(t){var e=h(this),i=e.data("data");"true"!==e.attr("aria-selected")?l.trigger("select",{originalEvent:t,data:i}):l.options.get("multiple")?l.trigger("unselect",{originalEvent:t,data:i}):l.trigger("close",{})}),this.$results.on("mouseenter",".select2-results__option[aria-selected]",function(t){var e=h(this).data("data");l.getHighlightedResults().removeClass("select2-results__option--highlighted"),l.trigger("results:focus",{data:e,element:h(this)})})},n.prototype.getHighlightedResults=function(){return this.$results.find(".select2-results__option--highlighted")},n.prototype.destroy=function(){this.$results.remove()},n.prototype.ensureHighlightVisible=function(){var t=this.getHighlightedResults();if(0!==t.length){var e=this.$results.find("[aria-selected]").index(t),i=this.$results.offset().top,n=t.offset().top,a=this.$results.scrollTop()+(n-i),s=n-i;a-=2*t.outerHeight(!1),e<=2?this.$results.scrollTop(0):(s>this.$results.outerHeight()||s<0)&&this.$results.scrollTop(a)}},n.prototype.template=function(t,e){var i=this.options.get("templateResult"),n=this.options.get("escapeMarkup"),a=i(t,e);null==a?e.style.display="none":"string"==typeof a?e.innerHTML=n(a):h(e).append(a)},n}),t.define("select2/keys",[],function(){return{BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46}}),t.define("select2/selection/base",["jquery","../utils","../keys"],function(i,t,a){function n(t,e){this.$element=t,this.options=e,n.__super__.constructor.call(this)}return t.Extend(n,t.Observable),n.prototype.render=function(){var t=i('<span class="select2-selection" role="combobox" aria-haspopup="true" aria-expanded="false"></span>');return this._tabindex=0,null!=this.$element.data("old-tabindex")?this._tabindex=this.$element.data("old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),t.attr("title",this.$element.attr("title")),t.attr("tabindex",this._tabindex),this.$selection=t},n.prototype.bind=function(t,e){var i=this,n=(t.id,t.id+"-results");this.container=t,this.$selection.on("focus",function(t){i.trigger("focus",t)}),this.$selection.on("blur",function(t){i._handleBlur(t)}),this.$selection.on("keydown",function(t){i.trigger("keypress",t),t.which===a.SPACE&&t.preventDefault()}),t.on("results:focus",function(t){i.$selection.attr("aria-activedescendant",t.data._resultId)}),t.on("selection:update",function(t){i.update(t.data)}),t.on("open",function(){i.$selection.attr("aria-expanded","true"),i.$selection.attr("aria-owns",n),i._attachCloseHandler(t)}),t.on("close",function(){i.$selection.attr("aria-expanded","false"),i.$selection.removeAttr("aria-activedescendant"),i.$selection.removeAttr("aria-owns"),i.$selection.focus(),i._detachCloseHandler(t)}),t.on("enable",function(){i.$selection.attr("tabindex",i._tabindex)}),t.on("disable",function(){i.$selection.attr("tabindex","-1")})},n.prototype._handleBlur=function(t){var e=this;window.setTimeout(function(){document.activeElement==e.$selection[0]||i.contains(e.$selection[0],document.activeElement)||e.trigger("blur",t)},1)},n.prototype._attachCloseHandler=function(t){i(document.body).on("mousedown.select2."+t.id,function(t){var e=i(t.target).closest(".select2");i(".select2.select2-container--open").each(function(){var t=i(this);this!=e[0]&&t.data("element").select2("close")})})},n.prototype._detachCloseHandler=function(t){i(document.body).off("mousedown.select2."+t.id)},n.prototype.position=function(t,e){e.find(".selection").append(t)},n.prototype.destroy=function(){this._detachCloseHandler(this.container)},n.prototype.update=function(t){throw new Error("The `update` method must be defined in child classes.")},n}),t.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(t,e,i,n){function a(){a.__super__.constructor.apply(this,arguments)}return i.Extend(a,e),a.prototype.render=function(){var t=a.__super__.render.call(this);return t.addClass("select2-selection--single"),t.html('<span class="select2-selection__rendered"></span><span class="select2-selection__arrow" role="presentation"><b role="presentation"></b></span>'),t},a.prototype.bind=function(e,t){var i=this;a.__super__.bind.apply(this,arguments);var n=e.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",n),this.$selection.attr("aria-labelledby",n),this.$selection.on("mousedown",function(t){1===t.which&&i.trigger("toggle",{originalEvent:t})}),this.$selection.on("focus",function(t){}),this.$selection.on("blur",function(t){}),e.on("focus",function(t){e.isOpen()||i.$selection.focus()}),e.on("selection:update",function(t){i.update(t.data)})},a.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},a.prototype.display=function(t,e){var i=this.options.get("templateSelection");return this.options.get("escapeMarkup")(i(t,e))},a.prototype.selectionContainer=function(){return t("<span></span>")},a.prototype.update=function(t){if(0!==t.length){var e=t[0],i=this.$selection.find(".select2-selection__rendered"),n=this.display(e,i);i.empty().append(n),i.prop("title",e.title||e.text)}else this.clear()},a}),t.define("select2/selection/multiple",["jquery","./base","../utils"],function(n,t,r){function a(t,e){a.__super__.constructor.apply(this,arguments)}return r.Extend(a,t),a.prototype.render=function(){var t=a.__super__.render.call(this);return t.addClass("select2-selection--multiple"),t.html('<ul class="select2-selection__rendered"></ul>'),t},a.prototype.bind=function(t,e){var i=this;a.__super__.bind.apply(this,arguments),this.$selection.on("click",function(t){i.trigger("toggle",{originalEvent:t})}),this.$selection.on("click",".select2-selection__choice__remove",function(t){if(!i.options.get("disabled")){var e=n(this).parent().data("data");i.trigger("unselect",{originalEvent:t,data:e})}})},a.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},a.prototype.display=function(t,e){var i=this.options.get("templateSelection");return this.options.get("escapeMarkup")(i(t,e))},a.prototype.selectionContainer=function(){return n('<li class="select2-selection__choice"><span class="select2-selection__choice__remove" role="presentation">&times;</span></li>')},a.prototype.update=function(t){if(this.clear(),0!==t.length){for(var e=[],i=0;i<t.length;i++){var n=t[i],a=this.selectionContainer(),s=this.display(n,a);a.append(s),a.prop("title",n.title||n.text),a.data("data",n),e.push(a)}var o=this.$selection.find(".select2-selection__rendered");r.appendMany(o,e)}},a}),t.define("select2/selection/placeholder",["../utils"],function(t){function e(t,e,i){this.placeholder=this.normalizePlaceholder(i.get("placeholder")),t.call(this,e,i)}return e.prototype.normalizePlaceholder=function(t,e){return"string"==typeof e&&(e={id:"",text:e}),e},e.prototype.createPlaceholder=function(t,e){var i=this.selectionContainer();return i.html(this.display(e)),i.addClass("select2-selection__placeholder").removeClass("select2-selection__choice"),i},e.prototype.update=function(t,e){var i=1==e.length&&e[0].id!=this.placeholder.id;if(1<e.length||i)return t.call(this,e);this.clear();var n=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(n)},e}),t.define("select2/selection/allowClear",["jquery","../keys"],function(n,a){function t(){}return t.prototype.bind=function(t,e,i){var n=this;t.call(this,e,i),null==this.placeholder&&this.options.get("debug")&&window.console&&console.error&&console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option."),this.$selection.on("mousedown",".select2-selection__clear",function(t){n._handleClear(t)}),e.on("keypress",function(t){n._handleKeyboardClear(t,e)})},t.prototype._handleClear=function(t,e){if(!this.options.get("disabled")){var i=this.$selection.find(".select2-selection__clear");if(0!==i.length){e.stopPropagation();for(var n=i.data("data"),a=0;a<n.length;a++){var s={data:n[a]};if(this.trigger("unselect",s),s.prevented)return}this.$element.val(this.placeholder.id).trigger("change"),this.trigger("toggle",{})}}},t.prototype._handleKeyboardClear=function(t,e,i){i.isOpen()||e.which!=a.DELETE&&e.which!=a.BACKSPACE||this._handleClear(e)},t.prototype.update=function(t,e){if(t.call(this,e),!(0<this.$selection.find(".select2-selection__placeholder").length||0===e.length)){var i=n('<span class="select2-selection__clear">&times;</span>');i.data("data",e),this.$selection.find(".select2-selection__rendered").prepend(i)}},t}),t.define("select2/selection/search",["jquery","../utils","../keys"],function(n,t,o){function e(t,e,i){t.call(this,e,i)}return e.prototype.render=function(t){var e=n('<li class="select2-search select2-search--inline"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="textbox" aria-autocomplete="list" /></li>');this.$searchContainer=e,this.$search=e.find("input");var i=t.call(this);return this._transferTabIndex(),i},e.prototype.bind=function(t,e,i){var n=this;t.call(this,e,i),e.on("open",function(){n.$search.trigger("focus")}),e.on("close",function(){n.$search.val(""),n.$search.removeAttr("aria-activedescendant"),n.$search.trigger("focus")}),e.on("enable",function(){n.$search.prop("disabled",!1),n._transferTabIndex()}),e.on("disable",function(){n.$search.prop("disabled",!0)}),e.on("focus",function(t){n.$search.trigger("focus")}),e.on("results:focus",function(t){n.$search.attr("aria-activedescendant",t.id)}),this.$selection.on("focusin",".select2-search--inline",function(t){n.trigger("focus",t)}),this.$selection.on("focusout",".select2-search--inline",function(t){n._handleBlur(t)}),this.$selection.on("keydown",".select2-search--inline",function(t){if(t.stopPropagation(),n.trigger("keypress",t),n._keyUpPrevented=t.isDefaultPrevented(),t.which===o.BACKSPACE&&""===n.$search.val()){var e=n.$searchContainer.prev(".select2-selection__choice");if(0<e.length){var i=e.data("data");n.searchRemoveChoice(i),t.preventDefault()}}});var a=document.documentMode,s=a&&a<=11;this.$selection.on("input.searchcheck",".select2-search--inline",function(t){s?n.$selection.off("input.search input.searchcheck"):n.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".select2-search--inline",function(t){if(s&&"input"===t.type)n.$selection.off("input.search input.searchcheck");else{var e=t.which;e!=o.SHIFT&&e!=o.CTRL&&e!=o.ALT&&e!=o.TAB&&n.handleSearch(t)}})},e.prototype._transferTabIndex=function(t){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},e.prototype.createPlaceholder=function(t,e){this.$search.attr("placeholder",e.text)},e.prototype.update=function(t,e){var i=this.$search[0]==document.activeElement;this.$search.attr("placeholder",""),t.call(this,e),this.$selection.find(".select2-selection__rendered").append(this.$searchContainer),this.resizeSearch(),i&&this.$search.focus()},e.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var t=this.$search.val();this.trigger("query",{term:t})}this._keyUpPrevented=!1},e.prototype.searchRemoveChoice=function(t,e){this.trigger("unselect",{data:e}),this.$search.val(e.text),this.handleSearch()},e.prototype.resizeSearch=function(){this.$search.css("width","25px");var t="";""!==this.$search.attr("placeholder")?t=this.$selection.find(".select2-selection__rendered").innerWidth():t=.75*(this.$search.val().length+1)+"em";this.$search.css("width",t)},e}),t.define("select2/selection/eventRelay",["jquery"],function(o){function t(){}return t.prototype.bind=function(t,e,i){var n=this,a=["open","opening","close","closing","select","selecting","unselect","unselecting"],s=["opening","closing","selecting","unselecting"];t.call(this,e,i),e.on("*",function(t,e){if(-1!==o.inArray(t,a)){e=e||{};var i=o.Event("select2:"+t,{params:e});n.$element.trigger(i),-1!==o.inArray(t,s)&&(e.prevented=i.isDefaultPrevented())}})},t}),t.define("select2/translation",["jquery","require"],function(e,i){function n(t){this.dict=t||{}}return n.prototype.all=function(){return this.dict},n.prototype.get=function(t){return this.dict[t]},n.prototype.extend=function(t){this.dict=e.extend({},t.all(),this.dict)},n._cache={},n.loadPath=function(t){if(!(t in n._cache)){var e=i(t);n._cache[t]=e}return new n(n._cache[t])},n}),t.define("select2/diacritics",[],function(){return{"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","C":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ω":"ω","ς":"σ"}}),t.define("select2/data/base",["../utils"],function(n){function i(t,e){i.__super__.constructor.call(this)}return n.Extend(i,n.Observable),i.prototype.current=function(t){throw new Error("The `current` method must be defined in child classes.")},i.prototype.query=function(t,e){throw new Error("The `query` method must be defined in child classes.")},i.prototype.bind=function(t,e){},i.prototype.destroy=function(){},i.prototype.generateResultId=function(t,e){var i=t.id+"-result-";return i+=n.generateChars(4),null!=e.id?i+="-"+e.id.toString():i+="-"+n.generateChars(4),i},i}),t.define("select2/data/select",["./base","../utils","jquery"],function(t,e,r){function i(t,e){this.$element=t,this.options=e,i.__super__.constructor.call(this)}return e.Extend(i,t),i.prototype.current=function(t){var i=[],n=this;this.$element.find(":selected").each(function(){var t=r(this),e=n.item(t);i.push(e)}),t(i)},i.prototype.select=function(a){var s=this;if(a.selected=!0,r(a.element).is("option"))return a.element.selected=!0,void this.$element.trigger("change");if(this.$element.prop("multiple"))this.current(function(t){var e=[];(a=[a]).push.apply(a,t);for(var i=0;i<a.length;i++){var n=a[i].id;-1===r.inArray(n,e)&&e.push(n)}s.$element.val(e),s.$element.trigger("change")});else{var t=a.id;this.$element.val(t),this.$element.trigger("change")}},i.prototype.unselect=function(a){var s=this;if(this.$element.prop("multiple")){if(a.selected=!1,r(a.element).is("option"))return a.element.selected=!1,void this.$element.trigger("change");this.current(function(t){for(var e=[],i=0;i<t.length;i++){var n=t[i].id;n!==a.id&&-1===r.inArray(n,e)&&e.push(n)}s.$element.val(e),s.$element.trigger("change")})}},i.prototype.bind=function(t,e){var i=this;(this.container=t).on("select",function(t){i.select(t.data)}),t.on("unselect",function(t){i.unselect(t.data)})},i.prototype.destroy=function(){this.$element.find("*").each(function(){r.removeData(this,"data")})},i.prototype.query=function(n,t){var a=[],s=this;this.$element.children().each(function(){var t=r(this);if(t.is("option")||t.is("optgroup")){var e=s.item(t),i=s.matches(n,e);null!==i&&a.push(i)}}),t({results:a})},i.prototype.addOptions=function(t){e.appendMany(this.$element,t)},i.prototype.option=function(t){var e;t.children?(e=document.createElement("optgroup")).label=t.text:void 0!==(e=document.createElement("option")).textContent?e.textContent=t.text:e.innerText=t.text,t.id&&(e.value=t.id),t.disabled&&(e.disabled=!0),t.selected&&(e.selected=!0),t.title&&(e.title=t.title);var i=r(e),n=this._normalizeItem(t);return n.element=e,r.data(e,"data",n),i},i.prototype.item=function(t){var e={};if(null!=(e=r.data(t[0],"data")))return e;if(t.is("option"))e={id:t.val(),text:t.text(),disabled:t.prop("disabled"),selected:t.prop("selected"),title:t.prop("title")};else if(t.is("optgroup")){e={text:t.prop("label"),children:[],title:t.prop("title")};for(var i=t.children("option"),n=[],a=0;a<i.length;a++){var s=r(i[a]),o=this.item(s);n.push(o)}e.children=n}return(e=this._normalizeItem(e)).element=t[0],r.data(t[0],"data",e),e},i.prototype._normalizeItem=function(t){r.isPlainObject(t)||(t={id:t,text:t});return null!=(t=r.extend({},{text:""},t)).id&&(t.id=t.id.toString()),null!=t.text&&(t.text=t.text.toString()),null==t._resultId&&t.id&&null!=this.container&&(t._resultId=this.generateResultId(this.container,t)),r.extend({},{selected:!1,disabled:!1},t)},i.prototype.matches=function(t,e){return this.options.get("matcher")(t,e)},i}),t.define("select2/data/array",["./select","../utils","jquery"],function(t,f,m){function n(t,e){var i=e.get("data")||[];n.__super__.constructor.call(this,t,e),this.addOptions(this.convertToOptions(i))}return f.Extend(n,t),n.prototype.select=function(i){var t=this.$element.find("option").filter(function(t,e){return e.value==i.id.toString()});0===t.length&&(t=this.option(i),this.addOptions(t)),n.__super__.select.call(this,i)},n.prototype.convertToOptions=function(t){var e=this,i=this.$element.find("option"),n=i.map(function(){return e.item(m(this)).id}).get(),a=[];function s(t){return function(){return m(this).val()==t.id}}for(var o=0;o<t.length;o++){var r=this._normalizeItem(t[o]);if(0<=m.inArray(r.id,n)){var l=i.filter(s(r)),d=this.item(l),c=m.extend(!0,{},r,d),u=this.option(c);l.replaceWith(u)}else{var h=this.option(r);if(r.children){var p=this.convertToOptions(r.children);f.appendMany(h,p)}a.push(h)}}return a},n}),t.define("select2/data/ajax",["./array","../utils","jquery"],function(t,e,s){function i(t,e){this.ajaxOptions=this._applyDefaults(e.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),i.__super__.constructor.call(this,t,e)}return e.Extend(i,t),i.prototype._applyDefaults=function(t){var e={data:function(t){return s.extend({},t,{q:t.term})},transport:function(t,e,i){var n=s.ajax(t);return n.then(e),n.fail(i),n}};return s.extend({},e,t,!0)},i.prototype.processResults=function(t){return t},i.prototype.query=function(i,n){var a=this;null!=this._request&&(s.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var e=s.extend({type:"GET"},this.ajaxOptions);function t(){var t=e.transport(e,function(t){var e=a.processResults(t,i);a.options.get("debug")&&window.console&&console.error&&(e&&e.results&&s.isArray(e.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),n(e)},function(){t.status&&"0"===t.status||a.trigger("results:message",{message:"errorLoading"})});a._request=t}"function"==typeof e.url&&(e.url=e.url.call(this.$element,i)),"function"==typeof e.data&&(e.data=e.data.call(this.$element,i)),this.ajaxOptions.delay&&null!=i.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(t,this.ajaxOptions.delay)):t()},i}),t.define("select2/data/tags",["jquery"],function(c){function t(t,e,i){var n=i.get("tags"),a=i.get("createTag");void 0!==a&&(this.createTag=a);var s=i.get("insertTag");if(void 0!==s&&(this.insertTag=s),t.call(this,e,i),c.isArray(n))for(var o=0;o<n.length;o++){var r=n[o],l=this._normalizeItem(r),d=this.option(l);this.$element.append(d)}}return t.prototype.query=function(t,d,c){var u=this;this._removeOldTags(),null!=d.term&&null==d.page?t.call(this,d,function t(e,i){for(var n=e.results,a=0;a<n.length;a++){var s=n[a],o=null!=s.children&&!t({results:s.children},!0);if(s.text===d.term||o)return!i&&(e.data=n,void c(e))}if(i)return!0;var r=u.createTag(d);if(null!=r){var l=u.option(r);l.attr("data-select2-tag",!0),u.addOptions([l]),u.insertTag(n,r)}e.results=n,c(e)}):t.call(this,d,c)},t.prototype.createTag=function(t,e){var i=c.trim(e.term);return""===i?null:{id:i,text:i}},t.prototype.insertTag=function(t,e,i){e.unshift(i)},t.prototype._removeOldTags=function(t){this._lastTag;this.$element.find("option[data-select2-tag]").each(function(){this.selected||c(this).remove()})},t}),t.define("select2/data/tokenizer",["jquery"],function(u){function t(t,e,i){var n=i.get("tokenizer");void 0!==n&&(this.tokenizer=n),t.call(this,e,i)}return t.prototype.bind=function(t,e,i){t.call(this,e,i),this.$search=e.dropdown.$search||e.selection.$search||i.find(".select2-search__field")},t.prototype.query=function(t,e,i){var a=this;e.term=e.term||"";var n=this.tokenizer(e,this.options,function(t){var e,i=a._normalizeItem(t);if(!a.$element.find("option").filter(function(){return u(this).val()===i.id}).length){var n=a.option(i);n.attr("data-select2-tag",!0),a._removeOldTags(),a.addOptions([n])}e=i,a.trigger("select",{data:e})});n.term!==e.term&&(this.$search.length&&(this.$search.val(n.term),this.$search.focus()),e.term=n.term),t.call(this,e,i)},t.prototype.tokenizer=function(t,e,i,n){for(var a=i.get("tokenSeparators")||[],s=e.term,o=0,r=this.createTag||function(t){return{id:t.term,text:t.term}};o<s.length;){var l=s[o];if(-1!==u.inArray(l,a)){var d=s.substr(0,o),c=r(u.extend({},e,{term:d}));null!=c?(n(c),s=s.substr(o+1)||"",o=0):o++}else o++}return{term:s}},t}),t.define("select2/data/minimumInputLength",[],function(){function t(t,e,i){this.minimumInputLength=i.get("minimumInputLength"),t.call(this,e,i)}return t.prototype.query=function(t,e,i){e.term=e.term||"",e.term.length<this.minimumInputLength?this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:e.term,params:e}}):t.call(this,e,i)},t}),t.define("select2/data/maximumInputLength",[],function(){function t(t,e,i){this.maximumInputLength=i.get("maximumInputLength"),t.call(this,e,i)}return t.prototype.query=function(t,e,i){e.term=e.term||"",0<this.maximumInputLength&&e.term.length>this.maximumInputLength?this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:e.term,params:e}}):t.call(this,e,i)},t}),t.define("select2/data/maximumSelectionLength",[],function(){function t(t,e,i){this.maximumSelectionLength=i.get("maximumSelectionLength"),t.call(this,e,i)}return t.prototype.query=function(i,n,a){var s=this;this.current(function(t){var e=null!=t?t.length:0;0<s.maximumSelectionLength&&e>=s.maximumSelectionLength?s.trigger("results:message",{message:"maximumSelected",args:{maximum:s.maximumSelectionLength}}):i.call(s,n,a)})},t}),t.define("select2/dropdown",["jquery","./utils"],function(e,t){function i(t,e){this.$element=t,this.options=e,i.__super__.constructor.call(this)}return t.Extend(i,t.Observable),i.prototype.render=function(){var t=e('<span class="select2-dropdown"><span class="select2-results"></span></span>');return t.attr("dir",this.options.get("dir")),this.$dropdown=t},i.prototype.bind=function(){},i.prototype.position=function(t,e){},i.prototype.destroy=function(){this.$dropdown.remove()},i}),t.define("select2/dropdown/search",["jquery","../utils"],function(a,t){function e(){}return e.prototype.render=function(t){var e=t.call(this),i=a('<span class="select2-search select2-search--dropdown"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="textbox" /></span>');return this.$searchContainer=i,this.$search=i.find("input"),e.prepend(i),e},e.prototype.bind=function(t,e,i){var n=this;t.call(this,e,i),this.$search.on("keydown",function(t){n.trigger("keypress",t),n._keyUpPrevented=t.isDefaultPrevented()}),this.$search.on("input",function(t){a(this).off("keyup")}),this.$search.on("keyup input",function(t){n.handleSearch(t)}),e.on("open",function(){n.$search.attr("tabindex",0),n.$search.focus(),window.setTimeout(function(){n.$search.focus()},0)}),e.on("close",function(){n.$search.attr("tabindex",-1),n.$search.val("")}),e.on("focus",function(){e.isOpen()&&n.$search.focus()}),e.on("results:all",function(t){null!=t.query.term&&""!==t.query.term||(n.showSearch(t)?n.$searchContainer.removeClass("select2-search--hide"):n.$searchContainer.addClass("select2-search--hide"))})},e.prototype.handleSearch=function(t){if(!this._keyUpPrevented){var e=this.$search.val();this.trigger("query",{term:e})}this._keyUpPrevented=!1},e.prototype.showSearch=function(t,e){return!0},e}),t.define("select2/dropdown/hidePlaceholder",[],function(){function t(t,e,i,n){this.placeholder=this.normalizePlaceholder(i.get("placeholder")),t.call(this,e,i,n)}return t.prototype.append=function(t,e){e.results=this.removePlaceholder(e.results),t.call(this,e)},t.prototype.normalizePlaceholder=function(t,e){return"string"==typeof e&&(e={id:"",text:e}),e},t.prototype.removePlaceholder=function(t,e){for(var i=e.slice(0),n=e.length-1;0<=n;n--){var a=e[n];this.placeholder.id===a.id&&i.splice(n,1)}return i},t}),t.define("select2/dropdown/infiniteScroll",["jquery"],function(a){function t(t,e,i,n){this.lastParams={},t.call(this,e,i,n),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return t.prototype.append=function(t,e){this.$loadingMore.remove(),this.loading=!1,t.call(this,e),this.showLoadingMore(e)&&this.$results.append(this.$loadingMore)},t.prototype.bind=function(t,e,i){var n=this;t.call(this,e,i),e.on("query",function(t){n.lastParams=t,n.loading=!0}),e.on("query:append",function(t){n.lastParams=t,n.loading=!0}),this.$results.on("scroll",function(){var t=a.contains(document.documentElement,n.$loadingMore[0]);if(!n.loading&&t){var e=n.$results.offset().top+n.$results.outerHeight(!1);n.$loadingMore.offset().top+n.$loadingMore.outerHeight(!1)<=e+50&&n.loadMore()}})},t.prototype.loadMore=function(){this.loading=!0;var t=a.extend({},{page:1},this.lastParams);t.page++,this.trigger("query:append",t)},t.prototype.showLoadingMore=function(t,e){return e.pagination&&e.pagination.more},t.prototype.createLoadingMore=function(){var t=a('<li class="select2-results__option select2-results__option--load-more"role="treeitem" aria-disabled="true"></li>'),e=this.options.get("translations").get("loadingMore");return t.html(e(this.lastParams)),t},t}),t.define("select2/dropdown/attachBody",["jquery","../utils"],function(f,r){function t(t,e,i){this.$dropdownParent=i.get("dropdownParent")||f(document.body),t.call(this,e,i)}return t.prototype.bind=function(t,e,i){var n=this,a=!1;t.call(this,e,i),e.on("open",function(){n._showDropdown(),n._attachPositioningHandler(e),a||(a=!0,e.on("results:all",function(){n._positionDropdown(),n._resizeDropdown()}),e.on("results:append",function(){n._positionDropdown(),n._resizeDropdown()}))}),e.on("close",function(){n._hideDropdown(),n._detachPositioningHandler(e)}),this.$dropdownContainer.on("mousedown",function(t){t.stopPropagation()})},t.prototype.destroy=function(t){t.call(this),this.$dropdownContainer.remove()},t.prototype.position=function(t,e,i){e.attr("class",i.attr("class")),e.removeClass("select2"),e.addClass("select2-container--open"),e.css({position:"absolute",top:-999999}),this.$container=i},t.prototype.render=function(t){var e=f("<span></span>"),i=t.call(this);return e.append(i),this.$dropdownContainer=e},t.prototype._hideDropdown=function(t){this.$dropdownContainer.detach()},t.prototype._attachPositioningHandler=function(t,e){var i=this,n="scroll.select2."+e.id,a="resize.select2."+e.id,s="orientationchange.select2."+e.id,o=this.$container.parents().filter(r.hasScroll);o.each(function(){f(this).data("select2-scroll-position",{x:f(this).scrollLeft(),y:f(this).scrollTop()})}),o.on(n,function(t){var e=f(this).data("select2-scroll-position");f(this).scrollTop(e.y)}),f(window).on(n+" "+a+" "+s,function(t){i._positionDropdown(),i._resizeDropdown()})},t.prototype._detachPositioningHandler=function(t,e){var i="scroll.select2."+e.id,n="resize.select2."+e.id,a="orientationchange.select2."+e.id;this.$container.parents().filter(r.hasScroll).off(i),f(window).off(i+" "+n+" "+a)},t.prototype._positionDropdown=function(){var t=f(window),e=this.$dropdown.hasClass("select2-dropdown--above"),i=this.$dropdown.hasClass("select2-dropdown--below"),n=null,a=this.$container.offset();a.bottom=a.top+this.$container.outerHeight(!1);var s={height:this.$container.outerHeight(!1)};s.top=a.top,s.bottom=a.top+s.height;var o=this.$dropdown.outerHeight(!1),r=t.scrollTop(),l=t.scrollTop()+t.height(),d=r<a.top-o,c=l>a.bottom+o,u={left:a.left,top:s.bottom},h=this.$dropdownParent;"static"===h.css("position")&&(h=h.offsetParent());var p=h.offset();u.top-=p.top,u.left-=p.left,e||i||(n="below"),c||!d||e?!d&&c&&e&&(n="below"):n="above",("above"==n||e&&"below"!==n)&&(u.top=s.top-p.top-o),null!=n&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+n),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+n)),this.$dropdownContainer.css(u)},t.prototype._resizeDropdown=function(){var t={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(t.minWidth=t.width,t.position="relative",t.width="auto"),this.$dropdown.css(t)},t.prototype._showDropdown=function(t){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},t}),t.define("select2/dropdown/minimumResultsForSearch",[],function(){function t(t,e,i,n){this.minimumResultsForSearch=i.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),t.call(this,e,i,n)}return t.prototype.showSearch=function(t,e){return!(function t(e){for(var i=0,n=0;n<e.length;n++){var a=e[n];a.children?i+=t(a.children):i++}return i}(e.data.results)<this.minimumResultsForSearch)&&t.call(this,e)},t}),t.define("select2/dropdown/selectOnClose",[],function(){function t(){}return t.prototype.bind=function(t,e,i){var n=this;t.call(this,e,i),e.on("close",function(t){n._handleSelectOnClose(t)})},t.prototype._handleSelectOnClose=function(t,e){if(e&&null!=e.originalSelect2Event){var i=e.originalSelect2Event;if("select"===i._type||"unselect"===i._type)return}var n=this.getHighlightedResults();if(!(n.length<1)){var a=n.data("data");null!=a.element&&a.element.selected||null==a.element&&a.selected||this.trigger("select",{data:a})}},t}),t.define("select2/dropdown/closeOnSelect",[],function(){function t(){}return t.prototype.bind=function(t,e,i){var n=this;t.call(this,e,i),e.on("select",function(t){n._selectTriggered(t)}),e.on("unselect",function(t){n._selectTriggered(t)})},t.prototype._selectTriggered=function(t,e){var i=e.originalEvent;i&&i.ctrlKey||this.trigger("close",{originalEvent:i,originalSelect2Event:e})},t}),t.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(t){var e=t.input.length-t.maximum,i="Please delete "+e+" character";return 1!=e&&(i+="s"),i},inputTooShort:function(t){return"Please enter "+(t.minimum-t.input.length)+" or more characters"},loadingMore:function(){return"Loading more results…"},maximumSelected:function(t){var e="You can only select "+t.maximum+" item";return 1!=t.maximum&&(e+="s"),e},noResults:function(){return"No results found"},searching:function(){return"Searching…"}}}),t.define("select2/defaults",["jquery","require","./results","./selection/single","./selection/multiple","./selection/placeholder","./selection/allowClear","./selection/search","./selection/eventRelay","./utils","./translation","./diacritics","./data/select","./data/array","./data/ajax","./data/tags","./data/tokenizer","./data/minimumInputLength","./data/maximumInputLength","./data/maximumSelectionLength","./dropdown","./dropdown/search","./dropdown/hidePlaceholder","./dropdown/infiniteScroll","./dropdown/attachBody","./dropdown/minimumResultsForSearch","./dropdown/selectOnClose","./dropdown/closeOnSelect","./i18n/en"],function(f,m,g,v,b,y,w,x,k,C,_,e,S,P,A,M,D,T,I,E,L,O,F,B,R,$,N,z,t){function i(){this.reset()}return i.prototype.apply=function(e){if(null==(e=f.extend(!0,{},this.defaults,e)).dataAdapter){if(null!=e.ajax?e.dataAdapter=A:null!=e.data?e.dataAdapter=P:e.dataAdapter=S,0<e.minimumInputLength&&(e.dataAdapter=C.Decorate(e.dataAdapter,T)),0<e.maximumInputLength&&(e.dataAdapter=C.Decorate(e.dataAdapter,I)),0<e.maximumSelectionLength&&(e.dataAdapter=C.Decorate(e.dataAdapter,E)),e.tags&&(e.dataAdapter=C.Decorate(e.dataAdapter,M)),null==e.tokenSeparators&&null==e.tokenizer||(e.dataAdapter=C.Decorate(e.dataAdapter,D)),null!=e.query){var t=m(e.amdBase+"compat/query");e.dataAdapter=C.Decorate(e.dataAdapter,t)}if(null!=e.initSelection){var i=m(e.amdBase+"compat/initSelection");e.dataAdapter=C.Decorate(e.dataAdapter,i)}}if(null==e.resultsAdapter&&(e.resultsAdapter=g,null!=e.ajax&&(e.resultsAdapter=C.Decorate(e.resultsAdapter,B)),null!=e.placeholder&&(e.resultsAdapter=C.Decorate(e.resultsAdapter,F)),e.selectOnClose&&(e.resultsAdapter=C.Decorate(e.resultsAdapter,N))),null==e.dropdownAdapter){if(e.multiple)e.dropdownAdapter=L;else{var n=C.Decorate(L,O);e.dropdownAdapter=n}if(0!==e.minimumResultsForSearch&&(e.dropdownAdapter=C.Decorate(e.dropdownAdapter,$)),e.closeOnSelect&&(e.dropdownAdapter=C.Decorate(e.dropdownAdapter,z)),null!=e.dropdownCssClass||null!=e.dropdownCss||null!=e.adaptDropdownCssClass){var a=m(e.amdBase+"compat/dropdownCss");e.dropdownAdapter=C.Decorate(e.dropdownAdapter,a)}e.dropdownAdapter=C.Decorate(e.dropdownAdapter,R)}if(null==e.selectionAdapter){if(e.multiple?e.selectionAdapter=b:e.selectionAdapter=v,null!=e.placeholder&&(e.selectionAdapter=C.Decorate(e.selectionAdapter,y)),e.allowClear&&(e.selectionAdapter=C.Decorate(e.selectionAdapter,w)),e.multiple&&(e.selectionAdapter=C.Decorate(e.selectionAdapter,x)),null!=e.containerCssClass||null!=e.containerCss||null!=e.adaptContainerCssClass){var s=m(e.amdBase+"compat/containerCss");e.selectionAdapter=C.Decorate(e.selectionAdapter,s)}e.selectionAdapter=C.Decorate(e.selectionAdapter,k)}if("string"==typeof e.language)if(0<e.language.indexOf("-")){var o=e.language.split("-")[0];e.language=[e.language,o]}else e.language=[e.language];if(f.isArray(e.language)){var r=new _;e.language.push("en");for(var l=e.language,d=0;d<l.length;d++){var c=l[d],u={};try{u=_.loadPath(c)}catch(t){try{c=this.defaults.amdLanguageBase+c,u=_.loadPath(c)}catch(t){e.debug&&window.console&&console.warn&&console.warn('Select2: The language file for "'+c+'" could not be automatically loaded. A fallback will be used instead.');continue}}r.extend(u)}e.translations=r}else{var h=_.loadPath(this.defaults.amdLanguageBase+"en"),p=new _(e.language);p.extend(h),e.translations=p}return e},i.prototype.reset=function(){function r(t){return t.replace(/[^\u0000-\u007E]/g,function(t){return e[t]||t})}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:C.escapeMarkup,language:t,matcher:function t(e,i){if(""===f.trim(e.term))return i;if(i.children&&0<i.children.length){for(var n=f.extend(!0,{},i),a=i.children.length-1;0<=a;a--)null==t(e,i.children[a])&&n.children.splice(a,1);return 0<n.children.length?n:t(e,n)}var s=r(i.text).toUpperCase(),o=r(e.term).toUpperCase();return-1<s.indexOf(o)?i:null},minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,sorter:function(t){return t},templateResult:function(t){return t.text},templateSelection:function(t){return t.text},theme:"default",width:"resolve"}},i.prototype.set=function(t,e){var i={};i[f.camelCase(t)]=e;var n=C._convertData(i);f.extend(this.defaults,n)},new i}),t.define("select2/options",["require","jquery","./defaults","./utils"],function(n,s,a,o){function t(t,e){if(this.options=t,null!=e&&this.fromElement(e),this.options=a.apply(this.options),e&&e.is("input")){var i=n(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=o.Decorate(this.options.dataAdapter,i)}}return t.prototype.fromElement=function(t){var e=["select2"];null==this.options.multiple&&(this.options.multiple=t.prop("multiple")),null==this.options.disabled&&(this.options.disabled=t.prop("disabled")),null==this.options.language&&(t.prop("lang")?this.options.language=t.prop("lang").toLowerCase():t.closest("[lang]").prop("lang")&&(this.options.language=t.closest("[lang]").prop("lang"))),null==this.options.dir&&(t.prop("dir")?this.options.dir=t.prop("dir"):t.closest("[dir]").prop("dir")?this.options.dir=t.closest("[dir]").prop("dir"):this.options.dir="ltr"),t.prop("disabled",this.options.disabled),t.prop("multiple",this.options.multiple),t.data("select2Tags")&&(this.options.debug&&window.console&&console.warn&&console.warn('Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.'),t.data("data",t.data("select2Tags")),t.data("tags",!0)),t.data("ajaxUrl")&&(this.options.debug&&window.console&&console.warn&&console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2."),t.attr("ajax--url",t.data("ajaxUrl")),t.data("ajax--url",t.data("ajaxUrl")));var i={};i=s.fn.jquery&&"1."==s.fn.jquery.substr(0,2)&&t[0].dataset?s.extend(!0,{},t[0].dataset,t.data()):t.data();var n=s.extend(!0,{},i);for(var a in n=o._convertData(n))-1<s.inArray(a,e)||(s.isPlainObject(this.options[a])?s.extend(this.options[a],n[a]):this.options[a]=n[a]);return this},t.prototype.get=function(t){return this.options[t]},t.prototype.set=function(t,e){this.options[t]=e},t}),t.define("select2/core",["jquery","./options","./utils","./keys"],function(a,d,i,n){var c=function(t,e){null!=t.data("select2")&&t.data("select2").destroy(),this.$element=t,this.id=this._generateId(t),e=e||{},this.options=new d(e,t),c.__super__.constructor.call(this);var i=t.attr("tabindex")||0;t.data("old-tabindex",i),t.attr("tabindex","-1");var n=this.options.get("dataAdapter");this.dataAdapter=new n(t,this.options);var a=this.render();this._placeContainer(a);var s=this.options.get("selectionAdapter");this.selection=new s(t,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,a);var o=this.options.get("dropdownAdapter");this.dropdown=new o(t,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,a);var r=this.options.get("resultsAdapter");this.results=new r(t,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var l=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(t){l.trigger("selection:update",{data:t})}),t.addClass("select2-hidden-accessible"),t.attr("aria-hidden","true"),this._syncAttributes(),t.data("select2",this)};return i.Extend(c,i.Observable),c.prototype._generateId=function(t){return"select2-"+(null!=t.attr("id")?t.attr("id"):null!=t.attr("name")?t.attr("name")+"-"+i.generateChars(2):i.generateChars(4)).replace(/(:|\.|\[|\]|,)/g,"")},c.prototype._placeContainer=function(t){t.insertAfter(this.$element);var e=this._resolveWidth(this.$element,this.options.get("width"));null!=e&&t.css("width",e)},c.prototype._resolveWidth=function(t,e){var i=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==e){var n=this._resolveWidth(t,"style");return null!=n?n:this._resolveWidth(t,"element")}if("element"==e){var a=t.outerWidth(!1);return a<=0?"auto":a+"px"}if("style"!=e)return e;var s=t.attr("style");if("string"!=typeof s)return null;for(var o=s.split(";"),r=0,l=o.length;r<l;r+=1){var d=o[r].replace(/\s/g,"").match(i);if(null!==d&&1<=d.length)return d[1]}return null},c.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},c.prototype._registerDomEvents=function(){var e=this;this.$element.on("change.select2",function(){e.dataAdapter.current(function(t){e.trigger("selection:update",{data:t})})}),this.$element.on("focus.select2",function(t){e.trigger("focus",t)}),this._syncA=i.bind(this._syncAttributes,this),this._syncS=i.bind(this._syncSubtree,this),this.$element[0].attachEvent&&this.$element[0].attachEvent("onpropertychange",this._syncA);var t=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=t?(this._observer=new t(function(t){a.each(t,e._syncA),a.each(t,e._syncS)}),this._observer.observe(this.$element[0],{attributes:!0,childList:!0,subtree:!1})):this.$element[0].addEventListener&&(this.$element[0].addEventListener("DOMAttrModified",e._syncA,!1),this.$element[0].addEventListener("DOMNodeInserted",e._syncS,!1),this.$element[0].addEventListener("DOMNodeRemoved",e._syncS,!1))},c.prototype._registerDataEvents=function(){var i=this;this.dataAdapter.on("*",function(t,e){i.trigger(t,e)})},c.prototype._registerSelectionEvents=function(){var i=this,n=["toggle","focus"];this.selection.on("toggle",function(){i.toggleDropdown()}),this.selection.on("focus",function(t){i.focus(t)}),this.selection.on("*",function(t,e){-1===a.inArray(t,n)&&i.trigger(t,e)})},c.prototype._registerDropdownEvents=function(){var i=this;this.dropdown.on("*",function(t,e){i.trigger(t,e)})},c.prototype._registerResultsEvents=function(){var i=this;this.results.on("*",function(t,e){i.trigger(t,e)})},c.prototype._registerEvents=function(){var i=this;this.on("open",function(){i.$container.addClass("select2-container--open")}),this.on("close",function(){i.$container.removeClass("select2-container--open")}),this.on("enable",function(){i.$container.removeClass("select2-container--disabled")}),this.on("disable",function(){i.$container.addClass("select2-container--disabled")}),this.on("blur",function(){i.$container.removeClass("select2-container--focus")}),this.on("query",function(e){i.isOpen()||i.trigger("open",{}),this.dataAdapter.query(e,function(t){i.trigger("results:all",{data:t,query:e})})}),this.on("query:append",function(e){this.dataAdapter.query(e,function(t){i.trigger("results:append",{data:t,query:e})})}),this.on("keypress",function(t){var e=t.which;i.isOpen()?e===n.ESC||e===n.TAB||e===n.UP&&t.altKey?(i.close(),t.preventDefault()):e===n.ENTER?(i.trigger("results:select",{}),t.preventDefault()):e===n.SPACE&&t.ctrlKey?(i.trigger("results:toggle",{}),t.preventDefault()):e===n.UP?(i.trigger("results:previous",{}),t.preventDefault()):e===n.DOWN&&(i.trigger("results:next",{}),t.preventDefault()):(e===n.ENTER||e===n.SPACE||e===n.DOWN&&t.altKey)&&(i.open(),t.preventDefault())})},c.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.options.get("disabled")?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},c.prototype._syncSubtree=function(t,e){var i=!1,n=this;if(!t||!t.target||"OPTION"===t.target.nodeName||"OPTGROUP"===t.target.nodeName){if(e)if(e.addedNodes&&0<e.addedNodes.length)for(var a=0;a<e.addedNodes.length;a++){e.addedNodes[a].selected&&(i=!0)}else e.removedNodes&&0<e.removedNodes.length&&(i=!0);else i=!0;i&&this.dataAdapter.current(function(t){n.trigger("selection:update",{data:t})})}},c.prototype.trigger=function(t,e){var i=c.__super__.trigger,n={open:"opening",close:"closing",select:"selecting",unselect:"unselecting"};if(void 0===e&&(e={}),t in n){var a=n[t],s={prevented:!1,name:t,args:e};if(i.call(this,a,s),s.prevented)return void(e.prevented=!0)}i.call(this,t,e)},c.prototype.toggleDropdown=function(){this.options.get("disabled")||(this.isOpen()?this.close():this.open())},c.prototype.open=function(){this.isOpen()||this.trigger("query",{})},c.prototype.close=function(){this.isOpen()&&this.trigger("close",{})},c.prototype.isOpen=function(){return this.$container.hasClass("select2-container--open")},c.prototype.hasFocus=function(){return this.$container.hasClass("select2-container--focus")},c.prototype.focus=function(t){this.hasFocus()||(this.$container.addClass("select2-container--focus"),this.trigger("focus",{}))},c.prototype.enable=function(t){this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.'),null!=t&&0!==t.length||(t=[!0]);var e=!t[0];this.$element.prop("disabled",e)},c.prototype.data=function(){this.options.get("debug")&&0<arguments.length&&window.console&&console.warn&&console.warn('Select2: Data can no longer be set using `select2("data")`. You should consider setting the value instead using `$element.val()`.');var e=[];return this.dataAdapter.current(function(t){e=t}),e},c.prototype.val=function(t){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'),null==t||0===t.length)return this.$element.val();var e=t[0];a.isArray(e)&&(e=a.map(e,function(t){return t.toString()})),this.$element.val(e).trigger("change")},c.prototype.destroy=function(){this.$container.remove(),this.$element[0].detachEvent&&this.$element[0].detachEvent("onpropertychange",this._syncA),null!=this._observer?(this._observer.disconnect(),this._observer=null):this.$element[0].removeEventListener&&(this.$element[0].removeEventListener("DOMAttrModified",this._syncA,!1),this.$element[0].removeEventListener("DOMNodeInserted",this._syncS,!1),this.$element[0].removeEventListener("DOMNodeRemoved",this._syncS,!1)),this._syncA=null,this._syncS=null,this.$element.off(".select2"),this.$element.attr("tabindex",this.$element.data("old-tabindex")),this.$element.removeClass("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),this.$element.removeData("select2"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null},c.prototype.render=function(){var t=a('<span class="select2 select2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>');return t.attr("dir",this.options.get("dir")),this.$container=t,this.$container.addClass("select2-container--"+this.options.get("theme")),t.data("element",this.$element),t},c}),t.define("jquery-mousewheel",["jquery"],function(t){return t}),t.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults"],function(a,t,s,e){if(null==a.fn.select2){var o=["open","close","destroy"];a.fn.select2=function(e){if("object"==typeof(e=e||{}))return this.each(function(){var t=a.extend(!0,{},e);new s(a(this),t)}),this;if("string"!=typeof e)throw new Error("Invalid arguments for Select2: "+e);var i,n=Array.prototype.slice.call(arguments,1);return this.each(function(){var t=a(this).data("select2");null==t&&window.console&&console.error&&console.error("The select2('"+e+"') method was called on an element that is not using Select2."),i=t[e].apply(t,n)}),-1<a.inArray(e,o)?this:i}}return null==a.fn.select2.defaults&&(a.fn.select2.defaults=e),s}),{define:t.define,require:t.require}}(),e=t.require("jquery.select2");return i.fn.select2.amd=t,e}),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.moment=e()}(this,function(){"use strict";var t,n;function h(){return t.apply(null,arguments)}function r(t){return t instanceof Array||"[object Array]"===Object.prototype.toString.call(t)}function l(t){return t instanceof Date||"[object Date]"===Object.prototype.toString.call(t)}function d(t,e){var i,n=[];for(i=0;i<t.length;++i)n.push(e(t[i],i));return n}function p(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function c(t,e){for(var i in e)p(e,i)&&(t[i]=e[i]);return p(e,"toString")&&(t.toString=e.toString),p(e,"valueOf")&&(t.valueOf=e.valueOf),t}function u(t,e,i,n){return re(t,e,i,n,!0).utc()}function f(t){return null==t._pf&&(t._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null}),t._pf}function m(t){if(null==t._isValid){var e=f(t),i=n.call(e.parsedDateParts,function(t){return null!=t});t._isValid=!isNaN(t._d.getTime())&&e.overflow<0&&!e.empty&&!e.invalidMonth&&!e.invalidWeekday&&!e.nullInput&&!e.invalidFormat&&!e.userInvalidated&&(!e.meridiem||e.meridiem&&i),t._strict&&(t._isValid=t._isValid&&0===e.charsLeftOver&&0===e.unusedTokens.length&&void 0===e.bigHour)}return t._isValid}function g(t){var e=u(NaN);return null!=t?c(f(e),t):f(e).userInvalidated=!0,e}function s(t){return void 0===t}n=Array.prototype.some?Array.prototype.some:function(t){for(var e=Object(this),i=e.length>>>0,n=0;n<i;n++)if(n in e&&t.call(this,e[n],n,e))return!0;return!1};var o=h.momentProperties=[];function v(t,e){var i,n,a;if(s(e._isAMomentObject)||(t._isAMomentObject=e._isAMomentObject),s(e._i)||(t._i=e._i),s(e._f)||(t._f=e._f),s(e._l)||(t._l=e._l),s(e._strict)||(t._strict=e._strict),s(e._tzm)||(t._tzm=e._tzm),s(e._isUTC)||(t._isUTC=e._isUTC),s(e._offset)||(t._offset=e._offset),s(e._pf)||(t._pf=f(e)),s(e._locale)||(t._locale=e._locale),0<o.length)for(i in o)s(a=e[n=o[i]])||(t[n]=a);return t}var e=!1;function b(t){v(this,t),this._d=new Date(null!=t._d?t._d.getTime():NaN),!1===e&&(e=!0,h.updateOffset(this),e=!1)}function y(t){return t instanceof b||null!=t&&null!=t._isAMomentObject}function w(t){return t<0?Math.ceil(t):Math.floor(t)}function x(t){var e=+t,i=0;return 0!==e&&isFinite(e)&&(i=w(e)),i}function k(t,e,i){var n,a=Math.min(t.length,e.length),s=Math.abs(t.length-e.length),o=0;for(n=0;n<a;n++)(i&&t[n]!==e[n]||!i&&x(t[n])!==x(e[n]))&&o++;return o+s}function a(t){!1===h.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+t)}function i(t,e){var i=!0;return c(function(){return null!=h.deprecationHandler&&h.deprecationHandler(null,t),i&&(a(t+"\nArguments: "+Array.prototype.slice.call(arguments).join(", ")+"\n"+(new Error).stack),i=!1),e.apply(this,arguments)},e)}var C,_={};function S(t,e){null!=h.deprecationHandler&&h.deprecationHandler(t,e),_[t]||(a(e),_[t]=!0)}function P(t){return t instanceof Function||"[object Function]"===Object.prototype.toString.call(t)}function A(t){return"[object Object]"===Object.prototype.toString.call(t)}function M(t,e){var i,n=c({},t);for(i in e)p(e,i)&&(A(t[i])&&A(e[i])?(n[i]={},c(n[i],t[i]),c(n[i],e[i])):null!=e[i]?n[i]=e[i]:delete n[i]);return n}function D(t){null!=t&&this.set(t)}h.suppressDeprecationWarnings=!1,h.deprecationHandler=null,C=Object.keys?Object.keys:function(t){var e,i=[];for(e in t)p(t,e)&&i.push(e);return i};var T,I={};function E(t){return t?t.toLowerCase().replace("_","-"):t}function L(t){var e=null;if(!I[t]&&"undefined"!=typeof module&&module&&module.exports)try{e=T._abbr,require("./locale/"+t),O(e)}catch(t){}return I[t]}function O(t,e){var i;return t&&(i=s(e)?B(t):F(t,e))&&(T=i),T._abbr}function F(t,e){return null!==e?(e.abbr=t,null!=I[t]?(S("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale"),e=M(I[t]._config,e)):null!=e.parentLocale&&(null!=I[e.parentLocale]?e=M(I[e.parentLocale]._config,e):S("parentLocaleUndefined","specified parentLocale is not defined yet")),I[t]=new D(e),O(t),I[t]):(delete I[t],null)}function B(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return T;if(!r(t)){if(e=L(t))return e;t=[t]}return function(t){for(var e,i,n,a,s=0;s<t.length;){for(e=(a=E(t[s]).split("-")).length,i=(i=E(t[s+1]))?i.split("-"):null;0<e;){if(n=L(a.slice(0,e).join("-")))return n;if(i&&i.length>=e&&k(a,i,!0)>=e-1)break;e--}s++}return null}(t)}var R={};function $(t,e){var i=t.toLowerCase();R[i]=R[i+"s"]=R[e]=t}function N(t){return"string"==typeof t?R[t]||R[t.toLowerCase()]:void 0}function z(t){var e,i,n={};for(i in t)p(t,i)&&(e=N(i))&&(n[e]=t[i]);return n}function j(e,i){return function(t){return null!=t?(Y(this,e,t),h.updateOffset(this,i),this):H(this,e)}}function H(t,e){return t.isValid()?t._d["get"+(t._isUTC?"UTC":"")+e]():NaN}function Y(t,e,i){t.isValid()&&t._d["set"+(t._isUTC?"UTC":"")+e](i)}function q(t,e){var i;if("object"==typeof t)for(i in t)this.set(i,t[i]);else if(P(this[t=N(t)]))return this[t](e);return this}function W(t,e,i){var n=""+Math.abs(t),a=e-n.length;return(0<=t?i?"+":"":"-")+Math.pow(10,Math.max(0,a)).toString().substr(1)+n}var U=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,Q=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,V={},G={};function K(t,e,i,n){var a=n;"string"==typeof n&&(a=function(){return this[n]()}),t&&(G[t]=a),e&&(G[e[0]]=function(){return W(a.apply(this,arguments),e[1],e[2])}),i&&(G[i]=function(){return this.localeData().ordinal(a.apply(this,arguments),t)})}function J(t,e){return t.isValid()?(e=Z(e,t.localeData()),V[e]=V[e]||function(n){var t,a,e,s=n.match(U);for(t=0,a=s.length;t<a;t++)G[s[t]]?s[t]=G[s[t]]:s[t]=(e=s[t]).match(/\[[\s\S]/)?e.replace(/^\[|\]#x2F;g,""):e.replace(/\\/g,"");return function(t){var e,i="";for(e=0;e<a;e++)i+=s[e]instanceof Function?s[e].call(t,n):s[e];return i}}(e),V[e](t)):t.localeData().invalidDate()}function Z(t,e){var i=5;function n(t){return e.longDateFormat(t)||t}for(Q.lastIndex=0;0<=i&&Q.test(t);)t=t.replace(Q,n),Q.lastIndex=0,i-=1;return t}var X=/\d/,tt=/\d\d/,et=/\d{3}/,it=/\d{4}/,nt=/[+-]?\d{6}/,at=/\d\d?/,st=/\d\d\d\d?/,ot=/\d\d\d\d\d\d?/,rt=/\d{1,3}/,lt=/\d{1,4}/,dt=/[+-]?\d{1,6}/,ct=/\d+/,ut=/[+-]?\d+/,ht=/Z|[+-]\d\d:?\d\d/gi,pt=/Z|[+-]\d\d(?::?\d\d)?/gi,ft=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,mt={};function gt(t,i,n){mt[t]=P(i)?i:function(t,e){return t&&n?n:i}}function vt(t,e){return p(mt,t)?mt[t](e._strict,e._locale):new RegExp(bt(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,e,i,n,a){return e||i||n||a})))}function bt(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\amp;")}var yt={};function wt(t,i){var e,n=i;for("string"==typeof t&&(t=[t]),"number"==typeof i&&(n=function(t,e){e[i]=x(t)}),e=0;e<t.length;e++)yt[t[e]]=n}function xt(t,a){wt(t,function(t,e,i,n){i._w=i._w||{},a(t,i._w,i,n)})}var kt,Ct=0,_t=1,St=2,Pt=3,At=4,Mt=5,Dt=6,Tt=7,It=8;function Et(t,e){return new Date(Date.UTC(t,e+1,0)).getUTCDate()}kt=Array.prototype.indexOf?Array.prototype.indexOf:function(t){var e;for(e=0;e<this.length;++e)if(this[e]===t)return e;return-1},K("M",["MM",2],"Mo",function(){return this.month()+1}),K("MMM",0,0,function(t){return this.localeData().monthsShort(this,t)}),K("MMMM",0,0,function(t){return this.localeData().months(this,t)}),$("month","M"),gt("M",at),gt("MM",at,tt),gt("MMM",function(t,e){return e.monthsShortRegex(t)}),gt("MMMM",function(t,e){return e.monthsRegex(t)}),wt(["M","MM"],function(t,e){e[_t]=x(t)-1}),wt(["MMM","MMMM"],function(t,e,i,n){var a=i._locale.monthsParse(t,n,i._strict);null!=a?e[_t]=a:f(i).invalidMonth=t});var Lt=/D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/,Ot="January_February_March_April_May_June_July_August_September_October_November_December".split("_");var Ft="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_");function Bt(t,e){var i;if(!t.isValid())return t;if("string"==typeof e)if(/^\d+#x2F;.test(e))e=x(e);else if("number"!=typeof(e=t.localeData().monthsParse(e)))return t;return i=Math.min(t.date(),Et(t.year(),e)),t._d["set"+(t._isUTC?"UTC":"")+"Month"](e,i),t}function Rt(t){return null!=t?(Bt(this,t),h.updateOffset(this,!0),this):H(this,"Month")}var $t=ft;var Nt=ft;function zt(){function t(t,e){return e.length-t.length}var e,i,n=[],a=[],s=[];for(e=0;e<12;e++)i=u([2e3,e]),n.push(this.monthsShort(i,"")),a.push(this.months(i,"")),s.push(this.months(i,"")),s.push(this.monthsShort(i,""));for(n.sort(t),a.sort(t),s.sort(t),e=0;e<12;e++)n[e]=bt(n[e]),a[e]=bt(a[e]),s[e]=bt(s[e]);this._monthsRegex=new RegExp("^("+s.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+n.join("|")+")","i")}function jt(t){var e,i=t._a;return i&&-2===f(t).overflow&&(e=i[_t]<0||11<i[_t]?_t:i[St]<1||i[St]>Et(i[Ct],i[_t])?St:i[Pt]<0||24<i[Pt]||24===i[Pt]&&(0!==i[At]||0!==i[Mt]||0!==i[Dt])?Pt:i[At]<0||59<i[At]?At:i[Mt]<0||59<i[Mt]?Mt:i[Dt]<0||999<i[Dt]?Dt:-1,f(t)._overflowDayOfYear&&(e<Ct||St<e)&&(e=St),f(t)._overflowWeeks&&-1===e&&(e=Tt),f(t)._overflowWeekday&&-1===e&&(e=It),f(t).overflow=e),t}var Ht=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/,Yt=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/,qt=/Z|[+-]\d\d(?::?\d\d)?/,Wt=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],Ut=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Qt=/^\/?Date\((\-?\d+)/i;function Vt(t){var e,i,n,a,s,o,r=t._i,l=Ht.exec(r)||Yt.exec(r);if(l){for(f(t).iso=!0,e=0,i=Wt.length;e<i;e++)if(Wt[e][1].exec(l[1])){a=Wt[e][0],n=!1!==Wt[e][2];break}if(null==a)return void(t._isValid=!1);if(l[3]){for(e=0,i=Ut.length;e<i;e++)if(Ut[e][1].exec(l[3])){s=(l[2]||" ")+Ut[e][0];break}if(null==s)return void(t._isValid=!1)}if(!n&&null!=s)return void(t._isValid=!1);if(l[4]){if(!qt.exec(l[4]))return void(t._isValid=!1);o="Z"}t._f=a+(s||"")+(o||""),se(t)}else t._isValid=!1}function Gt(t){var e=new Date(Date.UTC.apply(null,arguments));return t<100&&0<=t&&isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t),e}function Kt(t){return Jt(t)?366:365}function Jt(t){return t%4==0&&t%100!=0||t%400==0}h.createFromInputFallback=i("moment construction falls back to js Date. This is discouraged and will be removed in upcoming major release. Please refer to https://github.com/moment/moment/issues/1407 for more info.",function(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))}),K("Y",0,0,function(){var t=this.year();return t<=9999?""+t:"+"+t}),K(0,["YY",2],0,function(){return this.year()%100}),K(0,["YYYY",4],0,"year"),K(0,["YYYYY",5],0,"year"),K(0,["YYYYYY",6,!0],0,"year"),$("year","y"),gt("Y",ut),gt("YY",at,tt),gt("YYYY",lt,it),gt("YYYYY",dt,nt),gt("YYYYYY",dt,nt),wt(["YYYYY","YYYYYY"],Ct),wt("YYYY",function(t,e){e[Ct]=2===t.length?h.parseTwoDigitYear(t):x(t)}),wt("YY",function(t,e){e[Ct]=h.parseTwoDigitYear(t)}),wt("Y",function(t,e){e[Ct]=parseInt(t,10)}),h.parseTwoDigitYear=function(t){return x(t)+(68<x(t)?1900:2e3)};var Zt=j("FullYear",!0);function Xt(t,e,i){var n=7+e-i;return-((7+Gt(t,0,n).getUTCDay()-e)%7)+n-1}function te(t,e,i,n,a){var s,o,r=1+7*(e-1)+(7+i-n)%7+Xt(t,n,a);return o=r<=0?Kt(s=t-1)+r:r>Kt(t)?(s=t+1,r-Kt(t)):(s=t,r),{year:s,dayOfYear:o}}function ee(t,e,i){var n,a,s=Xt(t.year(),e,i),o=Math.floor((t.dayOfYear()-s-1)/7)+1;return o<1?n=o+ie(a=t.year()-1,e,i):o>ie(t.year(),e,i)?(n=o-ie(t.year(),e,i),a=t.year()+1):(a=t.year(),n=o),{week:n,year:a}}function ie(t,e,i){var n=Xt(t,e,i),a=Xt(t+1,e,i);return(Kt(t)-n+a)/7}function ne(t,e,i){return null!=t?t:null!=e?e:i}function ae(t){var e,i,n,a,s=[];if(!t._d){var o,r;for(o=t,r=new Date(h.now()),n=o._useUTC?[r.getUTCFullYear(),r.getUTCMonth(),r.getUTCDate()]:[r.getFullYear(),r.getMonth(),r.getDate()],t._w&&null==t._a[St]&&null==t._a[_t]&&function(t){var e,i,n,a,s,o,r,l;null!=(e=t._w).GG||null!=e.W||null!=e.E?(s=1,o=4,i=ne(e.GG,t._a[Ct],ee(le(),1,4).year),n=ne(e.W,1),((a=ne(e.E,1))<1||7<a)&&(l=!0)):(s=t._locale._week.dow,o=t._locale._week.doy,i=ne(e.gg,t._a[Ct],ee(le(),s,o).year),n=ne(e.w,1),null!=e.d?((a=e.d)<0||6<a)&&(l=!0):null!=e.e?(a=e.e+s,(e.e<0||6<e.e)&&(l=!0)):a=s);n<1||n>ie(i,s,o)?f(t)._overflowWeeks=!0:null!=l?f(t)._overflowWeekday=!0:(r=te(i,n,a,s,o),t._a[Ct]=r.year,t._dayOfYear=r.dayOfYear)}(t),t._dayOfYear&&(a=ne(t._a[Ct],n[Ct]),t._dayOfYear>Kt(a)&&(f(t)._overflowDayOfYear=!0),i=Gt(a,0,t._dayOfYear),t._a[_t]=i.getUTCMonth(),t._a[St]=i.getUTCDate()),e=0;e<3&&null==t._a[e];++e)t._a[e]=s[e]=n[e];for(;e<7;e++)t._a[e]=s[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[Pt]&&0===t._a[At]&&0===t._a[Mt]&&0===t._a[Dt]&&(t._nextDay=!0,t._a[Pt]=0),t._d=(t._useUTC?Gt:function(t,e,i,n,a,s,o){var r=new Date(t,e,i,n,a,s,o);return t<100&&0<=t&&isFinite(r.getFullYear())&&r.setFullYear(t),r}).apply(null,s),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[Pt]=24)}}function se(t){if(t._f!==h.ISO_8601){t._a=[],f(t).empty=!0;var e,i,n,a,s,o,r,l,d=""+t._i,c=d.length,u=0;for(n=Z(t._f,t._locale).match(U)||[],e=0;e<n.length;e++)a=n[e],(i=(d.match(vt(a,t))||[])[0])&&(0<(s=d.substr(0,d.indexOf(i))).length&&f(t).unusedInput.push(s),d=d.slice(d.indexOf(i)+i.length),u+=i.length),G[a]?(i?f(t).empty=!1:f(t).unusedTokens.push(a),o=a,l=t,null!=(r=i)&&p(yt,o)&&yt[o](r,l._a,l,o)):t._strict&&!i&&f(t).unusedTokens.push(a);f(t).charsLeftOver=c-u,0<d.length&&f(t).unusedInput.push(d),!0===f(t).bigHour&&t._a[Pt]<=12&&0<t._a[Pt]&&(f(t).bigHour=void 0),f(t).parsedDateParts=t._a.slice(0),f(t).meridiem=t._meridiem,t._a[Pt]=function(t,e,i){var n;if(null==i)return e;return null!=t.meridiemHour?t.meridiemHour(e,i):(null!=t.isPM&&((n=t.isPM(i))&&e<12&&(e+=12),n||12!==e||(e=0)),e)}(t._locale,t._a[Pt],t._meridiem),ae(t),jt(t)}else Vt(t)}function oe(t){var e,i,n,a,s=t._i,o=t._f;return t._locale=t._locale||B(t._l),null===s||void 0===o&&""===s?g({nullInput:!0}):("string"==typeof s&&(t._i=s=t._locale.preparse(s)),y(s)?new b(jt(s)):(r(o)?function(t){var e,i,n,a,s;if(0===t._f.length)return f(t).invalidFormat=!0,t._d=new Date(NaN);for(a=0;a<t._f.length;a++)s=0,e=v({},t),null!=t._useUTC&&(e._useUTC=t._useUTC),e._f=t._f[a],se(e),m(e)&&(s+=f(e).charsLeftOver,s+=10*f(e).unusedTokens.length,f(e).score=s,(null==n||s<n)&&(n=s,i=e));c(t,i||e)}(t):o?se(t):l(s)?t._d=s:void 0===(i=(e=t)._i)?e._d=new Date(h.now()):l(i)?e._d=new Date(i.valueOf()):"string"==typeof i?(n=e,null===(a=Qt.exec(n._i))?(Vt(n),!1===n._isValid&&(delete n._isValid,h.createFromInputFallback(n))):n._d=new Date(+a[1])):r(i)?(e._a=d(i.slice(0),function(t){return parseInt(t,10)}),ae(e)):"object"==typeof i?function(t){if(!t._d){var e=z(t._i);t._a=d([e.year,e.month,e.day||e.date,e.hour,e.minute,e.second,e.millisecond],function(t){return t&&parseInt(t,10)}),ae(t)}}(e):"number"==typeof i?e._d=new Date(i):h.createFromInputFallback(e),m(t)||(t._d=null),t))}function re(t,e,i,n,a){var s,o={};return"boolean"==typeof i&&(n=i,i=void 0),o._isAMomentObject=!0,o._useUTC=o._isUTC=a,o._l=i,o._i=t,o._f=e,o._strict=n,(s=new b(jt(oe(o))))._nextDay&&(s.add(1,"d"),s._nextDay=void 0),s}function le(t,e,i,n){return re(t,e,i,n,!1)}h.ISO_8601=function(){};var de=i("moment().min is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548",function(){var t=le.apply(null,arguments);return this.isValid()&&t.isValid()?t<this?this:t:g()}),ce=i("moment().max is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548",function(){var t=le.apply(null,arguments);return this.isValid()&&t.isValid()?this<t?this:t:g()});function ue(t,e){var i,n;if(1===e.length&&r(e[0])&&(e=e[0]),!e.length)return le();for(i=e[0],n=1;n<e.length;++n)e[n].isValid()&&!e[n][t](i)||(i=e[n]);return i}function he(t){var e=z(t),i=e.year||0,n=e.quarter||0,a=e.month||0,s=e.week||0,o=e.day||0,r=e.hour||0,l=e.minute||0,d=e.second||0,c=e.millisecond||0;this._milliseconds=+c+1e3*d+6e4*l+1e3*r*60*60,this._days=+o+7*s,this._months=+a+3*n+12*i,this._data={},this._locale=B(),this._bubble()}function pe(t){return t instanceof he}function fe(t,i){K(t,0,0,function(){var t=this.utcOffset(),e="+";return t<0&&(t=-t,e="-"),e+W(~~(t/60),2)+i+W(~~t%60,2)})}fe("Z",":"),fe("ZZ",""),gt("Z",pt),gt("ZZ",pt),wt(["Z","ZZ"],function(t,e,i){i._useUTC=!0,i._tzm=ge(pt,t)});var me=/([\+\-]|\d\d)/gi;function ge(t,e){var i=(e||"").match(t)||[],n=((i[i.length-1]||[])+"").match(me)||["-",0,0],a=60*n[1]+x(n[2]);return"+"===n[0]?a:-a}function ve(t,e){var i,n;return e._isUTC?(i=e.clone(),n=(y(t)||l(t)?t.valueOf():le(t).valueOf())-i.valueOf(),i._d.setTime(i._d.valueOf()+n),h.updateOffset(i,!1),i):le(t).local()}function be(t){return 15*-Math.round(t._d.getTimezoneOffset()/15)}function ye(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}h.updateOffset=function(){};var we=/^(\-)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?\d*)?#x2F;,xe=/^(-)?P(?:(-?[0-9,.]*)Y)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)W)?(?:(-?[0-9,.]*)D)?(?:T(?:(-?[0-9,.]*)H)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)S)?)?#x2F;;function ke(t,e){var i,n,a,s=t,o=null;return pe(t)?s={ms:t._milliseconds,d:t._days,M:t._months}:"number"==typeof t?(s={},e?s[e]=t:s.milliseconds=t):(o=we.exec(t))?(i="-"===o[1]?-1:1,s={y:0,d:x(o[St])*i,h:x(o[Pt])*i,m:x(o[At])*i,s:x(o[Mt])*i,ms:x(o[Dt])*i}):(o=xe.exec(t))?(i="-"===o[1]?-1:1,s={y:Ce(o[2],i),M:Ce(o[3],i),w:Ce(o[4],i),d:Ce(o[5],i),h:Ce(o[6],i),m:Ce(o[7],i),s:Ce(o[8],i)}):null==s?s={}:"object"==typeof s&&("from"in s||"to"in s)&&(a=function(t,e){var i;if(!t.isValid()||!e.isValid())return{milliseconds:0,months:0};e=ve(e,t),t.isBefore(e)?i=_e(t,e):((i=_e(e,t)).milliseconds=-i.milliseconds,i.months=-i.months);return i}(le(s.from),le(s.to)),(s={}).ms=a.milliseconds,s.M=a.months),n=new he(s),pe(t)&&p(t,"_locale")&&(n._locale=t._locale),n}function Ce(t,e){var i=t&&parseFloat(t.replace(",","."));return(isNaN(i)?0:i)*e}function _e(t,e){var i={milliseconds:0,months:0};return i.months=e.month()-t.month()+12*(e.year()-t.year()),t.clone().add(i.months,"M").isAfter(e)&&--i.months,i.milliseconds=+e-+t.clone().add(i.months,"M"),i}function Se(t){return t<0?-1*Math.round(-1*t):Math.round(t)}function Pe(n,a){return function(t,e){var i;return null===e||isNaN(+e)||(S(a,"moment()."+a+"(period, number) is deprecated. Please use moment()."+a+"(number, period)."),i=t,t=e,e=i),Ae(this,ke(t="string"==typeof t?+t:t,e),n),this}}function Ae(t,e,i,n){var a=e._milliseconds,s=Se(e._days),o=Se(e._months);t.isValid()&&(n=null==n||n,a&&t._d.setTime(t._d.valueOf()+a*i),s&&Y(t,"Date",H(t,"Date")+s*i),o&&Bt(t,H(t,"Month")+o*i),n&&h.updateOffset(t,s||o))}ke.fn=he.prototype;var Me=Pe(1,"add"),De=Pe(-1,"subtract");function Te(t){var e;return void 0===t?this._locale._abbr:(null!=(e=B(t))&&(this._locale=e),this)}h.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",h.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var Ie=i("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(t){return void 0===t?this.localeData():this.locale(t)});function Ee(){return this._locale}function Le(t,e){K(0,[t,t.length],0,e)}function Oe(t,e,i,n,a){var s;return null==t?ee(this,n,a).year:((s=ie(t,n,a))<e&&(e=s),function(t,e,i,n,a){var s=te(t,e,i,n,a),o=Gt(s.year,0,s.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}.call(this,t,e,i,n,a))}K(0,["gg",2],0,function(){return this.weekYear()%100}),K(0,["GG",2],0,function(){return this.isoWeekYear()%100}),Le("gggg","weekYear"),Le("ggggg","weekYear"),Le("GGGG","isoWeekYear"),Le("GGGGG","isoWeekYear"),$("weekYear","gg"),$("isoWeekYear","GG"),gt("G",ut),gt("g",ut),gt("GG",at,tt),gt("gg",at,tt),gt("GGGG",lt,it),gt("gggg",lt,it),gt("GGGGG",dt,nt),gt("ggggg",dt,nt),xt(["gggg","ggggg","GGGG","GGGGG"],function(t,e,i,n){e[n.substr(0,2)]=x(t)}),xt(["gg","GG"],function(t,e,i,n){e[n]=h.parseTwoDigitYear(t)}),K("Q",0,"Qo","quarter"),$("quarter","Q"),gt("Q",X),wt("Q",function(t,e){e[_t]=3*(x(t)-1)}),K("w",["ww",2],"wo","week"),K("W",["WW",2],"Wo","isoWeek"),$("week","w"),$("isoWeek","W"),gt("w",at),gt("ww",at,tt),gt("W",at),gt("WW",at,tt),xt(["w","ww","W","WW"],function(t,e,i,n){e[n.substr(0,1)]=x(t)});K("D",["DD",2],"Do","date"),$("date","D"),gt("D",at),gt("DD",at,tt),gt("Do",function(t,e){return t?e._ordinalParse:e._ordinalParseLenient}),wt(["D","DD"],St),wt("Do",function(t,e){e[St]=x(t.match(at)[0])});var Fe=j("Date",!0);K("d",0,"do","day"),K("dd",0,0,function(t){return this.localeData().weekdaysMin(this,t)}),K("ddd",0,0,function(t){return this.localeData().weekdaysShort(this,t)}),K("dddd",0,0,function(t){return this.localeData().weekdays(this,t)}),K("e",0,0,"weekday"),K("E",0,0,"isoWeekday"),$("day","d"),$("weekday","e"),$("isoWeekday","E"),gt("d",at),gt("e",at),gt("E",at),gt("dd",function(t,e){return e.weekdaysMinRegex(t)}),gt("ddd",function(t,e){return e.weekdaysShortRegex(t)}),gt("dddd",function(t,e){return e.weekdaysRegex(t)}),xt(["dd","ddd","dddd"],function(t,e,i,n){var a=i._locale.weekdaysParse(t,n,i._strict);null!=a?e.d=a:f(i).invalidWeekday=t}),xt(["d","e","E"],function(t,e,i,n){e[n]=x(t)});var Be="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_");var Re="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_");var $e="Su_Mo_Tu_We_Th_Fr_Sa".split("_");var Ne=ft;var ze=ft;var je=ft;function He(){function t(t,e){return e.length-t.length}var e,i,n,a,s,o=[],r=[],l=[],d=[];for(e=0;e<7;e++)i=u([2e3,1]).day(e),n=this.weekdaysMin(i,""),a=this.weekdaysShort(i,""),s=this.weekdays(i,""),o.push(n),r.push(a),l.push(s),d.push(n),d.push(a),d.push(s);for(o.sort(t),r.sort(t),l.sort(t),d.sort(t),e=0;e<7;e++)r[e]=bt(r[e]),l[e]=bt(l[e]),d[e]=bt(d[e]);this._weekdaysRegex=new RegExp("^("+d.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+o.join("|")+")","i")}function Ye(){return this.hours()%12||12}function qe(t,e){K(t,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)})}function We(t,e){return e._meridiemParse}K("DDD",["DDDD",3],"DDDo","dayOfYear"),$("dayOfYear","DDD"),gt("DDD",rt),gt("DDDD",et),wt(["DDD","DDDD"],function(t,e,i){i._dayOfYear=x(t)}),K("H",["HH",2],0,"hour"),K("h",["hh",2],0,Ye),K("k",["kk",2],0,function(){return this.hours()||24}),K("hmm",0,0,function(){return""+Ye.apply(this)+W(this.minutes(),2)}),K("hmmss",0,0,function(){return""+Ye.apply(this)+W(this.minutes(),2)+W(this.seconds(),2)}),K("Hmm",0,0,function(){return""+this.hours()+W(this.minutes(),2)}),K("Hmmss",0,0,function(){return""+this.hours()+W(this.minutes(),2)+W(this.seconds(),2)}),qe("a",!0),qe("A",!1),$("hour","h"),gt("a",We),gt("A",We),gt("H",at),gt("h",at),gt("HH",at,tt),gt("hh",at,tt),gt("hmm",st),gt("hmmss",ot),gt("Hmm",st),gt("Hmmss",ot),wt(["H","HH"],Pt),wt(["a","A"],function(t,e,i){i._isPm=i._locale.isPM(t),i._meridiem=t}),wt(["h","hh"],function(t,e,i){e[Pt]=x(t),f(i).bigHour=!0}),wt("hmm",function(t,e,i){var n=t.length-2;e[Pt]=x(t.substr(0,n)),e[At]=x(t.substr(n)),f(i).bigHour=!0}),wt("hmmss",function(t,e,i){var n=t.length-4,a=t.length-2;e[Pt]=x(t.substr(0,n)),e[At]=x(t.substr(n,2)),e[Mt]=x(t.substr(a)),f(i).bigHour=!0}),wt("Hmm",function(t,e,i){var n=t.length-2;e[Pt]=x(t.substr(0,n)),e[At]=x(t.substr(n))}),wt("Hmmss",function(t,e,i){var n=t.length-4,a=t.length-2;e[Pt]=x(t.substr(0,n)),e[At]=x(t.substr(n,2)),e[Mt]=x(t.substr(a))});var Ue=j("Hours",!0);K("m",["mm",2],0,"minute"),$("minute","m"),gt("m",at),gt("mm",at,tt),wt(["m","mm"],At);var Qe=j("Minutes",!1);K("s",["ss",2],0,"second"),$("second","s"),gt("s",at),gt("ss",at,tt),wt(["s","ss"],Mt);var Ve,Ge=j("Seconds",!1);for(K("S",0,0,function(){return~~(this.millisecond()/100)}),K(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),K(0,["SSS",3],0,"millisecond"),K(0,["SSSS",4],0,function(){return 10*this.millisecond()}),K(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),K(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),K(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),K(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),K(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),$("millisecond","ms"),gt("S",rt,X),gt("SS",rt,tt),gt("SSS",rt,et),Ve="SSSS";Ve.length<=9;Ve+="S")gt(Ve,ct);function Ke(t,e){e[Dt]=x(1e3*("0."+t))}for(Ve="S";Ve.length<=9;Ve+="S")wt(Ve,Ke);var Je=j("Milliseconds",!1);K("z",0,0,"zoneAbbr"),K("zz",0,0,"zoneName");var Ze=b.prototype;Ze.add=Me,Ze.calendar=function(t,e){var i=t||le(),n=ve(i,this).startOf("day"),a=this.diff(n,"days",!0),s=a<-6?"sameElse":a<-1?"lastWeek":a<0?"lastDay":a<1?"sameDay":a<2?"nextDay":a<7?"nextWeek":"sameElse",o=e&&(P(e[s])?e[s]():e[s]);return this.format(o||this.localeData().calendar(s,this,le(i)))},Ze.clone=function(){return new b(this)},Ze.diff=function(t,e,i){var n,a,s,o;return this.isValid()&&(n=ve(t,this)).isValid()?(a=6e4*(n.utcOffset()-this.utcOffset()),"year"===(e=N(e))||"month"===e||"quarter"===e?(r=this,l=n,u=12*(l.year()-r.year())+(l.month()-r.month()),h=r.clone().add(u,"months"),c=l-h<0?(d=r.clone().add(u-1,"months"),(l-h)/(h-d)):(d=r.clone().add(u+1,"months"),(l-h)/(d-h)),o=-(u+c)||0,"quarter"===e?o/=3:"year"===e&&(o/=12)):(s=this-n,o="second"===e?s/1e3:"minute"===e?s/6e4:"hour"===e?s/36e5:"day"===e?(s-a)/864e5:"week"===e?(s-a)/6048e5:s),i?o:w(o)):NaN;var r,l,d,c,u,h},Ze.endOf=function(t){return void 0===(t=N(t))||"millisecond"===t?this:("date"===t&&(t="day"),this.startOf(t).add(1,"isoWeek"===t?"week":t).subtract(1,"ms"))},Ze.format=function(t){t||(t=this.isUtc()?h.defaultFormatUtc:h.defaultFormat);var e=J(this,t);return this.localeData().postformat(e)},Ze.from=function(t,e){return this.isValid()&&(y(t)&&t.isValid()||le(t).isValid())?ke({to:this,from:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()},Ze.fromNow=function(t){return this.from(le(),t)},Ze.to=function(t,e){return this.isValid()&&(y(t)&&t.isValid()||le(t).isValid())?ke({from:this,to:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()},Ze.toNow=function(t){return this.to(le(),t)},Ze.get=q,Ze.invalidAt=function(){return f(this).overflow},Ze.isAfter=function(t,e){var i=y(t)?t:le(t);return!(!this.isValid()||!i.isValid())&&("millisecond"===(e=N(s(e)?"millisecond":e))?this.valueOf()>i.valueOf():i.valueOf()<this.clone().startOf(e).valueOf())},Ze.isBefore=function(t,e){var i=y(t)?t:le(t);return!(!this.isValid()||!i.isValid())&&("millisecond"===(e=N(s(e)?"millisecond":e))?this.valueOf()<i.valueOf():this.clone().endOf(e).valueOf()<i.valueOf())},Ze.isBetween=function(t,e,i,n){return("("===(n=n||"()")[0]?this.isAfter(t,i):!this.isBefore(t,i))&&(")"===n[1]?this.isBefore(e,i):!this.isAfter(e,i))},Ze.isSame=function(t,e){var i,n=y(t)?t:le(t);return!(!this.isValid()||!n.isValid())&&("millisecond"===(e=N(e||"millisecond"))?this.valueOf()===n.valueOf():(i=n.valueOf(),this.clone().startOf(e).valueOf()<=i&&i<=this.clone().endOf(e).valueOf()))},Ze.isSameOrAfter=function(t,e){return this.isSame(t,e)||this.isAfter(t,e)},Ze.isSameOrBefore=function(t,e){return this.isSame(t,e)||this.isBefore(t,e)},Ze.isValid=function(){return m(this)},Ze.lang=Ie,Ze.locale=Te,Ze.localeData=Ee,Ze.max=ce,Ze.min=de,Ze.parsingFlags=function(){return c({},f(this))},Ze.set=q,Ze.startOf=function(t){switch(t=N(t)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":case"date":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===t&&this.weekday(0),"isoWeek"===t&&this.isoWeekday(1),"quarter"===t&&this.month(3*Math.floor(this.month()/3)),this},Ze.subtract=De,Ze.toArray=function(){var t=this;return[t.year(),t.month(),t.date(),t.hour(),t.minute(),t.second(),t.millisecond()]},Ze.toObject=function(){var t=this;return{years:t.year(),months:t.month(),date:t.date(),hours:t.hours(),minutes:t.minutes(),seconds:t.seconds(),milliseconds:t.milliseconds()}},Ze.toDate=function(){return this._offset?new Date(this.valueOf()):this._d},Ze.toISOString=function(){var t=this.clone().utc();return 0<t.year()&&t.year()<=9999?P(Date.prototype.toISOString)?this.toDate().toISOString():J(t,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):J(t,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]")},Ze.toJSON=function(){return this.isValid()?this.toISOString():null},Ze.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},Ze.unix=function(){return Math.floor(this.valueOf()/1e3)},Ze.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},Ze.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},Ze.year=Zt,Ze.isLeapYear=function(){return Jt(this.year())},Ze.weekYear=function(t){return Oe.call(this,t,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},Ze.isoWeekYear=function(t){return Oe.call(this,t,this.isoWeek(),this.isoWeekday(),1,4)},Ze.quarter=Ze.quarters=function(t){return null==t?Math.ceil((this.month()+1)/3):this.month(3*(t-1)+this.month()%3)},Ze.month=Rt,Ze.daysInMonth=function(){return Et(this.year(),this.month())},Ze.week=Ze.weeks=function(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")},Ze.isoWeek=Ze.isoWeeks=function(t){var e=ee(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")},Ze.weeksInYear=function(){var t=this.localeData()._week;return ie(this.year(),t.dow,t.doy)},Ze.isoWeeksInYear=function(){return ie(this.year(),1,4)},Ze.date=Fe,Ze.day=Ze.days=function(t){if(!this.isValid())return null!=t?this:NaN;var e,i,n=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?(e=t,i=this.localeData(),t="string"!=typeof e?e:isNaN(e)?"number"==typeof(e=i.weekdaysParse(e))?e:null:parseInt(e,10),this.add(t-n,"d")):n},Ze.weekday=function(t){if(!this.isValid())return null!=t?this:NaN;var e=(this.day()+7-this.localeData()._week.dow)%7;return null==t?e:this.add(t-e,"d")},Ze.isoWeekday=function(t){return this.isValid()?null==t?this.day()||7:this.day(this.day()%7?t:t-7):null!=t?this:NaN},Ze.dayOfYear=function(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==t?e:this.add(t-e,"d")},Ze.hour=Ze.hours=Ue,Ze.minute=Ze.minutes=Qe,Ze.second=Ze.seconds=Ge,Ze.millisecond=Ze.milliseconds=Je,Ze.utcOffset=function(t,e){var i,n=this._offset||0;return this.isValid()?null!=t?("string"==typeof t?t=ge(pt,t):Math.abs(t)<16&&(t*=60),!this._isUTC&&e&&(i=be(this)),this._offset=t,this._isUTC=!0,null!=i&&this.add(i,"m"),n!==t&&(!e||this._changeInProgress?Ae(this,ke(t-n,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,h.updateOffset(this,!0),this._changeInProgress=null)),this):this._isUTC?n:be(this):null!=t?this:NaN},Ze.utc=function(t){return this.utcOffset(0,t)},Ze.local=function(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(be(this),"m")),this},Ze.parseZone=function(){return this._tzm?this.utcOffset(this._tzm):"string"==typeof this._i&&this.utcOffset(ge(ht,this._i)),this},Ze.hasAlignedHourOffset=function(t){return!!this.isValid()&&(t=t?le(t).utcOffset():0,(this.utcOffset()-t)%60==0)},Ze.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},Ze.isDSTShifted=function(){if(!s(this._isDSTShifted))return this._isDSTShifted;var t={};if(v(t,this),(t=oe(t))._a){var e=t._isUTC?u(t._a):le(t._a);this._isDSTShifted=this.isValid()&&0<k(t._a,e.toArray())}else this._isDSTShifted=!1;return this._isDSTShifted},Ze.isLocal=function(){return!!this.isValid()&&!this._isUTC},Ze.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},Ze.isUtc=ye,Ze.isUTC=ye,Ze.zoneAbbr=function(){return this._isUTC?"UTC":""},Ze.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},Ze.dates=i("dates accessor is deprecated. Use date instead.",Fe),Ze.months=i("months accessor is deprecated. Use month instead",Rt),Ze.years=i("years accessor is deprecated. Use year instead",Zt),Ze.zone=i("moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779",function(t,e){return null!=t?("string"!=typeof t&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()});var Xe=Ze;function ti(t){return t}var ei=D.prototype;function ii(t,e,i,n){var a=B(),s=u().set(n,e);return a[i](s,t)}function ni(t,e,i){if("number"==typeof t&&(e=t,t=void 0),t=t||"",null!=e)return ii(t,e,i,"month");var n,a=[];for(n=0;n<12;n++)a[n]=ii(t,n,i,"month");return a}function ai(t,e,i,n){e=("boolean"==typeof t?"number"==typeof e&&(i=e,e=void 0):(e=t,t=!1,"number"==typeof(i=e)&&(i=e,e=void 0)),e||"");var a,s=B(),o=t?s._week.dow:0;if(null!=i)return ii(e,(i+o)%7,n,"day");var r=[];for(a=0;a<7;a++)r[a]=ii(e,(a+o)%7,n,"day");return r}ei._calendar={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},ei.calendar=function(t,e,i){var n=this._calendar[t];return P(n)?n.call(e,i):n},ei._longDateFormat={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},ei.longDateFormat=function(t){var e=this._longDateFormat[t],i=this._longDateFormat[t.toUpperCase()];return e||!i?e:(this._longDateFormat[t]=i.replace(/MMMM|MM|DD|dddd/g,function(t){return t.slice(1)}),this._longDateFormat[t])},ei._invalidDate="Invalid date",ei.invalidDate=function(){return this._invalidDate},ei._ordinal="%d",ei.ordinal=function(t){return this._ordinal.replace("%d",t)},ei._ordinalParse=/\d{1,2}/,ei.preparse=ti,ei.postformat=ti,ei._relativeTime={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},ei.relativeTime=function(t,e,i,n){var a=this._relativeTime[i];return P(a)?a(t,e,i,n):a.replace(/%d/i,t)},ei.pastFuture=function(t,e){var i=this._relativeTime[0<t?"future":"past"];return P(i)?i(e):i.replace(/%s/i,e)},ei.set=function(t){var e,i;for(i in t)P(e=t[i])?this[i]=e:this["_"+i]=e;this._config=t,this._ordinalParseLenient=new RegExp(this._ordinalParse.source+"|"+/\d{1,2}/.source)},ei.months=function(t,e){return r(this._months)?this._months[t.month()]:this._months[Lt.test(e)?"format":"standalone"][t.month()]},ei._months=Ot,ei.monthsShort=function(t,e){return r(this._monthsShort)?this._monthsShort[t.month()]:this._monthsShort[Lt.test(e)?"format":"standalone"][t.month()]},ei._monthsShort=Ft,ei.monthsParse=function(t,e,i){var n,a,s;if(this._monthsParseExact)return function(t,e,i){var n,a,s,o=t.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],n=0;n<12;++n)s=u([2e3,n]),this._shortMonthsParse[n]=this.monthsShort(s,"").toLocaleLowerCase(),this._longMonthsParse[n]=this.months(s,"").toLocaleLowerCase();return i?"MMM"===e?-1!==(a=kt.call(this._shortMonthsParse,o))?a:null:-1!==(a=kt.call(this._longMonthsParse,o))?a:null:"MMM"===e?-1!==(a=kt.call(this._shortMonthsParse,o))?a:-1!==(a=kt.call(this._longMonthsParse,o))?a:null:-1!==(a=kt.call(this._longMonthsParse,o))?a:-1!==(a=kt.call(this._shortMonthsParse,o))?a:null}.call(this,t,e,i);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),n=0;n<12;n++){if(a=u([2e3,n]),i&&!this._longMonthsParse[n]&&(this._longMonthsParse[n]=new RegExp("^"+this.months(a,"").replace(".","")+"quot;,"i"),this._shortMonthsParse[n]=new RegExp("^"+this.monthsShort(a,"").replace(".","")+"quot;,"i")),i||this._monthsParse[n]||(s="^"+this.months(a,"")+"|^"+this.monthsShort(a,""),this._monthsParse[n]=new RegExp(s.replace(".",""),"i")),i&&"MMMM"===e&&this._longMonthsParse[n].test(t))return n;if(i&&"MMM"===e&&this._shortMonthsParse[n].test(t))return n;if(!i&&this._monthsParse[n].test(t))return n}},ei._monthsRegex=Nt,ei.monthsRegex=function(t){return this._monthsParseExact?(p(this,"_monthsRegex")||zt.call(this),t?this._monthsStrictRegex:this._monthsRegex):this._monthsStrictRegex&&t?this._monthsStrictRegex:this._monthsRegex},ei._monthsShortRegex=$t,ei.monthsShortRegex=function(t){return this._monthsParseExact?(p(this,"_monthsRegex")||zt.call(this),t?this._monthsShortStrictRegex:this._monthsShortRegex):this._monthsShortStrictRegex&&t?this._monthsShortStrictRegex:this._monthsShortRegex},ei.week=function(t){return ee(t,this._week.dow,this._week.doy).week},ei._week={dow:0,doy:6},ei.firstDayOfYear=function(){return this._week.doy},ei.firstDayOfWeek=function(){return this._week.dow},ei.weekdays=function(t,e){return r(this._weekdays)?this._weekdays[t.day()]:this._weekdays[this._weekdays.isFormat.test(e)?"format":"standalone"][t.day()]},ei._weekdays=Be,ei.weekdaysMin=function(t){return this._weekdaysMin[t.day()]},ei._weekdaysMin=$e,ei.weekdaysShort=function(t){return this._weekdaysShort[t.day()]},ei._weekdaysShort=Re,ei.weekdaysParse=function(t,e,i){var n,a,s;if(this._weekdaysParseExact)return function(t,e,i){var n,a,s,o=t.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],n=0;n<7;++n)s=u([2e3,1]).day(n),this._minWeekdaysParse[n]=this.weekdaysMin(s,"").toLocaleLowerCase(),this._shortWeekdaysParse[n]=this.weekdaysShort(s,"").toLocaleLowerCase(),this._weekdaysParse[n]=this.weekdays(s,"").toLocaleLowerCase();return i?"dddd"===e?-1!==(a=kt.call(this._weekdaysParse,o))?a:null:"ddd"===e?-1!==(a=kt.call(this._shortWeekdaysParse,o))?a:null:-1!==(a=kt.call(this._minWeekdaysParse,o))?a:null:"dddd"===e?-1!==(a=kt.call(this._weekdaysParse,o))?a:-1!==(a=kt.call(this._shortWeekdaysParse,o))?a:-1!==(a=kt.call(this._minWeekdaysParse,o))?a:null:"ddd"===e?-1!==(a=kt.call(this._shortWeekdaysParse,o))?a:-1!==(a=kt.call(this._weekdaysParse,o))?a:-1!==(a=kt.call(this._minWeekdaysParse,o))?a:null:-1!==(a=kt.call(this._minWeekdaysParse,o))?a:-1!==(a=kt.call(this._weekdaysParse,o))?a:-1!==(a=kt.call(this._shortWeekdaysParse,o))?a:null}.call(this,t,e,i);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),n=0;n<7;n++){if(a=u([2e3,1]).day(n),i&&!this._fullWeekdaysParse[n]&&(this._fullWeekdaysParse[n]=new RegExp("^"+this.weekdays(a,"").replace(".",".?")+"quot;,"i"),this._shortWeekdaysParse[n]=new RegExp("^"+this.weekdaysShort(a,"").replace(".",".?")+"quot;,"i"),this._minWeekdaysParse[n]=new RegExp("^"+this.weekdaysMin(a,"").replace(".",".?")+"quot;,"i")),this._weekdaysParse[n]||(s="^"+this.weekdays(a,"")+"|^"+this.weekdaysShort(a,"")+"|^"+this.weekdaysMin(a,""),this._weekdaysParse[n]=new RegExp(s.replace(".",""),"i")),i&&"dddd"===e&&this._fullWeekdaysParse[n].test(t))return n;if(i&&"ddd"===e&&this._shortWeekdaysParse[n].test(t))return n;if(i&&"dd"===e&&this._minWeekdaysParse[n].test(t))return n;if(!i&&this._weekdaysParse[n].test(t))return n}},ei._weekdaysRegex=Ne,ei.weekdaysRegex=function(t){return this._weekdaysParseExact?(p(this,"_weekdaysRegex")||He.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex},ei._weekdaysShortRegex=ze,ei.weekdaysShortRegex=function(t){return this._weekdaysParseExact?(p(this,"_weekdaysRegex")||He.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex},ei._weekdaysMinRegex=je,ei.weekdaysMinRegex=function(t){return this._weekdaysParseExact?(p(this,"_weekdaysRegex")||He.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex},ei.isPM=function(t){return"p"===(t+"").toLowerCase().charAt(0)},ei._meridiemParse=/[ap]\.?m?\.?/i,ei.meridiem=function(t,e,i){return 11<t?i?"pm":"PM":i?"am":"AM"},O("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10;return t+(1===x(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th")}}),h.lang=i("moment.lang is deprecated. Use moment.locale instead.",O),h.langData=i("moment.langData is deprecated. Use moment.localeData instead.",B);var si=Math.abs;function oi(t,e,i,n){var a=ke(e,i);return t._milliseconds+=n*a._milliseconds,t._days+=n*a._days,t._months+=n*a._months,t._bubble()}function ri(t){return t<0?Math.floor(t):Math.ceil(t)}function li(t){return 4800*t/146097}function di(t){return 146097*t/4800}function ci(t){return function(){return this.as(t)}}var ui=ci("ms"),hi=ci("s"),pi=ci("m"),fi=ci("h"),mi=ci("d"),gi=ci("w"),vi=ci("M"),bi=ci("y");function yi(t){return function(){return this._data[t]}}var wi=yi("milliseconds"),xi=yi("seconds"),ki=yi("minutes"),Ci=yi("hours"),_i=yi("days"),Si=yi("months"),Pi=yi("years");var Ai=Math.round,Mi={s:45,m:45,h:22,d:26,M:11};var Di=Math.abs;function Ti(){var t,e,i=Di(this._milliseconds)/1e3,n=Di(this._days),a=Di(this._months);e=w((t=w(i/60))/60),i%=60,t%=60;var s=w(a/12),o=a%=12,r=n,l=e,d=t,c=i,u=this.asSeconds();return u?(u<0?"-":"")+"P"+(s?s+"Y":"")+(o?o+"M":"")+(r?r+"D":"")+(l||d||c?"T":"")+(l?l+"H":"")+(d?d+"M":"")+(c?c+"S":""):"P0D"}var Ii=he.prototype;return Ii.abs=function(){var t=this._data;return this._milliseconds=si(this._milliseconds),this._days=si(this._days),this._months=si(this._months),t.milliseconds=si(t.milliseconds),t.seconds=si(t.seconds),t.minutes=si(t.minutes),t.hours=si(t.hours),t.months=si(t.months),t.years=si(t.years),this},Ii.add=function(t,e){return oi(this,t,e,1)},Ii.subtract=function(t,e){return oi(this,t,e,-1)},Ii.as=function(t){var e,i,n=this._milliseconds;if("month"===(t=N(t))||"year"===t)return e=this._days+n/864e5,i=this._months+li(e),"month"===t?i:i/12;switch(e=this._days+Math.round(di(this._months)),t){case"week":return e/7+n/6048e5;case"day":return e+n/864e5;case"hour":return 24*e+n/36e5;case"minute":return 1440*e+n/6e4;case"second":return 86400*e+n/1e3;case"millisecond":return Math.floor(864e5*e)+n;default:throw new Error("Unknown unit "+t)}},Ii.asMilliseconds=ui,Ii.asSeconds=hi,Ii.asMinutes=pi,Ii.asHours=fi,Ii.asDays=mi,Ii.asWeeks=gi,Ii.asMonths=vi,Ii.asYears=bi,Ii.valueOf=function(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*x(this._months/12)},Ii._bubble=function(){var t,e,i,n,a,s=this._milliseconds,o=this._days,r=this._months,l=this._data;return 0<=s&&0<=o&&0<=r||s<=0&&o<=0&&r<=0||(s+=864e5*ri(di(r)+o),r=o=0),l.milliseconds=s%1e3,t=w(s/1e3),l.seconds=t%60,e=w(t/60),l.minutes=e%60,i=w(e/60),l.hours=i%24,r+=a=w(li(o+=w(i/24))),o-=ri(di(a)),n=w(r/12),r%=12,l.days=o,l.months=r,l.years=n,this},Ii.get=function(t){return this[(t=N(t))+"s"]()},Ii.milliseconds=wi,Ii.seconds=xi,Ii.minutes=ki,Ii.hours=Ci,Ii.days=_i,Ii.weeks=function(){return w(this.days()/7)},Ii.months=Si,Ii.years=Pi,Ii.humanize=function(t){var e,i,n,a,s,o,r,l,d,c,u,h=this.localeData(),p=(i=!t,n=h,a=ke(e=this).abs(),s=Ai(a.as("s")),o=Ai(a.as("m")),r=Ai(a.as("h")),l=Ai(a.as("d")),d=Ai(a.as("M")),c=Ai(a.as("y")),(u=s<Mi.s&&["s",s]||o<=1&&["m"]||o<Mi.m&&["mm",o]||r<=1&&["h"]||r<Mi.h&&["hh",r]||l<=1&&["d"]||l<Mi.d&&["dd",l]||d<=1&&["M"]||d<Mi.M&&["MM",d]||c<=1&&["y"]||["yy",c])[2]=i,u[3]=0<+e,u[4]=n,function(t,e,i,n,a){return a.relativeTime(e||1,!!i,t,n)}.apply(null,u));return t&&(p=h.pastFuture(+this,p)),h.postformat(p)},Ii.toISOString=Ti,Ii.toString=Ti,Ii.toJSON=Ti,Ii.locale=Te,Ii.localeData=Ee,Ii.toIsoString=i("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Ti),Ii.lang=Ie,K("X",0,0,"unix"),K("x",0,0,"valueOf"),gt("x",ut),gt("X",/[+-]?\d+(\.\d{1,3})?/),wt("X",function(t,e,i){i._d=new Date(1e3*parseFloat(t,10))}),wt("x",function(t,e,i){i._d=new Date(x(t))}),h.version="2.13.0",t=le,h.fn=Xe,h.min=function(){return ue("isBefore",[].slice.call(arguments,0))},h.max=function(){return ue("isAfter",[].slice.call(arguments,0))},h.now=function(){return Date.now?Date.now():+new Date},h.utc=u,h.unix=function(t){return le(1e3*t)},h.months=function(t,e){return ni(t,e,"months")},h.isDate=l,h.locale=O,h.invalid=g,h.duration=ke,h.isMoment=y,h.weekdays=function(t,e,i){return ai(t,e,i,"weekdays")},h.parseZone=function(){return le.apply(null,arguments).parseZone()},h.localeData=B,h.isDuration=pe,h.monthsShort=function(t,e){return ni(t,e,"monthsShort")},h.weekdaysMin=function(t,e,i){return ai(t,e,i,"weekdaysMin")},h.defineLocale=F,h.updateLocale=function(t,e){var i;return null!=e?(null!=I[t]&&(e=M(I[t]._config,e)),(i=new D(e)).parentLocale=I[t],I[t]=i,O(t)):null!=I[t]&&(null!=I[t].parentLocale?I[t]=I[t].parentLocale:null!=I[t]&&delete I[t]),I[t]},h.locales=function(){return C(I)},h.weekdaysShort=function(t,e,i){return ai(t,e,i,"weekdaysShort")},h.normalizeUnits=N,h.relativeTimeThreshold=function(t,e){return void 0!==Mi[t]&&(void 0===e?Mi[t]:(Mi[t]=e,!0))},h.prototype=Xe,h}),("function"==typeof define&&define.amd?define:function(t,e){"undefined"!=typeof module&&module.exports?module.exports=e(require("jquery")):window.toastr=e(window.jQuery)})(["jquery"],function(C){return function(){var g,e,v,b=0,n="error",a="info",s="success",o="warning",t={clear:function(t,e){var i=x();g||y(i),r(t,i,e)||function(t){for(var e=g.children(),i=e.length-1;0<=i;i--)r(C(e[i]),t)}(i)},remove:function(t){var e=x();g||y(e),t&&0===C(":focus",t).length?k(t):g.children().length&&g.remove()},error:function(t,e,i){return l({type:n,iconClass:x().iconClasses.error,message:t,optionsOverride:i,title:e})},getContainer:y,info:function(t,e,i){return l({type:a,iconClass:x().iconClasses.info,message:t,optionsOverride:i,title:e})},options:{},subscribe:function(t){e=t},success:function(t,e,i){return l({type:s,iconClass:x().iconClasses.success,message:t,optionsOverride:i,title:e})},version:"2.1.3",warning:function(t,e,i){return l({type:o,iconClass:x().iconClasses.warning,message:t,optionsOverride:i,title:e})}};return t;function y(t,e){return t||(t=x()),(g=C("#"+t.containerId)).length||e&&(i=t,(g=C("<div/>").attr("id",i.containerId).addClass(i.positionClass)).appendTo(C(i.target)),g=g),g;var i}function r(t,e,i){var n=!(!i||!i.force)&&i.force;return!(!t||!n&&0!==C(":focus",t).length||(t[e.hideMethod]({duration:e.hideDuration,easing:e.hideEasing,complete:function(){k(t)}}),0))}function w(t){e&&e(t)}function l(e){var a=x(),t=e.iconClass||a.iconClass;if(void 0!==e.optionsOverride&&(a=C.extend(a,e.optionsOverride),t=e.optionsOverride.iconClass||t),!function(t,e){if(t.preventDuplicates){if(e.message===v)return!0;v=e.message}return!1}(a,e)){b++,g=y(a,!0);var s=null,o=C("<div/>"),i=C("<div/>"),n=C("<div/>"),r=C("<div/>"),l=C(a.closeHtml),d={intervalId:null,hideEta:null,maxHideTime:null},c={toastId:b,state:"visible",startTime:new Date,options:a,map:e};return e.iconClass&&o.addClass(a.toastClass).addClass(t),function(){if(e.title){var t=e.title;a.escapeHtml&&(t=u(e.title)),i.append(t).addClass(a.titleClass),o.append(i)}}(),function(){if(e.message){var t=e.message;a.escapeHtml&&(t=u(e.message)),n.append(t).addClass(a.messageClass),o.append(n)}}(),a.closeButton&&(l.addClass(a.closeClass).attr("role","button"),o.prepend(l)),a.progressBar&&(r.addClass(a.progressClass),o.prepend(r)),a.rtl&&o.addClass("rtl"),a.newestOnTop?g.prepend(o):g.append(o),function(){var t="";switch(e.iconClass){case"toast-success":case"toast-info":t="polite";break;default:t="assertive"}o.attr("aria-live",t)}(),o.hide(),o[a.showMethod]({duration:a.showDuration,easing:a.showEasing,complete:a.onShown}),0<a.timeOut&&(s=setTimeout(h,a.timeOut),d.maxHideTime=parseFloat(a.timeOut),d.hideEta=(new Date).getTime()+d.maxHideTime,a.progressBar&&(d.intervalId=setInterval(m,10))),a.closeOnHover&&o.hover(f,p),!a.onclick&&a.tapToDismiss&&o.click(h),a.closeButton&&l&&l.click(function(t){t.stopPropagation?t.stopPropagation():void 0!==t.cancelBubble&&!0!==t.cancelBubble&&(t.cancelBubble=!0),a.onCloseClick&&a.onCloseClick(t),h(!0)}),a.onclick&&o.click(function(t){a.onclick(t),h()}),w(c),a.debug&&console&&console.log(c),o}function u(t){return null==t&&(t=""),t.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function h(t){var e=t&&!1!==a.closeMethod?a.closeMethod:a.hideMethod,i=t&&!1!==a.closeDuration?a.closeDuration:a.hideDuration,n=t&&!1!==a.closeEasing?a.closeEasing:a.hideEasing;if(!C(":focus",o).length||t)return clearTimeout(d.intervalId),o[e]({duration:i,easing:n,complete:function(){k(o),clearTimeout(s),a.onHidden&&"hidden"!==c.state&&a.onHidden(),c.state="hidden",c.endTime=new Date,w(c)}})}function p(){(0<a.timeOut||0<a.extendedTimeOut)&&(s=setTimeout(h,a.extendedTimeOut),d.maxHideTime=parseFloat(a.extendedTimeOut),d.hideEta=(new Date).getTime()+d.maxHideTime)}function f(){clearTimeout(s),d.hideEta=0,o.stop(!0,!0)[a.showMethod]({duration:a.showDuration,easing:a.showEasing})}function m(){var t=(d.hideEta-(new Date).getTime())/d.maxHideTime*100;r.width(t+"%")}}function x(){return C.extend({},{tapToDismiss:!0,toastClass:"toast",containerId:"toast-container",debug:!1,showMethod:"fadeIn",showDuration:300,showEasing:"swing",onShown:void 0,hideMethod:"fadeOut",hideDuration:1e3,hideEasing:"swing",onHidden:void 0,closeMethod:!1,closeDuration:!1,closeEasing:!1,closeOnHover:!0,extendedTimeOut:1e3,iconClasses:{error:"toast-error",info:"toast-info",success:"toast-success",warning:"toast-warning"},iconClass:"toast-info",positionClass:"toast-top-right",timeOut:5e3,titleClass:"toast-title",messageClass:"toast-message",escapeHtml:!1,target:"body",closeHtml:'<button type="button">&times;</button>',closeClass:"toast-close-button",newestOnTop:!0,preventDuplicates:!1,progressBar:!1,progressClass:"toast-progress",rtl:!1},t.options)}function k(t){g||(g=y()),t.is(":visible")||(t.remove(),t=null,0===g.children().length&&(g.remove(),v=void 0))}}()}),function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],t):"undefined"!=typeof module&&module.exports?module.exports=t(require("jquery")):t(jQuery)}(function(b){"use strict";var y=b.scrollTo=function(t,e,i){return b(window).scrollTo(t,e,i)};function w(t){return!t.nodeName||-1!==b.inArray(t.nodeName.toLowerCase(),["iframe","#document","html","body"])}function e(t){return b.isFunction(t)||b.isPlainObject(t)?t:{top:t,left:t}}return y.defaults={axis:"xy",duration:0,limit:!0},b.fn.scrollTo=function(t,i,g){"object"==typeof i&&(g=i,i=0),"function"==typeof g&&(g={onAfter:g}),"max"===t&&(t=9e9),g=b.extend({},y.defaults,g),i=i||g.duration;var v=g.queue&&1<g.axis.length;return v&&(i/=2),g.offset=e(g.offset),g.over=e(g.over),this.each(function(){if(null!==t){var l,d=w(this),c=d?this.contentWindow||window:this,u=b(c),h=t,p={};switch(typeof h){case"number":case"string":if(/^([+-]=?)?\d+(\.\d+)?(px|%)?#x2F;.test(h)){h=e(h);break}h=d?b(h):b(h,c);case"object":if(0===h.length)return;(h.is||h.style)&&(l=(h=b(h)).offset())}var f=b.isFunction(g.offset)&&g.offset(c,h)||g.offset;b.each(g.axis.split(""),function(t,e){var i="x"===e?"Left":"Top",n=i.toLowerCase(),a="scroll"+i,s=u[a](),o=y.max(c,e);if(l)p[a]=l[n]+(d?0:s-u.offset()[n]),g.margin&&(p[a]-=parseInt(h.css("margin"+i),10)||0,p[a]-=parseInt(h.css("border"+i+"Width"),10)||0),p[a]+=f[n]||0,g.over[n]&&(p[a]+=h["x"===e?"width":"height"]()*g.over[n]);else{var r=h[n];p[a]=r.slice&&"%"===r.slice(-1)?parseFloat(r)/100*o:r}g.limit&&/^\d+#x2F;.test(p[a])&&(p[a]=p[a]<=0?0:Math.min(p[a],o)),!t&&1<g.axis.length&&(s===p[a]?p={}:v&&(m(g.onAfterFirst),p={}))}),m(g.onAfter)}function m(t){var e=b.extend({},g,{queue:!0,duration:i,complete:t&&function(){t.call(c,h,g)}});u.animate(p,e)}})},y.max=function(t,e){var i="x"===e?"Width":"Height",n="scroll"+i;if(!w(t))return t[n]-b(t)[i.toLowerCase()]();var a="client"+i,s=t.ownerDocument||t.document,o=s.documentElement,r=s.body;return Math.max(o[n],r[n])-Math.min(o[a],r[a])},b.Tween.propHooks.scrollLeft=b.Tween.propHooks.scrollTop={get:function(t){return b(t.elem)[t.prop]()},set:function(t){var e=this.get(t);if(t.options.interrupt&&t._last&&t._last!==e)return b(t.elem).stop();var i=Math.round(t.now);e!==i&&(b(t.elem)[t.prop](i),t._last=this.get(t))}},y}),function(t,e){"function"==typeof define&&define.amd?define([],e):"object"==typeof module&&module.exports?module.exports=e():t.striptags=e()}(this,function(){var h=/\s/,p=/<(\w*)>/g;return function(t,s){t=t||"";var e,i,n,a=0,o=0,r="",l="",d=!1;for("string"==typeof s?s=function(t){for(var e,i=[];null!==(e=p.exec(t));)i.push(e[1]);return 0!==i.length?i:null}(s):Array.isArray(s)||(s=null),e=0,i=t.length;e<i;e++)switch(n=t[e]){case"<":if(d)break;if(" "==t[e+1]){c(n);break}if(0==a){a=1,c(n);break}if(1==a){o++;break}c(n);break;case">":if(o){o--;break}if(d)break;if(1==a){d=a=0,s&&(l+=">",u());break}if(2==a){d=a=0,l="";break}if(3==a&&"-"==t[e-1]&&"-"==t[e-2]){d=a=0,l="";break}c(n);break;case'"':case"'":1==a&&(d==n?d=!1:d||(d=n)),c(n);break;case"!":if(1==a&&"<"==t[e-1]){a=2;break}c(n);break;case"-":if(2==a&&"-"==t[e-1]&&"!"==t[e-2]){a=3;break}c(n);break;case"E":case"e":if(2==a&&"doctype"==t.substr(e-6,7).toLowerCase()){a=1;break}c(n);break;default:c(n)}function c(t){0==a?r+=t:s&&1==a&&(l+=t)}function u(){var t,e,i,n="",a=!1;t:for(t=0,e=l.length;t<e;t++)switch(i=l[t].toLowerCase()){case"<":break;case">":break t;case"/":a=!0;break;default:if(i.match(h)){if(a)break t}else a=!0,n+=i}-1!==s.indexOf(n)&&(r+=l),l=""}return r}}),function(t,e){"use strict";var n={"&nbsp;":" ","&iexcl;":"¡","&cent;":"¢","&pound;":"£","&curren;":"¤","&yen;":"¥","&brvbar;":"¦","&sect;":"§","&uml;":"¨","&copy;":"©","&ordf;":"ª","&laquo;":"«","&not;":"¬","&shy;":"­","&reg;":"®","&macr;":"¯","&deg;":"°","&plusmn;":"±","&sup2;":"²","&sup3;":"³","&acute;":"´","&micro;":"µ","&para;":"¶","&middot;":"·","&cedil;":"¸","&sup1;":"¹","&ordm;":"º","&raquo;":"»","&frac14;":"¼","&frac12;":"½","&frac34;":"¾","&iquest;":"¿","&Agrave;":"À","&Aacute;":"Á","&Acirc;":"Â","&Atilde;":"Ã","&Auml;":"Ä","&Aring;":"Å","&AElig;":"Æ","&Ccedil;":"Ç","&Egrave;":"È","&Eacute;":"É","&Ecirc;":"Ê","&Euml;":"Ë","&Igrave;":"Ì","&Iacute;":"Í","&Icirc;":"Î","&Iuml;":"Ï","&ETH;":"Ð","&Ntilde;":"Ñ","&Ograve;":"Ò","&Oacute;":"Ó","&Ocirc;":"Ô","&Otilde;":"Õ","&Ouml;":"Ö","&times;":"×","&Oslash;":"Ø","&Ugrave;":"Ù","&Uacute;":"Ú","&Ucirc;":"Û","&Uuml;":"Ü","&Yacute;":"Ý","&THORN;":"Þ","&szlig;":"ß","&agrave;":"à","&aacute;":"á","&acirc;":"â","&atilde;":"ã","&auml;":"ä","&aring;":"å","&aelig;":"æ","&ccedil;":"ç","&egrave;":"è","&eacute;":"é","&ecirc;":"ê","&euml;":"ë","&igrave;":"ì","&iacute;":"í","&icirc;":"î","&iuml;":"ï","&eth;":"ð","&ntilde;":"ñ","&ograve;":"ò","&oacute;":"ó","&ocirc;":"ô","&otilde;":"õ","&ouml;":"ö","&divide;":"÷","&oslash;":"ø","&ugrave;":"ù","&uacute;":"ú","&ucirc;":"û","&uuml;":"ü","&yacute;":"ý","&thorn;":"þ","&yuml;":"ÿ","&quot;":'"',"&amp;":"&","&lt;":"<","&gt;":">","&apos;":"'","&OElig;":"Œ","&oelig;":"œ","&Scaron;":"Š","&scaron;":"š","&Yuml;":"Ÿ","&circ;":"ˆ","&tilde;":"˜","&ensp;":" ","&emsp;":" ","&thinsp;":" ","&zwnj;":"‌","&zwj;":"‍","&lrm;":"‎","&rlm;":"‏","&ndash;":"–","&mdash;":"—","&lsquo;":"‘","&rsquo;":"’","&sbquo;":"‚","&ldquo;":"“","&rdquo;":"”","&bdquo;":"„","&dagger;":"†","&Dagger;":"‡","&permil;":"‰","&lsaquo;":"‹","&rsaquo;":"›","&euro;":"€","&fnof;":"ƒ","&Alpha;":"Α","&Beta;":"Β","&Gamma;":"Γ","&Delta;":"Δ","&Epsilon;":"Ε","&Zeta;":"Ζ","&Eta;":"Η","&Theta;":"Θ","&Iota;":"Ι","&Kappa;":"Κ","&Lambda;":"Λ","&Mu;":"Μ","&Nu;":"Ν","&Xi;":"Ξ","&Omicron;":"Ο","&Pi;":"Π","&Rho;":"Ρ","&Sigma;":"Σ","&Tau;":"Τ","&Upsilon;":"Υ","&Phi;":"Φ","&Chi;":"Χ","&Psi;":"Ψ","&Omega;":"Ω","&alpha;":"α","&beta;":"β","&gamma;":"γ","&delta;":"δ","&epsilon;":"ε","&zeta;":"ζ","&eta;":"η","&theta;":"θ","&iota;":"ι","&kappa;":"κ","&lambda;":"λ","&mu;":"μ","&nu;":"ν","&xi;":"ξ","&omicron;":"ο","&pi;":"π","&rho;":"ρ","&sigmaf;":"ς","&sigma;":"σ","&tau;":"τ","&upsilon;":"υ","&phi;":"φ","&chi;":"χ","&psi;":"ψ","&omega;":"ω","&thetasym;":"ϑ","&upsih;":"ϒ","&piv;":"ϖ","&bull;":"•","&hellip;":"…","&prime;":"′","&Prime;":"″","&oline;":"‾","&frasl;":"⁄","&weierp;":"℘","&image;":"ℑ","&real;":"ℜ","&trade;":"™","&alefsym;":"ℵ","&larr;":"←","&uarr;":"↑","&rarr;":"→","&darr;":"↓","&harr;":"↔","&crarr;":"↵","&lArr;":"⇐","&uArr;":"⇑","&rArr;":"⇒","&dArr;":"⇓","&hArr;":"⇔","&forall;":"∀","&part;":"∂","&exist;":"∃","&empty;":"∅","&nabla;":"∇","&isin;":"∈","&notin;":"∉","&ni;":"∋","&prod;":"∏","&sum;":"∑","&minus;":"−","&lowast;":"∗","&radic;":"√","&prop;":"∝","&infin;":"∞","&ang;":"∠","&and;":"∧","&or;":"∨","&cap;":"∩","&cup;":"∪","&int;":"∫","&there4;":"∴","&sim;":"∼","&cong;":"≅","&asymp;":"≈","&ne;":"≠","&equiv;":"≡","&le;":"≤","&ge;":"≥","&sub;":"⊂","&sup;":"⊃","&nsub;":"⊄","&sube;":"⊆","&supe;":"⊇","&oplus;":"⊕","&otimes;":"⊗","&perp;":"⊥","&sdot;":"⋅","&lceil;":"⌈","&rceil;":"⌉","&lfloor;":"⌊","&rfloor;":"⌋","&lang;":"〈","&rang;":"〉","&loz;":"◊","&spades;":"♠","&clubs;":"♣","&hearts;":"♥","&diams;":"♦"},i=function(t){if("#"!=t.charAt(1))return n[t]||t;var e,i=t.charAt(2);return e="x"==i||"X"==i?(i=t.substring(3,t.length-1),parseInt(i,16)):(i=t.substring(2,t.length-1),parseInt(i)),isNaN(e)?t:String.fromCharCode(e)},a=function(t){return t.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;")},s=function(t){return t.replace(/&#?\w+;/g,i)};"undefined"!=typeof module?((a.htmlEncode=a).htmlDecode=s,module.exports=a):t&&(t.htmlEncode=a,t.htmlDecode=s)}(this),function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).Clipboard=t()}}(function(){return function s(o,r,l){function d(i,t){if(!r[i]){if(!o[i]){var e="function"==typeof require&&require;if(!t&&e)return e(i,!0);if(c)return c(i,!0);var n=new Error("Cannot find module '"+i+"'");throw n.code="MODULE_NOT_FOUND",n}var a=r[i]={exports:{}};o[i][0].call(a.exports,function(t){var e=o[i][1][t];return d(e||t)},a,a.exports,s,o,r,l)}return r[i].exports}for(var c="function"==typeof require&&require,t=0;t<l.length;t++)d(l[t]);return d}({1:[function(t,e,i){var a=t("matches-selector");e.exports=function(t,e,i){for(var n=i?t:t.parentNode;n&&n!==document;){if(a(n,e))return n;n=n.parentNode}}},{"matches-selector":5}],2:[function(t,e,i){var o=t("closest");e.exports=function(t,e,i,n,a){var s=function(e,i,t,n){return function(t){t.delegateTarget=o(t.target,i,!0),t.delegateTarget&&n.call(e,t)}}.apply(this,arguments);return t.addEventListener(i,s,a),{destroy:function(){t.removeEventListener(i,s,a)}}}},{closest:1}],3:[function(t,e,i){i.node=function(t){return void 0!==t&&t instanceof HTMLElement&&1===t.nodeType},i.nodeList=function(t){var e=Object.prototype.toString.call(t);return void 0!==t&&("[object NodeList]"===e||"[object HTMLCollection]"===e)&&"length"in t&&(0===t.length||i.node(t[0]))},i.string=function(t){return"string"==typeof t||t instanceof String},i.fn=function(t){return"[object Function]"===Object.prototype.toString.call(t)}},{}],4:[function(t,e,i){var h=t("./is"),p=t("delegate");e.exports=function(t,e,i){if(!t&&!e&&!i)throw new Error("Missing required arguments");if(!h.string(e))throw new TypeError("Second argument must be a String");if(!h.fn(i))throw new TypeError("Third argument must be a Function");if(h.node(t))return c=e,u=i,(d=t).addEventListener(c,u),{destroy:function(){d.removeEventListener(c,u)}};if(h.nodeList(t))return o=t,r=e,l=i,Array.prototype.forEach.call(o,function(t){t.addEventListener(r,l)}),{destroy:function(){Array.prototype.forEach.call(o,function(t){t.removeEventListener(r,l)})}};if(h.string(t))return n=t,a=e,s=i,p(document.body,n,a,s);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList");var n,a,s,o,r,l,d,c,u}},{"./is":3,delegate:2}],5:[function(t,e,i){var n=Element.prototype,a=n.matchesSelector||n.webkitMatchesSelector||n.mozMatchesSelector||n.msMatchesSelector||n.oMatchesSelector;e.exports=function(t,e){if(a)return a.call(t,e);for(var i=t.parentNode.querySelectorAll(e),n=0;n<i.length;++n)if(i[n]==t)return!0;return!1}},{}],6:[function(t,e,i){e.exports=function(t){var e;if("INPUT"===t.nodeName||"TEXTAREA"===t.nodeName)t.focus(),t.setSelectionRange(0,t.value.length),e=t.value;else{t.hasAttribute("contenteditable")&&t.focus();var i=window.getSelection(),n=document.createRange();n.selectNodeContents(t),i.removeAllRanges(),i.addRange(n),e=i.toString()}return e}},{}],7:[function(t,e,i){function n(){}n.prototype={on:function(t,e,i){var n=this.e||(this.e={});return(n[t]||(n[t]=[])).push({fn:e,ctx:i}),this},once:function(t,e,i){var n=this;function a(){n.off(t,a),e.apply(i,arguments)}return a._=e,this.on(t,a,i)},emit:function(t){for(var e=[].slice.call(arguments,1),i=((this.e||(this.e={}))[t]||[]).slice(),n=0,a=i.length;n<a;n++)i[n].fn.apply(i[n].ctx,e);return this},off:function(t,e){var i=this.e||(this.e={}),n=i[t],a=[];if(n&&e)for(var s=0,o=n.length;s<o;s++)n[s].fn!==e&&n[s].fn._!==e&&a.push(n[s]);return a.length?i[t]=a:delete i[t],this}},e.exports=n},{}],8:[function(n,a,s){!function(t,e){if(void 0!==s)e(a,n("select"));else{var i={exports:{}};e(i,t.select),t.clipboardAction=i.exports}}(this,function(t,e){"use strict";var i,n=(i=e)&&i.__esModule?i:{default:i};var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t};var s=function(){function n(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(t,e,i){return e&&n(t.prototype,e),i&&n(t,i),t}}(),o=function(){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),this.resolveOptions(t),this.initSelection()}return e.prototype.resolveOptions=function(){var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];this.action=t.action,this.emitter=t.emitter,this.target=t.target,this.text=t.text,this.trigger=t.trigger,this.selectedText=""},e.prototype.initSelection=function(){this.text?this.selectFake():this.target&&this.selectTarget()},e.prototype.selectFake=function(){var t=this,e="rtl"==document.documentElement.getAttribute("dir");this.removeFake(),this.fakeHandlerCallback=function(){return t.removeFake()},this.fakeHandler=document.body.addEventListener("click",this.fakeHandlerCallback)||!0,this.fakeElem=document.createElement("textarea"),this.fakeElem.style.fontSize="12pt",this.fakeElem.style.border="0",this.fakeElem.style.padding="0",this.fakeElem.style.margin="0",this.fakeElem.style.position="absolute",this.fakeElem.style[e?"right":"left"]="-9999px",this.fakeElem.style.top=(window.pageYOffset||document.documentElement.scrollTop)+"px",this.fakeElem.setAttribute("readonly",""),this.fakeElem.value=this.text,document.body.appendChild(this.fakeElem),this.selectedText=(0,n.default)(this.fakeElem),this.copyText()},e.prototype.removeFake=function(){this.fakeHandler&&(document.body.removeEventListener("click",this.fakeHandlerCallback),this.fakeHandler=null,this.fakeHandlerCallback=null),this.fakeElem&&(document.body.removeChild(this.fakeElem),this.fakeElem=null)},e.prototype.selectTarget=function(){this.selectedText=(0,n.default)(this.target),this.copyText()},e.prototype.copyText=function(){var e=void 0;try{e=document.execCommand(this.action)}catch(t){e=!1}this.handleResult(e)},e.prototype.handleResult=function(t){t?this.emitter.emit("success",{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)}):this.emitter.emit("error",{action:this.action,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)})},e.prototype.clearSelection=function(){this.target&&this.target.blur(),window.getSelection().removeAllRanges()},e.prototype.destroy=function(){this.removeFake()},s(e,[{key:"action",set:function(){var t=arguments.length<=0||void 0===arguments[0]?"copy":arguments[0];if(this._action=t,"copy"!==this._action&&"cut"!==this._action)throw new Error('Invalid "action" value, use either "copy" or "cut"')},get:function(){return this._action}},{key:"target",set:function(t){if(void 0!==t){if(!t||"object"!==(void 0===t?"undefined":a(t))||1!==t.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===this.action&&t.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===this.action&&(t.hasAttribute("readonly")||t.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');this._target=t}},get:function(){return this._target}}]),e}();t.exports=o})},{select:6}],9:[function(n,a,s){!function(t,e){if(void 0!==s)e(a,n("./clipboard-action"),n("tiny-emitter"),n("good-listener"));else{var i={exports:{}};e(i,t.clipboardAction,t.tinyEmitter,t.goodListener),t.clipboard=i.exports}}(this,function(t,e,i,n){"use strict";var s=r(e),a=r(i),o=r(n);function r(t){return t&&t.__esModule?t:{default:t}}var l=function(n){function a(t,e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,n.call(this));return i.resolveOptions(e),i.listenClick(t),i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(a,n),a.prototype.resolveOptions=function(){var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];this.action="function"==typeof t.action?t.action:this.defaultAction,this.target="function"==typeof t.target?t.target:this.defaultTarget,this.text="function"==typeof t.text?t.text:this.defaultText},a.prototype.listenClick=function(t){var e=this;this.listener=(0,o.default)(t,"click",function(t){return e.onClick(t)})},a.prototype.onClick=function(t){var e=t.delegateTarget||t.currentTarget;this.clipboardAction&&(this.clipboardAction=null),this.clipboardAction=new s.default({action:this.action(e),target:this.target(e),text:this.text(e),trigger:e,emitter:this})},a.prototype.defaultAction=function(t){return d("action",t)},a.prototype.defaultTarget=function(t){var e=d("target",t);if(e)return document.querySelector(e)},a.prototype.defaultText=function(t){return d("text",t)},a.prototype.destroy=function(){this.listener.destroy(),this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)},a}(a.default);function d(t,e){var i="data-clipboard-"+t;if(e.hasAttribute(i))return e.getAttribute(i)}t.exports=l})},{"./clipboard-action":8,"good-listener":4,"tiny-emitter":7}]},{},[9])(9)});var sheet=gMakeSheet(),xsSheet=sheet,smSheet=gMakeSheet("only screen and (min-width: 768px)"),mdSheet=gMakeSheet("only screen and (min-width: 992px)"),lgSheet=gMakeSheet("only screen and (min-width: 1200px)");function fallbackMessage(t){var e="cut"===t?"X":"C";return/iPhone|iPad/i.test(navigator.userAgent)?objectL10n.yopPollParams.copyToClipboardError.noSupport:/Mac/i.test(navigator.userAgent)?objectL10n.yopPollParams.copyToClipboardError.press+" ⌘-"+e+objectL10n.yopPollParams.copyToClipboardError.copy:objectL10n.yopPollParams.copyToClipboardError.press+" Ctrl-"+e+objectL10n.yopPollParams.copyToClipboardError.copy}if(gAddStyleToSheet(null,".yop-poll-container [class*='col-']","padding-left:15px;padding-right:15px;"),gAddStyleToSheet(null,".flush-row [class*='col-']:first-of-type","padding-left:0 !important;"),gAddStyleToSheet(null,".flush-row [class*='col-']:last-of-type","padding-right:0 !important;"),function(o){o(document).ready(function(){var n={};o(".basic-yop-poll-container").find(".row[data-columns]").each(function(){var t=o(this).data("columns");if(o(this).addClass("cols-"+t),void 0===n["cols-"+t]){n["cols-"+t]="";for(var e=1;e<=t;e++){var i=e/t*100;gAddStyleToSheet(lgSheet,".cols-"+t+" .col-lg-"+e,"width: "+i+"%; float:left;"),gAddStyleToSheet(mdSheet,".cols-"+t+" .col-md-"+e,"width: "+i+"%; float:left;"),gAddStyleToSheet(smSheet,".cols-"+t+" .col-sm-"+e,"width: "+i+"%; float:left;"),gAddStyleToSheet(xsSheet,".cols-"+t+" .col-xs-"+e,"width: "+i+"%; float:left;"),gAddStyleToSheet(lgSheet,".cols-"+t+" .col-lg-push-"+e,"left: "+i+"%;"),gAddStyleToSheet(mdSheet,".cols-"+t+" .col-md-push-"+e,"left: "+i+"%;"),gAddStyleToSheet(smSheet,".cols-"+t+" .col-sm-push-"+e,"left: "+i+"%;"),gAddStyleToSheet(xsSheet,".cols-"+t+" .col-xs-push-"+e,"left: "+i+"%;"),gAddStyleToSheet(lgSheet,".cols-"+t+" .col-lg-pull-"+e,"right: "+i+"%;"),gAddStyleToSheet(mdSheet,".cols-"+t+" .col-md-pull-"+e,"right: "+i+"%;"),gAddStyleToSheet(smSheet,".cols-"+t+" .col-sm-pull-"+e,"right: "+i+"%;"),gAddStyleToSheet(xsSheet,".cols-"+t+" .col-xs-pull-"+e,"right: "+i+"%;")}}}),window.createGrid=function(t){o(t).find(".row[data-columns]").each(function(){var t=o(this).data("columns");if(o(this).addClass("cols-"+t),void 0===n["cols-"+t]){n["cols-"+t]="";for(var e=1;e<=t;e++){var i=e/t*100;gAddStyleToSheet(lgSheet,".cols-"+t+" .col-lg-"+e,"width: "+i+"%; float:left;"),gAddStyleToSheet(mdSheet,".cols-"+t+" .col-md-"+e,"width: "+i+"%; float:left;"),gAddStyleToSheet(smSheet,".cols-"+t+" .col-sm-"+e,"width: "+i+"%; float:left;"),gAddStyleToSheet(xsSheet,".cols-"+t+" .col-xs-"+e,"width: "+i+"%; float:left;"),gAddStyleToSheet(lgSheet,".cols-"+t+" .col-lg-push-"+e,"left: "+i+"%;"),gAddStyleToSheet(mdSheet,".cols-"+t+" .col-md-push-"+e,"left: "+i+"%;"),gAddStyleToSheet(smSheet,".cols-"+t+" .col-sm-push-"+e,"left: "+i+"%;"),gAddStyleToSheet(xsSheet,".cols-"+t+" .col-xs-push-"+e,"left: "+i+"%;"),gAddStyleToSheet(lgSheet,".cols-"+t+" .col-lg-pull-"+e,"right: "+i+"%;"),gAddStyleToSheet(mdSheet,".cols-"+t+" .col-md-pull-"+e,"right: "+i+"%;"),gAddStyleToSheet(smSheet,".cols-"+t+" .col-sm-pull-"+e,"right: "+i+"%;"),gAddStyleToSheet(xsSheet,".cols-"+t+" .col-xs-pull-"+e,"right: "+i+"%;")}}})};var s={};o(".row[data-gutter-width]").each(function(){var t=o(this).data("gutter-width");o(this).addClass("gutter-width-"+t);var e=o(this).data("gutter-scaling");(e="no"!=(e=void 0===e||e)&&"false"!=e&&"0"!=e&&0!==e)&&o(this).addClass("gutter-scaled-width-"+t);var i=o(this).data("flush-row");if((i="yes"==i||"true"==i||"1"==i||1===i)&&o(this).addClass("flush-row"),void 0===s["gutter-width-"+t]){s["gutter-width-"+t]="";var n=Math.floor(t/2);gAddStyleToSheet(lgSheet,".gutter-width-"+t+" [class*='col-lg-']","position: relative; min-height: 1px; padding-left: "+n+"px; padding-right: "+n+"px;"),gAddStyleToSheet(mdSheet,".gutter-width-"+t+" [class*='col-md-']","position: relative; min-height: 1px; padding-left: "+n+"px; padding-right: "+n+"px;"),gAddStyleToSheet(smSheet,".gutter-width-"+t+" [class*='col-sm-']","position: relative; min-height: 1px; padding-left: "+n+"px; padding-right: "+n+"px;"),gAddStyleToSheet(xsSheet,".gutter-width-"+t+" [class*='col-xs-']","position: relative; min-height: 1px; padding-left: "+n+"px; padding-right: "+n+"px;");var a=Math.floor(t/4);gAddStyleToSheet(xsSheet,".gutter-scaled-width-"+t+" [class*='col-xs-']","position: relative; min-height: 1px; padding-left: "+a+"px !important; padding-right: "+a+"px !important;"),gAddStyleToSheet(smSheet,".gutter-scaled-width-"+t+" [class*='col-sm-']","position: relative; min-height: 1px; padding-left: "+a+"px !important; padding-right: "+a+"px !important;"),gAddStyleToSheet(mdSheet,".gutter-scaled-width-"+t+" [class*='col-md-']","position: relative; min-height: 1px; padding-left: "+n+"px !important; padding-right: "+n+"px !important;"),gAddStyleToSheet(lgSheet,".gutter-scaled-width-"+t+" [class*='col-lg-']","position: relative; min-height: 1px; padding-left: "+n+"px !important; padding-right: "+n+"px !important;")}})})}(jQuery),function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof module&&module.exports?module.exports=t(require("jquery")):t(window.jQuery)}(function($){"use strict";var func=(Hba=0,{eq:function(e){return function(t){return e===t}},eq2:function(t,e){return t===e},peq2:function(i){return function(t,e){return t[i]===e[i]}},ok:function(){return!0},fail:function(){return!1},self:function(t){return t},not:function(t){return function(){return!t.apply(t,arguments)}},and:function(e,i){return function(t){return e(t)&&i(t)}},invoke:function(t,e){return function(){return t[e].apply(t,arguments)}},uniqueId:function(t){var e=++Hba+"";return t?t+e:e},rect2bnd:function(t){var e=$(document);return{top:t.top+e.scrollTop(),left:t.left+e.scrollLeft(),width:t.right-t.left,height:t.bottom-t.top}},invertObject:function(t){var e={};for(var i in t)t.hasOwnProperty(i)&&(e[t[i]]=i);return e},namespaceToCamel:function(t,e){return(e=e||"")+t.split(".").map(function(t){return t.substring(0,1).toUpperCase()+t.substring(1)}).join("")},debounce:function(n,a,s){var o;return function(){var t=this,e=arguments,i=s&&!o;clearTimeout(o),o=setTimeout(function(){o=null,s||n.apply(t,e)},a),i&&n.apply(t,e)}}}),Hba,list=(rca=function(t){return t[0]},sca=function(t){return t[t.length-1]},uca=function(t){return t.slice(1)},xca=function(t,e){return $.inArray(e,t)},yca=function(t,e){return-1!==xca(t,e)},{head:rca,last:sca,initial:function(t){return t.slice(0,t.length-1)},tail:uca,prev:function(t,e){var i=xca(t,e);return-1===i?null:t[i-1]},next:function(t,e){var i=xca(t,e);return-1===i?null:t[i+1]},find:function(t,e){for(var i=0,n=t.length;i<n;i++){var a=t[i];if(e(a))return a}},contains:yca,all:function(t,e){for(var i=0,n=t.length;i<n;i++)if(!e(t[i]))return!1;return!0},sum:function(t,i){return i=i||func.self,t.reduce(function(t,e){return t+i(e)},0)},from:function(t){for(var e=[],i=-1,n=t.length;++i<n;)e[i]=t[i];return e},isEmpty:function(t){return!t||!t.length},clusterBy:function(t,n){return t.length?uca(t).reduce(function(t,e){var i=sca(t);return n(sca(i),e)?i[i.length]=e:t[t.length]=[e],t},[[rca(t)]]):[]},compact:function(t){for(var e=[],i=0,n=t.length;i<n;i++)t[i]&&e.push(t[i]);return e},unique:function(t){for(var e=[],i=0,n=t.length;i<n;i++)yca(e,t[i])||e.push(t[i]);return e}}),rca,sca,uca,xca,yca,isSupportAmd="function"==typeof define&&define.amd,isFontInstalled=function(t){var e="Comic Sans MS"===t?"Courier New":"Comic Sans MS",i=$("<div>").css({position:"absolute",left:"-9999px",top:"-9999px",fontSize:"200px"}).text("mmmmmmmmmwwwwwww").appendTo(document.body),n=i.css("fontFamily",e).width(),a=i.css("fontFamily",t+","+e).width();return i.remove(),n!==a},userAgent=navigator.userAgent,isMSIE=/MSIE|Trident/i.test(userAgent),browserVersion;if(isMSIE){var matches=/MSIE (\d+[.]\d+)/.exec(userAgent);matches&&(browserVersion=parseFloat(matches[1])),matches=/Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/.exec(userAgent),matches&&(browserVersion=parseFloat(matches[1]))}var isEdge=/Edge\/\d+/.test(userAgent),hasCodeMirror=!!window.CodeMirror;if(!hasCodeMirror&&isSupportAmd&&"undefined"!=typeof require)if(void 0!==require.resolve)try{require.resolve("codemirror"),hasCodeMirror=!0}catch(t){}else void 0!==eval("require").specified&&(hasCodeMirror=eval("require").specified("codemirror"));var agent={isMac:-1<navigator.appVersion.indexOf("Mac"),isMSIE:isMSIE,isEdge:isEdge,isFF:!isEdge&&/firefox/i.test(userAgent),isPhantom:/PhantomJS/i.test(userAgent),isWebkit:!isEdge&&/webkit/i.test(userAgent),isChrome:!isEdge&&/chrome/i.test(userAgent),isSafari:!isEdge&&/safari/i.test(userAgent),browserVersion:browserVersion,jqueryVersion:parseFloat($.fn.jquery),isSupportAmd:isSupportAmd,hasCodeMirror:hasCodeMirror,isFontInstalled:isFontInstalled,isW3CRangeSupport:!!document.createRange},NBSP_CHAR=String.fromCharCode(160),ZERO_WIDTH_NBSP_CHAR="\ufeff",dom=(Fda=function(t){return t&&$(t).hasClass("note-editable")},Hda=function(e){return e=e.toUpperCase(),function(t){return t&&t.nodeName.toUpperCase()===e}},Ida=function(t){return t&&3===t.nodeType},Kda=function(t){return t&&/^BR|^IMG|^HR|^IFRAME|^BUTTON/.test(t.nodeName.toUpperCase())},Lda=function(t){return!Fda(t)&&(t&&/^DIV|^P|^LI|^H[1-7]/.test(t.nodeName.toUpperCase()))},Nda=Hda("PRE"),Oda=Hda("LI"),Qda=Hda("TABLE"),Rda=Hda("DATA"),Sda=function(t){return!(Xda(t)||Tda(t)||Uda(t)||Lda(t)||Qda(t)||Wda(t)||Rda(t))},Tda=function(t){return t&&/^UL|^OL/.test(t.nodeName.toUpperCase())},Uda=Hda("HR"),Vda=function(t){return t&&/^TD|^TH/.test(t.nodeName.toUpperCase())},Wda=Hda("BLOCKQUOTE"),Xda=function(t){return Vda(t)||Wda(t)||Fda(t)},Yda=Hda("A"),_da=Hda("BODY"),cea=agent.isMSIE&&agent.browserVersion<11?"&nbsp;":"<br>",dea=function(t){return Ida(t)?t.nodeValue.length:t?t.childNodes.length:0},eea=function(t){var e=dea(t);return 0===e||(!Ida(t)&&1===e&&t.innerHTML===cea||!(!list.all(t.childNodes,Ida)||""!==t.innerHTML))},fea=function(t){Kda(t)||dea(t)||(t.innerHTML=cea)},gea=function(t,e){for(;t;){if(e(t))return t;if(Fda(t))break;t=t.parentNode}return null},iea=function(t,e){e=e||func.fail;var i=[];return gea(t,function(t){return Fda(t)||i.push(t),e(t)}),i},mea=function(t,e){e=e||func.fail;for(var i=[];t&&!e(t);)i.push(t),t=t.nextSibling;return i},pea=function(t,e){var i=e.nextSibling,n=e.parentNode;return i?n.insertBefore(t,i):n.appendChild(t),t},qea=function(i,t){return $.each(t,function(t,e){i.appendChild(e)}),i},rea=function(t){return 0===t.offset},sea=function(t){return t.offset===dea(t.node)},tea=function(t){return rea(t)||sea(t)},uea=function(t,e){for(;t&&t!==e;){if(0!==yea(t))return!1;t=t.parentNode}return!0},vea=function(t,e){if(!e)return!1;for(;t&&t!==e;){if(yea(t)!==dea(t.parentNode)-1)return!1;t=t.parentNode}return!0},yea=function(t){for(var e=0;t=t.previousSibling;)e+=1;return e},zea=function(t){return!!(t&&t.childNodes&&t.childNodes.length)},Aea=function(t,e){var i,n;if(0===t.offset){if(Fda(t.node))return null;i=t.node.parentNode,n=yea(t.node)}else n=zea(t.node)?(i=t.node.childNodes[t.offset-1],dea(i)):(i=t.node,e?0:t.offset-1);return{node:i,offset:n}},Bea=function(t,e){var i,n;if(dea(t.node)===t.offset){if(Fda(t.node))return null;i=t.node.parentNode,n=yea(t.node)+1}else n=zea(t.node)?(i=t.node.childNodes[t.offset],0):(i=t.node,e?dea(t.node):t.offset+1);return{node:i,offset:n}},Cea=function(t,e){return t.node===e.node&&t.offset===e.offset},Kea=function(t,e){var i=e&&e.isSkipPaddingBlankHTML,n=e&&e.isNotSplitEdgePoint;if(tea(t)&&(Ida(t.node)||n)){if(rea(t))return t.node;if(sea(t))return t.node.nextSibling}if(Ida(t.node))return t.node.splitText(t.offset);var a=t.node.childNodes[t.offset],s=pea(t.node.cloneNode(!1),t.node);return qea(s,mea(a)),i||(fea(t.node),fea(s)),s},Lea=function(t,i,n){var e=iea(i.node,func.eq(t));return e.length?1===e.length?Kea(i,n):e.reduce(function(t,e){return t===i.node&&(t=Kea(i,n)),Kea({node:e,offset:t?dom.position(t):dea(e)},n)}):null},Nea=function(t){return document.createElement(t)},Pea=function(t,e){if(t&&t.parentNode){if(t.removeNode)return t.removeNode(e);var i=t.parentNode;if(!e){var n,a,s=[];for(n=0,a=t.childNodes.length;n<a;n++)s.push(t.childNodes[n]);for(n=0,a=s.length;n<a;n++)i.insertBefore(s[n],t)}i.removeChild(t)}},Sea=Hda("TEXTAREA"),Tea=function(t,e){var i=Sea(t[0])?t.val():t.html();return e?i.replace(/[\n\r]/g,""):i},{NBSP_CHAR:NBSP_CHAR,ZERO_WIDTH_NBSP_CHAR:ZERO_WIDTH_NBSP_CHAR,blank:cea,emptyPara:"<p>"+cea+"</p>",makePredByNodeName:Hda,isEditable:Fda,isControlSizing:function(t){return t&&$(t).hasClass("note-control-sizing")},isText:Ida,isElement:function(t){return t&&1===t.nodeType},isVoid:Kda,isPara:Lda,isPurePara:function(t){return Lda(t)&&!Oda(t)},isHeading:function(t){return t&&/^H[1-7]/.test(t.nodeName.toUpperCase())},isInline:Sda,isBlock:func.not(Sda),isBodyInline:function(t){return Sda(t)&&!gea(t,Lda)},isBody:_da,isParaInline:function(t){return Sda(t)&&!!gea(t,Lda)},isPre:Nda,isList:Tda,isTable:Qda,isData:Rda,isCell:Vda,isBlockquote:Wda,isBodyContainer:Xda,isAnchor:Yda,isDiv:Hda("DIV"),isLi:Oda,isBR:Hda("BR"),isSpan:Hda("SPAN"),isB:Hda("B"),isU:Hda("U"),isS:Hda("S"),isI:Hda("I"),isImg:Hda("IMG"),isTextarea:Sea,isEmpty:eea,isEmptyAnchor:func.and(Yda,eea),isClosestSibling:function(t,e){return t.nextSibling===e||t.previousSibling===e},withClosestSiblings:function(t,e){e=e||func.ok;var i=[];return t.previousSibling&&e(t.previousSibling)&&i.push(t.previousSibling),i.push(t),t.nextSibling&&e(t.nextSibling)&&i.push(t.nextSibling),i},nodeLength:dea,isLeftEdgePoint:rea,isRightEdgePoint:sea,isEdgePoint:tea,isLeftEdgeOf:uea,isRightEdgeOf:vea,isLeftEdgePointOf:function(t,e){return rea(t)&&uea(t.node,e)},isRightEdgePointOf:function(t,e){return sea(t)&&vea(t.node,e)},prevPoint:Aea,nextPoint:Bea,isSamePoint:Cea,isVisiblePoint:function(t){if(Ida(t.node)||!zea(t.node)||eea(t.node))return!0;var e=t.node.childNodes[t.offset-1],i=t.node.childNodes[t.offset];return!(e&&!Kda(e)||i&&!Kda(i))},prevPointUntil:function(t,e){for(;t;){if(e(t))return t;t=Aea(t)}return null},nextPointUntil:function(t,e){for(;t;){if(e(t))return t;t=Bea(t)}return null},isCharPoint:function(t){if(!Ida(t.node))return!1;var e=t.node.nodeValue.charAt(t.offset-1);return e&&" "!==e&&e!==NBSP_CHAR},walkPoint:function(t,e,i,n){for(var a=t;a&&(i(a),!Cea(a,e));){var s=n&&t.node!==a.node&&e.node!==a.node;a=Bea(a,s)}},ancestor:gea,singleChildAncestor:function(t,e){for(t=t.parentNode;t&&1===dea(t);){if(e(t))return t;if(Fda(t))break;t=t.parentNode}return null},listAncestor:iea,lastAncestor:function(t,e){var i=iea(t);return list.last(i.filter(e))},listNext:mea,listPrev:function(t,e){e=e||func.fail;for(var i=[];t&&!e(t);)i.push(t),t=t.previousSibling;return i},listDescendant:function(a,s){var o=[];return s=s||func.ok,function t(e){a!==e&&s(e)&&o.push(e);for(var i=0,n=e.childNodes.length;i<n;i++)t(e.childNodes[i])}(a),o},commonAncestor:function(t,e){for(var i=iea(t),n=e;n;n=n.parentNode)if(-1<$.inArray(n,i))return n;return null},wrap:function(t,e){var i=t.parentNode,n=$("<"+e+">")[0];return i.insertBefore(n,t),n.appendChild(t),n},insertAfter:pea,appendChildNodes:qea,position:yea,hasChildren:zea,makeOffsetPath:function(t,e){return iea(e,func.eq(t)).map(yea).reverse()},fromOffsetPath:function(t,e){for(var i=t,n=0,a=e.length;n<a;n++)i=i.childNodes.length<=e[n]?i.childNodes[i.childNodes.length-1]:i.childNodes[e[n]];return i},splitTree:Lea,splitPoint:function(t,e){var i,n,a=e?Lda:Xda,s=iea(t.node,a),o=list.last(s)||t.node;n=a(o)?(i=s[s.length-2],o):(i=o).parentNode;var r=i&&Lea(i,t,{isSkipPaddingBlankHTML:e,isNotSplitEdgePoint:e});return r||n!==t.node||(r=t.node.childNodes[t.offset]),{rightNode:r,container:n}},create:Nea,createText:function(t){return document.createTextNode(t)},remove:Pea,removeWhile:function(t,e){for(;t&&!Fda(t)&&e(t);){var i=t.parentNode;Pea(t),t=i}},replace:function(t,e){if(t.nodeName.toUpperCase()===e.toUpperCase())return t;var i=Nea(e);return t.style.cssText&&(i.style.cssText=t.style.cssText),qea(i,list.from(t.childNodes)),pea(i,t),Pea(t),i},html:function(t,e){var i=Tea(t);return e&&(i=i.replace(/<(\/?)(\b(?!!)[^>\s]*)(.*?)(\s*\/?>)/g,function(t,e,i){i=i.toUpperCase();var n=/^DIV|^TD|^TH|^P|^LI|^H[1-7]/.test(i)&&!!e,a=/^BLOCKQUOTE|^TABLE|^TBODY|^TR|^HR|^UL|^OL/.test(i);return t+(n||a?"\n":"")}),i=$.trim(i)),i},value:Tea,posFromPlaceholder:function(t){var e=$(t),i=e.offset(),n=e.outerHeight(!0);return{left:i.left,top:i.top+n}},attachEvents:function(e,i){Object.keys(i).forEach(function(t){e.on(t,i[t])})},detachEvents:function(e,i){Object.keys(i).forEach(function(t){e.off(t,i[t])})}}),Fda,Hda,Ida,Kda,Lda,Nda,Oda,Qda,Rda,Sda,Tda,Uda,Vda,Wda,Xda,Yda,_da,cea,dea,eea,fea,gea,iea,mea,pea,qea,rea,sea,tea,uea,vea,yea,zea,Aea,Bea,Cea,Kea,Lea,Nea,Pea,Sea,Tea,Context=function(n,t){var a=this,e=$.summernote.ui;return this.memos={},this.modules={},this.layoutInfo={},this.options=t,this.initialize=function(){return this.layoutInfo=e.createLayout(n,t),this._initialize(),n.hide(),this},this.destroy=function(){this._destroy(),n.removeData("summernote"),e.removeLayout(n,this.layoutInfo)},this.reset=function(){var t=a.isDisabled();this.code(dom.emptyPara),this._destroy(),this._initialize(),t&&a.disable()},this._initialize=function(){var e=$.extend({},this.options.buttons);Object.keys(e).forEach(function(t){a.memo("button."+t,e[t])});var i=$.extend({},this.options.modules,$.summernote.plugins||{});Object.keys(i).forEach(function(t){a.module(t,i[t],!0)}),Object.keys(this.modules).forEach(function(t){a.initializeModule(t)})},this._destroy=function(){Object.keys(this.modules).reverse().forEach(function(t){a.removeModule(t)}),Object.keys(this.memos).forEach(function(t){a.removeMemo(t)})},this.code=function(t){var e=this.invoke("codeview.isActivated");if(void 0===t)return this.invoke("codeview.sync"),e?this.layoutInfo.codable.val():this.layoutInfo.editable.html();e?this.layoutInfo.codable.val(t):this.layoutInfo.editable.html(t),n.val(t),this.triggerEvent("change",t)},this.isDisabled=function(){return"false"===this.layoutInfo.editable.attr("contenteditable")},this.enable=function(){this.layoutInfo.editable.attr("contenteditable",!0),this.invoke("toolbar.activate",!0)},this.disable=function(){this.invoke("codeview.isActivated")&&this.invoke("codeview.deactivate"),this.layoutInfo.editable.attr("contenteditable",!1),this.invoke("toolbar.deactivate",!0)},this.triggerEvent=function(){var t=list.head(arguments),e=list.tail(list.from(arguments)),i=this.options.callbacks[func.namespaceToCamel(t,"on")];i&&i.apply(n[0],e),n.trigger("summernote."+t,e)},this.initializeModule=function(t){var e=this.modules[t];e.shouldInitialize=e.shouldInitialize||func.ok,e.shouldInitialize()&&(e.initialize&&e.initialize(),e.events&&dom.attachEvents(n,e.events))},this.module=function(t,e,i){if(1===arguments.length)return this.modules[t];this.modules[t]=new e(this),i||this.initializeModule(t)},this.removeModule=function(t){var e=this.modules[t];e.shouldInitialize()&&(e.events&&dom.detachEvents(n,e.events),e.destroy&&e.destroy()),delete this.modules[t]},this.memo=function(t,e){if(1===arguments.length)return this.memos[t];this.memos[t]=e},this.removeMemo=function(t){this.memos[t]&&this.memos[t].destroy&&this.memos[t].destroy(),delete this.memos[t]},this.createInvokeHandler=function(e,i){return function(t){t.preventDefault(),a.invoke(e,i||$(t.target).closest("[data-value]").data("value"))}},this.invoke=function(){var t=list.head(arguments),e=list.tail(list.from(arguments)),i=t.split("."),n=1<i.length,a=n&&list.head(i),s=n?list.last(i):list.head(i),o=this.modules[a||"editor"];return!a&&this[s]?this[s].apply(this,e):o&&o[s]&&o.shouldInitialize()?o[s].apply(o,e):void 0},this.initialize()};$.fn.extend({summernote:function(){var t=$.type(list.head(arguments)),e="string"===t,a="object"===t?list.head(arguments):{};(a=$.extend({},$.summernote.options,a)).langInfo=$.extend(!0,{},$.summernote.lang["en-US"],$.summernote.lang[a.lang]),a.icons=$.extend(!0,{},$.summernote.options.icons,a.icons),this.each(function(t,e){var i=$(e);if(!i.data("summernote")){var n=new Context(i,a);i.data("summernote",n),i.data("summernote").triggerEvent("init",n.layoutInfo)}});var i=this.first();if(i.length){var n=i.data("summernote");if(e)return n.invoke.apply(n,list.from(arguments));a.focus&&n.invoke("editor.focus")}return this}});var Renderer=function(n,a,s,o){this.render=function(t){var i=$(n);if(s&&s.contents&&i.html(s.contents),s&&s.className&&i.addClass(s.className),s&&s.data&&$.each(s.data,function(t,e){i.attr("data-"+t,e)}),s&&s.click&&i.on("click",s.click),a){var e=i.find(".note-children-container");a.forEach(function(t){t.render(e.length?e:i)})}return o&&o(i,s),s&&s.callback&&s.callback(i),t&&t.append(i),i}},renderer={create:function(i,n){return function(){var t=$.isArray(arguments[0])?arguments[0]:[],e="object"==typeof arguments[1]?arguments[1]:arguments[0];return e&&e.children&&(t=e.children),new Renderer(i,t,e,n)}}},editor=renderer.create('<div class="note-editor note-frame panel panel-default"/>'),toolbar=renderer.create('<div class="note-toolbar panel-heading"/>'),editingArea=renderer.create('<div class="note-editing-area"/>'),codable=renderer.create('<textarea class="note-codable"/>'),editable=renderer.create('<div class="note-editable panel-body" contentEditable="true"/>'),statusbar=renderer.create(['<div class="note-statusbar">',' <div class="note-resizebar">',' <div class="note-icon-bar"/>',' <div class="note-icon-bar"/>',' <div class="note-icon-bar"/>'," </div>","</div>"].join("")),airEditor=renderer.create('<div class="note-editor"/>'),airEditable=renderer.create('<div class="note-editable" contentEditable="true"/>'),buttonGroup=renderer.create('<div class="note-btn-group btn-group">'),button=renderer.create('<button type="button" class="note-btn btn btn-default btn-sm" tabindex="-1">',function(t,e){e&&e.tooltip&&t.attr({title:e.tooltip}).tooltip({container:"body",trigger:"hover",placement:"bottom"})}),dropdown=renderer.create('<div class="dropdown-menu">',function(t,e){var i=$.isArray(e.items)?e.items.map(function(t){return'<li><a href="#" data-value="'+("string"==typeof t?t:t.value||"")+'">'+(e.template?e.template(t):t)+"</a></li>"}).join(""):e.items;t.html(i)}),dropdownCheck=renderer.create('<div class="dropdown-menu note-check">',function(t,n){var e=$.isArray(n.items)?n.items.map(function(t){var e="string"==typeof t?t:t.value||"",i=n.template?n.template(t):t;return'<li><a href="#" data-value="'+e+'">'+icon(n.checkClassName)+" "+i+"</a></li>"}).join(""):n.items;t.html(e)}),palette=renderer.create('<div class="note-color-palette"/>',function(t,e){for(var i=[],n=0,a=e.colors.length;n<a;n++){for(var s=e.eventName,o=e.colors[n],r=[],l=0,d=o.length;l<d;l++){var c=o[l];r.push(['<button type="button" class="note-color-btn"','style="background-color:',c,'" ','data-event="',s,'" ','data-value="',c,'" ','title="',c,'" ','data-toggle="button" tabindex="-1"></button>'].join(""))}i.push('<div class="note-color-row">'+r.join("")+"</div>")}t.html(i.join("")),t.find(".note-color-btn").tooltip({container:"body",trigger:"hover",placement:"bottom"})}),dialog=renderer.create('<div class="modal" aria-hidden="false" tabindex="-1"/>',function(t,e){e.fade&&t.addClass("fade"),t.html(['<div class="modal-dialog">',' <div class="modal-content">',e.title?' <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button> <h4 class="modal-title">'+e.title+"</h4> </div>":"",' <div class="modal-body">'+e.body+"</div>",e.footer?' <div class="modal-footer">'+e.footer+"</div>":""," </div>","</div>"].join(""))}),popover=renderer.create(['<div class="note-popover popover in">',' <div class="arrow"/>',' <div class="popover-content note-children-container"/>',"</div>"].join(""),function(t,e){var i=void 0!==e.direction?e.direction:"bottom";t.addClass(i),e.hideArrow&&t.find(".arrow").hide()}),icon=function(t,e){return"<"+(e=e||"i")+' class="'+t+'"/>'},ui={editor:editor,toolbar:toolbar,editingArea:editingArea,codable:codable,editable:editable,statusbar:statusbar,airEditor:airEditor,airEditable:airEditable,buttonGroup:buttonGroup,button:button,dropdown:dropdown,dropdownCheck:dropdownCheck,palette:palette,dialog:dialog,popover:popover,icon:icon,toggleBtn:function(t,e){t.toggleClass("disabled",!e),t.attr("disabled",!e)},toggleBtnActive:function(t,e){t.toggleClass("active",e)},onDialogShown:function(t,e){t.one("shown.bs.modal",e)},onDialogHidden:function(t,e){t.one("hidden.bs.modal",e)},showDialog:function(t){t.modal("show")},hideDialog:function(t){t.modal("hide")},createLayout:function(t,e){var i=(e.airMode?ui.airEditor([ui.editingArea([ui.airEditable()])]):ui.editor([ui.toolbar(),ui.editingArea([ui.codable(),ui.editable()]),ui.statusbar()])).render();return i.insertAfter(t),{note:t,editor:i,toolbar:i.find(".note-toolbar"),editingArea:i.find(".note-editing-area"),editable:i.find(".note-editable"),codable:i.find(".note-codable"),statusbar:i.find(".note-statusbar")}},removeLayout:function(t,e){t.html(e.editable.html()),e.editor.remove(),t.show()}};$.summernote=$.summernote||{lang:{}},$.extend($.summernote.lang,{"en-US":{font:{bold:"Bold",italic:"Italic",underline:"Underline",clear:"Remove Font Style",height:"Line Height",name:"Font Family",strikethrough:"Strikethrough",subscript:"Subscript",superscript:"Superscript",size:"Font Size"},image:{image:"Picture",insert:"Insert Image",resizeFull:"Resize Full",resizeHalf:"Resize Half",resizeQuarter:"Resize Quarter",floatLeft:"Float Left",floatRight:"Float Right",floatNone:"Float None",shapeRounded:"Shape: Rounded",shapeCircle:"Shape: Circle",shapeThumbnail:"Shape: Thumbnail",shapeNone:"Shape: None",dragImageHere:"Drag image or text here",dropImage:"Drop image or Text",selectFromFiles:"Select from files",maximumFileSize:"Maximum file size",maximumFileSizeError:"Maximum file size exceeded.",url:"Image URL",remove:"Remove Image"},video:{video:"Video",videoLink:"Video Link",insert:"Insert Video",url:"Video URL?",providers:"(YouTube, Vimeo, Vine, Instagram, DailyMotion or Youku)"},link:{link:"Link",insert:"Insert Link",unlink:"Unlink",edit:"Edit",textToDisplay:"Text to display",url:"To what URL should this link go?",openInNewWindow:"Open in new window"},table:{table:"Table"},hr:{insert:"Insert Horizontal Rule"},style:{style:"Style",normal:"Normal",blockquote:"Quote",pre:"Code",h1:"Header 1",h2:"Header 2",h3:"Header 3",h4:"Header 4",h5:"Header 5",h6:"Header 6"},lists:{unordered:"Unordered list",ordered:"Ordered list"},options:{help:"Help",fullscreen:"Full Screen",codeview:"Code View"},paragraph:{paragraph:"Paragraph",outdent:"Outdent",indent:"Indent",left:"Align left",center:"Align center",right:"Align right",justify:"Justify full"},color:{recent:"Recent Color",more:"More Color",background:"Background Color",foreground:"Foreground Color",transparent:"Transparent",setTransparent:"Set transparent",reset:"Reset",resetToDefault:"Reset to default"},shortcut:{shortcuts:"Keyboard shortcuts",close:"Close",textFormatting:"Text formatting",action:"Action",paragraphFormatting:"Paragraph formatting",documentStyle:"Document Style",extraKeys:"Extra keys"},help:{insertParagraph:"Insert Paragraph",undo:"Undoes the last command",redo:"Redoes the last command",tab:"Tab",untab:"Untab",bold:"Set a bold style",italic:"Set a italic style",underline:"Set a underline style",strikethrough:"Set a strikethrough style",removeFormat:"Clean a style",justifyLeft:"Set left align",justifyCenter:"Set center align",justifyRight:"Set right align",justifyFull:"Set full align",insertUnorderedList:"Toggle unordered list",insertOrderedList:"Toggle ordered list",outdent:"Outdent on current paragraph",indent:"Indent on current paragraph",formatPara:"Change current block's format as a paragraph(P tag)",formatH1:"Change current block's format as H1",formatH2:"Change current block's format as H2",formatH3:"Change current block's format as H3",formatH4:"Change current block's format as H4",formatH5:"Change current block's format as H5",formatH6:"Change current block's format as H6",insertHorizontalRule:"Insert horizontal rule","linkDialog.show":"Show Link Dialog"},history:{undo:"Undo",redo:"Redo"},specialChar:{specialChar:"SPECIAL CHARACTERS",select:"Select Special characters"}}});var key=(cka={BACKSPACE:8,TAB:9,ENTER:13,SPACE:32,LEFT:37,UP:38,RIGHT:39,DOWN:40,NUM0:48,NUM1:49,NUM2:50,NUM3:51,NUM4:52,NUM5:53,NUM6:54,NUM7:55,NUM8:56,B:66,E:69,I:73,J:74,K:75,L:76,R:82,S:83,U:85,V:86,Y:89,Z:90,SLASH:191,LEFTBRACKET:219,BACKSLASH:220,RIGHTBRACKET:221},{isEdit:function(t){return list.contains([cka.BACKSPACE,cka.TAB,cka.ENTER,cka.SPACE],t)},isMove:function(t){return list.contains([cka.LEFT,cka.UP,cka.RIGHT,cka.DOWN],t)},nameFromCode:func.invertObject(cka),code:cka}),cka,range=(fka=function(t,e){var i,n,a=t.parentElement(),s=document.body.createTextRange(),o=list.from(a.childNodes);for(i=0;i<o.length;i++)if(!dom.isText(o[i])){if(s.moveToElementText(o[i]),0<=s.compareEndPoints("StartToStart",t))break;n=o[i]}if(0!==i&&dom.isText(o[i-1])){var r=document.body.createTextRange(),l=null;r.moveToElementText(n||a),r.collapse(!n),l=n?n.nextSibling:a.firstChild;var d=t.duplicate();d.setEndPoint("StartToStart",r);for(var c=d.text.replace(/[\r\n]/g,"").length;c>l.nodeValue.length&&l.nextSibling;)c-=l.nodeValue.length,l=l.nextSibling;l.nodeValue;e&&l.nextSibling&&dom.isText(l.nextSibling)&&c===l.nodeValue.length&&(c-=l.nodeValue.length,l=l.nextSibling),a=l,i=c}return{cont:a,offset:i}},gka=function(t){var o=function(t,e){var i,n;if(dom.isText(t)){var a=dom.listPrev(t,func.not(dom.isText)),s=list.last(a).previousSibling;i=s||t.parentNode,e+=list.sum(list.tail(a),dom.nodeLength),n=!s}else{if(i=t.childNodes[e]||t,dom.isText(i))return o(i,0);e=0,n=!1}return{node:i,collapseToStart:n,offset:e}},e=document.body.createTextRange(),i=o(t.node,t.offset);return e.moveToElementText(i.node),e.collapse(i.collapseToStart),e.moveStart("character",i.offset),e},hka=function(s,a,o,r){this.sc=s,this.so=a,this.ec=o,this.eo=r;var i=function(){if(agent.isW3CRangeSupport){var t=document.createRange();return t.setStart(s,a),t.setEnd(o,r),t}var e=gka({node:s,offset:a});return e.setEndPoint("EndToEnd",gka({node:o,offset:r})),e};this.getPoints=function(){return{sc:s,so:a,ec:o,eo:r}},this.getStartPoint=function(){return{node:s,offset:a}},this.getEndPoint=function(){return{node:o,offset:r}},this.select=function(){var t=i();if(agent.isW3CRangeSupport){var e=document.getSelection();0<e.rangeCount&&e.removeAllRanges(),e.addRange(t)}else t.select();return this},this.scrollIntoView=function(t){var e=$(t).height();return t.scrollTop+e<this.sc.offsetTop&&(t.scrollTop+=Math.abs(t.scrollTop+e-this.sc.offsetTop)),this},this.normalize=function(){var t=function(t,e){if(dom.isVisiblePoint(t)&&!dom.isEdgePoint(t)||dom.isVisiblePoint(t)&&dom.isRightEdgePoint(t)&&!e||dom.isVisiblePoint(t)&&dom.isLeftEdgePoint(t)&&e||dom.isVisiblePoint(t)&&dom.isBlock(t.node)&&dom.isEmpty(t.node))return t;var i=dom.ancestor(t.node,dom.isBlock);if((dom.isLeftEdgePointOf(t,i)||dom.isVoid(dom.prevPoint(t).node))&&!e||(dom.isRightEdgePointOf(t,i)||dom.isVoid(dom.nextPoint(t).node))&&e){if(dom.isVisiblePoint(t))return t;e=!e}return(e?dom.nextPointUntil(dom.nextPoint(t),dom.isVisiblePoint):dom.prevPointUntil(dom.prevPoint(t),dom.isVisiblePoint))||t},e=t(this.getEndPoint(),!1),i=this.isCollapsed()?e:t(this.getStartPoint(),!0);return new hka(i.node,i.offset,e.node,e.offset)},this.nodes=function(i,t){i=i||func.ok;var n=t&&t.includeAncestor,a=t&&t.fullyContains,e=this.getStartPoint(),s=this.getEndPoint(),o=[],r=[];return dom.walkPoint(e,s,function(t){var e;dom.isEditable(t.node)||(a?(dom.isLeftEdgePoint(t)&&r.push(t.node),dom.isRightEdgePoint(t)&&list.contains(r,t.node)&&(e=t.node)):e=n?dom.ancestor(t.node,i):t.node,e&&i(e)&&o.push(e))},!0),list.unique(o)},this.commonAncestor=function(){return dom.commonAncestor(s,o)},this.expand=function(t){var e=dom.ancestor(s,t),i=dom.ancestor(o,t);if(!e&&!i)return new hka(s,a,o,r);var n=this.getPoints();return e&&(n.sc=e,n.so=0),i&&(n.ec=i,n.eo=dom.nodeLength(i)),new hka(n.sc,n.so,n.ec,n.eo)},this.collapse=function(t){return t?new hka(s,a,s,a):new hka(o,r,o,r)},this.splitText=function(){var t=s===o,e=this.getPoints();return dom.isText(o)&&!dom.isEdgePoint(this.getEndPoint())&&o.splitText(r),dom.isText(s)&&!dom.isEdgePoint(this.getStartPoint())&&(e.sc=s.splitText(a),e.so=0,t&&(e.ec=e.sc,e.eo=r-a)),new hka(e.sc,e.so,e.ec,e.eo)},this.deleteContents=function(){if(this.isCollapsed())return this;var t=this.splitText(),e=t.nodes(null,{fullyContains:!0}),n=dom.prevPointUntil(t.getStartPoint(),function(t){return!list.contains(e,t.node)}),a=[];return $.each(e,function(t,e){var i=e.parentNode;n.node!==i&&1===dom.nodeLength(i)&&a.push(i),dom.remove(e,!1)}),$.each(a,function(t,e){dom.remove(e,!1)}),new hka(n.node,n.offset,n.node,n.offset).normalize()};var t=function(e){return function(){var t=dom.ancestor(s,e);return!!t&&t===dom.ancestor(o,e)}};this.isOnEditable=t(dom.isEditable),this.isOnList=t(dom.isList),this.isOnAnchor=t(dom.isAnchor),this.isOnCell=t(dom.isCell),this.isOnData=t(dom.isData),this.isLeftEdgeOf=function(t){if(!dom.isLeftEdgePoint(this.getStartPoint()))return!1;var e=dom.ancestor(this.sc,t);return e&&dom.isLeftEdgeOf(this.sc,e)},this.isCollapsed=function(){return s===o&&a===r},this.wrapBodyInlineWithPara=function(){if(dom.isBodyContainer(s)&&dom.isEmpty(s))return s.innerHTML=dom.emptyPara,new hka(s.firstChild,0,s.firstChild,0);var t,e=this.normalize();if(dom.isParaInline(s)||dom.isPara(s))return e;if(dom.isInline(e.sc)){var i=dom.listAncestor(e.sc,func.not(dom.isInline));t=list.last(i),dom.isInline(t)||(t=i[i.length-2]||e.sc.childNodes[e.so])}else t=e.sc.childNodes[0<e.so?e.so-1:0];var n=dom.listPrev(t,dom.isParaInline).reverse();if((n=n.concat(dom.listNext(t.nextSibling,dom.isParaInline))).length){var a=dom.wrap(list.head(n),"p");dom.appendChildNodes(a,list.tail(n))}return this.normalize()},this.insertNode=function(t){var e=this.wrapBodyInlineWithPara().deleteContents(),i=dom.splitPoint(e.getStartPoint(),dom.isInline(t));return i.rightNode?i.rightNode.parentNode.insertBefore(t,i.rightNode):i.container.appendChild(t),t},this.pasteHTML=function(t){var e=$("<div></div>").html(t)[0],i=list.from(e.childNodes),n=this.wrapBodyInlineWithPara().deleteContents();return i.reverse().map(function(t){return n.insertNode(t)}).reverse()},this.toString=function(){var t=i();return agent.isW3CRangeSupport?t.toString():t.text},this.getWordRange=function(t){var e=this.getEndPoint();if(!dom.isCharPoint(e))return this;var i=dom.prevPointUntil(e,function(t){return!dom.isCharPoint(t)});return t&&(e=dom.nextPointUntil(e,function(t){return!dom.isCharPoint(t)})),new hka(i.node,i.offset,e.node,e.offset)},this.bookmark=function(t){return{s:{path:dom.makeOffsetPath(t,s),offset:a},e:{path:dom.makeOffsetPath(t,o),offset:r}}},this.paraBookmark=function(t){return{s:{path:list.tail(dom.makeOffsetPath(list.head(t),s)),offset:a},e:{path:list.tail(dom.makeOffsetPath(list.last(t),o)),offset:r}}},this.getClientRects=function(){return i().getClientRects()}},{create:function(t,e,i,n){if(4===arguments.length)return new hka(t,e,i,n);if(2===arguments.length)return new hka(i=t,n=e,i,n);var a=this.createFromSelection();return a||1!==arguments.length?a:(a=this.createFromNode(t)).collapse(dom.emptyPara===t.innerHTML)},createFromSelection:function(){var t,e,i,n;if(agent.isW3CRangeSupport){var a=document.getSelection();if(!a||0===a.rangeCount)return null;if(dom.isBody(a.anchorNode))return null;var s=a.getRangeAt(0);t=s.startContainer,e=s.startOffset,i=s.endContainer,n=s.endOffset}else{var o=document.selection.createRange(),r=o.duplicate();r.collapse(!1);var l=o;l.collapse(!0);var d=fka(l,!0),c=fka(r,!1);dom.isText(d.node)&&dom.isLeftEdgePoint(d)&&dom.isTextNode(c.node)&&dom.isRightEdgePoint(c)&&c.node.nextSibling===d.node&&(d=c),t=d.cont,e=d.offset,i=c.cont,n=c.offset}return new hka(t,e,i,n)},createFromNode:function(t){var e=t,i=0,n=t,a=dom.nodeLength(n);return dom.isVoid(e)&&(i=dom.listPrev(e).length-1,e=e.parentNode),dom.isBR(n)?(a=dom.listPrev(n).length-1,n=n.parentNode):dom.isVoid(n)&&(a=dom.listPrev(n).length,n=n.parentNode),this.create(e,i,n,a)},createFromNodeBefore:function(t){return this.createFromNode(t).collapse(!0)},createFromNodeAfter:function(t){return this.createFromNode(t).collapse()},createFromBookmark:function(t,e){var i=dom.fromOffsetPath(t,e.s.path),n=e.s.offset,a=dom.fromOffsetPath(t,e.e.path),s=e.e.offset;return new hka(i,n,a,s)},createFromParaBookmark:function(t,e){var i=t.s.offset,n=t.e.offset,a=dom.fromOffsetPath(list.head(e),t.s.path),s=dom.fromOffsetPath(list.last(e),t.e.path);return new hka(a,i,s,n)}}),fka,gka,hka,async={readFileAsDataURL:function(t){return $.Deferred(function(i){$.extend(new FileReader,{onload:function(t){var e=t.target.result;i.resolve(e)},onerror:function(){i.reject(this)}}).readAsDataURL(t)}).promise()},createImage:function(i){return $.Deferred(function(t){var e=$("<img>");e.one("load",function(){e.off("error abort"),t.resolve(e)}).one("error abort",function(){e.off("load").detach(),t.reject(e)}).css({display:"none"}).appendTo(document.body).attr("src",i)}).promise()}},History=function(e){var i=[],n=-1,a=e[0],t=function(t){null!==t.contents&&e.html(t.contents),null!==t.bookmark&&range.createFromBookmark(a,t.bookmark).select()};this.rewind=function(){e.html()!==i[n].contents&&this.recordUndo(),t(i[n=0])},this.reset=function(){i=[],n=-1,e.html(""),this.recordUndo()},this.undo=function(){e.html()!==i[n].contents&&this.recordUndo(),0<n&&t(i[--n])},this.redo=function(){i.length-1>n&&t(i[++n])},this.recordUndo=function(){var t;n++,i.length>n&&(i=i.slice(0,n)),i.push((t=range.create(a),{contents:e.html(),bookmark:t?t.bookmark(a):{s:{path:[],offset:0},e:{path:[],offset:0}}}))}},Style=function(){this.fromNode=function(t){var e=function(i,t){if(agent.jqueryVersion<1.9){var n={};return $.each(t,function(t,e){n[e]=i.css(e)}),n}return i.css.call(i,t)}(t,["font-family","font-size","text-align","list-style-type","line-height"])||{};return e["font-size"]=parseInt(e["font-size"],10),e},this.stylePara=function(t,i){$.each(t.nodes(dom.isPara,{includeAncestor:!0}),function(t,e){$(e).css(i)})},this.styleNodes=function(t,e){t=t.splitText();var i=e&&e.nodeName||"SPAN",n=!(!e||!e.expandClosestSibling),a=!(!e||!e.onlyPartialContains);if(t.isCollapsed())return[t.insertNode(dom.create(i))];var s=dom.makePredByNodeName(i),o=t.nodes(dom.isText,{fullyContains:!0}).map(function(t){return dom.singleChildAncestor(t,s)||dom.wrap(t,i)});if(n){if(a){var r=t.nodes();s=func.and(s,function(t){return list.contains(r,t)})}return o.map(function(t){var e=dom.withClosestSiblings(t,s),i=list.head(e),n=list.tail(e);return $.each(n,function(t,e){dom.appendChildNodes(i,e.childNodes),dom.remove(e)}),list.head(e)})}return o},this.current=function(t){var e=$(dom.isElement(t.sc)?t.sc:t.sc.parentNode),i=this.fromNode(e);try{i=$.extend(i,{"font-bold":document.queryCommandState("bold")?"bold":"normal","font-italic":document.queryCommandState("italic")?"italic":"normal","font-underline":document.queryCommandState("underline")?"underline":"normal","font-subscript":document.queryCommandState("subscript")?"subscript":"normal","font-superscript":document.queryCommandState("superscript")?"superscript":"normal","font-strikethrough":document.queryCommandState("strikethrough")?"strikethrough":"normal"})}catch(t){}if(t.isOnList()){var n=-1<$.inArray(i["list-style-type"],["circle","disc","disc-leading-zero","square"]);i["list-style"]=n?"unordered":"ordered"}else i["list-style"]="none";var a=dom.ancestor(t.sc,dom.isPara);if(a&&a.style["line-height"])i["line-height"]=a.style.lineHeight;else{var s=parseInt(i["line-height"],10)/parseInt(i["font-size"],10);i["line-height"]=s.toFixed(1)}return i.anchor=t.isOnAnchor()&&dom.ancestor(t.sc,dom.isAnchor),i.ancestors=dom.listAncestor(t.sc,dom.isEditable),i.range=t,i}},Bullet=function(){var l=this;this.insertOrderedList=function(t){this.toggleList("OL",t)},this.insertUnorderedList=function(t){this.toggleList("UL",t)},this.indent=function(t){var n=this,e=range.create(t).wrapBodyInlineWithPara(),i=e.nodes(dom.isPara,{includeAncestor:!0}),a=list.clusterBy(i,func.peq2("parentNode"));$.each(a,function(t,e){var i=list.head(e);dom.isLi(i)?n.wrapList(e,i.parentNode.nodeName):$.each(e,function(t,e){$(e).css("marginLeft",function(t,e){return(parseInt(e,10)||0)+25})})}),e.select()},this.outdent=function(t){var n=this,e=range.create(t).wrapBodyInlineWithPara(),i=e.nodes(dom.isPara,{includeAncestor:!0}),a=list.clusterBy(i,func.peq2("parentNode"));$.each(a,function(t,e){var i=list.head(e);dom.isLi(i)?n.releaseList([e]):$.each(e,function(t,e){$(e).css("marginLeft",function(t,e){return 25<(e=parseInt(e,10)||0)?e-25:""})})}),e.select()},this.toggleList=function(i,t){var e=range.create(t).wrapBodyInlineWithPara(),n=e.nodes(dom.isPara,{includeAncestor:!0}),a=e.paraBookmark(n),s=list.clusterBy(n,func.peq2("parentNode"));if(list.find(n,dom.isPurePara)){var o=[];$.each(s,function(t,e){o=o.concat(l.wrapList(e,i))}),n=o}else{var r=e.nodes(dom.isList,{includeAncestor:!0}).filter(function(t){return!$.nodeName(t,i)});r.length?$.each(r,function(t,e){dom.replace(e,i)}):n=this.releaseList(s,!0)}range.createFromParaBookmark(a,n).select()},this.wrapList=function(t,e){var i=list.head(t),n=list.last(t),a=dom.isList(i.previousSibling)&&i.previousSibling,s=dom.isList(n.nextSibling)&&n.nextSibling,o=a||dom.insertAfter(dom.create(e||"UL"),n);return t=t.map(function(t){return dom.isPurePara(t)?dom.replace(t,"LI"):t}),dom.appendChildNodes(o,t),s&&(dom.appendChildNodes(o,list.from(s.childNodes)),dom.remove(s)),t},this.releaseList=function(t,l){var d=[];return $.each(t,function(t,e){var i=list.head(e),n=list.last(e),a=l?dom.lastAncestor(i,dom.isList):i.parentNode,s=1<a.childNodes.length?dom.splitTree(a,{node:n.parentNode,offset:dom.position(n)+1},{isSkipPaddingBlankHTML:!0}):null,o=dom.splitTree(a,{node:i.parentNode,offset:dom.position(i)},{isSkipPaddingBlankHTML:!0});e=l?dom.listDescendant(o,dom.isLi):list.from(o.childNodes).filter(dom.isLi),!l&&dom.isList(a.parentNode)||(e=e.map(function(t){return dom.replace(t,"P")})),$.each(list.from(e).reverse(),function(t,e){dom.insertAfter(e,a)});var r=list.compact([a,o,s]);$.each(r,function(t,e){var i=[e].concat(dom.listDescendant(e,dom.isList));$.each(i.reverse(),function(t,e){dom.nodeLength(e)||dom.remove(e,!0)})}),d=d.concat(e)}),d}},Typing=function(){var o=new Bullet;this.insertTab=function(t,e){var i=dom.createText(new Array(e+1).join(dom.NBSP_CHAR));(t=t.deleteContents()).insertNode(i,!0),(t=range.create(i,e)).select()},this.insertParagraph=function(t){var e=range.create(t);e=(e=e.deleteContents()).wrapBodyInlineWithPara();var i,n=dom.ancestor(e.sc,dom.isPara);if(n){if(dom.isEmpty(n)&&dom.isLi(n))return void o.toggleList(n.parentNode.nodeName);if(dom.isEmpty(n)&&dom.isPara(n)&&dom.isBlockquote(n.parentNode))dom.insertAfter(n,n.parentNode),i=n;else{i=dom.splitTree(n,e.getStartPoint());var a=dom.listDescendant(n,dom.isEmptyAnchor);a=a.concat(dom.listDescendant(i,dom.isEmptyAnchor)),$.each(a,function(t,e){dom.remove(e)}),(dom.isHeading(i)||dom.isPre(i))&&dom.isEmpty(i)&&(i=dom.replace(i,"p"))}}else{var s=e.sc.childNodes[e.so];i=$(dom.emptyPara)[0],s?e.sc.insertBefore(i,s):e.sc.appendChild(i)}range.create(i,0).normalize().select().scrollIntoView(t)}},Table=function(){this.tab=function(t,e){var i=dom.ancestor(t.commonAncestor(),dom.isCell),n=dom.ancestor(i,dom.isTable),a=dom.listDescendant(n,dom.isCell),s=list[e?"prev":"next"](a,i);s&&range.create(s,0).select()},this.createTable=function(t,e,i){for(var n,a=[],s=0;s<t;s++)a.push("<td>"+dom.blank+"</td>");n=a.join("");for(var o,r=[],l=0;l<e;l++)r.push("<tr>"+n+"</tr>");o=r.join("");var d=$("<table>"+o+"</table>");return i&&i.tableClassName&&d.addClass(i.tableClassName),d[0]}},KEY_BOGUS="bogus",Editor=function(s){var n=this,e=s.layoutInfo.note,i=s.layoutInfo.editor,a=s.layoutInfo.editable,c=s.options,o=c.langInfo,r=a[0],l=null,u=new Style,d=new Table,h=new Typing,t=new Bullet,p=new History(a);this.initialize=function(){a.on("keydown",function(t){t.keyCode===key.code.ENTER&&s.triggerEvent("enter",t),s.triggerEvent("keydown",t),t.isDefaultPrevented()||(c.shortcuts?n.handleKeyMap(t):n.preventDefaultEditableShortCuts(t))}).on("keyup",function(t){s.triggerEvent("keyup",t)}).on("focus",function(t){s.triggerEvent("focus",t)}).on("blur",function(t){s.triggerEvent("blur",t)}).on("mousedown",function(t){s.triggerEvent("mousedown",t)}).on("mouseup",function(t){s.triggerEvent("mouseup",t)}).on("scroll",function(t){s.triggerEvent("scroll",t)}).on("paste",function(t){s.triggerEvent("paste",t)}),a.html(dom.html(e)||dom.emptyPara);var t=agent.isMSIE?"DOMCharacterDataModified DOMSubtreeModified DOMNodeInserted":"input";a.on(t,func.debounce(function(){s.triggerEvent("change",a.html())},250)),i.on("focusin",function(t){s.triggerEvent("focusin",t)}).on("focusout",function(t){s.triggerEvent("focusout",t)}),c.airMode||(c.width&&i.outerWidth(c.width),c.height&&a.outerHeight(c.height),c.maxHeight&&a.css("max-height",c.maxHeight),c.minHeight&&a.css("min-height",c.minHeight)),p.recordUndo()},this.destroy=function(){a.off()},this.handleKeyMap=function(t){var e=c.keyMap[agent.isMac?"mac":"pc"],i=[];t.metaKey&&i.push("CMD"),t.ctrlKey&&!t.altKey&&i.push("CTRL"),t.shiftKey&&i.push("SHIFT");var n=key.nameFromCode[t.keyCode];n&&i.push(n);var a=e[i.join("+")];a?(t.preventDefault(),s.invoke(a)):key.isEdit(t.keyCode)&&this.afterCommand()},this.preventDefaultEditableShortCuts=function(t){(t.ctrlKey||t.metaKey)&&list.contains([66,73,85],t.keyCode)&&t.preventDefault()},this.createRange=function(){return this.focus(),range.create(r)},this.saveRange=function(t){l=this.createRange(),t&&l.collapse().select()},this.restoreRange=function(){l&&(l.select(),this.focus())},this.saveTarget=function(t){a.data("target",t)},this.clearTarget=function(){a.removeData("target")},this.restoreTarget=function(){return a.data("target")},this.currentStyle=function(){var t=range.create();return t&&(t=t.normalize()),t?u.current(t):u.fromNode(a)},this.styleFromNode=function(t){return u.fromNode(t)},this.undo=function(){s.triggerEvent("before.command",a.html()),p.undo(),s.triggerEvent("change",a.html())},s.memo("help.undo",o.help.undo),this.redo=function(){s.triggerEvent("before.command",a.html()),p.redo(),s.triggerEvent("change",a.html())},s.memo("help.redo",o.help.redo);for(var f=this.beforeCommand=function(){s.triggerEvent("before.command",a.html()),n.focus()},m=this.afterCommand=function(t){p.recordUndo(),t||s.triggerEvent("change",a.html())},g=["bold","italic","underline","strikethrough","superscript","subscript","justifyLeft","justifyCenter","justifyRight","justifyFull","formatBlock","removeFormat","backColor","foreColor","fontName"],v=0,b=g.length;v<b;v++)this[g[v]]=function(e){return function(t){f(),document.execCommand(e,!1,t),m(!0)}}(g[v]),s.memo("help."+g[v],o.help[g[v]]);this.tab=function(){var t=this.createRange();t.isCollapsed()&&t.isOnCell()?d.tab(t):(f(),h.insertTab(t,c.tabSize),m())},s.memo("help.tab",o.help.tab),this.untab=function(){var t=this.createRange();t.isCollapsed()&&t.isOnCell()&&d.tab(t,!0)},s.memo("help.untab",o.help.untab),this.wrapCommand=function(t){return function(){f(),t.apply(n,arguments),m()}},this.insertParagraph=this.wrapCommand(function(){h.insertParagraph(r)}),s.memo("help.insertParagraph",o.help.insertParagraph),this.insertOrderedList=this.wrapCommand(function(){t.insertOrderedList(r)}),s.memo("help.insertOrderedList",o.help.insertOrderedList),this.insertUnorderedList=this.wrapCommand(function(){t.insertUnorderedList(r)}),s.memo("help.insertUnorderedList",o.help.insertUnorderedList),this.indent=this.wrapCommand(function(){t.indent(r)}),s.memo("help.indent",o.help.indent),this.outdent=this.wrapCommand(function(){t.outdent(r)}),s.memo("help.outdent",o.help.outdent),this.insertImage=function(t,e){return async.createImage(t,e).then(function(t){f(),"function"==typeof e?e(t):("string"==typeof e&&t.attr("data-filename",e),t.css("width",Math.min(a.width(),t.width()))),t.show(),range.create(r).insertNode(t[0]),range.createFromNodeAfter(t[0]).select(),m()}).fail(function(t){s.triggerEvent("image.upload.error",t)})},this.insertImages=function(t){$.each(t,function(t,e){var i=e.name;c.maximumImageFileSize&&c.maximumImageFileSize<e.size?s.triggerEvent("image.upload.error",o.image.maximumFileSizeError):async.readFileAsDataURL(e).then(function(t){return n.insertImage(t,i)}).fail(function(){s.triggerEvent("image.upload.error")})})},this.insertImagesOrCallback=function(t){c.callbacks.onImageUpload?s.triggerEvent("image.upload",t):this.insertImages(t)},this.insertNode=this.wrapCommand(function(t){this.createRange().insertNode(t),range.createFromNodeAfter(t).select()}),this.insertText=this.wrapCommand(function(t){var e=this.createRange().insertNode(dom.createText(t));range.create(e,dom.nodeLength(e)).select()}),this.getSelectedText=function(){var t=this.createRange();return t.isOnAnchor()&&(t=range.createFromNode(dom.ancestor(t.sc,dom.isAnchor))),t.toString()},this.pasteHTML=this.wrapCommand(function(t){var e=this.createRange().pasteHTML(t);range.createFromNodeAfter(list.last(e)).select()}),this.formatBlock=this.wrapCommand(function(t){t=agent.isMSIE?"<"+t+">":t,document.execCommand("FormatBlock",!1,t)}),this.formatPara=function(){this.formatBlock("P")},s.memo("help.formatPara",o.help.formatPara);for(v=1;v<=6;v++)this["formatH"+v]=function(t){return function(){this.formatBlock("H"+t)}}(v),s.memo("help.formatH"+v,o.help["formatH"+v]);this.fontSize=function(t){var e=this.createRange();if(e&&e.isCollapsed()){var i=u.styleNodes(e),n=list.head(i);$(i).css({"font-size":t+"px"}),n&&!dom.nodeLength(n)&&(n.innerHTML=dom.ZERO_WIDTH_NBSP_CHAR,range.createFromNodeAfter(n.firstChild).select(),a.data(KEY_BOGUS,n))}else f(),$(u.styleNodes(e)).css({"font-size":t+"px"}),m()},this.insertHorizontalRule=this.wrapCommand(function(){var t=this.createRange().insertNode(dom.create("HR"));t.nextSibling&&range.create(t.nextSibling,0).normalize().select()}),s.memo("help.insertHorizontalRule",o.help.insertHorizontalRule),this.removeBogus=function(){var t=a.data(KEY_BOGUS);if(t){var e=list.find(list.from(t.childNodes),dom.isText),i=e.nodeValue.indexOf(dom.ZERO_WIDTH_NBSP_CHAR);-1!==i&&e.deleteData(i,1),dom.isEmpty(t)&&dom.remove(t),a.removeData(KEY_BOGUS)}},this.lineHeight=this.wrapCommand(function(t){u.stylePara(this.createRange(),{lineHeight:t})}),this.unlink=function(){var t=this.createRange();if(t.isOnAnchor()){var e=dom.ancestor(t.sc,dom.isAnchor);(t=range.createFromNode(e)).select(),f(),document.execCommand("unlink"),m()}},this.createLink=this.wrapCommand(function(t){var i=t.url,e=t.text,n=t.isNewWindow,a=t.range||this.createRange(),s=a.toString()!==e;"string"==typeof i&&(i=i.trim()),c.onCreateLink&&(i=c.onCreateLink(i));var o=[];if(s){var r=(a=a.deleteContents()).insertNode($("<A>"+e+"</A>")[0]);o.push(r)}else o=u.styleNodes(a,{nodeName:"A",expandClosestSibling:!0,onlyPartialContains:!0});$.each(o,function(t,e){i=/^[A-Za-z][A-Za-z0-9+-.]*\:[\/\/]?/.test(i)?i:"http://"+i,$(e).attr("href",i),n?$(e).attr("target","_blank"):$(e).removeAttr("target")});var l=range.createFromNodeBefore(list.head(o)).getStartPoint(),d=range.createFromNodeAfter(list.last(o)).getEndPoint();range.create(l.node,l.offset,d.node,d.offset).select()}),this.getLinkInfo=function(){var t=this.createRange().expand(dom.isAnchor),e=$(list.head(t.nodes(dom.isAnchor)));return{range:t,text:t.toString(),isNewWindow:!!e.length&&"_blank"===e.attr("target"),url:e.length?e.attr("href"):""}},this.color=this.wrapCommand(function(t){var e=t.foreColor,i=t.backColor;e&&document.execCommand("foreColor",!1,e),i&&document.execCommand("backColor",!1,i)}),this.insertTable=this.wrapCommand(function(t){var e=t.split("x");this.createRange().deleteContents().insertNode(d.createTable(e[0],e[1],c))}),this.floatMe=this.wrapCommand(function(t){$(this.restoreTarget()).css("float",t)}),this.resize=this.wrapCommand(function(t){$(this.restoreTarget()).css({width:100*t+"%",height:""})}),this.resizeTo=function(t,e,i){var n;if(i){var a=t.y/t.x,s=e.data("ratio");n={width:a<s?t.x:t.y/s,height:a<s?t.x*s:t.y}}else n={width:t.x,height:t.y};e.css(n)},this.removeMedia=this.wrapCommand(function(){var t=$(this.restoreTarget()).detach();s.triggerEvent("media.delete",t,a)}),this.hasFocus=function(){return a.is(":focus")},this.focus=function(){this.hasFocus()||a.focus()},this.isEmpty=function(){return dom.isEmpty(a[0])||dom.emptyPara===a.html()},this.empty=function(){s.invoke("code",dom.emptyPara)}},Clipboard=function(r){var i=this,t=r.layoutInfo.editable;this.events={"summernote.keydown":function(t,e){i.needKeydownHook()&&(e.ctrlKey||e.metaKey)&&e.keyCode===key.code.V&&(r.invoke("editor.saveRange"),i.$paste.focus(),setTimeout(function(){i.pasteByHook()},0))}},this.needKeydownHook=function(){return agent.isMSIE&&10<agent.browserVersion||agent.isFF},this.initialize=function(){this.needKeydownHook()?(this.$paste=$('<div tabindex="-1" />').attr("contenteditable",!0).css({position:"absolute",left:-1e5,opacity:0}),t.before(this.$paste),this.$paste.on("paste",function(t){r.triggerEvent("paste",t)})):t.on("paste",this.pasteByEvent)},this.destroy=function(){this.needKeydownHook()&&(this.$paste.remove(),this.$paste=null)},this.pasteByHook=function(){var t=this.$paste[0].firstChild;if(dom.isImg(t)){for(var e=t.src,i=atob(e.split(",")[1]),n=new Uint8Array(i.length),a=0;a<i.length;a++)n[a]=i.charCodeAt(a);var s=new Blob([n],{type:"image/png"});s.name="clipboard.png",r.invoke("editor.restoreRange"),r.invoke("editor.focus"),r.invoke("editor.insertImagesOrCallback",[s])}else{var o=$("<div />").html(this.$paste.html()).html();r.invoke("editor.restoreRange"),r.invoke("editor.focus"),o&&r.invoke("editor.pasteHTML",o)}this.$paste.empty()},this.pasteByEvent=function(t){var e=t.originalEvent.clipboardData;if(e&&e.items&&e.items.length){var i=list.head(e.items);"file"===i.kind&&-1!==i.type.indexOf("image/")&&r.invoke("editor.insertImagesOrCallback",[i.getAsFile()]),r.invoke("editor.afterCommand")}}},Dropzone=function(s){var e=$(document),o=s.layoutInfo.editor,i=s.layoutInfo.editable,t=s.options,r=t.langInfo,l={},d=$(['<div class="note-dropzone">',' <div class="note-dropzone-message"/>',"</div>"].join("")).prependTo(o);this.initialize=function(){t.disableDragAndDrop?(l.onDrop=function(t){t.preventDefault()},e.on("drop",l.onDrop)):this.attachDragAndDropEvent()},this.attachDragAndDropEvent=function(){var n=$(),a=d.find(".note-dropzone-message");l.onDragenter=function(t){var e=s.invoke("codeview.isActivated"),i=0<o.width()&&0<o.height();e||n.length||!i||(o.addClass("dragover"),d.width(o.width()),d.height(o.height()),a.text(r.image.dragImageHere)),n=n.add(t.target)},l.onDragleave=function(t){(n=n.not(t.target)).length||o.removeClass("dragover")},l.onDrop=function(){n=$(),o.removeClass("dragover")},e.on("dragenter",l.onDragenter).on("dragleave",l.onDragleave).on("drop",l.onDrop),d.on("dragenter",function(){d.addClass("hover"),a.text(r.image.dropImage)}).on("dragleave",function(){d.removeClass("hover"),a.text(r.image.dragImageHere)}),d.on("drop",function(t){var n=t.originalEvent.dataTransfer;n&&n.files&&n.files.length?(t.preventDefault(),i.focus(),s.invoke("editor.insertImagesOrCallback",n.files)):$.each(n.types,function(t,e){var i=n.getData(e);-1<e.toLowerCase().indexOf("text")?s.invoke("editor.pasteHTML",i):$(i).each(function(){s.invoke("editor.insertNode",this)})})}).on("dragover",!1)},this.destroy=function(){Object.keys(l).forEach(function(t){e.off(t.substr(2).toLowerCase(),l[t])}),l={}}},CodeMirror;agent.hasCodeMirror&&(agent.isSupportAmd?require(["codemirror"],function(t){CodeMirror=t}):CodeMirror=window.CodeMirror);var Codeview=function(n){var a=n.layoutInfo.editor,s=n.layoutInfo.editable,o=n.layoutInfo.codable,r=n.options;this.sync=function(){this.isActivated()&&agent.hasCodeMirror&&o.data("cmEditor").save()},this.isActivated=function(){return a.hasClass("codeview")},this.toggle=function(){this.isActivated()?this.deactivate():this.activate(),n.triggerEvent("codeview.toggled")},this.activate=function(){if(o.val(dom.html(s,r.prettifyHtml)),o.height(s.height()),n.invoke("toolbar.updateCodeview",!0),a.addClass("codeview"),o.focus(),agent.hasCodeMirror){var t=CodeMirror.fromTextArea(o[0],r.codemirror);if(r.codemirror.tern){var e=new CodeMirror.TernServer(r.codemirror.tern);t.ternServer=e,t.on("cursorActivity",function(t){e.updateArgHints(t)})}t.setSize(null,s.outerHeight()),o.data("cmEditor",t)}},this.deactivate=function(){if(agent.hasCodeMirror){var t=o.data("cmEditor");o.val(t.getValue()),t.toTextArea()}var e=dom.value(o,r.prettifyHtml)||dom.emptyPara,i=s.html()!==e;s.html(e),s.height(r.height?o.height():"auto"),a.removeClass("codeview"),i&&n.triggerEvent("change",s.html(),s),s.focus(),n.invoke("toolbar.updateCodeview",!1)},this.destroy=function(){this.isActivated()&&this.deactivate()}},EDITABLE_PADDING=24,Statusbar=function(t){var e=$(document),i=t.layoutInfo.statusbar,n=t.layoutInfo.editable,a=t.options;this.initialize=function(){a.airMode||a.disableResizeEditor||i.on("mousedown",function(t){t.preventDefault(),t.stopPropagation();var i=n.offset().top-e.scrollTop();e.on("mousemove",function(t){var e=t.clientY-(i+EDITABLE_PADDING);e=0<a.minheight?Math.max(e,a.minheight):e,e=0<a.maxHeight?Math.min(e,a.maxHeight):e,n.height(e)}).one("mouseup",function(){e.off("mousemove")})})},this.destroy=function(){i.off(),i.remove()}},Fullscreen=function(e){var i=e.layoutInfo.editor,n=e.layoutInfo.toolbar,a=e.layoutInfo.editable,s=e.layoutInfo.codable,o=$(window),r=$("html, body");this.toggle=function(){var t=function(t){a.css("height",t.h),s.css("height",t.h),s.data("cmeditor")&&s.data("cmeditor").setsize(null,t.h)};i.toggleClass("fullscreen"),this.isFullscreen()?(a.data("orgHeight",a.css("height")),o.on("resize",function(){t({h:o.height()-n.outerHeight()})}).trigger("resize"),r.css("overflow","hidden")):(o.off("resize"),t({h:a.data("orgHeight")}),r.css("overflow","visible")),e.invoke("toolbar.updateFullscreen",this.isFullscreen())},this.isFullscreen=function(){return i.hasClass("fullscreen")}},Handle=function(r){var a=this,s=$(document),t=r.layoutInfo.editingArea,e=r.options;this.events={"summernote.mousedown":function(t,e){a.update(e.target)&&e.preventDefault()},"summernote.keyup summernote.scroll summernote.change summernote.dialog.shown":function(){a.update()}},this.initialize=function(){this.$handle=$(['<div class="note-handle">','<div class="note-control-selection">','<div class="note-control-selection-bg"></div>','<div class="note-control-holder note-control-nw"></div>','<div class="note-control-holder note-control-ne"></div>','<div class="note-control-holder note-control-sw"></div>','<div class="',e.disableResizeImage?"note-control-holder":"note-control-sizing",' note-control-se"></div>',e.disableResizeImage?"":'<div class="note-control-selection-info"></div>',"</div>","</div>"].join("")).prependTo(t),this.$handle.on("mousedown",function(t){if(dom.isControlSizing(t.target)){t.preventDefault(),t.stopPropagation();var e=a.$handle.find(".note-control-selection").data("target"),i=e.offset(),n=s.scrollTop();s.on("mousemove",function(t){r.invoke("editor.resizeTo",{x:t.clientX-i.left,y:t.clientY-(i.top-n)},e,!t.shiftKey),a.update(e[0])}).one("mouseup",function(t){t.preventDefault(),s.off("mousemove"),r.invoke("editor.afterCommand")}),e.data("ratio")||e.data("ratio",e.height()/e.width())}})},this.destroy=function(){this.$handle.remove()},this.update=function(t){var e=dom.isImg(t),i=this.$handle.find(".note-control-selection");if(r.invoke("imagePopover.update",t),e){var n=$(t),a=n.position(),s={w:n.outerWidth(!0),h:n.outerHeight(!0)};i.css({display:"block",left:a.left,top:a.top,width:s.w,height:s.h}).data("target",n);var o=s.w+"x"+s.h;i.find(".note-control-selection-info").text(o),r.invoke("editor.saveTarget",t)}else this.hide();return e},this.hide=function(){r.invoke("editor.clearTarget"),this.$handle.children().hide()}},AutoLink=function(a){var i=this,s=/^([A-Za-z][A-Za-z0-9+-.]*\:[\/\/]?|mailto:[A-Z0-9._%+-]+@)?(www\.)?(.+)#x2F;i;this.events={"summernote.keyup":function(t,e){e.isDefaultPrevented()||i.handleKeyup(e)},"summernote.keydown":function(t,e){i.handleKeydown(e)}},this.initialize=function(){this.lastWordRange=null},this.destroy=function(){this.lastWordRange=null},this.replace=function(){if(this.lastWordRange){var t=this.lastWordRange.toString(),e=t.match(s);if(e&&(e[1]||e[2])){var i=e[1]?t:"http://"+t,n=$("<a />").html(t).attr("href",i)[0];this.lastWordRange.insertNode(n),this.lastWordRange=null,a.invoke("editor.focus")}}},this.handleKeydown=function(t){if(list.contains([key.code.ENTER,key.code.SPACE],t.keyCode)){var e=a.invoke("editor.createRange").getWordRange();this.lastWordRange=e}},this.handleKeyup=function(t){list.contains([key.code.ENTER,key.code.SPACE],t.keyCode)&&this.replace()}},AutoSync=function(t){var e=t.layoutInfo.note;this.events={"summernote.change":function(){e.val(t.invoke("code"))}},this.shouldInitialize=function(){return dom.isTextarea(e[0])}},Placeholder=function(e){var t=this,i=e.layoutInfo.editingArea,n=e.options;this.events={"summernote.init summernote.change":function(){t.update()},"summernote.codeview.toggled":function(){t.update()}},this.shouldInitialize=function(){return!!n.placeholder},this.initialize=function(){this.$placeholder=$('<div class="note-placeholder">'),this.$placeholder.on("click",function(){e.invoke("focus")}).text(n.placeholder).prependTo(i)},this.destroy=function(){this.$placeholder.remove()},this.update=function(){var t=!e.invoke("codeview.isActivated")&&e.invoke("editor.isEmpty");this.$placeholder.toggle(t)}},Buttons=function(u){var o=this,h=$.summernote.ui,s=u.layoutInfo.toolbar,c=u.options,r=c.langInfo,i=func.invertObject(c.keyMap[agent.isMac?"mac":"pc"]),l=this.representShortcut=function(t){var e=i[t];return c.shortcuts&&e?(agent.isMac&&(e=e.replace("CMD","⌘").replace("SHIFT","⇧"))," ("+(e=e.replace("BACKSLASH","\\").replace("SLASH","/").replace("LEFTBRACKET","[").replace("RIGHTBRACKET","]"))+")"):""};this.initialize=function(){this.addToolbarButtons(),this.addImagePopoverButtons(),this.addLinkPopoverButtons(),this.fontInstalledMap={}},this.destroy=function(){delete this.fontInstalledMap},this.isFontInstalled=function(t){return o.fontInstalledMap.hasOwnProperty(t)||(o.fontInstalledMap[t]=agent.isFontInstalled(t)||list.contains(c.fontNamesIgnoreCheck,t)),o.fontInstalledMap[t]},this.addToolbarButtons=function(){u.memo("button.style",function(){return h.buttonGroup([h.button({className:"dropdown-toggle",contents:h.icon(c.icons.magic)+" "+h.icon(c.icons.caret,"span"),tooltip:r.style.style,data:{toggle:"dropdown"}}),h.dropdown({className:"dropdown-style",items:u.options.styleTags,template:function(t){"string"==typeof t&&(t={tag:t,title:r.style.hasOwnProperty(t)?r.style[t]:t});var e=t.tag,i=t.title;return"<"+e+(t.style?' style="'+t.style+'" ':"")+(t.className?' class="'+t.className+'"':"")+">"+i+"</"+e+">"},click:u.createInvokeHandler("editor.formatBlock")})]).render()}),u.memo("button.bold",function(){return h.button({className:"note-btn-bold",contents:h.icon(c.icons.bold),tooltip:r.font.bold+l("bold"),click:u.createInvokeHandler("editor.bold")}).render()}),u.memo("button.italic",function(){return h.button({className:"note-btn-italic",contents:h.icon(c.icons.italic),tooltip:r.font.italic+l("italic"),click:u.createInvokeHandler("editor.italic")}).render()}),u.memo("button.underline",function(){return h.button({className:"note-btn-underline",contents:h.icon(c.icons.underline),tooltip:r.font.underline+l("underline"),click:u.createInvokeHandler("editor.underline")}).render()}),u.memo("button.clear",function(){return h.button({contents:h.icon(c.icons.eraser),tooltip:r.font.clear+l("removeFormat"),click:u.createInvokeHandler("editor.removeFormat")}).render()}),u.memo("button.strikethrough",function(){return h.button({className:"note-btn-strikethrough",contents:h.icon(c.icons.strikethrough),tooltip:r.font.strikethrough+l("strikethrough"),click:u.createInvokeHandler("editor.strikethrough")}).render()}),u.memo("button.superscript",function(){return h.button({className:"note-btn-superscript",contents:h.icon(c.icons.superscript),tooltip:r.font.superscript,click:u.createInvokeHandler("editor.superscript")}).render()}),u.memo("button.subscript",function(){return h.button({className:"note-btn-subscript",contents:h.icon(c.icons.subscript),tooltip:r.font.subscript,click:u.createInvokeHandler("editor.subscript")}).render()}),u.memo("button.fontname",function(){return h.buttonGroup([h.button({className:"dropdown-toggle",contents:'<span class="note-current-fontname"/> '+h.icon(c.icons.caret,"span"),tooltip:r.font.name,data:{toggle:"dropdown"}}),h.dropdownCheck({className:"dropdown-fontname",checkClassName:c.icons.menuCheck,items:c.fontNames.filter(o.isFontInstalled),template:function(t){return'<span style="font-family:'+t+'">'+t+"</span>"},click:u.createInvokeHandler("editor.fontName")})]).render()}),u.memo("button.fontsize",function(){return h.buttonGroup([h.button({className:"dropdown-toggle",contents:'<span class="note-current-fontsize"/>'+h.icon(c.icons.caret,"span"),tooltip:r.font.size,data:{toggle:"dropdown"}}),h.dropdownCheck({className:"dropdown-fontsize",checkClassName:c.icons.menuCheck,items:c.fontSizes,click:u.createInvokeHandler("editor.fontSize")})]).render()}),u.memo("button.color",function(){return h.buttonGroup({className:"note-color",children:[h.button({className:"note-current-color-button",contents:h.icon(c.icons.font+" note-recent-color"),tooltip:r.color.recent,click:function(t){var e=$(t.currentTarget);u.invoke("editor.color",{backColor:e.attr("data-backColor"),foreColor:e.attr("data-foreColor")})},callback:function(t){t.find(".note-recent-color").css("background-color","#FFFF00"),t.attr("data-backColor","#FFFF00")}}),h.button({className:"dropdown-toggle",contents:h.icon(c.icons.caret,"span"),tooltip:r.color.more,data:{toggle:"dropdown"}}),h.dropdown({items:["<li>",'<div class="btn-group">',' <div class="note-palette-title">'+r.color.background+"</div>"," <div>",' <button type="button" class="note-color-reset btn btn-default" data-event="backColor" data-value="inherit">',r.color.transparent," </button>"," </div>",' <div class="note-holder" data-event="backColor"/>',"</div>",'<div class="btn-group">',' <div class="note-palette-title">'+r.color.foreground+"</div>"," <div>",' <button type="button" class="note-color-reset btn btn-default" data-event="removeFormat" data-value="foreColor">',r.color.resetToDefault," </button>"," </div>",' <div class="note-holder" data-event="foreColor"/>',"</div>","</li>"].join(""),callback:function(t){t.find(".note-holder").each(function(){var t=$(this);t.append(h.palette({colors:c.colors,eventName:t.data("event")}).render())})},click:function(t){var e=$(t.target),i=e.data("event"),n=e.data("value");if(i&&n){var a="backColor"===i?"background-color":"color",s=e.closest(".note-color").find(".note-recent-color"),o=e.closest(".note-color").find(".note-current-color-button");s.css(a,n),o.attr("data-"+i,n),u.invoke("editor."+i,n)}}})]}).render()}),u.memo("button.ul",function(){return h.button({contents:h.icon(c.icons.unorderedlist),tooltip:r.lists.unordered+l("insertUnorderedList"),click:u.createInvokeHandler("editor.insertUnorderedList")}).render()}),u.memo("button.ol",function(){return h.button({contents:h.icon(c.icons.orderedlist),tooltip:r.lists.ordered+l("insertOrderedList"),click:u.createInvokeHandler("editor.insertOrderedList")}).render()});var t=h.button({contents:h.icon(c.icons.alignLeft),tooltip:r.paragraph.left+l("justifyLeft"),click:u.createInvokeHandler("editor.justifyLeft")}),e=h.button({contents:h.icon(c.icons.alignCenter),tooltip:r.paragraph.center+l("justifyCenter"),click:u.createInvokeHandler("editor.justifyCenter")}),i=h.button({contents:h.icon(c.icons.alignRight),tooltip:r.paragraph.right+l("justifyRight"),click:u.createInvokeHandler("editor.justifyRight")}),n=h.button({contents:h.icon(c.icons.alignJustify),tooltip:r.paragraph.justify+l("justifyFull"),click:u.createInvokeHandler("editor.justifyFull")}),a=h.button({contents:h.icon(c.icons.outdent),tooltip:r.paragraph.outdent+l("outdent"),click:u.createInvokeHandler("editor.outdent")}),s=h.button({contents:h.icon(c.icons.indent),tooltip:r.paragraph.indent+l("indent"),click:u.createInvokeHandler("editor.indent")});u.memo("button.justifyLeft",func.invoke(t,"render")),u.memo("button.justifyCenter",func.invoke(e,"render")),u.memo("button.justifyRight",func.invoke(i,"render")),u.memo("button.justifyFull",func.invoke(n,"render")),u.memo("button.outdent",func.invoke(a,"render")),u.memo("button.indent",func.invoke(s,"render")),u.memo("button.paragraph",function(){return h.buttonGroup([h.button({className:"dropdown-toggle",contents:h.icon(c.icons.alignLeft)+" "+h.icon(c.icons.caret,"span"),tooltip:r.paragraph.paragraph,data:{toggle:"dropdown"}}),h.dropdown([h.buttonGroup({className:"note-align",children:[t,e,i,n]}),h.buttonGroup({className:"note-list",children:[a,s]})])]).render()}),u.memo("button.height",function(){return h.buttonGroup([h.button({className:"dropdown-toggle",contents:h.icon(c.icons.textHeight)+" "+h.icon(c.icons.caret,"span"),tooltip:r.font.height,data:{toggle:"dropdown"}}),h.dropdownCheck({items:c.lineHeights,checkClassName:c.icons.menuCheck,className:"dropdown-line-height",click:u.createInvokeHandler("editor.lineHeight")})]).render()}),u.memo("button.table",function(){return h.buttonGroup([h.button({className:"dropdown-toggle",contents:h.icon(c.icons.table)+" "+h.icon(c.icons.caret,"span"),tooltip:r.table.table,data:{toggle:"dropdown"}}),h.dropdown({className:"note-table",items:['<div class="note-dimension-picker">',' <div class="note-dimension-picker-mousecatcher" data-event="insertTable" data-value="1x1"/>',' <div class="note-dimension-picker-highlighted"/>',' <div class="note-dimension-picker-unhighlighted"/>',"</div>",'<div class="note-dimension-display">1 x 1</div>'].join("")})],{callback:function(t){t.find(".note-dimension-picker-mousecatcher").css({width:c.insertTableMaxSize.col+"em",height:c.insertTableMaxSize.row+"em"}).mousedown(u.createInvokeHandler("editor.insertTable")).on("mousemove",o.tableMoveHandler)}}).render()}),u.memo("button.link",function(){return h.button({contents:h.icon(c.icons.link),tooltip:r.link.link+l("linkDialog.show"),click:u.createInvokeHandler("linkDialog.show")}).render()}),u.memo("button.picture",function(){return h.button({contents:h.icon(c.icons.picture),tooltip:r.image.image,click:u.createInvokeHandler("imageDialog.show")}).render()}),u.memo("button.video",function(){return h.button({contents:h.icon(c.icons.video),tooltip:r.video.video,click:u.createInvokeHandler("videoDialog.show")}).render()}),u.memo("button.hr",function(){return h.button({contents:h.icon(c.icons.minus),tooltip:r.hr.insert+l("insertHorizontalRule"),click:u.createInvokeHandler("editor.insertHorizontalRule")}).render()}),u.memo("button.fullscreen",function(){return h.button({className:"btn-fullscreen",contents:h.icon(c.icons.arrowsAlt),tooltip:r.options.fullscreen,click:u.createInvokeHandler("fullscreen.toggle")}).render()}),u.memo("button.codeview",function(){return h.button({className:"btn-codeview",contents:h.icon(c.icons.code),tooltip:r.options.codeview,click:u.createInvokeHandler("codeview.toggle")}).render()}),u.memo("button.redo",function(){return h.button({contents:h.icon(c.icons.redo),tooltip:r.history.redo+l("redo"),click:u.createInvokeHandler("editor.redo")}).render()}),u.memo("button.undo",function(){return h.button({contents:h.icon(c.icons.undo),tooltip:r.history.undo+l("undo"),click:u.createInvokeHandler("editor.undo")}).render()}),u.memo("button.help",function(){return h.button({contents:h.icon(c.icons.question),tooltip:r.options.help,click:u.createInvokeHandler("helpDialog.show")}).render()})},this.addImagePopoverButtons=function(){u.memo("button.imageSize100",function(){return h.button({contents:'<span class="note-fontsize-10">100%</span>',tooltip:r.image.resizeFull,click:u.createInvokeHandler("editor.resize","1")}).render()}),u.memo("button.imageSize50",function(){return h.button({contents:'<span class="note-fontsize-10">50%</span>',tooltip:r.image.resizeHalf,click:u.createInvokeHandler("editor.resize","0.5")}).render()}),u.memo("button.imageSize25",function(){return h.button({contents:'<span class="note-fontsize-10">25%</span>',tooltip:r.image.resizeQuarter,click:u.createInvokeHandler("editor.resize","0.25")}).render()}),u.memo("button.floatLeft",function(){return h.button({contents:h.icon(c.icons.alignLeft),tooltip:r.image.floatLeft,click:u.createInvokeHandler("editor.floatMe","left")}).render()}),u.memo("button.floatRight",function(){return h.button({contents:h.icon(c.icons.alignRight),tooltip:r.image.floatRight,click:u.createInvokeHandler("editor.floatMe","right")}).render()}),u.memo("button.floatNone",function(){return h.button({contents:h.icon(c.icons.alignJustify),tooltip:r.image.floatNone,click:u.createInvokeHandler("editor.floatMe","none")}).render()}),u.memo("button.removeMedia",function(){return h.button({contents:h.icon(c.icons.trash),tooltip:r.image.remove,click:u.createInvokeHandler("editor.removeMedia")}).render()})},this.addLinkPopoverButtons=function(){u.memo("button.linkDialogShow",function(){return h.button({contents:h.icon(c.icons.link),tooltip:r.link.edit,click:u.createInvokeHandler("linkDialog.show")}).render()}),u.memo("button.unlink",function(){return h.button({contents:h.icon(c.icons.unlink),tooltip:r.link.unlink,click:u.createInvokeHandler("editor.unlink")}).render()})},this.build=function(t,e){for(var i=0,n=e.length;i<n;i++){for(var a=e[i],s=a[0],o=a[1],r=h.buttonGroup({className:"note-"+s}).render(),l=0,d=o.length;l<d;l++){var c=u.memo("button."+o[l]);c&&r.append("function"==typeof c?c(u):c)}r.appendTo(t)}},this.updateCurrentStyle=function(){var t=u.invoke("editor.currentStyle");if(this.updateBtnStates({".note-btn-bold":function(){return"bold"===t["font-bold"]},".note-btn-italic":function(){return"italic"===t["font-italic"]},".note-btn-underline":function(){return"underline"===t["font-underline"]},".note-btn-subscript":function(){return"subscript"===t["font-subscript"]},".note-btn-superscript":function(){return"superscript"===t["font-superscript"]},".note-btn-strikethrough":function(){return"strikethrough"===t["font-strikethrough"]}}),t["font-family"]){var e=t["font-family"].split(",").map(function(t){return t.replace(/[\'\"]/g,"").replace(/\s+#x2F;,"").replace(/^\s+/,"")}),i=list.find(e,o.isFontInstalled);s.find(".dropdown-fontname li a").each(function(){var t=$(this).data("value")+""==i+"";this.className=t?"checked":""}),s.find(".note-current-fontname").text(i)}if(t["font-size"]){var n=t["font-size"];s.find(".dropdown-fontsize li a").each(function(){var t=$(this).data("value")+""==n+"";this.className=t?"checked":""}),s.find(".note-current-fontsize").text(n)}if(t["line-height"]){var a=t["line-height"];s.find(".dropdown-line-height li a").each(function(){var t=$(this).data("value")+""==a+"";this.className=t?"checked":""})}},this.updateBtnStates=function(t){$.each(t,function(t,e){h.toggleBtnActive(s.find(t),e())})},this.tableMoveHandler=function(t){var e,i=$(t.target.parentNode),n=i.next(),a=i.find(".note-dimension-picker-mousecatcher"),s=i.find(".note-dimension-picker-highlighted"),o=i.find(".note-dimension-picker-unhighlighted");if(void 0===t.offsetX){var r=$(t.target).offset();e={x:t.pageX-r.left,y:t.pageY-r.top}}else e={x:t.offsetX,y:t.offsetY};var l=Math.ceil(e.x/18)||1,d=Math.ceil(e.y/18)||1;s.css({width:l+"em",height:d+"em"}),a.data("value",l+"x"+d),3<l&&l<c.insertTableMaxSize.col&&o.css({width:l+1+"em"}),3<d&&d<c.insertTableMaxSize.row&&o.css({height:d+1+"em"}),n.html(l+" x "+d)}},Toolbar=function(t){var i=$.summernote.ui,e=t.layoutInfo.note,n=t.layoutInfo.toolbar,a=t.options;this.shouldInitialize=function(){return!a.airMode},this.initialize=function(){a.toolbar=a.toolbar||[],a.toolbar.length?t.invoke("buttons.build",n,a.toolbar):n.hide(),a.toolbarContainer&&n.appendTo(a.toolbarContainer),e.on("summernote.keyup summernote.mouseup summernote.change",function(){t.invoke("buttons.updateCurrentStyle")}),t.invoke("buttons.updateCurrentStyle")},this.destroy=function(){n.children().remove()},this.updateFullscreen=function(t){i.toggleBtnActive(n.find(".btn-fullscreen"),t)},this.updateCodeview=function(t){i.toggleBtnActive(n.find(".btn-codeview"),t),t?this.deactivate():this.activate()},this.activate=function(t){var e=n.find("button");t||(e=e.not(".btn-codeview")),i.toggleBtn(e,!0)},this.deactivate=function(t){var e=n.find("button");t||(e=e.not(".btn-codeview")),i.toggleBtn(e,!1)}},LinkDialog=function(l){var d=this,c=$.summernote.ui,n=l.layoutInfo.editor,a=l.options,s=a.langInfo;this.initialize=function(){var t=a.dialogsInBody?$(document.body):n,e='<div class="form-group"><label>'+s.link.textToDisplay+'</label><input class="note-link-text form-control" type="text" /></div><div class="form-group"><label>'+s.link.url+'</label><input class="note-link-url form-control" type="text" value="http://" /></div>'+(a.disableLinkTarget?"":'<div class="checkbox"><label><input type="checkbox" checked> '+s.link.openInNewWindow+"</label></div>"),i='<button href="#" class="btn btn-primary note-link-btn disabled" disabled>'+s.link.insert+"</button>";this.$dialog=c.dialog({className:"link-dialog",title:s.link.insert,fade:a.dialogsFade,body:e,footer:i}).render().appendTo(t)},this.destroy=function(){c.hideDialog(this.$dialog),this.$dialog.remove()},this.bindEnterKey=function(t,e){t.on("keypress",function(t){t.keyCode===key.code.ENTER&&e.trigger("click")})},this.toggleLinkBtn=function(t,e,i){c.toggleBtn(t,e.val()&&i.val())},this.showLinkDialog=function(r){return $.Deferred(function(i){var n=d.$dialog.find(".note-link-text"),a=d.$dialog.find(".note-link-url"),s=d.$dialog.find(".note-link-btn"),o=d.$dialog.find("input[type=checkbox]");c.onDialogShown(d.$dialog,function(){l.triggerEvent("dialog.shown"),r.url||(r.url=r.text),n.val(r.text);var t=function(){d.toggleLinkBtn(s,n,a),r.text=n.val()};n.on("input",t).on("paste",function(){setTimeout(t,0)});var e=function(){d.toggleLinkBtn(s,n,a),r.text||n.val(a.val())};a.on("input",e).on("paste",function(){setTimeout(e,0)}).val(r.url).trigger("focus"),d.toggleLinkBtn(s,n,a),d.bindEnterKey(a,s),d.bindEnterKey(n,s),o.prop("checked",r.isNewWindow),s.one("click",function(t){t.preventDefault(),i.resolve({range:r.range,url:a.val(),text:n.val(),isNewWindow:o.is(":checked")}),d.$dialog.modal("hide")})}),c.onDialogHidden(d.$dialog,function(){n.off("input paste keypress"),a.off("input paste keypress"),s.off("click"),"pending"===i.state()&&i.reject()}),c.showDialog(d.$dialog)}).promise()},this.show=function(){var t=l.invoke("editor.getLinkInfo");l.invoke("editor.saveRange"),this.showLinkDialog(t).then(function(t){l.invoke("editor.restoreRange"),l.invoke("editor.createLink",t)}).fail(function(){l.invoke("editor.restoreRange")})},l.memo("help.linkDialog.show",a.langInfo.help["linkDialog.show"])},LinkPopover=function(a){var t=this,e=$.summernote.ui,i=a.options;this.events={"summernote.keyup summernote.mouseup summernote.change summernote.scroll":function(){t.update()},"summernote.dialog.shown":function(){t.hide()}},this.shouldInitialize=function(){return!list.isEmpty(i.popover.link)},this.initialize=function(){this.$popover=e.popover({className:"note-link-popover",callback:function(t){t.find(".popover-content").prepend('<span><a target="_blank"></a>&nbsp;</span>')}}).render().appendTo("body");var t=this.$popover.find(".popover-content");a.invoke("buttons.build",t,i.popover.link)},this.destroy=function(){this.$popover.remove()},this.update=function(){if(a.invoke("editor.hasFocus")){var t=a.invoke("editor.createRange");if(t.isCollapsed()&&t.isOnAnchor()){var e=dom.ancestor(t.sc,dom.isAnchor),i=$(e).attr("href");this.$popover.find("a").attr("href",i).html(i);var n=dom.posFromPlaceholder(e);this.$popover.css({display:"block",left:n.left,top:n.top})}else this.hide()}else this.hide()},this.hide=function(){this.$popover.hide()}},ImageDialog=function(a){var s=this,o=$.summernote.ui,r=a.layoutInfo.editor,l=a.options,d=l.langInfo;this.initialize=function(){var t=l.dialogsInBody?$(document.body):r,e="";if(l.maximumImageFileSize){var i=Math.floor(Math.log(l.maximumImageFileSize)/Math.log(1024)),n=1*(l.maximumImageFileSize/Math.pow(1024,i)).toFixed(2)+" "+" KMGTP"[i]+"B";e="<small>"+d.image.maximumFileSize+" : "+n+"</small>"}var a='<div class="form-group note-group-select-from-files"><label>'+d.image.selectFromFiles+'</label><input class="note-image-input form-control" type="file" name="files" accept="image/*" multiple="multiple" />'+e+'</div><div class="form-group note-group-image-url" style="overflow:auto;"><label>'+d.image.url+'</label><input class="note-image-url form-control col-md-12" type="text" /></div>',s='<button href="#" class="btn btn-primary note-image-btn disabled" disabled>'+d.image.insert+"</button>";this.$dialog=o.dialog({title:d.image.insert,fade:l.dialogsFade,body:a,footer:s}).render().appendTo(t)},this.destroy=function(){o.hideDialog(this.$dialog),this.$dialog.remove()},this.bindEnterKey=function(t,e){t.on("keypress",function(t){t.keyCode===key.code.ENTER&&e.trigger("click")})},this.show=function(){a.invoke("editor.saveRange"),this.showImageDialog().then(function(t){o.hideDialog(s.$dialog),a.invoke("editor.restoreRange"),"string"==typeof t?a.invoke("editor.insertImage",t):a.invoke("editor.insertImagesOrCallback",t)}).fail(function(){a.invoke("editor.restoreRange")})},this.showImageDialog=function(){return $.Deferred(function(e){var t=s.$dialog.find(".note-image-input"),i=s.$dialog.find(".note-image-url"),n=s.$dialog.find(".note-image-btn");o.onDialogShown(s.$dialog,function(){a.triggerEvent("dialog.shown"),t.replaceWith(t.clone().on("change",function(){e.resolve(this.files||this.value)}).val("")),n.click(function(t){t.preventDefault(),e.resolve(i.val())}),i.on("keyup paste",function(){var t=i.val();o.toggleBtn(n,t)}).val("").trigger("focus"),s.bindEnterKey(i,n)}),o.onDialogHidden(s.$dialog,function(){t.off("change"),i.off("keyup paste keypress"),n.off("click"),"pending"===e.state()&&e.reject()}),o.showDialog(s.$dialog)})}},ImagePopover=function(e){var i=$.summernote.ui,n=e.options;this.shouldInitialize=function(){return!list.isEmpty(n.popover.image)},this.initialize=function(){this.$popover=i.popover({className:"note-image-popover"}).render().appendTo("body");var t=this.$popover.find(".popover-content");e.invoke("buttons.build",t,n.popover.image)},this.destroy=function(){this.$popover.remove()},this.update=function(t){if(dom.isImg(t)){var e=dom.posFromPlaceholder(t);this.$popover.css({display:"block",left:e.left,top:e.top})}else this.hide()},this.hide=function(){this.$popover.hide()}},VideoDialog=function(a){var s=this,o=$.summernote.ui,n=a.layoutInfo.editor,r=a.options,l=r.langInfo;this.initialize=function(){var t=r.dialogsInBody?$(document.body):n,e='<div class="form-group row-fluid"><label>'+l.video.url+' <small class="text-muted">'+l.video.providers+'</small></label><input class="note-video-url form-control span12" type="text" /></div>',i='<button href="#" class="btn btn-primary note-video-btn disabled" disabled>'+l.video.insert+"</button>";this.$dialog=o.dialog({title:l.video.insert,fade:r.dialogsFade,body:e,footer:i}).render().appendTo(t)},this.destroy=function(){o.hideDialog(this.$dialog),this.$dialog.remove()},this.bindEnterKey=function(t,e){t.on("keypress",function(t){t.keyCode===key.code.ENTER&&e.trigger("click")})},this.createVideoNode=function(t){var e,i=t.match(/^(?:https?:\/\/)?(?:www\.)?(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))((\w|-){11})(?:\S+)?#x2F;),n=t.match(/(?:www\.|\/\/)instagram\.com\/p\/(.[a-zA-Z0-9_-]*)/),a=t.match(/\/\/vine\.co\/v\/([a-zA-Z0-9]+)/),s=t.match(/\/\/(player\.)?vimeo\.com\/([a-z]*\/)*([0-9]{6,11})[?]?.*/),o=t.match(/.+dailymotion.com\/(video|hub)\/([^_]+)[^#]*(#video=([^_&]+))?/),r=t.match(/\/\/v\.youku\.com\/v_show\/id_(\w+)=*\.html/),l=t.match(/^.+.(mp4|m4v)#x2F;),d=t.match(/^.+.(ogg|ogv)#x2F;),c=t.match(/^.+.(webm)#x2F;);if(i&&11===i[1].length){var u=i[1];e=$("<iframe>").attr("frameborder",0).attr("src","//www.youtube.com/embed/"+u).attr("width","640").attr("height","360")}else if(n&&n[0].length)e=$("<iframe>").attr("frameborder",0).attr("src","https://instagram.com/p/"+n[1]+"/embed/").attr("width","612").attr("height","710").attr("scrolling","no").attr("allowtransparency","true");else if(a&&a[0].length)e=$("<iframe>").attr("frameborder",0).attr("src",a[0]+"/embed/simple").attr("width","600").attr("height","600").attr("class","vine-embed");else if(s&&s[3].length)e=$("<iframe webkitallowfullscreen mozallowfullscreen allowfullscreen>").attr("frameborder",0).attr("src","//player.vimeo.com/video/"+s[3]).attr("width","640").attr("height","360");else if(o&&o[2].length)e=$("<iframe>").attr("frameborder",0).attr("src","//www.dailymotion.com/embed/video/"+o[2]).attr("width","640").attr("height","360");else if(r&&r[1].length)e=$("<iframe webkitallowfullscreen mozallowfullscreen allowfullscreen>").attr("frameborder",0).attr("height","498").attr("width","510").attr("src","//player.youku.com/embed/"+r[1]);else{if(!(l||d||c))return!1;e=$("<video controls>").attr("src",t).attr("width","640").attr("height","360")}return e.addClass("note-video-clip"),e[0]},this.show=function(){var t=a.invoke("editor.getSelectedText");a.invoke("editor.saveRange"),this.showVideoDialog(t).then(function(t){o.hideDialog(s.$dialog),a.invoke("editor.restoreRange");var e=s.createVideoNode(t);e&&a.invoke("editor.insertNode",e)}).fail(function(){a.invoke("editor.restoreRange")})},this.showVideoDialog=function(n){return $.Deferred(function(e){var i=s.$dialog.find(".note-video-url"),t=s.$dialog.find(".note-video-btn");o.onDialogShown(s.$dialog,function(){a.triggerEvent("dialog.shown"),i.val(n).on("input",function(){o.toggleBtn(t,i.val())}).trigger("focus"),t.click(function(t){t.preventDefault(),e.resolve(i.val())}),s.bindEnterKey(i,t)}),o.onDialogHidden(s.$dialog,function(){i.off("input"),t.off("click"),"pending"===e.state()&&e.reject()}),o.showDialog(s.$dialog)})}},HelpDialog=function(a){var e=this,i=$.summernote.ui,n=a.layoutInfo.editor,s=a.options,o=s.langInfo;this.createShortCutList=function(){var n=s.keyMap[agent.isMac?"mac":"pc"];return Object.keys(n).map(function(t){var e=n[t],i=$('<div><div class="help-list-item"/></div>');return i.append($("<label><kbd>"+t+"</kdb></label>").css({width:180,"margin-right":10})).append($("<span/>").html(a.memo("help."+e)||e)),i.html()}).join("")},this.initialize=function(){var t=s.dialogsInBody?$(document.body):n,e=['<p class="text-center">','<a href="http://summernote.org/" target="_blank">Summernote 0.8.2</a> · ','<a href="https://github.com/summernote/summernote" target="_blank">Project</a> · ','<a href="https://github.com/summernote/summernote/issues" target="_blank">Issues</a>',"</p>"].join("");this.$dialog=i.dialog({title:o.options.help,fade:s.dialogsFade,body:this.createShortCutList(),footer:e,callback:function(t){t.find(".modal-body").css({"max-height":300,overflow:"scroll"})}}).render().appendTo(t)},this.destroy=function(){i.hideDialog(this.$dialog),this.$dialog.remove()},this.showHelpDialog=function(){return $.Deferred(function(t){i.onDialogShown(e.$dialog,function(){a.triggerEvent("dialog.shown"),t.resolve()}),i.showDialog(e.$dialog)}).promise()},this.show=function(){a.invoke("editor.saveRange"),this.showHelpDialog().then(function(){a.invoke("editor.restoreRange")})}},AirPopover=function(n){var i=this,e=$.summernote.ui,a=n.options;this.events={"summernote.keyup summernote.mouseup summernote.scroll":function(){i.update()},"summernote.change summernote.dialog.shown":function(){i.hide()},"summernote.focusout":function(t,e){agent.isFF||e.relatedTarget&&dom.ancestor(e.relatedTarget,func.eq(i.$popover[0]))||i.hide()}},this.shouldInitialize=function(){return a.airMode&&!list.isEmpty(a.popover.air)},this.initialize=function(){this.$popover=e.popover({className:"note-air-popover"}).render().appendTo("body");var t=this.$popover.find(".popover-content");n.invoke("buttons.build",t,a.popover.air)},this.destroy=function(){this.$popover.remove()},this.update=function(){var t=n.invoke("editor.currentStyle");if(t.range&&!t.range.isCollapsed()){var e=list.last(t.range.getClientRects());if(e){var i=func.rect2bnd(e);this.$popover.css({display:"block",left:Math.max(i.left+i.width/2,0)-20,top:i.top+i.height})}}else this.hide()},this.hide=function(){this.$popover.hide()}},HintPopover=function(a){var s=this,t=$.summernote.ui,e=a.options.hint||[],o=a.options.hintDirection||"bottom",r=$.isArray(e)?e:[e];this.events={"summernote.keyup":function(t,e){e.isDefaultPrevented()||s.handleKeyup(e)},"summernote.keydown":function(t,e){s.handleKeydown(e)},"summernote.dialog.shown":function(){s.hide()}},this.shouldInitialize=function(){return 0<r.length},this.initialize=function(){this.lastWordRange=null,this.$popover=t.popover({className:"note-hint-popover",hideArrow:!0,direction:""}).render().appendTo("body"),this.$popover.hide(),this.$content=this.$popover.find(".popover-content"),this.$content.on("click",".note-hint-item",function(){s.$content.find(".active").removeClass("active"),$(this).addClass("active"),s.replace()})},this.destroy=function(){this.$popover.remove()},this.selectItem=function(t){this.$content.find(".active").removeClass("active"),t.addClass("active"),this.$content[0].scrollTop=t[0].offsetTop-this.$content.innerHeight()/2},this.moveDown=function(){var t=this.$content.find(".note-hint-item.active"),e=t.next();if(e.length)this.selectItem(e);else{var i=t.parent().next();i.length||(i=this.$content.find(".note-hint-group").first()),this.selectItem(i.find(".note-hint-item").first())}},this.moveUp=function(){var t=this.$content.find(".note-hint-item.active"),e=t.prev();if(e.length)this.selectItem(e);else{var i=t.parent().prev();i.length||(i=this.$content.find(".note-hint-group").last()),this.selectItem(i.find(".note-hint-item").last())}},this.replace=function(){var t=this.$content.find(".note-hint-item.active");if(t.length){var e=this.nodeFromItem(t);this.lastWordRange.insertNode(e),range.createFromNode(e).collapse().select(),this.lastWordRange=null,this.hide(),a.invoke("editor.focus")}},this.nodeFromItem=function(t){var e=r[t.data("index")],i=t.data("item"),n=e.content?e.content(i):i;return"string"==typeof n&&(n=dom.createText(n)),n},this.createItemTemplates=function(n,t){var a=r[n];return t.map(function(t,e){var i=$('<div class="note-hint-item"/>');return i.append(a.template?a.template(t):t+""),i.data({index:n,item:t}),0===n&&0===e&&i.addClass("active"),i})},this.handleKeydown=function(t){this.$popover.is(":visible")&&(t.keyCode===key.code.ENTER?(t.preventDefault(),this.replace()):t.keyCode===key.code.UP?(t.preventDefault(),this.moveUp()):t.keyCode===key.code.DOWN&&(t.preventDefault(),this.moveDown()))},this.searchKeyword=function(t,e,i){var n=r[t];if(n&&n.match.test(e)&&n.search){var a=n.match.exec(e);n.search(a[1],i)}else i()},this.createGroup=function(e,t){var i=$('<div class="note-hint-group note-hint-group-'+e+'"/>');return this.searchKeyword(e,t,function(t){(t=t||[]).length&&(i.html(s.createItemTemplates(e,t)),s.show())}),i},this.handleKeyup=function(t){if(list.contains([key.code.ENTER,key.code.UP,key.code.DOWN],t.keyCode)){if(t.keyCode===key.code.ENTER&&this.$popover.is(":visible"))return}else{var e=a.invoke("editor.createRange").getWordRange(),i=e.toString();if(r.length&&i){this.$content.empty();var n=func.rect2bnd(list.last(e.getClientRects()));n&&(this.$popover.hide(),this.lastWordRange=e,r.forEach(function(t,e){t.match.test(i)&&s.createGroup(e,i).appendTo(s.$content)}),"top"===o?this.$popover.css({left:n.left,top:n.top-this.$popover.outerHeight()-5}):this.$popover.css({left:n.left,top:n.top+n.height+5}))}else this.hide()}},this.show=function(){this.$popover.show()},this.hide=function(){this.$popover.hide()}};$.summernote=$.extend($.summernote,{version:"0.8.2",ui:ui,dom:dom,plugins:{},options:{modules:{editor:Editor,clipboard:Clipboard,dropzone:Dropzone,codeview:Codeview,statusbar:Statusbar,fullscreen:Fullscreen,handle:Handle,hintPopover:HintPopover,autoLink:AutoLink,autoSync:AutoSync,placeholder:Placeholder,buttons:Buttons,toolbar:Toolbar,linkDialog:LinkDialog,linkPopover:LinkPopover,imageDialog:ImageDialog,imagePopover:ImagePopover,videoDialog:VideoDialog,helpDialog:HelpDialog,airPopover:AirPopover},buttons:{},lang:"en-US",toolbar:[["style",["style"]],["font",["bold","underline","clear"]],["fontname",["fontname"]],["color",["color"]],["para",["ul","ol","paragraph"]],["table",["table"]],["insert",["link","picture","video"]],["view",["fullscreen","codeview","help"]]],popover:{image:[["imagesize",["imageSize100","imageSize50","imageSize25"]],["float",["floatLeft","floatRight","floatNone"]],["remove",["removeMedia"]]],link:[["link",["linkDialogShow","unlink"]]],air:[["color",["color"]],["font",["bold","underline","clear"]],["para",["ul","paragraph"]],["table",["table"]],["insert",["link","picture"]]]},airMode:!1,width:null,height:null,focus:!1,tabSize:4,styleWithSpan:!0,shortcuts:!0,textareaAutoSync:!0,direction:null,styleTags:["p","blockquote","pre","h1","h2","h3","h4","h5","h6"],fontNames:["Arial","Arial Black","Comic Sans MS","Courier New","Helvetica Neue","Helvetica","Impact","Lucida Grande","Tahoma","Times New Roman","Verdana"],fontSizes:["8","9","10","11","12","14","18","24","36"],colors:[["#000000","#424242","#636363","#9C9C94","#CEC6CE","#EFEFEF","#F7F7F7","#FFFFFF"],["#FF0000","#FF9C00","#FFFF00","#00FF00","#00FFFF","#0000FF","#9C00FF","#FF00FF"],["#F7C6CE","#FFE7CE","#FFEFC6","#D6EFD6","#CEDEE7","#CEE7F7","#D6D6E7","#E7D6DE"],["#E79C9C","#FFC69C","#FFE79C","#B5D6A5","#A5C6CE","#9CC6EF","#B5A5D6","#D6A5BD"],["#E76363","#F7AD6B","#FFD663","#94BD7B","#73A5AD","#6BADDE","#8C7BC6","#C67BA5"],["#CE0000","#E79439","#EFC631","#6BA54A","#4A7B8C","#3984C6","#634AA5","#A54A7B"],["#9C0000","#B56308","#BD9400","#397B21","#104A5A","#085294","#311873","#731842"],["#630000","#7B3900","#846300","#295218","#083139","#003163","#21104A","#4A1031"]],lineHeights:["1.0","1.2","1.4","1.5","1.6","1.8","2.0","3.0"],tableClassName:"table table-bordered",insertTableMaxSize:{col:10,row:10},dialogsInBody:!1,dialogsFade:!1,maximumImageFileSize:null,callbacks:{onInit:null,onFocus:null,onBlur:null,onEnter:null,onKeyup:null,onKeydown:null,onImageUpload:null,onImageUploadError:null},codemirror:{mode:"text/html",htmlMode:!0,lineNumbers:!0},keyMap:{pc:{ENTER:"insertParagraph","CTRL+Z":"undo","CTRL+Y":"redo",TAB:"tab","SHIFT+TAB":"untab","CTRL+B":"bold","CTRL+I":"italic","CTRL+U":"underline","CTRL+SHIFT+S":"strikethrough","CTRL+BACKSLASH":"removeFormat","CTRL+SHIFT+L":"justifyLeft","CTRL+SHIFT+E":"justifyCenter","CTRL+SHIFT+R":"justifyRight","CTRL+SHIFT+J":"justifyFull","CTRL+SHIFT+NUM7":"insertUnorderedList","CTRL+SHIFT+NUM8":"insertOrderedList","CTRL+LEFTBRACKET":"outdent","CTRL+RIGHTBRACKET":"indent","CTRL+NUM0":"formatPara","CTRL+NUM1":"formatH1","CTRL+NUM2":"formatH2","CTRL+NUM3":"formatH3","CTRL+NUM4":"formatH4","CTRL+NUM5":"formatH5","CTRL+NUM6":"formatH6","CTRL+ENTER":"insertHorizontalRule","CTRL+K":"linkDialog.show"},mac:{ENTER:"insertParagraph","CMD+Z":"undo","CMD+SHIFT+Z":"redo",TAB:"tab","SHIFT+TAB":"untab","CMD+B":"bold","CMD+I":"italic","CMD+U":"underline","CMD+SHIFT+S":"strikethrough","CMD+BACKSLASH":"removeFormat","CMD+SHIFT+L":"justifyLeft","CMD+SHIFT+E":"justifyCenter","CMD+SHIFT+R":"justifyRight","CMD+SHIFT+J":"justifyFull","CMD+SHIFT+NUM7":"insertUnorderedList","CMD+SHIFT+NUM8":"insertOrderedList","CMD+LEFTBRACKET":"outdent","CMD+RIGHTBRACKET":"indent","CMD+NUM0":"formatPara","CMD+NUM1":"formatH1","CMD+NUM2":"formatH2","CMD+NUM3":"formatH3","CMD+NUM4":"formatH4","CMD+NUM5":"formatH5","CMD+NUM6":"formatH6","CMD+ENTER":"insertHorizontalRule","CMD+K":"linkDialog.show"}},icons:{align:"note-icon-align",alignCenter:"note-icon-align-center",alignJustify:"note-icon-align-justify",alignLeft:"note-icon-align-left",alignRight:"note-icon-align-right",indent:"note-icon-align-indent",outdent:"note-icon-align-outdent",arrowsAlt:"note-icon-arrows-alt",bold:"note-icon-bold",caret:"note-icon-caret",circle:"note-icon-circle",close:"note-icon-close",code:"note-icon-code",eraser:"note-icon-eraser",font:"note-icon-font",frame:"note-icon-frame",italic:"note-icon-italic",link:"note-icon-link",unlink:"note-icon-chain-broken",magic:"note-icon-magic",menuCheck:"note-icon-check",minus:"note-icon-minus",orderedlist:"note-icon-orderedlist",pencil:"note-icon-pencil",picture:"note-icon-picture",question:"note-icon-question",redo:"note-icon-redo",square:"note-icon-square",strikethrough:"note-icon-strikethrough",subscript:"note-icon-subscript",superscript:"note-icon-superscript",table:"note-icon-table",textHeight:"note-icon-text-height",trash:"note-icon-trash",underline:"note-icon-underline",undo:"note-icon-undo",unorderedlist:"note-icon-unorderedlist",video:"note-icon-video"}}})}),function(t,e){"function"==typeof define&&define.amd?define(["jquery"],e):e(t.jQuery)}(this,function(t){var e,a,d;!function(h){var s,o,p,f,m={},g={},v={},b={},i=Object.prototype.hasOwnProperty,n=[].slice,y=/\.js#x2F;;function w(t,e){return i.call(t,e)}function r(t,e){var i,n,a,s,o,r,l,d,c,u,h,p=e&&e.split("/"),f=v.map,m=f&&f["*"]||{};if(t&&"."===t.charAt(0))if(e){for(p=p.slice(0,p.length-1),o=(t=t.split("/")).length-1,v.nodeIdCompat&&y.test(t[o])&&(t[o]=t[o].replace(y,"")),t=p.concat(t),c=0;c<t.length;c+=1)if("."===(h=t[c]))t.splice(c,1),c-=1;else if(".."===h){if(1===c&&(".."===t[2]||".."===t[0]))break;0<c&&(t.splice(c-1,2),c-=2)}t=t.join("/")}else 0===t.indexOf("./")&&(t=t.substring(2));if((p||m)&&f){for(c=(i=t.split("/")).length;0<c;c-=1){if(n=i.slice(0,c).join("/"),p)for(u=p.length;0<u;u-=1)if((a=f[p.slice(0,u).join("/")])&&(a=a[n])){s=a,r=c;break}if(s)break;!l&&m&&m[n]&&(l=m[n],d=c)}!s&&l&&(s=l,r=d),s&&(i.splice(0,r,s),t=i.join("/"))}return t}function x(t,e){return function(){return o.apply(h,n.call(arguments,0).concat([t,e]))}}function k(e){return function(t){m[e]=t}}function C(t){if(w(g,t)){var e=g[t];delete g[t],b[t]=!0,s.apply(h,e)}if(!w(m,t)&&!w(b,t))throw new Error("No "+t);return m[t]}function l(t){var e,i=t?t.indexOf("!"):-1;return-1<i&&(e=t.substring(0,i),t=t.substring(i+1,t.length)),[e,t]}p=function(t,e){var i,n,a=l(t),s=a[0];return t=a[1],s&&(i=C(s=r(s,e))),s?t=i&&i.normalize?i.normalize(t,(n=e,function(t){return r(t,n)})):r(t,e):(s=(a=l(t=r(t,e)))[0],t=a[1],s&&(i=C(s))),{f:s?s+"!"+t:t,n:t,pr:s,p:i}},f={require:function(t){return x(t)},exports:function(t){var e=m[t];return void 0!==e?e:m[t]={}},module:function(t){return{id:t,uri:"",exports:m[t],config:(e=t,function(){return v&&v.config&&v.config[e]||{}})};var e}},s=function(t,e,i,n){var a,s,o,r,l,d,c=[],u=typeof i;if(n=n||t,"undefined"===u||"function"===u){for(e=!e.length&&i.length?["require","exports","module"]:e,l=0;l<e.length;l+=1)if("require"===(s=(r=p(e[l],n)).f))c[l]=f.require(t);else if("exports"===s)c[l]=f.exports(t),d=!0;else if("module"===s)a=c[l]=f.module(t);else if(w(m,s)||w(g,s)||w(b,s))c[l]=C(s);else{if(!r.p)throw new Error(t+" missing "+s);r.p.load(r.n,x(n,!0),k(s),{}),c[l]=m[s]}o=i?i.apply(m[t],c):void 0,t&&(a&&a.exports!==h&&a.exports!==m[t]?m[t]=a.exports:o===h&&d||(m[t]=o))}else t&&(m[t]=i)},e=a=o=function(t,e,i,n,a){if("string"==typeof t)return f[t]?f[t](e):C(p(t,e).f);if(!t.splice){if((v=t).deps&&o(v.deps,v.callback),!e)return;e.splice?(t=e,e=i,i=null):t=h}return e=e||function(){},"function"==typeof i&&(i=n,n=a),n?s(h,t,e,i):setTimeout(function(){s(h,t,e,i)},4),o},o.config=function(t){return o(t)},e._defined=m,(d=function(t,e,i){e.splice||(i=e,e=[]),w(m,t)||w(g,t)||(g[t]=[t,e,i])}).amd={jQuery:!0}}(),d("almond",function(){}),d("visualcaptcha/core",[],function(){"use strict";var a,i,n,s,o,r,l,d;return a=function(t,e,i){return i=i||[],t.namespace&&0<t.namespace.length&&i.push(t.namespaceFieldName+"="+t.namespace),i.push(t.randomParam+"="+t.randomNonce),e+"&"+i.join("&")},i=function(e){var t,i=this;e.applyRandomNonce(),e.isLoading=!0,t=n(e),e._loading(i),e.callbacks.loading&&e.callbacks.loading(i),e.request(t,function(t){t.audioFieldName&&(e.audioFieldName=t.audioFieldName),t.imageFieldName&&(e.imageFieldName=t.imageFieldName),t.imageName&&(e.imageName=t.imageName),t.values&&(e.imageValues=t.values),e.isLoading=!1,e.hasLoaded=!0,e._loaded(i),e.callbacks.loaded&&e.callbacks.loaded(i)})},n=function(t){var e=t.url+t.routes.start+"&_img="+t.numberOfImages;return a(t,e)},s=function(t,e){var i="",n=[];return e<0||e>=t.numberOfImages?i:(this.isRetina()&&n.push("retina=1"),i=t.url+t.routes.image+"&_id="+e,a(t,i,n))},o=function(t,e){var i=t.url+t.routes.audio;return e&&(i+="/ogg"),a(t,i)},r=function(t,e){return 0<=e&&e<t.numberOfImages?t.imageValues[e]:""},l=function(){return void 0!==window.devicePixelRatio&&1<window.devicePixelRatio},d=function(){var t=!1;try{document.createElement("audio").canPlayType&&(t=!0)}catch(t){}return t},function(e){var t;return t={refresh:function(){return i.call(this,e)},isLoading:function(){return e.isLoading},hasLoaded:function(){return e.hasLoaded},numberOfImages:function(){return e.imageValues.length},imageName:function(){return e.imageName},imageValue:function(t){return r.call(this,e,t)},imageUrl:function(t){return s.call(this,e,t)},audioUrl:function(t){return o.call(this,e,t)},imageFieldName:function(){return e.imageFieldName},audioFieldName:function(){return e.audioFieldName},namespace:function(){return e.namespace},namespaceFieldName:function(){return e.namespaceFieldName},isRetina:l,supportsAudio:d},e.autoRefresh&&t.refresh(),t}}),d("visualcaptcha/xhr-request",[],function(){"use strict";var n=window.XMLHttpRequest;return function(t,e){var i=new n;i.open("GET",t,!0),i.onreadystatechange=function(){var t;4===i.readyState&&200===i.status&&(t=JSON.parse(i.responseText),e(t))},i.send()}}),d("visualcaptcha/config",["visualcaptcha/xhr-request"],function(n){"use strict";return function(t){var e=window.location.href.split("/");e[e.length-1]="";var i={request:n,url:e.join("/").slice(0,-1),namespace:"",namespaceFieldName:"namespace",routes:{start:"/start",image:"/image",audio:"/audio"},isLoading:!1,hasLoaded:!1,autoRefresh:!0,numberOfImages:6,randomNonce:"",randomParam:"r",audioFieldName:"",imageFieldName:"",imageName:"",imageValues:[],callbacks:{},_loading:function(){},_loaded:function(){},applyRandomNonce:function(){return i.randomNonce=Math.random().toString(36).substring(2)}};return t.request&&(i.request=t.request),t.url&&(i.url=t.url),t.namespace&&(i.namespace=t.namespace),t.namespaceFieldName&&(i.namespaceFieldName=t.namespaceFieldName),void 0!==t.autoRefresh&&(i.autoRefresh=t.autoRefresh),t.numberOfImages&&(i.numberOfImages=t.numberOfImages),t.routes&&(t.routes.start&&(i.routes.start=t.routes.start),t.routes.image&&(i.routes.image=t.routes.image),t.routes.audio&&(i.routes.audio=t.routes.audio)),t.randomParam&&(i.randomParam=t.randomParam),t.callbacks&&(t.callbacks.loading&&(i.callbacks.loading=t.callbacks.loading),t.callbacks.loaded&&(i.callbacks.loaded=t.callbacks.loaded)),t._loading&&(i._loading=t._loading),t._loaded&&(i._loaded=t._loaded),i}}),d("visualcaptcha",["require","visualcaptcha/core","visualcaptcha/config"],function(t){"use strict";var e=t("visualcaptcha/core"),i=t("visualcaptcha/config");return function(t){return e(i(t=t||{}))}}),d("visualcaptcha/templates",[],function(){"use strict";var r;return r=function(t,e){for(var i in e)t=t.replace(new RegExp("{"+i+"}","g"),e[i]);return t},{buttons:function(t,e,i){var n,a;return'<div class="visualCaptcha-accessibility-button"><a href="#"><img src="{path}accessibility{retinaExtra}.png" title="{accessibilityTitle}" alt="{accessibilityAlt}" /></a></div>','<div class="visualCaptcha-refresh-button"><a href="#"><img src="{path}refresh{retinaExtra}.png" title="{refreshTitle}" alt="{refreshAlt}" /></a></div>',n='<div class="visualCaptcha-button-group"><div class="visualCaptcha-refresh-button"><a href="#"><img src="{path}refresh{retinaExtra}.png" title="{refreshTitle}" alt="{refreshAlt}" /></a></div>'+(t.supportsAudio()?'<div class="visualCaptcha-accessibility-button"><a href="#"><img src="{path}accessibility{retinaExtra}.png" title="{accessibilityTitle}" alt="{accessibilityAlt}" /></a></div>':"")+"</div>",a={path:i||"",refreshTitle:e.refreshTitle,refreshAlt:e.refreshAlt,accessibilityTitle:e.accessibilityTitle,accessibilityAlt:e.accessibilityAlt,retinaExtra:t.isRetina()?"@2x":""},r(n,a)},accessibility:function(t,e){var i;return t.supportsAudio()?('<div class="visualCaptcha-accessibility-wrapper visualCaptcha-hide"><div class="accessibility-description">{accessibilityDescription}</div><audio preload="preload"><source src="{audioURL}" type="audio/ogg" /><source src="{audioURL}" type="audio/mpeg" /></audio></div>',i={accessibilityDescription:e.accessibilityDescription,audioURL:t.audioUrl(),audioFieldName:t.audioFieldName()},r('<div class="visualCaptcha-accessibility-wrapper visualCaptcha-hide"><div class="accessibility-description">{accessibilityDescription}</div><audio preload="preload"><source src="{audioURL}" type="audio/ogg" /><source src="{audioURL}" type="audio/mpeg" /></audio></div>',i)):""},images:function(t,e){for(var i,n,a="",s=0,o=t.numberOfImages();s<o;s++)i='<div class="img"><a href="#"><img src="{imageUrl}" id="visualCaptcha-img-{i}" data-index="{i}" alt="" title="" /></a></div>',n={imageUrl:t.imageUrl(s),i:s},a+=r(i,n);return i='<p class="visualCaptcha-explanation">{explanation}</p><div class="visualCaptcha-possibilities">{images}</div>',n={imageFieldName:t.imageFieldName(),explanation:e.explanation.replace(/ANSWER/,t.imageName()),images:a},r(i,n)},audioInput:function(t){var e;return'<input class="form-control audioField" type="text" name="{audioFieldName}" value="" autocomplete="off" />',e={audioFieldName:t.audioFieldName()},r('<input class="form-control audioField" type="text" name="{audioFieldName}" value="" autocomplete="off" />',e)},imageInput:function(t,e){var i;return'<input class="form-control imageField" type="hidden" name="{imageFieldName}" value="{value}" readonly="readonly" />',i={imageFieldName:t.imageFieldName(),value:t.imageValue(e)},r('<input class="form-control imageField" type="hidden" name="{imageFieldName}" value="{value}" readonly="readonly" />',i)},namespaceInput:function(t){var e,i=t.namespace();return i&&0!==i.length?('<input type="hidden" name="{fieldName}" value="{value}" />',e={fieldName:t.namespaceFieldName(),value:i},r('<input type="hidden" name="{fieldName}" value="{value}" />',e)):""}}}),d("visualcaptcha/language",[],function(){"use strict";return{accessibilityAlt:"Sound icon",accessibilityTitle:"Accessibility option: listen to a question and answer it!",accessibilityDescription:"Type below the <strong>answer</strong> to what you hear. Numbers or words:",explanation:"Click or touch the <strong>ANSWER</strong>",refreshAlt:"Refresh/reload icon",refreshTitle:"Refresh/reload: get new images and accessibility option!"}}),d("visualcaptcha.jquery",["jquery","visualcaptcha","visualcaptcha/templates","visualcaptcha/language"],function(l,a,d,e){"use strict";var i,s,o,r,c,u,h;i=function(t,e){l.get(t,e,"json")},s=function(){},o=function(t,e,i){var n;n=d.namespaceInput(i)+d.accessibility(i,t.language)+d.images(i,t.language)+d.buttons(i,t.language,t.imgPath),e.html(n)},r=function(t){var e,i=l(this).closest(".visualCaptcha"),n=i.find(".visualCaptcha-accessibility-wrapper"),a=i.find(".visualCaptcha-possibilities"),s=i.find(".visualCaptcha-explanation"),o=n.find("audio");n.hasClass("visualCaptcha-hide")?(a.toggleClass("visualCaptcha-hide"),s.toggleClass("visualCaptcha-hide"),a.find(".img").removeClass("visualCaptcha-selected"),s.find("input").val(""),e=d.audioInput(i.data("captcha")),l(e).insertBefore(o),n.toggleClass("visualCaptcha-hide"),o[0].load(),o[0].play()):(o[0].pause(),n.toggleClass("visualCaptcha-hide"),n.find("input").remove(),s.toggleClass("visualCaptcha-hide"),a.toggleClass("visualCaptcha-hide")),t.preventDefault()},c=function(t){var e,i,n,a=l(this),s=a.closest(".visualCaptcha"),o=s.find(".visualCaptcha-possibilities"),r=s.find(".visualCaptcha-explanation");(i=r.find("input"))&&(i.remove(),o.find("a").removeClass("visualCaptcha-selected")),a.addClass("visualCaptcha-selected"),e=a.find("img").data("index"),n=d.imageInput(s.data("captcha"),e),r.append(l(n)),t.preventDefault()},u=function(t){l(this).closest(".visualCaptcha").data("captcha").refresh(),t.preventDefault()},h=function(t){var e=t.find(".imageField"),i=t.find(".audioField"),n=!(!e.val()&&!i.val());return n?{valid:n,name:e.val()?e.attr("name"):i.attr("name"),value:e.val()?e.val():i.val()}:{valid:n}},l.fn.visualCaptcha=function(t){var n;return n=l.extend({imgPath:"/",language:e,captcha:{request:i}},t),this.addClass("visualCaptcha").on("click",".visualCaptcha-accessibility-button",r).on("click",".visualCaptcha-refresh-button",u).on("click",".visualCaptcha-possibilities a",c),this.each(function(){var t,e,i=l(this);e=l.extend(n.captcha,{_loading:s.bind(null,n,i),_loaded:o.bind(null,n,i)}),void 0!==i.data("namespace")&&(e.namespace=i.data("namespace")),(t=a(e)).getCaptchaData=h.bind(null,i),i.data("captcha",t)})}}),d("jquery",function(){return t}),a("visualcaptcha.jquery")}),function(){var t=[].slice;!function(r,a){"use strict";var s;s=function(){function t(e,t){var i,n,a,s;null==t&&(t={}),this.$element=r(e),this.options=r.extend({},r.fn.bootstrapSwitch.defaults,{state:this.$element.is(":checked"),size:this.$element.data("size"),animate:this.$element.data("animate"),disabled:this.$element.is(":disabled"),readonly:this.$element.is("[readonly]"),indeterminate:this.$element.data("indeterminate"),inverse:this.$element.data("inverse"),radioAllOff:this.$element.data("radio-all-off"),onColor:this.$element.data("on-color"),offColor:this.$element.data("off-color"),onText:this.$element.data("on-text"),offText:this.$element.data("off-text"),labelText:this.$element.data("label-text"),handleWidth:this.$element.data("handle-width"),labelWidth:this.$element.data("label-width"),baseClass:this.$element.data("base-class"),wrapperClass:this.$element.data("wrapper-class")},t),this.prevOptions={},this.$wrapper=r("<div>",{class:(n=this,(i=[""+n.options.baseClass].concat(n._getClasses(n.options.wrapperClass))).push(n.options.state?n.options.baseClass+"-on":n.options.baseClass+"-off"),null!=n.options.size&&i.push(n.options.baseClass+"-"+n.options.size),n.options.disabled&&i.push(n.options.baseClass+"-disabled"),n.options.readonly&&i.push(n.options.baseClass+"-readonly"),n.options.indeterminate&&i.push(n.options.baseClass+"-indeterminate"),n.options.inverse&&i.push(n.options.baseClass+"-inverse"),n.$element.attr("id")&&i.push(n.options.baseClass+"-id-"+n.$element.attr("id")),i.join(" "))}),this.$container=r("<div>",{class:this.options.baseClass+"-container"}),this.$on=r("<span>",{html:this.options.onText,class:this.options.baseClass+"-handle-on "+this.options.baseClass+"-"+this.options.onColor}),this.$off=r("<span>",{html:this.options.offText,class:this.options.baseClass+"-handle-off "+this.options.baseClass+"-"+this.options.offColor}),this.$label=r("<span>",{html:this.options.labelText,class:this.options.baseClass+"-label"}),this.$element.on("init.bootstrapSwitch",(a=this,function(){return a.options.onInit.apply(e,arguments)})),this.$element.on("switchChange.bootstrapSwitch",(s=this,function(t){if(!1===s.options.onSwitchChange.apply(e,arguments))return s.$element.is(":radio")?r("[name='"+s.$element.attr("name")+"']").trigger("previousState.bootstrapSwitch",!0):s.$element.trigger("previousState.bootstrapSwitch",!0)})),this.$container=this.$element.wrap(this.$container).parent(),this.$wrapper=this.$container.wrap(this.$wrapper).parent(),this.$element.before(this.options.inverse?this.$off:this.$on).before(this.$label).before(this.options.inverse?this.$on:this.$off),this.options.indeterminate&&this.$element.prop("indeterminate",!0),this._init(),this._elementHandlers(),this._handleHandlers(),this._labelHandlers(),this._formHandler(),this._externalLabelHandler(),this.$element.trigger("init.bootstrapSwitch",this.options.state)}return(t.prototype._constructor=t).prototype.setPrevOptions=function(){return this.prevOptions=r.extend(!0,{},this.options)},t.prototype.state=function(t,e){return void 0===t?this.options.state:(this.options.disabled||this.options.readonly||this.options.state&&!this.options.radioAllOff&&this.$element.is(":radio")||(this.$element.is(":radio")?r("[name='"+this.$element.attr("name")+"']").trigger("setPreviousOptions.bootstrapSwitch"):this.$element.trigger("setPreviousOptions.bootstrapSwitch"),this.options.indeterminate&&this.indeterminate(!1),t=!!t,this.$element.prop("checked",t).trigger("change.bootstrapSwitch",e)),this.$element)},t.prototype.toggleState=function(t){return this.options.disabled||this.options.readonly?this.$element:this.options.indeterminate?(this.indeterminate(!1),this.state(!0)):this.$element.prop("checked",!this.options.state).trigger("change.bootstrapSwitch",t)},t.prototype.size=function(t){return void 0===t?this.options.size:(null!=this.options.size&&this.$wrapper.removeClass(this.options.baseClass+"-"+this.options.size),t&&this.$wrapper.addClass(this.options.baseClass+"-"+t),this._width(),this._containerPosition(),this.options.size=t,this.$element)},t.prototype.animate=function(t){return void 0===t?this.options.animate:(t=!!t)===this.options.animate?this.$element:this.toggleAnimate()},t.prototype.toggleAnimate=function(){return this.options.animate=!this.options.animate,this.$wrapper.toggleClass(this.options.baseClass+"-animate"),this.$element},t.prototype.disabled=function(t){return void 0===t?this.options.disabled:(t=!!t)===this.options.disabled?this.$element:this.toggleDisabled()},t.prototype.toggleDisabled=function(){return this.options.disabled=!this.options.disabled,this.$element.prop("disabled",this.options.disabled),this.$wrapper.toggleClass(this.options.baseClass+"-disabled"),this.$element},t.prototype.readonly=function(t){return void 0===t?this.options.readonly:(t=!!t)===this.options.readonly?this.$element:this.toggleReadonly()},t.prototype.toggleReadonly=function(){return this.options.readonly=!this.options.readonly,this.$element.prop("readonly",this.options.readonly),this.$wrapper.toggleClass(this.options.baseClass+"-readonly"),this.$element},t.prototype.indeterminate=function(t){return void 0===t?this.options.indeterminate:(t=!!t)===this.options.indeterminate?this.$element:this.toggleIndeterminate()},t.prototype.toggleIndeterminate=function(){return this.options.indeterminate=!this.options.indeterminate,this.$element.prop("indeterminate",this.options.indeterminate),this.$wrapper.toggleClass(this.options.baseClass+"-indeterminate"),this._containerPosition(),this.$element},t.prototype.inverse=function(t){return void 0===t?this.options.inverse:(t=!!t)===this.options.inverse?this.$element:this.toggleInverse()},t.prototype.toggleInverse=function(){var t,e;return this.$wrapper.toggleClass(this.options.baseClass+"-inverse"),e=this.$on.clone(!0),t=this.$off.clone(!0),this.$on.replaceWith(t),this.$off.replaceWith(e),this.$on=t,this.$off=e,this.options.inverse=!this.options.inverse,this.$element},t.prototype.onColor=function(t){var e;return e=this.options.onColor,void 0===t?e:(null!=e&&this.$on.removeClass(this.options.baseClass+"-"+e),this.$on.addClass(this.options.baseClass+"-"+t),this.options.onColor=t,this.$element)},t.prototype.offColor=function(t){var e;return e=this.options.offColor,void 0===t?e:(null!=e&&this.$off.removeClass(this.options.baseClass+"-"+e),this.$off.addClass(this.options.baseClass+"-"+t),this.options.offColor=t,this.$element)},t.prototype.onText=function(t){return void 0===t?this.options.onText:(this.$on.html(t),this._width(),this._containerPosition(),this.options.onText=t,this.$element)},t.prototype.offText=function(t){return void 0===t?this.options.offText:(this.$off.html(t),this._width(),this._containerPosition(),this.options.offText=t,this.$element)},t.prototype.labelText=function(t){return void 0===t?this.options.labelText:(this.$label.html(t),this._width(),this.options.labelText=t,this.$element)},t.prototype.handleWidth=function(t){return void 0===t?this.options.handleWidth:(this.options.handleWidth=t,this._width(),this._containerPosition(),this.$element)},t.prototype.labelWidth=function(t){return void 0===t?this.options.labelWidth:(this.options.labelWidth=t,this._width(),this._containerPosition(),this.$element)},t.prototype.baseClass=function(t){return this.options.baseClass},t.prototype.wrapperClass=function(t){return void 0===t?this.options.wrapperClass:(t||(t=r.fn.bootstrapSwitch.defaults.wrapperClass),this.$wrapper.removeClass(this._getClasses(this.options.wrapperClass).join(" ")),this.$wrapper.addClass(this._getClasses(t).join(" ")),this.options.wrapperClass=t,this.$element)},t.prototype.radioAllOff=function(t){return void 0===t?this.options.radioAllOff:((t=!!t)===this.options.radioAllOff||(this.options.radioAllOff=t),this.$element)},t.prototype.onInit=function(t){return void 0===t?this.options.onInit:(t||(t=r.fn.bootstrapSwitch.defaults.onInit),this.options.onInit=t,this.$element)},t.prototype.onSwitchChange=function(t){return void 0===t?this.options.onSwitchChange:(t||(t=r.fn.bootstrapSwitch.defaults.onSwitchChange),this.options.onSwitchChange=t,this.$element)},t.prototype.destroy=function(){var t;return(t=this.$element.closest("form")).length&&t.off("reset.bootstrapSwitch").removeData("bootstrap-switch"),this.$container.children().not(this.$element).remove(),this.$element.unwrap().unwrap().off(".bootstrapSwitch").removeData("bootstrap-switch"),this.$element},t.prototype._width=function(){var t,i,n;return(t=this.$on.add(this.$off)).add(this.$label).css("width",""),i="auto"===this.options.handleWidth?Math.max(this.$on.width(),this.$off.width()):this.options.handleWidth,t.width(i),this.$label.width((n=this,function(t,e){return"auto"!==n.options.labelWidth?n.options.labelWidth:e<i?i:e})),this._handleWidth=this.$on.outerWidth(),this._labelWidth=this.$label.outerWidth(),this.$container.width(2*this._handleWidth+this._labelWidth),this.$wrapper.width(this._handleWidth+this._labelWidth)},t.prototype._containerPosition=function(e,t){var i;if(null==e&&(e=this.options.state),this.$container.css("margin-left",(i=this,function(){var t;return t=[0,"-"+i._handleWidth+"px"],i.options.indeterminate?"-"+i._handleWidth/2+"px":e?i.options.inverse?t[1]:t[0]:i.options.inverse?t[0]:t[1]})),t)return setTimeout(function(){return t()},50)},t.prototype._init=function(){var t,e,i,n;return t=function(){return i.setPrevOptions(),i._width(),i._containerPosition(null,function(){if(i.options.animate)return i.$wrapper.addClass(i.options.baseClass+"-animate")})},(i=this).$wrapper.is(":visible")?t():e=a.setInterval((n=this,function(){if(n.$wrapper.is(":visible"))return t(),a.clearInterval(e)}),50)},t.prototype._elementHandlers=function(){return this.$element.on({"setPreviousOptions.bootstrapSwitch":(o=this,function(t){return o.setPrevOptions()}),"previousState.bootstrapSwitch":(s=this,function(t){return s.options=s.prevOptions,s.options.indeterminate&&s.$wrapper.addClass(s.options.baseClass+"-indeterminate"),s.$element.prop("checked",s.options.state).trigger("change.bootstrapSwitch",!0)}),"change.bootstrapSwitch":(a=this,function(t,e){var i;if(t.preventDefault(),t.stopImmediatePropagation(),i=a.$element.is(":checked"),a._containerPosition(i),i!==a.options.state)return a.options.state=i,a.$wrapper.toggleClass(a.options.baseClass+"-off").toggleClass(a.options.baseClass+"-on"),e?void 0:(a.$element.is(":radio")&&r("[name='"+a.$element.attr("name")+"']").not(a.$element).prop("checked",!1).trigger("change.bootstrapSwitch",!0),a.$element.trigger("switchChange.bootstrapSwitch",[i]))}),"focus.bootstrapSwitch":(n=this,function(t){return t.preventDefault(),n.$wrapper.addClass(n.options.baseClass+"-focused")}),"blur.bootstrapSwitch":(i=this,function(t){return t.preventDefault(),i.$wrapper.removeClass(i.options.baseClass+"-focused")}),"keydown.bootstrapSwitch":(e=this,function(t){if(t.which&&!e.options.disabled&&!e.options.readonly)switch(t.which){case 37:return t.preventDefault(),t.stopImmediatePropagation(),e.state(!1);case 39:return t.preventDefault(),t.stopImmediatePropagation(),e.state(!0)}})});var e,i,n,a,s,o},t.prototype._handleHandlers=function(){var e,i;return this.$on.on("click.bootstrapSwitch",(e=this,function(t){return t.preventDefault(),t.stopPropagation(),e.state(!1),e.$element.trigger("focus.bootstrapSwitch")})),this.$off.on("click.bootstrapSwitch",(i=this,function(t){return t.preventDefault(),t.stopPropagation(),i.state(!0),i.$element.trigger("focus.bootstrapSwitch")}))},t.prototype._labelHandlers=function(){return this.$label.on({click:function(t){return t.stopPropagation()},"mousedown.bootstrapSwitch touchstart.bootstrapSwitch":(a=this,function(t){if(!(a._dragStart||a.options.disabled||a.options.readonly))return t.preventDefault(),t.stopPropagation(),a._dragStart=(t.pageX||t.originalEvent.touches[0].pageX)-parseInt(a.$container.css("margin-left"),10),a.options.animate&&a.$wrapper.removeClass(a.options.baseClass+"-animate"),a.$element.trigger("focus.bootstrapSwitch")}),"mousemove.bootstrapSwitch touchmove.bootstrapSwitch":(n=this,function(t){var e;if(null!=n._dragStart&&(t.preventDefault(),!((e=(t.pageX||t.originalEvent.touches[0].pageX)-n._dragStart)<-n._handleWidth||0<e)))return n._dragEnd=e,n.$container.css("margin-left",n._dragEnd+"px")}),"mouseup.bootstrapSwitch touchend.bootstrapSwitch":(i=this,function(t){var e;if(i._dragStart)return t.preventDefault(),i.options.animate&&i.$wrapper.addClass(i.options.baseClass+"-animate"),i._dragEnd?(e=i._dragEnd>-i._handleWidth/2,i._dragEnd=!1,i.state(i.options.inverse?!e:e)):i.state(!i.options.state),i._dragStart=!1}),"mouseleave.bootstrapSwitch":(e=this,function(t){return e.$label.trigger("mouseup.bootstrapSwitch")})});var e,i,n,a},t.prototype._externalLabelHandler=function(){var e,i;return(e=this.$element.closest("label")).on("click",(i=this,function(t){if(t.preventDefault(),t.stopImmediatePropagation(),t.target===e[0])return i.toggleState()}))},t.prototype._formHandler=function(){var t;if(!(t=this.$element.closest("form")).data("bootstrap-switch"))return t.on("reset.bootstrapSwitch",function(){return a.setTimeout(function(){return t.find("input").filter(function(){return r(this).data("bootstrap-switch")}).each(function(){return r(this).bootstrapSwitch("state",this.checked)})},1)}).data("bootstrap-switch",!0)},t.prototype._getClasses=function(t){var e,i,n,a;if(!r.isArray(t))return[this.options.baseClass+"-"+t];for(i=[],n=0,a=t.length;n<a;n++)e=t[n],i.push(this.options.baseClass+"-"+e);return i},t}(),r.fn.bootstrapSwitch=function(){var i,n,a;return n=arguments[0],i=2<=arguments.length?t.call(arguments,1):[],(a=this).each(function(){var t,e;if((e=(t=r(this)).data("bootstrap-switch"))||t.data("bootstrap-switch",e=new s(this,n)),"string"==typeof n)return a=e[n].apply(e,i)}),a},r.fn.bootstrapSwitch.Constructor=s,r.fn.bootstrapSwitch.defaults={state:!0,size:null,animate:!0,disabled:!1,readonly:!1,indeterminate:!1,inverse:!1,radioAllOff:!1,onColor:"primary",offColor:"default",onText:"ON",offText:"OFF",labelText:"&nbsp;",handleWidth:"auto",labelWidth:"auto",baseClass:"bootstrap-switch",wrapperClass:"wrapper",onInit:function(){},onSwitchChange:function(){}}}(window.jQuery,window)}.call(this),function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof exports?t(require("jquery")):t(jQuery)}(function(r,o){var n={color:"rgba(255, 255, 255, 0.8)",custom:"",fade:!0,fontawesome:"",image:"data:image/gif;base64,R0lGODlhZABkAKUAADQyNJyanGRmZMzOzExOTLS2tISChOzq7ERCRKyqrHR2dNze3FxaXMTCxIyOjPT29Dw6PKSipGxubNTW1FRWVLy+vIyKjPTy9ExKTLSytHx+fOTm5GRiZMzKzJSWlPz+/DQ2NJyenGxqbNTS1FRSVLy6vISGhOzu7ERGRKyurHx6fOTi5FxeXMTGxJSSlPz6/Dw+PKSmpHRydNza3P///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQJBQA0ACwAAAAAZABkAAAG/kCacEgsGo/IJO1SEEBAosJFSa1ar9jswQQBeAEgyyFLLpvNL893DXC9zvC4XDggsb+EwXzPtyZAd14gCX2FhkQRgIEAIYeOSAMWIgoxY1UpioEpj5xCFx6ZACQVH1QjFIt5nY8PIV1sKCtUaYsOpVcfb6tWM6iBJlUnJqEAJidYKxYaFbq7SSXEXxQPVQ8VEjBQFVNXDypeKCPOSR8ZiwAox50rLF8Z40kV0V7Tqw8WXgQT8EgzDIvAdm1I4WFAM35EPqSAcYeAul25ECZ5EYPAGgH7JGo08mFACAcOChy4tbHkkA8PDppcybKly5cwY8rc8+HEiBYDRs509qKF/goCCAhIaEBy56MBFtcQaGCU04ukbFgsaErlQAQFETZgGbAIRAmqEx0oskDNirlFMcAieWDHCwtZVkqce6fWyAMBXyQ8pHKCYcOMdROOEIBBQIssAQI5KBs44YEWcLGcELvGWONCHyZ40OBhQtHLoEOLHk26tOnTqFOrXs26tevXEj+0MCFDBTPYSi64QPAFhgFLrl8c2HCC5IsUvNeAiMB49YsCFBCwICrkgIRABICvboEBz1QaC7oHmuEa1JdBQhZAZfOdtXlBdE8oCERBa+tTX94KeZ58TYjPqfWkAAsaiDPEcX6B4UFzrV1wAoNCbBCCCSG0h9uFGGao4YYc/nbo4YcghijiiCW9sMEMG6i04QsjKKCICICJ9sACE6wAoRILcMAGBRZe9kIIDKDAQALcWBGCYgDWVcIrACBQQpJHtHOHAHs1dt0aGhRJhZRR2QeaCGwooKUSBgSiwY1qRcBGDCpCkqAgh4l2wpUAKOBlFS9UQIEiBFRQ2gsDFKAHGR8skEAIKSwAJYmMNuroo5BGSkSbHa6wmQEljNnJBzOMUGVJMxCgCAwWfOrIARpggAIFBSw6zgl4sZGAq3uc8M0ag5bUAApT0jrHAG8CoMFKBfQnDZp9tDDlSh3wyoYEvsoxgrNfOLDSA2Uq5ycuKzQAGaVHnOBCJrGwtEKsUwDAEAOyRbyQgQAoIMBBAeAasUEMArBgQq4rndCCB4myWwSwa8DAbzXDPRBtU/M9++E/O35I5xcCfNgAMdt2+EACe4JAAZsgvrBABRUsUK+knAQBACH5BAkFADQALAAAAABkAGQAAAb+QJpwSCwaj8gk7bNKaVSx2UtJrVqv2CytwgJ4AZTCVEsum7ED0veLaJzfcPhDsV4LTvG83jpR170oLXuDhEQdBH9eMBVXHwcHF4VnLwMJGQtXfYkAKB1VlBoMFAIekZJYLxMUXiAQBitVc5sseEovATB1LBMfp1Yjq3UyD1UtKH8gBVUNIIkSsL5KDxabjFQfBYhfMCljSQ8Cm8m90UgzXYkaVi8LMSoKIVJVExibACbE5Ucj2n8CvsbsScinr8gCBpvUnaJnTwPBgkMeGNhUwtcDdIlSkINI5NyfgdE6NPt4gOORCQJycbKwodyHEMfszDCJ5ESDFClGPLTYwgT+i1EhWtIcKu3AhhMbiSpdyrSp06dQoya5sOKEN6kcTyRQIEBGgFpYC14woRIACAklw+oLkMjATrVJUhWQ16jfGgoT4Fb50AIRCmtWLoysE0gvlRfUvGi4agtCok6GbYX44iApFTr+hEau6YKFAc1WOsT8Mm6zLataXlQIZrYEY9N6PjwYkKLFBcuwc+vezbu379/AgwsfTry48ePIk1950CFFA1PKr6GEQJ1ChdfIcS/gUAdDC9zFHzTI0ILgiwiDv6iAjjxFLgQJhpzQkIhAWuQXEHohkO8C/T8UgGbcA/qBkc956SnG3nHuAcANESuEs0Yg4BH3QgsFlEfEBzP+CNAMCAR8F91eM1QwwVsjpqjiiiy26OKLMMYo44w01gjXBy/kWCGLFxQgAgEsxADWbw9AosUDISCwhgUowvbBBBYoYMEA2CExgZJrwFCRb/l9wcJMV0SQiAm/ZVBHDDsWMdkfGqRpWAJ1hFClEQ0kEsJvE5S1CBYbSFAHAQLq9kIMx4AQQ5NIrKABCiDAIAAmwX1wVBkPTFBBBwvaqOmmnHbq6aegKiHpADrR+EIIBCCAggILuKnHCw1IwIADgQ71QQx1iABNNC806AUFmdJ0QoFfaFTOASLUkUJTE9jlRWXlLMDas01tQKwXIbgKxwEy1KFMUx78mRcWJ0wwwgFZ2grxQQn9CIBoVgqMRIAYjUxgAAkkKNDBnEY80JMGMdRK1AW0FbABv0WcgBEABOy63APpGlbAHx7IKGYdZMZY55kynuDnFwHOeIAHLLDgAKQzvnDCwaEqFQQAIfkECQUANAAsAAAAAGQAZAAABv5AmnBILBqPyKTwMqtUZheldEqtWq/ClQMDAMBMC6x4TMZeZKCuWnAou9/wGERN93zg+Dz1JaHTWSd6goNEJwJ+ahQrhIxJLxuBVQ8iiF0sG1QPJSYqHhONZh4YIBAsJQ9UEWmIJlQTHH4BkaBSJxZ+MCl3tYd+BItSGwyIICGotEoFMIgos0ozGnQCA1QhlQAUn8hIDwbXBVUnAyEhLSe7Si8s1wAF6NuFMtceoBcE7DEv8EYP0ZUpoD6s+7bPyIcEq+iAaAPKwzUUIwry8+ZHF60TFCqF0CexyAMHLFCgkFDhGK0BAhKC8BClo8EFA0Y4o/VhRQoLCjw04Oiy5/6RDw8u8PRJtKjRo0iTKh304cWDB++W7jtQwoUBFyU2RFXyYUIICwFabJX6TMGyLiAUaJvyogSFOQBQxCBb5YCChGpYmFQyAAGuDHSlvFA1j8otRApaBj5yQt41FoqTwELEIsziIxsGVvo1hRJlTJeNHNCMiABoJTHwdnEwNPQSE+wktD5yoA8dCpZdE/nQAsW1FlRqmlglIbduIg9CqAbA2grQE0+PI+FNAQYIGCwK7JWe58GEFiMicx9Pvrz58+jTq1/Pvr379/B9PtoeX8oFUTAQmFgxtj6RC7BJA4x/MPFHRAtcKJTAbO3NwAEGHMwwxAcxVKIBfe05oIYDRP5UiMiF/mm42oEJ0pECg+zNEJIAEg5xwWFrnFZfgVFdEAMB1zmglX/BncPjj0AGKeSQRBZp5JFIJqnkktx90B+RLyxQQAAVGHjkCw0M0wWL6b2wQgvGUZGZH7KdxxsLBHDQwBUNIALDWuRNEqMVKbgJnHkPZGRJmHyphsKA5L0QQBogOIAhEhf4syGKx52QggYxiDfFfQSgQIAHhwr5wQIj7Mjkp6CGKuqopJZqxQMrMKRkBwJggIEBgNLkaAAdZCrRAmd1IYGqtKiIlgtIueAHCHfS8oIHKvHqk2N0ZPBkHon6USxRDilEDTLJKTRTTyvco4YG23J1gY9XLHCXF08hJNWCCRRQ4IGMU5yQgAIyhKDsFDal0IKtEn1wwQYb8OtRAHCBYICkQq6QaxfXGjkDIhUguYFvaoDAp5AvxHDWSgL790IFJmignakk7xMEACH5BAkFADQALAAAAABkAGQAAAb+QJpwSCwaj8ik8HVaLU4vpXRKrVqvy4KKRFBkHtiweBxOoABoACxEbrvftMU5jYaN4Pj8NAKipy16gYJDJn5pEoOJeR6GaBpWJy0VM1GKVi8jFiwCMRsfVCMIhiANVCcBcyAsE5WWSh8Vc2giM1UOfXQarUkvFrhpJAOuUjMMhrpUFzEUaCghB1QTv7kXw0kxEKMnVS8bCxMbYFQBjQAEE9ZIjI3oihrlMB3pRzHTaduKDuUEd/NFEwQMsfikaEA5Afj8DfmQIVuac65evPODooXCIxUUsGDhYIG1Aw5kUahwEcmDDQd2uXowIEaMAh5LypxJs6bNmzhz6tzJM8/+hwUNSlRYoHLKiwElOlTrWeVBBhYw1LCIsZTKCg0EYKAQsYLplA8JRNGBwIbKAQl+KGzwqqRDwEbCpjQYFYEtkhchygFwQCXvMYJ2iVwoVA7RnkaPAhd5oK9wtKh0QJBUTORDCntp6k55EAIyGhPiKA9ZIaARCmjJCghAMTWhaCEfOshCA2FylQ8vHrwA/HrhBhMEUBDQsIB3bzgXNrg+zry58+fQo0ufTr269evYsy+ZUCJBgRnGtRtRxgAGBBgMElR90cGABBNEs58wYA+EhW0vEnjGUKGo9AKYAQBCATRMwAwdAqx1XWnliEBDBvbAYJF1L4jVCAw0pOBQGhL+XveCZ4ZgOAAJfrAQk3UMNiIADZz9AkIG/kWXgl4pCPFABQIQIMEAoVl3ggKNKLCceENsYIEsCDigIJFHsBSDByEMEB6TVFZp5ZVYZqnlllx26eWXrlwwQQcjDHnlBi6cAYMGSzrHxJRK4LUhACZAB5IA911xQIrNtNkbXn2A4AKcR6xwIIe1NNdLGirEeMQFKqTVY2+wqEmgFZWmAcKEzj0wQgEjTErFAhpQoICUYKaq6qqsturqq7CyekIMMijQgqOC4KYbTi/IkAYEMeCax1EahWDmRQbRwUJXwyzAILA3zUgHDO240gIGh9zUQYknWrIAC2mUVdMLaKEBQgpXwuLxQQkicHTsRRuEoIAGBVRFxQcTRBDCCOka0YSoND1wwgWEHhEbBRCAQEADBYt3QrloMPAukQccqgZqWV7gaxosTCzewSAoXEHDRC6QQAzFxaqyJUEAACH5BAkFADQALAAAAABkAGQAAAb+QJpwSCwaj8jk8HW5vJTQqHRKrQ4/q5jBEFt8rOCwGDzjgAAAEGsybrvftJcETQdwHvC8PjqA1dEgLXuDhEMlZ38gKYWMeg0Qf2gFVl+NYActIQkzeFInFJEoJ1IvAyowICQhF5ZTKxKIKKtTJSh1IJNRHw0EfxajrUovGn8wJZVQLxUKKCgKFZ1QD6CJGcFKAxiREk9SHxcbGyfIUB2RaAqs10cFCJEE3Ywp5wACG+tHLbZ/LPGFDfQkAMNH5AKHSCHIETrhJ5IHfwSFzOhFx8RARh8yNKQj4GLEIQs8KNBQIJqlBxkEwIBBQMW9jzCPfNjQocIEkzFz6tzJs6f+z59AgwodKuXBggkrcE45sAAiUSgzTHCgwMHCBIVKTgSgQIJDCqxPjUxg8YfBjCkXVPyJADaskAMizlFwemQAIjoEDrhF0mBfpAFS5hUDvNeI4HMxpBSIBINN4SIZ6AHIBWUFRTrcHhcZcPnPAlIFLlNwrHnIAwvnNFB5MSGEgxReShfZoOCPgBWUPrQt/SCFAgoSSsoeTry48ePIkytfzry58+fQoxN8sWDECrrSxWpgQIKFhs8FWySoMC76iwLa6pCoUIk2xxHRZ6T/QwH3C9R1FHhcHkFyAhorHFQHAfA9Vxs9qi1A1oCEOSeDZKo9YIJtej3ngWQhSLQgACj+tLDbcX2c05gQM8VgggcbYJfcCyHcBUgKKkp3ngAowIACBxXEmB0NGwxQwQD77SjkkEQWaeSRSCap5JJMjvHCDAM0teQHHQhAAAoYSNCCjkV8cMAKG3zo1gMxQLKWmEtUIAMLEmTAJVEdzFcHBA2WcxkMHRB3AX6poXnaHxIQt8GGkVBQoRIXEFMHC4JScw4BLwkTwh8OEAeXZBQodcQCAuAVaWksSlbpFA8U8FqQj73yqKY7jjBHHQKQduQGKWgggQYphDnlAxc8gGaTwAYr7LDEXkNdASVc8KseH7yJTwJmroHPASkEMICzrVzgFwAOsDrICw6gQYKsOS3wh35d16ywoTU8XWAmGiZ4u8cDagEAQ4E8hdAQC3W2soIJCpQgL0EXVOBBCFeB8QK2XQ4Mk25goMQCC24y2YI7HAqi5AcJ1JHAstA10BAMGiv5QAIEUJCAw0I2W+zLOgUBACH5BAkFADQALAAAAABkAGQAAAb+QJpwSCwaj8ikcslsOp/Q5WOQSAwe0ax2q724SAAQyYPlms9oWggEaIdj6bi8+cC43YTyfM+nLWB3bRAbfYVyB4CBMCeGjUMXAxUtBy9PKoEAGk4fBykqEh4TH45NByqJAh2VTQssdyyErDJsbSgNo6RJLw6BHCubCyEaGjELuEsvFrRuDAu5SQtggQXHTB8XJ9VLF4l3IHDPRx0omCHaewuYbQ7hRxvSdxWOJ8t3Ie1Gu4Gwjh8imDAG4DPywAQMEDAkiCI1gUKgGOcGflhRYYKefhNMUKAgIcXAj0pebFhwISLIkyhTqlzJsqXLlzBjSrlwUaajBxkMqDBQ4UL+lA0BNIQ4YJOOgW4IPPhs8qEFATcIJhQN6aBem3tNTly6I2HVVCMzXGEiYLLICjt3UBD9aqQFWkyMmKx4mjYuWyId6GKqieSBhUCa7hbZ8A8TiyczFNCS8EswkQ8prIKQt2lDixgtNpT9+iDGMhAp+FpznOTDhhgOUmQjzbq169ewY8ueTbu27du4c+vG9+KE193bEkgQoCDFbxovDmygtPvDBAnLIGhYS6OzHRQR7N4+IUOdgzIlusHwmLuD1TYEnL3Y6kbB0tsR1LXpgFxBIAnaaweQD4CyZ3vH0VaBfDBIRcMJVbVhQiy4bSBWIO4N8cAMFYlGW1N6tcHCDMD+KTGDRgRQ4ACDHSaxwgQHbFbiiiy26OKLMMYo44w01mgjEheEIAAFAiSQXxMvPBCgYx8M4NArBjoRjAUhzKCiTSsUFogAFhqxwixtCPCeYy8kcF4bLTAV2R0FtHaBAfyZAGR8d0TQmlb8KeBEBQjcIRBrD/AinwdOeEELGa19UEE3gYwAxQYVaPbaAy6cxyeMJ3hATi1KyThFAh6kYFGNHzx546egXvjAAQesZmkHDgyngY8xfhBBhiAY0FhKQb7gKRoNQKCOCVt+dEAIDCgwwK1cXPCgIregFAEtAsxayACTquPBkOF0Vwt9jRRQp3wmVJmLB26w4EwjLWzrHbVTz2xgAgsCVEDsFiccG4i7KT2wAHWOpCCfBCSyNoMLHoxLhwljLeRaK1n2q8QDFQhAAAoiesvWOOgZCsUDG8xQkmwIA9AsjR+MoIEJBodq8skDBQEAIfkECQUANAAsAAAAAGQAZAAABv5AmnBILBqPyKRyyWw6n9Dla1IqLV7RrHarfUQoMASrhOWaz2haAQJoA2CTtHzuZLndGrp+X8Tc2wJ8gnoCfwB5g4lDHxcbB2VOFWxuMAtPDxMpEQMnik8NKhwiKReXKSwwMAIVkEsXAShtICoHnkwTfm0wEQ9PLwstLRutSh8ZMH8mxLZFGn8EM4oPhX8o0cxHL3Z/A4ovsX8wDdhHHzLhcYkvFIYoI+RHDX8KnYkfAYYCvfBFHykEMFBo2GDrgAYQbggQ5HfkxABL2E4U0KDAw0KGGDNq3Mixo8ePIEOKHEmypMkPExIESLEiy4cBBWYsM3mkAAEIICBwaPHhyf6Kc20UlKKZpASyOyjSMXkRAKGbFESRXFBgCIADJyck/JER9ciCbX8CNTlB9Q6irkRWUAvr5MUxNyBaoC3ywETVGE9OhABDIcbMriMI/GFxscmDBRNW7JtL5MMIsBJm9GQ85/CEYZQza97MubPnz6BDix5NurTp06gZTghgIUZhIYxODD19wgUCWRgKtBqggoWKAZNJvwgxyQ0GnkJWsGvD4hrpDSSqahgaozgIvKVHVAVAYWEIpwBAhDDdYTsFiCNyAXBnegG4PxLqvSjAAAYFVqYfuDAEokLwDydscEJwpa2gAHggBLBYakY8UIACAmggF4MUVmjhhRhmqOGGHP526OGHIG7xwgABmBDBCgReeIBdlHgwmxMrDHBAinNdYAF4skQARQMCECCBUpR1oB5SCyqhlhsy/EXTBzFsB0A3TczAgBssFNnVcE5WgJUBsoSg5EkZ4HgHkEtsEIICMdST2QzLPUMjgwW810ZSGn5QgQAogICCAgN8idoHBwzQwgRqhmjooYiW9sIDfqb2wQoFeOBBAu/U2YEAxZGQQaO2fPDCm3xsIFg1BYCKzQsteJBBoYJ8wGVVArSk0QC5BMCpGSdEVxUME2bUZBscsLrHDEP+UcJGLUyiTF4ZCIAAAjJU8CISom4X10YPZKCAA68pcUBZcFkwrREfqLAdC1QQYWtqgw6IGV4Efk5w1B9+BTmqIectYYycAHhgZVQROAlCAU2YKQALJkBJ2T0CJ3BhwNYSbGEL9z5DZmp1bRfAuqVtAK4bJoxL4QYpCBCQBNJqFAQAIfkECQUANAAsAAAAAGQAZAAABv5AmnBILBqPyKRyyWw6n1Dma3P6RK/YrHZhEYhCB614TB4eOCAAAGS6lN9wZ0RNBwzi+HxRU1cn9IB4Ln0AFYGHRS8XD1EzKHUUJ09TJSUDjIhOKxEaLgMvkxUCKCgKE1ZNLwUUajAumJlKDyJpABQtqE0fGy0Dkk8TJH0xsUsZfQq/gR8hhJHFSSZ9LCuILxaEBAvQSDF9EsqAH97TbtxGJwx0MCm5gQssfSnnSCsmBBK4sR8zIjAwKEKAokcQyYMBAza4K8iwocOHECNKnEixosWLGDPSu9ChxISBUR6E0dhkgQAMMEiYGOnkQgQYAAhkAEnSyAJhdZI5+VABwf66DTWPfPBQiw6IO6k89CkQ1MgDFYQAEEsVoI+hpkReQCU0z8kAdWoomMM6JEXRVtt2ttAgwcQpskROGKgDIgQsJydO3IUr5EAICigEFNjLV8yHDw8OF17MuLHjx5AjS55MubLly5gza05ysMGChZuHvKhAAQYEGAqqEXnQosCnyx8aYPjGkkYEnxhKXD6xlW4GVBcI0OFAU/KG2YRMYApOh0XxyBseJR8bAgIAGEwtn1AQNUauCyVitHge+UUJmHVYACWiOLMq4WoEfA595ESBFANA09/Pv7///wAGKOCABBZo4GMfXDBAATO8oN9mDxTgkxocjBfFCyeQ19QLGf5MSAcBE0CxggYCBBAOWSsIEJUGk0izxm+FNSBdHzA8aMQF3KnhgYYkVYAeIYQh8UEGMBHQgY0aDYBTHwRA8cAIDAYZFI5RheBfin208d8GDgjAggQpnMjfBwcsIOaBaKap5hgYHrCBlKGtEIIMLIjgCY9xKFhABi2cec4IEpxFQAJIlrGBBSRAAAIGMqRV0AqBEgLDCIc8IMNZAHCgGj0vmBUVABLgOcYxUZkgKiAX8PEpCuvpIcOnAmzKzQUifAoACkjpwUpUFIS4kapRoSCrQRMEoIABMSxwKg0SfKoeQZ1iSocAhT4Qg4cAkFBCoTQU8KkDcCJi0qctMEEkIWsYULrECSoyOQNDHyhJSAiFbsDBpxpwu0COaoDILSInOEABAQSokB8TFczYBwWOKvHBBDHE0EG43Hxwwga1LVHAj0yqG5qMn2qzn72fKrCsZOf2gYKv+z2QAHxhXdXfCxN4IIECMazwbyBBAAAh+QQJBQA0ACwAAAAAZABkAAAG/kCacEgsGo/IpHLJbDqf0Kh0Sq1CLxmNpfWyer/fiwkGAKBSXbB63RyAymXCgU2vFzNw+MbOp7fyADBzfYRhCm8AICFpTg8HGxcfhU8XLSkle1ArHgIKKSdPHwsuHCwmI5NOLiiBGitRLyegUAcKeRSDqUkLEHAgMZKFDYhwEbpKFYAmD4UfEYAAGsdJM4CLk8nW00gfJnACC6kbAnkoudtFDxUeFSfBzSsKKCgS4ej3ShsbzPj9/v8AAwocSLCgwYMIEyr092LFiFcLC71wQQEDhQCznhyIoCJBxohHXnjLY+LCkxMm3oCIwAhkkQms8oCY8WQCg2/8XBYpQQZQ/oUnKzjAUdBSp5AWPfO0CFWCBQoBE4wauSACEItzTEQN2PBO6pABLOBQaNHVqxVRBTwUWFDW7JcPbd3KnUu3rt27ePPq3cu3r9+/gAMXeXGgqGAiHzaYQACDRIqcQkR1gOh3BjlfASAP4IBBAOW9D0IQizOAiAE4AfxesAUIRAYiGuB4UM1a5ushI5x69hsaGoHSQ7Rmqhw2jwPIh2l8WKEBBogzyJMPcWRYuvXr2LNr3869u/fvgU+MqDAhevIHGRigQNC5Q1ydLy4cePA+5Mg8EBKYj/hhgoReCLjAVRMFQEOaWSPc5IsKHyFBlYFleLBfQg+c1loBTMxAAIQA/gjQYEQzFAeIAkxMsCGEAmAVkU0GSsDEARRwqMGHC50ggYEOMCEShynUh9AHMYwWSFRMnBAjNDOa9UIAMQFAQAM+EjGAAKO5ItcHLXhgQghshbJBASZo4EAFJmn3wQsPvBAleGy22WYs9G2njgcGOJDBgJMkNsAAK1S3zQkuIAAHBBIQSQgWIpBAAAcB+KnLAy70YlWZfDiTVCIWTDjJABhAGAMhKwgZSAn4vBADhwIQkgCEJqxpxwsecEgAIS5AqICmfZiKahMfHNBBBAlMEEkTpxpogqOFDNAkIJ8y0YJQZUCggT1LrHBpGSD8hM8FDohKAI0vHZmHBJQm8UEAWEIu488JDgDCACpL7AgNCCk08UAKR8IQQrn9DOCABBqUgKsQCygIjQKuCqFPwghNQAKKyO61gsEjMmyXvNBgaN0KIg41MF8DHBKtCcNZ98EJA6RA3seEBAEAIfkECQUANAAsAAAAAGQAZAAABv5AmnBILBqPyKRyyWw6n9CodEqtQj+TSGZl7Xq/rwIBAmGNvuj080QCuAGah3pOL67ebtapzp8fMHgKF32EYCkEICAUA1EfFycvhVEXK3tRLwMhMQsfUCcZKioRB5JOByYcEg2lNA8RMG4gGqxMDm8CXJIzbXgTtEoCbwSMkiMQeAAFv0kBIG4CpJILFMi+y0cbLhQKI52SD81vCt7XRi8PD+TfFQoSKZbl8fLz9PX29/j5+vv8/f7/AAMKpPJhgAEOFhZIeTCiwAw5A498SICHQAd1Sz5kgGURY0QaB3i9MQCPyQUFbzxE+khkAAJkLKI1eWHiTQqPEWegQCahJP6TFRoEeBjEksgLFXhAxFj55MUFpkWHLFDgDIUHn1GtnBjQYgLErGDDih1LtqzZs2jTql3Ltq1bGi86RNA0AupbIgc8IAKgKALWtweoIgNggmjaBx0EEBDRYmWEwW+UpX0RA5YbGAnkMIDsRoLaCZvxUJhBwxlnFGorHMMDowSN1ZAJpLb8pjUNFpwByFC7gAMyCgpT5K6gNgxtEAU6ndAA2cRXtC8mBNUwgNwJB3sBEAhh+K7RASliFJiA07v58+jTq1/Pvr379+wvbHie/sMMAxQIMHDw9+OHFwCWh0QBO4lGXlYHRMACARJU0J0SKwAymAQbRLUcHgjEQB8SHv5wBoFkLCUAmxsYKLTEC8FwphJLR0GWARMv+MaZAxsC9ABKg8XQBHOcxSBgPx90OBgxS7TAGQFnFLUAAcgo0J8RDpj2BggvZjUBCyiAgIIJFTpxQQgUmMZCAXaxdEEL4/14xAsLVFBACyuoCd+cdNZp551CzFBAAimMUGMfJ6xQZjkfFMDAaiRcJQkWLsjAgQYd0PNBCRJO6cKgagwQ2mUVyNnHBiJwZiIfD2wqzKjXdFDgYCEQsoCUtaUgj2ozEtIBZ63GM0ClyOjYxAMbzLDCAZgasQBkyMlzgAScdbnEBgGQkAgLCTyIxAfMwuTsNR+0sGpKcl6AFB4QBODEAFi41RbpPJgwGYtfTWQwohsooJrEBwt4wAIFDhxYzwMDvPmnER/gOFgE6D0QKmQeoPcBjzmm1wCs9G7r3QcO0AYADMSp90AGChBAgQaNsffCCRtscIKnhAQBACH5BAkFADQALAAAAABkAGQAAAb+QJpwSCwaj8ikcslsOp/QqHRKrUofL6t2yxVeQiRKKtstm5efAgwAQHTO8PjwFWGzM/K8+VOCsFFveoJbDzEULAVkUC+Kg08vH1SQUi8jMREtD45NDwUqDhubNC0sbBgJoksdCGwmjXknBnYAMK+pRDF2HCeOKwKzAKG3RwMEbB62cReydijJwy8dHgW8jh8DFGwgBcNJH5OiHycFBQuR3ejp6uvs7e7v8PHy7y8PFw/n84MfKykmMhYyCNOnZ4AAP9oUzCAIKxswAAoOMFxyIoGHFs+MfLDw0E6MfBOLzMBgR8JAJQcYdGSjoFrIIhpmgYiRccgMYytZnHxJ4wP+CWAmLjBZ4bCjgJ08f83yoGnJCwUrAThoynNIHzsEBjhpAaIjCq1VibyIIYCCAoxOPnjoOCZskQ8HFpwAyeRFBQEwYCAQMICuWy0PFgxYUfOv4cOIEytezLix48eQI0sOe2JAgwEuJyt50UAEARQkZKDVjITOmlkIEhRG/GJFAAspJAoZgMLrwsgfKuAEIGCFkABRQ0hewQGYgywyoiqQ3KL2LAESoa7UILmDczsCeOVamULyBgnAPES66dU37gGl2Gio9qLA9T8VVh+GWyAG5iITFFAgQEDDbdJK8DPBCn4BaOCBCCao4IIMNujggxBG6MgFJajAggbxLfZNgUr+LCACMAZk5tYHMyTgQAwLyEfDUw+BwNRhIxTFQAUc4tfVQxRMYNgFStnBgmxL1NERCBUYtspDLTQhZIvc/FXBabM0uUQDKwFi2AokyaQjEw/sNosEIvKkFjAaULVEMcBQsABiHxiCAgUehOnNCCbsR4EJSP11glxTBDbBBipKKOighBZqqBEXjFBBBwfUKIejt6ygHwIYSJDhIONooEEEeUbaIxsIFADpFgdocBoIDHS6yQsO3DgLAWbC8QFwwEgQayrfrbSlHC8UZQcGuw6zQHEdFZnHA1DaAUMD6RyQXEfBBnjBBgdcMKoQL6T36n/DtOmqj/I9UCEJDJjQgXxkH6TwLQAmXJtHqcCgkGQTGbyXlRMneAClBECmk69zCowg3wZessGCig9MEEMILciZzq1LqNviCAxGsC4AIDC7YAkXg7Dmghf4yoYE7kKGzSw6OfjCBCEooEEMG5QsmTgXBJpHEAAh+QQJBQA0ACwAAAAAZABkAAAG/kCacEgsGo/IpHLJbDqf0Kh0Sq1ar9is9TMwmUYfrXjcXHAAAMGKzG5+LpPNK9pBoAmjth55cbBIFAoND08rLGgCG3uLQlwMaJAgLoROMx4ea4yLGyKQngAFmjQfKxMXokofGRCfkCyniy8FAgwWiqhHDxatkCh5iwOPaDG4RxcKvGgwLYwVKJAaxUa6yQAwE4wLhwAgKdJFHwUgyQKUey8dEhQhsN9DJyrJzJofLw9h7kULyJ4wKfj5Ah6IoYAFCwcD5gRcSOPFiQMnzDGcSLGixYsYxdQDmBHVgxEFQmRI2FHUCRcEIBEI0K6kHgvjPEEIoNClkhcLKhyA0iIZ/ooKNpU8MDAORAiJSnYl81AzaJEGnjDMYyKhmgakToU4+ESsSbxkDrBmjeEJRKgmKar9y2rkwDYAGm4xuUCBVyK2Rj5YMpFiAZQBdT2RwIb3yAexTA6EYEGABbvCkCNLnky5suXLmDNr3sy5s+d8HzZMyPS5yQoLLBiwsEC6tOERb9EwGMCR84URFWaYO8Dvk4ATn1doQAPCA6UBrHgN8PzCRUxrJYQUqNaV84FOnqLRmJ7MW+cDVT2ZEDLBDi/CnD9EeA6jg5ALBngpaLn5RAgYAAisFbJCwfM0C9S22QsbbHBCU6OkoIAACiQAnGtMHCYghBRWaOGFGGao4YYc/nbo4YeofHBACgGkcMCEkaEoVATmcZMCYlmF1kACLez0RAb49RPdZDOIMA4EGrR2U2CfSGAjZC/0xo1xTWzwn0roFbZASp6wIJcSKyRDwHKRLfCMJxRcmcQDX35ipWQPnJEdfUl4wIsHKgbVQo750ebECSb8Z0KcTi3ggAIhiDlXARpIoEEBMFr4wAWJgujoo5BGKukSH5ywwAoIZvhBAjKwIIADM+DywAAVYDrRCwEkhwYLfjHywQgiIIAACi5kKo0zrShg6xjafBICn4t84AIvEDR6hSqtUHDkNy+YkMyybHzg5icoRPmNB09aY+wQb1ywq2FpfRLmQiMQCYkDZ8COskACBpiQwArp0rCAuQB4wJAsdAKggKBIzKAmNyLwe8QLDbylwYMLceGAABKkcEK8SqIxnhOhVVDABAhLdkC+ymzL2QwcWwNthReU2Uu8nE3rSXUZ9vElCkxyOGoMMQzg8aRtBAEAOw==",imagePosition:"center center",maxSize:"100px",minSize:"20px",resizeInterval:50,size:"50%",zIndex:2147483647};function a(t,e){var i=(t=r(t)).is("body"),n=t.data("LoadingOverlayCount");if(n===o&&(n=0),0===n){var a=r("<div>",{class:"loadingoverlay",css:{"background-color":e.color,position:"relative",display:"flex","flex-direction":"column","align-items":"center","justify-content":"center"}});if(e.zIndex!==o&&a.css("z-index",e.zIndex),e.image&&a.css({"background-image":"url("+e.image+")","background-position":e.imagePosition,"background-repeat":"no-repeat"}),e.fontawesome&&r("<div>",{class:"loadingoverlay_fontawesome "+e.fontawesome}).appendTo(a),e.custom&&r(e.custom).appendTo(a),i?a.css({position:"fixed",top:0,left:0,width:"100%",height:"100%"}):a.css("position","fixed"===t.css("position")?"fixed":"absolute"),l(t,a,e,i),0<e.resizeInterval){var s=setInterval(function(){l(t,a,e,i)},e.resizeInterval);t.data("LoadingOverlayResizeIntervalId",s)}e.fade?!0===e.fade?e.fade=[400,200]:"string"!=typeof e.fade&&"number"!=typeof e.fade||(e.fade=[e.fade,e.fade]):e.fade=[0,0],t.data({LoadingOverlay:a,LoadingOverlayFadeOutDuration:e.fade[1]}),a.hide().appendTo("body").fadeIn(e.fade[0])}n++,t.data("LoadingOverlayCount",n)}function s(t,e){var i=(t=r(t)).data("LoadingOverlayCount");if(i!==o)if(i--,e||i<=0){var n=t.data("LoadingOverlayResizeIntervalId");n&&clearInterval(n),t.data("LoadingOverlay").fadeOut(t.data("LoadingOverlayFadeOutDuration"),function(){r(this).remove()}),t.removeData(["LoadingOverlay","LoadingOverlayCount","LoadingOverlayFadeOutDuration","LoadingOverlayResizeIntervalId"])}else t.data("LoadingOverlayCount",i)}function l(t,e,i,n){if(!n){var a="fixed"===t.css("position")?t.position():t.offset();e.css({top:a.top+parseInt(t.css("border-top-width"),10),left:a.left+parseInt(t.css("border-left-width"),10),width:t.innerWidth(),height:t.innerHeight()})}var s=n?r(window):t,o="auto";i.size&&"auto"!=i.size&&(o=Math.min(s.innerWidth(),s.innerHeight())*parseFloat(i.size)/100,i.maxSize&&o>parseInt(i.maxSize,10)&&(o=parseInt(i.maxSize,10)+"px"),i.minSize&&o<parseInt(i.minSize,10)&&(o=parseInt(i.minSize,10)+"px")),e.css("background-size",o),e.children(".loadingoverlay_fontawesome").css("font-size",o)}r.LoadingOverlaySetup=function(t){r.extend(!0,n,t)},r.LoadingOverlay=function(t,e){switch(t.toLowerCase()){case"show":a("body",r.extend(!0,{},n,e));break;case"hide":s("body",e)}},r.fn.LoadingOverlay=function(t,e){switch(t.toLowerCase()){case"show":var i=r.extend(!0,{},n,e);return this.each(function(){a(this,i)});case"hide":return this.each(function(){s(this,e)})}}}),function(m,t){m.fn.bootpag=function(t){var h=this,p=m.extend({total:0,page:1,maxVisible:null,leaps:!0,href:"javascript:void(0);",hrefVariable:"{{number}}",next:"&raquo;",prev:"&laquo;",firstLastUse:!1,first:'<span aria-hidden="true">&larr;</span>',last:'<span aria-hidden="true">&rarr;</span>',wrapClass:"pagination",activeClass:"active",disabledClass:"disabled",nextClass:"next",prevClass:"prev",lastClass:"last",firstClass:"first"},h.data("settings")||{},t||{});if(p.total<=0)return this;function s(t,e){e=parseInt(e,10);var i,n=0==p.maxVisible?1:p.maxVisible,a=p.maxVisible,s=Math.floor((e-1)/n)*n,o=t.find("li");p.page=e=e<0?0:e>p.total?p.total:e,o.removeClass(p.activeClass),i=e-1<1?1:p.leaps&&e-1>=p.maxVisible?Math.floor((e-1)/n)*n:e-1,p.firstLastUse&&o.first().toggleClass(p.disabledClass,1===e);var r=o.first();p.firstLastUse&&(r=r.next()),r.toggleClass(p.disabledClass,1===e).attr("data-lp",i).find("a").attr("href",f(i));a=1==p.maxVisible?0:1;i=e+1>p.total?p.total:p.leaps&&e+1<p.total-p.maxVisible?s+p.maxVisible+a:e+1;var l=o.last();p.firstLastUse&&(l=l.prev()),l.toggleClass(p.disabledClass,e===p.total).attr("data-lp",i).find("a").attr("href",f(i)),o.last().toggleClass(p.disabledClass,e===p.total);var d=o.filter("[data-lp="+e+"]"),c="."+[p.nextClass,p.prevClass,p.firstClass,p.lastClass].join(",.");if(!d.not(c).length){var u=e<=s?-p.maxVisible:0;o.not(c).each(function(t){i=t+1+s+u,m(this).attr("data-lp",i).toggle(i<=p.total).find("a").html(i).attr("href",f(i))}),d=o.filter("[data-lp="+e+"]")}d.not(c).addClass(p.activeClass),h.data("settings",p)}function f(t){return p.href.replace(p.hrefVariable,t)}return m.isNumeric(p.maxVisible)||p.maxVisible||(p.maxVisible=parseInt(p.total,10)),h.data("settings",p),this.each(function(){var t,e,i=m(this),n=['<ul class="',p.wrapClass,' bootpag">'];p.firstLastUse&&(n=n.concat(['<li data-lp="1" class="',p.firstClass,'"><a href="',f(1),'">',p.first,"</a></li>"])),p.prev&&(n=n.concat(['<li data-lp="1" class="',p.prevClass,'"><a href="',f(1),'">',p.prev,"</a></li>"]));for(var a=1;a<=Math.min(p.total,p.maxVisible);a++)n=n.concat(['<li data-lp="',a,'"><a href="',f(a),'">',a,"</a></li>"]);p.next&&(e=p.leaps&&p.total>p.maxVisible?Math.min(p.maxVisible+1,p.total):2,n=n.concat(['<li data-lp="',e,'" class="',p.nextClass,'"><a href="',f(e),'">',p.next,"</a></li>"])),p.firstLastUse&&(n=n.concat(['<li data-lp="',p.total,'" class="last"><a href="',f(p.total),'">',p.last,"</a></li>"])),n.push("</ul>"),i.find("ul.bootpag").remove(),i.append(n.join("")),t=i.find("ul.bootpag"),i.find("li").click(function(){var t=m(this);if(!t.hasClass(p.disabledClass)&&!t.hasClass(p.activeClass)){var e=parseInt(t.attr("data-lp"),10);h.find("ul.bootpag").each(function(){s(m(this),e)}),h.trigger("page",e)}}),s(t,p.page)})}}(jQuery,window),function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).Chart=t()}}(function(){return function s(o,r,l){function d(i,t){if(!r[i]){if(!o[i]){var e="function"==typeof require&&require;if(!t&&e)return e(i,!0);if(c)return c(i,!0);var n=new Error("Cannot find module '"+i+"'");throw n.code="MODULE_NOT_FOUND",n}var a=r[i]={exports:{}};o[i][0].call(a.exports,function(t){var e=o[i][1][t];return d(e||t)},a,a.exports,s,o,r,l)}return r[i].exports}for(var c="function"==typeof require&&require,t=0;t<l.length;t++)d(l[t]);return d}({1:[function(t,e,i){},{}],2:[function(t,e,i){var s=t(6);function n(t){if(t){var e=[0,0,0],i=1,n=t.match(/^#([a-fA-F0-9]{3})#x2F;i);if(n){n=n[1];for(var a=0;a<e.length;a++)e[a]=parseInt(n[a]+n[a],16)}else if(n=t.match(/^#([a-fA-F0-9]{6})#x2F;i)){n=n[1];for(a=0;a<e.length;a++)e[a]=parseInt(n.slice(2*a,2*a+2),16)}else if(n=t.match(/^rgba?\(\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)#x2F;i)){for(a=0;a<e.length;a++)e[a]=parseInt(n[a+1]);i=parseFloat(n[4])}else if(n=t.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)#x2F;i)){for(a=0;a<e.length;a++)e[a]=Math.round(2.55*parseFloat(n[a+1]));i=parseFloat(n[4])}else if(n=t.match(/(\w+)/)){if("transparent"==n[1])return[0,0,0,0];if(!(e=s[n[1]]))return}for(a=0;a<e.length;a++)e[a]=c(e[a],0,255);return i=i||0==i?c(i,0,1):1,e[3]=i,e}}function a(t){if(t){var e=t.match(/^hsla?\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/);if(e){var i=parseFloat(e[4]);return[c(parseInt(e[1]),0,360),c(parseFloat(e[2]),0,100),c(parseFloat(e[3]),0,100),c(isNaN(i)?1:i,0,1)]}}}function o(t){if(t){var e=t.match(/^hwb\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/);if(e){var i=parseFloat(e[4]);return[c(parseInt(e[1]),0,360),c(parseFloat(e[2]),0,100),c(parseFloat(e[3]),0,100),c(isNaN(i)?1:i,0,1)]}}}function r(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"rgba("+t[0]+", "+t[1]+", "+t[2]+", "+e+")"}function l(t,e){return"rgba("+Math.round(t[0]/255*100)+"%, "+Math.round(t[1]/255*100)+"%, "+Math.round(t[2]/255*100)+"%, "+(e||t[3]||1)+")"}function d(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+e+")"}function c(t,e,i){return Math.min(Math.max(e,t),i)}function u(t){var e=t.toString(16).toUpperCase();return e.length<2?"0"+e:e}e.exports={getRgba:n,getHsla:a,getRgb:function(t){var e=n(t);return e&&e.slice(0,3)},getHsl:function(t){var e=a(t);return e&&e.slice(0,3)},getHwb:o,getAlpha:function(t){var e=n(t);{if(e)return e[3];if(e=a(t))return e[3];if(e=o(t))return e[3]}},hexString:function(t){return"#"+u(t[0])+u(t[1])+u(t[2])},rgbString:function(t,e){if(e<1||t[3]&&t[3]<1)return r(t,e);return"rgb("+t[0]+", "+t[1]+", "+t[2]+")"},rgbaString:r,percentString:function(t,e){if(e<1||t[3]&&t[3]<1)return l(t,e);var i=Math.round(t[0]/255*100),n=Math.round(t[1]/255*100),a=Math.round(t[2]/255*100);return"rgb("+i+"%, "+n+"%, "+a+"%)"},percentaString:l,hslString:function(t,e){if(e<1||t[3]&&t[3]<1)return d(t,e);return"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)"},hslaString:d,hwbString:function(t,e){void 0===e&&(e=void 0!==t[3]?t[3]:1);return"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+(void 0!==e&&1!==e?", "+e:"")+")"},keyword:function(t){return h[t.slice(0,3)]}};var h={};for(var p in s)h[s[p]]=p},{6:6}],3:[function(t,e,i){var c=t(5),n=t(2),o=function(t){return t instanceof o?t:this instanceof o?(this.valid=!1,this.values={rgb:[0,0,0],hsl:[0,0,0],hsv:[0,0,0],hwb:[0,0,0],cmyk:[0,0,0,0],alpha:1},void("string"==typeof t?(e=n.getRgba(t))?this.setValues("rgb",e):(e=n.getHsla(t))?this.setValues("hsl",e):(e=n.getHwb(t))&&this.setValues("hwb",e):"object"==typeof t&&(void 0!==(e=t).r||void 0!==e.red?this.setValues("rgb",e):void 0!==e.l||void 0!==e.lightness?this.setValues("hsl",e):void 0!==e.v||void 0!==e.value?this.setValues("hsv",e):void 0!==e.w||void 0!==e.whiteness?this.setValues("hwb",e):void 0===e.c&&void 0===e.cyan||this.setValues("cmyk",e)))):new o(t);var e};o.prototype={isValid:function(){return this.valid},rgb:function(){return this.setSpace("rgb",arguments)},hsl:function(){return this.setSpace("hsl",arguments)},hsv:function(){return this.setSpace("hsv",arguments)},hwb:function(){return this.setSpace("hwb",arguments)},cmyk:function(){return this.setSpace("cmyk",arguments)},rgbArray:function(){return this.values.rgb},hslArray:function(){return this.values.hsl},hsvArray:function(){return this.values.hsv},hwbArray:function(){var t=this.values;return 1!==t.alpha?t.hwb.concat([t.alpha]):t.hwb},cmykArray:function(){return this.values.cmyk},rgbaArray:function(){var t=this.values;return t.rgb.concat([t.alpha])},hslaArray:function(){var t=this.values;return t.hsl.concat([t.alpha])},alpha:function(t){return void 0===t?this.values.alpha:(this.setValues("alpha",t),this)},red:function(t){return this.setChannel("rgb",0,t)},green:function(t){return this.setChannel("rgb",1,t)},blue:function(t){return this.setChannel("rgb",2,t)},hue:function(t){return t&&(t=(t%=360)<0?360+t:t),this.setChannel("hsl",0,t)},saturation:function(t){return this.setChannel("hsl",1,t)},lightness:function(t){return this.setChannel("hsl",2,t)},saturationv:function(t){return this.setChannel("hsv",1,t)},whiteness:function(t){return this.setChannel("hwb",1,t)},blackness:function(t){return this.setChannel("hwb",2,t)},value:function(t){return this.setChannel("hsv",2,t)},cyan:function(t){return this.setChannel("cmyk",0,t)},magenta:function(t){return this.setChannel("cmyk",1,t)},yellow:function(t){return this.setChannel("cmyk",2,t)},black:function(t){return this.setChannel("cmyk",3,t)},hexString:function(){return n.hexString(this.values.rgb)},rgbString:function(){return n.rgbString(this.values.rgb,this.values.alpha)},rgbaString:function(){return n.rgbaString(this.values.rgb,this.values.alpha)},percentString:function(){return n.percentString(this.values.rgb,this.values.alpha)},hslString:function(){return n.hslString(this.values.hsl,this.values.alpha)},hslaString:function(){return n.hslaString(this.values.hsl,this.values.alpha)},hwbString:function(){return n.hwbString(this.values.hwb,this.values.alpha)},keyword:function(){return n.keyword(this.values.rgb,this.values.alpha)},rgbNumber:function(){var t=this.values.rgb;return t[0]<<16|t[1]<<8|t[2]},luminosity:function(){for(var t=this.values.rgb,e=[],i=0;i<t.length;i++){var n=t[i]/255;e[i]=n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4)}return.2126*e[0]+.7152*e[1]+.0722*e[2]},contrast:function(t){var e=this.luminosity(),i=t.luminosity();return i<e?(e+.05)/(i+.05):(i+.05)/(e+.05)},level:function(t){var e=this.contrast(t);return 7.1<=e?"AAA":4.5<=e?"AA":""},dark:function(){var t=this.values.rgb;return(299*t[0]+587*t[1]+114*t[2])/1e3<128},light:function(){return!this.dark()},negate:function(){for(var t=[],e=0;e<3;e++)t[e]=255-this.values.rgb[e];return this.setValues("rgb",t),this},lighten:function(t){var e=this.values.hsl;return e[2]+=e[2]*t,this.setValues("hsl",e),this},darken:function(t){var e=this.values.hsl;return e[2]-=e[2]*t,this.setValues("hsl",e),this},saturate:function(t){var e=this.values.hsl;return e[1]+=e[1]*t,this.setValues("hsl",e),this},desaturate:function(t){var e=this.values.hsl;return e[1]-=e[1]*t,this.setValues("hsl",e),this},whiten:function(t){var e=this.values.hwb;return e[1]+=e[1]*t,this.setValues("hwb",e),this},blacken:function(t){var e=this.values.hwb;return e[2]+=e[2]*t,this.setValues("hwb",e),this},greyscale:function(){var t=this.values.rgb,e=.3*t[0]+.59*t[1]+.11*t[2];return this.setValues("rgb",[e,e,e]),this},clearer:function(t){var e=this.values.alpha;return this.setValues("alpha",e-e*t),this},opaquer:function(t){var e=this.values.alpha;return this.setValues("alpha",e+e*t),this},rotate:function(t){var e=this.values.hsl,i=(e[0]+t)%360;return e[0]=i<0?360+i:i,this.setValues("hsl",e),this},mix:function(t,e){var i=t,n=void 0===e?.5:e,a=2*n-1,s=this.alpha()-i.alpha(),o=((a*s==-1?a:(a+s)/(1+a*s))+1)/2,r=1-o;return this.rgb(o*this.red()+r*i.red(),o*this.green()+r*i.green(),o*this.blue()+r*i.blue()).alpha(this.alpha()*n+i.alpha()*(1-n))},toJSON:function(){return this.rgb()},clone:function(){var t,e,i=new o,n=this.values,a=i.values;for(var s in n)n.hasOwnProperty(s)&&(t=n[s],"[object Array]"===(e={}.toString.call(t))?a[s]=t.slice(0):"[object Number]"===e?a[s]=t:console.error("unexpected color value:",t));return i}},o.prototype.spaces={rgb:["red","green","blue"],hsl:["hue","saturation","lightness"],hsv:["hue","saturation","value"],hwb:["hue","whiteness","blackness"],cmyk:["cyan","magenta","yellow","black"]},o.prototype.maxes={rgb:[255,255,255],hsl:[360,100,100],hsv:[360,100,100],hwb:[360,100,100],cmyk:[100,100,100,100]},o.prototype.getValues=function(t){for(var e=this.values,i={},n=0;n<t.length;n++)i[t.charAt(n)]=e[t][n];return 1!==e.alpha&&(i.a=e.alpha),i},o.prototype.setValues=function(t,e){var i,n,a=this.values,s=this.spaces,o=this.maxes,r=1;if(this.valid=!0,"alpha"===t)r=e;else if(e.length)a[t]=e.slice(0,t.length),r=e[t.length];else if(void 0!==e[t.charAt(0)]){for(i=0;i<t.length;i++)a[t][i]=e[t.charAt(i)];r=e.a}else if(void 0!==e[s[t][0]]){var l=s[t];for(i=0;i<t.length;i++)a[t][i]=e[l[i]];r=e.alpha}if(a.alpha=Math.max(0,Math.min(1,void 0===r?a.alpha:r)),"alpha"===t)return!1;for(i=0;i<t.length;i++)n=Math.max(0,Math.min(o[t][i],a[t][i])),a[t][i]=Math.round(n);for(var d in s)d!==t&&(a[d]=c[t][d](a[t]));return!0},o.prototype.setSpace=function(t,e){var i=e[0];return void 0===i?this.getValues(t):("number"==typeof i&&(i=Array.prototype.slice.call(e)),this.setValues(t,i),this)},o.prototype.setChannel=function(t,e,i){var n=this.values[t];return void 0===i?n[e]:(i===n[e]||(n[e]=i,this.setValues(t,n)),this)},"undefined"!=typeof window&&(window.Color=o),e.exports=o},{2:2,5:5}],4:[function(t,e,i){function a(t){var e,i,n=t[0]/255,a=t[1]/255,s=t[2]/255,o=Math.min(n,a,s),r=Math.max(n,a,s),l=r-o;return r==o?e=0:n==r?e=(a-s)/l:a==r?e=2+(s-n)/l:s==r&&(e=4+(n-a)/l),(e=Math.min(60*e,360))<0&&(e+=360),i=(o+r)/2,[e,100*(r==o?0:i<=.5?l/(r+o):l/(2-r-o)),100*i]}function n(t){var e,i,n=t[0],a=t[1],s=t[2],o=Math.min(n,a,s),r=Math.max(n,a,s),l=r-o;return i=0==r?0:l/r*1e3/10,r==o?e=0:n==r?e=(a-s)/l:a==r?e=2+(s-n)/l:s==r&&(e=4+(n-a)/l),(e=Math.min(60*e,360))<0&&(e+=360),[e,i,r/255*1e3/10]}function s(t){var e=t[0],i=t[1],n=t[2];return[a(t)[0],100*(1/255*Math.min(e,Math.min(i,n))),100*(n=1-1/255*Math.max(e,Math.max(i,n)))]}function o(t){var e,i=t[0]/255,n=t[1]/255,a=t[2]/255;return[100*((1-i-(e=Math.min(1-i,1-n,1-a)))/(1-e)||0),100*((1-n-e)/(1-e)||0),100*((1-a-e)/(1-e)||0),100*e]}function l(t){return S[JSON.stringify(t)]}function d(t){var e=t[0]/255,i=t[1]/255,n=t[2]/255;return[100*(.4124*(e=.04045<e?Math.pow((e+.055)/1.055,2.4):e/12.92)+.3576*(i=.04045<i?Math.pow((i+.055)/1.055,2.4):i/12.92)+.1805*(n=.04045<n?Math.pow((n+.055)/1.055,2.4):n/12.92)),100*(.2126*e+.7152*i+.0722*n),100*(.0193*e+.1192*i+.9505*n)]}function c(t){var e=d(t),i=e[0],n=e[1],a=e[2];return n/=100,a/=108.883,i=.008856<(i/=95.047)?Math.pow(i,1/3):7.787*i+16/116,[116*(n=.008856<n?Math.pow(n,1/3):7.787*n+16/116)-16,500*(i-n),200*(n-(a=.008856<a?Math.pow(a,1/3):7.787*a+16/116))]}function u(t){var e,i,n,a,s,o=t[0]/360,r=t[1]/100,l=t[2]/100;if(0==r)return[s=255*l,s,s];e=2*l-(i=l<.5?l*(1+r):l+r-l*r),a=[0,0,0];for(var d=0;d<3;d++)(n=o+1/3*-(d-1))<0&&n++,1<n&&n--,s=6*n<1?e+6*(i-e)*n:2*n<1?i:3*n<2?e+(i-e)*(2/3-n)*6:e,a[d]=255*s;return a}function h(t){var e=t[0]/60,i=t[1]/100,n=t[2]/100,a=Math.floor(e)%6,s=e-Math.floor(e),o=255*n*(1-i),r=255*n*(1-i*s),l=255*n*(1-i*(1-s));n*=255;switch(a){case 0:return[n,l,o];case 1:return[r,n,o];case 2:return[o,n,l];case 3:return[o,r,n];case 4:return[l,o,n];case 5:return[n,o,r]}}function p(t){var e,i,n,a,s=t[0]/360,o=t[1]/100,l=t[2]/100,d=o+l;switch(1<d&&(o/=d,l/=d),n=6*s-(e=Math.floor(6*s)),0!=(1&e)&&(n=1-n),a=o+n*((i=1-l)-o),e){default:case 6:case 0:r=i,g=a,b=o;break;case 1:r=a,g=i,b=o;break;case 2:r=o,g=i,b=a;break;case 3:r=o,g=a,b=i;break;case 4:r=a,g=o,b=i;break;case 5:r=i,g=o,b=a}return[255*r,255*g,255*b]}function f(t){var e=t[0]/100,i=t[1]/100,n=t[2]/100,a=t[3]/100;return[255*(1-Math.min(1,e*(1-a)+a)),255*(1-Math.min(1,i*(1-a)+a)),255*(1-Math.min(1,n*(1-a)+a))]}function m(t){var e,i,n,a=t[0]/100,s=t[1]/100,o=t[2]/100;return i=-.9689*a+1.8758*s+.0415*o,n=.0557*a+-.204*s+1.057*o,e=.0031308<(e=3.2406*a+-1.5372*s+-.4986*o)?1.055*Math.pow(e,1/2.4)-.055:e*=12.92,i=.0031308<i?1.055*Math.pow(i,1/2.4)-.055:i*=12.92,n=.0031308<n?1.055*Math.pow(n,1/2.4)-.055:n*=12.92,[255*(e=Math.min(Math.max(0,e),1)),255*(i=Math.min(Math.max(0,i),1)),255*(n=Math.min(Math.max(0,n),1))]}function v(t){var e=t[0],i=t[1],n=t[2];return i/=100,n/=108.883,e=.008856<(e/=95.047)?Math.pow(e,1/3):7.787*e+16/116,[116*(i=.008856<i?Math.pow(i,1/3):7.787*i+16/116)-16,500*(e-i),200*(i-(n=.008856<n?Math.pow(n,1/3):7.787*n+16/116))]}function y(t){var e,i,n,a,s=t[0],o=t[1],r=t[2];return a=s<=8?(i=100*s/903.3)/100*7.787+16/116:(i=100*Math.pow((s+16)/116,3),Math.pow(i/100,1/3)),[e=e/95.047<=.008856?e=95.047*(o/500+a-16/116)/7.787:95.047*Math.pow(o/500+a,3),i,n=n/108.883<=.008859?n=108.883*(a-r/200-16/116)/7.787:108.883*Math.pow(a-r/200,3)]}function w(t){var e,i=t[0],n=t[1],a=t[2];return(e=360*Math.atan2(a,n)/2/Math.PI)<0&&(e+=360),[i,Math.sqrt(n*n+a*a),e]}function x(t){return m(y(t))}function k(t){var e,i=t[0],n=t[1];return e=t[2]/360*2*Math.PI,[i,n*Math.cos(e),n*Math.sin(e)]}function C(t){return _[t]}e.exports={rgb2hsl:a,rgb2hsv:n,rgb2hwb:s,rgb2cmyk:o,rgb2keyword:l,rgb2xyz:d,rgb2lab:c,rgb2lch:function(t){return w(c(t))},hsl2rgb:u,hsl2hsv:function(t){var e=t[0],i=t[1]/100,n=t[2]/100;return 0!==n?[e,100*(2*(i*=(n*=2)<=1?n:2-n)/(n+i)),100*((n+i)/2)]:[0,0,0]},hsl2hwb:function(t){return s(u(t))},hsl2cmyk:function(t){return o(u(t))},hsl2keyword:function(t){return l(u(t))},hsv2rgb:h,hsv2hsl:function(t){var e,i,n=t[0],a=t[1]/100,s=t[2]/100;return e=a*s,[n,100*(e=(e/=(i=(2-a)*s)<=1?i:2-i)||0),100*(i/=2)]},hsv2hwb:function(t){return s(h(t))},hsv2cmyk:function(t){return o(h(t))},hsv2keyword:function(t){return l(h(t))},hwb2rgb:p,hwb2hsl:function(t){return a(p(t))},hwb2hsv:function(t){return n(p(t))},hwb2cmyk:function(t){return o(p(t))},hwb2keyword:function(t){return l(p(t))},cmyk2rgb:f,cmyk2hsl:function(t){return a(f(t))},cmyk2hsv:function(t){return n(f(t))},cmyk2hwb:function(t){return s(f(t))},cmyk2keyword:function(t){return l(f(t))},keyword2rgb:C,keyword2hsl:function(t){return a(C(t))},keyword2hsv:function(t){return n(C(t))},keyword2hwb:function(t){return s(C(t))},keyword2cmyk:function(t){return o(C(t))},keyword2lab:function(t){return c(C(t))},keyword2xyz:function(t){return d(C(t))},xyz2rgb:m,xyz2lab:v,xyz2lch:function(t){return w(v(t))},lab2xyz:y,lab2rgb:x,lab2lch:w,lch2lab:k,lch2xyz:function(t){return y(k(t))},lch2rgb:function(t){return x(k(t))}};var _={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},S={};for(var P in _)S[JSON.stringify(_[P])]=P},{}],5:[function(t,e,i){var a=t(4),s=function(){return new d};for(var n in a){s[n+"Raw"]=function(e){return function(t){return"number"==typeof t&&(t=Array.prototype.slice.call(arguments)),a[e](t)}}(n);var o=/(\w+)2(\w+)/.exec(n),r=o[1],l=o[2];(s[r]=s[r]||{})[l]=s[n]=function(n){return function(t){"number"==typeof t&&(t=Array.prototype.slice.call(arguments));var e=a[n](t);if("string"==typeof e||void 0===e)return e;for(var i=0;i<e.length;i++)e[i]=Math.round(e[i]);return e}}(n)}var d=function(){this.convs={}};d.prototype.routeSpace=function(t,e){var i=e[0];return void 0===i?this.getValues(t):("number"==typeof i&&(i=Array.prototype.slice.call(e)),this.setValues(t,i))},d.prototype.setValues=function(t,e){return this.space=t,this.convs={},this.convs[t]=e,this},d.prototype.getValues=function(t){var e=this.convs[t];if(!e){var i=this.space,n=this.convs[i];e=s[i][t](n),this.convs[t]=e}return e},["rgb","hsl","hsv","cmyk","keyword"].forEach(function(e){d.prototype[e]=function(t){return this.routeSpace(e,arguments)}}),e.exports=s},{4:4}],6:[function(t,e,i){"use strict";e.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},{}],7:[function(t,e,i){var n=t(29)();n.helpers=t(45),t(27)(n),n.defaults=t(25),n.Element=t(26),n.elements=t(40),n.Interaction=t(28),n.platform=t(48),t(31)(n),t(22)(n),t(23)(n),t(24)(n),t(30)(n),t(33)(n),t(32)(n),t(35)(n),t(54)(n),t(52)(n),t(53)(n),t(55)(n),t(56)(n),t(57)(n),t(15)(n),t(16)(n),t(17)(n),t(18)(n),t(19)(n),t(20)(n),t(21)(n),t(8)(n),t(9)(n),t(10)(n),t(11)(n),t(12)(n),t(13)(n),t(14)(n);var a=[];a.push(t(49)(n),t(50)(n),t(51)(n)),n.plugins.register(a),n.platform.initialize(),e.exports=n,"undefined"!=typeof window&&(window.Chart=n),n.canvasHelpers=n.helpers.canvas},{10:10,11:11,12:12,13:13,14:14,15:15,16:16,17:17,18:18,19:19,20:20,21:21,22:22,23:23,24:24,25:25,26:26,27:27,28:28,29:29,30:30,31:31,32:32,33:33,35:35,40:40,45:45,48:48,49:49,50:50,51:51,52:52,53:53,54:54,55:55,56:56,57:57,8:8,9:9}],8:[function(t,e,i){"use strict";e.exports=function(i){i.Bar=function(t,e){return e.type="bar",new i(t,e)}}},{}],9:[function(t,e,i){"use strict";e.exports=function(i){i.Bubble=function(t,e){return e.type="bubble",new i(t,e)}}},{}],10:[function(t,e,i){"use strict";e.exports=function(i){i.Doughnut=function(t,e){return e.type="doughnut",new i(t,e)}}},{}],11:[function(t,e,i){"use strict";e.exports=function(i){i.Line=function(t,e){return e.type="line",new i(t,e)}}},{}],12:[function(t,e,i){"use strict";e.exports=function(i){i.PolarArea=function(t,e){return e.type="polarArea",new i(t,e)}}},{}],13:[function(t,e,i){"use strict";e.exports=function(i){i.Radar=function(t,e){return e.type="radar",new i(t,e)}}},{}],14:[function(t,e,i){"use strict";e.exports=function(i){i.Scatter=function(t,e){return e.type="scatter",new i(t,e)}}},{}],15:[function(t,e,i){"use strict";var n=t(25),a=t(40),m=t(45);n._set("bar",{hover:{mode:"label"},scales:{xAxes:[{type:"category",categoryPercentage:.8,barPercentage:.9,offset:!0,gridLines:{offsetGridLines:!0}}],yAxes:[{type:"linear"}]}}),n._set("horizontalBar",{hover:{mode:"index",axis:"y"},scales:{xAxes:[{type:"linear",position:"bottom"}],yAxes:[{position:"left",type:"category",categoryPercentage:.8,barPercentage:.9,offset:!0,gridLines:{offsetGridLines:!0}}]},elements:{rectangle:{borderSkipped:"left"}},tooltips:{callbacks:{title:function(t,e){var i="";return 0<t.length&&(t[0].yLabel?i=t[0].yLabel:0<e.labels.length&&t[0].index<e.labels.length&&(i=e.labels[t[0].index])),i},label:function(t,e){return(e.datasets[t.datasetIndex].label||"")+": "+t.xLabel}},mode:"index",axis:"y"}}),e.exports=function(e){e.controllers.bar=e.DatasetController.extend({dataElementType:a.Rectangle,initialize:function(){var t;e.DatasetController.prototype.initialize.apply(this,arguments),(t=this.getMeta()).stack=this.getDataset().stack,t.bar=!0},update:function(t){var e,i,n=this.getMeta().data;for(this._ruler=this.getRuler(),e=0,i=n.length;e<i;++e)this.updateElement(n[e],e,t)},updateElement:function(t,e,i){var n=this.chart,a=this.getMeta(),s=this.getDataset(),o=t.custom||{},r=n.options.elements.rectangle;t._xScale=this.getScaleForId(a.xAxisID),t._yScale=this.getScaleForId(a.yAxisID),t._datasetIndex=this.index,t._index=e,t._model={datasetLabel:s.label,label:n.data.labels[e],borderSkipped:o.borderSkipped?o.borderSkipped:r.borderSkipped,backgroundColor:o.backgroundColor?o.backgroundColor:m.valueAtIndexOrDefault(s.backgroundColor,e,r.backgroundColor),borderColor:o.borderColor?o.borderColor:m.valueAtIndexOrDefault(s.borderColor,e,r.borderColor),borderWidth:o.borderWidth?o.borderWidth:m.valueAtIndexOrDefault(s.borderWidth,e,r.borderWidth)},this.updateElementGeometry(t,e,i),t.pivot()},updateElementGeometry:function(t,e,i){var n=t._model,a=this.getValueScale(),s=a.getBasePixel(),o=a.isHorizontal(),r=this._ruler||this.getRuler(),l=this.calculateBarValuePixels(this.index,e),d=this.calculateBarIndexPixels(this.index,e,r);n.horizontal=o,n.base=i?s:l.base,n.x=o?i?s:l.head:d.center,n.y=o?d.center:i?s:l.head,n.height=o?d.size:void 0,n.width=o?void 0:d.size},getValueScaleId:function(){return this.getMeta().yAxisID},getIndexScaleId:function(){return this.getMeta().xAxisID},getValueScale:function(){return this.getScaleForId(this.getValueScaleId())},getIndexScale:function(){return this.getScaleForId(this.getIndexScaleId())},getStackCount:function(t){var e,i,n=this.chart,a=this.getIndexScale().options.stacked,s=void 0===t?n.data.datasets.length:t+1,o=[];for(e=0;e<s;++e)(i=n.getDatasetMeta(e)).bar&&n.isDatasetVisible(e)&&(!1===a||!0===a&&-1===o.indexOf(i.stack)||void 0===a&&(void 0===i.stack||-1===o.indexOf(i.stack)))&&o.push(i.stack);return o.length},getStackIndex:function(t){return this.getStackCount(t)-1},getRuler:function(){var t,e,i=this.getIndexScale(),n=this.getStackCount(),a=this.index,s=[],o=i.isHorizontal(),r=o?i.left:i.top,l=r+(o?i.width:i.height);for(t=0,e=this.getMeta().data.length;t<e;++t)s.push(i.getPixelForValue(null,t,a));return{pixels:s,start:r,end:l,stackCount:n,scale:i}},calculateBarValuePixels:function(t,e){var i,n,a,s,o,r,l=this.chart,d=this.getMeta(),c=this.getValueScale(),u=l.data.datasets,h=c.getRightValue(u[t].data[e]),p=c.options.stacked,f=d.stack,m=0;if(p||void 0===p&&void 0!==f)for(i=0;i<t;++i)(n=l.getDatasetMeta(i)).bar&&n.stack===f&&n.controller.getValueScaleId()===c.id&&l.isDatasetVisible(i)&&(a=c.getRightValue(u[i].data[e]),(h<0&&a<0||0<=h&&0<a)&&(m+=a));return s=c.getPixelForValue(m),{size:r=((o=c.getPixelForValue(m+h))-s)/2,base:s,head:o,center:o+r/2}},calculateBarIndexPixels:function(t,e,i){var n,a,s,o,r,l=i.scale.options,d=this.getStackIndex(t),c=i.pixels,u=c[e],h=c.length,p=i.start,f=i.end;return 1===h?(n=p<u?u-p:f-u,a=u<f?f-u:u-p):(0<e&&(n=(u-c[e-1])/2,e===h-1&&(a=n)),e<h-1&&(a=(c[e+1]-u)/2,0===e&&(n=a))),r=(o=((s=n*l.categoryPercentage)+a*l.categoryPercentage)/i.stackCount)*l.barPercentage,u-=s,u+=o*d,{size:r=Math.min(m.valueOrDefault(l.barThickness,r),m.valueOrDefault(l.maxBarThickness,1/0)),base:u+=(o-r)/2,head:u+r,center:u+r/2}},draw:function(){var t=this.chart,e=this.getValueScale(),i=this.getMeta().data,n=this.getDataset(),a=i.length,s=0;for(m.canvas.clipArea(t.ctx,t.chartArea);s<a;++s)isNaN(e.getRightValue(n.data[s]))||i[s].draw();m.canvas.unclipArea(t.ctx)},setHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],i=t._index,n=t.custom||{},a=t._model;a.backgroundColor=n.hoverBackgroundColor?n.hoverBackgroundColor:m.valueAtIndexOrDefault(e.hoverBackgroundColor,i,m.getHoverColor(a.backgroundColor)),a.borderColor=n.hoverBorderColor?n.hoverBorderColor:m.valueAtIndexOrDefault(e.hoverBorderColor,i,m.getHoverColor(a.borderColor)),a.borderWidth=n.hoverBorderWidth?n.hoverBorderWidth:m.valueAtIndexOrDefault(e.hoverBorderWidth,i,a.borderWidth)},removeHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],i=t._index,n=t.custom||{},a=t._model,s=this.chart.options.elements.rectangle;a.backgroundColor=n.backgroundColor?n.backgroundColor:m.valueAtIndexOrDefault(e.backgroundColor,i,s.backgroundColor),a.borderColor=n.borderColor?n.borderColor:m.valueAtIndexOrDefault(e.borderColor,i,s.borderColor),a.borderWidth=n.borderWidth?n.borderWidth:m.valueAtIndexOrDefault(e.borderWidth,i,s.borderWidth)}}),e.controllers.horizontalBar=e.controllers.bar.extend({getValueScaleId:function(){return this.getMeta().xAxisID},getIndexScaleId:function(){return this.getMeta().yAxisID}})}},{25:25,40:40,45:45}],16:[function(t,e,i){"use strict";var n=t(25),a=t(40),f=t(45);n._set("bubble",{hover:{mode:"single"},scales:{xAxes:[{type:"linear",position:"bottom",id:"x-axis-0"}],yAxes:[{type:"linear",position:"left",id:"y-axis-0"}]},tooltips:{callbacks:{title:function(){return""},label:function(t,e){var i=e.datasets[t.datasetIndex].label||"",n=e.datasets[t.datasetIndex].data[t.index];return i+": ("+t.xLabel+", "+t.yLabel+", "+n.r+")"}}}}),e.exports=function(t){t.controllers.bubble=t.DatasetController.extend({dataElementType:a.Point,update:function(i){var n=this,t=n.getMeta().data;f.each(t,function(t,e){n.updateElement(t,e,i)})},updateElement:function(t,e,i){var n=this.getMeta(),a=t.custom||{},s=this.getScaleForId(n.xAxisID),o=this.getScaleForId(n.yAxisID),r=this._resolveElementOptions(t,e),l=this.getDataset().data[e],d=this.index,c=i?s.getPixelForDecimal(.5):s.getPixelForValue("object"==typeof l?l:NaN,e,d),u=i?o.getBasePixel():o.getPixelForValue(l,e,d);t._xScale=s,t._yScale=o,t._options=r,t._datasetIndex=d,t._index=e,t._model={backgroundColor:r.backgroundColor,borderColor:r.borderColor,borderWidth:r.borderWidth,hitRadius:r.hitRadius,pointStyle:r.pointStyle,radius:i?0:r.radius,skip:a.skip||isNaN(c)||isNaN(u),x:c,y:u},t.pivot()},setHoverStyle:function(t){var e=t._model,i=t._options;e.backgroundColor=f.valueOrDefault(i.hoverBackgroundColor,f.getHoverColor(i.backgroundColor)),e.borderColor=f.valueOrDefault(i.hoverBorderColor,f.getHoverColor(i.borderColor)),e.borderWidth=f.valueOrDefault(i.hoverBorderWidth,i.borderWidth),e.radius=i.radius+i.hoverRadius},removeHoverStyle:function(t){var e=t._model,i=t._options;e.backgroundColor=i.backgroundColor,e.borderColor=i.borderColor,e.borderWidth=i.borderWidth,e.radius=i.radius},_resolveElementOptions:function(t,e){var i,n,a,s=this.chart,o=s.data.datasets[this.index],r=t.custom||{},l=s.options.elements.point,d=f.options.resolve,c=o.data[e],u={},h={chart:s,dataIndex:e,dataset:o,datasetIndex:this.index},p=["backgroundColor","borderColor","borderWidth","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth","hoverRadius","hitRadius","pointStyle"];for(i=0,n=p.length;i<n;++i)u[a=p[i]]=d([r[a],o[a],l[a]],h,e);return u.radius=d([r.radius,c?c.r:void 0,o.radius,l.radius],h,e),u}})}},{25:25,40:40,45:45}],17:[function(t,e,i){"use strict";var n=t(25),a=t(40),T=t(45);n._set("doughnut",{animation:{animateRotate:!0,animateScale:!1},hover:{mode:"single"},legendCallback:function(t){var e=[];e.push('<ul class="'+t.id+'-legend">');var i=t.data,n=i.datasets,a=i.labels;if(n.length)for(var s=0;s<n[0].data.length;++s)e.push('<li><span style="background-color:'+n[0].backgroundColor[s]+'"></span>'),a[s]&&e.push(a[s]),e.push("</li>");return e.push("</ul>"),e.join("")},legend:{labels:{generateLabels:function(l){var d=l.data;return d.labels.length&&d.datasets.length?d.labels.map(function(t,e){var i=l.getDatasetMeta(0),n=d.datasets[0],a=i.data[e],s=a&&a.custom||{},o=T.valueAtIndexOrDefault,r=l.options.elements.arc;return{text:t,fillStyle:s.backgroundColor?s.backgroundColor:o(n.backgroundColor,e,r.backgroundColor),strokeStyle:s.borderColor?s.borderColor:o(n.borderColor,e,r.borderColor),lineWidth:s.borderWidth?s.borderWidth:o(n.borderWidth,e,r.borderWidth),hidden:isNaN(n.data[e])||i.data[e].hidden,index:e}}):[]}},onClick:function(t,e){var i,n,a,s=e.index,o=this.chart;for(i=0,n=(o.data.datasets||[]).length;i<n;++i)(a=o.getDatasetMeta(i)).data[s]&&(a.data[s].hidden=!a.data[s].hidden);o.update()}},cutoutPercentage:50,rotation:-.5*Math.PI,circumference:2*Math.PI,tooltips:{callbacks:{title:function(){return""},label:function(t,e){var i=e.labels[t.index],n=": "+e.datasets[t.datasetIndex].data[t.index];return T.isArray(i)?(i=i.slice())[0]+=n:i+=n,i}}}}),n._set("pie",T.clone(n.doughnut)),n._set("pie",{cutoutPercentage:0}),e.exports=function(e){e.controllers.doughnut=e.controllers.pie=e.DatasetController.extend({dataElementType:a.Arc,linkScales:T.noop,getRingIndex:function(t){for(var e=0,i=0;i<t;++i)this.chart.isDatasetVisible(i)&&++e;return e},update:function(i){var n=this,t=n.chart,e=t.chartArea,a=t.options,s=a.elements.arc,o=e.right-e.left-s.borderWidth,r=e.bottom-e.top-s.borderWidth,l=Math.min(o,r),d={x:0,y:0},c=n.getMeta(),u=a.cutoutPercentage,h=a.circumference;if(h<2*Math.PI){var p=a.rotation%(2*Math.PI),f=(p+=2*Math.PI*(p>=Math.PI?-1:p<-Math.PI?1:0))+h,m=Math.cos(p),g=Math.sin(p),v=Math.cos(f),b=Math.sin(f),y=p<=0&&0<=f||p<=2*Math.PI&&2*Math.PI<=f,w=p<=.5*Math.PI&&.5*Math.PI<=f||p<=2.5*Math.PI&&2.5*Math.PI<=f,x=p<=-Math.PI&&-Math.PI<=f||p<=Math.PI&&Math.PI<=f,k=p<=.5*-Math.PI&&.5*-Math.PI<=f||p<=1.5*Math.PI&&1.5*Math.PI<=f,C=u/100,_=x?-1:Math.min(m*(m<0?1:C),v*(v<0?1:C)),S=k?-1:Math.min(g*(g<0?1:C),b*(b<0?1:C)),P=y?1:Math.max(m*(0<m?1:C),v*(0<v?1:C)),A=w?1:Math.max(g*(0<g?1:C),b*(0<b?1:C)),M=.5*(P-_),D=.5*(A-S);l=Math.min(o/M,r/D),d={x:-.5*(P+_),y:-.5*(A+S)}}t.borderWidth=n.getMaxBorderWidth(c.data),t.outerRadius=Math.max((l-t.borderWidth)/2,0),t.innerRadius=Math.max(u?t.outerRadius/100*u:0,0),t.radiusLength=(t.outerRadius-t.innerRadius)/t.getVisibleDatasetCount(),t.offsetX=d.x*t.outerRadius,t.offsetY=d.y*t.outerRadius,c.total=n.calculateTotal(),n.outerRadius=t.outerRadius-t.radiusLength*n.getRingIndex(n.index),n.innerRadius=Math.max(n.outerRadius-t.radiusLength,0),T.each(c.data,function(t,e){n.updateElement(t,e,i)})},updateElement:function(t,e,i){var n=this.chart,a=n.chartArea,s=n.options,o=s.animation,r=(a.left+a.right)/2,l=(a.top+a.bottom)/2,d=s.rotation,c=s.rotation,u=this.getDataset(),h=i&&o.animateRotate?0:t.hidden?0:this.calculateCircumference(u.data[e])*(s.circumference/(2*Math.PI)),p=i&&o.animateScale?0:this.innerRadius,f=i&&o.animateScale?0:this.outerRadius,m=T.valueAtIndexOrDefault;T.extend(t,{_datasetIndex:this.index,_index:e,_model:{x:r+n.offsetX,y:l+n.offsetY,startAngle:d,endAngle:c,circumference:h,outerRadius:f,innerRadius:p,label:m(u.label,e,n.data.labels[e])}});var g=t._model;this.removeHoverStyle(t),i&&o.animateRotate||(g.startAngle=0===e?s.rotation:this.getMeta().data[e-1]._model.endAngle,g.endAngle=g.startAngle+g.circumference),t.pivot()},removeHoverStyle:function(t){e.DatasetController.prototype.removeHoverStyle.call(this,t,this.chart.options.elements.arc)},calculateTotal:function(){var i,n=this.getDataset(),t=this.getMeta(),a=0;return T.each(t.data,function(t,e){i=n.data[e],isNaN(i)||t.hidden||(a+=Math.abs(i))}),a},calculateCircumference:function(t){var e=this.getMeta().total;return 0<e&&!isNaN(t)?2*Math.PI*(t/e):0},getMaxBorderWidth:function(t){for(var e,i,n=0,a=this.index,s=t.length,o=0;o<s;o++)n=(n=n<(e=t[o]._model?t[o]._model.borderWidth:0)?e:n)<(i=t[o]._chart?t[o]._chart.config.data.datasets[a].hoverBorderWidth:0)?i:n;return n}})}},{25:25,40:40,45:45}],18:[function(t,e,i){"use strict";var n=t(25),a=t(40),f=t(45);n._set("line",{showLines:!0,spanGaps:!1,hover:{mode:"label"},scales:{xAxes:[{type:"category",id:"x-axis-0"}],yAxes:[{type:"linear",id:"y-axis-0"}]}}),e.exports=function(t){function h(t,e){return f.valueOrDefault(t.showLine,e.showLines)}t.controllers.line=t.DatasetController.extend({datasetElementType:a.Line,dataElementType:a.Point,update:function(t){var e,i,n,a=this.getMeta(),s=a.dataset,o=a.data||[],r=this.chart.options,l=r.elements.line,d=this.getScaleForId(a.yAxisID),c=this.getDataset(),u=h(c,r);for(u&&(n=s.custom||{},void 0!==c.tension&&void 0===c.lineTension&&(c.lineTension=c.tension),s._scale=d,s._datasetIndex=this.index,s._children=o,s._model={spanGaps:c.spanGaps?c.spanGaps:r.spanGaps,tension:n.tension?n.tension:f.valueOrDefault(c.lineTension,l.tension),backgroundColor:n.backgroundColor?n.backgroundColor:c.backgroundColor||l.backgroundColor,borderWidth:n.borderWidth?n.borderWidth:c.borderWidth||l.borderWidth,borderColor:n.borderColor?n.borderColor:c.borderColor||l.borderColor,borderCapStyle:n.borderCapStyle?n.borderCapStyle:c.borderCapStyle||l.borderCapStyle,borderDash:n.borderDash?n.borderDash:c.borderDash||l.borderDash,borderDashOffset:n.borderDashOffset?n.borderDashOffset:c.borderDashOffset||l.borderDashOffset,borderJoinStyle:n.borderJoinStyle?n.borderJoinStyle:c.borderJoinStyle||l.borderJoinStyle,fill:n.fill?n.fill:void 0!==c.fill?c.fill:l.fill,steppedLine:n.steppedLine?n.steppedLine:f.valueOrDefault(c.steppedLine,l.stepped),cubicInterpolationMode:n.cubicInterpolationMode?n.cubicInterpolationMode:f.valueOrDefault(c.cubicInterpolationMode,l.cubicInterpolationMode)},s.pivot()),e=0,i=o.length;e<i;++e)this.updateElement(o[e],e,t);for(u&&0!==s._model.tension&&this.updateBezierControlPoints(),e=0,i=o.length;e<i;++e)o[e].pivot()},getPointBackgroundColor:function(t,e){var i=this.chart.options.elements.point.backgroundColor,n=this.getDataset(),a=t.custom||{};return a.backgroundColor?i=a.backgroundColor:n.pointBackgroundColor?i=f.valueAtIndexOrDefault(n.pointBackgroundColor,e,i):n.backgroundColor&&(i=n.backgroundColor),i},getPointBorderColor:function(t,e){var i=this.chart.options.elements.point.borderColor,n=this.getDataset(),a=t.custom||{};return a.borderColor?i=a.borderColor:n.pointBorderColor?i=f.valueAtIndexOrDefault(n.pointBorderColor,e,i):n.borderColor&&(i=n.borderColor),i},getPointBorderWidth:function(t,e){var i=this.chart.options.elements.point.borderWidth,n=this.getDataset(),a=t.custom||{};return isNaN(a.borderWidth)?!isNaN(n.pointBorderWidth)||f.isArray(n.pointBorderWidth)?i=f.valueAtIndexOrDefault(n.pointBorderWidth,e,i):isNaN(n.borderWidth)||(i=n.borderWidth):i=a.borderWidth,i},updateElement:function(t,e,i){var n,a,s=this,o=s.getMeta(),r=t.custom||{},l=s.getDataset(),d=s.index,c=l.data[e],u=s.getScaleForId(o.yAxisID),h=s.getScaleForId(o.xAxisID),p=s.chart.options.elements.point;void 0!==l.radius&&void 0===l.pointRadius&&(l.pointRadius=l.radius),void 0!==l.hitRadius&&void 0===l.pointHitRadius&&(l.pointHitRadius=l.hitRadius),n=h.getPixelForValue("object"==typeof c?c:NaN,e,d),a=i?u.getBasePixel():s.calculatePointY(c,e,d),t._xScale=h,t._yScale=u,t._datasetIndex=d,t._index=e,t._model={x:n,y:a,skip:r.skip||isNaN(n)||isNaN(a),radius:r.radius||f.valueAtIndexOrDefault(l.pointRadius,e,p.radius),pointStyle:r.pointStyle||f.valueAtIndexOrDefault(l.pointStyle,e,p.pointStyle),backgroundColor:s.getPointBackgroundColor(t,e),borderColor:s.getPointBorderColor(t,e),borderWidth:s.getPointBorderWidth(t,e),tension:o.dataset._model?o.dataset._model.tension:0,steppedLine:!!o.dataset._model&&o.dataset._model.steppedLine,hitRadius:r.hitRadius||f.valueAtIndexOrDefault(l.pointHitRadius,e,p.hitRadius)}},calculatePointY:function(t,e,i){var n,a,s,o=this.chart,r=this.getMeta(),l=this.getScaleForId(r.yAxisID),d=0,c=0;if(l.options.stacked){for(n=0;n<i;n++)if(a=o.data.datasets[n],"line"===(s=o.getDatasetMeta(n)).type&&s.yAxisID===l.id&&o.isDatasetVisible(n)){var u=Number(l.getRightValue(a.data[e]));u<0?c+=u||0:d+=u||0}var h=Number(l.getRightValue(t));return h<0?l.getPixelForValue(c+h):l.getPixelForValue(d+h)}return l.getPixelForValue(t)},updateBezierControlPoints:function(){var t,e,i,n,a=this.getMeta(),s=this.chart.chartArea,o=a.data||[];function r(t,e,i){return Math.max(Math.min(t,i),e)}if(a.dataset._model.spanGaps&&(o=o.filter(function(t){return!t._model.skip})),"monotone"===a.dataset._model.cubicInterpolationMode)f.splineCurveMonotone(o);else for(t=0,e=o.length;t<e;++t)i=o[t]._model,n=f.splineCurve(f.previousItem(o,t)._model,i,f.nextItem(o,t)._model,a.dataset._model.tension),i.controlPointPreviousX=n.previous.x,i.controlPointPreviousY=n.previous.y,i.controlPointNextX=n.next.x,i.controlPointNextY=n.next.y;if(this.chart.options.elements.line.capBezierPoints)for(t=0,e=o.length;t<e;++t)(i=o[t]._model).controlPointPreviousX=r(i.controlPointPreviousX,s.left,s.right),i.controlPointPreviousY=r(i.controlPointPreviousY,s.top,s.bottom),i.controlPointNextX=r(i.controlPointNextX,s.left,s.right),i.controlPointNextY=r(i.controlPointNextY,s.top,s.bottom)},draw:function(){var t=this.chart,e=this.getMeta(),i=e.data||[],n=t.chartArea,a=i.length,s=0;for(f.canvas.clipArea(t.ctx,n),h(this.getDataset(),t.options)&&e.dataset.draw(),f.canvas.unclipArea(t.ctx);s<a;++s)i[s].draw(n)},setHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],i=t._index,n=t.custom||{},a=t._model;a.radius=n.hoverRadius||f.valueAtIndexOrDefault(e.pointHoverRadius,i,this.chart.options.elements.point.hoverRadius),a.backgroundColor=n.hoverBackgroundColor||f.valueAtIndexOrDefault(e.pointHoverBackgroundColor,i,f.getHoverColor(a.backgroundColor)),a.borderColor=n.hoverBorderColor||f.valueAtIndexOrDefault(e.pointHoverBorderColor,i,f.getHoverColor(a.borderColor)),a.borderWidth=n.hoverBorderWidth||f.valueAtIndexOrDefault(e.pointHoverBorderWidth,i,a.borderWidth)},removeHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],i=t._index,n=t.custom||{},a=t._model;void 0!==e.radius&&void 0===e.pointRadius&&(e.pointRadius=e.radius),a.radius=n.radius||f.valueAtIndexOrDefault(e.pointRadius,i,this.chart.options.elements.point.radius),a.backgroundColor=this.getPointBackgroundColor(t,i),a.borderColor=this.getPointBorderColor(t,i),a.borderWidth=this.getPointBorderWidth(t,i)}})}},{25:25,40:40,45:45}],19:[function(t,e,i){"use strict";var n=t(25),a=t(40),w=t(45);n._set("polarArea",{scale:{type:"radialLinear",angleLines:{display:!1},gridLines:{circular:!0},pointLabels:{display:!1},ticks:{beginAtZero:!0}},animation:{animateRotate:!0,animateScale:!0},startAngle:-.5*Math.PI,legendCallback:function(t){var e=[];e.push('<ul class="'+t.id+'-legend">');var i=t.data,n=i.datasets,a=i.labels;if(n.length)for(var s=0;s<n[0].data.length;++s)e.push('<li><span style="background-color:'+n[0].backgroundColor[s]+'"></span>'),a[s]&&e.push(a[s]),e.push("</li>");return e.push("</ul>"),e.join("")},legend:{labels:{generateLabels:function(r){var l=r.data;return l.labels.length&&l.datasets.length?l.labels.map(function(t,e){var i=r.getDatasetMeta(0),n=l.datasets[0],a=i.data[e].custom||{},s=w.valueAtIndexOrDefault,o=r.options.elements.arc;return{text:t,fillStyle:a.backgroundColor?a.backgroundColor:s(n.backgroundColor,e,o.backgroundColor),strokeStyle:a.borderColor?a.borderColor:s(n.borderColor,e,o.borderColor),lineWidth:a.borderWidth?a.borderWidth:s(n.borderWidth,e,o.borderWidth),hidden:isNaN(n.data[e])||i.data[e].hidden,index:e}}):[]}},onClick:function(t,e){var i,n,a,s=e.index,o=this.chart;for(i=0,n=(o.data.datasets||[]).length;i<n;++i)(a=o.getDatasetMeta(i)).data[s].hidden=!a.data[s].hidden;o.update()}},tooltips:{callbacks:{title:function(){return""},label:function(t,e){return e.labels[t.index]+": "+t.yLabel}}}}),e.exports=function(e){e.controllers.polarArea=e.DatasetController.extend({dataElementType:a.Arc,linkScales:w.noop,update:function(i){var n=this,t=n.chart,e=t.chartArea,a=n.getMeta(),s=t.options,o=s.elements.arc,r=Math.min(e.right-e.left,e.bottom-e.top);t.outerRadius=Math.max((r-o.borderWidth/2)/2,0),t.innerRadius=Math.max(s.cutoutPercentage?t.outerRadius/100*s.cutoutPercentage:1,0),t.radiusLength=(t.outerRadius-t.innerRadius)/t.getVisibleDatasetCount(),n.outerRadius=t.outerRadius-t.radiusLength*n.index,n.innerRadius=n.outerRadius-t.radiusLength,a.count=n.countVisibleElements(),w.each(a.data,function(t,e){n.updateElement(t,e,i)})},updateElement:function(t,e,i){for(var n=this.chart,a=this.getDataset(),s=n.options,o=s.animation,r=n.scale,l=n.data.labels,d=this.calculateCircumference(a.data[e]),c=r.xCenter,u=r.yCenter,h=0,p=this.getMeta(),f=0;f<e;++f)isNaN(a.data[f])||p.data[f].hidden||++h;var m=s.startAngle,g=t.hidden?0:r.getDistanceFromCenterForValue(a.data[e]),v=m+d*h,b=v+(t.hidden?0:d),y=o.animateScale?0:r.getDistanceFromCenterForValue(a.data[e]);w.extend(t,{_datasetIndex:this.index,_index:e,_scale:r,_model:{x:c,y:u,innerRadius:0,outerRadius:i?y:g,startAngle:i&&o.animateRotate?m:v,endAngle:i&&o.animateRotate?m:b,label:w.valueAtIndexOrDefault(l,e,l[e])}}),this.removeHoverStyle(t),t.pivot()},removeHoverStyle:function(t){e.DatasetController.prototype.removeHoverStyle.call(this,t,this.chart.options.elements.arc)},countVisibleElements:function(){var i=this.getDataset(),t=this.getMeta(),n=0;return w.each(t.data,function(t,e){isNaN(i.data[e])||t.hidden||n++}),n},calculateCircumference:function(t){var e=this.getMeta().count;return 0<e&&!isNaN(t)?2*Math.PI/e:0}})}},{25:25,40:40,45:45}],20:[function(t,e,i){"use strict";var n=t(25),a=t(40),d=t(45);n._set("radar",{scale:{type:"radialLinear"},elements:{line:{tension:0}}}),e.exports=function(t){t.controllers.radar=t.DatasetController.extend({datasetElementType:a.Line,dataElementType:a.Point,linkScales:d.noop,update:function(i){var n=this,t=n.getMeta(),e=t.dataset,a=t.data,s=e.custom||{},o=n.getDataset(),r=n.chart.options.elements.line,l=n.chart.scale;void 0!==o.tension&&void 0===o.lineTension&&(o.lineTension=o.tension),d.extend(t.dataset,{_datasetIndex:n.index,_scale:l,_children:a,_loop:!0,_model:{tension:s.tension?s.tension:d.valueOrDefault(o.lineTension,r.tension),backgroundColor:s.backgroundColor?s.backgroundColor:o.backgroundColor||r.backgroundColor,borderWidth:s.borderWidth?s.borderWidth:o.borderWidth||r.borderWidth,borderColor:s.borderColor?s.borderColor:o.borderColor||r.borderColor,fill:s.fill?s.fill:void 0!==o.fill?o.fill:r.fill,borderCapStyle:s.borderCapStyle?s.borderCapStyle:o.borderCapStyle||r.borderCapStyle,borderDash:s.borderDash?s.borderDash:o.borderDash||r.borderDash,borderDashOffset:s.borderDashOffset?s.borderDashOffset:o.borderDashOffset||r.borderDashOffset,borderJoinStyle:s.borderJoinStyle?s.borderJoinStyle:o.borderJoinStyle||r.borderJoinStyle}}),t.dataset.pivot(),d.each(a,function(t,e){n.updateElement(t,e,i)},n),n.updateBezierControlPoints()},updateElement:function(t,e,i){var n=t.custom||{},a=this.getDataset(),s=this.chart.scale,o=this.chart.options.elements.point,r=s.getPointPositionForValue(e,a.data[e]);void 0!==a.radius&&void 0===a.pointRadius&&(a.pointRadius=a.radius),void 0!==a.hitRadius&&void 0===a.pointHitRadius&&(a.pointHitRadius=a.hitRadius),d.extend(t,{_datasetIndex:this.index,_index:e,_scale:s,_model:{x:i?s.xCenter:r.x,y:i?s.yCenter:r.y,tension:n.tension?n.tension:d.valueOrDefault(a.lineTension,this.chart.options.elements.line.tension),radius:n.radius?n.radius:d.valueAtIndexOrDefault(a.pointRadius,e,o.radius),backgroundColor:n.backgroundColor?n.backgroundColor:d.valueAtIndexOrDefault(a.pointBackgroundColor,e,o.backgroundColor),borderColor:n.borderColor?n.borderColor:d.valueAtIndexOrDefault(a.pointBorderColor,e,o.borderColor),borderWidth:n.borderWidth?n.borderWidth:d.valueAtIndexOrDefault(a.pointBorderWidth,e,o.borderWidth),pointStyle:n.pointStyle?n.pointStyle:d.valueAtIndexOrDefault(a.pointStyle,e,o.pointStyle),hitRadius:n.hitRadius?n.hitRadius:d.valueAtIndexOrDefault(a.pointHitRadius,e,o.hitRadius)}}),t._model.skip=n.skip?n.skip:isNaN(t._model.x)||isNaN(t._model.y)},updateBezierControlPoints:function(){var a=this.chart.chartArea,s=this.getMeta();d.each(s.data,function(t,e){var i=t._model,n=d.splineCurve(d.previousItem(s.data,e,!0)._model,i,d.nextItem(s.data,e,!0)._model,i.tension);i.controlPointPreviousX=Math.max(Math.min(n.previous.x,a.right),a.left),i.controlPointPreviousY=Math.max(Math.min(n.previous.y,a.bottom),a.top),i.controlPointNextX=Math.max(Math.min(n.next.x,a.right),a.left),i.controlPointNextY=Math.max(Math.min(n.next.y,a.bottom),a.top),t.pivot()})},setHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],i=t.custom||{},n=t._index,a=t._model;a.radius=i.hoverRadius?i.hoverRadius:d.valueAtIndexOrDefault(e.pointHoverRadius,n,this.chart.options.elements.point.hoverRadius),a.backgroundColor=i.hoverBackgroundColor?i.hoverBackgroundColor:d.valueAtIndexOrDefault(e.pointHoverBackgroundColor,n,d.getHoverColor(a.backgroundColor)),a.borderColor=i.hoverBorderColor?i.hoverBorderColor:d.valueAtIndexOrDefault(e.pointHoverBorderColor,n,d.getHoverColor(a.borderColor)),a.borderWidth=i.hoverBorderWidth?i.hoverBorderWidth:d.valueAtIndexOrDefault(e.pointHoverBorderWidth,n,a.borderWidth)},removeHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],i=t.custom||{},n=t._index,a=t._model,s=this.chart.options.elements.point;a.radius=i.radius?i.radius:d.valueAtIndexOrDefault(e.pointRadius,n,s.radius),a.backgroundColor=i.backgroundColor?i.backgroundColor:d.valueAtIndexOrDefault(e.pointBackgroundColor,n,s.backgroundColor),a.borderColor=i.borderColor?i.borderColor:d.valueAtIndexOrDefault(e.pointBorderColor,n,s.borderColor),a.borderWidth=i.borderWidth?i.borderWidth:d.valueAtIndexOrDefault(e.pointBorderWidth,n,s.borderWidth)}})}},{25:25,40:40,45:45}],21:[function(t,e,i){"use strict";t(25)._set("scatter",{hover:{mode:"single"},scales:{xAxes:[{id:"x-axis-1",type:"linear",position:"bottom"}],yAxes:[{id:"y-axis-1",type:"linear",position:"left"}]},showLines:!1,tooltips:{callbacks:{title:function(){return""},label:function(t){return"("+t.xLabel+", "+t.yLabel+")"}}}}),e.exports=function(t){t.controllers.scatter=t.controllers.line}},{25:25}],22:[function(t,e,i){"use strict";var n=t(25),a=t(26),s=t(45);n._set("global",{animation:{duration:1e3,easing:"easeOutQuart",onProgress:s.noop,onComplete:s.noop}}),e.exports=function(t){t.Animation=a.extend({chart:null,currentStep:0,numSteps:60,easing:"",render:null,onAnimationProgress:null,onAnimationComplete:null}),t.animationService={frameDuration:17,animations:[],dropFrames:0,request:null,addAnimation:function(t,e,i,n){var a,s,o=this.animations;for(e.chart=t,n||(t.animating=!0),a=0,s=o.length;a<s;++a)if(o[a].chart===t)return void(o[a]=e);o.push(e),1===o.length&&this.requestAnimationFrame()},cancelAnimation:function(e){var t=s.findIndex(this.animations,function(t){return t.chart===e});-1!==t&&(this.animations.splice(t,1),e.animating=!1)},requestAnimationFrame:function(){var t=this;null===t.request&&(t.request=s.requestAnimFrame.call(window,function(){t.request=null,t.startDigest()}))},startDigest:function(){var t=Date.now(),e=0;1<this.dropFrames&&(e=Math.floor(this.dropFrames),this.dropFrames=this.dropFrames%1),this.advance(1+e);var i=Date.now();this.dropFrames+=(i-t)/this.frameDuration,0<this.animations.length&&this.requestAnimationFrame()},advance:function(t){for(var e,i,n=this.animations,a=0;a<n.length;)i=(e=n[a]).chart,e.currentStep=(e.currentStep||0)+t,e.currentStep=Math.min(e.currentStep,e.numSteps),s.callback(e.render,[i,e],i),s.callback(e.onAnimationProgress,[e],i),e.currentStep>=e.numSteps?(s.callback(e.onAnimationComplete,[e],i),i.animating=!1,n.splice(a,1)):++a}},Object.defineProperty(t.Animation.prototype,"animationObject",{get:function(){return this}}),Object.defineProperty(t.Animation.prototype,"chartInstance",{get:function(){return this.chart},set:function(t){this.chart=t}})}},{25:25,26:26,45:45}],23:[function(t,e,i){"use strict";var c=t(25),u=t(45),a=t(28),h=t(48);e.exports=function(d){var l=d.plugins;function r(t){return"top"===t||"bottom"===t}d.types={},d.instances={},d.controllers={},u.extend(d.prototype,{construct:function(t,e){var i,n,a=this;(n=(i=(i=e)||{}).data=i.data||{}).datasets=n.datasets||[],n.labels=n.labels||[],i.options=u.configMerge(c.global,c[i.type],i.options||{}),e=i;var s=h.acquireContext(t,e),o=s&&s.canvas,r=o&&o.height,l=o&&o.width;a.id=u.uid(),a.ctx=s,a.canvas=o,a.config=e,a.width=l,a.height=r,a.aspectRatio=r?l/r:null,a.options=e.options,a._bufferedRender=!1,(a.chart=a).controller=a,d.instances[a.id]=a,Object.defineProperty(a,"data",{get:function(){return a.config.data},set:function(t){a.config.data=t}}),s&&o?(a.initialize(),a.update()):console.error("Failed to create chart: can't acquire context from the given item")},initialize:function(){var t=this;return l.notify(t,"beforeInit"),u.retinaScale(t,t.options.devicePixelRatio),t.bindEvents(),t.options.responsive&&t.resize(!0),t.ensureScalesHaveIDs(),t.buildScales(),t.initToolTip(),l.notify(t,"afterInit"),t},clear:function(){return u.canvas.clear(this),this},stop:function(){return d.animationService.cancelAnimation(this),this},resize:function(t){var e=this,i=e.options,n=e.canvas,a=i.maintainAspectRatio&&e.aspectRatio||null,s=Math.max(0,Math.floor(u.getMaximumWidth(n))),o=Math.max(0,Math.floor(a?s/a:u.getMaximumHeight(n)));if((e.width!==s||e.height!==o)&&(n.width=e.width=s,n.height=e.height=o,n.style.width=s+"px",n.style.height=o+"px",u.retinaScale(e,i.devicePixelRatio),!t)){var r={width:s,height:o};l.notify(e,"resize",[r]),e.options.onResize&&e.options.onResize(e,r),e.stop(),e.update(e.options.responsiveAnimationDuration)}},ensureScalesHaveIDs:function(){var t=this.options,e=t.scales||{},i=t.scale;u.each(e.xAxes,function(t,e){t.id=t.id||"x-axis-"+e}),u.each(e.yAxes,function(t,e){t.id=t.id||"y-axis-"+e}),i&&(i.id=i.id||"scale")},buildScales:function(){var s=this,t=s.options,o=s.scales={},e=[];t.scales&&(e=e.concat((t.scales.xAxes||[]).map(function(t){return{options:t,dtype:"category",dposition:"bottom"}}),(t.scales.yAxes||[]).map(function(t){return{options:t,dtype:"linear",dposition:"left"}}))),t.scale&&e.push({options:t.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),u.each(e,function(t){var e=t.options,i=u.valueOrDefault(e.type,t.dtype),n=d.scaleService.getScaleConstructor(i);if(n){r(e.position)!==r(t.dposition)&&(e.position=t.dposition);var a=new n({id:e.id,options:e,ctx:s.ctx,chart:s});(o[a.id]=a).mergeTicksOptions(),t.isDefault&&(s.scale=a)}}),d.scaleService.addScalesToLayout(this)},buildOrUpdateControllers:function(){var s=this,o=[],r=[];return u.each(s.data.datasets,function(t,e){var i=s.getDatasetMeta(e),n=t.type||s.config.type;if(i.type&&i.type!==n&&(s.destroyDatasetMeta(e),i=s.getDatasetMeta(e)),i.type=n,o.push(i.type),i.controller)i.controller.updateIndex(e);else{var a=d.controllers[i.type];if(void 0===a)throw new Error('"'+i.type+'" is not a chart type.');i.controller=new a(s,e),r.push(i.controller)}},s),r},resetElements:function(){var i=this;u.each(i.data.datasets,function(t,e){i.getDatasetMeta(e).controller.reset()},i)},reset:function(){this.resetElements(),this.tooltip.initialize()},update:function(t){var e,i,n=this;if(t&&"object"==typeof t||(t={duration:t,lazy:arguments[1]}),(i=(e=n).options).scale?e.scale.options=i.scale:i.scales&&i.scales.xAxes.concat(i.scales.yAxes).forEach(function(t){e.scales[t.id].options=t}),e.tooltip._options=i.tooltips,!1!==l.notify(n,"beforeUpdate")){n.tooltip._data=n.data;var a=n.buildOrUpdateControllers();u.each(n.data.datasets,function(t,e){n.getDatasetMeta(e).controller.buildOrUpdateElements()},n),n.updateLayout(),u.each(a,function(t){t.reset()}),n.updateDatasets(),n.tooltip.initialize(),n.lastActive=[],l.notify(n,"afterUpdate"),n._bufferedRender?n._bufferedRequest={duration:t.duration,easing:t.easing,lazy:t.lazy}:n.render(t)}},updateLayout:function(){!1!==l.notify(this,"beforeLayout")&&(d.layoutService.update(this,this.width,this.height),l.notify(this,"afterScaleUpdate"),l.notify(this,"afterLayout"))},updateDatasets:function(){if(!1!==l.notify(this,"beforeDatasetsUpdate")){for(var t=0,e=this.data.datasets.length;t<e;++t)this.updateDataset(t);l.notify(this,"afterDatasetsUpdate")}},updateDataset:function(t){var e=this.getDatasetMeta(t),i={meta:e,index:t};!1!==l.notify(this,"beforeDatasetUpdate",[i])&&(e.controller.update(),l.notify(this,"afterDatasetUpdate",[i]))},render:function(t){var e=this;t&&"object"==typeof t||(t={duration:t,lazy:arguments[1]});var i=t.duration,n=t.lazy;if(!1!==l.notify(e,"beforeRender")){var a=e.options.animation,s=function(t){l.notify(e,"afterRender"),u.callback(a&&a.onComplete,[t],e)};if(a&&(void 0!==i&&0!==i||void 0===i&&0!==a.duration)){var o=new d.Animation({numSteps:(i||a.duration)/16.66,easing:t.easing||a.easing,render:function(t,e){var i=u.easing.effects[e.easing],n=e.currentStep,a=n/e.numSteps;t.draw(i(a),a,n)},onAnimationProgress:a.onProgress,onAnimationComplete:s});d.animationService.addAnimation(e,o,i,n)}else e.draw(),s(new d.Animation({numSteps:0,chart:e}));return e}},draw:function(t){var e=this;e.clear(),u.isNullOrUndef(t)&&(t=1),e.transition(t),!1!==l.notify(e,"beforeDraw",[t])&&(u.each(e.boxes,function(t){t.draw(e.chartArea)},e),e.scale&&e.scale.draw(),e.drawDatasets(t),e._drawTooltip(t),l.notify(e,"afterDraw",[t]))},transition:function(t){for(var e=0,i=(this.data.datasets||[]).length;e<i;++e)this.isDatasetVisible(e)&&this.getDatasetMeta(e).controller.transition(t);this.tooltip.transition(t)},drawDatasets:function(t){if(!1!==l.notify(this,"beforeDatasetsDraw",[t])){for(var e=(this.data.datasets||[]).length-1;0<=e;--e)this.isDatasetVisible(e)&&this.drawDataset(e,t);l.notify(this,"afterDatasetsDraw",[t])}},drawDataset:function(t,e){var i=this.getDatasetMeta(t),n={meta:i,index:t,easingValue:e};!1!==l.notify(this,"beforeDatasetDraw",[n])&&(i.controller.draw(e),l.notify(this,"afterDatasetDraw",[n]))},_drawTooltip:function(t){var e=this.tooltip,i={tooltip:e,easingValue:t};!1!==l.notify(this,"beforeTooltipDraw",[i])&&(e.draw(),l.notify(this,"afterTooltipDraw",[i]))},getElementAtEvent:function(t){return a.modes.single(this,t)},getElementsAtEvent:function(t){return a.modes.label(this,t,{intersect:!0})},getElementsAtXAxis:function(t){return a.modes["x-axis"](this,t,{intersect:!0})},getElementsAtEventForMode:function(t,e,i){var n=a.modes[e];return"function"==typeof n?n(this,t,i):[]},getDatasetAtEvent:function(t){return a.modes.dataset(this,t,{intersect:!0})},getDatasetMeta:function(t){var e=this.data.datasets[t];e._meta||(e._meta={});var i=e._meta[this.id];return i||(i=e._meta[this.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null}),i},getVisibleDatasetCount:function(){for(var t=0,e=0,i=this.data.datasets.length;e<i;++e)this.isDatasetVisible(e)&&t++;return t},isDatasetVisible:function(t){var e=this.getDatasetMeta(t);return"boolean"==typeof e.hidden?!e.hidden:!this.data.datasets[t].hidden},generateLegend:function(){return this.options.legendCallback(this)},destroyDatasetMeta:function(t){var e=this.id,i=this.data.datasets[t],n=i._meta&&i._meta[e];n&&(n.controller.destroy(),delete i._meta[e])},destroy:function(){var t,e,i=this,n=i.canvas;for(i.stop(),t=0,e=i.data.datasets.length;t<e;++t)i.destroyDatasetMeta(t);n&&(i.unbindEvents(),u.canvas.clear(i),h.releaseContext(i.ctx),i.canvas=null,i.ctx=null),l.notify(i,"destroy"),delete d.instances[i.id]},toBase64Image:function(){return this.canvas.toDataURL.apply(this.canvas,arguments)},initToolTip:function(){this.tooltip=new d.Tooltip({_chart:this,_chartInstance:this,_data:this.data,_options:this.options.tooltips},this)},bindEvents:function(){var e=this,i=e._listeners={},n=function(){e.eventHandler.apply(e,arguments)};u.each(e.options.events,function(t){h.addEventListener(e,t,n),i[t]=n}),e.options.responsive&&(n=function(){e.resize()},h.addEventListener(e,"resize",n),i.resize=n)},unbindEvents:function(){var i=this,t=i._listeners;t&&(delete i._listeners,u.each(t,function(t,e){h.removeEventListener(i,e,t)}))},updateHoverStyle:function(t,e,i){var n,a,s,o=i?"setHoverStyle":"removeHoverStyle";for(a=0,s=t.length;a<s;++a)(n=t[a])&&this.getDatasetMeta(n._datasetIndex).controller[o](n)},eventHandler:function(t){var e=this,i=e.tooltip;if(!1!==l.notify(e,"beforeEvent",[t])){e._bufferedRender=!0,e._bufferedRequest=null;var n=e.handleEvent(t);n|=i&&i.handleEvent(t),l.notify(e,"afterEvent",[t]);var a=e._bufferedRequest;return a?e.render(a):n&&!e.animating&&(e.stop(),e.render(e.options.hover.animationDuration,!0)),e._bufferedRender=!1,e._bufferedRequest=null,e}},handleEvent:function(t){var e,i=this,n=i.options||{},a=n.hover;return i.lastActive=i.lastActive||[],"mouseout"===t.type?i.active=[]:i.active=i.getElementsAtEventForMode(t,a.mode,a),u.callback(n.onHover||n.hover.onHover,[t.native,i.active],i),"mouseup"!==t.type&&"click"!==t.type||n.onClick&&n.onClick.call(i,t.native,i.active),i.lastActive.length&&i.updateHoverStyle(i.lastActive,a.mode,!1),i.active.length&&a.mode&&i.updateHoverStyle(i.active,a.mode,!0),e=!u.arrayEquals(i.active,i.lastActive),i.lastActive=i.active,e}}),d.Controller=d}},{25:25,28:28,45:45,48:48}],24:[function(t,e,i){"use strict";var r=t(45);e.exports=function(t){var s=["push","pop","shift","splice","unshift"];function n(e,t){var i=e._chartjs;if(i){var n=i.listeners,a=n.indexOf(t);-1!==a&&n.splice(a,1),0<n.length||(s.forEach(function(t){delete e[t]}),delete e._chartjs)}}t.DatasetController=function(t,e){this.initialize(t,e)},r.extend(t.DatasetController.prototype,{datasetElementType:null,dataElementType:null,initialize:function(t,e){this.chart=t,this.index=e,this.linkScales(),this.addElements()},updateIndex:function(t){this.index=t},linkScales:function(){var t=this.getMeta(),e=this.getDataset();null===t.xAxisID&&(t.xAxisID=e.xAxisID||this.chart.options.scales.xAxes[0].id),null===t.yAxisID&&(t.yAxisID=e.yAxisID||this.chart.options.scales.yAxes[0].id)},getDataset:function(){return this.chart.data.datasets[this.index]},getMeta:function(){return this.chart.getDatasetMeta(this.index)},getScaleForId:function(t){return this.chart.scales[t]},reset:function(){this.update(!0)},destroy:function(){this._data&&n(this._data,this)},createMetaDataset:function(){var t=this.datasetElementType;return t&&new t({_chart:this.chart,_datasetIndex:this.index})},createMetaData:function(t){var e=this.dataElementType;return e&&new e({_chart:this.chart,_datasetIndex:this.index,_index:t})},addElements:function(){var t,e,i=this.getMeta(),n=this.getDataset().data||[],a=i.data;for(t=0,e=n.length;t<e;++t)a[t]=a[t]||this.createMetaData(t);i.dataset=i.dataset||this.createMetaDataset()},addElementAndReset:function(t){var e=this.createMetaData(t);this.getMeta().data.splice(t,0,e),this.updateElement(e,t,!0)},buildOrUpdateElements:function(){var a,t,e=this.getDataset(),i=e.data||(e.data=[]);this._data!==i&&(this._data&&n(this._data,this),t=this,(a=i)._chartjs?a._chartjs.listeners.push(t):(Object.defineProperty(a,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),s.forEach(function(t){var i="onData"+t.charAt(0).toUpperCase()+t.slice(1),n=a[t];Object.defineProperty(a,t,{configurable:!0,enumerable:!1,value:function(){var e=Array.prototype.slice.call(arguments),t=n.apply(this,e);return r.each(a._chartjs.listeners,function(t){"function"==typeof t[i]&&t[i].apply(t,e)}),t}})})),this._data=i),this.resyncElements()},update:r.noop,transition:function(t){for(var e=this.getMeta(),i=e.data||[],n=i.length,a=0;a<n;++a)i[a].transition(t);e.dataset&&e.dataset.transition(t)},draw:function(){var t=this.getMeta(),e=t.data||[],i=e.length,n=0;for(t.dataset&&t.dataset.draw();n<i;++n)e[n].draw()},removeHoverStyle:function(t,e){var i=this.chart.data.datasets[t._datasetIndex],n=t._index,a=t.custom||{},s=r.valueAtIndexOrDefault,o=t._model;o.backgroundColor=a.backgroundColor?a.backgroundColor:s(i.backgroundColor,n,e.backgroundColor),o.borderColor=a.borderColor?a.borderColor:s(i.borderColor,n,e.borderColor),o.borderWidth=a.borderWidth?a.borderWidth:s(i.borderWidth,n,e.borderWidth)},setHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],i=t._index,n=t.custom||{},a=r.valueAtIndexOrDefault,s=r.getHoverColor,o=t._model;o.backgroundColor=n.hoverBackgroundColor?n.hoverBackgroundColor:a(e.hoverBackgroundColor,i,s(o.backgroundColor)),o.borderColor=n.hoverBorderColor?n.hoverBorderColor:a(e.hoverBorderColor,i,s(o.borderColor)),o.borderWidth=n.hoverBorderWidth?n.hoverBorderWidth:a(e.hoverBorderWidth,i,o.borderWidth)},resyncElements:function(){var t=this.getMeta(),e=this.getDataset().data,i=t.data.length,n=e.length;n<i?t.data.splice(n,i-n):i<n&&this.insertElements(i,n-i)},insertElements:function(t,e){for(var i=0;i<e;++i)this.addElementAndReset(t+i)},onDataPush:function(){this.insertElements(this.getDataset().data.length-1,arguments.length)},onDataPop:function(){this.getMeta().data.pop()},onDataShift:function(){this.getMeta().data.shift()},onDataSplice:function(t,e){this.getMeta().data.splice(t,e),this.insertElements(t,arguments.length-2)},onDataUnshift:function(){this.insertElements(0,arguments.length)}}),t.DatasetController.extend=r.inherits}},{45:45}],25:[function(t,e,i){"use strict";var n=t(45);e.exports={_set:function(t,e){return n.merge(this[t]||(this[t]={}),e)}}},{45:45}],26:[function(t,e,i){"use strict";var f=t(3),n=t(45);var a=function(t){n.extend(this,t),this.initialize.apply(this,arguments)};n.extend(a.prototype,{initialize:function(){this.hidden=!1},pivot:function(){return this._view||(this._view=n.clone(this._model)),this._start={},this},transition:function(t){var e=this._model,i=this._start,n=this._view;return e&&1!==t?(n||(n=this._view={}),i||(i=this._start={}),function(t,e,i,n){var a,s,o,r,l,d,c,u,h,p=Object.keys(i);for(a=0,s=p.length;a<s;++a)if(d=i[o=p[a]],e.hasOwnProperty(o)||(e[o]=d),(r=e[o])!==d&&"_"!==o[0]){if(t.hasOwnProperty(o)||(t[o]=r),(c=typeof d)==typeof(l=t[o]))if("string"===c){if((u=f(l)).valid&&(h=f(d)).valid){e[o]=h.mix(u,n).rgbString();continue}}else if("number"===c&&isFinite(l)&&isFinite(d)){e[o]=l+(d-l)*n;continue}e[o]=d}}(i,n,e,t)):(this._view=e,this._start=null),this},tooltipPosition:function(){return{x:this._model.x,y:this._model.y}},hasValue:function(){return n.isNumber(this._model.x)&&n.isNumber(this._model.y)}}),a.extend=n.inherits,e.exports=a},{3:3,45:45}],27:[function(t,e,i){"use strict";var n=t(3),a=t(25),f=t(45);e.exports=function(l){function c(t,e,i){var n;return"string"==typeof t?(n=parseInt(t,10),-1!==t.indexOf("%")&&(n=n/100*e.parentNode[i])):n=t,n}function u(t){return null!=t&&"none"!==t}function e(t,e,i){var n=document.defaultView,a=t.parentNode,s=n.getComputedStyle(t)[e],o=n.getComputedStyle(a)[e],r=u(s),l=u(o),d=Number.POSITIVE_INFINITY;return r||l?Math.min(r?c(s,t,i):d,l?c(o,a,i):d):"none"}f.configMerge=function(){return f.merge(f.clone(arguments[0]),[].slice.call(arguments,1),{merger:function(t,e,i,n){var a=e[t]||{},s=i[t];"scales"===t?e[t]=f.scaleMerge(a,s):"scale"===t?e[t]=f.merge(a,[l.scaleService.getScaleDefaults(s.type),s]):f._merger(t,e,i,n)}})},f.scaleMerge=function(){return f.merge(f.clone(arguments[0]),[].slice.call(arguments,1),{merger:function(t,e,i,n){if("xAxes"===t||"yAxes"===t){var a,s,o,r=i[t].length;for(e[t]||(e[t]=[]),a=0;a<r;++a)o=i[t][a],s=f.valueOrDefault(o.type,"xAxes"===t?"category":"linear"),a>=e[t].length&&e[t].push({}),!e[t][a].type||o.type&&o.type!==e[t][a].type?f.merge(e[t][a],[l.scaleService.getScaleDefaults(s),o]):f.merge(e[t][a],o)}else f._merger(t,e,i,n)}})},f.where=function(t,e){if(f.isArray(t)&&Array.prototype.filter)return t.filter(e);var i=[];return f.each(t,function(t){e(t)&&i.push(t)}),i},f.findIndex=Array.prototype.findIndex?function(t,e,i){return t.findIndex(e,i)}:function(t,e,i){i=void 0===i?t:i;for(var n=0,a=t.length;n<a;++n)if(e.call(i,t[n],n,t))return n;return-1},f.findNextWhere=function(t,e,i){f.isNullOrUndef(i)&&(i=-1);for(var n=i+1;n<t.length;n++){var a=t[n];if(e(a))return a}},f.findPreviousWhere=function(t,e,i){f.isNullOrUndef(i)&&(i=t.length);for(var n=i-1;0<=n;n--){var a=t[n];if(e(a))return a}},f.isNumber=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},f.almostEquals=function(t,e,i){return Math.abs(t-e)<i},f.almostWhole=function(t,e){var i=Math.round(t);return i-e<t&&t<i+e},f.max=function(t){return t.reduce(function(t,e){return isNaN(e)?t:Math.max(t,e)},Number.NEGATIVE_INFINITY)},f.min=function(t){return t.reduce(function(t,e){return isNaN(e)?t:Math.min(t,e)},Number.POSITIVE_INFINITY)},f.sign=Math.sign?function(t){return Math.sign(t)}:function(t){return 0===(t=+t)||isNaN(t)?t:0<t?1:-1},f.log10=Math.log10?function(t){return Math.log10(t)}:function(t){return Math.log(t)/Math.LN10},f.toRadians=function(t){return t*(Math.PI/180)},f.toDegrees=function(t){return t*(180/Math.PI)},f.getAngleFromPoint=function(t,e){var i=e.x-t.x,n=e.y-t.y,a=Math.sqrt(i*i+n*n),s=Math.atan2(n,i);return s<-.5*Math.PI&&(s+=2*Math.PI),{angle:s,distance:a}},f.distanceBetweenPoints=function(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))},f.aliasPixel=function(t){return t%2==0?0:.5},f.splineCurve=function(t,e,i,n){var a=t.skip?e:t,s=e,o=i.skip?e:i,r=Math.sqrt(Math.pow(s.x-a.x,2)+Math.pow(s.y-a.y,2)),l=Math.sqrt(Math.pow(o.x-s.x,2)+Math.pow(o.y-s.y,2)),d=r/(r+l),c=l/(r+l),u=n*(d=isNaN(d)?0:d),h=n*(c=isNaN(c)?0:c);return{previous:{x:s.x-u*(o.x-a.x),y:s.y-u*(o.y-a.y)},next:{x:s.x+h*(o.x-a.x),y:s.y+h*(o.y-a.y)}}},f.EPSILON=Number.EPSILON||1e-14,f.splineCurveMonotone=function(t){var e,i,n,a,s,o,r,l,d,c=(t||[]).map(function(t){return{model:t._model,deltaK:0,mK:0}}),u=c.length;for(e=0;e<u;++e)if(!(n=c[e]).model.skip){if(i=0<e?c[e-1]:null,(a=e<u-1?c[e+1]:null)&&!a.model.skip){var h=a.model.x-n.model.x;n.deltaK=0!==h?(a.model.y-n.model.y)/h:0}!i||i.model.skip?n.mK=n.deltaK:!a||a.model.skip?n.mK=i.deltaK:this.sign(i.deltaK)!==this.sign(n.deltaK)?n.mK=0:n.mK=(i.deltaK+n.deltaK)/2}for(e=0;e<u-1;++e)n=c[e],a=c[e+1],n.model.skip||a.model.skip||(f.almostEquals(n.deltaK,0,this.EPSILON)?n.mK=a.mK=0:(s=n.mK/n.deltaK,o=a.mK/n.deltaK,(l=Math.pow(s,2)+Math.pow(o,2))<=9||(r=3/Math.sqrt(l),n.mK=s*r*n.deltaK,a.mK=o*r*n.deltaK)));for(e=0;e<u;++e)(n=c[e]).model.skip||(i=0<e?c[e-1]:null,a=e<u-1?c[e+1]:null,i&&!i.model.skip&&(d=(n.model.x-i.model.x)/3,n.model.controlPointPreviousX=n.model.x-d,n.model.controlPointPreviousY=n.model.y-d*n.mK),a&&!a.model.skip&&(d=(a.model.x-n.model.x)/3,n.model.controlPointNextX=n.model.x+d,n.model.controlPointNextY=n.model.y+d*n.mK))},f.nextItem=function(t,e,i){return i?e>=t.length-1?t[0]:t[e+1]:e>=t.length-1?t[t.length-1]:t[e+1]},f.previousItem=function(t,e,i){return i?e<=0?t[t.length-1]:t[e-1]:e<=0?t[0]:t[e-1]},f.niceNum=function(t,e){var i=Math.floor(f.log10(t)),n=t/Math.pow(10,i);return(e?n<1.5?1:n<3?2:n<7?5:10:n<=1?1:n<=2?2:n<=5?5:10)*Math.pow(10,i)},f.requestAnimFrame="undefined"==typeof window?function(t){t()}:window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return window.setTimeout(t,1e3/60)},f.getRelativePosition=function(t,e){var i,n,a=t.originalEvent||t,s=t.currentTarget||t.srcElement,o=s.getBoundingClientRect(),r=a.touches;n=r&&0<r.length?(i=r[0].clientX,r[0].clientY):(i=a.clientX,a.clientY);var l=parseFloat(f.getStyle(s,"padding-left")),d=parseFloat(f.getStyle(s,"padding-top")),c=parseFloat(f.getStyle(s,"padding-right")),u=parseFloat(f.getStyle(s,"padding-bottom")),h=o.right-o.left-l-c,p=o.bottom-o.top-d-u;return{x:i=Math.round((i-o.left-l)/h*s.width/e.currentDevicePixelRatio),y:n=Math.round((n-o.top-d)/p*s.height/e.currentDevicePixelRatio)}},f.getConstraintWidth=function(t){return e(t,"max-width","clientWidth")},f.getConstraintHeight=function(t){return e(t,"max-height","clientHeight")},f.getMaximumWidth=function(t){var e=t.parentNode;if(!e)return t.clientWidth;var i=parseInt(f.getStyle(e,"padding-left"),10),n=parseInt(f.getStyle(e,"padding-right"),10),a=e.clientWidth-i-n,s=f.getConstraintWidth(t);return isNaN(s)?a:Math.min(a,s)},f.getMaximumHeight=function(t){var e=t.parentNode;if(!e)return t.clientHeight;var i=parseInt(f.getStyle(e,"padding-top"),10),n=parseInt(f.getStyle(e,"padding-bottom"),10),a=e.clientHeight-i-n,s=f.getConstraintHeight(t);return isNaN(s)?a:Math.min(a,s)},f.getStyle=function(t,e){return t.currentStyle?t.currentStyle[e]:document.defaultView.getComputedStyle(t,null).getPropertyValue(e)},f.retinaScale=function(t,e){var i=t.currentDevicePixelRatio=e||window.devicePixelRatio||1;if(1!==i){var n=t.canvas,a=t.height,s=t.width;n.height=a*i,n.width=s*i,t.ctx.scale(i,i),n.style.height=a+"px",n.style.width=s+"px"}},f.fontString=function(t,e,i){return e+" "+t+"px "+i},f.longestText=function(e,t,i,n){var a=(n=n||{}).data=n.data||{},s=n.garbageCollect=n.garbageCollect||[];n.font!==t&&(a=n.data={},s=n.garbageCollect=[],n.font=t),e.font=t;var o=0;f.each(i,function(t){null!=t&&!0!==f.isArray(t)?o=f.measureText(e,a,s,o,t):f.isArray(t)&&f.each(t,function(t){null==t||f.isArray(t)||(o=f.measureText(e,a,s,o,t))})});var r=s.length/2;if(r>i.length){for(var l=0;l<r;l++)delete a[s[l]];s.splice(0,r)}return o},f.measureText=function(t,e,i,n,a){var s=e[a];return s||(s=e[a]=t.measureText(a).width,i.push(a)),n<s&&(n=s),n},f.numberOfLabelLines=function(t){var e=1;return f.each(t,function(t){f.isArray(t)&&t.length>e&&(e=t.length)}),e},f.color=n?function(t){return t instanceof CanvasGradient&&(t=a.global.defaultColor),n(t)}:function(t){return console.error("Color.js not found!"),t},f.getHoverColor=function(t){return t instanceof CanvasPattern?t:f.color(t).saturate(.5).darken(.1).rgbString()}}},{25:25,3:3,45:45}],28:[function(t,e,i){"use strict";var n=t(45);function r(t,e){return t.native?{x:t.x,y:t.y}:n.getRelativePosition(t,e)}function l(t,e){var i,n,a,s,o;for(n=0,s=t.data.datasets.length;n<s;++n)if(t.isDatasetVisible(n))for(a=0,o=(i=t.getDatasetMeta(n)).data.length;a<o;++a){var r=i.data[a];r._view.skip||e(r)}}function d(t,e){var i=[];return l(t,function(t){t.inRange(e.x,e.y)&&i.push(t)}),i}function c(t,n,a,s){var o=Number.POSITIVE_INFINITY,r=[];return l(t,function(t){if(!a||t.inRange(n.x,n.y)){var e=t.getCenterPoint(),i=s(n,e);i<o?(r=[t],o=i):i===o&&r.push(t)}}),r}function u(t){var a=-1!==t.indexOf("x"),s=-1!==t.indexOf("y");return function(t,e){var i=a?Math.abs(t.x-e.x):0,n=s?Math.abs(t.y-e.y):0;return Math.sqrt(Math.pow(i,2)+Math.pow(n,2))}}function a(n,t,e){var i=r(t,n);e.axis=e.axis||"x";var a=u(e.axis),s=e.intersect?d(n,i):c(n,i,!1,a),o=[];return s.length?(n.data.datasets.forEach(function(t,e){if(n.isDatasetVisible(e)){var i=n.getDatasetMeta(e).data[s[0]._index];i&&!i._view.skip&&o.push(i)}}),o):[]}e.exports={modes:{single:function(t,e){var i=r(e,t),n=[];return l(t,function(t){if(t.inRange(i.x,i.y))return n.push(t),n}),n.slice(0,1)},label:a,index:a,dataset:function(t,e,i){var n=r(e,t);i.axis=i.axis||"xy";var a=u(i.axis),s=i.intersect?d(t,n):c(t,n,!1,a);return 0<s.length&&(s=t.getDatasetMeta(s[0]._datasetIndex).data),s},"x-axis":function(t,e){return a(t,e,{intersect:!1})},point:function(t,e){return d(t,r(e,t))},nearest:function(t,e,i){var n=r(e,t);i.axis=i.axis||"xy";var a=u(i.axis),s=c(t,n,i.intersect,a);return 1<s.length&&s.sort(function(t,e){var i=t.getArea()-e.getArea();return 0===i&&(i=t._datasetIndex-e._datasetIndex),i}),s.slice(0,1)},x:function(t,e,i){var n=r(e,t),a=[],s=!1;return l(t,function(t){t.inXRange(n.x)&&a.push(t),t.inRange(n.x,n.y)&&(s=!0)}),i.intersect&&!s&&(a=[]),a},y:function(t,e,i){var n=r(e,t),a=[],s=!1;return l(t,function(t){t.inYRange(n.y)&&a.push(t),t.inRange(n.x,n.y)&&(s=!0)}),i.intersect&&!s&&(a=[]),a}}}},{45:45}],29:[function(t,e,i){"use strict";t(25)._set("global",{responsive:!0,responsiveAnimationDuration:0,maintainAspectRatio:!0,events:["mousemove","mouseout","click","touchstart","touchmove"],hover:{onHover:null,mode:"nearest",intersect:!0,animationDuration:400},onClick:null,defaultColor:"rgba(0,0,0,0.1)",defaultFontColor:"#666",defaultFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",defaultFontSize:12,defaultFontStyle:"normal",showLines:!0,elements:{},layout:{padding:{top:0,right:0,bottom:0,left:0}}}),e.exports=function(){var t=function(t,e){return this.construct(t,e),this};return t.Chart=t}},{25:25}],30:[function(t,e,i){"use strict";var z=t(45);e.exports=function(t){function $(t,e){return z.where(t,function(t){return t.position===e})}function N(t,a){t.forEach(function(t,e){return t._tmpIndex_=e,t}),t.sort(function(t,e){var i=a?e:t,n=a?t:e;return i.weight===n.weight?i._tmpIndex_-n._tmpIndex_:i.weight-n.weight}),t.forEach(function(t){delete t._tmpIndex_})}t.layoutService={defaults:{},addBox:function(t,e){t.boxes||(t.boxes=[]),e.fullWidth=e.fullWidth||!1,e.position=e.position||"top",e.weight=e.weight||0,t.boxes.push(e)},removeBox:function(t,e){var i=t.boxes?t.boxes.indexOf(e):-1;-1!==i&&t.boxes.splice(i,1)},configure:function(t,e,i){for(var n,a=["fullWidth","position","weight"],s=a.length,o=0;o<s;++o)n=a[o],i.hasOwnProperty(n)&&(e[n]=i[n])},update:function(e,i,t){if(e){var n=e.options.layout||{},a=z.options.toPadding(n.padding),s=a.left,o=a.right,r=a.top,l=a.bottom,d=$(e.boxes,"left"),c=$(e.boxes,"right"),u=$(e.boxes,"top"),h=$(e.boxes,"bottom"),p=$(e.boxes,"chartArea");N(d,!0),N(c,!1),N(u,!0),N(h,!1);var f=i-s-o,m=t-r-l,g=m/2,v=(i-f/2)/(d.length+c.length),b=(t-g)/(u.length+h.length),y=f,w=m,x=[];z.each(d.concat(c,u,h),function(t){var e,i=t.isHorizontal();i?(e=t.update(t.fullWidth?f:y,b),w-=e.height):(e=t.update(v,g),y-=e.width),x.push({horizontal:i,minSize:e,box:t})});var k=0,C=0,_=0,S=0;z.each(u.concat(h),function(t){if(t.getPadding){var e=t.getPadding();k=Math.max(k,e.left),C=Math.max(C,e.right)}}),z.each(d.concat(c),function(t){if(t.getPadding){var e=t.getPadding();_=Math.max(_,e.top),S=Math.max(S,e.bottom)}});var P=s,A=o,M=r,D=l;z.each(d.concat(c),B),z.each(d,function(t){P+=t.width}),z.each(c,function(t){A+=t.width}),z.each(u.concat(h),B),z.each(u,function(t){M+=t.height}),z.each(h,function(t){D+=t.height}),z.each(d.concat(c),function(e){var t=z.findNextWhere(x,function(t){return t.box===e}),i={left:0,right:0,top:M,bottom:D};t&&e.update(t.minSize.width,w,i)}),P=s,A=o,M=r,D=l,z.each(d,function(t){P+=t.width}),z.each(c,function(t){A+=t.width}),z.each(u,function(t){M+=t.height}),z.each(h,function(t){D+=t.height});var T=Math.max(k-P,0);P+=T,A+=Math.max(C-A,0);var I=Math.max(_-M,0);M+=I,D+=Math.max(S-D,0);var E=t-M-D,L=i-P-A;L===y&&E===w||(z.each(d,function(t){t.height=E}),z.each(c,function(t){t.height=E}),z.each(u,function(t){t.fullWidth||(t.width=L)}),z.each(h,function(t){t.fullWidth||(t.width=L)}),w=E,y=L);var O=s+T,F=r+I;z.each(d.concat(u),R),O+=y,F+=w,z.each(c,R),z.each(h,R),e.chartArea={left:P,top:M,right:P+y,bottom:M+w},z.each(p,function(t){t.left=e.chartArea.left,t.top=e.chartArea.top,t.right=e.chartArea.right,t.bottom=e.chartArea.bottom,t.update(y,w)})}function B(e){var t=z.findNextWhere(x,function(t){return t.box===e});if(t)if(e.isHorizontal()){var i={left:Math.max(P,k),right:Math.max(A,C),top:0,bottom:0};e.update(e.fullWidth?f:y,m/2,i)}else e.update(t.minSize.width,w)}function R(t){t.isHorizontal()?(t.left=t.fullWidth?s:P,t.right=t.fullWidth?i-o:P+y,t.top=F,t.bottom=F+t.height,F=t.bottom):(t.left=O,t.right=O+t.width,t.top=M,t.bottom=M+w,O=t.right)}}}}},{45:45}],31:[function(t,e,i){"use strict";var o=t(25),n=t(26),r=t(45);o._set("global",{plugins:{}}),e.exports=function(t){t.plugins={_plugins:[],_cacheId:0,register:function(t){var e=this._plugins;[].concat(t).forEach(function(t){-1===e.indexOf(t)&&e.push(t)}),this._cacheId++},unregister:function(t){var i=this._plugins;[].concat(t).forEach(function(t){var e=i.indexOf(t);-1!==e&&i.splice(e,1)}),this._cacheId++},clear:function(){this._plugins=[],this._cacheId++},count:function(){return this._plugins.length},getAll:function(){return this._plugins},notify:function(t,e,i){var n,a,s,o,r,l=this.descriptors(t),d=l.length;for(n=0;n<d;++n)if("function"==typeof(r=(s=(a=l[n]).plugin)[e])&&((o=[t].concat(i||[])).push(a.options),!1===r.apply(s,o)))return!1;return!0},descriptors:function(t){var e=t._plugins||(t._plugins={});if(e.id===this._cacheId)return e.descriptors;var n=[],a=[],i=t&&t.config||{},s=i.options&&i.options.plugins||{};return this._plugins.concat(i.plugins||[]).forEach(function(t){if(-1===n.indexOf(t)){var e=t.id,i=s[e];!1!==i&&(!0===i&&(i=r.clone(o.global.plugins[e])),n.push(t),a.push({plugin:t,options:i||{}}))}}),e.descriptors=a,e.id=this._cacheId,a}},t.pluginService=t.plugins,t.PluginBase=n.extend({})}},{25:25,26:26,45:45}],32:[function(t,e,i){"use strict";var w=t(25),n=t(26),j=t(45),a=t(34);function _(t){var e,i,n=[];for(e=0,i=t.length;e<i;++e)n.push(t[e].label);return n}function H(t,e,i){var n=t.getPixelForTick(e);return i&&(n-=0===e?(t.getPixelForTick(1)-n)/2:(n-t.getPixelForTick(e-1))/2),n}w._set("scale",{display:!0,position:"left",offset:!1,gridLines:{display:!0,color:"rgba(0, 0, 0, 0.1)",lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickMarkLength:10,zeroLineWidth:1,zeroLineColor:"rgba(0,0,0,0.25)",zeroLineBorderDash:[],zeroLineBorderDashOffset:0,offsetGridLines:!1,borderDash:[],borderDashOffset:0},scaleLabel:{display:!1,labelString:"",lineHeight:1.2,padding:{top:4,bottom:4}},ticks:{beginAtZero:!1,minRotation:0,maxRotation:50,mirror:!1,padding:0,reverse:!1,display:!0,autoSkip:!0,autoSkipPadding:0,labelOffset:0,callback:a.formatters.values,minor:{},major:{}}}),e.exports=function(t){function x(t,e,i){return j.isArray(e)?j.longestText(t,i,e):t.measureText(e).width}function k(t){var e=j.valueOrDefault,i=w.global,n=e(t.fontSize,i.defaultFontSize),a=e(t.fontStyle,i.defaultFontStyle),s=e(t.fontFamily,i.defaultFontFamily);return{size:n,style:a,family:s,font:j.fontString(n,a,s)}}function C(t){return j.options.toLineHeight(j.valueOrDefault(t.lineHeight,1.2),j.valueOrDefault(t.fontSize,w.global.defaultFontSize))}t.Scale=n.extend({getPadding:function(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}},getTicks:function(){return this._ticks},mergeTicksOptions:function(){var t=this.options.ticks;for(var e in!1===t.minor&&(t.minor={display:!1}),!1===t.major&&(t.major={display:!1}),t)"major"!==e&&"minor"!==e&&(void 0===t.minor[e]&&(t.minor[e]=t[e]),void 0===t.major[e]&&(t.major[e]=t[e]))},beforeUpdate:function(){j.callback(this.options.beforeUpdate,[this])},update:function(t,e,i){var n,a,s,o,r,l,d=this;for(d.beforeUpdate(),d.maxWidth=t,d.maxHeight=e,d.margins=j.extend({left:0,right:0,top:0,bottom:0},i),d.longestTextCache=d.longestTextCache||{},d.beforeSetDimensions(),d.setDimensions(),d.afterSetDimensions(),d.beforeDataLimits(),d.determineDataLimits(),d.afterDataLimits(),d.beforeBuildTicks(),r=d.buildTicks()||[],d.afterBuildTicks(),d.beforeTickToLabelConversion(),s=d.convertTicksToLabels(r)||d.ticks,d.afterTickToLabelConversion(),n=0,a=(d.ticks=s).length;n<a;++n)o=s[n],(l=r[n])?l.label=o:r.push(l={label:o,major:!1});return d._ticks=r,d.beforeCalculateTickRotation(),d.calculateTickRotation(),d.afterCalculateTickRotation(),d.beforeFit(),d.fit(),d.afterFit(),d.afterUpdate(),d.minSize},afterUpdate:function(){j.callback(this.options.afterUpdate,[this])},beforeSetDimensions:function(){j.callback(this.options.beforeSetDimensions,[this])},setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0},afterSetDimensions:function(){j.callback(this.options.afterSetDimensions,[this])},beforeDataLimits:function(){j.callback(this.options.beforeDataLimits,[this])},determineDataLimits:j.noop,afterDataLimits:function(){j.callback(this.options.afterDataLimits,[this])},beforeBuildTicks:function(){j.callback(this.options.beforeBuildTicks,[this])},buildTicks:j.noop,afterBuildTicks:function(){j.callback(this.options.afterBuildTicks,[this])},beforeTickToLabelConversion:function(){j.callback(this.options.beforeTickToLabelConversion,[this])},convertTicksToLabels:function(){var t=this.options.ticks;this.ticks=this.ticks.map(t.userCallback||t.callback,this)},afterTickToLabelConversion:function(){j.callback(this.options.afterTickToLabelConversion,[this])},beforeCalculateTickRotation:function(){j.callback(this.options.beforeCalculateTickRotation,[this])},calculateTickRotation:function(){var t=this,e=t.ctx,i=t.options.ticks,n=_(t._ticks),a=k(i);e.font=a.font;var s=i.minRotation||0;if(n.length&&t.options.display&&t.isHorizontal())for(var o,r=j.longestText(e,a.font,n,t.longestTextCache),l=r,d=t.getPixelForTick(1)-t.getPixelForTick(0)-6;d<l&&s<i.maxRotation;){var c=j.toRadians(s);if(o=Math.cos(c),Math.sin(c)*r>t.maxHeight){s--;break}s++,l=o*r}t.labelRotation=s},afterCalculateTickRotation:function(){j.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){j.callback(this.options.beforeFit,[this])},fit:function(){var t=this,e=t.minSize={width:0,height:0},i=_(t._ticks),n=t.options,a=n.ticks,s=n.scaleLabel,o=n.gridLines,r=n.display,l=t.isHorizontal(),d=k(a),c=n.gridLines.tickMarkLength;if(e.width=l?t.isFullWidth()?t.maxWidth-t.margins.left-t.margins.right:t.maxWidth:r&&o.drawTicks?c:0,e.height=l?r&&o.drawTicks?c:0:t.maxHeight,s.display&&r){var u=C(s)+j.options.toPadding(s.padding).height;l?e.height+=u:e.width+=u}if(a.display&&r){var h=j.longestText(t.ctx,d.font,i,t.longestTextCache),p=j.numberOfLabelLines(i),f=.5*d.size,m=t.options.ticks.padding;if(l){t.longestLabelWidth=h;var g=j.toRadians(t.labelRotation),v=Math.cos(g),b=Math.sin(g)*h+d.size*p+f*(p-1)+f;e.height=Math.min(t.maxHeight,e.height+b+m),t.ctx.font=d.font;var y=x(t.ctx,i[0],d.font),w=x(t.ctx,i[i.length-1],d.font);0!==t.labelRotation?(t.paddingLeft="bottom"===n.position?v*y+3:v*f+3,t.paddingRight="bottom"===n.position?v*f+3:v*w+3):(t.paddingLeft=y/2+3,t.paddingRight=w/2+3)}else a.mirror?h=0:h+=m+f,e.width=Math.min(t.maxWidth,e.width+h),t.paddingTop=d.size/2,t.paddingBottom=d.size/2}t.handleMargins(),t.width=e.width,t.height=e.height},handleMargins:function(){var t=this;t.margins&&(t.paddingLeft=Math.max(t.paddingLeft-t.margins.left,0),t.paddingTop=Math.max(t.paddingTop-t.margins.top,0),t.paddingRight=Math.max(t.paddingRight-t.margins.right,0),t.paddingBottom=Math.max(t.paddingBottom-t.margins.bottom,0))},afterFit:function(){j.callback(this.options.afterFit,[this])},isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},isFullWidth:function(){return this.options.fullWidth},getRightValue:function(t){if(j.isNullOrUndef(t))return NaN;if("number"==typeof t&&!isFinite(t))return NaN;if(t)if(this.isHorizontal()){if(void 0!==t.x)return this.getRightValue(t.x)}else if(void 0!==t.y)return this.getRightValue(t.y);return t},getLabelForIndex:j.noop,getPixelForValue:j.noop,getValueForPixel:j.noop,getPixelForTick:function(t){var e=this,i=e.options.offset;if(e.isHorizontal()){var n=(e.width-(e.paddingLeft+e.paddingRight))/Math.max(e._ticks.length-(i?0:1),1),a=n*t+e.paddingLeft;i&&(a+=n/2);var s=e.left+Math.round(a);return s+=e.isFullWidth()?e.margins.left:0}var o=e.height-(e.paddingTop+e.paddingBottom);return e.top+t*(o/(e._ticks.length-1))},getPixelForDecimal:function(t){var e=this;if(e.isHorizontal()){var i=(e.width-(e.paddingLeft+e.paddingRight))*t+e.paddingLeft,n=e.left+Math.round(i);return n+=e.isFullWidth()?e.margins.left:0}return e.top+t*e.height},getBasePixel:function(){return this.getPixelForValue(this.getBaseValue())},getBaseValue:function(){var t=this.min,e=this.max;return this.beginAtZero?0:t<0&&e<0?e:0<t&&0<e?t:0},_autoSkip:function(t){var e,i,n,a,s=this,o=s.isHorizontal(),r=s.options.ticks.minor,l=t.length,d=j.toRadians(s.labelRotation),c=Math.cos(d),u=s.longestLabelWidth*c,h=[];for(r.maxTicksLimit&&(a=r.maxTicksLimit),o&&(e=!1,(u+r.autoSkipPadding)*l>s.width-(s.paddingLeft+s.paddingRight)&&(e=1+Math.floor((u+r.autoSkipPadding)*l/(s.width-(s.paddingLeft+s.paddingRight)))),a&&a<l&&(e=Math.max(e,Math.floor(l/a)))),i=0;i<l;i++)n=t[i],(1<e&&0<i%e||i%e==0&&l<=i+e)&&i!==l-1&&delete n.label,h.push(n);return h},draw:function(S){var P=this,A=P.options;if(A.display){var a=P.ctx,M=w.global,D=A.ticks.minor,t=A.ticks.major||D,T=A.gridLines,e=A.scaleLabel,I=0!==P.labelRotation,E=P.isHorizontal(),L=D.autoSkip?P._autoSkip(P.getTicks()):P.getTicks(),s=j.valueOrDefault(D.fontColor,M.defaultFontColor),o=k(D),r=j.valueOrDefault(t.fontColor,M.defaultFontColor),l=k(t),O=T.drawTicks?T.tickMarkLength:0,i=j.valueOrDefault(e.fontColor,M.defaultFontColor),n=k(e),d=j.options.toPadding(e.padding),F=j.toRadians(P.labelRotation),B=[],R="right"===A.position?P.left:P.right-O,$="right"===A.position?P.left+O:P.right,N="bottom"===A.position?P.top:P.bottom-O,z="bottom"===A.position?P.top+O:P.bottom;if(j.each(L,function(t,e){if(!j.isNullOrUndef(t.label)){var i,n,a,s,o,r,l,d,c,u,h,p,f,m,g=t.label;s=e===P.zeroLineIndex&&A.offset===T.offsetGridLines?(i=T.zeroLineWidth,n=T.zeroLineColor,a=T.zeroLineBorderDash,T.zeroLineBorderDashOffset):(i=j.valueAtIndexOrDefault(T.lineWidth,e),n=j.valueAtIndexOrDefault(T.color,e),a=j.valueOrDefault(T.borderDash,M.borderDash),j.valueOrDefault(T.borderDashOffset,M.borderDashOffset));var v="middle",b="middle",y=D.padding;if(E){var w=O+y;m="bottom"===A.position?(b=I?"middle":"top",v=I?"right":"center",P.top+w):(b=I?"middle":"bottom",v=I?"left":"center",P.bottom-w);var x=H(P,e,T.offsetGridLines&&1<L.length);x<P.left&&(n="rgba(0,0,0,0)"),x+=j.aliasPixel(i),f=P.getPixelForTick(e)+D.labelOffset,o=l=c=h=x,r=N,d=z,u=S.top,p=S.bottom}else{var k,C="left"===A.position;k=D.mirror?(v=C?"left":"right",y):(v=C?"right":"left",O+y),f=C?P.right-k:P.left+k;var _=H(P,e,T.offsetGridLines&&1<L.length);_<P.top&&(n="rgba(0,0,0,0)"),_+=j.aliasPixel(i),m=P.getPixelForTick(e)+D.labelOffset,o=R,l=$,c=S.left,h=S.right,r=d=u=p=_}B.push({tx1:o,ty1:r,tx2:l,ty2:d,x1:c,y1:u,x2:h,y2:p,labelX:f,labelY:m,glWidth:i,glColor:n,glBorderDash:a,glBorderDashOffset:s,rotation:-1*F,label:g,major:t.major,textBaseline:b,textAlign:v})}}),j.each(B,function(t){if(T.display&&(a.save(),a.lineWidth=t.glWidth,a.strokeStyle=t.glColor,a.setLineDash&&(a.setLineDash(t.glBorderDash),a.lineDashOffset=t.glBorderDashOffset),a.beginPath(),T.drawTicks&&(a.moveTo(t.tx1,t.ty1),a.lineTo(t.tx2,t.ty2)),T.drawOnChartArea&&(a.moveTo(t.x1,t.y1),a.lineTo(t.x2,t.y2)),a.stroke(),a.restore()),D.display){a.save(),a.translate(t.labelX,t.labelY),a.rotate(t.rotation),a.font=t.major?l.font:o.font,a.fillStyle=t.major?r:s,a.textBaseline=t.textBaseline,a.textAlign=t.textAlign;var e=t.label;if(j.isArray(e))for(var i=0,n=0;i<e.length;++i)a.fillText(""+e[i],0,n),n+=1.5*o.size;else a.fillText(e,0,0);a.restore()}}),e.display){var c,u,h=0,p=C(e)/2;if(E)c=P.left+(P.right-P.left)/2,u="bottom"===A.position?P.bottom-p-d.bottom:P.top+p+d.top;else{var f="left"===A.position;c=f?P.left+p+d.top:P.right-p-d.top,u=P.top+(P.bottom-P.top)/2,h=f?-.5*Math.PI:.5*Math.PI}a.save(),a.translate(c,u),a.rotate(h),a.textAlign="center",a.textBaseline="middle",a.fillStyle=i,a.font=n.font,a.fillText(e.labelString,0,0),a.restore()}if(T.drawBorder){a.lineWidth=j.valueAtIndexOrDefault(T.lineWidth,0),a.strokeStyle=j.valueAtIndexOrDefault(T.color,0);var m=P.left,g=P.right,v=P.top,b=P.bottom,y=j.aliasPixel(a.lineWidth);E?(v=b="top"===A.position?P.bottom:P.top,v+=y,b+=y):(m=g="left"===A.position?P.right:P.left,m+=y,g+=y),a.beginPath(),a.moveTo(m,v),a.lineTo(g,b),a.stroke()}}}})}},{25:25,26:26,34:34,45:45}],33:[function(t,e,i){"use strict";var n=t(25),a=t(45);e.exports=function(i){i.scaleService={constructors:{},defaults:{},registerScaleType:function(t,e,i){this.constructors[t]=e,this.defaults[t]=a.clone(i)},getScaleConstructor:function(t){return this.constructors.hasOwnProperty(t)?this.constructors[t]:void 0},getScaleDefaults:function(t){return this.defaults.hasOwnProperty(t)?a.merge({},[n.scale,this.defaults[t]]):{}},updateScaleDefaults:function(t,e){this.defaults.hasOwnProperty(t)&&(this.defaults[t]=a.extend(this.defaults[t],e))},addScalesToLayout:function(e){a.each(e.scales,function(t){t.fullWidth=t.options.fullWidth,t.position=t.options.position,t.weight=t.options.weight,i.layoutService.addBox(e,t)})}}}},{25:25,45:45}],34:[function(t,e,i){"use strict";var c=t(45);e.exports={generators:{linear:function(t,e){var i,n=[];if(t.stepSize&&0<t.stepSize)i=t.stepSize;else{var a=c.niceNum(e.max-e.min,!1);i=c.niceNum(a/(t.maxTicks-1),!0)}var s=Math.floor(e.min/i)*i,o=Math.ceil(e.max/i)*i;t.min&&t.max&&t.stepSize&&c.almostWhole((t.max-t.min)/t.stepSize,i/1e3)&&(s=t.min,o=t.max);var r=(o-s)/i;r=c.almostEquals(r,Math.round(r),i/1e3)?Math.round(r):Math.ceil(r),n.push(void 0!==t.min?t.min:s);for(var l=1;l<r;++l)n.push(s+l*i);return n.push(void 0!==t.max?t.max:o),n},logarithmic:function(t,e){var i,n,a=[],s=c.valueOrDefault,o=s(t.min,Math.pow(10,Math.floor(c.log10(e.min)))),r=Math.floor(c.log10(e.max)),l=Math.ceil(e.max/Math.pow(10,r));for(0===o?(i=Math.floor(c.log10(e.minNotZero)),n=Math.floor(e.minNotZero/Math.pow(10,i)),a.push(o),o=n*Math.pow(10,i)):(i=Math.floor(c.log10(o)),n=Math.floor(o/Math.pow(10,i)));a.push(o),10===++n&&(n=1,++i),o=n*Math.pow(10,i),i<r||i===r&&n<l;);var d=s(t.max,o);return a.push(d),a}},formatters:{values:function(t){return c.isArray(t)?t:""+t},linear:function(t,e,i){var n=3<i.length?i[2]-i[1]:i[1]-i[0];1<Math.abs(n)&&t!==Math.floor(t)&&(n=t-Math.floor(t));var a=c.log10(Math.abs(n)),s="";if(0!==t){var o=-1*Math.floor(a);o=Math.max(Math.min(o,20),0),s=t.toFixed(o)}else s="0";return s},logarithmic:function(t,e,i){var n=t/Math.pow(10,Math.floor(c.log10(t)));return 0===t?"0":1===n||2===n||5===n||0===e||e===i.length-1?t.toExponential():""}}}},{45:45}],35:[function(t,e,i){"use strict";var n=t(25),a=t(26),F=t(45);n._set("global",{tooltips:{enabled:!0,custom:null,mode:"nearest",position:"average",intersect:!0,backgroundColor:"rgba(0,0,0,0.8)",titleFontStyle:"bold",titleSpacing:2,titleMarginBottom:6,titleFontColor:"#fff",titleAlign:"left",bodySpacing:2,bodyFontColor:"#fff",bodyAlign:"left",footerFontStyle:"bold",footerSpacing:2,footerMarginTop:6,footerFontColor:"#fff",footerAlign:"left",yPadding:6,xPadding:6,caretPadding:2,caretSize:5,cornerRadius:6,multiKeyBackground:"#fff",displayColors:!0,borderColor:"rgba(0,0,0,0)",borderWidth:0,callbacks:{beforeTitle:F.noop,title:function(t,e){var i="",n=e.labels,a=n?n.length:0;if(0<t.length){var s=t[0];s.xLabel?i=s.xLabel:0<a&&s.index<a&&(i=n[s.index])}return i},afterTitle:F.noop,beforeBody:F.noop,beforeLabel:F.noop,label:function(t,e){var i=e.datasets[t.datasetIndex].label||"";return i&&(i+=": "),i+=t.yLabel},labelColor:function(t,e){var i=e.getDatasetMeta(t.datasetIndex).data[t.index]._view;return{borderColor:i.borderColor,backgroundColor:i.backgroundColor}},labelTextColor:function(){return this._options.bodyFontColor},afterLabel:F.noop,afterBody:F.noop,beforeFooter:F.noop,footer:F.noop,afterFooter:F.noop}}}),e.exports=function(L){function h(t,e){var i=F.color(t);return i.alpha(e*i.alpha()).rgbaString()}function o(t,e){return e&&(F.isArray(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function O(t){var e=n.global,i=F.valueOrDefault;return{xPadding:t.xPadding,yPadding:t.yPadding,xAlign:t.xAlign,yAlign:t.yAlign,bodyFontColor:t.bodyFontColor,_bodyFontFamily:i(t.bodyFontFamily,e.defaultFontFamily),_bodyFontStyle:i(t.bodyFontStyle,e.defaultFontStyle),_bodyAlign:t.bodyAlign,bodyFontSize:i(t.bodyFontSize,e.defaultFontSize),bodySpacing:t.bodySpacing,titleFontColor:t.titleFontColor,_titleFontFamily:i(t.titleFontFamily,e.defaultFontFamily),_titleFontStyle:i(t.titleFontStyle,e.defaultFontStyle),titleFontSize:i(t.titleFontSize,e.defaultFontSize),_titleAlign:t.titleAlign,titleSpacing:t.titleSpacing,titleMarginBottom:t.titleMarginBottom,footerFontColor:t.footerFontColor,_footerFontFamily:i(t.footerFontFamily,e.defaultFontFamily),_footerFontStyle:i(t.footerFontStyle,e.defaultFontStyle),footerFontSize:i(t.footerFontSize,e.defaultFontSize),_footerAlign:t.footerAlign,footerSpacing:t.footerSpacing,footerMarginTop:t.footerMarginTop,caretSize:t.caretSize,cornerRadius:t.cornerRadius,backgroundColor:t.backgroundColor,opacity:0,legendColorBackground:t.multiKeyBackground,displayColors:t.displayColors,borderColor:t.borderColor,borderWidth:t.borderWidth}}L.Tooltip=a.extend({initialize:function(){this._model=O(this._options),this._lastActive=[]},getTitle:function(){var t=this._options.callbacks,e=t.beforeTitle.apply(this,arguments),i=t.title.apply(this,arguments),n=t.afterTitle.apply(this,arguments),a=[];return a=o(a=o(a=o(a,e),i),n)},getBeforeBody:function(){var t=this._options.callbacks.beforeBody.apply(this,arguments);return F.isArray(t)?t:void 0!==t?[t]:[]},getBody:function(t,i){var n=this,a=n._options.callbacks,s=[];return F.each(t,function(t){var e={before:[],lines:[],after:[]};o(e.before,a.beforeLabel.call(n,t,i)),o(e.lines,a.label.call(n,t,i)),o(e.after,a.afterLabel.call(n,t,i)),s.push(e)}),s},getAfterBody:function(){var t=this._options.callbacks.afterBody.apply(this,arguments);return F.isArray(t)?t:void 0!==t?[t]:[]},getFooter:function(){var t=this._options.callbacks,e=t.beforeFooter.apply(this,arguments),i=t.footer.apply(this,arguments),n=t.afterFooter.apply(this,arguments),a=[];return a=o(a=o(a=o(a,e),i),n)},update:function(t){var e,i,n,a,s,o,r,l,d,c,u,h,p,f,m,g,v,b,y,w=this,x=w._options,k=w._model,C=w._model=O(x),_=w._active,S=w._data,P={xAlign:k.xAlign,yAlign:k.yAlign},A={x:k.x,y:k.y},M={width:k.width,height:k.height},D={x:k.caretX,y:k.caretY};if(_.length){C.opacity=1;var T=[],I=[];D=L.Tooltip.positioners[x.position].call(w,_,w._eventPosition);var E=[];for(e=0,i=_.length;e<i;++e)E.push((m=_[e],v=g=void 0,g=m._xScale,v=m._yScale||m._scale,b=m._index,y=m._datasetIndex,{xLabel:g?g.getLabelForIndex(b,y):"",yLabel:v?v.getLabelForIndex(b,y):"",index:b,datasetIndex:y,x:m._model.x,y:m._model.y}));x.filter&&(E=E.filter(function(t){return x.filter(t,S)})),x.itemSort&&(E=E.sort(function(t,e){return x.itemSort(t,e,S)})),F.each(E,function(t){T.push(x.callbacks.labelColor.call(w,t,w._chart)),I.push(x.callbacks.labelTextColor.call(w,t,w._chart))}),C.title=w.getTitle(E,S),C.beforeBody=w.getBeforeBody(E,S),C.body=w.getBody(E,S),C.afterBody=w.getAfterBody(E,S),C.footer=w.getFooter(E,S),C.x=Math.round(D.x),C.y=Math.round(D.y),C.caretPadding=x.caretPadding,C.labelColors=T,C.labelTextColors=I,C.dataPoints=E,P=function(t,e){var i,n,a,s,o,r=t._model,l=t._chart,d=t._chart.chartArea,c="center",u="center";r.y<e.height?u="top":r.y>l.height-e.height&&(u="bottom");var h=(d.left+d.right)/2,p=(d.top+d.bottom)/2;n="center"===u?(i=function(t){return t<=h},function(t){return h<t}):(i=function(t){return t<=e.width/2},function(t){return t>=l.width-e.width/2}),a=function(t){return t+e.width>l.width},s=function(t){return t-e.width<0},o=function(t){return t<=p?"top":"bottom"},i(r.x)?(c="left",a(r.x)&&(c="center",u=o(r.y))):n(r.x)&&(c="right",s(r.x)&&(c="center",u=o(r.y)));var f=t._options;return{xAlign:f.xAlign?f.xAlign:c,yAlign:f.yAlign?f.yAlign:u}}(this,M=function(t,e){var i=t._chart.ctx,n=2*e.yPadding,a=0,s=e.body,o=s.reduce(function(t,e){return t+e.before.length+e.lines.length+e.after.length},0);o+=e.beforeBody.length+e.afterBody.length;var r=e.title.length,l=e.footer.length,d=e.titleFontSize,c=e.bodyFontSize,u=e.footerFontSize;n+=r*d,n+=r?(r-1)*e.titleSpacing:0,n+=r?e.titleMarginBottom:0,n+=o*c,n+=o?(o-1)*e.bodySpacing:0,n+=l?e.footerMarginTop:0,n+=l*u,n+=l?(l-1)*e.footerSpacing:0;var h=0,p=function(t){a=Math.max(a,i.measureText(t).width+h)};return i.font=F.fontString(d,e._titleFontStyle,e._titleFontFamily),F.each(e.title,p),i.font=F.fontString(c,e._bodyFontStyle,e._bodyFontFamily),F.each(e.beforeBody.concat(e.afterBody),p),h=e.displayColors?c+2:0,F.each(s,function(t){F.each(t.before,p),F.each(t.lines,p),F.each(t.after,p)}),h=0,i.font=F.fontString(u,e._footerFontStyle,e._footerFontFamily),F.each(e.footer,p),{width:a+=2*e.xPadding,height:n}}(this,C)),a=M,s=P,o=(n=C).x,r=n.y,l=n.caretSize,d=n.caretPadding,c=n.cornerRadius,u=s.xAlign,h=s.yAlign,p=l+d,f=c+d,"right"===u?o-=a.width:"center"===u&&(o-=a.width/2),"top"===h?r+=p:r-="bottom"===h?a.height+p:a.height/2,"center"===h?"left"===u?o+=p:"right"===u&&(o-=p):"left"===u?o-=f:"right"===u&&(o+=f),A={x:o,y:r}}else C.opacity=0;return C.xAlign=P.xAlign,C.yAlign=P.yAlign,C.x=A.x,C.y=A.y,C.width=M.width,C.height=M.height,C.caretX=D.x,C.caretY=D.y,w._model=C,t&&x.custom&&x.custom.call(w,C),w},drawCaret:function(t,e){var i=this._chart.ctx,n=this._view,a=this.getCaretPosition(t,e,n);i.lineTo(a.x1,a.y1),i.lineTo(a.x2,a.y2),i.lineTo(a.x3,a.y3)},getCaretPosition:function(t,e,i){var n,a,s,o,r,l,d=i.caretSize,c=i.cornerRadius,u=i.xAlign,h=i.yAlign,p=t.x,f=t.y,m=e.width,g=e.height;if("center"===h)r=f+g/2,l="left"===u?(a=(n=p)-d,s=n,o=r+d,r-d):(a=(n=p+m)+d,s=n,o=r-d,r+d);else if(s=(n="left"===u?(a=p+c+d)-d:"right"===u?(a=p+m-c-d)-d:(a=p+m/2)-d,a+d),"top"===h)r=(o=f)-d,l=o;else{r=(o=f+g)+d,l=o;var v=s;s=n,n=v}return{x1:n,x2:a,x3:s,y1:o,y2:r,y3:l}},drawTitle:function(t,e,i,n){var a=e.title;if(a.length){i.textAlign=e._titleAlign,i.textBaseline="top";var s,o,r=e.titleFontSize,l=e.titleSpacing;for(i.fillStyle=h(e.titleFontColor,n),i.font=F.fontString(r,e._titleFontStyle,e._titleFontFamily),s=0,o=a.length;s<o;++s)i.fillText(a[s],t.x,t.y),t.y+=r+l,s+1===a.length&&(t.y+=e.titleMarginBottom-l)}},drawBody:function(n,a,s,o){var r=a.bodyFontSize,e=a.bodySpacing,t=a.body;s.textAlign=a._bodyAlign,s.textBaseline="top",s.font=F.fontString(r,a._bodyFontStyle,a._bodyFontFamily);var i=0,l=function(t){s.fillText(t,n.x+i,n.y),n.y+=r+e};s.fillStyle=h(a.bodyFontColor,o),F.each(a.beforeBody,l);var d=a.displayColors;i=d?r+2:0,F.each(t,function(t,e){var i=h(a.labelTextColors[e],o);s.fillStyle=i,F.each(t.before,l),F.each(t.lines,function(t){d&&(s.fillStyle=h(a.legendColorBackground,o),s.fillRect(n.x,n.y,r,r),s.lineWidth=1,s.strokeStyle=h(a.labelColors[e].borderColor,o),s.strokeRect(n.x,n.y,r,r),s.fillStyle=h(a.labelColors[e].backgroundColor,o),s.fillRect(n.x+1,n.y+1,r-2,r-2),s.fillStyle=i),l(t)}),F.each(t.after,l)}),i=0,F.each(a.afterBody,l),n.y-=e},drawFooter:function(e,i,n,t){var a=i.footer;a.length&&(e.y+=i.footerMarginTop,n.textAlign=i._footerAlign,n.textBaseline="top",n.fillStyle=h(i.footerFontColor,t),n.font=F.fontString(i.footerFontSize,i._footerFontStyle,i._footerFontFamily),F.each(a,function(t){n.fillText(t,e.x,e.y),e.y+=i.footerFontSize+i.footerSpacing}))},drawBackground:function(t,e,i,n,a){i.fillStyle=h(e.backgroundColor,a),i.strokeStyle=h(e.borderColor,a),i.lineWidth=e.borderWidth;var s=e.xAlign,o=e.yAlign,r=t.x,l=t.y,d=n.width,c=n.height,u=e.cornerRadius;i.beginPath(),i.moveTo(r+u,l),"top"===o&&this.drawCaret(t,n),i.lineTo(r+d-u,l),i.quadraticCurveTo(r+d,l,r+d,l+u),"center"===o&&"right"===s&&this.drawCaret(t,n),i.lineTo(r+d,l+c-u),i.quadraticCurveTo(r+d,l+c,r+d-u,l+c),"bottom"===o&&this.drawCaret(t,n),i.lineTo(r+u,l+c),i.quadraticCurveTo(r,l+c,r,l+c-u),"center"===o&&"left"===s&&this.drawCaret(t,n),i.lineTo(r,l+u),i.quadraticCurveTo(r,l,r+u,l),i.closePath(),i.fill(),0<e.borderWidth&&i.stroke()},draw:function(){var t=this._chart.ctx,e=this._view;if(0!==e.opacity){var i={width:e.width,height:e.height},n={x:e.x,y:e.y},a=Math.abs(e.opacity<.001)?0:e.opacity,s=e.title.length||e.beforeBody.length||e.body.length||e.afterBody.length||e.footer.length;this._options.enabled&&s&&(this.drawBackground(n,e,t,i,a),n.x+=e.xPadding,n.y+=e.yPadding,this.drawTitle(n,e,t,a),this.drawBody(n,e,t,a),this.drawFooter(n,e,t,a))}},handleEvent:function(t){var e=this,i=e._options,n=!1;if(e._lastActive=e._lastActive||[],"mouseout"===t.type?e._active=[]:e._active=e._chart.getElementsAtEventForMode(t,i.mode,i),!(n=!F.arrayEquals(e._active,e._lastActive)))return!1;if(e._lastActive=e._active,i.enabled||i.custom){e._eventPosition={x:t.x,y:t.y};var a=e._model;e.update(!0),e.pivot(),n|=a.x!==e._model.x||a.y!==e._model.y}return n}}),L.Tooltip.positioners={average:function(t){if(!t.length)return!1;var e,i,n=0,a=0,s=0;for(e=0,i=t.length;e<i;++e){var o=t[e];if(o&&o.hasValue()){var r=o.tooltipPosition();n+=r.x,a+=r.y,++s}}return{x:Math.round(n/s),y:Math.round(a/s)}},nearest:function(t,e){var i,n,a,s=e.x,o=e.y,r=Number.POSITIVE_INFINITY;for(i=0,n=t.length;i<n;++i){var l=t[i];if(l&&l.hasValue()){var d=l.getCenterPoint(),c=F.distanceBetweenPoints(e,d);c<r&&(r=c,a=l)}}if(a){var u=a.tooltipPosition();s=u.x,o=u.y}return{x:s,y:o}}}}},{25:25,26:26,45:45}],36:[function(t,e,i){"use strict";var n=t(25),a=t(26),c=t(45);n._set("global",{elements:{arc:{backgroundColor:n.global.defaultColor,borderColor:"#fff",borderWidth:2}}}),e.exports=a.extend({inLabelRange:function(t){var e=this._view;return!!e&&Math.pow(t-e.x,2)<Math.pow(e.radius+e.hoverRadius,2)},inRange:function(t,e){var i=this._view;if(i){for(var n=c.getAngleFromPoint(i,{x:t,y:e}),a=n.angle,s=n.distance,o=i.startAngle,r=i.endAngle;r<o;)r+=2*Math.PI;for(;r<a;)a-=2*Math.PI;for(;a<o;)a+=2*Math.PI;var l=o<=a&&a<=r,d=s>=i.innerRadius&&s<=i.outerRadius;return l&&d}return!1},getCenterPoint:function(){var t=this._view,e=(t.startAngle+t.endAngle)/2,i=(t.innerRadius+t.outerRadius)/2;return{x:t.x+Math.cos(e)*i,y:t.y+Math.sin(e)*i}},getArea:function(){var t=this._view;return Math.PI*((t.endAngle-t.startAngle)/(2*Math.PI))*(Math.pow(t.outerRadius,2)-Math.pow(t.innerRadius,2))},tooltipPosition:function(){var t=this._view,e=t.startAngle+(t.endAngle-t.startAngle)/2,i=(t.outerRadius-t.innerRadius)/2+t.innerRadius;return{x:t.x+Math.cos(e)*i,y:t.y+Math.sin(e)*i}},draw:function(){var t=this._chart.ctx,e=this._view,i=e.startAngle,n=e.endAngle;t.beginPath(),t.arc(e.x,e.y,e.outerRadius,i,n),t.arc(e.x,e.y,e.innerRadius,n,i,!0),t.closePath(),t.strokeStyle=e.borderColor,t.lineWidth=e.borderWidth,t.fillStyle=e.backgroundColor,t.fill(),t.lineJoin="bevel",e.borderWidth&&t.stroke()}})},{25:25,26:26,45:45}],37:[function(t,e,i){"use strict";var n=t(25),a=t(26),c=t(45),u=n.global;n._set("global",{elements:{line:{tension:.4,backgroundColor:u.defaultColor,borderWidth:3,borderColor:u.defaultColor,borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",capBezierPoints:!0,fill:!0}}}),e.exports=a.extend({draw:function(){var t,e,i,n,a=this._view,s=this._chart.ctx,o=a.spanGaps,r=this._children.slice(),l=u.elements.line,d=-1;for(this._loop&&r.length&&r.push(r[0]),s.save(),s.lineCap=a.borderCapStyle||l.borderCapStyle,s.setLineDash&&s.setLineDash(a.borderDash||l.borderDash),s.lineDashOffset=a.borderDashOffset||l.borderDashOffset,s.lineJoin=a.borderJoinStyle||l.borderJoinStyle,s.lineWidth=a.borderWidth||l.borderWidth,s.strokeStyle=a.borderColor||u.defaultColor,s.beginPath(),d=-1,t=0;t<r.length;++t)e=r[t],i=c.previousItem(r,t),n=e._view,0===t?n.skip||(s.moveTo(n.x,n.y),d=t):(i=-1===d?i:r[d],n.skip||(d!==t-1&&!o||-1===d?s.moveTo(n.x,n.y):c.canvas.lineTo(s,i._view,e._view),d=t));s.stroke(),s.restore()}})},{25:25,26:26,45:45}],38:[function(t,e,i){"use strict";var c=t(25),n=t(26),u=t(45),h=c.global.defaultColor;function a(t){var e=this._view;return!!e&&Math.pow(t-e.x,2)<Math.pow(e.radius+e.hitRadius,2)}c._set("global",{elements:{point:{radius:3,pointStyle:"circle",backgroundColor:h,borderColor:h,borderWidth:1,hitRadius:1,hoverRadius:4,hoverBorderWidth:1}}}),e.exports=n.extend({inRange:function(t,e){var i=this._view;return!!i&&Math.pow(t-i.x,2)+Math.pow(e-i.y,2)<Math.pow(i.hitRadius+i.radius,2)},inLabelRange:a,inXRange:a,inYRange:function(t){var e=this._view;return!!e&&Math.pow(t-e.y,2)<Math.pow(e.radius+e.hitRadius,2)},getCenterPoint:function(){var t=this._view;return{x:t.x,y:t.y}},getArea:function(){return Math.PI*Math.pow(this._view.radius,2)},tooltipPosition:function(){var t=this._view;return{x:t.x,y:t.y,padding:t.radius+t.borderWidth}},draw:function(t){var e=this._view,i=this._model,n=this._chart.ctx,a=e.pointStyle,s=e.radius,o=e.x,r=e.y,l=u.color,d=0;e.skip||(n.strokeStyle=e.borderColor||h,n.lineWidth=u.valueOrDefault(e.borderWidth,c.global.elements.point.borderWidth),n.fillStyle=e.backgroundColor||h,void 0!==t&&(i.x<t.left||1.01*t.right<i.x||i.y<t.top||1.01*t.bottom<i.y)&&(i.x<t.left?d=(o-i.x)/(t.left-i.x):1.01*t.right<i.x?d=(i.x-o)/(i.x-t.right):i.y<t.top?d=(r-i.y)/(t.top-i.y):1.01*t.bottom<i.y&&(d=(i.y-r)/(i.y-t.bottom)),d=Math.round(100*d)/100,n.strokeStyle=l(n.strokeStyle).alpha(d).rgbString(),n.fillStyle=l(n.fillStyle).alpha(d).rgbString()),u.canvas.drawPoint(n,a,s,o,r))}})},{25:25,26:26,45:45}],39:[function(t,e,i){"use strict";var n=t(25),a=t(26);function l(t){return void 0!==t._view.width}function s(t){var e,i,n,a,s=t._view;if(l(t)){var o=s.width/2;e=s.x-o,i=s.x+o,n=Math.min(s.y,s.base),a=Math.max(s.y,s.base)}else{var r=s.height/2;e=Math.min(s.x,s.base),i=Math.max(s.x,s.base),n=s.y-r,a=s.y+r}return{left:e,top:n,right:i,bottom:a}}n._set("global",{elements:{rectangle:{backgroundColor:n.global.defaultColor,borderColor:n.global.defaultColor,borderSkipped:"bottom",borderWidth:0}}}),e.exports=a.extend({draw:function(){var t,e,i,n,a,s,o,r=this._chart.ctx,l=this._view,d=l.borderWidth;if(o=l.horizontal?(t=l.base,e=l.x,i=l.y-l.height/2,n=l.y+l.height/2,a=t<e?1:-1,s=1,l.borderSkipped||"left"):(t=l.x-l.width/2,e=l.x+l.width/2,a=1,s=(i=l.y)<(n=l.base)?1:-1,l.borderSkipped||"bottom"),d){var c=Math.min(Math.abs(t-e),Math.abs(i-n)),u=(d=c<d?c:d)/2,h=t+("left"!==o?u*a:0),p=e+("right"!==o?-u*a:0),f=i+("top"!==o?u*s:0),m=n+("bottom"!==o?-u*s:0);h!==p&&(i=f,n=m),f!==m&&(t=h,e=p)}r.beginPath(),r.fillStyle=l.backgroundColor,r.strokeStyle=l.borderColor,r.lineWidth=d;var g=[[t,n],[t,i],[e,i],[e,n]],v=["bottom","left","top","right"].indexOf(o,0);function b(t){return g[(v+t)%4]}-1===v&&(v=0);var y=b(0);r.moveTo(y[0],y[1]);for(var w=1;w<4;w++)y=b(w),r.lineTo(y[0],y[1]);r.fill(),d&&r.stroke()},height:function(){var t=this._view;return t.base-t.y},inRange:function(t,e){var i=!1;if(this._view){var n=s(this);i=t>=n.left&&t<=n.right&&e>=n.top&&e<=n.bottom}return i},inLabelRange:function(t,e){if(!this._view)return!1;var i=s(this);return l(this)?t>=i.left&&t<=i.right:e>=i.top&&e<=i.bottom},inXRange:function(t){var e=s(this);return t>=e.left&&t<=e.right},inYRange:function(t){var e=s(this);return t>=e.top&&t<=e.bottom},getCenterPoint:function(){var t,e,i=this._view;return e=l(this)?(t=i.x,(i.y+i.base)/2):(t=(i.x+i.base)/2,i.y),{x:t,y:e}},getArea:function(){var t=this._view;return t.width*Math.abs(t.y-t.base)},tooltipPosition:function(){var t=this._view;return{x:t.x,y:t.y}}})},{25:25,26:26}],40:[function(t,e,i){"use strict";e.exports={},e.exports.Arc=t(36),e.exports.Line=t(37),e.exports.Point=t(38),e.exports.Rectangle=t(39)},{36:36,37:37,38:38,39:39}],41:[function(t,e,i){"use strict";var n=t(42);i=e.exports={clear:function(t){t.ctx.clearRect(0,0,t.width,t.height)},roundedRect:function(t,e,i,n,a,s){if(s){var o=Math.min(s,n/2),r=Math.min(s,a/2);t.moveTo(e+o,i),t.lineTo(e+n-o,i),t.quadraticCurveTo(e+n,i,e+n,i+r),t.lineTo(e+n,i+a-r),t.quadraticCurveTo(e+n,i+a,e+n-o,i+a),t.lineTo(e+o,i+a),t.quadraticCurveTo(e,i+a,e,i+a-r),t.lineTo(e,i+r),t.quadraticCurveTo(e,i,e+o,i)}else t.rect(e,i,n,a)},drawPoint:function(t,e,i,n,a){var s,o,r,l,d,c;if(!e||"object"!=typeof e||"[object HTMLImageElement]"!==(s=e.toString())&&"[object HTMLCanvasElement]"!==s){if(!(isNaN(i)||i<=0)){switch(e){default:t.beginPath(),t.arc(n,a,i,0,2*Math.PI),t.closePath(),t.fill();break;case"triangle":t.beginPath(),d=(o=3*i/Math.sqrt(3))*Math.sqrt(3)/2,t.moveTo(n-o/2,a+d/3),t.lineTo(n+o/2,a+d/3),t.lineTo(n,a-2*d/3),t.closePath(),t.fill();break;case"rect":c=1/Math.SQRT2*i,t.beginPath(),t.fillRect(n-c,a-c,2*c,2*c),t.strokeRect(n-c,a-c,2*c,2*c);break;case"rectRounded":var u=i/Math.SQRT2,h=n-u,p=a-u,f=Math.SQRT2*i;t.beginPath(),this.roundedRect(t,h,p,f,f,i/2),t.closePath(),t.fill();break;case"rectRot":c=1/Math.SQRT2*i,t.beginPath(),t.moveTo(n-c,a),t.lineTo(n,a+c),t.lineTo(n+c,a),t.lineTo(n,a-c),t.closePath(),t.fill();break;case"cross":t.beginPath(),t.moveTo(n,a+i),t.lineTo(n,a-i),t.moveTo(n-i,a),t.lineTo(n+i,a),t.closePath();break;case"crossRot":t.beginPath(),r=Math.cos(Math.PI/4)*i,l=Math.sin(Math.PI/4)*i,t.moveTo(n-r,a-l),t.lineTo(n+r,a+l),t.moveTo(n-r,a+l),t.lineTo(n+r,a-l),t.closePath();break;case"star":t.beginPath(),t.moveTo(n,a+i),t.lineTo(n,a-i),t.moveTo(n-i,a),t.lineTo(n+i,a),r=Math.cos(Math.PI/4)*i,l=Math.sin(Math.PI/4)*i,t.moveTo(n-r,a-l),t.lineTo(n+r,a+l),t.moveTo(n-r,a+l),t.lineTo(n+r,a-l),t.closePath();break;case"line":t.beginPath(),t.moveTo(n-i,a),t.lineTo(n+i,a),t.closePath();break;case"dash":t.beginPath(),t.moveTo(n,a),t.lineTo(n+i,a),t.closePath()}t.stroke()}}else t.drawImage(e,n-e.width/2,a-e.height/2,e.width,e.height)},clipArea:function(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()},unclipArea:function(t){t.restore()},lineTo:function(t,e,i,n){if(i.steppedLine)return"after"===i.steppedLine&&!n||"after"!==i.steppedLine&&n?t.lineTo(e.x,i.y):t.lineTo(i.x,e.y),void t.lineTo(i.x,i.y);i.tension?t.bezierCurveTo(n?e.controlPointPreviousX:e.controlPointNextX,n?e.controlPointPreviousY:e.controlPointNextY,n?i.controlPointNextX:i.controlPointPreviousX,n?i.controlPointNextY:i.controlPointPreviousY,i.x,i.y):t.lineTo(i.x,i.y)}};n.clear=i.clear,n.drawRoundedRectangle=function(t){t.beginPath(),i.roundedRect.apply(i,arguments),t.closePath()}},{42:42}],42:[function(t,e,i){"use strict";var n,c={noop:function(){},uid:(n=0,function(){return n++}),isNullOrUndef:function(t){return null==t},isArray:Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)},isObject:function(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)},valueOrDefault:function(t,e){return void 0===t?e:t},valueAtIndexOrDefault:function(t,e,i){return c.valueOrDefault(c.isArray(t)?t[e]:t,i)},callback:function(t,e,i){if(t&&"function"==typeof t.call)return t.apply(i,e)},each:function(t,e,i,n){var a,s,o;if(c.isArray(t))if(s=t.length,n)for(a=s-1;0<=a;a--)e.call(i,t[a],a);else for(a=0;a<s;a++)e.call(i,t[a],a);else if(c.isObject(t))for(s=(o=Object.keys(t)).length,a=0;a<s;a++)e.call(i,t[o[a]],o[a])},arrayEquals:function(t,e){var i,n,a,s;if(!t||!e||t.length!==e.length)return!1;for(i=0,n=t.length;i<n;++i)if(a=t[i],s=e[i],a instanceof Array&&s instanceof Array){if(!c.arrayEquals(a,s))return!1}else if(a!==s)return!1;return!0},clone:function(t){if(c.isArray(t))return t.map(c.clone);if(c.isObject(t)){for(var e={},i=Object.keys(t),n=i.length,a=0;a<n;++a)e[i[a]]=c.clone(t[i[a]]);return e}return t},_merger:function(t,e,i,n){var a=e[t],s=i[t];c.isObject(a)&&c.isObject(s)?c.merge(a,s,n):e[t]=c.clone(s)},_mergerIf:function(t,e,i){var n=e[t],a=i[t];c.isObject(n)&&c.isObject(a)?c.mergeIf(n,a):e.hasOwnProperty(t)||(e[t]=c.clone(a))},merge:function(t,e,i){var n,a,s,o,r,l=c.isArray(e)?e:[e],d=l.length;if(!c.isObject(t))return t;for(n=(i=i||{}).merger||c._merger,a=0;a<d;++a)if(e=l[a],c.isObject(e))for(r=0,o=(s=Object.keys(e)).length;r<o;++r)n(s[r],t,e,i);return t},mergeIf:function(t,e){return c.merge(t,e,{merger:c._mergerIf})},extend:function(i){for(var t=function(t,e){i[e]=t},e=1,n=arguments.length;e<n;++e)c.each(arguments[e],t);return i},inherits:function(t){var e=this,i=t&&t.hasOwnProperty("constructor")?t.constructor:function(){return e.apply(this,arguments)},n=function(){this.constructor=i};return n.prototype=e.prototype,i.prototype=new n,i.extend=c.inherits,t&&c.extend(i.prototype,t),i.__super__=e.prototype,i}};(e.exports=c).callCallback=c.callback,c.indexOf=function(t,e,i){return Array.prototype.indexOf.call(t,e,i)},c.getValueOrDefault=c.valueOrDefault,c.getValueAtIndexOrDefault=c.valueAtIndexOrDefault},{}],43:[function(t,e,i){"use strict";var n=t(42),a={linear:function(t){return t},easeInQuad:function(t){return t*t},easeOutQuad:function(t){return-t*(t-2)},easeInOutQuad:function(t){return(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1)},easeInCubic:function(t){return t*t*t},easeOutCubic:function(t){return(t-=1)*t*t+1},easeInOutCubic:function(t){return(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},easeInQuart:function(t){return t*t*t*t},easeOutQuart:function(t){return-((t-=1)*t*t*t-1)},easeInOutQuart:function(t){return(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},easeInQuint:function(t){return t*t*t*t*t},easeOutQuint:function(t){return(t-=1)*t*t*t*t+1},easeInOutQuint:function(t){return(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},easeInSine:function(t){return 1-Math.cos(t*(Math.PI/2))},easeOutSine:function(t){return Math.sin(t*(Math.PI/2))},easeInOutSine:function(t){return-.5*(Math.cos(Math.PI*t)-1)},easeInExpo:function(t){return 0===t?0:Math.pow(2,10*(t-1))},easeOutExpo:function(t){return 1===t?1:1-Math.pow(2,-10*t)},easeInOutExpo:function(t){return 0===t?0:1===t?1:(t/=.5)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*--t))},easeInCirc:function(t){return 1<=t?t:-(Math.sqrt(1-t*t)-1)},easeOutCirc:function(t){return Math.sqrt(1-(t-=1)*t)},easeInOutCirc:function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},easeInElastic:function(t){var e=1.70158,i=0,n=1;return 0===t?0:1===t?1:(i||(i=.3),e=n<1?(n=1,i/4):i/(2*Math.PI)*Math.asin(1/n),-n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i))},easeOutElastic:function(t){var e=1.70158,i=0,n=1;return 0===t?0:1===t?1:(i||(i=.3),e=n<1?(n=1,i/4):i/(2*Math.PI)*Math.asin(1/n),n*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/i)+1)},easeInOutElastic:function(t){var e=1.70158,i=0,n=1;return 0===t?0:2==(t/=.5)?1:(i||(i=.45),e=n<1?(n=1,i/4):i/(2*Math.PI)*Math.asin(1/n),t<1?n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i)*-.5:n*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i)*.5+1)},easeInBack:function(t){return t*t*(2.70158*t-1.70158)},easeOutBack:function(t){return(t-=1)*t*(2.70158*t+1.70158)+1},easeInOutBack:function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:function(t){return 1-a.easeOutBounce(1-t)},easeOutBounce:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},easeInOutBounce:function(t){return t<.5?.5*a.easeInBounce(2*t):.5*a.easeOutBounce(2*t-1)+.5}};e.exports={effects:a},n.easingEffects=a},{42:42}],44:[function(t,e,i){"use strict";var o=t(42);e.exports={toLineHeight:function(t,e){var i=(""+t).match(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)#x2F;);if(!i||"normal"===i[1])return 1.2*e;switch(t=+i[2],i[3]){case"px":return t;case"%":t/=100}return e*t},toPadding:function(t){var e,i,n,a;return o.isObject(t)?(e=+t.top||0,i=+t.right||0,n=+t.bottom||0,a=+t.left||0):e=i=n=a=+t||0,{top:e,right:i,bottom:n,left:a,height:e+n,width:a+i}},resolve:function(t,e,i){var n,a,s;for(n=0,a=t.length;n<a;++n)if(void 0!==(s=t[n])&&(void 0!==e&&"function"==typeof s&&(s=s(e)),void 0!==i&&o.isArray(s)&&(s=s[i]),void 0!==s))return s}}},{42:42}],45:[function(t,e,i){"use strict";e.exports=t(42),e.exports.easing=t(43),e.exports.canvas=t(41),e.exports.options=t(44)},{41:41,42:42,43:43,44:44}],46:[function(t,e,i){e.exports={acquireContext:function(t){return t&&t.canvas&&(t=t.canvas),t&&t.getContext("2d")||null}}},{}],47:[function(t,e,i){"use strict";var p=t(45),f="$chartjs",m="chartjs-",g=m+"render-monitor",v=m+"render-animation",b=["animationstart","webkitAnimationStart"],r={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"};function l(t,e){var i=p.getStyle(t,e),n=i&&i.match(/^(\d+)(\.\d+)?px#x2F;);return n?Number(n[1]):void 0}var n=!!function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("e",null,e)}catch(t){}return t}()&&{passive:!0};function y(t,e,i){t.addEventListener(e,i,n)}function o(t,e,i){t.removeEventListener(e,i,n)}function w(t,e,i,n,a){return{type:t,chart:e,native:a||null,x:void 0!==i?i:null,y:void 0!==n?n:null}}function a(e,t,i){var n,a,s,o,r,l,d,c,u=e[f]||(e[f]={}),h=u.resizer=function(t){var e=document.createElement("div"),i=m+"size-monitor",n="position:absolute;left:0;top:0;right:0;bottom:0;overflow:hidden;pointer-events:none;visibility:hidden;z-index:-1;";e.style.cssText=n,e.className=i,e.innerHTML='<div class="'+i+'-expand" style="'+n+'"><div style="position:absolute;width:1000000px;height:1000000px;left:0;top:0"></div></div><div class="'+i+'-shrink" style="'+n+'"><div style="position:absolute;width:200%;height:200%;left:0; top:0"></div></div>';var a=e.childNodes[0],s=e.childNodes[1];e._reset=function(){a.scrollLeft=1e6,a.scrollTop=1e6,s.scrollLeft=1e6,s.scrollTop=1e6};var o=function(){e._reset(),t()};return y(a,"scroll",o.bind(a,"expand")),y(s,"scroll",o.bind(s,"shrink")),e}((s=!(n=function(){if(u.resizer)return t(w("resize",i))}),o=[],function(){o=Array.prototype.slice.call(arguments),a=a||this,s||(s=!0,p.requestAnimFrame.call(window,function(){s=!1,n.apply(a,o)}))}));l=function(){if(u.resizer){var t=e.parentNode;t&&t!==h.parentNode&&t.insertBefore(h,t.firstChild),h._reset()}},d=(r=e)[f]||(r[f]={}),c=d.renderProxy=function(t){t.animationName===v&&l()},p.each(b,function(t){y(r,t,c)}),d.reflow=!!r.offsetParent,r.classList.add(g)}function s(t){var e,i,n,a=t[f]||{},s=a.resizer;delete a.resizer,i=(e=t)[f]||{},(n=i.renderProxy)&&(p.each(b,function(t){o(e,t,n)}),delete i.renderProxy),e.classList.remove(g),s&&s.parentNode&&s.parentNode.removeChild(s)}e.exports={_enabled:"undefined"!=typeof window&&"undefined"!=typeof document,initialize:function(){var t,e,i,n="from{opacity:0.99}to{opacity:1}";e="@-webkit-keyframes "+v+"{"+n+"}@keyframes "+v+"{"+n+"}."+g+"{-webkit-animation:"+v+" 0.001s;animation:"+v+" 0.001s;}",i=(t=this)._style||document.createElement("style"),t._style||(e="/* Chart.js */\n"+e,(t._style=i).setAttribute("type","text/css"),document.getElementsByTagName("head")[0].appendChild(i)),i.appendChild(document.createTextNode(e))},acquireContext:function(t,e){"string"==typeof t?t=document.getElementById(t):t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas);var i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(function(t,e){var i=t.style,n=t.getAttribute("height"),a=t.getAttribute("width");if(t[f]={initial:{height:n,width:a,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",null===a||""===a){var s=l(t,"width");void 0!==s&&(t.width=s)}if(null===n||""===n)if(""===t.style.height)t.height=t.width/(e.options.aspectRatio||2);else{var o=l(t,"height");void 0!==s&&(t.height=o)}}(t,e),i):null},releaseContext:function(t){var i=t.canvas;if(i[f]){var n=i[f].initial;["height","width"].forEach(function(t){var e=n[t];p.isNullOrUndef(e)?i.removeAttribute(t):i.setAttribute(t,e)}),p.each(n.style||{},function(t,e){i.style[e]=t}),i.width=i.width,delete i[f]}},addEventListener:function(s,t,o){var e=s.canvas;if("resize"!==t){var i=o[f]||(o[f]={});y(e,t,(i.proxies||(i.proxies={}))[s.id+"_"+t]=function(t){var e,i,n,a;o((i=s,n=r[(e=t).type]||e.type,a=p.getRelativePosition(e,i),w(n,i,a.x,a.y,e)))})}else a(e,o,s)},removeEventListener:function(t,e,i){var n=t.canvas;if("resize"!==e){var a=((i[f]||{}).proxies||{})[t.id+"_"+e];a&&o(n,e,a)}else s(n)}},p.addEvent=y,p.removeEvent=o},{45:45}],48:[function(t,e,i){"use strict";var n=t(45),a=t(46),s=t(47),o=s._enabled?s:a;e.exports=n.extend({initialize:function(){},acquireContext:function(){},releaseContext:function(){},addEventListener:function(){},removeEventListener:function(){}},o)},{45:45,46:46,47:47}],49:[function(t,e,i){"use strict";var d=t(25),g=t(40),c=t(45);d._set("global",{plugins:{filler:{propagate:!0}}}),e.exports=function(){var h={dataset:function(t){var e=t.fill,i=t.chart,n=i.getDatasetMeta(e),a=n&&i.isDatasetVisible(e)&&n.dataset._children||[],s=a.length||0;return s?function(t,e){return e<s&&a[e]._view||null}:null},boundary:function(t){var e=t.boundary,i=e?e.x:null,n=e?e.y:null;return function(t){return{x:null===i?t.x:i,y:null===n?t.y:n}}}};function p(t,e,i){var n,a=t._model||{},s=a.fill;if(void 0===s&&(s=!!a.backgroundColor),!1===s||null===s)return!1;if(!0===s)return"origin";if(n=parseFloat(s,10),isFinite(n)&&Math.floor(n)===n)return"-"!==s[0]&&"+"!==s[0]||(n=e+n),!(n===e||n<0||i<=n)&&n;switch(s){case"bottom":return"start";case"top":return"end";case"zero":return"origin";case"origin":case"start":case"end":return s;default:return!1}}function f(t){var e,i=t.el._model||{},n=t.el._scale||{},a=t.fill,s=null;if(isFinite(a))return null;if("start"===a?s=void 0===i.scaleBottom?n.bottom:i.scaleBottom:"end"===a?s=void 0===i.scaleTop?n.top:i.scaleTop:void 0!==i.scaleZero?s=i.scaleZero:n.getBasePosition?s=n.getBasePosition():n.getBasePixel&&(s=n.getBasePixel()),null!=s){if(void 0!==s.x&&void 0!==s.y)return s;if("number"==typeof s&&isFinite(s))return{x:(e=n.isHorizontal())?s:null,y:e?null:s}}return null}function m(t,e,i){var n,a=t[e].fill,s=[e];if(!i)return a;for(;!1!==a&&-1===s.indexOf(a);){if(!isFinite(a))return a;if(!(n=t[a]))return!1;if(n.visible)return a;s.push(a),a=n.fill}return!1}function y(t){return t&&!t.skip}function w(t,e,i,n,a){var s;if(n&&a){for(t.moveTo(e[0].x,e[0].y),s=1;s<n;++s)c.canvas.lineTo(t,e[s-1],e[s]);for(t.lineTo(i[a-1].x,i[a-1].y),s=a-1;0<s;--s)c.canvas.lineTo(t,i[s],i[s-1],!0)}}return{id:"filler",afterDatasetsUpdate:function(t,e){var i,n,a,s,o,r,l,d=(t.data.datasets||[]).length,c=e.propagate,u=[];for(n=0;n<d;++n)s=null,(a=(i=t.getDatasetMeta(n)).dataset)&&a._model&&a instanceof g.Line&&(s={visible:t.isDatasetVisible(n),fill:p(a,n,d),chart:t,el:a}),i.$filler=s,u.push(s);for(n=0;n<d;++n)(s=u[n])&&(s.fill=m(u,n,c),s.boundary=f(s),s.mapper=(l=void 0,r=(o=s).fill,!(l="dataset")===r?null:(isFinite(r)||(l="boundary"),h[l](o))))},beforeDatasetDraw:function(t,e){var i=e.meta.$filler;if(i){var n=t.ctx,a=i.el,s=a._view,o=a._children||[],r=i.mapper,l=s.backgroundColor||d.global.defaultColor;r&&l&&o.length&&(c.canvas.clipArea(n,t.chartArea),function(t,e,i,n,a,s){var o,r,l,d,c,u,h,p=e.length,f=n.spanGaps,m=[],g=[],v=0,b=0;for(t.beginPath(),o=0,r=p+!!s;o<r;++o)c=i(d=e[l=o%p]._view,l,n),u=y(d),h=y(c),u&&h?(v=m.push(d),b=g.push(c)):v&&b&&(f?(u&&m.push(d),h&&g.push(c)):(w(t,m,g,v,b),v=b=0,m=[],g=[]));w(t,m,g,v,b),t.closePath(),t.fillStyle=a,t.fill()}(n,o,r,s,l,a._loop),c.canvas.unclipArea(n))}}}}},{25:25,40:40,45:45}],50:[function(t,e,i){"use strict";var A=t(25),o=t(26),M=t(45);A._set("global",{legend:{display:!0,position:"top",fullWidth:!0,reverse:!1,weight:1e3,onClick:function(t,e){var i=e.datasetIndex,n=this.chart,a=n.getDatasetMeta(i);a.hidden=null===a.hidden?!n.data.datasets[i].hidden:null,n.update()},onHover:null,labels:{boxWidth:40,padding:10,generateLabels:function(i){var t=i.data;return M.isArray(t.datasets)?t.datasets.map(function(t,e){return{text:t.label,fillStyle:M.isArray(t.backgroundColor)?t.backgroundColor[0]:t.backgroundColor,hidden:!i.isDatasetVisible(e),lineCap:t.borderCapStyle,lineDash:t.borderDash,lineDashOffset:t.borderDashOffset,lineJoin:t.borderJoinStyle,lineWidth:t.borderWidth,strokeStyle:t.borderColor,pointStyle:t.pointStyle,datasetIndex:e}},this):[]}}},legendCallback:function(t){var e=[];e.push('<ul class="'+t.id+'-legend">');for(var i=0;i<t.data.datasets.length;i++)e.push('<li><span style="background-color:'+t.data.datasets[i].backgroundColor+'"></span>'),t.data.datasets[i].label&&e.push(t.data.datasets[i].label),e.push("</li>");return e.push("</ul>"),e.join("")}}),e.exports=function(n){var a=n.layoutService,t=M.noop;function P(t,e){return t.usePointStyle?e*Math.SQRT2:t.boxWidth}function s(t,e){var i=new n.Legend({ctx:t.ctx,options:e,chart:t});a.configure(t,i,e),a.addBox(t,i),t.legend=i}return n.Legend=o.extend({initialize:function(t){M.extend(this,t),this.legendHitBoxes=[],this.doughnutMode=!1},beforeUpdate:t,update:function(t,e,i){var n=this;return n.beforeUpdate(),n.maxWidth=t,n.maxHeight=e,n.margins=i,n.beforeSetDimensions(),n.setDimensions(),n.afterSetDimensions(),n.beforeBuildLabels(),n.buildLabels(),n.afterBuildLabels(),n.beforeFit(),n.fit(),n.afterFit(),n.afterUpdate(),n.minSize},afterUpdate:t,beforeSetDimensions:t,setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0,t.minSize={width:0,height:0}},afterSetDimensions:t,beforeBuildLabels:t,buildLabels:function(){var e=this,i=e.options.labels||{},t=M.callback(i.generateLabels,[e.chart],e)||[];i.filter&&(t=t.filter(function(t){return i.filter(t,e.chart.data)})),e.options.reverse&&t.reverse(),e.legendItems=t},afterBuildLabels:t,beforeFit:t,fit:function(){var n=this,t=n.options,a=t.labels,e=t.display,s=n.ctx,i=A.global,o=M.valueOrDefault,r=o(a.fontSize,i.defaultFontSize),l=o(a.fontStyle,i.defaultFontStyle),d=o(a.fontFamily,i.defaultFontFamily),c=M.fontString(r,l,d),u=n.legendHitBoxes=[],h=n.minSize,p=n.isHorizontal();if(h.height=p?(h.width=n.maxWidth,e?10:0):(h.width=e?10:0,n.maxHeight),e)if(s.font=c,p){var f=n.lineWidths=[0],m=n.legendItems.length?r+a.padding:0;s.textAlign="left",s.textBaseline="top",M.each(n.legendItems,function(t,e){var i=P(a,r)+r/2+s.measureText(t.text).width;f[f.length-1]+i+a.padding>=n.width&&(m+=r+a.padding,f[f.length]=n.left),u[e]={left:0,top:0,width:i,height:r},f[f.length-1]+=i+a.padding}),h.height+=m}else{var g=a.padding,v=n.columnWidths=[],b=a.padding,y=0,w=0,x=r+g;M.each(n.legendItems,function(t,e){var i=P(a,r)+r/2+s.measureText(t.text).width;w+x>h.height&&(b+=y+a.padding,v.push(y),w=y=0),y=Math.max(y,i),w+=x,u[e]={left:0,top:0,width:i,height:r}}),b+=y,v.push(y),h.width+=b}n.width=h.width,n.height=h.height},afterFit:t,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var u=this,h=u.options,p=h.labels,f=A.global,m=f.elements.line,g=u.width,v=u.lineWidths;if(h.display){var b,y=u.ctx,w=M.valueOrDefault,t=w(p.fontColor,f.defaultFontColor),x=w(p.fontSize,f.defaultFontSize),e=w(p.fontStyle,f.defaultFontStyle),i=w(p.fontFamily,f.defaultFontFamily),n=M.fontString(x,e,i);y.textAlign="left",y.textBaseline="middle",y.lineWidth=.5,y.strokeStyle=t,y.fillStyle=t,y.font=n;var k=P(p,x),C=u.legendHitBoxes,_=u.isHorizontal();b=_?{x:u.left+(g-v[0])/2,y:u.top+p.padding,line:0}:{x:u.left+p.padding,y:u.top+p.padding,line:0};var S=x+p.padding;M.each(u.legendItems,function(t,e){var i,n,a,s,o,r=y.measureText(t.text).width,l=k+x/2+r,d=b.x,c=b.y;_?g<=d+l&&(c=b.y+=S,b.line++,d=b.x=u.left+(g-v[b.line])/2):c+S>u.bottom&&(d=b.x=d+u.columnWidths[b.line]+p.padding,c=b.y=u.top+p.padding,b.line++),function(t,e,i){if(!(isNaN(k)||k<=0)){y.save(),y.fillStyle=w(i.fillStyle,f.defaultColor),y.lineCap=w(i.lineCap,m.borderCapStyle),y.lineDashOffset=w(i.lineDashOffset,m.borderDashOffset),y.lineJoin=w(i.lineJoin,m.borderJoinStyle),y.lineWidth=w(i.lineWidth,m.borderWidth),y.strokeStyle=w(i.strokeStyle,f.defaultColor);var n=0===w(i.lineWidth,m.borderWidth);if(y.setLineDash&&y.setLineDash(w(i.lineDash,m.borderDash)),h.labels&&h.labels.usePointStyle){var a=x*Math.SQRT2/2,s=a/Math.SQRT2,o=t+s,r=e+s;M.canvas.drawPoint(y,i.pointStyle,a,o,r)}else n||y.strokeRect(t,e,k,x),y.fillRect(t,e,k,x);y.restore()}}(d,c,t),C[e].left=d,C[e].top=c,i=t,n=r,s=k+(a=x/2)+d,o=c+a,y.fillText(i.text,s,o),i.hidden&&(y.beginPath(),y.lineWidth=2,y.moveTo(s,o),y.lineTo(s+n,o),y.stroke()),_?b.x+=l+p.padding:b.y+=S})}},handleEvent:function(t){var e=this,i=e.options,n="mouseup"===t.type?"click":t.type,a=!1;if("mousemove"===n){if(!i.onHover)return}else{if("click"!==n)return;if(!i.onClick)return}var s=t.x,o=t.y;if(s>=e.left&&s<=e.right&&o>=e.top&&o<=e.bottom)for(var r=e.legendHitBoxes,l=0;l<r.length;++l){var d=r[l];if(s>=d.left&&s<=d.left+d.width&&o>=d.top&&o<=d.top+d.height){if("click"===n){i.onClick.call(e,t.native,e.legendItems[l]),a=!0;break}if("mousemove"===n){i.onHover.call(e,t.native,e.legendItems[l]),a=!0;break}}}return a}}),{id:"legend",beforeInit:function(t){var e=t.options.legend;e&&s(t,e)},beforeUpdate:function(t){var e=t.options.legend,i=t.legend;e?(M.mergeIf(e,A.global.legend),i?(a.configure(t,i,e),i.options=e):s(t,e)):i&&(a.removeBox(t,i),delete t.legend)},afterEvent:function(t,e){var i=t.legend;i&&i.handleEvent(e)}}}},{25:25,26:26,45:45}],51:[function(t,e,i){"use strict";var x=t(25),o=t(26),k=t(45);x._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,lineHeight:1.2,padding:10,position:"top",text:"",weight:2e3}}),e.exports=function(n){var a=n.layoutService,t=k.noop;function s(t,e){var i=new n.Title({ctx:t.ctx,options:e,chart:t});a.configure(t,i,e),a.addBox(t,i),t.titleBlock=i}return n.Title=o.extend({initialize:function(t){k.extend(this,t),this.legendHitBoxes=[]},beforeUpdate:t,update:function(t,e,i){var n=this;return n.beforeUpdate(),n.maxWidth=t,n.maxHeight=e,n.margins=i,n.beforeSetDimensions(),n.setDimensions(),n.afterSetDimensions(),n.beforeBuildLabels(),n.buildLabels(),n.afterBuildLabels(),n.beforeFit(),n.fit(),n.afterFit(),n.afterUpdate(),n.minSize},afterUpdate:t,beforeSetDimensions:t,setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0,t.minSize={width:0,height:0}},afterSetDimensions:t,beforeBuildLabels:t,buildLabels:t,afterBuildLabels:t,beforeFit:t,fit:function(){var t=k.valueOrDefault,e=this.options,i=e.display,n=t(e.fontSize,x.global.defaultFontSize),a=this.minSize,s=k.isArray(e.text)?e.text.length:1,o=k.options.toLineHeight(e.lineHeight,n),r=i?s*o+2*e.padding:0;this.isHorizontal()?(a.width=this.maxWidth,a.height=r):(a.width=r,a.height=this.maxHeight),this.width=a.width,this.height=a.height},afterFit:t,isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},draw:function(){var t=this.ctx,e=k.valueOrDefault,i=this.options,n=x.global;if(i.display){var a,s,o,r=e(i.fontSize,n.defaultFontSize),l=e(i.fontStyle,n.defaultFontStyle),d=e(i.fontFamily,n.defaultFontFamily),c=k.fontString(r,l,d),u=k.options.toLineHeight(i.lineHeight,r),h=u/2+i.padding,p=0,f=this.top,m=this.left,g=this.bottom,v=this.right;t.fillStyle=e(i.fontColor,n.defaultFontColor),t.font=c,this.isHorizontal()?(s=m+(v-m)/2,o=f+h,a=v-m):(s="left"===i.position?m+h:v-h,o=f+(g-f)/2,a=g-f,p=Math.PI*("left"===i.position?-.5:.5)),t.save(),t.translate(s,o),t.rotate(p),t.textAlign="center",t.textBaseline="middle";var b=i.text;if(k.isArray(b))for(var y=0,w=0;w<b.length;++w)t.fillText(b[w],0,y,a),y+=u;else t.fillText(b,0,0,a);t.restore()}}}),{id:"title",beforeInit:function(t){var e=t.options.title;e&&s(t,e)},beforeUpdate:function(t){var e=t.options.title,i=t.titleBlock;e?(k.mergeIf(e,x.global.title),i?(a.configure(t,i,e),i.options=e):s(t,e)):i&&(n.layoutService.removeBox(t,i),delete t.titleBlock)}}}},{25:25,26:26,45:45}],52:[function(t,e,i){"use strict";e.exports=function(t){var e=t.Scale.extend({getLabels:function(){var t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels},determineDataLimits:function(){var t,e=this,i=e.getLabels();e.minIndex=0,e.maxIndex=i.length-1,void 0!==e.options.ticks.min&&(t=i.indexOf(e.options.ticks.min),e.minIndex=-1!==t?t:e.minIndex),void 0!==e.options.ticks.max&&(t=i.indexOf(e.options.ticks.max),e.maxIndex=-1!==t?t:e.maxIndex),e.min=i[e.minIndex],e.max=i[e.maxIndex]},buildTicks:function(){var t=this.getLabels();this.ticks=0===this.minIndex&&this.maxIndex===t.length-1?t:t.slice(this.minIndex,this.maxIndex+1)},getLabelForIndex:function(t,e){var i=this.chart.data,n=this.isHorizontal();return i.yLabels&&!n?this.getRightValue(i.datasets[e].data[t]):this.ticks[t-this.minIndex]},getPixelForValue:function(t,e){var i,n=this,a=n.options.offset,s=Math.max(n.maxIndex+1-n.minIndex-(a?0:1),1);if(null!=t&&(i=n.isHorizontal()?t.x:t.y),void 0!==i||void 0!==t&&isNaN(e)){t=i||t;var o=n.getLabels().indexOf(t);e=-1!==o?o:e}if(n.isHorizontal()){var r=n.width/s,l=r*(e-n.minIndex);return a&&(l+=r/2),n.left+Math.round(l)}var d=n.height/s,c=d*(e-n.minIndex);return a&&(c+=d/2),n.top+Math.round(c)},getPixelForTick:function(t){return this.getPixelForValue(this.ticks[t],t+this.minIndex,null)},getValueForPixel:function(t){var e=this.options.offset,i=Math.max(this._ticks.length-(e?0:1),1),n=this.isHorizontal(),a=(n?this.width:this.height)/i;return t-=n?this.left:this.top,e&&(t-=a/2),(t<=0?0:Math.round(t/a))+this.minIndex},getBasePixel:function(){return this.bottom}});t.scaleService.registerScaleType("category",e,{position:"bottom"})}},{}],53:[function(t,e,i){"use strict";var n=t(25),u=t(45),a=t(34);e.exports=function(t){var e={position:"left",ticks:{callback:a.formatters.linear}},i=t.LinearScaleBase.extend({determineDataLimits:function(){var o=this,r=o.options,l=o.chart,t=l.data.datasets,e=o.isHorizontal();function d(t){return e?t.xAxisID===o.id:t.yAxisID===o.id}o.min=null,o.max=null;var n=r.stacked;if(void 0===n&&u.each(t,function(t,e){if(!n){var i=l.getDatasetMeta(e);l.isDatasetVisible(e)&&d(i)&&void 0!==i.stack&&(n=!0)}}),r.stacked||n){var c={};u.each(t,function(t,e){var n=l.getDatasetMeta(e),i=[n.type,void 0===r.stacked&&void 0===n.stack?e:"",n.stack].join(".");void 0===c[i]&&(c[i]={positiveValues:[],negativeValues:[]});var a=c[i].positiveValues,s=c[i].negativeValues;l.isDatasetVisible(e)&&d(n)&&u.each(t.data,function(t,e){var i=+o.getRightValue(t);isNaN(i)||n.data[e].hidden||(a[e]=a[e]||0,s[e]=s[e]||0,r.relativePoints?a[e]=100:i<0?s[e]+=i:a[e]+=i)})}),u.each(c,function(t){var e=t.positiveValues.concat(t.negativeValues),i=u.min(e),n=u.max(e);o.min=null===o.min?i:Math.min(o.min,i),o.max=null===o.max?n:Math.max(o.max,n)})}else u.each(t,function(t,e){var n=l.getDatasetMeta(e);l.isDatasetVisible(e)&&d(n)&&u.each(t.data,function(t,e){var i=+o.getRightValue(t);isNaN(i)||n.data[e].hidden||(null===o.min?o.min=i:i<o.min&&(o.min=i),null===o.max?o.max=i:i>o.max&&(o.max=i))})});o.min=isFinite(o.min)&&!isNaN(o.min)?o.min:0,o.max=isFinite(o.max)&&!isNaN(o.max)?o.max:1,this.handleTickRangeOptions()},getTickLimit:function(){var t,e=this.options.ticks;if(this.isHorizontal())t=Math.min(e.maxTicksLimit?e.maxTicksLimit:11,Math.ceil(this.width/50));else{var i=u.valueOrDefault(e.fontSize,n.global.defaultFontSize);t=Math.min(e.maxTicksLimit?e.maxTicksLimit:11,Math.ceil(this.height/(2*i)))}return t},handleDirectionalChanges:function(){this.isHorizontal()||this.ticks.reverse()},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},getPixelForValue:function(t){var e,i=this.start,n=+this.getRightValue(t),a=this.end-i;return e=this.isHorizontal()?this.left+this.width/a*(n-i):this.bottom-this.height/a*(n-i),Math.round(e)},getValueForPixel:function(t){var e=this.isHorizontal(),i=e?this.width:this.height,n=(e?t-this.left:this.bottom-t)/i;return this.start+(this.end-this.start)*n},getPixelForTick:function(t){return this.getPixelForValue(this.ticksAsNumbers[t])}});t.scaleService.registerScaleType("linear",i,e)}},{25:25,34:34,45:45}],54:[function(t,e,i){"use strict";var o=t(45),s=t(34);e.exports=function(e){var t=o.noop;e.LinearScaleBase=e.Scale.extend({getRightValue:function(t){return"string"==typeof t?+t:e.Scale.prototype.getRightValue.call(this,t)},handleTickRangeOptions:function(){var t=this,e=t.options.ticks;if(e.beginAtZero){var i=o.sign(t.min),n=o.sign(t.max);i<0&&n<0?t.max=0:0<i&&0<n&&(t.min=0)}var a=void 0!==e.min||void 0!==e.suggestedMin,s=void 0!==e.max||void 0!==e.suggestedMax;void 0!==e.min?t.min=e.min:void 0!==e.suggestedMin&&(null===t.min?t.min=e.suggestedMin:t.min=Math.min(t.min,e.suggestedMin)),void 0!==e.max?t.max=e.max:void 0!==e.suggestedMax&&(null===t.max?t.max=e.suggestedMax:t.max=Math.max(t.max,e.suggestedMax)),a!==s&&t.min>=t.max&&(a?t.max=t.min+1:t.min=t.max-1),t.min===t.max&&(t.max++,e.beginAtZero||t.min--)},getTickLimit:t,handleDirectionalChanges:t,buildTicks:function(){var t=this,e=t.options.ticks,i=t.getTickLimit(),n={maxTicks:i=Math.max(2,i),min:e.min,max:e.max,stepSize:o.valueOrDefault(e.fixedStepSize,e.stepSize)},a=t.ticks=s.generators.linear(n,t);t.handleDirectionalChanges(),t.max=o.max(a),t.min=o.min(a),e.reverse?(a.reverse(),t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max)},convertTicksToLabels:function(){this.ticksAsNumbers=this.ticks.slice(),this.zeroLineIndex=this.ticks.indexOf(0),e.Scale.prototype.convertTicksToLabels.call(this)}})}},{34:34,45:45}],55:[function(t,e,i){"use strict";var u=t(45),a=t(34);e.exports=function(t){var e={position:"left",ticks:{callback:a.formatters.logarithmic}},i=t.Scale.extend({determineDataLimits:function(){var o=this,r=o.options,t=r.ticks,l=o.chart,e=l.data.datasets,i=u.valueOrDefault,n=o.isHorizontal();function d(t){return n?t.xAxisID===o.id:t.yAxisID===o.id}o.min=null,o.max=null,o.minNotZero=null;var a=r.stacked;if(void 0===a&&u.each(e,function(t,e){if(!a){var i=l.getDatasetMeta(e);l.isDatasetVisible(e)&&d(i)&&void 0!==i.stack&&(a=!0)}}),r.stacked||a){var c={};u.each(e,function(t,e){var a=l.getDatasetMeta(e),s=[a.type,void 0===r.stacked&&void 0===a.stack?e:"",a.stack].join(".");l.isDatasetVisible(e)&&d(a)&&(void 0===c[s]&&(c[s]=[]),u.each(t.data,function(t,e){var i=c[s],n=+o.getRightValue(t);isNaN(n)||a.data[e].hidden||(i[e]=i[e]||0,r.relativePoints?i[e]=100:i[e]+=n)}))}),u.each(c,function(t){var e=u.min(t),i=u.max(t);o.min=null===o.min?e:Math.min(o.min,e),o.max=null===o.max?i:Math.max(o.max,i)})}else u.each(e,function(t,e){var n=l.getDatasetMeta(e);l.isDatasetVisible(e)&&d(n)&&u.each(t.data,function(t,e){var i=+o.getRightValue(t);isNaN(i)||n.data[e].hidden||(null===o.min?o.min=i:i<o.min&&(o.min=i),null===o.max?o.max=i:i>o.max&&(o.max=i),0!==i&&(null===o.minNotZero||i<o.minNotZero)&&(o.minNotZero=i))})});o.min=i(t.min,o.min),o.max=i(t.max,o.max),o.min===o.max&&(0!==o.min&&null!==o.min?(o.min=Math.pow(10,Math.floor(u.log10(o.min))-1),o.max=Math.pow(10,Math.floor(u.log10(o.max))+1)):(o.min=1,o.max=10))},buildTicks:function(){var t=this,e=t.options.ticks,i={min:e.min,max:e.max},n=t.ticks=a.generators.logarithmic(i,t);t.isHorizontal()||n.reverse(),t.max=u.max(n),t.min=u.min(n),e.reverse?(n.reverse(),t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max)},convertTicksToLabels:function(){this.tickValues=this.ticks.slice(),t.Scale.prototype.convertTicksToLabels.call(this)},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},getPixelForTick:function(t){return this.getPixelForValue(this.tickValues[t])},getPixelForValue:function(t){var e,i,n=this,a=n.start,s=+n.getRightValue(t),o=n.options.ticks;return n.isHorizontal()?(i=u.log10(n.end)-u.log10(a),0===s?n.left:(e=n.width,n.left+e/i*(u.log10(s)-u.log10(a)))):(e=n.height,0!==a||o.reverse?0===n.end&&o.reverse?(i=u.log10(n.start)-u.log10(n.minNotZero),s===n.end?n.top:s===n.minNotZero?n.top+.02*e:n.top+.02*e+.98*e/i*(u.log10(s)-u.log10(n.minNotZero))):0===s?o.reverse?n.top:n.bottom:(i=u.log10(n.end)-u.log10(a),e=n.height,n.bottom-e/i*(u.log10(s)-u.log10(a))):(i=u.log10(n.end)-u.log10(n.minNotZero),s===a?n.bottom:s===n.minNotZero?n.bottom-.02*e:n.bottom-.02*e-.98*e/i*(u.log10(s)-u.log10(n.minNotZero))))},getValueForPixel:function(t){var e,i=u.log10(this.end)-u.log10(this.start);return this.isHorizontal()?(e=this.width,this.start*Math.pow(10,(t-this.left)*i/e)):(e=this.height,Math.pow(10,(this.bottom-t)*i/e)/this.start)}});t.scaleService.registerScaleType("logarithmic",i,e)}},{34:34,45:45}],56:[function(t,e,i){"use strict";var n=t(25),k=t(45),a=t(34);e.exports=function(t){var b=n.global,e={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,color:"rgba(0, 0, 0, 0.1)",lineWidth:1},gridLines:{circular:!1},ticks:{showLabelBackdrop:!0,backdropColor:"rgba(255,255,255,0.75)",backdropPaddingY:2,backdropPaddingX:2,callback:a.formatters.linear},pointLabels:{display:!0,fontSize:10,callback:function(t){return t}}};function y(t){var e=t.options;return e.angleLines.display||e.pointLabels.display?t.chart.data.labels.length:0}function w(t){var e=t.options.pointLabels,i=k.valueOrDefault(e.fontSize,b.defaultFontSize),n=k.valueOrDefault(e.fontStyle,b.defaultFontStyle),a=k.valueOrDefault(e.fontFamily,b.defaultFontFamily);return{size:i,style:n,family:a,font:k.fontString(i,n,a)}}function g(t,e,i,n,a){return t===n||t===a?{start:e-i/2,end:e+i/2}:t<n||a<t?{start:e-i-5,end:e}:{start:e,end:e+i+5}}function x(t,e,i,n){if(k.isArray(e))for(var a=i.y,s=1.5*n,o=0;o<e.length;++o)t.fillText(e[o],i.x,a),a+=s;else t.fillText(e,i.x,i.y)}function r(t){return k.isNumber(t)?t:0}var i=t.LinearScaleBase.extend({setDimensions:function(){var t=this,e=t.options,i=e.ticks;t.width=t.maxWidth,t.height=t.maxHeight,t.xCenter=Math.round(t.width/2),t.yCenter=Math.round(t.height/2);var n=k.min([t.height,t.width]),a=k.valueOrDefault(i.fontSize,b.defaultFontSize);t.drawingArea=e.display?n/2-(a/2+i.backdropPaddingY):n/2},determineDataLimits:function(){var a=this,i=a.chart,s=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY;k.each(i.data.datasets,function(t,e){if(i.isDatasetVisible(e)){var n=i.getDatasetMeta(e);k.each(t.data,function(t,e){var i=+a.getRightValue(t);isNaN(i)||n.data[e].hidden||(s=Math.min(i,s),o=Math.max(i,o))})}}),a.min=s===Number.POSITIVE_INFINITY?0:s,a.max=o===Number.NEGATIVE_INFINITY?0:o,a.handleTickRangeOptions()},getTickLimit:function(){var t=this.options.ticks,e=k.valueOrDefault(t.fontSize,b.defaultFontSize);return Math.min(t.maxTicksLimit?t.maxTicksLimit:11,Math.ceil(this.drawingArea/(1.5*e)))},convertTicksToLabels:function(){t.LinearScaleBase.prototype.convertTicksToLabels.call(this),this.pointLabels=this.chart.data.labels.map(this.options.pointLabels.callback,this)},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},fit:function(){var t,e;this.options.pointLabels.display?function(t){var e,i,n,a=w(t),s=Math.min(t.height/2,t.width/2),o={r:t.width,l:0,t:t.height,b:0},r={};t.ctx.font=a.font,t._pointLabelSizes=[];var l,d,c,u=y(t);for(e=0;e<u;e++){n=t.getPointPosition(e,s),l=t.ctx,d=a.size,c=t.pointLabels[e]||"",i=k.isArray(c)?{w:k.longestText(l,l.font,c),h:c.length*d+1.5*(c.length-1)*d}:{w:l.measureText(c).width,h:d},t._pointLabelSizes[e]=i;var h=t.getIndexAngle(e),p=k.toDegrees(h)%360,f=g(p,n.x,i.w,0,180),m=g(p,n.y,i.h,90,270);f.start<o.l&&(o.l=f.start,r.l=h),f.end>o.r&&(o.r=f.end,r.r=h),m.start<o.t&&(o.t=m.start,r.t=h),m.end>o.b&&(o.b=m.end,r.b=h)}t.setReductions(s,o,r)}(this):(t=this,e=Math.min(t.height/2,t.width/2),t.drawingArea=Math.round(e),t.setCenterPoint(0,0,0,0))},setReductions:function(t,e,i){var n=e.l/Math.sin(i.l),a=Math.max(e.r-this.width,0)/Math.sin(i.r),s=-e.t/Math.cos(i.t),o=-Math.max(e.b-this.height,0)/Math.cos(i.b);n=r(n),a=r(a),s=r(s),o=r(o),this.drawingArea=Math.min(Math.round(t-(n+a)/2),Math.round(t-(s+o)/2)),this.setCenterPoint(n,a,s,o)},setCenterPoint:function(t,e,i,n){var a=this,s=a.width-e-a.drawingArea,o=t+a.drawingArea,r=i+a.drawingArea,l=a.height-n-a.drawingArea;a.xCenter=Math.round((o+s)/2+a.left),a.yCenter=Math.round((r+l)/2+a.top)},getIndexAngle:function(t){return t*(2*Math.PI/y(this))+(this.chart.options&&this.chart.options.startAngle?this.chart.options.startAngle:0)*Math.PI*2/360},getDistanceFromCenterForValue:function(t){if(null===t)return 0;var e=this.drawingArea/(this.max-this.min);return this.options.ticks.reverse?(this.max-t)*e:(t-this.min)*e},getPointPosition:function(t,e){var i=this.getIndexAngle(t)-Math.PI/2;return{x:Math.round(Math.cos(i)*e)+this.xCenter,y:Math.round(Math.sin(i)*e)+this.yCenter}},getPointPositionForValue:function(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))},getBasePosition:function(){var t=this.min,e=this.max;return this.getPointPositionForValue(0,this.beginAtZero?0:t<0&&e<0?e:0<t&&0<e?t:0)},draw:function(){var s=this,t=s.options,o=t.gridLines,r=t.ticks,l=k.valueOrDefault;if(t.display){var d=s.ctx,c=this.getIndexAngle(0),u=l(r.fontSize,b.defaultFontSize),e=l(r.fontStyle,b.defaultFontStyle),i=l(r.fontFamily,b.defaultFontFamily),h=k.fontString(u,e,i);k.each(s.ticks,function(t,e){if(0<e||r.reverse){var i=s.getDistanceFromCenterForValue(s.ticksAsNumbers[e]);if(o.display&&0!==e&&function(t,e,i,n){var a=t.ctx;if(a.strokeStyle=k.valueAtIndexOrDefault(e.color,n-1),a.lineWidth=k.valueAtIndexOrDefault(e.lineWidth,n-1),t.options.gridLines.circular)a.beginPath(),a.arc(t.xCenter,t.yCenter,i,0,2*Math.PI),a.closePath(),a.stroke();else{var s=y(t);if(0===s)return;a.beginPath();var o=t.getPointPosition(0,i);a.moveTo(o.x,o.y);for(var r=1;r<s;r++)o=t.getPointPosition(r,i),a.lineTo(o.x,o.y);a.closePath(),a.stroke()}}(s,o,i,e),r.display){var n=l(r.fontColor,b.defaultFontColor);if(d.font=h,d.save(),d.translate(s.xCenter,s.yCenter),d.rotate(c),r.showLabelBackdrop){var a=d.measureText(t).width;d.fillStyle=r.backdropColor,d.fillRect(-a/2-r.backdropPaddingX,-i-u/2-r.backdropPaddingY,a+2*r.backdropPaddingX,u+2*r.backdropPaddingY)}d.textAlign="center",d.textBaseline="middle",d.fillStyle=n,d.fillText(t,0,-i),d.restore()}}}),(t.angleLines.display||t.pointLabels.display)&&function(t){var e=t.ctx,i=k.valueOrDefault,n=t.options,a=n.angleLines,s=n.pointLabels;e.lineWidth=a.lineWidth,e.strokeStyle=a.color;var o,r,l,d,c=t.getDistanceFromCenterForValue(n.ticks.reverse?t.min:t.max),u=w(t);e.textBaseline="top";for(var h=y(t)-1;0<=h;h--){if(a.display){var p=t.getPointPosition(h,c);e.beginPath(),e.moveTo(t.xCenter,t.yCenter),e.lineTo(p.x,p.y),e.stroke(),e.closePath()}if(s.display){var f=t.getPointPosition(h,c+5),m=i(s.fontColor,b.defaultFontColor);e.font=u.font,e.fillStyle=m;var g=t.getIndexAngle(h),v=k.toDegrees(g);e.textAlign=0===(d=v)||180===d?"center":d<180?"left":"right",o=v,r=t._pointLabelSizes[h],l=f,90===o||270===o?l.y-=r.h/2:(270<o||o<90)&&(l.y-=r.h),x(e,t.pointLabels[h]||"",f,u.size)}}}(s)}}});t.scaleService.registerScaleType("radialLinear",i,e)}},{25:25,34:34,45:45}],57:[function(t,e,i){"use strict";var y=t(1);y="function"==typeof y?y:window.moment;var o=t(25),g=t(45),f=Number.MIN_SAFE_INTEGER||-9007199254740991,m=Number.MAX_SAFE_INTEGER||9007199254740991,w={millisecond:{common:!0,size:1,steps:[1,2,5,10,20,50,100,250,500]},second:{common:!0,size:1e3,steps:[1,2,5,10,30]},minute:{common:!0,size:6e4,steps:[1,2,5,10,30]},hour:{common:!0,size:36e5,steps:[1,2,3,6,12]},day:{common:!0,size:864e5,steps:[1,2,5]},week:{common:!1,size:6048e5,steps:[1,2,3,4]},month:{common:!0,size:2628e6,steps:[1,2,3]},quarter:{common:!1,size:7884e6,steps:[1,2,3,4]},year:{common:!0,size:3154e7}},x=Object.keys(w);function v(t,e){return t-e}function b(t){var e,i,n,a={},s=[];for(e=0,i=t.length;e<i;++e)a[n=t[e]]||(a[n]=!0,s.push(n));return s}function k(t,e,i,n){var a=function(t,e,i){for(var n,a,s,o=0,r=t.length-1;0<=o&&o<=r;){if(a=t[(n=o+r>>1)-1]||null,s=t[n],!a)return{lo:null,hi:s};if(s[e]<i)o=n+1;else{if(!(a[e]>i))return{lo:a,hi:s};r=n-1}}return{lo:s,hi:null}}(t,e,i),s=a.lo?a.hi?a.lo:t[t.length-2]:t[0],o=a.lo?a.hi?a.hi:t[t.length-1]:t[1],r=o[e]-s[e],l=r?(i-s[e])/r:0,d=(o[n]-s[n])*l;return s[n]+d}function r(t,e){var i=e.parser,n=e.parser||e.format;return"function"==typeof i?i(t):"string"==typeof t&&"string"==typeof n?y(t,n):(t instanceof y||(t=y(t)),t.isValid()?t:"function"==typeof n?n(t):t)}function C(t,e){if(g.isNullOrUndef(t))return null;var i=e.options.time,n=r(e.getRightValue(t),i);return n.isValid()?(i.round&&n.startOf(i.round),n.valueOf()):null}function _(t){for(var e=x.indexOf(t)+1,i=x.length;e<i;++e)if(w[x[e]].common)return x[e]}function S(t,e,i,n){var a,s=n.time,o=s.unit||function(t,e,i,n){var a,s,o,r=x.length;for(a=x.indexOf(t);a<r-1;++a)if(o=(s=w[x[a]]).steps?s.steps[s.steps.length-1]:m,s.common&&Math.ceil((i-e)/(o*s.size))<=n)return x[a];return x[r-1]}(s.minUnit,t,e,i),r=_(o),l=g.valueOrDefault(s.stepSize,s.unitStepSize),d="week"===o&&s.isoWeekday,c=n.ticks.major.enabled,u=w[o],h=y(t),p=y(e),f=[];for(l||(l=function(t,e,i,n){var a,s,o,r=e-t,l=w[i],d=l.size,c=l.steps;if(!c)return Math.ceil(r/((n||1)*d));for(a=0,s=c.length;a<s&&(o=c[a],!(Math.ceil(r/(d*o))<=n));++a);return o}(t,e,o,i)),d&&(h=h.isoWeekday(d),p=p.isoWeekday(d)),h=h.startOf(d?"day":o),(p=p.startOf(d?"day":o))<e&&p.add(1,o),a=y(h),c&&r&&!d&&!s.round&&(a.startOf(r),a.add(~~((h-a)/(u.size*l))*l,o));a<p;a.add(l,o))f.push(+a);return f.push(+a),f}e.exports=function(e){var t=e.Scale.extend({initialize:function(){if(!y)throw new Error("Chart.js - Moment.js could not be found! You must include it before Chart.js to use the time scale. Download at https://momentjs.com");this.mergeTicksOptions(),e.Scale.prototype.initialize.call(this)},update:function(){var t=this.options;return t.time&&t.time.format&&console.warn("options.time.format is deprecated and replaced by options.time.parser."),e.Scale.prototype.update.apply(this,arguments)},getRightValue:function(t){return t&&void 0!==t.t&&(t=t.t),e.Scale.prototype.getRightValue.call(this,t)},determineDataLimits:function(){var t,e,i,n,a,s,o=this,r=o.chart,l=o.options.time,d=m,c=f,u=[],h=[],p=[];for(t=0,i=r.data.labels.length;t<i;++t)p.push(C(r.data.labels[t],o));for(t=0,i=(r.data.datasets||[]).length;t<i;++t)if(r.isDatasetVisible(t))if(a=r.data.datasets[t].data,g.isObject(a[0]))for(h[t]=[],e=0,n=a.length;e<n;++e)s=C(a[e],o),u.push(s),h[t][e]=s;else u.push.apply(u,p),h[t]=p.slice(0);else h[t]=[];p.length&&(p=b(p).sort(v),d=Math.min(d,p[0]),c=Math.max(c,p[p.length-1])),u.length&&(u=b(u).sort(v),d=Math.min(d,u[0]),c=Math.max(c,u[u.length-1])),d=C(l.min,o)||d,c=C(l.max,o)||c,d=d===m?+y().startOf("day"):d,c=c===f?+y().endOf("day")+1:c,o.min=Math.min(d,c),o.max=Math.max(d+1,c),o._horizontal=o.isHorizontal(),o._table=[],o._timestamps={data:u,datasets:h,labels:p}},buildTicks:function(){var t,e,i,n,a,s,o,r,l,d,c,u,h=this,p=h.min,f=h.max,m=h.options,g=m.time,v=[],b=[];switch(m.ticks.source){case"data":v=h._timestamps.data;break;case"labels":v=h._timestamps.labels;break;case"auto":default:v=S(p,f,h.getLabelCapacity(p),m)}for("ticks"===m.bounds&&v.length&&(p=v[0],f=v[v.length-1]),p=C(g.min,h)||p,f=C(g.max,h)||f,t=0,e=v.length;t<e;++t)p<=(i=v[t])&&i<=f&&b.push(i);return h.min=p,h.max=f,h._unit=g.unit||function(t,e,i,n){var a,s,o=y.duration(y(n).diff(y(i)));for(a=x.length-1;a>=x.indexOf(e);a--)if(s=x[a],w[s].common&&o.as(s)>=t.length)return s;return x[e?x.indexOf(e):0]}(b,g.minUnit,h.min,h.max),h._majorUnit=_(h._unit),h._table=function(t,e,i,n){if("linear"===n||!t.length)return[{time:e,pos:0},{time:i,pos:1}];var a,s,o,r,l,d=[],c=[e];for(a=0,s=t.length;a<s;++a)e<(r=t[a])&&r<i&&c.push(r);for(c.push(i),a=0,s=c.length;a<s;++a)l=c[a+1],o=c[a-1],r=c[a],void 0!==o&&void 0!==l&&Math.round((l+o)/2)===r||d.push({time:r,pos:a/(s-1)});return d}(h._timestamps.data,p,f,m.distribution),h._offsets=(n=h._table,a=b,s=p,o=f,u=c=0,(r=m).offset&&a.length&&(r.time.min||(l=1<a.length?a[1]:o,d=a[0],c=(k(n,"time",l,"pos")-k(n,"time",d,"pos"))/2),r.time.max||(l=a[a.length-1],d=1<a.length?a[a.length-2]:s,u=(k(n,"time",l,"pos")-k(n,"time",d,"pos"))/2)),{left:c,right:u}),function(t,e){var i,n,a,s,o=[];for(i=0,n=t.length;i<n;++i)a=t[i],s=!!e&&a===+y(a).startOf(e),o.push({value:a,major:s});return o}(b,h._majorUnit)},getLabelForIndex:function(t,e){var i=this.chart.data,n=this.options.time,a=i.labels&&t<i.labels.length?i.labels[t]:"",s=i.datasets[e].data[t];return g.isObject(s)&&(a=this.getRightValue(s)),n.tooltipFormat&&(a=r(a,n).format(n.tooltipFormat)),a},tickFormatFunction:function(t,e,i,n){var a=this.options,s=t.valueOf(),o=a.time.displayFormats,r=o[this._unit],l=this._majorUnit,d=o[l],c=t.clone().startOf(l).valueOf(),u=a.ticks.major,h=u.enabled&&l&&d&&s===c,p=t.format(n||(h?d:r)),f=h?u:a.ticks.minor,m=g.valueOrDefault(f.callback,f.userCallback);return m?m(p,e,i):p},convertTicksToLabels:function(t){var e,i,n=[];for(e=0,i=t.length;e<i;++e)n.push(this.tickFormatFunction(y(t[e].value),e,t));return n},getPixelForOffset:function(t){var e=this,i=e._horizontal?e.width:e.height,n=e._horizontal?e.left:e.top,a=k(e._table,"time",t,"pos");return n+i*(e._offsets.left+a)/(e._offsets.left+1+e._offsets.right)},getPixelForValue:function(t,e,i){var n=null;if(void 0!==e&&void 0!==i&&(n=this._timestamps.datasets[i][e]),null===n&&(n=C(t,this)),null!==n)return this.getPixelForOffset(n)},getPixelForTick:function(t){var e=this.getTicks();return 0<=t&&t<e.length?this.getPixelForOffset(e[t].value):null},getValueForPixel:function(t){var e=this,i=e._horizontal?e.width:e.height,n=e._horizontal?e.left:e.top,a=(i?(t-n)/i:0)*(e._offsets.left+1+e._offsets.left)-e._offsets.right,s=k(e._table,"pos",a,"time");return y(s)},getLabelWidth:function(t){var e=this.options.ticks,i=this.ctx.measureText(t).width,n=g.toRadians(e.maxRotation),a=Math.cos(n),s=Math.sin(n);return i*a+g.valueOrDefault(e.fontSize,o.global.defaultFontSize)*s},getLabelCapacity:function(t){var e=this.options.time.displayFormats.millisecond,i=this.tickFormatFunction(y(t),0,[],e),n=this.getLabelWidth(i),a=this.isHorizontal()?this.width:this.height;return Math.floor(a/n)}});e.scaleService.registerScaleType("time",t,{position:"bottom",distribution:"linear",bounds:"data",time:{parser:!1,format:!1,unit:!1,round:!1,displayFormat:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{millisecond:"h:mm:ss.SSS a",second:"h:mm:ss a",minute:"h:mm a",hour:"hA",day:"MMM D",week:"ll",month:"MMM YYYY",quarter:"[Q]Q - YYYY",year:"YYYY"}},ticks:{autoSkip:!1,source:"auto",major:{enabled:!1}}})}},{1:1,25:25,45:45}]},{},[7])(7)}),function(w){var x="iCheck",k=x+"-helper",C="checkbox",_="radio",S="checked",p="un"+S,P="disabled",f="determinate",A="in"+f,M="update",D="type",T="click",I="touchbegin.i touchend.i",E="addClass",L="removeClass",O="trigger",F="label",m="cursor",B=/ipad|iphone|ipod|android|blackberry|windows phone|opera mini|silk/i.test(navigator.userAgent);function R(t,e,i){var n=t[0],a=/er/.test(i)?A:/bl/.test(i)?P:S,s=i==M?{checked:n[S],disabled:n[P],indeterminate:"true"==t.attr(A)||"false"==t.attr(f)}:n[a];if(/^(ch|di|in)/.test(i)&&!s)$(t,a);else if(/^(un|en|de)/.test(i)&&s)N(t,a);else if(i==M)for(var o in s)s[o]?$(t,o,!0):N(t,o,!0);else e&&"toggle"!=i||(e||t[O]("ifClicked"),s?n[D]!==_&&N(t,a):$(t,a))}function $(t,e,i){var n=t[0],a=t.parent(),s=e==S,o=e==A,r=e==P,l=o?f:s?p:"enabled",d=g(t,l+v(n[D])),c=g(t,e+v(n[D]));if(!0!==n[e]){if(!i&&e==S&&n[D]==_&&n.name){var u=t.closest("form"),h='input[name="'+n.name+'"]';(h=u.length?u.find(h):w(h)).each(function(){this!==n&&w(this).data(x)&&N(w(this),e)})}o?(n[e]=!0,n[S]&&N(t,S,"force")):(i||(n[e]=!0),s&&n[A]&&N(t,A,!1)),b(t,s,e,i)}n[P]&&g(t,m,!0)&&a.find("."+k).css(m,"default"),a[E](c||g(t,e)||""),a.attr("role")&&!o&&a.attr("aria-"+(r?P:S),"true"),a[L](d||g(t,l)||"")}function N(t,e,i){var n=t[0],a=t.parent(),s=e==S,o=e==A,r=e==P,l=o?f:s?p:"enabled",d=g(t,l+v(n[D])),c=g(t,e+v(n[D]));!1!==n[e]&&(!o&&i&&"force"!=i||(n[e]=!1),b(t,s,l,i)),!n[P]&&g(t,m,!0)&&a.find("."+k).css(m,"pointer"),a[L](c||g(t,e)||""),a.attr("role")&&!o&&a.attr("aria-"+(r?P:S),"false"),a[E](d||g(t,l)||"")}function z(t,e){t.data(x)&&(t.parent().html(t.attr("style",t.data(x).s||"")),e&&t[O](e),t.off(".i").unwrap(),w(F+'[for="'+t[0].id+'"]').add(t.closest(F)).off(".i"))}function g(t,e,i){if(t.data(x))return t.data(x).o[e+(i?"":"Class")]}function v(t){return t.charAt(0).toUpperCase()+t.slice(1)}function b(t,e,i,n){n||(e&&t[O]("ifToggled"),t[O]("ifChanged")[O]("if"+v(i)))}w.fn[x]=function(e,i){var n='input[type="'+C+'"], input[type="'+_+'"]',a=w(),t=function(t){t.each(function(){var t=w(this);a=t.is(n)?a.add(t):a.add(t.find(n))})};if(/^(check|uncheck|toggle|indeterminate|determinate|disable|enable|update|destroy)#x2F;i.test(e))return e=e.toLowerCase(),t(this),a.each(function(){var t=w(this);"destroy"==e?z(t,"ifDestroyed"):R(t,!0,e),w.isFunction(i)&&i()});if("object"!=typeof e&&e)return this;var p=w.extend({checkedClass:S,disabledClass:P,indeterminateClass:A,labelHover:!0},e),s=p.handle,f=p.hoverClass||"hover",m=p.focusClass||"focus",g=p.activeClass||"active",v=!!p.labelHover,b=p.labelHoverClass||"hover",y=0|(""+p.increaseArea).replace("%","");return s!=C&&s!=_||(n='input[type="'+s+'"]'),y<-50&&(y=-50),t(this),a.each(function(){var n=w(this);z(n);var t,a=this,e=a.id,i=-y+"%",s=100+2*y+"%",o={position:"absolute",top:i,left:i,display:"block",width:s,height:s,margin:0,padding:0,background:"#fff",border:0,opacity:0},r=B?{position:"absolute",visibility:"hidden"}:y?o:{position:"absolute",opacity:0},l=a[D]==C?p.checkboxClass||"i"+C:p.radioClass||"i"+_,d=w(F+'[for="'+e+'"]').add(n.closest(F)),c=!!p.aria,u=x+"-"+Math.random().toString(36).substr(2,6),h='<div class="'+l+'" '+(c?'role="'+a[D]+'" ':"");c&&d.each(function(){h+='aria-labelledby="',this.id?h+=this.id:(this.id=u,h+=u),h+='"'}),h=n.wrap(h+"/>")[O]("ifCreated").parent().append(p.insert),t=w('<ins class="'+k+'"/>').css(o).appendTo(h),n.data(x,{o:p,s:n.attr("style")}).css(r),p.inheritClass&&h[E](a.className||""),p.inheritID&&e&&h.attr("id",x+"-"+e),"static"==h.css("position")&&h.css("position","relative"),R(n,!0,M),d.length&&d.on(T+".i mouseover.i mouseout.i "+I,function(t){var e=t[D],i=w(this);if(!a[P]){if(e==T){if(w(t.target).is("a"))return;R(n,!1,!0)}else v&&(/ut|nd/.test(e)?(h[L](f),i[L](b)):(h[E](f),i[E](b)));if(!B)return!1;t.stopPropagation()}}),n.on(T+".i focus.i blur.i keyup.i keydown.i keypress.i",function(t){var e=t[D],i=t.keyCode;return e!=T&&("keydown"==e&&32==i?(a[D]==_&&a[S]||(a[S]?N(n,S):$(n,S)),!1):void("keyup"==e&&a[D]==_?!a[S]&&$(n,S):/us|ur/.test(e)&&h["blur"==e?L:E](m)))}),t.on(T+" mousedown mouseup mouseover mouseout "+I,function(t){var e=t[D],i=/wn|up/.test(e)?g:f;if(!a[P]){if(e==T?R(n,!1,!0):(/wn|er|in/.test(e)?h[E](i):h[L](i+" "+g),d.length&&v&&i==f&&d[/ut|nd/.test(e)?L:E](b)),!B)return!1;t.stopPropagation()}})})}}(window.jQuery||window.Zepto),function(x){x.flexslider=function(p,t){var f=x(p);f.vars=x.extend({},x.flexslider.defaults,t);var e,c=f.vars.namespace,m=window.navigator&&window.navigator.msPointerEnabled&&window.MSGesture,u=("ontouchstart"in window||m||window.DocumentTouch&&document instanceof DocumentTouch)&&f.vars.touch,o="click touchend MSPointerUp keyup",r="",g="vertical"===f.vars.direction,v=f.vars.reverse,b=0<f.vars.itemWidth,y="fade"===f.vars.animation,h=""!==f.vars.asNavFor,w={};x.data(p,"flexslider",f),w={init:function(){f.animating=!1,f.currentSlide=parseInt(f.vars.startAt?f.vars.startAt:0,10),isNaN(f.currentSlide)&&(f.currentSlide=0),f.animatingTo=f.currentSlide,f.atEnd=0===f.currentSlide||f.currentSlide===f.last,f.containerSelector=f.vars.selector.substr(0,f.vars.selector.search(" ")),f.slides=x(f.vars.selector,f),f.container=x(f.containerSelector,f),f.count=f.slides.length,f.syncExists=0<x(f.vars.sync).length,"slide"===f.vars.animation&&(f.vars.animation="swing"),f.prop=g?"top":"marginLeft",f.args={},f.manualPause=!1,f.stopped=!1,f.started=!1,f.startTimeout=null,f.transitions=!f.vars.video&&!y&&f.vars.useCSS&&function(){var t=document.createElement("div"),e=["perspectiveProperty","WebkitPerspective","MozPerspective","OPerspective","msPerspective"];for(var i in e)if(void 0!==t.style[e[i]])return f.pfx=e[i].replace("Perspective","").toLowerCase(),f.prop="-"+f.pfx+"-transform",!0;return!1}(),(f.ensureAnimationEnd="")!==f.vars.controlsContainer&&(f.controlsContainer=0<x(f.vars.controlsContainer).length&&x(f.vars.controlsContainer)),""!==f.vars.manualControls&&(f.manualControls=0<x(f.vars.manualControls).length&&x(f.vars.manualControls)),f.vars.randomize&&(f.slides.sort(function(){return Math.round(Math.random())-.5}),f.container.empty().append(f.slides)),f.doMath(),f.setup("init"),f.vars.controlNav&&w.controlNav.setup(),f.vars.directionNav&&w.directionNav.setup(),f.vars.keyboard&&(1===x(f.containerSelector).length||f.vars.multipleKeyboard)&&x(document).bind("keyup",function(t){var e=t.keyCode;if(!f.animating&&(39===e||37===e)){var i=39===e?f.getTarget("next"):37===e&&f.getTarget("prev");f.flexAnimate(i,f.vars.pauseOnAction)}}),f.vars.mousewheel&&f.bind("mousewheel",function(t,e,i,n){t.preventDefault();var a=e<0?f.getTarget("next"):f.getTarget("prev");f.flexAnimate(a,f.vars.pauseOnAction)}),f.vars.pausePlay&&w.pausePlay.setup(),f.vars.slideshow&&f.vars.pauseInvisible&&w.pauseInvisible.init(),f.vars.slideshow&&(f.vars.pauseOnHover&&f.hover(function(){f.manualPlay||f.manualPause||f.pause()},function(){f.manualPause||f.manualPlay||f.stopped||f.play()}),f.vars.pauseInvisible&&w.pauseInvisible.isHidden()||(0<f.vars.initDelay?f.startTimeout=setTimeout(f.play,f.vars.initDelay):f.play())),h&&w.asNav.setup(),u&&f.vars.touch&&w.touch(),(!y||y&&f.vars.smoothHeight)&&x(window).bind("resize orientationchange focus",w.resize),f.find("img").attr("draggable","false"),setTimeout(function(){f.vars.start(f)},200)},asNav:{setup:function(){f.asNav=!0,f.animatingTo=Math.floor(f.currentSlide/f.move),f.currentItem=f.currentSlide,f.slides.removeClass(c+"active-slide").eq(f.currentItem).addClass(c+"active-slide"),m?(p._slider=f).slides.each(function(){this._gesture=new MSGesture,(this._gesture.target=this).addEventListener("MSPointerDown",function(t){t.preventDefault(),t.currentTarget._gesture&&t.currentTarget._gesture.addPointer(t.pointerId)},!1),this.addEventListener("MSGestureTap",function(t){t.preventDefault();var e=x(this),i=e.index();x(f.vars.asNavFor).data("flexslider").animating||e.hasClass("active")||(f.direction=f.currentItem<i?"next":"prev",f.flexAnimate(i,f.vars.pauseOnAction,!1,!0,!0))})}):f.slides.on(o,function(t){t.preventDefault();var e=x(this),i=e.index();e.offset().left-x(f).scrollLeft()<=0&&e.hasClass(c+"active-slide")?f.flexAnimate(f.getTarget("prev"),!0):x(f.vars.asNavFor).data("flexslider").animating||e.hasClass(c+"active-slide")||(f.direction=f.currentItem<i?"next":"prev",f.flexAnimate(i,f.vars.pauseOnAction,!1,!0,!0))})}},controlNav:{setup:function(){f.manualControls?w.controlNav.setupManual():w.controlNav.setupPaging()},setupPaging:function(){var t,e,i="thumbnails"===f.vars.controlNav?"control-thumbs":"control-paging",n=1;if(f.controlNavScaffold=x('<ol class="'+c+"control-nav "+c+i+'"></ol>'),1<f.pagingCount)for(var a=0;a<f.pagingCount;a++){if(e=f.slides.eq(a),t="thumbnails"===f.vars.controlNav?'<img src="'+e.attr("data-thumb")+'"/>':"<a>"+n+"</a>","thumbnails"===f.vars.controlNav&&!0===f.vars.thumbCaptions){var s=e.attr("data-thumbcaption");""!=s&&null!=s&&(t+='<span class="'+c+'caption">'+s+"</span>")}f.controlNavScaffold.append("<li>"+t+"</li>"),n++}f.controlsContainer?x(f.controlsContainer).append(f.controlNavScaffold):f.append(f.controlNavScaffold),w.controlNav.set(),w.controlNav.active(),f.controlNavScaffold.delegate("a, img",o,function(t){if(t.preventDefault(),""===r||r===t.type){var e=x(this),i=f.controlNav.index(e);e.hasClass(c+"active")||(f.direction=i>f.currentSlide?"next":"prev",f.flexAnimate(i,f.vars.pauseOnAction))}""===r&&(r=t.type),w.setToClearWatchedEvent()})},setupManual:function(){f.controlNav=f.manualControls,w.controlNav.active(),f.controlNav.bind(o,function(t){if(t.preventDefault(),""===r||r===t.type){var e=x(this),i=f.controlNav.index(e);e.hasClass(c+"active")||(i>f.currentSlide?f.direction="next":f.direction="prev",f.flexAnimate(i,f.vars.pauseOnAction))}""===r&&(r=t.type),w.setToClearWatchedEvent()})},set:function(){var t="thumbnails"===f.vars.controlNav?"img":"a";f.controlNav=x("."+c+"control-nav li "+t,f.controlsContainer?f.controlsContainer:f)},active:function(){f.controlNav.removeClass(c+"active").eq(f.animatingTo).addClass(c+"active")},update:function(t,e){1<f.pagingCount&&"add"===t?f.controlNavScaffold.append(x("<li><a>"+f.count+"</a></li>")):1===f.pagingCount?f.controlNavScaffold.find("li").remove():f.controlNav.eq(e).closest("li").remove(),w.controlNav.set(),1<f.pagingCount&&f.pagingCount!==f.controlNav.length?f.update(e,t):w.controlNav.active()}},directionNav:{setup:function(){var t=x('<ul class="'+c+'direction-nav"><li><a class="'+c+'prev" href="#">'+f.vars.prevText+'</a></li><li><a class="'+c+'next" href="#">'+f.vars.nextText+"</a></li></ul>");f.controlsContainer?(x(f.controlsContainer).append(t),f.directionNav=x("."+c+"direction-nav li a",f.controlsContainer)):(f.append(t),f.directionNav=x("."+c+"direction-nav li a",f)),w.directionNav.update(),f.directionNav.bind(o,function(t){var e;t.preventDefault(),""!==r&&r!==t.type||(e=x(this).hasClass(c+"next")?f.getTarget("next"):f.getTarget("prev"),f.flexAnimate(e,f.vars.pauseOnAction)),""===r&&(r=t.type),w.setToClearWatchedEvent()})},update:function(){var t=c+"disabled";1===f.pagingCount?f.directionNav.addClass(t).attr("tabindex","-1"):f.vars.animationLoop?f.directionNav.removeClass(t).removeAttr("tabindex"):0===f.animatingTo?f.directionNav.removeClass(t).filter("."+c+"prev").addClass(t).attr("tabindex","-1"):f.animatingTo===f.last?f.directionNav.removeClass(t).filter("."+c+"next").addClass(t).attr("tabindex","-1"):f.directionNav.removeClass(t).removeAttr("tabindex")}},pausePlay:{setup:function(){var t=x('<div class="'+c+'pauseplay"><a></a></div>');f.controlsContainer?(f.controlsContainer.append(t),f.pausePlay=x("."+c+"pauseplay a",f.controlsContainer)):(f.append(t),f.pausePlay=x("."+c+"pauseplay a",f)),w.pausePlay.update(f.vars.slideshow?c+"pause":c+"play"),f.pausePlay.bind(o,function(t){t.preventDefault(),""!==r&&r!==t.type||(x(this).hasClass(c+"pause")?(f.manualPause=!0,f.manualPlay=!1,f.pause()):(f.manualPause=!1,f.manualPlay=!0,f.play())),""===r&&(r=t.type),w.setToClearWatchedEvent()})},update:function(t){"play"===t?f.pausePlay.removeClass(c+"pause").addClass(c+"play").html(f.vars.playText):f.pausePlay.removeClass(c+"play").addClass(c+"pause").html(f.vars.pauseText)}},touch:function(){var a,s,o,r,l,d,c=!1,e=0,i=0,u=0;if(m){p.style.msTouchAction="none",p._gesture=new MSGesture,(p._gesture.target=p).addEventListener("MSPointerDown",function(t){t.stopPropagation(),f.animating?t.preventDefault():(f.pause(),p._gesture.addPointer(t.pointerId),u=0,r=g?f.h:f.w,d=Number(new Date),o=b&&v&&f.animatingTo===f.last?0:b&&v?f.limit-(f.itemW+f.vars.itemMargin)*f.move*f.animatingTo:b&&f.currentSlide===f.last?f.limit:b?(f.itemW+f.vars.itemMargin)*f.move*f.currentSlide:v?(f.last-f.currentSlide+f.cloneOffset)*r:(f.currentSlide+f.cloneOffset)*r)},!1),p._slider=f,p.addEventListener("MSGestureChange",function(t){t.stopPropagation();var e=t.target._slider;if(!e)return;var i=-t.translationX,n=-t.translationY;if(l=u+=g?n:i,c=g?Math.abs(u)<Math.abs(-i):Math.abs(u)<Math.abs(-n),t.detail===t.MSGESTURE_FLAG_INERTIA)return void setImmediate(function(){p._gesture.stop()});(!c||500<Number(new Date)-d)&&(t.preventDefault(),!y&&e.transitions&&(e.vars.animationLoop||(l=u/(0===e.currentSlide&&u<0||e.currentSlide===e.last&&0<u?Math.abs(u)/r+2:1)),e.setProps(o+l,"setTouch")))},!1),p.addEventListener("MSGestureEnd",function(t){t.stopPropagation();var e=t.target._slider;if(!e)return;if(e.animatingTo===e.currentSlide&&!c&&null!==l){var i=v?-l:l,n=0<i?e.getTarget("next"):e.getTarget("prev");e.canAdvance(n)&&(Number(new Date)-d<550&&50<Math.abs(i)||Math.abs(i)>r/2)?e.flexAnimate(n,e.vars.pauseOnAction):y||e.flexAnimate(e.currentSlide,e.vars.pauseOnAction,!0)}o=l=s=a=null,u=0},!1)}else{function n(t){e=t.touches[0].pageX,i=t.touches[0].pageY,l=g?a-i:a-e;(!(c=g?Math.abs(l)<Math.abs(e-s):Math.abs(l)<Math.abs(i-s))||500<Number(new Date)-d)&&(t.preventDefault(),!y&&f.transitions&&(f.vars.animationLoop||(l/=0===f.currentSlide&&l<0||f.currentSlide===f.last&&0<l?Math.abs(l)/r+2:1),f.setProps(o+l,"setTouch")))}function h(t){if(p.removeEventListener("touchmove",n,!1),f.animatingTo===f.currentSlide&&!c&&null!==l){var e=v?-l:l,i=0<e?f.getTarget("next"):f.getTarget("prev");f.canAdvance(i)&&(Number(new Date)-d<550&&50<Math.abs(e)||Math.abs(e)>r/2)?f.flexAnimate(i,f.vars.pauseOnAction):y||f.flexAnimate(f.currentSlide,f.vars.pauseOnAction,!0)}p.removeEventListener("touchend",h,!1),o=l=s=a=null}p.addEventListener("touchstart",function(t){f.animating?t.preventDefault():(window.navigator.msPointerEnabled||1===t.touches.length)&&(f.pause(),r=g?f.h:f.w,d=Number(new Date),e=t.touches[0].pageX,i=t.touches[0].pageY,o=b&&v&&f.animatingTo===f.last?0:b&&v?f.limit-(f.itemW+f.vars.itemMargin)*f.move*f.animatingTo:b&&f.currentSlide===f.last?f.limit:b?(f.itemW+f.vars.itemMargin)*f.move*f.currentSlide:v?(f.last-f.currentSlide+f.cloneOffset)*r:(f.currentSlide+f.cloneOffset)*r,a=g?i:e,s=g?e:i,p.addEventListener("touchmove",n,!1),p.addEventListener("touchend",h,!1))},!1)}},resize:function(){!f.animating&&f.is(":visible")&&(b||f.doMath(),y?w.smoothHeight():b?(f.slides.width(f.computedW),f.update(f.pagingCount),f.setProps()):g?(f.viewport.height(f.h),f.setProps(f.h,"setTotal")):(f.vars.smoothHeight&&w.smoothHeight(),f.newSlides.width(f.computedW),f.setProps(f.computedW,"setTotal")))},smoothHeight:function(t){if(!g||y){var e=y?f:f.viewport;t?e.animate({height:f.slides.eq(f.animatingTo).height()},t):e.height(f.slides.eq(f.animatingTo).height())}},sync:function(t){var e=x(f.vars.sync).data("flexslider"),i=f.animatingTo;switch(t){case"animate":e.flexAnimate(i,f.vars.pauseOnAction,!1,!0);break;case"play":e.playing||e.asNav||e.play();break;case"pause":e.pause()}},uniqueID:function(t){return t.filter("[id]").add(t.find("[id]")).each(function(){var t=x(this);t.attr("id",t.attr("id")+"_clone")}),t},pauseInvisible:{visProp:null,init:function(){var t=["webkit","moz","ms","o"];if("hidden"in document)return"hidden";for(var e=0;e<t.length;e++)t[e]+"Hidden"in document&&(w.pauseInvisible.visProp=t[e]+"Hidden");if(w.pauseInvisible.visProp){var i=w.pauseInvisible.visProp.replace(/[H|h]idden/,"")+"visibilitychange";document.addEventListener(i,function(){w.pauseInvisible.isHidden()?f.startTimeout?clearTimeout(f.startTimeout):f.pause():f.started?f.play():0<f.vars.initDelay?setTimeout(f.play,f.vars.initDelay):f.play()})}},isHidden:function(){return document[w.pauseInvisible.visProp]||!1}},setToClearWatchedEvent:function(){clearTimeout(e),e=setTimeout(function(){r=""},3e3)}},f.flexAnimate=function(t,e,i,n,a){if(f.vars.animationLoop||t===f.currentSlide||(f.direction=t>f.currentSlide?"next":"prev"),h&&1===f.pagingCount&&(f.direction=f.currentItem<t?"next":"prev"),!f.animating&&(f.canAdvance(t,a)||i)&&f.is(":visible")){if(h&&n){var s=x(f.vars.asNavFor).data("flexslider");if(f.atEnd=0===t||t===f.count-1,s.flexAnimate(t,!0,!1,!0,a),f.direction=f.currentItem<t?"next":"prev",s.direction=f.direction,Math.ceil((t+1)/f.visible)-1===f.currentSlide||0===t)return f.currentItem=t,f.slides.removeClass(c+"active-slide").eq(t).addClass(c+"active-slide"),!1;f.currentItem=t,f.slides.removeClass(c+"active-slide").eq(t).addClass(c+"active-slide"),t=Math.floor(t/f.visible)}if(f.animating=!0,f.animatingTo=t,e&&f.pause(),f.vars.before(f),f.syncExists&&!a&&w.sync("animate"),f.vars.controlNav&&w.controlNav.active(),b||f.slides.removeClass(c+"active-slide").eq(t).addClass(c+"active-slide"),f.atEnd=0===t||t===f.last,f.vars.directionNav&&w.directionNav.update(),t===f.last&&(f.vars.end(f),f.vars.animationLoop||f.pause()),y)u?(f.slides.eq(f.currentSlide).css({opacity:0,zIndex:1}),f.slides.eq(t).css({opacity:1,zIndex:2}),f.wrapup(d)):(f.slides.eq(f.currentSlide).css({zIndex:1}).animate({opacity:0},f.vars.animationSpeed,f.vars.easing),f.slides.eq(t).css({zIndex:2}).animate({opacity:1},f.vars.animationSpeed,f.vars.easing,f.wrapup));else{var o,r,l,d=g?f.slides.filter(":first").height():f.computedW;r=b?(o=f.vars.itemMargin,(l=(f.itemW+o)*f.move*f.animatingTo)>f.limit&&1!==f.visible?f.limit:l):0===f.currentSlide&&t===f.count-1&&f.vars.animationLoop&&"next"!==f.direction?v?(f.count+f.cloneOffset)*d:0:f.currentSlide===f.last&&0===t&&f.vars.animationLoop&&"prev"!==f.direction?v?0:(f.count+1)*d:v?(f.count-1-t+f.cloneOffset)*d:(t+f.cloneOffset)*d,f.setProps(r,"",f.vars.animationSpeed),f.transitions?(f.vars.animationLoop&&f.atEnd||(f.animating=!1,f.currentSlide=f.animatingTo),f.container.unbind("webkitTransitionEnd transitionend"),f.container.bind("webkitTransitionEnd transitionend",function(){clearTimeout(f.ensureAnimationEnd),f.wrapup(d)}),clearTimeout(f.ensureAnimationEnd),f.ensureAnimationEnd=setTimeout(function(){f.wrapup(d)},f.vars.animationSpeed+100)):f.container.animate(f.args,f.vars.animationSpeed,f.vars.easing,function(){f.wrapup(d)})}f.vars.smoothHeight&&w.smoothHeight(f.vars.animationSpeed)}},f.wrapup=function(t){y||b||(0===f.currentSlide&&f.animatingTo===f.last&&f.vars.animationLoop?f.setProps(t,"jumpEnd"):f.currentSlide===f.last&&0===f.animatingTo&&f.vars.animationLoop&&f.setProps(t,"jumpStart")),f.animating=!1,f.currentSlide=f.animatingTo,f.vars.after(f)},f.animateSlides=function(){f.animating||f.flexAnimate(f.getTarget("next"))},f.pause=function(){clearInterval(f.animatedSlides),f.animatedSlides=null,f.playing=!1,f.vars.pausePlay&&w.pausePlay.update("play"),f.syncExists&&w.sync("pause")},f.play=function(){f.playing&&clearInterval(f.animatedSlides),f.animatedSlides=f.animatedSlides||setInterval(f.animateSlides,f.vars.slideshowSpeed),f.started=f.playing=!0,f.vars.pausePlay&&w.pausePlay.update("pause"),f.syncExists&&w.sync("play")},f.stop=function(){f.pause(),f.stopped=!0},f.canAdvance=function(t,e){var i=h?f.pagingCount-1:f.last;return!!e||(!(!h||f.currentItem!==f.count-1||0!==t||"prev"!==f.direction)||(!h||0!==f.currentItem||t!==f.pagingCount-1||"next"===f.direction)&&(!(t===f.currentSlide&&!h)&&(!!f.vars.animationLoop||(!f.atEnd||0!==f.currentSlide||t!==i||"next"===f.direction)&&(!f.atEnd||f.currentSlide!==i||0!==t||"next"!==f.direction))))},f.getTarget=function(t){return"next"===(f.direction=t)?f.currentSlide===f.last?0:f.currentSlide+1:0===f.currentSlide?f.last:f.currentSlide-1},f.setProps=function(t,e,i){var n,a=(n=t||(f.itemW+f.vars.itemMargin)*f.move*f.animatingTo,-1*function(){if(b)return"setTouch"===e?t:v&&f.animatingTo===f.last?0:v?f.limit-(f.itemW+f.vars.itemMargin)*f.move*f.animatingTo:f.animatingTo===f.last?f.limit:n;switch(e){case"setTotal":return v?(f.count-1-f.currentSlide+f.cloneOffset)*t:(f.currentSlide+f.cloneOffset)*t;case"setTouch":return t;case"jumpEnd":return v?t:f.count*t;case"jumpStart":return v?f.count*t:t;default:return t}}()+"px");f.transitions&&(a=g?"translate3d(0,"+a+",0)":"translate3d("+a+",0,0)",i=void 0!==i?i/1e3+"s":"0s",f.container.css("-"+f.pfx+"-transition-duration",i),f.container.css("transition-duration",i)),f.args[f.prop]=a,(f.transitions||void 0===i)&&f.container.css(f.args),f.container.css("transform",a)},f.setup=function(t){var e,i;y?(f.slides.css({width:"100%",float:"left",marginRight:"-100%",position:"relative"}),"init"===t&&(u?f.slides.css({opacity:0,display:"block",webkitTransition:"opacity "+f.vars.animationSpeed/1e3+"s ease",zIndex:1}).eq(f.currentSlide).css({opacity:1,zIndex:2}):0==f.vars.fadeFirstSlide?f.slides.css({opacity:0,display:"block",zIndex:1}).eq(f.currentSlide).css({zIndex:2}).css({opacity:1}):f.slides.css({opacity:0,display:"block",zIndex:1}).eq(f.currentSlide).css({zIndex:2}).animate({opacity:1},f.vars.animationSpeed,f.vars.easing)),f.vars.smoothHeight&&w.smoothHeight()):("init"===t&&(f.viewport=x('<div class="'+c+'viewport"></div>').css({overflow:"hidden",position:"relative"}).appendTo(f).append(f.container),f.cloneCount=0,f.cloneOffset=0,v&&(i=x.makeArray(f.slides).reverse(),f.slides=x(i),f.container.empty().append(f.slides))),f.vars.animationLoop&&!b&&(f.cloneCount=2,f.cloneOffset=1,"init"!==t&&f.container.find(".clone").remove(),f.container.append(w.uniqueID(f.slides.first().clone().addClass("clone")).attr("aria-hidden","true")).prepend(w.uniqueID(f.slides.last().clone().addClass("clone")).attr("aria-hidden","true"))),f.newSlides=x(f.vars.selector,f),e=v?f.count-1-f.currentSlide+f.cloneOffset:f.currentSlide+f.cloneOffset,g&&!b?(f.container.height(200*(f.count+f.cloneCount)+"%").css("position","absolute").width("100%"),setTimeout(function(){f.newSlides.css({display:"block"}),f.doMath(),f.viewport.height(f.h),f.setProps(e*f.h,"init")},"init"===t?100:0)):(f.container.width(200*(f.count+f.cloneCount)+"%"),f.setProps(e*f.computedW,"init"),setTimeout(function(){f.doMath(),f.newSlides.css({width:f.computedW,float:"left",display:"block"}),f.vars.smoothHeight&&w.smoothHeight()},"init"===t?100:0)));b||f.slides.removeClass(c+"active-slide").eq(f.currentSlide).addClass(c+"active-slide"),f.vars.init(f)},f.doMath=function(){var t=f.slides.first(),e=f.vars.itemMargin,i=f.vars.minItems,n=f.vars.maxItems;f.w=void 0===f.viewport?f.width():f.viewport.width(),f.h=t.height(),f.boxPadding=t.outerWidth()-t.width(),b?(f.itemT=f.vars.itemWidth+e,f.minW=i?i*f.itemT:f.w,f.maxW=n?n*f.itemT-e:f.w,f.itemW=f.minW>f.w?(f.w-e*(i-1))/i:f.maxW<f.w?(f.w-e*(n-1))/n:f.vars.itemWidth>f.w?f.w:f.vars.itemWidth,f.visible=Math.floor(f.w/f.itemW),f.move=0<f.vars.move&&f.vars.move<f.visible?f.vars.move:f.visible,f.pagingCount=Math.ceil((f.count-f.visible)/f.move+1),f.last=f.pagingCount-1,f.limit=1===f.pagingCount?0:f.vars.itemWidth>f.w?f.itemW*(f.count-1)+e*(f.count-1):(f.itemW+e)*f.count-f.w-e):(f.itemW=f.w,f.pagingCount=f.count,f.last=f.count-1),f.computedW=f.itemW-f.boxPadding},f.update=function(t,e){f.doMath(),b||(t<f.currentSlide?f.currentSlide+=1:t<=f.currentSlide&&0!==t&&(f.currentSlide-=1),f.animatingTo=f.currentSlide),f.vars.controlNav&&!f.manualControls&&("add"===e&&!b||f.pagingCount>f.controlNav.length?w.controlNav.update("add"):("remove"===e&&!b||f.pagingCount<f.controlNav.length)&&(b&&f.currentSlide>f.last&&(f.currentSlide-=1,f.animatingTo-=1),w.controlNav.update("remove",f.last))),f.vars.directionNav&&w.directionNav.update()},f.addSlide=function(t,e){var i=x(t);f.count+=1,f.last=f.count-1,g&&v?void 0!==e?f.slides.eq(f.count-e).after(i):f.container.prepend(i):void 0!==e?f.slides.eq(e).before(i):f.container.append(i),f.update(e,"add"),f.slides=x(f.vars.selector+":not(.clone)",f),f.setup(),f.vars.added(f)},f.removeSlide=function(t){var e=isNaN(t)?f.slides.index(x(t)):t;f.count-=1,f.last=f.count-1,isNaN(t)?x(t,f.slides).remove():g&&v?f.slides.eq(f.last).remove():f.slides.eq(t).remove(),f.doMath(),f.update(e,"remove"),f.slides=x(f.vars.selector+":not(.clone)",f),f.setup(),f.vars.removed(f)},w.init()},x(window).blur(function(t){focused=!1}).focus(function(t){focused=!0}),x.flexslider.defaults={namespace:"flex-",selector:".slides > li",animation:"fade",easing:"swing",direction:"horizontal",reverse:!1,animationLoop:!0,smoothHeight:!1,startAt:0,slideshow:!0,slideshowSpeed:7e3,animationSpeed:600,initDelay:0,randomize:!1,fadeFirstSlide:!0,thumbCaptions:!1,pauseOnAction:!0,pauseOnHover:!1,pauseInvisible:!0,useCSS:!0,touch:!0,video:!1,controlNav:!0,directionNav:!0,prevText:"Previous",nextText:"Next",keyboard:!0,multipleKeyboard:!1,mousewheel:!1,pausePlay:!1,pauseText:"Pause",playText:"Play",controlsContainer:"",manualControls:"",sync:"",asNavFor:"",itemWidth:0,itemMargin:0,minItems:1,maxItems:0,move:0,allowOneSlide:!0,start:function(){},before:function(){},after:function(){},end:function(){},added:function(){},removed:function(){},init:function(){}},x.fn.flexslider=function(n){if(void 0===n&&(n={}),"object"==typeof n)return this.each(function(){var t=x(this),e=n.selector?n.selector:".slides > li",i=t.find(e);1===i.length&&!0===n.allowOneSlide||0===i.length?(i.fadeIn(400),n.start&&n.start(t)):void 0===t.data("flexslider")&&new x.flexslider(this,n)});var t=x(this).data("flexslider");switch(n){case"play":t.play();break;case"pause":t.pause();break;case"stop":t.stop();break;case"next":t.flexAnimate(t.getTarget("next"),!0);break;case"prev":case"previous":t.flexAnimate(t.getTarget("prev"),!0);break;default:"number"==typeof n&&t.flexAnimate(n,!0)}}}(jQuery),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(require("chart.js")):"function"==typeof define&&define.amd?define(["chart.js"],e):e(t.Chart)}(this,function(r){"use strict";var t=(r=r&&r.hasOwnProperty("default")?r.default:r).helpers,a=function(){this._rect=null,this._rotation=0};t.extend(a.prototype,{update:function(t,e,i){var n=t.x,a=t.y,s=n+e.x,o=a+e.y;this._rotation=i,this._rect={x0:s-1,y0:o-1,x1:s+e.w+2,y1:o+e.h+2,cx:n,cy:a}},contains:function(t,e){var i,n,a,s,o,r=this._rect;return!!r&&(i=r.cx,n=r.cy,a=this._rotation,s=i+(t-i)*Math.cos(a)+(e-n)*Math.sin(a),o=n-(t-i)*Math.sin(a)+(e-n)*Math.cos(a),!(s<r.x0||o<r.y0||s>r.x1||o>r.y1))}});var s=r.helpers,g={toTextLines:function(t){var e,i=[];for(t=[].concat(t);t.length;)"string"==typeof(e=t.pop())?i.unshift.apply(i,e.split("\n")):Array.isArray(e)?t.push.apply(t,e):s.isNullOrUndef(t)||i.unshift(""+e);return i},toFontString:function(t){return!t||s.isNullOrUndef(t.size)||s.isNullOrUndef(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family},textSize:function(t,e,i){var n,a=[].concat(e),s=a.length,o=t.font,r=0;for(t.font=i.string,n=0;n<s;++n)r=Math.max(t.measureText(a[n]).width,r);return t.font=o,{height:s*i.lineHeight,width:r}},parseFont:function(t){var e=r.defaults.global,i=s.valueOrDefault(t.size,e.defaultFontSize),n={family:s.valueOrDefault(t.family,e.defaultFontFamily),lineHeight:s.options.toLineHeight(t.lineHeight,i),size:i,style:s.valueOrDefault(t.style,e.defaultFontStyle),weight:s.valueOrDefault(t.weight,null),string:""};return n.string=g.toFontString(n),n},bound:function(t,e,i){return Math.max(t,Math.min(e,i))},arrayDiff:function(t,e){var i,n,a,s,o=t.slice(),r=[];for(i=0,a=e.length;i<a;++i)s=e[i],-1===(n=o.indexOf(s))?r.push([s,1]):o.splice(n,1);for(i=0,a=o.length;i<a;++i)r.push([o[i],-1]);return r}};function d(t,e){var i=e.x,n=e.y;if(null===i)return{x:0,y:-1};if(null===n)return{x:1,y:0};var a=t.x-i,s=t.y-n,o=Math.sqrt(a*a+s*s);return{x:o?a/o:0,y:o?s/o:-1}}function c(t,e,i,n,a){switch(a){case"center":i=n=0;break;case"bottom":i=0,n=1;break;case"right":i=1,n=0;break;case"left":i=-1,n=0;break;case"top":i=0,n=-1;break;case"start":i=-i,n=-n;break;case"end":break;default:a*=Math.PI/180,i=Math.cos(a),n=Math.sin(a)}return{x:t,y:e,vx:i,vy:n}}var l=function(t,e,i){var n,a=(t.startAngle+t.endAngle)/2,s=Math.cos(a),o=Math.sin(a),r=t.innerRadius,l=t.outerRadius;return n="start"===e?r:"end"===e?l:(r+l)/2,c(t.x+s*n,t.y+o*n,s,o,i)},u=function(t,e,i,n){var a=d(t,n),s=t.radius,o=0;return"start"===e?o=-s:"end"===e&&(o=s),c(t.x+a.x*o,t.y+a.y*o,a.x,a.y,i)},h=function(t,e,i,n){var a=t.horizontal,s=Math.abs(t.base-(a?t.x:t.y)),o=a?Math.min(t.x,t.base):t.x,r=a?t.y:Math.min(t.y,t.base),l=d(t,n);return"center"===e?a?o+=s/2:r+=s/2:"start"!==e||a?"end"===e&&a&&(o+=s):r+=s,c(o,r,l.x,l.y,i)},p=function(t,e,i,n){var a=d(t,n);return c(t.x,t.y,a.x,a.y,i)},v=r.helpers;var b=function(t,e,i,n){this._hitbox=new a,this._config=t,this._index=n,this._model=null,this._ctx=e,this._el=i};v.extend(b.prototype,{_modelize:function(t,e,i){var n,a=this._index,s=v.options.resolve,o=g.parseFont(s([e.font,{}],i,a));return{align:s([e.align,"center"],i,a),anchor:s([e.anchor,"center"],i,a),backgroundColor:s([e.backgroundColor,null],i,a),borderColor:s([e.borderColor,null],i,a),borderRadius:s([e.borderRadius,0],i,a),borderWidth:s([e.borderWidth,0],i,a),color:s([e.color,r.defaults.global.defaultFontColor],i,a),font:o,lines:t,offset:s([e.offset,0],i,a),opacity:s([e.opacity,1],i,a),origin:function(t){var e=t._model.horizontal,i=t._scale||e&&t._xScale||t._yScale;if(!i)return null;if(void 0!==i.xCenter&&void 0!==i.yCenter)return{x:i.xCenter,y:i.yCenter};var n=i.getBasePixel();return e?{x:n,y:null}:{x:null,y:n}}(this._el),padding:v.options.toPadding(s([e.padding,0],i,a)),positioner:(n=this._el,n instanceof r.elements.Arc?l:n instanceof r.elements.Point?u:n instanceof r.elements.Rectangle?h:p),rotation:s([e.rotation,0],i,a)*(Math.PI/180),size:g.textSize(this._ctx,t,o),textAlign:s([e.textAlign,"start"],i,a)}},update:function(t){var e,i,n,a=null,s=this._index,o=this._config;v.options.resolve([o.display,!0],t,s)&&(e=t.dataset.data[s],i=v.valueOrDefault(v.callback(o.formatter,[e,t]),e),a=(n=v.isNullOrUndef(i)?[]:g.toTextLines(i)).length?this._modelize(n,o,t):null),this._model=a},draw:function(t){var e,i,n,a,s,o,r,l,d,c,u,h,p,f,m=this._model;m&&m.opacity&&(n=m.size,a=m.padding,s=n.height,o=n.width,l=-s/2,e={frame:{x:(r=-o/2)-a.left,y:l-a.top,w:o+a.width,h:s+a.height},text:{x:r,y:l,w:o,h:s}},i=function(t,e,i){var n=e.positioner(t._view,e.anchor,e.align,e.origin),a=n.vx,s=n.vy;if(!a&&!s)return{x:n.x,y:n.y};var o=e.borderWidth||0,r=i.w+2*o,l=i.h+2*o,d=e.rotation,c=Math.abs(r/2*Math.cos(d))+Math.abs(l/2*Math.sin(d)),u=Math.abs(r/2*Math.sin(d))+Math.abs(l/2*Math.cos(d)),h=1/Math.max(Math.abs(a),Math.abs(s));return c*=a*h,u*=s*h,c+=e.offset*a,u+=e.offset*s,{x:n.x+c,y:n.y+u}}(this._el,m,e.frame),this._hitbox.update(i,e.frame,m.rotation),t.save(),t.globalAlpha=g.bound(0,m.opacity,1),t.translate(Math.round(i.x),Math.round(i.y)),t.rotate(m.rotation),d=t,c=e.frame,h=(u=m).backgroundColor,p=u.borderColor,f=u.borderWidth,(h||p&&f)&&(d.beginPath(),v.canvas.roundedRect(d,Math.round(c.x)-f/2,Math.round(c.y)-f/2,Math.round(c.w)+f,Math.round(c.h)+f,u.borderRadius),d.closePath(),h&&(d.fillStyle=h,d.fill()),p&&f&&(d.strokeStyle=p,d.lineWidth=f,d.lineJoin="miter",d.stroke())),function(t,e,i,n){var a,s,o,r=n.textAlign,l=n.font.lineHeight,d=n.color,c=e.length;if(c&&d)for(a=i.x,s=i.y+l/2,"center"===r?a+=i.w/2:"end"!==r&&"right"!==r||(a+=i.w),t.font=n.font.string,t.fillStyle=d,t.textAlign=r,t.textBaseline="middle",o=0;o<c;++o)t.fillText(e[o],Math.round(a),Math.round(s),Math.round(i.w)),s+=l}(t,m.lines,e.text,m),t.restore())},contains:function(t,e){return this._hitbox.contains(t,e)}});var o=r.helpers,e={align:"center",anchor:"center",backgroundColor:null,borderColor:null,borderRadius:0,borderWidth:0,color:void 0,display:!0,font:{family:void 0,lineHeight:1.2,size:void 0,style:void 0,weight:null},offset:4,opacity:1,padding:{top:4,right:4,bottom:4,left:4},rotation:0,textAlign:"start",formatter:function(t){if(o.isNullOrUndef(t))return null;var e,i,n,a=t;if(o.isObject(t))if(o.isNullOrUndef(t.label))if(o.isNullOrUndef(t.r))for(a="",n=0,i=(e=Object.keys(t)).length;n<i;++n)a+=(0!==n?", ":"")+e[n]+": "+t[e[n]];else a=t.r;else a=t.label;return""+a},listeners:{}},y=r.helpers,w="$datalabels";function n(t,e){var i,n,a=t.getDatasetMeta(e).data||[],s=a.length;for(i=0;i<s;++i)(n=a[i][w])&&n.draw(t.ctx)}function f(t,e,i){var n,a,s,o,r=t[w].labels;for(n=r.length-1;0<=n;--n)for(a=(s=r[n]||[]).length-1;0<=a;--a)if((o=s[a]).contains(e,i))return{dataset:n,label:o};return null}function m(t,e,i){var n=e&&e[i.dataset];if(n){var a=i.label,s=a.$context;!0===y.callback(n,[s])&&(t[w].dirty=!0,a.update(s))}}function x(t,e){var i,n,a=t[w],s=a.listeners;if(s.enter||s.leave){if("mousemove"===e.type)n=f(t,e.x,e.y);else if("mouseout"!==e.type)return;var o,r,l,d,c,u;i=a.hovered,a.hovered=n,o=t,r=s,d=n,((l=i)||d)&&(l?d?l.label!==d.label&&(u=c=!0):u=!0:c=!0,u&&m(o,r.leave,l),c&&m(o,r.enter,d))}}r.defaults.global.plugins.datalabels=e,r.defaults.global.plugins.datalabels=e,r.plugins.register({id:"datalabels",beforeInit:function(t){t[w]={actives:[]}},beforeUpdate:function(t){var e=t[w];e.listened=!1,e.listeners={},e.labels=[]},afterDatasetUpdate:function(t,n,e){var i,a,s,o,r,l=n.index,d=t[w],c=d.labels[l]=[],u=t.data.datasets[l],h=(i=e,!1===(a=u.datalabels)?null:(!0===a&&(a={}),y.merge({},[i,a]))),p=n.meta.data||[],f=p.length,m=t.ctx;for(m.save(),s=0;s<f;++s)!(o=p[s])||o.hidden||o._model.skip?r=null:(c.push(r=new b(h,m,o,s)),r.update(r.$context={active:!1,chart:t,dataIndex:s,dataset:u,datasetIndex:l})),o[w]=r;m.restore(),y.merge(d.listeners,h.listeners||{},{merger:function(t,e,i){e[t]=e[t]||{},e[t][n.index]=i[t],d.listened=!0}})},afterDatasetsDraw:function(t){for(var e=0,i=t.data.datasets.length;e<i;++e)n(t,e)},beforeEvent:function(t,e){if(t[w].listened)switch(e.type){case"mousemove":case"mouseout":x(t,e);break;case"click":n=e,a=(i=t)[w].listeners.click,(s=a&&f(i,n.x,n.y))&&m(i,a,s)}var i,n,a,s},afterEvent:function(t){var e,i,n,a,s=t[w],o=s.actives,r=s.actives=t.lastActive||[],l=g.arrayDiff(o,r);for(e=0,i=l.length;e<i;++e)(n=l[e])[1]&&((a=n[0][w]).$context.active=1===n[1],a.update(a.$context));!s.dirty&&!l.length||t.animating||t.render(),delete s.dirty}})}),void 0===helper)var helper={};helper.arr={multisort:function(t,i,n){if(void 0===i)for(i=[],x=0;x<t[0].length;x++)i.push(x);if(void 0===n)for(n=[],x=0;x<t[0].length;x++)n.push("ASC");return t.sort(function(t,e){return function t(e,i,n,a,s){var o="DESC"==a[s]?1:0,r=!isNaN(+e[n[s]]-+i[n[s]]),l=r?+e[n[s]]:e[n[s]].toLowerCase(),d=r?+i[n[s]]:i[n[s]].toLowerCase();return l<d?0==o?-1:1:l==d?n.length-1>s?t(e,i,n,a,s+1):0:0==o?1:-1}(t,e,i,n,0)})}},function(a){"use strict";var s=function(t,e){this.$element=a(t),this.options=a.extend({},s.defaults,e)};s.defaults={transition_delay:300,refresh_speed:50,display_text:"none",use_percentage:!0,percent_format:function(t){return t+"%"},amount_format:function(t,e,i){return t+" / "+e},update:a.noop,done:a.noop,fail:a.noop},s.prototype.transition=function(){var o=this.$element,r=o.parent(),l=this.$back_text,d=this.$front_text,c=this.options,u=parseInt(o.attr("data-transitiongoal")),h=parseInt(o.attr("aria-valuemin"))||0,p=parseInt(o.attr("aria-valuemax"))||100,f=r.hasClass("vertical"),m=c.update&&"function"==typeof c.update?c.update:Progressbar.defaults.update,g=c.done&&"function"==typeof c.done?c.done:Progressbar.defaults.done,t=c.fail&&"function"==typeof c.fail?c.fail:Progressbar.defaults.fail;if(isNaN(u))t("data-transitiongoal not set");else{var e,v=Math.round(100*(u-h)/(p-h));if("center"===c.display_text&&!l&&!d)this.$back_text=l=a("<span>").addClass("progressbar-back-text").prependTo(r),this.$front_text=d=a("<span>").addClass("progressbar-front-text").prependTo(o),f?(e=r.css("height"),l.css({height:e,"line-height":e}),d.css({height:e,"line-height":e}),a(window).resize(function(){e=r.css("height"),l.css({height:e,"line-height":e}),d.css({height:e,"line-height":e})})):(e=r.css("width"),d.css({width:e}),a(window).resize(function(){e=r.css("width"),d.css({width:e})}));setTimeout(function(){var t,e,i,n,a;f?o.css("height",v+"%"):o.css("width",v+"%");var s=setInterval(function(){n=f?(i=o.height(),r.height()):(i=o.width(),r.width()),t=Math.round(100*i/n),e=Math.round(h+i/n*(p-h)),v<=t&&(t=v,e=u,g(o),clearInterval(s)),"none"!==c.display_text&&(a=c.use_percentage?c.percent_format(t):c.amount_format(e,p,h),"fill"===c.display_text?o.text(a):"center"===c.display_text&&(l.text(a),d.text(a))),o.attr("aria-valuenow",e),m(t,o)},c.refresh_speed)},c.transition_delay)}};var t=a.fn.yopprogressbar;a.fn.yopprogressbar=function(n){return this.each(function(){var t=a(this),e=t.data("bs.progressbar"),i="object"==typeof n&&n;e&&i&&a.extend(e.options,i),e||t.data("bs.progressbar",e=new s(this,i)),e.transition()})},a.fn.yopprogressbar.Constructor=s,a.fn.yopprogressbar.noConflict=function(){return a.fn.yopprogressbar=t,this}}(window.jQuery),jQuery(document).ready(function(e){e(".submenu-item").hover(function(t){e(this).closest(".submenu").find(".submenu-item").removeClass("btn-underline"),e(this).addClass("btn-underline"),t.preventDefault()},function(t){e(this).removeClass("btn-underline"),e(this).closest(".submenu").find(".submenu-item-active").addClass("btn-underline"),t.preventDefault()}),e(".submenu-item").click(function(t){e(this).closest(".submenu").find(".submenu-item").removeClass("btn-underline").removeClass("submenu-item-active"),e(this).addClass("btn-underline").addClass("submenu-item-active"),e(this).closest(".tab-pane").find(".submenu-content").addClass("hide"),e(this).closest(".tab-pane").find("."+e(this).attr("data-content")).removeClass("hide"),t.preventDefault()})}),jQuery(document).ready(function(a){var t,e="";toastr.options={closeButton:!1,debug:!1,newestOnTop:!1,progressBar:!1,positionClass:"toast-bottom-right",preventDuplicates:!0,onclick:null,showDuration:"300",hideDuration:"1000",timeOut:"5000",extendedTimeOut:"1000",showEasing:"swing",hideEasing:"linear",showMethod:"fadeIn",hideMethod:"fadeOut",escapeHtml:!1},a(".yop-poll-poll-templates").find('.basic-yop-poll-container[data-temp="basic-pretty"] input[type="radio"]').iCheck({checkboxClass:"icheckbox_square-red",radioClass:"iradio_square-red"}),a(".choose-template").click(function(){var t=a(this).attr("data-template-id");a('input[name="poll[template]"]').val(t),e=a(this).attr("data-template-base"),a('input[name="poll[template]"]').attr("data-template-base",e),""!==e&&("basic"===e?(a("#poll-design").find(".skins-no-template").addClass("hide"),a("#poll-design").find(".skins-no-skin").removeClass("hide"),a(document).find(".skins-basic").removeClass("hide"),a(document).find(".skins-basic-pretty").addClass("hide"),a(".yop-poll-poll-templates").find("figure").removeClass("selected"),a(this).closest("figure").addClass("selected"),a("#poll-design").find('a[data-content="content-design-templates"]').removeClass("btn-underline submenu-item-active"),a("#poll-design").find('a[data-content="content-design-predefined-styles"]').addClass("btn-underline submenu-item-active"),a("#poll-design").find(".content-design-templates").addClass("hide"),a("#poll-design").find(".content-design-predefined-styles").removeClass("hide")):showUpgradeToPro("templates"))}),a(".preview-poll").click(function(t){var n=!1;if(""===a('input[name="poll[template]"]').attr("data-template-base")&&(n=!0,toastr.warning(htmlEncode(striptags(objectL10n.yopPollParams.noTemplateSelectedLabel)))),!1===n&&""===a('input[name="poll[skin]"]').attr("data-skin-base")&&(n=!0,toastr.warning(htmlEncode(striptags(objectL10n.yopPollParams.noSkinSelectedLabel)))),!1===n&&a(".poll-elements").find(".poll-element").each(function(t){var e,i=a(this).attr("data-type");!1===n&&("text-question"!==i&&"media-question"!==i||"columns"===a(this).find(".answers-display").val()&&(""===(e=a(this).find(".answers-columns").val())?(n=!0,a(".poll-steps li").removeClass("active"),a(".poll-steps li:nth-child( 2)").addClass("active"),a(".poll-steps-content .tab-pane").removeClass("active"),a(".poll-steps-content .tab-pane:nth-child(2)").addClass("active"),a(".poll-steps-content .tab-pane:nth-child(2) .submenu-item").removeClass("btn-underline"),a(".poll-steps-content .tab-pane:nth-child(2)").find(".submenu-item").eq(0).addClass("btn-underline"),a(".poll-steps-content .tab-pane:nth-child(2)").find(".submenu-content").addClass("hide"),a(".poll-steps-content .tab-pane:nth-child(2)").find(".submenu-content").eq(0).removeClass("hide"),a.scrollTo(a(this).find(".answers-display-section"),1e3,{onAfter:function(){a(this).find(".answers-columns").focus(),a(this).find(".answers-columns").parent().addClass("has-error")}}),toastr.warning(htmlEncode(striptags(objectL10n.yopPollParams.noNumberOfColumnsDefined)))):12<e&&(n=!0,a(".poll-steps li").removeClass("active"),a(".poll-steps li:nth-child(2)").addClass("active"),a(".poll-steps-content .tab-pane").removeClass("active"),a(".poll-steps-content .tab-pane:nth-child(2)").addClass("active"),a(".poll-steps-content .tab-pane:nth-child(2) .submenu-item").removeClass("btn-underline"),a(".poll-steps-content .tab-pane:nth-child(2)").find(".submenu-item").eq(0).addClass("btn-underline"),a(".poll-steps-content .tab-pane:nth-child(2)").find(".submenu-content").addClass("hide"),a(".poll-steps-content .tab-pane:nth-child(2)").find(".submenu-content").eq(0).removeClass("hide"),a.scrollTo(a(this).find(".answers-display-section"),1e3,{onAfter:function(){a(this).find(".answers-columns").focus(),a(this).find(".answers-columns").parent().addClass("has-error")}}),toastr.warning(htmlEncode(striptags(objectL10n.yopPollParams.numberOfColumnsTooBig))))))}),!1===n)switch(a('input[name="poll[template]"]').attr("data-template-base")){case"basic":YOPPollBasicShowLivePreview();break;case"basic-pretty":YOPPollBasicPrettyShowLivePreview()}t.preventDefault()}),a('input[name="poll[name]"]').change(function(){""!==a(this).val()&&a(this).parent().removeClass("has-error")}),a(".edit-poll-status").click(function(t){a(this).addClass("hide"),a("#poll-status-select").removeClass("hide-if-js"),t.preventDefault()}),a(".save-poll-status").click(function(t){var e=a("#poll_status").val();a(".poll-status").text(e.charAt(0).toUpperCase()+e.slice(1)),a("#poll-status-select").addClass("hide-if-js"),a(".edit-poll-status").removeClass("hide"),t.preventDefault()}),a(".cancel-poll-status").click(function(t){a("#poll-status-select").addClass("hide-if-js"),a(".edit-poll-status").removeClass("hide"),t.preventDefault()}),a(".edit-timestamp").click(function(t){a(".poll-steps li").removeClass("active"),a(".poll-steps li:nth-child(3)").addClass("active"),a(".poll-steps-content .tab-pane").removeClass("active"),a(".poll-steps-content .tab-pane:nth-child(3)").addClass("active"),a(".poll-steps-content .tab-pane:nth-child(3) .submenu-item").removeClass("btn-underline"),a(".poll-steps-content .tab-pane:nth-child(3)").find(".submenu-item").eq(0).addClass("btn-underline"),a(".poll-steps-content .tab-pane:nth-child(3)").find(".submenu-content").addClass("hide"),a(".poll-steps-content .tab-pane:nth-child(3)").find(".submenu-content").eq(0).removeClass("hide"),a.scrollTo(".start-date-option",1e3,{onAfter:function(){a(".poll-preferences").find(".start-date-option").focus()}}),t.preventDefault()}),a.fn.extend({tooltipExtended:function(t){var e=a(this).data("ui-validate.error-destroy");""!==e&&(e=function(){a(this).tooltip("destroy").removeData("bs.tooltip").next(".tooltip").remove()},a(this).data("ui-validate.error-destroy",e)),a(this).tooltip("destroy").removeData("bs.tooltip").next(".tooltip").remove(),a(this).tooltip({title:t}).on("mouseleave",e).tooltip("show")}}),(t=new Clipboard("#copy-yop-poll-code")).on("success",function(t){a("#copy-yop-poll-code").tooltipExtended(objectL10n.yopPollParams.copyToClipboardSuccess),t.clearSelection()}),t.on("error",function(t){a("#copy-yop-poll-code").tooltipExtended(fallbackMessage(t.action))})}),jQuery(document).ready(function(d){d(".skins-basic-pretty").find(".basic-yop-poll-container").each(function(t){var e=d(this).attr("data-skin"),i=d(this).attr("data-cscheme");i="black"===i?"":"-"+i,d(this).find('input[type="radio"]').iCheck({checkboxClass:"icheckbox_"+e+i,radioClass:"iradio_"+e+i}),d(this).find('input[type="checkbox"]').iCheck({checkboxClass:"icheckbox_"+e+i,radioClass:"iradio_"+e+i})}),d(".skins-select-template").click(function(t){d("#poll-design").find('a[data-content="content-design-templates"]').addClass("btn-underline"),d("#poll-design").find('a[data-content="content-design-predefined-styles"]').removeClass("btn-underline"),d("#poll-design").find(".content-design-templates").removeClass("hide"),d("#poll-design").find(".content-design-predefined-styles").addClass("hide"),t.preventDefault()}),d(".choose-skin").click(function(t){var e=d(this).attr("data-temp"),i=d(".questions-text-weight").select2(),n=d(".questions-text-align").select2(),a=d(".answers-text-weight").select2(),s=d(".buttons-text-weight").select2(),o="",r="";d('input[name="poll[skin]"]').attr("data-skin-base",d(this).attr("data-skin-base")),d("#poll-design").find('input[name="poll[background-color]"]').val(d(this).attr("data-poll-background-color")),d("#poll-design").find('input[name="poll[background-color]"]').minicolors("value",{color:d(this).attr("data-poll-background-color")}),d("#poll-design").find('input[name="poll[border-color]"]').val(d(this).attr("data-poll-border-color")),d("#poll-design").find('input[name="poll[border-color]"]').minicolors("value",{color:d(this).attr("data-poll-border-color")}),d("#poll-design").find('input[name="poll[border-size]"]').val(d(this).attr("data-poll-border-size").replace("px","")),d("#poll-design").find('input[name="poll[border-radius]"]').val(d(this).attr("data-poll-border-radius").replace("px","")),d("#poll-design").find('input[name="poll[padding-left-right]"]').val(d(this).attr("data-poll-padding-left-right").replace("px","")),d("#poll-design").find('input[name="poll[padding-top-bottom]"]').val(d(this).attr("data-poll-padding-top-bottom").replace("px","")),d("#poll-design").find('input[name="questions[text-color]"]').val(d(this).attr("data-questions-text-color")),d("#poll-design").find('input[name="questions[text-color]"]').minicolors("value",{color:d(this).attr("data-questions-text-color")}),d("#poll-design").find('input[name="questions[text-size]"]').val(d(this).attr("data-questions-text-size").replace("px","")),i.val(d(this).attr("data-questions-text-weight")).trigger("change"),n.val(d(this).attr("data-questions-text-align")).trigger("change"),d("#poll-design").find('input[name="answers[padding-left-right]"]').val(d(this).attr("data-answers-padding-left-right").replace("px","")),d("#poll-design").find('input[name="answers[padding-top-bottom]"]').val(d(this).attr("data-answers-padding-top-bottom").replace("px","")),d("#poll-design").find('input[name="answers[text-color]"]').val(d(this).attr("data-answers-text-color")),d("#poll-design").find('input[name="answers[text-color]"]').minicolors("value",{color:d(this).attr("data-answers-text-color")}),d("#poll-design").find('input[name="answers[text-size]"]').val(d(this).attr("data-answers-text-size").replace("px","")),a.val(d(this).attr("data-answers-text-weight")).trigger("change"),d("#poll-design").find('input[name="buttons[background-color]"]').val(d(this).attr("data-buttons-background-color")),d("#poll-design").find('input[name="buttons[background-color]"]').minicolors("value",{color:d(this).attr("data-buttons-background-color")}),d("#poll-design").find('input[name="buttons[border-size]"]').val(d(this).attr("data-buttons-border-size").replace("px","")),d("#poll-design").find('input[name="buttons[border-color]"]').val(d(this).attr("data-buttons-border-color")),d("#poll-design").find('input[name="buttons[border-color]"]').minicolors("value",{color:d(this).attr("data-buttons-border-color")}),d("#poll-design").find('input[name="buttons[border-radius]"]').val(d(this).attr("data-buttons-border-radius").replace("px","")),d("#poll-design").find('input[name="buttons[padding-left-right]"]').val(d(this).attr("data-buttons-padding-left-right").replace("px","")),d("#poll-design").find('input[name="buttons[padding-top-bottom]"]').val(d(this).attr("data-buttons-padding-top-bottom").replace("px","")),d("#poll-design").find('input[name="buttons[text-color]"]').val(d(this).attr("data-buttons-text-color")),d("#poll-design").find('input[name="buttons[text-color]"]').minicolors("value",{color:d(this).attr("data-buttons-text-color")}),d("#poll-design").find('input[name="buttons[text-size]"]').val(d(this).attr("data-buttons-text-size").replace("px","")),s.val(d(this).attr("data-buttons-text-weight")).trigger("change"),d("#poll-design").find('textarea[name="custom[css]"]').val(d(this).attr("data-custom-css")),d("#poll-design").find(".skins-no-template").addClass("hide"),d("#poll-design").find(".skins-no-skin").addClass("hide"),d("#poll-design").find(".skin-custom-style").removeClass("hide"),d("#poll-design").removeClass("active"),d("#poll-questions").addClass("active"),d("#yop-main-area").find(".step-design").removeClass("active"),d("#yop-main-area").find(".step-elements").addClass("active"),d("#yop-main-area").find(".step-options").removeClass("active"),d("#yop-main-area").find(".content-qa-elementss").addClass("btn-underline"),d("#yop-main-area").find(".content-design-predefined-styles").removeClass("btn-underline"),d("#yop-main-area").find(".content-qa-elements").removeClass("hide"),d(".content-design-predefined-styles").find("figure").removeClass("selected"),d(this).closest("figure").addClass("selected"),"basic-pretty"===e&&(o=d(this).closest("figure").find(".basic-yop-poll-container").attr("data-skin"),r=d(this).closest("figure").find(".basic-yop-poll-container").attr("data-cscheme"),d(".answers-skin").select2().val(o).trigger("change"),d(".color-scheme li").removeClass("active"),d('.color-scheme li[data-id="'+r+'"]').addClass("active")),t.preventDefault()}),d(".customize-skin").click(function(t){var e=d(this).attr("data-temp"),i=d(".questions-text-weight").select2(),n=d(".questions-text-align").select2(),a=d(".answers-text-weight").select2(),s=d(".buttons-text-weight").select2(),o=d(this).closest("figcaption").find(".choose-skin"),r="",l="";d('input[name="poll[skin]"]').attr("data-skin-base",d(this).attr("data-skin-base")),d("#poll-design").find('input[name="poll[background-color]"]').val(o.attr("data-poll-background-color")),d("#poll-design").find('input[name="poll[background-color]"]').minicolors("value",{color:o.attr("data-poll-background-color")}),d("#poll-design").find('input[name="poll[border-color]"]').val(o.attr("data-poll-border-color")),d("#poll-design").find('input[name="poll[border-color]"]').minicolors("value",{color:o.attr("data-poll-border-color")}),d("#poll-design").find('input[name="poll[border-size]"]').val(o.attr("data-poll-border-size").replace("px","")),d("#poll-design").find('input[name="poll[border-radius]"]').val(o.attr("data-poll-border-radius").replace("px","")),d("#poll-design").find('input[name="poll[padding-left-right]"]').val(o.attr("data-poll-padding-left-right").replace("px","")),d("#poll-design").find('input[name="poll[padding-top-bottom]"]').val(o.attr("data-poll-padding-top-bottom").replace("px","")),d("#poll-design").find('input[name="questions[text-color]"]').val(o.attr("data-questions-text-color")),d("#poll-design").find('input[name="questions[text-color]"]').minicolors("value",{color:o.attr("data-questions-text-color")}),d("#poll-design").find('input[name="questions[text-size]"]').val(o.attr("data-questions-text-size").replace("px","")),i.val(o.attr("data-questions-text-weight")).trigger("change"),n.val(o.attr("data-questions-text-align")).trigger("change"),d("#poll-design").find('input[name="answers[padding-left-right]"]').val(o.attr("data-answers-padding-left-right").replace("px","")),d("#poll-design").find('input[name="answers[padding-top-bottom]"]').val(o.attr("data-answers-padding-top-bottom").replace("px","")),d("#poll-design").find('input[name="answers[text-color]"]').val(o.attr("data-answers-text-color")),d("#poll-design").find('input[name="answers[text-color]"]').minicolors("value",{color:o.attr("data-answers-text-color")}),d("#poll-design").find('input[name="answers[text-size]"]').val(o.attr("data-answers-text-size").replace("px","")),a.val(o.attr("data-answers-text-weight")).trigger("change"),d("#poll-design").find('input[name="buttons[background-color]"]').val(o.attr("data-buttons-background-color")),d("#poll-design").find('input[name="buttons[background-color]"]').minicolors("value",{color:o.attr("data-buttons-background-color")}),d("#poll-design").find('input[name="buttons[border-size]"]').val(o.attr("data-buttons-border-size").replace("px","")),d("#poll-design").find('input[name="buttons[border-color]"]').val(o.attr("data-buttons-border-color")),d("#poll-design").find('input[name="buttons[border-color]"]').minicolors("value",{color:o.attr("data-buttons-border-color")}),d("#poll-design").find('input[name="buttons[border-radius]"]').val(o.attr("data-buttons-border-radius").replace("px","")),d("#poll-design").find('input[name="buttons[padding-left-right]"]').val(o.attr("data-buttons-padding-left-right").replace("px","")),d("#poll-design").find('input[name="buttons[padding-top-bottom]"]').val(o.attr("data-buttons-padding-top-bottom").replace("px","")),d("#poll-design").find('input[name="buttons[text-color]"]').val(o.attr("data-buttons-text-color")),d("#poll-design").find('input[name="buttons[text-color]"]').minicolors("value",{color:o.attr("data-buttons-text-color")}),d("#poll-design").find('input[name="buttons[text-size]"]').val(o.attr("data-buttons-text-size").replace("px","")),s.val(o.attr("data-buttons-text-weight")).trigger("change"),d("#poll-design").find('textarea[name="custom[css]"]').val(o.attr("data-custom-css")),d("#poll-design").find(".skins-no-template").addClass("hide"),d("#poll-design").find(".skins-no-skin").addClass("hide"),d("#poll-design").find(".skin-custom-style").removeClass("hide"),d(".content-design-predefined-styles").find("figure").removeClass("selected"),d(this).closest("figure").addClass("selected"),d("#poll-design").find(".skins-no-template").addClass("hide"),d("#poll-design").find(".skins-no-skin").addClass("hide"),d("#poll-design").find(".skin-custom-style").removeClass("hide"),d("#poll-design").find('a[data-content="content-design-predefined-styles"]').removeClass("btn-underline submenu-item-active"),d("#poll-design").find('a[data-content="content-design-custom-style"]').addClass("btn-underline submenu-item-active"),d("#poll-design").find(".content-design-predefined-styles").addClass("hide"),d("#poll-design").find(".content-design-custom-style").removeClass("hide"),"basic-pretty"===e&&(r=d(this).closest("figure").find(".basic-yop-poll-container").attr("data-skin"),l=d(this).closest("figure").find(".basic-yop-poll-container").attr("data-cscheme"),d(".answers-skin").select2().val(r).trigger("change"),d(".color-scheme li").removeClass("active"),d('.color-scheme li[data-id="'+l+'"]').addClass("active")),t.preventDefault()})}),jQuery(document).ready(function(i){i(".yop-element > .yop-head").first().addClass("collapse-up"),i(".yop-element > .yop-head").click(function(){var t=i(this).parent().children(".content"),e=i(this);i(t).slideToggle(function(){"block"===i(t).css("display")?(i(e).addClass("collapse-up"),i(e).removeClass("collapse-down")):(i(e).addClass("collapse-down"),i(e).removeClass("collapse-up"))})}),i(".custom-style-select-template").click(function(t){i("#poll-design").find('a[data-content="content-design-templates"]').addClass("btn-underline"),i("#poll-design").find('a[data-content="content-design-custom-style"]').removeClass("btn-underline"),i("#poll-design").find(".content-design-templates").removeClass("hide"),i("#poll-design").find(".content-design-custom-style").addClass("hide"),t.preventDefault()}),i(".custom-style-select-skin").click(function(t){i("#poll-design").find('a[data-content="content-design-custom-style"]').removeClass("btn-underline"),i("#poll-design").find('a[data-content="content-design-predefined-styles"]').addClass("btn-underline"),i("#poll-design").find(".content-design-predefined-styles").removeClass("hide"),i("#poll-design").find(".content-design-custom-style").addClass("hide"),t.preventDefault()}),i(".color-scheme li").click(function(){!1===i(this).hasClass("active")&&(i("li.active").removeClass("active"),i(this).addClass("active"))}),i(".colorpicker-component").each(function(){i(this).find("INPUT").minicolors({position:"bottom right",inline:!1,theme:"bootstrap"})}),i(".questions-text-weight").select2({minimumResultsForSearch:1/0}),i(".questions-text-align").select2({minimumResultsForSearch:1/0}),i(".answers-text-weight").select2({minimumResultsForSearch:1/0}),i(".answers-skin").select2({minimumResultsForSearch:1/0}),i(".buttons-text-weight").select2({minimumResultsForSearch:1/0}),i(".errors-text-weight").select2({minimumResultsForSearch:1/0}),i(".poll-background-color").change(function(){""!==i(this).val()&&i(this).parent().removeClass("has-error")}),i(".poll-border-size").change(function(){""!==i(this).val()&&i(this).parent().removeClass("has-error")}),i(".poll-border-color").change(function(){""!==i(this).val()&&i(this).parent().removeClass("has-error")}),i(".poll-border-radius").change(function(){""!==i(this).val()&&i(this).parent().removeClass("has-error")}),i(".poll-padding-left-right").change(function(){""!==i(this).val()&&i(this).parent().removeClass("has-error")}),i(".poll-padding-top-bottom").change(function(){""!==i(this).val()&&i(this).parent().removeClass("has-error")}),i(".questions-text-color").change(function(){""!==i(this).val()&&i(this).parent().removeClass("has-error")}),i(".questions-text-size").change(function(){""!==i(this).val()&&i(this).parent().removeClass("has-error")}),i(".answers-padding-left-right").change(function(){""!==i(this).val()&&i(this).parent().removeClass("has-error")}),i(".answers-padding-top-bottom").change(function(){""!==i(this).val()&&i(this).parent().removeClass("has-error")}),i(".answers-text-color").change(function(){""!==i(this).val()&&i(this).parent().removeClass("has-error")}),i(".answers-text-size").change(function(){""!==i(this).val()&&i(this).parent().removeClass("has-error")}),i(".buttons-background-color").change(function(){""!==i(this).val()&&i(this).parent().removeClass("has-error")}),i(".buttons-border-size").change(function(){""!==i(this).val()&&i(this).parent().removeClass("has-error")}),i(".buttons-border-color").change(function(){""!==i(this).val()&&i(this).parent().removeClass("has-error")}),i(".buttons-border-radius").change(function(){""!==i(this).val()&&i(this).parent().removeClass("has-error")}),i(".buttons-padding-left-right").change(function(){""!==i(this).val()&&i(this).parent().removeClass("has-error")}),i(".buttons-padding-top-bottom").change(function(){""!==i(this).val()&&i(this).parent().removeClass("has-error")}),i(".buttons-text-color").change(function(){""!==i(this).val()&&i(this).parent().removeClass("has-error")}),i(".buttons-text-size").change(function(){""!==i(this).val()&&i(this).parent().removeClass("has-error")}),i(".errors-border-left-color-for-success").change(function(){""!==i(this).val()&&i(this).parent().removeClass("has-error")}),i(".errors-border-left-color-for-error").change(function(){""!==i(this).val()&&i(this).parent().removeClass("has-error")}),i(".errors-border-left-size").change(function(){""!==i(this).val()&&i(this).parent().removeClass("has-error")}),i(".errors-padding-top-left").change(function(){""!==i(this).val()&&i(this).parent().removeClass("has-error")}),i(".errors-text-color").change(function(){""!==i(this).val()&&i(this).parent().removeClass("has-error")}),i(".errors-text-size").change(function(){""!==i(this).val()&&i(this).parent().removeClass("has-error")})}),jQuery(document).ready(function(a){var s="";a(".vote-permissions").select2({minimumResultsForSearch:1/0,placeholder:objectL10n.yopPollParams.selectHelperText}),s=a(".block-voters").select2({minimumResultsForSearch:1/0,placeholder:objectL10n.yopPollParams.selectHelperText}),a(".block-for-period").select2({minimumResultsForSearch:1/0}),a(".limit-votes-per-user").select2({minimumResultsForSearch:1/0}),a(".allow-wordpress-votes").select2({minimumResultsForSearch:1/0}),a(".allow-facebook-votes").select2({minimumResultsForSearch:1/0}),a(".allow-google-votes").select2({minimumResultsForSearch:1/0}),a(".block-voters").on("select2:select",function(t){var e,i=a(this).select2("data"),n=[];if("no-block"===t.params.data.id)s.val("no-block").trigger("change"),a(".block-time-section").addClass("hide");else{for(e in i)"no-block"!==i[e].id&&n.push(i[e].id);s.val(n).trigger("change"),a(".block-time-section").removeClass("hide")}}),a(".block-voters").on("select2:unselect",function(t){0===a(this).select2("data").length&&a(".block-time-section").addClass("hide")}),a(".poll-options-access").on("change",".limit-votes-per-user",function(){"yes"===a(this).val()?a(this).closest(".poll-options-access").find(".votes-per-user-section").removeClass("hide"):a(this).closest(".poll-options-access").find(".votes-per-user-section").addClass("hide")}),a(".block-for-value").change(function(){""!==a(this).val()&&a(this).parent().removeClass("has-error")}),a(".vote-permissions").on("select2:select",function(t){var e=t.params.data;"facebook"===e.id&&(a(this).val("guest").trigger("change.select2"),showUpgradeToPro("facebook"),t.preventDefault()),"google"===e.id&&(a(this).val("guest").trigger("change.select2"),showUpgradeToPro("google"),t.preventDefault())})}),jQuery(document).ready(function(a){a("#sortable").sortable({appendTo:document.body,items:"> .answer-block",axis:"y"}),a(".poll-elements-list").sortable({axis:"y",handle:".title-bar",start:function(t,e){a(".poll-elements").find(".poll-element").each(function(t){a(this).find(".content").first().hide()})},stop:function(t,e){}}),a(".poll-elements-list").find(".answers").sortable(),a(".poll-elements").on("click",".poll-element-collapse",function(t){var e=a(this).closest(".poll-element").find(".content-inside").first(),i=a(this);a(e).slideToggle({duration:1e3,complete:function(){var t=a(e).is(":visible");a(this).removeClass("toggle-in-action"),!0===t?(a(i).find("span").addClass("glyphicon-chevron-up"),a(i).find("span").removeClass("glyphicon-chevron-down"),a(i).closest(".title-bar").removeClass("collapsed")):(a(i).find("span").addClass("glyphicon-chevron-down"),a(i).find("span").removeClass("glyphicon-chevron-up"),a(i).closest(".title-bar").addClass("collapsed"),a(i).show())}}),t.preventDefault()}),a(".add-custom-field").draggable({helper:function(t){var e=a(".custom-field-definition").find(".poll-element").clone();return a(e)},connectToSortable:".poll-elements-list",start:function(t,e){e.helper.css("width",""),e.helper.find(".content-inside").hide(),e.helper.find(".custom-field-options").hide(),e.helper.find(".title-bar").addClass("collapsed")},drag:function(t,e){e.helper.css("width",a(".poll-elements").css("width"))},stop:function(t,e){e.helper.css({width:"",height:""}),e.helper.find(".poll-element-collapse").trigger("click")}}),a(".poll-elements").on("click",".custom-field-edit-more",function(t){a(this).closest(".poll-element").find(".custom-field-options").show(),t.preventDefault()}),a(".poll-elements").on("click",".custom-field-edit-clone",function(t){a(this).closest(".poll-element").after(a(this).closest(".poll-element").clone().attr("data-id","")),t.preventDefault()}),a(".poll-elements").on("click",".custom-field-edit-delete",function(t){var e,i,n=a(this);BootstrapDialog.confirm({type:BootstrapDialog.TYPE_WARNING,title:objectL10n.yopPollParams.deleteTitle,message:objectL10n.yopPollParams.deleteCustomFieldMessage,btnCancelLabel:objectL10n.yopPollParams.deleteCancelLabel,btnOKLabel:objectL10n.yopPollParams.deleteOkLabel,callback:function(t){t&&(""!==(e=a(n).closest('.poll-element[data-type="custom-field"]').attr("data-id"))&&(""===(i=a(".poll-elements-list").attr("data-remove"))?a(".poll-elements-list").attr("data-remove",e):a(".poll-elements-list").attr("data-remove",i+","+e)),a(n).closest(".poll-element").remove())}}),t.preventDefault()}),a(".poll-elements").on("change",".custom-field-required",function(t){var e=a(this).is(":checked");a(this).closest(".poll-element").find(".custom-field-make-required").prop("checked",e),t.preventDefault()}),a(".poll-elements").on("change",".custom-field-make-required",function(t){var e=a(this).is(":checked");a(this).closest(".poll-element").find(".custom-field-required").prop("checked",e),t.preventDefault()}),a(".poll-elements").on("click",".custom-field-edit-done",function(t){a(this).closest(".poll-element").find(".custom-field-options").hide(),t.preventDefault()}),a(".add-text-question").click(function(t){showUpgradeToPro("multiple-questions"),t.preventDefault()}),a(".poll-elements").on("click",".text-question-edit-clone",function(t){showUpgradeToPro("multiple-questions"),t.preventDefault()}),a(".poll-elements").on("click",".text-question-edit-delete",function(t){showUpgradeToPro("multiple-questions"),t.preventDefault()}),a(".poll-elements").find("INPUT.answer-results-color").minicolors({position:"top right",inline:!1,theme:"bootstrap"}),a(".add-media-question").click(function(t){showUpgradeToPro("media-questions"),t.preventDefault()}),a(".poll-elements").on("click",".media-question-edit-clone",function(t){showUpgradeToPro("multiple-questions"),t.preventDefault()}),a(".poll-elements").on("click",".media-question-edit-delete",function(t){showUpgradeToPro("multiple-questions"),t.preventDefault()}),a(".poll-elements").find(".answer-type").select2({minimumResultsForSearch:1/0}),a(".add-space-separator").click(function(t){showUpgradeToPro("space-separator"),t.preventDefault()}),a(".add-text-block").click(function(t){showUpgradeToPro("text-block"),t.preventDefault()}),a(".poll-elements").on("click",".add-text-answer",function(t){var e=a(".text-answer-definition").find(".answer").clone();a(e).find(".answer-results-color").minicolors({position:"top right",inline:!1,theme:"bootstrap"}),a(this).closest('.poll-element[data-type="text-question"]').find(".answers").append(a(e)),t.preventDefault()}),a(".poll-elements").on("click",".text-answer-edit-more",function(t){a(this).closest(".answer").find(".answer-options").show(),t.preventDefault()}),a(".poll-elements").on("click",".text-answer-edit-clone",function(t){var e=a(this).closest(".answer"),i=a(e).clone().attr("data-id","");a(i).find(".answer-results-color").minicolors("destroy"),a(i).find(".answer-results-color").minicolors({position:"top right",inline:!1,theme:"bootstrap"}),a(e).after(a(i)),t.preventDefault()}),a(".poll-elements").on("click",".text-answer-edit-delete",function(t){var e,i,n=a(this);BootstrapDialog.confirm({type:BootstrapDialog.TYPE_WARNING,title:objectL10n.yopPollParams.deleteTitle,message:objectL10n.yopPollParams.deleteAnswerMessage,btnCancelLabel:objectL10n.yopPollParams.deleteCancelLabel,btnOKLabel:objectL10n.yopPollParams.deleteOkLabel,callback:function(t){t&&(""!==(e=a(n).closest(".answer").attr("data-id"))&&(""===(i=a(n).closest('.poll-element[data-type="text-question"]').attr("data-remove"))?a(n).closest('.poll-element[data-type="text-question"]').attr("data-remove",e):a(n).closest('.poll-element[data-type="text-question"]').attr("data-remove",i+","+e)),a(n).closest(".answer").remove())}}),t.preventDefault()}),a(".poll-elements").on("click",".text-answer-edit-done",function(t){a(this).closest(".answer-options").hide(),t.preventDefault()}),a(".poll-elements").on("change",".answer-is-default",function(t){var e=a(this).is(":checked");a(this).closest(".answer").find(".answer-make-default").prop("checked",e),t.preventDefault()}),a(".poll-elements").on("change",".answer-make-default",function(t){var e=a(this).is(":checked");a(this).closest(".answer").find(".answer-is-default").prop("checked",e),t.preventDefault()}),a(".poll-elements").on("change",".answer-make-link",function(t){!0===a(this).is(":checked")?a(this).closest(".answer").find(".answer-link-section").removeClass("hide"):a(this).closest(".answer").find(".answer-link-section").addClass("hide"),t.preventDefault()}),a(".poll-elements").on("change",".allow-other-answers",function(){"yes"===a(this).val()?a(this).closest(".question-options").find(".other-answers-section").removeClass("hide"):a(this).closest(".question-options").find(".other-answers-section").addClass("hide")}),a(".poll-elements").on("change",".allow-multiple-answers",function(){"yes"===a(this).val()?a(this).closest(".question-options").find(".multiple-answers-section").removeClass("hide"):a(this).closest(".question-options").find(".multiple-answers-section").addClass("hide")}),a(".poll-elements").on("change",".answers-display",function(){"columns"===a(this).val()?(a(this).closest(".question-options").find(".answers-display-section").removeClass("hide"),a(this).closest(".question-options").find(".answers-columns").val("2")):a(this).closest(".question-options").find(".answers-display-section").addClass("hide")}),a(".poll-elements").find(".allow-other-answers").select2({minimumResultsForSearch:1/0}),a(".poll-elements").find(".add-other-answers").select2({minimumResultsForSearch:1/0}),a(".poll-elements").find(".display-other-answers-in-results").select2({minimumResultsForSearch:1/0}),a(".poll-elements").find(".allow-multiple-answers").select2({minimumResultsForSearch:1/0}),a(".poll-elements").find(".answers-display").select2({minimumResultsForSearch:1/0}),a(".question-text-edit").change(function(){""!==a(this).val()&&a(this).parent().removeClass("has-error")}),a(".answer-edit-text").change(function(){""!==a(this).val()&&a(this).parent().removeClass("has-error")}),a(".answers-columns").change(function(){""!==a(this).val()&&a(this).parent().removeClass("has-error")})}),jQuery(document).ready(function(i){i(".show-results-link").select2({minimumResultsForSearch:1/0}),i(".show-total-votes").select2({minimumResultsForSearch:1/0}),i(".show-total-answers").select2({minimumResultsForSearch:1/0}),i(".start-date-option").select2({minimumResultsForSearch:1/0}),i(".end-date-option").select2({minimumResultsForSearch:1/0}),i(".redirect-after-vote").select2({minimumResultsForSearch:1/0}),i(".reset-poll-stats-automatically").select2({minimumResultsForSearch:1/0}),i(".reset-poll-stats-every-period").select2({minimumResultsForSearch:1/0}),i(".auto-generate-poll-page").select2({minimumResultsForSearch:1/0}),i(".use-captcha").select2({minimumResultsForSearch:1/0}),i(".send-email-notifications").select2({minimumResultsForSearch:1/0}),i(".enable-gdpr").select2({minimumResultsForSearch:1/0}),i(".gdpr-solution").select2({minimumResultsForSearch:1/0}),i(".start-date-custom-hidden").datetimepicker({dateFormat:"yy-mm-dd",timeFormat:"HH:mm",onSelect:function(t){var e;e=moment(t,"YYYY-MM-DD HH:mm").unix(),i(".start-date-custom").val(date(objectL10n.yopPollParams.timeFormat+" "+objectL10n.yopPollParams.dateFormat,e)).change(),i("#timestamp").text(objectL10n.yopPollParams.publishDateSchedule+":"+date("M d, Y @ H:i",e))},onClose:function(){var t;null!==i(".start-date-custom-hidden").datetimepicker("getDate")&&(t=moment(i(".start-date-custom-hidden").datetimepicker("getDate")).unix(),i(".start-date-custom").val(date(objectL10n.yopPollParams.timeFormat+" "+objectL10n.yopPollParams.dateFormat,t)).change(),i("#timestamp").text(objectL10n.yopPollParams.publishDateSchedule+": "),i("#timestamp").text(objectL10n.yopPollParams.publishDateSchedule+": "+date("M d, Y @ H:i",t)))}}),i(".end-date-custom-hidden").datetimepicker({dateFormat:"yy-mm-dd",timeFormat:"HH:mm",onSelect:function(t){var e;e=moment(t,"YYYY-MM-DD HH:mm").unix(),i(".end-date-custom").val(date(objectL10n.yopPollParams.timeFormat+" "+objectL10n.yopPollParams.dateFormat,e)).change()},onClose:function(){var t;null!==i(".end-date-custom-hidden").datetimepicker("getDate")&&(t=moment(i(".end-date-custom-hidden").datetimepicker("getDate")).unix(),i(".end-date-custom").val(date(objectL10n.yopPollParams.timeFormat+" "+objectL10n.yopPollParams.dateFormat,t)).change())}}),i(".poll-preferences").on("change",".start-date-option",function(){"custom"===i(this).val()?i(this).closest(".poll-preferences").find(".start-date-section").removeClass("hide"):(i(this).closest(".poll-preferences").find(".start-date-section").addClass("hide"),i("#timestamp").text(objectL10n.yopPollParams.publishDateImmediately))}),i(".poll-preferences").on("click",".show-start-date",function(t){i(".start-date-custom-hidden").datepicker("show"),t.preventDefault()}),i(".poll-preferences").on("click",".show-end-date",function(t){i(".end-date-custom-hidden").datepicker("show"),t.preventDefault()}),i(".poll-preferences").on("change",".end-date-option",function(){"custom"===i(this).val()?i(this).closest(".poll-preferences").find(".end-date-section").removeClass("hide"):i(this).closest(".poll-preferences").find(".end-date-section").addClass("hide")}),i(".vote-options").on("change",".show-results-link",function(){"yes"===i(this).val()?i(".results-link-option").removeClass("hide"):i(".results-link-option").addClass("hide")}),i(".poll-preferences").on("change",".redirect-after-vote",function(){"yes"===i(this).val()?i(this).closest(".poll-preferences").find(".redirect-url-section").removeClass("hide"):i(this).closest(".poll-preferences").find(".redirect-url-section").addClass("hide")}),i(".poll-preferences").on("change",".reset-poll-stats-automatically",function(){"yes"===i(this).val()?i(this).closest(".poll-preferences").find(".reset-poll-stats-section").removeClass("hide"):i(this).closest(".poll-preferences").find(".reset-poll-stats-section").addClass("hide")}),i(".reset-poll-stats-on-hidden").datetimepicker({dateFormat:"yy-mm-dd",timeFormat:"HH:mm",onSelect:function(t){var e;e=moment(t,"YYYY-MM-DD HH:mm").unix(),i(".reset-poll-stats-on").val(date(objectL10n.yopPollParams.timeFormat+" "+objectL10n.yopPollParams.dateFormat,e)).change()},onClose:function(){var t;null!==i(".reset-poll-stats-on-hidden").datetimepicker("getDate")&&(t=moment(i(".reset-poll-stats-on-hidden").datetimepicker("getDate")).unix(),i(".reset-poll-stats-on").val(date(objectL10n.yopPollParams.timeFormat+" "+objectL10n.yopPollParams.dateFormat,t)).change())}}),i(".poll-preferences").on("click",".show-reset-poll-stats-on",function(t){i(".reset-poll-stats-on-hidden").datepicker("show"),t.preventDefault()}),i(".poll-notifications").on("change",".send-email-notifications",function(){"yes"===i(this).val()?i(this).closest(".poll-notifications").find(".send-email-notifications-section").removeClass("hide"):i(this).closest(".poll-notifications").find(".send-email-notifications-section").addClass("hide")}),i(".vote-button-label").change(function(){""!==i(this).val()&&i(this).parent().removeClass("has-error")}),i(".results-label-text").change(function(){""!==i(this).val()&&i(this).parent().removeClass("has-error")}),i(".start-date-custom").change(function(){""!==i(this).val()&&i(this).parent().removeClass("has-error")}),i(".end-date-custom").change(function(){""!==i(this).val()&&i(this).parent().removeClass("has-error")}),i(".redirect-url").change(function(){""!==i(this).val()&&i(this).parent().removeClass("has-error")}),i(".email-notifications-from-name").change(function(){""!==i(this).val()&&i(this).parent().removeClass("has-error")}),i(".email-notifications-from-email").change(function(){""!==i(this).val()&&i(this).parent().removeClass("has-error")}),i(".email-notifications-recipients").change(function(){""!==i(this).val()&&i(this).parent().removeClass("has-error")}),i(".email-notifications-subject").change(function(){""!==i(this).val()&&i(this).parent().removeClass("has-error")}),i(".email-notifications-message").change(function(){""!==i(this).val()&&i(this).parent().removeClass("has-error")}),i(".poll-compliance").on("change",".enable-gdpr",function(){"yes"===i(this).val()?(i(this).closest(".poll-compliance").find(".gdpr-solution-section").removeClass("hide"),"consent"===i(".gdpr-solution").val()?i(this).closest(".poll-compliance").find(".gdpr-consent-section").removeClass("hide"):i(this).closest(".poll-compliance").find(".gdpr-consent-section").addClass("hide")):(i(this).closest(".poll-compliance").find(".gdpr-solution-section").addClass("hide"),i(this).closest(".poll-compliance").find(".gdpr-consent-section").addClass("hide"))}),i(".poll-compliance").on("change",".gdpr-solution",function(){"consent"===i(this).val()?i(this).closest(".poll-compliance").find(".gdpr-consent-section").removeClass("hide"):i(this).closest(".poll-compliance").find(".gdpr-consent-section").addClass("hide")})}),jQuery(document).ready(function(a){var s;s=a(".show-results-moment").select2({minimumResultsForSearch:1/0,placeholder:objectL10n.yopPollParams.selectHelperText}),a(".show-results-to").select2({minimumResultsForSearch:1/0,placeholder:objectL10n.yopPollParams.selectHelperText}),a(".results-details-option").select2({minimumResultsForSearch:1/0,placeholder:objectL10n.yopPollParams.selectHelperText}),a(".back-to-vote-option").select2({minimumResultsForSearch:1/0}),a(".sort-results").select2({minimumResultsForSearch:1/0}),a(".sort-results-rule").select2({minimumResultsForSearch:1/0}),a(".display-results-as").select2({minimumResultsForSearch:1/0}),a(".show-results-moment").on("select2:select",function(t){var e,i=a(this).select2("data"),n=[];if("never"===t.params.data.id)s.val("never").trigger("change"),a(".show-results-to-section").addClass("hide"),a(".custom-date-results-section").addClass("hide");else{for(e in i)"never"!==i[e].id&&n.push(i[e].id);s.val(n).trigger("change"),a(".show-results-to-section").removeClass("hide"),"custom-date"===t.params.data.id&&a(".custom-date-results-section").removeClass("hide")}}),a(".show-results-moment").on("select2:unselect",function(t){var e=a(this).select2("data");"custom-date"===t.params.data.id?a(".custom-date-results-section").addClass("hide"):0===e.length&&a(".show-results-to-section").addClass("hide")}),a(".custom-date-results-hidden").datetimepicker({dateFormat:"yy-mm-dd",timeFormat:"HH:mm",onSelect:function(t){var e;e=moment(t,"YYYY-MM-DD HH:mm").unix(),a(".custom-date-results").val(date(objectL10n.yopPollParams.timeFormat+" "+objectL10n.yopPollParams.dateFormat,e)).change()},onClose:function(){var t;null!==a(".custom-date-results-hidden").datetimepicker("getDate")&&(t=moment(a(".custom-date-results-hidden").datetimepicker("getDate")).unix(),a(".custom-date-results").val(date(objectL10n.yopPollParams.timeFormat+" "+objectL10n.yopPollParams.dateFormat,t)).change())}}),a(".custom-date-results-section").on("click",".show-custom-date-results",function(t){a(".custom-date-results-hidden").datepicker("show"),t.preventDefault()}),a(".poll-results-options").on("change",".back-to-vote-option",function(){"yes"===a(this).val()?a(this).closest(".poll-results-options").find(".back-to-vote-caption-section").removeClass("hide"):a(this).closest(".poll-results-options").find(".back-to-vote-caption-section").addClass("hide")}),a(".poll-results-options").on("change",".sort-results",function(){"alphabetical"===a(this).val()||"number-of-votes"===a(this).val()?a(this).closest(".poll-results-options").find(".sort-results-rule-section").removeClass("hide"):a(this).closest(".poll-results-options").find(".sort-results-rule-section").addClass("hide")}),a(".custom-date-results").change(function(){""!==a(this).val()&&a(this).parent().removeClass("has-error")}),a(".back-to-vote-caption").change(function(){""!==a(this).val()&&a(this).parent().removeClass("has-error")}),a(".poll-results-options").on("change",".display-results-as",function(){"pie"===a(this).val()&&(a(this).val("bar").trigger("change.select2"),showUpgradeToPro("pie-results"),event.preventDefault())})});var YOPPollBasicIsVotingEnded,YOPPollBasicIsVotingStarted,YOPPollBasicIsAllowMultipleAnswers,YOPPollBasicIsAnswerDefault,YOPPollBasicIsAnswerLink,YOPPollBasicGetAnswersCount,YOPPollBasicHasGdpr,YOPPollBasicHasCaptcha,YOPPollBasicFormatVotePermissions,YOPPollBasicGetResultsBeforeVoteSettings,YOPPollBasicDoAnonymousVote,YOPPollBasicGetPollElements,YOPPollBasicDoTextQuestion,YOPPollBasicDoVerticalText,YOPPollBasicDoHorizontalText,YOPPollBasicDoColumnsText,YOPPollBasicDoCustomField,YOPPollBasicCreateMediaAnswer,YOPPollBasicDoMediaQuestion,YOPPollBasicDoVerticalMedia,YOPPollBasicDoHorizontalMedia,YOPPollBasicDoColumnsMedia,YOPPollBasicDoSpaceSeparator,YOPPollBasicDoTextBlock,YOPPollBasicShowResultsLink,YOPPollBasicShowBackToVoteLink,YOPPollBasicDoShowTotalVotesAndAnswers,YOPPollBasicProcessElements,YOPPollBasicDoShowResultsBeforeVote,YOPPollBasicShowLivePreviewFor,YOPPollBasicShowLivePreviewForVoting,YOPPollBasicShowLivePreviewForResults,YOPPollDoPrettyBasic,YOPPollRemovePrettyBasic,YOPPollBasicIsResultsShowPercentages,YOPPollBasicIsResultsShowVotes,YOPPollBasicGetClassForColumns,randomMin=1,randomMax=100;jQuery(document).ready(function(b){var y=[[]];YOPPollBasicIsVotingEnded=function(t,e){var i=strtotime(e);return"custom"===t&&parseInt(i,10)<parseInt(objectL10n.yopPollParams.timeNow,10)},YOPPollBasicIsVotingStarted=function(t,e){var i=strtotime(e);return"custom"!==t||!(parseInt(i,10)>parseInt(objectL10n.yopPollParams.timeNow,10))},YOPPollBasicIsAllowMultipleAnswers=function(t){return"yes"===t?"checkbox":"radio"},YOPPollBasicIsAnswerDefault=function(t){return!0===t.is(":checked")?"checked":""},YOPPollBasicIsAnswerLink=function(t,e,i){return!0===t.is(":checked")&&""!==e?'<a href="'+e+'" target="_blank">'+i+"</a>":i},YOPPollBasicGetAnswersCount=function(t){var e=t.find(".answer").length;return"yes"===t.find(".allow-other-answers").val()&&e++,e.toString()},YOPPollBasicFormatVotePermissions=function(t){var e=0,i=[];for(e in t)i.push(t[e].id);return i},YOPPollBasicGetResultsBeforeVoteSettings=function(t){var e,i=[],n=[],a=[];for(e in t["show-results-to"])i.push(t["show-results-to"][e].id);for(e in t["show-results-moment"])n.push(t["show-results-moment"][e].id);for(e in t["show-details-as"])a.push(t["show-details-as"][e].id);return' data-show-results-to="'+i.join()+'" data-show-results-moment="'+n.join()+'" data-show-results-only="false" data-show-results-as="'+t["display-results-as"]+'" data-sort-results-by="'+t["sort-results-by"]+'" data-sort-results-rule="'+t["sort-results-rule"]+'" data-resdet="'+a.join()+'"'},YOPPollBasicGetClassForColumns=function(t){var e="";switch(t){case"2":e="col-xs-6 col-sm-6 col-md-6";break;case"3":e="col-xs-6 col-sm-6 col-md-4";break;case"4":e="col-xs-6 col-sm-6 col-md-3";break;case"5":e="col-xs-6 col-sm-6 cols-5";break;case"6":e="col-xs-6 col-sm-6 col-md-2";break;case"7":e="col-xs-6 col-sm-6 cols-7";break;case"8":e="col-xs-6 col-sm-6 cols-8";break;case"9":e="col-xs-6 col-sm-6 cols-9";break;case"10":e="col-xs-6 col-sm-6 cols-10";break;case"11":e="col-xs-6 col-sm-6 cols-11";break;case"12":e="col-xs-6 col-sm-6 col-md-1"}return e},YOPPollBasicDoAnonymousVote=function(t){var e="";return-1<b.inArray("guest",t)&&(e='<div class="basic-anonymous"><button type="button" class="btn btn-default"><i class="fa fa-user-secret" aria-hidden="true"></i>'+objectL10n.yopPollParams.previewParams.annonymousVoteText+"</button></div>"),e},YOPPollBasicGetPollElements=function(){var i="",n=b(".poll-elements-list").find(".poll-element").length;return b(".poll-elements-list").find(".poll-element").each(function(t){var e=t+1;switch(b(this).attr("data-type")){case"text-question":i+=YOPPollBasicDoTextQuestion(b(this),e);break;case"custom-field":i+=YOPPollBasicDoCustomField(b(this),e);break;case"media-question":i+=YOPPollBasicDoMediaQuestion(b(this),e);break;case"space-separator":i+=YOPPollBasicDoSpaceSeparator(b(this),e);break;case"text-block":i+=YOPPollBasicDoTextBlock(b(this),e)}t<n&&(i+='<div class="clearfix"></div>')}),i},YOPPollBasicDoTextQuestion=function(t,e){var i="",n="";switch(t.find(".answers-display").val()){case"vertical":n="basic-question-text-vertical",i=YOPPollBasicDoVerticalText(t,e);break;case"horizontal":n="basic-question-text-horizontal",i=YOPPollBasicDoHorizontalText(t,e);break;case"columns":n="basic-question-text-columns",i=YOPPollBasicDoColumnsText(t,e)}return'<div class="basic-element basic-question '+n+'" data-id="'+e+'" data-type="question" data-question-type="text" data-min="" data-max="" data-display="'+b(t).find(".answers-display").val()+'"><div class="basic-question-title"><h5 style="color:'+b(".questions-style-settings").find(".questions-text-color").val()+"; font-size:"+b(".questions-style-settings").find(".questions-text-size").val()+"px; font-weight:"+b(".questions-style-settings").find(".questions-text-weight").val()+"; text-align:"+b(".questions-style-settings").find(".questions-text-align").val()+';">'+t.find(".question-value").val()+"</h5></div>"+i+"</div>"},YOPPollBasicDoVerticalText=function(t,i){var n,a,s,o='<ul class="basic-answers">';return n=YOPPollBasicIsAllowMultipleAnswers(t.find(".allow-multiple-answers").val()),t.find(".answer").each(function(t){var e=Math.floor(Math.random()*(randomMax-randomMin+1))+randomMin;s=YOPPollBasicIsAnswerDefault(b(this).find(".answer-is-default")),a=YOPPollBasicIsAnswerLink(b(this).find(".answer-make-link"),b(this).find(".answer-link").val(),b(this).find(".answer-value").val()),o+='<li class="basic-answer" style="padding:'+b(".answers-style-settings").find(".answers-padding-top-bottom").val()+"px "+b(".answers-style-settings").find(".answers-padding-left-right").val()+'px;" data-id="'+t+'" data-type="text" data-vn="'+e+'" data-color="'+b(this).find(".answer-results-color").val()+'"><div class="basic-answer-content basic-text-vertical"><input type="'+n+'" name="answer['+i+']" value="'+t+'"'+s+'><label class="basic-text" style="color:'+b(".answers-style-settings").find(".answers-text-color").val()+"; font-size:"+b(".answers-style-settings").find(".answers-text-size").val()+"px; font-weight:"+b(".answers-style-settings").find(".answers-text-weight").val()+';">'+a+"</label></div></li>"}),"yes"===t.find(".allow-other-answers").val()&&(o+='<li class="basic-answer basic-other-answer" style="padding:'+b(".answers-style-settings").find(".answers-padding-top-bottom").val()+"px "+b(".answers-style-settings").find(".answers-padding-left-right").val()+'px;""><div class="basic-answer-content basic-text-vertical"><input type="'+n+'" name="answer['+i+']" value="0"><label class="basic-text" style="color:'+b(".answers-style-settings").find(".answers-text-color").val()+"; font-size:"+b(".answers-style-settings").find(".answers-text-size").val()+"px; font-weight:"+b(".answers-style-settings").find(".answers-text-weight").val()+';">'+t.find(".other-answers-label").val()+'</label></div><div class="col-md-6 col-sm-6 col-xs-12"><input class="basic-input-text form-control" type="text" name="answer['+i+']" data-type="other-answer"></div></li>'),o+="</ul>"},YOPPollBasicDoHorizontalText=function(t,i){var n,a,s,o=YOPPollBasicGetClassForColumns(YOPPollBasicGetAnswersCount(t)),r='<ul class="basic-answers basic-h-answers">';return answersCount=YOPPollBasicGetAnswersCount(t),n=YOPPollBasicIsAllowMultipleAnswers(t.find(".allow-multiple-answers").val()),t.find(".answer").each(function(t){var e=Math.floor(Math.random()*(randomMax-randomMin+1))+randomMin;s=YOPPollBasicIsAnswerDefault(b(this).find(".answer-is-default")),a=YOPPollBasicIsAnswerLink(b(this).find(".answer-make-link"),b(this).find(".answer-link").val(),b(this).find(".answer-value").val()),r+='<li class="basic-answer '+o+'" style="padding:'+b(".answers-style-settings").find(".answers-padding-top-bottom").val()+"px "+b(".answers-style-settings").find(".answers-padding-left-right").val()+'px;" data-id="'+t+'" data-type="text" data-vn="'+e+'" data-color="'+b(this).find(".answer-results-color").val()+'""><div class="basic-answer-content basic-text-horizontal"><input type="'+n+'" name="answer['+i+']" value="'+t+'"'+s+'><label class="basic-text" style="color:'+b(".answers-style-settings").find(".answers-text-color").val()+"; font-size:"+b(".answers-style-settings").find(".answers-text-size").val()+"px; font-weight:"+b(".answers-style-settings").find(".answers-text-weight").val()+';">'+a+"</label></div></li>"}),"yes"===t.find(".allow-other-answers").val()&&(r+='<li class="basic-answer basic-other-answer '+o+'" style="padding:'+b(".answers-style-settings").find(".answers-padding-top-bottom").val()+"px "+b(".answers-style-settings").find(".answers-padding-left-right").val()+'px;""><div class="basic-answer-content basic-text-horizontal"><input type="'+n+'" name="answer['+(answersCount+1)+']" value="0"><label class="basic-text" style="color:'+b(".answers-style-settings").find(".answers-text-color").val()+"; font-size:"+b(".answers-style-settings").find(".answers-text-size").val()+"px; font-weight:"+b(".answers-style-settings").find(".answers-text-weight").val()+';">'+t.find(".other-answers-label").val()+'</label></div><div class="col-xs-12"><input class="basic-input-text form-control" type="text" name="answer['+i+']" data-type="other-answer"></div></li>'),r+="</ul>"},YOPPollBasicDoColumnsText=function(t,i){var n,a,s="",o="",e=YOPPollBasicGetAnswersCount(t),r=YOPPollBasicGetClassForColumns(t.find(".answers-columns").val());return n=YOPPollBasicIsAllowMultipleAnswers(t.find(".allow-multiple-answers").val()),a='<ul class="basic-answers basic-h-answers basic-cols-display">',t.find(".answer").each(function(t){var e=Math.floor(Math.random()*(randomMax-randomMin+1))+randomMin;o=YOPPollBasicIsAnswerDefault(b(this).find(".answer-is-default")),s=YOPPollBasicIsAnswerLink(b(this).find(".answer-make-link"),b(this).find(".answer-link").val(),b(this).find(".answer-value").val()),a+='<li class="basic-answer '+r+'" style="padding:'+b(".answers-style-settings").find(".answers-padding-top-bottom").val()+"px "+b(".answers-style-settings").find(".answers-padding-left-right").val()+'px;" data-id="'+t+'" data-type="text" data-vn="'+e+'" data-color="'+b(this).find(".answer-results-color").val()+'""><div class="basic-answer-content basic-text-horizontal"><input type="'+n+'" name="answer['+i+']" value="'+t+'"'+o+'><label class="basic-text" style="color:'+b(".answers-style-settings").find(".answers-text-color").val()+"; font-size:"+b(".answers-style-settings").find(".answers-text-size").val()+"px; font-weight:"+b(".answers-style-settings").find(".answers-text-weight").val()+';">'+s+"</label></div></li>"}),"yes"===t.find(".allow-other-answers").val()&&(a+='<li class="basic-answer basic-other-answer '+r+'" style="padding:'+b(".answers-style-settings").find(".answers-padding-top-bottom").val()+"px "+b(".answers-style-settings").find(".answers-padding-left-right").val()+'px;""><div class="basic-answer-content basic-text-horizontal"><input type="'+n+'" name="answer['+(e+1)+']" value="0"><label class="basic-text" style="color:'+b(".answers-style-settings").find(".answers-text-color").val()+"; font-size:"+b(".answers-style-settings").find(".answers-text-size").val()+"px; font-weight:"+b(".answers-style-settings").find(".answers-text-weight").val()+';">'+t.find(".other-answers-label").val()+'</label></div><div class="col-xs-12"><input class="basic-input-text form-control" type="text" name="answer['+i+']" data-type="other-answer"></div></li>'),a+="</ul>"},YOPPollBasicDoCustomField=function(t,e){return'<div class="basic-element basic-custom-field" data-id="" data-type="custom-field" data-required=""><div class="basic-custom-field-title"><label>'+t.find(".custom-field-name").val()+'</label></div><div class="col-md-6 col-sm-6 col-xs-12"><input type="text" name="cfield[]" class="basic-input-text form-control" data-type="cfield"></div></div>'},YOPPollBasicCreateMediaAnswer=function(t,e,i,n){var a,s=b(e).find(".answer-type").val(),o=YOPPollBasicIsAnswerDefault(b(e).find(".answer-is-default")),r="";switch(b(e).closest(".poll-element.question").find(".answers-display").val()){case"vertical":switch(s){case"image":r="basic-vertical-image";break;case"video":r="basic-vertical-video"}break;case"horizontal":switch(s){case"image":r="basic-horizontal-image";break;case"video":r="basic-horizontal-video"}break;case"columns":switch(s){case"image":r="basic-columns-image";break;case"video":r="basic-columns-video"}}switch(s){case"image":a='<div class="basic-answer-content '+r+'"><div class="basic-media"><img class="img-responsive" src="'+b(e).find(".answer-link").val()+'" alt="'+b(e).find(".media-answer-text").val()+'"></div><div class="media-description"><input type="'+i+'" name="answer['+t+']" value="'+n+'"'+o+'><p class="basic-media-text" style="color:'+b(".answers-style-settings").find(".answers-text-color").val()+"; font-size:"+b(".answers-style-settings").find(".answers-text-size").val()+"px; font-weight:"+b(".answers-style-settings").find(".answers-text-weight").val()+';">'+b(e).find(".media-answer-text").val()+"</p></div></div>";break;case"video":a='<div class="basic-answer-content '+r+'"><div class="basic-embed-responsive">'+b(e).find(".answer-embed").val()+'</div><div class="media-description"><input type="'+i+'" name="answer['+t+']" value="'+n+'"'+o+'><p class="basic-media-text" style="color:'+b(".answers-style-settings").find(".answers-text-color").val()+"; font-size:"+b(".answers-style-settings").find(".answers-text-size").val()+"px; font-weight:"+b(".answers-style-settings").find(".answers-text-weight").val()+';">'+b(e).find(".media-answer-text").val()+"</p></div></div>"}return a},YOPPollBasicDoMediaQuestion=function(t,e){var i="",n="";switch(t.find(".answers-display").val()){case"vertical":n="basic-question-media-vertical",i=YOPPollBasicDoVerticalMedia(t,e);break;case"horizontal":n="basic-question-media-horizontal",i=YOPPollBasicDoHorizontalMedia(t,e);break;case"columns":n="basic-question-media-columns",i=YOPPollBasicDoColumnsMedia(t,e)}return'<div class="basic-element basic-question '+n+'" data-id="'+e+'" data-type="question" data-question-type="media" data-min="" data-max="" data-display="'+b(t).find(".answers-display").val()+'"><div class="basic-question-title"><h5 style="color:'+b(".questions-style-settings").find(".questions-text-color").val()+"; font-size:"+b(".questions-style-settings").find(".questions-text-size").val()+"px; font-weight:"+b(".questions-style-settings").find(".questions-text-weight").val()+"; text-align:"+b(".questions-style-settings").find(".questions-text-align").val()+';">'+t.find(".question-value").val()+"</h5></div>"+i+"</div>"},YOPPollBasicDoVerticalMedia=function(t,i){var n,a,s,o=b(t).find(".answer-type").val();return s='<ul class="basic-answers basic-media-list">',n=YOPPollBasicIsAllowMultipleAnswers(t.find(".allow-multiple-answers").val()),t.find(".answer").each(function(t){var e=Math.floor(Math.random()*(randomMax-randomMin+1))+randomMin;a=YOPPollBasicCreateMediaAnswer(i,b(this),n,t),s+='<li class="basic-answer" style="padding:'+b(".answers-style-settings").find(".answers-padding-top-bottom").val()+"px "+b(".answers-style-settings").find(".answers-padding-left-right").val()+'px;" data-id="'+t+'" data-type="'+o+'" data-vn="'+e+'" data-color="'+b(this).find(".answer-results-color").val()+'">'+a+"</li>"}),"yes"===t.find(".allow-other-answers").val()&&(s+='<li class="basic-answer basic-other-answer" style="padding:'+b(".answers-style-settings").find(".answers-padding-top-bottom").val()+"px "+b(".answers-style-settings").find(".answers-padding-left-right").val()+'px;"><div class="basic-answer-content basic-text-vertical"><input type="'+n+'" name="answer['+i+']" value="0"><label class="basic-text" style="color:'+b(".answers-style-settings").find(".answers-text-color").val()+"; font-size:"+b(".answers-style-settings").find(".answers-text-size").val()+"px; font-weight:"+b(".answers-style-settings").find(".answers-text-weight").val()+';">'+t.find(".other-answers-label").val()+'</label></div><div class="col-md-6 col-sm-6 col-xs-12"><input class="basic-input-text form-control" type="text" name="answer['+i+']" data-type="other-answer"></div></li>'),s+="</ul>"},YOPPollBasicDoHorizontalMedia=function(t,i){var n,a=b(t).find(".answer-type").val(),s=YOPPollBasicGetClassForColumns(YOPPollBasicGetAnswersCount(t)),o='<ul class="basic-answers basic-media-list">';return n=YOPPollBasicIsAllowMultipleAnswers(t.find(".allow-multiple-answers").val()),t.find(".answer").each(function(t){var e=Math.floor(Math.random()*(randomMax-randomMin+1))+randomMin;answerContent=YOPPollBasicCreateMediaAnswer(i,b(this),n,t),answerSelected=YOPPollBasicIsAnswerDefault(b(this).find(".answer-is-default")),o+='<li class="basic-answer '+s+'" style="padding:'+b(".answers-style-settings").find(".answers-padding-top-bottom").val()+"px "+b(".answers-style-settings").find(".answers-padding-left-right").val()+'px;" data-id="'+t+'" data-type="'+a+'" data-vn="'+e+'" data-color="'+b(this).find(".answer-results-color").val()+'"">'+answerContent+"</li>"}),"yes"===t.find(".allow-other-answers").val()&&(o+='<li class="basic-answer '+s+'" style="padding:'+b(".answers-style-settings").find(".answers-padding-top-bottom").val()+"px "+b(".answers-style-settings").find(".answers-padding-left-right").val()+'px;"><div class="basic-answer-content basic-text-vertical"><input type="'+n+'" name="answer['+i+']" value="0"><label class="basic-text" style="color:'+b(".answers-style-settings").find(".answers-text-color").val()+"; font-size:"+b(".answers-style-settings").find(".answers-text-size").val()+"px; font-weight:"+b(".answers-style-settings").find(".answers-text-weight").val()+';">'+t.find(".other-answers-label").val()+'</label></div><div class="col-md-6 col-sm-6 col-xs-12"><input class="basic-input-text form-control" type="text" name="answer['+i+']" data-type="other-answer"></div></li>'),o+="</ul>"},YOPPollBasicDoColumnsMedia=function(t,i){var n,a,s=b(t).find(".answer-type").val(),o=YOPPollBasicGetClassForColumns(t.find(".answers-columns").val());return n=YOPPollBasicIsAllowMultipleAnswers(t.find(".allow-multiple-answers").val()),a='<ul class="basic-answers basic-media-list basic-cols-display">',t.find(".answer").each(function(t){var e=Math.floor(Math.random()*(randomMax-randomMin+1))+randomMin;answerSelected=YOPPollBasicIsAnswerDefault(b(this).find(".answer-is-default")),answerContent=YOPPollBasicCreateMediaAnswer(i,b(this),n,t),a+='<li class="basic-answer '+o+'" style="padding:'+b(".answers-style-settings").find(".answers-padding-top-bottom").val()+"px "+b(".answers-style-settings").find(".answers-padding-left-right").val()+'px;" data-id="'+t+'" data-type="'+s+'" data-vn="'+e+'" data-color="'+b(this).find(".answer-results-color").val()+'"">'+answerContent+"</li>"}),"yes"===t.find(".allow-other-answers").val()&&(a+='<li class="basic-answer basic-other-answer '+o+'" style="padding:'+b(".answers-style-settings").find(".answers-padding-top-bottom").val()+"px "+b(".answers-style-settings").find(".answers-padding-left-right").val()+'px;""><div class="basic-answer-content basic-text-horizontal"><input type="'+n+'" name="answer['+i+']" value="0"><label class="basic-text" style="color:'+b(".answers-style-settings").find(".answers-text-color").val()+"; font-size:"+b(".answers-style-settings").find(".answers-text-size").val()+"px; font-weight:"+b(".answers-style-settings").find(".answers-text-weight").val()+';">'+t.find(".other-answers-label").val()+'</label></div><div class="col-xs-12"><input class="basic-input-text form-control" type="text" name="answer['+i+']" data-type="other-answer"></div></li>'),a+="</ul>"},YOPPollBasicDoSpaceSeparator=function(t,e){return'<div class="basic-element basic-separator basic-space clearfix" data-type="space-separator"></div>'},YOPPollBasicDoTextBlock=function(t,e){return'<div class="basic-element basic-text-block" data-type="text-block">'+t.find(".text-block-text").val()+"</div>"},YOPPollBasicProcessElements=function(t){"yes"===b(".enable-gdpr").val()&&"consent"===b(".gdpr-solution").val()?b(t).find(".basic-gdpr").show():b(t).find(".basic-gdpr").hide(),"yes"===b(".show-total-votes").val()||"yes"===b(".show-total-answers").val()?b(t).find(".basic-stats").show():b(t).find(".basic-stats").hide(),"yes"===b(".show-total-votes").val()?(b(t).find(".basic-stats-votes").show(),"yes"===b(".show-total-answers").val()?b(t).find(".basic-stats-separator").show():b(t).find(".basic-stats-separator").hide()):(b(t).find(".basic-stats-votes").hide(),b(t).find(".basic-stats-separator").hide()),"yes"===b(".show-total-answers").val()?b(t).find(".basic-stats-answers").show():b(t).find(".basic-stats-answers").hide(),"yes"===b(".show-results-link").val()?b(t).find(".basic-results-button").css("display","inline-block"):b(t).find(".basic-results-button").css("display","none"),b(t).find(".basic-back-to-vote-button").css("display","none")},YOPPollBasicBuildAnswerResultsDetails=function(t,e,i){var n="";return-1!==t.indexOf("percentages")&&(n=(n=0<i?100*e/i:0)===Math.round(n)?Math.round(n)+"%":Number(Math.round(n+"e2")+"e-2").toFixed(2)+"%"),-1!==t.indexOf("votes-number")&&(n+=" ("+e+" "+(1===parseInt(e,10)?objectL10n.yopPollParams.resultsParams.singleVote:objectL10n.yopPollParams.resultsParams.multipleVotes)+")"),n},YOPPollBasicIsResultsShowPercentages=function(t,e,i){var n=[];return-1!==b(t).attr("data-resdet").indexOf("percentages")?(n.show=!0,n.content=0<i?100*e/i:0,n.content===Math.round(n.content)?n.content=Math.round(n.content)+"%":n.content=Number(Math.round(n.content+"e2")+"e-2").toFixed(2)+"%"):(n.show=!1,n.content=""),n},YOPPollBasicIsResultsShowVotes=function(t,e){var i=[];return-1!==b(t).attr("data-resdet").indexOf("votes-number")?(i.show=!0,1===parseInt(e,10)?votesText=objectL10n.yopPollParams.resultsParams.singleVote:votesText=objectL10n.yopPollParams.resultsParams.multipleVotes,i.content=" ("+e+" "+votesText+")"):(i.show=!1,i.content=""),i},YOPPollBasicDoShowResultsBeforeVote=function(p){var f=b(p).attr("data-show-results-as"),m=b(p).attr("data-sort-results-by"),g=b(p).attr("data-sort-results-rule"),v=b(p).attr("data-resdet");y[1]=[],b(p).find(".basic-question").each(function(){var t,e,n,a=b(this).attr("data-id"),s=b(this).attr("data-question-type"),o=[],r=[],l=[],d=[],c=[],u=[],h=0;switch(i=0,b(this).find('.basic-answer:not(".basic-other-answer")').each(function(t){var e={};e.id=b(this).attr("data-id"),e.label="text"===s?b(this).find(".basic-text").text():"pie"===f?b(this).find(".basic-media-text").text():b(this).find(".basic-media-content").html(),e.backgroundColor=b(this).attr("data-color"),e.votes=parseInt(b(this).attr("data-vn"),10),o.push(e),h+=e.votes}),g){case"asc":g="ASC";break;case"desc":g="DESC";break;default:g="ASC"}switch(m){case"alphabetical":u=helper.arr.multisort(o,["label"],[g]);break;case"number-of-votes":u=helper.arr.multisort(o,["votes"],[g]);break;default:u=o}for(i=0;i<u.length;i++)r.push(u[i].id),l.push(u[i].label+" "+YOPPollBasicBuildAnswerResultsDetails(v,u[i].votes,h)),c.push(u[i].votes),d.push(u[i].backgroundColor);switch(n={labels:l,datasets:[{data:c,backgroundColor:d}]},f){case"bar":for(i=0;i<l.length;i++)answerResultsPercentages=YOPPollBasicIsResultsShowPercentages(p,c[i],h),answerResultsVotes=YOPPollBasicIsResultsShowVotes(p,c[i]),!0===answerResultsPercentages.show&&("text"===s?b(this).find(".basic-answer[data-id="+r[i]+"]").find(".basic-answer-content").append('<label class="basic-answer-results-details">'+answerResultsPercentages.content+"</label>"):b(this).find(".basic-answer[data-id="+r[i]+"]").find(".media-description").append('<label class="basic-answer-results-details">'+answerResultsPercentages.content+"</label>")),!0===answerResultsVotes.show&&("text"===s?b(this).find(".basic-answer[data-id="+r[i]+"]").find(".basic-answer-content").append('<label class="basic-answer-total-votes">'+answerResultsVotes.content+"</label>"):(answerResultsPercentages.show,b(this).find(".basic-answer[data-id="+r[i]+"]").find(".media-description").append('<label class="basic-answer-total-votes">'+answerResultsVotes.content+"</label>"))),b(this).find(".basic-answer[data-id="+r[i]+"]").append('<div class="progress" style=""><div class="progress-bar six-sec-ease-in-out" role="progressbar" data-transitiongoal="'+c[i]+'" aria-valuemax="'+h+'" style="background-image:none; background-color: '+d[i]+';"></div></div>');b(this).find(".progress .progress-bar").yopprogressbar();break;case"pie":b(this).find(".basic-question-title").after('<div class="basic-chart-container" style="position: relative; height:100%; width:100%"><canvas id="question-results-'+a+'"></canvas></div>'),t=b(this).find("#question-results-"+a),e=new Chart(t,{type:"pie",data:n,options:{animateScale:!0,responsive:!0,maintainAspectRatio:!0,legend:{position:"bottom"}}}),y[1].push(e)}})},YOPPollBasicClearResults=function(t){var e=b(t).attr("data-id");if(void 0!==y[e])for(i=1;i<=y[e].length;i++)y[e][i-1].destroy(),y[e].splice(i-1,1);b(t).find(".basic-answer-results-details").remove(),b(t).find(".basic-answer-total-votes").remove(),b(t).find(".progress").remove(),b(t).find(".basic-answer-results").remove(),b(t).find(".basic-chart-container").remove()},YOPPollDoPrettyBasic=function(t){var e=b(t).attr("data-skin"),i=b(t).attr("data-cscheme");i="black"===i?"":"-"+i,b(t).find('input[type="radio"]').iCheck({checkboxClass:"icheckbox_"+e+i,radioClass:"iradio_"+e+i}),b(t).find('input[type="checkbox"]').iCheck({checkboxClass:"icheckbox_"+e+i,radioClass:"iradio_"+e+i})},YOPPollRemovePrettyBasic=function(t){b(t).find('input[type="radio"]').iCheck("destroy"),b(t).find('input[type="checkbox"]').iCheck("destroy")},YOPPollBasicShowLivePreviewFor=function(t,e){switch(t){case"voting":YOPPollBasicShowLivePreviewForVoting(e);break;case"results":YOPPollBasicShowLivePreviewForResults(e);break;default:YOPPollBasicShowLivePreviewForVoting(e)}},YOPPollBasicShowLivePreviewForVoting=function(t){var e=b(t).attr("data-temp"),i=b(t).attr("data-show-results-moment");YOPPollBasicClearResults(t),b(t).find(".basic-answers").show(),b(t).find(".basic-results-button").hide(),b(t).find(".basic-vote-button").show(),b(t).find(".basic-element").show(),b(t).find('input[type="radio"]').show(),b(t).find('input[type="checkbox"]').show(),b(t).find(".basic-other-answer").show(),b(t).find(".basic-captcha").show(),YOPPollBasicProcessElements(t),"basic-pretty"===e&&(b(t).find(".basic-answer").find('div[class^="iradio_"]').show(),YOPPollDoPrettyBasic(t)),void 0!==i&&-1!==b(t).attr("data-show-results-moment").indexOf("before-vote")&&YOPPollBasicDoShowResultsBeforeVote(t),event.preventDefault()},YOPPollBasicBuildDataForResults=function(t){var n=[];return b(t).find(".basic-question").each(function(){var e={},i=b(this);e.id=b(this).attr("data-id"),e.type=b(this).attr("data-question-type"),e.text=b(this).find(".basic-question-title").text(),e.answers=[],b(this).find(".basic-answers").find(".basic-answer").not(".basic-other-answer").each(function(){var t=[];t.id=b(this).attr("data-id"),"media"===b(i).attr("data-question-type")?t.text=b(this).find(".basic-media-text").text():t.text=b(this).find(".basic-text").text(),t.type=b(this).attr("data-type"),t.color=b(this).attr("data-color"),t.votes=b(this).attr("data-vn"),e.answers.push(t)}),n.push(e)}),n},YOPPollBasicShowLivePreviewForResults=function(t){YOPPollBasicClearResults(t),"pie"===b(".display-results-as").val()&&b(t).find(".basic-answers").hide(),b(t).find(".basic-answer").find('input[type="radio"]').hide(),b(t).find(".basic-answer").find('input[type="checkbox"]').hide(),b(t).find(".basic-answer").find('div[class^="iradio_"]').hide(),b(t).find(".basic-other-answer").hide(),b(t).find(".basic-gdpr").hide(),b(t).find(".basic-captcha").hide(),b(t).find(".basic-vote-button").hide(),b(t).find(".basic-results-button").hide(),"yes"===b(".back-to-vote-option").val()&&b(t).find(".basic-back-to-vote-button").show(),YOPPollBasicDoShowResultsBeforeVote(t)}}),jQuery(document).ready(function(r){YOPPollBasicShowLivePreview=function(){var t,e,i,n,a,s=[],o={accessibilityAlt:objectL10n.yopPollParams.captchaParams.accessibilityAlt,accessibilityTitle:objectL10n.yopPollParams.captchaParams.accessibilityTitle,accessibilityDescription:objectL10n.yopPollParams.captchaParams.accessibilityDescription,explanation:objectL10n.yopPollParams.captchaParams.explanation,refreshAlt:objectL10n.yopPollParams.captchaParams.refreshAlt,refreshTitle:objectL10n.yopPollParams.captchaParams.refreshTitle};return s["show-results-to"]=r(".show-results-to").select2("data"),s["show-results-moment"]=r(".show-results-moment").select2("data"),s["display-results-as"]=r(".display-results-as").val(),s["sort-results-by"]=r(".sort-results").val(),s["sort-results-rule"]=r(".sort-results-rule").val(),s["show-details-as"]=r(".results-details-option").select2("data"),e=YOPPollBasicGetResultsBeforeVoteSettings(s),!0===YOPPollBasicIsVotingEnded(r(".end-date-option").val(),r(".end-date-custom-hidden").val())?t='<div class="bootstrap-yop"><div class="basic-yop-poll-container" style="background-color:'+r(".poll-style-settings").find(".poll-background-color").val()+";border:"+r(".poll-style-settings").find(".poll-border-size").val()+"px;border-style:solid;border-color:"+r(".poll-style-settings").find(".poll-border-color").val()+";border-radius:"+r(".poll-style-settings").find(".poll-border-radius").val()+"px;padding:"+r(".poll-style-settings").find(".poll-padding-top-bottom").val()+"px; "+r(".poll-style-settings").find(".poll-padding-left-right").val()+'"><div class="row"><div class="col-md-12"><div class="basic-inner"><div class="basic-message" style="border-left:'+r(".errors-style-settings").find(".errors-border-left-size").val()+"px solid "+r(".errors-style-settings").find(".errors-border-left-color-for-error").val()+"; padding:"+r(".errors-style-settings").find(".errors-padding-top-bottom").val()+'px 10px;"><p style="color:'+r(".errors-style-settings").find(".errors-text-color").val()+"; font-size:"+r(".errors-style-settings").find(".errors-text-size").val()+"px; font-weight:"+r(".errors-style-settings").find(".errors-text-weight").val()+';">'+objectL10n.yopPollParams.votingEnded+"</p></div></div></div></div></div>":(t=!1===YOPPollBasicIsVotingStarted(r(".start-date-option").val(),r(".start-date-custom-hidden").val())?'<div class="bootstrap-yop"><div class="basic-yop-poll-container" style="background-color:'+r(".poll-style-settings").find(".poll-background-color").val()+";border:"+r(".poll-style-settings").find(".poll-border-size").val()+"px;border-style:solid;border-color:"+r(".poll-style-settings").find(".poll-border-color").val()+";border-radius:"+r(".poll-style-settings").find(".poll-border-radius").val()+"px;padding:"+r(".poll-style-settings").find(".poll-padding-top-bottom").val()+"px; "+r(".poll-style-settings").find(".poll-padding-left-right").val()+'"><div class="row"><div class="col-md-12"><div class="basic-inner"><div class="basic-message" style="border-left:'+r(".errors-style-settings").find(".errors-border-left-size").val()+"px solid "+r(".errors-style-settings").find(".errors-border-left-color-for-error").val()+"; padding:"+r(".errors-style-settings").find(".errors-padding-top-bottom").val()+'px 10px;"><p style="color:'+r(".errors-style-settings").find(".errors-text-color").val()+"; font-size:"+r(".errors-style-settings").find(".errors-text-size").val()+"px; font-weight:"+r(".errors-style-settings").find(".errors-text-weight").val()+';">'+objectL10n.yopPollParams.votingNotStarted+"</p></div></div></div></div></div>":(n=YOPPollBasicGetPollElements(),'<div class="bootstrap-yop"><div class="basic-yop-poll-container" style="background-color:'+r(".poll-style-settings").find(".poll-background-color").val()+"; border:"+r(".poll-style-settings").find(".poll-border-size").val()+"px; border-style:solid; border-color:"+r(".poll-style-settings").find(".poll-border-color").val()+"; border-radius:"+r(".poll-style-settings").find(".poll-border-radius").val()+"px; padding:"+r(".poll-style-settings").find(".poll-padding-top-bottom").val()+"px "+r(".poll-style-settings").find(".poll-padding-left-right").val()+'px"'+e+' data-uid="" data-temp="'+r('li[data-template-id="'+r('input[name="poll[template]"]').val()+'"]').attr("data-template-base")+'" data-skin="'+r(".answers-style-settings").find(".answers-skin").val()+'" data-cscheme="'+r(".answers-style-settings").find(".color-scheme").find("li.active").attr("data-id")+'"><div class="row"><div class="col-md-12"><div class="basic-inner"><div class="basic-message hide" style="border-left:'+r(".errors-style-settings").find(".errors-border-left-size").val()+"px solid "+r(".errors-style-settings").find(".errors-border-left-color-for-error").val()+"; padding:"+r(".errors-style-settings").find(".errors-padding-top-bottom").val()+'px 10px;"><p></p></div><div class="basic-overlay hide"><div class="basic-vote-options"><div class="basic-anonymous"><button type="button" class="btn btn-default"><i class="fa fa-user-secret" aria-hidden="true"></i>'+objectL10n.yopPollParams.previewParams.annonymousVoteText+'</button></div><div class="basic-wordpress"><button type="button" class="btn btn-default"><i class="fa fa-wordpress" aria-hidden="true"></i>'+objectL10n.yopPollParams.previewParams.wordpressVoteText+'</button></div><div class="basic-facebook"><button type="button" class="btn btn-default"><i class="fa fa-facebook" aria-hidden="true"></i>'+objectL10n.yopPollParams.previewParams.facebookVoteText+'</button></div><div class="basic-google"><button type="button" class="btn btn-default"><i class="fa fa-google" aria-hidden="true"></i>'+objectL10n.yopPollParams.previewParams.googleVoteText+'</button></div></div><div class="basic-preloader hide"><div class="basic-windows8"><div class="basic-wBall basic-wBall_1"><div class="basic-wInnerBall"></div></div><div class="basic-wBall basic-wBall_2"><div class="basic-wInnerBall"></div></div><div class="basic-wBall basic-wBall_3"><div class="basic-wInnerBall"></div></div><div class="basic-wBall basic-wBall_4"><div class="basic-wInnerBall"></div></div><div class="basic-wBall basic-wBall_5"><div class="basic-wInnerBall"></div></div></div></div></div><form class="basic-form"><div class="basic-elements">'+n+'</div><div class="clearfix"></div><div class="basic-gdpr"><input type="checkbox" name="gdpr-consent"><label>'+r(".gdpr-consent-text").val()+'</label></div><div id="yop-poll-captcha" class="basic-captcha"></div><div class="basic-stats text-center"><span class="basic-stats-votes"><span class="basic-stats-votes-number">10</span><span class="basic-stats-votes-text">&nbsp;'+objectL10n.yopPollParams.previewParams.numberOfVotesPlural+'</span></span><span class="basic-stats-separator">&nbsp;&middot;&nbsp;</span><span class="basic-stats-answers"><span class="basic-stats-answers-number">14</span><span class="basic-stats-answers-text">&nbsp;'+objectL10n.yopPollParams.previewParams.numberOfAnswersPlural+'</span></span></div><div class="basic-vote"><a href="#" class="button basic-vote-button" style="background:'+r(".buttons-style-settings").find(".buttons-background-color").val()+"; border:"+r(".buttons-style-settings").find(".buttons-border-size").val()+"px; border-style: solid; border-color:"+r(".buttons-style-settings").find(".buttons-border-color").val()+"; border-radius:"+r(".buttons-style-settings").find(".buttons-border-radius").val()+"px; padding:"+r(".buttons-style-settings").find(".buttons-padding-top-bottom").val()+"px "+r(".buttons-style-settings").find(".buttons-padding-left-right").val()+"px; color:"+r(".buttons-style-settings").find(".buttons-text-color").val()+"; font-size:"+r(".buttons-style-settings").find(".buttons-text-size").val()+"px; font-weight:"+r(".buttons-style-settings").find(".buttons-text-weight").val()+';">'+r(".vote-button-label").val()+'</a><a href="#" class="button basic-results-button" style="background:'+r(".buttons-style-settings").find(".buttons-background-color").val()+"; border:"+r(".buttons-style-settings").find(".buttons-border-size").val()+"px; border-style: solid; border-color:"+r(".buttons-style-settings").find(".buttons-border-color").val()+"; border-radius:"+r(".buttons-style-settings").find(".buttons-border-radius").val()+"px; padding:"+r(".buttons-style-settings").find(".buttons-padding-top-bottom").val()+"px "+r(".buttons-style-settings").find(".buttons-padding-left-right").val()+"px; color:"+r(".buttons-style-settings").find(".buttons-text-color").val()+"; font-size:"+r(".buttons-style-settings").find(".buttons-text-size").val()+"px; font-weight:"+r(".buttons-style-settings").find(".buttons-text-weight").val()+';">'+r(".results-label-text").val()+'</a><a href="#" class="button basic-back-to-vote-button" style="background:'+r(".buttons-style-settings").find(".buttons-background-color").val()+"; border:"+r(".buttons-style-settings").find(".buttons-border-size").val()+"px; border-style: solid; border-color:"+r(".buttons-style-settings").find(".buttons-border-color").val()+"; border-radius:"+r(".buttons-style-settings").find(".buttons-border-radius").val()+"px; padding:"+r(".buttons-style-settings").find(".buttons-padding-top-bottom").val()+"px "+r(".buttons-style-settings").find(".buttons-padding-left-right").val()+"px; color:"+r(".buttons-style-settings").find(".buttons-text-color").val()+"; font-size:"+r(".buttons-style-settings").find(".buttons-text-size").val()+"px; font-weight:"+r(".buttons-style-settings").find(".buttons-text-weight").val()+';">'+r(".back-to-vote-caption").val()+"</a></div></form></div></div></div>"),""!==r(".custom-styles-custom-css").val()&&(r("#yop-poll-custom-css").remove(),r("head").append('<style type="text/css" id="yop-poll-custom-css">'+r(".custom-styles-custom-css").val()+"</style>"))),modalPreview=BootstrapDialog.show({title:objectL10n.yopPollParams.previewParams.pollPreviewTitle,cssClass:"preview-dialog",message:'<div class="row"><div class="col-md-3">'+objectL10n.yopPollParams.previewParams.choosePreviewText+'</div><div class="col-md-9"><select class="show-preview-for" style="width:100%"><option value="voting" selected>'+objectL10n.yopPollParams.previewParams.votingText+'</option><option value="results">'+objectL10n.yopPollParams.previewParams.resultsText+'</option></select></div></div><div class="row"><div class="col-md-12"><p>&nbsp;</p></div></div>'+t,onshow:function(t){switch(void 0!==(i=t.getModalBody().find(".basic-yop-poll-container").attr("data-show-results-moment"))&&-1!==i.indexOf("before-vote")&&YOPPollBasicDoShowResultsBeforeVote(t.getModalBody().find(".basic-yop-poll-container")),r(".use-captcha").val()){case"yes":t.getModalBody().find("#yop-poll-captcha").visualCaptcha({imgPath:objectL10n.yopPollParams.captchaParams.imgPath,captcha:{url:objectL10n.yopPollParams.captchaParams.url,numberOfImages:5,namespace:"yop-poll-captcha",routes:{start:"?_a=start",image:"?_a=image",audio:"?_a=audio"},callbacks:{loading:function(t){},loaded:function(t){}}},language:o});break;case"yes-recaptcha":r("#yop-poll-captcha").length&&""!==r("#yop-main-area").attr("data-reCaptcha-site-key")&&(reCaptcha=grecaptcha.render("yop-poll-captcha",{sitekey:r("#yop-main-area").attr("data-reCaptcha-site-key"),theme:"light"}))}YOPPollBasicProcessElements(t.getModalBody().find(".basic-yop-poll-container"))}}),a=modalPreview.getModalBody(),r(a).find(".show-preview-for").select2({minimumResultsForSearch:1/0}),r(a).on("change",".show-preview-for",function(t){YOPPollBasicShowLivePreviewFor(r(this).val(),a.find(".basic-yop-poll-container")),t.preventDefault()}),a}}),jQuery(document).ready(function(i){YOPPollBasicPrettyShowLivePreview=function(){var t=i(".answers-style-settings").find(".answers-skin").val(),e=i(".answers-style-settings").find(".color-scheme").find("li.active").attr("data-id");e="black"===e?"":"-"+e,modalPreviewBody=YOPPollBasicShowLivePreview(),i(modalPreviewBody).find('input[type="radio"]').iCheck({checkboxClass:"icheckbox_"+t+e,radioClass:"iradio_"+t+e}),i(modalPreviewBody).find('input[type="checkbox"]').iCheck({checkboxClass:"icheckbox_"+t+e,radioClass:"iradio_"+t+e})}}),jQuery(document).ready(function(G){var K=function(t,e,i,n,a){G(".poll-steps li").removeClass("active"),G(".poll-steps li:nth-child("+t+")").addClass("active"),G(".poll-steps-content .tab-pane").removeClass("active"),G(".poll-steps-content .tab-pane:nth-child("+t+")").addClass("active"),G(".poll-steps-content .tab-pane:nth-child("+t+") .submenu-item").removeClass("btn-underline"),G(".poll-steps-content .tab-pane:nth-child("+t+")").find(".submenu-item").eq(e-1).addClass("btn-underline"),G(".poll-steps-content .tab-pane:nth-child("+t+")").find(".submenu-content").addClass("hide"),G(".poll-steps-content .tab-pane:nth-child("+t+")").find(".submenu-content").eq(e-1).removeClass("hide"),""!==i&&(i.focus(),i.parent().addClass("has-error")),""===a?toastr.warning(htmlEncode(striptags(i.closest(".form-group").find(".field-caption").text()+objectL10n.yopPollParams.saveParams.generalErrorMessage))):toastr.warning(htmlEncode(striptags(a)))};G("#publish-poll").click(function(t){var e,i,n,a,s,o,r=G('input[name="poll[template]"]').val(),l=G('input[name="poll[skin]"]').attr("data-skin-base"),d=!1,c=0,u=G('input[name="poll[name]"]').val(),h=G(".poll-style-settings").find(".poll-background-color").val(),p=G(".poll-style-settings").find(".poll-border-size").val(),f=G(".poll-style-settings").find(".poll-border-color").val(),m=G(".poll-style-settings").find(".poll-border-radius").val(),g=G(".poll-style-settings").find(".poll-padding-left-right").val(),v=G(".poll-style-settings").find(".poll-padding-top-bottom").val(),b=G(".questions-style-settings").find(".questions-text-color").val(),y=G(".questions-style-settings").find(".questions-text-size").val(),w=G(".questions-style-settings").find(".questions-text-weight").val(),x=G(".questions-style-settings").find(".questions-text-align").val(),k=(G(".answers-style-settings").find(".answers-skin").val(),G(".answers-style-settings").find(".color-scheme").find("li.active").attr("data-id"),G(".answers-style-settings").find(".answers-padding-left-right").val()),C=G(".answers-style-settings").find(".answers-padding-top-bottom").val(),_=G(".answers-style-settings").find(".answers-text-color").val(),S=G(".answers-style-settings").find(".answers-text-size").val(),P=G(".answers-style-settings").find(".answers-text-weight").val(),A=G(".buttons-style-settings").find(".buttons-background-color").val(),M=G(".buttons-style-settings").find(".buttons-border-size").val(),D=G(".buttons-style-settings").find(".buttons-border-color").val(),T=G(".buttons-style-settings").find(".buttons-border-radius").val(),I=G(".buttons-style-settings").find(".buttons-padding-left-right").val(),E=G(".buttons-style-settings").find(".buttons-padding-top-bottom").val(),L=G(".buttons-style-settings").find(".buttons-text-color").val(),O=G(".buttons-style-settings").find(".buttons-text-size").val(),F=G(".buttons-style-settings").find(".buttons-text-weight").val(),B=G(".errors-style-settings").find(".errors-border-left-color-for-success").val(),R=G(".errors-style-settings").find(".errors-border-left-color-for-error").val(),$=G(".errors-style-settings").find(".errors-border-left-size").val(),N=G(".errors-style-settings").find(".errors-padding-top-bottom").val(),z=G(".errors-style-settings").find(".errors-text-color").val(),j=G(".errors-style-settings").find(".errors-text-size").val(),H=G(".errors-style-settings").find(".errors-text-weight").val(),Y=[],q=[],W=[],U=[],Q=[],V=[];for(c in""===u&&(d=!0,G('input[name="poll[name]"]').focus(),G('input[name="poll[name]"]').parent().addClass("has-error"),toastr.warning(htmlEncode(striptags(objectL10n.yopPollParams.saveParams.noPollName)))),!1===d&&""===r&&(d=!0,K(1,1,"",0,objectL10n.yopPollParams.saveParams.noTemplateSelected)),!1===d&&""===l&&(d=!0,K(1,2,"",0,objectL10n.yopPollParams.saveParams.noSkinSelected)),!1===d&&""===h.toString()&&(d=!0,K(1,2,G(".poll-style-settings").find(".poll-background-color"),0,"")),!1===d&&""===p.toString()&&(d=!0,K(1,2,G(".poll-style-settings").find(".poll-border-size"),0,"")),!1===d&&""===f.toString()&&(d=!0,K(1,2,G(".poll-style-settings").find(".poll-border-color"),0,"")),!1===d&&""===m.toString()&&(d=!0,K(1,2,G(".poll-style-settings").find(".poll-border-radius"),0,"")),!1===d&&""===g.toString()&&(d=!0,K(1,2,G(".poll-style-settings").find(".poll-padding-left-right"),0,"")),!1===d&&""===v.toString()&&(d=!0,K(1,2,G(".poll-style-settings").find(".poll-padding-top-bottom"),0,"")),!1===d&&""===b.toString()&&(d=!0,K(1,2,G(".questions-style-settings").find(".questions-text-color"),0,"")),!1===d&&""===y.toString()&&(d=!0,K(1,2,G(".questions-style-settings").find(".questions-text-size"),0,"")),!1===d&&""===w.toString()&&(d=!0,K(1,2,G(".questions-style-settings").find(".questions-text-weight"),0,"")),!1===d&&""===x.toString()&&(d=!0,K(1,2,G(".questions-style-settings").find(".questions-text-align"),0,"")),!1===d&&""===k.toString()&&(d=!0,K(1,2,G(".answers-style-settings").find(".answers-padding-left-right"),0,"")),!1===d&&""===C.toString()&&(d=!0,K(1,2,G(".answers-style-settings").find(".answers-padding-top-bottom"),0,"")),!1===d&&""===_.toString()&&(d=!0,K(1,2,G(".answers-style-settings").find(".answers-text-color"),0,"")),!1===d&&""===S.toString()&&(d=!0,K(1,2,G(".answers-style-settings").find(".answers-text-size"),0,"")),!1===d&&""===P.toString()&&(d=!0,K(1,2,G(".answers-style-settings").find(".answers-text-weight"),0,"")),!1===d&&""===A.toString()&&(d=!0,K(1,2,G(".buttons-style-settings").find(".buttons-background-color"),0,"")),!1===d&&""===M.toString()&&(d=!0,K(1,2,G(".buttons-style-settings").find(".buttons-border-size"),0,"")),!1===d&&""===D.toString()&&(d=!0,K(1,2,G(".buttons-style-settings").find(".buttons-border-color"),0,"")),!1===d&&""===T.toString()&&(d=!0,K(1,2,G(".buttons-style-settings").find(".buttons-border-radius"),0,"")),!1===d&&""===I.toString()&&(d=!0,K(1,2,G(".buttons-style-settings").find(".buttons-padding-left-right"),0,"")),!1===d&&""===E.toString()&&(d=!0,K(1,2,G(".buttons-style-settings").find(".buttons-padding-top-bottom"),0,"")),!1===d&&""===L.toString()&&(d=!0,K(1,2,G(".buttons-style-settings").find(".buttons-text-color"),0,"")),!1===d&&""===O.toString()&&(d=!0,K(1,2,G(".buttons-style-settings").find(".buttons-text-size"),0,"")),!1===d&&""===F.toString()&&(d=!0,K(1,2,G(".buttons-style-settings").find(".buttons-text-weight"),0,"")),!1===d&&""===B.toString()&&(d=!0,K(1,2,G(".errors-style-settings").find(".errors-border-left-color-for-success"),0,"")),!1===d&&""===R.toString()&&(d=!0,K(1,2,G(".errors-style-settings").find(".errors-border-left-color-for-error"),0,"")),!1===d&&""===$.toString()&&(d=!0,K(1,2,G(".errors-style-settings").find(".errors-border-left-size"),0,"")),!1===d&&""===N.toString()&&(d=!0,K(1,2,G(".errors-style-settings").find(".errors-padding-top-bottom"),0,"")),!1===d&&""===z.toString()&&(d=!0,K(1,2,G(".errors-style-settings").find(".errors-text-color"),0,"")),!1===d&&""===j.toString()&&(d=!0,K(1,2,G(".errors-style-settings").find(".errors-text-size"),0,"")),!1===d&&""===H.toString()&&(d=!0,K(1,2,G(".errors-style-settings").find(".errors-text-weight"),0,"")),!1===d&&G(".poll-elements-list").find(".poll-element").each(function(){switch(G(this).attr("data-type")){case"text-question":!1===d&&""===G(this).find(".question-value").val()&&(d=!0,K(2,1,G(this).find(".question-value"),0,objectL10n.yopPollParams.saveParams.noQuestion)),G(this).find(".answer").each(function(t){return!1===d&&""===G(this).find(".answer-value").val().toString()?(d=!0,K(2,1,G(this).find(".answer-value"),0,objectL10n.yopPollParams.saveParams.noAnswerText),!1):!1===d&&G(this).find(".answer-make-link").is(":checked")&&""===G(this).find(".answer-link").val().toString()?(d=!0,K(2,1,G(this).find(".answer-link"),0,objectL10n.yopPollParams.saveParams.noAnswerLink),!1):void 0}),!1===d&&"yes"===G(this).find(".allow-other-answers").val()&&""===G(this).find(".other-answers-label").val().toString()&&(d=!0,K(2,1,G(this).find(".other-answers-label"),0,objectL10n.yopPollParams.saveParams.noOtherLabel)),!1===d&&"yes"===G(this).find(".allow-multiple-answers").val()&&(""===G(this).find(".multiple-answers-minim").val()||parseInt(G(this).find(".multiple-answers-minim").val(),10)<=0?(d=!0,K(2,1,G(this).find(".multiple-answers-minim"),0,objectL10n.yopPollParams.saveParams.noMinAnswers)):""===G(this).find(".multiple-answers-maxim").val()||parseInt(G(this).find(".multiple-answers-maxim").val(),10)<=0?(d=!0,K(2,1,G(this).find(".multiple-answers-maxim"),0,objectL10n.yopPollParams.saveParams.noMaxAnswers)):parseInt(G(this).find(".multiple-answers-minim").val(),10)>parseInt(G(this).find(".multiple-answers-maxim").val(),10)&&(d=!0,K(2,1,G(this).find(".multiple-answers-minim"),0,objectL10n.yopPollParams.saveParams.noMinAnswers))),!1===d&&"columns"===G(this).find(".answers-display").val()&&(""===G(this).find(".answers-columns").val().toString()||parseInt(G(this).find(".answers-columns").val(),10)<1)&&(d=!0,K(2,1,G(this).find(".answers-columns"),0,objectL10n.yopPollParams.noNumberOfColumnsDefined));break;case"media-question":!1===d&&""===G(this).find(".question-value").val()&&(d=!0,K(2,1,G(this).find(".question-text"),0,objectL10n.yopPollParams.saveParams.noQuestion)),G(this).find(".answer").each(function(t){if(!1===d)switch(G(this).find(".answer-type").val()){case"image":""===G(this).find(".answer-link").val().toString()&&(d=!0,K(2,1,G(this).find(".answer-link"),0,objectL10n.yopPollParams.saveParams.noAnswerLink));break;case"video":""===G(this).find(".answer-embed").val().toString()&&(d=!0,K(2,1,G(this).find(".answer-embed"),0,objectL10n.yopPollParams.saveParams.noAnswerEmbed))}if(!1===d&&G(this).find(".answer-add-text").is(":checked")&&""===G(this).find(".media-answer-text").val().toString())return d=!0,K(2,1,G(this).find(".media-answer-text"),0,objectL10n.yopPollParams.saveParams.noAnswerText),!1}),!1===d&&"yes"===G(this).find(".allow-multiple-answers").val()&&(""===G(this).find(".multiple-answers-minim").val()||parseInt(G(this).find(".multiple-answers-minim").val(),10)<=0?(d=!0,K(2,1,G(this).find(".multiple-answers-minim"),0,objectL10n.yopPollParams.saveParams.noMinAnswers)):""===G(this).find(".multiple-answers-maxim").val()||parseInt(G(this).find(".multiple-answers-maxim").val(),10)<=0?(d=!0,K(2,1,G(this).find(".multiple-answers-maxim"),0,objectL10n.yopPollParams.saveParams.noMaxAnswers)):parseInt(G(this).find(".multiple-answers-minim").val(),10)>parseInt(G(this).find(".multiple-answers-maxim").val(),10)&&(d=!0,K(2,1,G(this).find(".multiple-answers-minim"),0,objectL10n.yopPollParams.saveParams.noMinAnswers))),!1===d&&"columns"===G(this).find(".answers-display").val()&&(""===G(this).find(".answers-columns").val().toString()||parseInt(G(this).find(".answers-columns").val(),10)<1)&&(d=!0,K(2,1,G(this).find(".answers-columns"),0,objectL10n.yopPollParams.noNumberOfColumnsDefined));break;case"custom-field":if(!1===d&&""===G(this).find(".custom-field-name").val().toString())return d=!0,K(2,1,G(this).find(".custom-field-name"),0,objectL10n.yopPollParams.saveParams.noCustomFieldName),!1}}),!1===d&&""===G(".vote-button-label").val()&&(d=!0,K(3,1,G(".vote-button-label"),0,"")),!1===d&&"yes"===G(".show-results-link").val()&&""===G(".results-label-text").val()&&(d=!0,K(3,1,G(".results-label-text"),0,"")),!1===d&&"custom"===G(".start-date-option").val()&&""===G(".start-date-custom").val()&&(d=!0,K(3,1,G(".start-date-custom"),0,objectL10n.yopPollParams.saveParams.noStartDate)),!1===d&&"custom"===G(".end-date-option").val()&&""===G(".end-date-custom").val()&&(d=!0,K(3,1,G(".end-date-custom"),0,objectL10n.yopPollParams.saveParams.noEndDate)),!1===d&&"yes"===G(".redirect-after-vote").val()&&""===G(".redirect-url").val()&&(d=!0,K(3,1,G(".redirect-url"),0,"")),!1===d&&"yes"===G(".send-email-notifications").val()&&(!1===d&&""===G(".email-notifications-from-name").val()&&(d=!0,K(3,1,G(".email-notifications-from-name"),0,"")),!1===d&&""===G(".email-notifications-from-email").val()&&(d=!0,K(3,1,G(".email-notifications-from-email"),0,"")),!1===d&&""===G(".email-notifications-recipients").val()&&(d=!0,K(3,1,G(".email-notifications-recipients"),0,"")),!1===d&&""===G(".email-notifications-subject").val()&&(d=!0,K(3,1,G(".email-notifications-subject"),0,"")),!1===d&&""===G(".email-notifications-message").val()&&(d=!0,K(3,1,G(".email-notifications-message"),0,""))),!1===d&&"yes"===G(".enable-gdpr").val()&&"consent"===G(".gdpr-solution").val()&&""===G(".gdpr-consent-text").val()&&(d=!0,K(3,1,G(".gdpr-consent-text"),0,"")),c=0,s=G(".vote-permissions").select2("data"))U.push(s[c].id);for(c in!1===d&&0===U.length&&(d=!0,K(3,2,G(".vote-permissions"),0,"")),c=0,o=G(".block-voters").select2("data"))Q.push(o[c].id);for(c in!1===d&&0<Q.length&&-1===G.inArray("no-block",Q)&&""===G(".block-for-value").val()&&(d=!0,K(3,2,G(".block-for-value"),0,"")),!1===d&&"yes"===G(".limit-votes-per-user").val()&&""===G(".votes-per-user-allowed").val()&&(d=!0,K(3,2,G(".votes-per-user-allowed"),0,"")),c=0,i=G(".show-results-moment").select2("data"))Y.push(i[c].id);for(c in!1===d&&0===Y.length&&(d=!0,K(3,3,G(".show-results-moment"),0,objectL10n.yopPollParams.saveParams.noShowResultsMoment)),!1===d&&-1<G.inArray("custom-date",Y)&&""===G(".custom-date-results").val()&&(d=!0,K(3,3,G(".custom-date-results"),0,objectL10n.yopPollParams.saveParams.noCustomDate)),c=0,n=G(".show-results-to").select2("data"))q.push(n[c].id);for(c in!1===d&&-1===G.inArray("never",Y)&&0===q.length&&(d=!0,K(3,3,G(".show-results-to"),0,objectL10n.yopPollParams.saveParams.noShowResultsTo)),c=0,a=G(".results-details-option").select2("data"))W.push(a[c].id);!1===d&&"yes"===G(".back-to-vote-option").val()&&""===G(".back-to-vote-caption").val()&&(d=!0,K(3,3,G(".back-to-vote-caption"),0,"")),!1===d&&!0===G('input.vote-permissions[value="registered"]').is(":checked")&&"no"===G(".allow-wordpress-votes").val()&&(d=!0,K(3,3,G(".allow-wordpress-votes"),0,objectL10n.yopPollParams.saveParams.noVoteAsWordpress)),!1===d&&(G(".poll-elements-list").find(".poll-element").each(function(t){var e=G(this).attr("data-type"),i=[];switch(e){case"text-question":G(this).find(".answer").each(function(t){i[t]={type:"text",text:G(this).find(".answer-value").val(),options:{makeDefault:G(this).find(".answer-make-default").is(":checked")?"yes":"no",makeLink:G(this).find(".answer-make-link").is(":checked")?"yes":"no",link:G(this).find(".answer-link").val(),resultsColor:G(this).find(".answer-results-color").val()}}}),V.push({type:"text-question",text:G(this).find(".question-value").val(),answers:i,options:{allowOtherAnswers:G(this).find(".allow-other-answers").val(),otherAnswersLabel:G(this).find(".other-answers-label").val(),addOtherAnswers:G(this).find(".add-other-answers").val(),displayOtherAnswersInResults:G(this).find(".display-other-answers-in-results").val(),allowMultipleAnswers:G(this).find(".allow-multiple-answers").val(),multipleAnswersMinim:G(this).find(".multiple-answers-minim").val(),multipleAnswersMaxim:G(this).find(".multiple-answers-maxim").val(),answersDisplay:G(this).find(".answers-display").val(),answersColumns:G(this).find(".answers-columns").val()}});break;case"custom-field":V.push({type:"custom-field",text:G(this).find(".custom-field-name").val(),options:{makeRequired:G(this).find(".custom-field-make-required").is(":checked")?"yes":"no"}});break;case"media-question":G(this).find(".answer").each(function(t){i[t]={type:G(this).find(".answer-type").val(),text:"image"===G(this).find(".answer-type").val()?G(this).find(".answer-link").val():G(this).find(".answer-embed").val(),options:{makeDefault:G(this).find(".answer-make-default").is(":checked")?"yes":"no",makeLink:G(this).find(".answer-make-link").is(":checked")?"yes":"no",link:G(this).find(".answer-make-link-value").val(),addText:G(this).find(".answer-add-text").is(":checked")?"yes":"no",text:G(this).find(".media-answer-text").val(),resultsColor:G(this).find(".answer-results-color").val()}}}),V.push({type:"media-question",text:G(this).find(".question-value").val(),answers:i,options:{allowOtherAnswers:G(this).find(".allow-other-answers").val(),otherAnswersLabel:G(this).find(".other-answers-label").val(),addOtherAnswers:G(this).find(".add-other-answers").val(),displayOtherAnswersInResults:G(this).find(".display-other-answers-in-results").val(),allowMultipleAnswers:G(this).find(".allow-multiple-answers").val(),multipleAnswersMinim:G(this).find(".multiple-answers-minim").val(),multipleAnswersMaxim:G(this).find(".multiple-answers-maxim").val(),answersDisplay:G(this).find(".answers-display").val(),answersColumns:G(this).find(".answers-columns").val()}});break;case"space-separator":V.push({type:"space-separator"});break;case"text-block":V.push({type:"text-block",text:G(this).find(".text-block-text").val()})}}),e={name:G('input[name="poll[name]"]').val(),status:G("#poll_status").val(),design:{template:G('input[name="poll[template]"]').val(),templateBase:G('input[name="poll[template]"]').attr("data-template-base"),skinBase:G('input[name="poll[skin]"]').attr("data-skin-base"),style:{poll:{backgroundColor:G(".poll-background-color").val(),borderSize:G(".poll-border-size").val(),borderColor:G(".poll-border-color").val(),borderRadius:G(".poll-border-radius").val(),paddingLeftRight:G(".poll-padding-left-right").val(),paddingTopBottom:G(".poll-padding-top-bottom").val()},questions:{textColor:G(".questions-text-color").val(),textSize:G(".questions-text-size").val(),textWeight:G(".questions-text-weight").val(),textAlign:G(".questions-text-align").val()},answers:{paddingLeftRight:G(".answers-padding-left-right").val(),paddingTopBottom:G(".answers-padding-top-bottom").val(),textColor:G(".answers-text-color").val(),textSize:G(".answers-text-size").val(),textWeight:G(".answers-text-weight").val(),skin:G(".answers-style-settings").find(".answers-skin").val(),colorScheme:G(".answers-style-settings").find(".color-scheme").find("li.active").attr("data-id"),skin:G(".answers-style-settings").find(".answers-skin").val(),colorScheme:G(".answers-style-settings").find(".color-scheme").find("li.active").attr("data-id")},buttons:{backgroundColor:G(".buttons-background-color").val(),borderSize:G(".buttons-border-size").val(),borderColor:G(".buttons-border-color").val(),borderRadius:G(".buttons-border-radius").val(),paddingLeftRight:G(".buttons-padding-left-right").val(),paddingTopBottom:G(".buttons-padding-top-bottom").val(),textColor:G(".buttons-text-color").val(),textSize:G(".buttons-text-size").val(),textWeight:G(".buttons-text-weight").val()},captcha:{},errors:{borderLeftColorForSuccess:G(".errors-border-left-color-for-success").val(),borderLeftColorForError:G(".errors-border-left-color-for-error").val(),borderLeftSize:G(".errors-border-left-size").val(),paddingTopBottom:G(".errors-padding-top-bottom").val(),textColor:G(".errors-text-color").val(),textSize:G(".errors-text-size").val(),textWeight:G(".errors-text-weight").val()},custom:{css:G(".custom-styles-custom-css").val()}}},options:{poll:{voteButtonLabel:G(".vote-button-label").val(),showResultsLink:G(".show-results-link").val(),resultsLabelText:G(".results-label-text").val(),showTotalVotes:G(".show-total-votes").val(),showTotalAnswers:G(".show-total-answers").val(),startDateOption:G(".start-date-option").val(),startDateCustom:G(".start-date-custom-hidden").val(),endDateOption:G(".end-date-option").val(),endDateCustom:G(".end-date-custom-hidden").val(),redirectAfterVote:G(".redirect-after-vote").val(),redirectUrl:G(".redirect-url").val(),resetPollStatsAutomatically:G(".reset-poll-stats-automatically").val(),resetPollStatsOn:G(".reset-poll-stats-on-hidden").val(),resetPollStatsEvery:G(".reset-poll-stats-every").val(),resetPollStatsEveryPeriod:G(".reset-poll-stats-every-period").val(),autoGeneratePollPage:G(".auto-generate-poll-page").val(),pageId:"",pageLink:"",useCaptcha:G(".use-captcha").val(),sendEmailNotifications:G(".send-email-notifications").val(),emailNotificationsFromName:G(".email-notifications-from-name").val(),emailNotificationsFromEmail:G(".email-notifications-from-email").val(),emailNotificationsRecipients:G(".email-notifications-recipients").val(),emailNotificationsSubject:G(".email-notifications-subject").val(),emailNotificationsMessage:G(".email-notifications-message").val(),enableGdpr:G(".enable-gdpr").val(),gdprSolution:G(".gdpr-solution").val(),gdprConsentText:G(".gdpr-consent-text").val()},access:{votePermissions:U,allowWordpressVotes:G(".allow-wordpress-votes").val(),blockVoters:Q,blockForValue:G(".block-for-value").val(),blockForPeriod:G(".block-for-period").val(),limitVotesPerUser:G(".limit-votes-per-user").val(),votesPerUserAllowed:G(".votes-per-user-allowed").val()},results:{showResultsMoment:Y,customDateResults:G(".custom-date-results-hidden").val(),showResultsTo:q,resultsDetails:W,backToVoteOption:G(".back-to-vote-option").val(),backToVoteCaption:G(".back-to-vote-caption").val(),sortResults:G(".sort-results").val(),sortResultsRule:G(".sort-results-rule").val(),displayResultsAs:G(".display-results-as").val(),barColor:G(".bar-color").val(),barHeight:G(".bar-height").val()}},elements:V},G(".spinner.publish").addClass("is-active"),G("#publish-poll").attr("disabled",!0),G.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"create_yop_poll",_token:G("#_token").val(),poll:JSON.stringify(e)}}).done(function(t){G(".spinner.publish").removeClass("is-active"),!0===t.success?toastr.success(htmlEncode(striptags(t.data)),"",{progressBar:!0,onHidden:function(){window.location.assign("admin.php?page=yop-polls")}}):(G("#publish-poll").attr("disabled",!1),toastr.warning(htmlEncode(striptags(t.data))))})),t.preventDefault()}),G("#update-poll").click(function(t){var e,i,n,a,s,o,r=G('input[name="poll[template]"]').val(),l=G('input[name="poll[skin]"]').attr("data-skin-base"),d=!1,c=0,u=G('input[name="poll[name]"]').val(),h=G(".poll-style-settings").find(".poll-background-color").val(),p=G(".poll-style-settings").find(".poll-border-size").val(),f=G(".poll-style-settings").find(".poll-border-color").val(),m=G(".poll-style-settings").find(".poll-border-radius").val(),g=G(".poll-style-settings").find(".poll-padding-left-right").val(),v=G(".poll-style-settings").find(".poll-padding-top-bottom").val(),b=G(".questions-style-settings").find(".questions-text-color").val(),y=G(".questions-style-settings").find(".questions-text-size").val(),w=G(".questions-style-settings").find(".questions-text-weight").val(),x=G(".questions-style-settings").find(".questions-text-align").val(),k=G(".answers-style-settings").find(".answers-padding-left-right").val(),C=G(".answers-style-settings").find(".answers-padding-top-bottom").val(),_=G(".answers-style-settings").find(".answers-text-color").val(),S=G(".answers-style-settings").find(".answers-text-size").val(),P=G(".answers-style-settings").find(".answers-text-weight").val(),A=(G(".answers-style-settings").find(".answers-skin").val(),G(".answers-style-settings").find(".color-scheme").find("li.active").attr("data-id"),G(".buttons-style-settings").find(".buttons-background-color").val()),M=G(".buttons-style-settings").find(".buttons-border-size").val(),D=G(".buttons-style-settings").find(".buttons-border-color").val(),T=G(".buttons-style-settings").find(".buttons-border-radius").val(),I=G(".buttons-style-settings").find(".buttons-padding-left-right").val(),E=G(".buttons-style-settings").find(".buttons-padding-top-bottom").val(),L=G(".buttons-style-settings").find(".buttons-text-color").val(),O=G(".buttons-style-settings").find(".buttons-text-size").val(),F=G(".buttons-style-settings").find(".buttons-text-weight").val(),B=G(".errors-style-settings").find(".errors-border-left-color-for-success").val(),R=G(".errors-style-settings").find(".errors-border-left-color-for-error").val(),$=G(".errors-style-settings").find(".errors-border-left-size").val(),N=G(".errors-style-settings").find(".errors-padding-top-bottom").val(),z=G(".errors-style-settings").find(".errors-text-color").val(),j=G(".errors-style-settings").find(".errors-text-size").val(),H=G(".errors-style-settings").find(".errors-text-weight").val(),Y=[],q=[],W=[],U=[],Q=[],V=[];for(c in""===u&&(d=!0,G('input[name="poll[name]"]').focus(),G('input[name="poll[name]"]').parent().addClass("has-error"),toastr.warning(htmlEncode(striptags(objectL10n.yopPollParams.saveParams.noPollName)))),!1===d&&""===r&&(d=!0,K(1,1,"",0,objectL10n.yopPollParams.saveParams.noTemplateSelected)),!1===d&&""===l&&(d=!0,K(1,2,"",0,objectL10n.yopPollParams.saveParams.noSkinSelected)),!1===d&&""===h.toString()&&(d=!0,K(1,2,G(".poll-style-settings").find(".poll-background-color"),0,"")),!1===d&&""===p.toString()&&(d=!0,K(1,2,G(".poll-style-settings").find(".poll-border-size"),0,"")),!1===d&&""===f.toString()&&(d=!0,K(1,2,G(".poll-style-settings").find(".poll-border-color"),0,"")),!1===d&&""===m.toString()&&(d=!0,K(1,2,G(".poll-style-settings").find(".poll-border-radius"),0,"")),!1===d&&""===g.toString()&&(d=!0,K(1,2,G(".poll-style-settings").find(".poll-padding-left-right"),0,"")),!1===d&&""===v.toString()&&(d=!0,K(1,2,G(".poll-style-settings").find(".poll-padding-top-bottom"),0,"")),!1===d&&""===b.toString()&&(d=!0,K(1,2,G(".questions-style-settings").find(".questions-text-color"),0,"")),!1===d&&""===y.toString()&&(d=!0,K(1,2,G(".questions-style-settings").find(".questions-text-size"),0,"")),!1===d&&""===w.toString()&&(d=!0,K(1,2,G(".questions-style-settings").find(".questions-text-weight"),0,"")),!1===d&&""===x.toString()&&(d=!0,K(1,2,G(".questions-style-settings").find(".questions-text-align"),0,"")),!1===d&&""===k.toString()&&(d=!0,K(1,2,G(".answers-style-settings").find(".answers-padding-left-right"),0,"")),!1===d&&""===C.toString()&&(d=!0,K(1,2,G(".answers-style-settings").find(".answers-padding-top-bottom"),0,"")),!1===d&&""===_.toString()&&(d=!0,K(1,2,G(".answers-style-settings").find(".answers-text-color"),0,"")),!1===d&&""===S.toString()&&(d=!0,K(1,2,G(".answers-style-settings").find(".answers-text-size"),0,"")),!1===d&&""===P.toString()&&(d=!0,K(1,2,G(".answers-style-settings").find(".answers-text-weight"),0,"")),!1===d&&""===A.toString()&&(d=!0,K(1,2,G(".buttons-style-settings").find(".buttons-background-color"),0,"")),!1===d&&""===M.toString()&&(d=!0,K(1,2,G(".buttons-style-settings").find(".buttons-border-size"),0,"")),!1===d&&""===D.toString()&&(d=!0,K(1,2,G(".buttons-style-settings").find(".buttons-border-color"),0,"")),!1===d&&""===T.toString()&&(d=!0,K(1,2,G(".buttons-style-settings").find(".buttons-border-radius"),0,"")),!1===d&&""===I.toString()&&(d=!0,K(1,2,G(".buttons-style-settings").find(".buttons-padding-left-right"),0,"")),!1===d&&""===E.toString()&&(d=!0,K(1,2,G(".buttons-style-settings").find(".buttons-padding-top-bottom"),0,"")),!1===d&&""===L.toString()&&(d=!0,K(1,2,G(".buttons-style-settings").find(".buttons-text-color"),0,"")),!1===d&&""===O.toString()&&(d=!0,K(1,2,G(".buttons-style-settings").find(".buttons-text-size"),0,"")),!1===d&&""===F.toString()&&(d=!0,K(1,2,G(".buttons-style-settings").find(".buttons-text-weight"),0,"")),!1===d&&""===B.toString()&&(d=!0,K(1,2,G(".errors-style-settings").find(".errors-border-left-color-for-success"),0,"")),!1===d&&""===R.toString()&&(d=!0,K(1,2,G(".errors-style-settings").find(".errors-border-left-color-for-error"),0,"")),!1===d&&""===$.toString()&&(d=!0,K(1,2,G(".errors-style-settings").find(".errors-border-left-size"),0,"")),!1===d&&""===N.toString()&&(d=!0,K(1,2,G(".errors-style-settings").find(".errors-padding-top-bottom"),0,"")),!1===d&&""===z.toString()&&(d=!0,K(1,2,G(".errors-style-settings").find(".errors-text-color"),0,"")),!1===d&&""===j.toString()&&(d=!0,K(1,2,G(".errors-style-settings").find(".errors-text-size"),0,"")),!1===d&&""===H.toString()&&(d=!0,K(1,2,G(".errors-style-settings").find(".errors-text-weight"),0,"")),!1===d&&G(".poll-elements-list").find(".poll-element").each(function(){switch(G(this).attr("data-type")){case"text-question":!1===d&&""===G(this).find(".question-value").val()&&(d=!0,K(2,1,G(this).find(".question-value"),0,objectL10n.yopPollParams.saveParams.noQuestion)),G(this).find(".answer").each(function(t){return!1===d&&""===G(this).find(".answer-value").val().toString()?(d=!0,K(2,1,G(this).find(".answer-value"),0,objectL10n.yopPollParams.saveParams.noAnswerText),!1):!1===d&&G(this).find(".answer-make-link").is(":checked")&&""===G(this).find(".answer-link").val().toString()?(d=!0,K(2,1,G(this).find(".answer-link"),0,objectL10n.yopPollParams.saveParams.noAnswerLink),!1):void 0}),!1===d&&"yes"===G(this).find(".allow-other-answers").val()&&""===G(this).find(".other-answers-label").val().toString()&&(d=!0,K(2,1,G(this).find(".other-answers-label"),0,objectL10n.yopPollParams.saveParams.noOtherLabel)),!1===d&&"yes"===G(this).find(".allow-multiple-answers").val()&&(""===G(this).find(".multiple-answers-minim").val()||parseInt(G(this).find(".multiple-answers-minim").val(),10)<=0?(d=!0,K(2,1,G(this).find(".multiple-answers-minim"),0,objectL10n.yopPollParams.saveParams.noMinAnswers)):""===G(this).find(".multiple-answers-maxim").val()||parseInt(G(this).find(".multiple-answers-maxim").val(),10)<=0?(d=!0,K(2,1,G(this).find(".multiple-answers-maxim"),0,objectL10n.yopPollParams.saveParams.noMaxAnswers)):parseInt(G(this).find(".multiple-answers-minim").val(),10)>parseInt(G(this).find(".multiple-answers-maxim").val(),10)&&(d=!0,K(2,1,G(this).find(".multiple-answers-minim"),0,objectL10n.yopPollParams.saveParams.noMinAnswers))),!1===d&&"columns"===G(this).find(".answers-display").val()&&(""===G(this).find(".answers-columns").val().toString()||parseInt(G(this).find(".answers-columns").val(),10)<1)&&(d=!0,K(2,1,G(this).find(".answers-columns"),0,objectL10n.yopPollParams.noNumberOfColumnsDefined));break;case"media-question":!1===d&&""===G(this).find(".question-value").val()&&(d=!0,K(2,1,G(this).find(".question-text"),0,objectL10n.yopPollParams.saveParams.noQuestion)),G(this).find(".answer").each(function(t){if(!1===d)switch(G(this).find(".answer-type").val()){case"image":""===G(this).find(".answer-link").val().toString()&&(d=!0,K(2,1,G(this).find(".answer-link"),0,objectL10n.yopPollParams.saveParams.noAnswerLink));break;case"video":""===G(this).find(".answer-embed").val().toString()&&(d=!0,K(2,1,G(this).find(".answer-embed"),0,objectL10n.yopPollParams.saveParams.noAnswerEmbed))}if(!1===d&&G(this).find(".answer-add-text").is(":checked")&&""===G(this).find(".media-answer-text").val().toString())return d=!0,K(2,1,G(this).find(".media-answer-text"),0,objectL10n.yopPollParams.saveParams.noAnswerText),!1}),!1===d&&"yes"===G(this).find(".allow-multiple-answers").val()&&(""===G(this).find(".multiple-answers-minim").val()||parseInt(G(this).find(".multiple-answers-minim").val(),10)<=0?(d=!0,K(2,1,G(this).find(".multiple-answers-minim"),0,objectL10n.yopPollParams.saveParams.noMinAnswers)):""===G(this).find(".multiple-answers-maxim").val()||parseInt(G(this).find(".multiple-answers-maxim").val(),10)<=0?(d=!0,K(2,1,G(this).find(".multiple-answers-maxim"),0,objectL10n.yopPollParams.saveParams.noMaxAnswers)):parseInt(G(this).find(".multiple-answers-minim").val(),10)>parseInt(G(this).find(".multiple-answers-maxim").val(),10)&&(d=!0,K(2,1,G(this).find(".multiple-answers-minim"),0,objectL10n.yopPollParams.saveParams.noMinAnswers))),!1===d&&"columns"===G(this).find(".answers-display").val()&&(""===G(this).find(".answers-columns").val().toString()||parseInt(G(this).find(".answers-columns").val(),10)<1)&&(d=!0,K(2,1,G(this).find(".answers-columns"),0,objectL10n.yopPollParams.noNumberOfColumnsDefined));break;case"custom-field":if(!1===d&&""===G(this).find(".custom-field-name").val().toString())return d=!0,K(2,1,G(this).find(".custom-field-name"),0,objectL10n.yopPollParams.saveParams.noCustomFieldName),!1}}),!1===d&&""===G(".vote-button-label").val()&&(d=!0,K(3,1,G(".vote-button-label"),0,"")),!1===d&&"yes"===G(".show-results-link").val()&&""===G(".results-label-text").val()&&(d=!0,K(3,1,G(".results-label-text"),0,"")),!1===d&&"custom"===G(".start-date-option").val()&&""===G(".start-date-custom").val()&&(d=!0,K(3,1,G(".start-date-custom"),0,objectL10n.yopPollParams.saveParams.noStartDate)),!1===d&&"custom"===G(".end-date-option").val()&&""===G(".end-date-custom").val()&&(d=!0,K(3,1,G(".end-date-custom"),0,objectL10n.yopPollParams.saveParams.noEndDate)),!1===d&&"yes"===G(".redirect-after-vote").val()&&""===G(".redirect-url").val()&&(d=!0,K(3,1,G(".redirect-url"),0,"")),!1===d&&"yes"===G(".send-email-notifications").val()&&(!1===d&&""===G(".email-notifications-from-name").val()&&(d=!0,K(3,1,G(".email-notifications-from-name"),0,"")),!1===d&&""===G(".email-notifications-from-email").val()&&(d=!0,K(3,1,G(".email-notifications-from-email"),0,"")),!1===d&&""===G(".email-notifications-recipients").val()&&(d=!0,K(3,1,G(".email-notifications-recipients"),0,"")),!1===d&&""===G(".email-notifications-subject").val()&&(d=!0,K(3,1,G(".email-notifications-subject"),0,"")),!1===d&&""===G(".email-notifications-message").val()&&(d=!0,K(3,1,G(".email-notifications-message"),0,""))),!1===d&&"yes"===G(".enable-gdpr").val()&&"consent"===G(".gdpr-solution").val()&&""===G(".gdpr-consent-text").val()&&(d=!0,K(3,1,G(".gdpr-consent-text"),0,"")),c=0,s=G(".vote-permissions").select2("data"))U.push(s[c].id);for(c in!1===d&&0===U.length&&(d=!0,K(3,2,G(".vote-permissions"),0,"")),c=0,o=G(".block-voters").select2("data"))Q.push(o[c].id);for(c in!1===d&&0<Q.length&&-1===G.inArray("no-block",Q)&&""===G(".block-for-value").val()&&(d=!0,K(3,2,G(".block-for-value"),0,"")),!1===d&&"yes"===G(".limit-votes-per-user").val()&&""===G(".votes-per-user-allowed").val()&&(d=!0,K(3,2,G(".votes-per-user-allowed"),0,"")),c=0,i=G(".show-results-moment").select2("data"))Y.push(i[c].id);for(c in!1===d&&0===Y.length&&(d=!0,K(3,3,G(".show-results-moment"),0,objectL10n.yopPollParams.saveParams.noShowResultsMoment)),!1===d&&-1<G.inArray("custom-date",Y)&&""===G(".custom-date-results").val()&&(d=!0,K(3,3,G(".custom-date-results"),0,objectL10n.yopPollParams.saveParams.noCustomDate)),c=0,n=G(".show-results-to").select2("data"))q.push(n[c].id);for(c in!1===d&&-1===G.inArray("never",Y)&&0===q.length&&(d=!0,K(3,3,G(".show-results-to"),0,objectL10n.yopPollParams.saveParams.noShowResultsTo)),c=0,a=G(".results-details-option").select2("data"))W.push(a[c].id);!1===d&&"yes"===G(".back-to-vote-option").val()&&""===G(".back-to-vote-caption").val()&&(d=!0,K(3,3,G(".back-to-vote-caption"),0,"")),!1===d&&!0===G('input.vote-permissions[value="registered"]').is(":checked")&&"no"===G(".allow-wordpress-votes").val()&&(d=!0,K(3,3,G(".allow-wordpress-votes"),0,objectL10n.yopPollParams.saveParams.noVoteAsWordpress)),!1===d&&(G(".poll-elements-list").find(".poll-element").each(function(t){var e=G(this).attr("data-type"),i=[];switch(e){case"text-question":G(this).find(".answer").each(function(t){i[t]={id:G(this).attr("data-id"),type:"text",text:G(this).find(".answer-value").val(),options:{makeDefault:G(this).find(".answer-make-default").is(":checked")?"yes":"no",makeLink:G(this).find(".answer-make-link").is(":checked")?"yes":"no",link:G(this).find(".answer-link").val(),resultsColor:G(this).find(".answer-results-color").val()}}}),V.push({id:G(this).attr("data-id"),type:"text-question",text:G(this).find(".question-value").val(),answers:i,answersRemoved:G(this).attr("data-remove"),options:{allowOtherAnswers:G(this).find(".allow-other-answers").val(),otherAnswersLabel:G(this).find(".other-answers-label").val(),addOtherAnswers:G(this).find(".add-other-answers").val(),displayOtherAnswersInResults:G(this).find(".display-other-answers-in-results").val(),allowMultipleAnswers:G(this).find(".allow-multiple-answers").val(),multipleAnswersMinim:G(this).find(".multiple-answers-minim").val(),multipleAnswersMaxim:G(this).find(".multiple-answers-maxim").val(),answersDisplay:G(this).find(".answers-display").val(),answersColumns:G(this).find(".answers-columns").val()}});break;case"custom-field":V.push({id:G(this).attr("data-id"),type:"custom-field",text:G(this).find(".custom-field-name").val(),options:{makeRequired:G(this).find(".custom-field-make-required").is(":checked")?"yes":"no"}});break;case"media-question":G(this).find(".answer").each(function(t){i[t]={id:G(this).attr("data-id"),type:G(this).find(".answer-type").val(),text:"image"===G(this).find(".answer-type").val()?G(this).find(".answer-link").val():G(this).find(".answer-embed").val(),options:{makeDefault:G(this).find(".answer-make-default").is(":checked")?"yes":"no",makeLink:G(this).find(".answer-make-link").is(":checked")?"yes":"no",link:G(this).find(".answer-make-link-value").val(),addText:G(this).find(".answer-add-text").is(":checked")?"yes":"no",text:G(this).find(".media-answer-text").val(),resultsColor:G(this).find(".answer-results-color").val()}}}),V.push({id:G(this).attr("data-id"),type:"media-question",text:G(this).find(".question-value").val(),answers:i,answersRemoved:G(this).attr("data-remove"),options:{allowOtherAnswers:G(this).find(".allow-other-answers").val(),otherAnswersLabel:G(this).find(".other-answers-label").val(),addOtherAnswers:G(this).find(".add-other-answers").val(),displayOtherAnswersInResults:G(this).find(".display-other-answers-in-results").val(),allowMultipleAnswers:G(this).find(".allow-multiple-answers").val(),multipleAnswersMinim:G(this).find(".multiple-answers-minim").val(),multipleAnswersMaxim:G(this).find(".multiple-answers-maxim").val(),answersDisplay:G(this).find(".answers-display").val(),answersColumns:G(this).find(".answers-columns").val()}});break;case"space-separator":V.push({id:G(this).attr("data-id"),type:"space-separator"});break;case"text-block":V.push({id:G(this).attr("data-id"),type:"text-block",text:G(this).find(".text-block-text").summernote("code")})}}),e={id:G('input[name="poll[id]"]').val(),name:G('input[name="poll[name]"]').val(),status:G("#poll_status").val(),design:{template:G('input[name="poll[template]"]').val(),templateBase:G('input[name="poll[template]"]').attr("data-template-base"),skinBase:G('input[name="poll[skin]"]').attr("data-skin-base"),style:{poll:{backgroundColor:G(".poll-background-color").val(),borderSize:G(".poll-border-size").val(),borderColor:G(".poll-border-color").val(),borderRadius:G(".poll-border-radius").val(),paddingLeftRight:G(".poll-padding-left-right").val(),paddingTopBottom:G(".poll-padding-top-bottom").val()},questions:{textColor:G(".questions-text-color").val(),textSize:G(".questions-text-size").val(),textWeight:G(".questions-text-weight").val(),textAlign:G(".questions-text-align").val()},answers:{paddingLeftRight:G(".answers-padding-left-right").val(),paddingTopBottom:G(".answers-padding-top-bottom").val(),textColor:G(".answers-text-color").val(),textSize:G(".answers-text-size").val(),textWeight:G(".answers-text-weight").val(),skin:G(".answers-style-settings").find(".answers-skin").val(),colorScheme:G(".answers-style-settings").find(".color-scheme").find("li.active").attr("data-id"),skin:G(".answers-style-settings").find(".answers-skin").val(),colorScheme:G(".answers-style-settings").find(".color-scheme").find("li.active").attr("data-id")},buttons:{backgroundColor:G(".buttons-background-color").val(),borderSize:G(".buttons-border-size").val(),borderColor:G(".buttons-border-color").val(),borderRadius:G(".buttons-border-radius").val(),paddingLeftRight:G(".buttons-padding-left-right").val(),paddingTopBottom:G(".buttons-padding-top-bottom").val(),textColor:G(".buttons-text-color").val(),textSize:G(".buttons-text-size").val(),textWeight:G(".buttons-text-weight").val()},captcha:{},errors:{borderLeftColorForSuccess:G(".errors-border-left-color-for-success").val(),borderLeftColorForError:G(".errors-border-left-color-for-error").val(),borderLeftSize:G(".errors-border-left-size").val(),paddingTopBottom:G(".errors-padding-top-bottom").val(),textColor:G(".errors-text-color").val(),textSize:G(".errors-text-size").val(),textWeight:G(".errors-text-weight").val()},custom:{css:G(".custom-styles-custom-css").val()}}},options:{poll:{voteButtonLabel:G(".vote-button-label").val(),showResultsLink:G(".show-results-link").val(),resultsLabelText:G(".results-label-text").val(),showTotalVotes:G(".show-total-votes").val(),showTotalAnswers:G(".show-total-answers").val(),startDateOption:G(".start-date-option").val(),startDateCustom:G(".start-date-custom-hidden").val(),endDateOption:G(".end-date-option").val(),endDateCustom:G(".end-date-custom-hidden").val(),redirectAfterVote:G(".redirect-after-vote").val(),redirectUrl:G(".redirect-url").val(),resetPollStatsAutomatically:G(".reset-poll-stats-automatically").val(),resetPollStatsOn:G(".reset-poll-stats-on-hidden").val(),resetPollStatsEvery:G(".reset-poll-stats-every").val(),resetPollStatsEveryPeriod:G(".reset-poll-stats-every-period").val(),autoGeneratePollPage:G(".auto-generate-poll-page").val(),pageId:"",pageLink:"",useCaptcha:G(".use-captcha").val(),sendEmailNotifications:G(".send-email-notifications").val(),emailNotificationsFromName:G(".email-notifications-from-name").val(),emailNotificationsFromEmail:G(".email-notifications-from-email").val(),emailNotificationsRecipients:G(".email-notifications-recipients").val(),emailNotificationsSubject:G(".email-notifications-subject").val(),emailNotificationsMessage:G(".email-notifications-message").val(),enableGdpr:G(".enable-gdpr").val(),gdprSolution:G(".gdpr-solution").val(),gdprConsentText:G(".gdpr-consent-text").val()},access:{votePermissions:U,allowWordpressVotes:G(".allow-wordpress-votes").val(),blockVoters:Q,blockForValue:G(".block-for-value").val(),blockForPeriod:G(".block-for-period").val(),limitVotesPerUser:G(".limit-votes-per-user").val(),votesPerUserAllowed:G(".votes-per-user-allowed").val()},results:{showResultsMoment:Y,customDateResults:G(".custom-date-results-hidden").val(),showResultsTo:q,resultsDetails:W,backToVoteOption:G(".back-to-vote-option").val(),backToVoteCaption:G(".back-to-vote-caption").val(),sortResults:G(".sort-results").val(),sortResultsRule:G(".sort-results-rule").val(),displayResultsAs:G(".display-results-as").val(),barColor:G(".bar-color").val(),barHeight:G(".bar-height").val()}},elements:V,elementsRemoved:G(".poll-elements-list").attr("data-remove")},G(".spinner.publish").addClass("is-active"),G("#publish-poll").attr("disabled",!0),G.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"update_yop_poll",_token:G("#_token").val(),poll:JSON.stringify(e)}}).done(function(t){G(".spinner.publish").removeClass("is-active"),!0===t.success?toastr.success(htmlEncode(striptags(t.data)),"",{progressBar:!0,onHidden:function(){G("#publish-poll").attr("disabled",!1)}}):(G("#publish-poll").attr("disabled",!1),toastr.warning(htmlEncode(striptags(t.data))))})),t.preventDefault()})}),jQuery(document).ready(function(o){o(".delete-poll").click(function(t){var e=o(this).attr("data-id");""!==e&&BootstrapDialog.confirm({type:BootstrapDialog.TYPE_WARNING,title:objectL10n.yopPollParams.deleteTitle,message:objectL10n.yopPollParams.deletePollMessage,btnCancelLabel:objectL10n.yopPollParams.deleteCancelLabel,btnOKLabel:objectL10n.yopPollParams.deleteOkLabel,callback:function(t){t&&o.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"delete_single_yop_poll",_token:o('input[name="_token"]').val(),poll_id:e}}).done(function(t){!0===t.success?toastr.success(htmlEncode(striptags(t.data)),"",{progressBar:!0,onHidden:function(){window.location.assign("admin.php?page=yop-polls")}}):toastr.warning(htmlEncode(striptags(t.data)))})}}),t.preventDefault()}),o(".clone-poll").click(function(t){var e=o(this).attr("data-id");BootstrapDialog.confirm({type:BootstrapDialog.TYPE_WARNING,title:objectL10n.yopPollParams.deleteTitle,message:objectL10n.yopPollParams.clonePollMessage,btnCancelLabel:objectL10n.yopPollParams.deleteCancelLabel,btnOKLabel:objectL10n.yopPollParams.deleteOkLabel,callback:function(t){t&&o.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"clone_single_yop_poll",_token:o('input[name="_token"]').val(),poll_id:e}}).done(function(t){!0===t.success?toastr.success(htmlEncode(striptags(t.data)),"",{progressBar:!0,onHidden:function(){window.location.assign("admin.php?page=yop-polls")}}):toastr.warning(htmlEncode(striptags(t.data)))})}}),t.preventDefault()}),o("#current-poll-page-selector").keypress(function(t){var e,i,n,a,s=document.URL.split("?");if(13===t.which){if(void 0!==s[1])for(q=s[1].split("&"),i=0;i<q.length;i++)n=0===i?"?":"&","page_no"===(e=q[i].split("="))[0]?(a=e[1],s[0]+=n+e[0]+"="+o(this).val()):(e[1]=void 0!==e[1]?e[1]:"",s[0]+=n+e[0]+"="+e[1]);a!==o(this).val()&&window.location.assign(s[0])}}),o(".bulk-action").click(function(t){var e,i=o(".bulk-action-"+o(this).attr("data-position")).val(),n=[];switch(o('input[name="polls[]"]:checked').each(function(t){n.push(o(this).val())}),i){case"trash":formAction="delete_bulk_yop_poll",e=1<n.length?objectL10n.yopPollParams.deleteBulkPollsMultiMessage:objectL10n.yopPollParams.deleteBulkPollsSingleMessage;break;case"clone":formAction="clone_bulk_yop_poll",e=1<n.length?objectL10n.yopPollParams.cloneBulkPollsMultiMessage:objectL10n.yopPollParams.cloneBulkPollsSingleMessage;break;case"reset-votes":formAction="reset_bulk_yop_poll",e=1<n.length?objectL10n.yopPollParams.resetBulkPollsMultiMessage:objectL10n.yopPollParams.resetBulkPollsSingleMessage;break;default:formAction=""}""!==formAction?0<n.length?BootstrapDialog.confirm({type:BootstrapDialog.TYPE_WARNING,title:objectL10n.yopPollParams.deleteTitle,message:e,btnCancelLabel:objectL10n.yopPollParams.deleteCancelLabel,btnOKLabel:objectL10n.yopPollParams.deleteOkLabel,callback:function(t){t&&o.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:formAction,_token:o('input[name="_bulk_token"]').val(),polls:JSON.stringify(n)}}).done(function(t){!0===t.success?toastr.success(htmlEncode(striptags(t.data)),"",{progressBar:!0,onHidden:function(){window.location.assign("admin.php?page=yop-polls")}}):toastr.warning(htmlEncode(striptags(t.data)))})}}):BootstrapDialog.show({type:BootstrapDialog.TYPE_WARNING,title:objectL10n.yopPollParams.deleteTitle,message:objectL10n.yopPollParams.noPollsSelectedForBulk,buttons:[{label:objectL10n.yopPollParams.deleteOkLabel,action:function(t){t.close()}}]}):BootstrapDialog.show({type:BootstrapDialog.TYPE_WARNING,title:objectL10n.yopPollParams.deleteTitle,message:objectL10n.yopPollParams.noBulkActionSelected,buttons:[{label:objectL10n.yopPollParams.deleteOkLabel,action:function(t){t.close()}}]}),t.preventDefault()}),o(".get-poll-code").click(function(){var t=o(this).attr("data-id");o("#shortcode-popup").find(".generate-yop-poll-code").attr("data-id",t),o("#shortcode-popup").find(".poll-code").val('[yop_poll id="'+t+'"]'),o("#shortcode-popup").find(".shortcode-show-results").select2({minimumResultsForSearch:1/0}),o("#shortcode-popup").modal()}),o(".generate-yop-poll-code").click(function(t){var e=o(this).attr("data-id"),i=o("#shortcode-popup").find(".shortcode-tracking-id").val();"no"===o("#shortcode-popup").find(".shortcode-show-results").val()?""!==i?o("#shortcode-popup").find(".poll-code").val('[yop_poll id="'+e+'" tracking_id="'+i+'"]'):o("#shortcode-popup").find(".poll-code").val('[yop_poll id="'+e+'"]'):o("#shortcode-popup").find(".poll-code").val('[yop_poll id="'+e+'" show_results="1"]'),t.preventDefault()})}),jQuery(document).ready(function(s){s(".ban-poll").select2({minimumResultsForSearch:1/0}),s(".ban-by").select2({minimumResultsForSearch:1/0}),s(".ban-for-period").select2({minimumResultsForSearch:1/0}),s(".add-ban").click(function(t){var e,i,n=!1;e=s(".ban-for").val(),i=s(".ban-value").val(),""===e&&(n=!0,s(".ban-for").focus(),s(".ban-for").parent().addClass("has-error"),toastr.warning(htmlEncode(striptags(objectL10n.yopPollParams.saveBanParams.noBanFor)))),!1===n&&""===i&&(n=!0,s(".ban-value").focus(),s(".ban-value").parent().addClass("has-error"),toastr.warning(htmlEncode(striptags(objectL10n.yopPollParams.saveBanParams.noBanValue)))),!1===n&&(formData={ban:{poll_id:s(".ban-poll").val(),b_by:s(".ban-by").val(),b_for:s(".ban-for").val(),b_for_period:s(".ban-for-period").val(),b_value:s(".ban-value").val()}},s(".add-ban").attr("disabled",!0),s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"create_yop_poll_ban",_token:s("#_token").val(),ban:JSON.stringify(formData)}}).done(function(t){!0===t.success?toastr.success(htmlEncode(striptags(t.data)),"",{progressBar:!0,onHidden:function(){window.location.assign("admin.php?page=yop-poll-bans")}}):(s(".add-ban").attr("disabled",!1),toastr.warning(htmlEncode(striptags(t.data))))})),t.preventDefault()}),s(".ban-for").change(function(){""!==s(this).val()&&s(this).parent().removeClass("has-error")}),s(".ban-value").change(function(){""!==s(this).val()&&s(this).parent().removeClass("has-error")}),s(".delete-ban").click(function(t){var e=s(this).attr("data-id");""!==e&&BootstrapDialog.confirm({type:BootstrapDialog.TYPE_WARNING,title:objectL10n.yopPollParams.deleteTitle,message:objectL10n.yopPollParams.deleteBanMessage,btnCancelLabel:objectL10n.yopPollParams.deleteCancelLabel,btnOKLabel:objectL10n.yopPollParams.deleteOkLabel,callback:function(t){t&&s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"delete_yop_poll_ban",_token:s('input[name="_token"]').val(),ban_id:e}}).done(function(t){!0===t.success?toastr.success(htmlEncode(striptags(t.data)),"",{progressBar:!0,onHidden:function(){window.location.assign("admin.php?page=yop-poll-bans")}}):toastr.warning(htmlEncode(striptags(t.data)))})}}),t.preventDefault()}),s(".update-ban").click(function(t){var e,i,n,a=!1;e=s(".ban-for").val(),i=s(".ban-value").val(),""===e&&(a=!0,s(".ban-for").focus(),s(".ban-for").parent().addClass("has-error"),toastr.warning(htmlEncode(striptags(objectL10n.yopPollParams.saveBanParams.noBanFor)))),!1===a&&""===i&&(a=!0,s(".ban-value").focus(),s(".ban-value").parent().addClass("has-error"),toastr.warning(htmlEncode(striptags(objectL10n.yopPollParams.saveBanParams.noBanValue)))),!1===a&&(n={ban:{id:s(this).attr("data-id"),poll_id:s(".ban-poll").val(),b_by:s(".ban-by").val(),b_for:s(".ban-for").val(),b_for_period:s(".ban-for-period").val(),b_value:s(".ban-value").val()}},s(".update-ban").attr("disabled",!0),s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"update_yop_poll_ban",_token:s("#_token").val(),ban:JSON.stringify(n)}}).done(function(t){!0===t.success?toastr.success(htmlEncode(striptags(t.data)),"",{progressBar:!0,onHidden:function(){window.location.assign("admin.php?page=yop-poll-bans")}}):(s(".add-ban").attr("disabled",!1),toastr.warning(htmlEncode(striptags(t.data))))})),t.preventDefault()}),s(".bans-bulk-action").click(function(t){var e,i=[];s('input[name="bans[]"]:checked').each(function(t){i.push(s(this).val())}),"trash"===s(".bans-bulk-action-"+s(this).attr("data-position")).val()?(e=1<i.length?objectL10n.yopPollParams.deleteBulkBansMultiMessage:objectL10n.yopPollParams.deleteBulkBansSingleMessage,0<i.length?BootstrapDialog.confirm({type:BootstrapDialog.TYPE_WARNING,title:objectL10n.yopPollParams.deleteTitle,message:e,btnCancelLabel:objectL10n.yopPollParams.deleteCancelLabel,btnOKLabel:objectL10n.yopPollParams.deleteOkLabel,callback:function(t){t&&s.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"delete_bulk_yop_poll_ban",_token:s('input[name="_bulk_token"]').val(),bans:JSON.stringify(i)}}).done(function(t){!0===t.success?toastr.success(htmlEncode(striptags(t.data)),"",{progressBar:!0,onHidden:function(){window.location.assign("admin.php?page=yop-poll-bans")}}):toastr.warning(htmlEncode(striptags(t.data)))})}}):BootstrapDialog.show({type:BootstrapDialog.TYPE_WARNING,title:objectL10n.yopPollParams.deleteTitle,message:objectL10n.yopPollParams.noBansSelectedForBulk,buttons:[{label:objectL10n.yopPollParams.deleteOkLabel,action:function(t){t.close()}}]})):BootstrapDialog.show({type:BootstrapDialog.TYPE_WARNING,title:objectL10n.yopPollParams.deleteTitle,message:objectL10n.yopPollParams.noBulkActionSelected,buttons:[{label:objectL10n.yopPollParams.deleteOkLabel,action:function(t){t.close()}}]})})}),jQuery(document).ready(function(n){n(".delete-log").click(function(t){var e=n(this).attr("data-id");""!==e&&BootstrapDialog.confirm({type:BootstrapDialog.TYPE_WARNING,title:objectL10n.yopPollParams.deleteTitle,message:objectL10n.yopPollParams.deleteLogMessage,btnCancelLabel:objectL10n.yopPollParams.deleteCancelLabel,btnOKLabel:objectL10n.yopPollParams.deleteOkLabel,callback:function(t){t&&n.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"delete_yop_poll_log",_token:n('input[name="_token"]').val(),log_id:e}}).done(function(t){!0===t.success?toastr.success(htmlEncode(striptags(t.data)),"",{progressBar:!0,onHidden:function(){window.location.assign("admin.php?page=yop-poll-logs")}}):toastr.warning(htmlEncode(striptags(t.data)))})}}),t.preventDefault()}),n(".logs-bulk-action").click(function(t){var e,i=[];n('input[name="logs[]"]:checked').each(function(t){i.push(n(this).val())}),"trash"===n(".logs-bulk-action-"+n(this).attr("data-position")).val()?(e=1<i.length?objectL10n.yopPollParams.deleteBulkLogsMultiMessage:objectL10n.yopPollParams.deleteBulkLogsSingleMessage,0<i.length?BootstrapDialog.confirm({type:BootstrapDialog.TYPE_WARNING,title:objectL10n.yopPollParams.deleteTitle,message:e,btnCancelLabel:objectL10n.yopPollParams.deleteCancelLabel,btnOKLabel:objectL10n.yopPollParams.deleteOkLabel,callback:function(t){t&&n.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"delete_bulk_yop_poll_log",_token:n('input[name="_bulk_token"]').val(),logs:JSON.stringify(i)}}).done(function(t){!0===t.success?toastr.success(htmlEncode(striptags(t.data)),"",{progressBar:!0,onHidden:function(){window.location.assign("admin.php?page=yop-poll-logs")}}):toastr.warning(htmlEncode(striptags(t.data)))})}}):BootstrapDialog.show({type:BootstrapDialog.TYPE_WARNING,title:objectL10n.yopPollParams.deleteTitle,message:objectL10n.yopPollParams.noLogsSelectedForBulk,buttons:[{label:objectL10n.yopPollParams.deleteOkLabel,action:function(t){t.close()}}]})):BootstrapDialog.show({type:BootstrapDialog.TYPE_WARNING,title:objectL10n.yopPollParams.deleteTitle,message:objectL10n.yopPollParams.noBulkActionSelected,buttons:[{label:objectL10n.yopPollParams.deleteOkLabel,action:function(t){t.close()}}]})}),n(".view-log-details").click(function(t){var e=n(this).data("id"),i=n(this).parent().parent().next(".log-details-div");n(i).is(":visible")?(n(i).fadeOut("slow"),n(this).text(objectL10n.yopPollParams.showLogDetailsLinkText)):(n(this).text(objectL10n.yopPollParams.hideLogDetailsLinkText),"yes"===n(i).data("ajax_sent")?n(i).fadeIn("slow"):(n.LoadingOverlay("show"),n.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"get_yop_poll_log_details",_token:n('input[name="_token"]').val(),log_id:e}}).done(function(t){!0===t.success?(strDetails=t.data.details,n(i).html(strDetails).fadeIn("slow"),n(i).data("ajax_sent","yes")):toastr.warning(htmlEncode(striptags(t.data))),n.LoadingOverlay("hide")}))),t.preventDefault()}),n(".export-logs-button").click(function(t){n("#doExport").val("true"),n("#searchForm").submit()}),n("#search-submit").click(function(t){n("#doExport").val("false")})}),jQuery(document).ready(function(d){d(".progress-bar").each(function(){d(this).yopprogressbar({})}),d(".answers-chart-type").select2({minimumResultsForSearch:1/0}),d(".voters-chart-type").select2({minimumResultsForSearch:1/0}),d(".answers-chart-type").change(function(){var t,e,i,n,a,s,o,r,l;if(function(){return"rgb("+Math.floor(255*Math.random())+","+Math.floor(255*Math.random())+","+Math.floor(255*Math.random())+")"},t=d(this).val(),e=d(this).closest(".panel-body").find(".chart-canvas"),i=d(this).closest(".panel-body").find(".bar-chart-div"),"pie"===t){for(d(e).show(),d(i).hide(),n=d(e).data("jsondata"),a=d(e).data("jsonlabels"),s=d(e).data("resultscolor"),r=d(e).data("icons"),o=[],l=0;l<r.length;l++)"other"===r[l]?(o.push(""),a[l]+=" "):o.push("");new Chart(e,{type:"pie",responsive:!0,maintainAspectRatio:!0,data:{labels:a,icons:o,datasets:[{label:objectL10n.yopPollParams.numberOfVotesText,data:n,backgroundColor:s,icons:o,datalabels:{anchor:"end"}}]},pointLabelFontFamily:"'FontAwesome'",scaleFontFamily:"'FontAwesome'",options:{legend:{display:!0,labels:{fontFamily:"'FontAwesome'",fontSize:12}},tooltips:{enabled:!0,titleFontFamily:"'FontAwesome'",bodyFontFamily:"'FontAwesome'",footerFontFamily:"'FontAwesome'"},tooltipTitleFontFamily:"'FontAwesome'",plugins:{datalabels:{anchor:"end",borderColor:"red",borderRadius:5,borderWidth:0,color:"#387cb7",font:{family:"FontAwesome",size:20},display:!0,formatter:function(t,e){return e.chart.data.icons[e.dataIndex]}}}}})}else"bar"===t&&(d(e).hide(),d(i).show())}),d(".voters-chart-type").change(function(){var t,e,i,n,a,s;t=d(this).val(),e=d(this).closest(".panel-body").find(".chart-voters-canvas"),i=d(this).closest(".panel-body").find(".bar-chart-voters-div"),"pie"===t?(d(e).show(),d(i).hide(),n=d(e).data("jsondata"),a=d(e).data("jsonlabels"),s=d(e).data("resultscolor"),new Chart(e,{type:"pie",responsive:!0,maintainAspectRatio:!0,data:{labels:a,datasets:[{label:"Number of Votes",data:n,backgroundColor:s}]}})):"bar"===t&&(d(e).hide(),d(i).show())}),d("#cf-pagination").bootpag({total:d("#cf-total-pages").val()}).on("page",function(t,e){d.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"get_yop_poll_votes_customs",_token:d('input[name="_token"]').val(),page:e,poll_id:d("#poll_id").val()}}).done(function(t){!0===t.success?d("#cf-table tbody").html(t.data):toastr.warning(htmlEncode(striptags(t.data)))})}),d(".details-operation").click(function(t){var e,i,n,a;e=d(this).data("vote-id"),i=d(this).data("ajax-sent"),n=d("#vote-details-div-"+e),a=d(this),d(n).is(":visible")?d(n).fadeOut("slow"):"yes"===i?d("#vote-details-div-"+e).fadeIn("slow"):(d.LoadingOverlay("show"),d.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"yop-poll-get-vote-details",_token:d('input[name="_token"]').val(),voteid:e}}).done(function(t){!0===t.success?(d(n).html(t.data.details),d(n).fadeIn("slow"),d(a).data("ajax-sent","yes")):toastr.warning(htmlEncode(striptags(t.data))),d.LoadingOverlay("hide")})),t.preventDefault()}),d(".delete-vote").click(function(t){var e=d(this).attr("data-id"),i=d('input[name="poll_id"]').val();""!==e&&BootstrapDialog.confirm({type:BootstrapDialog.TYPE_WARNING,title:objectL10n.yopPollParams.deleteTitle,message:objectL10n.yopPollParams.deleteBulkVotesSingleMessage,btnCancelLabel:objectL10n.yopPollParams.deleteCancelLabel,btnOKLabel:objectL10n.yopPollParams.deleteOkLabel,callback:function(t){t&&d.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"yop_poll_delete_vote",_token:d('input[name="_token"]').val(),poll_id:i,vote_id:e}}).done(function(t){!0===t.success?toastr.success(htmlEncode(striptags(t.data)),"",{progressBar:!0,onHidden:function(){window.location.assign("admin.php?page=yop-polls&action=view-votes&poll_id="+i)}}):toastr.warning(htmlEncode(striptags(t.data)))})}}),t.preventDefault()}),d(".votes-bulk-action").click(function(t){var e,i=[],n=d('input[name="poll_id"]').val(),a=d("#votes-search-input").val();d('input[name="votes[]"]:checked').each(function(t){i.push(d(this).val())}),"trash"===d(".logs-bulk-action-"+d(this).attr("data-position")).val()?(e=1<i.length?objectL10n.yopPollParams.deleteBulkVotessMultiMessage:objectL10n.yopPollParams.deleteBulkVotesSingleMessage,0<i.length?BootstrapDialog.confirm({type:BootstrapDialog.TYPE_WARNING,title:objectL10n.yopPollParams.deleteTitle,message:e,btnCancelLabel:objectL10n.yopPollParams.deleteCancelLabel,btnOKLabel:objectL10n.yopPollParams.deleteOkLabel,callback:function(t){t&&d.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"yop_poll_delete_votes_bulk",_token:d('input[name="_bulk_token"]').val(),poll_id:n,votes:JSON.stringify(i)}}).done(function(t){!0===t.success?toastr.success(htmlEncode(striptags(t.data)),"",{progressBar:!0,onHidden:function(){window.location.assign("admin.php?page=yop-polls&action=view-votes&poll_id="+n+"&q="+a)}}):toastr.warning(htmlEncode(striptags(t.data)))})}}):BootstrapDialog.show({type:BootstrapDialog.TYPE_WARNING,title:objectL10n.yopPollParams.deleteTitle,message:objectL10n.yopPollParams.noVotesSelectedForBulk,buttons:[{label:objectL10n.yopPollParams.deleteOkLabel,action:function(t){t.close()}}]})):BootstrapDialog.show({type:BootstrapDialog.TYPE_WARNING,title:objectL10n.yopPollParams.deleteTitle,message:objectL10n.yopPollParams.noBulkActionSelected,buttons:[{label:objectL10n.yopPollParams.deleteOkLabel,action:function(t){t.close()}}]})}),d(".btn-submit-add-votes-manually").click(function(){var e=d(this).attr("data-poll-id"),i=[];d(".section-main-add-votes-manually .question-section").each(function(t){var e=[];d(this).find(".answer-element").each(function(t){e[t]={id:d(this).attr("data-id"),votes:d(this).val()}}),i[t]={id:d(this).attr("data-id"),answers:e}}),d(".section-footer-add-votes-manually .btn-submit-add-votes-manually").attr("disabled",!0),d(".section-footer-add-votes-manually .spinner").removeClass("hide").addClass("is-active"),d.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"yop_poll-add-votes-manually",_token:d('input[name="_token-add-votes-manually"]').val(),id:e,data:JSON.stringify(i)}}).done(function(t){d(".section-footer-add-votes-manually .spinner").removeClass("is-active").addClass("hide"),!0===t.success?toastr.success(htmlEncode(striptags(t.data)),"",{progressBar:!0,onHidden:function(){window.location.assign("admin.php?page=yop-polls&action=view-votes&poll_id="+e)}}):(d(".section-footer-add-votes-manually .btn-submit-add-votes-manually").attr("disabled",!1),toastr.warning(htmlEncode(striptags(t.data))))})}),d(".btn-cancel-add-votes-manually").click(function(){d(".section-footer-add-votes-manually .spinner").removeClass("is-active").addClass("hide"),d("#modal-add-votes-manually").modal("hide")})}),jQuery(document).ready(function(a){var i,n=function(t,e,i,n){switch(t){case"tab-notifications":a("#tab-notifications").addClass("active"),a("#settings-notifications").addClass("active"),a("#tab-integrations").removeClass("active"),a("#settings-integrations").removeClass("active"),a("#tab-messages").removeClass("active"),a("#settings-messages").removeClass("active");break;case"tab-integrations":a("#tab-integrations").addClass("active"),a("#settings-integrations").addClass("active"),a("#tab-notifications").removeClass("active"),a("#settings-notifications").removeClass("active"),a("#tab-messages").removeClass("active"),a("#settings-messages").removeClass("active");break;case"tab-messages":switch(a("#tab-messages").addClass("active"),a("#settings-messages").addClass("active"),a("#tab-notifications").removeClass("active"),a("#settings-notifications").removeClass("active"),a("#tab-integrations").removeClass("active"),a("#settings-integrations").removeClass("active"),e){case 1:a("#settings-messages").find('a[data-content="settings-messages-buttons"]').addClass("btn-underline"),a("#settings-messages").find('a[data-content="settings-messages-voting"]').removeClass("btn-underline"),a("#settings-messages").find('a[data-content="settings-messages-results"]').removeClass("btn-underline"),a("#settings-messages").find('a[data-content="settings-messages-captcha"]').removeClass("btn-underline"),a("#settings-messages .settings-messages-buttons").removeClass("hide"),a("#settings-messages .settings-messages-voting").addClass("hide"),a("#settings-messages .settings-messages-results").addClass("hide"),a("#settings-messages .settings-messages-captcha").addClass("hide");break;case 2:a("#settings-messages").find('a[data-content="settings-messages-buttons"]').removeClass("btn-underline"),a("#settings-messages").find('a[data-content="settings-messages-voting"]').addClass("btn-underline"),a("#settings-messages").find('a[data-content="settings-messages-results"]').removeClass("btn-underline"),a("#settings-messages").find('a[data-content="settings-messages-captcha"]').removeClass("btn-underline"),a("#settings-messages .settings-messages-buttons").addClass("hide"),a("#settings-messages .settings-messages-voting").removeClass("hide"),a("#settings-messages .settings-messages-results").addClass("hide"),a("#settings-messages .settings-messages-captcha").addClass("hide");break;case 3:a("#settings-messages").find('a[data-content="settings-messages-buttons"]').removeClass("btn-underline"),a("#settings-messages").find('a[data-content="settings-messages-voting"]').removeClass("btn-underline"),a("#settings-messages").find('a[data-content="settings-messages-results"]').addClass("btn-underline"),a("#settings-messages").find('a[data-content="settings-messages-captcha"]').removeClass("btn-underline"),a("#settings-messages .settings-messages-buttons").addClass("hide"),a("#settings-messages .settings-messages-voting").addClass("hide"),a("#settings-messages .settings-messages-results").removeClass("hide"),a("#settings-messages .settings-messages-captcha").addClass("hide");break;case 4:a("#settings-messages").find('a[data-content="settings-messages-buttons"]').removeClass("btn-underline"),a("#settings-messages").find('a[data-content="settings-messages-voting"]').removeClass("btn-underline"),a("#settings-messages").find('a[data-content="settings-messages-results"]').removeClass("btn-underline"),a("#settings-messages").find('a[data-content="settings-messages-captcha"]').addClass("btn-underline"),a("#settings-messages .settings-messages-buttons").addClass("hide"),a("#settings-messages .settings-messages-voting").addClass("hide"),a("#settings-messages .settings-messages-results").addClass("hide"),a("#settings-messages .settings-messages-captcha").removeClass("hide")}}a("#"+i).css("borderColor","#f00"),""!==n&&toastr.warning(htmlEncode(striptags(n)))};a(".integrations-reCaptcha-enabled").select2({minimumResultsForSearch:1/0}),a(".integrations-facebook-enabled").select2({minimumResultsForSearch:1/0}),a(".integrations-google-enabled").select2({minimumResultsForSearch:1/0}),a(".settings-required-field").focusout(function(t){""!==a.trim(a(this).val())&&a(this).css("borderColor","#ccc")}),a(".integrations-reCaptcha-enabled").change(function(){"yes"===a(this).val()?a(".integrations-reCaptcha-section").removeClass("hide"):a(".integrations-reCaptcha-section").addClass("hide")}),a(".save-settings").click(function(t){var e=!1;!1===e&&""===a.trim(a("#email-from-name").val())&&(e=!0,n("tab-notifications",0,"email-from-name",a("#email-from-name").siblings("label").text()+objectL10n.yopPollParams.saveParams.generalErrorMessage)),!1===e&&""===a.trim(a("#email-from-email").val())&&(e=!0,n("tab-notifications",0,"email-from-email",a("#email-from-email").siblings("label").text()+objectL10n.yopPollParams.saveParams.generalErrorMessage)),!1===e&&""===a.trim(a("#email-recipients").val())&&(e=!0,n("tab-notifications",0,"email-recipients",a("#email-recipients").siblings("label").text()+objectL10n.yopPollParams.saveParams.generalErrorMessage)),!1===e&&""===a.trim(a("#email-subject").val())&&(e=!0,n("tab-notifications",0,"email-subject",a("#email-subject").siblings("label").text()+objectL10n.yopPollParams.saveParams.generalErrorMessage)),!1===e&&""===a.trim(a("#email-message").val())&&(e=!0,n("tab-notifications",0,"email-message",a("#email-message").siblings("label").text()+objectL10n.yopPollParams.saveParams.generalErrorMessage)),"yes"===a("#integrations-reCaptcha-enabled").val()&&!1===e&&""===a.trim(a("#integrations-reCaptcha-site-key").val())&&(e=!0,n("tab-integrations",0,"integrations-reCaptcha-site-key",a("#integrations-reCaptcha-site-key").closest(".integrations-reCaptcha-section").find(".input-caption:first").text()+objectL10n.yopPollParams.saveParams.generalErrorMessage)),"yes"===a("#integrations-reCaptcha-enabled").val()&&!1===e&&""===a.trim(a("#integrations-reCaptcha-secret-key").val())&&(e=!0,n("tab-integrations",0,"integrations-reCaptcha-secret-key",a("#integrations-reCaptcha-secret-key").closest(".integrations-reCaptcha-section").find(".input-caption").eq(1).text()+objectL10n.yopPollParams.saveParams.generalErrorMessage)),"yes"===a("#integrations-facebook-enabled").val()&&!1===e&&""===a.trim(a("#integrations-facebook-app-id").val())&&(e=!0,n("tab-integrations",0,"integrations-facebook-app-id",a("#integrations-facebook-app-id").closest(".integrations-facebook-section").find(".input-caption").text()+objectL10n.yopPollParams.saveParams.generalErrorMessage)),"yes"===a("#integrations-google-enabled").val()&&!1===e&&""===a.trim(a("#integrations-google-app-id").val())&&(e=!0,n("tab-integrations",0,"integrations-google-app-id",a("#integrations-google-app-id").closest(".integrations-google-section").find(".input-caption:first").text()+objectL10n.yopPollParams.saveParams.generalErrorMessage)),"yes"===a("#integrations-google-enabled").val()&&!1===e&&""===a.trim(a("#integrations-google-app-secret").val())&&(e=!0,n("tab-integrations",0,"integrations-google_app_secret",a("#integrations-google-app-secret").closest(".integrations-google-section").find(".input-caption").eq(1).text()+objectL10n.yopPollParams.saveParams.generalErrorMessage)),!1===e&&""===a.trim(a("#messages-buttons-anonymous").val())&&(e=!0,n("tab-messages",1,"messages-buttons-anonymous",objectL10n.yopPollParams.saveParams.generalTextForMessages+'"'+a("#messages-buttons-anonymous").closest(".messages-fields").find(".input-caption").text()+'"'+objectL10n.yopPollParams.saveParams.generalErrorMessage)),!1===e&&""===a.trim(a("#messages-buttons-wordpress").val())&&(e=!0,n("tab-messages",1,"messages-buttons-wordpress",objectL10n.yopPollParams.saveParams.generalTextForMessages+'"'+a("#messages-buttons-wordpress").closest(".messages-fields").find(".input-caption").text()+'"'+objectL10n.yopPollParams.saveParams.generalErrorMessage)),!1===e&&""===a.trim(a("#messages-buttons-facebook").val())&&(e=!0,n("tab-messages",1,"messages-buttons-facebook",objectL10n.yopPollParams.saveParams.generalTextForMessages+'"'+a("#messages-buttons-facebook").closest(".messages-fields").find(".input-caption").text()+'"'+objectL10n.yopPollParams.saveParams.generalErrorMessage)),!1===e&&""===a.trim(a("#messages-buttons-google").val())&&(e=!0,n("tab-messages",1,"messages-buttons-google",objectL10n.yopPollParams.saveParams.generalTextForMessages+'"'+a("#messages-buttons-google").closest(".messages-fields").find(".input-caption").text()+'"'+objectL10n.yopPollParams.saveParams.generalErrorMessage)),!1===e&&""===a.trim(a("#messages-voting-poll-ended").val())&&(e=!0,n("tab-messages",2,"messages-voting-poll-ended",objectL10n.yopPollParams.saveParams.generalTextForMessages+'"'+a("#messages-voting-poll-ended").closest(".messages-fields").find(".input-caption").text()+'"'+objectL10n.yopPollParams.saveParams.generalErrorMessage)),!1===e&&""===a.trim(a("#messages-voting-poll-not-started").val())&&(e=!0,n("tab-messages",2,"messages-voting-poll-not-started",objectL10n.yopPollParams.saveParams.generalTextForMessages+'"'+a("#messages-voting-poll-not-started").closest(".messages-fields").find(".input-caption").text()+'"'+objectL10n.yopPollParams.saveParams.generalErrorMessage)),!1===e&&""===a.trim(a("#messages-voting-already-voted-on-poll").val())&&(e=!0,n("tab-messages",2,"messages-voting-already-voted-on-poll",objectL10n.yopPollParams.saveParams.generalTextForMessages+'"'+a("#messages-voting-already-voted-on-poll").closest(".messages-fields").find(".input-caption").text()+'"'+objectL10n.yopPollParams.saveParams.generalErrorMessage)),!1===e&&""===a.trim(a("#messages-voting-invalid-poll").val())&&(e=!0,n("tab-messages",2,"messages-voting-invalid-poll",objectL10n.yopPollParams.saveParams.generalTextForMessages+'"'+a("#messages-voting-invalid-poll").closest(".messages-fields").find(".input-caption").text()+'"'+objectL10n.yopPollParams.saveParams.generalErrorMessage)),!1===e&&""===a.trim(a("#messages-voting-no-answer-selected").val())&&(e=!0,n("tab-messages",2,"messages-voting-no-answer-selected",objectL10n.yopPollParams.saveParams.generalTextForMessages+'"'+a("#messages-voting-no-answer-selected").closest(".messages-fields").find(".input-caption").text()+'"'+objectL10n.yopPollParams.saveParams.generalErrorMessage)),!1===e&&""===a.trim(a("#messages-voting-min-answers-required").val())&&(e=!0,n("tab-messages",2,"messages-voting-min-answers-required",objectL10n.yopPollParams.saveParams.generalTextForMessages+'"'+a("#messages-voting-min-answers-required").closest(".messages-fields").find(".input-caption").text()+'"'+objectL10n.yopPollParams.saveParams.generalErrorMessage)),!1===e&&""===a.trim(a("#messages-voting-max-answers-required").val())&&(e=!0,n("tab-messages",2,"messages-voting-max-answers-required",objectL10n.yopPollParams.saveParams.generalTextForMessages+'"'+a("#messages-voting-max-answers-required").closest(".messages-fields").find(".input-caption").text()+'"'+objectL10n.yopPollParams.saveParams.generalErrorMessage)),!1===e&&""===a.trim(a("#messages-voting-no-value-for-other").val())&&(e=!0,n("tab-messages",2,"messages-voting-no-value-for-other",objectL10n.yopPollParams.saveParams.generalTextForMessages+'"'+a("#messages-voting-no-value-for-other").closest(".messages-fields").find(".input-caption").text()+'"'+objectL10n.yopPollParams.saveParams.generalErrorMessage)),!1===e&&""===a.trim(a("#messages-voting-no-value-for-custom-field").val())&&(e=!0,n("tab-messages",2,"messages-voting-no-value-for-custom-field",objectL10n.yopPollParams.saveParams.generalTextForMessages+'"'+a("#messages-voting-no-value-for-custom-field").closest(".messages-fields").find(".input-caption").text()+'"'+objectL10n.yopPollParams.saveParams.generalErrorMessage)),!1===e&&""===a.trim(a("#messages-voting-consent-not-checked").val())&&(e=!0,n("tab-messages",2,"messages-voting-consent-not-checked",objectL10n.yopPollParams.saveParams.generalTextForMessages+'"'+a("#messages-voting-consent-not-checked").closest(".messages-fields").find(".input-caption").text()+'"'+objectL10n.yopPollParams.saveParams.generalErrorMessage)),!1===e&&""===a.trim(a("#messages-voting-captcha-not-checked").val())&&(e=!0,n("tab-messages",2,"messages-voting-captcha-not-checked",objectL10n.yopPollParams.saveParams.generalTextForMessages+'"'+a("#messages-voting-captcha-not-checked").closest(".messages-fields").find(".input-caption").text()+'"'+objectL10n.yopPollParams.saveParams.generalErrorMessage)),!1===e&&""===a.trim(a("#messages-voting-vote-not-allowed-by-ban").val())&&(e=!0,n("tab-messages",2,"messages-voting-vote-not-allowed-by-ban",objectL10n.yopPollParams.saveParams.generalTextForMessages+'"'+a("#messages-voting-vote-not-allowed-by-ban").closest(".messages-fields").find(".input-caption").text()+'"'+objectL10n.yopPollParams.saveParams.generalErrorMessage)),!1===e&&""===a.trim(a("#messages-voting-vote-not-allowed-by-block").val())&&(e=!0,n("tab-messages",2,"messages-voting-vote-not-allowed-by-block",objectL10n.yopPollParams.saveParams.generalTextForMessages+'"'+a("#messages-voting-vote-not-allowed-by-block").closest(".messages-fields").find(".input-caption").text()+'"'+objectL10n.yopPollParams.saveParams.generalErrorMessage)),!1===e&&""===a.trim(a("#messages-voting-vote-not-allowed-by-limit").val())&&(e=!0,n("tab-messages",2,"messages-voting-vote-not-allowed-by-limit",objectL10n.yopPollParams.saveParams.generalTextForMessages+'"'+a("#messages-voting-vote-not-allowed-by-limit").closest(".messages-fields").find(".input-caption").text()+'"'+objectL10n.yopPollParams.saveParams.generalErrorMessage)),!1===e&&""===a.trim(a("#messages-voting-thank-you").val())&&(e=!0,n("tab-messages",2,"messages-voting-thank-you",objectL10n.yopPollParams.saveParams.generalTextForMessages+'"'+a("#messages-voting-thank-you").closest(".messages-fields").find(".input-caption").text()+'"'+objectL10n.yopPollParams.saveParams.generalErrorMessage)),!1===e&&""===a.trim(a("#messages-results-single-vote").val())&&(e=!0,n("tab-messages",3,"messages-results-single-vote",objectL10n.yopPollParams.saveParams.generalTextForMessages+'"'+a("#messages-results-single-vote").closest(".messages-fields").find(".input-caption").text()+'"'+objectL10n.yopPollParams.saveParams.generalErrorMessage)),!1===e&&""===a.trim(a("#messages-results-multiple-votes").val())&&(e=!0,n("tab-messages",3,"messages-results-multiple-votes",objectL10n.yopPollParams.saveParams.generalTextForMessages+'"'+a("#messages-results-multiple-votes").closest(".messages-fields").find(".input-caption").text()+'"'+objectL10n.yopPollParams.saveParams.generalErrorMessage)),!1===e&&""===a.trim(a("#messages-results-single-answer").val())&&(e=!0,n("tab-messages",3,"messages-results-single-answer",objectL10n.yopPollParams.saveParams.generalTextForMessages+'"'+a("#messages-results-single-answer").closest(".messages-fields").find(".input-caption").text()+'"'+objectL10n.yopPollParams.saveParams.generalErrorMessage)),!1===e&&""===a.trim(a("#messages-results-multiple-answers").val())&&(e=!0,n("tab-messages",3,"messages-results-multiple-answers",objectL10n.yopPollParams.saveParams.generalTextForMessages+'"'+a("#messages-results-multiple-answers").closest(".messages-fields").find(".input-caption").text()+'"'+objectL10n.yopPollParams.saveParams.generalErrorMessage)),!1===e&&""===a.trim(a("#messages-captcha-accessibility-alt").val())&&(e=!0,n("tab-messages",4,"messages-captcha-accessibility-alt",objectL10n.yopPollParams.saveParams.generalTextForMessages+'"'+a("#messages-captcha-accessibility-alt").closest(".messages-fields").find(".input-caption").text()+'"'+objectL10n.yopPollParams.saveParams.generalErrorMessage)),!1===e&&""===a.trim(a("#messages-captcha-accessibility-title").val())&&(e=!0,n("tab-messages",4,"messages-captcha-accessibility-title",objectL10n.yopPollParams.saveParams.generalTextForMessages+'"'+a("#messages-captcha-accessibility-title").closest(".messages-fields").find(".input-caption").text()+'"'+objectL10n.yopPollParams.saveParams.generalErrorMessage)),!1===e&&""===a.trim(a("#messages-captcha-accessibility-description").val())&&(e=!0,n("tab-messages",4,"messages-captcha-accessibility-description",objectL10n.yopPollParams.saveParams.generalTextForMessages+'"'+a("#messages-captcha-accessibility-description").closest(".messages-fields").find(".input-caption").text()+'"'+objectL10n.yopPollParams.saveParams.generalErrorMessage)),!1===e&&""===a.trim(a("#messages-captcha-accessibility-explanation").val())&&(e=!0,n("tab-messages",4,"messages-captcha-accessibility-explanation",objectL10n.yopPollParams.saveParams.generalTextForMessages+'"'+a("#messages-captcha-accessibility-explanation").closest(".messages-fields").find(".input-caption").text()+'"'+objectL10n.yopPollParams.saveParams.generalErrorMessage)),!1===e&&""===a.trim(a("#messages-captcha-refresh-alt").val())&&(e=!0,n("tab-messages",4,"messages-captcha-refresh-alt",objectL10n.yopPollParams.saveParams.generalTextForMessages+'"'+a("#messages-captcha-refresh-alt").closest(".messages-fields").find(".input-caption").text()+'"'+objectL10n.yopPollParams.saveParams.generalErrorMessage)),!1===e&&""===a.trim(a("#messages-captcha-refresh-title").val())&&(e=!0,n("tab-messages",4,"messages-captcha-refresh-title",objectL10n.yopPollParams.saveParams.generalTextForMessages+'"'+a("#messages-captcha-refresh-title").closest(".messages-fields").find(".input-caption").text()+'"'+objectL10n.yopPollParams.saveParams.generalErrorMessage)),!1===e&&(i={email:{"from-name":a("#email-from-name").val(),"from-email":a("#email-from-email").val(),subject:a("#email-subject").val(),recipients:a("#email-recipients").val(),message:a("#email-message").val()},integrations:{reCaptcha:{enabled:a("#integrations-reCaptcha-enabled").val(),"site-key":a("#integrations-reCaptcha-site-key").val(),"secret-key":a("#integrations-reCaptcha-secret-key").val()},facebook:{enabled:a("#integrations-facebook-enabled").val(),"app-id":a("#integrations-facebook-app-id").val()},google:{enabled:a("#integrations-google-enabled").val(),"app-id":a("#integrations-google-app-id").val(),"app-secret":a("#integrations-google-app-secret").val()}},messages:{captcha:{"accessibility-alt":a("#messages-captcha-accessibility-alt").val(),"accessibility-title":a("#messages-captcha-accessibility-title").val(),"accessibility-description":a("#messages-captcha-accessibility-description").val(),explanation:a("#messages-captcha-accessibility-explanation").val(),"refresh-alt":a("#messages-captcha-refresh-alt").val(),"refresh-title":a("#messages-captcha-refresh-title").val()},buttons:{anonymous:a("#messages-buttons-anonymous").val(),wordpress:a("#messages-buttons-wordpress").val(),facebook:a("#messages-buttons-facebook").val(),google:a("#messages-buttons-google").val()},voting:{"poll-ended":a("#messages-voting-poll-ended").val(),"poll-not-started":a("#messages-voting-poll-not-started").val(),"already-voted-on-poll":a("#messages-voting-already-voted-on-poll").val(),"invalid-poll":a("#messages-voting-invalid-poll").val(),"no-answers-selected":a("#messages-voting-no-answer-selected").val(),"min-answers-required":a("#messages-voting-min-answers-required").val(),"max-answers-required":a("#messages-voting-max-answers-required").val(),"no-answer-for-other":a("#messages-voting-no-value-for-other").val(),"no-value-for-custom-field":a("#messages-voting-no-value-for-custom-field").val(),"consent-not-checked":a("#messages-voting-consent-not-checked").val(),"no-captcha-selected":a("#messages-voting-captcha-not-checked").val(),"not-allowed-by-ban":a("#messages-voting-vote-not-allowed-by-ban").val(),"not-allowed-by-block":a("#messages-voting-vote-not-allowed-by-block").val(),"not-allowed-by-limit":a("#messages-voting-vote-not-allowed-by-limit").val(),"thank-you":a("#messages-voting-thank-you").val()},results:{"single-vote":a("#messages-results-single-vote").val(),"multiple-votes":a("#messages-results-multiple-votes").val(),"single-answer":a("#messages-results-single-answer").val(),"multiple-answers":a("#messages-results-multiple-answers").val()}}},a(".spinner.publish").addClass("is-active"),a(this).attr("disabled",!0),a.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"yop_poll_save_settings",_token:a("#_token").val(),settings:JSON.stringify(i)}}).done(function(t){a(".spinner.publish").removeClass("is-active"),!0===t.success?toastr.success(htmlEncode(striptags(t.data)),"",{progressBar:!0,onHidden:function(){a(".save-settings").attr("disabled",!1)}}):(a(".save-settings").attr("disabled",!1),toastr.warning(htmlEncode(striptags(t.data))))})),t.preventDefault()}),a(".reCaptcha-integration-settings").change(function(){"yes"===a(this).val()?a(".reCaptcha-data-section").removeClass("hide"):a(".reCaptcha-data-section").addClass("hide")}),a(".integrations-facebook-enabled").change(function(){"yes"===a(this).val()&&(a(this).val("no").trigger("change.select2"),showUpgradeToPro("facebook"),event.preventDefault())}),a(".integrations-google-enabled").change(function(){"yes"===a(this).val()&&(a(this).val("no").trigger("change.select2"),showUpgradeToPro("google"),event.preventDefault())})});var showUpgradeToPro=function(t){switch(activeSlide=0,t){case"multiple-questions":activeSlide=1;break;case"media-questions":activeSlide=2;break;case"facebook":case"google":activeSlide=3;break;case"templates":activeSlide=4;break;case"pie-results":activeSlide=6;break;default:activeSlide=1}jQuery(".flexslider").find(".slides").find("li").removeClass("flex-active-slide"),jQuery(".flexslider").find(".slides").find("li").css("opacity","0"),jQuery(".flexslider").find(".slides").find("li").css("z-index","1"),jQuery(".flexslider").find(".slides").find("li:nth-child("+activeSlide+")").addClass("flex-active-slide"),jQuery(".flexslider").find(".slides").find("li:nth-child("+activeSlide+")").css("opacity","1"),jQuery(".flexslider").find(".slides").find("li:nth-child("+activeSlide+")").css("z-index","2"),jQuery(".flexslider").find(".flex-control-nav").find("a").removeClass("flex-active"),jQuery(".flexslider").find(".flex-control-nav").find("li:nth-child("+activeSlide+")").find("a").addClass("flex-active"),jQuery("#yopPollUpgradeModal").modal("show")};jQuery(document).ready(function(i){i(".upgrade-to-pro").click(function(t){var e=i(this).attr("data-screen");showUpgradeToPro(e),t.preventDefault()}),i(".flexslider").flexslider({startAt:0,slideshow:!0,slideshowSpeed:8e3})}),jQuery(document).ready(function(n){var a;n(".migrate-enable-gdpr").select2({minimumResultsForSearch:1/0}),n(".migrate-gdpr-solution").select2({minimumResultsForSearch:1/0}),n(".migrate-section").on("change",".migrate-enable-gdpr",function(t){"yes"===n(this).val()?n(".migrate-section").find(".migrate-gdpr-solution-section").removeClass("hide"):n(".migrate-section").find(".migrate-gdpr-solution-section").addClass("hide")}),a=function(t,e,i){n.ajax({type:"POST",url:ajaxurl,data:{table:t,action:"yop_ajax_migrate",_csrf_token:n("#_csrf_token").val(),enableGdpr:n(".migrate-section").find(".migrate-enable-gdpr").val(),gdprSolution:n(".migrate-section").find(".migrate-gdpr-solution").val(),response_code:e,skip_table_check:i},dataType:"json",success:function(t){"done"===t.data.response_code?(n(".migrate-output").append("<p>"+objectL10n.yopPollParams.importOld.response+" "+t.data.message+"</p>"),n(".migrate-output").append("<p>"+objectL10n.yopPollParams.importOld.allDone+"</p>")):(n(".migrate-output").append("<p>"+objectL10n.yopPollParams.importOld.response+" "+t.data.message+"</p>"),a(t.data.table,t.data.response_code,t.data.skip_table_check))},error:function(t){}}).fail(function(t){})},n(".send-request").click(function(){var t,e=n(".migrate-section").find(".migrate-enable-gdpr").val(),i=n(".migrate-section").find(".migrate-gdpr-solution").val();if("yes"===e){switch(i){case"consent":t=objectL10n.yopPollParams.importOld.gdprEnabledMigrateAsIs;break;case"anonymize":t=objectL10n.yopPollParams.importOld.gdprEnabledAnonymizeIp;break;case"nostore":t=objectL10n.yopPollParams.importOld.gdprEnabledNoStore}t=objectL10n.yopPollParams.importOld.gdprEnabledGeneral+"<br><br>"+objectL10n.yopPollParams.importOld.gdprEnabledChoice+": <b>"+n(".migrate-section").find(".migrate-gdpr-solution").find("option:selected").text()+"</b><br><br>"+t,BootstrapDialog.confirm({type:BootstrapDialog.TYPE_WARNING,title:objectL10n.yopPollParams.deleteTitle,message:t,btnCancelLabel:objectL10n.yopPollParams.importOld.gdprEnabledStop,btnOKLabel:objectL10n.yopPollParams.importOld.gdprEnabledContinue,callback:function(t){t&&(n(".migrate-output").html(""),n(".migrate-output").append("<p>"+objectL10n.yopPollParams.importOld.importStarted+"</p>"),a("bans",1,!1))}})}else n(".migrate-output").html(""),n(".migrate-output").append("<p>"+objectL10n.yopPollParams.importOld.importStarted+"</p>"),a("bans",1,!1)})});
1
+ if(function(t){"function"==typeof define&&define.amd?define(["jquery","jquery-ui"],t):t(jQuery)}(function($){if($.ui.timepicker=$.ui.timepicker||{},!$.ui.timepicker.version){$.extend($.ui,{timepicker:{version:"1.6.3"}});var Timepicker=function(){this.regional=[],this.regional[""]={currentText:"Now",closeText:"Done",amNames:["AM","A"],pmNames:["PM","P"],timeFormat:"HH:mm",timeSuffix:"",timeOnlyTitle:"Choose Time",timeText:"Time",hourText:"Hour",minuteText:"Minute",secondText:"Second",millisecText:"Millisecond",microsecText:"Microsecond",timezoneText:"Time Zone",isRTL:!1},this._defaults={showButtonPanel:!0,timeOnly:!1,timeOnlyShowDate:!1,showHour:null,showMinute:null,showSecond:null,showMillisec:null,showMicrosec:null,showTimezone:null,showTime:!0,stepHour:1,stepMinute:1,stepSecond:1,stepMillisec:1,stepMicrosec:1,hour:0,minute:0,second:0,millisec:0,microsec:0,timezone:null,hourMin:0,minuteMin:0,secondMin:0,millisecMin:0,microsecMin:0,hourMax:23,minuteMax:59,secondMax:59,millisecMax:999,microsecMax:999,minDateTime:null,maxDateTime:null,maxTime:null,minTime:null,onSelect:null,hourGrid:0,minuteGrid:0,secondGrid:0,millisecGrid:0,microsecGrid:0,alwaysSetTime:!0,separator:" ",altFieldTimeOnly:!0,altTimeFormat:null,altSeparator:null,altTimeSuffix:null,altRedirectFocus:!0,pickerTimeFormat:null,pickerTimeSuffix:null,showTimepicker:!0,timezoneList:null,addSliderAccess:!1,sliderAccessArgs:null,controlType:"slider",oneLine:!1,defaultValue:null,parse:"strict",afterInject:null},$.extend(this._defaults,this.regional[""])};$.extend(Timepicker.prototype,{$input:null,$altInput:null,$timeObj:null,inst:null,hour_slider:null,minute_slider:null,second_slider:null,millisec_slider:null,microsec_slider:null,timezone_select:null,maxTime:null,minTime:null,hour:0,minute:0,second:0,millisec:0,microsec:0,timezone:null,hourMinOriginal:null,minuteMinOriginal:null,secondMinOriginal:null,millisecMinOriginal:null,microsecMinOriginal:null,hourMaxOriginal:null,minuteMaxOriginal:null,secondMaxOriginal:null,millisecMaxOriginal:null,microsecMaxOriginal:null,ampm:"",formattedDate:"",formattedTime:"",formattedDateTime:"",timezoneList:null,units:["hour","minute","second","millisec","microsec"],support:{},control:null,setDefaults:function(t){return extendRemove(this._defaults,t||{}),this},_newInst:function($input,opts){var tp_inst=new Timepicker,inlineSettings={},fns={},overrides,i;for(var attrName in this._defaults)if(this._defaults.hasOwnProperty(attrName)){var attrValue=$input.attr("time:"+attrName);if(attrValue)try{inlineSettings[attrName]=eval(attrValue)}catch(t){inlineSettings[attrName]=attrValue}}for(i in overrides={beforeShow:function(t,e){if($.isFunction(tp_inst._defaults.evnts.beforeShow))return tp_inst._defaults.evnts.beforeShow.call($input[0],t,e,tp_inst)},onChangeMonthYear:function(t,e,i){$.isFunction(tp_inst._defaults.evnts.onChangeMonthYear)&&tp_inst._defaults.evnts.onChangeMonthYear.call($input[0],t,e,i,tp_inst)},onClose:function(t,e){!0===tp_inst.timeDefined&&""!==$input.val()&&tp_inst._updateDateTime(e),$.isFunction(tp_inst._defaults.evnts.onClose)&&tp_inst._defaults.evnts.onClose.call($input[0],t,e,tp_inst)}},overrides)overrides.hasOwnProperty(i)&&(fns[i]=opts[i]||this._defaults[i]||null);tp_inst._defaults=$.extend({},this._defaults,inlineSettings,opts,overrides,{evnts:fns,timepicker:tp_inst}),tp_inst.amNames=$.map(tp_inst._defaults.amNames,function(t){return t.toUpperCase()}),tp_inst.pmNames=$.map(tp_inst._defaults.pmNames,function(t){return t.toUpperCase()}),tp_inst.support=detectSupport(tp_inst._defaults.timeFormat+(tp_inst._defaults.pickerTimeFormat?tp_inst._defaults.pickerTimeFormat:"")+(tp_inst._defaults.altTimeFormat?tp_inst._defaults.altTimeFormat:"")),"string"==typeof tp_inst._defaults.controlType?("slider"===tp_inst._defaults.controlType&&void 0===$.ui.slider&&(tp_inst._defaults.controlType="select"),tp_inst.control=tp_inst._controls[tp_inst._defaults.controlType]):tp_inst.control=tp_inst._defaults.controlType;var timezoneList=[-720,-660,-600,-570,-540,-480,-420,-360,-300,-270,-240,-210,-180,-120,-60,0,60,120,180,210,240,270,300,330,345,360,390,420,480,525,540,570,600,630,660,690,720,765,780,840];null!==tp_inst._defaults.timezoneList&&(timezoneList=tp_inst._defaults.timezoneList);var tzl=timezoneList.length,tzi=0,tzv=null;if(0<tzl&&"object"!=typeof timezoneList[0])for(;tzi<tzl;tzi++)tzv=timezoneList[tzi],timezoneList[tzi]={value:tzv,label:$.timepicker.timezoneOffsetString(tzv,tp_inst.support.iso8601)};return tp_inst._defaults.timezoneList=timezoneList,tp_inst.timezone=null!==tp_inst._defaults.timezone?$.timepicker.timezoneOffsetNumber(tp_inst._defaults.timezone):-1*(new Date).getTimezoneOffset(),tp_inst.hour=tp_inst._defaults.hour<tp_inst._defaults.hourMin?tp_inst._defaults.hourMin:tp_inst._defaults.hour>tp_inst._defaults.hourMax?tp_inst._defaults.hourMax:tp_inst._defaults.hour,tp_inst.minute=tp_inst._defaults.minute<tp_inst._defaults.minuteMin?tp_inst._defaults.minuteMin:tp_inst._defaults.minute>tp_inst._defaults.minuteMax?tp_inst._defaults.minuteMax:tp_inst._defaults.minute,tp_inst.second=tp_inst._defaults.second<tp_inst._defaults.secondMin?tp_inst._defaults.secondMin:tp_inst._defaults.second>tp_inst._defaults.secondMax?tp_inst._defaults.secondMax:tp_inst._defaults.second,tp_inst.millisec=tp_inst._defaults.millisec<tp_inst._defaults.millisecMin?tp_inst._defaults.millisecMin:tp_inst._defaults.millisec>tp_inst._defaults.millisecMax?tp_inst._defaults.millisecMax:tp_inst._defaults.millisec,tp_inst.microsec=tp_inst._defaults.microsec<tp_inst._defaults.microsecMin?tp_inst._defaults.microsecMin:tp_inst._defaults.microsec>tp_inst._defaults.microsecMax?tp_inst._defaults.microsecMax:tp_inst._defaults.microsec,tp_inst.ampm="",tp_inst.$input=$input,tp_inst._defaults.altField&&(tp_inst.$altInput=$(tp_inst._defaults.altField),!0===tp_inst._defaults.altRedirectFocus&&tp_inst.$altInput.css({cursor:"pointer"}).focus(function(){$input.trigger("focus")})),0!==tp_inst._defaults.minDate&&0!==tp_inst._defaults.minDateTime||(tp_inst._defaults.minDate=new Date),0!==tp_inst._defaults.maxDate&&0!==tp_inst._defaults.maxDateTime||(tp_inst._defaults.maxDate=new Date),void 0!==tp_inst._defaults.minDate&&tp_inst._defaults.minDate instanceof Date&&(tp_inst._defaults.minDateTime=new Date(tp_inst._defaults.minDate.getTime())),void 0!==tp_inst._defaults.minDateTime&&tp_inst._defaults.minDateTime instanceof Date&&(tp_inst._defaults.minDate=new Date(tp_inst._defaults.minDateTime.getTime())),void 0!==tp_inst._defaults.maxDate&&tp_inst._defaults.maxDate instanceof Date&&(tp_inst._defaults.maxDateTime=new Date(tp_inst._defaults.maxDate.getTime())),void 0!==tp_inst._defaults.maxDateTime&&tp_inst._defaults.maxDateTime instanceof Date&&(tp_inst._defaults.maxDate=new Date(tp_inst._defaults.maxDateTime.getTime())),tp_inst.$input.bind("focus",function(){tp_inst._onFocus()}),tp_inst},_addTimePicker:function(t){var e=$.trim(this.$altInput&&this._defaults.altFieldTimeOnly?this.$input.val()+" "+this.$altInput.val():this.$input.val());this.timeDefined=this._parseTime(e),this._limitMinMaxDateTime(t,!1),this._injectTimePicker(),this._afterInject()},_parseTime:function(e,t){if(this.inst||(this.inst=$.datepicker._getInst(this.$input[0])),t||!this._defaults.timeOnly){var i=$.datepicker._get(this.inst,"dateFormat");try{var n=parseDateTimeInternal(i,this._defaults.timeFormat,e,$.datepicker._getFormatConfig(this.inst),this._defaults);if(!n.timeObj)return!1;$.extend(this,n.timeObj)}catch(t){return $.timepicker.log("Error parsing the date/time string: "+t+"\ndate/time string = "+e+"\ntimeFormat = "+this._defaults.timeFormat+"\ndateFormat = "+i),!1}return!0}var a=$.datepicker.parseTime(this._defaults.timeFormat,e,this._defaults);return!!a&&($.extend(this,a),!0)},_afterInject:function(){var t=this.inst.settings;$.isFunction(t.afterInject)&&t.afterInject.call(this)},_injectTimePicker:function(){var t=this.inst.dpDiv,e=this.inst.settings,s=this,r="",i="",n=null,a={},o={},l=null,d=0,c=0;if(0===t.find("div.ui-timepicker-div").length&&e.showTimepicker){var u=" ui_tpicker_unit_hide",h='<div class="ui-timepicker-div'+(e.isRTL?" ui-timepicker-rtl":"")+(e.oneLine&&"select"===e.controlType?" ui-timepicker-oneLine":"")+'"><dl><dt class="ui_tpicker_time_label'+(e.showTime?"":u)+'">'+e.timeText+'</dt><dd class="ui_tpicker_time '+(e.showTime?"":u)+'"><input class="ui_tpicker_time_input" '+(e.timeInput?"":"disabled")+"/></dd>";for(d=0,c=this.units.length;d<c;d++){if(n=null!==e["show"+(i=(r=this.units[d]).substr(0,1).toUpperCase()+r.substr(1))]?e["show"+i]:this.support[r],a[r]=parseInt(e[r+"Max"]-(e[r+"Max"]-e[r+"Min"])%e["step"+i],10),o[r]=0,h+='<dt class="ui_tpicker_'+r+"_label"+(n?"":u)+'">'+e[r+"Text"]+'</dt><dd class="ui_tpicker_'+r+(n?"":u)+'"><div class="ui_tpicker_'+r+"_slider"+(n?"":u)+'"></div>',n&&0<e[r+"Grid"]){if(h+='<div style="padding-left: 1px"><table class="ui-tpicker-grid-label"><tr>',"hour"===r)for(var p=e[r+"Min"];p<=a[r];p+=parseInt(e[r+"Grid"],10)){o[r]++;var f=$.datepicker.formatTime(this.support.ampm?"hht":"HH",{hour:p},e);h+='<td data-for="'+r+'">'+f+"</td>"}else for(var m=e[r+"Min"];m<=a[r];m+=parseInt(e[r+"Grid"],10))o[r]++,h+='<td data-for="'+r+'">'+(m<10?"0":"")+m+"</td>";h+="</tr></table></div>"}h+="</dd>"}var g=null!==e.showTimezone?e.showTimezone:this.support.timezone;h+='<dt class="ui_tpicker_timezone_label'+(g?"":u)+'">'+e.timezoneText+"</dt>",h+='<dd class="ui_tpicker_timezone'+(g?"":u)+'"></dd>';var v=$(h+="</dl></div>");for(!0===e.timeOnly&&(v.prepend('<div class="ui-widget-header ui-helper-clearfix ui-corner-all"><div class="ui-datepicker-title">'+e.timeOnlyTitle+"</div></div>"),t.find(".ui-datepicker-header, .ui-datepicker-calendar").hide()),d=0,c=s.units.length;d<c;d++)n=null!==e["show"+(i=(r=s.units[d]).substr(0,1).toUpperCase()+r.substr(1))]?e["show"+i]:this.support[r],s[r+"_slider"]=s.control.create(s,v.find(".ui_tpicker_"+r+"_slider"),r,s[r],e[r+"Min"],a[r],e["step"+i]),n&&0<e[r+"Grid"]&&(l=100*o[r]*e[r+"Grid"]/(a[r]-e[r+"Min"]),v.find(".ui_tpicker_"+r+" table").css({width:l+"%",marginLeft:e.isRTL?"0":l/(-2*o[r])+"%",marginRight:e.isRTL?l/(-2*o[r])+"%":"0",borderCollapse:"collapse"}).find("td").click(function(t){var e=$(this),i=e.html(),n=parseInt(i.replace(/[^0-9]/g),10),a=i.replace(/[^apm]/gi),o=e.data("for");"hour"===o&&(-1!==a.indexOf("p")&&n<12?n+=12:-1!==a.indexOf("a")&&12===n&&(n=0)),s.control.value(s,s[o+"_slider"],r,n),s._onTimeChange(),s._onSelectHandler()}).css({cursor:"pointer",width:100/o[r]+"%",textAlign:"center",overflow:"hidden"}));if(this.timezone_select=v.find(".ui_tpicker_timezone").append("<select></select>").find("select"),$.fn.append.apply(this.timezone_select,$.map(e.timezoneList,function(t,e){return $("<option />").val("object"==typeof t?t.value:t).text("object"==typeof t?t.label:t)})),void 0!==this.timezone&&null!==this.timezone&&""!==this.timezone)-1*new Date(this.inst.selectedYear,this.inst.selectedMonth,this.inst.selectedDay,12).getTimezoneOffset()===this.timezone?selectLocalTimezone(s):this.timezone_select.val(this.timezone);else void 0!==this.hour&&null!==this.hour&&""!==this.hour?this.timezone_select.val(e.timezone):selectLocalTimezone(s);this.timezone_select.change(function(){s._onTimeChange(),s._onSelectHandler(),s._afterInject()});var b=t.find(".ui-datepicker-buttonpane");if(b.length?b.before(v):t.append(v),this.$timeObj=v.find(".ui_tpicker_time_input"),this.$timeObj.change(function(){var t=s.inst.settings.timeFormat,e=$.datepicker.parseTime(t,this.value),i=new Date;e?(i.setHours(e.hour),i.setMinutes(e.minute),i.setSeconds(e.second),$.datepicker._setTime(s.inst,i)):(this.value=s.formattedTime,this.blur())}),null!==this.inst){var y=this.timeDefined;this._onTimeChange(),this.timeDefined=y}if(this._defaults.addSliderAccess){var w=this._defaults.sliderAccessArgs,x=this._defaults.isRTL;w.isRTL=x,setTimeout(function(){if(0===v.find(".ui-slider-access").length){v.find(".ui-slider:visible").sliderAccess(w);var s=v.find(".ui-slider-access:eq(0)").outerWidth(!0);s&&v.find("table:visible").each(function(){var t=$(this),e=t.outerWidth(),i=t.css(x?"marginRight":"marginLeft").toString().replace("%",""),n=e-s,a=i*n/e+"%",o={width:n,marginRight:0,marginLeft:0};o[x?"marginRight":"marginLeft"]=a,t.css(o)})}},10)}s._limitMinMaxDateTime(this.inst,!0)}},_limitMinMaxDateTime:function(t,e){var i=this._defaults,n=new Date(t.selectedYear,t.selectedMonth,t.selectedDay);if(this._defaults.showTimepicker){if(null!==$.datepicker._get(t,"minDateTime")&&void 0!==$.datepicker._get(t,"minDateTime")&&n){var a=$.datepicker._get(t,"minDateTime"),o=new Date(a.getFullYear(),a.getMonth(),a.getDate(),0,0,0,0);null!==this.hourMinOriginal&&null!==this.minuteMinOriginal&&null!==this.secondMinOriginal&&null!==this.millisecMinOriginal&&null!==this.microsecMinOriginal||(this.hourMinOriginal=i.hourMin,this.minuteMinOriginal=i.minuteMin,this.secondMinOriginal=i.secondMin,this.millisecMinOriginal=i.millisecMin,this.microsecMinOriginal=i.microsecMin),t.settings.timeOnly||o.getTime()===n.getTime()?(this._defaults.hourMin=a.getHours(),this.hour<=this._defaults.hourMin?(this.hour=this._defaults.hourMin,this._defaults.minuteMin=a.getMinutes(),this.minute<=this._defaults.minuteMin?(this.minute=this._defaults.minuteMin,this._defaults.secondMin=a.getSeconds(),this.second<=this._defaults.secondMin?(this.second=this._defaults.secondMin,this._defaults.millisecMin=a.getMilliseconds(),this.millisec<=this._defaults.millisecMin?(this.millisec=this._defaults.millisecMin,this._defaults.microsecMin=a.getMicroseconds()):(this.microsec<this._defaults.microsecMin&&(this.microsec=this._defaults.microsecMin),this._defaults.microsecMin=this.microsecMinOriginal)):(this._defaults.millisecMin=this.millisecMinOriginal,this._defaults.microsecMin=this.microsecMinOriginal)):(this._defaults.secondMin=this.secondMinOriginal,this._defaults.millisecMin=this.millisecMinOriginal,this._defaults.microsecMin=this.microsecMinOriginal)):(this._defaults.minuteMin=this.minuteMinOriginal,this._defaults.secondMin=this.secondMinOriginal,this._defaults.millisecMin=this.millisecMinOriginal,this._defaults.microsecMin=this.microsecMinOriginal)):(this._defaults.hourMin=this.hourMinOriginal,this._defaults.minuteMin=this.minuteMinOriginal,this._defaults.secondMin=this.secondMinOriginal,this._defaults.millisecMin=this.millisecMinOriginal,this._defaults.microsecMin=this.microsecMinOriginal)}if(null!==$.datepicker._get(t,"maxDateTime")&&void 0!==$.datepicker._get(t,"maxDateTime")&&n){var s=$.datepicker._get(t,"maxDateTime"),r=new Date(s.getFullYear(),s.getMonth(),s.getDate(),0,0,0,0);null!==this.hourMaxOriginal&&null!==this.minuteMaxOriginal&&null!==this.secondMaxOriginal&&null!==this.millisecMaxOriginal||(this.hourMaxOriginal=i.hourMax,this.minuteMaxOriginal=i.minuteMax,this.secondMaxOriginal=i.secondMax,this.millisecMaxOriginal=i.millisecMax,this.microsecMaxOriginal=i.microsecMax),t.settings.timeOnly||r.getTime()===n.getTime()?(this._defaults.hourMax=s.getHours(),this.hour>=this._defaults.hourMax?(this.hour=this._defaults.hourMax,this._defaults.minuteMax=s.getMinutes(),this.minute>=this._defaults.minuteMax?(this.minute=this._defaults.minuteMax,this._defaults.secondMax=s.getSeconds(),this.second>=this._defaults.secondMax?(this.second=this._defaults.secondMax,this._defaults.millisecMax=s.getMilliseconds(),this.millisec>=this._defaults.millisecMax?(this.millisec=this._defaults.millisecMax,this._defaults.microsecMax=s.getMicroseconds()):(this.microsec>this._defaults.microsecMax&&(this.microsec=this._defaults.microsecMax),this._defaults.microsecMax=this.microsecMaxOriginal)):(this._defaults.millisecMax=this.millisecMaxOriginal,this._defaults.microsecMax=this.microsecMaxOriginal)):(this._defaults.secondMax=this.secondMaxOriginal,this._defaults.millisecMax=this.millisecMaxOriginal,this._defaults.microsecMax=this.microsecMaxOriginal)):(this._defaults.minuteMax=this.minuteMaxOriginal,this._defaults.secondMax=this.secondMaxOriginal,this._defaults.millisecMax=this.millisecMaxOriginal,this._defaults.microsecMax=this.microsecMaxOriginal)):(this._defaults.hourMax=this.hourMaxOriginal,this._defaults.minuteMax=this.minuteMaxOriginal,this._defaults.secondMax=this.secondMaxOriginal,this._defaults.millisecMax=this.millisecMaxOriginal,this._defaults.microsecMax=this.microsecMaxOriginal)}if(null!==t.settings.minTime){var l=new Date("01/01/1970 "+t.settings.minTime);this.hour<l.getHours()?(this.hour=this._defaults.hourMin=l.getHours(),this.minute=this._defaults.minuteMin=l.getMinutes()):this.hour===l.getHours()&&this.minute<l.getMinutes()?this.minute=this._defaults.minuteMin=l.getMinutes():this._defaults.hourMin<l.getHours()?(this._defaults.hourMin=l.getHours(),this._defaults.minuteMin=l.getMinutes()):this._defaults.hourMin===l.getHours()===this.hour&&this._defaults.minuteMin<l.getMinutes()?this._defaults.minuteMin=l.getMinutes():this._defaults.minuteMin=0}if(null!==t.settings.maxTime){var d=new Date("01/01/1970 "+t.settings.maxTime);this.hour>d.getHours()?(this.hour=this._defaults.hourMax=d.getHours(),this.minute=this._defaults.minuteMax=d.getMinutes()):this.hour===d.getHours()&&this.minute>d.getMinutes()?this.minute=this._defaults.minuteMax=d.getMinutes():this._defaults.hourMax>d.getHours()?(this._defaults.hourMax=d.getHours(),this._defaults.minuteMax=d.getMinutes()):this._defaults.hourMax===d.getHours()===this.hour&&this._defaults.minuteMax>d.getMinutes()?this._defaults.minuteMax=d.getMinutes():this._defaults.minuteMax=59}if(void 0!==e&&!0===e){var c=parseInt(this._defaults.hourMax-(this._defaults.hourMax-this._defaults.hourMin)%this._defaults.stepHour,10),u=parseInt(this._defaults.minuteMax-(this._defaults.minuteMax-this._defaults.minuteMin)%this._defaults.stepMinute,10),h=parseInt(this._defaults.secondMax-(this._defaults.secondMax-this._defaults.secondMin)%this._defaults.stepSecond,10),p=parseInt(this._defaults.millisecMax-(this._defaults.millisecMax-this._defaults.millisecMin)%this._defaults.stepMillisec,10),f=parseInt(this._defaults.microsecMax-(this._defaults.microsecMax-this._defaults.microsecMin)%this._defaults.stepMicrosec,10);this.hour_slider&&(this.control.options(this,this.hour_slider,"hour",{min:this._defaults.hourMin,max:c,step:this._defaults.stepHour}),this.control.value(this,this.hour_slider,"hour",this.hour-this.hour%this._defaults.stepHour)),this.minute_slider&&(this.control.options(this,this.minute_slider,"minute",{min:this._defaults.minuteMin,max:u,step:this._defaults.stepMinute}),this.control.value(this,this.minute_slider,"minute",this.minute-this.minute%this._defaults.stepMinute)),this.second_slider&&(this.control.options(this,this.second_slider,"second",{min:this._defaults.secondMin,max:h,step:this._defaults.stepSecond}),this.control.value(this,this.second_slider,"second",this.second-this.second%this._defaults.stepSecond)),this.millisec_slider&&(this.control.options(this,this.millisec_slider,"millisec",{min:this._defaults.millisecMin,max:p,step:this._defaults.stepMillisec}),this.control.value(this,this.millisec_slider,"millisec",this.millisec-this.millisec%this._defaults.stepMillisec)),this.microsec_slider&&(this.control.options(this,this.microsec_slider,"microsec",{min:this._defaults.microsecMin,max:f,step:this._defaults.stepMicrosec}),this.control.value(this,this.microsec_slider,"microsec",this.microsec-this.microsec%this._defaults.stepMicrosec))}}},_onTimeChange:function(){if(this._defaults.showTimepicker){var t=!!this.hour_slider&&this.control.value(this,this.hour_slider,"hour"),e=!!this.minute_slider&&this.control.value(this,this.minute_slider,"minute"),i=!!this.second_slider&&this.control.value(this,this.second_slider,"second"),n=!!this.millisec_slider&&this.control.value(this,this.millisec_slider,"millisec"),a=!!this.microsec_slider&&this.control.value(this,this.microsec_slider,"microsec"),o=!!this.timezone_select&&this.timezone_select.val(),s=this._defaults,r=s.pickerTimeFormat||s.timeFormat,l=s.pickerTimeSuffix||s.timeSuffix;"object"==typeof t&&(t=!1),"object"==typeof e&&(e=!1),"object"==typeof i&&(i=!1),"object"==typeof n&&(n=!1),"object"==typeof a&&(a=!1),"object"==typeof o&&(o=!1),!1!==t&&(t=parseInt(t,10)),!1!==e&&(e=parseInt(e,10)),!1!==i&&(i=parseInt(i,10)),!1!==n&&(n=parseInt(n,10)),!1!==a&&(a=parseInt(a,10)),!1!==o&&(o=o.toString());var d=s[t<12?"amNames":"pmNames"][0],c=t!==parseInt(this.hour,10)||e!==parseInt(this.minute,10)||i!==parseInt(this.second,10)||n!==parseInt(this.millisec,10)||a!==parseInt(this.microsec,10)||0<this.ampm.length&&t<12!=(-1!==$.inArray(this.ampm.toUpperCase(),this.amNames))||null!==this.timezone&&o!==this.timezone.toString();if(c&&(!1!==t&&(this.hour=t),!1!==e&&(this.minute=e),!1!==i&&(this.second=i),!1!==n&&(this.millisec=n),!1!==a&&(this.microsec=a),!1!==o&&(this.timezone=o),this.inst||(this.inst=$.datepicker._getInst(this.$input[0])),this._limitMinMaxDateTime(this.inst,!0)),this.support.ampm&&(this.ampm=d),this.formattedTime=$.datepicker.formatTime(s.timeFormat,this,s),this.$timeObj&&(r===s.timeFormat?this.$timeObj.val(this.formattedTime+l):this.$timeObj.val($.datepicker.formatTime(r,this,s)+l),this.$timeObj[0].setSelectionRange)){var u=this.$timeObj[0].selectionStart,h=this.$timeObj[0].selectionEnd;this.$timeObj[0].setSelectionRange(u,h)}this.timeDefined=!0,c&&this._updateDateTime()}},_onSelectHandler:function(){var t=this._defaults.onSelect||this.inst.settings.onSelect,e=this.$input?this.$input[0]:null;t&&e&&t.apply(e,[this.formattedDateTime,this])},_updateDateTime:function(t){var e=0<(t=this.inst||t).currentYear?new Date(t.currentYear,t.currentMonth,t.currentDay):new Date(t.selectedYear,t.selectedMonth,t.selectedDay),i=$.datepicker._daylightSavingAdjust(e),n=$.datepicker._get(t,"dateFormat"),a=$.datepicker._getFormatConfig(t),o=null!==i&&this.timeDefined;this.formattedDate=$.datepicker.formatDate(n,null===i?new Date:i,a);var s=this.formattedDate;if(""===t.lastVal&&(t.currentYear=t.selectedYear,t.currentMonth=t.selectedMonth,t.currentDay=t.selectedDay),!0===this._defaults.timeOnly&&!1===this._defaults.timeOnlyShowDate?s=this.formattedTime:(!0!==this._defaults.timeOnly&&(this._defaults.alwaysSetTime||o)||!0===this._defaults.timeOnly&&!0===this._defaults.timeOnlyShowDate)&&(s+=this._defaults.separator+this.formattedTime+this._defaults.timeSuffix),this.formattedDateTime=s,this._defaults.showTimepicker)if(this.$altInput&&!1===this._defaults.timeOnly&&!0===this._defaults.altFieldTimeOnly)this.$altInput.val(this.formattedTime),this.$input.val(this.formattedDate);else if(this.$altInput){this.$input.val(s);var r="",l=null!==this._defaults.altSeparator?this._defaults.altSeparator:this._defaults.separator,d=null!==this._defaults.altTimeSuffix?this._defaults.altTimeSuffix:this._defaults.timeSuffix;this._defaults.timeOnly||(r=this._defaults.altFormat?$.datepicker.formatDate(this._defaults.altFormat,null===i?new Date:i,a):this.formattedDate)&&(r+=l),null!==this._defaults.altTimeFormat?r+=$.datepicker.formatTime(this._defaults.altTimeFormat,this,this._defaults)+d:r+=this.formattedTime+d,this.$altInput.val(r)}else this.$input.val(s);else this.$input.val(this.formattedDate);this.$input.trigger("change")},_onFocus:function(){if(!this.$input.val()&&this._defaults.defaultValue){this.$input.val(this._defaults.defaultValue);var t=$.datepicker._getInst(this.$input.get(0)),e=$.datepicker._get(t,"timepicker");if(e&&e._defaults.timeOnly&&t.input.val()!==t.lastVal)try{$.datepicker._updateDatepicker(t)}catch(t){$.timepicker.log(t)}}},_controls:{slider:{create:function(i,t,n,e,a,o,s){var r=i._defaults.isRTL;return t.prop("slide",null).slider({orientation:"horizontal",value:r?-1*e:e,min:r?-1*o:a,max:r?-1*a:o,step:s,slide:function(t,e){i.control.value(i,$(this),n,r?-1*e.value:e.value),i._onTimeChange()},stop:function(t,e){i._onSelectHandler()}})},options:function(t,e,i,n,a){if(t._defaults.isRTL){if("string"==typeof n)return"min"===n||"max"===n?void 0!==a?e.slider(n,-1*a):Math.abs(e.slider(n)):e.slider(n);var o=n.min,s=n.max;return n.min=n.max=null,void 0!==o&&(n.max=-1*o),void 0!==s&&(n.min=-1*s),e.slider(n)}return"string"==typeof n&&void 0!==a?e.slider(n,a):e.slider(n)},value:function(t,e,i,n){return t._defaults.isRTL?void 0!==n?e.slider("value",-1*n):Math.abs(e.slider("value")):void 0!==n?e.slider("value",n):e.slider("value")}},select:{create:function(e,t,i,n,a,o,s){for(var r='<select class="ui-timepicker-select ui-state-default ui-corner-all" data-unit="'+i+'" data-min="'+a+'" data-max="'+o+'" data-step="'+s+'">',l=e._defaults.pickerTimeFormat||e._defaults.timeFormat,d=a;d<=o;d+=s)r+='<option value="'+d+'"'+(d===n?" selected":"")+">",r+="hour"===i?$.datepicker.formatTime($.trim(l.replace(/[^ht ]/gi,"")),{hour:d},e._defaults):"millisec"===i||"microsec"===i||10<=d?d:"0"+d.toString(),r+="</option>";return r+="</select>",t.children("select").remove(),$(r).appendTo(t).change(function(t){e._onTimeChange(),e._onSelectHandler(),e._afterInject()}),t},options:function(t,e,i,n,a){var o={},s=e.children("select");if("string"==typeof n){if(void 0===a)return s.data(n);o[n]=a}else o=n;return t.control.create(t,e,s.data("unit"),s.val(),0<=o.min?o.min:s.data("min"),o.max||s.data("max"),o.step||s.data("step"))},value:function(t,e,i,n){var a=e.children("select");return void 0!==n?a.val(n):a.val()}}}}),$.fn.extend({timepicker:function(t){t=t||{};var e=Array.prototype.slice.call(arguments);return"object"==typeof t&&(e[0]=$.extend(t,{timeOnly:!0})),$(this).each(function(){$.fn.datetimepicker.apply($(this),e)})},datetimepicker:function(e){var i=arguments;return"string"==typeof(e=e||{})?"getDate"===e||"option"===e&&2===i.length&&"string"==typeof i[1]?$.fn.datepicker.apply($(this[0]),i):this.each(function(){var t=$(this);t.datepicker.apply(t,i)}):this.each(function(){var t=$(this);t.datepicker($.timepicker._newInst(t,e)._defaults)})}}),$.datepicker.parseDateTime=function(t,e,i,n,a){var o=parseDateTimeInternal(t,e,i,n,a);if(o.timeObj){var s=o.timeObj;o.date.setHours(s.hour,s.minute,s.second,s.millisec),o.date.setMicroseconds(s.microsec)}return o.date},$.datepicker.parseTime=function(t,e,i){var n=extendRemove(extendRemove({},$.timepicker._defaults),i||{}),a=(t.replace(/\'.*?\'/g,"").indexOf("Z"),function(t,e,o){var i,n="^"+t.toString().replace(/([hH]{1,2}|mm?|ss?|[tT]{1,2}|[zZ]|[lc]|'.*?')/g,function(t){var e,i,n,a=t.length;switch(t.charAt(0).toLowerCase()){case"h":case"m":case"s":return 1===a?"(\\d?\\d)":"(\\d{"+a+"})";case"l":case"c":return"(\\d?\\d?\\d)";case"z":return"(z|[-+]\\d\\d:?\\d\\d|\\S+)?";case"t":return e=o.amNames,i=o.pmNames,n=[],e&&$.merge(n,e),i&&$.merge(n,i),"("+(n=$.map(n,function(t){return t.replace(/[.*+?|()\[\]{}\\]/g,"\\amp;")})).join("|")+")?";default:return"("+t.replace(/\'/g,"").replace(/(\.|\$|\^|\\|\/|\(|\)|\[|\]|\?|\+|\*)/g,function(t){return"\\"+t})+")?"}}).replace(/\s/g,"\\s?")+o.timeSuffix+"quot;,a=function(t){var e=t.toLowerCase().match(/(h{1,2}|m{1,2}|s{1,2}|l{1}|c{1}|t{1,2}|z|'.*?')/g),i={h:-1,m:-1,s:-1,l:-1,c:-1,t:-1,z:-1};if(e)for(var n=0;n<e.length;n++)-1===i[e[n].toString().charAt(0)]&&(i[e[n].toString().charAt(0)]=n+1);return i}(t),s="",r={hour:0,minute:0,second:0,millisec:0,microsec:0};return!!(i=e.match(new RegExp(n,"i")))&&(-1!==a.t&&(void 0===i[a.t]||0===i[a.t].length?(s="",r.ampm=""):(s=-1!==$.inArray(i[a.t].toUpperCase(),$.map(o.amNames,function(t,e){return t.toUpperCase()}))?"AM":"PM",r.ampm=o["AM"===s?"amNames":"pmNames"][0])),-1!==a.h&&("AM"===s&&"12"===i[a.h]?r.hour=0:"PM"===s&&"12"!==i[a.h]?r.hour=parseInt(i[a.h],10)+12:r.hour=Number(i[a.h])),-1!==a.m&&(r.minute=Number(i[a.m])),-1!==a.s&&(r.second=Number(i[a.s])),-1!==a.l&&(r.millisec=Number(i[a.l])),-1!==a.c&&(r.microsec=Number(i[a.c])),-1!==a.z&&void 0!==i[a.z]&&(r.timezone=$.timepicker.timezoneOffsetNumber(i[a.z])),r)});return"function"==typeof n.parse?n.parse(t,e,n):"loose"===n.parse?function(e,i,n){try{var t=new Date("2012-01-01 "+i);if(isNaN(t.getTime())&&(t=new Date("2012-01-01T"+i),isNaN(t.getTime())&&(t=new Date("01/01/2012 "+i),isNaN(t.getTime()))))throw"Unable to parse time with native Date: "+i;return{hour:t.getHours(),minute:t.getMinutes(),second:t.getSeconds(),millisec:t.getMilliseconds(),microsec:t.getMicroseconds(),timezone:-1*t.getTimezoneOffset()}}catch(t){try{return a(e,i,n)}catch(t){$.timepicker.log("Unable to parse \ntimeString: "+i+"\ntimeFormat: "+e)}}return!1}(t,e,n):a(t,e,n)},$.datepicker.formatTime=function(t,e,i){i=i||{},i=$.extend({},$.timepicker._defaults,i),e=$.extend({hour:0,minute:0,second:0,millisec:0,microsec:0,timezone:null},e);var n=t,a=i.amNames[0],o=parseInt(e.hour,10);return 11<o&&(a=i.pmNames[0]),n=n.replace(/(?:HH?|hh?|mm?|ss?|[tT]{1,2}|[zZ]|[lc]|'.*?')/g,function(t){switch(t){case"HH":return("0"+o).slice(-2);case"H":return o;case"hh":return("0"+convert24to12(o)).slice(-2);case"h":return convert24to12(o);case"mm":return("0"+e.minute).slice(-2);case"m":return e.minute;case"ss":return("0"+e.second).slice(-2);case"s":return e.second;case"l":return("00"+e.millisec).slice(-3);case"c":return("00"+e.microsec).slice(-3);case"z":return $.timepicker.timezoneOffsetString(null===e.timezone?i.timezone:e.timezone,!1);case"Z":return $.timepicker.timezoneOffsetString(null===e.timezone?i.timezone:e.timezone,!0);case"T":return a.charAt(0).toUpperCase();case"TT":return a.toUpperCase();case"t":return a.charAt(0).toLowerCase();case"tt":return a.toLowerCase();default:return t.replace(/'/g,"")}})},$.datepicker._base_selectDate=$.datepicker._selectDate,$.datepicker._selectDate=function(t,e){var i,n=this._getInst($(t)[0]),a=this._get(n,"timepicker");a&&n.settings.showTimepicker?(a._limitMinMaxDateTime(n,!0),i=n.inline,n.inline=n.stay_open=!0,this._base_selectDate(t,e),n.inline=i,n.stay_open=!1,this._notifyChange(n),this._updateDatepicker(n)):this._base_selectDate(t,e)},$.datepicker._base_updateDatepicker=$.datepicker._updateDatepicker,$.datepicker._updateDatepicker=function(t){var e=t.input[0];if(!($.datepicker._curInst&&$.datepicker._curInst!==t&&$.datepicker._datepickerShowing&&$.datepicker._lastInput!==e||"boolean"==typeof t.stay_open&&!1!==t.stay_open)){this._base_updateDatepicker(t);var i=this._get(t,"timepicker");i&&i._addTimePicker(t)}},$.datepicker._base_doKeyPress=$.datepicker._doKeyPress,$.datepicker._doKeyPress=function(t){var e=$.datepicker._getInst(t.target),i=$.datepicker._get(e,"timepicker");if(i&&$.datepicker._get(e,"constrainInput")){var n=i.support.ampm,a=null!==i._defaults.showTimezone?i._defaults.showTimezone:i.support.timezone,o=$.datepicker._possibleChars($.datepicker._get(e,"dateFormat")),s=i._defaults.timeFormat.toString().replace(/[hms]/g,"").replace(/TT/g,n?"APM":"").replace(/Tt/g,n?"AaPpMm":"").replace(/tT/g,n?"AaPpMm":"").replace(/T/g,n?"AP":"").replace(/tt/g,n?"apm":"").replace(/t/g,n?"ap":"")+" "+i._defaults.separator+i._defaults.timeSuffix+(a?i._defaults.timezoneList.join(""):"")+i._defaults.amNames.join("")+i._defaults.pmNames.join("")+o,r=String.fromCharCode(void 0===t.charCode?t.keyCode:t.charCode);return t.ctrlKey||r<" "||!o||-1<s.indexOf(r)}return $.datepicker._base_doKeyPress(t)},$.datepicker._base_updateAlternate=$.datepicker._updateAlternate,$.datepicker._updateAlternate=function(t){var e=this._get(t,"timepicker");if(e){var i=e._defaults.altField;if(i){e._defaults.altFormat||e._defaults.dateFormat;var n=this._getDate(t),a=$.datepicker._getFormatConfig(t),o="",s=e._defaults.altSeparator?e._defaults.altSeparator:e._defaults.separator,r=e._defaults.altTimeSuffix?e._defaults.altTimeSuffix:e._defaults.timeSuffix,l=null!==e._defaults.altTimeFormat?e._defaults.altTimeFormat:e._defaults.timeFormat;o+=$.datepicker.formatTime(l,e,e._defaults)+r,e._defaults.timeOnly||e._defaults.altFieldTimeOnly||null===n||(o=e._defaults.altFormat?$.datepicker.formatDate(e._defaults.altFormat,n,a)+s+o:e.formattedDate+s+o),$(i).val(t.input.val()?o:"")}}else $.datepicker._base_updateAlternate(t)},$.datepicker._base_doKeyUp=$.datepicker._doKeyUp,$.datepicker._doKeyUp=function(t){var e=$.datepicker._getInst(t.target),i=$.datepicker._get(e,"timepicker");if(i&&i._defaults.timeOnly&&e.input.val()!==e.lastVal)try{$.datepicker._updateDatepicker(e)}catch(t){$.timepicker.log(t)}return $.datepicker._base_doKeyUp(t)},$.datepicker._base_gotoToday=$.datepicker._gotoToday,$.datepicker._gotoToday=function(t){var e=this._getInst($(t)[0]);this._base_gotoToday(t);var i=this._get(e,"timepicker");if(i){var n=$.timepicker.timezoneOffsetNumber(i.timezone),a=new Date;a.setMinutes(a.getMinutes()+a.getTimezoneOffset()+parseInt(n,10)),this._setTime(e,a),this._setDate(e,a),i._onSelectHandler()}},$.datepicker._disableTimepickerDatepicker=function(t){var e=this._getInst(t);if(e){var i=this._get(e,"timepicker");$(t).datepicker("getDate"),i&&(e.settings.showTimepicker=!1,i._defaults.showTimepicker=!1,i._updateDateTime(e))}},$.datepicker._enableTimepickerDatepicker=function(t){var e=this._getInst(t);if(e){var i=this._get(e,"timepicker");$(t).datepicker("getDate"),i&&(e.settings.showTimepicker=!0,i._defaults.showTimepicker=!0,i._addTimePicker(e),i._updateDateTime(e))}},$.datepicker._setTime=function(t,e){var i=this._get(t,"timepicker");if(i){var n=i._defaults;i.hour=e?e.getHours():n.hour,i.minute=e?e.getMinutes():n.minute,i.second=e?e.getSeconds():n.second,i.millisec=e?e.getMilliseconds():n.millisec,i.microsec=e?e.getMicroseconds():n.microsec,i._limitMinMaxDateTime(t,!0),i._onTimeChange(),i._updateDateTime(t)}},$.datepicker._setTimeDatepicker=function(t,e,i){var n=this._getInst(t);if(n){var a,o=this._get(n,"timepicker");if(o)this._setDateFromField(n),e&&("string"==typeof e?(o._parseTime(e,i),(a=new Date).setHours(o.hour,o.minute,o.second,o.millisec),a.setMicroseconds(o.microsec)):(a=new Date(e.getTime())).setMicroseconds(e.getMicroseconds()),"Invalid Date"===a.toString()&&(a=void 0),this._setTime(n,a))}},$.datepicker._base_setDateDatepicker=$.datepicker._setDateDatepicker,$.datepicker._setDateDatepicker=function(t,e){var i=this._getInst(t),n=e;if(i){"string"==typeof e&&((n=new Date(e)).getTime()||(this._base_setDateDatepicker.apply(this,arguments),n=$(t).datepicker("getDate")));var a,o=this._get(i,"timepicker");n instanceof Date?(a=new Date(n.getTime())).setMicroseconds(n.getMicroseconds()):a=n,o&&a&&(o.support.timezone||null!==o._defaults.timezone||(o.timezone=-1*a.getTimezoneOffset()),n=$.timepicker.timezoneAdjust(n,$.timepicker.timezoneOffsetString(-n.getTimezoneOffset()),o.timezone),a=$.timepicker.timezoneAdjust(a,$.timepicker.timezoneOffsetString(-a.getTimezoneOffset()),o.timezone)),this._updateDatepicker(i),this._base_setDateDatepicker.apply(this,arguments),this._setTimeDatepicker(t,a,!0)}},$.datepicker._base_getDateDatepicker=$.datepicker._getDateDatepicker,$.datepicker._getDateDatepicker=function(t,e){var i=this._getInst(t);if(i){var n=this._get(i,"timepicker");if(n){void 0===i.lastVal&&this._setDateFromField(i,e);var a=this._getDate(i),o=null;return o=n.$altInput&&n._defaults.altFieldTimeOnly?n.$input.val()+" "+n.$altInput.val():"INPUT"!==n.$input.get(0).tagName&&n.$altInput?n.$altInput.val():n.$input.val(),a&&n._parseTime(o,!i.settings.timeOnly)&&(a.setHours(n.hour,n.minute,n.second,n.millisec),a.setMicroseconds(n.microsec),null!=n.timezone&&(n.support.timezone||null!==n._defaults.timezone||(n.timezone=-1*a.getTimezoneOffset()),a=$.timepicker.timezoneAdjust(a,n.timezone,$.timepicker.timezoneOffsetString(-a.getTimezoneOffset())))),a}return this._base_getDateDatepicker(t,e)}},$.datepicker._base_parseDate=$.datepicker.parseDate,$.datepicker.parseDate=function(e,i,n){var a;try{a=this._base_parseDate(e,i,n)}catch(t){if(!(0<=t.indexOf(":")))throw t;a=this._base_parseDate(e,i.substring(0,i.length-(t.length-t.indexOf(":")-2)),n),$.timepicker.log("Error parsing the date string: "+t+"\ndate string = "+i+"\ndate format = "+e)}return a},$.datepicker._base_formatDate=$.datepicker._formatDate,$.datepicker._formatDate=function(t,e,i,n){var a=this._get(t,"timepicker");return a?(a._updateDateTime(t),a.$input.val()):this._base_formatDate(t)},$.datepicker._base_optionDatepicker=$.datepicker._optionDatepicker,$.datepicker._optionDatepicker=function(t,e,i){var n,a=this._getInst(t);if(!a)return null;var o=this._get(a,"timepicker");if(o){var s,r,l,d,c=null,u=null,h=null,p=o._defaults.evnts,f={};if("string"==typeof e){if("minDate"===e||"minDateTime"===e)c=i;else if("maxDate"===e||"maxDateTime"===e)u=i;else if("onSelect"===e)h=i;else if(p.hasOwnProperty(e)){if(void 0===i)return p[e];f[e]=i,n={}}}else if("object"==typeof e)for(s in e.minDate?c=e.minDate:e.minDateTime?c=e.minDateTime:e.maxDate?u=e.maxDate:e.maxDateTime&&(u=e.maxDateTime),p)p.hasOwnProperty(s)&&e[s]&&(f[s]=e[s]);for(s in f)f.hasOwnProperty(s)&&(p[s]=f[s],n||(n=$.extend({},e)),delete n[s]);if(n&&isEmptyObject(n))return;if(c?(c=0===c?new Date:new Date(c),o._defaults.minDate=c,o._defaults.minDateTime=c):u?(u=0===u?new Date:new Date(u),o._defaults.maxDate=u,o._defaults.maxDateTime=u):h&&(o._defaults.onSelect=h),c||u)return l=(d=$(t)).datetimepicker("getDate"),r=this._base_optionDatepicker.call($.datepicker,t,n||e,i),d.datetimepicker("setDate",l),r}return void 0===i?this._base_optionDatepicker.call($.datepicker,t,e):this._base_optionDatepicker.call($.datepicker,t,n||e,i)};var isEmptyObject=function(t){var e;for(e in t)if(t.hasOwnProperty(e))return!1;return!0},extendRemove=function(t,e){for(var i in $.extend(t,e),e)null!==e[i]&&void 0!==e[i]||(t[i]=e[i]);return t},detectSupport=function(t){var e=t.replace(/'.*?'/g,"").toLowerCase(),i=function(t,e){return-1!==t.indexOf(e)};return{hour:i(e,"h"),minute:i(e,"m"),second:i(e,"s"),millisec:i(e,"l"),microsec:i(e,"c"),timezone:i(e,"z"),ampm:i(e,"t")&&i(t,"h"),iso8601:i(t,"Z")}},convert24to12=function(t){return 0===(t%=12)&&(t=12),String(t)},computeEffectiveSetting=function(t,e){return t&&t[e]?t[e]:$.timepicker._defaults[e]},splitDateTime=function(t,e){var i=computeEffectiveSetting(e,"separator"),n=computeEffectiveSetting(e,"timeFormat").split(i).length,a=t.split(i),o=a.length;return 1<o?{dateString:a.splice(0,o-n).join(i),timeString:a.splice(0,n).join(i)}:{dateString:t,timeString:""}},parseDateTimeInternal=function(t,e,i,n,a){var o,s,r;if(s=splitDateTime(i,a),o=$.datepicker._base_parseDate(t,s.dateString,n),""===s.timeString)return{date:o};if(!(r=$.datepicker.parseTime(e,s.timeString,a)))throw"Wrong time format";return{date:o,timeObj:r}},selectLocalTimezone=function(t,e){if(t&&t.timezone_select){var i=e||new Date;t.timezone_select.val(-i.getTimezoneOffset())}};$.timepicker=new Timepicker,$.timepicker.timezoneOffsetString=function(t,e){if(isNaN(t)||840<t||t<-720)return t;var i=t%60,n=(t-i)/60,a=e?":":"",o=(0<=t?"+":"-")+("0"+Math.abs(n)).slice(-2)+a+("0"+Math.abs(i)).slice(-2);return"+00:00"===o?"Z":o},$.timepicker.timezoneOffsetNumber=function(t){var e=t.toString().replace(":","");return"Z"===e.toUpperCase()?0:/^(\-|\+)\d{4}#x2F;.test(e)?("-"===e.substr(0,1)?-1:1)*(60*parseInt(e.substr(1,2),10)+parseInt(e.substr(3,2),10)):parseInt(t,10)},$.timepicker.timezoneAdjust=function(t,e,i){var n=$.timepicker.timezoneOffsetNumber(e),a=$.timepicker.timezoneOffsetNumber(i);return isNaN(a)||t.setMinutes(t.getMinutes()+-n- -a),t},$.timepicker.timeRange=function(t,e,i){return $.timepicker.handleRange("timepicker",t,e,i)},$.timepicker.datetimeRange=function(t,e,i){$.timepicker.handleRange("datetimepicker",t,e,i)},$.timepicker.dateRange=function(t,e,i){$.timepicker.handleRange("datepicker",t,e,i)},$.timepicker.handleRange=function(r,l,d,c){c=$.extend({},{minInterval:0,maxInterval:0,start:{},end:{}},c);var t=!1;function i(t,e){var i=l[r]("getDate"),n=d[r]("getDate"),a=t[r]("getDate");if(null!==i){var o=new Date(i.getTime()),s=new Date(i.getTime());o.setMilliseconds(o.getMilliseconds()+c.minInterval),s.setMilliseconds(s.getMilliseconds()+c.maxInterval),0<c.minInterval&&n<o?d[r]("setDate",o):0<c.maxInterval&&s<n?d[r]("setDate",s):n<i&&e[r]("setDate",a)}}function e(t,e,i){if(t.val()){var n=t[r].call(t,"getDate");null!==n&&0<c.minInterval&&("minDate"===i&&n.setMilliseconds(n.getMilliseconds()+c.minInterval),"maxDate"===i&&n.setMilliseconds(n.getMilliseconds()-c.minInterval)),n.getTime&&e[r].call(e,"option",i,n)}}return"timepicker"===r&&(t=!0,r="datetimepicker"),$.fn[r].call(l,$.extend({timeOnly:t,onClose:function(t,e){i($(this),d)},onSelect:function(t){e($(this),d,"minDate")}},c,c.start)),$.fn[r].call(d,$.extend({timeOnly:t,onClose:function(t,e){i($(this),l)},onSelect:function(t){e($(this),l,"maxDate")}},c,c.end)),i(l,d),e(l,d,"minDate"),e(d,l,"maxDate"),$([l.get(0),d.get(0)])},$.timepicker.log=function(){window.console&&window.console.log&&window.console.log.apply&&window.console.log.apply(window.console,Array.prototype.slice.call(arguments))},$.timepicker._util={_extendRemove:extendRemove,_isEmptyObject:isEmptyObject,_convert24to12:convert24to12,_detectSupport:detectSupport,_selectLocalTimezone:selectLocalTimezone,_computeEffectiveSetting:computeEffectiveSetting,_splitDateTime:splitDateTime,_parseDateTimeInternal:parseDateTimeInternal},Date.prototype.getMicroseconds||(Date.prototype.microseconds=0,Date.prototype.getMicroseconds=function(){return this.microseconds},Date.prototype.setMicroseconds=function(t){return this.setMilliseconds(this.getMilliseconds()+Math.floor(t/1e3)),this.microseconds=t%1e3,this}),$.timepicker.version="1.6.3"}}),"undefined"==typeof jQuery)throw new Error("Bootstrap requires jQuery");function date(t,e){var n,i,a=["Sun","Mon","Tues","Wednes","Thurs","Fri","Satur","January","February","March","April","May","June","July","August","September","October","November","December"],o=/\\?(.?)/gi,s=function(t,e){return i[t]?i[t]():e},r=function(t,e){for(t=String(t);t.length<e;)t="0"+t;return t};i={d:function(){return r(i.j(),2)},D:function(){return i.l().slice(0,3)},j:function(){return n.getDate()},l:function(){return a[i.w()]+"day"},N:function(){return i.w()||7},S:function(){var t=i.j(),e=t%10;return e<=3&&1===parseInt(t%100/10,10)&&(e=0),["st","nd","rd"][e-1]||"th"},w:function(){return n.getDay()},z:function(){var t=new Date(i.Y(),i.n()-1,i.j()),e=new Date(i.Y(),0,1);return Math.round((t-e)/864e5)},W:function(){var t=new Date(i.Y(),i.n()-1,i.j()-i.N()+3),e=new Date(t.getFullYear(),0,4);return r(1+Math.round((t-e)/864e5/7),2)},F:function(){return a[6+i.n()]},m:function(){return r(i.n(),2)},M:function(){return i.F().slice(0,3)},n:function(){return n.getMonth()+1},t:function(){return new Date(i.Y(),i.n(),0).getDate()},L:function(){var t=i.Y();return t%4==0&t%100!=0|t%400==0},o:function(){var t=i.n(),e=i.W();return i.Y()+(12===t&&e<9?1:1===t&&9<e?-1:0)},Y:function(){return n.getFullYear()},y:function(){return i.Y().toString().slice(-2)},a:function(){return 11<n.getHours()?"pm":"am"},A:function(){return i.a().toUpperCase()},B:function(){var t=3600*n.getUTCHours(),e=60*n.getUTCMinutes(),i=n.getUTCSeconds();return r(Math.floor((t+e+i+3600)/86.4)%1e3,3)},g:function(){return i.G()%12||12},G:function(){return n.getHours()},h:function(){return r(i.g(),2)},H:function(){return r(i.G(),2)},i:function(){return r(n.getMinutes(),2)},s:function(){return r(n.getSeconds(),2)},u:function(){return r(1e3*n.getMilliseconds(),6)},e:function(){throw new Error("Not supported (see source code of date() for timezone on how to add support)")},I:function(){return new Date(i.Y(),0)-Date.UTC(i.Y(),0)!=new Date(i.Y(),6)-Date.UTC(i.Y(),6)?1:0},O:function(){var t=n.getTimezoneOffset(),e=Math.abs(t);return(0<t?"-":"+")+r(100*Math.floor(e/60)+e%60,4)},P:function(){var t=i.O();return t.substr(0,3)+":"+t.substr(3,2)},T:function(){return"UTC"},Z:function(){return 60*-n.getTimezoneOffset()},c:function(){return"Y-m-d\\TH:i:sP".replace(o,s)},r:function(){return"D, d M Y H:i:s O".replace(o,s)},U:function(){return n/1e3|0}};var l,d;return l=t,n=void 0===(d=e)?new Date:d instanceof Date?new Date(d):new Date(1e3*d),l.replace(o,s)}function strtotime(t,e){var i,n,a,o,c,u,h,s,r,l;if(!t)return!1;t=t.replace(/^\s+|\s+#x2F;g,"").replace(/\s{2,}/g," ").replace(/[\t\r\n]/g,"").toLowerCase();var d=new RegExp(["^(\\d{1,4})","([\\-\\.\\/:])","(\\d{1,2})","([\\-\\.\\/:])","(\\d{1,4})","(?:\\s(\\d{1,2}):(\\d{2})?:?(\\d{2})?)?","(?:\\s([A-Z]+)?)?quot;].join(""));if((n=t.match(d))&&n[2]===n[4])if(1901<n[1])switch(n[2]){case"-":return!(12<n[3]||31<n[5])&&new Date(n[1],parseInt(n[3],10)-1,n[5],n[6]||0,n[7]||0,n[8]||0,n[9]||0)/1e3;case".":return!1;case"/":return!(12<n[3]||31<n[5])&&new Date(n[1],parseInt(n[3],10)-1,n[5],n[6]||0,n[7]||0,n[8]||0,n[9]||0)/1e3}else if(1901<n[5])switch(n[2]){case"-":case".":return!(12<n[3]||31<n[1])&&new Date(n[5],parseInt(n[3],10)-1,n[1],n[6]||0,n[7]||0,n[8]||0,n[9]||0)/1e3;case"/":return!(12<n[1]||31<n[3])&&new Date(n[5],parseInt(n[1],10)-1,n[3],n[6]||0,n[7]||0,n[8]||0,n[9]||0)/1e3}else switch(n[2]){case"-":return!(12<n[3]||31<n[5]||n[1]<70&&38<n[1])&&(o=0<=n[1]&&n[1]<=38?+n[1]+2e3:n[1],new Date(o,parseInt(n[3],10)-1,n[5],n[6]||0,n[7]||0,n[8]||0,n[9]||0)/1e3);case".":return 70<=n[5]?!(12<n[3]||31<n[1])&&new Date(n[5],parseInt(n[3],10)-1,n[1],n[6]||0,n[7]||0,n[8]||0,n[9]||0)/1e3:n[5]<60&&!n[6]&&(!(23<n[1]||59<n[3])&&(a=new Date,new Date(a.getFullYear(),a.getMonth(),a.getDate(),n[1]||0,n[3]||0,n[5]||0,n[9]||0)/1e3));case"/":return!(12<n[1]||31<n[3]||n[5]<70&&38<n[5])&&(o=0<=n[5]&&n[5]<=38?+n[5]+2e3:n[5],new Date(o,parseInt(n[1],10)-1,n[3],n[6]||0,n[7]||0,n[8]||0,n[9]||0)/1e3);case":":return!(23<n[1]||59<n[3]||59<n[5])&&(a=new Date,new Date(a.getFullYear(),a.getMonth(),a.getDate(),n[1]||0,n[3]||0,n[5]||0)/1e3)}if("now"===t)return null===e||isNaN(e)?(new Date).getTime()/1e3|0:0|e;if(!isNaN(i=Date.parse(t)))return i/1e3|0;if(d=new RegExp(["^([0-9]{4}-[0-9]{2}-[0-9]{2})","[ t]","([0-9]{2}:[0-9]{2}:[0-9]{2}(\\.[0-9]+)?)","([\\+-][0-9]{2}(:[0-9]{2})?|z)"].join("")),(n=t.match(d))&&("z"===n[4]?n[4]="Z":n[4].match(/^([\+-][0-9]{2})#x2F;)&&(n[4]=n[4]+":00"),!isNaN(i=Date.parse(n[1]+"T"+n[2]+n[4]))))return i/1e3|0;function p(t){var e,i,n,a,o=t.split(" "),s=o[0],r=o[1].substring(0,3),l=/\d+/.test(s),d=("last"===s?-1:1)*("ago"===o[2]?-1:1);if(l&&(d*=parseInt(s,10)),h.hasOwnProperty(r)&&!o[1].match(/^mon(day|\.)?#x2F;i))return c["set"+h[r]](c["get"+h[r]]()+d);if("wee"===r)return c.setDate(c.getDate()+7*d);if("next"===s||"last"===s)e=s,i=d,void 0!==(a=u[r])&&(0==(n=a-c.getDay())?n=7*i:0<n&&"last"===e?n-=7:n<0&&"next"===e&&(n+=7),c.setDate(c.getDate()+n));else if(!l)return!1;return!0}if(c=e?new Date(1e3*e):new Date,u={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6},h={yea:"FullYear",mon:"Month",day:"Date",hou:"Hours",min:"Minutes",sec:"Seconds"},"([+-]?\\d+\\s"+(r="(years?|months?|weeks?|days?|hours?|minutes?|min|seconds?|sec|sunday|sun\\.?|monday|mon\\.?|tuesday|tue\\.?|wednesday|wed\\.?|thursday|thu\\.?|friday|fri\\.?|saturday|sat\\.?)")+"|(last|next)\\s"+r+")(\\sago)?",!(n=t.match(new RegExp("([+-]?\\d+\\s(years?|months?|weeks?|days?|hours?|minutes?|min|seconds?|sec|sunday|sun\\.?|monday|mon\\.?|tuesday|tue\\.?|wednesday|wed\\.?|thursday|thu\\.?|friday|fri\\.?|saturday|sat\\.?)|(last|next)\\s(years?|months?|weeks?|days?|hours?|minutes?|min|seconds?|sec|sunday|sun\\.?|monday|mon\\.?|tuesday|tue\\.?|wednesday|wed\\.?|thursday|thu\\.?|friday|fri\\.?|saturday|sat\\.?))(\\sago)?","gi"))))return!1;for(l=0,s=n.length;l<s;l++)if(!p(n[l]))return!1;return c.getTime()/1e3}function gMakeSheet(t){var e=document.createElement("style");return null!=t&&e.setAttribute("media",t),e.appendChild(document.createTextNode("")),document.head.appendChild(e),e.sheet}function gAddStyleToSheet(t,e,i,n){for(var a in"all"===t||null===t?t=[sheet,smSheet,mdSheet,lgSheet]:void 0!==t.cssRules&&(t=[t]),t)"object"==typeof t[a]&&"text/css"===t[a].type&&(t[a].insertRule?t[a].insertRule(e+"{"+i+"}",n):t[a].addRule(e,i,n))}!function(n){"use strict";n.fn.emulateTransitionEnd=function(t){var e=!1,i=this;n(this).one(n.support.transition.end,function(){e=!0});return setTimeout(function(){e||n(i).trigger(n.support.transition.end)},t),this},n(function(){n.support.transition=function(){var t=document.createElement("bootstrap"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var i in e)if(void 0!==t.style[i])return{end:e[i]}}()})}(jQuery),function(o){"use strict";var e='[data-dismiss="alert"]',n=function(t){o(t).on("click",e,this.close)};n.prototype.close=function(t){var e=o(this),i=e.attr("data-target");i||(i=(i=e.attr("href"))&&i.replace(/.*(?=#[^\s]*$)/,""));var n=o(i);function a(){n.trigger("closed.bs.alert").remove()}t&&t.preventDefault(),n.length||(n=e.hasClass("alert")?e:e.parent()),n.trigger(t=o.Event("close.bs.alert")),t.isDefaultPrevented()||(n.removeClass("in"),o.support.transition&&n.hasClass("fade")?n.one(o.support.transition.end,a).emulateTransitionEnd(150):a())};var t=o.fn.alert;o.fn.alert=function(i){return this.each(function(){var t=o(this),e=t.data("bs.alert");e||t.data("bs.alert",e=new n(this)),"string"==typeof i&&e[i].call(t)})},o.fn.alert.Constructor=n,o.fn.alert.noConflict=function(){return o.fn.alert=t,this},o(document).on("click.bs.alert.data-api",e,n.prototype.close)}(jQuery),function(a){"use strict";var o=function(t,e){this.$element=a(t),this.options=a.extend({},o.DEFAULTS,e)};o.DEFAULTS={loadingText:"loading..."},o.prototype.setState=function(t){var e="disabled",i=this.$element,n=i.is("input")?"val":"html",a=i.data();t+="Text",a.resetText||i.data("resetText",i[n]()),i[n](a[t]||this.options[t]),setTimeout(function(){"loadingText"==t?i.addClass(e).attr(e,e):i.removeClass(e).removeAttr(e)},0)},o.prototype.toggle=function(){var t=this.$element.closest('[data-toggle="buttons"]'),e=!0;if(t.length){var i=this.$element.find("input");"radio"===i.prop("type")&&(i.prop("checked")&&this.$element.hasClass("active")?e=!1:t.find(".active").removeClass("active")),e&&i.prop("checked",!this.$element.hasClass("active")).trigger("change")}e&&this.$element.toggleClass("active")};var t=a.fn.button;a.fn.button=function(n){return this.each(function(){var t=a(this),e=t.data("bs.button"),i="object"==typeof n&&n;e||t.data("bs.button",e=new o(this,i)),"toggle"==n?e.toggle():n&&e.setState(n)})},a.fn.button.Constructor=o,a.fn.button.noConflict=function(){return a.fn.button=t,this},a(document).on("click.bs.button.data-api","[data-toggle^=button]",function(t){var e=a(t.target);e.hasClass("btn")||(e=e.closest(".btn")),e.button("toggle"),t.preventDefault()})}(jQuery),function(d){"use strict";var o=function(t,e){this.$element=d(t),this.$indicators=this.$element.find(".carousel-indicators"),this.options=e,this.paused=this.sliding=this.interval=this.$active=this.$items=null,"hover"==this.options.pause&&this.$element.on("mouseenter",d.proxy(this.pause,this)).on("mouseleave",d.proxy(this.cycle,this))};o.DEFAULTS={interval:5e3,pause:"hover",wrap:!0},o.prototype.cycle=function(t){return t||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(d.proxy(this.next,this),this.options.interval)),this},o.prototype.getActiveIndex=function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},o.prototype.to=function(t){var e=this,i=this.getActiveIndex();if(!(t>this.$items.length-1||t<0))return this.sliding?this.$element.one("slid.bs.carousel",function(){e.to(t)}):i==t?this.pause().cycle():this.slide(i<t?"next":"prev",d(this.$items[t]))},o.prototype.pause=function(t){return t||(this.paused=!0),this.$element.find(".next, .prev").length&&d.support.transition.end&&(this.$element.trigger(d.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},o.prototype.next=function(){if(!this.sliding)return this.slide("next")},o.prototype.prev=function(){if(!this.sliding)return this.slide("prev")},o.prototype.slide=function(t,e){var i=this.$element.find(".item.active"),n=e||i[t](),a=this.interval,o="next"==t?"left":"right",s="next"==t?"first":"last",r=this;if(!n.length){if(!this.options.wrap)return;n=this.$element.find(".item")[s]()}this.sliding=!0,a&&this.pause();var l=d.Event("slide.bs.carousel",{relatedTarget:n[0],direction:o});if(!n.hasClass("active")){if(this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid.bs.carousel",function(){var t=d(r.$indicators.children()[r.getActiveIndex()]);t&&t.addClass("active")})),d.support.transition&&this.$element.hasClass("slide")){if(this.$element.trigger(l),l.isDefaultPrevented())return;n.addClass(t),n[0].offsetWidth,i.addClass(o),n.addClass(o),i.one(d.support.transition.end,function(){n.removeClass([t,o].join(" ")).addClass("active"),i.removeClass(["active",o].join(" ")),r.sliding=!1,setTimeout(function(){r.$element.trigger("slid.bs.carousel")},0)}).emulateTransitionEnd(600)}else{if(this.$element.trigger(l),l.isDefaultPrevented())return;i.removeClass("active"),n.addClass("active"),this.sliding=!1,this.$element.trigger("slid.bs.carousel")}return a&&this.cycle(),this}};var t=d.fn.carousel;d.fn.carousel=function(a){return this.each(function(){var t=d(this),e=t.data("bs.carousel"),i=d.extend({},o.DEFAULTS,t.data(),"object"==typeof a&&a),n="string"==typeof a?a:i.slide;e||t.data("bs.carousel",e=new o(this,i)),"number"==typeof a?e.to(a):n?e[n]():i.interval&&e.pause().cycle()})},d.fn.carousel.Constructor=o,d.fn.carousel.noConflict=function(){return d.fn.carousel=t,this},d(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",function(t){var e,i=d(this),n=d(i.attr("data-target")||(e=i.attr("href"))&&e.replace(/.*(?=#[^\s]+$)/,"")),a=d.extend({},n.data(),i.data()),o=i.attr("data-slide-to");o&&(a.interval=!1),n.carousel(a),(o=i.attr("data-slide-to"))&&n.data("bs.carousel").to(o),t.preventDefault()}),d(window).on("load",function(){d('[data-ride="carousel"]').each(function(){var t=d(this);t.carousel(t.data())})})}(jQuery),function(d){"use strict";var a=function(t,e){this.$element=d(t),this.options=d.extend({},a.DEFAULTS,e),this.transitioning=null,this.options.parent&&(this.$parent=d(this.options.parent)),this.options.toggle&&this.toggle()};a.DEFAULTS={toggle:!0},a.prototype.dimension=function(){return this.$element.hasClass("width")?"width":"height"},a.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var t=d.Event("show.bs.collapse");if(this.$element.trigger(t),!t.isDefaultPrevented()){var e=this.$parent&&this.$parent.find("> .panel > .in");if(e&&e.length){var i=e.data("bs.collapse");if(i&&i.transitioning)return;e.collapse("hide"),i||e.data("bs.collapse",null)}var n=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[n](0),this.transitioning=1;var a=function(){this.$element.removeClass("collapsing").addClass("in")[n]("auto"),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!d.support.transition)return a.call(this);var o=d.camelCase(["scroll",n].join("-"));this.$element.one(d.support.transition.end,d.proxy(a,this)).emulateTransitionEnd(350)[n](this.$element[0][o])}}},a.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var t=d.Event("hide.bs.collapse");if(this.$element.trigger(t),!t.isDefaultPrevented()){var e=this.dimension();this.$element[e](this.$element[e]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"),this.transitioning=1;var i=function(){this.transitioning=0,this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse")};if(!d.support.transition)return i.call(this);this.$element[e](0).one(d.support.transition.end,d.proxy(i,this)).emulateTransitionEnd(350)}}},a.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var t=d.fn.collapse;d.fn.collapse=function(n){return this.each(function(){var t=d(this),e=t.data("bs.collapse"),i=d.extend({},a.DEFAULTS,t.data(),"object"==typeof n&&n);e||t.data("bs.collapse",e=new a(this,i)),"string"==typeof n&&e[n]()})},d.fn.collapse.Constructor=a,d.fn.collapse.noConflict=function(){return d.fn.collapse=t,this},d(document).on("click.bs.collapse.data-api","[data-toggle=collapse]",function(t){var e,i=d(this),n=i.attr("data-target")||t.preventDefault()||(e=i.attr("href"))&&e.replace(/.*(?=#[^\s]+$)/,""),a=d(n),o=a.data("bs.collapse"),s=o?"toggle":i.data(),r=i.attr("data-parent"),l=r&&d(r);o&&o.transitioning||(l&&l.find('[data-toggle=collapse][data-parent="'+r+'"]').not(i).addClass("collapsed"),i[a.hasClass("in")?"addClass":"removeClass"]("collapsed")),a.collapse(s)})}(jQuery),function(s){"use strict";var r="[data-toggle=dropdown]",n=function(t){s(t).on("click.bs.dropdown",this.toggle)};function a(){s(".dropdown-backdrop").remove(),s(r).each(function(t){var e=l(s(this));e.hasClass("open")&&(e.trigger(t=s.Event("hide.bs.dropdown")),t.isDefaultPrevented()||e.removeClass("open").trigger("hidden.bs.dropdown"))})}function l(t){var e=t.attr("data-target");e||(e=(e=t.attr("href"))&&/#/.test(e)&&e.replace(/.*(?=#[^\s]*$)/,""));var i=e&&s(e);return i&&i.length?i:t.parent()}n.prototype.toggle=function(t){var e=s(this);if(!e.is(".disabled, :disabled")){var i=l(e),n=i.hasClass("open");if(a(),!n){if("ontouchstart"in document.documentElement&&!i.closest(".navbar-nav").length&&s('<div class="dropdown-backdrop"/>').insertAfter(s(this)).on("click",a),i.trigger(t=s.Event("show.bs.dropdown")),t.isDefaultPrevented())return;i.toggleClass("open").trigger("shown.bs.dropdown"),e.focus()}return!1}},n.prototype.keydown=function(t){if(/(38|40|27)/.test(t.keyCode)){var e=s(this);if(t.preventDefault(),t.stopPropagation(),!e.is(".disabled, :disabled")){var i=l(e),n=i.hasClass("open");if(!n||n&&27==t.keyCode)return 27==t.which&&i.find(r).focus(),e.click();var a=s("[role=menu] li:not(.divider):visible a",i);if(a.length){var o=a.index(a.filter(":focus"));38==t.keyCode&&0<o&&o--,40==t.keyCode&&o<a.length-1&&o++,~o||(o=0),a.eq(o).focus()}}}};var t=s.fn.dropdown;s.fn.dropdown=function(i){return this.each(function(){var t=s(this),e=t.data("bs.dropdown");e||t.data("bs.dropdown",e=new n(this)),"string"==typeof i&&e[i].call(t)})},s.fn.dropdown.Constructor=n,s.fn.dropdown.noConflict=function(){return s.fn.dropdown=t,this},s(document).on("click.bs.dropdown.data-api",a).on("click.bs.dropdown.data-api",".dropdown form",function(t){t.stopPropagation()}).on("click.bs.dropdown.data-api",r,n.prototype.toggle).on("keydown.bs.dropdown.data-api",r+", [role=menu]",n.prototype.keydown)}(jQuery),function(o){"use strict";var s=function(t,e){this.options=e,this.$element=o(t),this.$backdrop=this.isShown=null,this.options.remote&&this.$element.load(this.options.remote)};s.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},s.prototype.toggle=function(t){return this[this.isShown?"hide":"show"](t)},s.prototype.show=function(i){var n=this,t=o.Event("show.bs.modal",{relatedTarget:i});this.$element.trigger(t),this.isShown||t.isDefaultPrevented()||(this.isShown=!0,this.escape(),this.$element.on("click.dismiss.modal",'[data-dismiss="modal"]',o.proxy(this.hide,this)),this.backdrop(function(){var t=o.support.transition&&n.$element.hasClass("fade");n.$element.parent().length||n.$element.appendTo("#yop-main-area"),n.$element.show(),t&&n.$element[0].offsetWidth,n.$element.addClass("in").attr("aria-hidden",!1),n.enforceFocus();var e=o.Event("shown.bs.modal",{relatedTarget:i});t?n.$element.find(".modal-dialog").one(o.support.transition.end,function(){n.$element.focus().trigger(e)}).emulateTransitionEnd(300):n.$element.focus().trigger(e)}))},s.prototype.hide=function(t){t&&t.preventDefault(),t=o.Event("hide.bs.modal"),this.$element.trigger(t),this.isShown&&!t.isDefaultPrevented()&&(this.isShown=!1,this.escape(),o(document).off("focusin.bs.modal"),this.$element.removeClass("in").attr("aria-hidden",!0).off("click.dismiss.modal"),o.support.transition&&this.$element.hasClass("fade")?this.$element.one(o.support.transition.end,o.proxy(this.hideModal,this)).emulateTransitionEnd(300):this.hideModal())},s.prototype.enforceFocus=function(){o(document).off("focusin.bs.modal").on("focusin.bs.modal",o.proxy(function(t){this.$element[0]===t.target||this.$element.has(t.target).length||this.$element.focus()},this))},s.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.bs.modal",o.proxy(function(t){27==t.which&&this.hide()},this)):this.isShown||this.$element.off("keyup.dismiss.bs.modal")},s.prototype.hideModal=function(){var t=this;this.$element.hide(),this.backdrop(function(){t.removeBackdrop(),t.$element.trigger("hidden.bs.modal")})},s.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},s.prototype.backdrop=function(t){var e=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var i=o.support.transition&&e;if(this.$backdrop=o('<div class="modal-backdrop '+e+'" />').appendTo(document.body),this.$element.on("click.dismiss.modal",o.proxy(function(t){t.target===t.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus.call(this.$element[0]):this.hide.call(this))},this)),i&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!t)return;i?this.$backdrop.one(o.support.transition.end,t).emulateTransitionEnd(150):t()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),o.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(o.support.transition.end,t).emulateTransitionEnd(150):t()):t&&t()};var t=o.fn.modal;o.fn.modal=function(n,a){return this.each(function(){var t=o(this),e=t.data("bs.modal"),i=o.extend({},s.DEFAULTS,t.data(),"object"==typeof n&&n);e||t.data("bs.modal",e=new s(this,i)),"string"==typeof n?e[n](a):i.show&&e.show(a)})},o.fn.modal.Constructor=s,o.fn.modal.noConflict=function(){return o.fn.modal=t,this},o(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(t){var e=o(this),i=e.attr("href"),n=o(e.attr("data-target")||i&&i.replace(/.*(?=#[^\s]+$)/,"")),a=n.data("modal")?"toggle":o.extend({remote:!/#/.test(i)&&i},n.data(),e.data());t.preventDefault(),n.modal(a,this).one("hide",function(){e.is(":visible")&&e.focus()})}),o(document).on("show.bs.modal",".modal",function(){o(document.body).addClass("modal-open")}).on("hidden.bs.modal",".modal",function(){o(document.body).removeClass("modal-open")})}(jQuery),function(m){"use strict";var a=function(t,e){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null,this.init("tooltip",t,e)};a.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},a.prototype.init=function(t,e,i){this.enabled=!0,this.type=t,this.$element=m(e),this.options=this.getOptions(i);for(var n=this.options.trigger.split(" "),a=n.length;a--;){var o=n[a];if("click"==o)this.$element.on("click."+this.type,this.options.selector,m.proxy(this.toggle,this));else if("manual"!=o){var s="hover"==o?"mouseenter":"focus",r="hover"==o?"mouseleave":"blur";this.$element.on(s+"."+this.type,this.options.selector,m.proxy(this.enter,this)),this.$element.on(r+"."+this.type,this.options.selector,m.proxy(this.leave,this))}}this.options.selector?this._options=m.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},a.prototype.getDefaults=function(){return a.DEFAULTS},a.prototype.getOptions=function(t){return(t=m.extend({},this.getDefaults(),this.$element.data(),t)).delay&&"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),t},a.prototype.getDelegateOptions=function(){var i={},n=this.getDefaults();return this._options&&m.each(this._options,function(t,e){n[t]!=e&&(i[t]=e)}),i},a.prototype.enter=function(t){var e=t instanceof this.constructor?t:m(t.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);if(clearTimeout(e.timeout),e.hoverState="in",!e.options.delay||!e.options.delay.show)return e.show();e.timeout=setTimeout(function(){"in"==e.hoverState&&e.show()},e.options.delay.show)},a.prototype.leave=function(t){var e=t instanceof this.constructor?t:m(t.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);if(clearTimeout(e.timeout),e.hoverState="out",!e.options.delay||!e.options.delay.hide)return e.hide();e.timeout=setTimeout(function(){"out"==e.hoverState&&e.hide()},e.options.delay.hide)},a.prototype.show=function(){var t=m.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){if(this.$element.trigger(t),t.isDefaultPrevented())return;var e=this.tip();this.setContent(),this.options.animation&&e.addClass("fade");var i="function"==typeof this.options.placement?this.options.placement.call(this,e[0],this.$element[0]):this.options.placement,n=/\s?auto?\s?/i,a=n.test(i);a&&(i=i.replace(n,"")||"top"),e.detach().css({top:0,left:0,display:"block"}).addClass(i),this.options.container?e.appendTo(this.options.container):e.insertAfter(this.$element);var o=this.getPosition(),s=e[0].offsetWidth,r=e[0].offsetHeight;if(a){var l=this.$element.parent(),d=i,c=document.documentElement.scrollTop||document.body.scrollTop,u="body"==this.options.container?window.innerWidth:l.outerWidth(),h="body"==this.options.container?window.innerHeight:l.outerHeight(),p="body"==this.options.container?0:l.offset().left;i="bottom"==i&&o.top+o.height+r-c>h?"top":"top"==i&&o.top-c-r<0?"bottom":"right"==i&&o.right+s>u?"left":"left"==i&&o.left-s<p?"right":i,e.removeClass(d).addClass(i)}var f=this.getCalculatedOffset(i,o,s,r);this.applyPlacement(f,i),this.$element.trigger("shown.bs."+this.type)}},a.prototype.applyPlacement=function(t,e){var i,n=this.tip(),a=n[0].offsetWidth,o=n[0].offsetHeight,s=parseInt(n.css("margin-top"),10),r=parseInt(n.css("margin-left"),10);isNaN(s)&&(s=0),isNaN(r)&&(r=0),t.top=t.top+s,t.left=t.left+r,n.offset(t).addClass("in");var l=n[0].offsetWidth,d=n[0].offsetHeight;if("top"==e&&d!=o&&(i=!0,t.top=t.top+o-d),/bottom|top/.test(e)){var c=0;t.left<0&&(c=-2*t.left,t.left=0,n.offset(t),l=n[0].offsetWidth,d=n[0].offsetHeight),this.replaceArrow(c-a+l,l,"left")}else this.replaceArrow(d-o,d,"top");i&&n.offset(t)},a.prototype.replaceArrow=function(t,e,i){this.arrow().css(i,t?50*(1-t/e)+"%":"")},a.prototype.setContent=function(){var t=this.tip(),e=this.getTitle();t.find(".tooltip-inner")[this.options.html?"html":"text"](e),t.removeClass("fade in top bottom left right")},a.prototype.hide=function(){var t=this,e=this.tip(),i=m.Event("hide.bs."+this.type);function n(){"in"!=t.hoverState&&e.detach()}if(this.$element.trigger(i),!i.isDefaultPrevented())return e.removeClass("in"),m.support.transition&&this.$tip.hasClass("fade")?e.one(m.support.transition.end,n).emulateTransitionEnd(150):n(),this.$element.trigger("hidden.bs."+this.type),this},a.prototype.fixTitle=function(){var t=this.$element;(t.attr("title")||"string"!=typeof t.attr("data-original-title"))&&t.attr("data-original-title",t.attr("title")||"").attr("title","")},a.prototype.hasContent=function(){return this.getTitle()},a.prototype.getPosition=function(){var t=this.$element[0];return m.extend({},"function"==typeof t.getBoundingClientRect?t.getBoundingClientRect():{width:t.offsetWidth,height:t.offsetHeight},this.$element.offset())},a.prototype.getCalculatedOffset=function(t,e,i,n){return"bottom"==t?{top:e.top+e.height,left:e.left+e.width/2-i/2}:"top"==t?{top:e.top-n,left:e.left+e.width/2-i/2}:"left"==t?{top:e.top+e.height/2-n/2,left:e.left-i}:{top:e.top+e.height/2-n/2,left:e.left+e.width}},a.prototype.getTitle=function(){var t=this.$element,e=this.options;return t.attr("data-original-title")||("function"==typeof e.title?e.title.call(t[0]):e.title)},a.prototype.tip=function(){return this.$tip=this.$tip||m(this.options.template)},a.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},a.prototype.validate=function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},a.prototype.enable=function(){this.enabled=!0},a.prototype.disable=function(){this.enabled=!1},a.prototype.toggleEnabled=function(){this.enabled=!this.enabled},a.prototype.toggle=function(t){var e=t?m(t.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type):this;e.tip().hasClass("in")?e.leave(e):e.enter(e)},a.prototype.destroy=function(){this.hide().$element.off("."+this.type).removeData("bs."+this.type)};var t=m.fn.tooltip;m.fn.tooltip=function(n){return this.each(function(){var t=m(this),e=t.data("bs.tooltip"),i="object"==typeof n&&n;e||t.data("bs.tooltip",e=new a(this,i)),"string"==typeof n&&e[n]()})},m.fn.tooltip.Constructor=a,m.fn.tooltip.noConflict=function(){return m.fn.tooltip=t,this}}(jQuery),function(a){"use strict";var o=function(t,e){this.init("popover",t,e)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");o.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),((o.prototype=a.extend({},a.fn.tooltip.Constructor.prototype)).constructor=o).prototype.getDefaults=function(){return o.DEFAULTS},o.prototype.setContent=function(){var t=this.tip(),e=this.getTitle(),i=this.getContent();t.find(".popover-title")[this.options.html?"html":"text"](e),t.find(".popover-content")[this.options.html?"html":"text"](i),t.removeClass("fade top bottom left right in"),t.find(".popover-title").html()||t.find(".popover-title").hide()},o.prototype.hasContent=function(){return this.getTitle()||this.getContent()},o.prototype.getContent=function(){var t=this.$element,e=this.options;return t.attr("data-content")||("function"==typeof e.content?e.content.call(t[0]):e.content)},o.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},o.prototype.tip=function(){return this.$tip||(this.$tip=a(this.options.template)),this.$tip};var t=a.fn.popover;a.fn.popover=function(n){return this.each(function(){var t=a(this),e=t.data("bs.popover"),i="object"==typeof n&&n;e||t.data("bs.popover",e=new o(this,i)),"string"==typeof n&&e[n]()})},a.fn.popover.Constructor=o,a.fn.popover.noConflict=function(){return a.fn.popover=t,this}}(jQuery),function(o){"use strict";function a(t,e){var i,n=o.proxy(this.process,this);this.$element=o(t).is("body")?o(window):o(t),this.$body=o("body"),this.$scrollElement=this.$element.on("scroll.bs.scroll-spy.data-api",n),this.options=o.extend({},a.DEFAULTS,e),this.selector=(this.options.target||(i=o(t).attr("href"))&&i.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.offsets=o([]),this.targets=o([]),this.activeTarget=null,this.refresh(),this.process()}a.DEFAULTS={offset:10},a.prototype.refresh=function(){var n=this.$element[0]==window?"offset":"position";this.offsets=o([]),this.targets=o([]);var a=this;this.$body.find(this.selector).map(function(){var t=o(this),e=t.data("target")||t.attr("href"),i=/^#\w/.test(e)&&o(e);return i&&i.length&&[[i[n]().top+(!o.isWindow(a.$scrollElement.get(0))&&a.$scrollElement.scrollTop()),e]]||null}).sort(function(t,e){return t[0]-e[0]}).each(function(){a.offsets.push(this[0]),a.targets.push(this[1])})},a.prototype.process=function(){var t,e=this.$scrollElement.scrollTop()+this.options.offset,i=(this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight)-this.$scrollElement.height(),n=this.offsets,a=this.targets,o=this.activeTarget;if(i<=e)return o!=(t=a.last()[0])&&this.activate(t);for(t=n.length;t--;)o!=a[t]&&e>=n[t]&&(!n[t+1]||e<=n[t+1])&&this.activate(a[t])},a.prototype.activate=function(t){this.activeTarget=t,o(this.selector).parents(".active").removeClass("active");var e=this.selector+'[data-target="'+t+'"],'+this.selector+'[href="'+t+'"]',i=o(e).parents("li").addClass("active");i.parent(".dropdown-menu").length&&(i=i.closest("li.dropdown").addClass("active")),i.trigger("activate.bs.scrollspy")};var t=o.fn.scrollspy;o.fn.scrollspy=function(n){return this.each(function(){var t=o(this),e=t.data("bs.scrollspy"),i="object"==typeof n&&n;e||t.data("bs.scrollspy",e=new a(this,i)),"string"==typeof n&&e[n]()})},o.fn.scrollspy.Constructor=a,o.fn.scrollspy.noConflict=function(){return o.fn.scrollspy=t,this},o(window).on("load",function(){o('[data-spy="scroll"]').each(function(){var t=o(this);t.scrollspy(t.data())})})}(jQuery),function(s){"use strict";var n=function(t){this.element=s(t)};n.prototype.show=function(){var t=this.element,e=t.closest("ul:not(.dropdown-menu)"),i=t.data("target");if(i||(i=(i=t.attr("href"))&&i.replace(/.*(?=#[^\s]*$)/,"")),!t.parent("li").hasClass("active")){var n=e.find(".active:last a")[0],a=s.Event("show.bs.tab",{relatedTarget:n});if(t.trigger(a),!a.isDefaultPrevented()){var o=s(i);this.activate(t.parent("li"),e),this.activate(o,o.parent(),function(){t.trigger({type:"shown.bs.tab",relatedTarget:n})})}}},n.prototype.activate=function(t,e,i){var n=e.find("> .active"),a=i&&s.support.transition&&n.hasClass("fade");function o(){n.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),t.addClass("active"),a?(t[0].offsetWidth,t.addClass("in")):t.removeClass("fade"),t.parent(".dropdown-menu")&&t.closest("li.dropdown").addClass("active"),i&&i()}a?n.one(s.support.transition.end,o).emulateTransitionEnd(150):o(),n.removeClass("in")};var t=s.fn.tab;s.fn.tab=function(i){return this.each(function(){var t=s(this),e=t.data("bs.tab");e||t.data("bs.tab",e=new n(this)),"string"==typeof i&&e[i]()})},s.fn.tab.Constructor=n,s.fn.tab.noConflict=function(){return s.fn.tab=t,this},s(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(t){t.preventDefault(),s(this).tab("show")})}(jQuery),function(r){"use strict";var l=function(t,e){this.options=r.extend({},l.DEFAULTS,e),this.$window=r(window).on("scroll.bs.affix.data-api",r.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",r.proxy(this.checkPositionWithEventLoop,this)),this.$element=r(t),this.affixed=this.unpin=null,this.checkPosition()};l.RESET="affix affix-top affix-bottom",l.DEFAULTS={offset:0},l.prototype.checkPositionWithEventLoop=function(){setTimeout(r.proxy(this.checkPosition,this),1)},l.prototype.checkPosition=function(){if(this.$element.is(":visible")){var t=r(document).height(),e=this.$window.scrollTop(),i=this.$element.offset(),n=this.options.offset,a=n.top,o=n.bottom;"object"!=typeof n&&(o=a=n),"function"==typeof a&&(a=n.top()),"function"==typeof o&&(o=n.bottom());var s=!(null!=this.unpin&&e+this.unpin<=i.top)&&(null!=o&&i.top+this.$element.height()>=t-o?"bottom":null!=a&&e<=a&&"top");this.affixed!==s&&(this.unpin&&this.$element.css("top",""),this.affixed=s,this.unpin="bottom"==s?i.top-e:null,this.$element.removeClass(l.RESET).addClass("affix"+(s?"-"+s:"")),"bottom"==s&&this.$element.offset({top:document.body.offsetHeight-o-this.$element.height()}))}};var t=r.fn.affix;r.fn.affix=function(n){return this.each(function(){var t=r(this),e=t.data("bs.affix"),i="object"==typeof n&&n;e||t.data("bs.affix",e=new l(this,i)),"string"==typeof n&&e[n]()})},r.fn.affix.Constructor=l,r.fn.affix.noConflict=function(){return r.fn.affix=t,this},r(window).on("load",function(){r('[data-spy="affix"]').each(function(){var t=r(this),e=t.data();e.offset=e.offset||{},e.offsetBottom&&(e.offset.bottom=e.offsetBottom),e.offsetTop&&(e.offset.top=e.offsetTop),t.affix(e)})})}(jQuery),function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof exports?module.exports=t(require("jquery")):t(jQuery)}(function(x){"use strict";function i(t){var e=t.parent();t.removeData("minicolors-initialized").removeData("minicolors-settings").removeProp("size").removeClass("minicolors-input"),e.before(t).remove()}function n(t){var e=t.parent(),i=e.find(".minicolors-panel"),n=t.data("minicolors-settings");!t.data("minicolors-initialized")||t.prop("disabled")||e.hasClass("minicolors-inline")||e.hasClass("minicolors-focus")||(a(),e.addClass("minicolors-focus"),i.stop(!0,!0).fadeIn(n.showSpeed,function(){n.show&&n.show.call(t.get(0))}))}function a(){x(".minicolors-focus").each(function(){var t=x(this),e=t.find(".minicolors-input"),i=t.find(".minicolors-panel"),n=e.data("minicolors-settings");i.fadeOut(n.hideSpeed,function(){n.hide&&n.hide.call(e.get(0)),t.removeClass("minicolors-focus")})})}function o(t,e,i){var n,a,o,s,r=t.parents(".minicolors").find(".minicolors-input"),l=r.data("minicolors-settings"),d=t.find("[class$=-picker]"),c=t.offset().left,u=t.offset().top,h=Math.round(e.pageX-c),p=Math.round(e.pageY-u),f=i?l.animationSpeed:0;e.originalEvent.changedTouches&&(h=e.originalEvent.changedTouches[0].pageX-c,p=e.originalEvent.changedTouches[0].pageY-u),h<0&&(h=0),p<0&&(p=0),h>t.width()&&(h=t.width()),p>t.height()&&(p=t.height()),t.parent().is(".minicolors-slider-wheel")&&d.parent().is(".minicolors-grid")&&(n=75-h,a=75-p,o=Math.sqrt(n*n+a*a),(s=Math.atan2(a,n))<0&&(s+=2*Math.PI),75<o&&(h=(o=75)-75*Math.cos(s),p=75-75*Math.sin(s)),h=Math.round(h),p=Math.round(p)),t.is(".minicolors-grid")?d.stop(!0).animate({top:p+"px",left:h+"px"},f,l.animationEasing,function(){m(r,t)}):d.stop(!0).animate({top:p+"px"},f,l.animationEasing,function(){m(r,t)})}function m(t,e){function i(t,e){var i,n;return t.length&&e?(i=t.offset().left,n=t.offset().top,{x:i-e.offset().left+t.outerWidth()/2,y:n-e.offset().top+t.outerHeight()/2}):null}var n,a,o,s,r,l,d,c=t.val(),u=t.attr("data-opacity"),h=t.parent(),p=t.data("minicolors-settings"),f=h.find(".minicolors-input-swatch"),m=h.find(".minicolors-grid"),g=h.find(".minicolors-slider"),v=h.find(".minicolors-opacity-slider"),b=m.find("[class$=-picker]"),y=g.find("[class$=-picker]"),w=v.find("[class$=-picker]"),x=i(b,m),k=i(y,g),C=i(w,v);if(e.is(".minicolors-grid, .minicolors-slider, .minicolors-opacity-slider")){switch(p.control){case"wheel":s=m.width()/2-x.x,r=m.height()/2-x.y,l=Math.sqrt(s*s+r*r),(d=Math.atan2(r,s))<0&&(d+=2*Math.PI),75<l&&(l=75,x.x=69-75*Math.cos(d),x.y=69-75*Math.sin(d)),a=M(l/.75,0,100),c=E({h:n=M(180*d/Math.PI,0,360),s:a,b:o=M(100-Math.floor(k.y*(100/g.height())),0,100)}),g.css("backgroundColor",E({h:n,s:a,b:100}));break;case"saturation":c=E({h:n=M(parseInt(x.x*(360/m.width()),10),0,360),s:a=M(100-Math.floor(k.y*(100/g.height())),0,100),b:o=M(100-Math.floor(x.y*(100/m.height())),0,100)}),g.css("backgroundColor",E({h:n,s:100,b:o})),h.find(".minicolors-grid-inner").css("opacity",a/100);break;case"brightness":c=E({h:n=M(parseInt(x.x*(360/m.width()),10),0,360),s:a=M(100-Math.floor(x.y*(100/m.height())),0,100),b:o=M(100-Math.floor(k.y*(100/g.height())),0,100)}),g.css("backgroundColor",E({h:n,s:a,b:100})),h.find(".minicolors-grid-inner").css("opacity",1-o/100);break;default:c=E({h:n=M(360-parseInt(k.y*(360/g.height()),10),0,360),s:a=M(Math.floor(x.x*(100/m.width())),0,100),b:o=M(100-Math.floor(x.y*(100/m.height())),0,100)}),m.css("backgroundColor",E({h:n,s:100,b:100}))}_(t,c,u=p.opacity?parseFloat(1-C.y/v.height()).toFixed(2):1)}else f.find("span").css({backgroundColor:c,opacity:u}),S(t,c,u)}function _(t,e,i){var n,a=t.parent(),o=t.data("minicolors-settings"),s=a.find(".minicolors-input-swatch");o.opacity&&t.attr("data-opacity",i),e="rgb"===o.format?(n=D(e)?P(e,!0):L(C(e,!0)),i=""===t.attr("data-opacity")?1:M(parseFloat(t.attr("data-opacity")).toFixed(2),0,1),!isNaN(i)&&o.opacity||(i=1),t.minicolors("rgbObject").a<=1&&n&&o.opacity?"rgba("+n.r+", "+n.g+", "+n.b+", "+parseFloat(i)+")":"rgb("+n.r+", "+n.g+", "+n.b+")"):(D(e)&&(e=I(e)),k(e,o.letterCase)),t.val(e),s.find("span").css({backgroundColor:e,opacity:i}),S(t,e,i)}function d(t,e){var i,n,a,o,s,r,l,d,c,u,h=t.parent(),p=t.data("minicolors-settings"),f=h.find(".minicolors-input-swatch"),m=h.find(".minicolors-grid"),g=h.find(".minicolors-slider"),v=h.find(".minicolors-opacity-slider"),b=m.find("[class$=-picker]"),y=g.find("[class$=-picker]"),w=v.find("[class$=-picker]");switch(D(t.val())?(i=I(t.val()),(s=M(parseFloat(T(t.val())).toFixed(2),0,1))&&t.attr("data-opacity",s)):i=k(C(t.val(),!0),p.letterCase),i||(i=k(A(p.defaultValue,!0),p.letterCase)),n=function(t){var e=function(t){var e={h:0,s:0,b:0},i=Math.min(t.r,t.g,t.b),n=Math.max(t.r,t.g,t.b),a=n-i;e.b=n,e.s=0!==n?255*a/n:0,0!==e.s?t.r===n?e.h=(t.g-t.b)/a:t.g===n?e.h=2+(t.b-t.r)/a:e.h=4+(t.r-t.g)/a:e.h=-1;e.h*=60,e.h<0&&(e.h+=360);return e.s*=100/255,e.b*=100/255,e}(L(t));0===e.s&&(e.h=360);return e}(i),o=p.keywords?x.map(p.keywords.split(","),function(t){return x.trim(t.toLowerCase())}):[],r=""!==t.val()&&-1<x.inArray(t.val().toLowerCase(),o)?k(t.val()):D(t.val())?P(t.val()):i,e||t.val(r),p.opacity&&(a=""===t.attr("data-opacity")?1:M(parseFloat(t.attr("data-opacity")).toFixed(2),0,1),isNaN(a)&&(a=1),t.attr("data-opacity",a),f.find("span").css("opacity",a),d=M(v.height()-v.height()*a,0,v.height()),w.css("top",d+"px")),"transparent"===t.val().toLowerCase()&&f.find("span").css("opacity",0),f.find("span").css("backgroundColor",i),p.control){case"wheel":c=M(Math.ceil(.75*n.s),0,m.height()/2),u=n.h*Math.PI/180,l=M(75-Math.cos(u)*c,0,m.width()),d=M(75-Math.sin(u)*c,0,m.height()),b.css({top:d+"px",left:l+"px"}),d=150-n.b/(100/m.height()),""===i&&(d=0),y.css("top",d+"px"),g.css("backgroundColor",E({h:n.h,s:n.s,b:100}));break;case"saturation":l=M(5*n.h/12,0,150),d=M(m.height()-Math.ceil(n.b/(100/m.height())),0,m.height()),b.css({top:d+"px",left:l+"px"}),d=M(g.height()-n.s*(g.height()/100),0,g.height()),y.css("top",d+"px"),g.css("backgroundColor",E({h:n.h,s:100,b:n.b})),h.find(".minicolors-grid-inner").css("opacity",n.s/100);break;case"brightness":l=M(5*n.h/12,0,150),d=M(m.height()-Math.ceil(n.s/(100/m.height())),0,m.height()),b.css({top:d+"px",left:l+"px"}),d=M(g.height()-n.b*(g.height()/100),0,g.height()),y.css("top",d+"px"),g.css("backgroundColor",E({h:n.h,s:n.s,b:100})),h.find(".minicolors-grid-inner").css("opacity",1-n.b/100);break;default:l=M(Math.ceil(n.s/(100/m.width())),0,m.width()),d=M(m.height()-Math.ceil(n.b/(100/m.height())),0,m.height()),b.css({top:d+"px",left:l+"px"}),d=M(g.height()-n.h/(360/g.height()),0,g.height()),y.css("top",d+"px"),m.css("backgroundColor",E({h:n.h,s:100,b:100}))}t.data("minicolors-initialized")&&S(t,r,a)}function S(t,e,i){var n,a,o=t.data("minicolors-settings"),s=t.data("minicolors-lastChange");if(!s||s.value!==e||s.opacity!==i){if(t.data("minicolors-lastChange",{value:e,opacity:i}),o.swatches&&0!==o.swatches.length){for(n=D(e)?P(e,!0):L(e),-1,a=0;a<o.swatches.length;++a)if(n.r===o.swatches[a].r&&n.g===o.swatches[a].g&&n.b===o.swatches[a].b&&n.a===o.swatches[a].a){a;break}t.parent().find(".minicolors-swatches .minicolors-swatch").removeClass("selected"),-1!==a&&t.parent().find(".minicolors-swatches .minicolors-swatch").eq(a).addClass("selected")}o.change&&(o.changeDelay?(clearTimeout(t.data("minicolors-changeTimeout")),t.data("minicolors-changeTimeout",setTimeout(function(){o.change.call(t.get(0),e,i)},o.changeDelay))):o.change.call(t.get(0),e,i)),t.trigger("change").trigger("input")}}function k(t,e){return"uppercase"===e?t.toUpperCase():t.toLowerCase()}function C(t,e){return(t=t.replace(/^#/g,"")).match(/^[A-F0-9]{3,6}/gi)?3!==t.length&&6!==t.length?"":(3===t.length&&e&&(t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2]),"#"+t):""}function P(t,e){var i=t.replace(/[^\d,.]/g,"").split(",");return i[0]=M(parseInt(i[0],10),0,255),i[1]=M(parseInt(i[1],10),0,255),i[2]=M(parseInt(i[2],10),0,255),i[3]&&(i[3]=M(parseFloat(i[3],10),0,1)),e?{r:i[0],g:i[1],b:i[2],a:i[3]?i[3]:null}:void 0!==i[3]&&i[3]<=1?"rgba("+i[0]+", "+i[1]+", "+i[2]+", "+i[3]+")":"rgb("+i[0]+", "+i[1]+", "+i[2]+")"}function A(t,e){return D(t)?P(t):C(t,e)}function M(t,e,i){return t<e&&(t=e),i<t&&(t=i),t}function D(t){var e=t.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i);return!(!e||4!==e.length)}function T(t){return(t=t.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+(\.\d{1,2})?|\.\d{1,2})[\s+]?/i))&&6===t.length?t[4]:"1"}function I(t){return(t=t.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i))&&4===t.length?"#"+("0"+parseInt(t[1],10).toString(16)).slice(-2)+("0"+parseInt(t[2],10).toString(16)).slice(-2)+("0"+parseInt(t[3],10).toString(16)).slice(-2):""}function c(t){var i=[t.r.toString(16),t.g.toString(16),t.b.toString(16)];return x.each(i,function(t,e){1===e.length&&(i[t]="0"+e)}),"#"+i.join("")}function E(t){return c(function(t){var e={},i=Math.round(t.h),n=Math.round(255*t.s/100),a=Math.round(255*t.b/100);if(0===n)e.r=e.g=e.b=a;else{var o=a,s=(255-n)*a/255,r=i%60*(o-s)/60;360===i&&(i=0),i<60?(e.r=o,e.b=s,e.g=s+r):i<120?(e.g=o,e.b=s,e.r=o-r):i<180?(e.g=o,e.r=s,e.b=s+r):i<240?(e.b=o,e.r=s,e.g=o-r):i<300?(e.b=o,e.g=s,e.r=s+r):e.b=i<360?(e.r=o,e.g=s,o-r):(e.r=0,e.g=0)}return{r:Math.round(e.r),g:Math.round(e.g),b:Math.round(e.b)}}(t))}function L(t){return{r:(t=parseInt(-1<t.indexOf("#")?t.substring(1):t,16))>>16,g:(65280&t)>>8,b:255&t}}x.minicolors={defaults:{animationSpeed:50,animationEasing:"swing",change:null,changeDelay:0,control:"hue",dataUris:!0,defaultValue:"",format:"hex",hide:null,hideSpeed:100,inline:!1,keywords:"",letterCase:"lowercase",opacity:!1,position:"bottom left",show:null,showSpeed:100,theme:"default",swatches:[]}},x.extend(x.fn,{minicolors:function(t,e){switch(t){case"destroy":return x(this).each(function(){i(x(this))}),x(this);case"hide":return a(),x(this);case"opacity":return void 0===e?x(this).attr("data-opacity"):(x(this).each(function(){d(x(this).attr("data-opacity",e))}),x(this));case"rgbObject":return function(t){var e=L(C(x(t).val(),!0)),i=x(t).attr("data-opacity");if(!e)return null;void 0!==i&&x.extend(e,{a:parseFloat(i)});return e}(x(this));case"rgbString":case"rgbaString":return function(t,e){var i=L(C(x(t).val(),!0)),n=x(t).attr("data-opacity");if(!i)return null;void 0===n&&(n=1);return e?"rgba("+i.r+", "+i.g+", "+i.b+", "+parseFloat(n)+")":"rgb("+i.r+", "+i.g+", "+i.b+")"}(x(this),"rgbaString"===t);case"settings":return void 0===e?x(this).data("minicolors-settings"):(x(this).each(function(){var t=x(this).data("minicolors-settings")||{};i(x(this)),x(this).minicolors(x.extend(!0,t,e))}),x(this));case"show":return n(x(this).eq(0)),x(this);case"value":return void 0===e?x(this).val():(x(this).each(function(){"object"==typeof e&&null!==typeof e?(e.opacity&&x(this).attr("data-opacity",M(e.opacity,0,1)),e.color&&x(this).val(e.color)):x(this).val(e),d(x(this))}),x(this));default:return"create"!==t&&(e=t),x(this).each(function(){!function(e,t){var i,n,a,o,s,r=x('<div class="minicolors" />'),l=x.minicolors.defaults;if(e.data("minicolors-initialized"))return;t=x.extend(!0,{},l,t),r.addClass("minicolors-theme-"+t.theme).toggleClass("minicolors-with-opacity",t.opacity).toggleClass("minicolors-no-data-uris",!0!==t.dataUris),void 0!==t.position&&x.each(t.position.split(" "),function(){r.addClass("minicolors-position-"+this)});i="rgb"===t.format?t.opacity?"25":"20":t.keywords?"11":"7";e.addClass("minicolors-input").data("minicolors-initialized",!1).data("minicolors-settings",t).prop("size",i).wrap(r).after('<div class="minicolors-panel minicolors-slider-'+t.control+'"><div class="minicolors-slider minicolors-sprite"><div class="minicolors-picker"></div></div><div class="minicolors-opacity-slider minicolors-sprite"><div class="minicolors-picker"></div></div><div class="minicolors-grid minicolors-sprite"><div class="minicolors-grid-inner"></div><div class="minicolors-picker"><div></div></div></div></div>'),t.inline||(e.after('<span class="minicolors-swatch minicolors-sprite minicolors-input-swatch"><span class="minicolors-swatch-color"></span></span>'),e.next(".minicolors-input-swatch").on("click",function(t){t.preventDefault(),e.focus()}));if((o=e.parent().find(".minicolors-panel")).on("selectstart",function(){return!1}).end(),t.swatches&&0!==t.swatches.length)for(7<t.swatches.length&&(t.swatches.length=7),o.addClass("minicolors-with-swatches"),n=x('<ul class="minicolors-swatches"></ul>').appendTo(o),s=0;s<t.swatches.length;++s)a=D(a=t.swatches[s])?P(a,!0):L(C(a,!0)),x('<li class="minicolors-swatch minicolors-sprite"><span class="minicolors-swatch-color"></span></li>').appendTo(n).data("swatch-color",t.swatches[s]).find(".minicolors-swatch-color").css({backgroundColor:c(a),opacity:a.a}),t.swatches[s]=a;t.inline&&e.parent().addClass("minicolors-inline");d(e,!1),e.data("minicolors-initialized",!0)}(x(this),e)}),x(this)}}}),x(document).on("mousedown.minicolors touchstart.minicolors",function(t){x(t.target).parents().add(t.target).hasClass("minicolors")||a()}).on("mousedown.minicolors touchstart.minicolors",".minicolors-grid, .minicolors-slider, .minicolors-opacity-slider",function(t){var e=x(this);t.preventDefault(),x(document).data("minicolors-target",e),o(e,t,!0)}).on("mousemove.minicolors touchmove.minicolors",function(t){var e=x(document).data("minicolors-target");e&&o(e,t)}).on("mouseup.minicolors touchend.minicolors",function(){x(this).removeData("minicolors-target")}).on("click.minicolors",".minicolors-swatches li",function(t){t.preventDefault();var e=x(this),i=e.parents(".minicolors").find(".minicolors-input"),n=e.data("swatch-color");_(i,n,T(n)),d(i)}).on("mousedown.minicolors touchstart.minicolors",".minicolors-input-swatch",function(t){var e=x(this).parent().find(".minicolors-input");t.preventDefault(),n(e)}).on("focus.minicolors",".minicolors-input",function(){var t=x(this);t.data("minicolors-initialized")&&n(t)}).on("blur.minicolors",".minicolors-input",function(){var t,e,i,n,a,o=x(this),s=o.data("minicolors-settings");o.data("minicolors-initialized")&&(t=s.keywords?x.map(s.keywords.split(","),function(t){return x.trim(t.toLowerCase())}):[],a=""!==o.val()&&-1<x.inArray(o.val().toLowerCase(),t)?o.val():null===(i=D(o.val())?P(o.val(),!0):(e=C(o.val(),!0))?L(e):null)?s.defaultValue:"rgb"===s.format?s.opacity?P("rgba("+i.r+","+i.g+","+i.b+","+o.attr("data-opacity")+")"):P("rgb("+i.r+","+i.g+","+i.b+")"):c(i),n=s.opacity?o.attr("data-opacity"):1,"transparent"===a.toLowerCase()&&(n=0),o.closest(".minicolors").find(".minicolors-input-swatch > span").css("opacity",n),o.val(a),""===o.val()&&o.val(A(s.defaultValue,!0)),o.val(k(o.val(),s.letterCase)))}).on("keydown.minicolors",".minicolors-input",function(t){var e=x(this);if(e.data("minicolors-initialized"))switch(t.keyCode){case 9:a();break;case 13:case 27:a(),e.blur()}}).on("keyup.minicolors",".minicolors-input",function(){var t=x(this);t.data("minicolors-initialized")&&d(t,!0)}).on("paste.minicolors",".minicolors-input",function(){var t=x(this);t.data("minicolors-initialized")&&setTimeout(function(){d(t,!0)},1)})}),function(t,e){"use strict";"undefined"!=typeof module&&module.exports?"undefined"!=typeof process&&"electron"in process.versions?t.BootstrapDialog=e(t.jQuery):module.exports=e(require("jquery"),require("bootstrap")):"function"==typeof define&&define.amd?define("bootstrap-dialog",["jquery","bootstrap"],function(t){return e(t)}):t.BootstrapDialog=e(t.jQuery)}(this,function(r){"use strict";var i=r.fn.modal.Constructor,e=function(t,e){i.call(this,t,e)};e.getModalVersion=function(){return void 0===r.fn.modal.Constructor.VERSION?"v3.1":/3\.2\.\d+/.test(r.fn.modal.Constructor.VERSION)?"v3.2":/3\.3\.[1,2]/.test(r.fn.modal.Constructor.VERSION)?"v3.3":"v3.3.4"},e.ORIGINAL_BODY_PADDING=parseInt(r("body").css("padding-right")||0,10),(e.METHODS_TO_OVERRIDE={})["v3.1"]={},e.METHODS_TO_OVERRIDE["v3.2"]={hide:function(t){(t&&t.preventDefault(),t=r.Event("hide.bs.modal"),this.$element.trigger(t),this.isShown&&!t.isDefaultPrevented())&&(this.isShown=!1,0===this.getGlobalOpenedDialogs().length&&this.$body.removeClass("modal-open"),this.resetScrollbar(),this.escape(),r(document).off("focusin.bs.modal"),this.$element.removeClass("in").attr("aria-hidden",!0).off("click.dismiss.bs.modal"),r.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",r.proxy(this.hideModal,this)).emulateTransitionEnd(300):this.hideModal())}},e.METHODS_TO_OVERRIDE["v3.3"]={setScrollbar:function(){var t=e.ORIGINAL_BODY_PADDING;this.bodyIsOverflowing&&this.$body.css("padding-right",t+this.scrollbarWidth)},resetScrollbar:function(){0===this.getGlobalOpenedDialogs().length&&this.$body.css("padding-right",e.ORIGINAL_BODY_PADDING)},hideModal:function(){this.$element.hide(),this.backdrop(r.proxy(function(){0===this.getGlobalOpenedDialogs().length&&this.$body.removeClass("modal-open"),this.resetAdjustments(),this.resetScrollbar(),this.$element.trigger("hidden.bs.modal")},this))}},e.METHODS_TO_OVERRIDE["v3.3.4"]=r.extend({},e.METHODS_TO_OVERRIDE["v3.3"]),e.prototype={constructor:e,getGlobalOpenedDialogs:function(){var i=[];return r.each(o.dialogs,function(t,e){e.isRealized()&&e.isOpened()&&i.push(e)}),i}},e.prototype=r.extend(e.prototype,i.prototype,e.METHODS_TO_OVERRIDE[e.getModalVersion()]);var o=function(t){this.defaultOptions=r.extend(!0,{id:o.newGuid(),buttons:[],data:{},onshow:null,onshown:null,onhide:null,onhidden:null},o.defaultOptions),this.indexedButtons={},this.registeredButtonHotkeys={},this.draggableData={isMouseDown:!1,mouseOffset:{}},this.realized=!1,this.opened=!1,this.initOptions(t),this.holdThisInstance()};return o.BootstrapDialogModal=e,o.NAMESPACE="bootstrap-dialog",o.TYPE_DEFAULT="type-default",o.TYPE_INFO="type-info",o.TYPE_PRIMARY="type-primary",o.TYPE_SUCCESS="type-success",o.TYPE_WARNING="type-warning",o.TYPE_DANGER="type-danger",o.DEFAULT_TEXTS={},o.DEFAULT_TEXTS[o.TYPE_DEFAULT]="Information",o.DEFAULT_TEXTS[o.TYPE_INFO]="Information",o.DEFAULT_TEXTS[o.TYPE_PRIMARY]="Information",o.DEFAULT_TEXTS[o.TYPE_SUCCESS]="Success",o.DEFAULT_TEXTS[o.TYPE_WARNING]="Warning",o.DEFAULT_TEXTS[o.TYPE_DANGER]="Danger",o.DEFAULT_TEXTS.OK="OK",o.DEFAULT_TEXTS.CANCEL="Cancel",o.DEFAULT_TEXTS.CONFIRM="Confirmation",o.SIZE_NORMAL="size-normal",o.SIZE_SMALL="size-small",o.SIZE_WIDE="size-wide",o.SIZE_LARGE="size-large",o.BUTTON_SIZES={},o.BUTTON_SIZES[o.SIZE_NORMAL]="",o.BUTTON_SIZES[o.SIZE_SMALL]="",o.BUTTON_SIZES[o.SIZE_WIDE]="",o.BUTTON_SIZES[o.SIZE_LARGE]="btn-lg",o.ICON_SPINNER="glyphicon glyphicon-asterisk",o.defaultOptions={type:o.TYPE_PRIMARY,size:o.SIZE_NORMAL,cssClass:"",title:null,message:null,nl2br:!0,closable:!0,closeByBackdrop:!0,closeByKeyboard:!0,closeIcon:"&#215;",spinicon:o.ICON_SPINNER,autodestroy:!0,draggable:!1,animate:!0,description:"",tabindex:-1},o.configDefaultOptions=function(t){o.defaultOptions=r.extend(!0,o.defaultOptions,t)},o.dialogs={},o.openAll=function(){r.each(o.dialogs,function(t,e){e.open()})},o.closeAll=function(){r.each(o.dialogs,function(t,e){e.close()})},o.getDialog=function(t){var e=null;return void 0!==o.dialogs[t]&&(e=o.dialogs[t]),e},o.setDialog=function(t){return o.dialogs[t.getId()]=t},o.addDialog=function(t){return o.setDialog(t)},o.moveFocus=function(){var i=null;r.each(o.dialogs,function(t,e){e.isRealized()&&e.isOpened()&&(i=e)}),null!==i&&i.getModal().focus()},o.METHODS_TO_OVERRIDE={},o.METHODS_TO_OVERRIDE["v3.1"]={handleModalBackdropEvent:function(){return this.getModal().on("click",{dialog:this},function(t){t.target===this&&t.data.dialog.isClosable()&&t.data.dialog.canCloseByBackdrop()&&t.data.dialog.close()}),this},updateZIndex:function(){if(this.isOpened()){var i=0;r.each(o.dialogs,function(t,e){e.isRealized()&&e.isOpened()&&i++});var t=this.getModal(),e=t.data("bs.modal").$backdrop;t.css("z-index",1050+20*(i-1)),e.css("z-index",1040+20*(i-1))}return this},open:function(){return!this.isRealized()&&this.realize(),this.getModal().modal("show"),this.updateZIndex(),this}},o.METHODS_TO_OVERRIDE["v3.2"]={handleModalBackdropEvent:o.METHODS_TO_OVERRIDE["v3.1"].handleModalBackdropEvent,updateZIndex:o.METHODS_TO_OVERRIDE["v3.1"].updateZIndex,open:o.METHODS_TO_OVERRIDE["v3.1"].open},o.METHODS_TO_OVERRIDE["v3.3"]={},o.METHODS_TO_OVERRIDE["v3.3.4"]=r.extend({},o.METHODS_TO_OVERRIDE["v3.1"]),o.prototype={constructor:o,initOptions:function(t){return this.options=r.extend(!0,this.defaultOptions,t),this},holdThisInstance:function(){return o.addDialog(this),this},initModalStuff:function(){return this.setModal(this.createModal()).setModalDialog(this.createModalDialog()).setModalContent(this.createModalContent()).setModalHeader(this.createModalHeader()).setModalBody(this.createModalBody()).setModalFooter(this.createModalFooter()),this.getModal().append(this.getModalDialog()),this.getModalDialog().append(this.getModalContent()),this.getModalContent().append(this.getModalHeader()).append(this.getModalBody()).append(this.getModalFooter()),this},createModal:function(){var t=r('<div class="modal" role="dialog" aria-hidden="true"></div>');return t.prop("id",this.getId()),t.attr("aria-labelledby",this.getId()+"_title"),t},getModal:function(){return this.$modal},setModal:function(t){return this.$modal=t,this},createModalDialog:function(){return r('<div class="modal-dialog"></div>')},getModalDialog:function(){return this.$modalDialog},setModalDialog:function(t){return this.$modalDialog=t,this},createModalContent:function(){return r('<div class="modal-content"></div>')},getModalContent:function(){return this.$modalContent},setModalContent:function(t){return this.$modalContent=t,this},createModalHeader:function(){return r('<div class="modal-header"></div>')},getModalHeader:function(){return this.$modalHeader},setModalHeader:function(t){return this.$modalHeader=t,this},createModalBody:function(){return r('<div class="modal-body"></div>')},getModalBody:function(){return this.$modalBody},setModalBody:function(t){return this.$modalBody=t,this},createModalFooter:function(){return r('<div class="modal-footer"></div>')},getModalFooter:function(){return this.$modalFooter},setModalFooter:function(t){return this.$modalFooter=t,this},createDynamicContent:function(t){var e=null;return"string"==typeof(e="function"==typeof t?t.call(t,this):t)&&(e=this.formatStringContent(e)),e},formatStringContent:function(t){return this.options.nl2br?t.replace(/\r\n/g,"<br />").replace(/[\r\n]/g,"<br />"):t},setData:function(t,e){return this.options.data[t]=e,this},getData:function(t){return this.options.data[t]},setId:function(t){return this.options.id=t,this},getId:function(){return this.options.id},getType:function(){return this.options.type},setType:function(t){return this.options.type=t,this.updateType(),this},updateType:function(){if(this.isRealized()){var t=[o.TYPE_DEFAULT,o.TYPE_INFO,o.TYPE_PRIMARY,o.TYPE_SUCCESS,o.TYPE_WARNING,o.TYPE_DANGER];this.getModal().removeClass(t.join(" ")).addClass(this.getType())}return this},getSize:function(){return this.options.size},setSize:function(t){return this.options.size=t,this.updateSize(),this},updateSize:function(){if(this.isRealized()){var s=this;this.getModal().removeClass(o.SIZE_NORMAL).removeClass(o.SIZE_SMALL).removeClass(o.SIZE_WIDE).removeClass(o.SIZE_LARGE),this.getModal().addClass(this.getSize()),this.getModalDialog().removeClass("modal-sm"),this.getSize()===o.SIZE_SMALL&&this.getModalDialog().addClass("modal-sm"),this.getModalDialog().removeClass("modal-lg"),this.getSize()===o.SIZE_WIDE&&this.getModalDialog().addClass("modal-lg"),r.each(this.options.buttons,function(t,e){var i=s.getButton(e.id),n=["btn-lg","btn-sm","btn-xs"],a=!1;if("string"==typeof e.cssClass){var o=e.cssClass.split(" ");r.each(o,function(t,e){-1!==r.inArray(e,n)&&(a=!0)})}a||(i.removeClass(n.join(" ")),i.addClass(s.getButtonSize()))})}return this},getCssClass:function(){return this.options.cssClass},setCssClass:function(t){return this.options.cssClass=t,this},getTitle:function(){return this.options.title},setTitle:function(t){return this.options.title=t,this.updateTitle(),this},updateTitle:function(){if(this.isRealized()){var t=null!==this.getTitle()?this.createDynamicContent(this.getTitle()):this.getDefaultText();this.getModalHeader().find("."+this.getNamespace("title")).html("").append(t).prop("id",this.getId()+"_title")}return this},getMessage:function(){return this.options.message},setMessage:function(t){return this.options.message=t,this.updateMessage(),this},updateMessage:function(){if(this.isRealized()){var t=this.createDynamicContent(this.getMessage());this.getModalBody().find("."+this.getNamespace("message")).html("").append(t)}return this},isClosable:function(){return this.options.closable},setClosable:function(t){return this.options.closable=t,this.updateClosable(),this},setCloseByBackdrop:function(t){return this.options.closeByBackdrop=t,this},canCloseByBackdrop:function(){return this.options.closeByBackdrop},setCloseByKeyboard:function(t){return this.options.closeByKeyboard=t,this},canCloseByKeyboard:function(){return this.options.closeByKeyboard},isAnimate:function(){return this.options.animate},setAnimate:function(t){return this.options.animate=t,this},updateAnimate:function(){return this.isRealized()&&this.getModal().toggleClass("fade",this.isAnimate()),this},getSpinicon:function(){return this.options.spinicon},setSpinicon:function(t){return this.options.spinicon=t,this},addButton:function(t){return this.options.buttons.push(t),this},addButtons:function(t){var i=this;return r.each(t,function(t,e){i.addButton(e)}),this},getButtons:function(){return this.options.buttons},setButtons:function(t){return this.options.buttons=t,this.updateButtons(),this},getButton:function(t){return void 0!==this.indexedButtons[t]?this.indexedButtons[t]:null},getButtonSize:function(){return void 0!==o.BUTTON_SIZES[this.getSize()]?o.BUTTON_SIZES[this.getSize()]:""},updateButtons:function(){return this.isRealized()&&(0===this.getButtons().length?this.getModalFooter().hide():this.getModalFooter().show().find("."+this.getNamespace("footer")).html("").append(this.createFooterButtons())),this},isAutodestroy:function(){return this.options.autodestroy},setAutodestroy:function(t){this.options.autodestroy=t},getDescription:function(){return this.options.description},setDescription:function(t){return this.options.description=t,this},setTabindex:function(t){return this.options.tabindex=t,this},getTabindex:function(){return this.options.tabindex},updateTabindex:function(){return this.isRealized()&&this.getModal().attr("tabindex",this.getTabindex()),this},getDefaultText:function(){return o.DEFAULT_TEXTS[this.getType()]},getNamespace:function(t){return o.NAMESPACE+"-"+t},createHeaderContent:function(){var t=r("<div></div>");return t.addClass(this.getNamespace("header")),t.append(this.createTitleContent()),t.prepend(this.createCloseButton()),t},createTitleContent:function(){var t=r("<div></div>");return t.addClass(this.getNamespace("title")),t},createCloseButton:function(){var t=r("<div></div>");t.addClass(this.getNamespace("close-button"));var e=r('<button class="close"></button>');return e.append(this.options.closeIcon),t.append(e),t.on("click",{dialog:this},function(t){t.data.dialog.close()}),t},createBodyContent:function(){var t=r("<div></div>");return t.addClass(this.getNamespace("body")),t.append(this.createMessageContent()),t},createMessageContent:function(){var t=r("<div></div>");return t.addClass(this.getNamespace("message")),t},createFooterContent:function(){var t=r("<div></div>");return t.addClass(this.getNamespace("footer")),t},createFooterButtons:function(){var n=this,a=r("<div></div>");return a.addClass(this.getNamespace("footer-buttons")),this.indexedButtons={},r.each(this.options.buttons,function(t,e){e.id||(e.id=o.newGuid());var i=n.createButton(e);n.indexedButtons[e.id]=i,a.append(i)}),a},createButton:function(t){var e=r('<button class="btn"></button>');return e.prop("id",t.id),e.data("button",t),void 0!==t.icon&&""!==r.trim(t.icon)&&e.append(this.createButtonIcon(t.icon)),void 0!==t.label&&e.append(t.label),void 0!==t.cssClass&&""!==r.trim(t.cssClass)?e.addClass(t.cssClass):e.addClass("btn-default"),void 0!==t.hotkey&&(this.registeredButtonHotkeys[t.hotkey]=e),e.on("click",{dialog:this,$button:e,button:t},function(t){var e=t.data.dialog,i=t.data.$button,n=i.data("button");if(n.autospin&&i.toggleSpin(!0),"function"==typeof n.action)return n.action.call(i,e,t)}),this.enhanceButton(e),void 0!==t.enabled&&e.toggleEnable(t.enabled),e},enhanceButton:function(n){return n.dialog=this,n.toggleEnable=function(t){return void 0!==t?this.prop("disabled",!t).toggleClass("disabled",!t):this.prop("disabled",!this.prop("disabled")),this},n.enable=function(){return this.toggleEnable(!0),this},n.disable=function(){return this.toggleEnable(!1),this},n.toggleSpin=function(t){var e=this.dialog,i=this.find("."+e.getNamespace("button-icon"));return void 0===t&&(t=!(0<n.find(".icon-spin").length)),t?(i.hide(),n.prepend(e.createButtonIcon(e.getSpinicon()).addClass("icon-spin"))):(i.show(),n.find(".icon-spin").remove()),this},n.spin=function(){return this.toggleSpin(!0),this},n.stopSpin=function(){return this.toggleSpin(!1),this},this},createButtonIcon:function(t){var e=r("<span></span>");return e.addClass(this.getNamespace("button-icon")).addClass(t),e},enableButtons:function(i){return r.each(this.indexedButtons,function(t,e){e.toggleEnable(i)}),this},updateClosable:function(){return this.isRealized()&&this.getModalHeader().find("."+this.getNamespace("close-button")).toggle(this.isClosable()),this},onShow:function(t){return this.options.onshow=t,this},onShown:function(t){return this.options.onshown=t,this},onHide:function(t){return this.options.onhide=t,this},onHidden:function(t){return this.options.onhidden=t,this},isRealized:function(){return this.realized},setRealized:function(t){return this.realized=t,this},isOpened:function(){return this.opened},setOpened:function(t){return this.opened=t,this},handleModalEvents:function(){return this.getModal().on("show.bs.modal",{dialog:this},function(t){var e=t.data.dialog;if(e.setOpened(!0),e.isModalEvent(t)&&"function"==typeof e.options.onshow){var i=e.options.onshow(e);return!1===i&&e.setOpened(!1),i}}),this.getModal().on("shown.bs.modal",{dialog:this},function(t){var e=t.data.dialog;e.isModalEvent(t)&&"function"==typeof e.options.onshown&&e.options.onshown(e)}),this.getModal().on("hide.bs.modal",{dialog:this},function(t){var e=t.data.dialog;if(e.setOpened(!1),e.isModalEvent(t)&&"function"==typeof e.options.onhide){var i=e.options.onhide(e);return!1===i&&e.setOpened(!0),i}}),this.getModal().on("hidden.bs.modal",{dialog:this},function(t){var e=t.data.dialog;e.isModalEvent(t)&&"function"==typeof e.options.onhidden&&e.options.onhidden(e),e.isAutodestroy()&&(e.setRealized(!1),delete o.dialogs[e.getId()],r(this).remove()),o.moveFocus()}),this.handleModalBackdropEvent(),this.getModal().on("keyup",{dialog:this},function(t){27===t.which&&t.data.dialog.isClosable()&&t.data.dialog.canCloseByKeyboard()&&t.data.dialog.close()}),this.getModal().on("keyup",{dialog:this},function(t){var e=t.data.dialog;if(void 0!==e.registeredButtonHotkeys[t.which]){var i=r(e.registeredButtonHotkeys[t.which]);!i.prop("disabled")&&i.focus().trigger("click")}}),this},handleModalBackdropEvent:function(){return this.getModal().on("click",{dialog:this},function(t){r(t.target).hasClass("modal-backdrop")&&t.data.dialog.isClosable()&&t.data.dialog.canCloseByBackdrop()&&t.data.dialog.close()}),this},isModalEvent:function(t){return void 0!==t.namespace&&"bs.modal"===t.namespace},makeModalDraggable:function(){return this.options.draggable&&(this.getModalHeader().addClass(this.getNamespace("draggable")).on("mousedown",{dialog:this},function(t){var e=t.data.dialog;e.draggableData.isMouseDown=!0;var i=e.getModalDialog().offset();e.draggableData.mouseOffset={top:t.clientY-i.top,left:t.clientX-i.left}}),this.getModal().on("mouseup mouseleave",{dialog:this},function(t){t.data.dialog.draggableData.isMouseDown=!1}),r("body").on("mousemove",{dialog:this},function(t){var e=t.data.dialog;e.draggableData.isMouseDown&&e.getModalDialog().offset({top:t.clientY-e.draggableData.mouseOffset.top,left:t.clientX-e.draggableData.mouseOffset.left})})),this},realize:function(){return this.initModalStuff(),this.getModal().addClass(o.NAMESPACE).addClass(this.getCssClass()),this.updateSize(),this.getDescription()&&this.getModal().attr("aria-describedby",this.getDescription()),this.getModalFooter().append(this.createFooterContent()),this.getModalHeader().append(this.createHeaderContent()),this.getModalBody().append(this.createBodyContent()),this.getModal().data("bs.modal",new e(this.getModal(),{backdrop:"static",keyboard:!1,show:!1})),this.makeModalDraggable(),this.handleModalEvents(),this.setRealized(!0),this.updateButtons(),this.updateType(),this.updateTitle(),this.updateMessage(),this.updateClosable(),this.updateAnimate(),this.updateSize(),this.updateTabindex(),this},open:function(){return!this.isRealized()&&this.realize(),this.getModal().modal("show"),this},close:function(){return!this.isRealized()&&this.realize(),this.getModal().modal("hide"),this}},o.prototype=r.extend(o.prototype,o.METHODS_TO_OVERRIDE[e.getModalVersion()]),o.newGuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)})},o.show=function(t){return new o(t).open()},o.alert=function(){var t={},e={type:o.TYPE_PRIMARY,title:null,message:null,closable:!1,draggable:!1,buttonLabel:o.DEFAULT_TEXTS.OK,callback:null};t="object"==typeof arguments[0]&&arguments[0].constructor==={}.constructor?r.extend(!0,e,arguments[0]):r.extend(!0,e,{message:arguments[0],callback:void 0!==arguments[1]?arguments[1]:null});var i=new o(t);return i.setData("callback",t.callback),i.addButton({label:t.buttonLabel,action:function(t){return("function"!=typeof t.getData("callback")||!1!==t.getData("callback").call(this,!0))&&(t.setData("btnClicked",!0),t.close())}}),"function"==typeof i.options.onhide?i.onHide(function(t){var e=!0;return!t.getData("btnClicked")&&t.isClosable()&&"function"==typeof t.getData("callback")&&(e=t.getData("callback")(!1)),!1!==e&&(e=this.onhide(t))}.bind({onhide:i.options.onhide})):i.onHide(function(t){var e=!0;return!t.getData("btnClicked")&&t.isClosable()&&"function"==typeof t.getData("callback")&&(e=t.getData("callback")(!1)),e}),i.open()},o.confirm=function(){var t={},e={type:o.TYPE_PRIMARY,title:null,message:null,closable:!1,draggable:!1,btnCancelLabel:o.DEFAULT_TEXTS.CANCEL,btnCancelClass:null,btnOKLabel:o.DEFAULT_TEXTS.OK,btnOKClass:null,callback:null};null===(t="object"==typeof arguments[0]&&arguments[0].constructor==={}.constructor?r.extend(!0,e,arguments[0]):r.extend(!0,e,{message:arguments[0],callback:void 0!==arguments[1]?arguments[1]:null})).btnOKClass&&(t.btnOKClass=["btn",t.type.split("-")[1]].join("-"));var i=new o(t);return i.setData("callback",t.callback),i.addButton({label:t.btnCancelLabel,cssClass:t.btnCancelClass,action:function(t){return("function"!=typeof t.getData("callback")||!1!==t.getData("callback").call(this,!1))&&t.close()}}),i.addButton({label:t.btnOKLabel,cssClass:t.btnOKClass,action:function(t){return("function"!=typeof t.getData("callback")||!1!==t.getData("callback").call(this,!0))&&t.close()}}),i.open()},o.warning=function(t,e){return new o({type:o.TYPE_WARNING,message:t}).open()},o.danger=function(t,e){return new o({type:o.TYPE_DANGER,message:t}).open()},o.success=function(t,e){return new o({type:o.TYPE_SUCCESS,message:t}).open()},o}),function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof exports?t(require("jquery")):t(jQuery)}(function(i){var t=function(){if(i&&i.fn&&i.fn.select2&&i.fn.select2.amd)var t=i.fn.select2.amd;var e,a,d;return t&&t.requirejs||(t?a=t:t={},function(h){var o,s,p,f,m={},g={},v={},b={},i=Object.prototype.hasOwnProperty,n=[].slice,y=/\.js#x2F;;function w(t,e){return i.call(t,e)}function r(t,e){var i,n,a,o,s,r,l,d,c,u,h,p=e&&e.split("/"),f=v.map,m=f&&f["*"]||{};if(t&&"."===t.charAt(0))if(e){for(s=(t=t.split("/")).length-1,v.nodeIdCompat&&y.test(t[s])&&(t[s]=t[s].replace(y,"")),t=p.slice(0,p.length-1).concat(t),c=0;c<t.length;c+=1)if("."===(h=t[c]))t.splice(c,1),c-=1;else if(".."===h){if(1===c&&(".."===t[2]||".."===t[0]))break;0<c&&(t.splice(c-1,2),c-=2)}t=t.join("/")}else 0===t.indexOf("./")&&(t=t.substring(2));if((p||m)&&f){for(c=(i=t.split("/")).length;0<c;c-=1){if(n=i.slice(0,c).join("/"),p)for(u=p.length;0<u;u-=1)if((a=f[p.slice(0,u).join("/")])&&(a=a[n])){o=a,r=c;break}if(o)break;!l&&m&&m[n]&&(l=m[n],d=c)}!o&&l&&(o=l,r=d),o&&(i.splice(0,r,o),t=i.join("/"))}return t}function x(e,i){return function(){var t=n.call(arguments,0);return"string"!=typeof t[0]&&1===t.length&&t.push(null),s.apply(h,t.concat([e,i]))}}function k(e){return function(t){m[e]=t}}function C(t){if(w(g,t)){var e=g[t];delete g[t],b[t]=!0,o.apply(h,e)}if(!w(m,t)&&!w(b,t))throw new Error("No "+t);return m[t]}function l(t){var e,i=t?t.indexOf("!"):-1;return-1<i&&(e=t.substring(0,i),t=t.substring(i+1,t.length)),[e,t]}p=function(t,e){var i,n,a=l(t),o=a[0];return t=a[1],o&&(i=C(o=r(o,e))),o?t=i&&i.normalize?i.normalize(t,(n=e,function(t){return r(t,n)})):r(t,e):(o=(a=l(t=r(t,e)))[0],t=a[1],o&&(i=C(o))),{f:o?o+"!"+t:t,n:t,pr:o,p:i}},f={require:function(t){return x(t)},exports:function(t){var e=m[t];return void 0!==e?e:m[t]={}},module:function(t){return{id:t,uri:"",exports:m[t],config:(e=t,function(){return v&&v.config&&v.config[e]||{}})};var e}},o=function(t,e,i,n){var a,o,s,r,l,d,c=[],u=typeof i;if(n=n||t,"undefined"===u||"function"===u){for(e=!e.length&&i.length?["require","exports","module"]:e,l=0;l<e.length;l+=1)if("require"===(o=(r=p(e[l],n)).f))c[l]=f.require(t);else if("exports"===o)c[l]=f.exports(t),d=!0;else if("module"===o)a=c[l]=f.module(t);else if(w(m,o)||w(g,o)||w(b,o))c[l]=C(o);else{if(!r.p)throw new Error(t+" missing "+o);r.p.load(r.n,x(n,!0),k(o),{}),c[l]=m[o]}s=i?i.apply(m[t],c):void 0,t&&(a&&a.exports!==h&&a.exports!==m[t]?m[t]=a.exports:s===h&&d||(m[t]=s))}else t&&(m[t]=i)},e=a=s=function(t,e,i,n,a){if("string"==typeof t)return f[t]?f[t](e):C(p(t,e).f);if(!t.splice){if((v=t).deps&&s(v.deps,v.callback),!e)return;e.splice?(t=e,e=i,i=null):t=h}return e=e||function(){},"function"==typeof i&&(i=n,n=a),n?o(h,t,e,i):setTimeout(function(){o(h,t,e,i)},4),s},s.config=function(t){return s(t)},e._defined=m,(d=function(t,e,i){if("string"!=typeof t)throw new Error("See almond README: incorrect module build, no module name");e.splice||(i=e,e=[]),w(m,t)||w(g,t)||(g[t]=[t,e,i])}).amd={jQuery:!0}}(),t.requirejs=e,t.require=a,t.define=d),t.define("almond",function(){}),t.define("jquery",[],function(){var t=i||$;return null==t&&console&&console.error&&console.error("Select2: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before Select2 on your web page."),t}),t.define("select2/utils",["jquery"],function(o){var t={};function c(t){var e=t.prototype,i=[];for(var n in e){"function"==typeof e[n]&&("constructor"!==n&&i.push(n))}return i}t.Extend=function(t,e){var i={}.hasOwnProperty;function n(){this.constructor=t}for(var a in e)i.call(e,a)&&(t[a]=e[a]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},t.Decorate=function(n,a){var t=c(a),e=c(n);function o(){var t=Array.prototype.unshift,e=a.prototype.constructor.length,i=n.prototype.constructor;0<e&&(t.call(arguments,n.prototype.constructor),i=a.prototype.constructor),i.apply(this,arguments)}a.displayName=n.displayName,o.prototype=new function(){this.constructor=o};for(var i=0;i<e.length;i++){var s=e[i];o.prototype[s]=n.prototype[s]}for(var r=function(t){var e=function(){};t in o.prototype&&(e=o.prototype[t]);var i=a.prototype[t];return function(){return Array.prototype.unshift.call(arguments,e),i.apply(this,arguments)}},l=0;l<t.length;l++){var d=t[l];o.prototype[d]=r(d)}return o};var e=function(){this.listeners={}};return e.prototype.on=function(t,e){this.listeners=this.listeners||{},t in this.listeners?this.listeners[t].push(e):this.listeners[t]=[e]},e.prototype.trigger=function(t){var e=Array.prototype.slice,i=e.call(arguments,1);this.listeners=this.listeners||{},null==i&&(i=[]),0===i.length&&i.push({}),(i[0]._type=t)in this.listeners&&this.invoke(this.listeners[t],e.call(arguments,1)),"*"in this.listeners&&this.invoke(this.listeners["*"],arguments)},e.prototype.invoke=function(t,e){for(var i=0,n=t.length;i<n;i++)t[i].apply(this,e)},t.Observable=e,t.generateChars=function(t){for(var e="",i=0;i<t;i++){e+=Math.floor(36*Math.random()).toString(36)}return e},t.bind=function(t,e){return function(){t.apply(e,arguments)}},t._convertData=function(t){for(var e in t){var i=e.split("-"),n=t;if(1!==i.length){for(var a=0;a<i.length;a++){var o=i[a];(o=o.substring(0,1).toLowerCase()+o.substring(1))in n||(n[o]={}),a==i.length-1&&(n[o]=t[e]),n=n[o]}delete t[e]}}return t},t.hasScroll=function(t,e){var i=o(e),n=e.style.overflowX,a=e.style.overflowY;return(n!==a||"hidden"!==a&&"visible"!==a)&&("scroll"===n||"scroll"===a||(i.innerHeight()<e.scrollHeight||i.innerWidth()<e.scrollWidth))},t.escapeMarkup=function(t){var e={"\\":"&#92;","&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#47;"};return"string"!=typeof t?t:String(t).replace(/[&<>"'\/\\]/g,function(t){return e[t]})},t.appendMany=function(t,e){if("1.7"===o.fn.jquery.substr(0,3)){var i=o();o.map(e,function(t){i=i.add(t)}),e=i}t.append(e)},t}),t.define("select2/results",["jquery","./utils"],function(h,t){function n(t,e,i){this.$element=t,this.data=i,this.options=e,n.__super__.constructor.call(this)}return t.Extend(n,t.Observable),n.prototype.render=function(){var t=h('<ul class="select2-results__options" role="tree"></ul>');return this.options.get("multiple")&&t.attr("aria-multiselectable","true"),this.$results=t},n.prototype.clear=function(){this.$results.empty()},n.prototype.displayMessage=function(t){var e=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var i=h('<li role="treeitem" aria-live="assertive" class="select2-results__option"></li>'),n=this.options.get("translations").get(t.message);i.append(e(n(t.args))),i[0].className+=" select2-results__message",this.$results.append(i)},n.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},n.prototype.append=function(t){this.hideLoading();var e=[];if(null!=t.results&&0!==t.results.length){t.results=this.sort(t.results);for(var i=0;i<t.results.length;i++){var n=t.results[i],a=this.option(n);e.push(a)}this.$results.append(e)}else 0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"})},n.prototype.position=function(t,e){e.find(".select2-results").append(t)},n.prototype.sort=function(t){return this.options.get("sorter")(t)},n.prototype.highlightFirstItem=function(){var t=this.$results.find(".select2-results__option[aria-selected]"),e=t.filter("[aria-selected=true]");0<e.length?e.first().trigger("mouseenter"):t.first().trigger("mouseenter"),this.ensureHighlightVisible()},n.prototype.setClasses=function(){var e=this;this.data.current(function(t){var n=h.map(t,function(t){return t.id.toString()});e.$results.find(".select2-results__option[aria-selected]").each(function(){var t=h(this),e=h.data(this,"data"),i=""+e.id;null!=e.element&&e.element.selected||null==e.element&&-1<h.inArray(i,n)?t.attr("aria-selected","true"):t.attr("aria-selected","false")})})},n.prototype.showLoading=function(t){this.hideLoading();var e={disabled:!0,loading:!0,text:this.options.get("translations").get("searching")(t)},i=this.option(e);i.className+=" loading-results",this.$results.prepend(i)},n.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},n.prototype.option=function(t){var e=document.createElement("li");e.className="select2-results__option";var i={role:"treeitem","aria-selected":"false"};for(var n in t.disabled&&(delete i["aria-selected"],i["aria-disabled"]="true"),null==t.id&&delete i["aria-selected"],null!=t._resultId&&(e.id=t._resultId),t.title&&(e.title=t.title),t.children&&(i.role="group",i["aria-label"]=t.text,delete i["aria-selected"]),i){var a=i[n];e.setAttribute(n,a)}if(t.children){var o=h(e),s=document.createElement("strong");s.className="select2-results__group";h(s);this.template(t,s);for(var r=[],l=0;l<t.children.length;l++){var d=t.children[l],c=this.option(d);r.push(c)}var u=h("<ul></ul>",{class:"select2-results__options select2-results__options--nested"});u.append(r),o.append(s),o.append(u)}else this.template(t,e);return h.data(e,"data",t),e},n.prototype.bind=function(e,t){var l=this,i=e.id+"-results";this.$results.attr("id",i),e.on("results:all",function(t){l.clear(),l.append(t.data),e.isOpen()&&(l.setClasses(),l.highlightFirstItem())}),e.on("results:append",function(t){l.append(t.data),e.isOpen()&&l.setClasses()}),e.on("query",function(t){l.hideMessages(),l.showLoading(t)}),e.on("select",function(){e.isOpen()&&(l.setClasses(),l.highlightFirstItem())}),e.on("unselect",function(){e.isOpen()&&(l.setClasses(),l.highlightFirstItem())}),e.on("open",function(){l.$results.attr("aria-expanded","true"),l.$results.attr("aria-hidden","false"),l.setClasses(),l.ensureHighlightVisible()}),e.on("close",function(){l.$results.attr("aria-expanded","false"),l.$results.attr("aria-hidden","true"),l.$results.removeAttr("aria-activedescendant")}),e.on("results:toggle",function(){var t=l.getHighlightedResults();0!==t.length&&t.trigger("mouseup")}),e.on("results:select",function(){var t=l.getHighlightedResults();if(0!==t.length){var e=t.data("data");"true"==t.attr("aria-selected")?l.trigger("close",{}):l.trigger("select",{data:e})}}),e.on("results:previous",function(){var t=l.getHighlightedResults(),e=l.$results.find("[aria-selected]"),i=e.index(t);if(0!==i){var n=i-1;0===t.length&&(n=0);var a=e.eq(n);a.trigger("mouseenter");var o=l.$results.offset().top,s=a.offset().top,r=l.$results.scrollTop()+(s-o);0===n?l.$results.scrollTop(0):s-o<0&&l.$results.scrollTop(r)}}),e.on("results:next",function(){var t=l.getHighlightedResults(),e=l.$results.find("[aria-selected]"),i=e.index(t)+1;if(!(i>=e.length)){var n=e.eq(i);n.trigger("mouseenter");var a=l.$results.offset().top+l.$results.outerHeight(!1),o=n.offset().top+n.outerHeight(!1),s=l.$results.scrollTop()+o-a;0===i?l.$results.scrollTop(0):a<o&&l.$results.scrollTop(s)}}),e.on("results:focus",function(t){t.element.addClass("select2-results__option--highlighted")}),e.on("results:message",function(t){l.displayMessage(t)}),h.fn.mousewheel&&this.$results.on("mousewheel",function(t){var e=l.$results.scrollTop(),i=l.$results.get(0).scrollHeight-e+t.deltaY,n=0<t.deltaY&&e-t.deltaY<=0,a=t.deltaY<0&&i<=l.$results.height();n?(l.$results.scrollTop(0),t.preventDefault(),t.stopPropagation()):a&&(l.$results.scrollTop(l.$results.get(0).scrollHeight-l.$results.height()),t.preventDefault(),t.stopPropagation())}),this.$results.on("mouseup",".select2-results__option[aria-selected]",function(t){var e=h(this),i=e.data("data");"true"!==e.attr("aria-selected")?l.trigger("select",{originalEvent:t,data:i}):l.options.get("multiple")?l.trigger("unselect",{originalEvent:t,data:i}):l.trigger("close",{})}),this.$results.on("mouseenter",".select2-results__option[aria-selected]",function(t){var e=h(this).data("data");l.getHighlightedResults().removeClass("select2-results__option--highlighted"),l.trigger("results:focus",{data:e,element:h(this)})})},n.prototype.getHighlightedResults=function(){return this.$results.find(".select2-results__option--highlighted")},n.prototype.destroy=function(){this.$results.remove()},n.prototype.ensureHighlightVisible=function(){var t=this.getHighlightedResults();if(0!==t.length){var e=this.$results.find("[aria-selected]").index(t),i=this.$results.offset().top,n=t.offset().top,a=this.$results.scrollTop()+(n-i),o=n-i;a-=2*t.outerHeight(!1),e<=2?this.$results.scrollTop(0):(o>this.$results.outerHeight()||o<0)&&this.$results.scrollTop(a)}},n.prototype.template=function(t,e){var i=this.options.get("templateResult"),n=this.options.get("escapeMarkup"),a=i(t,e);null==a?e.style.display="none":"string"==typeof a?e.innerHTML=n(a):h(e).append(a)},n}),t.define("select2/keys",[],function(){return{BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46}}),t.define("select2/selection/base",["jquery","../utils","../keys"],function(i,t,a){function n(t,e){this.$element=t,this.options=e,n.__super__.constructor.call(this)}return t.Extend(n,t.Observable),n.prototype.render=function(){var t=i('<span class="select2-selection" role="combobox" aria-haspopup="true" aria-expanded="false"></span>');return this._tabindex=0,null!=this.$element.data("old-tabindex")?this._tabindex=this.$element.data("old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),t.attr("title",this.$element.attr("title")),t.attr("tabindex",this._tabindex),this.$selection=t},n.prototype.bind=function(t,e){var i=this,n=(t.id,t.id+"-results");this.container=t,this.$selection.on("focus",function(t){i.trigger("focus",t)}),this.$selection.on("blur",function(t){i._handleBlur(t)}),this.$selection.on("keydown",function(t){i.trigger("keypress",t),t.which===a.SPACE&&t.preventDefault()}),t.on("results:focus",function(t){i.$selection.attr("aria-activedescendant",t.data._resultId)}),t.on("selection:update",function(t){i.update(t.data)}),t.on("open",function(){i.$selection.attr("aria-expanded","true"),i.$selection.attr("aria-owns",n),i._attachCloseHandler(t)}),t.on("close",function(){i.$selection.attr("aria-expanded","false"),i.$selection.removeAttr("aria-activedescendant"),i.$selection.removeAttr("aria-owns"),i.$selection.focus(),i._detachCloseHandler(t)}),t.on("enable",function(){i.$selection.attr("tabindex",i._tabindex)}),t.on("disable",function(){i.$selection.attr("tabindex","-1")})},n.prototype._handleBlur=function(t){var e=this;window.setTimeout(function(){document.activeElement==e.$selection[0]||i.contains(e.$selection[0],document.activeElement)||e.trigger("blur",t)},1)},n.prototype._attachCloseHandler=function(t){i(document.body).on("mousedown.select2."+t.id,function(t){var e=i(t.target).closest(".select2");i(".select2.select2-container--open").each(function(){var t=i(this);this!=e[0]&&t.data("element").select2("close")})})},n.prototype._detachCloseHandler=function(t){i(document.body).off("mousedown.select2."+t.id)},n.prototype.position=function(t,e){e.find(".selection").append(t)},n.prototype.destroy=function(){this._detachCloseHandler(this.container)},n.prototype.update=function(t){throw new Error("The `update` method must be defined in child classes.")},n}),t.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(t,e,i,n){function a(){a.__super__.constructor.apply(this,arguments)}return i.Extend(a,e),a.prototype.render=function(){var t=a.__super__.render.call(this);return t.addClass("select2-selection--single"),t.html('<span class="select2-selection__rendered"></span><span class="select2-selection__arrow" role="presentation"><b role="presentation"></b></span>'),t},a.prototype.bind=function(e,t){var i=this;a.__super__.bind.apply(this,arguments);var n=e.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",n),this.$selection.attr("aria-labelledby",n),this.$selection.on("mousedown",function(t){1===t.which&&i.trigger("toggle",{originalEvent:t})}),this.$selection.on("focus",function(t){}),this.$selection.on("blur",function(t){}),e.on("focus",function(t){e.isOpen()||i.$selection.focus()}),e.on("selection:update",function(t){i.update(t.data)})},a.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},a.prototype.display=function(t,e){var i=this.options.get("templateSelection");return this.options.get("escapeMarkup")(i(t,e))},a.prototype.selectionContainer=function(){return t("<span></span>")},a.prototype.update=function(t){if(0!==t.length){var e=t[0],i=this.$selection.find(".select2-selection__rendered"),n=this.display(e,i);i.empty().append(n),i.prop("title",e.title||e.text)}else this.clear()},a}),t.define("select2/selection/multiple",["jquery","./base","../utils"],function(n,t,r){function a(t,e){a.__super__.constructor.apply(this,arguments)}return r.Extend(a,t),a.prototype.render=function(){var t=a.__super__.render.call(this);return t.addClass("select2-selection--multiple"),t.html('<ul class="select2-selection__rendered"></ul>'),t},a.prototype.bind=function(t,e){var i=this;a.__super__.bind.apply(this,arguments),this.$selection.on("click",function(t){i.trigger("toggle",{originalEvent:t})}),this.$selection.on("click",".select2-selection__choice__remove",function(t){if(!i.options.get("disabled")){var e=n(this).parent().data("data");i.trigger("unselect",{originalEvent:t,data:e})}})},a.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},a.prototype.display=function(t,e){var i=this.options.get("templateSelection");return this.options.get("escapeMarkup")(i(t,e))},a.prototype.selectionContainer=function(){return n('<li class="select2-selection__choice"><span class="select2-selection__choice__remove" role="presentation">&times;</span></li>')},a.prototype.update=function(t){if(this.clear(),0!==t.length){for(var e=[],i=0;i<t.length;i++){var n=t[i],a=this.selectionContainer(),o=this.display(n,a);a.append(o),a.prop("title",n.title||n.text),a.data("data",n),e.push(a)}var s=this.$selection.find(".select2-selection__rendered");r.appendMany(s,e)}},a}),t.define("select2/selection/placeholder",["../utils"],function(t){function e(t,e,i){this.placeholder=this.normalizePlaceholder(i.get("placeholder")),t.call(this,e,i)}return e.prototype.normalizePlaceholder=function(t,e){return"string"==typeof e&&(e={id:"",text:e}),e},e.prototype.createPlaceholder=function(t,e){var i=this.selectionContainer();return i.html(this.display(e)),i.addClass("select2-selection__placeholder").removeClass("select2-selection__choice"),i},e.prototype.update=function(t,e){var i=1==e.length&&e[0].id!=this.placeholder.id;if(1<e.length||i)return t.call(this,e);this.clear();var n=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(n)},e}),t.define("select2/selection/allowClear",["jquery","../keys"],function(n,a){function t(){}return t.prototype.bind=function(t,e,i){var n=this;t.call(this,e,i),null==this.placeholder&&this.options.get("debug")&&window.console&&console.error&&console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option."),this.$selection.on("mousedown",".select2-selection__clear",function(t){n._handleClear(t)}),e.on("keypress",function(t){n._handleKeyboardClear(t,e)})},t.prototype._handleClear=function(t,e){if(!this.options.get("disabled")){var i=this.$selection.find(".select2-selection__clear");if(0!==i.length){e.stopPropagation();for(var n=i.data("data"),a=0;a<n.length;a++){var o={data:n[a]};if(this.trigger("unselect",o),o.prevented)return}this.$element.val(this.placeholder.id).trigger("change"),this.trigger("toggle",{})}}},t.prototype._handleKeyboardClear=function(t,e,i){i.isOpen()||e.which!=a.DELETE&&e.which!=a.BACKSPACE||this._handleClear(e)},t.prototype.update=function(t,e){if(t.call(this,e),!(0<this.$selection.find(".select2-selection__placeholder").length||0===e.length)){var i=n('<span class="select2-selection__clear">&times;</span>');i.data("data",e),this.$selection.find(".select2-selection__rendered").prepend(i)}},t}),t.define("select2/selection/search",["jquery","../utils","../keys"],function(n,t,s){function e(t,e,i){t.call(this,e,i)}return e.prototype.render=function(t){var e=n('<li class="select2-search select2-search--inline"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="textbox" aria-autocomplete="list" /></li>');this.$searchContainer=e,this.$search=e.find("input");var i=t.call(this);return this._transferTabIndex(),i},e.prototype.bind=function(t,e,i){var n=this;t.call(this,e,i),e.on("open",function(){n.$search.trigger("focus")}),e.on("close",function(){n.$search.val(""),n.$search.removeAttr("aria-activedescendant"),n.$search.trigger("focus")}),e.on("enable",function(){n.$search.prop("disabled",!1),n._transferTabIndex()}),e.on("disable",function(){n.$search.prop("disabled",!0)}),e.on("focus",function(t){n.$search.trigger("focus")}),e.on("results:focus",function(t){n.$search.attr("aria-activedescendant",t.id)}),this.$selection.on("focusin",".select2-search--inline",function(t){n.trigger("focus",t)}),this.$selection.on("focusout",".select2-search--inline",function(t){n._handleBlur(t)}),this.$selection.on("keydown",".select2-search--inline",function(t){if(t.stopPropagation(),n.trigger("keypress",t),n._keyUpPrevented=t.isDefaultPrevented(),t.which===s.BACKSPACE&&""===n.$search.val()){var e=n.$searchContainer.prev(".select2-selection__choice");if(0<e.length){var i=e.data("data");n.searchRemoveChoice(i),t.preventDefault()}}});var a=document.documentMode,o=a&&a<=11;this.$selection.on("input.searchcheck",".select2-search--inline",function(t){o?n.$selection.off("input.search input.searchcheck"):n.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".select2-search--inline",function(t){if(o&&"input"===t.type)n.$selection.off("input.search input.searchcheck");else{var e=t.which;e!=s.SHIFT&&e!=s.CTRL&&e!=s.ALT&&e!=s.TAB&&n.handleSearch(t)}})},e.prototype._transferTabIndex=function(t){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},e.prototype.createPlaceholder=function(t,e){this.$search.attr("placeholder",e.text)},e.prototype.update=function(t,e){var i=this.$search[0]==document.activeElement;this.$search.attr("placeholder",""),t.call(this,e),this.$selection.find(".select2-selection__rendered").append(this.$searchContainer),this.resizeSearch(),i&&this.$search.focus()},e.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var t=this.$search.val();this.trigger("query",{term:t})}this._keyUpPrevented=!1},e.prototype.searchRemoveChoice=function(t,e){this.trigger("unselect",{data:e}),this.$search.val(e.text),this.handleSearch()},e.prototype.resizeSearch=function(){this.$search.css("width","25px");var t="";""!==this.$search.attr("placeholder")?t=this.$selection.find(".select2-selection__rendered").innerWidth():t=.75*(this.$search.val().length+1)+"em";this.$search.css("width",t)},e}),t.define("select2/selection/eventRelay",["jquery"],function(s){function t(){}return t.prototype.bind=function(t,e,i){var n=this,a=["open","opening","close","closing","select","selecting","unselect","unselecting"],o=["opening","closing","selecting","unselecting"];t.call(this,e,i),e.on("*",function(t,e){if(-1!==s.inArray(t,a)){e=e||{};var i=s.Event("select2:"+t,{params:e});n.$element.trigger(i),-1!==s.inArray(t,o)&&(e.prevented=i.isDefaultPrevented())}})},t}),t.define("select2/translation",["jquery","require"],function(e,i){function n(t){this.dict=t||{}}return n.prototype.all=function(){return this.dict},n.prototype.get=function(t){return this.dict[t]},n.prototype.extend=function(t){this.dict=e.extend({},t.all(),this.dict)},n._cache={},n.loadPath=function(t){if(!(t in n._cache)){var e=i(t);n._cache[t]=e}return new n(n._cache[t])},n}),t.define("select2/diacritics",[],function(){return{"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","C":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ω":"ω","ς":"σ"}}),t.define("select2/data/base",["../utils"],function(n){function i(t,e){i.__super__.constructor.call(this)}return n.Extend(i,n.Observable),i.prototype.current=function(t){throw new Error("The `current` method must be defined in child classes.")},i.prototype.query=function(t,e){throw new Error("The `query` method must be defined in child classes.")},i.prototype.bind=function(t,e){},i.prototype.destroy=function(){},i.prototype.generateResultId=function(t,e){var i=t.id+"-result-";return i+=n.generateChars(4),null!=e.id?i+="-"+e.id.toString():i+="-"+n.generateChars(4),i},i}),t.define("select2/data/select",["./base","../utils","jquery"],function(t,e,r){function i(t,e){this.$element=t,this.options=e,i.__super__.constructor.call(this)}return e.Extend(i,t),i.prototype.current=function(t){var i=[],n=this;this.$element.find(":selected").each(function(){var t=r(this),e=n.item(t);i.push(e)}),t(i)},i.prototype.select=function(a){var o=this;if(a.selected=!0,r(a.element).is("option"))return a.element.selected=!0,void this.$element.trigger("change");if(this.$element.prop("multiple"))this.current(function(t){var e=[];(a=[a]).push.apply(a,t);for(var i=0;i<a.length;i++){var n=a[i].id;-1===r.inArray(n,e)&&e.push(n)}o.$element.val(e),o.$element.trigger("change")});else{var t=a.id;this.$element.val(t),this.$element.trigger("change")}},i.prototype.unselect=function(a){var o=this;if(this.$element.prop("multiple")){if(a.selected=!1,r(a.element).is("option"))return a.element.selected=!1,void this.$element.trigger("change");this.current(function(t){for(var e=[],i=0;i<t.length;i++){var n=t[i].id;n!==a.id&&-1===r.inArray(n,e)&&e.push(n)}o.$element.val(e),o.$element.trigger("change")})}},i.prototype.bind=function(t,e){var i=this;(this.container=t).on("select",function(t){i.select(t.data)}),t.on("unselect",function(t){i.unselect(t.data)})},i.prototype.destroy=function(){this.$element.find("*").each(function(){r.removeData(this,"data")})},i.prototype.query=function(n,t){var a=[],o=this;this.$element.children().each(function(){var t=r(this);if(t.is("option")||t.is("optgroup")){var e=o.item(t),i=o.matches(n,e);null!==i&&a.push(i)}}),t({results:a})},i.prototype.addOptions=function(t){e.appendMany(this.$element,t)},i.prototype.option=function(t){var e;t.children?(e=document.createElement("optgroup")).label=t.text:void 0!==(e=document.createElement("option")).textContent?e.textContent=t.text:e.innerText=t.text,t.id&&(e.value=t.id),t.disabled&&(e.disabled=!0),t.selected&&(e.selected=!0),t.title&&(e.title=t.title);var i=r(e),n=this._normalizeItem(t);return n.element=e,r.data(e,"data",n),i},i.prototype.item=function(t){var e={};if(null!=(e=r.data(t[0],"data")))return e;if(t.is("option"))e={id:t.val(),text:t.text(),disabled:t.prop("disabled"),selected:t.prop("selected"),title:t.prop("title")};else if(t.is("optgroup")){e={text:t.prop("label"),children:[],title:t.prop("title")};for(var i=t.children("option"),n=[],a=0;a<i.length;a++){var o=r(i[a]),s=this.item(o);n.push(s)}e.children=n}return(e=this._normalizeItem(e)).element=t[0],r.data(t[0],"data",e),e},i.prototype._normalizeItem=function(t){r.isPlainObject(t)||(t={id:t,text:t});return null!=(t=r.extend({},{text:""},t)).id&&(t.id=t.id.toString()),null!=t.text&&(t.text=t.text.toString()),null==t._resultId&&t.id&&null!=this.container&&(t._resultId=this.generateResultId(this.container,t)),r.extend({},{selected:!1,disabled:!1},t)},i.prototype.matches=function(t,e){return this.options.get("matcher")(t,e)},i}),t.define("select2/data/array",["./select","../utils","jquery"],function(t,f,m){function n(t,e){var i=e.get("data")||[];n.__super__.constructor.call(this,t,e),this.addOptions(this.convertToOptions(i))}return f.Extend(n,t),n.prototype.select=function(i){var t=this.$element.find("option").filter(function(t,e){return e.value==i.id.toString()});0===t.length&&(t=this.option(i),this.addOptions(t)),n.__super__.select.call(this,i)},n.prototype.convertToOptions=function(t){var e=this,i=this.$element.find("option"),n=i.map(function(){return e.item(m(this)).id}).get(),a=[];function o(t){return function(){return m(this).val()==t.id}}for(var s=0;s<t.length;s++){var r=this._normalizeItem(t[s]);if(0<=m.inArray(r.id,n)){var l=i.filter(o(r)),d=this.item(l),c=m.extend(!0,{},r,d),u=this.option(c);l.replaceWith(u)}else{var h=this.option(r);if(r.children){var p=this.convertToOptions(r.children);f.appendMany(h,p)}a.push(h)}}return a},n}),t.define("select2/data/ajax",["./array","../utils","jquery"],function(t,e,o){function i(t,e){this.ajaxOptions=this._applyDefaults(e.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),i.__super__.constructor.call(this,t,e)}return e.Extend(i,t),i.prototype._applyDefaults=function(t){var e={data:function(t){return o.extend({},t,{q:t.term})},transport:function(t,e,i){var n=o.ajax(t);return n.then(e),n.fail(i),n}};return o.extend({},e,t,!0)},i.prototype.processResults=function(t){return t},i.prototype.query=function(i,n){var a=this;null!=this._request&&(o.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var e=o.extend({type:"GET"},this.ajaxOptions);function t(){var t=e.transport(e,function(t){var e=a.processResults(t,i);a.options.get("debug")&&window.console&&console.error&&(e&&e.results&&o.isArray(e.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),n(e)},function(){t.status&&"0"===t.status||a.trigger("results:message",{message:"errorLoading"})});a._request=t}"function"==typeof e.url&&(e.url=e.url.call(this.$element,i)),"function"==typeof e.data&&(e.data=e.data.call(this.$element,i)),this.ajaxOptions.delay&&null!=i.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(t,this.ajaxOptions.delay)):t()},i}),t.define("select2/data/tags",["jquery"],function(c){function t(t,e,i){var n=i.get("tags"),a=i.get("createTag");void 0!==a&&(this.createTag=a);var o=i.get("insertTag");if(void 0!==o&&(this.insertTag=o),t.call(this,e,i),c.isArray(n))for(var s=0;s<n.length;s++){var r=n[s],l=this._normalizeItem(r),d=this.option(l);this.$element.append(d)}}return t.prototype.query=function(t,d,c){var u=this;this._removeOldTags(),null!=d.term&&null==d.page?t.call(this,d,function t(e,i){for(var n=e.results,a=0;a<n.length;a++){var o=n[a],s=null!=o.children&&!t({results:o.children},!0);if(o.text===d.term||s)return!i&&(e.data=n,void c(e))}if(i)return!0;var r=u.createTag(d);if(null!=r){var l=u.option(r);l.attr("data-select2-tag",!0),u.addOptions([l]),u.insertTag(n,r)}e.results=n,c(e)}):t.call(this,d,c)},t.prototype.createTag=function(t,e){var i=c.trim(e.term);return""===i?null:{id:i,text:i}},t.prototype.insertTag=function(t,e,i){e.unshift(i)},t.prototype._removeOldTags=function(t){this._lastTag;this.$element.find("option[data-select2-tag]").each(function(){this.selected||c(this).remove()})},t}),t.define("select2/data/tokenizer",["jquery"],function(u){function t(t,e,i){var n=i.get("tokenizer");void 0!==n&&(this.tokenizer=n),t.call(this,e,i)}return t.prototype.bind=function(t,e,i){t.call(this,e,i),this.$search=e.dropdown.$search||e.selection.$search||i.find(".select2-search__field")},t.prototype.query=function(t,e,i){var a=this;e.term=e.term||"";var n=this.tokenizer(e,this.options,function(t){var e,i=a._normalizeItem(t);if(!a.$element.find("option").filter(function(){return u(this).val()===i.id}).length){var n=a.option(i);n.attr("data-select2-tag",!0),a._removeOldTags(),a.addOptions([n])}e=i,a.trigger("select",{data:e})});n.term!==e.term&&(this.$search.length&&(this.$search.val(n.term),this.$search.focus()),e.term=n.term),t.call(this,e,i)},t.prototype.tokenizer=function(t,e,i,n){for(var a=i.get("tokenSeparators")||[],o=e.term,s=0,r=this.createTag||function(t){return{id:t.term,text:t.term}};s<o.length;){var l=o[s];if(-1!==u.inArray(l,a)){var d=o.substr(0,s),c=r(u.extend({},e,{term:d}));null!=c?(n(c),o=o.substr(s+1)||"",s=0):s++}else s++}return{term:o}},t}),t.define("select2/data/minimumInputLength",[],function(){function t(t,e,i){this.minimumInputLength=i.get("minimumInputLength"),t.call(this,e,i)}return t.prototype.query=function(t,e,i){e.term=e.term||"",e.term.length<this.minimumInputLength?this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:e.term,params:e}}):t.call(this,e,i)},t}),t.define("select2/data/maximumInputLength",[],function(){function t(t,e,i){this.maximumInputLength=i.get("maximumInputLength"),t.call(this,e,i)}return t.prototype.query=function(t,e,i){e.term=e.term||"",0<this.maximumInputLength&&e.term.length>this.maximumInputLength?this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:e.term,params:e}}):t.call(this,e,i)},t}),t.define("select2/data/maximumSelectionLength",[],function(){function t(t,e,i){this.maximumSelectionLength=i.get("maximumSelectionLength"),t.call(this,e,i)}return t.prototype.query=function(i,n,a){var o=this;this.current(function(t){var e=null!=t?t.length:0;0<o.maximumSelectionLength&&e>=o.maximumSelectionLength?o.trigger("results:message",{message:"maximumSelected",args:{maximum:o.maximumSelectionLength}}):i.call(o,n,a)})},t}),t.define("select2/dropdown",["jquery","./utils"],function(e,t){function i(t,e){this.$element=t,this.options=e,i.__super__.constructor.call(this)}return t.Extend(i,t.Observable),i.prototype.render=function(){var t=e('<span class="select2-dropdown"><span class="select2-results"></span></span>');return t.attr("dir",this.options.get("dir")),this.$dropdown=t},i.prototype.bind=function(){},i.prototype.position=function(t,e){},i.prototype.destroy=function(){this.$dropdown.remove()},i}),t.define("select2/dropdown/search",["jquery","../utils"],function(a,t){function e(){}return e.prototype.render=function(t){var e=t.call(this),i=a('<span class="select2-search select2-search--dropdown"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="textbox" /></span>');return this.$searchContainer=i,this.$search=i.find("input"),e.prepend(i),e},e.prototype.bind=function(t,e,i){var n=this;t.call(this,e,i),this.$search.on("keydown",function(t){n.trigger("keypress",t),n._keyUpPrevented=t.isDefaultPrevented()}),this.$search.on("input",function(t){a(this).off("keyup")}),this.$search.on("keyup input",function(t){n.handleSearch(t)}),e.on("open",function(){n.$search.attr("tabindex",0),n.$search.focus(),window.setTimeout(function(){n.$search.focus()},0)}),e.on("close",function(){n.$search.attr("tabindex",-1),n.$search.val("")}),e.on("focus",function(){e.isOpen()&&n.$search.focus()}),e.on("results:all",function(t){null!=t.query.term&&""!==t.query.term||(n.showSearch(t)?n.$searchContainer.removeClass("select2-search--hide"):n.$searchContainer.addClass("select2-search--hide"))})},e.prototype.handleSearch=function(t){if(!this._keyUpPrevented){var e=this.$search.val();this.trigger("query",{term:e})}this._keyUpPrevented=!1},e.prototype.showSearch=function(t,e){return!0},e}),t.define("select2/dropdown/hidePlaceholder",[],function(){function t(t,e,i,n){this.placeholder=this.normalizePlaceholder(i.get("placeholder")),t.call(this,e,i,n)}return t.prototype.append=function(t,e){e.results=this.removePlaceholder(e.results),t.call(this,e)},t.prototype.normalizePlaceholder=function(t,e){return"string"==typeof e&&(e={id:"",text:e}),e},t.prototype.removePlaceholder=function(t,e){for(var i=e.slice(0),n=e.length-1;0<=n;n--){var a=e[n];this.placeholder.id===a.id&&i.splice(n,1)}return i},t}),t.define("select2/dropdown/infiniteScroll",["jquery"],function(a){function t(t,e,i,n){this.lastParams={},t.call(this,e,i,n),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return t.prototype.append=function(t,e){this.$loadingMore.remove(),this.loading=!1,t.call(this,e),this.showLoadingMore(e)&&this.$results.append(this.$loadingMore)},t.prototype.bind=function(t,e,i){var n=this;t.call(this,e,i),e.on("query",function(t){n.lastParams=t,n.loading=!0}),e.on("query:append",function(t){n.lastParams=t,n.loading=!0}),this.$results.on("scroll",function(){var t=a.contains(document.documentElement,n.$loadingMore[0]);if(!n.loading&&t){var e=n.$results.offset().top+n.$results.outerHeight(!1);n.$loadingMore.offset().top+n.$loadingMore.outerHeight(!1)<=e+50&&n.loadMore()}})},t.prototype.loadMore=function(){this.loading=!0;var t=a.extend({},{page:1},this.lastParams);t.page++,this.trigger("query:append",t)},t.prototype.showLoadingMore=function(t,e){return e.pagination&&e.pagination.more},t.prototype.createLoadingMore=function(){var t=a('<li class="select2-results__option select2-results__option--load-more"role="treeitem" aria-disabled="true"></li>'),e=this.options.get("translations").get("loadingMore");return t.html(e(this.lastParams)),t},t}),t.define("select2/dropdown/attachBody",["jquery","../utils"],function(f,r){function t(t,e,i){this.$dropdownParent=i.get("dropdownParent")||f(document.body),t.call(this,e,i)}return t.prototype.bind=function(t,e,i){var n=this,a=!1;t.call(this,e,i),e.on("open",function(){n._showDropdown(),n._attachPositioningHandler(e),a||(a=!0,e.on("results:all",function(){n._positionDropdown(),n._resizeDropdown()}),e.on("results:append",function(){n._positionDropdown(),n._resizeDropdown()}))}),e.on("close",function(){n._hideDropdown(),n._detachPositioningHandler(e)}),this.$dropdownContainer.on("mousedown",function(t){t.stopPropagation()})},t.prototype.destroy=function(t){t.call(this),this.$dropdownContainer.remove()},t.prototype.position=function(t,e,i){e.attr("class",i.attr("class")),e.removeClass("select2"),e.addClass("select2-container--open"),e.css({position:"absolute",top:-999999}),this.$container=i},t.prototype.render=function(t){var e=f("<span></span>"),i=t.call(this);return e.append(i),this.$dropdownContainer=e},t.prototype._hideDropdown=function(t){this.$dropdownContainer.detach()},t.prototype._attachPositioningHandler=function(t,e){var i=this,n="scroll.select2."+e.id,a="resize.select2."+e.id,o="orientationchange.select2."+e.id,s=this.$container.parents().filter(r.hasScroll);s.each(function(){f(this).data("select2-scroll-position",{x:f(this).scrollLeft(),y:f(this).scrollTop()})}),s.on(n,function(t){var e=f(this).data("select2-scroll-position");f(this).scrollTop(e.y)}),f(window).on(n+" "+a+" "+o,function(t){i._positionDropdown(),i._resizeDropdown()})},t.prototype._detachPositioningHandler=function(t,e){var i="scroll.select2."+e.id,n="resize.select2."+e.id,a="orientationchange.select2."+e.id;this.$container.parents().filter(r.hasScroll).off(i),f(window).off(i+" "+n+" "+a)},t.prototype._positionDropdown=function(){var t=f(window),e=this.$dropdown.hasClass("select2-dropdown--above"),i=this.$dropdown.hasClass("select2-dropdown--below"),n=null,a=this.$container.offset();a.bottom=a.top+this.$container.outerHeight(!1);var o={height:this.$container.outerHeight(!1)};o.top=a.top,o.bottom=a.top+o.height;var s=this.$dropdown.outerHeight(!1),r=t.scrollTop(),l=t.scrollTop()+t.height(),d=r<a.top-s,c=l>a.bottom+s,u={left:a.left,top:o.bottom},h=this.$dropdownParent;"static"===h.css("position")&&(h=h.offsetParent());var p=h.offset();u.top-=p.top,u.left-=p.left,e||i||(n="below"),c||!d||e?!d&&c&&e&&(n="below"):n="above",("above"==n||e&&"below"!==n)&&(u.top=o.top-p.top-s),null!=n&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+n),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+n)),this.$dropdownContainer.css(u)},t.prototype._resizeDropdown=function(){var t={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(t.minWidth=t.width,t.position="relative",t.width="auto"),this.$dropdown.css(t)},t.prototype._showDropdown=function(t){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},t}),t.define("select2/dropdown/minimumResultsForSearch",[],function(){function t(t,e,i,n){this.minimumResultsForSearch=i.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),t.call(this,e,i,n)}return t.prototype.showSearch=function(t,e){return!(function t(e){for(var i=0,n=0;n<e.length;n++){var a=e[n];a.children?i+=t(a.children):i++}return i}(e.data.results)<this.minimumResultsForSearch)&&t.call(this,e)},t}),t.define("select2/dropdown/selectOnClose",[],function(){function t(){}return t.prototype.bind=function(t,e,i){var n=this;t.call(this,e,i),e.on("close",function(t){n._handleSelectOnClose(t)})},t.prototype._handleSelectOnClose=function(t,e){if(e&&null!=e.originalSelect2Event){var i=e.originalSelect2Event;if("select"===i._type||"unselect"===i._type)return}var n=this.getHighlightedResults();if(!(n.length<1)){var a=n.data("data");null!=a.element&&a.element.selected||null==a.element&&a.selected||this.trigger("select",{data:a})}},t}),t.define("select2/dropdown/closeOnSelect",[],function(){function t(){}return t.prototype.bind=function(t,e,i){var n=this;t.call(this,e,i),e.on("select",function(t){n._selectTriggered(t)}),e.on("unselect",function(t){n._selectTriggered(t)})},t.prototype._selectTriggered=function(t,e){var i=e.originalEvent;i&&i.ctrlKey||this.trigger("close",{originalEvent:i,originalSelect2Event:e})},t}),t.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(t){var e=t.input.length-t.maximum,i="Please delete "+e+" character";return 1!=e&&(i+="s"),i},inputTooShort:function(t){return"Please enter "+(t.minimum-t.input.length)+" or more characters"},loadingMore:function(){return"Loading more results…"},maximumSelected:function(t){var e="You can only select "+t.maximum+" item";return 1!=t.maximum&&(e+="s"),e},noResults:function(){return"No results found"},searching:function(){return"Searching…"}}}),t.define("select2/defaults",["jquery","require","./results","./selection/single","./selection/multiple","./selection/placeholder","./selection/allowClear","./selection/search","./selection/eventRelay","./utils","./translation","./diacritics","./data/select","./data/array","./data/ajax","./data/tags","./data/tokenizer","./data/minimumInputLength","./data/maximumInputLength","./data/maximumSelectionLength","./dropdown","./dropdown/search","./dropdown/hidePlaceholder","./dropdown/infiniteScroll","./dropdown/attachBody","./dropdown/minimumResultsForSearch","./dropdown/selectOnClose","./dropdown/closeOnSelect","./i18n/en"],function(f,m,g,v,b,y,w,x,k,C,_,e,S,P,A,M,D,T,I,E,L,O,F,B,R,$,N,j,t){function i(){this.reset()}return i.prototype.apply=function(e){if(null==(e=f.extend(!0,{},this.defaults,e)).dataAdapter){if(null!=e.ajax?e.dataAdapter=A:null!=e.data?e.dataAdapter=P:e.dataAdapter=S,0<e.minimumInputLength&&(e.dataAdapter=C.Decorate(e.dataAdapter,T)),0<e.maximumInputLength&&(e.dataAdapter=C.Decorate(e.dataAdapter,I)),0<e.maximumSelectionLength&&(e.dataAdapter=C.Decorate(e.dataAdapter,E)),e.tags&&(e.dataAdapter=C.Decorate(e.dataAdapter,M)),null==e.tokenSeparators&&null==e.tokenizer||(e.dataAdapter=C.Decorate(e.dataAdapter,D)),null!=e.query){var t=m(e.amdBase+"compat/query");e.dataAdapter=C.Decorate(e.dataAdapter,t)}if(null!=e.initSelection){var i=m(e.amdBase+"compat/initSelection");e.dataAdapter=C.Decorate(e.dataAdapter,i)}}if(null==e.resultsAdapter&&(e.resultsAdapter=g,null!=e.ajax&&(e.resultsAdapter=C.Decorate(e.resultsAdapter,B)),null!=e.placeholder&&(e.resultsAdapter=C.Decorate(e.resultsAdapter,F)),e.selectOnClose&&(e.resultsAdapter=C.Decorate(e.resultsAdapter,N))),null==e.dropdownAdapter){if(e.multiple)e.dropdownAdapter=L;else{var n=C.Decorate(L,O);e.dropdownAdapter=n}if(0!==e.minimumResultsForSearch&&(e.dropdownAdapter=C.Decorate(e.dropdownAdapter,$)),e.closeOnSelect&&(e.dropdownAdapter=C.Decorate(e.dropdownAdapter,j)),null!=e.dropdownCssClass||null!=e.dropdownCss||null!=e.adaptDropdownCssClass){var a=m(e.amdBase+"compat/dropdownCss");e.dropdownAdapter=C.Decorate(e.dropdownAdapter,a)}e.dropdownAdapter=C.Decorate(e.dropdownAdapter,R)}if(null==e.selectionAdapter){if(e.multiple?e.selectionAdapter=b:e.selectionAdapter=v,null!=e.placeholder&&(e.selectionAdapter=C.Decorate(e.selectionAdapter,y)),e.allowClear&&(e.selectionAdapter=C.Decorate(e.selectionAdapter,w)),e.multiple&&(e.selectionAdapter=C.Decorate(e.selectionAdapter,x)),null!=e.containerCssClass||null!=e.containerCss||null!=e.adaptContainerCssClass){var o=m(e.amdBase+"compat/containerCss");e.selectionAdapter=C.Decorate(e.selectionAdapter,o)}e.selectionAdapter=C.Decorate(e.selectionAdapter,k)}if("string"==typeof e.language)if(0<e.language.indexOf("-")){var s=e.language.split("-")[0];e.language=[e.language,s]}else e.language=[e.language];if(f.isArray(e.language)){var r=new _;e.language.push("en");for(var l=e.language,d=0;d<l.length;d++){var c=l[d],u={};try{u=_.loadPath(c)}catch(t){try{c=this.defaults.amdLanguageBase+c,u=_.loadPath(c)}catch(t){e.debug&&window.console&&console.warn&&console.warn('Select2: The language file for "'+c+'" could not be automatically loaded. A fallback will be used instead.');continue}}r.extend(u)}e.translations=r}else{var h=_.loadPath(this.defaults.amdLanguageBase+"en"),p=new _(e.language);p.extend(h),e.translations=p}return e},i.prototype.reset=function(){function r(t){return t.replace(/[^\u0000-\u007E]/g,function(t){return e[t]||t})}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:C.escapeMarkup,language:t,matcher:function t(e,i){if(""===f.trim(e.term))return i;if(i.children&&0<i.children.length){for(var n=f.extend(!0,{},i),a=i.children.length-1;0<=a;a--)null==t(e,i.children[a])&&n.children.splice(a,1);return 0<n.children.length?n:t(e,n)}var o=r(i.text).toUpperCase(),s=r(e.term).toUpperCase();return-1<o.indexOf(s)?i:null},minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,sorter:function(t){return t},templateResult:function(t){return t.text},templateSelection:function(t){return t.text},theme:"default",width:"resolve"}},i.prototype.set=function(t,e){var i={};i[f.camelCase(t)]=e;var n=C._convertData(i);f.extend(this.defaults,n)},new i}),t.define("select2/options",["require","jquery","./defaults","./utils"],function(n,o,a,s){function t(t,e){if(this.options=t,null!=e&&this.fromElement(e),this.options=a.apply(this.options),e&&e.is("input")){var i=n(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=s.Decorate(this.options.dataAdapter,i)}}return t.prototype.fromElement=function(t){var e=["select2"];null==this.options.multiple&&(this.options.multiple=t.prop("multiple")),null==this.options.disabled&&(this.options.disabled=t.prop("disabled")),null==this.options.language&&(t.prop("lang")?this.options.language=t.prop("lang").toLowerCase():t.closest("[lang]").prop("lang")&&(this.options.language=t.closest("[lang]").prop("lang"))),null==this.options.dir&&(t.prop("dir")?this.options.dir=t.prop("dir"):t.closest("[dir]").prop("dir")?this.options.dir=t.closest("[dir]").prop("dir"):this.options.dir="ltr"),t.prop("disabled",this.options.disabled),t.prop("multiple",this.options.multiple),t.data("select2Tags")&&(this.options.debug&&window.console&&console.warn&&console.warn('Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.'),t.data("data",t.data("select2Tags")),t.data("tags",!0)),t.data("ajaxUrl")&&(this.options.debug&&window.console&&console.warn&&console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2."),t.attr("ajax--url",t.data("ajaxUrl")),t.data("ajax--url",t.data("ajaxUrl")));var i={};i=o.fn.jquery&&"1."==o.fn.jquery.substr(0,2)&&t[0].dataset?o.extend(!0,{},t[0].dataset,t.data()):t.data();var n=o.extend(!0,{},i);for(var a in n=s._convertData(n))-1<o.inArray(a,e)||(o.isPlainObject(this.options[a])?o.extend(this.options[a],n[a]):this.options[a]=n[a]);return this},t.prototype.get=function(t){return this.options[t]},t.prototype.set=function(t,e){this.options[t]=e},t}),t.define("select2/core",["jquery","./options","./utils","./keys"],function(a,d,i,n){var c=function(t,e){null!=t.data("select2")&&t.data("select2").destroy(),this.$element=t,this.id=this._generateId(t),e=e||{},this.options=new d(e,t),c.__super__.constructor.call(this);var i=t.attr("tabindex")||0;t.data("old-tabindex",i),t.attr("tabindex","-1");var n=this.options.get("dataAdapter");this.dataAdapter=new n(t,this.options);var a=this.render();this._placeContainer(a);var o=this.options.get("selectionAdapter");this.selection=new o(t,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,a);var s=this.options.get("dropdownAdapter");this.dropdown=new s(t,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,a);var r=this.options.get("resultsAdapter");this.results=new r(t,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var l=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(t){l.trigger("selection:update",{data:t})}),t.addClass("select2-hidden-accessible"),t.attr("aria-hidden","true"),this._syncAttributes(),t.data("select2",this)};return i.Extend(c,i.Observable),c.prototype._generateId=function(t){return"select2-"+(null!=t.attr("id")?t.attr("id"):null!=t.attr("name")?t.attr("name")+"-"+i.generateChars(2):i.generateChars(4)).replace(/(:|\.|\[|\]|,)/g,"")},c.prototype._placeContainer=function(t){t.insertAfter(this.$element);var e=this._resolveWidth(this.$element,this.options.get("width"));null!=e&&t.css("width",e)},c.prototype._resolveWidth=function(t,e){var i=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==e){var n=this._resolveWidth(t,"style");return null!=n?n:this._resolveWidth(t,"element")}if("element"==e){var a=t.outerWidth(!1);return a<=0?"auto":a+"px"}if("style"!=e)return e;var o=t.attr("style");if("string"!=typeof o)return null;for(var s=o.split(";"),r=0,l=s.length;r<l;r+=1){var d=s[r].replace(/\s/g,"").match(i);if(null!==d&&1<=d.length)return d[1]}return null},c.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},c.prototype._registerDomEvents=function(){var e=this;this.$element.on("change.select2",function(){e.dataAdapter.current(function(t){e.trigger("selection:update",{data:t})})}),this.$element.on("focus.select2",function(t){e.trigger("focus",t)}),this._syncA=i.bind(this._syncAttributes,this),this._syncS=i.bind(this._syncSubtree,this),this.$element[0].attachEvent&&this.$element[0].attachEvent("onpropertychange",this._syncA);var t=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=t?(this._observer=new t(function(t){a.each(t,e._syncA),a.each(t,e._syncS)}),this._observer.observe(this.$element[0],{attributes:!0,childList:!0,subtree:!1})):this.$element[0].addEventListener&&(this.$element[0].addEventListener("DOMAttrModified",e._syncA,!1),this.$element[0].addEventListener("DOMNodeInserted",e._syncS,!1),this.$element[0].addEventListener("DOMNodeRemoved",e._syncS,!1))},c.prototype._registerDataEvents=function(){var i=this;this.dataAdapter.on("*",function(t,e){i.trigger(t,e)})},c.prototype._registerSelectionEvents=function(){var i=this,n=["toggle","focus"];this.selection.on("toggle",function(){i.toggleDropdown()}),this.selection.on("focus",function(t){i.focus(t)}),this.selection.on("*",function(t,e){-1===a.inArray(t,n)&&i.trigger(t,e)})},c.prototype._registerDropdownEvents=function(){var i=this;this.dropdown.on("*",function(t,e){i.trigger(t,e)})},c.prototype._registerResultsEvents=function(){var i=this;this.results.on("*",function(t,e){i.trigger(t,e)})},c.prototype._registerEvents=function(){var i=this;this.on("open",function(){i.$container.addClass("select2-container--open")}),this.on("close",function(){i.$container.removeClass("select2-container--open")}),this.on("enable",function(){i.$container.removeClass("select2-container--disabled")}),this.on("disable",function(){i.$container.addClass("select2-container--disabled")}),this.on("blur",function(){i.$container.removeClass("select2-container--focus")}),this.on("query",function(e){i.isOpen()||i.trigger("open",{}),this.dataAdapter.query(e,function(t){i.trigger("results:all",{data:t,query:e})})}),this.on("query:append",function(e){this.dataAdapter.query(e,function(t){i.trigger("results:append",{data:t,query:e})})}),this.on("keypress",function(t){var e=t.which;i.isOpen()?e===n.ESC||e===n.TAB||e===n.UP&&t.altKey?(i.close(),t.preventDefault()):e===n.ENTER?(i.trigger("results:select",{}),t.preventDefault()):e===n.SPACE&&t.ctrlKey?(i.trigger("results:toggle",{}),t.preventDefault()):e===n.UP?(i.trigger("results:previous",{}),t.preventDefault()):e===n.DOWN&&(i.trigger("results:next",{}),t.preventDefault()):(e===n.ENTER||e===n.SPACE||e===n.DOWN&&t.altKey)&&(i.open(),t.preventDefault())})},c.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.options.get("disabled")?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},c.prototype._syncSubtree=function(t,e){var i=!1,n=this;if(!t||!t.target||"OPTION"===t.target.nodeName||"OPTGROUP"===t.target.nodeName){if(e)if(e.addedNodes&&0<e.addedNodes.length)for(var a=0;a<e.addedNodes.length;a++){e.addedNodes[a].selected&&(i=!0)}else e.removedNodes&&0<e.removedNodes.length&&(i=!0);else i=!0;i&&this.dataAdapter.current(function(t){n.trigger("selection:update",{data:t})})}},c.prototype.trigger=function(t,e){var i=c.__super__.trigger,n={open:"opening",close:"closing",select:"selecting",unselect:"unselecting"};if(void 0===e&&(e={}),t in n){var a=n[t],o={prevented:!1,name:t,args:e};if(i.call(this,a,o),o.prevented)return void(e.prevented=!0)}i.call(this,t,e)},c.prototype.toggleDropdown=function(){this.options.get("disabled")||(this.isOpen()?this.close():this.open())},c.prototype.open=function(){this.isOpen()||this.trigger("query",{})},c.prototype.close=function(){this.isOpen()&&this.trigger("close",{})},c.prototype.isOpen=function(){return this.$container.hasClass("select2-container--open")},c.prototype.hasFocus=function(){return this.$container.hasClass("select2-container--focus")},c.prototype.focus=function(t){this.hasFocus()||(this.$container.addClass("select2-container--focus"),this.trigger("focus",{}))},c.prototype.enable=function(t){this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.'),null!=t&&0!==t.length||(t=[!0]);var e=!t[0];this.$element.prop("disabled",e)},c.prototype.data=function(){this.options.get("debug")&&0<arguments.length&&window.console&&console.warn&&console.warn('Select2: Data can no longer be set using `select2("data")`. You should consider setting the value instead using `$element.val()`.');var e=[];return this.dataAdapter.current(function(t){e=t}),e},c.prototype.val=function(t){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'),null==t||0===t.length)return this.$element.val();var e=t[0];a.isArray(e)&&(e=a.map(e,function(t){return t.toString()})),this.$element.val(e).trigger("change")},c.prototype.destroy=function(){this.$container.remove(),this.$element[0].detachEvent&&this.$element[0].detachEvent("onpropertychange",this._syncA),null!=this._observer?(this._observer.disconnect(),this._observer=null):this.$element[0].removeEventListener&&(this.$element[0].removeEventListener("DOMAttrModified",this._syncA,!1),this.$element[0].removeEventListener("DOMNodeInserted",this._syncS,!1),this.$element[0].removeEventListener("DOMNodeRemoved",this._syncS,!1)),this._syncA=null,this._syncS=null,this.$element.off(".select2"),this.$element.attr("tabindex",this.$element.data("old-tabindex")),this.$element.removeClass("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),this.$element.removeData("select2"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null},c.prototype.render=function(){var t=a('<span class="select2 select2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>');return t.attr("dir",this.options.get("dir")),this.$container=t,this.$container.addClass("select2-container--"+this.options.get("theme")),t.data("element",this.$element),t},c}),t.define("jquery-mousewheel",["jquery"],function(t){return t}),t.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults"],function(a,t,o,e){if(null==a.fn.select2){var s=["open","close","destroy"];a.fn.select2=function(e){if("object"==typeof(e=e||{}))return this.each(function(){var t=a.extend(!0,{},e);new o(a(this),t)}),this;if("string"!=typeof e)throw new Error("Invalid arguments for Select2: "+e);var i,n=Array.prototype.slice.call(arguments,1);return this.each(function(){var t=a(this).data("select2");null==t&&window.console&&console.error&&console.error("The select2('"+e+"') method was called on an element that is not using Select2."),i=t[e].apply(t,n)}),-1<a.inArray(e,s)?this:i}}return null==a.fn.select2.defaults&&(a.fn.select2.defaults=e),o}),{define:t.define,require:t.require}}(),e=t.require("jquery.select2");return i.fn.select2.amd=t,e}),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.moment=e()}(this,function(){"use strict";var t,n;function h(){return t.apply(null,arguments)}function r(t){return t instanceof Array||"[object Array]"===Object.prototype.toString.call(t)}function l(t){return t instanceof Date||"[object Date]"===Object.prototype.toString.call(t)}function d(t,e){var i,n=[];for(i=0;i<t.length;++i)n.push(e(t[i],i));return n}function p(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function c(t,e){for(var i in e)p(e,i)&&(t[i]=e[i]);return p(e,"toString")&&(t.toString=e.toString),p(e,"valueOf")&&(t.valueOf=e.valueOf),t}function u(t,e,i,n){return re(t,e,i,n,!0).utc()}function f(t){return null==t._pf&&(t._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null}),t._pf}function m(t){if(null==t._isValid){var e=f(t),i=n.call(e.parsedDateParts,function(t){return null!=t});t._isValid=!isNaN(t._d.getTime())&&e.overflow<0&&!e.empty&&!e.invalidMonth&&!e.invalidWeekday&&!e.nullInput&&!e.invalidFormat&&!e.userInvalidated&&(!e.meridiem||e.meridiem&&i),t._strict&&(t._isValid=t._isValid&&0===e.charsLeftOver&&0===e.unusedTokens.length&&void 0===e.bigHour)}return t._isValid}function g(t){var e=u(NaN);return null!=t?c(f(e),t):f(e).userInvalidated=!0,e}function o(t){return void 0===t}n=Array.prototype.some?Array.prototype.some:function(t){for(var e=Object(this),i=e.length>>>0,n=0;n<i;n++)if(n in e&&t.call(this,e[n],n,e))return!0;return!1};var s=h.momentProperties=[];function v(t,e){var i,n,a;if(o(e._isAMomentObject)||(t._isAMomentObject=e._isAMomentObject),o(e._i)||(t._i=e._i),o(e._f)||(t._f=e._f),o(e._l)||(t._l=e._l),o(e._strict)||(t._strict=e._strict),o(e._tzm)||(t._tzm=e._tzm),o(e._isUTC)||(t._isUTC=e._isUTC),o(e._offset)||(t._offset=e._offset),o(e._pf)||(t._pf=f(e)),o(e._locale)||(t._locale=e._locale),0<s.length)for(i in s)o(a=e[n=s[i]])||(t[n]=a);return t}var e=!1;function b(t){v(this,t),this._d=new Date(null!=t._d?t._d.getTime():NaN),!1===e&&(e=!0,h.updateOffset(this),e=!1)}function y(t){return t instanceof b||null!=t&&null!=t._isAMomentObject}function w(t){return t<0?Math.ceil(t):Math.floor(t)}function x(t){var e=+t,i=0;return 0!==e&&isFinite(e)&&(i=w(e)),i}function k(t,e,i){var n,a=Math.min(t.length,e.length),o=Math.abs(t.length-e.length),s=0;for(n=0;n<a;n++)(i&&t[n]!==e[n]||!i&&x(t[n])!==x(e[n]))&&s++;return s+o}function a(t){!1===h.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+t)}function i(t,e){var i=!0;return c(function(){return null!=h.deprecationHandler&&h.deprecationHandler(null,t),i&&(a(t+"\nArguments: "+Array.prototype.slice.call(arguments).join(", ")+"\n"+(new Error).stack),i=!1),e.apply(this,arguments)},e)}var C,_={};function S(t,e){null!=h.deprecationHandler&&h.deprecationHandler(t,e),_[t]||(a(e),_[t]=!0)}function P(t){return t instanceof Function||"[object Function]"===Object.prototype.toString.call(t)}function A(t){return"[object Object]"===Object.prototype.toString.call(t)}function M(t,e){var i,n=c({},t);for(i in e)p(e,i)&&(A(t[i])&&A(e[i])?(n[i]={},c(n[i],t[i]),c(n[i],e[i])):null!=e[i]?n[i]=e[i]:delete n[i]);return n}function D(t){null!=t&&this.set(t)}h.suppressDeprecationWarnings=!1,h.deprecationHandler=null,C=Object.keys?Object.keys:function(t){var e,i=[];for(e in t)p(t,e)&&i.push(e);return i};var T,I={};function E(t){return t?t.toLowerCase().replace("_","-"):t}function L(t){var e=null;if(!I[t]&&"undefined"!=typeof module&&module&&module.exports)try{e=T._abbr,require("./locale/"+t),O(e)}catch(t){}return I[t]}function O(t,e){var i;return t&&(i=o(e)?B(t):F(t,e))&&(T=i),T._abbr}function F(t,e){return null!==e?(e.abbr=t,null!=I[t]?(S("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale"),e=M(I[t]._config,e)):null!=e.parentLocale&&(null!=I[e.parentLocale]?e=M(I[e.parentLocale]._config,e):S("parentLocaleUndefined","specified parentLocale is not defined yet")),I[t]=new D(e),O(t),I[t]):(delete I[t],null)}function B(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return T;if(!r(t)){if(e=L(t))return e;t=[t]}return function(t){for(var e,i,n,a,o=0;o<t.length;){for(e=(a=E(t[o]).split("-")).length,i=(i=E(t[o+1]))?i.split("-"):null;0<e;){if(n=L(a.slice(0,e).join("-")))return n;if(i&&i.length>=e&&k(a,i,!0)>=e-1)break;e--}o++}return null}(t)}var R={};function $(t,e){var i=t.toLowerCase();R[i]=R[i+"s"]=R[e]=t}function N(t){return"string"==typeof t?R[t]||R[t.toLowerCase()]:void 0}function j(t){var e,i,n={};for(i in t)p(t,i)&&(e=N(i))&&(n[e]=t[i]);return n}function z(e,i){return function(t){return null!=t?(Y(this,e,t),h.updateOffset(this,i),this):H(this,e)}}function H(t,e){return t.isValid()?t._d["get"+(t._isUTC?"UTC":"")+e]():NaN}function Y(t,e,i){t.isValid()&&t._d["set"+(t._isUTC?"UTC":"")+e](i)}function W(t,e){var i;if("object"==typeof t)for(i in t)this.set(i,t[i]);else if(P(this[t=N(t)]))return this[t](e);return this}function q(t,e,i){var n=""+Math.abs(t),a=e-n.length;return(0<=t?i?"+":"":"-")+Math.pow(10,Math.max(0,a)).toString().substr(1)+n}var U=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,Q=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,V={},G={};function K(t,e,i,n){var a=n;"string"==typeof n&&(a=function(){return this[n]()}),t&&(G[t]=a),e&&(G[e[0]]=function(){return q(a.apply(this,arguments),e[1],e[2])}),i&&(G[i]=function(){return this.localeData().ordinal(a.apply(this,arguments),t)})}function J(t,e){return t.isValid()?(e=Z(e,t.localeData()),V[e]=V[e]||function(n){var t,a,e,o=n.match(U);for(t=0,a=o.length;t<a;t++)G[o[t]]?o[t]=G[o[t]]:o[t]=(e=o[t]).match(/\[[\s\S]/)?e.replace(/^\[|\]#x2F;g,""):e.replace(/\\/g,"");return function(t){var e,i="";for(e=0;e<a;e++)i+=o[e]instanceof Function?o[e].call(t,n):o[e];return i}}(e),V[e](t)):t.localeData().invalidDate()}function Z(t,e){var i=5;function n(t){return e.longDateFormat(t)||t}for(Q.lastIndex=0;0<=i&&Q.test(t);)t=t.replace(Q,n),Q.lastIndex=0,i-=1;return t}var X=/\d/,tt=/\d\d/,et=/\d{3}/,it=/\d{4}/,nt=/[+-]?\d{6}/,at=/\d\d?/,ot=/\d\d\d\d?/,st=/\d\d\d\d\d\d?/,rt=/\d{1,3}/,lt=/\d{1,4}/,dt=/[+-]?\d{1,6}/,ct=/\d+/,ut=/[+-]?\d+/,ht=/Z|[+-]\d\d:?\d\d/gi,pt=/Z|[+-]\d\d(?::?\d\d)?/gi,ft=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,mt={};function gt(t,i,n){mt[t]=P(i)?i:function(t,e){return t&&n?n:i}}function vt(t,e){return p(mt,t)?mt[t](e._strict,e._locale):new RegExp(bt(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,e,i,n,a){return e||i||n||a})))}function bt(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\amp;")}var yt={};function wt(t,i){var e,n=i;for("string"==typeof t&&(t=[t]),"number"==typeof i&&(n=function(t,e){e[i]=x(t)}),e=0;e<t.length;e++)yt[t[e]]=n}function xt(t,a){wt(t,function(t,e,i,n){i._w=i._w||{},a(t,i._w,i,n)})}var kt,Ct=0,_t=1,St=2,Pt=3,At=4,Mt=5,Dt=6,Tt=7,It=8;function Et(t,e){return new Date(Date.UTC(t,e+1,0)).getUTCDate()}kt=Array.prototype.indexOf?Array.prototype.indexOf:function(t){var e;for(e=0;e<this.length;++e)if(this[e]===t)return e;return-1},K("M",["MM",2],"Mo",function(){return this.month()+1}),K("MMM",0,0,function(t){return this.localeData().monthsShort(this,t)}),K("MMMM",0,0,function(t){return this.localeData().months(this,t)}),$("month","M"),gt("M",at),gt("MM",at,tt),gt("MMM",function(t,e){return e.monthsShortRegex(t)}),gt("MMMM",function(t,e){return e.monthsRegex(t)}),wt(["M","MM"],function(t,e){e[_t]=x(t)-1}),wt(["MMM","MMMM"],function(t,e,i,n){var a=i._locale.monthsParse(t,n,i._strict);null!=a?e[_t]=a:f(i).invalidMonth=t});var Lt=/D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/,Ot="January_February_March_April_May_June_July_August_September_October_November_December".split("_");var Ft="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_");function Bt(t,e){var i;if(!t.isValid())return t;if("string"==typeof e)if(/^\d+#x2F;.test(e))e=x(e);else if("number"!=typeof(e=t.localeData().monthsParse(e)))return t;return i=Math.min(t.date(),Et(t.year(),e)),t._d["set"+(t._isUTC?"UTC":"")+"Month"](e,i),t}function Rt(t){return null!=t?(Bt(this,t),h.updateOffset(this,!0),this):H(this,"Month")}var $t=ft;var Nt=ft;function jt(){function t(t,e){return e.length-t.length}var e,i,n=[],a=[],o=[];for(e=0;e<12;e++)i=u([2e3,e]),n.push(this.monthsShort(i,"")),a.push(this.months(i,"")),o.push(this.months(i,"")),o.push(this.monthsShort(i,""));for(n.sort(t),a.sort(t),o.sort(t),e=0;e<12;e++)n[e]=bt(n[e]),a[e]=bt(a[e]),o[e]=bt(o[e]);this._monthsRegex=new RegExp("^("+o.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+n.join("|")+")","i")}function zt(t){var e,i=t._a;return i&&-2===f(t).overflow&&(e=i[_t]<0||11<i[_t]?_t:i[St]<1||i[St]>Et(i[Ct],i[_t])?St:i[Pt]<0||24<i[Pt]||24===i[Pt]&&(0!==i[At]||0!==i[Mt]||0!==i[Dt])?Pt:i[At]<0||59<i[At]?At:i[Mt]<0||59<i[Mt]?Mt:i[Dt]<0||999<i[Dt]?Dt:-1,f(t)._overflowDayOfYear&&(e<Ct||St<e)&&(e=St),f(t)._overflowWeeks&&-1===e&&(e=Tt),f(t)._overflowWeekday&&-1===e&&(e=It),f(t).overflow=e),t}var Ht=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/,Yt=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/,Wt=/Z|[+-]\d\d(?::?\d\d)?/,qt=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],Ut=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Qt=/^\/?Date\((\-?\d+)/i;function Vt(t){var e,i,n,a,o,s,r=t._i,l=Ht.exec(r)||Yt.exec(r);if(l){for(f(t).iso=!0,e=0,i=qt.length;e<i;e++)if(qt[e][1].exec(l[1])){a=qt[e][0],n=!1!==qt[e][2];break}if(null==a)return void(t._isValid=!1);if(l[3]){for(e=0,i=Ut.length;e<i;e++)if(Ut[e][1].exec(l[3])){o=(l[2]||" ")+Ut[e][0];break}if(null==o)return void(t._isValid=!1)}if(!n&&null!=o)return void(t._isValid=!1);if(l[4]){if(!Wt.exec(l[4]))return void(t._isValid=!1);s="Z"}t._f=a+(o||"")+(s||""),oe(t)}else t._isValid=!1}function Gt(t){var e=new Date(Date.UTC.apply(null,arguments));return t<100&&0<=t&&isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t),e}function Kt(t){return Jt(t)?366:365}function Jt(t){return t%4==0&&t%100!=0||t%400==0}h.createFromInputFallback=i("moment construction falls back to js Date. This is discouraged and will be removed in upcoming major release. Please refer to https://github.com/moment/moment/issues/1407 for more info.",function(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))}),K("Y",0,0,function(){var t=this.year();return t<=9999?""+t:"+"+t}),K(0,["YY",2],0,function(){return this.year()%100}),K(0,["YYYY",4],0,"year"),K(0,["YYYYY",5],0,"year"),K(0,["YYYYYY",6,!0],0,"year"),$("year","y"),gt("Y",ut),gt("YY",at,tt),gt("YYYY",lt,it),gt("YYYYY",dt,nt),gt("YYYYYY",dt,nt),wt(["YYYYY","YYYYYY"],Ct),wt("YYYY",function(t,e){e[Ct]=2===t.length?h.parseTwoDigitYear(t):x(t)}),wt("YY",function(t,e){e[Ct]=h.parseTwoDigitYear(t)}),wt("Y",function(t,e){e[Ct]=parseInt(t,10)}),h.parseTwoDigitYear=function(t){return x(t)+(68<x(t)?1900:2e3)};var Zt=z("FullYear",!0);function Xt(t,e,i){var n=7+e-i;return-((7+Gt(t,0,n).getUTCDay()-e)%7)+n-1}function te(t,e,i,n,a){var o,s,r=1+7*(e-1)+(7+i-n)%7+Xt(t,n,a);return s=r<=0?Kt(o=t-1)+r:r>Kt(t)?(o=t+1,r-Kt(t)):(o=t,r),{year:o,dayOfYear:s}}function ee(t,e,i){var n,a,o=Xt(t.year(),e,i),s=Math.floor((t.dayOfYear()-o-1)/7)+1;return s<1?n=s+ie(a=t.year()-1,e,i):s>ie(t.year(),e,i)?(n=s-ie(t.year(),e,i),a=t.year()+1):(a=t.year(),n=s),{week:n,year:a}}function ie(t,e,i){var n=Xt(t,e,i),a=Xt(t+1,e,i);return(Kt(t)-n+a)/7}function ne(t,e,i){return null!=t?t:null!=e?e:i}function ae(t){var e,i,n,a,o=[];if(!t._d){var s,r;for(s=t,r=new Date(h.now()),n=s._useUTC?[r.getUTCFullYear(),r.getUTCMonth(),r.getUTCDate()]:[r.getFullYear(),r.getMonth(),r.getDate()],t._w&&null==t._a[St]&&null==t._a[_t]&&function(t){var e,i,n,a,o,s,r,l;null!=(e=t._w).GG||null!=e.W||null!=e.E?(o=1,s=4,i=ne(e.GG,t._a[Ct],ee(le(),1,4).year),n=ne(e.W,1),((a=ne(e.E,1))<1||7<a)&&(l=!0)):(o=t._locale._week.dow,s=t._locale._week.doy,i=ne(e.gg,t._a[Ct],ee(le(),o,s).year),n=ne(e.w,1),null!=e.d?((a=e.d)<0||6<a)&&(l=!0):null!=e.e?(a=e.e+o,(e.e<0||6<e.e)&&(l=!0)):a=o);n<1||n>ie(i,o,s)?f(t)._overflowWeeks=!0:null!=l?f(t)._overflowWeekday=!0:(r=te(i,n,a,o,s),t._a[Ct]=r.year,t._dayOfYear=r.dayOfYear)}(t),t._dayOfYear&&(a=ne(t._a[Ct],n[Ct]),t._dayOfYear>Kt(a)&&(f(t)._overflowDayOfYear=!0),i=Gt(a,0,t._dayOfYear),t._a[_t]=i.getUTCMonth(),t._a[St]=i.getUTCDate()),e=0;e<3&&null==t._a[e];++e)t._a[e]=o[e]=n[e];for(;e<7;e++)t._a[e]=o[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[Pt]&&0===t._a[At]&&0===t._a[Mt]&&0===t._a[Dt]&&(t._nextDay=!0,t._a[Pt]=0),t._d=(t._useUTC?Gt:function(t,e,i,n,a,o,s){var r=new Date(t,e,i,n,a,o,s);return t<100&&0<=t&&isFinite(r.getFullYear())&&r.setFullYear(t),r}).apply(null,o),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[Pt]=24)}}function oe(t){if(t._f!==h.ISO_8601){t._a=[],f(t).empty=!0;var e,i,n,a,o,s,r,l,d=""+t._i,c=d.length,u=0;for(n=Z(t._f,t._locale).match(U)||[],e=0;e<n.length;e++)a=n[e],(i=(d.match(vt(a,t))||[])[0])&&(0<(o=d.substr(0,d.indexOf(i))).length&&f(t).unusedInput.push(o),d=d.slice(d.indexOf(i)+i.length),u+=i.length),G[a]?(i?f(t).empty=!1:f(t).unusedTokens.push(a),s=a,l=t,null!=(r=i)&&p(yt,s)&&yt[s](r,l._a,l,s)):t._strict&&!i&&f(t).unusedTokens.push(a);f(t).charsLeftOver=c-u,0<d.length&&f(t).unusedInput.push(d),!0===f(t).bigHour&&t._a[Pt]<=12&&0<t._a[Pt]&&(f(t).bigHour=void 0),f(t).parsedDateParts=t._a.slice(0),f(t).meridiem=t._meridiem,t._a[Pt]=function(t,e,i){var n;if(null==i)return e;return null!=t.meridiemHour?t.meridiemHour(e,i):(null!=t.isPM&&((n=t.isPM(i))&&e<12&&(e+=12),n||12!==e||(e=0)),e)}(t._locale,t._a[Pt],t._meridiem),ae(t),zt(t)}else Vt(t)}function se(t){var e,i,n,a,o=t._i,s=t._f;return t._locale=t._locale||B(t._l),null===o||void 0===s&&""===o?g({nullInput:!0}):("string"==typeof o&&(t._i=o=t._locale.preparse(o)),y(o)?new b(zt(o)):(r(s)?function(t){var e,i,n,a,o;if(0===t._f.length)return f(t).invalidFormat=!0,t._d=new Date(NaN);for(a=0;a<t._f.length;a++)o=0,e=v({},t),null!=t._useUTC&&(e._useUTC=t._useUTC),e._f=t._f[a],oe(e),m(e)&&(o+=f(e).charsLeftOver,o+=10*f(e).unusedTokens.length,f(e).score=o,(null==n||o<n)&&(n=o,i=e));c(t,i||e)}(t):s?oe(t):l(o)?t._d=o:void 0===(i=(e=t)._i)?e._d=new Date(h.now()):l(i)?e._d=new Date(i.valueOf()):"string"==typeof i?(n=e,null===(a=Qt.exec(n._i))?(Vt(n),!1===n._isValid&&(delete n._isValid,h.createFromInputFallback(n))):n._d=new Date(+a[1])):r(i)?(e._a=d(i.slice(0),function(t){return parseInt(t,10)}),ae(e)):"object"==typeof i?function(t){if(!t._d){var e=j(t._i);t._a=d([e.year,e.month,e.day||e.date,e.hour,e.minute,e.second,e.millisecond],function(t){return t&&parseInt(t,10)}),ae(t)}}(e):"number"==typeof i?e._d=new Date(i):h.createFromInputFallback(e),m(t)||(t._d=null),t))}function re(t,e,i,n,a){var o,s={};return"boolean"==typeof i&&(n=i,i=void 0),s._isAMomentObject=!0,s._useUTC=s._isUTC=a,s._l=i,s._i=t,s._f=e,s._strict=n,(o=new b(zt(se(s))))._nextDay&&(o.add(1,"d"),o._nextDay=void 0),o}function le(t,e,i,n){return re(t,e,i,n,!1)}h.ISO_8601=function(){};var de=i("moment().min is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548",function(){var t=le.apply(null,arguments);return this.isValid()&&t.isValid()?t<this?this:t:g()}),ce=i("moment().max is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548",function(){var t=le.apply(null,arguments);return this.isValid()&&t.isValid()?this<t?this:t:g()});function ue(t,e){var i,n;if(1===e.length&&r(e[0])&&(e=e[0]),!e.length)return le();for(i=e[0],n=1;n<e.length;++n)e[n].isValid()&&!e[n][t](i)||(i=e[n]);return i}function he(t){var e=j(t),i=e.year||0,n=e.quarter||0,a=e.month||0,o=e.week||0,s=e.day||0,r=e.hour||0,l=e.minute||0,d=e.second||0,c=e.millisecond||0;this._milliseconds=+c+1e3*d+6e4*l+1e3*r*60*60,this._days=+s+7*o,this._months=+a+3*n+12*i,this._data={},this._locale=B(),this._bubble()}function pe(t){return t instanceof he}function fe(t,i){K(t,0,0,function(){var t=this.utcOffset(),e="+";return t<0&&(t=-t,e="-"),e+q(~~(t/60),2)+i+q(~~t%60,2)})}fe("Z",":"),fe("ZZ",""),gt("Z",pt),gt("ZZ",pt),wt(["Z","ZZ"],function(t,e,i){i._useUTC=!0,i._tzm=ge(pt,t)});var me=/([\+\-]|\d\d)/gi;function ge(t,e){var i=(e||"").match(t)||[],n=((i[i.length-1]||[])+"").match(me)||["-",0,0],a=60*n[1]+x(n[2]);return"+"===n[0]?a:-a}function ve(t,e){var i,n;return e._isUTC?(i=e.clone(),n=(y(t)||l(t)?t.valueOf():le(t).valueOf())-i.valueOf(),i._d.setTime(i._d.valueOf()+n),h.updateOffset(i,!1),i):le(t).local()}function be(t){return 15*-Math.round(t._d.getTimezoneOffset()/15)}function ye(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}h.updateOffset=function(){};var we=/^(\-)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?\d*)?#x2F;,xe=/^(-)?P(?:(-?[0-9,.]*)Y)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)W)?(?:(-?[0-9,.]*)D)?(?:T(?:(-?[0-9,.]*)H)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)S)?)?#x2F;;function ke(t,e){var i,n,a,o=t,s=null;return pe(t)?o={ms:t._milliseconds,d:t._days,M:t._months}:"number"==typeof t?(o={},e?o[e]=t:o.milliseconds=t):(s=we.exec(t))?(i="-"===s[1]?-1:1,o={y:0,d:x(s[St])*i,h:x(s[Pt])*i,m:x(s[At])*i,s:x(s[Mt])*i,ms:x(s[Dt])*i}):(s=xe.exec(t))?(i="-"===s[1]?-1:1,o={y:Ce(s[2],i),M:Ce(s[3],i),w:Ce(s[4],i),d:Ce(s[5],i),h:Ce(s[6],i),m:Ce(s[7],i),s:Ce(s[8],i)}):null==o?o={}:"object"==typeof o&&("from"in o||"to"in o)&&(a=function(t,e){var i;if(!t.isValid()||!e.isValid())return{milliseconds:0,months:0};e=ve(e,t),t.isBefore(e)?i=_e(t,e):((i=_e(e,t)).milliseconds=-i.milliseconds,i.months=-i.months);return i}(le(o.from),le(o.to)),(o={}).ms=a.milliseconds,o.M=a.months),n=new he(o),pe(t)&&p(t,"_locale")&&(n._locale=t._locale),n}function Ce(t,e){var i=t&&parseFloat(t.replace(",","."));return(isNaN(i)?0:i)*e}function _e(t,e){var i={milliseconds:0,months:0};return i.months=e.month()-t.month()+12*(e.year()-t.year()),t.clone().add(i.months,"M").isAfter(e)&&--i.months,i.milliseconds=+e-+t.clone().add(i.months,"M"),i}function Se(t){return t<0?-1*Math.round(-1*t):Math.round(t)}function Pe(n,a){return function(t,e){var i;return null===e||isNaN(+e)||(S(a,"moment()."+a+"(period, number) is deprecated. Please use moment()."+a+"(number, period)."),i=t,t=e,e=i),Ae(this,ke(t="string"==typeof t?+t:t,e),n),this}}function Ae(t,e,i,n){var a=e._milliseconds,o=Se(e._days),s=Se(e._months);t.isValid()&&(n=null==n||n,a&&t._d.setTime(t._d.valueOf()+a*i),o&&Y(t,"Date",H(t,"Date")+o*i),s&&Bt(t,H(t,"Month")+s*i),n&&h.updateOffset(t,o||s))}ke.fn=he.prototype;var Me=Pe(1,"add"),De=Pe(-1,"subtract");function Te(t){var e;return void 0===t?this._locale._abbr:(null!=(e=B(t))&&(this._locale=e),this)}h.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",h.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var Ie=i("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(t){return void 0===t?this.localeData():this.locale(t)});function Ee(){return this._locale}function Le(t,e){K(0,[t,t.length],0,e)}function Oe(t,e,i,n,a){var o;return null==t?ee(this,n,a).year:((o=ie(t,n,a))<e&&(e=o),function(t,e,i,n,a){var o=te(t,e,i,n,a),s=Gt(o.year,0,o.dayOfYear);return this.year(s.getUTCFullYear()),this.month(s.getUTCMonth()),this.date(s.getUTCDate()),this}.call(this,t,e,i,n,a))}K(0,["gg",2],0,function(){return this.weekYear()%100}),K(0,["GG",2],0,function(){return this.isoWeekYear()%100}),Le("gggg","weekYear"),Le("ggggg","weekYear"),Le("GGGG","isoWeekYear"),Le("GGGGG","isoWeekYear"),$("weekYear","gg"),$("isoWeekYear","GG"),gt("G",ut),gt("g",ut),gt("GG",at,tt),gt("gg",at,tt),gt("GGGG",lt,it),gt("gggg",lt,it),gt("GGGGG",dt,nt),gt("ggggg",dt,nt),xt(["gggg","ggggg","GGGG","GGGGG"],function(t,e,i,n){e[n.substr(0,2)]=x(t)}),xt(["gg","GG"],function(t,e,i,n){e[n]=h.parseTwoDigitYear(t)}),K("Q",0,"Qo","quarter"),$("quarter","Q"),gt("Q",X),wt("Q",function(t,e){e[_t]=3*(x(t)-1)}),K("w",["ww",2],"wo","week"),K("W",["WW",2],"Wo","isoWeek"),$("week","w"),$("isoWeek","W"),gt("w",at),gt("ww",at,tt),gt("W",at),gt("WW",at,tt),xt(["w","ww","W","WW"],function(t,e,i,n){e[n.substr(0,1)]=x(t)});K("D",["DD",2],"Do","date"),$("date","D"),gt("D",at),gt("DD",at,tt),gt("Do",function(t,e){return t?e._ordinalParse:e._ordinalParseLenient}),wt(["D","DD"],St),wt("Do",function(t,e){e[St]=x(t.match(at)[0])});var Fe=z("Date",!0);K("d",0,"do","day"),K("dd",0,0,function(t){return this.localeData().weekdaysMin(this,t)}),K("ddd",0,0,function(t){return this.localeData().weekdaysShort(this,t)}),K("dddd",0,0,function(t){return this.localeData().weekdays(this,t)}),K("e",0,0,"weekday"),K("E",0,0,"isoWeekday"),$("day","d"),$("weekday","e"),$("isoWeekday","E"),gt("d",at),gt("e",at),gt("E",at),gt("dd",function(t,e){return e.weekdaysMinRegex(t)}),gt("ddd",function(t,e){return e.weekdaysShortRegex(t)}),gt("dddd",function(t,e){return e.weekdaysRegex(t)}),xt(["dd","ddd","dddd"],function(t,e,i,n){var a=i._locale.weekdaysParse(t,n,i._strict);null!=a?e.d=a:f(i).invalidWeekday=t}),xt(["d","e","E"],function(t,e,i,n){e[n]=x(t)});var Be="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_");var Re="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_");var $e="Su_Mo_Tu_We_Th_Fr_Sa".split("_");var Ne=ft;var je=ft;var ze=ft;function He(){function t(t,e){return e.length-t.length}var e,i,n,a,o,s=[],r=[],l=[],d=[];for(e=0;e<7;e++)i=u([2e3,1]).day(e),n=this.weekdaysMin(i,""),a=this.weekdaysShort(i,""),o=this.weekdays(i,""),s.push(n),r.push(a),l.push(o),d.push(n),d.push(a),d.push(o);for(s.sort(t),r.sort(t),l.sort(t),d.sort(t),e=0;e<7;e++)r[e]=bt(r[e]),l[e]=bt(l[e]),d[e]=bt(d[e]);this._weekdaysRegex=new RegExp("^("+d.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+s.join("|")+")","i")}function Ye(){return this.hours()%12||12}function We(t,e){K(t,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)})}function qe(t,e){return e._meridiemParse}K("DDD",["DDDD",3],"DDDo","dayOfYear"),$("dayOfYear","DDD"),gt("DDD",rt),gt("DDDD",et),wt(["DDD","DDDD"],function(t,e,i){i._dayOfYear=x(t)}),K("H",["HH",2],0,"hour"),K("h",["hh",2],0,Ye),K("k",["kk",2],0,function(){return this.hours()||24}),K("hmm",0,0,function(){return""+Ye.apply(this)+q(this.minutes(),2)}),K("hmmss",0,0,function(){return""+Ye.apply(this)+q(this.minutes(),2)+q(this.seconds(),2)}),K("Hmm",0,0,function(){return""+this.hours()+q(this.minutes(),2)}),K("Hmmss",0,0,function(){return""+this.hours()+q(this.minutes(),2)+q(this.seconds(),2)}),We("a",!0),We("A",!1),$("hour","h"),gt("a",qe),gt("A",qe),gt("H",at),gt("h",at),gt("HH",at,tt),gt("hh",at,tt),gt("hmm",ot),gt("hmmss",st),gt("Hmm",ot),gt("Hmmss",st),wt(["H","HH"],Pt),wt(["a","A"],function(t,e,i){i._isPm=i._locale.isPM(t),i._meridiem=t}),wt(["h","hh"],function(t,e,i){e[Pt]=x(t),f(i).bigHour=!0}),wt("hmm",function(t,e,i){var n=t.length-2;e[Pt]=x(t.substr(0,n)),e[At]=x(t.substr(n)),f(i).bigHour=!0}),wt("hmmss",function(t,e,i){var n=t.length-4,a=t.length-2;e[Pt]=x(t.substr(0,n)),e[At]=x(t.substr(n,2)),e[Mt]=x(t.substr(a)),f(i).bigHour=!0}),wt("Hmm",function(t,e,i){var n=t.length-2;e[Pt]=x(t.substr(0,n)),e[At]=x(t.substr(n))}),wt("Hmmss",function(t,e,i){var n=t.length-4,a=t.length-2;e[Pt]=x(t.substr(0,n)),e[At]=x(t.substr(n,2)),e[Mt]=x(t.substr(a))});var Ue=z("Hours",!0);K("m",["mm",2],0,"minute"),$("minute","m"),gt("m",at),gt("mm",at,tt),wt(["m","mm"],At);var Qe=z("Minutes",!1);K("s",["ss",2],0,"second"),$("second","s"),gt("s",at),gt("ss",at,tt),wt(["s","ss"],Mt);var Ve,Ge=z("Seconds",!1);for(K("S",0,0,function(){return~~(this.millisecond()/100)}),K(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),K(0,["SSS",3],0,"millisecond"),K(0,["SSSS",4],0,function(){return 10*this.millisecond()}),K(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),K(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),K(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),K(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),K(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),$("millisecond","ms"),gt("S",rt,X),gt("SS",rt,tt),gt("SSS",rt,et),Ve="SSSS";Ve.length<=9;Ve+="S")gt(Ve,ct);function Ke(t,e){e[Dt]=x(1e3*("0."+t))}for(Ve="S";Ve.length<=9;Ve+="S")wt(Ve,Ke);var Je=z("Milliseconds",!1);K("z",0,0,"zoneAbbr"),K("zz",0,0,"zoneName");var Ze=b.prototype;Ze.add=Me,Ze.calendar=function(t,e){var i=t||le(),n=ve(i,this).startOf("day"),a=this.diff(n,"days",!0),o=a<-6?"sameElse":a<-1?"lastWeek":a<0?"lastDay":a<1?"sameDay":a<2?"nextDay":a<7?"nextWeek":"sameElse",s=e&&(P(e[o])?e[o]():e[o]);return this.format(s||this.localeData().calendar(o,this,le(i)))},Ze.clone=function(){return new b(this)},Ze.diff=function(t,e,i){var n,a,o,s;return this.isValid()&&(n=ve(t,this)).isValid()?(a=6e4*(n.utcOffset()-this.utcOffset()),"year"===(e=N(e))||"month"===e||"quarter"===e?(r=this,l=n,u=12*(l.year()-r.year())+(l.month()-r.month()),h=r.clone().add(u,"months"),c=l-h<0?(d=r.clone().add(u-1,"months"),(l-h)/(h-d)):(d=r.clone().add(u+1,"months"),(l-h)/(d-h)),s=-(u+c)||0,"quarter"===e?s/=3:"year"===e&&(s/=12)):(o=this-n,s="second"===e?o/1e3:"minute"===e?o/6e4:"hour"===e?o/36e5:"day"===e?(o-a)/864e5:"week"===e?(o-a)/6048e5:o),i?s:w(s)):NaN;var r,l,d,c,u,h},Ze.endOf=function(t){return void 0===(t=N(t))||"millisecond"===t?this:("date"===t&&(t="day"),this.startOf(t).add(1,"isoWeek"===t?"week":t).subtract(1,"ms"))},Ze.format=function(t){t||(t=this.isUtc()?h.defaultFormatUtc:h.defaultFormat);var e=J(this,t);return this.localeData().postformat(e)},Ze.from=function(t,e){return this.isValid()&&(y(t)&&t.isValid()||le(t).isValid())?ke({to:this,from:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()},Ze.fromNow=function(t){return this.from(le(),t)},Ze.to=function(t,e){return this.isValid()&&(y(t)&&t.isValid()||le(t).isValid())?ke({from:this,to:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()},Ze.toNow=function(t){return this.to(le(),t)},Ze.get=W,Ze.invalidAt=function(){return f(this).overflow},Ze.isAfter=function(t,e){var i=y(t)?t:le(t);return!(!this.isValid()||!i.isValid())&&("millisecond"===(e=N(o(e)?"millisecond":e))?this.valueOf()>i.valueOf():i.valueOf()<this.clone().startOf(e).valueOf())},Ze.isBefore=function(t,e){var i=y(t)?t:le(t);return!(!this.isValid()||!i.isValid())&&("millisecond"===(e=N(o(e)?"millisecond":e))?this.valueOf()<i.valueOf():this.clone().endOf(e).valueOf()<i.valueOf())},Ze.isBetween=function(t,e,i,n){return("("===(n=n||"()")[0]?this.isAfter(t,i):!this.isBefore(t,i))&&(")"===n[1]?this.isBefore(e,i):!this.isAfter(e,i))},Ze.isSame=function(t,e){var i,n=y(t)?t:le(t);return!(!this.isValid()||!n.isValid())&&("millisecond"===(e=N(e||"millisecond"))?this.valueOf()===n.valueOf():(i=n.valueOf(),this.clone().startOf(e).valueOf()<=i&&i<=this.clone().endOf(e).valueOf()))},Ze.isSameOrAfter=function(t,e){return this.isSame(t,e)||this.isAfter(t,e)},Ze.isSameOrBefore=function(t,e){return this.isSame(t,e)||this.isBefore(t,e)},Ze.isValid=function(){return m(this)},Ze.lang=Ie,Ze.locale=Te,Ze.localeData=Ee,Ze.max=ce,Ze.min=de,Ze.parsingFlags=function(){return c({},f(this))},Ze.set=W,Ze.startOf=function(t){switch(t=N(t)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":case"date":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===t&&this.weekday(0),"isoWeek"===t&&this.isoWeekday(1),"quarter"===t&&this.month(3*Math.floor(this.month()/3)),this},Ze.subtract=De,Ze.toArray=function(){var t=this;return[t.year(),t.month(),t.date(),t.hour(),t.minute(),t.second(),t.millisecond()]},Ze.toObject=function(){var t=this;return{years:t.year(),months:t.month(),date:t.date(),hours:t.hours(),minutes:t.minutes(),seconds:t.seconds(),milliseconds:t.milliseconds()}},Ze.toDate=function(){return this._offset?new Date(this.valueOf()):this._d},Ze.toISOString=function(){var t=this.clone().utc();return 0<t.year()&&t.year()<=9999?P(Date.prototype.toISOString)?this.toDate().toISOString():J(t,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):J(t,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]")},Ze.toJSON=function(){return this.isValid()?this.toISOString():null},Ze.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},Ze.unix=function(){return Math.floor(this.valueOf()/1e3)},Ze.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},Ze.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},Ze.year=Zt,Ze.isLeapYear=function(){return Jt(this.year())},Ze.weekYear=function(t){return Oe.call(this,t,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},Ze.isoWeekYear=function(t){return Oe.call(this,t,this.isoWeek(),this.isoWeekday(),1,4)},Ze.quarter=Ze.quarters=function(t){return null==t?Math.ceil((this.month()+1)/3):this.month(3*(t-1)+this.month()%3)},Ze.month=Rt,Ze.daysInMonth=function(){return Et(this.year(),this.month())},Ze.week=Ze.weeks=function(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")},Ze.isoWeek=Ze.isoWeeks=function(t){var e=ee(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")},Ze.weeksInYear=function(){var t=this.localeData()._week;return ie(this.year(),t.dow,t.doy)},Ze.isoWeeksInYear=function(){return ie(this.year(),1,4)},Ze.date=Fe,Ze.day=Ze.days=function(t){if(!this.isValid())return null!=t?this:NaN;var e,i,n=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?(e=t,i=this.localeData(),t="string"!=typeof e?e:isNaN(e)?"number"==typeof(e=i.weekdaysParse(e))?e:null:parseInt(e,10),this.add(t-n,"d")):n},Ze.weekday=function(t){if(!this.isValid())return null!=t?this:NaN;var e=(this.day()+7-this.localeData()._week.dow)%7;return null==t?e:this.add(t-e,"d")},Ze.isoWeekday=function(t){return this.isValid()?null==t?this.day()||7:this.day(this.day()%7?t:t-7):null!=t?this:NaN},Ze.dayOfYear=function(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==t?e:this.add(t-e,"d")},Ze.hour=Ze.hours=Ue,Ze.minute=Ze.minutes=Qe,Ze.second=Ze.seconds=Ge,Ze.millisecond=Ze.milliseconds=Je,Ze.utcOffset=function(t,e){var i,n=this._offset||0;return this.isValid()?null!=t?("string"==typeof t?t=ge(pt,t):Math.abs(t)<16&&(t*=60),!this._isUTC&&e&&(i=be(this)),this._offset=t,this._isUTC=!0,null!=i&&this.add(i,"m"),n!==t&&(!e||this._changeInProgress?Ae(this,ke(t-n,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,h.updateOffset(this,!0),this._changeInProgress=null)),this):this._isUTC?n:be(this):null!=t?this:NaN},Ze.utc=function(t){return this.utcOffset(0,t)},Ze.local=function(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(be(this),"m")),this},Ze.parseZone=function(){return this._tzm?this.utcOffset(this._tzm):"string"==typeof this._i&&this.utcOffset(ge(ht,this._i)),this},Ze.hasAlignedHourOffset=function(t){return!!this.isValid()&&(t=t?le(t).utcOffset():0,(this.utcOffset()-t)%60==0)},Ze.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},Ze.isDSTShifted=function(){if(!o(this._isDSTShifted))return this._isDSTShifted;var t={};if(v(t,this),(t=se(t))._a){var e=t._isUTC?u(t._a):le(t._a);this._isDSTShifted=this.isValid()&&0<k(t._a,e.toArray())}else this._isDSTShifted=!1;return this._isDSTShifted},Ze.isLocal=function(){return!!this.isValid()&&!this._isUTC},Ze.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},Ze.isUtc=ye,Ze.isUTC=ye,Ze.zoneAbbr=function(){return this._isUTC?"UTC":""},Ze.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},Ze.dates=i("dates accessor is deprecated. Use date instead.",Fe),Ze.months=i("months accessor is deprecated. Use month instead",Rt),Ze.years=i("years accessor is deprecated. Use year instead",Zt),Ze.zone=i("moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779",function(t,e){return null!=t?("string"!=typeof t&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()});var Xe=Ze;function ti(t){return t}var ei=D.prototype;function ii(t,e,i,n){var a=B(),o=u().set(n,e);return a[i](o,t)}function ni(t,e,i){if("number"==typeof t&&(e=t,t=void 0),t=t||"",null!=e)return ii(t,e,i,"month");var n,a=[];for(n=0;n<12;n++)a[n]=ii(t,n,i,"month");return a}function ai(t,e,i,n){e=("boolean"==typeof t?"number"==typeof e&&(i=e,e=void 0):(e=t,t=!1,"number"==typeof(i=e)&&(i=e,e=void 0)),e||"");var a,o=B(),s=t?o._week.dow:0;if(null!=i)return ii(e,(i+s)%7,n,"day");var r=[];for(a=0;a<7;a++)r[a]=ii(e,(a+s)%7,n,"day");return r}ei._calendar={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},ei.calendar=function(t,e,i){var n=this._calendar[t];return P(n)?n.call(e,i):n},ei._longDateFormat={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"M