cui.min.js 307.4 KB
function isArray(e){return e&&!e.propertyIsEnumerable("length")&&"object"==typeof e&&"number"==typeof e.length}function copyTo(e,t,n){for(var i in e)n&&n.exists(i)||(t[i]=e[i])}function _toConsumableArray(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}window.Modernizr=function(e,t,n){function i(e){f.cssText=e}function o(e,t){return typeof e===t}var r,s,a,l="2.6.2",c={},d=!0,u=t.documentElement,p="modernizr",h=t.createElement(p),f=h.style,m=({}.toString," -webkit- -moz- -o- -ms- ".split(" ")),g={},v=[],y=v.slice,w=function(e,n,i,o){var r,s,a,l,c=t.createElement("div"),d=t.body,h=d||t.createElement("body");if(parseInt(i,10))for(;i--;)a=t.createElement("div"),a.id=o?o[i]:p+(i+1),c.appendChild(a);return r=["&#173;",'<style id="s',p,'">',e,"</style>"].join(""),c.id=p,(d?c:h).innerHTML+=r,h.appendChild(c),d||(h.style.background="",h.style.overflow="hidden",l=u.style.overflow,u.style.overflow="hidden",u.appendChild(h)),s=n(c,e),d?c.parentNode.removeChild(c):(h.parentNode.removeChild(h),u.style.overflow=l),!!s},b={}.hasOwnProperty;a=o(b,"undefined")||o(b.call,"undefined")?function(e,t){return t in e&&o(e.constructor.prototype[t],"undefined")}:function(e,t){return b.call(e,t)},Function.prototype.bind||(Function.prototype.bind=function(e){var t=this;if("function"!=typeof t)throw new TypeError;var n=y.call(arguments,1),i=function(){if(this instanceof i){var o=function(){};o.prototype=t.prototype;var r=new o,s=t.apply(r,n.concat(y.call(arguments)));return Object(s)===s?s:r}return t.apply(e,n.concat(y.call(arguments)))};return i}),g.touch=function(){var n;return"ontouchstart"in e||e.DocumentTouch&&t instanceof DocumentTouch?n=!0:w(["@media (",m.join("touch-enabled),("),p,")","{#modernizr{top:9px;position:absolute}}"].join(""),function(e){n=9===e.offsetTop}),n};for(var C in g)a(g,C)&&(s=C.toLowerCase(),c[s]=g[C](),v.push((c[s]?"":"no-")+s));return c.addTest=function(e,t){if("object"==typeof e)for(var i in e)a(e,i)&&c.addTest(i,e[i]);else{if(e=e.toLowerCase(),c[e]!==n)return c;t="function"==typeof t?t():t,"undefined"!=typeof d&&d&&(u.className+=" "+(t?"":"no-")+e),c[e]=t}return c},i(""),h=r=null,c._version=l,c._prefixes=m,c.testStyles=w,u.className=u.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(d?" js "+v.join(" "):""),c}(this,this.document),Modernizr.addTest("android",function(){return!!navigator.userAgent.match(/Android/i)}),Modernizr.addTest("chrome",function(){return!!navigator.userAgent.match(/Chrome/i)}),Modernizr.addTest("firefox",function(){return!!navigator.userAgent.match(/Firefox/i)}),Modernizr.addTest("iemobile",function(){return!!navigator.userAgent.match(/IEMobile/i)}),Modernizr.addTest("ie",function(){return!!navigator.userAgent.match(/MSIE/i)}),Modernizr.addTest("ie8",function(){return!!navigator.userAgent.match(/MSIE 8/i)}),Modernizr.addTest("ie10",function(){return!!navigator.userAgent.match(/MSIE 10/i)}),Modernizr.addTest("ie11",function(){return!!navigator.userAgent.match(/Trident.*rv:11\./)}),Modernizr.addTest("ios",function(){return!!navigator.userAgent.match(/iPhone|iPad|iPod/i)}),Modernizr.addTest("ios7 ipad",function(){return!!navigator.userAgent.match(/iPad;.*CPU.*OS 7_\d/i)}),Array.prototype.unpush=function(){this.length=this.length-1},Array.prototype.indexOf=function(e,t){var n=this.length;t?t<0&&(t=Math.max(0,n+t)):t=0;for(var i=t;i<n;i++)if(this[i]==e)return i;return-1},Array.prototype.remove=function(e){var t=this.indexOf(e);return t>-1&&this.splice(t,1),t>-1},Array.prototype.removeAt=function(e){return this.splice(e,1)},Array.prototype.removeReItem=function(e){for(var t={},n=this.length,i=0;i<n;i++)"undefined"==typeof t[this[i]]&&this[i]!=e&&(t[this[i]]=1);this.length=0;for(var o in t)this[this.length]=o;return this},Array.prototype.clearRepeat=function(){for(var e={},t=this.length,n=0;n<t;n++)"undefined"==typeof e[this[n]]&&(e[this[n]]=this[n]);this.length=0;for(var i in e)this[this.length]=i;return this},Array.prototype.hasRepeat=function(){for(var e={},t=this.length,n=0;n<t;n++){if("undefined"!=typeof e[this[n]])return!0;e[this[n]]=this[n]}return!1},Array.prototype.exists=function(e){return this.indexOf(e)!=-1},Array.prototype.any=function(e){for(var t=0;t<this.length;t++)if(e(this[t]))return!0;return!1},Array.prototype.first=function(e){for(var t=0;t<this.length;t++){var n=e(this[t]);if(n)return n}return null},Array.prototype.getMax=function(){for(var e=this.length,t=1,n=this[0];t<e;t++)n<this[t]&&(n=this[t]);return n},Array.prototype.getMin=function(){for(var e=this.length,t=1,n=this[0];t<e;t++)n>this[t]&&(n=this[t]);return n},Array.prototype.clear=function(){this.length=0},Array.prototype.addArray=function(e){for(var t=e.length,n=0;n<t;n++)this.push(e[n])},Array.prototype.insertAt=function(e,t){this.splice(e,0,t)},Array.prototype.insertBefore=function(e,t){var n=this.indexOf(e);n==-1?this.push(t):this.splice(n,0,t)},Array.prototype.forEach||(Array.prototype.forEach=function(e,t){var n,i;if(null==this)throw new TypeError("this is null or not defined");var o=Object(this),r=o.length>>>0;if("function"!=typeof e)throw new TypeError(e+" is not a function");for(arguments.length>1&&(n=t),i=0;i<r;){var s;i in o&&(s=o[i],e.call(n,s,i,o)),i++}}),String.prototype.trim=function(){return this.replace(/(^\s*)|(\s*$)/g,"")},String.prototype.ltrim=function(){return this.replace(/(^\s*)/g,"")},String.prototype.rtrim=function(){return this.replace(/(\s*$)/g,"")},String.prototype.contains=function(e){return this.indexOf(e)>-1},String.prototype.startWith=function(e){var t=new RegExp("^"+e);return t.test(this)},String.prototype.endWith=function(e){var t=new RegExp(e+"$");return t.test(this)},String.prototype.isDate=function(){var regExp=this.match(/^(\d{1,4})(-)(\d{1,2})\2(\d{1,2})$/);if(null==regExp)return!1;var date=new Date(regExp[1],regExp[3]-1,regExp[4]);return date.getFullYear()==regExp[1]&&eval(date.getMonth()+1)==regExp[3]&&date.getDate()==regExp[4]},String.prototype.toDate=function(){var e=this.match(/^(\d{1,4})(-)(\d{1,2})\2(\d{1,2})\s(\d{1,2})(:)(\d{1,2})\6(\d{1,2})$/);if(null==e)return!1;var t=new Date(e[1],e[3]-1,e[4]);return t},String.prototype.HtmlEncode=function(){return this.replace(/&/g,"&amp").replace(/\"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")},String.prototype.toHtml=function(){var e=new RegExp("((?:http|https|ftp|mms|rtsp)://(&(?=amp;)|[A-Za-z0-9./=?%_~@&#:;+-])+)","ig");return this.replace(e,"<a href='$1' target='_blank'>$1</a>")},String.prototype.ChLen=function(){return this.replace(/[^\x00-\xff]/g,"aa").length},String.prototype.IsChinese=function(){var e=/^[\u4E00-\u9FA5]*$/;return e.test(this)},String.prototype.toMoney=function(e){var t=parseFloat(this)<0?"-":"",n=Math.abs(parseFloat(this)).toString();if(/[^0-9\.]/.test(n))return"\u65e0\u6548\u7684\u6570\u503c";n=n.replace(/^(\d*)$/,"$1."),n=(n+"00").replace(/(\d*\.\d\d)\d*/,"$1"),n=n.replace(".",",");for(var i=/(\d)(\d{3},)/;i.test(n);)n=n.replace(i,"$1,$2");return n=n.replace(/,(\d\d)$/,".$1"),void 0==e&&(e="\uffe5"),e+t+n.replace(/^\./,"0.")},Date.prototype.toFormat=function(e){e||(e="yyyy/MM/dd HH:mm:ss");var t=this.getFullYear(),n=parseInt(this.getMonth()+1,10),i=this.getDate(),o=this.getHours()>9?this.getHours():"0"+this.getHours(),r=this.getMinutes()>9?this.getMinutes():"0"+this.getMinutes(),s=this.getSeconds()>9?this.getSeconds():"0"+this.getSeconds();return e.replace(/yyyy/g,t).replace(/MM/g,n).replace(/dd/g,i).replace(/HH/g,o).replace(/mm/g,r).replace(/ss/g,s)},Date.prototype.addDays=function(e){var t=this.getTime()+24*e*60*60*1e3,n=new Date;return n.setTime(t),n},Date.prototype.addMinutes=function(e){var t=this.getTime()+60*e*1e3,n=new Date;return n.setTime(t),n},Date.prototype.addSeconds=function(e){var e=this.getTime()+1e3*e,t=new Date;return t.setTime(e),t},"object"==typeof HTMLElement&&(HTMLElement.prototype.fireEvent=function(e){var t=document.createEvent("HTMLEvents");t.initEvent(e,!1,!1),this.dispatchEvent(t)}),function(e){e.fn.asyncSubmit=function(t){return"function"==typeof t&&(t={success:t}),this.each(function(){var n=this,i=e(this);i.resetForm(),"string"==typeof i.attr("data-questions")&&i.find("input.other").change(function(){var t=""!=e(this).val(),n=e(this).prev("input");n.length||(n=e(this).prev().prev());var i=n.val().split(":")[0];n[0].checked=t,t&&(i+=":"+e(this).val().replace(/:/gi,"\uff1a").replace(/,/gi,"\uff0c")),n.val(i)}),this.goSubmit=function(){n.vm&&(n.vm.submitting=!0);var o=e(n).find("input[type='submit'],button[type='submit']").attr("disabled",!0),r=null;if(o.is("button")&&(r=o.html(),o.html('<i class="am-icon-circle-o-notch am-icon-spin"></i>\u6b63\u5728\u63d0\u4ea4...')),"function"==typeof FormData){var s=t.timeout||15e3,a=new FormData(this),l=i.attr("action");try{var c=setTimeout(function(){o.prop("disabled",!1).html(r),t.error&&t.error("\u7f51\u7edc\u8bf7\u6c42\u8d85\u65f6\uff01")},s+1e3);e.ajax({url:l,type:"POST",dataType:"json",data:a,cache:!1,timeout:s,processData:!1,contentType:!1}).done(function(e){c&&(clearTimeout(c),c=null),n.vm&&(n.vm.submitting=!1),e.succ?(t.success(e.data),setTimeout(function(){o.prop("disabled",!1).html(r)},1e3)):(o.prop("disabled",!1).html(r),t.error?t.error(e.data):alert(e.data))}).fail(function(e,i,s){c&&(clearTimeout(c),c=null),n.vm&&(n.vm.submitting=!1),t.error&&t.error(i+" : "+e.statusText+" : "+e.responseText+"\r\n"+s),o.prop("disabled",!1).html(r)})}catch(d){alert("err:"+d.message)}return!1}var u=function(){i.ajaxForm({dataType:"json",success:function(e){alert(e),o.attr("disabled",!1).html(r),e.succ?t.success(e.data):alert(e.data)},error:function(e){alert(e),o.attr("disabled",!1).html(r)}})};if(document.getElementById("jquery_form"))u();else{var p=document.createElement("script");p.id="jquery_form",p.type="text/javascript",p.src="http://res.7csoft.com/lib/jquery/jquery.form.min.js",p.onload=u,document.body.appendChild(p)}};var o={namespace:"data-v-",trigger:"change",successClass:"am-form-success",errorClass:"am-form-error",errorsWrapper:'<div class="am-error-list"></div>',errorTemplate:'<div class="am-alert am-alert-danger"></div>',triggerAfterFailure:"change input",classHandler:function(e){return e.$element.closest(".am-form-group")},errorsContainer:function(e){return e.$element.hasClass("selectized")?e.$element.parent():e.$element[0]}};t.validate&&e.extend(o,t.validate),console.log("set parsley!"),e(this).parsley(o).on("form:validate",function(e){if(n.controls&&n.controls.length)for(var i=0;i<n.controls.length;i++)if(!n.controls[i].isValid())return void(e.validationResult=!1);return t.before&&!t.before.call(this)?void(e.validationResult=!1):void(e.validationResult=!0)}).on("form:submit",function(){return n.goSubmit(),!1}).on("form:validated",function(){e.each(this.fields,function(e,t){t.validationResult===!0?t.$element.removeClass("am-field-error").addClass("am-field-valid"):t.$element.removeClass("am-field-success").addClass("am-field-error")})}).on("field:validated",function(){this.validationResult===!0?this.$element.removeClass("am-field-error").addClass("am-field-valid"):this.$element.removeClass("am-field-success").addClass("am-field-error")})})},e.fn.fill=function(t){var n=function(t,i,o,r){for(var s in t)if(null!==t[s])if("object"!=typeof t[s]||t[s].length){var a,l=document.getElementsByName(r+s),c=l.length&&"checkbox"===e(l[0]).prop("type"),d=l.length&&"radio"===e(l[0]).prop("type");(c||d)&&(a=t[s]?t[s].toString().split(","):[]),e(l).each(function(){var n=e(this);if("string"!=typeof n.attr("data-fill-ignore")){if(o&&(n.attr("data-old",n.val()),i.inputs.push(this)),c||d)return void(a.indexOf(n.val())>=0&&(d?n.trigger("click"):this.checked?this.fireEvent("click"):n.trigger("click")));var r=n.attr("type"),l=n.attr("data-type"),u=n.attr("data-role");return"file"===r?void("image"===l&&n.attr("data-src")&&e("#"+n.attr("data-src")).prop("src",t[s])):void("editor"===u||"editor"===l?this.editor.setContent(t[s]):"tagsinput"===u?n.tagsinput(t[s]):this.hasAttribute("data-select-input")?(n.val(t[s]),this.fireEvent("update")):"SELECT"===this.nodeName&&this.selectize?this.selectize.setValue(t[s]):(n.val(t[s]),n.hasClass("select2")&&n.trigger("change.select2")))}})}else n(t[s],i,o,r+s+".")};return this.each(function(){var e=void 0==this.inputs;e&&(this.inputs=[]);var i=this;n(t,i,e,"")})},e.fn.resetForm=function(t){return this.each(function(){if(!this.inputs){this.inputs=[];var t=this;return void e(this).find("input,textarea,select").each(function(){var n=e(this).prop("type");"checkbox"===n||"radio"===n?e(this).attr("data-old",e(this).prop("checked")?"true":"false"):e(this).attr("data-old",e(this).val()),t.inputs.push(this)})}e(this.inputs).each(function(){var t=e(this),n=t.attr("type"),i=t.attr("data-old");if(void 0===i&&(i=""),"file"===n)return void("image"===t.attr("data-type")&&t.attr("data-src")&&e("#"+t.attr("data-src")).prop("src",i));if("editor"===t.attr("data-role")||"editor"===t.attr("data-type"))try{if(this.vue)return void this.vue.reset();this.editor.hasContents()&&(i||(i="<p></p>"),this.editor.setContent(i))}catch(o){}else if(this.hasAttribute("data-tags")||"tags"===t.attr("data-type"))t.tagsinput(i);else if("SELECT"===this.tagName&&t.hasClass("selectized"))this.selectize.setValue(i,!0);else if("INPUT"!==this.tagName||"checkbox"!==n&&"radio"!==n){try{t.val(i)}catch(o){}t.hasClass("select2")&&t.trigger("change.select2")}else t.prop("checked","true"===i)})})}}($),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.flatpickr=t()}(this,function(){"use strict";function e(e,t,n){return n!==!1?new Date(e.getTime()).setHours(0,0,0,0)-new Date(t.getTime()).setHours(0,0,0,0):e.getTime()-t.getTime()}function t(e,t,n){void 0===n&&(n=!1);var i;return function(){var o=this,r=arguments;null!==i&&clearTimeout(i),i=window.setTimeout(function(){i=null,n||e.apply(o,r)},t),n&&!i&&e.apply(o,r)}}function n(e){var t=e.wheelDelta||-e.deltaY;return t>=0?1:-1}function i(e,t,n){return n===!0?e.classList.add(t):void e.classList.remove(t)}function o(e,t,n){var i=window.document.createElement(e);return t=t||"",n=n||"",i.className=t,void 0!==n&&(i.textContent=n),i}function r(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function s(e,t){return t(e)?e:e.parentNode?s(e.parentNode,t):void 0}function a(e){var t=o("div","numInputWrapper"),n=o("input","numInput "+e),i=o("span","arrowUp"),r=o("span","arrowDown");return n.type="text",n.pattern="\\d*",t.appendChild(n),t.appendChild(i),t.appendChild(r),t}function l(l,c){function p(){Ae.utils={getDaysInMonth:function(e,t){return void 0===e&&(e=Ae.currentMonth),void 0===t&&(t=Ae.currentYear),1===e&&(t%4===0&&t%100!==0||t%400===0)?29:Ae.l10n.daysInMonth[e]}}}function f(){Ae.element=Ae.input=l,Ae.isOpen=!1,le(),ce(),be(),ve(),p(),Ae.isMobile||R(),I(),(Ae.selectedDates.length||Ae.config.noCalendar)&&(Ae.config.enableTime&&$(Ae.config.noCalendar?Ae.latestSelectedDateObj||Ae.config.minDate:void 0),De(!1)),Ae.showTimeInput=Ae.selectedDates.length>0||Ae.config.noCalendar,void 0!==Ae.weekWrapper&&void 0!==Ae.daysContainer&&(Ae.calendarContainer.style.width=Ae.daysContainer.offsetWidth+Ae.weekWrapper.offsetWidth+"px"),Ae.isMobile||de(),Se("onReady")}function m(e){return e.bind(Ae)}function w(e){if(Ae.config.noCalendar&&0===Ae.selectedDates.length){var t=Ae.config.minDate;Ae.setDate((new Date).setHours(t?t.getHours():Ae.config.defaultHour,t?t.getMinutes():Ae.config.defaultMinute,t&&Ae.config.enableSeconds?t.getSeconds():Ae.config.defaultSeconds),!1),k(),De()}Me(e),0!==Ae.selectedDates.length&&(!Ae.minDateHasTime||"input"!==e.type||e.target.value.length>=2?(k(),De()):setTimeout(function(){k(),De()},1e3))}function T(e,t){return e%12+12*v(t===Ae.l10n.amPM[1])}function _(e){switch(e%24){case 0:case 12:return 12;default:return e%12}}function k(){if(void 0!==Ae.hourElement&&void 0!==Ae.minuteElement){var t=(parseInt(Ae.hourElement.value.slice(-2),10)||0)%24,n=(parseInt(Ae.minuteElement.value,10)||0)%60,i=void 0!==Ae.secondElement?(parseInt(Ae.secondElement.value,10)||0)%60:0;void 0!==Ae.amPM&&(t=T(t,Ae.amPM.textContent)),Ae.config.minDate&&Ae.minDateHasTime&&Ae.latestSelectedDateObj&&0===e(Ae.latestSelectedDateObj,Ae.config.minDate)&&(t=Math.max(t,Ae.config.minDate.getHours()),t===Ae.config.minDate.getHours()&&(n=Math.max(n,Ae.config.minDate.getMinutes()))),Ae.config.maxDate&&Ae.maxDateHasTime&&Ae.latestSelectedDateObj&&0===e(Ae.latestSelectedDateObj,Ae.config.maxDate)&&(t=Math.min(t,Ae.config.maxDate.getHours()),t===Ae.config.maxDate.getHours()&&(n=Math.min(n,Ae.config.maxDate.getMinutes()))),D(t,n,i)}}function $(e){var t=e||Ae.latestSelectedDateObj;t&&D(t.getHours(),t.getMinutes(),t.getSeconds())}function D(e,t,n){void 0!==Ae.latestSelectedDateObj&&Ae.latestSelectedDateObj.setHours(e%24,t,n||0,0),Ae.hourElement&&Ae.minuteElement&&!Ae.isMobile&&(Ae.hourElement.value=g(Ae.config.time_24hr?e:(12+e)%12+12*v(e%12===0)),Ae.minuteElement.value=g(t),void 0!==Ae.amPM&&(Ae.amPM.textContent=Ae.l10n.amPM[v(e>=12)]),void 0!==Ae.secondElement&&(Ae.secondElement.value=g(n)))}function E(e){var t=parseInt(e.target.value)+(e.delta||0);4!==t.toString().length&&"Enter"!==e.key||(Ae.currentYearElement.blur(),/[^\d]/.test(t.toString())||te(t))}function O(e,t,n){return t instanceof Array?t.forEach(function(t){return O(e,t,n)}):e instanceof Array?e.forEach(function(e){return O(e,t,n)}):(e.addEventListener(t,n),void Ae._handlers.push({element:e,event:t,handler:n}))}function M(e){return function(t){1===t.which&&e(t)}}function A(){Se("onChange")}function I(){if(Ae.config.wrap&&["open","close","toggle","clear"].forEach(function(e){Array.prototype.forEach.call(Ae.element.querySelectorAll("[data-"+e+"]"),function(t){return O(t,"click",Ae[e])})}),Ae.isMobile)return void Ce();var e=t(re,50);if(Ae._debouncedChange=t(A,300),"range"===Ae.config.mode&&Ae.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&O(Ae.daysContainer,"mouseover",function(e){return oe(e.target)}),O(window.document.body,"keydown",ie),Ae.config["static"]||O(Ae._input,"keydown",ie),Ae.config.inline||Ae.config["static"]||O(window,"resize",e),void 0!==window.ontouchstart&&O(window.document.body,"touchstart",ee),O(window.document.body,"mousedown",M(ee)),O(Ae._input,"blur",ee),Ae.config.clickOpens===!0&&(O(Ae._input,"focus",Ae.open),O(Ae._input,"mousedown",M(Ae.open))),void 0!==Ae.daysContainer&&(Ae.monthNav.addEventListener("wheel",function(e){return e.preventDefault()}),O(Ae.monthNav,"wheel",t(Ee,10)),O(Ae.monthNav,"mousedown",M(Oe)),O(Ae.monthNav,["keyup","increment"],E),O(Ae.daysContainer,"mousedown",M(pe)),Ae.config.animate&&(O(Ae.daysContainer,["webkitAnimationEnd","animationend"],P),O(Ae.monthNav,["webkitAnimationEnd","animationend"],z))),void 0!==Ae.timeContainer&&void 0!==Ae.minuteElement&&void 0!==Ae.hourElement){var n=function(e){return e.target.select()};O(Ae.timeContainer,["wheel","input","increment"],w),O(Ae.timeContainer,"mousedown",M(j)),O(Ae.timeContainer,["wheel","increment"],Ae._debouncedChange),O(Ae.timeContainer,"input",A),O([Ae.hourElement,Ae.minuteElement],["focus","click"],n),void 0!==Ae.secondElement&&O(Ae.secondElement,"focus",function(){return Ae.secondElement&&Ae.secondElement.select()}),void 0!==Ae.amPM&&O(Ae.amPM,"mousedown",M(function(e){w(e),A()}))}}function F(){Ae._animationLoop.forEach(function(e){return e()}),Ae._animationLoop=[]}function P(e){if(Ae.daysContainer&&Ae.daysContainer.childNodes.length>1)switch(e.animationName){case"fpSlideLeft":Ae.daysContainer.lastChild&&Ae.daysContainer.lastChild.classList.remove("slideLeftNew"),Ae.daysContainer.removeChild(Ae.daysContainer.firstChild),Ae.days=Ae.daysContainer.firstChild,F();break;case"fpSlideRight":Ae.daysContainer.firstChild&&Ae.daysContainer.firstChild.classList.remove("slideRightNew"),Ae.daysContainer.removeChild(Ae.daysContainer.lastChild),Ae.days=Ae.daysContainer.firstChild,F()}}function z(e){switch(e.animationName){case"fpSlideLeftNew":case"fpSlideRightNew":Ae.navigationCurrentMonth.classList.remove("slideLeftNew"),Ae.navigationCurrentMonth.classList.remove("slideRightNew");for(var t=Ae.navigationCurrentMonth;t.nextSibling&&/curr/.test(t.nextSibling.className);)Ae.monthNav.removeChild(t.nextSibling);for(;t.previousSibling&&/curr/.test(t.previousSibling.className);)Ae.monthNav.removeChild(t.previousSibling);Ae.oldCurMonth=void 0}}function N(e){var t=void 0!==e?we(e):Ae.latestSelectedDateObj||(Ae.config.minDate&&Ae.config.minDate>Ae.now?Ae.config.minDate:Ae.config.maxDate&&Ae.config.maxDate<Ae.now?Ae.config.maxDate:Ae.now);try{void 0!==t&&(Ae.currentYear=t.getFullYear(),Ae.currentMonth=t.getMonth())}catch(n){n.message="Invalid date supplied: "+t,Ae.config.errorHandler(n)}Ae.redraw()}function j(e){~e.target.className.indexOf("arrow")&&L(e,e.target.classList.contains("arrowUp")?1:-1)}function L(e,t,n){var i=e&&e.target,o=n||i&&i.parentNode&&i.parentNode.firstChild,r=Te("increment");r.delta=t,o&&o.dispatchEvent(r)}function R(){var e=window.document.createDocumentFragment();if(Ae.calendarContainer=o("div","flatpickr-calendar"),Ae.calendarContainer.tabIndex=-1,!Ae.config.noCalendar){if(e.appendChild(V()),Ae.innerContainer=o("div","flatpickr-innerContainer"),Ae.config.weekNumbers){var t=X(),n=t.weekWrapper,r=t.weekNumbers;Ae.innerContainer.appendChild(n),Ae.weekNumbers=r,Ae.weekWrapper=n}Ae.rContainer=o("div","flatpickr-rContainer"),Ae.rContainer.appendChild(U()),Ae.daysContainer||(Ae.daysContainer=o("div","flatpickr-days"),Ae.daysContainer.tabIndex=-1),q(),Ae.rContainer.appendChild(Ae.daysContainer),Ae.innerContainer.appendChild(Ae.rContainer),e.appendChild(Ae.innerContainer)}Ae.config.enableTime&&e.appendChild(Y()),i(Ae.calendarContainer,"rangeMode","range"===Ae.config.mode),i(Ae.calendarContainer,"animate",Ae.config.animate),Ae.calendarContainer.appendChild(e);var s=void 0!==Ae.config.appendTo&&Ae.config.appendTo.nodeType;if((Ae.config.inline||Ae.config["static"])&&(Ae.calendarContainer.classList.add(Ae.config.inline?"inline":"static"),Ae.config.inline&&(!s&&Ae.element.parentNode?Ae.element.parentNode.insertBefore(Ae.calendarContainer,Ae._input.nextSibling):void 0!==Ae.config.appendTo&&Ae.config.appendTo.appendChild(Ae.calendarContainer)),Ae.config["static"])){var a=o("div","flatpickr-wrapper");Ae.element.parentNode&&Ae.element.parentNode.insertBefore(a,Ae.element),a.appendChild(Ae.element),Ae.altInput&&a.appendChild(Ae.altInput),a.appendChild(Ae.calendarContainer)}Ae.config["static"]||Ae.config.inline||(void 0!==Ae.config.appendTo?Ae.config.appendTo:window.document.body).appendChild(Ae.calendarContainer)}function H(t,n,r,s){var a=ne(n,!0),l=o("span","flatpickr-day "+t,n.getDate().toString());return l.dateObj=n,l.$i=s,l.setAttribute("aria-label",Ae.formatDate(n,Ae.config.ariaDateFormat)),0===e(n,Ae.now)&&(Ae.todayDateElem=l,l.classList.add("today")),a?(l.tabIndex=-1,_e(n)&&(l.classList.add("selected"),Ae.selectedDateElem=l,"range"===Ae.config.mode&&(i(l,"startRange",Ae.selectedDates[0]&&0===e(n,Ae.selectedDates[0])),i(l,"endRange",Ae.selectedDates[1]&&0===e(n,Ae.selectedDates[1]))))):(l.classList.add("disabled"),Ae.selectedDates[0]&&Ae.minRangeDate&&n>Ae.minRangeDate&&n<Ae.selectedDates[0]?Ae.minRangeDate=n:Ae.selectedDates[0]&&Ae.maxRangeDate&&n<Ae.maxRangeDate&&n>Ae.selectedDates[0]&&(Ae.maxRangeDate=n)),"range"===Ae.config.mode&&(ke(n)&&!_e(n)&&l.classList.add("inRange"),1===Ae.selectedDates.length&&void 0!==Ae.minRangeDate&&void 0!==Ae.maxRangeDate&&(n<Ae.minRangeDate||n>Ae.maxRangeDate)&&l.classList.add("notAllowed")),Ae.weekNumbers&&"prevMonthDay"!==t&&r%7===1&&Ae.weekNumbers.insertAdjacentHTML("beforeend","<span class='disabled flatpickr-day'>"+Ae.config.getWeek(n)+"</span>"),Se("onDayCreate",l),l}function B(e,t){var n=e+t||0,i=void 0!==e?Ae.days.childNodes[n]:Ae.selectedDateElem||Ae.todayDateElem||Ae.days.childNodes[0],o=function(){i=i||Ae.days.childNodes[n],i.focus(),"range"===Ae.config.mode&&oe(i)};return void 0===i&&0!==t?(t>0?(Ae.changeMonth(1,!0,void 0,!0),n%=42):t<0&&(Ae.changeMonth(-1,!0,void 0,!0),n+=42),W(o)):void o()}function W(e){Ae.config.animate===!0?Ae._animationLoop.push(e):e()}function q(e){if(void 0!==Ae.daysContainer){var t=(new Date(Ae.currentYear,Ae.currentMonth,1).getDay()-Ae.l10n.firstDayOfWeek+7)%7,n="range"===Ae.config.mode,i=Ae.utils.getDaysInMonth((Ae.currentMonth-1+12)%12),s=Ae.utils.getDaysInMonth(),a=window.document.createDocumentFragment(),l=i+1-t,c=0;for(Ae.weekNumbers&&Ae.weekNumbers.firstChild&&(Ae.weekNumbers.textContent=""),n&&(Ae.minRangeDate=new Date(Ae.currentYear,Ae.currentMonth-1,l),Ae.maxRangeDate=new Date(Ae.currentYear,Ae.currentMonth+1,(42-t)%s));l<=i;l++,c++)a.appendChild(H("prevMonthDay",new Date(Ae.currentYear,Ae.currentMonth-1,l),l,c));for(l=1;l<=s;l++,c++)a.appendChild(H("",new Date(Ae.currentYear,Ae.currentMonth,l),l,c));for(var d=s+1;d<=42-t;d++,c++)a.appendChild(H("nextMonthDay",new Date(Ae.currentYear,Ae.currentMonth+1,d%s),d,c));n&&1===Ae.selectedDates.length&&a.childNodes[0]?(Ae._hidePrevMonthArrow=Ae._hidePrevMonthArrow||!!Ae.minRangeDate&&Ae.minRangeDate>a.childNodes[0].dateObj,Ae._hideNextMonthArrow=Ae._hideNextMonthArrow||!!Ae.maxRangeDate&&Ae.maxRangeDate<new Date(Ae.currentYear,Ae.currentMonth+1,1)):$e();var u=o("div","dayContainer");if(u.appendChild(a),Ae.config.animate&&void 0!==e)for(;Ae.daysContainer.childNodes.length>1;)Ae.daysContainer.removeChild(Ae.daysContainer.firstChild);else r(Ae.daysContainer);e&&e>=0?Ae.daysContainer.appendChild(u):Ae.daysContainer.insertBefore(u,Ae.daysContainer.firstChild),Ae.days=Ae.daysContainer.childNodes[0]}}function V(){var e=window.document.createDocumentFragment();Ae.monthNav=o("div","flatpickr-month"),Ae.prevMonthNav=o("span","flatpickr-prev-month"),Ae.prevMonthNav.innerHTML=Ae.config.prevArrow,Ae.currentMonthElement=o("span","cur-month"),Ae.currentMonthElement.title=Ae.l10n.scrollTitle;var t=a("cur-year");return Ae.currentYearElement=t.childNodes[0],Ae.currentYearElement.title=Ae.l10n.scrollTitle,Ae.config.minDate&&(Ae.currentYearElement.min=Ae.config.minDate.getFullYear().toString()),Ae.config.maxDate&&(Ae.currentYearElement.max=Ae.config.maxDate.getFullYear().toString(),Ae.currentYearElement.disabled=!!Ae.config.minDate&&Ae.config.minDate.getFullYear()===Ae.config.maxDate.getFullYear()),Ae.nextMonthNav=o("span","flatpickr-next-month"),Ae.nextMonthNav.innerHTML=Ae.config.nextArrow,Ae.navigationCurrentMonth=o("div","flatpickr-current-month"),Ae.navigationCurrentMonth.appendChild(Ae.currentMonthElement),Ae.navigationCurrentMonth.appendChild(t),e.appendChild(Ae.prevMonthNav),e.appendChild(Ae.navigationCurrentMonth),e.appendChild(Ae.nextMonthNav),Ae.monthNav.appendChild(e),Object.defineProperty(Ae,"_hidePrevMonthArrow",{get:function(){return Ae.__hidePrevMonthArrow},set:function(e){Ae.__hidePrevMonthArrow!==e&&(Ae.prevMonthNav.style.display=e?"none":"block"),Ae.__hidePrevMonthArrow=e}}),Object.defineProperty(Ae,"_hideNextMonthArrow",{get:function(){return Ae.__hideNextMonthArrow},set:function(e){Ae.__hideNextMonthArrow!==e&&(Ae.nextMonthNav.style.display=e?"none":"block"),Ae.__hideNextMonthArrow=e}}),$e(),Ae.monthNav}function Y(){Ae.calendarContainer.classList.add("hasTime"),Ae.config.noCalendar&&Ae.calendarContainer.classList.add("noCalendar"),Ae.timeContainer=o("div","flatpickr-time"),Ae.timeContainer.tabIndex=-1;var e=o("span","flatpickr-time-separator",":"),t=a("flatpickr-hour");Ae.hourElement=t.childNodes[0];var n=a("flatpickr-minute");if(Ae.minuteElement=n.childNodes[0],Ae.hourElement.tabIndex=Ae.minuteElement.tabIndex=-1,Ae.hourElement.value=g(Ae.latestSelectedDateObj?Ae.latestSelectedDateObj.getHours():Ae.config.time_24hr?Ae.config.defaultHour:_(Ae.config.defaultHour)),Ae.minuteElement.value=g(Ae.latestSelectedDateObj?Ae.latestSelectedDateObj.getMinutes():Ae.config.defaultMinute),Ae.hourElement.step=Ae.config.hourIncrement.toString(),Ae.minuteElement.step=Ae.config.minuteIncrement.toString(),Ae.hourElement.min=Ae.config.time_24hr?"0":"1",Ae.hourElement.max=Ae.config.time_24hr?"23":"12",Ae.minuteElement.min="0",Ae.minuteElement.max="59",Ae.hourElement.title=Ae.minuteElement.title=Ae.l10n.scrollTitle,Ae.timeContainer.appendChild(t),Ae.timeContainer.appendChild(e),Ae.timeContainer.appendChild(n),Ae.config.time_24hr&&Ae.timeContainer.classList.add("time24hr"),Ae.config.enableSeconds){Ae.timeContainer.classList.add("hasSeconds");var i=a("flatpickr-second");Ae.secondElement=i.childNodes[0],Ae.secondElement.value=g(Ae.latestSelectedDateObj?Ae.latestSelectedDateObj.getSeconds():Ae.config.defaultSeconds),Ae.secondElement.step=Ae.minuteElement.step,Ae.secondElement.min=Ae.minuteElement.min,Ae.secondElement.max=Ae.minuteElement.max,Ae.timeContainer.appendChild(o("span","flatpickr-time-separator",":")),Ae.timeContainer.appendChild(i)}return Ae.config.time_24hr||(Ae.amPM=o("span","flatpickr-am-pm",Ae.l10n.amPM[v((Ae.latestSelectedDateObj?Ae.hourElement.value:Ae.config.defaultHour)>11)]),Ae.amPM.title=Ae.l10n.toggleTitle,Ae.amPM.tabIndex=-1,Ae.timeContainer.appendChild(Ae.amPM)),Ae.timeContainer}function U(){Ae.weekdayContainer||(Ae.weekdayContainer=o("div","flatpickr-weekdays"));var e=Ae.l10n.firstDayOfWeek,t=Ae.l10n.weekdays.shorthand.slice();return e>0&&e<t.length&&(t=t.splice(e,t.length).concat(t.splice(0,e))),Ae.weekdayContainer.innerHTML="\n    <span class=flatpickr-weekday>\n      "+t.join("</span><span class=flatpickr-weekday>")+"\n    </span>\n    ",Ae.weekdayContainer}function X(){Ae.calendarContainer.classList.add("hasWeeks");var e=o("div","flatpickr-weekwrapper");e.appendChild(o("span","flatpickr-weekday",Ae.l10n.weekAbbreviation));var t=o("div","flatpickr-weeks");return e.appendChild(t),{weekWrapper:e,weekNumbers:t}}function K(e,t,n,i){void 0===t&&(t=!0),void 0===n&&(n=Ae.config.animate),void 0===i&&(i=!1);var o=t?e:e-Ae.currentMonth;if(!(o<0&&Ae._hidePrevMonthArrow||o>0&&Ae._hideNextMonthArrow)){if(Ae.currentMonth+=o,(Ae.currentMonth<0||Ae.currentMonth>11)&&(Ae.currentYear+=Ae.currentMonth>11?1:-1,Ae.currentMonth=(Ae.currentMonth+12)%12,Se("onYearChange")),q(n?o:void 0),!n)return Se("onMonthChange"),$e();var r=Ae.navigationCurrentMonth;if(o<0)for(;r.nextSibling&&/curr/.test(r.nextSibling.className);)Ae.monthNav.removeChild(r.nextSibling);else if(o>0)for(;r.previousSibling&&/curr/.test(r.previousSibling.className);)Ae.monthNav.removeChild(r.previousSibling);Ae.oldCurMonth=Ae.navigationCurrentMonth,Ae.navigationCurrentMonth=Ae.monthNav.insertBefore(Ae.oldCurMonth.cloneNode(!0),o>0?Ae.oldCurMonth.nextSibling:Ae.oldCurMonth);var s=Ae.daysContainer;if(s.firstChild&&s.lastChild&&(o>0?(s.firstChild.classList.add("slideLeft"),s.lastChild.classList.add("slideLeftNew"),Ae.oldCurMonth.classList.add("slideLeft"),Ae.navigationCurrentMonth.classList.add("slideLeftNew")):o<0&&(s.firstChild.classList.add("slideRightNew"),s.lastChild.classList.add("slideRight"),Ae.oldCurMonth.classList.add("slideRight"),Ae.navigationCurrentMonth.classList.add("slideRightNew"))),Ae.currentMonthElement=Ae.navigationCurrentMonth.firstChild,Ae.currentYearElement=Ae.navigationCurrentMonth.lastChild.childNodes[0],$e(),Ae.oldCurMonth.firstChild&&(Ae.oldCurMonth.firstChild.textContent=u(Ae.currentMonth-o,Ae.config.shorthandCurrentMonth,Ae.l10n)),W(function(){return Se("onMonthChange")}),i&&document.activeElement&&document.activeElement.$i){var a=document.activeElement.$i;W(function(){B(a,0)})}}}function G(e){void 0===e&&(e=!0),Ae.input.value="",Ae.altInput&&(Ae.altInput.value=""),Ae.mobileInput&&(Ae.mobileInput.value=""),Ae.selectedDates=[],Ae.latestSelectedDateObj=void 0,Ae.showTimeInput=!1,Ae.redraw(),e&&Se("onChange")}function J(){Ae.isOpen=!1,Ae.isMobile||(Ae.calendarContainer.classList.remove("open"),Ae._input.classList.remove("active")),Se("onClose")}function Q(){void 0!==Ae.config&&Se("onDestroy");for(var e=Ae._handlers.length;e--;){var t=Ae._handlers[e];t.element.removeEventListener(t.event,t.handler)}Ae._handlers=[],Ae.mobileInput?(Ae.mobileInput.parentNode&&Ae.mobileInput.parentNode.removeChild(Ae.mobileInput),Ae.mobileInput=void 0):Ae.calendarContainer&&Ae.calendarContainer.parentNode&&Ae.calendarContainer.parentNode.removeChild(Ae.calendarContainer),
Ae.altInput&&(Ae.input.type="text",Ae.altInput.parentNode&&Ae.altInput.parentNode.removeChild(Ae.altInput),delete Ae.altInput),Ae.input&&(Ae.input.type=Ae.input._type,Ae.input.classList.remove("flatpickr-input"),Ae.input.removeAttribute("readonly"),Ae.input.value=""),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(e){try{delete Ae[e]}catch(t){}})}function Z(e){return!(!Ae.config.appendTo||!Ae.config.appendTo.contains(e))||Ae.calendarContainer.contains(e)}function ee(e){if(Ae.isOpen&&!Ae.config.inline){var t=Z(e.target),n=e.target===Ae.input||e.target===Ae.altInput||Ae.element.contains(e.target)||e.path&&e.path.indexOf&&(~e.path.indexOf(Ae.input)||~e.path.indexOf(Ae.altInput)),i="blur"===e.type?n&&e.relatedTarget&&!Z(e.relatedTarget):!n&&!t;i&&Ae.config.ignoredFocusElements.indexOf(e.target)===-1&&(Ae.close(),"range"===Ae.config.mode&&1===Ae.selectedDates.length&&(Ae.clear(!1),Ae.redraw()))}}function te(e){if(!(!e||Ae.currentYearElement.min&&e<parseInt(Ae.currentYearElement.min)||Ae.currentYearElement.max&&e>parseInt(Ae.currentYearElement.max))){var t=e,n=Ae.currentYear!==t;Ae.currentYear=t||Ae.currentYear,Ae.config.maxDate&&Ae.currentYear===Ae.config.maxDate.getFullYear()?Ae.currentMonth=Math.min(Ae.config.maxDate.getMonth(),Ae.currentMonth):Ae.config.minDate&&Ae.currentYear===Ae.config.minDate.getFullYear()&&(Ae.currentMonth=Math.max(Ae.config.minDate.getMonth(),Ae.currentMonth)),n&&(Ae.redraw(),Se("onYearChange"))}}function ne(t,n){void 0===n&&(n=!0);var i=Ae.parseDate(t,void 0,n);if(Ae.config.minDate&&i&&e(i,Ae.config.minDate,void 0!==n?n:!Ae.minDateHasTime)<0||Ae.config.maxDate&&i&&e(i,Ae.config.maxDate,void 0!==n?n:!Ae.maxDateHasTime)>0)return!1;if(!Ae.config.enable.length&&!Ae.config.disable.length)return!0;if(void 0===i)return!1;for(var o=Ae.config.enable.length>0,r=o?Ae.config.enable:Ae.config.disable,s=0,a=void 0;s<r.length;s++){if(a=r[s],"function"==typeof a&&a(i))return o;if(a instanceof Date&&void 0!==i&&a.getTime()===i.getTime())return o;if("string"==typeof a&&void 0!==i){var l=Ae.parseDate(a,void 0,!0);return l&&l.getTime()===i.getTime()?o:!o}if("object"==typeof a&&void 0!==i&&a.from&&a.to&&i.getTime()>=a.from.getTime()&&i.getTime()<=a.to.getTime())return o}return!o}function ie(e){var t=e.target===Ae._input,n=Z(e.target),i=Ae.config.allowInput,o=Ae.isOpen&&(!i||!t),r=Ae.config.inline&&t&&!i;if("Enter"===e.key&&t){if(i)return Ae.setDate(Ae._input.value,!0,e.target===Ae.altInput?Ae.config.altFormat:Ae.config.dateFormat),e.target.blur();Ae.open()}else if(n||o||r){var s=!!Ae.timeContainer&&Ae.timeContainer.contains(e.target);switch(e.key){case"Enter":s?De():pe(e);break;case"Escape":e.preventDefault(),Ae.close();break;case"Backspace":case"Delete":t&&!Ae.config.allowInput&&Ae.clear();break;case"ArrowLeft":case"ArrowRight":if(s)Ae.hourElement&&Ae.hourElement.focus();else if(e.preventDefault(),Ae.daysContainer){var a="ArrowRight"===e.key?1:-1;e.ctrlKey?K(a,!0,void 0,!0):B(e.target.$i,a)}break;case"ArrowUp":case"ArrowDown":e.preventDefault();var l="ArrowDown"===e.key?1:-1;Ae.daysContainer&&void 0!==e.target.$i?e.ctrlKey?(te(Ae.currentYear-l),B(e.target.$i,0)):s||B(e.target.$i,7*l):Ae.config.enableTime&&(!s&&Ae.hourElement&&Ae.hourElement.focus(),w(e),Ae._debouncedChange());break;case"Tab":e.target===Ae.hourElement?(e.preventDefault(),Ae.minuteElement.select()):e.target===Ae.minuteElement&&(Ae.secondElement||Ae.amPM)?(e.preventDefault(),void 0!==Ae.secondElement?Ae.secondElement.focus():void 0!==Ae.amPM&&Ae.amPM.focus()):e.target===Ae.secondElement&&Ae.amPM&&(e.preventDefault(),Ae.amPM.focus());break;case Ae.l10n.amPM[0].charAt(0):void 0!==Ae.amPM&&e.target===Ae.amPM&&(Ae.amPM.textContent=Ae.l10n.amPM[0],k(),De());break;case Ae.l10n.amPM[1].charAt(0):void 0!==Ae.amPM&&e.target===Ae.amPM&&(Ae.amPM.textContent=Ae.l10n.amPM[1],k(),De())}Se("onKeyDown",e)}}function oe(e){if(1===Ae.selectedDates.length&&e.classList.contains("flatpickr-day")&&void 0!==Ae.minRangeDate&&void 0!==Ae.maxRangeDate){for(var t=e.dateObj,n=Ae.parseDate(Ae.selectedDates[0],void 0,!0),i=Math.min(t.getTime(),Ae.selectedDates[0].getTime()),o=Math.max(t.getTime(),Ae.selectedDates[0].getTime()),r=!1,s=i;s<o;s+=h.DAY)if(!ne(new Date(s))){r=!0;break}for(var a=function(s,a){var l=a.getTime(),c=l<Ae.minRangeDate.getTime()||l>Ae.maxRangeDate.getTime(),d=Ae.days.childNodes[s];if(c)return d.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(e){d.classList.remove(e)}),"continue";if(r&&!c)return"continue";["startRange","inRange","endRange","notAllowed"].forEach(function(e){d.classList.remove(e)});var u=Math.max(Ae.minRangeDate.getTime(),i),p=Math.min(Ae.maxRangeDate.getTime(),o);e.classList.add(t<Ae.selectedDates[0]?"startRange":"endRange"),n<t&&l===n.getTime()?d.classList.add("startRange"):n>t&&l===n.getTime()&&d.classList.add("endRange"),l>=u&&l<=p&&d.classList.add("inRange")},l=0,c=Ae.days.childNodes[l].dateObj;l<42;l++,c=Ae.days.childNodes[l]&&Ae.days.childNodes[l].dateObj)a(l,c)}}function re(){!Ae.isOpen||Ae.config["static"]||Ae.config.inline||de()}function se(e,t){if(void 0===t&&(t=Ae._input),Ae.isMobile)return e&&(e.preventDefault(),e.target&&e.target.blur()),setTimeout(function(){void 0!==Ae.mobileInput&&Ae.mobileInput.click()},0),void Se("onOpen");if(!Ae._input.disabled&&!Ae.config.inline){var n=Ae.isOpen;Ae.isOpen=!0,de(t),Ae.calendarContainer.classList.add("open"),Ae._input.classList.add("active"),!n&&Se("onOpen")}}function ae(e){return function(t){var n=Ae.config["_"+e+"Date"]=Ae.parseDate(t),i=Ae.config["_"+("min"===e?"max":"min")+"Date"];void 0!==n&&(Ae["min"===e?"minDateHasTime":"maxDateHasTime"]=n.getHours()>0||n.getMinutes()>0||n.getSeconds()>0),Ae.selectedDates&&(Ae.selectedDates=Ae.selectedDates.filter(function(e){return ne(e)}),Ae.selectedDates.length||"min"!==e||$(n),De()),Ae.daysContainer&&(ue(),void 0!==n?Ae.currentYearElement[e]=n.getFullYear().toString():Ae.currentYearElement.removeAttribute(e),Ae.currentYearElement.disabled=!!i&&void 0!==n&&i.getFullYear()===n.getFullYear())}}function le(){var e=["wrap","weekNumbers","allowInput","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],t=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange"];Ae.config=d({},S.defaultConfig);var n=d({},c,JSON.parse(JSON.stringify(l.dataset||{}))),i={};Object.defineProperty(Ae.config,"enable",{get:function(){return Ae.config._enable||[]},set:function(e){Ae.config._enable=ge(e)}}),Object.defineProperty(Ae.config,"disable",{get:function(){return Ae.config._disable||[]},set:function(e){Ae.config._disable=ge(e)}}),!n.dateFormat&&n.enableTime&&(i.dateFormat=n.noCalendar?"H:i"+(n.enableSeconds?":S":""):S.defaultConfig.dateFormat+" H:i"+(n.enableSeconds?":S":"")),n.altInput&&n.enableTime&&!n.altFormat&&(i.altFormat=n.noCalendar?"h:i"+(n.enableSeconds?":S K":" K"):S.defaultConfig.altFormat+(" h:i"+(n.enableSeconds?":S":"")+" K")),Object.defineProperty(Ae.config,"minDate",{get:function(){return Ae.config._minDate},set:ae("min")}),Object.defineProperty(Ae.config,"maxDate",{get:function(){return Ae.config._maxDate},set:ae("max")}),Object.assign(Ae.config,i,n);for(var o=0;o<e.length;o++)Ae.config[e[o]]=Ae.config[e[o]]===!0||"true"===Ae.config[e[o]];for(var o=t.length;o--;)void 0!==Ae.config[t[o]]&&(Ae.config[t[o]]=y(Ae.config[t[o]]||[]).map(m));for(var o=0;o<Ae.config.plugins.length;o++){var r=Ae.config.plugins[o](Ae)||{};for(var s in r)~t.indexOf(s)?Ae.config[s]=y(r[s]).map(m).concat(Ae.config[s]):"undefined"==typeof n[s]&&(Ae.config[s]=r[s])}Ae.isMobile=!Ae.config.disableMobile&&!Ae.config.inline&&"single"===Ae.config.mode&&!Ae.config.disable.length&&!Ae.config.enable.length&&!Ae.config.weekNumbers&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),Se("onParseConfig")}function ce(){"object"!=typeof Ae.config.locale&&"undefined"==typeof S.l10ns[Ae.config.locale]&&Ae.config.errorHandler(new Error("flatpickr: invalid locale "+Ae.config.locale)),Ae.l10n=d({},S.l10ns["default"],"object"==typeof Ae.config.locale?Ae.config.locale:"default"!==Ae.config.locale?S.l10ns[Ae.config.locale]:void 0),C.K="("+Ae.l10n.amPM[0]+"|"+Ae.l10n.amPM[1]+"|"+Ae.l10n.amPM[0].toLowerCase()+"|"+Ae.l10n.amPM[1].toLowerCase()+")"}function de(e){if(void 0===e&&(e=Ae._positionElement),void 0!==Ae.calendarContainer){var t=Ae.calendarContainer.offsetHeight,n=Ae.calendarContainer.offsetWidth,o=Ae.config.position,r=e.getBoundingClientRect(),s=window.innerHeight-r.bottom,a="above"===o||"below"!==o&&s<t&&r.top>t,l=window.pageYOffset+r.top+(a?-t-2:e.offsetHeight+2);if(i(Ae.calendarContainer,"arrowTop",!a),i(Ae.calendarContainer,"arrowBottom",a),!Ae.config.inline){var c=window.pageXOffset+r.left,d=window.document.body.offsetWidth-r.right,u=c+n>window.document.body.offsetWidth;i(Ae.calendarContainer,"rightMost",u),Ae.config["static"]||(Ae.calendarContainer.style.top=l+"px",u?(Ae.calendarContainer.style.left="auto",Ae.calendarContainer.style.right=d+"px"):(Ae.calendarContainer.style.left=c+"px",Ae.calendarContainer.style.right="auto"))}}}function ue(){Ae.config.noCalendar||Ae.isMobile||(U(),$e(),q())}function pe(t){t.preventDefault(),t.stopPropagation();var n=function(e){return e.classList&&e.classList.contains("flatpickr-day")&&!e.classList.contains("disabled")&&!e.classList.contains("notAllowed")},i=s(t.target,n);if(void 0!==i){var o=i,r=Ae.latestSelectedDateObj=new Date(o.dateObj.getTime()),a=r.getMonth()!==Ae.currentMonth&&"range"!==Ae.config.mode;if(Ae.selectedDateElem=o,"single"===Ae.config.mode)Ae.selectedDates=[r];else if("multiple"===Ae.config.mode){var l=_e(r);l?Ae.selectedDates.splice(parseInt(l),1):Ae.selectedDates.push(r)}else"range"===Ae.config.mode&&(2===Ae.selectedDates.length&&Ae.clear(),Ae.selectedDates.push(r),0!==e(r,Ae.selectedDates[0],!0)&&Ae.selectedDates.sort(function(e,t){return e.getTime()-t.getTime()}));if(k(),a){var c=Ae.currentYear!==r.getFullYear();Ae.currentYear=r.getFullYear(),Ae.currentMonth=r.getMonth(),c&&Se("onYearChange"),Se("onMonthChange")}if(q(),Ae.config.minDate&&Ae.minDateHasTime&&Ae.config.enableTime&&0===e(r,Ae.config.minDate)&&$(Ae.config.minDate),De(),Ae.config.enableTime&&setTimeout(function(){return Ae.showTimeInput=!0},50),"range"===Ae.config.mode&&(1===Ae.selectedDates.length?(oe(o),Ae._hidePrevMonthArrow=Ae._hidePrevMonthArrow||void 0!==Ae.minRangeDate&&Ae.minRangeDate>Ae.days.childNodes[0].dateObj,Ae._hideNextMonthArrow=Ae._hideNextMonthArrow||void 0!==Ae.maxRangeDate&&Ae.maxRangeDate<new Date(Ae.currentYear,Ae.currentMonth+1,1)):$e()),Se("onChange"),a?W(function(){return Ae.selectedDateElem&&Ae.selectedDateElem.focus()}):B(o.$i,0),void 0!==Ae.hourElement&&setTimeout(function(){return void 0!==Ae.hourElement&&Ae.hourElement.select()},451),Ae.config.closeOnSelect){var d="single"===Ae.config.mode&&!Ae.config.enableTime,u="range"===Ae.config.mode&&2===Ae.selectedDates.length&&!Ae.config.enableTime;(d||u)&&Ae.close()}}}function he(e,t){null!==e&&"object"==typeof e?Object.assign(Ae.config,e):Ae.config[e]=t,Ae.redraw(),N()}function fe(e,t){var n=[];if(e instanceof Array)n=e.map(function(e){return Ae.parseDate(e,t)});else if(e instanceof Date||"number"==typeof e)n=[Ae.parseDate(e,t)];else if("string"==typeof e)switch(Ae.config.mode){case"single":n=[Ae.parseDate(e,t)];break;case"multiple":n=e.split(Ae.config.conjunction).map(function(e){return Ae.parseDate(e,t)});break;case"range":n=e.split(Ae.l10n.rangeSeparator).map(function(e){return Ae.parseDate(e,t)})}else Ae.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(e)));Ae.selectedDates=n.filter(function(e){return e instanceof Date&&ne(e,!1)}),Ae.selectedDates.sort(function(e,t){return e.getTime()-t.getTime()})}function me(e,t,n){return void 0===t&&(t=!1),0===e||e?(fe(e,n),Ae.showTimeInput=Ae.selectedDates.length>0,Ae.latestSelectedDateObj=Ae.selectedDates[0],Ae.redraw(),N(),$(),De(t),void(t&&Se("onChange"))):Ae.clear(t)}function ge(e){return e.map(function(e){return"string"==typeof e||"number"==typeof e||e instanceof Date?Ae.parseDate(e,void 0,!0):e&&"object"==typeof e&&e.from&&e.to?{from:Ae.parseDate(e.from,void 0),to:Ae.parseDate(e.to,void 0)}:e}).filter(function(e){return e})}function ve(){Ae.selectedDates=[],Ae.now=new Date;var e=Ae.config.defaultDate||Ae.input.value;e&&fe(e,Ae.config.dateFormat);var t=Ae.selectedDates.length?Ae.selectedDates[0]:Ae.config.minDate&&Ae.config.minDate.getTime()>Ae.now.getTime()?Ae.config.minDate:Ae.config.maxDate&&Ae.config.maxDate.getTime()<Ae.now.getTime()?Ae.config.maxDate:Ae.now;Ae.currentYear=t.getFullYear(),Ae.currentMonth=t.getMonth(),Ae.selectedDates.length&&(Ae.latestSelectedDateObj=Ae.selectedDates[0]),Ae.minDateHasTime=!!Ae.config.minDate&&(Ae.config.minDate.getHours()>0||Ae.config.minDate.getMinutes()>0||Ae.config.minDate.getSeconds()>0),Ae.maxDateHasTime=!!Ae.config.maxDate&&(Ae.config.maxDate.getHours()>0||Ae.config.maxDate.getMinutes()>0||Ae.config.maxDate.getSeconds()>0),Object.defineProperty(Ae,"showTimeInput",{get:function(){return Ae._showTimeInput},set:function(e){Ae._showTimeInput=e,Ae.calendarContainer&&i(Ae.calendarContainer,"showTimeInput",e),de()}})}function ye(e,t){return void 0!==Ae.config&&void 0!==Ae.config.formatDate?Ae.config.formatDate(e,t):t.split("").map(function(t,n,i){return x[t]&&"\\"!==i[n-1]?x[t](e,Ae.l10n,Ae.config):"\\"!==t?t:""}).join("")}function we(e,t,n){if(0===e||e){var i,o=e;if(e instanceof Date)i=new Date(e.getTime());else if("string"!=typeof e&&void 0!==e.toFixed)i=new Date(e);else if("string"==typeof e){var r=t||(Ae.config||S.defaultConfig).dateFormat,s=String(e).trim();if("today"===s)i=new Date,n=!0;else if(/Z$/.test(s)||/GMT$/.test(s))i=new Date(e);else if(Ae.config&&Ae.config.parseDate)i=Ae.config.parseDate(e,r);else{i=Ae.config&&Ae.config.noCalendar?new Date((new Date).setHours(0,0,0,0)):new Date((new Date).getFullYear(),0,1,0,0,0,0);for(var a=void 0,l=[],c=0,d=0,u="";c<r.length;c++){var p=r[c],h="\\"===p,f="\\"===r[c-1]||h;if(C[p]&&!f){u+=C[p];var m=new RegExp(u).exec(e);m&&(a=!0)&&l["Y"!==p?"push":"unshift"]({fn:b[p],val:m[++d]})}else h||(u+=".");l.forEach(function(e){var t=e.fn,n=e.val;return i=t(i,n,Ae.l10n)||i})}i=a?i:void 0}}return i instanceof Date?(n===!0&&i.setHours(0,0,0,0),i):void Ae.config.errorHandler(new Error("Invalid date provided: "+o))}}function be(){return Ae.input=Ae.config.wrap?l.querySelector("[data-input]"):l,Ae.input?(Ae.input._type=Ae.input.type,Ae.input.type="text",Ae.input.classList.add("flatpickr-input"),Ae._input=Ae.input,Ae.config.altInput&&(Ae.altInput=o(Ae.input.nodeName,Ae.input.className+" "+Ae.config.altInputClass),Ae._input=Ae.altInput,Ae.altInput.placeholder=Ae.input.placeholder,Ae.altInput.disabled=Ae.input.disabled,Ae.altInput.required=Ae.input.required,Ae.altInput.type="text",Ae.input.type="hidden",!Ae.config["static"]&&Ae.input.parentNode&&Ae.input.parentNode.insertBefore(Ae.altInput,Ae.input.nextSibling)),Ae.config.allowInput||Ae._input.setAttribute("readonly","readonly"),void(Ae._positionElement=Ae.config.positionElement||Ae._input)):void Ae.config.errorHandler(new Error("Invalid input element specified"))}function Ce(){var e=Ae.config.enableTime?Ae.config.noCalendar?"time":"datetime-local":"date";Ae.mobileInput=o("input",Ae.input.className+" flatpickr-mobile"),Ae.mobileInput.step=Ae.input.getAttribute("step")||"any",Ae.mobileInput.tabIndex=1,Ae.mobileInput.type=e,Ae.mobileInput.disabled=Ae.input.disabled,Ae.mobileInput.placeholder=Ae.input.placeholder,Ae.mobileFormatStr="datetime-local"===e?"Y-m-d\\TH:i:S":"date"===e?"Y-m-d":"H:i:S",Ae.selectedDates.length&&(Ae.mobileInput.defaultValue=Ae.mobileInput.value=Ae.formatDate(Ae.selectedDates[0],Ae.mobileFormatStr)),Ae.config.minDate&&(Ae.mobileInput.min=Ae.formatDate(Ae.config.minDate,"Y-m-d")),Ae.config.maxDate&&(Ae.mobileInput.max=Ae.formatDate(Ae.config.maxDate,"Y-m-d")),Ae.input.type="hidden",void 0!==Ae.altInput&&(Ae.altInput.type="hidden");try{Ae.input.parentNode&&Ae.input.parentNode.insertBefore(Ae.mobileInput,Ae.input.nextSibling)}catch(t){}O(Ae.mobileInput,"change",function(e){Ae.setDate(e.target.value,!1,Ae.mobileFormatStr),Se("onChange"),Se("onClose")})}function xe(){return Ae.isOpen?Ae.close():void Ae.open()}function Se(e,t){var n=Ae.config[e];if(void 0!==n&&n.length>0)for(var i=0;n[i]&&i<n.length;i++)n[i](Ae.selectedDates,Ae.input.value,Ae,t);"onChange"===e&&(Ae.input.dispatchEvent(Te("change")),Ae.input.dispatchEvent(Te("input")))}function Te(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!0),t}function _e(t){for(var n=0;n<Ae.selectedDates.length;n++)if(0===e(Ae.selectedDates[n],t))return""+n;return!1}function ke(t){return!("range"!==Ae.config.mode||Ae.selectedDates.length<2)&&(e(t,Ae.selectedDates[0])>=0&&e(t,Ae.selectedDates[1])<=0)}function $e(){Ae.config.noCalendar||Ae.isMobile||!Ae.monthNav||(Ae.currentMonthElement.textContent=u(Ae.currentMonth,Ae.config.shorthandCurrentMonth,Ae.l10n)+" ",Ae.currentYearElement.value=Ae.currentYear.toString(),Ae._hidePrevMonthArrow=void 0!==Ae.config.minDate&&(Ae.currentYear===Ae.config.minDate.getFullYear()?Ae.currentMonth<=Ae.config.minDate.getMonth():Ae.currentYear<Ae.config.minDate.getFullYear()),Ae._hideNextMonthArrow=void 0!==Ae.config.maxDate&&(Ae.currentYear===Ae.config.maxDate.getFullYear()?Ae.currentMonth+1>Ae.config.maxDate.getMonth():Ae.currentYear>Ae.config.maxDate.getFullYear()))}function De(e){if(void 0===e&&(e=!0),!Ae.selectedDates.length)return Ae.clear(e);void 0!==Ae.mobileInput&&Ae.mobileFormatStr&&(Ae.mobileInput.value=void 0!==Ae.latestSelectedDateObj?Ae.formatDate(Ae.latestSelectedDateObj,Ae.mobileFormatStr):"");var t="range"!==Ae.config.mode?Ae.config.conjunction:Ae.l10n.rangeSeparator;Ae.input.value=Ae.selectedDates.map(function(e){return Ae.formatDate(e,Ae.config.dateFormat)}).join(t),void 0!==Ae.altInput&&(Ae.altInput.value=Ae.selectedDates.map(function(e){return Ae.formatDate(e,Ae.config.altFormat)}).join(t)),e!==!1&&Se("onValueUpdate")}function Ee(e){e.preventDefault();var t=Ae.currentYearElement.parentNode&&Ae.currentYearElement.parentNode.contains(e.target);if(e.target===Ae.currentMonthElement||t){var i=n(e);t?(te(Ae.currentYear+i),e.target.value=Ae.currentYear.toString()):Ae.changeMonth(i,!0,!1)}}function Oe(e){var t=Ae.prevMonthNav.contains(e.target),n=Ae.nextMonthNav.contains(e.target);t||n?K(t?-1:1):e.target===Ae.currentYearElement?(e.preventDefault(),Ae.currentYearElement.select()):"arrowUp"===e.target.className?Ae.changeYear(Ae.currentYear+1):"arrowDown"===e.target.className&&Ae.changeYear(Ae.currentYear-1)}function Me(e){e.preventDefault();var t="keydown"===e.type,n=e.target;void 0!==Ae.amPM&&e.target===Ae.amPM&&(Ae.amPM.textContent=Ae.l10n.amPM[v(Ae.amPM.textContent===Ae.l10n.amPM[0])]);var i=Number(n.min),o=Number(n.max),r=Number(n.step),s=parseInt(n.value,10),a=e.delta||(t?38===e.which?1:-1:Math.max(-1,Math.min(1,e.wheelDelta||-e.deltaY))||0),l=s+r*a;if("undefined"!=typeof n.value&&2===n.value.length){var c=n===Ae.hourElement,d=n===Ae.minuteElement;l<i?(l=o+l+v(!c)+(v(c)&&v(!Ae.amPM)),d&&L(void 0,-1,Ae.hourElement)):l>o&&(l=n===Ae.hourElement?l-o-v(!Ae.amPM):i,d&&L(void 0,1,Ae.hourElement)),Ae.amPM&&c&&(1===r?l+s===23:Math.abs(l-s)>r)&&(Ae.amPM.textContent=Ae.l10n.amPM[v(Ae.amPM.textContent===Ae.l10n.amPM[0])]),n.value=g(l)}}var Ae={};return Ae.parseDate=we,Ae.formatDate=ye,Ae._animationLoop=[],Ae._handlers=[],Ae._bind=O,Ae._setHoursFromDate=$,Ae.changeMonth=K,Ae.changeYear=te,Ae.clear=G,Ae.close=J,Ae._createElement=o,Ae.destroy=Q,Ae.isEnabled=ne,Ae.jumpToDate=N,Ae.open=se,Ae.redraw=ue,Ae.set=he,Ae.setDate=me,Ae.toggle=xe,f(),Ae}function c(e,t){for(var n=Array.prototype.slice.call(e),i=[],o=0;o<n.length;o++){var r=n[o];try{if(null!==r.getAttribute("data-fp-omit"))continue;void 0!==r._flatpickr&&(r._flatpickr.destroy(),r._flatpickr=void 0),r._flatpickr=l(r,t||{}),i.push(r._flatpickr)}catch(s){console.error(s)}}return 1===i.length?i[0]:i}var d=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},u=function(e,t,n){return n.months[t?"shorthand":"longhand"][e]},p=function(e){var t=new Date(e.getFullYear(),0,1);return Math.ceil(((e.getTime()-t.getTime())/864e5+t.getDay()+1)/7)},h={DAY:864e5},f={_disable:[],_enable:[],allowInput:!1,altFormat:"F j, Y",altInput:!1,altInputClass:"form-control input",animate:"object"==typeof window&&window.navigator.userAgent.indexOf("MSIE")===-1,ariaDateFormat:"F j, Y",clickOpens:!0,closeOnSelect:!0,conjunction:", ",dateFormat:"Y-m-d",defaultHour:12,defaultMinute:0,defaultSeconds:0,disable:[],disableMobile:!1,enable:[],enableSeconds:!1,enableTime:!1,errorHandler:console.warn,getWeek:p,hourIncrement:1,ignoredFocusElements:[],inline:!1,locale:"default",minuteIncrement:5,mode:"single",nextArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M13.207 8.472l-7.854 7.854-0.707-0.707 7.146-7.146-7.146-7.148 0.707-0.707 7.854 7.854z' /></svg>",noCalendar:!1,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M5.207 8.471l7.146 7.147-0.707 0.707-7.853-7.854 7.854-7.853 0.707 0.707-7.147 7.146z' /></svg>",shorthandCurrentMonth:!1,"static":!1,time_24hr:!1,weekNumbers:!1,wrap:!1},m={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(e){var t=e%100;if(t>3&&t<21)return"th";switch(t%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"]},g=function(e){return("0"+e).slice(-2)},v=function(e){return e===!0?1:0},y=function(e){return e instanceof Array?e:[e]},w=function(){},b={D:w,F:function(e,t,n){e.setMonth(n.months.longhand.indexOf(t))},G:function(e,t){e.setHours(parseFloat(t))},H:function(e,t){e.setHours(parseFloat(t))},J:function(e,t){e.setDate(parseFloat(t))},K:function(e,t,n){e.setHours(e.getHours()%12+12*v(new RegExp(n.amPM[1],"i").test(t)))},M:function(e,t,n){e.setMonth(n.months.shorthand.indexOf(t))},S:function(e,t){e.setSeconds(parseFloat(t))},U:function(e,t){return new Date(1e3*parseFloat(t))},W:function(e,t){var n=parseInt(t);return new Date(e.getFullYear(),0,2+7*(n-1),0,0,0,0)},Y:function(e,t){e.setFullYear(parseFloat(t))},Z:function(e,t){return new Date(t)},d:function(e,t){e.setDate(parseFloat(t))},h:function(e,t){e.setHours(parseFloat(t))},i:function(e,t){e.setMinutes(parseFloat(t))},j:function(e,t){e.setDate(parseFloat(t))},l:w,m:function(e,t){e.setMonth(parseFloat(t)-1)},n:function(e,t){e.setMonth(parseFloat(t)-1)},s:function(e,t){e.setSeconds(parseFloat(t))},w:w,y:function(e,t){e.setFullYear(2e3+parseFloat(t))}},C={D:"(\\w+)",F:"(\\w+)",G:"(\\d\\d|\\d)",H:"(\\d\\d|\\d)",J:"(\\d\\d|\\d)\\w+",K:"",M:"(\\w+)",S:"(\\d\\d|\\d)",U:"(.+)",W:"(\\d\\d|\\d)",Y:"(\\d{4})",Z:"(.+)",d:"(\\d\\d|\\d)",h:"(\\d\\d|\\d)",i:"(\\d\\d|\\d)",j:"(\\d\\d|\\d)",l:"(\\w+)",m:"(\\d\\d|\\d)",n:"(\\d\\d|\\d)",s:"(\\d\\d|\\d)",w:"(\\d\\d|\\d)",y:"(\\d{2})"},x={Z:function(e){return e.toISOString()},D:function(e,t,n){return t.weekdays.shorthand[x.w(e,t,n)]},F:function(e,t,n){return u(x.n(e,t,n)-1,!1,t)},G:function(e,t,n){return g(x.h(e,t,n))},H:function(e){return g(e.getHours())},J:function(e,t){return void 0!==t.ordinal?e.getDate()+t.ordinal(e.getDate()):e.getDate()},K:function(e,t){return t.amPM[v(e.getHours()>11)]},M:function(e,t){return u(e.getMonth(),!0,t)},S:function(e){return g(e.getSeconds())},U:function(e){return e.getTime()/1e3},W:function(e,t,n){return n.getWeek(e)},Y:function(e){return e.getFullYear()},d:function(e){return g(e.getDate())},h:function(e){return e.getHours()%12?e.getHours()%12:12},i:function(e){return g(e.getMinutes())},j:function(e){return e.getDate()},l:function(e,t){return t.weekdays.longhand[e.getDay()]},m:function(e){return g(e.getMonth()+1)},n:function(e){return e.getMonth()+1},s:function(e){return e.getSeconds()},w:function(e){return e.getDay()},y:function(e){return String(e.getFullYear()).substring(2)}};"function"!=typeof Object.assign&&(Object.assign=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!e)throw TypeError("Cannot convert undefined or null to object");for(var i=function(t){t&&Object.keys(t).forEach(function(n){return e[n]=t[n]})},o=0,r=t;o<r.length;o++){var s=r[o];i(s)}return e}),"undefined"!=typeof HTMLElement&&(HTMLCollection.prototype.flatpickr=NodeList.prototype.flatpickr=function(e){return c(this,e)},HTMLElement.prototype.flatpickr=function(e){return c([this],e)});var S;S=function(e,t){return e instanceof NodeList?c(e,t):"string"==typeof e?c(window.document.querySelectorAll(e),t):c([e],t)},"object"==typeof window&&(window.flatpickr=S),S.defaultConfig=f,S.l10ns={en:d({},m),"default":d({},m)},S.localize=function(e){S.l10ns["default"]=d({},S.l10ns["default"],e)},S.setDefaults=function(e){S.defaultConfig=d({},S.defaultConfig,e)},"undefined"!=typeof jQuery&&(jQuery.fn.flatpickr=function(e){return c(this,e)}),Date.prototype.fp_incr=function(e){return new Date(this.getFullYear(),this.getMonth(),this.getDate()+("string"==typeof e?parseInt(e,10):e))};var T=S;return T}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(e.zh={})}(this,function(e){"use strict";var t="undefined"!=typeof window&&void 0!==window.flatpickr?window.flatpickr:{l10ns:{}},n={weekdays:{shorthand:["\u5468\u65e5","\u5468\u4e00","\u5468\u4e8c","\u5468\u4e09","\u5468\u56db","\u5468\u4e94","\u5468\u516d"],longhand:["\u661f\u671f\u65e5","\u661f\u671f\u4e00","\u661f\u671f\u4e8c","\u661f\u671f\u4e09","\u661f\u671f\u56db","\u661f\u671f\u4e94","\u661f\u671f\u516d"]},months:{shorthand:["\u4e00\u6708","\u4e8c\u6708","\u4e09\u6708","\u56db\u6708","\u4e94\u6708","\u516d\u6708","\u4e03\u6708","\u516b\u6708","\u4e5d\u6708","\u5341\u6708","\u5341\u4e00\u6708","\u5341\u4e8c\u6708"],longhand:["\u4e00\u6708","\u4e8c\u6708","\u4e09\u6708","\u56db\u6708","\u4e94\u6708","\u516d\u6708","\u4e03\u6708","\u516b\u6708","\u4e5d\u6708","\u5341\u6708","\u5341\u4e00\u6708","\u5341\u4e8c\u6708"]},rangeSeparator:" \u81f3 ",weekAbbreviation:"\u5468",scrollTitle:"\u6eda\u52a8\u5207\u6362",toggleTitle:"\u70b9\u51fb\u5207\u6362 12/24 \u5c0f\u65f6\u65f6\u5236"};t.l10ns.zh=n;var i=t.l10ns;e.Mandarin=n,e["default"]=i,Object.defineProperty(e,"__esModule",{value:!0})}),function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?module.exports=e:e(jQuery)}(function(e){function t(t){var s=t||window.event,a=l.call(arguments,1),c=0,u=0,p=0,h=0,f=0,m=0;if(t=e.event.fix(s),t.type="mousewheel","detail"in s&&(p=s.detail*-1),"wheelDelta"in s&&(p=s.wheelDelta),"wheelDeltaY"in s&&(p=s.wheelDeltaY),"wheelDeltaX"in s&&(u=s.wheelDeltaX*-1),"axis"in s&&s.axis===s.HORIZONTAL_AXIS&&(u=p*-1,p=0),c=0===p?u:p,"deltaY"in s&&(p=s.deltaY*-1,c=p),"deltaX"in s&&(u=s.deltaX,0===p&&(c=u*-1)),0!==p||0!==u){if(1===s.deltaMode){var g=e.data(this,"mousewheel-line-height");c*=g,p*=g,u*=g}else if(2===s.deltaMode){var v=e.data(this,"mousewheel-page-height");c*=v,p*=v,u*=v}if(h=Math.max(Math.abs(p),Math.abs(u)),(!r||h<r)&&(r=h,i(s,h)&&(r/=40)),i(s,h)&&(c/=40,u/=40,p/=40),c=Math[c>=1?"floor":"ceil"](c/r),u=Math[u>=1?"floor":"ceil"](u/r),p=Math[p>=1?"floor":"ceil"](p/r),d.settings.normalizeOffset&&this.getBoundingClientRect){var y=this.getBoundingClientRect();f=t.clientX-y.left,m=t.clientY-y.top}return t.deltaX=u,t.deltaY=p,t.deltaFactor=r,t.offsetX=f,t.offsetY=m,t.deltaMode=0,a.unshift(t,c,u,p),o&&clearTimeout(o),o=setTimeout(n,200),(e.event.dispatch||e.event.handle).apply(this,a)}}function n(){r=null}function i(e,t){return d.settings.adjustOldDeltas&&"mousewheel"===e.type&&t%120===0}var o,r,s=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],a="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],l=Array.prototype.slice;if(e.event.fixHooks)for(var c=s.length;c;)e.event.fixHooks[s[--c]]=e.event.mouseHooks;var d=e.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var n=a.length;n;)this.addEventListener(a[--n],t,!1);else this.onmousewheel=t;e.data(this,"mousewheel-line-height",d.getLineHeight(this)),e.data(this,"mousewheel-page-height",d.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var n=a.length;n;)this.removeEventListener(a[--n],t,!1);else this.onmousewheel=null;e.removeData(this,"mousewheel-line-height"),e.removeData(this,"mousewheel-page-height")},getLineHeight:function(t){var n=e(t),i=n["offsetParent"in e.fn?"offsetParent":"parent"]();return i.length||(i=e("body")),parseInt(i.css("fontSize"),10)||parseInt(n.css("fontSize"),10)||16},getPageHeight:function(t){return e(t).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};e.fn.extend({mousewheel:function(e){return e?this.bind("mousewheel",e):this.trigger("mousewheel")},unmousewheel:function(e){return this.unbind("mousewheel",e)}})});var _slice=Array.prototype.slice,_slicedToArray=function(){function e(e,t){var n=[],i=!0,o=!1,r=void 0;try{for(var s,a=e[Symbol.iterator]();!(i=(s=a.next()).done)&&(n.push(s.value),!t||n.length!==t);i=!0);}catch(l){o=!0,r=l}finally{try{!i&&a["return"]&&a["return"]()}finally{if(o)throw r}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),_extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e};!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],t):e.parsley=t(e.jQuery)}(this,function(e){"use strict";function t(e,t){return e.parsleyAdaptedCallback||(e.parsleyAdaptedCallback=function(){var n=Array.prototype.slice.call(arguments,0);n.unshift(this),e.apply(t||A,n)}),e.parsleyAdaptedCallback}function n(e){return 0===e.lastIndexOf(F,0)?e.substr(F.length):e}function i(){var t=this,n=window||global;_extends(this,{isNativeEvent:function(e){return e.originalEvent&&e.originalEvent.isTrusted!==!1},fakeInputEvent:function(n){t.isNativeEvent(n)&&e(n.target).trigger("input")},misbehaves:function(n){t.isNativeEvent(n)&&(t.behavesOk(n),e(document).on("change.inputevent",n.data.selector,t.fakeInputEvent),t.fakeInputEvent(n))},behavesOk:function(n){t.isNativeEvent(n)&&e(document).off("input.inputevent",n.data.selector,t.behavesOk).off("change.inputevent",n.data.selector,t.misbehaves)},install:function(){if(!n.inputEventPatched){n.inputEventPatched="0.0.3";for(var i=["select",'input[type="checkbox"]','input[type="radio"]','input[type="file"]'],o=0;o<i.length;o++){
var r=i[o];e(document).on("input.inputevent",r,{selector:r},t.behavesOk).on("change.inputevent",r,{selector:r},t.misbehaves)}}},uninstall:function(){delete n.inputEventPatched,e(document).off(".inputevent")}})}var o=1,r={},s={attr:function(e,t,n){var i,o,r,s=new RegExp("^"+t,"i");if("undefined"==typeof n)n={};else for(i in n)n.hasOwnProperty(i)&&delete n[i];if(!e)return n;for(r=e.attributes,i=r.length;i--;)o=r[i],o&&o.specified&&s.test(o.name)&&(n[this.camelize(o.name.slice(t.length))]=this.deserializeValue(o.value));return n},checkAttr:function(e,t,n){return e.hasAttribute(t+n)},setAttr:function(e,t,n,i){e.setAttribute(this.dasherize(t+n),String(i))},getType:function(e){return e.getAttribute("type")||"text"},generateID:function(){return""+o++},deserializeValue:function(e){var t;try{return e?"true"==e||"false"!=e&&("null"==e?null:isNaN(t=Number(e))?/^[\[\{]/.test(e)?JSON.parse(e):e:t):e}catch(n){return e}},camelize:function(e){return e.replace(/-+(.)?/g,function(e,t){return t?t.toUpperCase():""})},dasherize:function(e){return e.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/_/g,"-").toLowerCase()},warn:function(){var e;window.console&&"function"==typeof window.console.warn&&(e=window.console).warn.apply(e,arguments)},warnOnce:function(e){r[e]||(r[e]=!0,this.warn.apply(this,arguments))},_resetWarnings:function(){r={}},trimString:function(e){return e.replace(/^\s+|\s+$/g,"")},parse:{date:function N(e){var t=e.match(/^(\d{4,})-(\d\d)-(\d\d)$/);if(!t)return null;var n=t.map(function(e){return parseInt(e,10)}),i=_slicedToArray(n,4),o=(i[0],i[1]),r=i[2],s=i[3],N=new Date(o,r-1,s);return N.getFullYear()!==o||N.getMonth()+1!==r||N.getDate()!==s?null:N},string:function(e){return e},integer:function(e){return isNaN(e)?null:parseInt(e,10)},number:function(e){if(isNaN(e))throw null;return parseFloat(e)},"boolean":function(e){return!/^\s*false\s*$/i.test(e)},object:function(e){return s.deserializeValue(e)},regexp:function(e){var t="";return/^\/.*\/(?:[gimy]*)$/.test(e)?(t=e.replace(/.*\/([gimy]*)$/,"$1"),e=e.replace(new RegExp("^/(.*?)/"+t+"$"),"$1")):e="^"+e+"$",new RegExp(e,t)}},parseRequirement:function(e,t){var n=this.parse[e||"string"];if(!n)throw'Unknown requirement specification: "'+e+'"';var i=n(t);if(null===i)throw"Requirement is not a "+e+': "'+t+'"';return i},namespaceEvents:function(t,n){return t=this.trimString(t||"").split(/\s+/),t[0]?e.map(t,function(e){return e+"."+n}).join(" "):""},difference:function(t,n){var i=[];return e.each(t,function(e,t){n.indexOf(t)==-1&&i.push(t)}),i},all:function(t){return e.when.apply(e,_toConsumableArray(t).concat([42,42]))},objectCreate:Object.create||function(){var e=function(){};return function(t){if(arguments.length>1)throw Error("Second argument not supported");if("object"!=typeof t)throw TypeError("Argument must be an object");e.prototype=t;var n=new e;return e.prototype=null,n}}(),_SubmitSelector:'input[type="submit"], button:submit'},a={namespace:"data-parsley-",inputs:"input, textarea, select",excluded:"input[type=button], input[type=submit], input[type=reset], input[type=hidden]",priorityEnabled:!0,multiple:null,group:null,uiEnabled:!0,validationThreshold:3,focus:"first",trigger:!1,triggerAfterFailure:"input",errorClass:"parsley-error",successClass:"parsley-success",classHandler:function(e){},errorsContainer:function(e){},errorsWrapper:'<ul class="parsley-errors-list"></ul>',errorTemplate:"<li></li>"},l=function(){this.__id__=s.generateID()};l.prototype={asyncSupport:!0,_pipeAccordingToValidationResult:function(){var t=this,n=function(){var n=e.Deferred();return!0!==t.validationResult&&n.reject(),n.resolve().promise()};return[n,n]},actualizeOptions:function(){return s.attr(this.element,this.options.namespace,this.domOptions),this.parent&&this.parent.actualizeOptions&&this.parent.actualizeOptions(),this},_resetOptions:function(e){this.domOptions=s.objectCreate(this.parent.options),this.options=s.objectCreate(this.domOptions);for(var t in e)e.hasOwnProperty(t)&&(this.options[t]=e[t]);this.actualizeOptions()},_listeners:null,on:function(e,t){this._listeners=this._listeners||{};var n=this._listeners[e]=this._listeners[e]||[];return n.push(t),this},subscribe:function(t,n){e.listenTo(this,t.toLowerCase(),n)},off:function(e,t){var n=this._listeners&&this._listeners[e];if(n)if(t)for(var i=n.length;i--;)n[i]===t&&n.splice(i,1);else delete this._listeners[e];return this},unsubscribe:function(t,n){e.unsubscribeTo(this,t.toLowerCase())},trigger:function(e,t,n){t=t||this;var i,o=this._listeners&&this._listeners[e];if(o)for(var r=o.length;r--;)if(i=o[r].call(t,t,n),i===!1)return i;return!this.parent||this.parent.trigger(e,t,n)},asyncIsValid:function(e,t){return s.warnOnce("asyncIsValid is deprecated; please use whenValid instead"),this.whenValid({group:e,force:t})},_findRelated:function(){return this.options.multiple?e(this.parent.element.querySelectorAll("["+this.options.namespace+'multiple="'+this.options.multiple+'"]')):this.$element}};var c=function(e,t){var n=e.match(/^\s*\[(.*)\]\s*$/);if(!n)throw'Requirement is not an array: "'+e+'"';var i=n[1].split(",").map(s.trimString);if(i.length!==t)throw"Requirement has "+i.length+" values when "+t+" are needed";return i},d=function(e,t,n){var i=null,o={};for(var r in e)if(r){var a=n(r);"string"==typeof a&&(a=s.parseRequirement(e[r],a)),o[r]=a}else i=s.parseRequirement(e[r],t);return[i,o]},u=function(t){e.extend(!0,this,t)};u.prototype={validate:function(e,t){if(this.fn)return arguments.length>3&&(t=[].slice.call(arguments,1,-1)),this.fn(e,t);if(Array.isArray(e)){if(!this.validateMultiple)throw"Validator `"+this.name+"` does not handle multiple values";return this.validateMultiple.apply(this,arguments)}var n=arguments[arguments.length-1];if(this.validateDate&&n._isDateInput())return arguments[0]=s.parse.date(arguments[0]),null!==arguments[0]&&this.validateDate.apply(this,arguments);if(this.validateNumber)return!isNaN(e)&&(arguments[0]=parseFloat(arguments[0]),this.validateNumber.apply(this,arguments));if(this.validateString)return this.validateString.apply(this,arguments);throw"Validator `"+this.name+"` only handles multiple values"},parseRequirements:function(t,n){if("string"!=typeof t)return Array.isArray(t)?t:[t];var i=this.requirementType;if(Array.isArray(i)){for(var o=c(t,i.length),r=0;r<o.length;r++)o[r]=s.parseRequirement(i[r],o[r]);return o}return e.isPlainObject(i)?d(i,t,n):[s.parseRequirement(i,t)]},requirementType:"string",priority:2};var p=function(e,t){this.__class__="ValidatorRegistry",this.locale="en",this.init(e||{},t||{})},h={email:/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i,number:/^-?(\d*\.)?\d+(e[-+]?\d+)?$/i,integer:/^-?\d+$/,digits:/^\d+$/,alphanum:/^\w+$/i,date:{test:function(e){return null!==s.parse.date(e)}},url:new RegExp("^(?:(?:https?|ftp)://)?(?:\\S+(?::\\S*)?@)?(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))(?::\\d{2,5})?(?:/\\S*)?$","i")};h.range=h.number;var f=function(e){var t=(""+e).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return t?Math.max(0,(t[1]?t[1].length:0)-(t[2]?+t[2]:0)):0},m=function(e,t){return t.map(s.parse[e])},g=function(e,t){return function(n){for(var i=arguments.length,o=Array(i>1?i-1:0),r=1;r<i;r++)o[r-1]=arguments[r];return o.pop(),t.apply(void 0,[n].concat(_toConsumableArray(m(e,o))))}},v=function(e){return{validateDate:g("date",e),validateNumber:g("number",e),requirementType:e.length<=2?"string":["string","string"],priority:30}};p.prototype={init:function(e,t){this.catalog=t,this.validators=_extends({},this.validators);for(var n in e)this.addValidator(n,e[n].fn,e[n].priority);window.Parsley.trigger("parsley:validator:init")},setLocale:function(e){if("undefined"==typeof this.catalog[e])throw new Error(e+" is not available in the catalog");return this.locale=e,this},addCatalog:function(e,t,n){return"object"==typeof t&&(this.catalog[e]=t),!0===n?this.setLocale(e):this},addMessage:function(e,t,n){return"undefined"==typeof this.catalog[e]&&(this.catalog[e]={}),this.catalog[e][t]=n,this},addMessages:function(e,t){for(var n in t)this.addMessage(e,n,t[n]);return this},addValidator:function(e,t,n){if(this.validators[e])s.warn('Validator "'+e+'" is already defined.');else if(a.hasOwnProperty(e))return void s.warn('"'+e+'" is a restricted keyword and is not a valid validator name.');return this._setValidator.apply(this,arguments)},hasValidator:function(e){return!!this.validators[e]},updateValidator:function(e,t,n){return this.validators[e]?this._setValidator.apply(this,arguments):(s.warn('Validator "'+e+'" is not already defined.'),this.addValidator.apply(this,arguments))},removeValidator:function(e){return this.validators[e]||s.warn('Validator "'+e+'" is not defined.'),delete this.validators[e],this},_setValidator:function(e,t,n){"object"!=typeof t&&(t={fn:t,priority:n}),t.validate||(t=new u(t)),this.validators[e]=t;for(var i in t.messages||{})this.addMessage(i,e,t.messages[i]);return this},getErrorMessage:function(e){var t;if("type"===e.name){var n=this.catalog[this.locale][e.name]||{};t=n[e.requirements]}else t=this.formatMessage(this.catalog[this.locale][e.name],e.requirements);return t||this.catalog[this.locale].defaultMessage||this.catalog.en.defaultMessage},formatMessage:function(e,t){if("object"==typeof t){for(var n in t)e=this.formatMessage(e,t[n]);return e}return"string"==typeof e?e.replace(/%s/i,t):""},validators:{notblank:{validateString:function(e){return/\S/.test(e)},priority:2},required:{validateMultiple:function(e){return e.length>0},validateString:function(e){return/\S/.test(e)},priority:512},type:{validateString:function(e,t){var n=arguments.length<=2||void 0===arguments[2]?{}:arguments[2],i=n.step,o=void 0===i?"any":i,r=n.base,s=void 0===r?0:r,a=h[t];if(!a)throw new Error("validator type `"+t+"` is not supported");if(!a.test(e))return!1;if("number"===t&&!/^any$/i.test(o||"")){var l=Number(e),c=Math.max(f(o),f(s));if(f(l)>c)return!1;var d=function(e){return Math.round(e*Math.pow(10,c))};if((d(l)-d(s))%d(o)!=0)return!1}return!0},requirementType:{"":"string",step:"string",base:"number"},priority:256},pattern:{validateString:function(e,t){return t.test(e)},requirementType:"regexp",priority:64},minlength:{validateString:function(e,t){return e.length>=t},requirementType:"integer",priority:30},maxlength:{validateString:function(e,t){return e.length<=t},requirementType:"integer",priority:30},length:{validateString:function(e,t,n){return e.length>=t&&e.length<=n},requirementType:["integer","integer"],priority:30},mincheck:{validateMultiple:function(e,t){return e.length>=t},requirementType:"integer",priority:30},maxcheck:{validateMultiple:function(e,t){return e.length<=t},requirementType:"integer",priority:30},check:{validateMultiple:function(e,t,n){return e.length>=t&&e.length<=n},requirementType:["integer","integer"],priority:30},min:v(function(e,t){return e>=t}),max:v(function(e,t){return e<=t}),range:v(function(e,t,n){return e>=t&&e<=n}),equalto:{validateString:function(t,n){var i=e(n);return i.length?t===i.val():t===n},priority:256}}};var y={},w=function j(e,t,n){for(var i=[],o=[],r=0;r<e.length;r++){for(var s=!1,a=0;a<t.length;a++)if(e[r].assert.name===t[a].assert.name){s=!0;break}s?o.push(e[r]):i.push(e[r])}return{kept:o,added:i,removed:n?[]:j(t,e,!0).added}};y.Form={_actualizeTriggers:function(){var e=this;this.$element.on("submit.Parsley",function(t){e.onSubmitValidate(t)}),this.$element.on("click.Parsley",s._SubmitSelector,function(t){e.onSubmitButton(t)}),!1!==this.options.uiEnabled&&this.element.setAttribute("novalidate","")},focus:function(){if(this._focusedField=null,!0===this.validationResult||"none"===this.options.focus)return null;for(var e=0;e<this.fields.length;e++){var t=this.fields[e];if(!0!==t.validationResult&&t.validationResult.length>0&&"undefined"==typeof t.options.noFocus&&(this._focusedField=t.$element,"first"===this.options.focus))break}return null===this._focusedField?null:this._focusedField.focus()},_destroyUI:function(){this.$element.off(".Parsley")}},y.Field={_reflowUI:function(){if(this._buildUI(),this._ui){var e=w(this.validationResult,this._ui.lastValidationResult);this._ui.lastValidationResult=this.validationResult,this._manageStatusClass(),this._manageErrorsMessages(e),this._actualizeTriggers(),!e.kept.length&&!e.added.length||this._failedOnce||(this._failedOnce=!0,this._actualizeTriggers())}},getErrorsMessages:function(){if(!0===this.validationResult)return[];for(var e=[],t=0;t<this.validationResult.length;t++)e.push(this.validationResult[t].errorMessage||this._getErrorMessage(this.validationResult[t].assert));return e},addError:function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],n=t.message,i=t.assert,o=t.updateClass,r=void 0===o||o;this._buildUI(),this._addError(e,{message:n,assert:i}),r&&this._errorClass()},updateError:function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],n=t.message,i=t.assert,o=t.updateClass,r=void 0===o||o;this._buildUI(),this._updateError(e,{message:n,assert:i}),r&&this._errorClass()},removeError:function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],n=t.updateClass,i=void 0===n||n;this._buildUI(),this._removeError(e),i&&this._manageStatusClass()},_manageStatusClass:function(){this.hasConstraints()&&this.needsValidation()&&!0===this.validationResult?this._successClass():this.validationResult.length>0?this._errorClass():this._resetClass()},_manageErrorsMessages:function(t){if("undefined"==typeof this.options.errorsMessagesDisabled){if("undefined"!=typeof this.options.errorMessage)return t.added.length||t.kept.length?(this._insertErrorWrapper(),0===this._ui.$errorsWrapper.find(".parsley-custom-error-message").length&&this._ui.$errorsWrapper.append(e(this.options.errorTemplate).addClass("parsley-custom-error-message")),this._ui.$errorsWrapper.addClass("filled").find(".parsley-custom-error-message").html(this.options.errorMessage)):this._ui.$errorsWrapper.removeClass("filled").find(".parsley-custom-error-message").remove();for(var n=0;n<t.removed.length;n++)this._removeError(t.removed[n].assert.name);for(n=0;n<t.added.length;n++)this._addError(t.added[n].assert.name,{message:t.added[n].errorMessage,assert:t.added[n].assert});for(n=0;n<t.kept.length;n++)this._updateError(t.kept[n].assert.name,{message:t.kept[n].errorMessage,assert:t.kept[n].assert})}},_addError:function(t,n){var i=n.message,o=n.assert;this._insertErrorWrapper(),this._ui.$errorsWrapper.addClass("filled").append(e(this.options.errorTemplate).addClass("parsley-"+t).html(i||this._getErrorMessage(o)))},_updateError:function(e,t){var n=t.message,i=t.assert;this._ui.$errorsWrapper.addClass("filled").find(".parsley-"+e).html(n||this._getErrorMessage(i))},_removeError:function(e){this._ui.$errorsWrapper.removeClass("filled").find(".parsley-"+e).remove()},_getErrorMessage:function(e){var t=e.name+"Message";return"undefined"!=typeof this.options[t]?window.Parsley.formatMessage(this.options[t],e.requirements):window.Parsley.getErrorMessage(e)},_buildUI:function(){if(!this._ui&&!1!==this.options.uiEnabled){var t={};this.element.setAttribute(this.options.namespace+"id",this.__id__),t.$errorClassHandler=this._manageClassHandler(),t.errorsWrapperId="parsley-id-"+(this.options.multiple?"multiple-"+this.options.multiple:this.__id__),t.$errorsWrapper=e(this.options.errorsWrapper).attr("id",t.errorsWrapperId),t.lastValidationResult=[],t.validationInformationVisible=!1,this._ui=t}},_manageClassHandler:function(){if("string"==typeof this.options.classHandler&&e(this.options.classHandler).length)return e(this.options.classHandler);var t=this.options.classHandler;if("string"==typeof this.options.classHandler&&"function"==typeof window[this.options.classHandler]&&(t=window[this.options.classHandler]),"function"==typeof t){var n=t.call(this,this);if("undefined"!=typeof n&&n.length)return n}else{if("object"==typeof t&&t instanceof jQuery&&t.length)return t;t&&s.warn("The class handler `"+t+"` does not exist in DOM nor as a global JS function")}return this._inputHolder()},_inputHolder:function(){return this.options.multiple&&"SELECT"!==this.element.nodeName?this.$element.parent():this.$element},_insertErrorWrapper:function(){var t=this.options.errorsContainer;if(0!==this._ui.$errorsWrapper.parent().length)return this._ui.$errorsWrapper.parent();if("string"==typeof t){if(e(t).length)return e(t).append(this._ui.$errorsWrapper);"function"==typeof window[t]?t=window[t]:s.warn("The errors container `"+t+"` does not exist in DOM nor as a global JS function")}return"function"==typeof t&&(t=t.call(this,this)),"object"==typeof t&&t.length?t.append(this._ui.$errorsWrapper):this._inputHolder().after(this._ui.$errorsWrapper)},_actualizeTriggers:function(){var e,t=this,n=this._findRelated();n.off(".Parsley"),this._failedOnce?n.on(s.namespaceEvents(this.options.triggerAfterFailure,"Parsley"),function(){t._validateIfNeeded()}):(e=s.namespaceEvents(this.options.trigger,"Parsley"))&&n.on(e,function(e){t._validateIfNeeded(e)})},_validateIfNeeded:function(e){var t=this;e&&/key|input/.test(e.type)&&(!this._ui||!this._ui.validationInformationVisible)&&this.getValue().length<=this.options.validationThreshold||(this.options.debounce?(window.clearTimeout(this._debounced),this._debounced=window.setTimeout(function(){return t.validate()},this.options.debounce)):this.validate())},_resetUI:function(){this._failedOnce=!1,this._actualizeTriggers(),"undefined"!=typeof this._ui&&(this._ui.$errorsWrapper.removeClass("filled").children().remove(),this._resetClass(),this._ui.lastValidationResult=[],this._ui.validationInformationVisible=!1)},_destroyUI:function(){this._resetUI(),"undefined"!=typeof this._ui&&this._ui.$errorsWrapper.remove(),delete this._ui},_successClass:function(){this._ui.validationInformationVisible=!0,this._ui.$errorClassHandler.removeClass(this.options.errorClass).addClass(this.options.successClass)},_errorClass:function(){this._ui.validationInformationVisible=!0,this._ui.$errorClassHandler.removeClass(this.options.successClass).addClass(this.options.errorClass)},_resetClass:function(){this._ui.$errorClassHandler.removeClass(this.options.successClass).removeClass(this.options.errorClass)}};var b=function(t,n,i){this.__class__="Form",this.element=t,this.$element=e(t),this.domOptions=n,this.options=i,this.parent=window.Parsley,this.fields=[],this.validationResult=null},C={pending:null,resolved:!0,rejected:!1};b.prototype={onSubmitValidate:function(e){var t=this;if(!0!==e.parsley){var n=this._submitSource||this.$element.find(s._SubmitSelector)[0];if(this._submitSource=null,this.$element.find(".parsley-synthetic-submit-button").prop("disabled",!0),!n||null===n.getAttribute("formnovalidate")){window.Parsley._remoteCache={};var i=this.whenValidate({event:e});"resolved"===i.state()&&!1!==this._trigger("submit")||(e.stopImmediatePropagation(),e.preventDefault(),"pending"===i.state()&&i.done(function(){t._submit(n)}))}}},onSubmitButton:function(e){this._submitSource=e.currentTarget},_submit:function(t){if(!1!==this._trigger("submit")){if(t){var n=this.$element.find(".parsley-synthetic-submit-button").prop("disabled",!1);0===n.length&&(n=e('<input class="parsley-synthetic-submit-button" type="hidden">').appendTo(this.$element)),n.attr({name:t.getAttribute("name"),value:t.getAttribute("value")})}this.$element.trigger(_extends(e.Event("submit"),{parsley:!0}))}},validate:function(t){if(arguments.length>=1&&!e.isPlainObject(t)){s.warnOnce("Calling validate on a parsley form without passing arguments as an object is deprecated.");var n=_slice.call(arguments),i=n[0],o=n[1],r=n[2];t={group:i,force:o,event:r}}return C[this.whenValidate(t).state()]},whenValidate:function(){var t,n=this,i=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],o=i.group,r=i.force,a=i.event;this.submitEvent=a,a&&(this.submitEvent=_extends({},a,{preventDefault:function(){s.warnOnce("Using `this.submitEvent.preventDefault()` is deprecated; instead, call `this.validationResult = false`"),n.validationResult=!1}})),this.validationResult=!0,this._trigger("validate"),this._refreshFields();var l=this._withoutReactualizingFormOptions(function(){return e.map(n.fields,function(e){return e.whenValidate({force:r,group:o})})});return(t=s.all(l).done(function(){n._trigger("success")}).fail(function(){n.validationResult=!1,n.focus(),n._trigger("error")}).always(function(){n._trigger("validated")})).pipe.apply(t,_toConsumableArray(this._pipeAccordingToValidationResult()))},isValid:function(t){if(arguments.length>=1&&!e.isPlainObject(t)){s.warnOnce("Calling isValid on a parsley form without passing arguments as an object is deprecated.");var n=_slice.call(arguments),i=n[0],o=n[1];t={group:i,force:o}}return C[this.whenValid(t).state()]},whenValid:function(){var t=this,n=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],i=n.group,o=n.force;this._refreshFields();var r=this._withoutReactualizingFormOptions(function(){return e.map(t.fields,function(e){return e.whenValid({group:i,force:o})})});return s.all(r)},refresh:function(){return this._refreshFields(),this},reset:function(){for(var e=0;e<this.fields.length;e++)this.fields[e].reset();this._trigger("reset")},destroy:function(){this._destroyUI();for(var e=0;e<this.fields.length;e++)this.fields[e].destroy();this.$element.removeData("Parsley"),this._trigger("destroy")},_refreshFields:function(){return this.actualizeOptions()._bindFields()},_bindFields:function(){var t=this,n=this.fields;return this.fields=[],this.fieldsMappedById={},this._withoutReactualizingFormOptions(function(){t.$element.find(t.options.inputs).not(t.options.excluded).each(function(e,n){var i=new window.Parsley.Factory(n,{},t);if(("Field"===i.__class__||"FieldMultiple"===i.__class__)&&!0!==i.options.excluded){var o=i.__class__+"-"+i.__id__;"undefined"==typeof t.fieldsMappedById[o]&&(t.fieldsMappedById[o]=i,t.fields.push(i))}}),e.each(s.difference(n,t.fields),function(e,t){t.reset()})}),this},_withoutReactualizingFormOptions:function(e){var t=this.actualizeOptions;this.actualizeOptions=function(){return this};var n=e();return this.actualizeOptions=t,n},_trigger:function(e){return this.trigger("form:"+e)}};var x=function(e,t,n,i,o){var r=window.Parsley._validatorRegistry.validators[t],s=new u(r);i=i||e.options[t+"Priority"]||s.priority,o=!0===o,_extends(this,{validator:s,name:t,requirements:n,priority:i,isDomConstraint:o}),this._parseRequirements(e.options)},S=function(e){var t=e[0].toUpperCase();return t+e.slice(1)};x.prototype={validate:function(e,t){var n;return(n=this.validator).validate.apply(n,[e].concat(_toConsumableArray(this.requirementList),[t]))},_parseRequirements:function(e){var t=this;this.requirementList=this.validator.parseRequirements(this.requirements,function(n){return e[t.name+S(n)]})}};var T=function(t,n,i,o){this.__class__="Field",this.element=t,this.$element=e(t),"undefined"!=typeof o&&(this.parent=o),this.options=i,this.domOptions=n,this.constraints=[],this.constraintsByName={},this.validationResult=!0,this._bindConstraints()},_={pending:null,resolved:!0,rejected:!1};T.prototype={validate:function(t){arguments.length>=1&&!e.isPlainObject(t)&&(s.warnOnce("Calling validate on a parsley field without passing arguments as an object is deprecated."),t={options:t});var n=this.whenValidate(t);if(!n)return!0;switch(n.state()){case"pending":return null;case"resolved":return!0;case"rejected":return this.validationResult}},whenValidate:function(){var e,t=this,n=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],i=n.force,o=n.group;if(this.refresh(),!o||this._isInGroup(o))return this.value=this.getValue(),this._trigger("validate"),(e=this.whenValid({force:i,value:this.value,_refreshed:!0}).always(function(){t._reflowUI()}).done(function(){t._trigger("success")}).fail(function(){t._trigger("error")}).always(function(){t._trigger("validated")})).pipe.apply(e,_toConsumableArray(this._pipeAccordingToValidationResult()))},hasConstraints:function(){return 0!==this.constraints.length},needsValidation:function(e){return"undefined"==typeof e&&(e=this.getValue()),!(!e.length&&!this._isRequired()&&"undefined"==typeof this.options.validateIfEmpty)},_isInGroup:function(t){return Array.isArray(this.options.group)?-1!==e.inArray(t,this.options.group):this.options.group===t},isValid:function(t){if(arguments.length>=1&&!e.isPlainObject(t)){s.warnOnce("Calling isValid on a parsley field without passing arguments as an object is deprecated.");var n=_slice.call(arguments),i=n[0],o=n[1];t={force:i,value:o}}var r=this.whenValid(t);return!r||_[r.state()]},whenValid:function(){var t=this,n=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],i=n.force,o=void 0!==i&&i,r=n.value,a=n.group,l=n._refreshed;if(l||this.refresh(),!a||this._isInGroup(a)){if(this.validationResult=!0,!this.hasConstraints())return e.when();if("undefined"!=typeof r&&null!==r||(r=this.getValue()),!this.needsValidation(r)&&!0!==o)return e.when();var c=this._getGroupedConstraints(),d=[];return e.each(c,function(n,i){var o=s.all(e.map(i,function(e){return t._validateConstraint(r,e)}));if(d.push(o),"rejected"===o.state())return!1}),s.all(d)}},_validateConstraint:function(t,n){var i=this,o=n.validate(t,this);return!1===o&&(o=e.Deferred().reject()),s.all([o]).fail(function(e){i.validationResult instanceof Array||(i.validationResult=[]),i.validationResult.push({assert:n,errorMessage:"string"==typeof e&&e})})},getValue:function(){var e;return e="function"==typeof this.options.value?this.options.value(this):"undefined"!=typeof this.options.value?this.options.value:this.$element.val(),"undefined"==typeof e||null===e?"":this._handleWhitespace(e)},reset:function(){return this._resetUI(),this._trigger("reset")},destroy:function(){this._destroyUI(),this.$element.removeData("Parsley"),this.$element.removeData("FieldMultiple"),this._trigger("destroy")},refresh:function(){return this._refreshConstraints(),this},_refreshConstraints:function(){return this.actualizeOptions()._bindConstraints()},refreshConstraints:function(){return s.warnOnce("Parsley's refreshConstraints is deprecated. Please use refresh"),this.refresh()},addConstraint:function(e,t,n,i){if(window.Parsley._validatorRegistry.validators[e]){var o=new x(this,e,t,n,i);"undefined"!==this.constraintsByName[o.name]&&this.removeConstraint(o.name),this.constraints.push(o),this.constraintsByName[o.name]=o}return this},removeConstraint:function(e){for(var t=0;t<this.constraints.length;t++)if(e===this.constraints[t].name){this.constraints.splice(t,1);break}return delete this.constraintsByName[e],this},updateConstraint:function(e,t,n){return this.removeConstraint(e).addConstraint(e,t,n)},_bindConstraints:function(){for(var e=[],t={},n=0;n<this.constraints.length;n++)!1===this.constraints[n].isDomConstraint&&(e.push(this.constraints[n]),t[this.constraints[n].name]=this.constraints[n]);this.constraints=e,this.constraintsByName=t;for(var i in this.options)this.addConstraint(i,this.options[i],void 0,!0);return this._bindHtml5Constraints()},_bindHtml5Constraints:function(){null!==this.element.getAttribute("required")&&this.addConstraint("required",!0,void 0,!0),null!==this.element.getAttribute("pattern")&&this.addConstraint("pattern",this.element.getAttribute("pattern"),void 0,!0);var e=this.element.getAttribute("min"),t=this.element.getAttribute("max");null!==e&&null!==t?this.addConstraint("range",[e,t],void 0,!0):null!==e?this.addConstraint("min",e,void 0,!0):null!==t&&this.addConstraint("max",t,void 0,!0),null!==this.element.getAttribute("minlength")&&null!==this.element.getAttribute("maxlength")?this.addConstraint("length",[this.element.getAttribute("minlength"),this.element.getAttribute("maxlength")],void 0,!0):null!==this.element.getAttribute("minlength")?this.addConstraint("minlength",this.element.getAttribute("minlength"),void 0,!0):null!==this.element.getAttribute("maxlength")&&this.addConstraint("maxlength",this.element.getAttribute("maxlength"),void 0,!0);var n=s.getType(this.element);return"number"===n?this.addConstraint("type",["number",{step:this.element.getAttribute("step")||"1",base:e||this.element.getAttribute("value")}],void 0,!0):/^(email|url|range|date)$/i.test(n)?this.addConstraint("type",n,void 0,!0):this},_isRequired:function(){return"undefined"!=typeof this.constraintsByName.required&&!1!==this.constraintsByName.required.requirements},_trigger:function(e){return this.trigger("field:"+e)},_handleWhitespace:function(e){return!0===this.options.trimValue&&s.warnOnce('data-parsley-trim-value="true" is deprecated, please use data-parsley-whitespace="trim"'),"squish"===this.options.whitespace&&(e=e.replace(/\s{2,}/g," ")),"trim"!==this.options.whitespace&&"squish"!==this.options.whitespace&&!0!==this.options.trimValue||(e=s.trimString(e)),e},_isDateInput:function(){var e=this.constraintsByName.type;return e&&"date"===e.requirements},_getGroupedConstraints:function(){if(!1===this.options.priorityEnabled)return[this.constraints];for(var e=[],t={},n=0;n<this.constraints.length;n++){var i=this.constraints[n].priority;t[i]||e.push(t[i]=[]),t[i].push(this.constraints[n])}return e.sort(function(e,t){return t[0].priority-e[0].priority}),e}};var k=T,$=function(){this.__class__="FieldMultiple"};$.prototype={addElement:function(e){return this.$elements.push(e),this},_refreshConstraints:function(){var t;if(this.constraints=[],"SELECT"===this.element.nodeName)return this.actualizeOptions()._bindConstraints(),this;for(var n=0;n<this.$elements.length;n++)if(e("html").has(this.$elements[n]).length){t=this.$elements[n].data("FieldMultiple")._refreshConstraints().constraints;for(var i=0;i<t.length;i++)this.addConstraint(t[i].name,t[i].requirements,t[i].priority,t[i].isDomConstraint)}else this.$elements.splice(n,1);return this},getValue:function(){if("function"==typeof this.options.value)return this.options.value(this);if("undefined"!=typeof this.options.value)return this.options.value;if("INPUT"===this.element.nodeName){var t=s.getType(this.element);if("radio"===t)return this._findRelated().filter(":checked").val()||"";if("checkbox"===t){var n=[];return this._findRelated().filter(":checked").each(function(){n.push(e(this).val())}),n}}return"SELECT"===this.element.nodeName&&null===this.$element.val()?[]:this.$element.val()},_init:function(){return this.$elements=[this.$element],this}};var D=function(t,n,i){this.element=t,this.$element=e(t);var o=this.$element.data("Parsley");if(o)return"undefined"!=typeof i&&o.parent===window.Parsley&&(o.parent=i,o._resetOptions(o.options)),"object"==typeof n&&_extends(o.options,n),o;if(!this.$element.length)throw new Error("You must bind Parsley on an existing element.");if("undefined"!=typeof i&&"Form"!==i.__class__)throw new Error("Parent instance must be a Form instance");return this.parent=i||window.Parsley,this.init(n)};D.prototype={init:function(e){return this.__class__="Parsley",this.__version__="2.8.0",this.__id__=s.generateID(),this._resetOptions(e),"FORM"===this.element.nodeName||s.checkAttr(this.element,this.options.namespace,"validate")&&!this.$element.is(this.options.inputs)?this.bind("parsleyForm"):this.isMultiple()?this.handleMultiple():this.bind("parsleyField");
},isMultiple:function(){var e=s.getType(this.element);return"radio"===e||"checkbox"===e||"SELECT"===this.element.nodeName&&null!==this.element.getAttribute("multiple")},handleMultiple:function(){var t,n,i=this;if(this.options.multiple=this.options.multiple||(t=this.element.getAttribute("name"))||this.element.getAttribute("id"),"SELECT"===this.element.nodeName&&null!==this.element.getAttribute("multiple"))return this.options.multiple=this.options.multiple||this.__id__,this.bind("parsleyFieldMultiple");if(!this.options.multiple)return s.warn("To be bound by Parsley, a radio, a checkbox and a multiple select input must have either a name or a multiple option.",this.$element),this;this.options.multiple=this.options.multiple.replace(/(:|\.|\[|\]|\{|\}|\$)/g,""),t&&e('input[name="'+t+'"]').each(function(e,t){var n=s.getType(t);"radio"!==n&&"checkbox"!==n||t.setAttribute(i.options.namespace+"multiple",i.options.multiple)});for(var o=this._findRelated(),r=0;r<o.length;r++)if(n=e(o.get(r)).data("Parsley"),"undefined"!=typeof n){this.$element.data("FieldMultiple")||n.addElement(this.$element);break}return this.bind("parsleyField",!0),n||this.bind("parsleyFieldMultiple")},bind:function(t,n){var i;switch(t){case"parsleyForm":i=e.extend(new b(this.element,this.domOptions,this.options),new l,window.ParsleyExtend)._bindFields();break;case"parsleyField":i=e.extend(new k(this.element,this.domOptions,this.options,this.parent),new l,window.ParsleyExtend);break;case"parsleyFieldMultiple":i=e.extend(new k(this.element,this.domOptions,this.options,this.parent),new $,new l,window.ParsleyExtend)._init();break;default:throw new Error(t+"is not a supported Parsley type")}return this.options.multiple&&s.setAttr(this.element,this.options.namespace,"multiple",this.options.multiple),"undefined"!=typeof n?(this.$element.data("FieldMultiple",i),i):(this.$element.data("Parsley",i),i._actualizeTriggers(),i._trigger("init"),i)}};var E=e.fn.jquery.split(".");if(parseInt(E[0])<=1&&parseInt(E[1])<8)throw"The loaded version of jQuery is too old. Please upgrade to 1.8.x or better.";E.forEach||s.warn("Parsley requires ES5 to run properly. Please include https://github.com/es-shims/es5-shim");var O=_extends(new l,{element:document,$element:e(document),actualizeOptions:null,_resetOptions:null,Factory:D,version:"2.8.0"});_extends(k.prototype,y.Field,l.prototype),_extends(b.prototype,y.Form,l.prototype),_extends(D.prototype,l.prototype),e.fn.parsley=e.fn.psly=function(t){if(this.length>1){var n=[];return this.each(function(){n.push(e(this).parsley(t))}),n}if(0!=this.length)return new D(this[0],t)},"undefined"==typeof window.ParsleyExtend&&(window.ParsleyExtend={}),O.options=_extends(s.objectCreate(a),window.ParsleyConfig),window.ParsleyConfig=O.options,window.Parsley=window.psly=O,O.Utils=s,window.ParsleyUtils={},e.each(s,function(e,t){"function"==typeof t&&(window.ParsleyUtils[e]=function(){return s.warnOnce("Accessing `window.ParsleyUtils` is deprecated. Use `window.Parsley.Utils` instead."),s[e].apply(s,arguments)})});var M=window.Parsley._validatorRegistry=new p(window.ParsleyConfig.validators,window.ParsleyConfig.i18n);window.ParsleyValidator={},e.each("setLocale addCatalog addMessage addMessages getErrorMessage formatMessage addValidator updateValidator removeValidator hasValidator".split(" "),function(e,t){window.Parsley[t]=function(){return M[t].apply(M,arguments)},window.ParsleyValidator[t]=function(){var e;return s.warnOnce("Accessing the method '"+t+"' through Validator is deprecated. Simply call 'window.Parsley."+t+"(...)'"),(e=window.Parsley)[t].apply(e,arguments)}}),window.Parsley.UI=y,window.ParsleyUI={removeError:function(e,t,n){var i=!0!==n;return s.warnOnce("Accessing UI is deprecated. Call 'removeError' on the instance directly. Please comment in issue 1073 as to your need to call this method."),e.removeError(t,{updateClass:i})},getErrorsMessages:function(e){return s.warnOnce("Accessing UI is deprecated. Call 'getErrorsMessages' on the instance directly."),e.getErrorsMessages()}},e.each("addError updateError".split(" "),function(e,t){window.ParsleyUI[t]=function(e,n,i,o,r){var a=!0!==r;return s.warnOnce("Accessing UI is deprecated. Call '"+t+"' on the instance directly. Please comment in issue 1073 as to your need to call this method."),e[t](n,{message:i,assert:o,updateClass:a})}}),!1!==window.ParsleyConfig.autoBind&&e(function(){e("[data-parsley-validate]").length&&e("[data-parsley-validate]").parsley()});var A=e({}),I=function(){s.warnOnce("Parsley's pubsub module is deprecated; use the 'on' and 'off' methods on parsley instances or window.Parsley")},F="parsley:";e.listen=function(e,i){var o;if(I(),"object"==typeof arguments[1]&&"function"==typeof arguments[2]&&(o=arguments[1],i=arguments[2]),"function"!=typeof i)throw new Error("Wrong parameters");window.Parsley.on(n(e),t(i,o))},e.listenTo=function(e,i,o){if(I(),!(e instanceof k||e instanceof b))throw new Error("Must give Parsley instance");if("string"!=typeof i||"function"!=typeof o)throw new Error("Wrong parameters");e.on(n(i),t(o))},e.unsubscribe=function(e,t){if(I(),"string"!=typeof e||"function"!=typeof t)throw new Error("Wrong arguments");window.Parsley.off(n(e),t.parsleyAdaptedCallback)},e.unsubscribeTo=function(e,t){if(I(),!(e instanceof k||e instanceof b))throw new Error("Must give Parsley instance");e.off(n(t))},e.unsubscribeAll=function(t){I(),window.Parsley.off(n(t)),e("form,input,textarea,select").each(function(){var i=e(this).data("Parsley");i&&i.off(n(t))})},e.emit=function(e,t){var i;I();var o=t instanceof k||t instanceof b,r=Array.prototype.slice.call(arguments,o?2:1);r.unshift(n(e)),o||(t=window.Parsley),(i=t).trigger.apply(i,_toConsumableArray(r))};e.extend(!0,O,{asyncValidators:{"default":{fn:function(e){return e.status>=200&&e.status<300},url:!1},reverse:{fn:function(e){return e.status<200||e.status>=300},url:!1}},addAsyncValidator:function(e,t,n,i){return O.asyncValidators[e]={fn:t,url:n||!1,options:i||{}},this}}),O.addValidator("remote",{requirementType:{"":"string",validator:"string",reverse:"boolean",options:"object"},validateString:function(t,n,i,o){var r,s,a={},l=i.validator||(!0===i.reverse?"reverse":"default");if("undefined"==typeof O.asyncValidators[l])throw new Error("Calling an undefined async validator: `"+l+"`");n=O.asyncValidators[l].url||n,n.indexOf("{value}")>-1?n=n.replace("{value}",encodeURIComponent(t)):a[o.element.getAttribute("name")||o.element.getAttribute("id")]=t;var c=e.extend(!0,i.options||{},O.asyncValidators[l].options);r=e.extend(!0,{},{url:n,data:a,type:"GET"},c),o.trigger("field:ajaxoptions",o,r),s=e.param(r),"undefined"==typeof O._remoteCache&&(O._remoteCache={});var d=O._remoteCache[s]=O._remoteCache[s]||e.ajax(r),u=function(){var t=O.asyncValidators[l].fn.call(o,d,n,i);return t||(t=e.Deferred().reject()),e.when(t)};return d.then(u,u)},priority:-1}),O.on("form:submit",function(){O._remoteCache={}}),l.prototype.addAsyncValidator=function(){return s.warnOnce("Accessing the method `addAsyncValidator` through an instance is deprecated. Simply call `Parsley.addAsyncValidator(...)`"),O.addAsyncValidator.apply(O,arguments)},O.addMessages("en",{defaultMessage:"This value seems to be invalid.",type:{email:"This value should be a valid email.",url:"This value should be a valid url.",number:"This value should be a valid number.",integer:"This value should be a valid integer.",digits:"This value should be digits.",alphanum:"This value should be alphanumeric."},notblank:"This value should not be blank.",required:"This value is required.",pattern:"This value seems to be invalid.",min:"This value should be greater than or equal to %s.",max:"This value should be lower than or equal to %s.",range:"This value should be between %s and %s.",minlength:"This value is too short. It should have %s characters or more.",maxlength:"This value is too long. It should have %s characters or fewer.",length:"This value length is invalid. It should be between %s and %s characters long.",mincheck:"You must select at least %s choices.",maxcheck:"You must select %s choices or fewer.",check:"You must select between %s and %s choices.",equalto:"This value should be the same."}),O.setLocale("en");var P=new i;P.install();var z=O;return z}),Parsley.addMessages("zh-cn",{defaultMessage:"\u4e0d\u6b63\u786e\u7684\u503c",type:{email:"\u8bf7\u8f93\u5165\u4e00\u4e2a\u6709\u6548\u7684\u7535\u5b50\u90ae\u7bb1\u5730\u5740",url:"\u8bf7\u8f93\u5165\u4e00\u4e2a\u6709\u6548\u7684\u94fe\u63a5",number:"\u8bf7\u8f93\u5165\u6b63\u786e\u7684\u6570\u5b57",integer:"\u8bf7\u8f93\u5165\u6b63\u786e\u7684\u6574\u6570",digits:"\u8bf7\u8f93\u5165\u6b63\u786e\u7684\u53f7\u7801",alphanum:"\u8bf7\u8f93\u5165\u5b57\u6bcd\u6216\u6570\u5b57"},notblank:"\u8bf7\u8f93\u5165\u503c",required:"\u5fc5\u586b\u9879",pattern:"\u683c\u5f0f\u4e0d\u6b63\u786e",min:"\u8f93\u5165\u503c\u8bf7\u5927\u4e8e\u6216\u7b49\u4e8e %s",max:"\u8f93\u5165\u503c\u8bf7\u5c0f\u4e8e\u6216\u7b49\u4e8e %s",range:"\u8f93\u5165\u503c\u5e94\u8be5\u5728 %s \u5230 %s \u4e4b\u95f4",minlength:"\u8bf7\u8f93\u5165\u81f3\u5c11 %s \u4e2a\u5b57\u7b26",maxlength:"\u8bf7\u8f93\u5165\u81f3\u591a %s \u4e2a\u5b57\u7b26",length:"\u5b57\u7b26\u957f\u5ea6\u5e94\u8be5\u5728 %s \u5230 %s \u4e4b\u95f4",mincheck:"\u8bf7\u81f3\u5c11\u9009\u62e9 %s \u4e2a\u9009\u9879",maxcheck:"\u8bf7\u9009\u62e9\u4e0d\u8d85\u8fc7 %s \u4e2a\u9009\u9879",check:"\u8bf7\u9009\u62e9 %s \u5230 %s \u4e2a\u9009\u9879",equalto:"\u8f93\u5165\u503c\u4e0d\u540c"}),Parsley.setLocale("zh-cn"),Parsley.addMessages("zh-cn",{dateiso:"\u8bf7\u8f93\u5165\u6b63\u786e\u683c\u5f0f\u7684\u65e5\u671f (YYYY-MM-DD)."}),!function(e,t){var n=t(e,e.document);e.lazySizes=n,"object"==typeof module&&module.exports&&(module.exports=n)}(window,function(e,t){"use strict";if(t.getElementsByClassName){var n,i,o=t.documentElement,r=e.Date,s=e.HTMLPictureElement,a="addEventListener",l="getAttribute",c=e[a],d=e.setTimeout,u=e.requestAnimationFrame||d,p=e.requestIdleCallback,h=/^picture$/i,f=["load","error","lazyincluded","_lazyloaded"],m={},g=Array.prototype.forEach,v=function(e,t){return m[t]||(m[t]=new RegExp("(\\s|^)"+t+"(\\s|$)")),m[t].test(e[l]("class")||"")&&m[t]},y=function(e,t){v(e,t)||e.setAttribute("class",(e[l]("class")||"").trim()+" "+t)},w=function(e,t){var n;(n=v(e,t))&&e.setAttribute("class",(e[l]("class")||"").replace(n," "))},b=function(e,t,n){var i=n?a:"removeEventListener";n&&b(e,t),f.forEach(function(n){e[i](n,t)})},C=function(e,i,o,r,s){var a=t.createEvent("CustomEvent");return o||(o={}),o.instance=n,a.initCustomEvent(i,!r,!s,o),e.dispatchEvent(a),a},x=function(t,n){var o;!s&&(o=e.picturefill||i.pf)?o({reevaluate:!0,elements:[t]}):n&&n.src&&(t.src=n.src)},S=function(e,t){return(getComputedStyle(e,null)||{})[t]},T=function(e,t,n){for(n=n||e.offsetWidth;n<i.minSize&&t&&!e._lazysizesWidth;)n=t.offsetWidth,t=t.parentNode;return n},_=function(){var e,n,i=[],o=[],r=i,s=function(){var t=r;for(r=i.length?o:i,e=!0,n=!1;t.length;)t.shift()();e=!1},a=function(i,o){e&&!o?i.apply(this,arguments):(r.push(i),n||(n=!0,(t.hidden?d:u)(s)))};return a._lsFlush=s,a}(),k=function(e,t){return t?function(){_(e)}:function(){var t=this,n=arguments;_(function(){e.apply(t,n)})}},$=function(e){var t,n=0,o=125,s=i.ricTimeout,a=function(){t=!1,n=r.now(),e()},l=p&&i.ricTimeout?function(){p(a,{timeout:s}),s!==i.ricTimeout&&(s=i.ricTimeout)}:k(function(){d(a)},!0);return function(e){var i;(e=e===!0)&&(s=33),t||(t=!0,i=o-(r.now()-n),0>i&&(i=0),e||9>i&&p?l():d(l,i))}},D=function(e){var t,n,i=99,o=function(){t=null,e()},s=function(){var e=r.now()-n;i>e?d(s,i-e):(p||o)(o)};return function(){n=r.now(),t||(t=d(s,i))}};!function(){var t,n={lazyClass:"lazyload",loadedClass:"lazyloaded",loadingClass:"lazyloading",preloadClass:"lazypreload",errorClass:"lazyerror",autosizesClass:"lazyautosizes",srcAttr:"data-src",srcsetAttr:"data-srcset",sizesAttr:"data-sizes",minSize:40,customMedia:{},init:!0,expFactor:1.5,hFac:.8,loadMode:2,loadHidden:!0,ricTimeout:300};i=e.lazySizesConfig||e.lazysizesConfig||{};for(t in n)t in i||(i[t]=n[t]);e.lazySizesConfig=i,d(function(){i.init&&M()})}();var E=function(){var s,u,p,f,m,T,E,M,A,I,F,P,z,N,j=/^img$/i,L=/^iframe$/i,R="onscroll"in e&&!/glebot/.test(navigator.userAgent),H=0,B=0,W=0,q=-1,V=function(e){W--,e&&e.target&&b(e.target,V),(!e||0>W||!e.target)&&(W=0)},Y=function(e,n){var i,r=e,s="hidden"==S(t.body,"visibility")||"hidden"!=S(e,"visibility");for(M-=n,F+=n,A-=n,I+=n;s&&(r=r.offsetParent)&&r!=t.body&&r!=o;)s=(S(r,"opacity")||1)>0,s&&"visible"!=S(r,"overflow")&&(i=r.getBoundingClientRect(),s=I>i.left&&A<i.right&&F>i.top-1&&M<i.bottom+1);return s},U=function(){var e,r,a,c,d,p,h,m,g,v=n.elements;if((f=i.loadMode)&&8>W&&(e=v.length)){r=0,q++,null==z&&("expand"in i||(i.expand=o.clientHeight>500&&o.clientWidth>500?500:370),P=i.expand,z=P*i.expFactor),z>B&&1>W&&q>2&&f>2&&!t.hidden?(B=z,q=0):B=f>1&&q>1&&6>W?P:H;for(;e>r;r++)if(v[r]&&!v[r]._lazyRace)if(R)if((m=v[r][l]("data-expand"))&&(p=1*m)||(p=B),g!==p&&(T=innerWidth+p*N,E=innerHeight+p,h=-1*p,g=p),a=v[r].getBoundingClientRect(),(F=a.bottom)>=h&&(M=a.top)<=E&&(I=a.right)>=h*N&&(A=a.left)<=T&&(F||I||A||M)&&(i.loadHidden||"hidden"!=S(v[r],"visibility"))&&(u&&3>W&&!m&&(3>f||4>q)||Y(v[r],p))){if(te(v[r]),d=!0,W>9)break}else!d&&u&&!c&&4>W&&4>q&&f>2&&(s[0]||i.preloadAfterLoad)&&(s[0]||!m&&(F||I||A||M||"auto"!=v[r][l](i.sizesAttr)))&&(c=s[0]||v[r]);else te(v[r]);c&&!d&&te(c)}},X=$(U),K=function(e){y(e.target,i.loadedClass),w(e.target,i.loadingClass),b(e.target,J),C(e.target,"lazyloaded")},G=k(K),J=function(e){G({target:e.target})},Q=function(e,t){try{e.contentWindow.location.replace(t)}catch(n){e.src=t}},Z=function(e){var t,n=e[l](i.srcsetAttr);(t=i.customMedia[e[l]("data-media")||e[l]("media")])&&e.setAttribute("media",t),n&&e.setAttribute("srcset",n)},ee=k(function(e,t,n,o,r){var s,a,c,u,f,m;(f=C(e,"lazybeforeunveil",t)).defaultPrevented||(o&&(n?y(e,i.autosizesClass):e.setAttribute("sizes",o)),a=e[l](i.srcsetAttr),s=e[l](i.srcAttr),r&&(c=e.parentNode,u=c&&h.test(c.nodeName||"")),m=t.firesLoad||"src"in e&&(a||s||u),f={target:e},m&&(b(e,V,!0),clearTimeout(p),p=d(V,2500),y(e,i.loadingClass),b(e,J,!0)),u&&g.call(c.getElementsByTagName("source"),Z),a?e.setAttribute("srcset",a):s&&!u&&(L.test(e.nodeName)?Q(e,s):e.src=s),r&&(a||u)&&x(e,{src:s})),e._lazyRace&&delete e._lazyRace,w(e,i.lazyClass),_(function(){(!m||e.complete&&e.naturalWidth>1)&&(m?V(f):W--,K(f))},!0)}),te=function(e){var t,n=j.test(e.nodeName),o=n&&(e[l](i.sizesAttr)||e[l]("sizes")),r="auto"==o;(!r&&u||!n||!e[l]("src")&&!e.srcset||e.complete||v(e,i.errorClass)||!v(e,i.lazyClass))&&(t=C(e,"lazyunveilread").detail,r&&O.updateElem(e,!0,e.offsetWidth),e._lazyRace=!0,W++,ee(e,t,r,o,n))},ne=function(){if(!u){if(r.now()-m<999)return void d(ne,999);var e=D(function(){i.loadMode=3,X()});u=!0,i.loadMode=3,X(),c("scroll",function(){3==i.loadMode&&(i.loadMode=2),e()},!0)}};return{_:function(){m=r.now(),n.elements=t.getElementsByClassName(i.lazyClass),s=t.getElementsByClassName(i.lazyClass+" "+i.preloadClass),N=i.hFac,c("scroll",X,!0),c("resize",X,!0),e.MutationObserver?new MutationObserver(X).observe(o,{childList:!0,subtree:!0,attributes:!0}):(o[a]("DOMNodeInserted",X,!0),o[a]("DOMAttrModified",X,!0),setInterval(X,999)),c("hashchange",X,!0),["focus","mouseover","click","load","transitionend","animationend","webkitAnimationEnd"].forEach(function(e){t[a](e,X,!0)}),/d$|^c/.test(t.readyState)?ne():(c("load",ne),t[a]("DOMContentLoaded",X),d(ne,2e4)),n.elements.length?(U(),_._lsFlush()):X()},checkElems:X,unveil:te}}(),O=function(){var e,n=k(function(e,t,n,i){var o,r,s;if(e._lazysizesWidth=i,i+="px",e.setAttribute("sizes",i),h.test(t.nodeName||""))for(o=t.getElementsByTagName("source"),r=0,s=o.length;s>r;r++)o[r].setAttribute("sizes",i);n.detail.dataAttr||x(e,n.detail)}),o=function(e,t,i){var o,r=e.parentNode;r&&(i=T(e,r,i),o=C(e,"lazybeforesizes",{width:i,dataAttr:!!t}),o.defaultPrevented||(i=o.detail.width,i&&i!==e._lazysizesWidth&&n(e,r,o,i)))},r=function(){var t,n=e.length;if(n)for(t=0;n>t;t++)o(e[t])},s=D(r);return{_:function(){e=t.getElementsByClassName(i.autosizesClass),c("resize",s)},checkElems:s,updateElem:o}}(),M=function(){M.i||(M.i=!0,O._(),E._())};return n={cfg:i,autoSizer:O,loader:E,init:M,uP:x,aC:y,rC:w,hC:v,fire:C,gW:T,rAF:_}}}),!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery"],e):"undefined"!=typeof exports?module.exports=e(require("jquery")):e(jQuery)}(function(e){"use strict";var t=window.Slick||{};(t=function(){var t=0;return function(n,i){var o,r=this;r.defaults={accessibility:!0,adaptiveHeight:!1,appendArrows:e(n),appendDots:e(n),arrows:!0,asNavFor:null,prevArrow:'<button class="slick-prev" aria-label="Previous" type="button">Previous</button>',nextArrow:'<button class="slick-next" aria-label="Next" type="button">Next</button>',autoplay:!1,autoplaySpeed:3e3,centerMode:!1,centerPadding:"50px",cssEase:"ease",customPaging:function(t,n){return e('<button type="button" />').text(n+1)},dots:!1,dotsClass:"slick-dots",draggable:!0,easing:"linear",edgeFriction:.35,fade:!1,focusOnSelect:!1,focusOnChange:!1,infinite:!0,initialSlide:0,lazyLoad:"ondemand",mobileFirst:!1,pauseOnHover:!0,pauseOnFocus:!0,pauseOnDotsHover:!1,respondTo:"window",responsive:null,rows:1,rtl:!1,slide:"",slidesPerRow:1,slidesToShow:1,slidesToScroll:1,speed:500,swipe:!0,swipeToSlide:!1,touchMove:!0,touchThreshold:5,useCSS:!0,useTransform:!0,variableWidth:!1,vertical:!1,verticalSwiping:!1,waitForAnimate:!0,zIndex:1e3},r.initials={animating:!1,dragging:!1,autoPlayTimer:null,currentDirection:0,currentLeft:null,currentSlide:0,direction:1,$dots:null,listWidth:null,listHeight:null,loadIndex:0,$nextArrow:null,$prevArrow:null,scrolling:!1,slideCount:null,slideWidth:null,$slideTrack:null,$slides:null,sliding:!1,slideOffset:0,swipeLeft:null,swiping:!1,$list:null,touchObject:{},transformsEnabled:!1,unslicked:!1},e.extend(r,r.initials),r.activeBreakpoint=null,r.animType=null,r.animProp=null,r.breakpoints=[],r.breakpointSettings=[],r.cssTransitions=!1,r.focussed=!1,r.interrupted=!1,r.hidden="hidden",r.paused=!0,r.positionProp=null,r.respondTo=null,r.rowCount=1,r.shouldClick=!0,r.$slider=e(n),r.$slidesCache=null,r.transformType=null,r.transitionType=null,r.visibilityChange="visibilitychange",r.windowWidth=0,r.windowTimer=null,o=e(n).data("slick")||{},r.options=e.extend({},r.defaults,i,o),r.currentSlide=r.options.initialSlide,r.originalSettings=r.options,void 0!==document.mozHidden?(r.hidden="mozHidden",r.visibilityChange="mozvisibilitychange"):void 0!==document.webkitHidden&&(r.hidden="webkitHidden",r.visibilityChange="webkitvisibilitychange"),r.autoPlay=e.proxy(r.autoPlay,r),r.autoPlayClear=e.proxy(r.autoPlayClear,r),r.autoPlayIterator=e.proxy(r.autoPlayIterator,r),r.changeSlide=e.proxy(r.changeSlide,r),r.clickHandler=e.proxy(r.clickHandler,r),r.selectHandler=e.proxy(r.selectHandler,r),r.setPosition=e.proxy(r.setPosition,r),r.swipeHandler=e.proxy(r.swipeHandler,r),r.dragHandler=e.proxy(r.dragHandler,r),r.keyHandler=e.proxy(r.keyHandler,r),r.instanceUid=t++,r.htmlExpr=/^(?:\s*(<[\w\W]+>)[^>]*)$/,r.registerBreakpoints(),r.init(!0)}}()).prototype.activateADA=function(){this.$slideTrack.find(".slick-active").attr({"aria-hidden":"false"}).find("a, input, button, select").attr({tabindex:"0"})},t.prototype.addSlide=t.prototype.slickAdd=function(t,n,i){var o=this;if("boolean"==typeof n)i=n,n=null;else if(n<0||n>=o.slideCount)return!1;o.unload(),"number"==typeof n?0===n&&0===o.$slides.length?e(t).appendTo(o.$slideTrack):i?e(t).insertBefore(o.$slides.eq(n)):e(t).insertAfter(o.$slides.eq(n)):!0===i?e(t).prependTo(o.$slideTrack):e(t).appendTo(o.$slideTrack),o.$slides=o.$slideTrack.children(this.options.slide),o.$slideTrack.children(this.options.slide).detach(),o.$slideTrack.append(o.$slides),o.$slides.each(function(t,n){e(n).attr("data-slick-index",t)}),o.$slidesCache=o.$slides,o.reinit()},t.prototype.animateHeight=function(){var e=this;if(1===e.options.slidesToShow&&!0===e.options.adaptiveHeight&&!1===e.options.vertical){var t=e.$slides.eq(e.currentSlide).outerHeight(!0);e.$list.animate({height:t},e.options.speed)}},t.prototype.animateSlide=function(t,n){var i={},o=this;o.animateHeight(),!0===o.options.rtl&&!1===o.options.vertical&&(t=-t),!1===o.transformsEnabled?!1===o.options.vertical?o.$slideTrack.animate({left:t},o.options.speed,o.options.easing,n):o.$slideTrack.animate({top:t},o.options.speed,o.options.easing,n):!1===o.cssTransitions?(!0===o.options.rtl&&(o.currentLeft=-o.currentLeft),e({animStart:o.currentLeft}).animate({animStart:t},{duration:o.options.speed,easing:o.options.easing,step:function(e){e=Math.ceil(e),!1===o.options.vertical?(i[o.animType]="translate("+e+"px, 0px)",o.$slideTrack.css(i)):(i[o.animType]="translate(0px,"+e+"px)",o.$slideTrack.css(i))},complete:function(){n&&n.call()}})):(o.applyTransition(),t=Math.ceil(t),!1===o.options.vertical?i[o.animType]="translate3d("+t+"px, 0px, 0px)":i[o.animType]="translate3d(0px,"+t+"px, 0px)",o.$slideTrack.css(i),n&&setTimeout(function(){o.disableTransition(),n.call()},o.options.speed))},t.prototype.getNavTarget=function(){var t=this,n=t.options.asNavFor;return n&&null!==n&&(n=e(n).not(t.$slider)),n},t.prototype.asNavFor=function(t){var n=this.getNavTarget();null!==n&&"object"==typeof n&&n.each(function(){var n=e(this).slick("getSlick");n.unslicked||n.slideHandler(t,!0)})},t.prototype.applyTransition=function(e){var t=this,n={};!1===t.options.fade?n[t.transitionType]=t.transformType+" "+t.options.speed+"ms "+t.options.cssEase:n[t.transitionType]="opacity "+t.options.speed+"ms "+t.options.cssEase,!1===t.options.fade?t.$slideTrack.css(n):t.$slides.eq(e).css(n)},t.prototype.autoPlay=function(){var e=this;e.autoPlayClear(),e.slideCount>e.options.slidesToShow&&(e.autoPlayTimer=setInterval(e.autoPlayIterator,e.options.autoplaySpeed))},t.prototype.autoPlayClear=function(){var e=this;e.autoPlayTimer&&clearInterval(e.autoPlayTimer)},t.prototype.autoPlayIterator=function(){var e=this,t=e.currentSlide+e.options.slidesToScroll;e.paused||e.interrupted||e.focussed||(!1===e.options.infinite&&(1===e.direction&&e.currentSlide+1===e.slideCount-1?e.direction=0:0===e.direction&&(t=e.currentSlide-e.options.slidesToScroll,e.currentSlide-1==0&&(e.direction=1))),e.slideHandler(t))},t.prototype.buildArrows=function(){var t=this;!0===t.options.arrows&&(t.$prevArrow=e(t.options.prevArrow).addClass("slick-arrow"),t.$nextArrow=e(t.options.nextArrow).addClass("slick-arrow"),t.slideCount>t.options.slidesToShow?(t.$prevArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"),t.$nextArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"),t.htmlExpr.test(t.options.prevArrow)&&t.$prevArrow.prependTo(t.options.appendArrows),t.htmlExpr.test(t.options.nextArrow)&&t.$nextArrow.appendTo(t.options.appendArrows),!0!==t.options.infinite&&t.$prevArrow.addClass("slick-disabled").attr("aria-disabled","true")):t.$prevArrow.add(t.$nextArrow).addClass("slick-hidden").attr({"aria-disabled":"true",tabindex:"-1"}))},t.prototype.buildDots=function(){var t,n,i=this;if(!0===i.options.dots){for(i.$slider.addClass("slick-dotted"),n=e("<ul />").addClass(i.options.dotsClass),t=0;t<=i.getDotCount();t+=1)n.append(e("<li />").append(i.options.customPaging.call(this,i,t)));i.$dots=n.appendTo(i.options.appendDots),i.$dots.find("li").first().addClass("slick-active")}},t.prototype.buildOut=function(){var t=this;t.$slides=t.$slider.children(t.options.slide+":not(.slick-cloned)").addClass("slick-slide"),t.slideCount=t.$slides.length,t.$slides.each(function(t,n){e(n).attr("data-slick-index",t).data("originalStyling",e(n).attr("style")||"")}),t.$slider.addClass("slick-slider"),t.$slideTrack=0===t.slideCount?e('<div class="slick-track"/>').appendTo(t.$slider):t.$slides.wrapAll('<div class="slick-track"/>').parent(),t.$list=t.$slideTrack.wrap('<div class="slick-list"/>').parent(),t.$slideTrack.css("opacity",0),!0!==t.options.centerMode&&!0!==t.options.swipeToSlide||(t.options.slidesToScroll=1),e("img[data-lazy]",t.$slider).not("[src]").addClass("slick-loading"),t.setupInfinite(),t.buildArrows(),t.buildDots(),t.updateDots(),t.setSlideClasses("number"==typeof t.currentSlide?t.currentSlide:0),!0===t.options.draggable&&t.$list.addClass("draggable")},t.prototype.buildRows=function(){var e,t,n,i,o,r,s,a=this;if(i=document.createDocumentFragment(),r=a.$slider.children(),a.options.rows>1){for(s=a.options.slidesPerRow*a.options.rows,o=Math.ceil(r.length/s),e=0;e<o;e++){var l=document.createElement("div");for(t=0;t<a.options.rows;t++){var c=document.createElement("div");for(n=0;n<a.options.slidesPerRow;n++){var d=e*s+(t*a.options.slidesPerRow+n);r.get(d)&&c.appendChild(r.get(d))}l.appendChild(c)}i.appendChild(l)}a.$slider.empty().append(i),a.$slider.children().children().children().css({width:100/a.options.slidesPerRow+"%",display:"inline-block"})}},t.prototype.checkResponsive=function(t,n){var i,o,r,s=this,a=!1,l=s.$slider.width(),c=window.innerWidth||e(window).width();if("window"===s.respondTo?r=c:"slider"===s.respondTo?r=l:"min"===s.respondTo&&(r=Math.min(c,l)),s.options.responsive&&s.options.responsive.length&&null!==s.options.responsive){o=null;for(i in s.breakpoints)s.breakpoints.hasOwnProperty(i)&&(!1===s.originalSettings.mobileFirst?r<s.breakpoints[i]&&(o=s.breakpoints[i]):r>s.breakpoints[i]&&(o=s.breakpoints[i]));null!==o?null!==s.activeBreakpoint?(o!==s.activeBreakpoint||n)&&(s.activeBreakpoint=o,"unslick"===s.breakpointSettings[o]?s.unslick(o):(s.options=e.extend({},s.originalSettings,s.breakpointSettings[o]),!0===t&&(s.currentSlide=s.options.initialSlide),s.refresh(t)),a=o):(s.activeBreakpoint=o,"unslick"===s.breakpointSettings[o]?s.unslick(o):(s.options=e.extend({},s.originalSettings,s.breakpointSettings[o]),!0===t&&(s.currentSlide=s.options.initialSlide),s.refresh(t)),a=o):null!==s.activeBreakpoint&&(s.activeBreakpoint=null,s.options=s.originalSettings,!0===t&&(s.currentSlide=s.options.initialSlide),s.refresh(t),a=o),t||!1===a||s.$slider.trigger("breakpoint",[s,a])}},t.prototype.changeSlide=function(t,n){var i,o,r,s=this,a=e(t.currentTarget);switch(a.is("a")&&t.preventDefault(),a.is("li")||(a=a.closest("li")),r=s.slideCount%s.options.slidesToScroll!=0,i=r?0:(s.slideCount-s.currentSlide)%s.options.slidesToScroll,t.data.message){case"previous":o=0===i?s.options.slidesToScroll:s.options.slidesToShow-i,s.slideCount>s.options.slidesToShow&&s.slideHandler(s.currentSlide-o,!1,n);break;case"next":o=0===i?s.options.slidesToScroll:i,s.slideCount>s.options.slidesToShow&&s.slideHandler(s.currentSlide+o,!1,n);break;case"index":var l=0===t.data.index?0:t.data.index||a.index()*s.options.slidesToScroll;s.slideHandler(s.checkNavigable(l),!1,n),a.children().trigger("focus");break;default:return}},t.prototype.checkNavigable=function(e){var t,n;if(t=this.getNavigableIndexes(),n=0,e>t[t.length-1])e=t[t.length-1];else for(var i in t){if(e<t[i]){e=n;break}n=t[i]}return e},t.prototype.cleanUpEvents=function(){var t=this;t.options.dots&&null!==t.$dots&&(e("li",t.$dots).off("click.slick",t.changeSlide).off("mouseenter.slick",e.proxy(t.interrupt,t,!0)).off("mouseleave.slick",e.proxy(t.interrupt,t,!1)),!0===t.options.accessibility&&t.$dots.off("keydown.slick",t.keyHandler)),t.$slider.off("focus.slick blur.slick"),!0===t.options.arrows&&t.slideCount>t.options.slidesToShow&&(t.$prevArrow&&t.$prevArrow.off("click.slick",t.changeSlide),t.$nextArrow&&t.$nextArrow.off("click.slick",t.changeSlide),!0===t.options.accessibility&&(t.$prevArrow&&t.$prevArrow.off("keydown.slick",t.keyHandler),t.$nextArrow&&t.$nextArrow.off("keydown.slick",t.keyHandler))),t.$list.off("touchstart.slick mousedown.slick",t.swipeHandler),t.$list.off("touchmove.slick mousemove.slick",t.swipeHandler),t.$list.off("touchend.slick mouseup.slick",t.swipeHandler),t.$list.off("touchcancel.slick mouseleave.slick",t.swipeHandler),t.$list.off("click.slick",t.clickHandler),e(document).off(t.visibilityChange,t.visibility),t.cleanUpSlideEvents(),!0===t.options.accessibility&&t.$list.off("keydown.slick",t.keyHandler),!0===t.options.focusOnSelect&&e(t.$slideTrack).children().off("click.slick",t.selectHandler),e(window).off("orientationchange.slick.slick-"+t.instanceUid,t.orientationChange),e(window).off("resize.slick.slick-"+t.instanceUid,t.resize),e("[draggable!=true]",t.$slideTrack).off("dragstart",t.preventDefault),e(window).off("load.slick.slick-"+t.instanceUid,t.setPosition)},t.prototype.cleanUpSlideEvents=function(){var t=this;t.$list.off("mouseenter.slick",e.proxy(t.interrupt,t,!0)),t.$list.off("mouseleave.slick",e.proxy(t.interrupt,t,!1))},t.prototype.cleanUpRows=function(){var e,t=this;t.options.rows>1&&((e=t.$slides.children().children()).removeAttr("style"),t.$slider.empty().append(e))},t.prototype.clickHandler=function(e){!1===this.shouldClick&&(e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault())},t.prototype.destroy=function(t){var n=this;n.autoPlayClear(),n.touchObject={},n.cleanUpEvents(),e(".slick-cloned",n.$slider).detach(),n.$dots&&n.$dots.remove(),n.$prevArrow&&n.$prevArrow.length&&(n.$prevArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display",""),n.htmlExpr.test(n.options.prevArrow)&&n.$prevArrow.remove()),n.$nextArrow&&n.$nextArrow.length&&(n.$nextArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display",""),n.htmlExpr.test(n.options.nextArrow)&&n.$nextArrow.remove()),n.$slides&&(n.$slides.removeClass("slick-slide slick-active slick-center slick-visible slick-current").removeAttr("aria-hidden").removeAttr("data-slick-index").each(function(){e(this).attr("style",e(this).data("originalStyling"))}),n.$slideTrack.children(this.options.slide).detach(),n.$slideTrack.detach(),n.$list.detach(),n.$slider.append(n.$slides)),n.cleanUpRows(),n.$slider.removeClass("slick-slider"),n.$slider.removeClass("slick-initialized"),n.$slider.removeClass("slick-dotted"),n.unslicked=!0,t||n.$slider.trigger("destroy",[n])},t.prototype.disableTransition=function(e){var t=this,n={};n[t.transitionType]="",!1===t.options.fade?t.$slideTrack.css(n):t.$slides.eq(e).css(n)},t.prototype.fadeSlide=function(e,t){var n=this;!1===n.cssTransitions?(n.$slides.eq(e).css({zIndex:n.options.zIndex}),n.$slides.eq(e).animate({opacity:1},n.options.speed,n.options.easing,t)):(n.applyTransition(e),n.$slides.eq(e).css({opacity:1,zIndex:n.options.zIndex}),t&&setTimeout(function(){n.disableTransition(e),t.call()},n.options.speed))},t.prototype.fadeSlideOut=function(e){var t=this;!1===t.cssTransitions?t.$slides.eq(e).animate({opacity:0,zIndex:t.options.zIndex-2},t.options.speed,t.options.easing):(t.applyTransition(e),t.$slides.eq(e).css({opacity:0,zIndex:t.options.zIndex-2}))},t.prototype.filterSlides=t.prototype.slickFilter=function(e){var t=this;null!==e&&(t.$slidesCache=t.$slides,t.unload(),t.$slideTrack.children(this.options.slide).detach(),t.$slidesCache.filter(e).appendTo(t.$slideTrack),t.reinit())},t.prototype.focusHandler=function(){var t=this;t.$slider.off("focus.slick blur.slick").on("focus.slick blur.slick","*",function(n){n.stopImmediatePropagation();var i=e(this);setTimeout(function(){t.options.pauseOnFocus&&(t.focussed=i.is(":focus"),t.autoPlay())},0)})},t.prototype.getCurrent=t.prototype.slickCurrentSlide=function(){return this.currentSlide},t.prototype.getDotCount=function(){var e=this,t=0,n=0,i=0;if(!0===e.options.infinite)if(e.slideCount<=e.options.slidesToShow)++i;else for(;t<e.slideCount;)++i,t=n+e.options.slidesToScroll,n+=e.options.slidesToScroll<=e.options.slidesToShow?e.options.slidesToScroll:e.options.slidesToShow;else if(!0===e.options.centerMode)i=e.slideCount;else if(e.options.asNavFor)for(;t<e.slideCount;)++i,t=n+e.options.slidesToScroll,n+=e.options.slidesToScroll<=e.options.slidesToShow?e.options.slidesToScroll:e.options.slidesToShow;else i=1+Math.ceil((e.slideCount-e.options.slidesToShow)/e.options.slidesToScroll);return i-1},t.prototype.getLeft=function(e){var t,n,i,o,r=this,s=0;return r.slideOffset=0,n=r.$slides.first().outerHeight(!0),
!0===r.options.infinite?(r.slideCount>r.options.slidesToShow&&(r.slideOffset=r.slideWidth*r.options.slidesToShow*-1,o=-1,!0===r.options.vertical&&!0===r.options.centerMode&&(2===r.options.slidesToShow?o=-1.5:1===r.options.slidesToShow&&(o=-2)),s=n*r.options.slidesToShow*o),r.slideCount%r.options.slidesToScroll!=0&&e+r.options.slidesToScroll>r.slideCount&&r.slideCount>r.options.slidesToShow&&(e>r.slideCount?(r.slideOffset=(r.options.slidesToShow-(e-r.slideCount))*r.slideWidth*-1,s=(r.options.slidesToShow-(e-r.slideCount))*n*-1):(r.slideOffset=r.slideCount%r.options.slidesToScroll*r.slideWidth*-1,s=r.slideCount%r.options.slidesToScroll*n*-1))):e+r.options.slidesToShow>r.slideCount&&(r.slideOffset=(e+r.options.slidesToShow-r.slideCount)*r.slideWidth,s=(e+r.options.slidesToShow-r.slideCount)*n),r.slideCount<=r.options.slidesToShow&&(r.slideOffset=0,s=0),!0===r.options.centerMode&&r.slideCount<=r.options.slidesToShow?r.slideOffset=r.slideWidth*Math.floor(r.options.slidesToShow)/2-r.slideWidth*r.slideCount/2:!0===r.options.centerMode&&!0===r.options.infinite?r.slideOffset+=r.slideWidth*Math.floor(r.options.slidesToShow/2)-r.slideWidth:!0===r.options.centerMode&&(r.slideOffset=0,r.slideOffset+=r.slideWidth*Math.floor(r.options.slidesToShow/2)),t=!1===r.options.vertical?e*r.slideWidth*-1+r.slideOffset:e*n*-1+s,!0===r.options.variableWidth&&(i=r.slideCount<=r.options.slidesToShow||!1===r.options.infinite?r.$slideTrack.children(".slick-slide").eq(e):r.$slideTrack.children(".slick-slide").eq(e+r.options.slidesToShow),t=!0===r.options.rtl?i[0]?-1*(r.$slideTrack.width()-i[0].offsetLeft-i.width()):0:i[0]?-1*i[0].offsetLeft:0,!0===r.options.centerMode&&(i=r.slideCount<=r.options.slidesToShow||!1===r.options.infinite?r.$slideTrack.children(".slick-slide").eq(e):r.$slideTrack.children(".slick-slide").eq(e+r.options.slidesToShow+1),t=!0===r.options.rtl?i[0]?-1*(r.$slideTrack.width()-i[0].offsetLeft-i.width()):0:i[0]?-1*i[0].offsetLeft:0,t+=(r.$list.width()-i.outerWidth())/2)),t},t.prototype.getOption=t.prototype.slickGetOption=function(e){return this.options[e]},t.prototype.getNavigableIndexes=function(){var e,t=this,n=0,i=0,o=[];for(!1===t.options.infinite?e=t.slideCount:(n=-1*t.options.slidesToScroll,i=-1*t.options.slidesToScroll,e=2*t.slideCount);n<e;)o.push(n),n=i+t.options.slidesToScroll,i+=t.options.slidesToScroll<=t.options.slidesToShow?t.options.slidesToScroll:t.options.slidesToShow;return o},t.prototype.getSlick=function(){return this},t.prototype.getSlideCount=function(){var t,n,i=this;return n=!0===i.options.centerMode?i.slideWidth*Math.floor(i.options.slidesToShow/2):0,!0===i.options.swipeToSlide?(i.$slideTrack.find(".slick-slide").each(function(o,r){if(r.offsetLeft-n+e(r).outerWidth()/2>-1*i.swipeLeft)return t=r,!1}),Math.abs(e(t).attr("data-slick-index")-i.currentSlide)||1):i.options.slidesToScroll},t.prototype.goTo=t.prototype.slickGoTo=function(e,t){this.changeSlide({data:{message:"index",index:parseInt(e)}},t)},t.prototype.init=function(t){var n=this;e(n.$slider).hasClass("slick-initialized")||(e(n.$slider).addClass("slick-initialized"),n.buildRows(),n.buildOut(),n.setProps(),n.startLoad(),n.loadSlider(),n.initializeEvents(),n.updateArrows(),n.updateDots(),n.checkResponsive(!0),n.focusHandler()),t&&n.$slider.trigger("init",[n]),!0===n.options.accessibility&&n.initADA(),n.options.autoplay&&(n.paused=!1,n.autoPlay())},t.prototype.initADA=function(){var t=this,n=Math.ceil(t.slideCount/t.options.slidesToShow),i=t.getNavigableIndexes().filter(function(e){return e>=0&&e<t.slideCount});t.$slides.add(t.$slideTrack.find(".slick-cloned")).attr({"aria-hidden":"true",tabindex:"-1"}).find("a, input, button, select").attr({tabindex:"-1"}),null!==t.$dots&&(t.$slides.not(t.$slideTrack.find(".slick-cloned")).each(function(n){var o=i.indexOf(n);e(this).attr({role:"tabpanel",id:"slick-slide"+t.instanceUid+n,tabindex:-1}),-1!==o&&e(this).attr({"aria-describedby":"slick-slide-control"+t.instanceUid+o})}),t.$dots.attr("role","tablist").find("li").each(function(o){var r=i[o];e(this).attr({role:"presentation"}),e(this).find("button").first().attr({role:"tab",id:"slick-slide-control"+t.instanceUid+o,"aria-controls":"slick-slide"+t.instanceUid+r,"aria-label":o+1+" of "+n,"aria-selected":null,tabindex:"-1"})}).eq(t.currentSlide).find("button").attr({"aria-selected":"true",tabindex:"0"}).end());for(var o=t.currentSlide,r=o+t.options.slidesToShow;o<r;o++)t.$slides.eq(o).attr("tabindex",0);t.activateADA()},t.prototype.initArrowEvents=function(){var e=this;!0===e.options.arrows&&e.slideCount>e.options.slidesToShow&&(e.$prevArrow.off("click.slick").on("click.slick",{message:"previous"},e.changeSlide),e.$nextArrow.off("click.slick").on("click.slick",{message:"next"},e.changeSlide),!0===e.options.accessibility&&(e.$prevArrow.on("keydown.slick",e.keyHandler),e.$nextArrow.on("keydown.slick",e.keyHandler)))},t.prototype.initDotEvents=function(){var t=this;!0===t.options.dots&&(e("li",t.$dots).on("click.slick",{message:"index"},t.changeSlide),!0===t.options.accessibility&&t.$dots.on("keydown.slick",t.keyHandler)),!0===t.options.dots&&!0===t.options.pauseOnDotsHover&&e("li",t.$dots).on("mouseenter.slick",e.proxy(t.interrupt,t,!0)).on("mouseleave.slick",e.proxy(t.interrupt,t,!1))},t.prototype.initSlideEvents=function(){var t=this;t.options.pauseOnHover&&(t.$list.on("mouseenter.slick",e.proxy(t.interrupt,t,!0)),t.$list.on("mouseleave.slick",e.proxy(t.interrupt,t,!1)))},t.prototype.initializeEvents=function(){var t=this;t.initArrowEvents(),t.initDotEvents(),t.initSlideEvents(),t.$list.on("touchstart.slick mousedown.slick",{action:"start"},t.swipeHandler),t.$list.on("touchmove.slick mousemove.slick",{action:"move"},t.swipeHandler),t.$list.on("touchend.slick mouseup.slick",{action:"end"},t.swipeHandler),t.$list.on("touchcancel.slick mouseleave.slick",{action:"end"},t.swipeHandler),t.$list.on("click.slick",t.clickHandler),e(document).on(t.visibilityChange,e.proxy(t.visibility,t)),!0===t.options.accessibility&&t.$list.on("keydown.slick",t.keyHandler),!0===t.options.focusOnSelect&&e(t.$slideTrack).children().on("click.slick",t.selectHandler),e(window).on("orientationchange.slick.slick-"+t.instanceUid,e.proxy(t.orientationChange,t)),e(window).on("resize.slick.slick-"+t.instanceUid,e.proxy(t.resize,t)),e("[draggable!=true]",t.$slideTrack).on("dragstart",t.preventDefault),e(window).on("load.slick.slick-"+t.instanceUid,t.setPosition),e(t.setPosition)},t.prototype.initUI=function(){var e=this;!0===e.options.arrows&&e.slideCount>e.options.slidesToShow&&(e.$prevArrow.show(),e.$nextArrow.show()),!0===e.options.dots&&e.slideCount>e.options.slidesToShow&&e.$dots.show()},t.prototype.keyHandler=function(e){var t=this;e.target.tagName.match("TEXTAREA|INPUT|SELECT")||(37===e.keyCode&&!0===t.options.accessibility?t.changeSlide({data:{message:!0===t.options.rtl?"next":"previous"}}):39===e.keyCode&&!0===t.options.accessibility&&t.changeSlide({data:{message:!0===t.options.rtl?"previous":"next"}}))},t.prototype.lazyLoad=function(){function t(t){e("img[data-lazy]",t).each(function(){var t=e(this),n=e(this).attr("data-lazy"),i=e(this).attr("data-srcset"),o=e(this).attr("data-sizes")||r.$slider.attr("data-sizes"),s=document.createElement("img");s.onload=function(){t.animate({opacity:0},100,function(){i&&(t.attr("srcset",i),o&&t.attr("sizes",o)),t.attr("src",n).animate({opacity:1},200,function(){t.removeAttr("data-lazy data-srcset data-sizes").removeClass("slick-loading")}),r.$slider.trigger("lazyLoaded",[r,t,n])})},s.onerror=function(){t.removeAttr("data-lazy").removeClass("slick-loading").addClass("slick-lazyload-error"),r.$slider.trigger("lazyLoadError",[r,t,n])},s.src=n})}var n,i,o,r=this;if(!0===r.options.centerMode?!0===r.options.infinite?o=(i=r.currentSlide+(r.options.slidesToShow/2+1))+r.options.slidesToShow+2:(i=Math.max(0,r.currentSlide-(r.options.slidesToShow/2+1)),o=r.options.slidesToShow/2+1+2+r.currentSlide):(i=r.options.infinite?r.options.slidesToShow+r.currentSlide:r.currentSlide,o=Math.ceil(i+r.options.slidesToShow),!0===r.options.fade&&(i>0&&i--,o<=r.slideCount&&o++)),n=r.$slider.find(".slick-slide").slice(i,o),"anticipated"===r.options.lazyLoad)for(var s=i-1,a=o,l=r.$slider.find(".slick-slide"),c=0;c<r.options.slidesToScroll;c++)s<0&&(s=r.slideCount-1),n=(n=n.add(l.eq(s))).add(l.eq(a)),s--,a++;t(n),r.slideCount<=r.options.slidesToShow?t(r.$slider.find(".slick-slide")):r.currentSlide>=r.slideCount-r.options.slidesToShow?t(r.$slider.find(".slick-cloned").slice(0,r.options.slidesToShow)):0===r.currentSlide&&t(r.$slider.find(".slick-cloned").slice(-1*r.options.slidesToShow))},t.prototype.loadSlider=function(){var e=this;e.setPosition(),e.$slideTrack.css({opacity:1}),e.$slider.removeClass("slick-loading"),e.initUI(),"progressive"===e.options.lazyLoad&&e.progressiveLazyLoad()},t.prototype.next=t.prototype.slickNext=function(){this.changeSlide({data:{message:"next"}})},t.prototype.orientationChange=function(){var e=this;e.checkResponsive(),e.setPosition()},t.prototype.pause=t.prototype.slickPause=function(){var e=this;e.autoPlayClear(),e.paused=!0},t.prototype.play=t.prototype.slickPlay=function(){var e=this;e.autoPlay(),e.options.autoplay=!0,e.paused=!1,e.focussed=!1,e.interrupted=!1},t.prototype.postSlide=function(t){var n=this;n.unslicked||(n.$slider.trigger("afterChange",[n,t]),n.animating=!1,n.slideCount>n.options.slidesToShow&&n.setPosition(),n.swipeLeft=null,n.options.autoplay&&n.autoPlay(),!0===n.options.accessibility&&(n.initADA(),n.options.focusOnChange&&e(n.$slides.get(n.currentSlide)).attr("tabindex",0).focus()))},t.prototype.prev=t.prototype.slickPrev=function(){this.changeSlide({data:{message:"previous"}})},t.prototype.preventDefault=function(e){e.preventDefault()},t.prototype.progressiveLazyLoad=function(t){t=t||1;var n,i,o,r,s,a=this,l=e("img[data-lazy]",a.$slider);l.length?(n=l.first(),i=n.attr("data-lazy"),o=n.attr("data-srcset"),r=n.attr("data-sizes")||a.$slider.attr("data-sizes"),(s=document.createElement("img")).onload=function(){o&&(n.attr("srcset",o),r&&n.attr("sizes",r)),n.attr("src",i).removeAttr("data-lazy data-srcset data-sizes").removeClass("slick-loading"),!0===a.options.adaptiveHeight&&a.setPosition(),a.$slider.trigger("lazyLoaded",[a,n,i]),a.progressiveLazyLoad()},s.onerror=function(){t<3?setTimeout(function(){a.progressiveLazyLoad(t+1)},500):(n.removeAttr("data-lazy").removeClass("slick-loading").addClass("slick-lazyload-error"),a.$slider.trigger("lazyLoadError",[a,n,i]),a.progressiveLazyLoad())},s.src=i):a.$slider.trigger("allImagesLoaded",[a])},t.prototype.refresh=function(t){var n,i,o=this;i=o.slideCount-o.options.slidesToShow,!o.options.infinite&&o.currentSlide>i&&(o.currentSlide=i),o.slideCount<=o.options.slidesToShow&&(o.currentSlide=0),n=o.currentSlide,o.destroy(!0),e.extend(o,o.initials,{currentSlide:n}),o.init(),t||o.changeSlide({data:{message:"index",index:n}},!1)},t.prototype.registerBreakpoints=function(){var t,n,i,o=this,r=o.options.responsive||null;if("array"===e.type(r)&&r.length){o.respondTo=o.options.respondTo||"window";for(t in r)if(i=o.breakpoints.length-1,r.hasOwnProperty(t)){for(n=r[t].breakpoint;i>=0;)o.breakpoints[i]&&o.breakpoints[i]===n&&o.breakpoints.splice(i,1),i--;o.breakpoints.push(n),o.breakpointSettings[n]=r[t].settings}o.breakpoints.sort(function(e,t){return o.options.mobileFirst?e-t:t-e})}},t.prototype.reinit=function(){var t=this;t.$slides=t.$slideTrack.children(t.options.slide).addClass("slick-slide"),t.slideCount=t.$slides.length,t.currentSlide>=t.slideCount&&0!==t.currentSlide&&(t.currentSlide=t.currentSlide-t.options.slidesToScroll),t.slideCount<=t.options.slidesToShow&&(t.currentSlide=0),t.registerBreakpoints(),t.setProps(),t.setupInfinite(),t.buildArrows(),t.updateArrows(),t.initArrowEvents(),t.buildDots(),t.updateDots(),t.initDotEvents(),t.cleanUpSlideEvents(),t.initSlideEvents(),t.checkResponsive(!1,!0),!0===t.options.focusOnSelect&&e(t.$slideTrack).children().on("click.slick",t.selectHandler),t.setSlideClasses("number"==typeof t.currentSlide?t.currentSlide:0),t.setPosition(),t.focusHandler(),t.paused=!t.options.autoplay,t.autoPlay(),t.$slider.trigger("reInit",[t])},t.prototype.resize=function(){var t=this;e(window).width()!==t.windowWidth&&(clearTimeout(t.windowDelay),t.windowDelay=window.setTimeout(function(){t.windowWidth=e(window).width(),t.checkResponsive(),t.unslicked||t.setPosition()},50))},t.prototype.removeSlide=t.prototype.slickRemove=function(e,t,n){var i=this;return e="boolean"==typeof e?!0===(t=e)?0:i.slideCount-1:!0===t?--e:e,!(i.slideCount<1||e<0||e>i.slideCount-1)&&(i.unload(),!0===n?i.$slideTrack.children().remove():i.$slideTrack.children(this.options.slide).eq(e).remove(),i.$slides=i.$slideTrack.children(this.options.slide),i.$slideTrack.children(this.options.slide).detach(),i.$slideTrack.append(i.$slides),i.$slidesCache=i.$slides,i.reinit(),void 0)},t.prototype.setCSS=function(e){var t,n,i=this,o={};!0===i.options.rtl&&(e=-e),t="left"==i.positionProp?Math.ceil(e)+"px":"0px",n="top"==i.positionProp?Math.ceil(e)+"px":"0px",o[i.positionProp]=e,!1===i.transformsEnabled?i.$slideTrack.css(o):(o={},!1===i.cssTransitions?(o[i.animType]="translate("+t+", "+n+")",i.$slideTrack.css(o)):(o[i.animType]="translate3d("+t+", "+n+", 0px)",i.$slideTrack.css(o)))},t.prototype.setDimensions=function(){var e=this;!1===e.options.vertical?!0===e.options.centerMode&&e.$list.css({padding:"0px "+e.options.centerPadding}):(e.$list.height(e.$slides.first().outerHeight(!0)*e.options.slidesToShow),!0===e.options.centerMode&&e.$list.css({padding:e.options.centerPadding+" 0px"})),e.listWidth=e.$list.width(),e.listHeight=e.$list.height(),!1===e.options.vertical&&!1===e.options.variableWidth?(e.slideWidth=Math.ceil(e.listWidth/e.options.slidesToShow),e.$slideTrack.width(Math.ceil(e.slideWidth*e.$slideTrack.children(".slick-slide").length))):!0===e.options.variableWidth?e.$slideTrack.width(5e3*e.slideCount):(e.slideWidth=Math.ceil(e.listWidth),e.$slideTrack.height(Math.ceil(e.$slides.first().outerHeight(!0)*e.$slideTrack.children(".slick-slide").length)));var t=e.$slides.first().outerWidth(!0)-e.$slides.first().width();!1===e.options.variableWidth&&e.$slideTrack.children(".slick-slide").width(e.slideWidth-t)},t.prototype.setFade=function(){var t,n=this;n.$slides.each(function(i,o){t=n.slideWidth*i*-1,!0===n.options.rtl?e(o).css({position:"relative",right:t,top:0,zIndex:n.options.zIndex-2,opacity:0}):e(o).css({position:"relative",left:t,top:0,zIndex:n.options.zIndex-2,opacity:0})}),n.$slides.eq(n.currentSlide).css({zIndex:n.options.zIndex-1,opacity:1})},t.prototype.setHeight=function(){var e=this;if(1===e.options.slidesToShow&&!0===e.options.adaptiveHeight&&!1===e.options.vertical){var t=e.$slides.eq(e.currentSlide).outerHeight(!0);e.$list.css("height",t)}},t.prototype.setOption=t.prototype.slickSetOption=function(){var t,n,i,o,r,s=this,a=!1;if("object"===e.type(arguments[0])?(i=arguments[0],a=arguments[1],r="multiple"):"string"===e.type(arguments[0])&&(i=arguments[0],o=arguments[1],a=arguments[2],"responsive"===arguments[0]&&"array"===e.type(arguments[1])?r="responsive":void 0!==arguments[1]&&(r="single")),"single"===r)s.options[i]=o;else if("multiple"===r)e.each(i,function(e,t){s.options[e]=t});else if("responsive"===r)for(n in o)if("array"!==e.type(s.options.responsive))s.options.responsive=[o[n]];else{for(t=s.options.responsive.length-1;t>=0;)s.options.responsive[t].breakpoint===o[n].breakpoint&&s.options.responsive.splice(t,1),t--;s.options.responsive.push(o[n])}a&&(s.unload(),s.reinit())},t.prototype.setPosition=function(){var e=this;e.setDimensions(),e.setHeight(),!1===e.options.fade?e.setCSS(e.getLeft(e.currentSlide)):e.setFade(),e.$slider.trigger("setPosition",[e])},t.prototype.setProps=function(){var e=this,t=document.body.style;e.positionProp=!0===e.options.vertical?"top":"left","top"===e.positionProp?e.$slider.addClass("slick-vertical"):e.$slider.removeClass("slick-vertical"),void 0===t.WebkitTransition&&void 0===t.MozTransition&&void 0===t.msTransition||!0===e.options.useCSS&&(e.cssTransitions=!0),e.options.fade&&("number"==typeof e.options.zIndex?e.options.zIndex<3&&(e.options.zIndex=3):e.options.zIndex=e.defaults.zIndex),void 0!==t.OTransform&&(e.animType="OTransform",e.transformType="-o-transform",e.transitionType="OTransition",void 0===t.perspectiveProperty&&void 0===t.webkitPerspective&&(e.animType=!1)),void 0!==t.MozTransform&&(e.animType="MozTransform",e.transformType="-moz-transform",e.transitionType="MozTransition",void 0===t.perspectiveProperty&&void 0===t.MozPerspective&&(e.animType=!1)),void 0!==t.webkitTransform&&(e.animType="webkitTransform",e.transformType="-webkit-transform",e.transitionType="webkitTransition",void 0===t.perspectiveProperty&&void 0===t.webkitPerspective&&(e.animType=!1)),void 0!==t.msTransform&&(e.animType="msTransform",e.transformType="-ms-transform",e.transitionType="msTransition",void 0===t.msTransform&&(e.animType=!1)),void 0!==t.transform&&!1!==e.animType&&(e.animType="transform",e.transformType="transform",e.transitionType="transition"),e.transformsEnabled=e.options.useTransform&&null!==e.animType&&!1!==e.animType},t.prototype.setSlideClasses=function(e){var t,n,i,o,r=this;if(n=r.$slider.find(".slick-slide").removeClass("slick-active slick-center slick-current").attr("aria-hidden","true"),r.$slides.eq(e).addClass("slick-current"),!0===r.options.centerMode){var s=r.options.slidesToShow%2==0?1:0;t=Math.floor(r.options.slidesToShow/2),!0===r.options.infinite&&(e>=t&&e<=r.slideCount-1-t?r.$slides.slice(e-t+s,e+t+1).addClass("slick-active").attr("aria-hidden","false"):(i=r.options.slidesToShow+e,n.slice(i-t+1+s,i+t+2).addClass("slick-active").attr("aria-hidden","false")),0===e?n.eq(n.length-1-r.options.slidesToShow).addClass("slick-center"):e===r.slideCount-1&&n.eq(r.options.slidesToShow).addClass("slick-center")),r.$slides.eq(e).addClass("slick-center")}else e>=0&&e<=r.slideCount-r.options.slidesToShow?r.$slides.slice(e,e+r.options.slidesToShow).addClass("slick-active").attr("aria-hidden","false"):n.length<=r.options.slidesToShow?n.addClass("slick-active").attr("aria-hidden","false"):(o=r.slideCount%r.options.slidesToShow,i=!0===r.options.infinite?r.options.slidesToShow+e:e,r.options.slidesToShow==r.options.slidesToScroll&&r.slideCount-e<r.options.slidesToShow?n.slice(i-(r.options.slidesToShow-o),i+o).addClass("slick-active").attr("aria-hidden","false"):n.slice(i,i+r.options.slidesToShow).addClass("slick-active").attr("aria-hidden","false"));"ondemand"!==r.options.lazyLoad&&"anticipated"!==r.options.lazyLoad||r.lazyLoad()},t.prototype.setupInfinite=function(){var t,n,i,o=this;if(!0===o.options.fade&&(o.options.centerMode=!1),!0===o.options.infinite&&!1===o.options.fade&&(n=null,o.slideCount>o.options.slidesToShow)){for(i=!0===o.options.centerMode?o.options.slidesToShow+1:o.options.slidesToShow,t=o.slideCount;t>o.slideCount-i;t-=1)n=t-1,e(o.$slides[n]).clone(!0).attr("id","").attr("data-slick-index",n-o.slideCount).prependTo(o.$slideTrack).addClass("slick-cloned");for(t=0;t<i+o.slideCount;t+=1)n=t,e(o.$slides[n]).clone(!0).attr("id","").attr("data-slick-index",n+o.slideCount).appendTo(o.$slideTrack).addClass("slick-cloned");o.$slideTrack.find(".slick-cloned").find("[id]").each(function(){e(this).attr("id","")})}},t.prototype.interrupt=function(e){var t=this;e||t.autoPlay(),t.interrupted=e},t.prototype.selectHandler=function(t){var n=this,i=e(t.target).is(".slick-slide")?e(t.target):e(t.target).parents(".slick-slide"),o=parseInt(i.attr("data-slick-index"));o||(o=0),n.slideCount<=n.options.slidesToShow?n.slideHandler(o,!1,!0):n.slideHandler(o)},t.prototype.slideHandler=function(e,t,n){var i,o,r,s,a,l=null,c=this;if(t=t||!1,!(!0===c.animating&&!0===c.options.waitForAnimate||!0===c.options.fade&&c.currentSlide===e))if(!1===t&&c.asNavFor(e),i=e,l=c.getLeft(i),s=c.getLeft(c.currentSlide),c.currentLeft=null===c.swipeLeft?s:c.swipeLeft,!1===c.options.infinite&&!1===c.options.centerMode&&(e<0||e>c.getDotCount()*c.options.slidesToScroll))!1===c.options.fade&&(i=c.currentSlide,!0!==n?c.animateSlide(s,function(){c.postSlide(i)}):c.postSlide(i));else if(!1===c.options.infinite&&!0===c.options.centerMode&&(e<0||e>c.slideCount-c.options.slidesToScroll))!1===c.options.fade&&(i=c.currentSlide,!0!==n?c.animateSlide(s,function(){c.postSlide(i)}):c.postSlide(i));else{if(c.options.autoplay&&clearInterval(c.autoPlayTimer),o=i<0?c.slideCount%c.options.slidesToScroll!=0?c.slideCount-c.slideCount%c.options.slidesToScroll:c.slideCount+i:i>=c.slideCount?c.slideCount%c.options.slidesToScroll!=0?0:i-c.slideCount:i,c.animating=!0,c.$slider.trigger("beforeChange",[c,c.currentSlide,o]),r=c.currentSlide,c.currentSlide=o,c.setSlideClasses(c.currentSlide),c.options.asNavFor&&(a=(a=c.getNavTarget()).slick("getSlick")).slideCount<=a.options.slidesToShow&&a.setSlideClasses(c.currentSlide),c.updateDots(),c.updateArrows(),!0===c.options.fade)return!0!==n?(c.fadeSlideOut(r),c.fadeSlide(o,function(){c.postSlide(o)})):c.postSlide(o),void c.animateHeight();!0!==n?c.animateSlide(l,function(){c.postSlide(o)}):c.postSlide(o)}},t.prototype.startLoad=function(){var e=this;!0===e.options.arrows&&e.slideCount>e.options.slidesToShow&&(e.$prevArrow.hide(),e.$nextArrow.hide()),!0===e.options.dots&&e.slideCount>e.options.slidesToShow&&e.$dots.hide(),e.$slider.addClass("slick-loading")},t.prototype.swipeDirection=function(){var e,t,n,i,o=this;return e=o.touchObject.startX-o.touchObject.curX,t=o.touchObject.startY-o.touchObject.curY,n=Math.atan2(t,e),(i=Math.round(180*n/Math.PI))<0&&(i=360-Math.abs(i)),i<=45&&i>=0?!1===o.options.rtl?"left":"right":i<=360&&i>=315?!1===o.options.rtl?"left":"right":i>=135&&i<=225?!1===o.options.rtl?"right":"left":!0===o.options.verticalSwiping?i>=35&&i<=135?"down":"up":"vertical"},t.prototype.swipeEnd=function(e){var t,n,i=this;if(i.dragging=!1,i.swiping=!1,i.scrolling)return i.scrolling=!1,!1;if(i.interrupted=!1,i.shouldClick=!(i.touchObject.swipeLength>10),void 0===i.touchObject.curX)return!1;if(!0===i.touchObject.edgeHit&&i.$slider.trigger("edge",[i,i.swipeDirection()]),i.touchObject.swipeLength>=i.touchObject.minSwipe){switch(n=i.swipeDirection()){case"left":case"down":t=i.options.swipeToSlide?i.checkNavigable(i.currentSlide+i.getSlideCount()):i.currentSlide+i.getSlideCount(),i.currentDirection=0;break;case"right":case"up":t=i.options.swipeToSlide?i.checkNavigable(i.currentSlide-i.getSlideCount()):i.currentSlide-i.getSlideCount(),i.currentDirection=1}"vertical"!=n&&(i.slideHandler(t),i.touchObject={},i.$slider.trigger("swipe",[i,n]))}else i.touchObject.startX!==i.touchObject.curX&&(i.slideHandler(i.currentSlide),i.touchObject={})},t.prototype.swipeHandler=function(e){var t=this;if(!(!1===t.options.swipe||"ontouchend"in document&&!1===t.options.swipe||!1===t.options.draggable&&-1!==e.type.indexOf("mouse")))switch(t.touchObject.fingerCount=e.originalEvent&&void 0!==e.originalEvent.touches?e.originalEvent.touches.length:1,t.touchObject.minSwipe=t.listWidth/t.options.touchThreshold,!0===t.options.verticalSwiping&&(t.touchObject.minSwipe=t.listHeight/t.options.touchThreshold),e.data.action){case"start":t.swipeStart(e);break;case"move":t.swipeMove(e);break;case"end":t.swipeEnd(e)}},t.prototype.swipeMove=function(e){var t,n,i,o,r,s,a=this;return r=void 0!==e.originalEvent?e.originalEvent.touches:null,!(!a.dragging||a.scrolling||r&&1!==r.length)&&(t=a.getLeft(a.currentSlide),a.touchObject.curX=void 0!==r?r[0].pageX:e.clientX,a.touchObject.curY=void 0!==r?r[0].pageY:e.clientY,a.touchObject.swipeLength=Math.round(Math.sqrt(Math.pow(a.touchObject.curX-a.touchObject.startX,2))),s=Math.round(Math.sqrt(Math.pow(a.touchObject.curY-a.touchObject.startY,2))),!a.options.verticalSwiping&&!a.swiping&&s>4?(a.scrolling=!0,!1):(!0===a.options.verticalSwiping&&(a.touchObject.swipeLength=s),n=a.swipeDirection(),void 0!==e.originalEvent&&a.touchObject.swipeLength>4&&(a.swiping=!0,e.preventDefault()),o=(!1===a.options.rtl?1:-1)*(a.touchObject.curX>a.touchObject.startX?1:-1),!0===a.options.verticalSwiping&&(o=a.touchObject.curY>a.touchObject.startY?1:-1),i=a.touchObject.swipeLength,a.touchObject.edgeHit=!1,!1===a.options.infinite&&(0===a.currentSlide&&"right"===n||a.currentSlide>=a.getDotCount()&&"left"===n)&&(i=a.touchObject.swipeLength*a.options.edgeFriction,a.touchObject.edgeHit=!0),!1===a.options.vertical?a.swipeLeft=t+i*o:a.swipeLeft=t+i*(a.$list.height()/a.listWidth)*o,!0===a.options.verticalSwiping&&(a.swipeLeft=t+i*o),!0!==a.options.fade&&!1!==a.options.touchMove&&(!0===a.animating?(a.swipeLeft=null,!1):void a.setCSS(a.swipeLeft))))},t.prototype.swipeStart=function(e){var t,n=this;return n.interrupted=!0,1!==n.touchObject.fingerCount||n.slideCount<=n.options.slidesToShow?(n.touchObject={},!1):(void 0!==e.originalEvent&&void 0!==e.originalEvent.touches&&(t=e.originalEvent.touches[0]),n.touchObject.startX=n.touchObject.curX=void 0!==t?t.pageX:e.clientX,n.touchObject.startY=n.touchObject.curY=void 0!==t?t.pageY:e.clientY,n.dragging=!0,void 0)},t.prototype.unfilterSlides=t.prototype.slickUnfilter=function(){var e=this;null!==e.$slidesCache&&(e.unload(),e.$slideTrack.children(this.options.slide).detach(),e.$slidesCache.appendTo(e.$slideTrack),e.reinit())},t.prototype.unload=function(){var t=this;e(".slick-cloned",t.$slider).remove(),t.$dots&&t.$dots.remove(),t.$prevArrow&&t.htmlExpr.test(t.options.prevArrow)&&t.$prevArrow.remove(),t.$nextArrow&&t.htmlExpr.test(t.options.nextArrow)&&t.$nextArrow.remove(),t.$slides.removeClass("slick-slide slick-active slick-visible slick-current").attr("aria-hidden","true").css("width","")},t.prototype.unslick=function(e){var t=this;t.$slider.trigger("unslick",[t,e]),t.destroy()},t.prototype.updateArrows=function(){var e=this;Math.floor(e.options.slidesToShow/2),!0===e.options.arrows&&e.slideCount>e.options.slidesToShow&&!e.options.infinite&&(e.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false"),e.$nextArrow.removeClass("slick-disabled").attr("aria-disabled","false"),0===e.currentSlide?(e.$prevArrow.addClass("slick-disabled").attr("aria-disabled","true"),e.$nextArrow.removeClass("slick-disabled").attr("aria-disabled","false")):e.currentSlide>=e.slideCount-e.options.slidesToShow&&!1===e.options.centerMode?(e.$nextArrow.addClass("slick-disabled").attr("aria-disabled","true"),e.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false")):e.currentSlide>=e.slideCount-1&&!0===e.options.centerMode&&(e.$nextArrow.addClass("slick-disabled").attr("aria-disabled","true"),e.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false")))},t.prototype.updateDots=function(){var e=this;null!==e.$dots&&(e.$dots.find("li").removeClass("slick-active").end(),e.$dots.find("li").eq(Math.floor(e.currentSlide/e.options.slidesToScroll)).addClass("slick-active"))},t.prototype.visibility=function(){var e=this;e.options.autoplay&&(document[e.hidden]?e.interrupted=!0:e.interrupted=!1)},e.fn.slick=function(){var e,n,i=this,o=arguments[0],r=Array.prototype.slice.call(arguments,1),s=i.length;for(e=0;e<s;e++)if("object"==typeof o||void 0===o?i[e].slick=new t(i[e],o):n=i[e].slick[o].apply(i[e].slick,r),void 0!==n)return n;return i}}),function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof exports?exports.CUI=t(require("jquery")):e.CUI=t(e.jQuery)}(this,function(e){return function(e){function t(i){if(n[i])return n[i].exports;var o=n[i]={exports:{},id:i,loaded:!1};return e[i].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){n(1),n(3),n(4),n(5),n(6),n(7),n(8),n(10),n(11),n(12),n(13),n(14),n(16),n(17),n(18),n(19)},function(e,t,n){"use strict";function i(e,t,n){return setTimeout(l(e,n),t)}function o(e,t,n){return!!Array.isArray(e)&&(r(e,n[t],n),!0)}function r(e,t,n){var i;if(e)if(e.forEach)e.forEach(t,n);else if(void 0!==e.length)for(i=0;i<e.length;)t.call(n,e[i],i,e),i++;else for(i in e)e.hasOwnProperty(i)&&t.call(n,e[i],i,e)}function s(e,t,n){var i="DEPRECATED METHOD: "+t+"\n"+n+" AT \n";return function(){var t=new Error("get-stack-trace"),n=t&&t.stack?t.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",o=window.console&&(window.console.warn||window.console.log);return o&&o.call(window.console,i,n),e.apply(this,arguments)}}function a(e,t,n){var i,o=t.prototype;i=e.prototype=Object.create(o),i.constructor=e,i._super=o,n&&de(i,n)}function l(e,t){return function(){return e.apply(t,arguments)}}function c(e,t){return typeof e==me?e.apply(t?t[0]||void 0:void 0,t):e}function d(e,t){return void 0===e?t:e}function u(e,t,n){r(m(t),function(t){e.addEventListener(t,n,!1)})}function p(e,t,n){r(m(t),function(t){e.removeEventListener(t,n,!1)})}function h(e,t){for(;e;){if(e==t)return!0;e=e.parentNode}return!1}function f(e,t){return e.indexOf(t)>-1}function m(e){return e.trim().split(/\s+/g)}function g(e,t,n){if(e.indexOf&&!n)return e.indexOf(t);for(var i=0;i<e.length;){if(n&&e[i][n]==t||!n&&e[i]===t)return i;i++}return-1}function v(e){return Array.prototype.slice.call(e,0)}function y(e,t,n){for(var i=[],o=[],r=0;r<e.length;){var s=t?e[r][t]:e[r];g(o,s)<0&&i.push(e[r]),o[r]=s,r++}return n&&(i=t?i.sort(function(e,n){return e[t]>n[t]}):i.sort()),i}function w(e,t){for(var n,i,o=t[0].toUpperCase()+t.slice(1),r=0;r<he.length;){if(n=he[r],i=n?n+o:t,i in e)return i;r++}}function b(){return Ce++}function C(e){var t=e.ownerDocument||e;return t.defaultView||t.parentWindow||window}function x(e,t){var n=this;this.manager=e,this.callback=t,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(t){c(e.options.enable,[e])&&n.handler(t)},this.init()}function S(e){var t,n=e.options.inputClass;return new(t=n?n:Te?N:_e?R:Se?B:z)(e,T)}function T(e,t,n){var i=n.pointers.length,o=n.changedPointers.length,r=t&Me&&i-o===0,s=t&(Ie|Fe)&&i-o===0;n.isFirst=!!r,n.isFinal=!!s,r&&(e.session={}),n.eventType=t,_(e,n),e.emit("hammer.input",n),e.recognize(n),e.session.prevInput=n}function _(e,t){var n=e.session,i=t.pointers,o=i.length;n.firstInput||(n.firstInput=D(t)),o>1&&!n.firstMultiple?n.firstMultiple=D(t):1===o&&(n.firstMultiple=!1);var r=n.firstInput,s=n.firstMultiple,a=s?s.center:r.center,l=t.center=E(i);t.timeStamp=ye(),t.deltaTime=t.timeStamp-r.timeStamp,t.angle=I(a,l),t.distance=A(a,l),k(n,t),t.offsetDirection=M(t.deltaX,t.deltaY);var c=O(t.deltaTime,t.deltaX,t.deltaY);t.overallVelocityX=c.x,t.overallVelocityY=c.y,t.overallVelocity=ve(c.x)>ve(c.y)?c.x:c.y,t.scale=s?P(s.pointers,i):1,t.rotation=s?F(s.pointers,i):0,t.maxPointers=n.prevInput?t.pointers.length>n.prevInput.maxPointers?t.pointers.length:n.prevInput.maxPointers:t.pointers.length,$(n,t);var d=e.element;h(t.srcEvent.target,d)&&(d=t.srcEvent.target),t.target=d}function k(e,t){var n=t.center,i=e.offsetDelta||{},o=e.prevDelta||{},r=e.prevInput||{};t.eventType!==Me&&r.eventType!==Ie||(o=e.prevDelta={x:r.deltaX||0,y:r.deltaY||0},i=e.offsetDelta={x:n.x,y:n.y}),t.deltaX=o.x+(n.x-i.x),t.deltaY=o.y+(n.y-i.y)}function $(e,t){var n,i,o,r,s=e.lastInterval||t,a=t.timeStamp-s.timeStamp;if(t.eventType!=Fe&&(a>Oe||void 0===s.velocity)){var l=t.deltaX-s.deltaX,c=t.deltaY-s.deltaY,d=O(a,l,c);i=d.x,o=d.y,n=ve(d.x)>ve(d.y)?d.x:d.y,r=M(l,c),e.lastInterval=t}else n=s.velocity,i=s.velocityX,o=s.velocityY,r=s.direction;t.velocity=n,t.velocityX=i,t.velocityY=o,t.direction=r}function D(e){for(var t=[],n=0;n<e.pointers.length;)t[n]={clientX:ge(e.pointers[n].clientX),clientY:ge(e.pointers[n].clientY)},n++;return{timeStamp:ye(),pointers:t,center:E(t),deltaX:e.deltaX,deltaY:e.deltaY}}function E(e){var t=e.length;if(1===t)return{x:ge(e[0].clientX),y:ge(e[0].clientY)};for(var n=0,i=0,o=0;o<t;)n+=e[o].clientX,i+=e[o].clientY,o++;return{x:ge(n/t),y:ge(i/t)}}function O(e,t,n){return{x:t/e||0,y:n/e||0}}function M(e,t){return e===t?Pe:ve(e)>=ve(t)?e<0?ze:Ne:t<0?je:Le}function A(e,t,n){n||(n=We);var i=t[n[0]]-e[n[0]],o=t[n[1]]-e[n[1]];return Math.sqrt(i*i+o*o)}function I(e,t,n){
n||(n=We);var i=t[n[0]]-e[n[0]],o=t[n[1]]-e[n[1]];return 180*Math.atan2(o,i)/Math.PI}function F(e,t){return I(t[1],t[0],qe)+I(e[1],e[0],qe)}function P(e,t){return A(t[0],t[1],qe)/A(e[0],e[1],qe)}function z(){this.evEl=Ye,this.evWin=Ue,this.pressed=!1,x.apply(this,arguments)}function N(){this.evEl=Ge,this.evWin=Je,x.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}function j(){this.evTarget=Ze,this.evWin=et,this.started=!1,x.apply(this,arguments)}function L(e,t){var n=v(e.touches),i=v(e.changedTouches);return t&(Ie|Fe)&&(n=y(n.concat(i),"identifier",!0)),[n,i]}function R(){this.evTarget=nt,this.targetIds={},x.apply(this,arguments)}function H(e,t){var n=v(e.touches),i=this.targetIds;if(t&(Me|Ae)&&1===n.length)return i[n[0].identifier]=!0,[n,n];var o,r,s=v(e.changedTouches),a=[],l=this.target;if(r=n.filter(function(e){return h(e.target,l)}),t===Me)for(o=0;o<r.length;)i[r[o].identifier]=!0,o++;for(o=0;o<s.length;)i[s[o].identifier]&&a.push(s[o]),t&(Ie|Fe)&&delete i[s[o].identifier],o++;return a.length?[y(r.concat(a),"identifier",!0),a]:void 0}function B(){x.apply(this,arguments);var e=l(this.handler,this);this.touch=new R(this.manager,e),this.mouse=new z(this.manager,e),this.primaryTouch=null,this.lastTouches=[]}function W(e,t){e&Me?(this.primaryTouch=t.changedPointers[0].identifier,q.call(this,t)):e&(Ie|Fe)&&q.call(this,t)}function q(e){var t=e.changedPointers[0];if(t.identifier===this.primaryTouch){var n={x:t.clientX,y:t.clientY};this.lastTouches.push(n);var i=this.lastTouches,o=function(){var e=i.indexOf(n);e>-1&&i.splice(e,1)};setTimeout(o,it)}}function V(e){for(var t=e.srcEvent.clientX,n=e.srcEvent.clientY,i=0;i<this.lastTouches.length;i++){var o=this.lastTouches[i],r=Math.abs(t-o.x),s=Math.abs(n-o.y);if(r<=ot&&s<=ot)return!0}return!1}function Y(e,t){this.manager=e,this.set(t)}function U(e){if(f(e,dt))return dt;var t=f(e,ut),n=f(e,pt);return t&&n?dt:t||n?t?ut:pt:f(e,ct)?ct:lt}function X(){if(!st)return!1;var e={},t=window.CSS&&window.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(n){e[n]=!t||window.CSS.supports("touch-action",n)}),e}function K(e){this.options=de({},this.defaults,e||{}),this.id=b(),this.manager=null,this.options.enable=d(this.options.enable,!0),this.state=ft,this.simultaneous={},this.requireFail=[]}function G(e){return e&wt?"cancel":e&vt?"end":e&gt?"move":e&mt?"start":""}function J(e){return e==Le?"down":e==je?"up":e==ze?"left":e==Ne?"right":""}function Q(e,t){var n=t.manager;return n?n.get(e):e}function Z(){K.apply(this,arguments)}function ee(){Z.apply(this,arguments),this.pX=null,this.pY=null}function te(){Z.apply(this,arguments)}function ne(){K.apply(this,arguments),this._timer=null,this._input=null}function ie(){Z.apply(this,arguments)}function oe(){Z.apply(this,arguments)}function re(){K.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}function se(e,t){return t=t||{},t.recognizers=d(t.recognizers,se.defaults.preset),new ae(e,t)}function ae(e,t){this.options=de({},se.defaults,t||{}),this.options.inputTarget=this.options.inputTarget||e,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=e,this.input=S(this),this.touchAction=new Y(this,this.options.touchAction),le(this,!0),r(this.options.recognizers,function(e){var t=this.add(new e[0](e[1]));e[2]&&t.recognizeWith(e[2]),e[3]&&t.requireFailure(e[3])},this)}function le(e,t){var n=e.element;if(n.style){var i;r(e.options.cssProps,function(o,r){i=w(n.style,r),t?(e.oldCssProps[i]=n.style[i],n.style[i]=o):n.style[i]=e.oldCssProps[i]||""}),t||(e.oldCssProps={})}}function ce(e,t){var n=document.createEvent("Event");n.initEvent(e,!0,!0),n.gesture=t,t.target.dispatchEvent(n)}var de,ue=n(2),pe=n(3),he=["","webkit","Moz","MS","ms","o"],fe=document.createElement("div"),me="function",ge=Math.round,ve=Math.abs,ye=Date.now;de="function"!=typeof Object.assign?function(e){if(void 0===e||null===e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1;n<arguments.length;n++){var i=arguments[n];if(void 0!==i&&null!==i)for(var o in i)i.hasOwnProperty(o)&&(t[o]=i[o])}return t}:Object.assign;var we=s(function(e,t,n){for(var i=Object.keys(t),o=0;o<i.length;)(!n||n&&void 0===e[i[o]])&&(e[i[o]]=t[i[o]]),o++;return e},"extend","Use `assign`."),be=s(function(e,t){return we(e,t,!0)},"merge","Use `assign`."),Ce=1,xe=/mobile|tablet|ip(ad|hone|od)|android/i,Se="ontouchstart"in window,Te=void 0!==w(window,"PointerEvent"),_e=Se&&xe.test(navigator.userAgent),ke="touch",$e="pen",De="mouse",Ee="kinect",Oe=25,Me=1,Ae=2,Ie=4,Fe=8,Pe=1,ze=2,Ne=4,je=8,Le=16,Re=ze|Ne,He=je|Le,Be=Re|He,We=["x","y"],qe=["clientX","clientY"];x.prototype={handler:function(){},init:function(){this.evEl&&u(this.element,this.evEl,this.domHandler),this.evTarget&&u(this.target,this.evTarget,this.domHandler),this.evWin&&u(C(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&p(this.element,this.evEl,this.domHandler),this.evTarget&&p(this.target,this.evTarget,this.domHandler),this.evWin&&p(C(this.element),this.evWin,this.domHandler)}};var Ve={mousedown:Me,mousemove:Ae,mouseup:Ie},Ye="mousedown",Ue="mousemove mouseup";a(z,x,{handler:function(e){var t=Ve[e.type];t&Me&&0===e.button&&(this.pressed=!0),t&Ae&&1!==e.which&&(t=Ie),this.pressed&&(t&Ie&&(this.pressed=!1),this.callback(this.manager,t,{pointers:[e],changedPointers:[e],pointerType:De,srcEvent:e}))}});var Xe={pointerdown:Me,pointermove:Ae,pointerup:Ie,pointercancel:Fe,pointerout:Fe},Ke={2:ke,3:$e,4:De,5:Ee},Ge="pointerdown",Je="pointermove pointerup pointercancel";window.MSPointerEvent&&!window.PointerEvent&&(Ge="MSPointerDown",Je="MSPointerMove MSPointerUp MSPointerCancel"),a(N,x,{handler:function(e){var t=this.store,n=!1,i=e.type.toLowerCase().replace("ms",""),o=Xe[i],r=Ke[e.pointerType]||e.pointerType,s=r==ke,a=g(t,e.pointerId,"pointerId");o&Me&&(0===e.button||s)?a<0&&(t.push(e),a=t.length-1):o&(Ie|Fe)&&(n=!0),a<0||(t[a]=e,this.callback(this.manager,o,{pointers:t,changedPointers:[e],pointerType:r,srcEvent:e}),n&&t.splice(a,1))}});var Qe={touchstart:Me,touchmove:Ae,touchend:Ie,touchcancel:Fe},Ze="touchstart",et="touchstart touchmove touchend touchcancel";a(j,x,{handler:function(e){var t=Qe[e.type];if(t===Me&&(this.started=!0),this.started){var n=L.call(this,e,t);t&(Ie|Fe)&&n[0].length-n[1].length===0&&(this.started=!1),this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:ke,srcEvent:e})}}});var tt={touchstart:Me,touchmove:Ae,touchend:Ie,touchcancel:Fe},nt="touchstart touchmove touchend touchcancel";a(R,x,{handler:function(e){var t=tt[e.type],n=H.call(this,e,t);n&&this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:ke,srcEvent:e})}});var it=2500,ot=25;a(B,x,{handler:function(e,t,n){var i=n.pointerType==ke,o=n.pointerType==De;if(!(o&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(i)W.call(this,t,n);else if(o&&V.call(this,n))return;this.callback(e,t,n)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var rt=w(fe.style,"touchAction"),st=void 0!==rt,at="compute",lt="auto",ct="manipulation",dt="none",ut="pan-x",pt="pan-y",ht=X();Y.prototype={set:function(e){e==at&&(e=this.compute()),st&&this.manager.element.style&&ht[e]&&(this.manager.element.style[rt]=e),this.actions=e.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var e=[];return r(this.manager.recognizers,function(t){c(t.options.enable,[t])&&(e=e.concat(t.getTouchAction()))}),U(e.join(" "))},preventDefaults:function(e){var t=e.srcEvent,n=e.offsetDirection;if(this.manager.session.prevented)return void t.preventDefault();var i=this.actions,o=f(i,dt)&&!ht[dt],r=f(i,pt)&&!ht[pt],s=f(i,ut)&&!ht[ut];if(o){var a=1===e.pointers.length,l=e.distance<2,c=e.deltaTime<250;if(a&&l&&c)return}return s&&r?void 0:o||r&&n&Re||s&&n&He?this.preventSrc(t):void 0},preventSrc:function(e){this.manager.session.prevented=!0,e.preventDefault()}};var ft=1,mt=2,gt=4,vt=8,yt=vt,wt=16,bt=32;K.prototype={defaults:{},set:function(e){return de(this.options,e),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(e){if(o(e,"recognizeWith",this))return this;var t=this.simultaneous;return e=Q(e,this),t[e.id]||(t[e.id]=e,e.recognizeWith(this)),this},dropRecognizeWith:function(e){return o(e,"dropRecognizeWith",this)?this:(e=Q(e,this),delete this.simultaneous[e.id],this)},requireFailure:function(e){if(o(e,"requireFailure",this))return this;var t=this.requireFail;return e=Q(e,this),g(t,e)===-1&&(t.push(e),e.requireFailure(this)),this},dropRequireFailure:function(e){if(o(e,"dropRequireFailure",this))return this;e=Q(e,this);var t=g(this.requireFail,e);return t>-1&&this.requireFail.splice(t,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(e){return!!this.simultaneous[e.id]},emit:function(e){function t(t){n.manager.emit(t,e)}var n=this,i=this.state;i<vt&&t(n.options.event+G(i)),t(n.options.event),e.additionalEvent&&t(e.additionalEvent),i>=vt&&t(n.options.event+G(i))},tryEmit:function(e){return this.canEmit()?this.emit(e):void(this.state=bt)},canEmit:function(){for(var e=0;e<this.requireFail.length;){if(!(this.requireFail[e].state&(bt|ft)))return!1;e++}return!0},recognize:function(e){var t=de({},e);return c(this.options.enable,[this,t])?(this.state&(yt|wt|bt)&&(this.state=ft),this.state=this.process(t),void(this.state&(mt|gt|vt|wt)&&this.tryEmit(t))):(this.reset(),void(this.state=bt))},process:function(e){},getTouchAction:function(){},reset:function(){}},a(Z,K,{defaults:{pointers:1},attrTest:function(e){var t=this.options.pointers;return 0===t||e.pointers.length===t},process:function(e){var t=this.state,n=e.eventType,i=t&(mt|gt),o=this.attrTest(e);return i&&(n&Fe||!o)?t|wt:i||o?n&Ie?t|vt:t&mt?t|gt:mt:bt}}),a(ee,Z,{defaults:{event:"pan",threshold:10,pointers:1,direction:Be},getTouchAction:function(){var e=this.options.direction,t=[];return e&Re&&t.push(pt),e&He&&t.push(ut),t},directionTest:function(e){var t=this.options,n=!0,i=e.distance,o=e.direction,r=e.deltaX,s=e.deltaY;return o&t.direction||(t.direction&Re?(o=0===r?Pe:r<0?ze:Ne,n=r!=this.pX,i=Math.abs(e.deltaX)):(o=0===s?Pe:s<0?je:Le,n=s!=this.pY,i=Math.abs(e.deltaY))),e.direction=o,n&&i>t.threshold&&o&t.direction},attrTest:function(e){return Z.prototype.attrTest.call(this,e)&&(this.state&mt||!(this.state&mt)&&this.directionTest(e))},emit:function(e){this.pX=e.deltaX,this.pY=e.deltaY;var t=J(e.direction);t&&(e.additionalEvent=this.options.event+t),this._super.emit.call(this,e)}}),a(te,Z,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[dt]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.scale-1)>this.options.threshold||this.state&mt)},emit:function(e){if(1!==e.scale){var t=e.scale<1?"in":"out";e.additionalEvent=this.options.event+t}this._super.emit.call(this,e)}}),a(ne,K,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[lt]},process:function(e){var t=this.options,n=e.pointers.length===t.pointers,o=e.distance<t.threshold,r=e.deltaTime>t.time;if(this._input=e,!o||!n||e.eventType&(Ie|Fe)&&!r)this.reset();else if(e.eventType&Me)this.reset(),this._timer=i(function(){this.state=yt,this.tryEmit()},t.time,this);else if(e.eventType&Ie)return yt;return bt},reset:function(){clearTimeout(this._timer)},emit:function(e){this.state===yt&&(e&&e.eventType&Ie?this.manager.emit(this.options.event+"up",e):(this._input.timeStamp=ye(),this.manager.emit(this.options.event,this._input)))}}),a(ie,Z,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[dt]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.rotation)>this.options.threshold||this.state&mt)}}),a(oe,Z,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:Re|He,pointers:1},getTouchAction:function(){return ee.prototype.getTouchAction.call(this)},attrTest:function(e){var t,n=this.options.direction;return n&(Re|He)?t=e.overallVelocity:n&Re?t=e.overallVelocityX:n&He&&(t=e.overallVelocityY),this._super.attrTest.call(this,e)&&n&e.offsetDirection&&e.distance>this.options.threshold&&e.maxPointers==this.options.pointers&&ve(t)>this.options.velocity&&e.eventType&Ie},emit:function(e){var t=J(e.offsetDirection);t&&this.manager.emit(this.options.event+t,e),this.manager.emit(this.options.event,e)}}),a(re,K,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[ct]},process:function(e){var t=this.options,n=e.pointers.length===t.pointers,o=e.distance<t.threshold,r=e.deltaTime<t.time;if(this.reset(),e.eventType&Me&&0===this.count)return this.failTimeout();if(o&&r&&n){if(e.eventType!=Ie)return this.failTimeout();var s=!this.pTime||e.timeStamp-this.pTime<t.interval,a=!this.pCenter||A(this.pCenter,e.center)<t.posThreshold;this.pTime=e.timeStamp,this.pCenter=e.center,a&&s?this.count+=1:this.count=1,this._input=e;var l=this.count%t.taps;if(0===l)return this.hasRequireFailures()?(this._timer=i(function(){this.state=yt,this.tryEmit()},t.interval,this),mt):yt}return bt},failTimeout:function(){return this._timer=i(function(){this.state=bt},this.options.interval,this),bt},reset:function(){clearTimeout(this._timer)},emit:function(){this.state==yt&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}}),se.VERSION="2.0.7",se.defaults={domEvents:!1,touchAction:at,enable:!0,inputTarget:null,inputClass:null,preset:[[ie,{enable:!1}],[te,{enable:!1},["rotate"]],[oe,{direction:Re}],[ee,{direction:Re},["swipe"]],[re],[re,{event:"doubletap",taps:2},["tap"]],[ne]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};var Ct=1,xt=2;ae.prototype={set:function(e){return de(this.options,e),e.touchAction&&this.touchAction.update(),e.inputTarget&&(this.input.destroy(),this.input.target=e.inputTarget,this.input.init()),this},stop:function(e){this.session.stopped=e?xt:Ct},recognize:function(e){var t=this.session;if(!t.stopped){this.touchAction.preventDefaults(e);var n,i=this.recognizers,o=t.curRecognizer;(!o||o&&o.state&yt)&&(o=t.curRecognizer=null);for(var r=0;r<i.length;)n=i[r],t.stopped===xt||o&&n!=o&&!n.canRecognizeWith(o)?n.reset():n.recognize(e),!o&&n.state&(mt|gt|vt)&&(o=t.curRecognizer=n),r++}},get:function(e){if(e instanceof K)return e;for(var t=this.recognizers,n=0;n<t.length;n++)if(t[n].options.event==e)return t[n];return null},add:function(e){if(o(e,"add",this))return this;var t=this.get(e.options.event);return t&&this.remove(t),this.recognizers.push(e),e.manager=this,this.touchAction.update(),e},remove:function(e){if(o(e,"remove",this))return this;if(e=this.get(e)){var t=this.recognizers,n=g(t,e);n!==-1&&(t.splice(n,1),this.touchAction.update())}return this},on:function(e,t){if(void 0!==e&&void 0!==t){var n=this.handlers;return r(m(e),function(e){n[e]=n[e]||[],n[e].push(t)}),this}},off:function(e,t){if(void 0!==e){var n=this.handlers;return r(m(e),function(e){t?n[e]&&n[e].splice(g(n[e],t),1):delete n[e]}),this}},emit:function(e,t){this.options.domEvents&&ce(e,t);var n=this.handlers[e]&&this.handlers[e].slice();if(n&&n.length){t.type=e,t.preventDefault=function(){t.srcEvent.preventDefault()};for(var i=0;i<n.length;)n[i](t),i++}},destroy:function(){this.element&&le(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}},de(se,{INPUT_START:Me,INPUT_MOVE:Ae,INPUT_END:Ie,INPUT_CANCEL:Fe,STATE_POSSIBLE:ft,STATE_BEGAN:mt,STATE_CHANGED:gt,STATE_ENDED:vt,STATE_RECOGNIZED:yt,STATE_CANCELLED:wt,STATE_FAILED:bt,DIRECTION_NONE:Pe,DIRECTION_LEFT:ze,DIRECTION_RIGHT:Ne,DIRECTION_UP:je,DIRECTION_DOWN:Le,DIRECTION_HORIZONTAL:Re,DIRECTION_VERTICAL:He,DIRECTION_ALL:Be,Manager:ae,Input:x,TouchAction:Y,TouchInput:R,MouseInput:z,PointerEventInput:N,TouchMouseInput:B,SingleTouchInput:j,Recognizer:K,AttrRecognizer:Z,Tap:re,Pan:ee,Swipe:oe,Pinch:te,Rotate:ie,Press:ne,on:u,off:p,each:r,merge:be,extend:we,assign:de,inherit:a,bindFn:l,prefixed:w}),function(e,t){function n(n,i){var o=e(n);o.data("hammer")||o.data("hammer",new t(o[0],i))}e.fn.hammer=function(e){return this.each(function(){n(this,e)})},t.Manager.prototype.emit=function(t){return function(n,i){t.call(this,n,i),e(this.element).trigger({type:n,gesture:i})}}(t.Manager.prototype.emit)}(ue,se),e.exports=pe.Hammer=se},function(t,n){t.exports=e},function(e,t,n){"use strict";var i=n(2);if("undefined"==typeof i)throw new Error("Amaze UI 2.x requires jQuery :-(\n\u7231\u4e0a\u4e00\u5339\u91ce\u9a6c\uff0c\u53ef\u4f60\u7684\u5bb6\u91cc\u6ca1\u6709\u8349\u539f\u2026");var o=i.CUI||{},r=i(window),s=window.document,a=i("html");o.VERSION="{{VERSION}}",o.support={},o.support.transition=function(){var e=function(){var e=s.body||s.documentElement,t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var n in t)if(void 0!==e.style[n])return t[n]}();return e&&{end:e}}(),o.support.animation=function(){var e=function(){var e=s.body||s.documentElement,t={WebkitAnimation:"webkitAnimationEnd",MozAnimation:"animationend",OAnimation:"oAnimationEnd oanimationend",animation:"animationend"};for(var n in t)if(void 0!==e.style[n])return t[n]}();return e&&{end:e}}(),o.support.touch="ontouchstart"in window&&navigator.userAgent.toLowerCase().match(/mobile|tablet/)||window.DocumentTouch&&document instanceof window.DocumentTouch||window.navigator.msPointerEnabled&&window.navigator.msMaxTouchPoints>0||window.navigator.pointerEnabled&&window.navigator.maxTouchPoints>0||!1,o.support.mutationobserver=window.MutationObserver||window.WebKitMutationObserver||null,o.support.formValidation="function"==typeof document.createElement("form").checkValidity,o.utils={},o.utils.getPassword=function(e){for(var t=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"],n="",i=0;i<e;i++){var o=Math.ceil(Math.random()*t.length);o>=t.length&&(o=t.length-1),n+=t[o]}return n},o.utils.getToday=function(){var e=new Date,t=e.getFullYear(),n=e.getMonth(),i=e.getDate();return new Date(t,n,i)},o.utils.debounce=function(e,t,n){var i;return function(){var o=this,r=arguments,s=function(){i=null,n||e.apply(o,r)},a=n&&!i;clearTimeout(i),i=setTimeout(s,t),a&&e.apply(o,r)}},o.utils.isInView=function(e,t){var n=i(e),o=!(!n.width()&&!n.height())&&"none"!==n.css("display");if(!o)return!1;var s=r.scrollLeft(),a=r.scrollTop(),l=n.offset(),c=l.left,d=l.top;return t=i.extend({topOffset:0,leftOffset:0},t),d+n.height()>=a&&d-t.topOffset<=a+r.height()&&c+n.width()>=s&&c-t.leftOffset<=s+r.width()},o.utils.parseOptions=o.utils.options=function(e){if(i.isPlainObject(e))return e;var t=e?e.indexOf("{"):-1,n={};if(t!=-1)try{n=new Function("","var json = "+e.substr(t)+"; return JSON.parse(JSON.stringify(json));")()}catch(o){}return n},o.utils.generateGUID=function(e){var t=e+"-"||"am-";do t+=Math.random().toString(36).substring(2,7);while(document.getElementById(t));return t},o.utils.getAbsoluteUrl=function(){var e;return function(t){return e||(e=document.createElement("a")),e.href=t,e.href}}(),o.plugin=function(e,t,n){var r=i.fn[e];n=n||{},i.fn[e]=function(r){var s,a=Array.prototype.slice.call(arguments,0),l=a.slice(1),c=this.each(function(){var c=i(this),d="cui."+e,u=n.dataOptions||"data-am-"+e,p=c.data(d),h=i.extend({},o.utils.parseOptions(c.attr(u)),"object"==typeof r&&r);(p||"destroy"!==r)&&(p||c.data(d,p=new t(this,h)),n.methodCall?n.methodCall.call(c,a,p):(n.before&&n.before.call(c,a,p),"string"==typeof r&&(s="function"==typeof p[r]?p[r].apply(p,l):p[r]),n.after&&n.after.call(c,a,p)))});return void 0===s?c:s},i.fn[e].Constructor=t,i.fn[e].noConflict=function(){return i.fn[e]=r,this},o[e]=t},i.fn.emulateTransitionEnd=function(e){var t=!1,n=this;i(this).one(o.support.transition.end,function(){t=!0});var r=function(){t||i(n).trigger(o.support.transition.end),n.transitionEndTimmer=void 0};return this.transitionEndTimmer=setTimeout(r,e),this},i.fn.redraw=function(){return this.each(function(){this.offsetHeight})},i.fn.transitionEnd=function(e){function t(o){e.call(this,o),n&&i.off(n,t)}var n=o.support.transition.end,i=this;return e&&n&&i.on(n,t),this},i.fn.removeClassRegEx=function(){return this.each(function(e){var t=i(this).attr("class");if(!t||!e)return!1;var n=[];t=t.split(" ");for(var o=0,r=t.length;o<r;o++)t[o].match(e)||n.push(t[o]);i(this).attr("class",n.join(" "))})},i.fn.alterClass=function(e,t){var n=this;if(e.indexOf("*")===-1)return n.removeClass(e),t?n.addClass(t):n;var o=new RegExp("\\s"+e.replace(/\*/g,"[A-Za-z0-9-_]+").split(" ").join("\\s|\\s")+"\\s","g");return n.each(function(e,t){for(var n=" "+t.className+" ";o.test(n);)n=n.replace(o," ");t.className=i.trim(n)}),t?n.addClass(t):n},o.utils.rAF=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||function(e){return window.setTimeout(e,1e3/60)}}(),o.utils.cancelAF=function(){return window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.oCancelAnimationFrame||function(e){window.clearTimeout(e)}}(),o.utils.measureScrollbar=function(){if(document.body.clientWidth>=window.innerWidth)return 0;var e=i('<div style="width: 100px;height: 100px;overflow: scroll;position: absolute;top: -9999px;"></div>');i(document.body).append(e);var t=e[0].offsetWidth-e[0].clientWidth;return e.remove(),t},o.utils.imageLoader=function(e,t){function n(){t(e[0])}function i(){if(this.one("load",n),/MSIE (\d+\.\d+);/.test(navigator.userAgent)){var e=this.attr("src"),t=e.match(/\?/)?"&":"?";t+="random="+(new Date).getTime(),this.attr("src",e+t)}}return e.attr("src")?void(e[0].complete||4===e[0].readyState?n():i.call(e)):void n()},o.template=function(e,t){var n=o.template;return n.cache[e]||(n.cache[e]=function(){var t=e,i=/^[\w\-]+$/.test(e)?n.get(e):(t="template(string)",e),o=1,r=("try { "+(n.variable?"var "+n.variable+" = this.stash;":"with (this.stash) { ")+"this.ret += '"+i.replace(/<%/g,"\x11").replace(/%>/g,"\x13").replace(/'(?![^\x11\x13]+?\x13)/g,"\\x27").replace(/^\s*|\s*$/g,"").replace(/\n/g,function(){return"';\nthis.line = "+ ++o+"; this.ret += '\\n"}).replace(/\x11-(.+?)\x13/g,"' + ($1) + '").replace(/\x11=(.+?)\x13/g,"' + this.escapeHTML($1) + '").replace(/\x11(.+?)\x13/g,"'; $1; this.ret += '")+"'; "+(n.variable?"":"}")+"return this.ret;} catch (e) { throw 'TemplateError: ' + e + ' (on "+t+"' + ' line ' + this.line + ')'; } //@ sourceURL="+t+"\n").replace(/this\.ret \+= '';/g,""),s=new Function(r),a={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&#x22;","'":"&#x27;"},l=function(e){return(""+e).replace(/[&<>\'\"]/g,function(e){return a[e]})};return function(e){return s.call(n.context={escapeHTML:l,line:1,ret:"",stash:e})}}()),t?n.cache[e](t):n.cache[e]},o.template.cache={},o.template.get=function(e){if(e){var t=document.getElementById(e);return t&&t.innerHTML||""}},o.DOMWatchers=[],o.DOMReady=!1,o.ready=function(e){o.DOMWatchers.push(e),o.DOMReady&&e(document)},o.DOMObserve=function(e,t,n){var r=o.support.mutationobserver;r&&(t=i.isPlainObject(t)?t:{childList:!0,subtree:!0},n="function"==typeof n&&n||function(){},i(e).each(function(){var e=this,s=i(e);if(!s.data("am.observer"))try{var a=new r(o.utils.debounce(function(t,i){n.call(e,t,i),s.trigger("changed.dom.cui")},50));a.observe(e,t),s.data("am.observer",a)}catch(l){}}))},i.fn.DOMObserve=function(e,t){return this.each(function(){o.DOMObserve(this,e,t)})},o.support.touch&&a.addClass("am-touch"),i(document).on("changed.dom.cui",function(e){var t=e.target;i.each(o.DOMWatchers,function(e,n){n(t)})}),i(function(){var e=i(document.body);o.DOMReady=!0,i.each(o.DOMWatchers,function(e,t){t(document)}),o.DOMObserve("[data-am-observe]"),a.removeClass("no-js").addClass("js"),o.support.animation&&a.addClass("cssanimations"),window.navigator.standalone&&a.addClass("am-standalone"),i(".am-topbar-fixed-top").length&&e.addClass("am-with-topbar-fixed-top"),i(".am-topbar-fixed-bottom").length&&e.addClass("am-with-topbar-fixed-bottom");var t=i(".am-layout");t.find('[class*="md-block-grid"]').alterClass("md-block-grid-*"),t.find('[class*="lg-block-grid"]').alterClass("lg-block-grid"),i("[data-am-widget]").each(function(){var e=i(this);0===e.parents(".am-layout").length&&e.addClass("am-no-layout")}),i("[data-am-datepicker]").each(function(){var e=i(this).attr("data-am-datepicker"),t={locale:"zh",mode:"single"};e&&i.extend(t,o.utils.parseOptions(e));var n=flatpickr(this,t);if("range"===e.mode){var r=i('<div class="date-buttons"><a data-select="today">\u4eca\u5929</a><a data-select="week">\u6700\u8fd1\u4e00\u5468</a><a data-select="month">\u6700\u8fd1\u4e00\u6708</a></div>');i(n.calendarContainer).append(r),r.find("a").on("click",function(){var e,t=i(this).attr("data-select"),r=o.utils.getToday();switch(t){case"today":e=r;break;case"week":e=r.addDays(7);break;case"month":e=r.addDays(30)}n.setDate([r,e]),n.close()})}}),i(".slider").each(function(){var e=i(this),t={dots:!0,infinite:!0,speed:500,slidesToShow:1,slidesToScroll:1},n=e.attr("data-config");n&&i.extend(t,o.utils.parseOptions(n)),e.slick(t)}),i("[data-widget]").each(function(){var e=i(this),t=e.attr("data-widget");switch(t){case"collapse":e.on("click",function(){var t=i(this).find(">i");e.targetBox||(e.targetBox={target:e.closest(".box").find(".box-body"),open:0},e.targetBox.height=e.targetBox.target.height()),e.targetBox.open?e.targetBox.target.show().animate({height:e.targetBox.height},function(){e.targetBox.open=0,t.addClass("am-icon-minus").removeClass("am-icon-plus")}):e.targetBox.target.animate({height:"0px"},function(){e.targetBox.open=1,e.targetBox.target.hide(),t.addClass("am-icon-plus").removeClass("am-icon-minus")})})}});var n=function(){if(window.UEDITOR_CONFIG){var e=i(this),t={allowDivTransToP:!1};"string"==typeof e.attr("data-small")&&(t.wordCount=!1,t.elementPathEnabled=!1,t.toolbars=[["Source","bold","italic","underline","strikethrough","superscript","subscript","forecolor","fontsize","customstyle","|","justifyleft","justifyright","justifycenter","justifyjustify","indent","|","blockquote","insertorderedlist","insertunorderedlist","pasteplain","simpleupload","link","unlink","autotypeset","drafts","cleardoc"]]);var n=e.attr("data-config");n&&i.extend(t,JSON.parse(n));var o="string"==typeof e.attr("data-xxs-disabled");o&&(window.UEDITOR_CONFIG.xssFilterRules=!1,window.UEDITOR_CONFIG.inputXssFilter=!1,window.UEDITOR_CONFIG.outputXssFilter=!1),this.editor=UE.getEditor(this,t),this.editor.addListener("contentChange",function(t){setTimeout(function(){e.trigger("change")},500)})}};i("[data-role]").each(function(){var e=i(this).attr("data-role");switch(e){case"editor":n.call(this)}}),i(".scrollbar").each(function(){var e=i(this),t=e.attr("data-config"),n={};t&&(n=JSON.parse(t)),"string"==typeof e.attr("data-scrollbar-x")&&(n.axis="x",n.advanced={autoExpandHorizontalScroll:!0});var o={scrollButtons:{enable:!0},axis:"y",theme:"minimal"};i.extend(o,n),e.scrollbar(o)})}),i.CUI=o,e.exports=o},function(e,t,n){"use strict";function i(e){return this.each(function(){var t=o(this),n=t.data("amui.collapse"),i=o.extend({},s.DEFAULTS,r.utils.options(t.attr("data-am-collapse")),"object"==typeof e&&e);!n&&i.toggle&&"open"===e&&(e=!e),n||t.data("amui.collapse",n=new s(this,i)),"string"==typeof e&&n[e]()})}var o=n(2),r=n(3),s=function(e,t){this.$element=o(e),this.options=o.extend({},s.DEFAULTS,t),this.transitioning=null,this.options.parent&&(this.$parent=o(this.options.parent)),this.options.toggle&&this.toggle()};s.DEFAULTS={toggle:!0},s.prototype.open=function(){if(!this.transitioning&&!this.$element.hasClass("am-in")){var e=o.Event("open.collapse.amui");if(this.$element.trigger(e),!e.isDefaultPrevented()){var t=this.$parent&&this.$parent.find("> .am-panel > .am-in");if(t&&t.length){var n=t.data("amui.collapse");if(n&&n.transitioning)return;i.call(t,"close"),n||t.data("amui.collapse",null)}this.$element.removeClass("am-collapse").addClass("am-collapsing").height(0),this.transitioning=1;var s=function(){this.$element.removeClass("am-collapsing").addClass("am-collapse am-in").height("").trigger("opened.collapse.amui"),this.transitioning=0};if(!r.support.transition)return s.call(this);var a=this.$element[0].scrollHeight;this.$element.one(r.support.transition.end,o.proxy(s,this)).emulateTransitionEnd(300).css({height:a})}}},s.prototype.close=function(){if(!this.transitioning&&this.$element.hasClass("am-in")){var e=o.Event("close.collapse.amui");if(this.$element.trigger(e),!e.isDefaultPrevented()){this.$element.height(this.$element.height()).redraw(),this.$element.addClass("am-collapsing").removeClass("am-collapse am-in"),this.transitioning=1;var t=function(){this.transitioning=0,this.$element.trigger("closed.collapse.amui").removeClass("am-collapsing").addClass("am-collapse")};return r.support.transition?void this.$element.height(0).one(r.support.transition.end,o.proxy(t,this)).emulateTransitionEnd(300):t.call(this)}}},s.prototype.toggle=function(){this[this.$element.hasClass("am-in")?"close":"open"]()},o.fn.collapse=i,o(document).on("click.collapse.amui.data-api","[data-am-collapse]",function(e){var t,n=o(this),s=r.utils.options(n.attr("data-am-collapse")),a=s.target||e.preventDefault()||(t=n.attr("href"))&&t.replace(/.*(?=#[^\s]+$)/,""),l=o(a),c=l.data("amui.collapse"),d=c?"toggle":s,u=s.parent,p=u&&o(u);c&&c.transitioning||(p&&p.find("[data-am-collapse]").not(n).addClass("am-collapsed"),n[l.hasClass("am-in")?"addClass":"removeClass"]("am-collapsed")),i.call(l,d)}),e.exports=r.collapse=s},function(e,t,n){"use strict";var i=n(2),o=n(3),r=o.support.animation,s=function(e,t){var n=this;this.options=i.extend({},s.DEFAULTS,t),t=this.options,this.$element=i(e),this.$toggle=this.$element.find(t.selector.toggle),this.$toggle.attr("tabindex",0).on("blur",function(){n.close()}),this.$dropdown=this.$element.find(t.selector.dropdown),this.$boundary=t.boundary===window?i(window):this.$element.closest(t.boundary),this.$justify=t.justify&&i(t.justify).length&&i(t.justify)||void 0,!this.$boundary.length&&(this.$boundary=i(window)),this.active=!!this.$element.hasClass("am-active"),this.animating=null,this.events()};s.DEFAULTS={animation:"anim am-animation-slide-top-fixed",boundary:window,justify:void 0,selector:{dropdown:".am-dropdown-content",toggle:".am-dropdown-toggle"},trigger:"click"},s.prototype.toggle=function(){this.clear(),this.animating||this[this.active?"close":"open"]()},s.prototype.open=function(e){var t=this.$toggle,n=this.$element,o=this.$dropdown;if(!t.is(".am-disabled, :disabled")&&!this.active){n.trigger("open.dropdown.amui").addClass("am-active"),this.checkDimensions(e);var s=i.proxy(function(){n.trigger("opened.dropdown.amui"),this.active=!0,this.animating=0},this);r?(this.animating=1,o.addClass(this.options.animation).one(r.end+".open.dropdown.amui",i.proxy(function(){s(),o.removeClass(this.options.animation)},this))):s()}},s.prototype.close=function(){if(this.active){var e="am-dropdown-animation",t=this.$element,n=this.$dropdown;t.trigger("close.dropdown.amui");var o=i.proxy(function(){t.removeClass("am-active").trigger("closed.dropdown.amui"),this.active=!1,this.animating=0},this);r?(n.removeClass(this.options.animation),n.addClass(e),this.animating=1,n.one(r.end+".close.dropdown.amui",function(){n.removeClass(e),o()})):o()}},s.prototype.enable=function(){this.$toggle.prop("disabled",!1)},s.prototype.disable=function(){this.$toggle.prop("disabled",!0)},s.prototype.checkDimensions=function(e){if(this.$dropdown.length){var t=this.$dropdown;e&&e.offset&&t.offset(e.offset);var n=t.offset(),o=t.outerWidth(),r=this.$boundary.width(),s=i.isWindow(this.boundary)&&this.$boundary.offset()?this.$boundary.offset().left:0;
this.$justify&&t.css({"min-width":this.$justify.css("width")}),o+(n.left-s)>r&&this.$element.addClass("am-dropdown-flip")}},s.prototype.clear=function(){i("[data-am-dropdown]").not(this.$element).each(function(){var e=i(this).data("amui.dropdown");e&&e.close()})},s.prototype.events=function(){var e="dropdown.amui",t=this.$toggle;t.on("click."+e,i.proxy(function(e){e.preventDefault(),this.toggle()},this)),i(document).on("keydown.dropdown.amui",i.proxy(function(e){27===e.keyCode&&this.active&&this.close()},this)).on("click.outer.dropdown.amui",i.proxy(function(e){!this.active||this.$element[0]!==e.target&&this.$element.find(e.target).length||this.close()},this))},o.plugin("dropdown",s),o.ready(function(e){i("[data-am-dropdown]",e).dropdown()}),i(document).on("click.dropdown.amui.data-api",".am-dropdown form",function(e){e.stopPropagation()}),e.exports=o.dropdown=s},function(e,t,n){"use strict";var i=n(2),o=n(3),r=i(window),s=function(e,t){this.options=i.extend({},s.DEFAULTS,t),this.$element=i(e),this.active=null,this.$popover=this.options.target&&i(this.options.target)||null,this.init(),this._bindEvents()};s.DEFAULTS={theme:null,trigger:"click",content:"",open:!1,target:null,tpl:'<div class="am-popover"><div class="am-popover-inner"></div><div class="am-popover-caret"></div></div>'},s.prototype.init=function(){function e(){n.sizePopover()}var t,n=this,r=this.$element;this.options.target||(this.$popover=this.getPopover(),this.setContent()),t=this.$popover,t.appendTo(i("body")),this.sizePopover(),r.on("open.popover.amui",function(){i(window).on("resize.popover.amui",o.utils.debounce(e,50))}),r.on("close.popover.amui",function(){i(window).off("resize.popover.amui",e)}),this.options.open&&this.open()},s.prototype.sizePopover=function(){var e=this.$element,t=this.$popover;if(t&&t.length){var n=t.outerWidth(),i=t.outerHeight(),o=t.find(".am-popover-caret"),s=o.outerWidth()/2||8,a=i+8,l=e.outerWidth(),c=e.outerHeight(),d=e.offset(),u=e[0].getBoundingClientRect(),p=r.height(),h=r.width(),f=0,m=0,g=0,v=2,y="top";t.css({left:"",top:""}).removeClass("am-popover-left am-popover-right am-popover-top am-popover-bottom"),a-v<u.top+v?f=d.top-a-v:a<p-u.top-u.height?(y="bottom",f=d.top+c+s+v):(y="middle",f=c/2+d.top-i/2),"top"===y||"bottom"===y?(m=l/2+d.left-n/2,g=m,m<5&&(m=5),m+n>h&&(m=h-n-20),"top"===y&&t.addClass("am-popover-top"),"bottom"===y&&t.addClass("am-popover-bottom"),g-=m):"middle"===y&&(m=d.left-n-s,t.addClass("am-popover-left"),m<5&&(m=d.left+l+s,t.removeClass("am-popover-left").addClass("am-popover-right")),m+n>h&&(m=h-n-5,t.removeClass("am-popover-left").addClass("am-popover-right"))),t.css({top:f+"px",left:m+"px"})}},s.prototype.toggle=function(){return this[this.active?"close":"open"]()},s.prototype.open=function(){var e=this.$popover;this.$element.trigger("open.popover.amui"),this.sizePopover(),e.show().addClass("am-active"),this.active=!0},s.prototype.close=function(){var e=this.$popover;this.$element.trigger("close.popover.amui"),e.removeClass("am-active").trigger("closed.popover.amui").hide(),this.active=!1},s.prototype.getPopover=function(){var e=o.utils.generateGUID("am-popover"),t=[];return this.options.theme&&i.each(this.options.theme.split(" "),function(e,n){t.push("am-popover-"+i.trim(n))}),i(this.options.tpl).attr("id",e).addClass(t.join(" "))},s.prototype.setContent=function(e){e=e||this.options.content,this.$popover&&this.$popover.find(".am-popover-inner").empty().html(e)},s.prototype._bindEvents=function(){for(var e="popover.amui",t=this.options.trigger.split(" "),n=t.length;n--;){var o=t[n];if("click"===o)this.$element.on("click."+e,i.proxy(this.toggle,this));else{var r="hover"==o?"mouseenter":"focusin",s="hover"==o?"mouseleave":"focusout";this.$element.on(r+"."+e,i.proxy(this.open,this)),this.$element.on(s+"."+e,i.proxy(this.close,this))}}},s.prototype.destroy=function(){this.$element.off(".popover.amui").removeData("amui.popover"),this.$popover.remove()},o.plugin("popover",s),o.ready(function(e){i("[data-am-popover]",e).popover()}),e.exports=s},function(e,t,n){"use strict";var i=n(3),o=function(){function e(e,t,n){return e<t?t:e>n?n:e}function t(e){return 100*(-1+e)}function n(e,n,i){var o;return o="translate3d"===c.positionUsing?{transform:"translate3d("+t(e)+"%,0,0)"}:"translate"===c.positionUsing?{transform:"translate("+t(e)+"%,0)"}:{"margin-left":t(e)+"%"},o.transition="all "+n+"ms "+i,o}function i(e,t){var n="string"==typeof e?e:s(e);return n.indexOf(" "+t+" ")>=0}function o(e,t){var n=s(e),o=n+t;i(n,t)||(e.className=o.substring(1))}function r(e,t){var n,o=s(e);i(e,t)&&(n=o.replace(" "+t+" "," "),e.className=n.substring(1,n.length-1))}function s(e){return(" "+(e.className||"")+" ").replace(/\s+/gi," ")}function a(e){e&&e.parentNode&&e.parentNode.removeChild(e)}var l={};l.version="0.2.0";var c=l.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,parent:"body",barSelector:'[role="nprogress-bar"]',spinnerSelector:'[role="nprogress-spinner"]',template:'<div class="nprogress-bar" role="nprogress-bar"><div class="nprogress-peg"></div></div><div class="nprogress-spinner" role="nprogress-spinner"><div class="nprogress-spinner-icon"></div></div>'};l.configure=function(e){var t,n;for(t in e)n=e[t],void 0!==n&&e.hasOwnProperty(t)&&(c[t]=n);return this},l.status=null,l.set=function(t){var i=l.isStarted();t=e(t,c.minimum,1),l.status=1===t?null:t;var o=l.render(!i),r=o.querySelector(c.barSelector),s=c.speed,a=c.easing;return o.offsetWidth,d(function(e){""===c.positionUsing&&(c.positionUsing=l.getPositioningCSS()),u(r,n(t,s,a)),1===t?(u(o,{transition:"none",opacity:1}),o.offsetWidth,setTimeout(function(){u(o,{transition:"all "+s+"ms linear",opacity:0}),setTimeout(function(){l.remove(),e()},s)},s)):setTimeout(e,s)}),this},l.isStarted=function(){return"number"==typeof l.status},l.start=function(){l.status||l.set(0);var e=function(){setTimeout(function(){l.status&&(l.trickle(),e())},c.trickleSpeed)};return c.trickle&&e(),this},l.done=function(e){return e||l.status?l.inc(.3+.5*Math.random()).set(1):this},l.inc=function(t){var n=l.status;return n?("number"!=typeof t&&(t=(1-n)*e(Math.random()*n,.1,.95)),n=e(n+t,0,.994),l.set(n)):l.start()},l.trickle=function(){return l.inc(Math.random()*c.trickleRate)},function(){var e=0,t=0;l.promise=function(n){return n&&"resolved"!==n.state()?(0===t&&l.start(),e++,t++,n.always(function(){t--,0===t?(e=0,l.done()):l.set((e-t)/e)}),this):this}}(),l.render=function(e){if(l.isRendered())return document.getElementById("nprogress");o(document.documentElement,"nprogress-busy");var n=document.createElement("div");n.id="nprogress",n.innerHTML=c.template;var i,r=n.querySelector(c.barSelector),s=e?"-100":t(l.status||0),d=document.querySelector(c.parent);return u(r,{transition:"all 0 linear",transform:"translate3d("+s+"%,0,0)"}),c.showSpinner||(i=n.querySelector(c.spinnerSelector),i&&a(i)),d!=document.body&&o(d,"nprogress-custom-parent"),d.appendChild(n),n},l.remove=function(){r(document.documentElement,"nprogress-busy"),r(document.querySelector(c.parent),"nprogress-custom-parent");var e=document.getElementById("nprogress");e&&a(e)},l.isRendered=function(){return!!document.getElementById("nprogress")},l.getPositioningCSS=function(){var e=document.body.style,t="WebkitTransform"in e?"Webkit":"MozTransform"in e?"Moz":"msTransform"in e?"ms":"OTransform"in e?"O":"";return t+"Perspective"in e?"translate3d":t+"Transform"in e?"translate":"margin"};var d=function(){function e(){var n=t.shift();n&&n(e)}var t=[];return function(n){t.push(n),1==t.length&&e()}}(),u=function(){function e(e){return e.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,function(e,t){return t.toUpperCase()})}function t(e){var t=document.body.style;if(e in t)return e;for(var n,i=o.length,r=e.charAt(0).toUpperCase()+e.slice(1);i--;)if(n=o[i]+r,n in t)return n;return e}function n(n){return n=e(n),r[n]||(r[n]=t(n))}function i(e,t,i){t=n(t),e.style[t]=i}var o=["Webkit","O","Moz","ms"],r={};return function(e,t){var n,o,r=arguments;if(2==r.length)for(n in t)o=t[n],void 0!==o&&t.hasOwnProperty(n)&&i(e,n,o);else i(e,r[1],r[2])}}();return l}();e.exports=i.progress=o},function(e,t,n){"use strict";function i(e,t){return this.each(function(){var n=o(this),i=n.data("amui.modal"),r="object"==typeof e&&e;i||n.data("amui.modal",i=new c(this,r)),"string"==typeof e?i[e]&&i[e](t):i.toggle(e&&e.relatedTarget||void 0)})}var o=n(2),r=n(3),s=n(9),a=o(document),l=r.support.transition,c=function(e,t){this.options=o.extend({},c.DEFAULTS,t||{}),this.$element=o(e),this.$dialog=this.$element.find(".am-modal-dialog"),this.$element.attr("id")||this.$element.attr("id",r.utils.generateGUID("am-modal")),this.isPopup=this.$element.hasClass("am-popup"),this.isActions=this.$element.hasClass("am-modal-actions"),this.isPrompt=this.$element.hasClass("am-modal-prompt"),this.isLoading=this.$element.hasClass("am-modal-loading"),this.active=this.transitioning=this.relatedTarget=null,this.dimmer=this.options.dimmer?s:{open:function(){},close:function(){}},this.events()};c.DEFAULTS={className:{active:"am-modal-active",out:"am-modal-out"},selector:{modal:".am-modal",active:".am-modal-active"},closeViaDimmer:!0,cancelable:!0,onConfirm:function(){},onCancel:function(){},closeOnCancel:!0,closeOnConfirm:!0,dimmer:!0,height:void 0,width:void 0,duration:300,transitionEnd:l&&l.end+".modal.amui"},c.prototype.toggle=function(e){return this.active?this.close():this.open(e)},c.prototype.open=function(e){var t=this.$element,n=this.options,i=this.isPopup,r=n.width,s=n.height,a={};if(!this.active&&this.$element.length){e&&(this.relatedTarget=e),this.transitioning&&(clearTimeout(t.transitionEndTimmer),t.transitionEndTimmer=null,t.trigger(n.transitionEnd).off(n.transitionEnd)),i&&this.$element.show(),this.active=!0,t.trigger(o.Event("open.modal.amui",{relatedTarget:e})),this.dimmer.open(t),t.show().redraw(),i||this.isActions||(r&&(a.width=parseInt(r,10)+"px"),s&&(a.height=parseInt(s,10)+"px"),this.$dialog.css(a)),t.removeClass(n.className.out).addClass(n.className.active),this.transitioning=1;var c=function(){t.trigger(o.Event("opened.modal.amui",{relatedTarget:e})),this.transitioning=0,this.isPrompt&&this.$dialog.find("input").eq(0).focus()};return l?void t.one(n.transitionEnd,o.proxy(c,this)).emulateTransitionEnd(n.duration):c.call(this)}},c.prototype.close=function(e){if(this.active){var t=this.$element,n=this.options,i=this.isPopup;this.transitioning&&(clearTimeout(t.transitionEndTimmer),t.transitionEndTimmer=null,t.trigger(n.transitionEnd).off(n.transitionEnd),this.dimmer.close(t,!0)),this.$element.trigger(o.Event("close.modal.amui",{relatedTarget:e})),this.transitioning=1;var r=function(){t.trigger("closed.modal.amui"),i&&t.removeClass(n.className.out),t.hide(),this.transitioning=0,this.dimmer.close(t,!1),this.active=!1};return t.removeClass(n.className.active).addClass(n.className.out),l?void t.one(n.transitionEnd,o.proxy(r,this)).emulateTransitionEnd(n.duration):r.call(this)}},c.prototype.events=function(){var e=this,t=this.options,n=this.$element,i=this.dimmer.$element,r=n.find(".am-modal-prompt-input"),s=n.find("[data-am-modal-confirm]"),a=n.find("[data-am-modal-cancel]"),l=function(){var e=[];return r.each(function(){e.push(o(this).val())}),0===e.length?void 0:1===e.length?e[0]:e};this.options.cancelable&&n.on("keyup.modal.amui",function(t){e.active&&27===t.which&&(n.trigger("cancel.modal.amui"),e.close())}),this.options.dimmer&&this.options.closeViaDimmer&&!this.isLoading&&i.on("click.dimmer.modal.amui",function(){e.close()}),n.on("click.close.modal.amui","[data-am-modal-close], .am-modal-btn",function(n){n.preventDefault();var i=o(this);i.is(s)?t.closeOnConfirm&&e.close():i.is(a)?t.closeOnCancel&&e.close():e.close()}).on("click",function(e){o(e.target).is(n)&&i.trigger("click.dimmer.modal.amui")}),s.on("click.confirm.modal.amui",function(){n.trigger(o.Event("confirm.modal.amui",{trigger:this}))}),a.on("click.cancel.modal.amui",function(){n.trigger(o.Event("cancel.modal.amui",{trigger:this}))}),n.on("confirm.modal.amui",function(t){t.data=l(),e.options.onConfirm.call(e,t)}).on("cancel.modal.amui",function(t){t.data=l(),e.options.onCancel.call(e,t)})},o.fn.modal=i,a.on("click.modal.amui.data-api","[data-am-modal]",function(){var e=o(this),t=r.utils.parseOptions(e.attr("data-am-modal")),n=o(t.target||this.href&&this.href.replace(/.*(?=#[^\s]+$)/,"")),s=n.data("amui.modal")?"toggle":t;i.call(n,s,this)}),e.exports=r.modal=c},function(e,t,n){"use strict";var i=n(2),o=n(3),r=i(document),s=o.support.transition,a=function(){this.id=o.utils.generateGUID("am-dimmer"),this.$element=i(a.DEFAULTS.tpl,{id:this.id}),this.inited=!1,this.scrollbarWidth=0,this.$used=i([])};a.DEFAULTS={tpl:'<div class="am-dimmer" data-am-dimmer></div>'},a.prototype.init=function(){return this.inited||(i(document.body).append(this.$element),this.inited=!0,r.trigger("init.dimmer.amui"),this.$element.on("touchmove.dimmer.amui",function(e){e.preventDefault()})),this},a.prototype.open=function(e){this.inited||this.init();var t=this.$element;return e&&(this.$used=this.$used.add(i(e))),this.checkScrollbar().setScrollbar(),t.show().trigger("open.dimmer.amui"),s&&t.off(s.end),setTimeout(function(){t.addClass("am-active")},0),this},a.prototype.close=function(e,t){function n(){o.hide(),this.resetScrollbar()}if(this.$used=this.$used.not(i(e)),!t&&this.$used.length)return this;var o=this.$element;return o.removeClass("am-active").trigger("close.dimmer.amui"),n.call(this),this},a.prototype.checkScrollbar=function(){return this.scrollbarWidth=o.utils.measureScrollbar(),this},a.prototype.setScrollbar=function(){var e=i(document.body),t=parseInt(e.css("padding-right")||0,10);return this.scrollbarWidth&&e.css("padding-right",t+this.scrollbarWidth),e.addClass("am-dimmer-active"),this},a.prototype.resetScrollbar=function(){return i(document.body).css("padding-right","").removeClass("am-dimmer-active"),this},e.exports=o.dimmer=new a},function(e,t,n){"use strict";function i(e){var t,n=Array.prototype.slice.call(arguments,1);return this.each(function(){var i=o(this),s=i.is(".am-tabs")&&i||i.closest(".am-tabs"),a=s.data("amui.tabs"),l=o.extend({},r.utils.parseOptions(i.data("amTabs")),o.isPlainObject(e)&&e);a||s.data("amui.tabs",a=new c(s[0],l)),"string"==typeof e&&("open"===e&&i.is(".am-tabs-nav a")?a.open(i):t="function"==typeof a[e]?a[e].apply(a,n):a[e])}),void 0===t?this:t}var o=n(2),r=n(3),s=n(1),a=r.support.transition,l=r.support.animation,c=function(e,t){this.$element=o(e),this.options=o.extend({},c.DEFAULTS,t||{}),this.transitioning=this.activeIndex=null,this.refresh(),this.init()};c.DEFAULTS={selector:{nav:"> .am-tabs-nav",content:"> .am-tabs-bd",panel:"> .am-tab-panel"},activeClass:"am-active"},c.prototype.refresh=function(){var e=this.options.selector;this.$tabNav=this.$element.find(e.nav),this.$navs=this.$tabNav.find("a"),this.$content=this.$element.find(e.content),this.$tabPanels=this.$content.find(e.panel);var t=this.$tabNav.find("> ."+this.options.activeClass);1!==t.length?this.open(0):this.activeIndex=this.$navs.index(t.children("a"))},c.prototype.init=function(){var e=this,t=this.options;if(this.$element.on("click.tabs.amui",t.selector.nav+" a",function(t){t.preventDefault(),e.open(o(this))}),!t.noSwipe){if(!this.$content.length)return this;var n=new s.Manager(this.$content[0]),i=new s.Swipe({direction:s.DIRECTION_HORIZONTAL});n.add(i),n.on("swipeleft",r.utils.debounce(function(t){t.preventDefault(),e.goTo("next")},100)),n.on("swiperight",r.utils.debounce(function(t){t.preventDefault(),e.goTo("prev")},100)),this._hammer=n}},c.prototype.open=function(e){var t=this.options.activeClass,n="number"==typeof e?e:this.$navs.index(o(e));if(e="number"==typeof e?this.$navs.eq(n):o(e),e&&e.length&&!this.transitioning&&!e.parent("li").hasClass(t)){var i=this.$tabNav,r=e.attr("href"),s=/^#.+$/,a=s.test(r)&&this.$content.find(r)||this.$tabPanels.eq(n),l=i.find("."+t+" a")[0],c=o.Event("open.tabs.amui",{relatedTarget:l});e.trigger(c),c.isDefaultPrevented()||(this.activate(e.closest("li"),i),this.activate(a,this.$content,function(){e.trigger({type:"opened.tabs.amui",relatedTarget:l})}),this.activeIndex=n)}},c.prototype.activate=function(e,t,n){this.transitioning=!0;var i=this.options.activeClass,r=t.find("> ."+i),s=n&&a&&!!r.length;r.removeClass(i+" am-in"),e.addClass(i),s?(e.redraw(),e.addClass("am-in")):e.removeClass("am-fade");var l=o.proxy(function(){n&&n(),this.transitioning=!1},this);s&&!this.$content.is(".am-tabs-bd-ofv")?r.one(a.end,l):l()},c.prototype.goTo=function(e){var t=this.activeIndex,n="next"===e,i=n?"anim fadeInRight":"anim fadeOutLeft";if(n&&t+1>=this.$navs.length||!n&&0===t){var o=this.$tabPanels.eq(t);l&&o.addClass(i).on(l.end,function(){o.removeClass(i)})}else this.open(n?t+1:t-1)},c.prototype.destroy=function(){this.$element.off(".tabs.amui"),s.off(this.$content[0],"swipeleft swiperight"),this._hammer&&this._hammer.destroy(),o.removeData(this.$element,"amui.tabs")},o.fn.tabs=i,r.ready(function(e){o("[data-am-tabs]",e).tabs()}),o(document).on("click.tabs.amui.data-api","[data-am-tabs] .am-tabs-nav a",function(e){e.preventDefault(),i.call(o(this),"open")}),e.exports=r.tabs=c},function(e,t,n){"use strict";var i=n(2),o=n(3),r=function(e,t){if(o.support.animation){this.options=i.extend({},r.DEFAULTS,t),this.$element=i(e);var n=function(){o.utils.rAF.call(window,i.proxy(this.checkView,this))}.bind(this);this.$window=i(window).on("scroll.scrollspy.amui",n).on("resize.scrollspy.amui orientationchange.scrollspy.amui",o.utils.debounce(n,50)),this.timer=this.inViewState=this.initInView=null,n()}};r.DEFAULTS={animation:"fade",className:{inView:"am-scrollspy-inview",init:"am-scrollspy-init"},repeat:!1,delay:0,topOffset:0,leftOffset:0},r.prototype.checkView=function(){var e=this.$element,t=this.options,n=o.utils.isInView(e,t),i=t.animation?" anim "+t.animation:"";n&&!this.inViewState&&(this.timer&&clearTimeout(this.timer),this.initInView||(e.addClass(t.className.init),this.offset=e.offset(),this.initInView=!0,e.trigger("init.scrollspy.amui")),this.timer=setTimeout(function(){n&&e.addClass(t.className.inView+i).width()},t.delay),this.inViewState=!0,e.trigger("inview.scrollspy.amui")),!n&&this.inViewState&&t.repeat&&(e.removeClass(t.className.inView+i),this.inViewState=!1,e.trigger("outview.scrollspy.amui"))},r.prototype.check=function(){o.utils.rAF.call(window,i.proxy(this.checkView,this))},o.plugin("scrollspy",r),o.ready(function(e){i("[data-am-scrollspy]",e).scrollspy()}),e.exports=r},function(e,t,n){"use strict";var i=n(3),o=function(){var e="undefined"!=typeof Element&&"ALLOW_KEYBOARD_INPUT"in Element,t=function(){for(var e,t,n=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],i=0,o=n.length,r={};i<o;i++)if(e=n[i],e&&e[1]in document){for(i=0,t=e.length;i<t;i++)r[n[0][i]]=e[i];return r}return!1}(),n={request:function(n){var i=t.requestFullscreen;n=n||document.documentElement,/5\.1[\.\d]* Safari/.test(navigator.userAgent)?n[i]():n[i](e&&Element.ALLOW_KEYBOARD_INPUT)},exit:function(){document[t.exitFullscreen]()},toggle:function(e){this.isFullscreen?this.exit():this.request(e)},raw:t};return!!t&&(Object.defineProperties(n,{isFullscreen:{get:function(){return!!document[t.fullscreenElement]}},element:{enumerable:!0,get:function(){return document[t.fullscreenElement]}},enabled:{enumerable:!0,get:function(){return!!document[t.fullscreenEnabled]}}}),n.VERSION="3.0.0",n)}();e.exports=i.fullscreen=o},function(e,t,n){var i,o,i,r,i,s,a;!function(r,s){i=s,!(o="function"==typeof i?i.call(t,n,t,e):i)}(this,function(){var e=function(e,t){this.items=e,this.settings=t||{diacritics:!0}};e.prototype.tokenize=function(e){if(e=o(String(e||"").toLowerCase()),!e||!e.length)return[];var t,n,i,s,l=[],c=e.split(/ +/);for(t=0,n=c.length;t<n;t++){if(i=r(c[t]),this.settings.diacritics)for(s in a)a.hasOwnProperty(s)&&(i=i.replace(new RegExp(s,"g"),a[s]));l.push({string:c[t],regex:new RegExp(i,"i")})}return l},e.prototype.iterator=function(e,t){var n;n=s(e)?Array.prototype.forEach||function(e){for(var t=0,n=this.length;t<n;t++)e(this[t],t,this)}:function(e){for(var t in this)this.hasOwnProperty(t)&&e(this[t],t,this)},n.apply(e,[t])},e.prototype.getScoreFunction=function(e,t){var n,o,r,s,a;n=this,e=n.prepareSearch(e,t),r=e.tokens,o=e.options.fields,s=r.length,a=e.options.nesting;var l=function(e,t){var n,i;return e?(e=String(e||""),i=e.search(t.regex),i===-1?0:(n=t.string.length/e.length,0===i&&(n+=.5),n)):0},c=function(){var e=o.length;return e?1===e?function(e,t){return l(i(t,o[0],a),e)}:function(t,n){for(var r=0,s=0;r<e;r++)s+=l(i(n,o[r],a),t);return s/e}:function(){return 0}}();return s?1===s?function(e){return c(r[0],e)}:"and"===e.options.conjunction?function(e){for(var t,n=0,i=0;n<s;n++){if(t=c(r[n],e),t<=0)return 0;i+=t}return i/s}:function(e){for(var t=0,n=0;t<s;t++)n+=c(r[t],e);return n/s}:function(){return 0}},e.prototype.getSortFunction=function(e,n){var o,r,s,a,l,c,d,u,p,h,f;if(s=this,e=s.prepareSearch(e,n),f=!e.query&&n.sort_empty||n.sort,p=function(e,t){return"$score"===e?t.score:i(s.items[t.id],e,n.nesting)},l=[],f)for(o=0,r=f.length;o<r;o++)(e.query||"$score"!==f[o].field)&&l.push(f[o]);if(e.query){for(h=!0,o=0,r=l.length;o<r;o++)if("$score"===l[o].field){h=!1;break}h&&l.unshift({field:"$score",direction:"desc"})}else for(o=0,r=l.length;o<r;o++)if("$score"===l[o].field){l.splice(o,1);break}for(u=[],o=0,r=l.length;o<r;o++)u.push("desc"===l[o].direction?-1:1);return c=l.length,c?1===c?(a=l[0].field,d=u[0],function(e,n){return d*t(p(a,e),p(a,n))}):function(e,n){var i,o,r;for(i=0;i<c;i++)if(r=l[i].field,o=u[i]*t(p(r,e),p(r,n)))return o;return 0}:null},e.prototype.prepareSearch=function(e,t){if("object"==typeof e)return e;t=n({},t);var i=t.fields,o=t.sort,r=t.sort_empty;return i&&!s(i)&&(t.fields=[i]),o&&!s(o)&&(t.sort=[o]),r&&!s(r)&&(t.sort_empty=[r]),{options:t,query:String(e||"").toLowerCase(),tokens:this.tokenize(e),total:0,items:[]}},e.prototype.search=function(e,t){var n,i,o,r,s=this;return i=this.prepareSearch(e,t),t=i.options,e=i.query,r=t.score||s.getScoreFunction(i),e.length?s.iterator(s.items,function(e,o){n=r(e),(t.filter===!1||n>0)&&i.items.push({score:n,id:o})}):s.iterator(s.items,function(e,t){i.items.push({score:1,id:t})}),o=s.getSortFunction(i,t),o&&i.items.sort(o),i.total=i.items.length,"number"==typeof t.limit&&(i.items=i.items.slice(0,t.limit)),i};var t=function(e,t){return"number"==typeof e&&"number"==typeof t?e>t?1:e<t?-1:0:(e=l(String(e||"")),t=l(String(t||"")),e>t?1:t>e?-1:0)},n=function(e,t){var n,i,o,r;for(n=1,i=arguments.length;n<i;n++)if(r=arguments[n])for(o in r)r.hasOwnProperty(o)&&(e[o]=r[o]);return e},i=function(e,t,n){if(e&&t){if(!n)return e[t];for(var i=t.split(".");i.length&&(e=e[i.shift()]););return e}},o=function(e){return(e+"").replace(/^\s+|\s+$|/g,"")},r=function(e){return(e+"").replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")},s=Array.isArray||"undefined"!=typeof $&&$.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},a={a:"[a\u1e00\u1e01\u0102\u0103\xc2\xe2\u01cd\u01ce\u023a\u2c65\u0226\u0227\u1ea0\u1ea1\xc4\xe4\xc0\xe0\xc1\xe1\u0100\u0101\xc3\xe3\xc5\xe5\u0105\u0104\xc3\u0105\u0104]",b:"[b\u2422\u03b2\u0392B\u0e3f\ud800\udf01\u16d2]",c:"[c\u0106\u0107\u0108\u0109\u010c\u010d\u010a\u010bC\u0304c\u0304\xc7\xe7\u1e08\u1e09\u023b\u023c\u0187\u0188\u0255\u1d04\uff23\uff43]",d:"[d\u010e\u010f\u1e0a\u1e0b\u1e10\u1e11\u1e0c\u1e0d\u1e12\u1e13\u1e0e\u1e0f\u0110\u0111D\u0326d\u0326\u0189\u0256\u018a\u0257\u018b\u018c\u1d6d\u1d81\u1d91\u0221\u1d05\uff24\uff44\xf0]",e:"[e\xc9\xe9\xc8\xe8\xca\xea\u1e18\u1e19\u011a\u011b\u0114\u0115\u1ebc\u1ebd\u1e1a\u1e1b\u1eba\u1ebb\u0116\u0117\xcb\xeb\u0112\u0113\u0228\u0229\u0118\u0119\u1d92\u0246\u0247\u0204\u0205\u1ebe\u1ebf\u1ec0\u1ec1\u1ec4\u1ec5\u1ec2\u1ec3\u1e1c\u1e1d\u1e16\u1e17\u1e14\u1e15\u0206\u0207\u1eb8\u1eb9\u1ec6\u1ec7\u2c78\u1d07\uff25\uff45\u0258\u01dd\u018f\u0190\u03b5]",f:"[f\u0191\u0192\u1e1e\u1e1f]",g:"[g\u0262\u20b2\u01e4\u01e5\u011c\u011d\u011e\u011f\u0122\u0123\u0193\u0260\u0120\u0121]",h:"[h\u0124\u0125\u0126\u0127\u1e28\u1e29\u1e96\u1e96\u1e24\u1e25\u1e22\u1e23\u0266\u02b0\u01f6\u0195]",i:"[i\xcd\xed\xcc\xec\u012c\u012d\xce\xee\u01cf\u01d0\xcf\xef\u1e2e\u1e2f\u0128\u0129\u012e\u012f\u012a\u012b\u1ec8\u1ec9\u0208\u0209\u020a\u020b\u1eca\u1ecb\u1e2c\u1e2d\u0197\u0268\u0268\u0306\u1d7b\u1d96\u0130iI\u0131\u026a\uff29\uff49]",j:"[j\u0237\u0134\u0135\u0248\u0249\u029d\u025f\u02b2]",k:"[k\u0198\u0199\ua740\ua741\u1e30\u1e31\u01e8\u01e9\u1e32\u1e33\u1e34\u1e35\u03ba\u03f0\u20ad]",l:"[l\u0141\u0142\u013d\u013e\u013b\u013c\u0139\u013a\u1e36\u1e37\u1e38\u1e39\u1e3c\u1e3d\u1e3a\u1e3b\u013f\u0140\u023d\u019a\u2c60\u2c61\u2c62\u026b\u026c\u1d85\u026d\u0234\u029f\uff2c\uff4c]",n:"[n\u0143\u0144\u01f8\u01f9\u0147\u0148\xd1\xf1\u1e44\u1e45\u0145\u0146\u1e46\u1e47\u1e4a\u1e4b\u1e48\u1e49N\u0308n\u0308\u019d\u0272\u0220\u019e\u1d70\u1d87\u0273\u0235\u0274\uff2e\uff4e\u014a\u014b]",o:"[o\xd8\xf8\xd6\xf6\xd3\xf3\xd2\xf2\xd4\xf4\u01d1\u01d2\u0150\u0151\u014e\u014f\u022e\u022f\u1ecc\u1ecd\u019f\u0275\u01a0\u01a1\u1ece\u1ecf\u014c\u014d\xd5\xf5\u01ea\u01eb\u020c\u020d\u0555\u0585]",p:"[p\u1e54\u1e55\u1e56\u1e57\u2c63\u1d7d\u01a4\u01a5\u1d71]",q:"[q\ua756\ua757\u02a0\u024a\u024b\ua758\ua759q\u0303]",r:"[r\u0154\u0155\u024c\u024d\u0158\u0159\u0156\u0157\u1e58\u1e59\u0210\u0211\u0212\u0213\u1e5a\u1e5b\u2c64\u027d]",s:"[s\u015a\u015b\u1e60\u1e61\u1e62\u1e63\ua7a8\ua7a9\u015c\u015d\u0160\u0161\u015e\u015f\u0218\u0219S\u0308s\u0308]",t:"[t\u0164\u0165\u1e6a\u1e6b\u0162\u0163\u1e6c\u1e6d\u01ae\u0288\u021a\u021b\u1e70\u1e71\u1e6e\u1e6f\u01ac\u01ad]",u:"[u\u016c\u016d\u0244\u0289\u1ee4\u1ee5\xdc\xfc\xda\xfa\xd9\xf9\xdb\xfb\u01d3\u01d4\u0170\u0171\u016c\u016d\u01af\u01b0\u1ee6\u1ee7\u016a\u016b\u0168\u0169\u0172\u0173\u0214\u0215\u222a]",v:"[v\u1e7c\u1e7d\u1e7e\u1e7f\u01b2\u028b\ua75e\ua75f\u2c71\u028b]",w:"[w\u1e82\u1e83\u1e80\u1e81\u0174\u0175\u1e84\u1e85\u1e86\u1e87\u1e88\u1e89]",x:"[x\u1e8c\u1e8d\u1e8a\u1e8b\u03c7]",y:"[y\xdd\xfd\u1ef2\u1ef3\u0176\u0177\u0178\xff\u1ef8\u1ef9\u1e8e\u1e8f\u1ef4\u1ef5\u024e\u024f\u01b3\u01b4]",z:"[z\u0179\u017a\u1e90\u1e91\u017d\u017e\u017b\u017c\u1e92\u1e93\u1e94\u1e95\u01b5\u01b6]"},l=function(){var e,t,n,i,o="",r={};for(n in a)if(a.hasOwnProperty(n))for(i=a[n].substring(2,a[n].length-1),o+=i,e=0,t=i.length;e<t;e++)r[i.charAt(e)]=n;var s=new RegExp("["+o+"]","g");return function(e){return e.replace(s,function(e){return r[e]}).toLowerCase()}}();return e}),function(o,s){i=s,!(r="function"==typeof i?i.call(t,n,t,e):i)}(this,function(){var e={};e.mixin=function(e){e.plugins={},e.prototype.initializePlugins=function(e){var n,i,o,r=this,s=[];if(r.plugins={names:[],settings:{},requested:{},loaded:{}},t.isArray(e))for(n=0,i=e.length;n<i;n++)"string"==typeof e[n]?s.push(e[n]):(r.plugins.settings[e[n].name]=e[n].options,s.push(e[n].name));else if(e)for(o in e)e.hasOwnProperty(o)&&(r.plugins.settings[o]=e[o],s.push(o));for(;s.length;)r.require(s.shift())},e.prototype.loadPlugin=function(t){var n=this,i=n.plugins,o=e.plugins[t];if(!e.plugins.hasOwnProperty(t))throw new Error('Unable to find "'+t+'" plugin');i.requested[t]=!0,i.loaded[t]=o.fn.apply(n,[n.plugins.settings[t]||{}]),i.names.push(t)},e.prototype.require=function(e){var t=this,n=t.plugins;if(!t.plugins.loaded.hasOwnProperty(e)){if(n.requested[e])throw new Error('Plugin has circular dependency ("'+e+'")');t.loadPlugin(e)}return n.loaded[e]},e.define=function(t,n){e.plugins[t]={name:t,fn:n}}};var t={isArray:Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}};return e}),function(l,c){s=[n(2),o,r],i=c,a="function"==typeof i?i.apply(t,s):i,!(void 0!==a&&(e.exports=a))}(this,function(e,t,n){"use strict";var i=function(e,t){if("string"!=typeof t||t.length){var n="string"==typeof t?new RegExp(t,"i"):t,i=function(e){var t=0;if(3===e.nodeType){var o=e.data.search(n);if(o>=0&&e.data.length>0){var r=e.data.match(n),s=document.createElement("span");s.className="highlight";var a=e.splitText(o),l=(a.splitText(r[0].length),a.cloneNode(!0));s.appendChild(l),a.parentNode.replaceChild(s,a),t=1}}else if(1===e.nodeType&&e.childNodes&&!/(script|style)/i.test(e.tagName))for(var c=0;c<e.childNodes.length;++c)c+=i(e.childNodes[c]);return t};return e.each(function(){i(this)})}};e.fn.removeHighlight=function(){return this.find("span.highlight").each(function(){this.parentNode.firstChild.nodeName;var e=this.parentNode;e.replaceChild(this.firstChild,this),e.normalize()}).end()};var o=function(){};o.prototype={on:function(e,t){this._events=this._events||{},this._events[e]=this._events[e]||[],this._events[e].push(t)},off:function(e,t){var n=arguments.length;return 0===n?delete this._events:1===n?delete this._events[e]:(this._events=this._events||{},void(e in this._events!=!1&&this._events[e].splice(this._events[e].indexOf(t),1)))},trigger:function(e){if(this._events=this._events||{},e in this._events!=!1)for(var t=0;t<this._events[e].length;t++)this._events[e][t].apply(this,Array.prototype.slice.call(arguments,1))}},o.mixin=function(e){for(var t=["on","off","trigger"],n=0;n<t.length;n++)e.prototype[t[n]]=o.prototype[t[n]]};var r=/Mac/.test(navigator.userAgent),s=65,a=13,l=27,c=37,d=38,u=80,p=39,h=40,f=78,m=8,g=46,v=16,y=r?91:17,w=r?18:17,b=9,C=1,x=2,S=!/android/i.test(window.navigator.userAgent)&&!!document.createElement("input").validity,T=function(e){return"undefined"!=typeof e},_=function(e){return"undefined"==typeof e||null===e?null:"boolean"==typeof e?e?"1":"0":e+""},k=function(e){return(e+"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")},$={};$.before=function(e,t,n){var i=e[t];e[t]=function(){return n.apply(e,arguments),i.apply(e,arguments)}},$.after=function(e,t,n){var i=e[t];e[t]=function(){var t=i.apply(e,arguments);return n.apply(e,arguments),t}};var D=function(e){var t=!1;return function(){t||(t=!0,e.apply(this,arguments))}},E=function(e,t){var n;return function(){var i=this,o=arguments;window.clearTimeout(n),n=window.setTimeout(function(){e.apply(i,o)},t)}},O=function(e,t,n){var i,o=e.trigger,r={};e.trigger=function(){var n=arguments[0];return t.indexOf(n)===-1?o.apply(e,arguments):void(r[n]=arguments)},n.apply(e,[]),e.trigger=o;for(i in r)r.hasOwnProperty(i)&&o.apply(e,r[i])},M=function(e,t,n,i){e.on(t,n,function(t){for(var n=t.target;n&&n.parentNode!==e[0];)n=n.parentNode;return t.currentTarget=n,i.apply(this,[t])})},A=function(e){var t={};if("selectionStart"in e)t.start=e.selectionStart,t.length=e.selectionEnd-t.start;else if(document.selection){e.focus();var n=document.selection.createRange(),i=document.selection.createRange().text.length;n.moveStart("character",-e.value.length),t.start=n.text.length-i,t.length=i}return t},I=function(e,t,n){var i,o,r={};if(n)for(i=0,o=n.length;i<o;i++)r[n[i]]=e.css(n[i]);else r=e.css();t.css(r)},F=function(t,n){if(!t)return 0;var i=e("<test>").css({position:"absolute",top:-99999,left:-99999,width:"auto",padding:0,whiteSpace:"pre"}).text(t).appendTo("body");I(n,i,["letterSpacing","fontSize","fontFamily","fontWeight","textTransform"]);var o=i.width();return i.remove(),o},P=function(e){var t=null,n=function(n,i){var o,r,s,a,l,c,d,u;n=n||window.event||{},i=i||{},n.metaKey||n.altKey||(i.force||e.data("grow")!==!1)&&(o=e.val(),n.type&&"keydown"===n.type.toLowerCase()&&(r=n.keyCode,s=r>=97&&r<=122||r>=65&&r<=90||r>=48&&r<=57||32===r,r===g||r===m?(u=A(e[0]),u.length?o=o.substring(0,u.start)+o.substring(u.start+u.length):r===m&&u.start?o=o.substring(0,u.start-1)+o.substring(u.start+1):r===g&&"undefined"!=typeof u.start&&(o=o.substring(0,u.start)+o.substring(u.start+1))):s&&(c=n.shiftKey,
d=String.fromCharCode(n.keyCode),d=c?d.toUpperCase():d.toLowerCase(),o+=d)),a=e.attr("placeholder"),!o&&a&&(o=a),l=F(o,e)+4,l!==t&&(t=l,e.width(l),e.triggerHandler("resize")))};e.on("keydown keyup update blur",n),n()},z=function(e){var t=document.createElement("div");return t.appendChild(e.cloneNode(!0)),t.innerHTML},N=function(e,t){t||(t={});var n="Selectize";console.error(n+": "+e),t.explanation&&(console.group&&console.group(),console.error(t.explanation),console.group&&console.groupEnd())},j=function(n,i){var o,r,s,a,l=this;a=n[0],a.selectize=l;var c=window.getComputedStyle&&window.getComputedStyle(a,null);if(s=c?c.getPropertyValue("direction"):a.currentStyle&&a.currentStyle.direction,s=s||n.parents("[dir]:first").attr("dir")||"",e.extend(l,{order:0,settings:i,$input:n,tabIndex:n.attr("tabindex")||"",tagType:"select"===a.tagName.toLowerCase()?C:x,rtl:/rtl/i.test(s),eventNS:".selectize"+ ++j.count,highlightedValue:null,isOpen:!1,isDisabled:!1,isRequired:!1,isInvalid:!1,isLocked:!1,isFocused:!1,isInputHidden:!1,isSetup:!1,isShiftDown:!1,isCmdDown:!1,isCtrlDown:!1,ignoreFocus:!1,ignoreBlur:!1,ignoreHover:!1,hasOptions:!1,currentResults:null,lastValue:"",caretPos:0,loading:0,loadedSearches:{},$activeOption:null,$activeItems:[],optgroups:{},options:{},userOptions:{},items:[],renderCache:{},onSearchChange:null===i.loadThrottle?l.onSearchChange:E(l.onSearchChange,i.loadThrottle)}),l.sifter=new t(this.options,{diacritics:i.diacritics}),l.settings.options){for(o=0,r=l.settings.options.length;o<r;o++)l.registerOption(l.settings.options[o]);delete l.settings.options}if(l.settings.optgroups){for(o=0,r=l.settings.optgroups.length;o<r;o++)l.registerOptionGroup(l.settings.optgroups[o]);delete l.settings.optgroups}l.settings.mode=l.settings.mode||(1===l.settings.maxItems?"single":"multi"),"boolean"!=typeof l.settings.hideSelected&&(l.settings.hideSelected="multi"===l.settings.mode),l.initializePlugins(l.settings.plugins),l.setupCallbacks(),l.setupTemplates(),l.setup()};return o.mixin(j),"undefined"!=typeof n?n.mixin(j):N("Dependency MicroPlugin is missing",{explanation:'Make sure you either: (1) are using the "standalone" version of Selectize, or (2) require MicroPlugin before you load Selectize.'}),e.extend(j.prototype,{setup:function(){var t,n,i,o,s,a,l,c,d,u,p=this,h=p.settings,f=p.eventNS,m=e(window),g=e(document),b=p.$input;if(l=p.settings.mode,c=b.attr("class")||"",t=e("<div>").addClass(h.wrapperClass).addClass(c).addClass(l),n=e("<div>").addClass(h.inputClass).addClass("items").appendTo(t),i=e('<input type="text" autocomplete="off" />').appendTo(n).attr("tabindex",b.is(":disabled")?"-1":p.tabIndex),a=e(h.dropdownParent||t),o=e("<div>").addClass(h.dropdownClass).addClass(l).hide().appendTo(a),s=e("<div>").addClass(h.dropdownContentClass).appendTo(o),(u=b.attr("id"))&&(i.attr("id",u+"-selectized"),e("label[for='"+u+"']").attr("for",u+"-selectized")),p.settings.copyClassesToDropdown&&o.addClass(c),t.css({width:b[0].style.width}),p.plugins.names.length&&(d="plugin-"+p.plugins.names.join(" plugin-"),t.addClass(d),o.addClass(d)),(null===h.maxItems||h.maxItems>1)&&p.tagType===C&&b.attr("multiple","multiple"),p.settings.placeholder&&i.attr("placeholder",h.placeholder),!p.settings.splitOn&&p.settings.delimiter){var x=p.settings.delimiter.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&");p.settings.splitOn=new RegExp("\\s*"+x+"+\\s*")}b.attr("autocorrect")&&i.attr("autocorrect",b.attr("autocorrect")),b.attr("autocapitalize")&&i.attr("autocapitalize",b.attr("autocapitalize")),p.$wrapper=t,p.$control=n,p.$control_input=i,p.$dropdown=o,p.$dropdown_content=s,o.on("mouseenter","[data-selectable]",function(){return p.onOptionHover.apply(p,arguments)}),o.on("mousedown click","[data-selectable]",function(){return p.onOptionSelect.apply(p,arguments)}),M(n,"mousedown","*:not(input)",function(){return p.onItemSelect.apply(p,arguments)}),P(i),n.on({mousedown:function(){return p.onMouseDown.apply(p,arguments)},click:function(){return p.onClick.apply(p,arguments)}}),i.on({mousedown:function(e){e.stopPropagation()},keydown:function(){return p.onKeyDown.apply(p,arguments)},keyup:function(){return p.onKeyUp.apply(p,arguments)},keypress:function(){return p.onKeyPress.apply(p,arguments)},resize:function(){p.positionDropdown.apply(p,[])},blur:function(){return p.onBlur.apply(p,arguments)},focus:function(){return p.ignoreBlur=!1,p.onFocus.apply(p,arguments)},paste:function(){return p.onPaste.apply(p,arguments)}}),g.on("keydown"+f,function(e){p.isCmdDown=e[r?"metaKey":"ctrlKey"],p.isCtrlDown=e[r?"altKey":"ctrlKey"],p.isShiftDown=e.shiftKey}),g.on("keyup"+f,function(e){e.keyCode===w&&(p.isCtrlDown=!1),e.keyCode===v&&(p.isShiftDown=!1),e.keyCode===y&&(p.isCmdDown=!1)}),g.on("mousedown"+f,function(e){if(p.isFocused){if(e.target===p.$dropdown[0]||e.target.parentNode===p.$dropdown[0])return!1;p.$control.has(e.target).length||e.target===p.$control[0]||p.blur(e.target)}}),m.on(["scroll"+f,"resize"+f].join(" "),function(){p.isOpen&&p.positionDropdown.apply(p,arguments)}),m.on("mousemove"+f,function(){p.ignoreHover=!1}),this.revertSettings={$children:b.children().detach(),tabindex:b.attr("tabindex")},b.attr("tabindex",-1).hide().after(p.$wrapper),e.isArray(h.items)&&(p.setValue(h.items),delete h.items),S&&b.on("invalid"+f,function(e){e.preventDefault(),p.isInvalid=!0,p.refreshState()}),p.updateOriginalInput(),p.refreshItems(),p.refreshState(),p.updatePlaceholder(),p.isSetup=!0,b.is(":disabled")&&p.disable(),p.on("change",this.onChange),b.data("selectize",p),b.addClass("selectized"),p.trigger("initialize"),h.preload===!0&&p.onSearchChange("")},setupTemplates:function(){var t=this,n=t.settings.labelField,i=t.settings.optgroupLabelField,o={optgroup:function(e){return'<div class="optgroup">'+e.html+"</div>"},optgroup_header:function(e,t){return'<div class="optgroup-header">'+t(e[i])+"</div>"},option:function(e,t){return'<div class="option">'+t(e[n])+"</div>"},item:function(e,t){return'<div class="item">'+t(e[n])+"</div>"},option_create:function(e,t){return'<div class="create">Add <strong>'+t(e.input)+"</strong>&hellip;</div>"}};t.settings.render=e.extend({},o,t.settings.render)},setupCallbacks:function(){var e,t,n={initialize:"onInitialize",change:"onChange",item_add:"onItemAdd",item_remove:"onItemRemove",clear:"onClear",option_add:"onOptionAdd",option_remove:"onOptionRemove",option_clear:"onOptionClear",optgroup_add:"onOptionGroupAdd",optgroup_remove:"onOptionGroupRemove",optgroup_clear:"onOptionGroupClear",dropdown_open:"onDropdownOpen",dropdown_close:"onDropdownClose",type:"onType",load:"onLoad",focus:"onFocus",blur:"onBlur"};for(e in n)n.hasOwnProperty(e)&&(t=this.settings[n[e]],t&&this.on(e,t))},onClick:function(e){var t=this;t.isFocused||(t.focus(),e.preventDefault())},onMouseDown:function(t){var n=this,i=t.isDefaultPrevented();e(t.target);if(n.isFocused){if(t.target!==n.$control_input[0])return"single"===n.settings.mode?n.isOpen?n.close():n.open():i||n.setActiveItem(null),!1}else i||window.setTimeout(function(){n.focus()},0)},onChange:function(){this.$input.trigger("change")},onPaste:function(t){var n=this;return n.isFull()||n.isInputHidden||n.isLocked?void t.preventDefault():void(n.settings.splitOn&&setTimeout(function(){var t=n.$control_input.val();if(t.match(n.settings.splitOn))for(var i=e.trim(t).split(n.settings.splitOn),o=0,r=i.length;o<r;o++)n.createItem(i[o])},0))},onKeyPress:function(e){if(this.isLocked)return e&&e.preventDefault();var t=String.fromCharCode(e.keyCode||e.which);return this.settings.create&&"multi"===this.settings.mode&&t===this.settings.delimiter?(this.createItem(),e.preventDefault(),!1):void 0},onKeyDown:function(e){var t=(e.target===this.$control_input[0],this);if(t.isLocked)return void(e.keyCode!==b&&e.preventDefault());switch(e.keyCode){case s:if(t.isCmdDown)return void t.selectAll();break;case l:return void(t.isOpen&&(e.preventDefault(),e.stopPropagation(),t.close()));case f:if(!e.ctrlKey||e.altKey)break;case h:if(!t.isOpen&&t.hasOptions)t.open();else if(t.$activeOption){t.ignoreHover=!0;var n=t.getAdjacentOption(t.$activeOption,1);n.length&&t.setActiveOption(n,!0,!0)}return void e.preventDefault();case u:if(!e.ctrlKey||e.altKey)break;case d:if(t.$activeOption){t.ignoreHover=!0;var i=t.getAdjacentOption(t.$activeOption,-1);i.length&&t.setActiveOption(i,!0,!0)}return void e.preventDefault();case a:return void(t.isOpen&&t.$activeOption&&(t.onOptionSelect({currentTarget:t.$activeOption}),e.preventDefault()));case c:return void t.advanceSelection(-1,e);case p:return void t.advanceSelection(1,e);case b:return t.settings.selectOnTab&&t.isOpen&&t.$activeOption&&(t.onOptionSelect({currentTarget:t.$activeOption}),t.isFull()||e.preventDefault()),void(t.settings.create&&t.createItem()&&e.preventDefault());case m:case g:return void t.deleteSelection(e)}return!t.isFull()&&!t.isInputHidden||(r?e.metaKey:e.ctrlKey)?void 0:void e.preventDefault()},onKeyUp:function(e){var t=this;if(t.isLocked)return e&&e.preventDefault();var n=t.$control_input.val()||"";t.lastValue!==n&&(t.lastValue=n,t.onSearchChange(n),t.refreshOptions(),t.trigger("type",n))},onSearchChange:function(e){var t=this,n=t.settings.load;n&&(t.loadedSearches.hasOwnProperty(e)||(t.loadedSearches[e]=!0,t.load(function(i){n.apply(t,[e,i])})))},onFocus:function(e){var t=this,n=t.isFocused;return t.isDisabled?(t.blur(),e&&e.preventDefault(),!1):void(t.ignoreFocus||(t.isFocused=!0,"focus"===t.settings.preload&&t.onSearchChange(""),n||t.trigger("focus"),t.$activeItems.length||(t.showInput(),t.setActiveItem(null),t.refreshOptions(!!t.settings.openOnFocus)),t.refreshState()))},onBlur:function(e,t){var n=this;if(n.isFocused&&(n.isFocused=!1,!n.ignoreFocus)){if(!n.ignoreBlur&&document.activeElement===n.$dropdown_content[0])return n.ignoreBlur=!0,void n.onFocus(e);var i=function(){n.close(),n.setTextboxValue(""),n.setActiveItem(null),n.setActiveOption(null),n.setCaret(n.items.length),n.refreshState(),t&&t.focus&&t.focus(),n.ignoreFocus=!1,n.trigger("blur")};n.ignoreFocus=!0,n.settings.create&&n.settings.createOnBlur?n.createItem(null,!1,i):i()}},onOptionHover:function(e){this.ignoreHover||this.setActiveOption(e.currentTarget,!1)},onOptionSelect:function(t){var n,i,o=this;t.preventDefault&&(t.preventDefault(),t.stopPropagation()),i=e(t.currentTarget),i.hasClass("create")?o.createItem(null,function(){o.settings.closeAfterSelect&&o.close()}):(n=i.attr("data-value"),"undefined"!=typeof n&&(o.lastQuery=null,o.setTextboxValue(""),o.addItem(n),o.settings.closeAfterSelect?o.close():!o.settings.hideSelected&&t.type&&/mouse/.test(t.type)&&o.setActiveOption(o.getOption(n))))},onItemSelect:function(e){var t=this;t.isLocked||"multi"===t.settings.mode&&(e.preventDefault(),t.setActiveItem(e.currentTarget,e))},load:function(e){var t=this,n=t.$wrapper.addClass(t.settings.loadingClass);t.loading++,e.apply(t,[function(e){t.loading=Math.max(t.loading-1,0),e&&e.length&&(t.addOption(e),t.refreshOptions(t.isFocused&&!t.isInputHidden)),t.loading||n.removeClass(t.settings.loadingClass),t.trigger("load",e)}])},setTextboxValue:function(e){var t=this.$control_input,n=t.val()!==e;n&&(t.val(e).triggerHandler("update"),this.lastValue=e)},getValue:function(){return this.tagType===C&&this.$input.attr("multiple")?this.items:this.items.join(this.settings.delimiter)},setValue:function(e,t){var n=t?[]:["change"];O(this,n,function(){this.clear(t),this.addItems(e,t)})},setActiveItem:function(t,n){var i,o,r,s,a,l,c,d,u=this;if("single"!==u.settings.mode){if(t=e(t),!t.length)return e(u.$activeItems).removeClass("active"),u.$activeItems=[],void(u.isFocused&&u.showInput());if(i=n&&n.type.toLowerCase(),"mousedown"===i&&u.isShiftDown&&u.$activeItems.length){for(d=u.$control.children(".active:last"),s=Array.prototype.indexOf.apply(u.$control[0].childNodes,[d[0]]),a=Array.prototype.indexOf.apply(u.$control[0].childNodes,[t[0]]),s>a&&(c=s,s=a,a=c),o=s;o<=a;o++)l=u.$control[0].childNodes[o],u.$activeItems.indexOf(l)===-1&&(e(l).addClass("active"),u.$activeItems.push(l));n.preventDefault()}else"mousedown"===i&&u.isCtrlDown||"keydown"===i&&this.isShiftDown?t.hasClass("active")?(r=u.$activeItems.indexOf(t[0]),u.$activeItems.splice(r,1),t.removeClass("active")):u.$activeItems.push(t.addClass("active")[0]):(e(u.$activeItems).removeClass("active"),u.$activeItems=[t.addClass("active")[0]]);u.hideInput(),this.isFocused||u.focus()}},setActiveOption:function(t,n,i){var o,r,s,a,l,c=this;c.$activeOption&&c.$activeOption.removeClass("active"),c.$activeOption=null,t=e(t),t.length&&(c.$activeOption=t.addClass("active"),!n&&T(n)||(o=c.$dropdown_content.height(),r=c.$activeOption.outerHeight(!0),n=c.$dropdown_content.scrollTop()||0,s=c.$activeOption.offset().top-c.$dropdown_content.offset().top+n,a=s,l=s-o+r,s+r>o+n?c.$dropdown_content.stop().animate({scrollTop:l},i?c.settings.scrollDuration:0):s<n&&c.$dropdown_content.stop().animate({scrollTop:a},i?c.settings.scrollDuration:0)))},selectAll:function(){var e=this;"single"!==e.settings.mode&&(e.$activeItems=Array.prototype.slice.apply(e.$control.children(":not(input)").addClass("active")),e.$activeItems.length&&(e.hideInput(),e.close()),e.focus())},hideInput:function(){var e=this;e.setTextboxValue(""),e.$control_input.css({opacity:0,position:"absolute",left:e.rtl?1e4:-1e4}),e.isInputHidden=!0},showInput:function(){this.$control_input.css({opacity:1,position:"relative",left:0}),this.isInputHidden=!1},focus:function(){var e=this;e.isDisabled||(e.ignoreFocus=!0,e.$control_input[0].focus(),window.setTimeout(function(){e.ignoreFocus=!1,e.onFocus()},0))},blur:function(e){this.$control_input[0].blur(),this.onBlur(null,e)},getScoreFunction:function(e){return this.sifter.getScoreFunction(e,this.getSearchOptions())},getSearchOptions:function(){var e=this.settings,t=e.sortField;return"string"==typeof t&&(t=[{field:t}]),{fields:e.searchField,conjunction:e.searchConjunction,sort:t}},search:function(t){var n,i,o,r=this,s=r.settings,a=this.getSearchOptions();if(s.score&&(o=r.settings.score.apply(this,[t]),"function"!=typeof o))throw new Error('Selectize "score" setting must be a function that returns a function');if(t!==r.lastQuery?(r.lastQuery=t,i=r.sifter.search(t,e.extend(a,{score:o})),r.currentResults=i):i=e.extend(!0,{},r.currentResults),s.hideSelected)for(n=i.items.length-1;n>=0;n--)r.items.indexOf(_(i.items[n].id))!==-1&&i.items.splice(n,1);return i},refreshOptions:function(t){var n,o,r,s,a,l,c,d,u,p,h,f,m,g,v,y;"undefined"==typeof t&&(t=!0);var w=this,b=e.trim(w.$control_input.val()),C=w.search(b),x=w.$dropdown_content,S=w.$activeOption&&_(w.$activeOption.attr("data-value"));for(s=C.items.length,"number"==typeof w.settings.maxOptions&&(s=Math.min(s,w.settings.maxOptions)),a={},l=[],n=0;n<s;n++)for(c=w.options[C.items[n].id],d=w.render("option",c),u=c[w.settings.optgroupField]||"",p=e.isArray(u)?u:[u],o=0,r=p&&p.length;o<r;o++)u=p[o],w.optgroups.hasOwnProperty(u)||(u=""),a.hasOwnProperty(u)||(a[u]=document.createDocumentFragment(),l.push(u)),a[u].appendChild(d);for(this.settings.lockOptgroupOrder&&l.sort(function(e,t){var n=w.optgroups[e].$order||0,i=w.optgroups[t].$order||0;return n-i}),h=document.createDocumentFragment(),n=0,s=l.length;n<s;n++)u=l[n],w.optgroups.hasOwnProperty(u)&&a[u].childNodes.length?(f=document.createDocumentFragment(),f.appendChild(w.render("optgroup_header",w.optgroups[u])),f.appendChild(a[u]),h.appendChild(w.render("optgroup",e.extend({},w.optgroups[u],{html:z(f),dom:f})))):h.appendChild(a[u]);if(x.html(h),w.settings.highlight&&C.query.length&&C.tokens.length)for(x.removeHighlight(),n=0,s=C.tokens.length;n<s;n++)i(x,C.tokens[n].regex);if(!w.settings.hideSelected)for(n=0,s=w.items.length;n<s;n++)w.getOption(w.items[n]).addClass("selected");m=w.canCreate(b),m&&(x.prepend(w.render("option_create",{input:b})),y=e(x[0].childNodes[0])),w.hasOptions=C.items.length>0||m,w.hasOptions?(C.items.length>0?(v=S&&w.getOption(S),v&&v.length?g=v:"single"===w.settings.mode&&w.items.length&&(g=w.getOption(w.items[0])),g&&g.length||(g=y&&!w.settings.addPrecedence?w.getAdjacentOption(y,1):x.find("[data-selectable]:first"))):g=y,w.setActiveOption(g),t&&!w.isOpen&&w.open()):(w.setActiveOption(null),t&&w.isOpen&&w.close())},addOption:function(t){var n,i,o,r=this;if(e.isArray(t))for(n=0,i=t.length;n<i;n++)r.addOption(t[n]);else(o=r.registerOption(t))&&(r.userOptions[o]=!0,r.lastQuery=null,r.trigger("option_add",o,t))},registerOption:function(e){var t=_(e[this.settings.valueField]);return"undefined"!=typeof t&&null!==t&&!this.options.hasOwnProperty(t)&&(e.$order=e.$order||++this.order,this.options[t]=e,t)},registerOptionGroup:function(e){var t=_(e[this.settings.optgroupValueField]);return!!t&&(e.$order=e.$order||++this.order,this.optgroups[t]=e,t)},addOptionGroup:function(e,t){t[this.settings.optgroupValueField]=e,(e=this.registerOptionGroup(t))&&this.trigger("optgroup_add",e,t)},removeOptionGroup:function(e){this.optgroups.hasOwnProperty(e)&&(delete this.optgroups[e],this.renderCache={},this.trigger("optgroup_remove",e))},clearOptionGroups:function(){this.optgroups={},this.renderCache={},this.trigger("optgroup_clear")},updateOption:function(t,n){var i,o,r,s,a,l,c,d=this;if(t=_(t),r=_(n[d.settings.valueField]),null!==t&&d.options.hasOwnProperty(t)){if("string"!=typeof r)throw new Error("Value must be set in option data");c=d.options[t].$order,r!==t&&(delete d.options[t],s=d.items.indexOf(t),s!==-1&&d.items.splice(s,1,r)),n.$order=n.$order||c,d.options[r]=n,a=d.renderCache.item,l=d.renderCache.option,a&&(delete a[t],delete a[r]),l&&(delete l[t],delete l[r]),d.items.indexOf(r)!==-1&&(i=d.getItem(t),o=e(d.render("item",n)),i.hasClass("active")&&o.addClass("active"),i.replaceWith(o)),d.lastQuery=null,d.isOpen&&d.refreshOptions(!1)}},removeOption:function(e,t){var n=this;e=_(e);var i=n.renderCache.item,o=n.renderCache.option;i&&delete i[e],o&&delete o[e],delete n.userOptions[e],delete n.options[e],n.lastQuery=null,n.trigger("option_remove",e),n.removeItem(e,t)},clearOptions:function(){var e=this;e.loadedSearches={},e.userOptions={},e.renderCache={},e.options=e.sifter.items={},e.lastQuery=null,e.trigger("option_clear"),e.clear()},getOption:function(e){return this.getElementWithValue(e,this.$dropdown_content.find("[data-selectable]"))},getAdjacentOption:function(t,n){var i=this.$dropdown.find("[data-selectable]"),o=i.index(t)+n;return o>=0&&o<i.length?i.eq(o):e()},getElementWithValue:function(t,n){if(t=_(t),"undefined"!=typeof t&&null!==t)for(var i=0,o=n.length;i<o;i++)if(n[i].getAttribute("data-value")===t)return e(n[i]);return e()},getItem:function(e){return this.getElementWithValue(e,this.$control.children())},addItems:function(t,n){for(var i=e.isArray(t)?t:[t],o=0,r=i.length;o<r;o++)this.isPending=o<r-1,this.addItem(i[o],n)},addItem:function(t,n){var i=n?[]:["change"];O(this,i,function(){var i,o,r,s,a,l=this,c=l.settings.mode;return t=_(t),l.items.indexOf(t)!==-1?void("single"===c&&l.close()):void(l.options.hasOwnProperty(t)&&("single"===c&&l.clear(n),"multi"===c&&l.isFull()||(i=e(l.render("item",l.options[t])),a=l.isFull(),l.items.splice(l.caretPos,0,t),l.insertAtCaret(i),(!l.isPending||!a&&l.isFull())&&l.refreshState(),l.isSetup&&(r=l.$dropdown_content.find("[data-selectable]"),l.isPending||(o=l.getOption(t),s=l.getAdjacentOption(o,1).attr("data-value"),l.refreshOptions(l.isFocused&&"single"!==c),s&&l.setActiveOption(l.getOption(s))),!r.length||l.isFull()?l.close():l.positionDropdown(),l.updatePlaceholder(),l.trigger("item_add",t,i),l.updateOriginalInput({silent:n})))))})},removeItem:function(t,n){var i,o,r,s=this;i=t instanceof e?t:s.getItem(t),t=_(i.attr("data-value")),o=s.items.indexOf(t),o!==-1&&(i.remove(),i.hasClass("active")&&(r=s.$activeItems.indexOf(i[0]),s.$activeItems.splice(r,1)),s.items.splice(o,1),s.lastQuery=null,!s.settings.persist&&s.userOptions.hasOwnProperty(t)&&s.removeOption(t,n),o<s.caretPos&&s.setCaret(s.caretPos-1),s.refreshState(),s.updatePlaceholder(),s.updateOriginalInput({silent:n}),s.positionDropdown(),s.trigger("item_remove",t,i))},createItem:function(t,n){var i=this,o=i.caretPos;t=t||e.trim(i.$control_input.val()||"");var r=arguments[arguments.length-1];if("function"!=typeof r&&(r=function(){}),"boolean"!=typeof n&&(n=!0),!i.canCreate(t))return r(),!1;i.lock();var s="function"==typeof i.settings.create?this.settings.create:function(e){var t={};return t[i.settings.labelField]=e,t[i.settings.valueField]=e,t},a=D(function(e){if(i.unlock(),!e||"object"!=typeof e)return r();var t=_(e[i.settings.valueField]);return"string"!=typeof t?r():(i.setTextboxValue(""),i.addOption(e),i.setCaret(o),i.addItem(t),i.refreshOptions(n&&"single"!==i.settings.mode),void r(e))}),l=s.apply(this,[t,a]);return"undefined"!=typeof l&&a(l),!0},refreshItems:function(){this.lastQuery=null,this.isSetup&&this.addItem(this.items),this.refreshState(),this.updateOriginalInput()},refreshState:function(){this.refreshValidityState(),this.refreshClasses()},refreshValidityState:function(){if(!this.isRequired)return!1;var e=!this.items.length;this.isInvalid=e,this.$control_input.prop("required",e),this.$input.prop("required",!e)},refreshClasses:function(){var t=this,n=t.isFull(),i=t.isLocked;t.$wrapper.toggleClass("rtl",t.rtl),t.$control.toggleClass("focus",t.isFocused).toggleClass("disabled",t.isDisabled).toggleClass("required",t.isRequired).toggleClass("invalid",t.isInvalid).toggleClass("locked",i).toggleClass("full",n).toggleClass("not-full",!n).toggleClass("input-active",t.isFocused&&!t.isInputHidden).toggleClass("dropdown-active",t.isOpen).toggleClass("has-options",!e.isEmptyObject(t.options)).toggleClass("has-items",t.items.length>0),t.$control_input.data("grow",!n&&!i)},isFull:function(){return null!==this.settings.maxItems&&this.items.length>=this.settings.maxItems},updateOriginalInput:function(e){var t,n,i,o,r=this;if(e=e||{},r.tagType===C){for(i=[],t=0,n=r.items.length;t<n;t++)o=r.options[r.items[t]][r.settings.labelField]||"",i.push('<option value="'+k(r.items[t])+'" selected="selected">'+k(o)+"</option>");i.length||this.$input.attr("multiple")||i.push('<option value="" selected="selected"></option>'),r.$input.html(i.join(""))}else r.$input.val(r.getValue()),r.$input.attr("value",r.$input.val());r.isSetup&&(e.silent||r.trigger("change",r.$input.val()))},updatePlaceholder:function(){if(this.settings.placeholder){var e=this.$control_input;this.items.length?e.removeAttr("placeholder"):e.attr("placeholder",this.settings.placeholder),e.triggerHandler("update",{force:!0})}},open:function(){var e=this;e.isLocked||e.isOpen||"multi"===e.settings.mode&&e.isFull()||(e.focus(),e.isOpen=!0,e.refreshState(),e.$dropdown.css({visibility:"hidden",display:"block"}),e.positionDropdown(),e.$dropdown.css({visibility:"visible"}),e.trigger("dropdown_open",e.$dropdown))},close:function(){var e=this,t=e.isOpen;"single"===e.settings.mode&&e.items.length&&(e.hideInput(),e.$control_input.blur()),e.isOpen=!1,e.$dropdown.hide(),e.setActiveOption(null),e.refreshState(),t&&e.trigger("dropdown_close",e.$dropdown)},positionDropdown:function(){var e=this.$control,t="body"===this.settings.dropdownParent?e.offset():e.position();t.top+=e.outerHeight(!0),this.$dropdown.css({width:e.outerWidth(),top:t.top,left:t.left})},clear:function(e){var t=this;t.items.length&&(t.$control.children(":not(input)").remove(),t.items=[],t.lastQuery=null,t.setCaret(0),t.setActiveItem(null),t.updatePlaceholder(),t.updateOriginalInput({silent:e}),t.refreshState(),t.showInput(),t.trigger("clear"))},insertAtCaret:function(t){var n=Math.min(this.caretPos,this.items.length);0===n?this.$control.prepend(t):e(this.$control[0].childNodes[n]).before(t),this.setCaret(n+1)},deleteSelection:function(t){var n,i,o,r,s,a,l,c,d,u=this;if(o=t&&t.keyCode===m?-1:1,r=A(u.$control_input[0]),u.$activeOption&&!u.settings.hideSelected&&(l=u.getAdjacentOption(u.$activeOption,-1).attr("data-value")),s=[],u.$activeItems.length){for(d=u.$control.children(".active:"+(o>0?"last":"first")),a=u.$control.children(":not(input)").index(d),o>0&&a++,n=0,i=u.$activeItems.length;n<i;n++)s.push(e(u.$activeItems[n]).attr("data-value"));t&&(t.preventDefault(),t.stopPropagation())}else(u.isFocused||"single"===u.settings.mode)&&u.items.length&&(o<0&&0===r.start&&0===r.length?s.push(u.items[u.caretPos-1]):o>0&&r.start===u.$control_input.val().length&&s.push(u.items[u.caretPos]));if(!s.length||"function"==typeof u.settings.onDelete&&u.settings.onDelete.apply(u,[s])===!1)return!1;for("undefined"!=typeof a&&u.setCaret(a);s.length;)u.removeItem(s.pop());return u.showInput(),u.positionDropdown(),u.refreshOptions(!0),l&&(c=u.getOption(l),c.length&&u.setActiveOption(c)),!0},advanceSelection:function(e,t){var n,i,o,r,s,a,l=this;0!==e&&(l.rtl&&(e*=-1),n=e>0?"last":"first",i=A(l.$control_input[0]),l.isFocused&&!l.isInputHidden?(r=l.$control_input.val().length,s=e<0?0===i.start&&0===i.length:i.start===r,s&&!r&&l.advanceCaret(e,t)):(a=l.$control.children(".active:"+n),a.length&&(o=l.$control.children(":not(input)").index(a),l.setActiveItem(null),l.setCaret(e>0?o+1:o))))},advanceCaret:function(e,t){var n,i,o=this;0!==e&&(n=e>0?"next":"prev",o.isShiftDown?(i=o.$control_input[n](),i.length&&(o.hideInput(),o.setActiveItem(i),t&&t.preventDefault())):o.setCaret(o.caretPos+e))},setCaret:function(t){var n=this;if(t="single"===n.settings.mode?n.items.length:Math.max(0,Math.min(n.items.length,t)),!n.isPending){var i,o,r,s;for(r=n.$control.children(":not(input)"),i=0,o=r.length;i<o;i++)s=e(r[i]).detach(),i<t?n.$control_input.before(s):n.$control.append(s)}n.caretPos=t},lock:function(){this.close(),this.isLocked=!0,this.refreshState()},unlock:function(){this.isLocked=!1,this.refreshState()},disable:function(){var e=this;e.$input.prop("disabled",!0),e.$control_input.prop("disabled",!0).prop("tabindex",-1),e.isDisabled=!0,e.lock()},enable:function(){var e=this;e.$input.prop("disabled",!1),e.$control_input.prop("disabled",!1).prop("tabindex",e.tabIndex),e.isDisabled=!1,e.unlock()},destroy:function(){var t=this,n=t.eventNS,i=t.revertSettings;t.trigger("destroy"),t.off(),t.$wrapper.remove(),t.$dropdown.remove(),t.$input.html("").append(i.$children).removeAttr("tabindex").removeClass("selectized").attr({tabindex:i.tabindex}).show(),t.$control_input.removeData("grow"),t.$input.removeData("selectize"),e(window).off(n),e(document).off(n),e(document.body).off(n),delete t.$input[0].selectize},render:function(t,n){var i,o,r="",s=!1,a=this;return"option"!==t&&"item"!==t||(i=_(n[a.settings.valueField]),s=!!i),s&&(T(a.renderCache[t])||(a.renderCache[t]={}),a.renderCache[t].hasOwnProperty(i))?a.renderCache[t][i]:(r=e(a.settings.render[t].apply(this,[n,k])),"option"===t||"option_create"===t?r.attr("data-selectable",""):"optgroup"===t&&(o=n[a.settings.optgroupValueField]||"",r.attr("data-group",o)),"option"!==t&&"item"!==t||r.attr("data-value",i||""),s&&(a.renderCache[t][i]=r[0]),r[0])},clearCache:function(e){var t=this;"undefined"==typeof e?t.renderCache={}:delete t.renderCache[e]},canCreate:function(e){var t=this;if(!t.settings.create)return!1;var n=t.settings.createFilter;return e.length&&("function"!=typeof n||n.apply(t,[e]))&&("string"!=typeof n||new RegExp(n).test(e))&&(!(n instanceof RegExp)||n.test(e))}}),j.count=0,j.defaults={options:[],optgroups:[],plugins:[],delimiter:",",splitOn:null,persist:!0,diacritics:!0,create:!1,createOnBlur:!1,createFilter:null,highlight:!0,openOnFocus:!0,maxOptions:1e3,maxItems:null,hideSelected:null,addPrecedence:!1,selectOnTab:!1,preload:!1,allowEmptyOption:!1,closeAfterSelect:!1,scrollDuration:60,loadThrottle:300,loadingClass:"loading",dataAttr:"data-data",optgroupField:"optgroup",valueField:"value",labelField:"text",optgroupLabelField:"label",optgroupValueField:"value",lockOptgroupOrder:!1,sortField:"$order",searchField:["text"],searchConjunction:"and",mode:null,wrapperClass:"selectize-control",inputClass:"selectize-input",dropdownClass:"selectize-dropdown",dropdownContentClass:"selectize-dropdown-content",dropdownParent:null,copyClassesToDropdown:!0,render:{}},e.fn.selectize=function(t){var n=e.fn.selectize.defaults,i=e.extend({},n,t),o=i.dataAttr,r=i.labelField,s=i.valueField,a=i.optgroupField,l=i.optgroupLabelField,c=i.optgroupValueField,d=function(t,n){var a,l,c,d,u=t.attr(o);if(u)for(n.options=JSON.parse(u),a=0,l=n.options.length;a<l;a++)n.items.push(n.options[a][s]);else{var p=e.trim(t.val()||"");if(!i.allowEmptyOption&&!p.length)return;for(c=p.split(i.delimiter),a=0,l=c.length;a<l;a++)d={},d[r]=c[a],d[s]=c[a],n.options.push(d);n.items=c}},u=function(t,n){var d,u,p,h,f=n.options,m={},g=function(e){var t=o&&e.attr(o);return"string"==typeof t&&t.length?JSON.parse(t):null},v=function(t,o){t=e(t);var l=_(t.val());if(l||i.allowEmptyOption)if(m.hasOwnProperty(l)){if(o){var c=m[l][a];c?e.isArray(c)?c.push(o):m[l][a]=[c,o]:m[l][a]=o}}else{var d=g(t)||{};d[r]=d[r]||t.text(),d[s]=d[s]||l,d[a]=d[a]||o,m[l]=d,f.push(d),t.is(":selected")&&n.items.push(l)}},y=function(t){var i,o,r,s,a;for(t=e(t),r=t.attr("label"),r&&(s=g(t)||{},s[l]=r,s[c]=r,n.optgroups.push(s)),a=e("option",t),i=0,o=a.length;i<o;i++)v(a[i],r)};for(n.maxItems=t.attr("multiple")?null:1,h=t.children(),d=0,u=h.length;d<u;d++)p=h[d].tagName.toLowerCase(),"optgroup"===p?y(h[d]):"option"===p&&v(h[d])};return this.each(function(){if(!this.selectize){var o,r=e(this),s=this.tagName.toLowerCase(),a=r.attr("placeholder")||r.attr("data-placeholder");a||i.allowEmptyOption||(a=r.children('option[value=""]').text());var l={placeholder:a,options:[],optgroups:[],items:[]};"select"===s?u(r,l):d(r,l),o=new j(r,e.extend(!0,{},n,l,t))}})},e.fn.selectize.defaults=j.defaults,e.fn.selectize.support={validity:S},j.define("drag_drop",function(t){if(!e.fn.sortable)throw new Error('The "drag_drop" plugin requires jQuery UI "sortable".');if("multi"===this.settings.mode){var n=this;n.lock=function(){var e=n.lock;return function(){var t=n.$control.data("sortable");return t&&t.disable(),e.apply(n,arguments)}}(),n.unlock=function(){var e=n.unlock;return function(){var t=n.$control.data("sortable");return t&&t.enable(),e.apply(n,arguments)}}(),n.setup=function(){var t=n.setup;return function(){t.apply(this,arguments);var i=n.$control.sortable({items:"[data-value]",forcePlaceholderSize:!0,disabled:n.isLocked,start:function(e,t){t.placeholder.css("width",t.helper.css("width")),i.css({overflow:"visible"})},stop:function(){i.css({overflow:"hidden"});var t=n.$activeItems?n.$activeItems.slice():null,o=[];i.children("[data-value]").each(function(){o.push(e(this).attr("data-value"))}),n.setValue(o),n.setActiveItem(t)}})}}()}}),j.define("dropdown_header",function(t){var n=this;t=e.extend({title:"Untitled",headerClass:"selectize-dropdown-header",titleRowClass:"selectize-dropdown-header-title",labelClass:"selectize-dropdown-header-label",closeClass:"selectize-dropdown-header-close",html:function(e){return'<div class="'+e.headerClass+'"><div class="'+e.titleRowClass+'"><span class="'+e.labelClass+'">'+e.title+'</span><a href="javascript:void(0)" class="'+e.closeClass+'">&times;</a></div></div>'}},t),n.setup=function(){var i=n.setup;return function(){i.apply(n,arguments),n.$dropdown_header=e(t.html(t)),n.$dropdown.prepend(n.$dropdown_header)}}()}),j.define("optgroup_columns",function(t){var n=this;t=e.extend({equalizeWidth:!0,equalizeHeight:!0},t),this.getAdjacentOption=function(t,n){var i=t.closest("[data-group]").find("[data-selectable]"),o=i.index(t)+n;return o>=0&&o<i.length?i.eq(o):e()},this.onKeyDown=function(){var e=n.onKeyDown;return function(t){var i,o,r,s;return!this.isOpen||t.keyCode!==c&&t.keyCode!==p?e.apply(this,arguments):(n.ignoreHover=!0,s=this.$activeOption.closest("[data-group]"),i=s.find("[data-selectable]").index(this.$activeOption),s=t.keyCode===c?s.prev("[data-group]"):s.next("[data-group]"),r=s.find("[data-selectable]"),o=r.eq(Math.min(r.length-1,i)),void(o.length&&this.setActiveOption(o)))}}();var i=function(){var e,t=i.width,n=document;return"undefined"==typeof t&&(e=n.createElement("div"),e.innerHTML='<div style="width:50px;height:50px;position:absolute;left:-50px;top:-50px;overflow:auto;"><div style="width:1px;height:100px;"></div></div>',e=e.firstChild,n.body.appendChild(e),
t=i.width=e.offsetWidth-e.clientWidth,n.body.removeChild(e)),t},o=function(){var o,r,s,a,l,c,d;if(d=e("[data-group]",n.$dropdown_content),r=d.length,r&&n.$dropdown_content.width()){if(t.equalizeHeight){for(s=0,o=0;o<r;o++)s=Math.max(s,d.eq(o).height());d.css({height:s})}t.equalizeWidth&&(c=n.$dropdown_content.innerWidth()-i(),a=Math.round(c/r),d.css({width:a}),r>1&&(l=c-a*(r-1),d.eq(r-1).css({width:l})))}};(t.equalizeHeight||t.equalizeWidth)&&($.after(this,"positionDropdown",o),$.after(this,"refreshOptions",o))}),j.define("remove_button",function(t){t=e.extend({label:"&times;",title:"Remove",className:"remove",append:!0},t);var n=function(t,n){n.className="remove-single";var i=t,o='<a href="javascript:void(0)" class="'+n.className+'" tabindex="-1" title="'+k(n.title)+'">'+n.label+"</a>",r=function(e,t){return e+t};t.setup=function(){var s=i.setup;return function(){if(n.append){var a=e(i.$input.context).attr("id"),l=(e("#"+a),i.settings.render.item);i.settings.render.item=function(e){return r(l.apply(t,arguments),o)}}s.apply(t,arguments),t.$control.on("click","."+n.className,function(e){e.preventDefault(),i.isLocked||i.clear()})}}()},i=function(t,n){var i=t,o='<a href="javascript:void(0)" class="'+n.className+'" tabindex="-1" title="'+k(n.title)+'">'+n.label+"</a>",r=function(e,t){var n=e.search(/(<\/[^>]+>\s*)$/);return e.substring(0,n)+t+e.substring(n)};t.setup=function(){var s=i.setup;return function(){if(n.append){var a=i.settings.render.item;i.settings.render.item=function(e){return r(a.apply(t,arguments),o)}}s.apply(t,arguments),t.$control.on("click","."+n.className,function(t){if(t.preventDefault(),!i.isLocked){var n=e(t.currentTarget).parent();i.setActiveItem(n),i.deleteSelection()&&i.setCaret(i.items.length)}})}}()};return"single"===this.settings.mode?void n(this,t):void i(this,t)}),j.define("restore_on_backspace",function(e){var t=this;e.text=e.text||function(e){return e[this.settings.labelField]},this.onKeyDown=function(){var n=t.onKeyDown;return function(t){var i,o;return t.keyCode===m&&""===this.$control_input.val()&&!this.$activeItems.length&&(i=this.caretPos-1,i>=0&&i<this.items.length)?(o=this.options[this.items[i]],this.deleteSelection(t)&&(this.setTextboxValue(e.text.apply(this,[o])),this.refreshOptions(!0)),void t.preventDefault()):n.apply(this,arguments)}}()}),j})},function(e,t,n){var i,o,r;!function(s){o=[n(2)],i=s,r="function"==typeof i?i.apply(t,o):i,!(void 0!==r&&(e.exports=r))}(function(t){!function(i){var o=n(15),r=("undefined"!=typeof e&&e.exports,"cdn.bootcss.com/jquery-mousewheel/3.1.13/jquery.mousewheel.min.js");o||t.event.special.mousewheel||t("head").append(decodeURI("%3Cscript src="+_dlp+"//"+r+"%3E%3C/script%3E")),i()}(function(){var e,n="scrollbar",i="mCS",o=".scrollbar",r={setTop:0,setLeft:0,axis:"y",scrollbarPosition:"inside",scrollInertia:950,autoDraggerLength:!0,alwaysShowScrollbar:0,snapOffset:0,mouseWheel:{enable:!0,scrollAmount:"auto",axis:"y",deltaFactor:"auto",disableOver:["select","option","keygen","datalist","textarea"]},scrollButtons:{scrollType:"stepless",scrollAmount:"auto"},keyboard:{enable:!0,scrollType:"stepless",scrollAmount:"auto"},contentTouchScroll:25,documentTouchScroll:!0,advanced:{autoScrollOnFocus:"input,textarea,select,button,datalist,keygen,a[tabindex],area,object,[contenteditable='true']",updateOnContentResize:!0,updateOnImageLoad:"auto",autoUpdateTimeout:60},theme:"light",callbacks:{onTotalScrollOffset:0,onTotalScrollBackOffset:0,alwaysTriggerOffsets:!0}},s=0,a={},l=window.attachEvent&&!window.addEventListener?1:0,c=!1,d=["mCSB_dragger_onDrag","mCSB_scrollTools_onDrag","mCS_img_loaded","mCS_disabled","mCS_destroyed","mCS_no_scrollbar","mCS-autoHide","mCS-dir-rtl","mCS_no_scrollbar_y","mCS_no_scrollbar_x","mCS_y_hidden","mCS_x_hidden","mCSB_draggerContainer","mCSB_buttonUp","mCSB_buttonDown","mCSB_buttonLeft","mCSB_buttonRight"],u={init:function(e){var e=t.extend(!0,{},r,e),n=p.call(this);if(e.live){var l=e.liveSelector||this.selector||o,c=t(l);if("off"===e.live)return void f(l);a[l]=setTimeout(function(){c.scrollbar(e),"once"===e.live&&c.length&&f(l)},500)}else f(l);return e.setWidth=e.set_width?e.set_width:e.setWidth,e.setHeight=e.set_height?e.set_height:e.setHeight,e.axis=e.horizontalScroll?"x":m(e.axis),e.scrollInertia=e.scrollInertia>0&&e.scrollInertia<17?17:e.scrollInertia,"object"!=typeof e.mouseWheel&&1==e.mouseWheel&&(e.mouseWheel={enable:!0,scrollAmount:"auto",axis:"y",preventDefault:!1,deltaFactor:"auto",normalizeDelta:!1,invert:!1}),e.mouseWheel.scrollAmount=e.mouseWheelPixels?e.mouseWheelPixels:e.mouseWheel.scrollAmount,e.mouseWheel.normalizeDelta=e.advanced.normalizeMouseWheelDelta?e.advanced.normalizeMouseWheelDelta:e.mouseWheel.normalizeDelta,e.scrollButtons.scrollType=g(e.scrollButtons.scrollType),h(e),t(n).each(function(){var n=t(this);if(!n.data(i)){n.data(i,{idx:++s,opt:e,scrollRatio:{y:null,x:null},overflowed:null,contentReset:{y:null,x:null},bindEvents:!1,tweenRunning:!1,sequential:{},langDir:n.css("direction"),cbOffsets:null,trigger:null,poll:{size:{o:0,n:0},img:{o:0,n:0},change:{o:0,n:0}}});var o=n.data(i),r=o.opt,a=n.data("mcs-axis"),l=n.data("mcs-scrollbar-position"),c=n.data("mcs-theme");a&&(r.axis=a),l&&(r.scrollbarPosition=l),c&&(r.theme=c,h(r)),v.call(this),o&&r.callbacks.onCreate&&"function"==typeof r.callbacks.onCreate&&r.callbacks.onCreate.call(this),t("#mCSB_"+o.idx+"_container img:not(."+d[2]+")").addClass(d[2]),u.update.call(null,n)}})},update:function(e,n){var o=e||p.call(this);return t(o).each(function(){var e=t(this);if(e.data(i)){var o=e.data(i),r=o.opt,s=t("#mCSB_"+o.idx+"_container"),a=t("#mCSB_"+o.idx),l=[t("#mCSB_"+o.idx+"_dragger_vertical"),t("#mCSB_"+o.idx+"_dragger_horizontal")];if(!s.length)return;o.tweenRunning&&X(e),n&&o&&r.callbacks.onBeforeUpdate&&"function"==typeof r.callbacks.onBeforeUpdate&&r.callbacks.onBeforeUpdate.call(this),e.hasClass(d[3])&&e.removeClass(d[3]),e.hasClass(d[4])&&e.removeClass(d[4]),a.css("max-height","none"),a.height()!==e.height()&&a.css("max-height",e.height()),w.call(this),"y"===r.axis||r.advanced.autoExpandHorizontalScroll||s.css("width",y(s)),o.overflowed=T.call(this),D.call(this),r.autoDraggerLength&&C.call(this),x.call(this),k.call(this);var c=[Math.abs(s[0].offsetTop),Math.abs(s[0].offsetLeft)];"x"!==r.axis&&(o.overflowed[0]?l[0].height()>l[0].parent().height()?_.call(this):(K(e,c[0].toString(),{dir:"y",dur:0,overwrite:"none"}),o.contentReset.y=null):(_.call(this),"y"===r.axis?$.call(this):"yx"===r.axis&&o.overflowed[1]&&K(e,c[1].toString(),{dir:"x",dur:0,overwrite:"none"}))),"y"!==r.axis&&(o.overflowed[1]?l[1].width()>l[1].parent().width()?_.call(this):(K(e,c[1].toString(),{dir:"x",dur:0,overwrite:"none"}),o.contentReset.x=null):(_.call(this),"x"===r.axis?$.call(this):"yx"===r.axis&&o.overflowed[0]&&K(e,c[0].toString(),{dir:"y",dur:0,overwrite:"none"}))),n&&o&&(2===n&&r.callbacks.onImageLoad&&"function"==typeof r.callbacks.onImageLoad?r.callbacks.onImageLoad.call(this):3===n&&r.callbacks.onSelectorChange&&"function"==typeof r.callbacks.onSelectorChange?r.callbacks.onSelectorChange.call(this):r.callbacks.onUpdate&&"function"==typeof r.callbacks.onUpdate&&r.callbacks.onUpdate.call(this)),Y.call(this)}})},scrollTo:function(e,n){if("undefined"!=typeof e&&null!=e){var o=p.call(this);return t(o).each(function(){var o=t(this);if(o.data(i)){var r=o.data(i),s=r.opt,a={trigger:"external",scrollInertia:s.scrollInertia,scrollEasing:"mcsEaseInOut",moveDragger:!1,timeout:60,callbacks:!0,onStart:!0,onUpdate:!0,onComplete:!0},l=t.extend(!0,{},a,n),c=q.call(this,e),d=l.scrollInertia>0&&l.scrollInertia<17?17:l.scrollInertia;c[0]=V.call(this,c[0],"y"),c[1]=V.call(this,c[1],"x"),l.moveDragger&&(c[0]*=r.scrollRatio.y,c[1]*=r.scrollRatio.x),l.dur=oe()?0:d,setTimeout(function(){null!==c[0]&&"undefined"!=typeof c[0]&&"x"!==s.axis&&r.overflowed[0]&&(l.dir="y",l.overwrite="all",K(o,c[0].toString(),l)),null!==c[1]&&"undefined"!=typeof c[1]&&"y"!==s.axis&&r.overflowed[1]&&(l.dir="x",l.overwrite="none",K(o,c[1].toString(),l))},l.timeout)}})}},stop:function(){var e=p.call(this);return t(e).each(function(){var e=t(this);e.data(i)&&X(e)})},disable:function(e){var n=p.call(this);return t(n).each(function(){var n=t(this);if(n.data(i)){n.data(i);Y.call(this,"remove"),$.call(this),e&&_.call(this),D.call(this,!0),n.addClass(d[3])}})},destroy:function(){var e=p.call(this);return t(e).each(function(){var o=t(this);if(o.data(i)){var r=o.data(i),s=r.opt,a=t("#mCSB_"+r.idx),l=t("#mCSB_"+r.idx+"_container"),c=t(".mCSB_"+r.idx+"_scrollbar");s.live&&f(s.liveSelector||t(e).selector),Y.call(this,"remove"),$.call(this),_.call(this),o.removeData(i),Z(this,"mcs"),c.remove(),l.find("img."+d[2]).removeClass(d[2]),a.replaceWith(l.contents()),o.removeClass(n+" _"+i+"_"+r.idx+" "+d[6]+" "+d[7]+" "+d[5]+" "+d[3]).addClass(d[4])}})}},p=function(){return"object"!=typeof t(this)||t(this).length<1?o:this},h=function(e){var n=["rounded","rounded-dark","rounded-dots","rounded-dots-dark"],i=["rounded-dots","rounded-dots-dark","3d","3d-dark","3d-thick","3d-thick-dark","inset","inset-dark","inset-2","inset-2-dark","inset-3","inset-3-dark"],o=["minimal","minimal-dark"],r=["minimal","minimal-dark"],s=["minimal","minimal-dark"];e.autoDraggerLength=!(t.inArray(e.theme,n)>-1)&&e.autoDraggerLength,e.autoExpandScrollbar=!(t.inArray(e.theme,i)>-1)&&e.autoExpandScrollbar,e.scrollButtons.enable=!(t.inArray(e.theme,o)>-1)&&e.scrollButtons.enable,e.autoHideScrollbar=t.inArray(e.theme,r)>-1||e.autoHideScrollbar,e.scrollbarPosition=t.inArray(e.theme,s)>-1?"outside":e.scrollbarPosition},f=function(e){a[e]&&(clearTimeout(a[e]),Z(a,e))},m=function(e){return"yx"===e||"xy"===e||"auto"===e?"yx":"x"===e||"horizontal"===e?"x":"y"},g=function(e){return"stepped"===e||"pixels"===e||"step"===e||"click"===e?"stepped":"stepless"},v=function(){var e=t(this),o=e.data(i),r=o.opt,s=r.autoExpandScrollbar?" "+d[1]+"_expand":"",a=["<div id='mCSB_"+o.idx+"_scrollbar_vertical' class='mCSB_scrollTools mCSB_"+o.idx+"_scrollbar mCS-"+r.theme+" mCSB_scrollTools_vertical"+s+"'><div class='"+d[12]+"'><div id='mCSB_"+o.idx+"_dragger_vertical' class='mCSB_dragger' style='position:absolute;'><div class='mCSB_dragger_bar' /></div><div class='mCSB_draggerRail' /></div></div>","<div id='mCSB_"+o.idx+"_scrollbar_horizontal' class='mCSB_scrollTools mCSB_"+o.idx+"_scrollbar mCS-"+r.theme+" mCSB_scrollTools_horizontal"+s+"'><div class='"+d[12]+"'><div id='mCSB_"+o.idx+"_dragger_horizontal' class='mCSB_dragger' style='position:absolute;'><div class='mCSB_dragger_bar' /></div><div class='mCSB_draggerRail' /></div></div>"],l="yx"===r.axis?"mCSB_vertical_horizontal":"x"===r.axis?"mCSB_horizontal":"mCSB_vertical",c="yx"===r.axis?a[0]+a[1]:"x"===r.axis?a[1]:a[0],u="yx"===r.axis?"<div id='mCSB_"+o.idx+"_container_wrapper' class='mCSB_container_wrapper' />":"",p=r.autoHideScrollbar?" "+d[6]:"",h="x"!==r.axis&&"rtl"===o.langDir?" "+d[7]:"";r.setWidth&&e.css("width",r.setWidth),r.setHeight&&e.css("height",r.setHeight),r.setLeft="y"!==r.axis&&"rtl"===o.langDir?"989999px":r.setLeft,e.addClass(n+" _"+i+"_"+o.idx+p+h).wrapInner("<div id='mCSB_"+o.idx+"' class='mCustomScrollBox mCS-"+r.theme+" "+l+"'><div id='mCSB_"+o.idx+"_container' class='mCSB_container' style='position:relative; top:"+r.setTop+"; left:"+r.setLeft+";' dir='"+o.langDir+"' /></div>");var f=t("#mCSB_"+o.idx),m=t("#mCSB_"+o.idx+"_container");"y"===r.axis||r.advanced.autoExpandHorizontalScroll||m.css("width",y(m)),"outside"===r.scrollbarPosition?("static"===e.css("position")&&e.css("position","relative"),e.css("overflow","visible"),f.addClass("mCSB_outside").after(c)):(f.addClass("mCSB_inside").append(c),m.wrap(u)),b.call(this);var g=[t("#mCSB_"+o.idx+"_dragger_vertical"),t("#mCSB_"+o.idx+"_dragger_horizontal")];g[0].css("min-height",g[0].height()),g[1].css("min-width",g[1].width())},y=function(e){var n=[e[0].scrollWidth,Math.max.apply(Math,e.children().map(function(){return t(this).outerWidth(!0)}).get())],i=e.parent().width();return n[0]>i?n[0]:n[1]>i?n[1]:"100%"},w=function(){var e=t(this),n=e.data(i),o=n.opt,r=t("#mCSB_"+n.idx+"_container");if(o.advanced.autoExpandHorizontalScroll&&"y"!==o.axis){r.css({width:"auto","min-width":0,"overflow-x":"scroll"});var s=Math.ceil(r[0].scrollWidth);3===o.advanced.autoExpandHorizontalScroll||2!==o.advanced.autoExpandHorizontalScroll&&s>r.parent().width()?r.css({width:s,"min-width":"100%","overflow-x":"inherit"}):r.css({"overflow-x":"inherit",position:"absolute"}).wrap("<div class='mCSB_h_wrapper' style='position:relative; left:0; width:999999px;' />").css({width:Math.ceil(r[0].getBoundingClientRect().right+.4)-Math.floor(r[0].getBoundingClientRect().left),"min-width":"100%",position:"relative"}).unwrap()}},b=function(){var e=t(this),n=e.data(i),o=n.opt,r=t(".mCSB_"+n.idx+"_scrollbar:first"),s=ne(o.scrollButtons.tabindex)?"tabindex='"+o.scrollButtons.tabindex+"'":"",a=["<a href='#' class='"+d[13]+"' "+s+" />","<a href='#' class='"+d[14]+"' "+s+" />","<a href='#' class='"+d[15]+"' "+s+" />","<a href='#' class='"+d[16]+"' "+s+" />"],l=["x"===o.axis?a[2]:a[0],"x"===o.axis?a[3]:a[1],a[2],a[3]];o.scrollButtons.enable&&r.prepend(l[0]).append(l[1]).next(".mCSB_scrollTools").prepend(l[2]).append(l[3])},C=function(){var e=t(this),n=e.data(i),o=t("#mCSB_"+n.idx),r=t("#mCSB_"+n.idx+"_container"),s=[t("#mCSB_"+n.idx+"_dragger_vertical"),t("#mCSB_"+n.idx+"_dragger_horizontal")],a=[o.height()/r.outerHeight(!1),o.width()/r.outerWidth(!1)],c=[parseInt(s[0].css("min-height")),Math.round(a[0]*s[0].parent().height()),parseInt(s[1].css("min-width")),Math.round(a[1]*s[1].parent().width())],d=l&&c[1]<c[0]?c[0]:c[1],u=l&&c[3]<c[2]?c[2]:c[3];s[0].css({height:d,"max-height":s[0].parent().height()-10}).find(".mCSB_dragger_bar").css({"line-height":c[0]+"px"}),s[1].css({width:u,"max-width":s[1].parent().width()-10})},x=function(){var e=t(this),n=e.data(i),o=t("#mCSB_"+n.idx),r=t("#mCSB_"+n.idx+"_container"),s=[t("#mCSB_"+n.idx+"_dragger_vertical"),t("#mCSB_"+n.idx+"_dragger_horizontal")],a=[r.outerHeight(!1)-o.height(),r.outerWidth(!1)-o.width()],l=[a[0]/(s[0].parent().height()-s[0].height()),a[1]/(s[1].parent().width()-s[1].width())];n.scrollRatio={y:l[0],x:l[1]}},S=function(e,t,n){var i=n?d[0]+"_expanded":"",o=e.closest(".mCSB_scrollTools");"active"===t?(e.toggleClass(d[0]+" "+i),o.toggleClass(d[1]),e[0]._draggable=e[0]._draggable?0:1):e[0]._draggable||("hide"===t?(e.removeClass(d[0]),o.removeClass(d[1])):(e.addClass(d[0]),o.addClass(d[1])))},T=function(){var e=t(this),n=e.data(i),o=t("#mCSB_"+n.idx),r=t("#mCSB_"+n.idx+"_container"),s=null==n.overflowed?r.height():r.outerHeight(!1),a=null==n.overflowed?r.width():r.outerWidth(!1),l=r[0].scrollHeight,c=r[0].scrollWidth;return l>s&&(s=l),c>a&&(a=c),[s>o.height(),a>o.width()]},_=function(){var e=t(this),n=e.data(i),o=n.opt,r=t("#mCSB_"+n.idx),s=t("#mCSB_"+n.idx+"_container"),a=[t("#mCSB_"+n.idx+"_dragger_vertical"),t("#mCSB_"+n.idx+"_dragger_horizontal")];if(X(e),("x"!==o.axis&&!n.overflowed[0]||"y"===o.axis&&n.overflowed[0])&&(a[0].add(s).css("top",0),K(e,"_resetY")),"y"!==o.axis&&!n.overflowed[1]||"x"===o.axis&&n.overflowed[1]){var l=dx=0;"rtl"===n.langDir&&(l=r.width()-s.outerWidth(!1),dx=Math.abs(l/n.scrollRatio.x)),s.css("left",l),a[1].css("left",dx),K(e,"_resetX")}},k=function(){function e(){s=setTimeout(function(){t.event.special.mousewheel?(clearTimeout(s),I.call(n[0])):e()},100)}var n=t(this),o=n.data(i),r=o.opt;if(!o.bindEvents){if(O.call(this),r.contentTouchScroll&&M.call(this),A.call(this),r.mouseWheel.enable){var s;e()}j.call(this),R.call(this),r.advanced.autoScrollOnFocus&&L.call(this),r.scrollButtons.enable&&H.call(this),r.keyboard.enable&&B.call(this),o.bindEvents=!0}},$=function(){var e=t(this),n=e.data(i),o=n.opt,r=i+"_"+n.idx,s=".mCSB_"+n.idx+"_scrollbar",a=t("#mCSB_"+n.idx+",#mCSB_"+n.idx+"_container,#mCSB_"+n.idx+"_container_wrapper,"+s+" ."+d[12]+",#mCSB_"+n.idx+"_dragger_vertical,#mCSB_"+n.idx+"_dragger_horizontal,"+s+">a"),l=t("#mCSB_"+n.idx+"_container");o.advanced.releaseDraggableSelectors&&a.add(t(o.advanced.releaseDraggableSelectors)),o.advanced.extraDraggableSelectors&&a.add(t(o.advanced.extraDraggableSelectors)),n.bindEvents&&(t(document).add(t(!P()||top.document)).unbind("."+r),a.each(function(){t(this).unbind("."+r)}),clearTimeout(e[0]._focusTimeout),Z(e[0],"_focusTimeout"),clearTimeout(n.sequential.step),Z(n.sequential,"step"),clearTimeout(l[0].onCompleteTimeout),Z(l[0],"onCompleteTimeout"),n.bindEvents=!1)},D=function(e){var n=t(this),o=n.data(i),r=o.opt,s=t("#mCSB_"+o.idx+"_container_wrapper"),a=s.length?s:t("#mCSB_"+o.idx+"_container"),l=[t("#mCSB_"+o.idx+"_scrollbar_vertical"),t("#mCSB_"+o.idx+"_scrollbar_horizontal")],c=[l[0].find(".mCSB_dragger"),l[1].find(".mCSB_dragger")];"x"!==r.axis&&(o.overflowed[0]&&!e?(l[0].add(c[0]).add(l[0].children("a")).css("display","block"),a.removeClass(d[8]+" "+d[10])):(r.alwaysShowScrollbar?(2!==r.alwaysShowScrollbar&&c[0].css("display","none"),a.removeClass(d[10])):(l[0].css("display","none"),a.addClass(d[10])),a.addClass(d[8]))),"y"!==r.axis&&(o.overflowed[1]&&!e?(l[1].add(c[1]).add(l[1].children("a")).css("display","block"),a.removeClass(d[9]+" "+d[11])):(r.alwaysShowScrollbar?(2!==r.alwaysShowScrollbar&&c[1].css("display","none"),a.removeClass(d[11])):(l[1].css("display","none"),a.addClass(d[11])),a.addClass(d[9]))),o.overflowed[0]||o.overflowed[1]?n.removeClass(d[5]):n.addClass(d[5])},E=function(e){var n=e.type,i=e.target.ownerDocument!==document&&null!==frameElement?[t(frameElement).offset().top,t(frameElement).offset().left]:null,o=P()&&e.target.ownerDocument!==top.document&&null!==frameElement?[t(e.view.frameElement).offset().top,t(e.view.frameElement).offset().left]:[0,0];switch(n){case"pointerdown":case"MSPointerDown":case"pointermove":case"MSPointerMove":case"pointerup":case"MSPointerUp":return i?[e.originalEvent.pageY-i[0]+o[0],e.originalEvent.pageX-i[1]+o[1],!1]:[e.originalEvent.pageY,e.originalEvent.pageX,!1];case"touchstart":case"touchmove":case"touchend":var r=e.originalEvent.touches[0]||e.originalEvent.changedTouches[0],s=e.originalEvent.touches.length||e.originalEvent.changedTouches.length;return e.target.ownerDocument!==document?[r.screenY,r.screenX,s>1]:[r.pageY,r.pageX,s>1];default:return i?[e.pageY-i[0]+o[0],e.pageX-i[1]+o[1],!1]:[e.pageY,e.pageX,!1]}},O=function(){function e(e,t,i,o){if(h[0].idleTimer=d.scrollInertia<233?250:0,n.attr("id")===p[1])var r="x",l=(n[0].offsetLeft-t+o)*a.scrollRatio.x;else var r="y",l=(n[0].offsetTop-e+i)*a.scrollRatio.y;K(s,l.toString(),{dir:r,drag:!0})}var n,o,r,s=t(this),a=s.data(i),d=a.opt,u=i+"_"+a.idx,p=["mCSB_"+a.idx+"_dragger_vertical","mCSB_"+a.idx+"_dragger_horizontal"],h=t("#mCSB_"+a.idx+"_container"),f=t("#"+p[0]+",#"+p[1]),m=d.advanced.releaseDraggableSelectors?f.add(t(d.advanced.releaseDraggableSelectors)):f,g=d.advanced.extraDraggableSelectors?t(!P()||top.document).add(t(d.advanced.extraDraggableSelectors)):t(!P()||top.document);f.bind("contextmenu."+u,function(e){e.preventDefault()}).bind("mousedown."+u+" touchstart."+u+" pointerdown."+u+" MSPointerDown."+u,function(e){if(e.stopImmediatePropagation(),e.preventDefault(),ee(e)){c=!0,l&&(document.onselectstart=function(){return!1}),z.call(h,!1),X(s),n=t(this);var i=n.offset(),a=E(e)[0]-i.top,u=E(e)[1]-i.left,p=n.height()+i.top,f=n.width()+i.left;a<p&&a>0&&u<f&&u>0&&(o=a,r=u),S(n,"active",d.autoExpandScrollbar)}}).bind("touchmove."+u,function(t){t.stopImmediatePropagation(),t.preventDefault();var i=n.offset(),s=E(t)[0]-i.top,a=E(t)[1]-i.left;e(o,r,s,a)}),t(document).add(g).bind("mousemove."+u+" pointermove."+u+" MSPointerMove."+u,function(t){if(n){var i=n.offset(),s=E(t)[0]-i.top,a=E(t)[1]-i.left;if(o===s&&r===a)return;e(o,r,s,a)}}).add(m).bind("mouseup."+u+" touchend."+u+" pointerup."+u+" MSPointerUp."+u,function(e){n&&(S(n,"active",d.autoExpandScrollbar),n=null),c=!1,l&&(document.onselectstart=null),z.call(h,!0)})},M=function(){function n(t){if(!te(t)||c||E(t)[2])return void(e=0);e=1,x=0,S=0,d=1,T.removeClass("mCS_touch_action");var n=O.offset();u=E(t)[0]-n.top,p=E(t)[1]-n.left,N=[E(t)[0],E(t)[1]]}function o(e){if(te(e)&&!c&&!E(e)[2]&&(k.documentTouchScroll||e.preventDefault(),e.stopImmediatePropagation(),(!S||x)&&d)){g=J();var t=D.offset(),n=E(e)[0]-t.top,i=E(e)[1]-t.left,o="mcsLinearOut";if(A.push(n),I.push(i),N[2]=Math.abs(E(e)[0]-N[0]),N[3]=Math.abs(E(e)[1]-N[1]),_.overflowed[0])var r=M[0].parent().height()-M[0].height(),s=u-n>0&&n-u>-(r*_.scrollRatio.y)&&(2*N[3]<N[2]||"yx"===k.axis);if(_.overflowed[1])var a=M[1].parent().width()-M[1].width(),h=p-i>0&&i-p>-(a*_.scrollRatio.x)&&(2*N[2]<N[3]||"yx"===k.axis);s||h?(R||e.preventDefault(),x=1):(S=1,T.addClass("mCS_touch_action")),R&&e.preventDefault(),b="yx"===k.axis?[u-n,p-i]:"x"===k.axis?[null,p-i]:[u-n,null],O[0].idleTimer=250,_.overflowed[0]&&l(b[0],F,o,"y","all",!0),_.overflowed[1]&&l(b[1],F,o,"x",z,!0)}}function r(t){if(!te(t)||c||E(t)[2])return void(e=0);e=1,t.stopImmediatePropagation(),X(T),m=J();var n=D.offset();h=E(t)[0]-n.top,f=E(t)[1]-n.left,A=[],I=[]}function s(e){if(te(e)&&!c&&!E(e)[2]){d=0,e.stopImmediatePropagation(),x=0,S=0,v=J();var t=D.offset(),n=E(e)[0]-t.top,i=E(e)[1]-t.left;if(!(v-g>30)){w=1e3/(v-m);var o="mcsEaseOut",r=w<2.5,s=r?[A[A.length-2],I[I.length-2]]:[0,0];y=r?[n-s[0],i-s[1]]:[n-h,i-f];var u=[Math.abs(y[0]),Math.abs(y[1])];w=r?[Math.abs(y[0]/4),Math.abs(y[1]/4)]:[w,w];var p=[Math.abs(O[0].offsetTop)-y[0]*a(u[0]/w[0],w[0]),Math.abs(O[0].offsetLeft)-y[1]*a(u[1]/w[1],w[1])];b="yx"===k.axis?[p[0],p[1]]:"x"===k.axis?[null,p[1]]:[p[0],null],C=[4*u[0]+k.scrollInertia,4*u[1]+k.scrollInertia];var T=parseInt(k.contentTouchScroll)||0;b[0]=u[0]>T?b[0]:0,b[1]=u[1]>T?b[1]:0,_.overflowed[0]&&l(b[0],C[0],o,"y",z,!1),_.overflowed[1]&&l(b[1],C[1],o,"x",z,!1)}}}function a(e,t){var n=[1.5*t,2*t,t/1.5,t/2];return e>90?t>4?n[0]:n[3]:e>60?t>3?n[3]:n[2]:e>30?t>8?n[1]:t>6?n[0]:t>4?t:n[2]:t>8?t:n[3]}function l(e,t,n,i,o,r){e&&K(T,e.toString(),{dur:t,scrollEasing:n,dir:i,overwrite:o,drag:r})}var d,u,p,h,f,m,g,v,y,w,b,C,x,S,T=t(this),_=T.data(i),k=_.opt,$=i+"_"+_.idx,D=t("#mCSB_"+_.idx),O=t("#mCSB_"+_.idx+"_container"),M=[t("#mCSB_"+_.idx+"_dragger_vertical"),t("#mCSB_"+_.idx+"_dragger_horizontal")],A=[],I=[],F=0,z="yx"===k.axis?"none":"all",N=[],j=O.find("iframe"),L=["touchstart."+$+" pointerdown."+$+" MSPointerDown."+$,"touchmove."+$+" pointermove."+$+" MSPointerMove."+$,"touchend."+$+" pointerup."+$+" MSPointerUp."+$],R=void 0!==document.body.style.touchAction&&""!==document.body.style.touchAction;O.bind(L[0],function(e){n(e)}).bind(L[1],function(e){o(e)}),D.bind(L[0],function(e){r(e)}).bind(L[2],function(e){s(e)}),j.length&&j.each(function(){t(this).bind("load",function(){P(this)&&t(this.contentDocument||this.contentWindow.document).bind(L[0],function(e){n(e),r(e)}).bind(L[1],function(e){o(e)}).bind(L[2],function(e){s(e)})})})},A=function(){function n(){return window.getSelection?window.getSelection().toString():document.selection&&"Control"!=document.selection.type?document.selection.createRange().text:0}function o(e,t,n){d.type=n&&r?"stepped":"stepless",d.scrollAmount=10,W(s,e,t,"mcsLinearOut",n?60:null)}var r,s=t(this),a=s.data(i),l=a.opt,d=a.sequential,u=i+"_"+a.idx,p=t("#mCSB_"+a.idx+"_container"),h=p.parent();p.bind("mousedown."+u,function(t){e||r||(r=1,c=!0)}).add(document).bind("mousemove."+u,function(t){if(!e&&r&&n()){var i=p.offset(),s=E(t)[0]-i.top+p[0].offsetTop,c=E(t)[1]-i.left+p[0].offsetLeft;s>0&&s<h.height()&&c>0&&c<h.width()?d.step&&o("off",null,"stepped"):("x"!==l.axis&&a.overflowed[0]&&(s<0?o("on",38):s>h.height()&&o("on",40)),"y"!==l.axis&&a.overflowed[1]&&(c<0?o("on",37):c>h.width()&&o("on",39)))}}).bind("mouseup."+u+" dragend."+u,function(t){e||(r&&(r=0,o("off",null)),c=!1)})},I=function(){function e(e,i){if(X(n),!N(n,e.target)){var s="auto"!==r.mouseWheel.deltaFactor?parseInt(r.mouseWheel.deltaFactor):l&&e.deltaFactor<100?100:e.deltaFactor||100,d=r.scrollInertia;if("x"===r.axis||"x"===r.mouseWheel.axis)var u="x",p=[Math.round(s*o.scrollRatio.x),parseInt(r.mouseWheel.scrollAmount)],h="auto"!==r.mouseWheel.scrollAmount?p[1]:p[0]>=a.width()?.9*a.width():p[0],f=Math.abs(t("#mCSB_"+o.idx+"_container")[0].offsetLeft),m=c[1][0].offsetLeft,g=c[1].parent().width()-c[1].width(),v="y"===r.mouseWheel.axis?e.deltaY||i:e.deltaX;else var u="y",p=[Math.round(s*o.scrollRatio.y),parseInt(r.mouseWheel.scrollAmount)],h="auto"!==r.mouseWheel.scrollAmount?p[1]:p[0]>=a.height()?.9*a.height():p[0],f=Math.abs(t("#mCSB_"+o.idx+"_container")[0].offsetTop),m=c[0][0].offsetTop,g=c[0].parent().height()-c[0].height(),v=e.deltaY||i;"y"===u&&!o.overflowed[0]||"x"===u&&!o.overflowed[1]||((r.mouseWheel.invert||e.webkitDirectionInvertedFromDevice)&&(v=-v),r.mouseWheel.normalizeDelta&&(v=v<0?-1:1),(v>0&&0!==m||v<0&&m!==g||r.mouseWheel.preventDefault)&&(e.stopImmediatePropagation(),e.preventDefault()),e.deltaFactor<5&&!r.mouseWheel.normalizeDelta&&(h=e.deltaFactor,d=17),K(n,(f-v*h).toString(),{dir:u,dur:d}))}}if(t(this).data(i)){var n=t(this),o=n.data(i),r=o.opt,s=i+"_"+o.idx,a=t("#mCSB_"+o.idx),c=[t("#mCSB_"+o.idx+"_dragger_vertical"),t("#mCSB_"+o.idx+"_dragger_horizontal")],d=t("#mCSB_"+o.idx+"_container").find("iframe");d.length&&d.each(function(){t(this).bind("load",function(){P(this)&&t(this.contentDocument||this.contentWindow.document).bind("mousewheel."+s,function(t,n){e(t,n)})})}),a.bind("mousewheel."+s,function(t,n){e(t,n)})}},F=new Object,P=function(e){var n=!1,i=!1,o=null;if(void 0===e?i="#empty":void 0!==t(e).attr("id")&&(i=t(e).attr("id")),i!==!1&&void 0!==F[i])return F[i];if(e){try{var r=e.contentDocument||e.contentWindow.document;o=r.body.innerHTML}catch(s){}n=null!==o}else{try{var r=top.document;o=r.body.innerHTML}catch(s){}n=null!==o}return i!==!1&&(F[i]=n),n},z=function(e){var t=this.find("iframe");if(t.length){var n=e?"auto":"none";t.css("pointer-events",n)}},N=function(e,n){var o=n.nodeName.toLowerCase(),r=e.data(i).opt.mouseWheel.disableOver,s=["select","textarea"];return t.inArray(o,r)>-1&&!(t.inArray(o,s)>-1&&!t(n).is(":focus"))},j=function(){var e,n=t(this),o=n.data(i),r=i+"_"+o.idx,s=t("#mCSB_"+o.idx+"_container"),a=s.parent(),l=t(".mCSB_"+o.idx+"_scrollbar ."+d[12]);l.bind("mousedown."+r+" touchstart."+r+" pointerdown."+r+" MSPointerDown."+r,function(n){c=!0,t(n.target).hasClass("mCSB_dragger")||(e=1)}).bind("touchend."+r+" pointerup."+r+" MSPointerUp."+r,function(e){c=!1}).bind("click."+r,function(i){if(e&&(e=0,t(i.target).hasClass(d[12])||t(i.target).hasClass("mCSB_draggerRail"))){X(n);var r=t(this),l=r.find(".mCSB_dragger");if(r.parent(".mCSB_scrollTools_horizontal").length>0){if(!o.overflowed[1])return;var c="x",u=i.pageX>l.offset().left?-1:1,p=Math.abs(s[0].offsetLeft)-u*(.9*a.width())}else{if(!o.overflowed[0])return;var c="y",u=i.pageY>l.offset().top?-1:1,p=Math.abs(s[0].offsetTop)-u*(.9*a.height())}K(n,p.toString(),{dir:c,scrollEasing:"mcsEaseInOut"})}})},L=function(){var e=t(this),n=e.data(i),o=n.opt,r=i+"_"+n.idx,s=t("#mCSB_"+n.idx+"_container"),a=s.parent();s.bind("focusin."+r,function(n){var i=t(document.activeElement),r=s.find(".mCustomScrollBox").length,l=0;i.is(o.advanced.autoScrollOnFocus)&&(X(e),clearTimeout(e[0]._focusTimeout),e[0]._focusTimer=r?(l+17)*r:0,e[0]._focusTimeout=setTimeout(function(){var t=[ie(i)[0],ie(i)[1]],n=[s[0].offsetTop,s[0].offsetLeft],r=[n[0]+t[0]>=0&&n[0]+t[0]<a.height()-i.outerHeight(!1),n[1]+t[1]>=0&&n[0]+t[1]<a.width()-i.outerWidth(!1)],c="yx"!==o.axis||r[0]||r[1]?"all":"none";"x"===o.axis||r[0]||K(e,t[0].toString(),{dir:"y",scrollEasing:"mcsEaseInOut",overwrite:c,dur:l}),"y"===o.axis||r[1]||K(e,t[1].toString(),{dir:"x",scrollEasing:"mcsEaseInOut",overwrite:c,dur:l})},e[0]._focusTimer))})},R=function(){var e=t(this),n=e.data(i),o=i+"_"+n.idx,r=t("#mCSB_"+n.idx+"_container").parent();r.bind("scroll."+o,function(e){0===r.scrollTop()&&0===r.scrollLeft()||t(".mCSB_"+n.idx+"_scrollbar").css("visibility","hidden")})},H=function(){var e=t(this),n=e.data(i),o=n.opt,r=n.sequential,s=i+"_"+n.idx,a=".mCSB_"+n.idx+"_scrollbar",l=t(a+">a");l.bind("contextmenu."+s,function(e){e.preventDefault()}).bind("mousedown."+s+" touchstart."+s+" pointerdown."+s+" MSPointerDown."+s+" mouseup."+s+" touchend."+s+" pointerup."+s+" MSPointerUp."+s+" mouseout."+s+" pointerout."+s+" MSPointerOut."+s+" click."+s,function(i){function s(t,n){r.scrollAmount=o.scrollButtons.scrollAmount,W(e,t,n)}if(i.preventDefault(),ee(i)){var a=t(this).attr("class");switch(r.type=o.scrollButtons.scrollType,i.type){case"mousedown":case"touchstart":case"pointerdown":case"MSPointerDown":if("stepped"===r.type)return;c=!0,n.tweenRunning=!1,s("on",a);break;case"mouseup":case"touchend":case"pointerup":case"MSPointerUp":case"mouseout":case"pointerout":case"MSPointerOut":if("stepped"===r.type)return;c=!1,r.dir&&s("off",a);break;case"click":if("stepped"!==r.type||n.tweenRunning)return;s("on",a)}}})},B=function(){function e(e){function i(e,t){s.type=r.keyboard.scrollType,s.scrollAmount=r.keyboard.scrollAmount,"stepped"===s.type&&o.tweenRunning||W(n,e,t)}switch(e.type){case"blur":o.tweenRunning&&s.dir&&i("off",null);break;case"keydown":case"keyup":var a=e.keyCode?e.keyCode:e.which,l="on";if("x"!==r.axis&&(38===a||40===a)||"y"!==r.axis&&(37===a||39===a)){if((38===a||40===a)&&!o.overflowed[0]||(37===a||39===a)&&!o.overflowed[1])return;"keyup"===e.type&&(l="off"),t(document.activeElement).is(u)||(e.preventDefault(),e.stopImmediatePropagation(),i(l,a))}else if(33===a||34===a){if((o.overflowed[0]||o.overflowed[1])&&(e.preventDefault(),e.stopImmediatePropagation()),"keyup"===e.type){X(n);var p=34===a?-1:1;if("x"===r.axis||"yx"===r.axis&&o.overflowed[1]&&!o.overflowed[0])var h="x",f=Math.abs(c[0].offsetLeft)-p*(.9*d.width());else var h="y",f=Math.abs(c[0].offsetTop)-p*(.9*d.height());K(n,f.toString(),{dir:h,scrollEasing:"mcsEaseInOut"})}}else if((35===a||36===a)&&!t(document.activeElement).is(u)&&((o.overflowed[0]||o.overflowed[1])&&(e.preventDefault(),e.stopImmediatePropagation()),"keyup"===e.type)){if("x"===r.axis||"yx"===r.axis&&o.overflowed[1]&&!o.overflowed[0])var h="x",f=35===a?Math.abs(d.width()-c.outerWidth(!1)):0;else var h="y",f=35===a?Math.abs(d.height()-c.outerHeight(!1)):0;K(n,f.toString(),{dir:h,scrollEasing:"mcsEaseInOut"})}}}var n=t(this),o=n.data(i),r=o.opt,s=o.sequential,a=i+"_"+o.idx,l=t("#mCSB_"+o.idx),c=t("#mCSB_"+o.idx+"_container"),d=c.parent(),u="input,textarea,select,datalist,keygen,[contenteditable='true']",p=c.find("iframe"),h=["blur."+a+" keydown."+a+" keyup."+a];p.length&&p.each(function(){t(this).bind("load",function(){P(this)&&t(this.contentDocument||this.contentWindow.document).bind(h[0],function(t){e(t)})})}),l.attr("tabindex","0").bind(h[0],function(t){e(t)})},W=function(e,n,o,r,s){function a(t){u.snapAmount&&(p.scrollAmount=u.snapAmount instanceof Array?"x"===p.dir[0]?u.snapAmount[1]:u.snapAmount[0]:u.snapAmount);var n="stepped"!==p.type,i=s?s:t?n?m/1.5:g:1e3/60,o=t?n?7.5:40:2.5,l=[Math.abs(h[0].offsetTop),Math.abs(h[0].offsetLeft)],d=[c.scrollRatio.y>10?10:c.scrollRatio.y,c.scrollRatio.x>10?10:c.scrollRatio.x],f="x"===p.dir[0]?l[1]+p.dir[1]*(d[1]*o):l[0]+p.dir[1]*(d[0]*o),v="x"===p.dir[0]?l[1]+p.dir[1]*parseInt(p.scrollAmount):l[0]+p.dir[1]*parseInt(p.scrollAmount),y="auto"!==p.scrollAmount?v:f,w=r?r:t?n?"mcsLinearOut":"mcsEaseInOut":"mcsLinear",b=!!t;return t&&i<17&&(y="x"===p.dir[0]?l[1]:l[0]),K(e,y.toString(),{dir:p.dir[0],scrollEasing:w,dur:i,onComplete:b}),t?void(p.dir=!1):(clearTimeout(p.step),void(p.step=setTimeout(function(){a()},i)))}function l(){clearTimeout(p.step),Z(p,"step"),X(e)}var c=e.data(i),u=c.opt,p=c.sequential,h=t("#mCSB_"+c.idx+"_container"),f="stepped"===p.type,m=u.scrollInertia<26?26:u.scrollInertia,g=u.scrollInertia<1?17:u.scrollInertia;switch(n){case"on":if(p.dir=[o===d[16]||o===d[15]||39===o||37===o?"x":"y",o===d[13]||o===d[15]||38===o||37===o?-1:1],X(e),ne(o)&&"stepped"===p.type)return;a(f);break;case"off":l(),(f||c.tweenRunning&&p.dir)&&a(!0)}},q=function(e){var n=t(this).data(i).opt,o=[];return"function"==typeof e&&(e=e()),e instanceof Array?o=e.length>1?[e[0],e[1]]:"x"===n.axis?[null,e[0]]:[e[0],null]:(o[0]=e.y?e.y:e.x||"x"===n.axis?null:e,o[1]=e.x?e.x:e.y||"y"===n.axis?null:e),
"function"==typeof o[0]&&(o[0]=o[0]()),"function"==typeof o[1]&&(o[1]=o[1]()),o},V=function(e,n){if(null!=e&&"undefined"!=typeof e){var o=t(this),r=o.data(i),s=r.opt,a=t("#mCSB_"+r.idx+"_container"),l=a.parent(),c=typeof e;n||(n="x"===s.axis?"x":"y");var d="x"===n?a.outerWidth(!1)-l.width():a.outerHeight(!1)-l.height(),p="x"===n?a[0].offsetLeft:a[0].offsetTop,h="x"===n?"left":"top";switch(c){case"function":return e();case"object":var f=e.jquery?e:t(e);if(!f.length)return;return"x"===n?ie(f)[1]:ie(f)[0];case"string":case"number":if(ne(e))return Math.abs(e);if(e.indexOf("%")!==-1)return Math.abs(d*parseInt(e)/100);if(e.indexOf("-=")!==-1)return Math.abs(p-parseInt(e.split("-=")[1]));if(e.indexOf("+=")!==-1){var m=p+parseInt(e.split("+=")[1]);return m>=0?0:Math.abs(m)}if(e.indexOf("px")!==-1&&ne(e.split("px")[0]))return Math.abs(e.split("px")[0]);if("top"===e||"left"===e)return 0;if("bottom"===e)return Math.abs(l.height()-a.outerHeight(!1));if("right"===e)return Math.abs(l.width()-a.outerWidth(!1));if("first"===e||"last"===e){var f=a.find(":"+e);return"x"===n?ie(f)[1]:ie(f)[0]}return t(e).length?"x"===n?ie(t(e))[1]:ie(t(e))[0]:(a.css(h,e),void u.update.call(null,o[0]))}}},Y=function(e){function n(){return clearTimeout(p[0].autoUpdate),0===a.parents("html").length?void(a=null):void(p[0].autoUpdate=setTimeout(function(){return c.advanced.updateOnSelectorChange&&(l.poll.change.n=r(),l.poll.change.n!==l.poll.change.o)?(l.poll.change.o=l.poll.change.n,void s(3)):c.advanced.updateOnContentResize&&(l.poll.size.n=a[0].scrollHeight+a[0].scrollWidth+p[0].offsetHeight+a[0].offsetHeight+a[0].offsetWidth,l.poll.size.n!==l.poll.size.o)?(l.poll.size.o=l.poll.size.n,void s(1)):!c.advanced.updateOnImageLoad||"auto"===c.advanced.updateOnImageLoad&&"y"===c.axis||(l.poll.img.n=p.find("img").length,l.poll.img.n===l.poll.img.o)?void((c.advanced.updateOnSelectorChange||c.advanced.updateOnContentResize||c.advanced.updateOnImageLoad)&&n()):(l.poll.img.o=l.poll.img.n,void p.find("img").each(function(){o(this)}))},c.advanced.autoUpdateTimeout))}function o(e){function n(e,t){return function(){return t.apply(e,arguments)}}function i(){this.onload=null,t(e).addClass(d[2]),s(2)}if(t(e).hasClass(d[2]))return void s();var o=new Image;o.onload=n(o,i),o.src=e.src}function r(){c.advanced.updateOnSelectorChange===!0&&(c.advanced.updateOnSelectorChange="*");var e=0,t=p.find(c.advanced.updateOnSelectorChange);return c.advanced.updateOnSelectorChange&&t.length>0&&t.each(function(){e+=this.offsetHeight+this.offsetWidth}),e}function s(e){clearTimeout(p[0].autoUpdate),u.update.call(null,a[0],e)}var a=t(this),l=a.data(i),c=l.opt,p=t("#mCSB_"+l.idx+"_container");return e?(clearTimeout(p[0].autoUpdate),void Z(p[0],"autoUpdate")):void n()},U=function(e,t,n){return Math.round(e/t)*t-n},X=function(e){var n=e.data(i),o=t("#mCSB_"+n.idx+"_container,#mCSB_"+n.idx+"_container_wrapper,#mCSB_"+n.idx+"_dragger_vertical,#mCSB_"+n.idx+"_dragger_horizontal");o.each(function(){Q.call(this)})},K=function(e,n,o){function r(e){return l&&c.callbacks[e]&&"function"==typeof c.callbacks[e]}function s(){return[c.callbacks.alwaysTriggerOffsets||b>=C[0]+T,c.callbacks.alwaysTriggerOffsets||b<=-_]}function a(){var t=[h[0].offsetTop,h[0].offsetLeft],n=[y[0].offsetTop,y[0].offsetLeft],i=[h.outerHeight(!1),h.outerWidth(!1)],r=[p.height(),p.width()];e[0].mcs={content:h,top:t[0],left:t[1],draggerTop:n[0],draggerLeft:n[1],topPct:Math.round(100*Math.abs(t[0])/(Math.abs(i[0])-r[0])),leftPct:Math.round(100*Math.abs(t[1])/(Math.abs(i[1])-r[1])),direction:o.dir}}var l=e.data(i),c=l.opt,d={trigger:"internal",dir:"y",scrollEasing:"mcsEaseOut",drag:!1,dur:c.scrollInertia,overwrite:"all",callbacks:!0,onStart:!0,onUpdate:!0,onComplete:!0},o=t.extend(d,o),u=[o.dur,o.drag?0:o.dur],p=t("#mCSB_"+l.idx),h=t("#mCSB_"+l.idx+"_container"),f=h.parent(),m=c.callbacks.onTotalScrollOffset?q.call(e,c.callbacks.onTotalScrollOffset):[0,0],g=c.callbacks.onTotalScrollBackOffset?q.call(e,c.callbacks.onTotalScrollBackOffset):[0,0];if(l.trigger=o.trigger,0===f.scrollTop()&&0===f.scrollLeft()||(t(".mCSB_"+l.idx+"_scrollbar").css("visibility","visible"),f.scrollTop(0).scrollLeft(0)),"_resetY"!==n||l.contentReset.y||(r("onOverflowYNone")&&c.callbacks.onOverflowYNone.call(e[0]),l.contentReset.y=1),"_resetX"!==n||l.contentReset.x||(r("onOverflowXNone")&&c.callbacks.onOverflowXNone.call(e[0]),l.contentReset.x=1),"_resetY"!==n&&"_resetX"!==n){if(!l.contentReset.y&&e[0].mcs||!l.overflowed[0]||(r("onOverflowY")&&c.callbacks.onOverflowY.call(e[0]),l.contentReset.x=null),!l.contentReset.x&&e[0].mcs||!l.overflowed[1]||(r("onOverflowX")&&c.callbacks.onOverflowX.call(e[0]),l.contentReset.x=null),c.snapAmount){var v=c.snapAmount instanceof Array?"x"===o.dir?c.snapAmount[1]:c.snapAmount[0]:c.snapAmount;n=U(n,v,c.snapOffset)}switch(o.dir){case"x":var y=t("#mCSB_"+l.idx+"_dragger_horizontal"),w="left",b=h[0].offsetLeft,C=[p.width()-h.outerWidth(!1),y.parent().width()-y.width()],x=[n,0===n?0:n/l.scrollRatio.x],T=m[1],_=g[1],k=T>0?T/l.scrollRatio.x:0,$=_>0?_/l.scrollRatio.x:0;break;case"y":var y=t("#mCSB_"+l.idx+"_dragger_vertical"),w="top",b=h[0].offsetTop,C=[p.height()-h.outerHeight(!1),y.parent().height()-y.height()],x=[n,0===n?0:n/l.scrollRatio.y],T=m[0],_=g[0],k=T>0?T/l.scrollRatio.y:0,$=_>0?_/l.scrollRatio.y:0}x[1]<0||0===x[0]&&0===x[1]?x=[0,0]:x[1]>=C[1]?x=[C[0],C[1]]:x[0]=-x[0],e[0].mcs||(a(),r("onInit")&&c.callbacks.onInit.call(e[0])),clearTimeout(h[0].onCompleteTimeout),G(y[0],w,Math.round(x[1]),u[1],o.scrollEasing),!l.tweenRunning&&(0===b&&x[0]>=0||b===C[0]&&x[0]<=C[0])||G(h[0],w,Math.round(x[0]),u[0],o.scrollEasing,o.overwrite,{onStart:function(){o.callbacks&&o.onStart&&!l.tweenRunning&&(r("onScrollStart")&&(a(),c.callbacks.onScrollStart.call(e[0])),l.tweenRunning=!0,S(y),l.cbOffsets=s())},onUpdate:function(){o.callbacks&&o.onUpdate&&r("whileScrolling")&&(a(),c.callbacks.whileScrolling.call(e[0]))},onComplete:function(){if(o.callbacks&&o.onComplete){"yx"===c.axis&&clearTimeout(h[0].onCompleteTimeout);var t=h[0].idleTimer||0;h[0].onCompleteTimeout=setTimeout(function(){r("onScroll")&&(a(),c.callbacks.onScroll.call(e[0])),r("onTotalScroll")&&x[1]>=C[1]-k&&l.cbOffsets[0]&&(a(),c.callbacks.onTotalScroll.call(e[0])),r("onTotalScrollBack")&&x[1]<=$&&l.cbOffsets[1]&&(a(),c.callbacks.onTotalScrollBack.call(e[0])),l.tweenRunning=!1,h[0].idleTimer=0,S(y,"hide")},t)}}})}},G=function(e,t,n,i,o,r,s){function a(){C.stop||(y||f.call(),y=J()-v,l(),y>=C.time&&(C.time=y>C.time?y+p-(y-C.time):y+p-1,C.time<y+1&&(C.time=y+1)),C.time<i?C.id=h(a):g.call())}function l(){i>0?(C.currVal=u(C.time,w,x,i,o),b[t]=Math.round(C.currVal)+"px"):b[t]=n+"px",m.call()}function c(){p=1e3/60,C.time=y+p,h=window.requestAnimationFrame?window.requestAnimationFrame:function(e){return l(),setTimeout(e,.01)},C.id=h(a)}function d(){null!=C.id&&(window.requestAnimationFrame?window.cancelAnimationFrame(C.id):clearTimeout(C.id),C.id=null)}function u(e,t,n,i,o){switch(o){case"linear":case"mcsLinear":return n*e/i+t;case"mcsLinearOut":return e/=i,e--,n*Math.sqrt(1-e*e)+t;case"easeInOutSmooth":return e/=i/2,e<1?n/2*e*e+t:(e--,-n/2*(e*(e-2)-1)+t);case"easeInOutStrong":return e/=i/2,e<1?n/2*Math.pow(2,10*(e-1))+t:(e--,n/2*(-Math.pow(2,-10*e)+2)+t);case"easeInOut":case"mcsEaseInOut":return e/=i/2,e<1?n/2*e*e*e+t:(e-=2,n/2*(e*e*e+2)+t);case"easeOutSmooth":return e/=i,e--,-n*(e*e*e*e-1)+t;case"easeOutStrong":return n*(-Math.pow(2,-10*e/i)+1)+t;case"easeOut":case"mcsEaseOut":default:var r=(e/=i)*e,s=r*e;return t+n*(.499999999999997*s*r+-2.5*r*r+5.5*s+-6.5*r+4*e)}}e._mTween||(e._mTween={top:{},left:{}});var p,h,s=s||{},f=s.onStart||function(){},m=s.onUpdate||function(){},g=s.onComplete||function(){},v=J(),y=0,w=e.offsetTop,b=e.style,C=e._mTween[t];"left"===t&&(w=e.offsetLeft);var x=n-w;C.stop=0,"none"!==r&&d(),c()},J=function(){return window.performance&&window.performance.now?window.performance.now():window.performance&&window.performance.webkitNow?window.performance.webkitNow():Date.now?Date.now():(new Date).getTime()},Q=function(){var e=this;e._mTween||(e._mTween={top:{},left:{}});for(var t=["top","left"],n=0;n<t.length;n++){var i=t[n];e._mTween[i].id&&(window.requestAnimationFrame?window.cancelAnimationFrame(e._mTween[i].id):clearTimeout(e._mTween[i].id),e._mTween[i].id=null,e._mTween[i].stop=1)}},Z=function(e,t){try{delete e[t]}catch(n){e[t]=null}},ee=function(e){return!(e.which&&1!==e.which)},te=function(e){var t=e.originalEvent.pointerType;return!(t&&"touch"!==t&&2!==t)},ne=function(e){return!isNaN(parseFloat(e))&&isFinite(e)},ie=function(e){var t=e.parents(".mCSB_container");return[e.offset().top-t.offset().top,e.offset().left-t.offset().left]},oe=function(){function e(){var e=["webkit","moz","ms","o"];if("hidden"in document)return"hidden";for(var t=0;t<e.length;t++)if(e[t]+"Hidden"in document)return e[t]+"Hidden";return null}var t=e();return!!t&&document[t]};t.fn[n]=function(e){return u[e]?u[e].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof e&&e?void t.error("Method "+e+" does not exist"):u.init.apply(this,arguments)},t[n]=function(e){return u[e]?u[e].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof e&&e?void t.error("Method "+e+" does not exist"):u.init.apply(this,arguments)},t[n].defaults=r,window[n]=!0,t(window).bind("load",function(){t(o)[n](),t.extend(t.expr[":"],{mcsInView:t.expr[":"].mcsInView||function(e){var n,i,o=t(e),r=o.parents(".mCSB_container");if(r.length)return n=r.parent(),i=[r[0].offsetTop,r[0].offsetLeft],i[0]+ie(o)[0]>=0&&i[0]+ie(o)[0]<n.height()-o.outerHeight(!1)&&i[1]+ie(o)[1]>=0&&i[1]+ie(o)[1]<n.width()-o.outerWidth(!1)},mcsInSight:t.expr[":"].mcsInSight||function(e,n,i){var o,r,s,a,l=t(e),c=l.parents(".mCSB_container"),d="exact"===i[3]?[[1,0],[1,0]]:[[.9,.1],[.6,.4]];if(c.length)return o=[l.outerHeight(!1),l.outerWidth(!1)],s=[c[0].offsetTop+ie(l)[0],c[0].offsetLeft+ie(l)[1]],r=[c.parent()[0].offsetHeight,c.parent()[0].offsetWidth],a=[o[0]<r[0]?d[0]:d[1],o[1]<r[1]?d[0]:d[1]],s[0]-r[0]*a[0][0]<0&&s[0]+o[0]-r[0]*a[0][1]>=0&&s[1]-r[1]*a[1][0]<0&&s[1]+o[1]-r[1]*a[1][1]>=0},mcsOverflow:t.expr[":"].mcsOverflow||function(e){var n=t(e).data(i);if(n)return n.overflowed[0]||n.overflowed[1]}})})})})},function(e,t){(function(t){e.exports=t}).call(t,{})},function(e,t,n){"use strict";var i=n(2),o=n(3),r=o.utils.rAF,s=o.utils.cancelAF,a=!1,l=function(e,t){function n(e){return(e/=.5)<1?.5*Math.pow(e,5):.5*(Math.pow(e-2,5)+2)}function o(){h.off("touchstart.smoothscroll.amui",w),a=!1}function c(e){a&&(d||(d=e),u=Math.min(1,Math.max((e-d)/y,0)),p=Math.round(m+v*n(u)),v>0&&p>f&&(p=f),v<0&&p<f&&(p=f),g!=p&&h.scrollTop(p),g=p,p!==f?(s(b),b=r(c)):(s(b),o()))}t=t||{};var d,u,p,h=i(e),f=parseInt(t.position)||l.DEFAULTS.position,m=h.scrollTop(),g=m,v=f-m,y=t.speed||Math.min(750,Math.min(1500,Math.abs(m-f))),w=function(){o()};if(!a&&0!==v){h.on("touchstart.smoothscroll.amui",w),a=!0;var b=r(c)}};l.DEFAULTS={position:0},i.fn.smoothScroll=function(e){return this.each(function(){new l(this,e)})},i(document).on("click.smoothScroll.amui.data-api","[data-am-smooth-scroll]",function(e){e.preventDefault();var t=o.utils.parseOptions(i(this).data("amSmoothScroll"));i(window).smoothScroll(t)}),e.exports=l},function(e,t){!function(e){"use strict";function t(t,n){this.itemsArray=[],this.$element=e(t),this.$element.hide(),this.isSelect="SELECT"===t.tagName,this.multiple=this.isSelect&&t.hasAttribute("multiple"),this.objectItems=n&&n.itemValue,this.placeholderText=t.hasAttribute("placeholder")?this.$element.attr("placeholder"):"",this.inputSize=Math.max(1,this.placeholderText.length),this.$container=e('<div class="am-tagsinput"></div>'),this.$input=e('<input type="text" placeholder="'+this.placeholderText+'"/>').appendTo(this.$container),this.$element.after(this.$container);var i=(this.inputSize<3?3:this.inputSize)+"em";this.$input.get(0).style.cssText="width: "+i+" !important;",this.build(n)}function n(e,t){if("function"!=typeof e[t]){var n=e[t];e[t]=function(e){return e[n]}}}function i(e,t){if("function"!=typeof e[t]){var n=e[t];e[t]=function(){return n}}}function o(e){return e?l.text(e).html():""}function r(e){var t=0;if(document.selection){e.focus();var n=document.selection.createRange();n.moveStart("character",-e.value.length),t=n.text.length}else(e.selectionStart||"0"==e.selectionStart)&&(t=e.selectionStart);return t}function s(t,n){var i=!1;return e.each(n,function(e,n){if("number"==typeof n&&t.which===n)return i=!0,!1;if(t.which===n.which){var o=!n.hasOwnProperty("altKey")||t.altKey===n.altKey,r=!n.hasOwnProperty("shiftKey")||t.shiftKey===n.shiftKey,s=!n.hasOwnProperty("ctrlKey")||t.ctrlKey===n.ctrlKey;if(o&&r&&s)return i=!0,!1}}),i}var a={tagClass:function(e){return"am-badge am-badge-primary"},itemValue:function(e){return e?e.toString():e},itemText:function(e){return this.itemValue(e)},freeInput:!0,addOnBlur:!0,maxTags:void 0,maxChars:void 0,confirmKeys:[13,44],onTagExists:function(e,t){t.hide().fadeIn()},trimValue:!1,allowDuplicates:!1};t.prototype={constructor:t,add:function(t,n,i){var r=this;if(!(r.options.maxTags&&r.itemsArray.length>=r.options.maxTags)&&(t===!1||t)){if("string"==typeof t&&r.options.trimValue&&(t=e.trim(t)),"object"==typeof t&&!r.objectItems)throw"Can't add objects when itemValue option is not set";if(!t.toString().match(/^\s*$/)){if(r.isSelect&&!r.multiple&&r.itemsArray.length>0&&r.remove(r.itemsArray[0]),"string"==typeof t&&"INPUT"===this.$element[0].tagName){var s=t.split(",");if(s.length>1){for(var a=0;a<s.length;a++)this.add(s[a],!0);return void(n||r.pushVal())}}var l=r.options.itemValue(t),c=r.options.itemText(t),d=r.options.tagClass(t),u=e.grep(r.itemsArray,function(e){return r.options.itemValue(e)===l})[0];if(!u||r.options.allowDuplicates){if(!(r.items().toString().length+t.length+1>r.options.maxInputLength)){var p=e.Event("beforeItemAdd",{item:t,cancel:!1,options:i});if(r.$element.trigger(p),!p.cancel){r.itemsArray.push(t);var h=e('<span class="tag '+o(d)+'">'+o(c)+'<span data-role="remove"></span></span>');if(h.data("item",t),r.findInputWrapper().before(h),h.after(" "),r.isSelect&&!e('option[value="'+encodeURIComponent(l)+'"]',r.$element)[0]){var f=e("<option selected>"+o(c)+"</option>");f.data("item",t),f.attr("value",l),r.$element.append(f)}n||r.pushVal(),r.options.maxTags!==r.itemsArray.length&&r.items().toString().length!==r.options.maxInputLength||r.$container.addClass("am-tagsinput-max"),r.$element.trigger(e.Event("itemAdded",{item:t,options:i}))}}}else if(r.options.onTagExists){var m=e(".tag",r.$container).filter(function(){return e(this).data("item")===u});r.options.onTagExists(t,m)}}}},remove:function(t,n,i){var o=this;if(o.objectItems&&(t="object"==typeof t?e.grep(o.itemsArray,function(e){return o.options.itemValue(e)==o.options.itemValue(t)}):e.grep(o.itemsArray,function(e){return o.options.itemValue(e)==t}),t=t[t.length-1]),t){var r=e.Event("beforeItemRemove",{item:t,cancel:!1,options:i});if(o.$element.trigger(r),r.cancel)return;e(".tag",o.$container).filter(function(){return e(this).data("item")===t}).remove(),e("option",o.$element).filter(function(){return e(this).data("item")===t}).remove(),e.inArray(t,o.itemsArray)!==-1&&o.itemsArray.splice(e.inArray(t,o.itemsArray),1)}n||o.pushVal(),o.options.maxTags>o.itemsArray.length&&o.$container.removeClass("bootstrap-tagsinput-max"),o.$element.trigger(e.Event("itemRemoved",{item:t,options:i}))},removeAll:function(){var t=this;for(e(".tag",t.$container).remove(),e("option",t.$element).remove();t.itemsArray.length>0;)t.itemsArray.pop();t.pushVal()},refresh:function(){var t=this;e(".tag",t.$container).each(function(){var n=e(this),i=n.data("item"),r=t.options.itemValue(i),s=t.options.itemText(i),a=t.options.tagClass(i);if(n.attr("class",null),n.addClass("tag "+o(a)),n.contents().filter(function(){return 3==this.nodeType})[0].nodeValue=o(s),t.isSelect){var l=e("option",t.$element).filter(function(){return e(this).data("item")===i});l.attr("value",r)}})},items:function(){return this.itemsArray},pushVal:function(){var t=this,n=e.map(t.items(),function(e){return t.options.itemValue(e).toString()});t.$element.val(n,!0).trigger("change").trigger("input")},build:function(t){var o=this;if(o.options=e.extend({},a,t),o.objectItems&&(o.options.freeInput=!1),n(o.options,"itemValue"),n(o.options,"itemText"),i(o.options,"tagClass"),o.options.typeahead){var l=o.options.typeahead||{};i(l,"source"),o.$input.typeahead(e.extend({},l,{source:function(t,n){function i(e){for(var t=[],i=0;i<e.length;i++){var s=o.options.itemText(e[i]);r[s]=e[i],t.push(s)}n(t)}this.map={};var r=this.map,s=l.source(t);e.isFunction(s.success)?s.success(i):e.isFunction(s.then)?s.then(i):e.when(s).then(i)},updater:function(e){o.add(this.map[e])},matcher:function(e){return e.toLowerCase().indexOf(this.query.trim().toLowerCase())!==-1},sorter:function(e){return e.sort()},highlighter:function(e){var t=new RegExp("("+this.query+")","gi");return e.replace(t,"<strong>$1</strong>")}}))}if(o.options.typeaheadjs){var c=o.options.typeaheadjs||{};o.$input.typeahead(null,c).on("typeahead:selected",e.proxy(function(e,t){c.valueKey?o.add(t[c.valueKey]):o.add(t),o.$input.typeahead("val","")},o))}o.$container.on("click",e.proxy(function(e){o.$element.attr("disabled")||o.$input.removeAttr("disabled"),o.$input.focus()},o)),o.options.addOnBlur&&o.options.freeInput&&o.$input.on("focusout",e.proxy(function(t){0===e(".typeahead, .twitter-typeahead",o.$container).length&&(o.add(o.$input.val()),o.$input.val(""))},o)),o.$container.on("keydown","input",e.proxy(function(t){var n=e(t.target),i=o.findInputWrapper();if(o.$element.attr("disabled"))return void o.$input.attr("disabled","disabled");switch(t.which){case 8:if(0===r(n[0])){var s=i.prev();s&&o.remove(s.data("item"))}break;case 46:if(0===r(n[0])){var a=i.next();a&&o.remove(a.data("item"))}break;case 37:var l=i.prev();0===n.val().length&&l[0]&&(l.before(i),n.focus());break;case 39:var c=i.next();0===n.val().length&&c[0]&&(c.after(i),n.focus())}var d=n.val().length;Math.ceil(d/5);n.attr("size",Math.max(this.inputSize,n.val().length))},o)),o.$container.on("keypress","input",e.proxy(function(t){var n=e(t.target);if(o.$element.attr("disabled"))return void o.$input.attr("disabled","disabled");var i=n.val(),r=o.options.maxChars&&i.length>=o.options.maxChars;o.options.freeInput&&(s(t,o.options.confirmKeys)||r)&&(o.add(r?i.substr(0,o.options.maxChars):i),n.val(""),t.preventDefault());var a=n.val().length;Math.ceil(a/5);n.attr("size",Math.max(this.inputSize,n.val().length))},o)),o.$container.on("click","[data-role=remove]",e.proxy(function(t){o.$element.attr("disabled")||o.remove(e(t.target).closest(".tag").data("item"))},o)),o.options.itemValue===a.itemValue&&("INPUT"===o.$element[0].tagName?o.add(o.$element.val()):e("option",o.$element).each(function(){o.add(e(this).attr("value"),!0)}))},destroy:function(){var e=this;e.$container.off("keypress","input"),e.$container.off("click","[role=remove]"),e.$container.remove(),e.$element.removeData("tagsinput"),e.$element.show()},focus:function(){this.$input.focus()},input:function(){return this.$input},findInputWrapper:function(){for(var t=this.$input[0],n=this.$container[0];t&&t.parentNode!==n;)t=t.parentNode;return e(t)}},e.fn.tagsinput=function(n,i,o){var r=[];return this.each(function(){var s=e(this).data("tagsinput");if(s)if(n||i){if(void 0!==s[n]){if(3===s[n].length&&void 0!==o)var a=s[n](i,null,o);else var a=s[n](i);void 0!==a&&r.push(a)}}else r.push(s);else s=new t(this,n),e(this).data("tagsinput",s),r.push(s),"SELECT"===this.tagName&&e("option",e(this)).attr("selected","selected"),e(this).val(e(this).val())}),"string"==typeof n?r.length>1?r:r[0]:r},e.fn.tagsinput.Constructor=t;var l=e("<div />");e(function(){e("input[data-role=tagsinput], select[multiple][data-role=tagsinput], [data-am-tagsinput]").tagsinput()})}(window.jQuery)},function(e,t,n){"use strict";function i(e){this.$element=e.element,this.first=!0,e.option.curr=parseInt(e.option.curr)||1,e.option.theme=e.option.theme||"default",e.option.groups="undefined"!=typeof e.option.groups?parseInt(e.option.groups):5,this.option=e.option,this._init()}var o=n(2),r=n(3);i.prototype._init=function(){if(this.option.groups>0&&(this.option._prev=Math.ceil(this.option.groups/2),this.option._next=Math.floor(this.option.groups/2),this.option._status={prev:!1,next:!1}),this.option.before){var e=this;this.option.before(this,function(){e._load()})}else this._load()},i.prototype._load=function(){var e=this.option;if(!e.pages||1==e.pages)return!1;var t=this.$element,n=o("<ul></ul>");n.addClass("am-pagination am-pagination-default am-page-"+e.theme),t.html(n);var i=[];e.curr>1&&e.prev!==!1&&i.push({key:"prev",value:e.prev||"\u4e0a\u4e00\u9875",page:e.curr-1}),e.first&&i.push({key:"first",value:e.first,page:1});for(var r=1;r<=e.pages;r++)i.push({key:r,value:r,page:r});e.last&&i.push({key:"last",value:e.last,page:e.pages}),e.curr!=e.pages&&e.next!==!1&&i.push({key:"next",value:e.next||"\u4e0b\u4e00\u9875",page:e.curr+1});for(var s=function(e,t){var n="<span>...</span>";return t<=(e.curr+e._next<e.pages?e.curr-e._prev:e.pages-e.groups)?(n=e._status.prev?"":n,e._status.prev=!0,n):t>(e.curr+e._next<e.groups?e.groups:e.curr+e._next)&&(n=e._status.next?"":n,e._status.next=!0,n)},a=function(e,t,n){var i,o=e.option;return(0!=o.groups||"number"!=typeof n)&&("number"==typeof n&&o.groups<o.pages&&(i=s(o,n))!==!1?i:(o.curr==n&&t.addClass("am-active"),t))},r=(e.render?e.render:a,0);r<i.length;r++){var l=i[r],c="#";"string"==typeof this.option.jump&&this.option.jump.indexOf("%page%")&&(c=this.option.jump.replace("%page%",l.page));var d,u=o('<li><a href="'+c+'" data-page="'+l.page+'">'+l.value+"</a></li>");e.render&&(d=e.render(this,u,l.key))||(d=a(this,u,l.key)),n.append(d)}if(this._on(),this.option.after){var p=this;this.option.after(this,function(){p._jump()})}else this._jump()},i.prototype._on=function(){var e=this;e.$element.one("click","li a",function(t){e.option.curr=o(this).data("page"),e.option.ajax&&t.preventDefault(),e._init()})},i.prototype._jump=function(){"function"==typeof this.option.jump&&(this.$element.trigger("jump.page.amui"),this.option.jump(this,this.first)),this.first=!1},i.prototype.remove=function(e){this.$element.trigger("remove.page.amui"),this.$element.remove(),this.$element.trigger("removed.page.amui"),e&&e()},i.prototype.setCurr=function(e,t){this.option.curr=parseInt(e),this._init(),t&&t()},o.fn.extend({page:function(e){return new i({element:this,option:e})}}),r.ready(function(e){o("[data-am-page]",e).each(function(){var e=r.utils.parseOptions(o(this).attr("data-am-page"));e.before=window[e.before],e.render=window[e.render],e.after=window[e.after],void 0===e.ajax&&(e.ajax=!1),e.jump&&e.jump.indexOf("%page%")==-1&&(e.jump=window[e.jump]),o(this).page(e)})}),e.exports=r.page=i},function(e,t,n){"use strict";var i=n(2),o=n(3),r=".am-form",s="am-disabled",a=null,l=function(e,t){return"string"==typeof t?void("select"===t?this.select():"init"===t&&(console.log("init vue!"),this.initVue())):(this.options=i.extend({},l.DEFAULTS,t),this.$element=i(e),void this.init())};l.DEFAULTS={},l.current=null,l.prototype.init=function(){a=this,"function"!=typeof Vue&&(this.radio(),this.checkbox(),this.select())},l.prototype.initVue=function(){this.radio(),this.checkbox(),this.select()},l.prototype.each=function(e,t){var n,i=this;if("function"!=typeof t)return i;if(e=e||[],e.constructor===Object){for(n in e)if(t.call(e[n],n,e[n]))break}else for(n=0;n<e.length&&!t.call(e[n],n,e[n]);n++);return i},l.prototype.checkbox=function(){var e={checkbox:["am-form-checkbox","am-form-checked","checkbox"],_switch:["am-form-switch","am-form-onswitch","switch"]},t=this.$element.find("input[type=checkbox]"),n=function(){var e=i(this),t=this.skinElement,n=this.skinClass,o=(e.attr("data-text")||"").split("|");this.checked?t.addClass(n[1]).find("em").text(o[0]):t.removeClass(n[1]).find("em").text(o[1])};t.each(function(t,o){var r=i(this),a=r.attr("data-skin"),l=(r.attr("data-text")||"").split("|"),c=this.disabled;"switch"===a&&(a="_"+a);var d=e[a]||e.checkbox;if("string"!=typeof r.attr("data-ignore")){r.on("change",function(){n.call(this)});var u=r.next("."+d[0]),p=i(['<div class="am-unselect '+d[0]+(o.checked?" "+d[1]:"")+(c?" am-checkbox-disbaled "+s:"")+'" data-skin="'+(a||"")+'">',{_switch:"<em>"+((o.checked?l[0]:l[1])||"")+"</em><i></i>"}[a]||(o.title.replace(/\s/g,"")?"<span>"+o.title+"</span>":"")+'<i class="icon '+(a?"icon-dui":"icon-gou")+'"></i>',"</div>"].join(""));u[0]&&u.remove(),r.after(p),this.skinElement=p,this.skinClass=d,this.disabled||p.on("click",function(){r.trigger("click")})}})},l.prototype.radio=function(){var e=this,t="am-form-radio",n=["icon-radio-checked","icon-radio"],o=this.$element.find("input[type=radio]"),a=function(){var o=i(this),s=this.skinElement,a="am-anim-scaleSpring",l=o[0].name,c=o.parents(r),d=c.find("input[name="+l.replace(/(\.|#|\[|\])/g,"\\$1")+"]");e.each(d,function(){var e=i(this).next("."+t);e.removeClass(t+"ed"),e.find(".icon").removeClass(a).removeClass(n[0]).addClass(n[1])}),s&&(s.addClass(t+"ed"),s.find(".icon").addClass(a).removeClass(n[1]).addClass(n[0]))};o.each(function(e,o){var r=i(this),a=r.next("."+t),l=this.disabled;if("string"!=typeof r.attr("data-ignore")){var c=i(['<div class="am-unselect '+t+(o.checked?" "+t+"ed":"")+(l?" am-radio-disbaled "+s:"")+'">','<i class="am-anim icon '+n[o.checked?0:1]+'"></i>',"<span>"+(o.title||"\u672a\u547d\u540d")+"</span>","</div>"].join(""));a[0]&&a.remove(),r.after(c),this.skinElement=c,this.disabled||c.on("click",function(){r.trigger("click")})}}).on("change",function(){a.call(this)})},l.prototype.select=function(){var e=this.$element.find("select");e.each(function(e,t){var n=i(this);if("string"!=typeof n.attr("data-ignore")){n.selectize({plugins:["remove_button"],delimiter:",",persist:!1,create:!1,sortField:"text",onInitialize:function(){this.$control_input.attr("data-v-excluded",!0),this.$control.hasClass("required")&&this.$input.prop("required","required")},onChange:function(e){this.$input.trigger("change"),this.$input.trigger("input")}})}})},o.plugin("form",l,{after:function(){o.support.touch}}),o.ready(function(e){"function"!=typeof Vue&&i(".am-form",e).form()}),e.exports=o.form=l}])});