mirror of
https://github.com/a2nt/silverstripe-webpack.git
synced 2024-10-22 17:05:31 +02:00
140 lines
491 KiB
JavaScript
140 lines
491 KiB
JavaScript
!function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(i,r,function(t){return e[t]}.bind(null,r));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s="./src/js/app.js")}({"./node_modules/bootstrap-datepicker/dist/js/bootstrap-datepicker.js":function(e,t,n){var i,r,o;
|
||
/*!
|
||
* Datepicker for Bootstrap v1.9.0 (https://github.com/uxsolutions/bootstrap-datepicker)
|
||
*
|
||
* Licensed under the Apache License v2.0 (http://www.apache.org/licenses/LICENSE-2.0)
|
||
*/r=[n("jquery")],void 0===(o="function"==typeof(i=function(e,t){function n(){return new Date(Date.UTC.apply(Date,arguments))}function i(){var e=new Date;return n(e.getFullYear(),e.getMonth(),e.getDate())}function r(e,t){return e.getUTCFullYear()===t.getUTCFullYear()&&e.getUTCMonth()===t.getUTCMonth()&&e.getUTCDate()===t.getUTCDate()}function o(n,i){return function(){return i!==t&&e.fn.datepicker.deprecated(i),this[n].apply(this,arguments)}}var s=function(){var t={get:function(e){return this.slice(e)[0]},contains:function(e){for(var t=e&&e.valueOf(),n=0,i=this.length;n<i;n++)if(0<=this[n].valueOf()-t&&this[n].valueOf()-t<864e5)return n;return-1},remove:function(e){this.splice(e,1)},replace:function(t){t&&(e.isArray(t)||(t=[t]),this.clear(),this.push.apply(this,t))},clear:function(){this.length=0},copy:function(){var e=new s;return e.replace(this),e}};return function(){var n=[];return n.push.apply(n,arguments),e.extend(n,t),n}}(),a=function(t,n){e.data(t,"datepicker",this),this._events=[],this._secondaryEvents=[],this._process_options(n),this.dates=new s,this.viewDate=this.o.defaultViewDate,this.focusDate=null,this.element=e(t),this.isInput=this.element.is("input"),this.inputField=this.isInput?this.element:this.element.find("input"),this.component=!!this.element.hasClass("date")&&this.element.find(".add-on, .input-group-addon, .input-group-append, .input-group-prepend, .btn"),this.component&&0===this.component.length&&(this.component=!1),this.isInline=!this.component&&this.element.is("div"),this.picker=e(p.template),this._check_template(this.o.templates.leftArrow)&&this.picker.find(".prev").html(this.o.templates.leftArrow),this._check_template(this.o.templates.rightArrow)&&this.picker.find(".next").html(this.o.templates.rightArrow),this._buildEvents(),this._attachEvents(),this.isInline?this.picker.addClass("datepicker-inline").appendTo(this.element):this.picker.addClass("datepicker-dropdown dropdown-menu"),this.o.rtl&&this.picker.addClass("datepicker-rtl"),this.o.calendarWeeks&&this.picker.find(".datepicker-days .datepicker-switch, thead .datepicker-title, tfoot .today, tfoot .clear").attr("colspan",function(e,t){return Number(t)+1}),this._process_options({startDate:this._o.startDate,endDate:this._o.endDate,daysOfWeekDisabled:this.o.daysOfWeekDisabled,daysOfWeekHighlighted:this.o.daysOfWeekHighlighted,datesDisabled:this.o.datesDisabled}),this._allow_update=!1,this.setViewMode(this.o.startView),this._allow_update=!0,this.fillDow(),this.fillMonths(),this.update(),this.isInline&&this.show()};a.prototype={constructor:a,_resolveViewName:function(t){return e.each(p.viewModes,function(n,i){if(t===n||-1!==e.inArray(t,i.names))return t=n,!1}),t},_resolveDaysOfWeek:function(t){return e.isArray(t)||(t=t.split(/[,\s]*/)),e.map(t,Number)},_check_template:function(n){try{if(n===t||""===n)return!1;if((n.match(/[<>]/g)||[]).length<=0)return!0;var i=e(n);return i.length>0}catch(e){return!1}},_process_options:function(t){this._o=e.extend({},this._o,t);var r=this.o=e.extend({},this._o),o=r.language;f[o]||(o=o.split("-")[0],f[o]||(o=h.language)),r.language=o,r.startView=this._resolveViewName(r.startView),r.minViewMode=this._resolveViewName(r.minViewMode),r.maxViewMode=this._resolveViewName(r.maxViewMode),r.startView=Math.max(this.o.minViewMode,Math.min(this.o.maxViewMode,r.startView)),!0!==r.multidate&&(r.multidate=Number(r.multidate)||!1,!1!==r.multidate&&(r.multidate=Math.max(0,r.multidate))),r.multidateSeparator=String(r.multidateSeparator),r.weekStart%=7,r.weekEnd=(r.weekStart+6)%7;var s=p.parseFormat(r.format);r.startDate!==-1/0&&(r.startDate?r.startDate instanceof Date?r.startDate=this._local_to_utc(this._zero_time(r.startDate)):r.startDate=p.parseDate(r.startDate,s,r.language,r.assumeNearbyYear):r.startDate=-1/0),r.endDate!==1/0&&(r.endDate?r.endDate instanceof Date?r.endDate=this._local_to_utc(this._zero_time(r.endDate)):r.endDate=p.parseDate(r.endDate,s,r.language,r.assumeNearbyYear):r.endDate=1/0),r.daysOfWeekDisabled=this._resolveDaysOfWeek(r.daysOfWeekDisabled||[]),r.daysOfWeekHighlighted=this._resolveDaysOfWeek(r.daysOfWeekHighlighted||[]),r.datesDisabled=r.datesDisabled||[],e.isArray(r.datesDisabled)||(r.datesDisabled=r.datesDisabled.split(",")),r.datesDisabled=e.map(r.datesDisabled,function(e){return p.parseDate(e,s,r.language,r.assumeNearbyYear)});var a=String(r.orientation).toLowerCase().split(/\s+/g),c=r.orientation.toLowerCase();if(a=e.grep(a,function(e){return/^auto|left|right|top|bottom$/.test(e)}),r.orientation={x:"auto",y:"auto"},c&&"auto"!==c)if(1===a.length)switch(a[0]){case"top":case"bottom":r.orientation.y=a[0];break;case"left":case"right":r.orientation.x=a[0]}else c=e.grep(a,function(e){return/^left|right$/.test(e)}),r.orientation.x=c[0]||"auto",c=e.grep(a,function(e){return/^top|bottom$/.test(e)}),r.orientation.y=c[0]||"auto";if(r.defaultViewDate instanceof Date||"string"==typeof r.defaultViewDate)r.defaultViewDate=p.parseDate(r.defaultViewDate,s,r.language,r.assumeNearbyYear);else if(r.defaultViewDate){var l=r.defaultViewDate.year||(new Date).getFullYear(),u=r.defaultViewDate.month||0,d=r.defaultViewDate.day||1;r.defaultViewDate=n(l,u,d)}else r.defaultViewDate=i()},_applyEvents:function(e){for(var n,i,r,o=0;o<e.length;o++)n=e[o][0],2===e[o].length?(i=t,r=e[o][1]):3===e[o].length&&(i=e[o][1],r=e[o][2]),n.on(r,i)},_unapplyEvents:function(e){for(var n,i,r,o=0;o<e.length;o++)n=e[o][0],2===e[o].length?(r=t,i=e[o][1]):3===e[o].length&&(r=e[o][1],i=e[o][2]),n.off(i,r)},_buildEvents:function(){var t={keyup:e.proxy(function(t){-1===e.inArray(t.keyCode,[27,37,39,38,40,32,13,9])&&this.update()},this),keydown:e.proxy(this.keydown,this),paste:e.proxy(this.paste,this)};!0===this.o.showOnFocus&&(t.focus=e.proxy(this.show,this)),this.isInput?this._events=[[this.element,t]]:this.component&&this.inputField.length?this._events=[[this.inputField,t],[this.component,{click:e.proxy(this.show,this)}]]:this._events=[[this.element,{click:e.proxy(this.show,this),keydown:e.proxy(this.keydown,this)}]],this._events.push([this.element,"*",{blur:e.proxy(function(e){this._focused_from=e.target},this)}],[this.element,{blur:e.proxy(function(e){this._focused_from=e.target},this)}]),this.o.immediateUpdates&&this._events.push([this.element,{"changeYear changeMonth":e.proxy(function(e){this.update(e.date)},this)}]),this._secondaryEvents=[[this.picker,{click:e.proxy(this.click,this)}],[this.picker,".prev, .next",{click:e.proxy(this.navArrowsClick,this)}],[this.picker,".day:not(.disabled)",{click:e.proxy(this.dayCellClick,this)}],[e(window),{resize:e.proxy(this.place,this)}],[e(document),{"mousedown touchstart":e.proxy(function(e){this.element.is(e.target)||this.element.find(e.target).length||this.picker.is(e.target)||this.picker.find(e.target).length||this.isInline||this.hide()},this)}]]},_attachEvents:function(){this._detachEvents(),this._applyEvents(this._events)},_detachEvents:function(){this._unapplyEvents(this._events)},_attachSecondaryEvents:function(){this._detachSecondaryEvents(),this._applyEvents(this._secondaryEvents)},_detachSecondaryEvents:function(){this._unapplyEvents(this._secondaryEvents)},_trigger:function(t,n){var i=n||this.dates.get(-1),r=this._utc_to_local(i);this.element.trigger({type:t,date:r,viewMode:this.viewMode,dates:e.map(this.dates,this._utc_to_local),format:e.proxy(function(e,t){0===arguments.length?(e=this.dates.length-1,t=this.o.format):"string"==typeof e&&(t=e,e=this.dates.length-1),t=t||this.o.format;var n=this.dates.get(e);return p.formatDate(n,t,this.o.language)},this)})},show:function(){if(!(this.inputField.is(":disabled")||this.inputField.prop("readonly")&&!1===this.o.enableOnReadonly))return this.isInline||this.picker.appendTo(this.o.container),this.place(),this.picker.show(),this._attachSecondaryEvents(),this._trigger("show"),(window.navigator.msMaxTouchPoints||"ontouchstart"in document)&&this.o.disableTouchKeyboard&&e(this.element).blur(),this},hide:function(){return this.isInline||!this.picker.is(":visible")?this:(this.focusDate=null,this.picker.hide().detach(),this._detachSecondaryEvents(),this.setViewMode(this.o.startView),this.o.forceParse&&this.inputField.val()&&this.setValue(),this._trigger("hide"),this)},destroy:function(){return this.hide(),this._detachEvents(),this._detachSecondaryEvents(),this.picker.remove(),delete this.element.data().datepicker,this.isInput||delete this.element.data().date,this},paste:function(t){var n;if(t.originalEvent.clipboardData&&t.originalEvent.clipboardData.types&&-1!==e.inArray("text/plain",t.originalEvent.clipboardData.types))n=t.originalEvent.clipboardData.getData("text/plain");else{if(!window.clipboardData)return;n=window.clipboardData.getData("Text")}this.setDate(n),this.update(),t.preventDefault()},_utc_to_local:function(e){if(!e)return e;var t=new Date(e.getTime()+6e4*e.getTimezoneOffset());return t.getTimezoneOffset()!==e.getTimezoneOffset()&&(t=new Date(e.getTime()+6e4*t.getTimezoneOffset())),t},_local_to_utc:function(e){return e&&new Date(e.getTime()-6e4*e.getTimezoneOffset())},_zero_time:function(e){return e&&new Date(e.getFullYear(),e.getMonth(),e.getDate())},_zero_utc_time:function(e){return e&&n(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate())},getDates:function(){return e.map(this.dates,this._utc_to_local)},getUTCDates:function(){return e.map(this.dates,function(e){return new Date(e)})},getDate:function(){return this._utc_to_local(this.getUTCDate())},getUTCDate:function(){var e=this.dates.get(-1);return e!==t?new Date(e):null},clearDates:function(){this.inputField.val(""),this.update(),this._trigger("changeDate"),this.o.autoclose&&this.hide()},setDates:function(){var t=e.isArray(arguments[0])?arguments[0]:arguments;return this.update.apply(this,t),this._trigger("changeDate"),this.setValue(),this},setUTCDates:function(){var t=e.isArray(arguments[0])?arguments[0]:arguments;return this.setDates.apply(this,e.map(t,this._utc_to_local)),this},setDate:o("setDates"),setUTCDate:o("setUTCDates"),remove:o("destroy","Method `remove` is deprecated and will be removed in version 2.0. Use `destroy` instead"),setValue:function(){var e=this.getFormattedDate();return this.inputField.val(e),this},getFormattedDate:function(n){n===t&&(n=this.o.format);var i=this.o.language;return e.map(this.dates,function(e){return p.formatDate(e,n,i)}).join(this.o.multidateSeparator)},getStartDate:function(){return this.o.startDate},setStartDate:function(e){return this._process_options({startDate:e}),this.update(),this.updateNavArrows(),this},getEndDate:function(){return this.o.endDate},setEndDate:function(e){return this._process_options({endDate:e}),this.update(),this.updateNavArrows(),this},setDaysOfWeekDisabled:function(e){return this._process_options({daysOfWeekDisabled:e}),this.update(),this},setDaysOfWeekHighlighted:function(e){return this._process_options({daysOfWeekHighlighted:e}),this.update(),this},setDatesDisabled:function(e){return this._process_options({datesDisabled:e}),this.update(),this},place:function(){if(this.isInline)return this;var t=this.picker.outerWidth(),n=this.picker.outerHeight(),i=e(this.o.container),r=i.width(),o="body"===this.o.container?e(document).scrollTop():i.scrollTop(),s=i.offset(),a=[0];this.element.parents().each(function(){var t=e(this).css("z-index");"auto"!==t&&0!==Number(t)&&a.push(Number(t))});var c=Math.max.apply(Math,a)+this.o.zIndexOffset,l=this.component?this.component.parent().offset():this.element.offset(),u=this.component?this.component.outerHeight(!0):this.element.outerHeight(!1),h=this.component?this.component.outerWidth(!0):this.element.outerWidth(!1),d=l.left-s.left,f=l.top-s.top;"body"!==this.o.container&&(f+=o),this.picker.removeClass("datepicker-orient-top datepicker-orient-bottom datepicker-orient-right datepicker-orient-left"),"auto"!==this.o.orientation.x?(this.picker.addClass("datepicker-orient-"+this.o.orientation.x),"right"===this.o.orientation.x&&(d-=t-h)):l.left<0?(this.picker.addClass("datepicker-orient-left"),d-=l.left-10):d+t>r?(this.picker.addClass("datepicker-orient-right"),d+=h-t):this.o.rtl?this.picker.addClass("datepicker-orient-right"):this.picker.addClass("datepicker-orient-left");var p=this.o.orientation.y;if("auto"===p&&(p=-o+f-n<0?"bottom":"top"),this.picker.addClass("datepicker-orient-"+p),"top"===p?f-=n+parseInt(this.picker.css("padding-top")):f+=u,this.o.rtl){var m=r-(d+h);this.picker.css({top:f,right:m,zIndex:c})}else this.picker.css({top:f,left:d,zIndex:c});return this},_allow_update:!0,update:function(){if(!this._allow_update)return this;var t=this.dates.copy(),n=[],i=!1;return arguments.length?(e.each(arguments,e.proxy(function(e,t){t instanceof Date&&(t=this._local_to_utc(t)),n.push(t)},this)),i=!0):(n=(n=this.isInput?this.element.val():this.element.data("date")||this.inputField.val())&&this.o.multidate?n.split(this.o.multidateSeparator):[n],delete this.element.data().date),n=e.map(n,e.proxy(function(e){return p.parseDate(e,this.o.format,this.o.language,this.o.assumeNearbyYear)},this)),n=e.grep(n,e.proxy(function(e){return!this.dateWithinRange(e)||!e},this),!0),this.dates.replace(n),this.o.updateViewDate&&(this.dates.length?this.viewDate=new Date(this.dates.get(-1)):this.viewDate<this.o.startDate?this.viewDate=new Date(this.o.startDate):this.viewDate>this.o.endDate?this.viewDate=new Date(this.o.endDate):this.viewDate=this.o.defaultViewDate),i?(this.setValue(),this.element.change()):this.dates.length&&String(t)!==String(this.dates)&&i&&(this._trigger("changeDate"),this.element.change()),!this.dates.length&&t.length&&(this._trigger("clearDate"),this.element.change()),this.fill(),this},fillDow:function(){if(this.o.showWeekDays){var t=this.o.weekStart,n="<tr>";for(this.o.calendarWeeks&&(n+='<th class="cw"> </th>');t<this.o.weekStart+7;)n+='<th class="dow',-1!==e.inArray(t,this.o.daysOfWeekDisabled)&&(n+=" disabled"),n+='">'+f[this.o.language].daysMin[t++%7]+"</th>";n+="</tr>",this.picker.find(".datepicker-days thead").append(n)}},fillMonths:function(){for(var e,t=this._utc_to_local(this.viewDate),n="",i=0;i<12;i++)e=t&&t.getMonth()===i?" focused":"",n+='<span class="month'+e+'">'+f[this.o.language].monthsShort[i]+"</span>";this.picker.find(".datepicker-months td").html(n)},setRange:function(t){t&&t.length?this.range=e.map(t,function(e){return e.valueOf()}):delete this.range,this.fill()},getClassNames:function(t){var n=[],o=this.viewDate.getUTCFullYear(),s=this.viewDate.getUTCMonth(),a=i();return t.getUTCFullYear()<o||t.getUTCFullYear()===o&&t.getUTCMonth()<s?n.push("old"):(t.getUTCFullYear()>o||t.getUTCFullYear()===o&&t.getUTCMonth()>s)&&n.push("new"),this.focusDate&&t.valueOf()===this.focusDate.valueOf()&&n.push("focused"),this.o.todayHighlight&&r(t,a)&&n.push("today"),-1!==this.dates.contains(t)&&n.push("active"),this.dateWithinRange(t)||n.push("disabled"),this.dateIsDisabled(t)&&n.push("disabled","disabled-date"),-1!==e.inArray(t.getUTCDay(),this.o.daysOfWeekHighlighted)&&n.push("highlighted"),this.range&&(t>this.range[0]&&t<this.range[this.range.length-1]&&n.push("range"),-1!==e.inArray(t.valueOf(),this.range)&&n.push("selected"),t.valueOf()===this.range[0]&&n.push("range-start"),t.valueOf()===this.range[this.range.length-1]&&n.push("range-end")),n},_fill_yearsView:function(n,i,r,o,s,a,c){for(var l,u,h,d="",f=r/10,p=this.picker.find(n),m=Math.floor(o/r)*r,v=m+9*f,g=Math.floor(this.viewDate.getFullYear()/f)*f,y=e.map(this.dates,function(e){return Math.floor(e.getUTCFullYear()/f)*f}),b=m-f;b<=v+f;b+=f)l=[i],u=null,b===m-f?l.push("old"):b===v+f&&l.push("new"),-1!==e.inArray(b,y)&&l.push("active"),(b<s||b>a)&&l.push("disabled"),b===g&&l.push("focused"),c!==e.noop&&((h=c(new Date(b,0,1)))===t?h={}:"boolean"==typeof h?h={enabled:h}:"string"==typeof h&&(h={classes:h}),!1===h.enabled&&l.push("disabled"),h.classes&&(l=l.concat(h.classes.split(/\s+/))),h.tooltip&&(u=h.tooltip)),d+='<span class="'+l.join(" ")+'"'+(u?' title="'+u+'"':"")+">"+b+"</span>";p.find(".datepicker-switch").text(m+"-"+v),p.find("td").html(d)},fill:function(){var r,o,s=new Date(this.viewDate),a=s.getUTCFullYear(),c=s.getUTCMonth(),l=this.o.startDate!==-1/0?this.o.startDate.getUTCFullYear():-1/0,u=this.o.startDate!==-1/0?this.o.startDate.getUTCMonth():-1/0,h=this.o.endDate!==1/0?this.o.endDate.getUTCFullYear():1/0,d=this.o.endDate!==1/0?this.o.endDate.getUTCMonth():1/0,m=f[this.o.language].today||f.en.today||"",v=f[this.o.language].clear||f.en.clear||"",g=f[this.o.language].titleFormat||f.en.titleFormat,y=i(),b=(!0===this.o.todayBtn||"linked"===this.o.todayBtn)&&y>=this.o.startDate&&y<=this.o.endDate&&!this.weekOfDateIsDisabled(y);if(!isNaN(a)&&!isNaN(c)){this.picker.find(".datepicker-days .datepicker-switch").text(p.formatDate(s,g,this.o.language)),this.picker.find("tfoot .today").text(m).css("display",b?"table-cell":"none"),this.picker.find("tfoot .clear").text(v).css("display",!0===this.o.clearBtn?"table-cell":"none"),this.picker.find("thead .datepicker-title").text(this.o.title).css("display","string"==typeof this.o.title&&""!==this.o.title?"table-cell":"none"),this.updateNavArrows(),this.fillMonths();var _=n(a,c,0),w=_.getUTCDate();_.setUTCDate(w-(_.getUTCDay()-this.o.weekStart+7)%7);var k=new Date(_);_.getUTCFullYear()<100&&k.setUTCFullYear(_.getUTCFullYear()),k.setUTCDate(k.getUTCDate()+42),k=k.valueOf();for(var E,C,S=[];_.valueOf()<k;){if((E=_.getUTCDay())===this.o.weekStart&&(S.push("<tr>"),this.o.calendarWeeks)){var x=new Date(+_+(this.o.weekStart-E-7)%7*864e5),T=new Date(Number(x)+(11-x.getUTCDay())%7*864e5),O=new Date(Number(O=n(T.getUTCFullYear(),0,1))+(11-O.getUTCDay())%7*864e5),A=(T-O)/864e5/7+1;S.push('<td class="cw">'+A+"</td>")}(C=this.getClassNames(_)).push("day");var D=_.getUTCDate();this.o.beforeShowDay!==e.noop&&((o=this.o.beforeShowDay(this._utc_to_local(_)))===t?o={}:"boolean"==typeof o?o={enabled:o}:"string"==typeof o&&(o={classes:o}),!1===o.enabled&&C.push("disabled"),o.classes&&(C=C.concat(o.classes.split(/\s+/))),o.tooltip&&(r=o.tooltip),o.content&&(D=o.content)),C=e.isFunction(e.uniqueSort)?e.uniqueSort(C):e.unique(C),S.push('<td class="'+C.join(" ")+'"'+(r?' title="'+r+'"':"")+' data-date="'+_.getTime().toString()+'">'+D+"</td>"),r=null,E===this.o.weekEnd&&S.push("</tr>"),_.setUTCDate(_.getUTCDate()+1)}this.picker.find(".datepicker-days tbody").html(S.join(""));var I=f[this.o.language].monthsTitle||f.en.monthsTitle||"Months",j=this.picker.find(".datepicker-months").find(".datepicker-switch").text(this.o.maxViewMode<2?I:a).end().find("tbody span").removeClass("active");if(e.each(this.dates,function(e,t){t.getUTCFullYear()===a&&j.eq(t.getUTCMonth()).addClass("active")}),(a<l||a>h)&&j.addClass("disabled"),a===l&&j.slice(0,u).addClass("disabled"),a===h&&j.slice(d+1).addClass("disabled"),this.o.beforeShowMonth!==e.noop){var N=this;e.each(j,function(n,i){var r=new Date(a,n,1),o=N.o.beforeShowMonth(r);o===t?o={}:"boolean"==typeof o?o={enabled:o}:"string"==typeof o&&(o={classes:o}),!1!==o.enabled||e(i).hasClass("disabled")||e(i).addClass("disabled"),o.classes&&e(i).addClass(o.classes),o.tooltip&&e(i).prop("title",o.tooltip)})}this._fill_yearsView(".datepicker-years","year",10,a,l,h,this.o.beforeShowYear),this._fill_yearsView(".datepicker-decades","decade",100,a,l,h,this.o.beforeShowDecade),this._fill_yearsView(".datepicker-centuries","century",1e3,a,l,h,this.o.beforeShowCentury)}},updateNavArrows:function(){if(this._allow_update){var e,t,n=new Date(this.viewDate),i=n.getUTCFullYear(),r=n.getUTCMonth(),o=this.o.startDate!==-1/0?this.o.startDate.getUTCFullYear():-1/0,s=this.o.startDate!==-1/0?this.o.startDate.getUTCMonth():-1/0,a=this.o.endDate!==1/0?this.o.endDate.getUTCFullYear():1/0,c=this.o.endDate!==1/0?this.o.endDate.getUTCMonth():1/0,l=1;switch(this.viewMode){case 4:l*=10;case 3:l*=10;case 2:l*=10;case 1:e=Math.floor(i/l)*l<=o,t=Math.floor(i/l)*l+l>a;break;case 0:e=i<=o&&r<=s,t=i>=a&&r>=c}this.picker.find(".prev").toggleClass("disabled",e),this.picker.find(".next").toggleClass("disabled",t)}},click:function(t){var r,o,s,a;t.preventDefault(),t.stopPropagation(),(r=e(t.target)).hasClass("datepicker-switch")&&this.viewMode!==this.o.maxViewMode&&this.setViewMode(this.viewMode+1),r.hasClass("today")&&!r.hasClass("day")&&(this.setViewMode(0),this._setDate(i(),"linked"===this.o.todayBtn?null:"view")),r.hasClass("clear")&&this.clearDates(),r.hasClass("disabled")||(r.hasClass("month")||r.hasClass("year")||r.hasClass("decade")||r.hasClass("century"))&&(this.viewDate.setUTCDate(1),o=1,1===this.viewMode?(a=r.parent().find("span").index(r),s=this.viewDate.getUTCFullYear(),this.viewDate.setUTCMonth(a)):(a=0,s=Number(r.text()),this.viewDate.setUTCFullYear(s)),this._trigger(p.viewModes[this.viewMode-1].e,this.viewDate),this.viewMode===this.o.minViewMode?this._setDate(n(s,a,o)):(this.setViewMode(this.viewMode-1),this.fill())),this.picker.is(":visible")&&this._focused_from&&this._focused_from.focus(),delete this._focused_from},dayCellClick:function(t){var n=e(t.currentTarget),i=n.data("date"),r=new Date(i);this.o.updateViewDate&&(r.getUTCFullYear()!==this.viewDate.getUTCFullYear()&&this._trigger("changeYear",this.viewDate),r.getUTCMonth()!==this.viewDate.getUTCMonth()&&this._trigger("changeMonth",this.viewDate)),this._setDate(r)},navArrowsClick:function(t){var n=e(t.currentTarget),i=n.hasClass("prev")?-1:1;0!==this.viewMode&&(i*=12*p.viewModes[this.viewMode].navStep),this.viewDate=this.moveMonth(this.viewDate,i),this._trigger(p.viewModes[this.viewMode].e,this.viewDate),this.fill()},_toggle_multidate:function(e){var t=this.dates.contains(e);if(e||this.dates.clear(),-1!==t?(!0===this.o.multidate||this.o.multidate>1||this.o.toggleActive)&&this.dates.remove(t):!1===this.o.multidate?(this.dates.clear(),this.dates.push(e)):this.dates.push(e),"number"==typeof this.o.multidate)for(;this.dates.length>this.o.multidate;)this.dates.remove(0)},_setDate:function(e,t){t&&"date"!==t||this._toggle_multidate(e&&new Date(e)),(!t&&this.o.updateViewDate||"view"===t)&&(this.viewDate=e&&new Date(e)),this.fill(),this.setValue(),t&&"view"===t||this._trigger("changeDate"),this.inputField.trigger("change"),!this.o.autoclose||t&&"date"!==t||this.hide()},moveDay:function(e,t){var n=new Date(e);return n.setUTCDate(e.getUTCDate()+t),n},moveWeek:function(e,t){return this.moveDay(e,7*t)},moveMonth:function(e,t){if(!function(e){return e&&!isNaN(e.getTime())}(e))return this.o.defaultViewDate;if(!t)return e;var n,i,r=new Date(e.valueOf()),o=r.getUTCDate(),s=r.getUTCMonth(),a=Math.abs(t);if(t=t>0?1:-1,1===a)i=-1===t?function(){return r.getUTCMonth()===s}:function(){return r.getUTCMonth()!==n},n=s+t,r.setUTCMonth(n),n=(n+12)%12;else{for(var c=0;c<a;c++)r=this.moveMonth(r,t);n=r.getUTCMonth(),r.setUTCDate(o),i=function(){return n!==r.getUTCMonth()}}for(;i();)r.setUTCDate(--o),r.setUTCMonth(n);return r},moveYear:function(e,t){return this.moveMonth(e,12*t)},moveAvailableDate:function(e,t,n){do{if(e=this[n](e,t),!this.dateWithinRange(e))return!1;n="moveDay"}while(this.dateIsDisabled(e));return e},weekOfDateIsDisabled:function(t){return-1!==e.inArray(t.getUTCDay(),this.o.daysOfWeekDisabled)},dateIsDisabled:function(t){return this.weekOfDateIsDisabled(t)||e.grep(this.o.datesDisabled,function(e){return r(t,e)}).length>0},dateWithinRange:function(e){return e>=this.o.startDate&&e<=this.o.endDate},keydown:function(e){if(this.picker.is(":visible")){var t,n,i=!1,r=this.focusDate||this.viewDate;switch(e.keyCode){case 27:this.focusDate?(this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.fill()):this.hide(),e.preventDefault(),e.stopPropagation();break;case 37:case 38:case 39:case 40:if(!this.o.keyboardNavigation||7===this.o.daysOfWeekDisabled.length)break;t=37===e.keyCode||38===e.keyCode?-1:1,0===this.viewMode?e.ctrlKey?(n=this.moveAvailableDate(r,t,"moveYear"))&&this._trigger("changeYear",this.viewDate):e.shiftKey?(n=this.moveAvailableDate(r,t,"moveMonth"))&&this._trigger("changeMonth",this.viewDate):37===e.keyCode||39===e.keyCode?n=this.moveAvailableDate(r,t,"moveDay"):this.weekOfDateIsDisabled(r)||(n=this.moveAvailableDate(r,t,"moveWeek")):1===this.viewMode?(38!==e.keyCode&&40!==e.keyCode||(t*=4),n=this.moveAvailableDate(r,t,"moveMonth")):2===this.viewMode&&(38!==e.keyCode&&40!==e.keyCode||(t*=4),n=this.moveAvailableDate(r,t,"moveYear")),n&&(this.focusDate=this.viewDate=n,this.setValue(),this.fill(),e.preventDefault());break;case 13:if(!this.o.forceParse)break;r=this.focusDate||this.dates.get(-1)||this.viewDate,this.o.keyboardNavigation&&(this._toggle_multidate(r),i=!0),this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.setValue(),this.fill(),this.picker.is(":visible")&&(e.preventDefault(),e.stopPropagation(),this.o.autoclose&&this.hide());break;case 9:this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.fill(),this.hide()}i&&(this.dates.length?this._trigger("changeDate"):this._trigger("clearDate"),this.inputField.trigger("change"))}else 40!==e.keyCode&&27!==e.keyCode||(this.show(),e.stopPropagation())},setViewMode:function(e){this.viewMode=e,this.picker.children("div").hide().filter(".datepicker-"+p.viewModes[this.viewMode].clsName).show(),this.updateNavArrows(),this._trigger("changeViewMode",new Date(this.viewDate))}};var c=function(t,n){e.data(t,"datepicker",this),this.element=e(t),this.inputs=e.map(n.inputs,function(e){return e.jquery?e[0]:e}),delete n.inputs,this.keepEmptyValues=n.keepEmptyValues,delete n.keepEmptyValues,u.call(e(this.inputs),n).on("changeDate",e.proxy(this.dateUpdated,this)),this.pickers=e.map(this.inputs,function(t){return e.data(t,"datepicker")}),this.updateDates()};c.prototype={updateDates:function(){this.dates=e.map(this.pickers,function(e){return e.getUTCDate()}),this.updateRanges()},updateRanges:function(){var t=e.map(this.dates,function(e){return e.valueOf()});e.each(this.pickers,function(e,n){n.setRange(t)})},clearDates:function(){e.each(this.pickers,function(e,t){t.clearDates()})},dateUpdated:function(n){if(!this.updating){this.updating=!0;var i=e.data(n.target,"datepicker");if(i!==t){var r=i.getUTCDate(),o=this.keepEmptyValues,s=e.inArray(n.target,this.inputs),a=s-1,c=s+1,l=this.inputs.length;if(-1!==s){if(e.each(this.pickers,function(e,t){t.getUTCDate()||t!==i&&o||t.setUTCDate(r)}),r<this.dates[a])for(;a>=0&&r<this.dates[a];)this.pickers[a--].setUTCDate(r);else if(r>this.dates[c])for(;c<l&&r>this.dates[c];)this.pickers[c++].setUTCDate(r);this.updateDates(),delete this.updating}}}},destroy:function(){e.map(this.pickers,function(e){e.destroy()}),e(this.inputs).off("changeDate",this.dateUpdated),delete this.element.data().datepicker},remove:o("destroy","Method `remove` is deprecated and will be removed in version 2.0. Use `destroy` instead")};var l=e.fn.datepicker,u=function(n){var i,r=Array.apply(null,arguments);if(r.shift(),this.each(function(){var t=e(this),o=t.data("datepicker"),s="object"==typeof n&&n;if(!o){var l=function(t,n){var i,r=e(t).data(),o={},s=new RegExp("^"+n.toLowerCase()+"([A-Z])");function a(e,t){return t.toLowerCase()}for(var c in n=new RegExp("^"+n.toLowerCase()),r)n.test(c)&&(i=c.replace(s,a),o[i]=r[c]);return o}(this,"date"),u=e.extend({},h,l,s),p=function(t){var n={};if(f[t]||(t=t.split("-")[0],f[t])){var i=f[t];return e.each(d,function(e,t){t in i&&(n[t]=i[t])}),n}}(u.language),m=e.extend({},h,p,l,s);t.hasClass("input-daterange")||m.inputs?(e.extend(m,{inputs:m.inputs||t.find("input").toArray()}),o=new c(this,m)):o=new a(this,m),t.data("datepicker",o)}"string"==typeof n&&"function"==typeof o[n]&&(i=o[n].apply(o,r))}),i===t||i instanceof a||i instanceof c)return this;if(this.length>1)throw new Error("Using only allowed for the collection of a single element ("+n+" function)");return i};e.fn.datepicker=u;var h=e.fn.datepicker.defaults={assumeNearbyYear:!1,autoclose:!1,beforeShowDay:e.noop,beforeShowMonth:e.noop,beforeShowYear:e.noop,beforeShowDecade:e.noop,beforeShowCentury:e.noop,calendarWeeks:!1,clearBtn:!1,toggleActive:!1,daysOfWeekDisabled:[],daysOfWeekHighlighted:[],datesDisabled:[],endDate:1/0,forceParse:!0,format:"mm/dd/yyyy",keepEmptyValues:!1,keyboardNavigation:!0,language:"en",minViewMode:0,maxViewMode:4,multidate:!1,multidateSeparator:",",orientation:"auto",rtl:!1,startDate:-1/0,startView:0,todayBtn:!1,todayHighlight:!1,updateViewDate:!0,weekStart:0,disableTouchKeyboard:!1,enableOnReadonly:!0,showOnFocus:!0,zIndexOffset:10,container:"body",immediateUpdates:!1,title:"",templates:{leftArrow:"«",rightArrow:"»"},showWeekDays:!0},d=e.fn.datepicker.locale_opts=["format","rtl","weekStart"];e.fn.datepicker.Constructor=a;var f=e.fn.datepicker.dates={en:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today",clear:"Clear",titleFormat:"MM yyyy"}},p={viewModes:[{names:["days","month"],clsName:"days",e:"changeMonth"},{names:["months","year"],clsName:"months",e:"changeYear",navStep:1},{names:["years","decade"],clsName:"years",e:"changeDecade",navStep:10},{names:["decades","century"],clsName:"decades",e:"changeCentury",navStep:100},{names:["centuries","millennium"],clsName:"centuries",e:"changeMillennium",navStep:1e3}],validParts:/dd?|DD?|mm?|MM?|yy(?:yy)?/g,nonpunctuation:/[^ -\/:-@\u5e74\u6708\u65e5\[-`{-~\t\n\r]+/g,parseFormat:function(e){if("function"==typeof e.toValue&&"function"==typeof e.toDisplay)return e;var t=e.replace(this.validParts,"\0").split("\0"),n=e.match(this.validParts);if(!t||!t.length||!n||0===n.length)throw new Error("Invalid date format.");return{separators:t,parts:n}},parseDate:function(n,r,o,s){if(!n)return t;if(n instanceof Date)return n;if("string"==typeof r&&(r=p.parseFormat(r)),r.toValue)return r.toValue(n,r,o);var c,l,u,h,d,m={d:"moveDay",m:"moveMonth",w:"moveWeek",y:"moveYear"},v={yesterday:"-1d",today:"+0d",tomorrow:"+1d"};if(n in v&&(n=v[n]),/^[\-+]\d+[dmwy]([\s,]+[\-+]\d+[dmwy])*$/i.test(n)){for(c=n.match(/([\-+]\d+)([dmwy])/gi),n=new Date,h=0;h<c.length;h++)l=c[h].match(/([\-+]\d+)([dmwy])/i),u=Number(l[1]),d=m[l[2].toLowerCase()],n=a.prototype[d](n,u);return a.prototype._zero_utc_time(n)}c=n&&n.match(this.nonpunctuation)||[];var g,y,b={},_=["yyyy","yy","M","MM","m","mm","d","dd"],w={yyyy:function(e,t){return e.setUTCFullYear(s?function(e,t){return!0===t&&(t=10),e<100&&(e+=2e3)>(new Date).getFullYear()+t&&(e-=100),e}(t,s):t)},m:function(e,t){if(isNaN(e))return e;for(t-=1;t<0;)t+=12;for(t%=12,e.setUTCMonth(t);e.getUTCMonth()!==t;)e.setUTCDate(e.getUTCDate()-1);return e},d:function(e,t){return e.setUTCDate(t)}};w.yy=w.yyyy,w.M=w.MM=w.mm=w.m,w.dd=w.d,n=i();var k=r.parts.slice();function E(){var e=this.slice(0,c[h].length),t=c[h].slice(0,e.length);return e.toLowerCase()===t.toLowerCase()}if(c.length!==k.length&&(k=e(k).filter(function(t,n){return-1!==e.inArray(n,_)}).toArray()),c.length===k.length){var C,S,x;for(h=0,C=k.length;h<C;h++){if(g=parseInt(c[h],10),l=k[h],isNaN(g))switch(l){case"MM":y=e(f[o].months).filter(E),g=e.inArray(y[0],f[o].months)+1;break;case"M":y=e(f[o].monthsShort).filter(E),g=e.inArray(y[0],f[o].monthsShort)+1}b[l]=g}for(h=0;h<_.length;h++)(x=_[h])in b&&!isNaN(b[x])&&(S=new Date(n),w[x](S,b[x]),isNaN(S)||(n=S))}return n},formatDate:function(t,n,i){if(!t)return"";if("string"==typeof n&&(n=p.parseFormat(n)),n.toDisplay)return n.toDisplay(t,n,i);var r={d:t.getUTCDate(),D:f[i].daysShort[t.getUTCDay()],DD:f[i].days[t.getUTCDay()],m:t.getUTCMonth()+1,M:f[i].monthsShort[t.getUTCMonth()],MM:f[i].months[t.getUTCMonth()],yy:t.getUTCFullYear().toString().substring(2),yyyy:t.getUTCFullYear()};r.dd=(r.d<10?"0":"")+r.d,r.mm=(r.m<10?"0":"")+r.m,t=[];for(var o=e.extend([],n.separators),s=0,a=n.parts.length;s<=a;s++)o.length&&t.push(o.shift()),t.push(r[n.parts[s]]);return t.join("")},headTemplate:'<thead><tr><th colspan="7" class="datepicker-title"></th></tr><tr><th class="prev">'+h.templates.leftArrow+'</th><th colspan="5" class="datepicker-switch"></th><th class="next">'+h.templates.rightArrow+"</th></tr></thead>",contTemplate:'<tbody><tr><td colspan="7"></td></tr></tbody>',footTemplate:'<tfoot><tr><th colspan="7" class="today"></th></tr><tr><th colspan="7" class="clear"></th></tr></tfoot>'};p.template='<div class="datepicker"><div class="datepicker-days"><table class="table-condensed">'+p.headTemplate+"<tbody></tbody>"+p.footTemplate+'</table></div><div class="datepicker-months"><table class="table-condensed">'+p.headTemplate+p.contTemplate+p.footTemplate+'</table></div><div class="datepicker-years"><table class="table-condensed">'+p.headTemplate+p.contTemplate+p.footTemplate+'</table></div><div class="datepicker-decades"><table class="table-condensed">'+p.headTemplate+p.contTemplate+p.footTemplate+'</table></div><div class="datepicker-centuries"><table class="table-condensed">'+p.headTemplate+p.contTemplate+p.footTemplate+"</table></div></div>",e.fn.datepicker.DPGlobal=p,e.fn.datepicker.noConflict=function(){return e.fn.datepicker=l,this},e.fn.datepicker.version="1.9.0",e.fn.datepicker.deprecated=function(e){var t=window.console;t&&t.warn&&t.warn("DEPRECATED: "+e)},e(document).on("focus.datepicker.data-api click.datepicker.data-api",'[data-provide="datepicker"]',function(t){var n=e(this);n.data("datepicker")||(t.preventDefault(),u.call(n,"show"))}),e(function(){u.call(e('[data-provide="datepicker-inline"]'))})})?i.apply(t,r):i)||(e.exports=o)},"./node_modules/bootstrap-select/dist/js/bootstrap-select.js":function(e,t,n){var i,r;
|
||
/*!
|
||
* Bootstrap-select v1.13.10 (https://developer.snapappointments.com/bootstrap-select)
|
||
*
|
||
* Copyright 2012-2019 SnapAppointments, LLC
|
||
* Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE)
|
||
*/
|
||
/*!
|
||
* Bootstrap-select v1.13.10 (https://developer.snapappointments.com/bootstrap-select)
|
||
*
|
||
* Copyright 2012-2019 SnapAppointments, LLC
|
||
* Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE)
|
||
*/
|
||
!function(o,s){void 0===o&&void 0!==window&&(o=window),i=[n("jquery")],void 0===(r=function(e){return function(e){!function(e){"use strict";var t=["sanitize","whiteList","sanitizeFn"],n=["background","cite","href","itemtype","longdesc","poster","src","xlink:href"],i={"*":["class","dir","id","lang","role","tabindex","style",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},r=/^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi,o=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i;function s(t,i){var s=t.nodeName.toLowerCase();if(-1!==e.inArray(s,i))return-1===e.inArray(s,n)||Boolean(t.nodeValue.match(r)||t.nodeValue.match(o));for(var a=e(i).filter(function(e,t){return t instanceof RegExp}),c=0,l=a.length;c<l;c++)if(s.match(a[c]))return!0;return!1}function a(e,t,n){if(n&&"function"==typeof n)return n(e);for(var i=Object.keys(t),r=0,o=e.length;r<o;r++)for(var a=e[r].querySelectorAll("*"),c=0,l=a.length;c<l;c++){var u=a[c],h=u.nodeName.toLowerCase();if(-1!==i.indexOf(h))for(var d=[].slice.call(u.attributes),f=[].concat(t["*"]||[],t[h]||[]),p=0,m=d.length;p<m;p++){var v=d[p];s(v,f)||u.removeAttribute(v.nodeName)}else u.parentNode.removeChild(u)}}"classList"in document.createElement("_")||function(t){if("Element"in t){var n=t.Element.prototype,i=Object,r=function(){var t=e(this);return{add:function(e){return e=Array.prototype.slice.call(arguments).join(" "),t.addClass(e)},remove:function(e){return e=Array.prototype.slice.call(arguments).join(" "),t.removeClass(e)},toggle:function(e,n){return t.toggleClass(e,n)},contains:function(e){return t.hasClass(e)}}};if(i.defineProperty){var o={get:r,enumerable:!0,configurable:!0};try{i.defineProperty(n,"classList",o)}catch(e){void 0!==e.number&&-2146823252!==e.number||(o.enumerable=!1,i.defineProperty(n,"classList",o))}}else i.prototype.__defineGetter__&&n.__defineGetter__("classList",r)}}(window);var c=document.createElement("_");if(c.classList.add("c1","c2"),!c.classList.contains("c2")){var l=DOMTokenList.prototype.add,u=DOMTokenList.prototype.remove;DOMTokenList.prototype.add=function(){Array.prototype.forEach.call(arguments,l.bind(this))},DOMTokenList.prototype.remove=function(){Array.prototype.forEach.call(arguments,u.bind(this))}}if(c.classList.toggle("c3",!1),c.classList.contains("c3")){var h=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(e,t){return 1 in arguments&&!this.contains(e)==!t?t:h.call(this,e)}}function d(e,t){for(var n,i=[],r=t||e.selectedOptions,o=0,s=r.length;o<s;o++)(n=r[o]).disabled||"OPTGROUP"===n.parentNode.tagName&&n.parentNode.disabled||i.push(n.value||n.text);return e.multiple?i:i.length?i[0]:null}c=null,String.prototype.startsWith||function(){var e=function(){try{var e={},t=Object.defineProperty,n=t(e,e,e)&&t}catch(e){}return n}(),t={}.toString,n=function(e){if(null==this)throw new TypeError;var n=String(this);if(e&&"[object RegExp]"==t.call(e))throw new TypeError;var i=n.length,r=String(e),o=r.length,s=arguments.length>1?arguments[1]:void 0,a=s?Number(s):0;a!=a&&(a=0);var c=Math.min(Math.max(a,0),i);if(o+c>i)return!1;for(var l=-1;++l<o;)if(n.charCodeAt(c+l)!=r.charCodeAt(l))return!1;return!0};e?e(String.prototype,"startsWith",{value:n,configurable:!0,writable:!0}):String.prototype.startsWith=n}(),Object.keys||(Object.keys=function(e,t,n){for(t in n=[],e)n.hasOwnProperty.call(e,t)&&n.push(t);return n}),HTMLSelectElement&&!HTMLSelectElement.prototype.hasOwnProperty("selectedOptions")&&Object.defineProperty(HTMLSelectElement.prototype,"selectedOptions",{get:function(){return this.querySelectorAll(":checked")}});var f={useDefault:!1,_set:e.valHooks.select.set};e.valHooks.select.set=function(t,n){return n&&!f.useDefault&&e(t).data("selected",!0),f._set.apply(this,arguments)};var p=null,m=function(){try{return new Event("change"),!0}catch(e){return!1}}();function v(e,t,n,i){for(var r=["display","subtext","tokens"],o=!1,s=0;s<r.length;s++){var a=r[s],c=e[a];if(c&&(c=c.toString(),"display"===a&&(c=c.replace(/<[^>]+>/g,"")),i&&(c=k(c)),c=c.toUpperCase(),o="contains"===n?c.indexOf(t)>=0:c.startsWith(t)))break}return o}function g(e){return parseInt(e,10)||0}e.fn.triggerNative=function(e){var t,n=this[0];n.dispatchEvent?(m?t=new Event(e,{bubbles:!0}):(t=document.createEvent("Event")).initEvent(e,!0,!1),n.dispatchEvent(t)):n.fireEvent?((t=document.createEventObject()).eventType=e,n.fireEvent("on"+e,t)):this.trigger(e)};var y={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"},b=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,_=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\u1ab0-\\u1aff\\u1dc0-\\u1dff]","g");function w(e){return y[e]}function k(e){return(e=e.toString())&&e.replace(b,w).replace(_,"")}var E=function(e){var t=function(t){return e[t]},n="(?:"+Object.keys(e).join("|")+")",i=RegExp(n),r=RegExp(n,"g");return function(e){return e=null==e?"":""+e,i.test(e)?e.replace(r,t):e}}({"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"}),C={32:" ",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",65:"A",66:"B",67:"C",68:"D",69:"E",70:"F",71:"G",72:"H",73:"I",74:"J",75:"K",76:"L",77:"M",78:"N",79:"O",80:"P",81:"Q",82:"R",83:"S",84:"T",85:"U",86:"V",87:"W",88:"X",89:"Y",90:"Z",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9"},S={ESCAPE:27,ENTER:13,SPACE:32,TAB:9,ARROW_UP:38,ARROW_DOWN:40},x={success:!1,major:"3"};try{x.full=(e.fn.dropdown.Constructor.VERSION||"").split(" ")[0].split("."),x.major=x.full[0],x.success=!0}catch(e){}var T=0,O=".bs.select",A={DISABLED:"disabled",DIVIDER:"divider",SHOW:"open",DROPUP:"dropup",MENU:"dropdown-menu",MENURIGHT:"dropdown-menu-right",MENULEFT:"dropdown-menu-left",BUTTONCLASS:"btn-default",POPOVERHEADER:"popover-title",ICONBASE:"glyphicon",TICKICON:"glyphicon-ok"},D={MENU:"."+A.MENU},I={span:document.createElement("span"),i:document.createElement("i"),subtext:document.createElement("small"),a:document.createElement("a"),li:document.createElement("li"),whitespace:document.createTextNode(" "),fragment:document.createDocumentFragment()};I.a.setAttribute("role","option"),I.subtext.className="text-muted",I.text=I.span.cloneNode(!1),I.text.className="text",I.checkMark=I.span.cloneNode(!1);var j=new RegExp(S.ARROW_UP+"|"+S.ARROW_DOWN),N=new RegExp("^"+S.TAB+"$|"+S.ESCAPE),P={li:function(e,t,n){var i=I.li.cloneNode(!1);return e&&(1===e.nodeType||11===e.nodeType?i.appendChild(e):i.innerHTML=e),void 0!==t&&""!==t&&(i.className=t),void 0!==n&&null!==n&&i.classList.add("optgroup-"+n),i},a:function(e,t,n){var i=I.a.cloneNode(!0);return e&&(11===e.nodeType?i.appendChild(e):i.insertAdjacentHTML("beforeend",e)),void 0!==t&&""!==t&&(i.className=t),"4"===x.major&&i.classList.add("dropdown-item"),n&&i.setAttribute("style",n),i},text:function(e,t){var n,i,r=I.text.cloneNode(!1);if(e.content)r.innerHTML=e.content;else{if(r.textContent=e.text,e.icon){var o=I.whitespace.cloneNode(!1);(i=(!0===t?I.i:I.span).cloneNode(!1)).className=e.iconBase+" "+e.icon,I.fragment.appendChild(i),I.fragment.appendChild(o)}e.subtext&&((n=I.subtext.cloneNode(!1)).textContent=e.subtext,r.appendChild(n))}if(!0===t)for(;r.childNodes.length>0;)I.fragment.appendChild(r.childNodes[0]);else I.fragment.appendChild(r);return I.fragment},label:function(e){var t,n,i=I.text.cloneNode(!1);if(i.innerHTML=e.label,e.icon){var r=I.whitespace.cloneNode(!1);(n=I.span.cloneNode(!1)).className=e.iconBase+" "+e.icon,I.fragment.appendChild(n),I.fragment.appendChild(r)}return e.subtext&&((t=I.subtext.cloneNode(!1)).textContent=e.subtext,i.appendChild(t)),I.fragment.appendChild(i),I.fragment}},L=function(t,n){var i=this;f.useDefault||(e.valHooks.select.set=f._set,f.useDefault=!0),this.$element=e(t),this.$newElement=null,this.$button=null,this.$menu=null,this.options=n,this.selectpicker={main:{},search:{},current:{},view:{},keydown:{keyHistory:"",resetKeyHistory:{start:function(){return setTimeout(function(){i.selectpicker.keydown.keyHistory=""},800)}}}},null===this.options.title&&(this.options.title=this.$element.attr("title"));var r=this.options.windowPadding;"number"==typeof r&&(this.options.windowPadding=[r,r,r,r]),this.val=L.prototype.val,this.render=L.prototype.render,this.refresh=L.prototype.refresh,this.setStyle=L.prototype.setStyle,this.selectAll=L.prototype.selectAll,this.deselectAll=L.prototype.deselectAll,this.destroy=L.prototype.destroy,this.remove=L.prototype.remove,this.show=L.prototype.show,this.hide=L.prototype.hide,this.init()};function M(n){var i,r=arguments,o=n;if([].shift.apply(r),!x.success){try{x.full=(e.fn.dropdown.Constructor.VERSION||"").split(" ")[0].split(".")}catch(e){L.BootstrapVersion?x.full=L.BootstrapVersion.split(" ")[0].split("."):(x.full=[x.major,"0","0"],console.warn("There was an issue retrieving Bootstrap's version. Ensure Bootstrap is being loaded before bootstrap-select and there is no namespace collision. If loading Bootstrap asynchronously, the version may need to be manually specified via $.fn.selectpicker.Constructor.BootstrapVersion.",e))}x.major=x.full[0],x.success=!0}if("4"===x.major){var s=[];L.DEFAULTS.style===A.BUTTONCLASS&&s.push({name:"style",className:"BUTTONCLASS"}),L.DEFAULTS.iconBase===A.ICONBASE&&s.push({name:"iconBase",className:"ICONBASE"}),L.DEFAULTS.tickIcon===A.TICKICON&&s.push({name:"tickIcon",className:"TICKICON"}),A.DIVIDER="dropdown-divider",A.SHOW="show",A.BUTTONCLASS="btn-light",A.POPOVERHEADER="popover-header",A.ICONBASE="",A.TICKICON="bs-ok-default";for(var a=0;a<s.length;a++){var n=s[a];L.DEFAULTS[n.name]=A[n.className]}}var c=this.each(function(){var n=e(this);if(n.is("select")){var s=n.data("selectpicker"),a="object"==typeof o&&o;if(s){if(a)for(var c in a)a.hasOwnProperty(c)&&(s.options[c]=a[c])}else{var l=n.data();for(var u in l)l.hasOwnProperty(u)&&-1!==e.inArray(u,t)&&delete l[u];var h=e.extend({},L.DEFAULTS,e.fn.selectpicker.defaults||{},l,a);h.template=e.extend({},L.DEFAULTS.template,e.fn.selectpicker.defaults?e.fn.selectpicker.defaults.template:{},l.template,a.template),n.data("selectpicker",s=new L(this,h))}"string"==typeof o&&(i=s[o]instanceof Function?s[o].apply(s,r):s.options[o])}});return void 0!==i?i:c}L.VERSION="1.13.10",L.DEFAULTS={noneSelectedText:"Nothing selected",noneResultsText:"No results matched {0}",countSelectedText:function(e,t){return 1==e?"{0} item selected":"{0} items selected"},maxOptionsText:function(e,t){return[1==e?"Limit reached ({n} item max)":"Limit reached ({n} items max)",1==t?"Group limit reached ({n} item max)":"Group limit reached ({n} items max)"]},selectAllText:"Select All",deselectAllText:"Deselect All",doneButton:!1,doneButtonText:"Close",multipleSeparator:", ",styleBase:"btn",style:A.BUTTONCLASS,size:"auto",title:null,selectedTextFormat:"values",width:!1,container:!1,hideDisabled:!1,showSubtext:!1,showIcon:!0,showContent:!0,dropupAuto:!0,header:!1,liveSearch:!1,liveSearchPlaceholder:null,liveSearchNormalize:!1,liveSearchStyle:"contains",actionsBox:!1,iconBase:A.ICONBASE,tickIcon:A.TICKICON,showTick:!1,template:{caret:'<span class="caret"></span>'},maxOptions:!1,mobile:!1,selectOnTab:!1,dropdownAlignRight:!1,windowPadding:0,virtualScroll:600,display:!1,sanitize:!0,sanitizeFn:null,whiteList:i},L.prototype={constructor:L,init:function(){var e=this,t=this.$element.attr("id");T++,this.selectId="bs-select-"+T,this.$element[0].classList.add("bs-select-hidden"),this.multiple=this.$element.prop("multiple"),this.autofocus=this.$element.prop("autofocus"),this.$element[0].classList.contains("show-tick")&&(this.options.showTick=!0),this.$newElement=this.createDropdown(),this.$element.after(this.$newElement).prependTo(this.$newElement),this.$button=this.$newElement.children("button"),this.$menu=this.$newElement.children(D.MENU),this.$menuInner=this.$menu.children(".inner"),this.$searchbox=this.$menu.find("input"),this.$element[0].classList.remove("bs-select-hidden"),!0===this.options.dropdownAlignRight&&this.$menu[0].classList.add(A.MENURIGHT),void 0!==t&&this.$button.attr("data-id",t),this.checkDisabled(),this.clickListener(),this.options.liveSearch?(this.liveSearchListener(),this.focusedParent=this.$searchbox[0]):this.focusedParent=this.$menuInner[0],this.setStyle(),this.render(),this.setWidth(),this.options.container?this.selectPosition():this.$element.on("hide.bs.select",function(){if(e.isVirtual()){var t=e.$menuInner[0],n=t.firstChild.cloneNode(!1);t.replaceChild(n,t.firstChild),t.scrollTop=0}}),this.$menu.data("this",this),this.$newElement.data("this",this),this.options.mobile&&this.mobile(),this.$newElement.on({"hide.bs.dropdown":function(t){e.$element.trigger("hide.bs.select",t)},"hidden.bs.dropdown":function(t){e.$element.trigger("hidden.bs.select",t)},"show.bs.dropdown":function(t){e.$element.trigger("show.bs.select",t)},"shown.bs.dropdown":function(t){e.$element.trigger("shown.bs.select",t)}}),e.$element[0].hasAttribute("required")&&this.$element.on("invalid.bs.select",function(){e.$button[0].classList.add("bs-invalid"),e.$element.on("shown.bs.select.invalid",function(){e.$element.val(e.$element.val()).off("shown.bs.select.invalid")}).on("rendered.bs.select",function(){this.validity.valid&&e.$button[0].classList.remove("bs-invalid"),e.$element.off("rendered.bs.select")}),e.$button.on("blur.bs.select",function(){e.$element.trigger("focus").trigger("blur"),e.$button.off("blur.bs.select")})}),setTimeout(function(){e.createLi(),e.$element.trigger("loaded.bs.select")})},createDropdown:function(){var t=this.multiple||this.options.showTick?" show-tick":"",n=this.multiple?' aria-multiselectable="true"':"",i="",r=this.autofocus?" autofocus":"";x.major<4&&this.$element.parent().hasClass("input-group")&&(i=" input-group-btn");var o,s="",a="",c="",l="";return this.options.header&&(s='<div class="'+A.POPOVERHEADER+'"><button type="button" class="close" aria-hidden="true">×</button>'+this.options.header+"</div>"),this.options.liveSearch&&(a='<div class="bs-searchbox"><input type="text" class="form-control" autocomplete="off"'+(null===this.options.liveSearchPlaceholder?"":' placeholder="'+E(this.options.liveSearchPlaceholder)+'"')+' role="combobox" aria-label="Search" aria-controls="'+this.selectId+'" aria-autocomplete="list"></div>'),this.multiple&&this.options.actionsBox&&(c='<div class="bs-actionsbox"><div class="btn-group btn-group-sm btn-block"><button type="button" class="actions-btn bs-select-all btn '+A.BUTTONCLASS+'">'+this.options.selectAllText+'</button><button type="button" class="actions-btn bs-deselect-all btn '+A.BUTTONCLASS+'">'+this.options.deselectAllText+"</button></div></div>"),this.multiple&&this.options.doneButton&&(l='<div class="bs-donebutton"><div class="btn-group btn-block"><button type="button" class="btn btn-sm '+A.BUTTONCLASS+'">'+this.options.doneButtonText+"</button></div></div>"),o='<div class="dropdown bootstrap-select'+t+i+'"><button type="button" class="'+this.options.styleBase+' dropdown-toggle" '+("static"===this.options.display?'data-display="static"':"")+'data-toggle="dropdown"'+r+' role="combobox" aria-owns="'+this.selectId+'" aria-haspopup="listbox" aria-expanded="false"><div class="filter-option"><div class="filter-option-inner"><div class="filter-option-inner-inner"></div></div> </div>'+("4"===x.major?"":'<span class="bs-caret">'+this.options.template.caret+"</span>")+'</button><div class="'+A.MENU+" "+("4"===x.major?"":A.SHOW)+'">'+s+a+c+'<div class="inner '+A.SHOW+'" role="listbox" id="'+this.selectId+'" tabindex="-1" '+n+'><ul class="'+A.MENU+" inner "+("4"===x.major?A.SHOW:"")+'" role="presentation"></ul></div>'+l+"</div></div>",e(o)},setPositionData:function(){this.selectpicker.view.canHighlight=[],this.selectpicker.view.size=0;for(var e=0;e<this.selectpicker.current.data.length;e++){var t=this.selectpicker.current.data[e],n=!0;"divider"===t.type?(n=!1,t.height=this.sizeInfo.dividerHeight):"optgroup-label"===t.type?(n=!1,t.height=this.sizeInfo.dropdownHeaderHeight):t.height=this.sizeInfo.liHeight,t.disabled&&(n=!1),this.selectpicker.view.canHighlight.push(n),n&&(this.selectpicker.view.size++,t.posinset=this.selectpicker.view.size),t.position=(0===e?0:this.selectpicker.current.data[e-1].position)+t.height}},isVirtual:function(){return!1!==this.options.virtualScroll&&this.selectpicker.main.elements.length>=this.options.virtualScroll||!0===this.options.virtualScroll},createView:function(t,n,i){var r,o,s=this,c=0,l=[];if(this.selectpicker.current=t?this.selectpicker.search:this.selectpicker.main,this.setPositionData(),n)if(i)c=this.$menuInner[0].scrollTop;else if(!s.multiple){var u=s.$element[0],h=(u.options[u.selectedIndex]||{}).liIndex;if("number"==typeof h&&!1!==s.options.size){var d=s.selectpicker.main.data[h],f=d&&d.position;f&&(c=f-(s.sizeInfo.menuInnerHeight+s.sizeInfo.liHeight)/2)}}function p(e,n){var i,c,u,h,d,f,p,m,v=s.selectpicker.current.elements.length,g=[],y=!0,b=s.isVirtual();s.selectpicker.view.scrollTop=e,!0===b&&s.sizeInfo.hasScrollBar&&s.$menu[0].offsetWidth>s.sizeInfo.totalMenuWidth&&(s.sizeInfo.menuWidth=s.$menu[0].offsetWidth,s.sizeInfo.totalMenuWidth=s.sizeInfo.menuWidth+s.sizeInfo.scrollBarWidth,s.$menu.css("min-width",s.sizeInfo.menuWidth)),i=Math.ceil(s.sizeInfo.menuInnerHeight/s.sizeInfo.liHeight*1.5),c=Math.round(v/i)||1;for(var _=0;_<c;_++){var w=(_+1)*i;if(_===c-1&&(w=v),g[_]=[_*i+(_?1:0),w],!v)break;void 0===d&&e<=s.selectpicker.current.data[w-1].position-s.sizeInfo.menuInnerHeight&&(d=_)}if(void 0===d&&(d=0),f=[s.selectpicker.view.position0,s.selectpicker.view.position1],u=Math.max(0,d-1),h=Math.min(c-1,d+1),s.selectpicker.view.position0=!1===b?0:Math.max(0,g[u][0])||0,s.selectpicker.view.position1=!1===b?v:Math.min(v,g[h][1])||0,p=f[0]!==s.selectpicker.view.position0||f[1]!==s.selectpicker.view.position1,void 0!==s.activeIndex&&(o=s.selectpicker.main.elements[s.prevActiveIndex],l=s.selectpicker.main.elements[s.activeIndex],r=s.selectpicker.main.elements[s.selectedIndex],n&&(s.activeIndex!==s.selectedIndex&&s.defocusItem(l),s.activeIndex=void 0),s.activeIndex&&s.activeIndex!==s.selectedIndex&&s.defocusItem(r)),void 0!==s.prevActiveIndex&&s.prevActiveIndex!==s.activeIndex&&s.prevActiveIndex!==s.selectedIndex&&s.defocusItem(o),(n||p)&&(m=s.selectpicker.view.visibleElements?s.selectpicker.view.visibleElements.slice():[],s.selectpicker.view.visibleElements=!1===b?s.selectpicker.current.elements:s.selectpicker.current.elements.slice(s.selectpicker.view.position0,s.selectpicker.view.position1),s.setOptionStatus(),(t||!1===b&&n)&&(y=!function(e,t){return e.length===t.length&&e.every(function(e,n){return e===t[n]})}(m,s.selectpicker.view.visibleElements)),(n||!0===b)&&y)){var k,E,C=s.$menuInner[0],S=document.createDocumentFragment(),x=C.firstChild.cloneNode(!1),T=s.selectpicker.view.visibleElements,O=[];C.replaceChild(x,C.firstChild);for(var _=0,A=T.length;_<A;_++){var D,I,j=T[_];s.options.sanitize&&(D=j.lastChild)&&(I=s.selectpicker.current.data[_+s.selectpicker.view.position0])&&I.content&&!I.sanitized&&(O.push(D),I.sanitized=!0),S.appendChild(j)}s.options.sanitize&&O.length&&a(O,s.options.whiteList,s.options.sanitizeFn),!0===b?(k=0===s.selectpicker.view.position0?0:s.selectpicker.current.data[s.selectpicker.view.position0-1].position,E=s.selectpicker.view.position1>v-1?0:s.selectpicker.current.data[v-1].position-s.selectpicker.current.data[s.selectpicker.view.position1-1].position,C.firstChild.style.marginTop=k+"px",C.firstChild.style.marginBottom=E+"px"):(C.firstChild.style.marginTop=0,C.firstChild.style.marginBottom=0),C.firstChild.appendChild(S)}if(s.prevActiveIndex=s.activeIndex,s.options.liveSearch){if(t&&n){var N,P=0;s.selectpicker.view.canHighlight[P]||(P=1+s.selectpicker.view.canHighlight.slice(1).indexOf(!0)),N=s.selectpicker.view.visibleElements[P],s.defocusItem(s.selectpicker.view.currentActive),s.activeIndex=(s.selectpicker.current.data[P]||{}).index,s.focusItem(N)}}else s.$menuInner.trigger("focus")}p(c,!0),this.$menuInner.off("scroll.createView").on("scroll.createView",function(e,t){s.noScroll||p(this.scrollTop,t),s.noScroll=!1}),e(window).off("resize.bs.select."+this.selectId+".createView").on("resize.bs.select."+this.selectId+".createView",function(){var e=s.$newElement.hasClass(A.SHOW);e&&p(s.$menuInner[0].scrollTop)})},focusItem:function(e,t,n){if(e){t=t||this.selectpicker.main.data[this.activeIndex];var i=e.firstChild;i&&(i.setAttribute("aria-setsize",this.selectpicker.view.size),i.setAttribute("aria-posinset",t.posinset),!0!==n&&(this.focusedParent.setAttribute("aria-activedescendant",i.id),e.classList.add("active"),i.classList.add("active")))}},defocusItem:function(e){e&&(e.classList.remove("active"),e.firstChild&&e.firstChild.classList.remove("active"))},setPlaceholder:function(){var t=!1;if(this.options.title&&!this.multiple){this.selectpicker.view.titleOption||(this.selectpicker.view.titleOption=document.createElement("option")),t=!0;var n=this.$element[0],i=!1,r=!this.selectpicker.view.titleOption.parentNode;if(r){this.selectpicker.view.titleOption.className="bs-title-option",this.selectpicker.view.titleOption.value="";var o=e(n.options[n.selectedIndex]);i=void 0===o.attr("selected")&&void 0===this.$element.data("selected")}(r||0!==this.selectpicker.view.titleOption.index)&&n.insertBefore(this.selectpicker.view.titleOption,n.firstChild),i&&(n.selectedIndex=0)}return t},createLi:function(){var e=this,t=this.options.iconBase,n=':not([hidden]):not([data-hidden="true"])',i=[],r=[],o=0,s=0,a=this.setPlaceholder()?1:0;this.options.hideDisabled&&(n+=":not(:disabled)"),!e.options.showTick&&!e.multiple||I.checkMark.parentNode||(I.checkMark.className=t+" "+e.options.tickIcon+" check-mark",I.a.appendChild(I.checkMark));var c=this.$element[0].querySelectorAll("select > *"+n);function l(e){var t=r[r.length-1];t&&"divider"===t.type&&(t.optID||e.optID)||((e=e||{}).type="divider",i.push(P.li(!1,A.DIVIDER,e.optID?e.optID+"div":void 0)),r.push(e))}function u(n,s){if((s=s||{}).divider="true"===n.getAttribute("data-divider"),s.divider)l({optID:s.optID});else{var a=r.length,c=n.style.cssText,u=c?E(c):"",h=(n.className||"")+(s.optgroupClass||"");s.optID&&(h="opt "+h),s.text=n.textContent,s.content=n.getAttribute("data-content"),s.tokens=n.getAttribute("data-tokens"),s.subtext=n.getAttribute("data-subtext"),s.icon=n.getAttribute("data-icon"),s.iconBase=t;var d=P.text(s),f=P.li(P.a(d,h,u),"",s.optID);f.firstChild&&(f.firstChild.id=e.selectId+"-"+a),i.push(f),n.liIndex=a,s.display=s.content||s.text,s.type="option",s.index=a,s.option=n,s.disabled=s.disabled||n.disabled,r.push(s);var p=0;s.display&&(p+=s.display.length),s.subtext&&(p+=s.subtext.length),s.icon&&(p+=1),p>o&&(o=p,e.selectpicker.view.widestOption=i[i.length-1])}}function h(e,o){var a=o[e],c=o[e-1],h=o[e+1],d=a.querySelectorAll("option"+n);if(d.length){var f,p,m={label:E(a.label),subtext:a.getAttribute("data-subtext"),icon:a.getAttribute("data-icon"),iconBase:t},v=" "+(a.className||"");s++,c&&l({optID:s});var g=P.label(m);i.push(P.li(g,"dropdown-header"+v,s)),r.push({display:m.label,subtext:m.subtext,type:"optgroup-label",optID:s});for(var y=0,b=d.length;y<b;y++){var _=d[y];0===y&&(f=r.length-1,p=f+b),u(_,{headerIndex:f,lastIndex:p,optID:s,optgroupClass:v,disabled:a.disabled})}h&&l({optID:s})}}for(var d=c.length;a<d;a++){var f=c[a];"OPTGROUP"!==f.tagName?u(f,{}):h(a,c)}this.selectpicker.main.elements=i,this.selectpicker.main.data=r,this.selectpicker.current=this.selectpicker.main},findLis:function(){return this.$menuInner.find(".inner > li")},render:function(){this.setPlaceholder();var e,t,n=this.$element[0],i=function(e,t){var n,i=e.selectedOptions,r=[];if(t){for(var o=0,s=i.length;o<s;o++)(n=i[o]).disabled||"OPTGROUP"===n.parentNode.tagName&&n.parentNode.disabled||r.push(n);return r}return i}(n,this.options.hideDisabled),r=i.length,o=this.$button[0],s=o.querySelector(".filter-option-inner-inner"),c=document.createTextNode(this.options.multipleSeparator),l=I.fragment.cloneNode(!1),u=!1;if(o.classList.toggle("bs-placeholder",this.multiple?!r:!d(n,i)),this.tabIndex(),"static"===this.options.selectedTextFormat)l=P.text({text:this.options.title},!0);else if((e=this.multiple&&-1!==this.options.selectedTextFormat.indexOf("count")&&r>1)&&(t=this.options.selectedTextFormat.split(">"),e=t.length>1&&r>t[1]||1===t.length&&r>=2),!1===e){for(var h=0;h<r&&h<50;h++){var f=i[h],p={},m={content:f.getAttribute("data-content"),subtext:f.getAttribute("data-subtext"),icon:f.getAttribute("data-icon")};this.multiple&&h>0&&l.appendChild(c.cloneNode(!1)),f.title?p.text=f.title:m.content&&this.options.showContent?(p.content=m.content.toString(),u=!0):(this.options.showIcon&&(p.icon=m.icon,p.iconBase=this.options.iconBase),this.options.showSubtext&&!this.multiple&&m.subtext&&(p.subtext=" "+m.subtext),p.text=f.textContent.trim()),l.appendChild(P.text(p,!0))}r>49&&l.appendChild(document.createTextNode("..."))}else{var v=':not([hidden]):not([data-hidden="true"]):not([data-divider="true"])';this.options.hideDisabled&&(v+=":not(:disabled)");var g=this.$element[0].querySelectorAll("select > option"+v+", optgroup"+v+" option"+v).length,y="function"==typeof this.options.countSelectedText?this.options.countSelectedText(r,g):this.options.countSelectedText;l=P.text({text:y.replace("{0}",r.toString()).replace("{1}",g.toString())},!0)}if(void 0==this.options.title&&(this.options.title=this.$element.attr("title")),l.childNodes.length||(l=P.text({text:void 0!==this.options.title?this.options.title:this.options.noneSelectedText},!0)),o.title=l.textContent.replace(/<[^>]*>?/g,"").trim(),this.options.sanitize&&u&&a([l],this.options.whiteList,this.options.sanitizeFn),s.innerHTML="",s.appendChild(l),x.major<4&&this.$newElement[0].classList.contains("bs3-has-addon")){var b=o.querySelector(".filter-expand"),_=s.cloneNode(!0);_.className="filter-expand",b?o.replaceChild(_,b):o.appendChild(_)}this.$element.trigger("rendered.bs.select")},setStyle:function(e,t){var n,i=this.$button[0],r=this.$newElement[0],o=this.options.style.trim();this.$element.attr("class")&&this.$newElement.addClass(this.$element.attr("class").replace(/selectpicker|mobile-device|bs-select-hidden|validate\[.*\]/gi,"")),x.major<4&&(r.classList.add("bs3"),r.parentNode.classList.contains("input-group")&&(r.previousElementSibling||r.nextElementSibling)&&(r.previousElementSibling||r.nextElementSibling).classList.contains("input-group-addon")&&r.classList.add("bs3-has-addon")),n=e?e.trim():o,"add"==t?n&&i.classList.add.apply(i.classList,n.split(" ")):"remove"==t?n&&i.classList.remove.apply(i.classList,n.split(" ")):(o&&i.classList.remove.apply(i.classList,o.split(" ")),n&&i.classList.add.apply(i.classList,n.split(" ")))},liHeight:function(t){if(t||!1!==this.options.size&&!this.sizeInfo){this.sizeInfo||(this.sizeInfo={});var n=document.createElement("div"),i=document.createElement("div"),r=document.createElement("div"),o=document.createElement("ul"),s=document.createElement("li"),a=document.createElement("li"),c=document.createElement("li"),l=document.createElement("a"),u=document.createElement("span"),h=this.options.header&&this.$menu.find("."+A.POPOVERHEADER).length>0?this.$menu.find("."+A.POPOVERHEADER)[0].cloneNode(!0):null,d=this.options.liveSearch?document.createElement("div"):null,f=this.options.actionsBox&&this.multiple&&this.$menu.find(".bs-actionsbox").length>0?this.$menu.find(".bs-actionsbox")[0].cloneNode(!0):null,p=this.options.doneButton&&this.multiple&&this.$menu.find(".bs-donebutton").length>0?this.$menu.find(".bs-donebutton")[0].cloneNode(!0):null,m=this.$element.find("option")[0];if(this.sizeInfo.selectWidth=this.$newElement[0].offsetWidth,u.className="text",l.className="dropdown-item "+(m?m.className:""),n.className=this.$menu[0].parentNode.className+" "+A.SHOW,n.style.width=this.sizeInfo.selectWidth+"px","auto"===this.options.width&&(i.style.minWidth=0),i.className=A.MENU+" "+A.SHOW,r.className="inner "+A.SHOW,o.className=A.MENU+" inner "+("4"===x.major?A.SHOW:""),s.className=A.DIVIDER,a.className="dropdown-header",u.appendChild(document.createTextNode("")),l.appendChild(u),c.appendChild(l),a.appendChild(u.cloneNode(!0)),this.selectpicker.view.widestOption&&o.appendChild(this.selectpicker.view.widestOption.cloneNode(!0)),o.appendChild(c),o.appendChild(s),o.appendChild(a),h&&i.appendChild(h),d){var v=document.createElement("input");d.className="bs-searchbox",v.className="form-control",d.appendChild(v),i.appendChild(d)}f&&i.appendChild(f),r.appendChild(o),i.appendChild(r),p&&i.appendChild(p),n.appendChild(i),document.body.appendChild(n);var y,b=c.offsetHeight,_=a?a.offsetHeight:0,w=h?h.offsetHeight:0,k=d?d.offsetHeight:0,E=f?f.offsetHeight:0,C=p?p.offsetHeight:0,S=e(s).outerHeight(!0),T=!!window.getComputedStyle&&window.getComputedStyle(i),O=i.offsetWidth,D=T?null:e(i),I={vert:g(T?T.paddingTop:D.css("paddingTop"))+g(T?T.paddingBottom:D.css("paddingBottom"))+g(T?T.borderTopWidth:D.css("borderTopWidth"))+g(T?T.borderBottomWidth:D.css("borderBottomWidth")),horiz:g(T?T.paddingLeft:D.css("paddingLeft"))+g(T?T.paddingRight:D.css("paddingRight"))+g(T?T.borderLeftWidth:D.css("borderLeftWidth"))+g(T?T.borderRightWidth:D.css("borderRightWidth"))},j={vert:I.vert+g(T?T.marginTop:D.css("marginTop"))+g(T?T.marginBottom:D.css("marginBottom"))+2,horiz:I.horiz+g(T?T.marginLeft:D.css("marginLeft"))+g(T?T.marginRight:D.css("marginRight"))+2};r.style.overflowY="scroll",y=i.offsetWidth-O,document.body.removeChild(n),this.sizeInfo.liHeight=b,this.sizeInfo.dropdownHeaderHeight=_,this.sizeInfo.headerHeight=w,this.sizeInfo.searchHeight=k,this.sizeInfo.actionsHeight=E,this.sizeInfo.doneButtonHeight=C,this.sizeInfo.dividerHeight=S,this.sizeInfo.menuPadding=I,this.sizeInfo.menuExtras=j,this.sizeInfo.menuWidth=O,this.sizeInfo.totalMenuWidth=this.sizeInfo.menuWidth,this.sizeInfo.scrollBarWidth=y,this.sizeInfo.selectHeight=this.$newElement[0].offsetHeight,this.setPositionData()}},getSelectPosition:function(){var t,n=e(window),i=this.$newElement.offset(),r=e(this.options.container);this.options.container&&r.length&&!r.is("body")?((t=r.offset()).top+=parseInt(r.css("borderTopWidth")),t.left+=parseInt(r.css("borderLeftWidth"))):t={top:0,left:0};var o=this.options.windowPadding;this.sizeInfo.selectOffsetTop=i.top-t.top-n.scrollTop(),this.sizeInfo.selectOffsetBot=n.height()-this.sizeInfo.selectOffsetTop-this.sizeInfo.selectHeight-t.top-o[2],this.sizeInfo.selectOffsetLeft=i.left-t.left-n.scrollLeft(),this.sizeInfo.selectOffsetRight=n.width()-this.sizeInfo.selectOffsetLeft-this.sizeInfo.selectWidth-t.left-o[1],this.sizeInfo.selectOffsetTop-=o[0],this.sizeInfo.selectOffsetLeft-=o[3]},setMenuSize:function(e){this.getSelectPosition();var t,n,i,r,o,s,a,c=this.sizeInfo.selectWidth,l=this.sizeInfo.liHeight,u=this.sizeInfo.headerHeight,h=this.sizeInfo.searchHeight,d=this.sizeInfo.actionsHeight,f=this.sizeInfo.doneButtonHeight,p=this.sizeInfo.dividerHeight,m=this.sizeInfo.menuPadding,v=0;if(this.options.dropupAuto&&(a=l*this.selectpicker.current.elements.length+m.vert,this.$newElement.toggleClass(A.DROPUP,this.sizeInfo.selectOffsetTop-this.sizeInfo.selectOffsetBot>this.sizeInfo.menuExtras.vert&&a+this.sizeInfo.menuExtras.vert+50>this.sizeInfo.selectOffsetBot)),"auto"===this.options.size)r=this.selectpicker.current.elements.length>3?3*this.sizeInfo.liHeight+this.sizeInfo.menuExtras.vert-2:0,n=this.sizeInfo.selectOffsetBot-this.sizeInfo.menuExtras.vert,i=r+u+h+d+f,s=Math.max(r-m.vert,0),this.$newElement.hasClass(A.DROPUP)&&(n=this.sizeInfo.selectOffsetTop-this.sizeInfo.menuExtras.vert),o=n,t=n-u-h-d-f-m.vert;else if(this.options.size&&"auto"!=this.options.size&&this.selectpicker.current.elements.length>this.options.size){for(var g=0;g<this.options.size;g++)"divider"===this.selectpicker.current.data[g].type&&v++;n=l*this.options.size+v*p+m.vert,t=n-m.vert,o=n+u+h+d+f,i=s=""}"auto"===this.options.dropdownAlignRight&&this.$menu.toggleClass(A.MENURIGHT,this.sizeInfo.selectOffsetLeft>this.sizeInfo.selectOffsetRight&&this.sizeInfo.selectOffsetRight<this.sizeInfo.totalMenuWidth-c),this.$menu.css({"max-height":o+"px",overflow:"hidden","min-height":i+"px"}),this.$menuInner.css({"max-height":t+"px","overflow-y":"auto","min-height":s+"px"}),this.sizeInfo.menuInnerHeight=Math.max(t,1),this.selectpicker.current.data.length&&this.selectpicker.current.data[this.selectpicker.current.data.length-1].position>this.sizeInfo.menuInnerHeight&&(this.sizeInfo.hasScrollBar=!0,this.sizeInfo.totalMenuWidth=this.sizeInfo.menuWidth+this.sizeInfo.scrollBarWidth,this.$menu.css("min-width",this.sizeInfo.totalMenuWidth)),this.dropdown&&this.dropdown._popper&&this.dropdown._popper.update()},setSize:function(t){if(this.liHeight(t),this.options.header&&this.$menu.css("padding-top",0),!1!==this.options.size){var n=this,i=e(window);this.setMenuSize(),this.options.liveSearch&&this.$searchbox.off("input.setMenuSize propertychange.setMenuSize").on("input.setMenuSize propertychange.setMenuSize",function(){return n.setMenuSize()}),"auto"===this.options.size?i.off("resize.bs.select."+this.selectId+".setMenuSize scroll"+O+"."+this.selectId+".setMenuSize").on("resize.bs.select."+this.selectId+".setMenuSize scroll"+O+"."+this.selectId+".setMenuSize",function(){return n.setMenuSize()}):this.options.size&&"auto"!=this.options.size&&this.selectpicker.current.elements.length>this.options.size&&i.off("resize.bs.select."+this.selectId+".setMenuSize scroll"+O+"."+this.selectId+".setMenuSize"),n.createView(!1,!0,t)}},setWidth:function(){var e=this;"auto"===this.options.width?requestAnimationFrame(function(){e.$menu.css("min-width","0"),e.$element.on("loaded.bs.select",function(){e.liHeight(),e.setMenuSize();var t=e.$newElement.clone().appendTo("body"),n=t.css("width","auto").children("button").outerWidth();t.remove(),e.sizeInfo.selectWidth=Math.max(e.sizeInfo.totalMenuWidth,n),e.$newElement.css("width",e.sizeInfo.selectWidth+"px")})}):"fit"===this.options.width?(this.$menu.css("min-width",""),this.$newElement.css("width","").addClass("fit-width")):this.options.width?(this.$menu.css("min-width",""),this.$newElement.css("width",this.options.width)):(this.$menu.css("min-width",""),this.$newElement.css("width","")),this.$newElement.hasClass("fit-width")&&"fit"!==this.options.width&&this.$newElement[0].classList.remove("fit-width")},selectPosition:function(){this.$bsContainer=e('<div class="bs-container" />');var t,n,i,r=this,o=e(this.options.container),s=function(s){var a={},c=r.options.display||!!e.fn.dropdown.Constructor.Default&&e.fn.dropdown.Constructor.Default.display;r.$bsContainer.addClass(s.attr("class").replace(/form-control|fit-width/gi,"")).toggleClass(A.DROPUP,s.hasClass(A.DROPUP)),t=s.offset(),o.is("body")?n={top:0,left:0}:((n=o.offset()).top+=parseInt(o.css("borderTopWidth"))-o.scrollTop(),n.left+=parseInt(o.css("borderLeftWidth"))-o.scrollLeft()),i=s.hasClass(A.DROPUP)?0:s[0].offsetHeight,(x.major<4||"static"===c)&&(a.top=t.top-n.top+i,a.left=t.left-n.left),a.width=s[0].offsetWidth,r.$bsContainer.css(a)};this.$button.on("click.bs.dropdown.data-api",function(){r.isDisabled()||(s(r.$newElement),r.$bsContainer.appendTo(r.options.container).toggleClass(A.SHOW,!r.$button.hasClass(A.SHOW)).append(r.$menu))}),e(window).off("resize.bs.select."+this.selectId+" scroll"+O+"."+this.selectId).on("resize.bs.select."+this.selectId+" scroll"+O+"."+this.selectId,function(){var e=r.$newElement.hasClass(A.SHOW);e&&s(r.$newElement)}),this.$element.on("hide.bs.select",function(){r.$menu.data("height",r.$menu.height()),r.$bsContainer.detach()})},setOptionStatus:function(e){if(this.noScroll=!1,this.selectpicker.view.visibleElements&&this.selectpicker.view.visibleElements.length)for(var t=0;t<this.selectpicker.view.visibleElements.length;t++){var n=this.selectpicker.current.data[t+this.selectpicker.view.position0],i=n.option;i&&(!0!==e&&this.setDisabled(n.index,n.disabled),this.setSelected(n.index,i.selected))}},setSelected:function(e,t){var n,i,r=this.selectpicker.main.elements[e],o=this.selectpicker.main.data[e],s=void 0!==this.activeIndex,a=this.activeIndex===e,c=a||t&&!this.multiple&&!s;o.selected=t,i=r.firstChild,t&&(this.selectedIndex=e),r.classList.toggle("selected",t),c?(this.focusItem(r,o),this.selectpicker.view.currentActive=r,this.activeIndex=e):this.defocusItem(r),i&&(i.classList.toggle("selected",t),t?i.setAttribute("aria-selected",!0):this.multiple?i.setAttribute("aria-selected",!1):i.removeAttribute("aria-selected")),c||s||!t||void 0===this.prevActiveIndex||(n=this.selectpicker.main.elements[this.prevActiveIndex],this.defocusItem(n))},setDisabled:function(e,t){var n,i=this.selectpicker.main.elements[e];this.selectpicker.main.data[e].disabled=t,n=i.firstChild,i.classList.toggle(A.DISABLED,t),n&&("4"===x.major&&n.classList.toggle(A.DISABLED,t),t?(n.setAttribute("aria-disabled",t),n.setAttribute("tabindex",-1)):(n.removeAttribute("aria-disabled"),n.setAttribute("tabindex",0)))},isDisabled:function(){return this.$element[0].disabled},checkDisabled:function(){var e=this;this.isDisabled()?(this.$newElement[0].classList.add(A.DISABLED),this.$button.addClass(A.DISABLED).attr("tabindex",-1).attr("aria-disabled",!0)):(this.$button[0].classList.contains(A.DISABLED)&&(this.$newElement[0].classList.remove(A.DISABLED),this.$button.removeClass(A.DISABLED).attr("aria-disabled",!1)),-1!=this.$button.attr("tabindex")||this.$element.data("tabindex")||this.$button.removeAttr("tabindex")),this.$button.on("click",function(){return!e.isDisabled()})},tabIndex:function(){this.$element.data("tabindex")!==this.$element.attr("tabindex")&&-98!==this.$element.attr("tabindex")&&"-98"!==this.$element.attr("tabindex")&&(this.$element.data("tabindex",this.$element.attr("tabindex")),this.$button.attr("tabindex",this.$element.data("tabindex"))),this.$element.attr("tabindex",-98)},clickListener:function(){var t=this,n=e(document);function i(){t.options.liveSearch?t.$searchbox.trigger("focus"):t.$menuInner.trigger("focus")}function r(){t.dropdown&&t.dropdown._popper&&t.dropdown._popper.state.isCreated?i():requestAnimationFrame(r)}n.data("spaceSelect",!1),this.$button.on("keyup",function(e){/(32)/.test(e.keyCode.toString(10))&&n.data("spaceSelect")&&(e.preventDefault(),n.data("spaceSelect",!1))}),this.$newElement.on("show.bs.dropdown",function(){x.major>3&&!t.dropdown&&(t.dropdown=t.$button.data("bs.dropdown"),t.dropdown._menu=t.$menu[0])}),this.$button.on("click.bs.dropdown.data-api",function(){t.$newElement.hasClass(A.SHOW)||t.setSize()}),this.$element.on("shown.bs.select",function(){t.$menuInner[0].scrollTop!==t.selectpicker.view.scrollTop&&(t.$menuInner[0].scrollTop=t.selectpicker.view.scrollTop),x.major>3?requestAnimationFrame(r):i()}),this.$menuInner.on("mouseenter","li a",function(e){var n=this.parentElement,i=t.isVirtual()?t.selectpicker.view.position0:0,r=Array.prototype.indexOf.call(n.parentElement.children,n),o=t.selectpicker.current.data[r+i];t.focusItem(n,o,!0)}),this.$menuInner.on("click","li a",function(n,i){var r=e(this),o=t.$element[0],s=t.isVirtual()?t.selectpicker.view.position0:0,a=t.selectpicker.current.data[r.parent().index()+s],c=a.index,l=d(o),u=o.selectedIndex,h=o.options[u],f=!0;if(t.multiple&&1!==t.options.maxOptions&&n.stopPropagation(),n.preventDefault(),!t.isDisabled()&&!r.parent().hasClass(A.DISABLED)){var m=t.$element.find("option"),v=a.option,g=e(v),y=v.selected,b=g.parent("optgroup"),_=b.find("option"),w=t.options.maxOptions,k=b.data("maxOptions")||!1;if(c===t.activeIndex&&(i=!0),i||(t.prevActiveIndex=t.activeIndex,t.activeIndex=void 0),t.multiple){if(v.selected=!y,t.setSelected(c,!y),r.trigger("blur"),!1!==w||!1!==k){var E=w<m.filter(":selected").length,C=k<b.find("option:selected").length;if(w&&E||k&&C)if(w&&1==w){m.prop("selected",!1),g.prop("selected",!0);for(var S=0;S<m.length;S++)t.setSelected(S,!1);t.setSelected(c,!0)}else if(k&&1==k){b.find("option:selected").prop("selected",!1),g.prop("selected",!0);for(var S=0;S<_.length;S++){var v=_[S];t.setSelected(m.index(v),!1)}t.setSelected(c,!0)}else{var x="string"==typeof t.options.maxOptionsText?[t.options.maxOptionsText,t.options.maxOptionsText]:t.options.maxOptionsText,T="function"==typeof x?x(w,k):x,O=T[0].replace("{n}",w),D=T[1].replace("{n}",k),I=e('<div class="notify"></div>');T[2]&&(O=O.replace("{var}",T[2][w>1?0:1]),D=D.replace("{var}",T[2][k>1?0:1])),g.prop("selected",!1),t.$menu.append(I),w&&E&&(I.append(e("<div>"+O+"</div>")),f=!1,t.$element.trigger("maxReached.bs.select")),k&&C&&(I.append(e("<div>"+D+"</div>")),f=!1,t.$element.trigger("maxReachedGrp.bs.select")),setTimeout(function(){t.setSelected(c,!1)},10),I.delay(750).fadeOut(300,function(){e(this).remove()})}}}else h.selected=!1,v.selected=!0,t.setSelected(c,!0);!t.multiple||t.multiple&&1===t.options.maxOptions?t.$button.trigger("focus"):t.options.liveSearch&&t.$searchbox.trigger("focus"),f&&(t.multiple||u!==o.selectedIndex)&&(p=[v.index,g.prop("selected"),l],t.$element.triggerNative("change"))}}),this.$menu.on("click","li."+A.DISABLED+" a, ."+A.POPOVERHEADER+", ."+A.POPOVERHEADER+" :not(.close)",function(n){n.currentTarget==this&&(n.preventDefault(),n.stopPropagation(),t.options.liveSearch&&!e(n.target).hasClass("close")?t.$searchbox.trigger("focus"):t.$button.trigger("focus"))}),this.$menuInner.on("click",".divider, .dropdown-header",function(e){e.preventDefault(),e.stopPropagation(),t.options.liveSearch?t.$searchbox.trigger("focus"):t.$button.trigger("focus")}),this.$menu.on("click","."+A.POPOVERHEADER+" .close",function(){t.$button.trigger("click")}),this.$searchbox.on("click",function(e){e.stopPropagation()}),this.$menu.on("click",".actions-btn",function(n){t.options.liveSearch?t.$searchbox.trigger("focus"):t.$button.trigger("focus"),n.preventDefault(),n.stopPropagation(),e(this).hasClass("bs-select-all")?t.selectAll():t.deselectAll()}),this.$element.on("change.bs.select",function(){t.render(),t.$element.trigger("changed.bs.select",p),p=null}).on("focus.bs.select",function(){t.options.mobile||t.$button.trigger("focus")})},liveSearchListener:function(){var e=this,t=document.createElement("li");this.$button.on("click.bs.dropdown.data-api",function(){e.$searchbox.val()&&e.$searchbox.val("")}),this.$searchbox.on("click.bs.dropdown.data-api focus.bs.dropdown.data-api touchend.bs.dropdown.data-api",function(e){e.stopPropagation()}),this.$searchbox.on("input propertychange",function(){var n=e.$searchbox.val();if(e.selectpicker.search.elements=[],e.selectpicker.search.data=[],n){var i=[],r=n.toUpperCase(),o={},s=[],a=e._searchStyle(),c=e.options.liveSearchNormalize;c&&(r=k(r)),e._$lisSelected=e.$menuInner.find(".selected");for(var l=0;l<e.selectpicker.main.data.length;l++){var u=e.selectpicker.main.data[l];o[l]||(o[l]=v(u,r,a,c)),o[l]&&void 0!==u.headerIndex&&-1===s.indexOf(u.headerIndex)&&(u.headerIndex>0&&(o[u.headerIndex-1]=!0,s.push(u.headerIndex-1)),o[u.headerIndex]=!0,s.push(u.headerIndex),o[u.lastIndex+1]=!0),o[l]&&"optgroup-label"!==u.type&&s.push(l)}for(var l=0,h=s.length;l<h;l++){var d=s[l],f=s[l-1],u=e.selectpicker.main.data[d],p=e.selectpicker.main.data[f];("divider"!==u.type||"divider"===u.type&&p&&"divider"!==p.type&&h-1!==l)&&(e.selectpicker.search.data.push(u),i.push(e.selectpicker.main.elements[d]))}e.activeIndex=void 0,e.noScroll=!0,e.$menuInner.scrollTop(0),e.selectpicker.search.elements=i,e.createView(!0),i.length||(t.className="no-results",t.innerHTML=e.options.noneResultsText.replace("{0}",'"'+E(n)+'"'),e.$menuInner[0].firstChild.appendChild(t))}else e.$menuInner.scrollTop(0),e.createView(!1)})},_searchStyle:function(){return this.options.liveSearchStyle||"contains"},val:function(e){var t=this.$element[0];if(void 0!==e){var n=d(t);if(p=[null,null,n],this.$element.val(e).trigger("changed.bs.select",p),this.$newElement.hasClass(A.SHOW))if(this.multiple)this.setOptionStatus(!0);else{var i=(t.options[t.selectedIndex]||{}).liIndex;"number"==typeof i&&(this.setSelected(this.selectedIndex,!1),this.setSelected(i,!0))}return this.render(),p=null,this.$element}return this.$element.val()},changeAll:function(e){if(this.multiple){void 0===e&&(e=!0);var t=this.$element[0],n=0,i=0,r=d(t);t.classList.add("bs-select-hidden");for(var o=0,s=this.selectpicker.current.elements.length;o<s;o++){var a=this.selectpicker.current.data[o],c=a.option;c&&!a.disabled&&"divider"!==a.type&&(a.selected&&n++,c.selected=e,e&&i++)}t.classList.remove("bs-select-hidden"),n!==i&&(this.setOptionStatus(),p=[null,null,r],this.$element.triggerNative("change"))}},selectAll:function(){return this.changeAll(!0)},deselectAll:function(){return this.changeAll(!1)},toggle:function(e){(e=e||window.event)&&e.stopPropagation(),this.$button.trigger("click.bs.dropdown.data-api")},keydown:function(t){var n,i,r,o,s,a=e(this),c=a.hasClass("dropdown-toggle"),l=c?a.closest(".dropdown"):a.closest(D.MENU),u=l.data("this"),h=u.findLis(),d=!1,f=t.which===S.TAB&&!c&&!u.options.selectOnTab,p=j.test(t.which)||f,m=u.$menuInner[0].scrollTop,g=u.isVirtual(),y=!0===g?u.selectpicker.view.position0:0;if(!(i=u.$newElement.hasClass(A.SHOW))&&(p||t.which>=48&&t.which<=57||t.which>=96&&t.which<=105||t.which>=65&&t.which<=90)&&(u.$button.trigger("click.bs.dropdown.data-api"),u.options.liveSearch))u.$searchbox.trigger("focus");else{if(t.which===S.ESCAPE&&i&&(t.preventDefault(),u.$button.trigger("click.bs.dropdown.data-api").trigger("focus")),p){if(!h.length)return;r=u.selectpicker.main.elements[u.activeIndex],-1!==(n=r?Array.prototype.indexOf.call(r.parentElement.children,r):-1)&&u.defocusItem(r),t.which===S.ARROW_UP?(-1!==n&&n--,n+y<0&&(n+=h.length),u.selectpicker.view.canHighlight[n+y]||-1===(n=u.selectpicker.view.canHighlight.slice(0,n+y).lastIndexOf(!0)-y)&&(n=h.length-1)):(t.which===S.ARROW_DOWN||f)&&(++n+y>=u.selectpicker.view.canHighlight.length&&(n=0),u.selectpicker.view.canHighlight[n+y]||(n=n+1+u.selectpicker.view.canHighlight.slice(n+y+1).indexOf(!0))),t.preventDefault();var b=y+n;t.which===S.ARROW_UP?0===y&&n===h.length-1?(u.$menuInner[0].scrollTop=u.$menuInner[0].scrollHeight,b=u.selectpicker.current.elements.length-1):(o=u.selectpicker.current.data[b],s=o.position-o.height,d=s<m):(t.which===S.ARROW_DOWN||f)&&(0===n?(u.$menuInner[0].scrollTop=0,b=0):(o=u.selectpicker.current.data[b],s=o.position-u.sizeInfo.menuInnerHeight,d=s>m)),r=u.selectpicker.current.elements[b],u.activeIndex=u.selectpicker.current.data[b].index,u.focusItem(r),u.selectpicker.view.currentActive=r,d&&(u.$menuInner[0].scrollTop=s),u.options.liveSearch?u.$searchbox.trigger("focus"):a.trigger("focus")}else if(!a.is("input")&&!N.test(t.which)||t.which===S.SPACE&&u.selectpicker.keydown.keyHistory){var _,w,k=[];t.preventDefault(),u.selectpicker.keydown.keyHistory+=C[t.which],u.selectpicker.keydown.resetKeyHistory.cancel&&clearTimeout(u.selectpicker.keydown.resetKeyHistory.cancel),u.selectpicker.keydown.resetKeyHistory.cancel=u.selectpicker.keydown.resetKeyHistory.start(),w=u.selectpicker.keydown.keyHistory,/^(.)\1+$/.test(w)&&(w=w.charAt(0));for(var E=0;E<u.selectpicker.current.data.length;E++){var x=u.selectpicker.current.data[E];v(x,w,"startsWith",!0)&&u.selectpicker.view.canHighlight[E]&&k.push(x.index)}if(k.length){var T=0;h.removeClass("active").find("a").removeClass("active"),1===w.length&&(-1===(T=k.indexOf(u.activeIndex))||T===k.length-1?T=0:T++),_=k[T],o=u.selectpicker.main.data[_],m-o.position>0?(s=o.position-o.height,d=!0):(s=o.position-u.sizeInfo.menuInnerHeight,d=o.position>m+u.sizeInfo.menuInnerHeight),r=u.selectpicker.main.elements[_],u.activeIndex=k[T],u.focusItem(r),r&&r.firstChild.focus(),d&&(u.$menuInner[0].scrollTop=s),a.trigger("focus")}}i&&(t.which===S.SPACE&&!u.selectpicker.keydown.keyHistory||t.which===S.ENTER||t.which===S.TAB&&u.options.selectOnTab)&&(t.which!==S.SPACE&&t.preventDefault(),u.options.liveSearch&&t.which===S.SPACE||(u.$menuInner.find(".active a").trigger("click",!0),a.trigger("focus"),u.options.liveSearch||(t.preventDefault(),e(document).data("spaceSelect",!0))))}},mobile:function(){this.$element[0].classList.add("mobile-device")},refresh:function(){var t=e.extend({},this.options,this.$element.data());this.options=t,this.checkDisabled(),this.setStyle(),this.render(),this.createLi(),this.setWidth(),this.setSize(!0),this.$element.trigger("refreshed.bs.select")},hide:function(){this.$newElement.hide()},show:function(){this.$newElement.show()},remove:function(){this.$newElement.remove(),this.$element.remove()},destroy:function(){this.$newElement.before(this.$element).remove(),this.$bsContainer?this.$bsContainer.remove():this.$menu.remove(),this.$element.off(O).removeData("selectpicker").removeClass("bs-select-hidden selectpicker"),e(window).off(".bs.select."+this.selectId)}};var R=e.fn.selectpicker;e.fn.selectpicker=M,e.fn.selectpicker.Constructor=L,e.fn.selectpicker.noConflict=function(){return e.fn.selectpicker=R,this},e(document).off("keydown.bs.dropdown.data-api").on("keydown.bs.select",'.bootstrap-select [data-toggle="dropdown"], .bootstrap-select [role="listbox"], .bootstrap-select .bs-searchbox input',L.prototype.keydown).on("focusin.modal",'.bootstrap-select [data-toggle="dropdown"], .bootstrap-select [role="listbox"], .bootstrap-select .bs-searchbox input',function(e){e.stopPropagation()}),e(window).on("load.bs.select.data-api",function(){e(".selectpicker").each(function(){var t=e(this);M.call(t,t.data())})})}(e)}(e)}.apply(t,i))||(e.exports=r)}(this)},"./node_modules/bootstrap-timepicker/js/bootstrap-timepicker.js":function(e,t){
|
||
/*!
|
||
* Timepicker Component for Twitter Bootstrap
|
||
*
|
||
* Copyright 2013 Joris de Wit and bootstrap-timepicker contributors
|
||
*
|
||
* Contributors https://github.com/jdewit/bootstrap-timepicker/graphs/contributors
|
||
*
|
||
* For the full copyright and license information, please view the LICENSE
|
||
* file that was distributed with this source code.
|
||
*/
|
||
!function(e,t,n){"use strict";var i=function(t,n){this.widget="",this.$element=e(t),this.defaultTime=n.defaultTime,this.disableFocus=n.disableFocus,this.disableMousewheel=n.disableMousewheel,this.isOpen=n.isOpen,this.minuteStep=n.minuteStep,this.modalBackdrop=n.modalBackdrop,this.orientation=n.orientation,this.secondStep=n.secondStep,this.snapToStep=n.snapToStep,this.showInputs=n.showInputs,this.showMeridian=n.showMeridian,this.showSeconds=n.showSeconds,this.template=n.template,this.appendWidgetTo=n.appendWidgetTo,this.showWidgetOnAddonClick=n.showWidgetOnAddonClick,this.icons=n.icons,this.maxHours=n.maxHours,this.explicitMode=n.explicitMode,this.handleDocumentClick=function(e){var t=e.data.scope;t.$element.parent().find(e.target).length||t.$widget.is(e.target)||t.$widget.find(e.target).length||t.hideWidget()},this._init()};i.prototype={constructor:i,_init:function(){var t=this;this.showWidgetOnAddonClick&&this.$element.parent().hasClass("input-group")&&this.$element.parent().hasClass("bootstrap-timepicker")?(this.$element.parent(".input-group.bootstrap-timepicker").find(".input-group-addon").on({"click.timepicker":e.proxy(this.showWidget,this)}),this.$element.on({"focus.timepicker":e.proxy(this.highlightUnit,this),"click.timepicker":e.proxy(this.highlightUnit,this),"keydown.timepicker":e.proxy(this.elementKeydown,this),"blur.timepicker":e.proxy(this.blurElement,this),"mousewheel.timepicker DOMMouseScroll.timepicker":e.proxy(this.mousewheel,this)})):this.template?this.$element.on({"focus.timepicker":e.proxy(this.showWidget,this),"click.timepicker":e.proxy(this.showWidget,this),"blur.timepicker":e.proxy(this.blurElement,this),"mousewheel.timepicker DOMMouseScroll.timepicker":e.proxy(this.mousewheel,this)}):this.$element.on({"focus.timepicker":e.proxy(this.highlightUnit,this),"click.timepicker":e.proxy(this.highlightUnit,this),"keydown.timepicker":e.proxy(this.elementKeydown,this),"blur.timepicker":e.proxy(this.blurElement,this),"mousewheel.timepicker DOMMouseScroll.timepicker":e.proxy(this.mousewheel,this)}),!1!==this.template?this.$widget=e(this.getTemplate()).on("click",e.proxy(this.widgetClick,this)):this.$widget=!1,this.showInputs&&!1!==this.$widget&&this.$widget.find("input").each(function(){e(this).on({"click.timepicker":function(){e(this).select()},"keydown.timepicker":e.proxy(t.widgetKeydown,t),"keyup.timepicker":e.proxy(t.widgetKeyup,t)})}),this.setDefaultTime(this.defaultTime)},blurElement:function(){this.highlightedUnit=null,this.updateFromElementVal()},clear:function(){this.hour="",this.minute="",this.second="",this.meridian="",this.$element.val("")},decrementHour:function(){if(this.showMeridian)if(1===this.hour)this.hour=12;else{if(12===this.hour)return this.hour--,this.toggleMeridian();if(0===this.hour)return this.hour=11,this.toggleMeridian();this.hour--}else this.hour<=0?this.hour=this.maxHours-1:this.hour--},decrementMinute:function(e){var t;(t=e?this.minute-e:this.minute-this.minuteStep)<0?(this.decrementHour(),this.minute=t+60):this.minute=t},decrementSecond:function(){var e=this.second-this.secondStep;e<0?(this.decrementMinute(!0),this.second=e+60):this.second=e},elementKeydown:function(e){switch(e.which){case 9:if(e.shiftKey){if("hour"===this.highlightedUnit){this.hideWidget();break}this.highlightPrevUnit()}else{if(this.showMeridian&&"meridian"===this.highlightedUnit||this.showSeconds&&"second"===this.highlightedUnit||!this.showMeridian&&!this.showSeconds&&"minute"===this.highlightedUnit){this.hideWidget();break}this.highlightNextUnit()}e.preventDefault(),this.updateFromElementVal();break;case 27:this.updateFromElementVal();break;case 37:e.preventDefault(),this.highlightPrevUnit(),this.updateFromElementVal();break;case 38:switch(e.preventDefault(),this.highlightedUnit){case"hour":this.incrementHour(),this.highlightHour();break;case"minute":this.incrementMinute(),this.highlightMinute();break;case"second":this.incrementSecond(),this.highlightSecond();break;case"meridian":this.toggleMeridian(),this.highlightMeridian()}this.update();break;case 39:e.preventDefault(),this.highlightNextUnit(),this.updateFromElementVal();break;case 40:switch(e.preventDefault(),this.highlightedUnit){case"hour":this.decrementHour(),this.highlightHour();break;case"minute":this.decrementMinute(),this.highlightMinute();break;case"second":this.decrementSecond(),this.highlightSecond();break;case"meridian":this.toggleMeridian(),this.highlightMeridian()}this.update()}},getCursorPosition:function(){var e=this.$element.get(0);if("selectionStart"in e)return e.selectionStart;if(n.selection){e.focus();var t=n.selection.createRange(),i=n.selection.createRange().text.length;return t.moveStart("character",-e.value.length),t.text.length-i}},getTemplate:function(){var e,t,n,i,r,o;switch(this.showInputs?(t='<input type="text" class="bootstrap-timepicker-hour" maxlength="2"/>',n='<input type="text" class="bootstrap-timepicker-minute" maxlength="2"/>',i='<input type="text" class="bootstrap-timepicker-second" maxlength="2"/>',r='<input type="text" class="bootstrap-timepicker-meridian" maxlength="2"/>'):(t='<span class="bootstrap-timepicker-hour"></span>',n='<span class="bootstrap-timepicker-minute"></span>',i='<span class="bootstrap-timepicker-second"></span>',r='<span class="bootstrap-timepicker-meridian"></span>'),o='<table><tr><td><a href="#" data-action="incrementHour"><span class="'+this.icons.up+'"></span></a></td><td class="separator"> </td><td><a href="#" data-action="incrementMinute"><span class="'+this.icons.up+'"></span></a></td>'+(this.showSeconds?'<td class="separator"> </td><td><a href="#" data-action="incrementSecond"><span class="'+this.icons.up+'"></span></a></td>':"")+(this.showMeridian?'<td class="separator"> </td><td class="meridian-column"><a href="#" data-action="toggleMeridian"><span class="'+this.icons.up+'"></span></a></td>':"")+"</tr><tr><td>"+t+'</td> <td class="separator">:</td><td>'+n+"</td> "+(this.showSeconds?'<td class="separator">:</td><td>'+i+"</td>":"")+(this.showMeridian?'<td class="separator"> </td><td>'+r+"</td>":"")+'</tr><tr><td><a href="#" data-action="decrementHour"><span class="'+this.icons.down+'"></span></a></td><td class="separator"></td><td><a href="#" data-action="decrementMinute"><span class="'+this.icons.down+'"></span></a></td>'+(this.showSeconds?'<td class="separator"> </td><td><a href="#" data-action="decrementSecond"><span class="'+this.icons.down+'"></span></a></td>':"")+(this.showMeridian?'<td class="separator"> </td><td><a href="#" data-action="toggleMeridian"><span class="'+this.icons.down+'"></span></a></td>':"")+"</tr></table>",this.template){case"modal":e='<div class="bootstrap-timepicker-widget modal hide fade in" data-backdrop="'+(this.modalBackdrop?"true":"false")+'"><div class="modal-header"><a href="#" class="close" data-dismiss="modal">×</a><h3>Pick a Time</h3></div><div class="modal-content">'+o+'</div><div class="modal-footer"><a href="#" class="btn btn-primary" data-dismiss="modal">OK</a></div></div>';break;case"dropdown":e='<div class="bootstrap-timepicker-widget dropdown-menu">'+o+"</div>"}return e},getTime:function(){return""===this.hour?"":this.hour+":"+(1===this.minute.toString().length?"0"+this.minute:this.minute)+(this.showSeconds?":"+(1===this.second.toString().length?"0"+this.second:this.second):"")+(this.showMeridian?" "+this.meridian:"")},hideWidget:function(){!1!==this.isOpen&&(this.$element.trigger({type:"hide.timepicker",time:{value:this.getTime(),hours:this.hour,minutes:this.minute,seconds:this.second,meridian:this.meridian}}),"modal"===this.template&&this.$widget.modal?this.$widget.modal("hide"):this.$widget.removeClass("open"),e(n).off("mousedown.timepicker, touchend.timepicker",this.handleDocumentClick),this.isOpen=!1,this.$widget.detach())},highlightUnit:function(){this.position=this.getCursorPosition(),this.position>=0&&this.position<=2?this.highlightHour():this.position>=3&&this.position<=5?this.highlightMinute():this.position>=6&&this.position<=8?this.showSeconds?this.highlightSecond():this.highlightMeridian():this.position>=9&&this.position<=11&&this.highlightMeridian()},highlightNextUnit:function(){switch(this.highlightedUnit){case"hour":this.highlightMinute();break;case"minute":this.showSeconds?this.highlightSecond():this.showMeridian?this.highlightMeridian():this.highlightHour();break;case"second":this.showMeridian?this.highlightMeridian():this.highlightHour();break;case"meridian":this.highlightHour()}},highlightPrevUnit:function(){switch(this.highlightedUnit){case"hour":this.showMeridian?this.highlightMeridian():this.showSeconds?this.highlightSecond():this.highlightMinute();break;case"minute":this.highlightHour();break;case"second":this.highlightMinute();break;case"meridian":this.showSeconds?this.highlightSecond():this.highlightMinute()}},highlightHour:function(){var e=this.$element.get(0),t=this;this.highlightedUnit="hour",e.setSelectionRange&&setTimeout(function(){t.hour<10?e.setSelectionRange(0,1):e.setSelectionRange(0,2)},0)},highlightMinute:function(){var e=this.$element.get(0),t=this;this.highlightedUnit="minute",e.setSelectionRange&&setTimeout(function(){t.hour<10?e.setSelectionRange(2,4):e.setSelectionRange(3,5)},0)},highlightSecond:function(){var e=this.$element.get(0),t=this;this.highlightedUnit="second",e.setSelectionRange&&setTimeout(function(){t.hour<10?e.setSelectionRange(5,7):e.setSelectionRange(6,8)},0)},highlightMeridian:function(){var e=this.$element.get(0),t=this;this.highlightedUnit="meridian",e.setSelectionRange&&(this.showSeconds?setTimeout(function(){t.hour<10?e.setSelectionRange(8,10):e.setSelectionRange(9,11)},0):setTimeout(function(){t.hour<10?e.setSelectionRange(5,7):e.setSelectionRange(6,8)},0))},incrementHour:function(){if(this.showMeridian){if(11===this.hour)return this.hour++,this.toggleMeridian();12===this.hour&&(this.hour=0)}this.hour!==this.maxHours-1?this.hour++:this.hour=0},incrementMinute:function(e){var t;(t=e?this.minute+e:this.minute+this.minuteStep-this.minute%this.minuteStep)>59?(this.incrementHour(),this.minute=t-60):this.minute=t},incrementSecond:function(){var e=this.second+this.secondStep-this.second%this.secondStep;e>59?(this.incrementMinute(!0),this.second=e-60):this.second=e},mousewheel:function(t){if(!this.disableMousewheel){t.preventDefault(),t.stopPropagation();var n=t.originalEvent.wheelDelta||-t.originalEvent.detail,i=null;switch("mousewheel"===t.type?i=-1*t.originalEvent.wheelDelta:"DOMMouseScroll"===t.type&&(i=40*t.originalEvent.detail),i&&(t.preventDefault(),e(this).scrollTop(i+e(this).scrollTop())),this.highlightedUnit){case"minute":n>0?this.incrementMinute():this.decrementMinute(),this.highlightMinute();break;case"second":n>0?this.incrementSecond():this.decrementSecond(),this.highlightSecond();break;case"meridian":this.toggleMeridian(),this.highlightMeridian();break;default:n>0?this.incrementHour():this.decrementHour(),this.highlightHour()}return!1}},changeToNearestStep:function(e,t){return e%t==0?e:Math.round(e%t/t)?(e+(t-e%t))%60:e-e%t},place:function(){if(!this.isInline){var n=this.$widget.outerWidth(),i=this.$widget.outerHeight(),r=e(t).width(),o=e(t).height(),s=e(t).scrollTop(),a=parseInt(this.$element.parents().filter(function(){return"auto"!==e(this).css("z-index")}).first().css("z-index"),10)+10,c=this.component?this.component.parent().offset():this.$element.offset(),l=this.component?this.component.outerHeight(!0):this.$element.outerHeight(!1),u=this.component?this.component.outerWidth(!0):this.$element.outerWidth(!1),h=c.left,d=c.top;this.$widget.removeClass("timepicker-orient-top timepicker-orient-bottom timepicker-orient-right timepicker-orient-left"),"auto"!==this.orientation.x?(this.$widget.addClass("timepicker-orient-"+this.orientation.x),"right"===this.orientation.x&&(h-=n-u)):(this.$widget.addClass("timepicker-orient-left"),c.left<0?h-=c.left-10:c.left+n>r&&(h=r-n-10));var f,p,m=this.orientation.y;"auto"===m&&(f=-s+c.top-i,p=s+o-(c.top+l+i),m=Math.max(f,p)===p?"top":"bottom"),this.$widget.addClass("timepicker-orient-"+m),"top"===m?d+=l:d-=i+parseInt(this.$widget.css("padding-top"),10),this.$widget.css({top:d,left:h,zIndex:a})}},remove:function(){e("document").off(".timepicker"),this.$widget&&this.$widget.remove(),delete this.$element.data().timepicker},setDefaultTime:function(e){if(this.$element.val())this.updateFromElementVal();else if("current"===e){var t=new Date,n=t.getHours(),i=t.getMinutes(),r=t.getSeconds(),o="AM";0!==r&&60===(r=Math.ceil(t.getSeconds()/this.secondStep)*this.secondStep)&&(i+=1,r=0),0!==i&&60===(i=Math.ceil(t.getMinutes()/this.minuteStep)*this.minuteStep)&&(n+=1,i=0),this.showMeridian&&(0===n?n=12:n>=12?(n>12&&(n-=12),o="PM"):o="AM"),this.hour=n,this.minute=i,this.second=r,this.meridian=o,this.update()}else!1===e?(this.hour=0,this.minute=0,this.second=0,this.meridian="AM"):this.setTime(e)},setTime:function(e,t){if(e){var n,i,r,o,s,a;if("object"==typeof e&&e.getMonth)r=e.getHours(),o=e.getMinutes(),s=e.getSeconds(),this.showMeridian&&(a="AM",r>12&&(a="PM",r%=12),12===r&&(a="PM"));else{if((n=(/a/i.test(e)?1:0)+(/p/i.test(e)?2:0))>2)return void this.clear();if(r=(i=e.replace(/[^0-9\:]/g,"").split(":"))[0]?i[0].toString():i.toString(),this.explicitMode&&r.length>2&&r.length%2!=0)return void this.clear();o=i[1]?i[1].toString():"",s=i[2]?i[2].toString():"",r.length>4&&(s=r.slice(-2),r=r.slice(0,-2)),r.length>2&&(o=r.slice(-2),r=r.slice(0,-2)),o.length>2&&(s=o.slice(-2),o=o.slice(0,-2)),r=parseInt(r,10),o=parseInt(o,10),s=parseInt(s,10),isNaN(r)&&(r=0),isNaN(o)&&(o=0),isNaN(s)&&(s=0),s>59&&(s=59),o>59&&(o=59),r>=this.maxHours&&(r=this.maxHours-1),this.showMeridian?(r>12&&(n=2,r-=12),n||(n=1),0===r&&(r=12),a=1===n?"AM":"PM"):r<12&&2===n?r+=12:r>=this.maxHours?r=this.maxHours-1:(r<0||12===r&&1===n)&&(r=0)}this.hour=r,this.snapToStep?(this.minute=this.changeToNearestStep(o,this.minuteStep),this.second=this.changeToNearestStep(s,this.secondStep)):(this.minute=o,this.second=s),this.meridian=a,this.update(t)}else this.clear()},showWidget:function(){this.isOpen||this.$element.is(":disabled")||(this.$widget.appendTo(this.appendWidgetTo),e(n).on("mousedown.timepicker, touchend.timepicker",{scope:this},this.handleDocumentClick),this.$element.trigger({type:"show.timepicker",time:{value:this.getTime(),hours:this.hour,minutes:this.minute,seconds:this.second,meridian:this.meridian}}),this.place(),this.disableFocus&&this.$element.blur(),""===this.hour&&(this.defaultTime?this.setDefaultTime(this.defaultTime):this.setTime("0:0:0")),"modal"===this.template&&this.$widget.modal?this.$widget.modal("show").on("hidden",e.proxy(this.hideWidget,this)):!1===this.isOpen&&this.$widget.addClass("open"),this.isOpen=!0)},toggleMeridian:function(){this.meridian="AM"===this.meridian?"PM":"AM"},update:function(e){this.updateElement(),e||this.updateWidget(),this.$element.trigger({type:"changeTime.timepicker",time:{value:this.getTime(),hours:this.hour,minutes:this.minute,seconds:this.second,meridian:this.meridian}})},updateElement:function(){this.$element.val(this.getTime()).change()},updateFromElementVal:function(){this.setTime(this.$element.val())},updateWidget:function(){if(!1!==this.$widget){var e=this.hour,t=1===this.minute.toString().length?"0"+this.minute:this.minute,n=1===this.second.toString().length?"0"+this.second:this.second;this.showInputs?(this.$widget.find("input.bootstrap-timepicker-hour").val(e),this.$widget.find("input.bootstrap-timepicker-minute").val(t),this.showSeconds&&this.$widget.find("input.bootstrap-timepicker-second").val(n),this.showMeridian&&this.$widget.find("input.bootstrap-timepicker-meridian").val(this.meridian)):(this.$widget.find("span.bootstrap-timepicker-hour").text(e),this.$widget.find("span.bootstrap-timepicker-minute").text(t),this.showSeconds&&this.$widget.find("span.bootstrap-timepicker-second").text(n),this.showMeridian&&this.$widget.find("span.bootstrap-timepicker-meridian").text(this.meridian))}},updateFromWidgetInputs:function(){if(!1!==this.$widget){var e=this.$widget.find("input.bootstrap-timepicker-hour").val()+":"+this.$widget.find("input.bootstrap-timepicker-minute").val()+(this.showSeconds?":"+this.$widget.find("input.bootstrap-timepicker-second").val():"")+(this.showMeridian?this.$widget.find("input.bootstrap-timepicker-meridian").val():"");this.setTime(e,!0)}},widgetClick:function(t){t.stopPropagation(),t.preventDefault();var n=e(t.target),i=n.closest("a").data("action");i&&this[i](),this.update(),n.is("input")&&n.get(0).setSelectionRange(0,2)},widgetKeydown:function(t){var n=e(t.target),i=n.attr("class").replace("bootstrap-timepicker-","");switch(t.which){case 9:if(t.shiftKey){if("hour"===i)return this.hideWidget()}else if(this.showMeridian&&"meridian"===i||this.showSeconds&&"second"===i||!this.showMeridian&&!this.showSeconds&&"minute"===i)return this.hideWidget();break;case 27:this.hideWidget();break;case 38:switch(t.preventDefault(),i){case"hour":this.incrementHour();break;case"minute":this.incrementMinute();break;case"second":this.incrementSecond();break;case"meridian":this.toggleMeridian()}this.setTime(this.getTime()),n.get(0).setSelectionRange(0,2);break;case 40:switch(t.preventDefault(),i){case"hour":this.decrementHour();break;case"minute":this.decrementMinute();break;case"second":this.decrementSecond();break;case"meridian":this.toggleMeridian()}this.setTime(this.getTime()),n.get(0).setSelectionRange(0,2)}},widgetKeyup:function(e){(65===e.which||77===e.which||80===e.which||46===e.which||8===e.which||e.which>=48&&e.which<=57||e.which>=96&&e.which<=105)&&this.updateFromWidgetInputs()}},e.fn.timepicker=function(t){var n=Array.apply(null,arguments);return n.shift(),this.each(function(){var r=e(this),o=r.data("timepicker"),s="object"==typeof t&&t;o||r.data("timepicker",o=new i(this,e.extend({},e.fn.timepicker.defaults,s,e(this).data()))),"string"==typeof t&&o[t].apply(o,n)})},e.fn.timepicker.defaults={defaultTime:"current",disableFocus:!1,disableMousewheel:!1,isOpen:!1,minuteStep:15,modalBackdrop:!1,orientation:{x:"auto",y:"auto"},secondStep:15,snapToStep:!1,showSeconds:!1,showInputs:!0,showMeridian:!0,template:"dropdown",appendWidgetTo:"body",showWidgetOnAddonClick:!0,icons:{up:"glyphicon glyphicon-chevron-up",down:"glyphicon glyphicon-chevron-down"},maxHours:24,explicitMode:!1},e.fn.timepicker.Constructor=i,e(n).on("focus.timepicker.data-api click.timepicker.data-api",'[data-provide="timepicker"]',function(t){var n=e(this);n.data("timepicker")||(t.preventDefault(),n.timepicker())})}(jQuery,window,document)},"./node_modules/bootstrap/js/dist/alert.js":function(e,t,n){
|
||
/*!
|
||
* Bootstrap alert.js v4.3.1 (https://getbootstrap.com/)
|
||
* Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||
*/
|
||
e.exports=function(e,t){"use strict";function n(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}e=e&&e.hasOwnProperty("default")?e.default:e,t=t&&t.hasOwnProperty("default")?t.default:t;var i=e.fn.alert,r={CLOSE:"close.bs.alert",CLOSED:"closed.bs.alert",CLICK_DATA_API:"click.bs.alert.data-api"},o={ALERT:"alert",FADE:"fade",SHOW:"show"},s=function(){function i(e){this._element=e}var s=i.prototype;return s.close=function(e){var t=this._element;e&&(t=this._getRootElement(e));var n=this._triggerCloseEvent(t);n.isDefaultPrevented()||this._removeElement(t)},s.dispose=function(){e.removeData(this._element,"bs.alert"),this._element=null},s._getRootElement=function(n){var i=t.getSelectorFromElement(n),r=!1;return i&&(r=document.querySelector(i)),r||(r=e(n).closest("."+o.ALERT)[0]),r},s._triggerCloseEvent=function(t){var n=e.Event(r.CLOSE);return e(t).trigger(n),n},s._removeElement=function(n){var i=this;if(e(n).removeClass(o.SHOW),e(n).hasClass(o.FADE)){var r=t.getTransitionDurationFromElement(n);e(n).one(t.TRANSITION_END,function(e){return i._destroyElement(n,e)}).emulateTransitionEnd(r)}else this._destroyElement(n)},s._destroyElement=function(t){e(t).detach().trigger(r.CLOSED).remove()},i._jQueryInterface=function(t){return this.each(function(){var n=e(this),r=n.data("bs.alert");r||(r=new i(this),n.data("bs.alert",r)),"close"===t&&r[t](this)})},i._handleDismiss=function(e){return function(t){t&&t.preventDefault(),e.close(this)}},function(e,t,i){t&&n(e.prototype,t),i&&n(e,i)}(i,null,[{key:"VERSION",get:function(){return"4.3.1"}}]),i}();return e(document).on(r.CLICK_DATA_API,'[data-dismiss="alert"]',s._handleDismiss(new s)),e.fn.alert=s._jQueryInterface,e.fn.alert.Constructor=s,e.fn.alert.noConflict=function(){return e.fn.alert=i,s._jQueryInterface},s}(n("jquery"),n("./node_modules/bootstrap/js/dist/util.js"))},"./node_modules/bootstrap/js/dist/button.js":function(e,t,n){
|
||
/*!
|
||
* Bootstrap button.js v4.3.1 (https://getbootstrap.com/)
|
||
* Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||
*/
|
||
e.exports=function(e){"use strict";function t(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var n="button",i=(e=e&&e.hasOwnProperty("default")?e.default:e).fn[n],r={ACTIVE:"active",BUTTON:"btn",FOCUS:"focus"},o={DATA_TOGGLE_CARROT:'[data-toggle^="button"]',DATA_TOGGLE:'[data-toggle="buttons"]',INPUT:'input:not([type="hidden"])',ACTIVE:".active",BUTTON:".btn"},s={CLICK_DATA_API:"click.bs.button.data-api",FOCUS_BLUR_DATA_API:"focus.bs.button.data-api blur.bs.button.data-api"},a=function(){function n(e){this._element=e}var i=n.prototype;return i.toggle=function(){var t=!0,n=!0,i=e(this._element).closest(o.DATA_TOGGLE)[0];if(i){var s=this._element.querySelector(o.INPUT);if(s){if("radio"===s.type)if(s.checked&&this._element.classList.contains(r.ACTIVE))t=!1;else{var a=i.querySelector(o.ACTIVE);a&&e(a).removeClass(r.ACTIVE)}if(t){if(s.hasAttribute("disabled")||i.hasAttribute("disabled")||s.classList.contains("disabled")||i.classList.contains("disabled"))return;s.checked=!this._element.classList.contains(r.ACTIVE),e(s).trigger("change")}s.focus(),n=!1}}n&&this._element.setAttribute("aria-pressed",!this._element.classList.contains(r.ACTIVE)),t&&e(this._element).toggleClass(r.ACTIVE)},i.dispose=function(){e.removeData(this._element,"bs.button"),this._element=null},n._jQueryInterface=function(t){return this.each(function(){var i=e(this).data("bs.button");i||(i=new n(this),e(this).data("bs.button",i)),"toggle"===t&&i[t]()})},function(e,n,i){n&&t(e.prototype,n),i&&t(e,i)}(n,null,[{key:"VERSION",get:function(){return"4.3.1"}}]),n}();return e(document).on(s.CLICK_DATA_API,o.DATA_TOGGLE_CARROT,function(t){t.preventDefault();var n=t.target;e(n).hasClass(r.BUTTON)||(n=e(n).closest(o.BUTTON)),a._jQueryInterface.call(e(n),"toggle")}).on(s.FOCUS_BLUR_DATA_API,o.DATA_TOGGLE_CARROT,function(t){var n=e(t.target).closest(o.BUTTON)[0];e(n).toggleClass(r.FOCUS,/^focus(in)?$/.test(t.type))}),e.fn[n]=a._jQueryInterface,e.fn[n].Constructor=a,e.fn[n].noConflict=function(){return e.fn[n]=i,a._jQueryInterface},a}(n("jquery"))},"./node_modules/bootstrap/js/dist/carousel.js":function(e,t,n){
|
||
/*!
|
||
* Bootstrap carousel.js v4.3.1 (https://getbootstrap.com/)
|
||
* Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||
*/
|
||
e.exports=function(e,t){"use strict";function n(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){i(e,t,n[t])})}return e}e=e&&e.hasOwnProperty("default")?e.default:e,t=t&&t.hasOwnProperty("default")?t.default:t;var o="carousel",s="bs.carousel",a="."+s,c=e.fn[o],l={interval:5e3,keyboard:!0,slide:!1,pause:"hover",wrap:!0,touch:!0},u={interval:"(number|boolean)",keyboard:"boolean",slide:"(boolean|string)",pause:"(string|boolean)",wrap:"boolean",touch:"boolean"},h={NEXT:"next",PREV:"prev",LEFT:"left",RIGHT:"right"},d={SLIDE:"slide"+a,SLID:"slid"+a,KEYDOWN:"keydown"+a,MOUSEENTER:"mouseenter"+a,MOUSELEAVE:"mouseleave"+a,TOUCHSTART:"touchstart"+a,TOUCHMOVE:"touchmove"+a,TOUCHEND:"touchend"+a,POINTERDOWN:"pointerdown"+a,POINTERUP:"pointerup"+a,DRAG_START:"dragstart"+a,LOAD_DATA_API:"load.bs.carousel.data-api",CLICK_DATA_API:"click.bs.carousel.data-api"},f={CAROUSEL:"carousel",ACTIVE:"active",SLIDE:"slide",RIGHT:"carousel-item-right",LEFT:"carousel-item-left",NEXT:"carousel-item-next",PREV:"carousel-item-prev",ITEM:"carousel-item",POINTER_EVENT:"pointer-event"},p={ACTIVE:".active",ACTIVE_ITEM:".active.carousel-item",ITEM:".carousel-item",ITEM_IMG:".carousel-item img",NEXT_PREV:".carousel-item-next, .carousel-item-prev",INDICATORS:".carousel-indicators",DATA_SLIDE:"[data-slide], [data-slide-to]",DATA_RIDE:'[data-ride="carousel"]'},m={TOUCH:"touch",PEN:"pen"},v=function(){function i(e,t){this._items=null,this._interval=null,this._activeElement=null,this._isPaused=!1,this._isSliding=!1,this.touchTimeout=null,this.touchStartX=0,this.touchDeltaX=0,this._config=this._getConfig(t),this._element=e,this._indicatorsElement=this._element.querySelector(p.INDICATORS),this._touchSupported="ontouchstart"in document.documentElement||navigator.maxTouchPoints>0,this._pointerEvent=Boolean(window.PointerEvent||window.MSPointerEvent),this._addEventListeners()}var c=i.prototype;return c.next=function(){this._isSliding||this._slide(h.NEXT)},c.nextWhenVisible=function(){!document.hidden&&e(this._element).is(":visible")&&"hidden"!==e(this._element).css("visibility")&&this.next()},c.prev=function(){this._isSliding||this._slide(h.PREV)},c.pause=function(e){e||(this._isPaused=!0),this._element.querySelector(p.NEXT_PREV)&&(t.triggerTransitionEnd(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null},c.cycle=function(e){e||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config.interval&&!this._isPaused&&(this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))},c.to=function(t){var n=this;this._activeElement=this._element.querySelector(p.ACTIVE_ITEM);var i=this._getItemIndex(this._activeElement);if(!(t>this._items.length-1||t<0))if(this._isSliding)e(this._element).one(d.SLID,function(){return n.to(t)});else{if(i===t)return this.pause(),void this.cycle();var r=t>i?h.NEXT:h.PREV;this._slide(r,this._items[t])}},c.dispose=function(){e(this._element).off(a),e.removeData(this._element,s),this._items=null,this._config=null,this._element=null,this._interval=null,this._isPaused=null,this._isSliding=null,this._activeElement=null,this._indicatorsElement=null},c._getConfig=function(e){return e=r({},l,e),t.typeCheckConfig(o,e,u),e},c._handleSwipe=function(){var e=Math.abs(this.touchDeltaX);if(!(e<=40)){var t=e/this.touchDeltaX;t>0&&this.prev(),t<0&&this.next()}},c._addEventListeners=function(){var t=this;this._config.keyboard&&e(this._element).on(d.KEYDOWN,function(e){return t._keydown(e)}),"hover"===this._config.pause&&e(this._element).on(d.MOUSEENTER,function(e){return t.pause(e)}).on(d.MOUSELEAVE,function(e){return t.cycle(e)}),this._config.touch&&this._addTouchEventListeners()},c._addTouchEventListeners=function(){var t=this;if(this._touchSupported){var n=function(e){t._pointerEvent&&m[e.originalEvent.pointerType.toUpperCase()]?t.touchStartX=e.originalEvent.clientX:t._pointerEvent||(t.touchStartX=e.originalEvent.touches[0].clientX)},i=function(e){t._pointerEvent&&m[e.originalEvent.pointerType.toUpperCase()]&&(t.touchDeltaX=e.originalEvent.clientX-t.touchStartX),t._handleSwipe(),"hover"===t._config.pause&&(t.pause(),t.touchTimeout&&clearTimeout(t.touchTimeout),t.touchTimeout=setTimeout(function(e){return t.cycle(e)},500+t._config.interval))};e(this._element.querySelectorAll(p.ITEM_IMG)).on(d.DRAG_START,function(e){return e.preventDefault()}),this._pointerEvent?(e(this._element).on(d.POINTERDOWN,function(e){return n(e)}),e(this._element).on(d.POINTERUP,function(e){return i(e)}),this._element.classList.add(f.POINTER_EVENT)):(e(this._element).on(d.TOUCHSTART,function(e){return n(e)}),e(this._element).on(d.TOUCHMOVE,function(e){return function(e){e.originalEvent.touches&&e.originalEvent.touches.length>1?t.touchDeltaX=0:t.touchDeltaX=e.originalEvent.touches[0].clientX-t.touchStartX}(e)}),e(this._element).on(d.TOUCHEND,function(e){return i(e)}))}},c._keydown=function(e){if(!/input|textarea/i.test(e.target.tagName))switch(e.which){case 37:e.preventDefault(),this.prev();break;case 39:e.preventDefault(),this.next()}},c._getItemIndex=function(e){return this._items=e&&e.parentNode?[].slice.call(e.parentNode.querySelectorAll(p.ITEM)):[],this._items.indexOf(e)},c._getItemByDirection=function(e,t){var n=e===h.NEXT,i=e===h.PREV,r=this._getItemIndex(t),o=this._items.length-1,s=i&&0===r||n&&r===o;if(s&&!this._config.wrap)return t;var a=e===h.PREV?-1:1,c=(r+a)%this._items.length;return-1===c?this._items[this._items.length-1]:this._items[c]},c._triggerSlideEvent=function(t,n){var i=this._getItemIndex(t),r=this._getItemIndex(this._element.querySelector(p.ACTIVE_ITEM)),o=e.Event(d.SLIDE,{relatedTarget:t,direction:n,from:r,to:i});return e(this._element).trigger(o),o},c._setActiveIndicatorElement=function(t){if(this._indicatorsElement){var n=[].slice.call(this._indicatorsElement.querySelectorAll(p.ACTIVE));e(n).removeClass(f.ACTIVE);var i=this._indicatorsElement.children[this._getItemIndex(t)];i&&e(i).addClass(f.ACTIVE)}},c._slide=function(n,i){var r,o,s,a=this,c=this._element.querySelector(p.ACTIVE_ITEM),l=this._getItemIndex(c),u=i||c&&this._getItemByDirection(n,c),m=this._getItemIndex(u),v=Boolean(this._interval);if(n===h.NEXT?(r=f.LEFT,o=f.NEXT,s=h.LEFT):(r=f.RIGHT,o=f.PREV,s=h.RIGHT),u&&e(u).hasClass(f.ACTIVE))this._isSliding=!1;else{var g=this._triggerSlideEvent(u,s);if(!g.isDefaultPrevented()&&c&&u){this._isSliding=!0,v&&this.pause(),this._setActiveIndicatorElement(u);var y=e.Event(d.SLID,{relatedTarget:u,direction:s,from:l,to:m});if(e(this._element).hasClass(f.SLIDE)){e(u).addClass(o),t.reflow(u),e(c).addClass(r),e(u).addClass(r);var b=parseInt(u.getAttribute("data-interval"),10);b?(this._config.defaultInterval=this._config.defaultInterval||this._config.interval,this._config.interval=b):this._config.interval=this._config.defaultInterval||this._config.interval;var _=t.getTransitionDurationFromElement(c);e(c).one(t.TRANSITION_END,function(){e(u).removeClass(r+" "+o).addClass(f.ACTIVE),e(c).removeClass(f.ACTIVE+" "+o+" "+r),a._isSliding=!1,setTimeout(function(){return e(a._element).trigger(y)},0)}).emulateTransitionEnd(_)}else e(c).removeClass(f.ACTIVE),e(u).addClass(f.ACTIVE),this._isSliding=!1,e(this._element).trigger(y);v&&this.cycle()}}},i._jQueryInterface=function(t){return this.each(function(){var n=e(this).data(s),o=r({},l,e(this).data());"object"==typeof t&&(o=r({},o,t));var a="string"==typeof t?t:o.slide;if(n||(n=new i(this,o),e(this).data(s,n)),"number"==typeof t)n.to(t);else if("string"==typeof a){if(void 0===n[a])throw new TypeError('No method named "'+a+'"');n[a]()}else o.interval&&o.ride&&(n.pause(),n.cycle())})},i._dataApiClickHandler=function(n){var o=t.getSelectorFromElement(this);if(o){var a=e(o)[0];if(a&&e(a).hasClass(f.CAROUSEL)){var c=r({},e(a).data(),e(this).data()),l=this.getAttribute("data-slide-to");l&&(c.interval=!1),i._jQueryInterface.call(e(a),c),l&&e(a).data(s).to(l),n.preventDefault()}}},function(e,t,i){t&&n(e.prototype,t),i&&n(e,i)}(i,null,[{key:"VERSION",get:function(){return"4.3.1"}},{key:"Default",get:function(){return l}}]),i}();return e(document).on(d.CLICK_DATA_API,p.DATA_SLIDE,v._dataApiClickHandler),e(window).on(d.LOAD_DATA_API,function(){for(var t=[].slice.call(document.querySelectorAll(p.DATA_RIDE)),n=0,i=t.length;n<i;n++){var r=e(t[n]);v._jQueryInterface.call(r,r.data())}}),e.fn[o]=v._jQueryInterface,e.fn[o].Constructor=v,e.fn[o].noConflict=function(){return e.fn[o]=c,v._jQueryInterface},v}(n("jquery"),n("./node_modules/bootstrap/js/dist/util.js"))},"./node_modules/bootstrap/js/dist/collapse.js":function(e,t,n){
|
||
/*!
|
||
* Bootstrap collapse.js v4.3.1 (https://getbootstrap.com/)
|
||
* Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||
*/
|
||
e.exports=function(e,t){"use strict";function n(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){i(e,t,n[t])})}return e}e=e&&e.hasOwnProperty("default")?e.default:e,t=t&&t.hasOwnProperty("default")?t.default:t;var o="collapse",s="bs.collapse",a=e.fn[o],c={toggle:!0,parent:""},l={toggle:"boolean",parent:"(string|element)"},u={SHOW:"show.bs.collapse",SHOWN:"shown.bs.collapse",HIDE:"hide.bs.collapse",HIDDEN:"hidden.bs.collapse",CLICK_DATA_API:"click.bs.collapse.data-api"},h={SHOW:"show",COLLAPSE:"collapse",COLLAPSING:"collapsing",COLLAPSED:"collapsed"},d={WIDTH:"width",HEIGHT:"height"},f={ACTIVES:".show, .collapsing",DATA_TOGGLE:'[data-toggle="collapse"]'},p=function(){function i(e,n){this._isTransitioning=!1,this._element=e,this._config=this._getConfig(n),this._triggerArray=[].slice.call(document.querySelectorAll('[data-toggle="collapse"][href="#'+e.id+'"],[data-toggle="collapse"][data-target="#'+e.id+'"]'));for(var i=[].slice.call(document.querySelectorAll(f.DATA_TOGGLE)),r=0,o=i.length;r<o;r++){var s=i[r],a=t.getSelectorFromElement(s),c=[].slice.call(document.querySelectorAll(a)).filter(function(t){return t===e});null!==a&&c.length>0&&(this._selector=a,this._triggerArray.push(s))}this._parent=this._config.parent?this._getParent():null,this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray),this._config.toggle&&this.toggle()}var a=i.prototype;return a.toggle=function(){e(this._element).hasClass(h.SHOW)?this.hide():this.show()},a.show=function(){var n,r,o=this;if(!(this._isTransitioning||e(this._element).hasClass(h.SHOW)||(this._parent&&0===(n=[].slice.call(this._parent.querySelectorAll(f.ACTIVES)).filter(function(e){return"string"==typeof o._config.parent?e.getAttribute("data-parent")===o._config.parent:e.classList.contains(h.COLLAPSE)})).length&&(n=null),n&&(r=e(n).not(this._selector).data(s))&&r._isTransitioning))){var a=e.Event(u.SHOW);if(e(this._element).trigger(a),!a.isDefaultPrevented()){n&&(i._jQueryInterface.call(e(n).not(this._selector),"hide"),r||e(n).data(s,null));var c=this._getDimension();e(this._element).removeClass(h.COLLAPSE).addClass(h.COLLAPSING),this._element.style[c]=0,this._triggerArray.length&&e(this._triggerArray).removeClass(h.COLLAPSED).attr("aria-expanded",!0),this.setTransitioning(!0);var l=c[0].toUpperCase()+c.slice(1),d="scroll"+l,p=t.getTransitionDurationFromElement(this._element);e(this._element).one(t.TRANSITION_END,function(){e(o._element).removeClass(h.COLLAPSING).addClass(h.COLLAPSE).addClass(h.SHOW),o._element.style[c]="",o.setTransitioning(!1),e(o._element).trigger(u.SHOWN)}).emulateTransitionEnd(p),this._element.style[c]=this._element[d]+"px"}}},a.hide=function(){var n=this;if(!this._isTransitioning&&e(this._element).hasClass(h.SHOW)){var i=e.Event(u.HIDE);if(e(this._element).trigger(i),!i.isDefaultPrevented()){var r=this._getDimension();this._element.style[r]=this._element.getBoundingClientRect()[r]+"px",t.reflow(this._element),e(this._element).addClass(h.COLLAPSING).removeClass(h.COLLAPSE).removeClass(h.SHOW);var o=this._triggerArray.length;if(o>0)for(var s=0;s<o;s++){var a=this._triggerArray[s],c=t.getSelectorFromElement(a);if(null!==c){var l=e([].slice.call(document.querySelectorAll(c)));l.hasClass(h.SHOW)||e(a).addClass(h.COLLAPSED).attr("aria-expanded",!1)}}this.setTransitioning(!0),this._element.style[r]="";var d=t.getTransitionDurationFromElement(this._element);e(this._element).one(t.TRANSITION_END,function(){n.setTransitioning(!1),e(n._element).removeClass(h.COLLAPSING).addClass(h.COLLAPSE).trigger(u.HIDDEN)}).emulateTransitionEnd(d)}}},a.setTransitioning=function(e){this._isTransitioning=e},a.dispose=function(){e.removeData(this._element,s),this._config=null,this._parent=null,this._element=null,this._triggerArray=null,this._isTransitioning=null},a._getConfig=function(e){return(e=r({},c,e)).toggle=Boolean(e.toggle),t.typeCheckConfig(o,e,l),e},a._getDimension=function(){var t=e(this._element).hasClass(d.WIDTH);return t?d.WIDTH:d.HEIGHT},a._getParent=function(){var n,r=this;t.isElement(this._config.parent)?(n=this._config.parent,void 0!==this._config.parent.jquery&&(n=this._config.parent[0])):n=document.querySelector(this._config.parent);var o='[data-toggle="collapse"][data-parent="'+this._config.parent+'"]',s=[].slice.call(n.querySelectorAll(o));return e(s).each(function(e,t){r._addAriaAndCollapsedClass(i._getTargetFromElement(t),[t])}),n},a._addAriaAndCollapsedClass=function(t,n){var i=e(t).hasClass(h.SHOW);n.length&&e(n).toggleClass(h.COLLAPSED,!i).attr("aria-expanded",i)},i._getTargetFromElement=function(e){var n=t.getSelectorFromElement(e);return n?document.querySelector(n):null},i._jQueryInterface=function(t){return this.each(function(){var n=e(this),o=n.data(s),a=r({},c,n.data(),"object"==typeof t&&t?t:{});if(!o&&a.toggle&&/show|hide/.test(t)&&(a.toggle=!1),o||(o=new i(this,a),n.data(s,o)),"string"==typeof t){if(void 0===o[t])throw new TypeError('No method named "'+t+'"');o[t]()}})},function(e,t,i){t&&n(e.prototype,t),i&&n(e,i)}(i,null,[{key:"VERSION",get:function(){return"4.3.1"}},{key:"Default",get:function(){return c}}]),i}();return e(document).on(u.CLICK_DATA_API,f.DATA_TOGGLE,function(n){"A"===n.currentTarget.tagName&&n.preventDefault();var i=e(this),r=t.getSelectorFromElement(this),o=[].slice.call(document.querySelectorAll(r));e(o).each(function(){var t=e(this),n=t.data(s)?"toggle":i.data();p._jQueryInterface.call(t,n)})}),e.fn[o]=p._jQueryInterface,e.fn[o].Constructor=p,e.fn[o].noConflict=function(){return e.fn[o]=a,p._jQueryInterface},p}(n("jquery"),n("./node_modules/bootstrap/js/dist/util.js"))},"./node_modules/bootstrap/js/dist/modal.js":function(e,t,n){
|
||
/*!
|
||
* Bootstrap modal.js v4.3.1 (https://getbootstrap.com/)
|
||
* Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||
*/
|
||
e.exports=function(e,t){"use strict";function n(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){i(e,t,n[t])})}return e}e=e&&e.hasOwnProperty("default")?e.default:e,t=t&&t.hasOwnProperty("default")?t.default:t;var o="modal",s=".bs.modal",a=e.fn.modal,c={backdrop:!0,keyboard:!0,focus:!0,show:!0},l={backdrop:"(boolean|string)",keyboard:"boolean",focus:"boolean",show:"boolean"},u={HIDE:"hide.bs.modal",HIDDEN:"hidden.bs.modal",SHOW:"show.bs.modal",SHOWN:"shown.bs.modal",FOCUSIN:"focusin.bs.modal",RESIZE:"resize.bs.modal",CLICK_DISMISS:"click.dismiss.bs.modal",KEYDOWN_DISMISS:"keydown.dismiss.bs.modal",MOUSEUP_DISMISS:"mouseup.dismiss.bs.modal",MOUSEDOWN_DISMISS:"mousedown.dismiss.bs.modal",CLICK_DATA_API:"click.bs.modal.data-api"},h={SCROLLABLE:"modal-dialog-scrollable",SCROLLBAR_MEASURER:"modal-scrollbar-measure",BACKDROP:"modal-backdrop",OPEN:"modal-open",FADE:"fade",SHOW:"show"},d={DIALOG:".modal-dialog",MODAL_BODY:".modal-body",DATA_TOGGLE:'[data-toggle="modal"]',DATA_DISMISS:'[data-dismiss="modal"]',FIXED_CONTENT:".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",STICKY_CONTENT:".sticky-top"},f=function(){function i(e,t){this._config=this._getConfig(t),this._element=e,this._dialog=e.querySelector(d.DIALOG),this._backdrop=null,this._isShown=!1,this._isBodyOverflowing=!1,this._ignoreBackdropClick=!1,this._isTransitioning=!1,this._scrollbarWidth=0}var a=i.prototype;return a.toggle=function(e){return this._isShown?this.hide():this.show(e)},a.show=function(t){var n=this;if(!this._isShown&&!this._isTransitioning){e(this._element).hasClass(h.FADE)&&(this._isTransitioning=!0);var i=e.Event(u.SHOW,{relatedTarget:t});e(this._element).trigger(i),this._isShown||i.isDefaultPrevented()||(this._isShown=!0,this._checkScrollbar(),this._setScrollbar(),this._adjustDialog(),this._setEscapeEvent(),this._setResizeEvent(),e(this._element).on(u.CLICK_DISMISS,d.DATA_DISMISS,function(e){return n.hide(e)}),e(this._dialog).on(u.MOUSEDOWN_DISMISS,function(){e(n._element).one(u.MOUSEUP_DISMISS,function(t){e(t.target).is(n._element)&&(n._ignoreBackdropClick=!0)})}),this._showBackdrop(function(){return n._showElement(t)}))}},a.hide=function(n){var i=this;if(n&&n.preventDefault(),this._isShown&&!this._isTransitioning){var r=e.Event(u.HIDE);if(e(this._element).trigger(r),this._isShown&&!r.isDefaultPrevented()){this._isShown=!1;var o=e(this._element).hasClass(h.FADE);if(o&&(this._isTransitioning=!0),this._setEscapeEvent(),this._setResizeEvent(),e(document).off(u.FOCUSIN),e(this._element).removeClass(h.SHOW),e(this._element).off(u.CLICK_DISMISS),e(this._dialog).off(u.MOUSEDOWN_DISMISS),o){var s=t.getTransitionDurationFromElement(this._element);e(this._element).one(t.TRANSITION_END,function(e){return i._hideModal(e)}).emulateTransitionEnd(s)}else this._hideModal()}}},a.dispose=function(){[window,this._element,this._dialog].forEach(function(t){return e(t).off(s)}),e(document).off(u.FOCUSIN),e.removeData(this._element,"bs.modal"),this._config=null,this._element=null,this._dialog=null,this._backdrop=null,this._isShown=null,this._isBodyOverflowing=null,this._ignoreBackdropClick=null,this._isTransitioning=null,this._scrollbarWidth=null},a.handleUpdate=function(){this._adjustDialog()},a._getConfig=function(e){return e=r({},c,e),t.typeCheckConfig(o,e,l),e},a._showElement=function(n){var i=this,r=e(this._element).hasClass(h.FADE);this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE||document.body.appendChild(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),e(this._dialog).hasClass(h.SCROLLABLE)?this._dialog.querySelector(d.MODAL_BODY).scrollTop=0:this._element.scrollTop=0,r&&t.reflow(this._element),e(this._element).addClass(h.SHOW),this._config.focus&&this._enforceFocus();var o=e.Event(u.SHOWN,{relatedTarget:n}),s=function(){i._config.focus&&i._element.focus(),i._isTransitioning=!1,e(i._element).trigger(o)};if(r){var a=t.getTransitionDurationFromElement(this._dialog);e(this._dialog).one(t.TRANSITION_END,s).emulateTransitionEnd(a)}else s()},a._enforceFocus=function(){var t=this;e(document).off(u.FOCUSIN).on(u.FOCUSIN,function(n){document!==n.target&&t._element!==n.target&&0===e(t._element).has(n.target).length&&t._element.focus()})},a._setEscapeEvent=function(){var t=this;this._isShown&&this._config.keyboard?e(this._element).on(u.KEYDOWN_DISMISS,function(e){27===e.which&&(e.preventDefault(),t.hide())}):this._isShown||e(this._element).off(u.KEYDOWN_DISMISS)},a._setResizeEvent=function(){var t=this;this._isShown?e(window).on(u.RESIZE,function(e){return t.handleUpdate(e)}):e(window).off(u.RESIZE)},a._hideModal=function(){var t=this;this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._isTransitioning=!1,this._showBackdrop(function(){e(document.body).removeClass(h.OPEN),t._resetAdjustments(),t._resetScrollbar(),e(t._element).trigger(u.HIDDEN)})},a._removeBackdrop=function(){this._backdrop&&(e(this._backdrop).remove(),this._backdrop=null)},a._showBackdrop=function(n){var i=this,r=e(this._element).hasClass(h.FADE)?h.FADE:"";if(this._isShown&&this._config.backdrop){if(this._backdrop=document.createElement("div"),this._backdrop.className=h.BACKDROP,r&&this._backdrop.classList.add(r),e(this._backdrop).appendTo(document.body),e(this._element).on(u.CLICK_DISMISS,function(e){i._ignoreBackdropClick?i._ignoreBackdropClick=!1:e.target===e.currentTarget&&("static"===i._config.backdrop?i._element.focus():i.hide())}),r&&t.reflow(this._backdrop),e(this._backdrop).addClass(h.SHOW),!n)return;if(!r)return void n();var o=t.getTransitionDurationFromElement(this._backdrop);e(this._backdrop).one(t.TRANSITION_END,n).emulateTransitionEnd(o)}else if(!this._isShown&&this._backdrop){e(this._backdrop).removeClass(h.SHOW);var s=function(){i._removeBackdrop(),n&&n()};if(e(this._element).hasClass(h.FADE)){var a=t.getTransitionDurationFromElement(this._backdrop);e(this._backdrop).one(t.TRANSITION_END,s).emulateTransitionEnd(a)}else s()}else n&&n()},a._adjustDialog=function(){var e=this._element.scrollHeight>document.documentElement.clientHeight;!this._isBodyOverflowing&&e&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),this._isBodyOverflowing&&!e&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},a._resetAdjustments=function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""},a._checkScrollbar=function(){var e=document.body.getBoundingClientRect();this._isBodyOverflowing=e.left+e.right<window.innerWidth,this._scrollbarWidth=this._getScrollbarWidth()},a._setScrollbar=function(){var t=this;if(this._isBodyOverflowing){var n=[].slice.call(document.querySelectorAll(d.FIXED_CONTENT)),i=[].slice.call(document.querySelectorAll(d.STICKY_CONTENT));e(n).each(function(n,i){var r=i.style.paddingRight,o=e(i).css("padding-right");e(i).data("padding-right",r).css("padding-right",parseFloat(o)+t._scrollbarWidth+"px")}),e(i).each(function(n,i){var r=i.style.marginRight,o=e(i).css("margin-right");e(i).data("margin-right",r).css("margin-right",parseFloat(o)-t._scrollbarWidth+"px")});var r=document.body.style.paddingRight,o=e(document.body).css("padding-right");e(document.body).data("padding-right",r).css("padding-right",parseFloat(o)+this._scrollbarWidth+"px")}e(document.body).addClass(h.OPEN)},a._resetScrollbar=function(){var t=[].slice.call(document.querySelectorAll(d.FIXED_CONTENT));e(t).each(function(t,n){var i=e(n).data("padding-right");e(n).removeData("padding-right"),n.style.paddingRight=i||""});var n=[].slice.call(document.querySelectorAll(""+d.STICKY_CONTENT));e(n).each(function(t,n){var i=e(n).data("margin-right");void 0!==i&&e(n).css("margin-right",i).removeData("margin-right")});var i=e(document.body).data("padding-right");e(document.body).removeData("padding-right"),document.body.style.paddingRight=i||""},a._getScrollbarWidth=function(){var e=document.createElement("div");e.className=h.SCROLLBAR_MEASURER,document.body.appendChild(e);var t=e.getBoundingClientRect().width-e.clientWidth;return document.body.removeChild(e),t},i._jQueryInterface=function(t,n){return this.each(function(){var o=e(this).data("bs.modal"),s=r({},c,e(this).data(),"object"==typeof t&&t?t:{});if(o||(o=new i(this,s),e(this).data("bs.modal",o)),"string"==typeof t){if(void 0===o[t])throw new TypeError('No method named "'+t+'"');o[t](n)}else s.show&&o.show(n)})},function(e,t,i){t&&n(e.prototype,t),i&&n(e,i)}(i,null,[{key:"VERSION",get:function(){return"4.3.1"}},{key:"Default",get:function(){return c}}]),i}();return e(document).on(u.CLICK_DATA_API,d.DATA_TOGGLE,function(n){var i,o=this,s=t.getSelectorFromElement(this);s&&(i=document.querySelector(s));var a=e(i).data("bs.modal")?"toggle":r({},e(i).data(),e(this).data());"A"!==this.tagName&&"AREA"!==this.tagName||n.preventDefault();var c=e(i).one(u.SHOW,function(t){t.isDefaultPrevented()||c.one(u.HIDDEN,function(){e(o).is(":visible")&&o.focus()})});f._jQueryInterface.call(e(i),a,this)}),e.fn.modal=f._jQueryInterface,e.fn.modal.Constructor=f,e.fn.modal.noConflict=function(){return e.fn.modal=a,f._jQueryInterface},f}(n("jquery"),n("./node_modules/bootstrap/js/dist/util.js"))},"./node_modules/bootstrap/js/dist/popover.js":function(e,t,n){
|
||
/*!
|
||
* Bootstrap popover.js v4.3.1 (https://getbootstrap.com/)
|
||
* Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||
*/
|
||
e.exports=function(e,t){"use strict";function n(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){i(e,t,n[t])})}return e}e=e&&e.hasOwnProperty("default")?e.default:e,t=t&&t.hasOwnProperty("default")?t.default:t;var o="popover",s=".bs.popover",a=e.fn[o],c=new RegExp("(^|\\s)bs-popover\\S+","g"),l=r({},t.Default,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>'}),u=r({},t.DefaultType,{content:"(string|element|function)"}),h={FADE:"fade",SHOW:"show"},d={TITLE:".popover-header",CONTENT:".popover-body"},f={HIDE:"hide"+s,HIDDEN:"hidden"+s,SHOW:"show"+s,SHOWN:"shown"+s,INSERTED:"inserted"+s,CLICK:"click"+s,FOCUSIN:"focusin"+s,FOCUSOUT:"focusout"+s,MOUSEENTER:"mouseenter"+s,MOUSELEAVE:"mouseleave"+s},p=function(t){function i(){return t.apply(this,arguments)||this}!function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}(i,t);var r=i.prototype;return r.isWithContent=function(){return this.getTitle()||this._getContent()},r.addAttachmentClass=function(t){e(this.getTipElement()).addClass("bs-popover-"+t)},r.getTipElement=function(){return this.tip=this.tip||e(this.config.template)[0],this.tip},r.setContent=function(){var t=e(this.getTipElement());this.setElementContent(t.find(d.TITLE),this.getTitle());var n=this._getContent();"function"==typeof n&&(n=n.call(this.element)),this.setElementContent(t.find(d.CONTENT),n),t.removeClass(h.FADE+" "+h.SHOW)},r._getContent=function(){return this.element.getAttribute("data-content")||this.config.content},r._cleanTipClass=function(){var t=e(this.getTipElement()),n=t.attr("class").match(c);null!==n&&n.length>0&&t.removeClass(n.join(""))},i._jQueryInterface=function(t){return this.each(function(){var n=e(this).data("bs.popover"),r="object"==typeof t?t:null;if((n||!/dispose|hide/.test(t))&&(n||(n=new i(this,r),e(this).data("bs.popover",n)),"string"==typeof t)){if(void 0===n[t])throw new TypeError('No method named "'+t+'"');n[t]()}})},function(e,t,i){t&&n(e.prototype,t),i&&n(e,i)}(i,null,[{key:"VERSION",get:function(){return"4.3.1"}},{key:"Default",get:function(){return l}},{key:"NAME",get:function(){return o}},{key:"DATA_KEY",get:function(){return"bs.popover"}},{key:"Event",get:function(){return f}},{key:"EVENT_KEY",get:function(){return s}},{key:"DefaultType",get:function(){return u}}]),i}(t);return e.fn[o]=p._jQueryInterface,e.fn[o].Constructor=p,e.fn[o].noConflict=function(){return e.fn[o]=a,p._jQueryInterface},p}(n("jquery"),n("./node_modules/bootstrap/js/dist/tooltip.js"))},"./node_modules/bootstrap/js/dist/scrollspy.js":function(e,t,n){
|
||
/*!
|
||
* Bootstrap scrollspy.js v4.3.1 (https://getbootstrap.com/)
|
||
* Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||
*/
|
||
e.exports=function(e,t){"use strict";function n(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}e=e&&e.hasOwnProperty("default")?e.default:e,t=t&&t.hasOwnProperty("default")?t.default:t;var r="scrollspy",o=e.fn[r],s={offset:10,method:"auto",target:""},a={offset:"number",method:"string",target:"(string|element)"},c={ACTIVATE:"activate.bs.scrollspy",SCROLL:"scroll.bs.scrollspy",LOAD_DATA_API:"load.bs.scrollspy.data-api"},l={DROPDOWN_ITEM:"dropdown-item",DROPDOWN_MENU:"dropdown-menu",ACTIVE:"active"},u={DATA_SPY:'[data-spy="scroll"]',ACTIVE:".active",NAV_LIST_GROUP:".nav, .list-group",NAV_LINKS:".nav-link",NAV_ITEMS:".nav-item",LIST_ITEMS:".list-group-item",DROPDOWN:".dropdown",DROPDOWN_ITEMS:".dropdown-item",DROPDOWN_TOGGLE:".dropdown-toggle"},h={OFFSET:"offset",POSITION:"position"},d=function(){function o(t,n){var i=this;this._element=t,this._scrollElement="BODY"===t.tagName?window:t,this._config=this._getConfig(n),this._selector=this._config.target+" "+u.NAV_LINKS+","+this._config.target+" "+u.LIST_ITEMS+","+this._config.target+" "+u.DROPDOWN_ITEMS,this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,e(this._scrollElement).on(c.SCROLL,function(e){return i._process(e)}),this.refresh(),this._process()}var d=o.prototype;return d.refresh=function(){var n=this,i=this._scrollElement===this._scrollElement.window?h.OFFSET:h.POSITION,r="auto"===this._config.method?i:this._config.method,o=r===h.POSITION?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight();var s=[].slice.call(document.querySelectorAll(this._selector));s.map(function(n){var i,s=t.getSelectorFromElement(n);if(s&&(i=document.querySelector(s)),i){var a=i.getBoundingClientRect();if(a.width||a.height)return[e(i)[r]().top+o,s]}return null}).filter(function(e){return e}).sort(function(e,t){return e[0]-t[0]}).forEach(function(e){n._offsets.push(e[0]),n._targets.push(e[1])})},d.dispose=function(){e.removeData(this._element,"bs.scrollspy"),e(this._scrollElement).off(".bs.scrollspy"),this._element=null,this._scrollElement=null,this._config=null,this._selector=null,this._offsets=null,this._targets=null,this._activeTarget=null,this._scrollHeight=null},d._getConfig=function(n){if("string"!=typeof(n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){i(e,t,n[t])})}return e}({},s,"object"==typeof n&&n?n:{})).target){var o=e(n.target).attr("id");o||(o=t.getUID(r),e(n.target).attr("id",o)),n.target="#"+o}return t.typeCheckConfig(r,n,a),n},d._getScrollTop=function(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop},d._getScrollHeight=function(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)},d._getOffsetHeight=function(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height},d._process=function(){var e=this._getScrollTop()+this._config.offset,t=this._getScrollHeight(),n=this._config.offset+t-this._getOffsetHeight();if(this._scrollHeight!==t&&this.refresh(),e>=n){var i=this._targets[this._targets.length-1];this._activeTarget!==i&&this._activate(i)}else{if(this._activeTarget&&e<this._offsets[0]&&this._offsets[0]>0)return this._activeTarget=null,void this._clear();for(var r=this._offsets.length,o=r;o--;){var s=this._activeTarget!==this._targets[o]&&e>=this._offsets[o]&&(void 0===this._offsets[o+1]||e<this._offsets[o+1]);s&&this._activate(this._targets[o])}}},d._activate=function(t){this._activeTarget=t,this._clear();var n=this._selector.split(",").map(function(e){return e+'[data-target="'+t+'"],'+e+'[href="'+t+'"]'}),i=e([].slice.call(document.querySelectorAll(n.join(","))));i.hasClass(l.DROPDOWN_ITEM)?(i.closest(u.DROPDOWN).find(u.DROPDOWN_TOGGLE).addClass(l.ACTIVE),i.addClass(l.ACTIVE)):(i.addClass(l.ACTIVE),i.parents(u.NAV_LIST_GROUP).prev(u.NAV_LINKS+", "+u.LIST_ITEMS).addClass(l.ACTIVE),i.parents(u.NAV_LIST_GROUP).prev(u.NAV_ITEMS).children(u.NAV_LINKS).addClass(l.ACTIVE)),e(this._scrollElement).trigger(c.ACTIVATE,{relatedTarget:t})},d._clear=function(){[].slice.call(document.querySelectorAll(this._selector)).filter(function(e){return e.classList.contains(l.ACTIVE)}).forEach(function(e){return e.classList.remove(l.ACTIVE)})},o._jQueryInterface=function(t){return this.each(function(){var n=e(this).data("bs.scrollspy"),i="object"==typeof t&&t;if(n||(n=new o(this,i),e(this).data("bs.scrollspy",n)),"string"==typeof t){if(void 0===n[t])throw new TypeError('No method named "'+t+'"');n[t]()}})},function(e,t,i){t&&n(e.prototype,t),i&&n(e,i)}(o,null,[{key:"VERSION",get:function(){return"4.3.1"}},{key:"Default",get:function(){return s}}]),o}();return e(window).on(c.LOAD_DATA_API,function(){for(var t=[].slice.call(document.querySelectorAll(u.DATA_SPY)),n=t.length;n--;){var i=e(t[n]);d._jQueryInterface.call(i,i.data())}}),e.fn[r]=d._jQueryInterface,e.fn[r].Constructor=d,e.fn[r].noConflict=function(){return e.fn[r]=o,d._jQueryInterface},d}(n("jquery"),n("./node_modules/bootstrap/js/dist/util.js"))},"./node_modules/bootstrap/js/dist/tab.js":function(e,t,n){
|
||
/*!
|
||
* Bootstrap tab.js v4.3.1 (https://getbootstrap.com/)
|
||
* Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||
*/
|
||
e.exports=function(e,t){"use strict";function n(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}e=e&&e.hasOwnProperty("default")?e.default:e,t=t&&t.hasOwnProperty("default")?t.default:t;var i=e.fn.tab,r={HIDE:"hide.bs.tab",HIDDEN:"hidden.bs.tab",SHOW:"show.bs.tab",SHOWN:"shown.bs.tab",CLICK_DATA_API:"click.bs.tab.data-api"},o={DROPDOWN_MENU:"dropdown-menu",ACTIVE:"active",DISABLED:"disabled",FADE:"fade",SHOW:"show"},s={DROPDOWN:".dropdown",NAV_LIST_GROUP:".nav, .list-group",ACTIVE:".active",ACTIVE_UL:"> li > .active",DATA_TOGGLE:'[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',DROPDOWN_TOGGLE:".dropdown-toggle",DROPDOWN_ACTIVE_CHILD:"> .dropdown-menu .active"},a=function(){function i(e){this._element=e}var a=i.prototype;return a.show=function(){var n=this;if(!(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&e(this._element).hasClass(o.ACTIVE)||e(this._element).hasClass(o.DISABLED))){var i,a,c=e(this._element).closest(s.NAV_LIST_GROUP)[0],l=t.getSelectorFromElement(this._element);if(c){var u="UL"===c.nodeName||"OL"===c.nodeName?s.ACTIVE_UL:s.ACTIVE;a=(a=e.makeArray(e(c).find(u)))[a.length-1]}var h=e.Event(r.HIDE,{relatedTarget:this._element}),d=e.Event(r.SHOW,{relatedTarget:a});if(a&&e(a).trigger(h),e(this._element).trigger(d),!d.isDefaultPrevented()&&!h.isDefaultPrevented()){l&&(i=document.querySelector(l)),this._activate(this._element,c);var f=function(){var t=e.Event(r.HIDDEN,{relatedTarget:n._element}),i=e.Event(r.SHOWN,{relatedTarget:a});e(a).trigger(t),e(n._element).trigger(i)};i?this._activate(i,i.parentNode,f):f()}}},a.dispose=function(){e.removeData(this._element,"bs.tab"),this._element=null},a._activate=function(n,i,r){var a=this,c=!i||"UL"!==i.nodeName&&"OL"!==i.nodeName?e(i).children(s.ACTIVE):e(i).find(s.ACTIVE_UL),l=c[0],u=r&&l&&e(l).hasClass(o.FADE),h=function(){return a._transitionComplete(n,l,r)};if(l&&u){var d=t.getTransitionDurationFromElement(l);e(l).removeClass(o.SHOW).one(t.TRANSITION_END,h).emulateTransitionEnd(d)}else h()},a._transitionComplete=function(n,i,r){if(i){e(i).removeClass(o.ACTIVE);var a=e(i.parentNode).find(s.DROPDOWN_ACTIVE_CHILD)[0];a&&e(a).removeClass(o.ACTIVE),"tab"===i.getAttribute("role")&&i.setAttribute("aria-selected",!1)}if(e(n).addClass(o.ACTIVE),"tab"===n.getAttribute("role")&&n.setAttribute("aria-selected",!0),t.reflow(n),n.classList.contains(o.FADE)&&n.classList.add(o.SHOW),n.parentNode&&e(n.parentNode).hasClass(o.DROPDOWN_MENU)){var c=e(n).closest(s.DROPDOWN)[0];if(c){var l=[].slice.call(c.querySelectorAll(s.DROPDOWN_TOGGLE));e(l).addClass(o.ACTIVE)}n.setAttribute("aria-expanded",!0)}r&&r()},i._jQueryInterface=function(t){return this.each(function(){var n=e(this),r=n.data("bs.tab");if(r||(r=new i(this),n.data("bs.tab",r)),"string"==typeof t){if(void 0===r[t])throw new TypeError('No method named "'+t+'"');r[t]()}})},function(e,t,i){t&&n(e.prototype,t),i&&n(e,i)}(i,null,[{key:"VERSION",get:function(){return"4.3.1"}}]),i}();return e(document).on(r.CLICK_DATA_API,s.DATA_TOGGLE,function(t){t.preventDefault(),a._jQueryInterface.call(e(this),"show")}),e.fn.tab=a._jQueryInterface,e.fn.tab.Constructor=a,e.fn.tab.noConflict=function(){return e.fn.tab=i,a._jQueryInterface},a}(n("jquery"),n("./node_modules/bootstrap/js/dist/util.js"))},"./node_modules/bootstrap/js/dist/tooltip.js":function(e,t,n){
|
||
/*!
|
||
* Bootstrap tooltip.js v4.3.1 (https://getbootstrap.com/)
|
||
* Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||
*/
|
||
e.exports=function(e,t,n){"use strict";function i(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),i.forEach(function(t){r(e,t,n[t])})}return e}e=e&&e.hasOwnProperty("default")?e.default:e,t=t&&t.hasOwnProperty("default")?t.default:t,n=n&&n.hasOwnProperty("default")?n.default:n;var s=["background","cite","href","itemtype","longdesc","poster","src","xlink:href"],a={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},c=/^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi,l=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i;function u(e,t,n){if(0===e.length)return e;if(n&&"function"==typeof n)return n(e);for(var i=new window.DOMParser,r=i.parseFromString(e,"text/html"),o=Object.keys(t),a=[].slice.call(r.body.querySelectorAll("*")),u=function(e,n){var i=a[e],r=i.nodeName.toLowerCase();if(-1===o.indexOf(i.nodeName.toLowerCase()))return i.parentNode.removeChild(i),"continue";var u=[].slice.call(i.attributes),h=[].concat(t["*"]||[],t[r]||[]);u.forEach(function(e){(function(e,t){var n=e.nodeName.toLowerCase();if(-1!==t.indexOf(n))return-1===s.indexOf(n)||Boolean(e.nodeValue.match(c)||e.nodeValue.match(l));for(var i=t.filter(function(e){return e instanceof RegExp}),r=0,o=i.length;r<o;r++)if(n.match(i[r]))return!0;return!1})(e,h)||i.removeAttribute(e.nodeName)})},h=0,d=a.length;h<d;h++)u(h);return r.body.innerHTML}var h="tooltip",d=".bs.tooltip",f=e.fn[h],p=new RegExp("(^|\\s)bs-tooltip\\S+","g"),m=["sanitize","whiteList","sanitizeFn"],v={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"(number|string|function)",container:"(string|element|boolean)",fallbackPlacement:"(string|array)",boundary:"(string|element)",sanitize:"boolean",sanitizeFn:"(null|function)",whiteList:"object"},g={AUTO:"auto",TOP:"top",RIGHT:"right",BOTTOM:"bottom",LEFT:"left"},y={animation:!0,template:'<div class="tooltip" role="tooltip"><div class="arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:0,container:!1,fallbackPlacement:"flip",boundary:"scrollParent",sanitize:!0,sanitizeFn:null,whiteList:a},b={SHOW:"show",OUT:"out"},_={HIDE:"hide"+d,HIDDEN:"hidden"+d,SHOW:"show"+d,SHOWN:"shown"+d,INSERTED:"inserted"+d,CLICK:"click"+d,FOCUSIN:"focusin"+d,FOCUSOUT:"focusout"+d,MOUSEENTER:"mouseenter"+d,MOUSELEAVE:"mouseleave"+d},w={FADE:"fade",SHOW:"show"},k={TOOLTIP:".tooltip",TOOLTIP_INNER:".tooltip-inner",ARROW:".arrow"},E={HOVER:"hover",FOCUS:"focus",CLICK:"click",MANUAL:"manual"},C=function(){function r(e,n){if(void 0===t)throw new TypeError("Bootstrap's tooltips require Popper.js (https://popper.js.org/)");this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this.element=e,this.config=this._getConfig(n),this.tip=null,this._setListeners()}var s=r.prototype;return s.enable=function(){this._isEnabled=!0},s.disable=function(){this._isEnabled=!1},s.toggleEnabled=function(){this._isEnabled=!this._isEnabled},s.toggle=function(t){if(this._isEnabled)if(t){var n=this.constructor.DATA_KEY,i=e(t.currentTarget).data(n);i||(i=new this.constructor(t.currentTarget,this._getDelegateConfig()),e(t.currentTarget).data(n,i)),i._activeTrigger.click=!i._activeTrigger.click,i._isWithActiveTrigger()?i._enter(null,i):i._leave(null,i)}else{if(e(this.getTipElement()).hasClass(w.SHOW))return void this._leave(null,this);this._enter(null,this)}},s.dispose=function(){clearTimeout(this._timeout),e.removeData(this.element,this.constructor.DATA_KEY),e(this.element).off(this.constructor.EVENT_KEY),e(this.element).closest(".modal").off("hide.bs.modal"),this.tip&&e(this.tip).remove(),this._isEnabled=null,this._timeout=null,this._hoverState=null,this._activeTrigger=null,null!==this._popper&&this._popper.destroy(),this._popper=null,this.element=null,this.config=null,this.tip=null},s.show=function(){var i=this;if("none"===e(this.element).css("display"))throw new Error("Please use show on visible elements");var r=e.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){e(this.element).trigger(r);var o=n.findShadowRoot(this.element),s=e.contains(null!==o?o:this.element.ownerDocument.documentElement,this.element);if(r.isDefaultPrevented()||!s)return;var a=this.getTipElement(),c=n.getUID(this.constructor.NAME);a.setAttribute("id",c),this.element.setAttribute("aria-describedby",c),this.setContent(),this.config.animation&&e(a).addClass(w.FADE);var l="function"==typeof this.config.placement?this.config.placement.call(this,a,this.element):this.config.placement,u=this._getAttachment(l);this.addAttachmentClass(u);var h=this._getContainer();e(a).data(this.constructor.DATA_KEY,this),e.contains(this.element.ownerDocument.documentElement,this.tip)||e(a).appendTo(h),e(this.element).trigger(this.constructor.Event.INSERTED),this._popper=new t(this.element,a,{placement:u,modifiers:{offset:this._getOffset(),flip:{behavior:this.config.fallbackPlacement},arrow:{element:k.ARROW},preventOverflow:{boundariesElement:this.config.boundary}},onCreate:function(e){e.originalPlacement!==e.placement&&i._handlePopperPlacementChange(e)},onUpdate:function(e){return i._handlePopperPlacementChange(e)}}),e(a).addClass(w.SHOW),"ontouchstart"in document.documentElement&&e(document.body).children().on("mouseover",null,e.noop);var d=function(){i.config.animation&&i._fixTransition();var t=i._hoverState;i._hoverState=null,e(i.element).trigger(i.constructor.Event.SHOWN),t===b.OUT&&i._leave(null,i)};if(e(this.tip).hasClass(w.FADE)){var f=n.getTransitionDurationFromElement(this.tip);e(this.tip).one(n.TRANSITION_END,d).emulateTransitionEnd(f)}else d()}},s.hide=function(t){var i=this,r=this.getTipElement(),o=e.Event(this.constructor.Event.HIDE),s=function(){i._hoverState!==b.SHOW&&r.parentNode&&r.parentNode.removeChild(r),i._cleanTipClass(),i.element.removeAttribute("aria-describedby"),e(i.element).trigger(i.constructor.Event.HIDDEN),null!==i._popper&&i._popper.destroy(),t&&t()};if(e(this.element).trigger(o),!o.isDefaultPrevented()){if(e(r).removeClass(w.SHOW),"ontouchstart"in document.documentElement&&e(document.body).children().off("mouseover",null,e.noop),this._activeTrigger[E.CLICK]=!1,this._activeTrigger[E.FOCUS]=!1,this._activeTrigger[E.HOVER]=!1,e(this.tip).hasClass(w.FADE)){var a=n.getTransitionDurationFromElement(r);e(r).one(n.TRANSITION_END,s).emulateTransitionEnd(a)}else s();this._hoverState=""}},s.update=function(){null!==this._popper&&this._popper.scheduleUpdate()},s.isWithContent=function(){return Boolean(this.getTitle())},s.addAttachmentClass=function(t){e(this.getTipElement()).addClass("bs-tooltip-"+t)},s.getTipElement=function(){return this.tip=this.tip||e(this.config.template)[0],this.tip},s.setContent=function(){var t=this.getTipElement();this.setElementContent(e(t.querySelectorAll(k.TOOLTIP_INNER)),this.getTitle()),e(t).removeClass(w.FADE+" "+w.SHOW)},s.setElementContent=function(t,n){"object"!=typeof n||!n.nodeType&&!n.jquery?this.config.html?(this.config.sanitize&&(n=u(n,this.config.whiteList,this.config.sanitizeFn)),t.html(n)):t.text(n):this.config.html?e(n).parent().is(t)||t.empty().append(n):t.text(e(n).text())},s.getTitle=function(){var e=this.element.getAttribute("data-original-title");return e||(e="function"==typeof this.config.title?this.config.title.call(this.element):this.config.title),e},s._getOffset=function(){var e=this,t={};return"function"==typeof this.config.offset?t.fn=function(t){return t.offsets=o({},t.offsets,e.config.offset(t.offsets,e.element)||{}),t}:t.offset=this.config.offset,t},s._getContainer=function(){return!1===this.config.container?document.body:n.isElement(this.config.container)?e(this.config.container):e(document).find(this.config.container)},s._getAttachment=function(e){return g[e.toUpperCase()]},s._setListeners=function(){var t=this,n=this.config.trigger.split(" ");n.forEach(function(n){if("click"===n)e(t.element).on(t.constructor.Event.CLICK,t.config.selector,function(e){return t.toggle(e)});else if(n!==E.MANUAL){var i=n===E.HOVER?t.constructor.Event.MOUSEENTER:t.constructor.Event.FOCUSIN,r=n===E.HOVER?t.constructor.Event.MOUSELEAVE:t.constructor.Event.FOCUSOUT;e(t.element).on(i,t.config.selector,function(e){return t._enter(e)}).on(r,t.config.selector,function(e){return t._leave(e)})}}),e(this.element).closest(".modal").on("hide.bs.modal",function(){t.element&&t.hide()}),this.config.selector?this.config=o({},this.config,{trigger:"manual",selector:""}):this._fixTitle()},s._fixTitle=function(){var e=typeof this.element.getAttribute("data-original-title");(this.element.getAttribute("title")||"string"!==e)&&(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))},s._enter=function(t,n){var i=this.constructor.DATA_KEY;(n=n||e(t.currentTarget).data(i))||(n=new this.constructor(t.currentTarget,this._getDelegateConfig()),e(t.currentTarget).data(i,n)),t&&(n._activeTrigger["focusin"===t.type?E.FOCUS:E.HOVER]=!0),e(n.getTipElement()).hasClass(w.SHOW)||n._hoverState===b.SHOW?n._hoverState=b.SHOW:(clearTimeout(n._timeout),n._hoverState=b.SHOW,n.config.delay&&n.config.delay.show?n._timeout=setTimeout(function(){n._hoverState===b.SHOW&&n.show()},n.config.delay.show):n.show())},s._leave=function(t,n){var i=this.constructor.DATA_KEY;(n=n||e(t.currentTarget).data(i))||(n=new this.constructor(t.currentTarget,this._getDelegateConfig()),e(t.currentTarget).data(i,n)),t&&(n._activeTrigger["focusout"===t.type?E.FOCUS:E.HOVER]=!1),n._isWithActiveTrigger()||(clearTimeout(n._timeout),n._hoverState=b.OUT,n.config.delay&&n.config.delay.hide?n._timeout=setTimeout(function(){n._hoverState===b.OUT&&n.hide()},n.config.delay.hide):n.hide())},s._isWithActiveTrigger=function(){for(var e in this._activeTrigger)if(this._activeTrigger[e])return!0;return!1},s._getConfig=function(t){var i=e(this.element).data();return Object.keys(i).forEach(function(e){-1!==m.indexOf(e)&&delete i[e]}),"number"==typeof(t=o({},this.constructor.Default,i,"object"==typeof t&&t?t:{})).delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),n.typeCheckConfig(h,t,this.constructor.DefaultType),t.sanitize&&(t.template=u(t.template,t.whiteList,t.sanitizeFn)),t},s._getDelegateConfig=function(){var e={};if(this.config)for(var t in this.config)this.constructor.Default[t]!==this.config[t]&&(e[t]=this.config[t]);return e},s._cleanTipClass=function(){var t=e(this.getTipElement()),n=t.attr("class").match(p);null!==n&&n.length&&t.removeClass(n.join(""))},s._handlePopperPlacementChange=function(e){var t=e.instance;this.tip=t.popper,this._cleanTipClass(),this.addAttachmentClass(this._getAttachment(e.placement))},s._fixTransition=function(){var t=this.getTipElement(),n=this.config.animation;null===t.getAttribute("x-placement")&&(e(t).removeClass(w.FADE),this.config.animation=!1,this.hide(),this.show(),this.config.animation=n)},r._jQueryInterface=function(t){return this.each(function(){var n=e(this).data("bs.tooltip"),i="object"==typeof t&&t;if((n||!/dispose|hide/.test(t))&&(n||(n=new r(this,i),e(this).data("bs.tooltip",n)),"string"==typeof t)){if(void 0===n[t])throw new TypeError('No method named "'+t+'"');n[t]()}})},function(e,t,n){t&&i(e.prototype,t),n&&i(e,n)}(r,null,[{key:"VERSION",get:function(){return"4.3.1"}},{key:"Default",get:function(){return y}},{key:"NAME",get:function(){return h}},{key:"DATA_KEY",get:function(){return"bs.tooltip"}},{key:"Event",get:function(){return _}},{key:"EVENT_KEY",get:function(){return d}},{key:"DefaultType",get:function(){return v}}]),r}();return e.fn[h]=C._jQueryInterface,e.fn[h].Constructor=C,e.fn[h].noConflict=function(){return e.fn[h]=f,C._jQueryInterface},C}(n("jquery"),n("./node_modules/popper.js/dist/esm/popper.js"),n("./node_modules/bootstrap/js/dist/util.js"))},"./node_modules/bootstrap/js/dist/util.js":function(e,t,n){
|
||
/*!
|
||
* Bootstrap util.js v4.3.1 (https://getbootstrap.com/)
|
||
* Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||
*/
|
||
e.exports=function(e){"use strict";var t="transitionend";function n(e){return{}.toString.call(e).match(/\s([a-z]+)/i)[1].toLowerCase()}function i(t){var n=this,i=!1;return e(this).one(r.TRANSITION_END,function(){i=!0}),setTimeout(function(){i||r.triggerTransitionEnd(n)},t),this}var r={TRANSITION_END:"bsTransitionEnd",getUID:function(e){do{e+=~~(1e6*Math.random())}while(document.getElementById(e));return e},getSelectorFromElement:function(e){var t=e.getAttribute("data-target");if(!t||"#"===t){var n=e.getAttribute("href");t=n&&"#"!==n?n.trim():""}try{return document.querySelector(t)?t:null}catch(e){return null}},getTransitionDurationFromElement:function(t){if(!t)return 0;var n=e(t).css("transition-duration"),i=e(t).css("transition-delay"),r=parseFloat(n),o=parseFloat(i);return r||o?(n=n.split(",")[0],i=i.split(",")[0],1e3*(parseFloat(n)+parseFloat(i))):0},reflow:function(e){return e.offsetHeight},triggerTransitionEnd:function(n){e(n).trigger(t)},supportsTransitionEnd:function(){return Boolean(t)},isElement:function(e){return(e[0]||e).nodeType},typeCheckConfig:function(e,t,i){for(var o in i)if(Object.prototype.hasOwnProperty.call(i,o)){var s=i[o],a=t[o],c=a&&r.isElement(a)?"element":n(a);if(!new RegExp(s).test(c))throw new Error(e.toUpperCase()+': Option "'+o+'" provided type "'+c+'" but expected type "'+s+'".')}},findShadowRoot:function(e){if(!document.documentElement.attachShadow)return null;if("function"==typeof e.getRootNode){var t=e.getRootNode();return t instanceof ShadowRoot?t:null}return e instanceof ShadowRoot?e:e.parentNode?r.findShadowRoot(e.parentNode):null}};return(e=e&&e.hasOwnProperty("default")?e.default:e).fn.emulateTransitionEnd=i,e.event.special[r.TRANSITION_END]={bindType:t,delegateType:t,handle:function(t){if(e(t.target).is(this))return t.handleObj.handler.apply(this,arguments)}},r}(n("jquery"))},"./node_modules/font-awesome sync \\.(otf|eot|svg|ttf|woff|woff2)$":function(e,t){function n(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}n.keys=function(){return[]},n.resolve=n,e.exports=n,n.id="./node_modules/font-awesome sync \\.(otf|eot|svg|ttf|woff|woff2)$"},"./node_modules/hammerjs/hammer.js":function(e,t,n){var i;
|
||
/*! Hammer.JS - v2.0.7 - 2016-04-22
|
||
* http://hammerjs.github.io/
|
||
*
|
||
* Copyright (c) 2016 Jorik Tangelder;
|
||
* Licensed under the MIT license */
|
||
/*! Hammer.JS - v2.0.7 - 2016-04-22
|
||
* http://hammerjs.github.io/
|
||
*
|
||
* Copyright (c) 2016 Jorik Tangelder;
|
||
* Licensed under the MIT license */
|
||
!function(r,o,s,a){"use strict";var c,l=["","webkit","Moz","MS","ms","o"],u=o.createElement("div"),h="function",d=Math.round,f=Math.abs,p=Date.now;function m(e,t,n){return setTimeout(k(e,n),t)}function v(e,t,n){return!!Array.isArray(e)&&(g(e,n[t],n),!0)}function g(e,t,n){var i;if(e)if(e.forEach)e.forEach(t,n);else if(e.length!==a)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 y(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=r.console&&(r.console.warn||r.console.log);return o&&o.call(r.console,i,n),e.apply(this,arguments)}}c="function"!=typeof Object.assign?function(e){if(e===a||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(i!==a&&null!==i)for(var r in i)i.hasOwnProperty(r)&&(t[r]=i[r])}return t}:Object.assign;var b=y(function(e,t,n){for(var i=Object.keys(t),r=0;r<i.length;)(!n||n&&e[i[r]]===a)&&(e[i[r]]=t[i[r]]),r++;return e},"extend","Use `assign`."),_=y(function(e,t){return b(e,t,!0)},"merge","Use `assign`.");function w(e,t,n){var i,r=t.prototype;(i=e.prototype=Object.create(r)).constructor=e,i._super=r,n&&c(i,n)}function k(e,t){return function(){return e.apply(t,arguments)}}function E(e,t){return typeof e==h?e.apply(t&&t[0]||a,t):e}function C(e,t){return e===a?t:e}function S(e,t,n){g(A(t),function(t){e.addEventListener(t,n,!1)})}function x(e,t,n){g(A(t),function(t){e.removeEventListener(t,n,!1)})}function T(e,t){for(;e;){if(e==t)return!0;e=e.parentNode}return!1}function O(e,t){return e.indexOf(t)>-1}function A(e){return e.trim().split(/\s+/g)}function D(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 I(e){return Array.prototype.slice.call(e,0)}function j(e,t,n){for(var i=[],r=[],o=0;o<e.length;){var s=t?e[o][t]:e[o];D(r,s)<0&&i.push(e[o]),r[o]=s,o++}return n&&(i=t?i.sort(function(e,n){return e[t]>n[t]}):i.sort()),i}function N(e,t){for(var n,i,r=t[0].toUpperCase()+t.slice(1),o=0;o<l.length;){if((i=(n=l[o])?n+r:t)in e)return i;o++}return a}var P=1;function L(e){var t=e.ownerDocument||e;return t.defaultView||t.parentWindow||r}var M="ontouchstart"in r,R=N(r,"PointerEvent")!==a,F=M&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),q=25,U=1,$=2,H=4,W=8,B=1,z=2,V=4,G=8,K=16,Y=z|V,Q=G|K,X=Y|Q,J=["x","y"],Z=["clientX","clientY"];function ee(e,t){var n=this;this.manager=e,this.callback=t,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(t){E(e.options.enable,[e])&&n.handler(t)},this.init()}function te(e,t,n){var i=n.pointers.length,r=n.changedPointers.length,o=t&U&&i-r==0,s=t&(H|W)&&i-r==0;n.isFirst=!!o,n.isFinal=!!s,o&&(e.session={}),n.eventType=t,function(e,t){var n=e.session,i=t.pointers,r=i.length;n.firstInput||(n.firstInput=ne(t));r>1&&!n.firstMultiple?n.firstMultiple=ne(t):1===r&&(n.firstMultiple=!1);var o=n.firstInput,s=n.firstMultiple,c=s?s.center:o.center,l=t.center=ie(i);t.timeStamp=p(),t.deltaTime=t.timeStamp-o.timeStamp,t.angle=ae(c,l),t.distance=se(c,l),function(e,t){var n=t.center,i=e.offsetDelta||{},r=e.prevDelta||{},o=e.prevInput||{};t.eventType!==U&&o.eventType!==H||(r=e.prevDelta={x:o.deltaX||0,y:o.deltaY||0},i=e.offsetDelta={x:n.x,y:n.y});t.deltaX=r.x+(n.x-i.x),t.deltaY=r.y+(n.y-i.y)}(n,t),t.offsetDirection=oe(t.deltaX,t.deltaY);var u=re(t.deltaTime,t.deltaX,t.deltaY);t.overallVelocityX=u.x,t.overallVelocityY=u.y,t.overallVelocity=f(u.x)>f(u.y)?u.x:u.y,t.scale=s?function(e,t){return se(t[0],t[1],Z)/se(e[0],e[1],Z)}(s.pointers,i):1,t.rotation=s?function(e,t){return ae(t[1],t[0],Z)+ae(e[1],e[0],Z)}(s.pointers,i):0,t.maxPointers=n.prevInput?t.pointers.length>n.prevInput.maxPointers?t.pointers.length:n.prevInput.maxPointers:t.pointers.length,function(e,t){var n,i,r,o,s=e.lastInterval||t,c=t.timeStamp-s.timeStamp;if(t.eventType!=W&&(c>q||s.velocity===a)){var l=t.deltaX-s.deltaX,u=t.deltaY-s.deltaY,h=re(c,l,u);i=h.x,r=h.y,n=f(h.x)>f(h.y)?h.x:h.y,o=oe(l,u),e.lastInterval=t}else n=s.velocity,i=s.velocityX,r=s.velocityY,o=s.direction;t.velocity=n,t.velocityX=i,t.velocityY=r,t.direction=o}(n,t);var h=e.element;T(t.srcEvent.target,h)&&(h=t.srcEvent.target);t.target=h}(e,n),e.emit("hammer.input",n),e.recognize(n),e.session.prevInput=n}function ne(e){for(var t=[],n=0;n<e.pointers.length;)t[n]={clientX:d(e.pointers[n].clientX),clientY:d(e.pointers[n].clientY)},n++;return{timeStamp:p(),pointers:t,center:ie(t),deltaX:e.deltaX,deltaY:e.deltaY}}function ie(e){var t=e.length;if(1===t)return{x:d(e[0].clientX),y:d(e[0].clientY)};for(var n=0,i=0,r=0;r<t;)n+=e[r].clientX,i+=e[r].clientY,r++;return{x:d(n/t),y:d(i/t)}}function re(e,t,n){return{x:t/e||0,y:n/e||0}}function oe(e,t){return e===t?B:f(e)>=f(t)?e<0?z:V:t<0?G:K}function se(e,t,n){n||(n=J);var i=t[n[0]]-e[n[0]],r=t[n[1]]-e[n[1]];return Math.sqrt(i*i+r*r)}function ae(e,t,n){n||(n=J);var i=t[n[0]]-e[n[0]],r=t[n[1]]-e[n[1]];return 180*Math.atan2(r,i)/Math.PI}ee.prototype={handler:function(){},init:function(){this.evEl&&S(this.element,this.evEl,this.domHandler),this.evTarget&&S(this.target,this.evTarget,this.domHandler),this.evWin&&S(L(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&x(this.element,this.evEl,this.domHandler),this.evTarget&&x(this.target,this.evTarget,this.domHandler),this.evWin&&x(L(this.element),this.evWin,this.domHandler)}};var ce={mousedown:U,mousemove:$,mouseup:H},le="mousedown",ue="mousemove mouseup";function he(){this.evEl=le,this.evWin=ue,this.pressed=!1,ee.apply(this,arguments)}w(he,ee,{handler:function(e){var t=ce[e.type];t&U&&0===e.button&&(this.pressed=!0),t&$&&1!==e.which&&(t=H),this.pressed&&(t&H&&(this.pressed=!1),this.callback(this.manager,t,{pointers:[e],changedPointers:[e],pointerType:"mouse",srcEvent:e}))}});var de={pointerdown:U,pointermove:$,pointerup:H,pointercancel:W,pointerout:W},fe={2:"touch",3:"pen",4:"mouse",5:"kinect"},pe="pointerdown",me="pointermove pointerup pointercancel";function ve(){this.evEl=pe,this.evWin=me,ee.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}r.MSPointerEvent&&!r.PointerEvent&&(pe="MSPointerDown",me="MSPointerMove MSPointerUp MSPointerCancel"),w(ve,ee,{handler:function(e){var t=this.store,n=!1,i=e.type.toLowerCase().replace("ms",""),r=de[i],o=fe[e.pointerType]||e.pointerType,s="touch"==o,a=D(t,e.pointerId,"pointerId");r&U&&(0===e.button||s)?a<0&&(t.push(e),a=t.length-1):r&(H|W)&&(n=!0),a<0||(t[a]=e,this.callback(this.manager,r,{pointers:t,changedPointers:[e],pointerType:o,srcEvent:e}),n&&t.splice(a,1))}});var ge={touchstart:U,touchmove:$,touchend:H,touchcancel:W},ye="touchstart",be="touchstart touchmove touchend touchcancel";function _e(){this.evTarget=ye,this.evWin=be,this.started=!1,ee.apply(this,arguments)}w(_e,ee,{handler:function(e){var t=ge[e.type];if(t===U&&(this.started=!0),this.started){var n=function(e,t){var n=I(e.touches),i=I(e.changedTouches);t&(H|W)&&(n=j(n.concat(i),"identifier",!0));return[n,i]}.call(this,e,t);t&(H|W)&&n[0].length-n[1].length==0&&(this.started=!1),this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:"touch",srcEvent:e})}}});var we={touchstart:U,touchmove:$,touchend:H,touchcancel:W},ke="touchstart touchmove touchend touchcancel";function Ee(){this.evTarget=ke,this.targetIds={},ee.apply(this,arguments)}w(Ee,ee,{handler:function(e){var t=we[e.type],n=function(e,t){var n=I(e.touches),i=this.targetIds;if(t&(U|$)&&1===n.length)return i[n[0].identifier]=!0,[n,n];var r,o,s=I(e.changedTouches),a=[],c=this.target;if(o=n.filter(function(e){return T(e.target,c)}),t===U)for(r=0;r<o.length;)i[o[r].identifier]=!0,r++;r=0;for(;r<s.length;)i[s[r].identifier]&&a.push(s[r]),t&(H|W)&&delete i[s[r].identifier],r++;if(!a.length)return;return[j(o.concat(a),"identifier",!0),a]}.call(this,e,t);n&&this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:"touch",srcEvent:e})}});var Ce=2500,Se=25;function xe(){ee.apply(this,arguments);var e=k(this.handler,this);this.touch=new Ee(this.manager,e),this.mouse=new he(this.manager,e),this.primaryTouch=null,this.lastTouches=[]}function Te(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;setTimeout(function(){var e=i.indexOf(n);e>-1&&i.splice(e,1)},Ce)}}w(xe,ee,{handler:function(e,t,n){var i="touch"==n.pointerType,r="mouse"==n.pointerType;if(!(r&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(i)(function(e,t){e&U?(this.primaryTouch=t.changedPointers[0].identifier,Te.call(this,t)):e&(H|W)&&Te.call(this,t)}).call(this,t,n);else if(r&&function(e){for(var t=e.srcEvent.clientX,n=e.srcEvent.clientY,i=0;i<this.lastTouches.length;i++){var r=this.lastTouches[i],o=Math.abs(t-r.x),s=Math.abs(n-r.y);if(o<=Se&&s<=Se)return!0}return!1}.call(this,n))return;this.callback(e,t,n)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var Oe=N(u.style,"touchAction"),Ae=Oe!==a,De="auto",Ie="manipulation",je="none",Ne="pan-x",Pe="pan-y",Le=function(){if(!Ae)return!1;var e={},t=r.CSS&&r.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(n){e[n]=!t||r.CSS.supports("touch-action",n)}),e}();function Me(e,t){this.manager=e,this.set(t)}Me.prototype={set:function(e){"compute"==e&&(e=this.compute()),Ae&&this.manager.element.style&&Le[e]&&(this.manager.element.style[Oe]=e),this.actions=e.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var e=[];return g(this.manager.recognizers,function(t){E(t.options.enable,[t])&&(e=e.concat(t.getTouchAction()))}),function(e){if(O(e,je))return je;var t=O(e,Ne),n=O(e,Pe);if(t&&n)return je;if(t||n)return t?Ne:Pe;if(O(e,Ie))return Ie;return De}(e.join(" "))},preventDefaults:function(e){var t=e.srcEvent,n=e.offsetDirection;if(this.manager.session.prevented)t.preventDefault();else{var i=this.actions,r=O(i,je)&&!Le[je],o=O(i,Pe)&&!Le[Pe],s=O(i,Ne)&&!Le[Ne];if(r){var a=1===e.pointers.length,c=e.distance<2,l=e.deltaTime<250;if(a&&c&&l)return}if(!s||!o)return r||o&&n&Y||s&&n&Q?this.preventSrc(t):void 0}},preventSrc:function(e){this.manager.session.prevented=!0,e.preventDefault()}};var Re=1,Fe=2,qe=4,Ue=8,$e=Ue,He=16;function We(e){this.options=c({},this.defaults,e||{}),this.id=P++,this.manager=null,this.options.enable=C(this.options.enable,!0),this.state=Re,this.simultaneous={},this.requireFail=[]}function Be(e){return e&He?"cancel":e&Ue?"end":e&qe?"move":e&Fe?"start":""}function ze(e){return e==K?"down":e==G?"up":e==z?"left":e==V?"right":""}function Ve(e,t){var n=t.manager;return n?n.get(e):e}function Ge(){We.apply(this,arguments)}function Ke(){Ge.apply(this,arguments),this.pX=null,this.pY=null}function Ye(){Ge.apply(this,arguments)}function Qe(){We.apply(this,arguments),this._timer=null,this._input=null}function Xe(){Ge.apply(this,arguments)}function Je(){Ge.apply(this,arguments)}function Ze(){We.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}function et(e,t){return(t=t||{}).recognizers=C(t.recognizers,et.defaults.preset),new tt(e,t)}We.prototype={defaults:{},set:function(e){return c(this.options,e),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(e){if(v(e,"recognizeWith",this))return this;var t=this.simultaneous;return t[(e=Ve(e,this)).id]||(t[e.id]=e,e.recognizeWith(this)),this},dropRecognizeWith:function(e){return v(e,"dropRecognizeWith",this)?this:(e=Ve(e,this),delete this.simultaneous[e.id],this)},requireFailure:function(e){if(v(e,"requireFailure",this))return this;var t=this.requireFail;return-1===D(t,e=Ve(e,this))&&(t.push(e),e.requireFailure(this)),this},dropRequireFailure:function(e){if(v(e,"dropRequireFailure",this))return this;e=Ve(e,this);var t=D(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){var t=this,n=this.state;function i(n){t.manager.emit(n,e)}n<Ue&&i(t.options.event+Be(n)),i(t.options.event),e.additionalEvent&&i(e.additionalEvent),n>=Ue&&i(t.options.event+Be(n))},tryEmit:function(e){if(this.canEmit())return this.emit(e);this.state=32},canEmit:function(){for(var e=0;e<this.requireFail.length;){if(!(this.requireFail[e].state&(32|Re)))return!1;e++}return!0},recognize:function(e){var t=c({},e);if(!E(this.options.enable,[this,t]))return this.reset(),void(this.state=32);this.state&($e|He|32)&&(this.state=Re),this.state=this.process(t),this.state&(Fe|qe|Ue|He)&&this.tryEmit(t)},process:function(e){},getTouchAction:function(){},reset:function(){}},w(Ge,We,{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&(Fe|qe),r=this.attrTest(e);return i&&(n&W||!r)?t|He:i||r?n&H?t|Ue:t&Fe?t|qe:Fe:32}}),w(Ke,Ge,{defaults:{event:"pan",threshold:10,pointers:1,direction:X},getTouchAction:function(){var e=this.options.direction,t=[];return e&Y&&t.push(Pe),e&Q&&t.push(Ne),t},directionTest:function(e){var t=this.options,n=!0,i=e.distance,r=e.direction,o=e.deltaX,s=e.deltaY;return r&t.direction||(t.direction&Y?(r=0===o?B:o<0?z:V,n=o!=this.pX,i=Math.abs(e.deltaX)):(r=0===s?B:s<0?G:K,n=s!=this.pY,i=Math.abs(e.deltaY))),e.direction=r,n&&i>t.threshold&&r&t.direction},attrTest:function(e){return Ge.prototype.attrTest.call(this,e)&&(this.state&Fe||!(this.state&Fe)&&this.directionTest(e))},emit:function(e){this.pX=e.deltaX,this.pY=e.deltaY;var t=ze(e.direction);t&&(e.additionalEvent=this.options.event+t),this._super.emit.call(this,e)}}),w(Ye,Ge,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[je]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.scale-1)>this.options.threshold||this.state&Fe)},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)}}),w(Qe,We,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[De]},process:function(e){var t=this.options,n=e.pointers.length===t.pointers,i=e.distance<t.threshold,r=e.deltaTime>t.time;if(this._input=e,!i||!n||e.eventType&(H|W)&&!r)this.reset();else if(e.eventType&U)this.reset(),this._timer=m(function(){this.state=$e,this.tryEmit()},t.time,this);else if(e.eventType&H)return $e;return 32},reset:function(){clearTimeout(this._timer)},emit:function(e){this.state===$e&&(e&&e.eventType&H?this.manager.emit(this.options.event+"up",e):(this._input.timeStamp=p(),this.manager.emit(this.options.event,this._input)))}}),w(Xe,Ge,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[je]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.rotation)>this.options.threshold||this.state&Fe)}}),w(Je,Ge,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:Y|Q,pointers:1},getTouchAction:function(){return Ke.prototype.getTouchAction.call(this)},attrTest:function(e){var t,n=this.options.direction;return n&(Y|Q)?t=e.overallVelocity:n&Y?t=e.overallVelocityX:n&Q&&(t=e.overallVelocityY),this._super.attrTest.call(this,e)&&n&e.offsetDirection&&e.distance>this.options.threshold&&e.maxPointers==this.options.pointers&&f(t)>this.options.velocity&&e.eventType&H},emit:function(e){var t=ze(e.offsetDirection);t&&this.manager.emit(this.options.event+t,e),this.manager.emit(this.options.event,e)}}),w(Ze,We,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[Ie]},process:function(e){var t=this.options,n=e.pointers.length===t.pointers,i=e.distance<t.threshold,r=e.deltaTime<t.time;if(this.reset(),e.eventType&U&&0===this.count)return this.failTimeout();if(i&&r&&n){if(e.eventType!=H)return this.failTimeout();var o=!this.pTime||e.timeStamp-this.pTime<t.interval,s=!this.pCenter||se(this.pCenter,e.center)<t.posThreshold;if(this.pTime=e.timeStamp,this.pCenter=e.center,s&&o?this.count+=1:this.count=1,this._input=e,0===this.count%t.taps)return this.hasRequireFailures()?(this._timer=m(function(){this.state=$e,this.tryEmit()},t.interval,this),Fe):$e}return 32},failTimeout:function(){return this._timer=m(function(){this.state=32},this.options.interval,this),32},reset:function(){clearTimeout(this._timer)},emit:function(){this.state==$e&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}}),et.VERSION="2.0.7",et.defaults={domEvents:!1,touchAction:"compute",enable:!0,inputTarget:null,inputClass:null,preset:[[Xe,{enable:!1}],[Ye,{enable:!1},["rotate"]],[Je,{direction:Y}],[Ke,{direction:Y},["swipe"]],[Ze],[Ze,{event:"doubletap",taps:2},["tap"]],[Qe]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};function tt(e,t){this.options=c({},et.defaults,t||{}),this.options.inputTarget=this.options.inputTarget||e,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=e,this.input=function(e){var t=e.options.inputClass;return new(t||(R?ve:F?Ee:M?xe:he))(e,te)}(this),this.touchAction=new Me(this,this.options.touchAction),nt(this,!0),g(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 nt(e,t){var n,i=e.element;i.style&&(g(e.options.cssProps,function(r,o){n=N(i.style,o),t?(e.oldCssProps[n]=i.style[n],i.style[n]=r):i.style[n]=e.oldCssProps[n]||""}),t||(e.oldCssProps={}))}tt.prototype={set:function(e){return c(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?2:1},recognize:function(e){var t=this.session;if(!t.stopped){var n;this.touchAction.preventDefaults(e);var i=this.recognizers,r=t.curRecognizer;(!r||r&&r.state&$e)&&(r=t.curRecognizer=null);for(var o=0;o<i.length;)n=i[o],2===t.stopped||r&&n!=r&&!n.canRecognizeWith(r)?n.reset():n.recognize(e),!r&&n.state&(Fe|qe|Ue)&&(r=t.curRecognizer=n),o++}},get:function(e){if(e instanceof We)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(v(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(v(e,"remove",this))return this;if(e=this.get(e)){var t=this.recognizers,n=D(t,e);-1!==n&&(t.splice(n,1),this.touchAction.update())}return this},on:function(e,t){if(e!==a&&t!==a){var n=this.handlers;return g(A(e),function(e){n[e]=n[e]||[],n[e].push(t)}),this}},off:function(e,t){if(e!==a){var n=this.handlers;return g(A(e),function(e){t?n[e]&&n[e].splice(D(n[e],t),1):delete n[e]}),this}},emit:function(e,t){this.options.domEvents&&function(e,t){var n=o.createEvent("Event");n.initEvent(e,!0,!0),n.gesture=t,t.target.dispatchEvent(n)}(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&&nt(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}},c(et,{INPUT_START:U,INPUT_MOVE:$,INPUT_END:H,INPUT_CANCEL:W,STATE_POSSIBLE:Re,STATE_BEGAN:Fe,STATE_CHANGED:qe,STATE_ENDED:Ue,STATE_RECOGNIZED:$e,STATE_CANCELLED:He,STATE_FAILED:32,DIRECTION_NONE:B,DIRECTION_LEFT:z,DIRECTION_RIGHT:V,DIRECTION_UP:G,DIRECTION_DOWN:K,DIRECTION_HORIZONTAL:Y,DIRECTION_VERTICAL:Q,DIRECTION_ALL:X,Manager:tt,Input:ee,TouchAction:Me,TouchInput:Ee,MouseInput:he,PointerEventInput:ve,TouchMouseInput:xe,SingleTouchInput:_e,Recognizer:We,AttrRecognizer:Ge,Tap:Ze,Pan:Ke,Swipe:Je,Pinch:Ye,Rotate:Xe,Press:Qe,on:S,off:x,each:g,merge:_,extend:b,assign:c,inherit:w,bindFn:k,prefixed:N}),(void 0!==r?r:"undefined"!=typeof self?self:{}).Hammer=et,(i=function(){return et}.call(t,n,t,e))===a||(e.exports=i)}(window,document)},"./node_modules/jquery-hammerjs/jquery.hammer.js":function(e,t,n){var i,r,o;r=[n("jquery"),n("./node_modules/hammerjs/hammer.js")],void 0===(o="function"==typeof(i=function(e,t){e.fn.hammer=function(n){return this.each(function(){!function(n,i){var r=e(n);r.data("hammer")||r.data("hammer",new t(r[0],i))}(this,n)})},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)})?i.apply(t,r):i)||(e.exports=o)},"./node_modules/jquery-zoom/jquery.zoom.js":function(e,t){
|
||
/*!
|
||
Zoom 1.7.21
|
||
license: MIT
|
||
http://www.jacklmoore.com/zoom
|
||
*/
|
||
!function(e){var t={url:!1,callback:!1,target:!1,duration:120,on:"mouseover",touch:!0,onZoomIn:!1,onZoomOut:!1,magnify:1};e.zoom=function(t,n,i,r){var o,s,a,c,l,u,h,d=e(t),f=d.css("position"),p=e(n);return t.style.position=/(absolute|fixed)/.test(f)?f:"relative",t.style.overflow="hidden",i.style.width=i.style.height="",e(i).addClass("zoomImg").css({position:"absolute",top:0,left:0,opacity:0,width:i.width*r,height:i.height*r,border:"none",maxWidth:"none",maxHeight:"none"}).appendTo(t),{init:function(){s=d.outerWidth(),o=d.outerHeight(),n===t?(c=s,a=o):(c=p.outerWidth(),a=p.outerHeight()),l=(i.width-s)/c,u=(i.height-o)/a,h=p.offset()},move:function(e){var t=e.pageX-h.left,n=e.pageY-h.top;n=Math.max(Math.min(n,a),0),t=Math.max(Math.min(t,c),0),i.style.left=t*-l+"px",i.style.top=n*-u+"px"}}},e.fn.zoom=function(n){return this.each(function(){var i=e.extend({},t,n||{}),r=i.target&&e(i.target)[0]||this,o=this,s=e(o),a=document.createElement("img"),c=e(a),l="mousemove.zoom",u=!1,h=!1;if(!i.url){var d=o.querySelector("img");if(d&&(i.url=d.getAttribute("data-src")||d.currentSrc||d.src),!i.url)return}s.one("zoom.destroy",function(e,t){s.off(".zoom"),r.style.position=e,r.style.overflow=t,a.onload=null,c.remove()}.bind(this,r.style.position,r.style.overflow)),a.onload=function(){var t=e.zoom(r,o,a,i.magnify);function n(n){t.init(),t.move(n),c.stop().fadeTo(e.support.opacity?i.duration:0,1,!!e.isFunction(i.onZoomIn)&&i.onZoomIn.call(a))}function d(){c.stop().fadeTo(i.duration,0,!!e.isFunction(i.onZoomOut)&&i.onZoomOut.call(a))}"grab"===i.on?s.on("mousedown.zoom",function(i){1===i.which&&(e(document).one("mouseup.zoom",function(){d(),e(document).off(l,t.move)}),n(i),e(document).on(l,t.move),i.preventDefault())}):"click"===i.on?s.on("click.zoom",function(i){return u?void 0:(u=!0,n(i),e(document).on(l,t.move),e(document).one("click.zoom",function(){d(),u=!1,e(document).off(l,t.move)}),!1)}):"toggle"===i.on?s.on("click.zoom",function(e){u?d():n(e),u=!u}):"mouseover"===i.on&&(t.init(),s.on("mouseenter.zoom",n).on("mouseleave.zoom",d).on(l,t.move)),i.touch&&s.on("touchstart.zoom",function(e){e.preventDefault(),h?(h=!1,d()):(h=!0,n(e.originalEvent.touches[0]||e.originalEvent.changedTouches[0]))}).on("touchmove.zoom",function(e){e.preventDefault(),t.move(e.originalEvent.touches[0]||e.originalEvent.changedTouches[0])}).on("touchend.zoom",function(e){e.preventDefault(),h&&(h=!1,d())}),e.isFunction(i.callback)&&i.callback.call(a)},a.setAttribute("role","presentation"),a.alt="",a.src=i.url})},e.fn.zoom.defaults=t}(window.jQuery)},"./node_modules/jquery.inputmask/dist/jquery.inputmask.bundle.js":function(e,t){
|
||
/*!
|
||
* jquery.inputmask.bundle.js
|
||
* https://github.com/RobinHerbots/jquery.inputmask
|
||
* Copyright (c) 2010 - 2016 Robin Herbots
|
||
* Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
|
||
* Version: 3.3.4
|
||
*/
|
||
!function(e){function t(i,r){return this instanceof t?(e.isPlainObject(i)?r=i:(r=r||{}).alias=i,this.el=void 0,this.opts=e.extend(!0,{},this.defaults,r),this.maskset=void 0,this.noMasksCache=r&&void 0!==r.definitions,this.userOptions=r||{},this.events={},this.dataAttribute="data-inputmask",this.isRTL=this.opts.numericInput,void n(this.opts.alias,r,this.opts)):new t(i,r)}function n(t,i,r){var o=r.aliases[t];return o?(o.alias&&n(o.alias,void 0,r),e.extend(!0,r,o),e.extend(!0,r,i),!0):(null===r.mask&&(r.mask=t),!1)}function i(n,i){function r(n,r,o){if(null!==n&&""!==n){if(1===n.length&&!1===o.greedy&&0!==o.repeat&&(o.placeholder=""),o.repeat>0||"*"===o.repeat||"+"===o.repeat){var s="*"===o.repeat?0:"+"===o.repeat?1:o.repeat;n=o.groupmarker.start+n+o.groupmarker.end+o.quantifiermarker.start+s+","+o.repeat+o.quantifiermarker.end}var a;return void 0===t.prototype.masksCache[n]||!0===i?(a={mask:n,maskToken:t.prototype.analyseMask(n,o),validPositions:{},_buffer:void 0,buffer:void 0,tests:{},metadata:r,maskLength:void 0},!0!==i&&(t.prototype.masksCache[o.numericInput?n.split("").reverse().join(""):n]=a,a=e.extend(!0,{},t.prototype.masksCache[o.numericInput?n.split("").reverse().join(""):n]))):a=e.extend(!0,{},t.prototype.masksCache[o.numericInput?n.split("").reverse().join(""):n]),a}}var o;if(e.isFunction(n.mask)&&(n.mask=n.mask(n)),e.isArray(n.mask)){if(n.mask.length>1){n.keepStatic=null===n.keepStatic||n.keepStatic;var s=n.groupmarker.start;return e.each(n.numericInput?n.mask.reverse():n.mask,function(t,i){s.length>1&&(s+=n.groupmarker.end+n.alternatormarker+n.groupmarker.start),s+=void 0===i.mask||e.isFunction(i.mask)?i:i.mask}),r(s+=n.groupmarker.end,n.mask,n)}n.mask=n.mask.pop()}return n.mask&&(o=void 0===n.mask.mask||e.isFunction(n.mask.mask)?r(n.mask,n.mask,n):r(n.mask.mask,n.mask,n)),o}function r(n,i,o){function u(e,t,n){t=t||0;var i,r,s,a=[],c=0,l=f();-1===(H=void 0!==z?z.maxLength:void 0)&&(H=void 0);do{!0===e&&h().validPositions[c]?(r=(s=h().validPositions[c]).match,i=s.locator.slice(),a.push(!0===n?s.input:!1===n?r.nativeDef:D(c,r))):(r=(s=v(c,i,c-1)).match,i=s.locator.slice(),(!1===o.jitMasking||c<l||"number"==typeof o.jitMasking&&isFinite(o.jitMasking)&&o.jitMasking>c)&&a.push(!1===n?r.nativeDef:D(c,r))),c++}while((void 0===H||c<H)&&(null!==r.fn||""!==r.def)||t>c);return""===a[a.length-1]&&a.pop(),h().maskLength=c+1,a}function h(){return i}function d(e){var t=h();t.buffer=void 0,!0!==e&&(t._buffer=void 0,t.validPositions={},t.p=0)}function f(e,t,n){var i=-1,r=-1,o=n||h().validPositions;for(var s in void 0===e&&(e=-1),o){var a=parseInt(s);o[a]&&(t||null!==o[a].match.fn)&&(a<=e&&(i=a),a>=e&&(r=a))}return-1!==i&&e-i>1||r<e?i:r}function p(t,n,i,r){function s(e){var t=h().validPositions[e];if(void 0!==t&&null===t.match.fn){var n=h().validPositions[e-1],i=h().validPositions[e+1];return void 0!==n&&void 0!==i}return!1}var a,c=t,l=e.extend(!0,{},h().validPositions),u=!1;for(h().p=t,a=n-1;a>=c;a--)void 0!==h().validPositions[a]&&(!0!==i&&(!h().validPositions[a].match.optionality&&s(a)||!1===o.canClearPosition(h(),a,f(),r,o))||delete h().validPositions[a]);for(d(!0),a=c+1;a<=f();){for(;void 0!==h().validPositions[c];)c++;if(a<c&&(a=c+1),void 0===h().validPositions[a]&&S(a))a++;else{var p=v(a);!1===u&&l[c]&&l[c].match.def===p.match.def?(h().validPositions[c]=e.extend(!0,{},l[c]),h().validPositions[c].input=p.input,delete h().validPositions[a],a++):y(c,p.match.def)?!1!==C(c,p.input||D(a),!0)&&(delete h().validPositions[a],a++,u=!0):S(a)||(a++,c--),c++}}d(!0)}function m(e,t){for(var n,i=e,r=f(),s=h().validPositions[r]||b(0)[0],a=void 0!==s.alternation?s.locator[s.alternation].toString().split(","):[],c=0;c<i.length&&(!((n=i[c]).match&&(o.greedy&&!0!==n.match.optionalQuantifier||(!1===n.match.optionality||!1===n.match.newBlockMarker)&&!0!==n.match.optionalQuantifier)&&(void 0===s.alternation||s.alternation!==n.alternation||void 0!==n.locator[s.alternation]&&E(n.locator[s.alternation].toString().split(","),a)))||!0===t&&(null!==n.match.fn||/[0-9a-bA-Z]/.test(n.match.def)));c++);return n}function v(e,t,n){return h().validPositions[e]||m(b(e,t?t.slice():t,n))}function g(e){return h().validPositions[e]?h().validPositions[e]:b(e)[0]}function y(e,t){for(var n=!1,i=b(e),r=0;r<i.length;r++)if(i[r].match&&i[r].match.def===t){n=!0;break}return n}function b(t,n,i){function r(n,i,s,c){function u(s,c,m){function v(t,n){var i=0===e.inArray(t,n.matches);return i||e.each(n.matches,function(e,r){if(!0===r.isQuantifier&&(i=v(t,n.matches[e-1])))return!1}),i}function g(t,n,i){var r,o;return(h().tests[t]||h().validPositions[t])&&e.each(h().tests[t]||[h().validPositions[t]],function(e,t){var s=void 0!==i?i:t.alternation,a=void 0!==t.locator[s]?t.locator[s].toString().indexOf(n):-1;(void 0===o||a<o)&&-1!==a&&(r=t,o=a)}),r?r.locator.slice((void 0!==i?i:r.alternation)+1):void 0!==i?g(t,n):void 0}function y(e,n){return null===e.match.fn&&null!==n.match.fn&&n.match.fn.test(e.match.def,h(),t,!1,o,!1)}if(l>1e4)throw"Inputmask: There is probably an error in your mask definition or in the code. Create an issue on github with an example of the mask you are using. "+h().mask;if(l===t&&void 0===s.matches)return d.push({match:s,locator:c.reverse(),cd:p}),!0;if(void 0!==s.matches){if(s.isGroup&&m!==s){if(s=u(n.matches[e.inArray(s,n.matches)+1],c))return!0}else if(s.isOptional){var b=s;if(s=r(s,i,c,m)){if(!v(a=d[d.length-1].match,b))return!0;f=!0,l=t}}else if(s.isAlternator){var _,w=s,k=[],E=d.slice(),C=c.length,S=i.length>0?i.shift():-1;if(-1===S||"string"==typeof S){var x,T=l,O=i.slice(),A=[];if("string"==typeof S)A=S.split(",");else for(x=0;x<w.matches.length;x++)A.push(x);for(var D=0;D<A.length;D++){if(x=parseInt(A[D]),d=[],i=g(l,x,C)||O.slice(),!0!==(s=u(w.matches[x]||n.matches[x],[x].concat(c),m)||s)&&void 0!==s&&A[A.length-1]<w.matches.length){var I=e.inArray(s,n.matches)+1;n.matches.length>I&&((s=u(n.matches[I],[I].concat(c.slice(1,c.length)),m))&&(A.push(I.toString()),e.each(d,function(e,t){t.alternation=c.length-1})))}_=d.slice(),l=T,d=[];for(var j=0;j<_.length;j++){var N=_[j],P=!1;N.alternation=N.alternation||C;for(var L=0;L<k.length;L++){var M=k[L];if(("string"!=typeof S||-1!==e.inArray(N.locator[N.alternation].toString(),A))&&(N.match.def===M.match.def||y(N,M))){P=N.match.nativeDef===M.match.nativeDef,N.alternation==M.alternation&&-1===M.locator[M.alternation].toString().indexOf(N.locator[N.alternation])&&(M.locator[M.alternation]=M.locator[M.alternation]+","+N.locator[N.alternation],M.alternation=N.alternation,null==N.match.fn&&(M.na=M.na||N.locator[N.alternation].toString(),-1===M.na.indexOf(N.locator[N.alternation])&&(M.na=M.na+","+N.locator[N.alternation])));break}}P||k.push(N)}}"string"==typeof S&&(k=e.map(k,function(t,n){if(isFinite(n)){var i=t.alternation,r=t.locator[i].toString().split(",");t.locator[i]=void 0,t.alternation=void 0;for(var o=0;o<r.length;o++)-1!==e.inArray(r[o],A)&&(void 0!==t.locator[i]?(t.locator[i]+=",",t.locator[i]+=r[o]):t.locator[i]=parseInt(r[o]),t.alternation=i);if(void 0!==t.locator[i])return t}})),d=E.concat(k),l=t,f=d.length>0,i=O.slice()}else s=u(w.matches[S]||n.matches[S],[S].concat(c),m);if(s)return!0}else if(s.isQuantifier&&m!==n.matches[e.inArray(s,n.matches)-1])for(var R=s,F=i.length>0?i.shift():0;F<(isNaN(R.quantifier.max)?F+1:R.quantifier.max)&&l<=t;F++){var q=n.matches[e.inArray(R,n.matches)-1];if(s=u(q,[F].concat(c),q)){if((a=d[d.length-1].match).optionalQuantifier=F>R.quantifier.min-1,v(a,q)){if(F>R.quantifier.min-1){f=!0,l=t;break}return!0}return!0}}else if(s=r(s,i,c,m))return!0}else l++}for(var m=i.length>0?i.shift():0;m<n.matches.length;m++)if(!0!==n.matches[m].isQuantifier){var v=u(n.matches[m],[m].concat(s),c);if(v&&l===t)return v;if(l>t)break}}function s(e){return o.keepStatic&&t>0&&e.length>1+(""===e[e.length-1].match.def?1:0)&&!0!==e[0].match.optionality&&!0!==e[0].match.optionalQuantifier&&null===e[0].match.fn&&!/[0-9a-bA-Z]/.test(e[0].match.def)?[m(e)]:e}var a,c=h().maskToken,l=n?i:0,u=n?n.slice():[0],d=[],f=!1,p=n?n.join(""):"";if(t>-1){if(void 0===n){for(var v,g=t-1;void 0===(v=h().validPositions[g]||h().tests[g])&&g>-1;)g--;void 0!==v&&g>-1&&(u=function(t){var n=[];return e.isArray(t)||(t=[t]),t.length>0&&(void 0===t[0].alternation?0===(n=m(t.slice()).locator.slice()).length&&(n=t[0].locator.slice()):e.each(t,function(e,t){if(""!==t.def)if(0===n.length)n=t.locator.slice();else for(var i=0;i<n.length;i++)t.locator[i]&&-1===n[i].toString().indexOf(t.locator[i])&&(n[i]+=","+t.locator[i])})),n}(v),p=u.join(""),l=g)}if(h().tests[t]&&h().tests[t][0].cd===p)return s(h().tests[t]);for(var y=u.shift();y<c.length;y++){if(r(c[y],u,[y])&&l===t||l>t)break}}return(0===d.length||f)&&d.push({match:{fn:null,cardinality:0,optionality:!0,casing:null,def:"",placeholder:""},locator:[],cd:p}),void 0!==n&&h().tests[t]?s(e.extend(!0,[],d)):(h().tests[t]=e.extend(!0,[],d),s(h().tests[t]))}function _(){return void 0===h()._buffer&&(h()._buffer=u(!1,1),void 0===h().buffer&&h()._buffer.slice()),h()._buffer}function w(e){return void 0!==h().buffer&&!0!==e||(h().buffer=u(!0,f(),!0)),h().buffer}function k(e,t,n){var i;if(!0===e)d(),e=0,t=n.length;else for(i=e;i<t;i++)delete h().validPositions[i];for(i=e;i<t;i++)d(!0),n[i]!==o.skipOptionalPartCharacter&&C(i,n[i],!0,!0)}function E(t,n){for(var i=o.greedy?n:n.slice(0,1),r=!1,s=0;s<t.length;s++)if(-1!==e.inArray(t[s],i)){r=!0;break}return r}function C(n,i,r,s,a){function c(e){var t=V?e.begin-e.end>1||e.begin-e.end==1&&o.insertMode:e.end-e.begin>1||e.end-e.begin==1&&o.insertMode;return t&&0===e.begin&&e.end===h().maskLength?"full":t}function l(i,r,a){var l=!1;return e.each(b(i),function(u,m){for(var v=m.match,y=r?1:0,b="",_=v.cardinality;_>y;_--)b+=O(i-(_-1));if(r&&(b+=r),w(!0),!1!==(l=null!=v.fn?v.fn.test(b,h(),i,a,o,c(n)):(r===v.def||r===o.skipOptionalPartCharacter)&&""!==v.def&&{c:v.placeholder||v.def,pos:i})){var E=void 0!==l.c?l.c:r;E=E===o.skipOptionalPartCharacter&&null===v.fn?v.placeholder||v.def:E;var S=i,x=w();if(void 0!==l.remove&&(e.isArray(l.remove)||(l.remove=[l.remove]),e.each(l.remove.sort(function(e,t){return t-e}),function(e,t){p(t,t+1,!0)})),void 0!==l.insert&&(e.isArray(l.insert)||(l.insert=[l.insert]),e.each(l.insert.sort(function(e,t){return e-t}),function(e,t){C(t.pos,t.c,!0,s)})),l.refreshFromBuffer){var T=l.refreshFromBuffer;if(a=!0,k(!0===T?T:T.start,T.end,x),void 0===l.pos&&void 0===l.c)return l.pos=f(),!1;if((S=void 0!==l.pos?l.pos:i)!==i)return l=e.extend(l,C(S,E,!0,s)),!1}else if(!0!==l&&void 0!==l.pos&&l.pos!==i&&(S=l.pos,k(i,S,w().slice()),S!==i))return l=e.extend(l,C(S,E,!0)),!1;return(!0===l||void 0!==l.pos||void 0!==l.c)&&(u>0&&d(!0),g(S,e.extend({},m,{input:function(e,n,i){switch(o.casing||n.casing){case"upper":e=e.toUpperCase();break;case"lower":e=e.toLowerCase();break;case"title":var r=h().validPositions[i-1];e=0===i||r&&r.input===String.fromCharCode(t.keyCode.SPACE)?e.toUpperCase():e.toLowerCase()}return e}(E,v,S)}),s,c(n))||(l=!1),!1)}}),l}function u(t,n){var i=h().validPositions[n];if(i)for(var r=i.locator,o=r.length,s=t;s<n;s++)if(void 0===h().validPositions[s]&&!S(s,!0)){var a=b(s),c=a[0],l=-1;e.each(a,function(e,t){for(var n=0;n<o&&void 0!==t.locator[n]&&E(t.locator[n].toString().split(","),r[n].toString().split(","));n++)l<n&&(l=n,c=t)}),g(s,e.extend({},c,{input:c.match.placeholder||c.match.def}),!0)}}function g(t,n,i,r){if(r||o.insertMode&&void 0!==h().validPositions[t]&&void 0===i){var s,a=e.extend(!0,{},h().validPositions),c=f(void 0,!0);for(s=t;s<=c;s++)delete h().validPositions[s];h().validPositions[t]=e.extend(!0,{},n);var l,u=!0,p=h().validPositions,m=!1,v=h().maskLength;for(s=l=t;s<=c;s++){var g=a[s];if(void 0!==g)for(var b=l;b<h().maskLength&&(null===g.match.fn&&p[s]&&(!0===p[s].match.optionalQuantifier||!0===p[s].match.optionality)||null!=g.match.fn);){if(b++,!1===m&&a[b]&&a[b].match.def===g.match.def)h().validPositions[b]=e.extend(!0,{},a[b]),h().validPositions[b].input=g.input,_(b),l=b,u=!0;else if(y(b,g.match.def)){var w=C(b,g.input,!0,!0);u=!1!==w,l=w.caret||w.insert?f():b,m=!0}else u=!0===g.generatedInput;if(h().maskLength<v&&(h().maskLength=v),u)break}if(!u)break}if(!u)return h().validPositions=e.extend(!0,{},a),d(!0),!1}else h().validPositions[t]=e.extend(!0,{},n);return d(!0),!0}function _(t){for(var n=t-1;n>-1&&!h().validPositions[n];n--);var i,r;for(n++;n<t;n++)void 0===h().validPositions[n]&&(!1===o.jitMasking||o.jitMasking>n)&&(""===(r=b(n,v(n-1).locator,n-1).slice())[r.length-1].match.def&&r.pop(),(i=m(r))&&(i.match.def===o.radixPointDefinitionSymbol||!S(n,!0)||e.inArray(o.radixPoint,w())<n&&i.match.fn&&i.match.fn.test(D(n),h(),n,!1,o))&&(!1!==(A=l(n,i.match.placeholder||(null==i.match.fn?i.match.def:""!==D(n)?D(n):w()[n]),!0))&&(h().validPositions[A.pos||n].generatedInput=!0)))}r=!0===r;var T=n;void 0!==n.begin&&(T=V&&!c(n)?n.end:n.begin);var A=!1,I=e.extend(!0,{},h().validPositions);if(_(T),c(n)&&(R(void 0,t.keyCode.DELETE,n),T=h().p),T<h().maskLength&&(A=l(T,i,r),(!r||!0===s)&&!1===A)){var j=h().validPositions[T];if(!j||null!==j.match.fn||j.match.def!==i&&i!==o.skipOptionalPartCharacter){if((o.insertMode||void 0===h().validPositions[x(T)])&&!S(T,!0)){var N=b(T).slice();""===N[N.length-1].match.def&&N.pop();var P=m(N,!0);P&&null===P.match.fn&&(l(T,P=P.match.placeholder||P.match.def,r),h().validPositions[T].generatedInput=!0);for(var L=T+1,M=x(T);L<=M;L++)if(!1!==(A=l(L,i,r))){u(T,void 0!==A.pos?A.pos:L),T=L;break}}}else A={caret:x(T)}}return!1===A&&o.keepStatic&&!r&&!0!==a&&(A=function(t,n,i){var r,a,c,l,u,p,m,v,g=e.extend(!0,{},h().validPositions),y=!1,_=f();for(l=h().validPositions[_];_>=0;_--)if((c=h().validPositions[_])&&void 0!==c.alternation){if(r=_,a=h().validPositions[r].alternation,l.locator[c.alternation]!==c.locator[c.alternation])break;l=c}if(void 0!==a){v=parseInt(r);var w=void 0!==l.locator[l.alternation||a]?l.locator[l.alternation||a]:m[0];w.length>0&&(w=w.split(",")[0]);var k=h().validPositions[v],E=h().validPositions[v-1];e.each(b(v,E?E.locator:void 0,v-1),function(r,c){m=c.locator[a]?c.locator[a].toString().split(","):[];for(var l=0;l<m.length;l++){var b=[],_=0,E=0,S=!1;if(w<m[l]&&(void 0===c.na||-1===e.inArray(m[l],c.na.split(",")))){h().validPositions[v]=e.extend(!0,{},c);var x=h().validPositions[v].locator;for(h().validPositions[v].locator[a]=parseInt(m[l]),null==c.match.fn?(k.input!==c.match.def&&(S=!0,!0!==k.generatedInput&&b.push(k.input)),E++,h().validPositions[v].generatedInput=!/[0-9a-bA-Z]/.test(c.match.def),h().validPositions[v].input=c.match.def):h().validPositions[v].input=k.input,u=v+1;u<f(void 0,!0)+1;u++)(p=h().validPositions[u])&&!0!==p.generatedInput&&/[0-9a-bA-Z]/.test(p.input)?b.push(p.input):u<t&&_++,delete h().validPositions[u];for(S&&b[0]===c.match.def&&b.shift(),d(!0),y=!0;b.length>0;){var T=b.shift();if(T!==o.skipOptionalPartCharacter&&!(y=C(f(void 0,!0)+1,T,!1,s,!0)))break}if(y){h().validPositions[v].locator=x;var O=f(t)+1;for(u=v+1;u<f()+1;u++)(void 0===(p=h().validPositions[u])||null==p.match.fn)&&u<t+(E-_)&&E++;y=C((t+=E-_)>O?O:t,n,i,s,!0)}if(y)return!1;d(),h().validPositions=e.extend(!0,{},g)}}})}return y}(T,i,r)),!0===A&&(A={pos:T}),e.isFunction(o.postValidation)&&!1!==A&&!r&&!0!==s&&(A=!!o.postValidation(w(!0),A,o)&&A),void 0===A.pos&&(A.pos=T),!1===A&&(d(!0),h().validPositions=e.extend(!0,{},I)),A}function S(e,t){var n;if(t?""===(n=v(e).match).def&&(n=g(e).match):n=g(e).match,null!=n.fn)return n.fn;if(!0!==t&&e>-1){var i=b(e);return i.length>1+(""===i[i.length-1].match.def?1:0)}return!1}function x(e,t){var n=h().maskLength;if(e>=n)return n;for(var i=e;++i<n&&(!0===t&&(!0!==g(i).match.newBlockMarker||!S(i))||!0!==t&&!S(i)););return i}function T(e,t){var n,i=e;if(i<=0)return 0;for(;--i>0&&(!0===t&&!0!==g(i).match.newBlockMarker||!0!==t&&!S(i)&&((n=b(i)).length<2||2===n.length&&""===n[1].match.def)););return i}function O(e){return void 0===h().validPositions[e]?D(e):h().validPositions[e].input}function A(t,n,i,r,s){if(r&&e.isFunction(o.onBeforeWrite)){var a=o.onBeforeWrite(r,n,i,o);if(a){if(a.refreshFromBuffer){var c=a.refreshFromBuffer;k(!0===c?c:c.start,c.end,a.buffer||n),n=w(!0)}void 0!==i&&(i=void 0!==a.caret?a.caret:i)}}t.inputmask._valueSet(n.join("")),void 0===i||void 0!==r&&"blur"===r.type?q(t,n,i):N(t,i),!0===s&&(K=!0,e(t).trigger("input"))}function D(e,t){if(void 0!==(t=t||g(e).match).placeholder)return t.placeholder;if(null===t.fn){if(e>-1&&void 0===h().validPositions[e]){var n,i=b(e),r=[];if(i.length>1+(""===i[i.length-1].match.def?1:0))for(var s=0;s<i.length;s++)if(!0!==i[s].match.optionality&&!0!==i[s].match.optionalQuantifier&&(null===i[s].match.fn||void 0===n||!1!==i[s].match.fn.test(n.match.def,h(),e,!0,o))&&(r.push(i[s]),null===i[s].match.fn&&(n=i[s]),r.length>1&&/[0-9a-bA-Z]/.test(r[0].match.def)))return o.placeholder.charAt(e%o.placeholder.length)}return t.def}return o.placeholder.charAt(e%o.placeholder.length)}function I(n,i,r,s,a,c){var l=s.slice(),u="",p=0,m=void 0;if(d(),h().p=x(-1),!r)if(!0!==o.autoUnmask){var g=_().slice(0,x(-1)).join(""),y=l.join("").match(new RegExp("^"+t.escapeRegex(g),"g"));y&&y.length>0&&(l.splice(0,y.length*g.length),p=x(p))}else p=x(p);if(e.each(l,function(t,i){if(void 0!==i){var s=new e.Event("keypress");s.which=i.charCodeAt(0),u+=i;var a=f(void 0,!0),c=h().validPositions[a],l=v(a+1,c?c.locator.slice():void 0,a);if(!function(){var e=!1,t=_().slice(p,x(p)).join("").indexOf(u);if(-1!==t&&!S(p)){e=!0;for(var n=_().slice(p,p+t),i=0;i<n.length;i++)if(" "!==n[i]){e=!1;break}}return e}()||r||o.autoUnmask){var g=r?t:null==l.match.fn&&l.match.optionality&&a+1<h().p?a+1:h().p;m=J.keypressEvent.call(n,s,!0,!1,r,g),p=g+1,u=""}else m=J.keypressEvent.call(n,s,!0,!1,!0,a+1);if(!r&&e.isFunction(o.onBeforeWrite)&&((m=o.onBeforeWrite(s,w(),m.forwardPosition,o))&&m.refreshFromBuffer)){var y=m.refreshFromBuffer;k(!0===y?y:y.start,y.end,m.buffer),d(!0),m.caret&&(h().p=m.caret)}}}),i){var b=void 0,E=f();document.activeElement===n&&(a||m)&&(b=N(n).begin,a&&!1===m&&(b=x(f(b))),m&&!0!==c&&(b<E+1||-1===E)&&(b=o.numericInput&&void 0===m.caret?T(m.forwardPosition):m.forwardPosition)),A(n,w(),b,a||new e.Event("checkval"))}}function j(t){if(t&&void 0===t.inputmask)return t.value;var n=[],i=h().validPositions;for(var r in i)i[r].match&&null!=i[r].match.fn&&n.push(i[r].input);var s=0===n.length?"":(V?n.reverse():n).join("");if(e.isFunction(o.onUnMask)){var a=(V?w().slice().reverse():w()).join("");s=o.onUnMask(a,s,o)||s}return s}function N(e,t,n,i){function r(e){!0===i||!V||"number"!=typeof e||o.greedy&&""===o.placeholder||(e=w().join("").length-e);return e}var a;if("number"!=typeof t)return e.setSelectionRange?(t=e.selectionStart,n=e.selectionEnd):window.getSelection?(a=window.getSelection().getRangeAt(0)).commonAncestorContainer.parentNode!==e&&a.commonAncestorContainer!==e||(t=a.startOffset,n=a.endOffset):document.selection&&document.selection.createRange&&(n=(t=0-(a=document.selection.createRange()).duplicate().moveStart("character",-e.inputmask._valueGet().length))+a.text.length),{begin:r(t),end:r(n)};t=r(t),n="number"==typeof(n=r(n))?n:t;var c=parseInt(((e.ownerDocument.defaultView||window).getComputedStyle?(e.ownerDocument.defaultView||window).getComputedStyle(e,null):e.currentStyle).fontSize)*n;if(e.scrollLeft=c>e.scrollWidth?c:0,s||!1!==o.insertMode||t!==n||n++,e.setSelectionRange)e.selectionStart=t,e.selectionEnd=n;else if(window.getSelection){if(a=document.createRange(),void 0===e.firstChild||null===e.firstChild){var l=document.createTextNode("");e.appendChild(l)}a.setStart(e.firstChild,t<e.inputmask._valueGet().length?t:e.inputmask._valueGet().length),a.setEnd(e.firstChild,n<e.inputmask._valueGet().length?n:e.inputmask._valueGet().length),a.collapse(!0);var u=window.getSelection();u.removeAllRanges(),u.addRange(a)}else e.createTextRange&&((a=e.createTextRange()).collapse(!0),a.moveEnd("character",n),a.moveStart("character",t),a.select());q(e,void 0,{begin:t,end:n})}function P(t){var n,i,r=w(),o=r.length,s=f(),a={},c=h().validPositions[s],l=void 0!==c?c.locator.slice():void 0;for(n=s+1;n<r.length;n++)l=(i=v(n,l,n-1)).locator.slice(),a[n]=e.extend(!0,{},i);var u=c&&void 0!==c.alternation?c.locator[c.alternation]:void 0;for(n=o-1;n>s&&(((i=a[n]).match.optionality||i.match.optionalQuantifier||u&&(u!==a[n].locator[c.alternation]&&null!=i.match.fn||null===i.match.fn&&i.locator[c.alternation]&&E(i.locator[c.alternation].toString().split(","),u.toString().split(","))&&""!==b(n)[0].def))&&r[n]===D(n,i.match));n--)o--;return t?{l:o,def:a[o]?a[o].match:void 0}:o}function L(e){for(var t=P(),n=e.length-1;n>t&&!S(n);n--);return e.splice(t,n+1-t),e}function M(t){if(e.isFunction(o.isComplete))return o.isComplete(t,o);if("*"!==o.repeat){var n=!1,i=P(!0),r=T(i.l);if(void 0===i.def||i.def.newBlockMarker||i.def.optionality||i.def.optionalQuantifier){n=!0;for(var s=0;s<=r;s++){var a=v(s).match;if(null!==a.fn&&void 0===h().validPositions[s]&&!0!==a.optionality&&!0!==a.optionalQuantifier||null===a.fn&&t[s]!==D(s,a)){n=!1;break}}}return n}}function R(n,i,r,s){if((o.numericInput||V)&&(i===t.keyCode.BACKSPACE?i=t.keyCode.DELETE:i===t.keyCode.DELETE&&(i=t.keyCode.BACKSPACE),V)){var a=r.end;r.end=r.begin,r.begin=a}i===t.keyCode.BACKSPACE&&(r.end-r.begin<1||!1===o.insertMode)?(r.begin=T(r.begin),void 0===h().validPositions[r.begin]||h().validPositions[r.begin].input!==o.groupSeparator&&h().validPositions[r.begin].input!==o.radixPoint||r.begin--):i===t.keyCode.DELETE&&r.begin===r.end&&(r.end=S(r.end,!0)?r.end+1:x(r.end)+1,void 0===h().validPositions[r.begin]||h().validPositions[r.begin].input!==o.groupSeparator&&h().validPositions[r.begin].input!==o.radixPoint||r.end++),p(r.begin,r.end,!1,s),!0!==s&&function(){if(o.keepStatic){for(var t=[],i=f(-1,!0),r=e.extend(!0,{},h().validPositions),s=h().validPositions[i];i>=0;i--){var a=h().validPositions[i];if(a){if(!0!==a.generatedInput&&/[0-9a-bA-Z]/.test(a.input)&&t.push(a.input),delete h().validPositions[i],void 0!==a.alternation&&a.locator[a.alternation]!==s.locator[a.alternation])break;s=a}}if(i>-1)for(h().p=x(f(-1,!0));t.length>0;){var c=new e.Event("keypress");c.which=t.pop().charCodeAt(0),J.keypressEvent.call(n,c,!0,!1,!1,h().p)}else h().validPositions=e.extend(!0,{},r)}}();var c=f(r.begin,!0);c<r.begin?h().p=x(c):!0!==s&&(h().p=r.begin)}function F(t){function n(){W.style.position="absolute",W.style.top=i.top+"px",W.style.left=i.left+"px",W.style.width=parseInt(t.offsetWidth)-parseInt(r.paddingLeft)-parseInt(r.paddingRight)-parseInt(r.borderLeftWidth)-parseInt(r.borderRightWidth)+"px",W.style.height=parseInt(t.offsetHeight)-parseInt(r.paddingTop)-parseInt(r.paddingBottom)-parseInt(r.borderTopWidth)-parseInt(r.borderBottomWidth)+"px",W.style.lineHeight=W.style.height,W.style.zIndex=isNaN(r.zIndex)?-1:r.zIndex-1,W.style.webkitAppearance="textfield",W.style.mozAppearance="textfield",W.style.Appearance="textfield"}var i=e(t).position(),r=(t.ownerDocument.defaultView||window).getComputedStyle(t,null);for(var s in t.parentNode,W=document.createElement("div"),document.body.appendChild(W),r)isNaN(s)&&"cssText"!==s&&-1==s.indexOf("webkit")&&(W.style[s]=r[s]);t.style.backgroundColor="transparent",t.style.color="transparent",t.style.webkitAppearance="caret",t.style.mozAppearance="caret",t.style.Appearance="caret",n(),e(window).on("resize",function(o){i=e(t).position(),r=(t.ownerDocument.defaultView||window).getComputedStyle(t,null),n()}),e(t).on("click",function(e){return N(t,function(e){var n,i=document.createElement("span");for(var o in r)isNaN(o)&&-1!==o.indexOf("font")&&(i.style[o]=r[o]);i.style.textTransform=r.textTransform,i.style.letterSpacing=r.letterSpacing,i.style.position="absolute",i.style.height="auto",i.style.width="auto",i.style.visibility="hidden",i.style.whiteSpace="nowrap",document.body.appendChild(i);var s,a=t.inputmask._valueGet(),c=0;for(n=0,s=a.length;n<=s;n++){if(i.innerHTML+=a.charAt(n)||"_",i.offsetWidth>=e){var l=e-c,u=i.offsetWidth-e;i.innerHTML=a.charAt(n),n=(l-=i.offsetWidth/3)<u?n-1:n;break}c=i.offsetWidth}return document.body.removeChild(i),n}(e.clientX)),J.clickEvent.call(this,[e])}),e(t).on("keydown",function(e){e.shiftKey||!1===o.insertMode||setTimeout(function(){q(t)},0)})}function q(e,t,n){function i(){s||null!==c.fn&&void 0!==l.input?s&&null!==c.fn&&void 0!==l.input&&(s=!1,r+="</span>"):(s=!0,r+="<span class='im-static''>")}if(void 0!==W){t=t||w(),void 0===n?n=N(e):void 0===n.begin&&(n={begin:n,end:n});var r="",s=!1;if(""!=t){var a,c,l,u=0,d=f();do{u===n.begin&&document.activeElement===e&&(r+="<span class='im-caret' style='border-right-width: 1px;border-right-style: solid;'></span>"),h().validPositions[u]?(l=h().validPositions[u],c=l.match,a=l.locator.slice(),i(),r+=l.input):(l=v(u,a,u-1),c=l.match,a=l.locator.slice(),(!1===o.jitMasking||u<d||"number"==typeof o.jitMasking&&isFinite(o.jitMasking)&&o.jitMasking>u)&&(i(),r+=D(u,c))),u++}while((void 0===H||u<H)&&(null!==c.fn||""!==c.def)||d>u)}W.innerHTML=r}}i=i||this.maskset,o=o||this.opts;var U,$,H,W,B,z=this.el,V=this.isRTL,G=!1,K=!1,Y=!1,Q=!1,X={on:function(n,i,r){var s=function(n){if(void 0===this.inputmask&&"FORM"!==this.nodeName){var i=e.data(this,"_inputmask_opts");i?new t(i).mask(this):X.off(this)}else{if("setvalue"===n.type||!(this.disabled||this.readOnly&&!("keydown"===n.type&&n.ctrlKey&&67===n.keyCode||!1===o.tabThrough&&n.keyCode===t.keyCode.TAB))){switch(n.type){case"input":if(!0===K)return K=!1,n.preventDefault();break;case"keydown":G=!1,K=!1;break;case"keypress":if(!0===G)return n.preventDefault();G=!0;break;case"click":if(a||c){var s=this,l=arguments;return setTimeout(function(){r.apply(s,l)},0),!1}}var u=r.apply(this,arguments);return!1===u&&(n.preventDefault(),n.stopPropagation()),u}n.preventDefault()}};n.inputmask.events[i]=n.inputmask.events[i]||[],n.inputmask.events[i].push(s),-1!==e.inArray(i,["submit","reset"])?null!=n.form&&e(n.form).on(i,s):e(n).on(i,s)},off:function(t,n){var i;t.inputmask&&t.inputmask.events&&(n?(i=[])[n]=t.inputmask.events[n]:i=t.inputmask.events,e.each(i,function(n,i){for(;i.length>0;){var r=i.pop();-1!==e.inArray(n,["submit","reset"])?null!=t.form&&e(t.form).off(n,r):e(t).off(n,r)}delete t.inputmask.events[n]}))}},J={keydownEvent:function(n){var i=this,r=e(i),s=n.keyCode,a=N(i);if(s===t.keyCode.BACKSPACE||s===t.keyCode.DELETE||c&&s===t.keyCode.BACKSPACE_SAFARI||n.ctrlKey&&s===t.keyCode.X&&!function(e){var t=document.createElement("input"),n="on"+e,i=n in t;return i||(t.setAttribute(n,"return;"),i="function"==typeof t[n]),t=null,i}("cut"))n.preventDefault(),R(i,s,a),A(i,w(!0),h().p,n,i.inputmask._valueGet()!==w().join("")),i.inputmask._valueGet()===_().join("")?r.trigger("cleared"):!0===M(w())&&r.trigger("complete");else if(s===t.keyCode.END||s===t.keyCode.PAGE_DOWN){n.preventDefault();var l=x(f());o.insertMode||l!==h().maskLength||n.shiftKey||l--,N(i,n.shiftKey?a.begin:l,l,!0)}else s===t.keyCode.HOME&&!n.shiftKey||s===t.keyCode.PAGE_UP?(n.preventDefault(),N(i,0,n.shiftKey?a.begin:0,!0)):(o.undoOnEscape&&s===t.keyCode.ESCAPE||90===s&&n.ctrlKey)&&!0!==n.altKey?(I(i,!0,!1,U.split("")),r.trigger("click")):s!==t.keyCode.INSERT||n.shiftKey||n.ctrlKey?!0===o.tabThrough&&s===t.keyCode.TAB?(!0===n.shiftKey?(null===g(a.begin).match.fn&&(a.begin=x(a.begin)),a.end=T(a.begin,!0),a.begin=T(a.end,!0)):(a.begin=x(a.begin,!0),a.end=x(a.begin,!0),a.end<h().maskLength&&a.end--),a.begin<h().maskLength&&(n.preventDefault(),N(i,a.begin,a.end))):n.shiftKey||!1===o.insertMode&&(s===t.keyCode.RIGHT?setTimeout(function(){var e=N(i);N(i,e.begin)},0):s===t.keyCode.LEFT&&setTimeout(function(){var e=N(i);N(i,V?e.begin+1:e.begin-1)},0)):(o.insertMode=!o.insertMode,N(i,o.insertMode||a.begin!==h().maskLength?a.begin:a.begin-1));o.onKeyDown.call(this,n,w(),N(i).begin,o),Y=-1!==e.inArray(s,o.ignorables)},keypressEvent:function(n,i,r,s,a){var c=e(this),l=n.which||n.charCode||n.keyCode;if(!(!0===i||n.ctrlKey&&n.altKey)&&(n.ctrlKey||n.metaKey||Y))return l===t.keyCode.ENTER&&U!==w().join("")&&(U=w().join(""),setTimeout(function(){c.trigger("change")},0)),!0;if(l){46===l&&!1===n.shiftKey&&","===o.radixPoint&&(l=44);var u,f=i?{begin:a,end:a}:N(this),p=String.fromCharCode(l);h().writeOutBuffer=!0;var m=C(f,p,s);if(!1!==m&&(d(!0),u=void 0!==m.caret?m.caret:i?m.pos+1:x(m.pos),h().p=u),!1!==r){var v=this;if(setTimeout(function(){o.onKeyValidation.call(v,l,m,o)},0),h().writeOutBuffer&&!1!==m){var g=w();A(this,g,o.numericInput&&void 0===m.caret?T(u):u,n,!0!==i),!0!==i&&setTimeout(function(){!0===M(g)&&c.trigger("complete")},0)}}if(n.preventDefault(),i)return m.forwardPosition=u,m}},pasteEvent:function(t){var n,i=t.originalEvent||t,r=e(this),s=this.inputmask._valueGet(!0),a=N(this);V&&(n=a.end,a.end=a.begin,a.begin=n);var c=s.substr(0,a.begin),l=s.substr(a.end,s.length);if(c===(V?_().reverse():_()).slice(0,a.begin).join("")&&(c=""),l===(V?_().reverse():_()).slice(a.end).join("")&&(l=""),V&&(n=c,c=l,l=n),window.clipboardData&&window.clipboardData.getData)s=c+window.clipboardData.getData("Text")+l;else{if(!i.clipboardData||!i.clipboardData.getData)return!0;s=c+i.clipboardData.getData("text/plain")+l}var u=s;if(e.isFunction(o.onBeforePaste)){if(!1===(u=o.onBeforePaste(s,o)))return t.preventDefault();u||(u=s)}return I(this,!1,!1,V?u.split("").reverse():u.toString().split("")),A(this,w(),x(f()),t,U!==w().join("")),!0===M(w())&&r.trigger("complete"),t.preventDefault()},inputFallBackEvent:function(n){var i=this.inputmask._valueGet();if(w().join("")!==i){var r=N(this);if(i=i.replace(new RegExp("("+t.escapeRegex(_().join(""))+")*"),""),a){var o=i.replace(w().join(""),"");if(1===o.length){var s=new e.Event("keypress");return s.which=o.charCodeAt(0),J.keypressEvent.call(this,s,!0,!0,!1,h().validPositions[r.begin-1]?r.begin:r.begin-1),!1}}if(r.begin>i.length&&(N(this,i.length),r=N(this)),w().length-i.length!=1||i.charAt(r.begin)===w()[r.begin]||i.charAt(r.begin+1)===w()[r.begin]||S(r.begin)){for(var c=f()+1,l=_().join("");null===i.match(t.escapeRegex(l)+"$");)l=l.slice(1);I(this,!0,!1,i=(i=i.replace(l,"")).split(""),n,r.begin<c),!0===M(w())&&e(this).trigger("complete")}else n.keyCode=t.keyCode.BACKSPACE,J.keydownEvent.call(this,n);n.preventDefault()}},setValueEvent:function(t){var n=this.inputmask._valueGet();I(this,!0,!1,(e.isFunction(o.onBeforeMask)&&o.onBeforeMask(n,o)||n).split("")),U=w().join(""),(o.clearMaskOnLostFocus||o.clearIncomplete)&&this.inputmask._valueGet()===_().join("")&&this.inputmask._valueSet("")},focusEvent:function(e){var t=this.inputmask._valueGet();o.showMaskOnFocus&&(!o.showMaskOnHover||o.showMaskOnHover&&""===t)&&(this.inputmask._valueGet()!==w().join("")?A(this,w(),x(f())):!1===Q&&N(this,x(f()))),!0===o.positionCaretOnTab&&J.clickEvent.apply(this,[e,!0]),U=w().join("")},mouseleaveEvent:function(e){if(Q=!1,o.clearMaskOnLostFocus&&document.activeElement!==this){var t=w().slice(),n=this.inputmask._valueGet();n!==this.getAttribute("placeholder")&&""!==n&&(-1===f()&&n===_().join("")?t=[]:L(t),A(this,t))}},clickEvent:function(t,n){var i=this;setTimeout(function(){if(document.activeElement===i){var t=N(i);if(n&&(t.begin=t.end),t.begin===t.end)switch(o.positionCaretOnClick){case"none":break;case"radixFocus":if(function(t){if(""!==o.radixPoint){var n=h().validPositions;if(void 0===n[t]||n[t].input===D(t)){if(t<x(-1))return!0;var i=e.inArray(o.radixPoint,w());if(-1!==i){for(var r in n)if(i<r&&n[r].input!==D(r))return!1;return!0}}}return!1}(t.begin)){var r=e.inArray(o.radixPoint,w().join(""));N(i,o.numericInput?x(r):r);break}default:var s=t.begin,a=x(f(s,!0));if(s<a)N(i,S(s)||S(s-1)?s:x(s));else{var c=D(a);(""!==c&&w()[a]!==c&&!0!==g(a).match.optionalQuantifier||!S(a)&&g(a).match.def===c)&&(a=x(a)),N(i,a)}}}},0)},dblclickEvent:function(e){var t=this;setTimeout(function(){N(t,0,x(f()))},0)},cutEvent:function(n){var i=e(this),r=N(this),o=n.originalEvent||n,s=window.clipboardData||o.clipboardData,a=V?w().slice(r.end,r.begin):w().slice(r.begin,r.end);s.setData("text",V?a.reverse().join(""):a.join("")),document.execCommand&&document.execCommand("copy"),R(this,t.keyCode.DELETE,r),A(this,w(),h().p,n,U!==w().join("")),this.inputmask._valueGet()===_().join("")&&i.trigger("cleared")},blurEvent:function(t){var n=e(this);if(this.inputmask){var i=this.inputmask._valueGet(),r=w().slice();U!==r.join("")&&setTimeout(function(){n.trigger("change"),U=r.join("")},0),""!==i&&(o.clearMaskOnLostFocus&&(-1===f()&&i===_().join("")?r=[]:L(r)),!1===M(r)&&(setTimeout(function(){n.trigger("incomplete")},0),o.clearIncomplete&&(d(),r=o.clearMaskOnLostFocus?[]:_().slice())),A(this,r,void 0,t))}},mouseenterEvent:function(e){Q=!0,document.activeElement!==this&&o.showMaskOnHover&&this.inputmask._valueGet()!==w().join("")&&A(this,w())},submitEvent:function(e){U!==w().join("")&&$.trigger("change"),o.clearMaskOnLostFocus&&-1===f()&&z.inputmask._valueGet&&z.inputmask._valueGet()===_().join("")&&z.inputmask._valueSet(""),o.removeMaskOnSubmit&&(z.inputmask._valueSet(z.inputmask.unmaskedvalue(),!0),setTimeout(function(){A(z,w())},0))},resetEvent:function(e){setTimeout(function(){$.trigger("setvalue")},0)}};if(void 0!==n)switch(n.action){case"isComplete":return z=n.el,M(w());case"unmaskedvalue":return void 0!==z&&void 0===n.value||(B=n.value,B=(e.isFunction(o.onBeforeMask)&&o.onBeforeMask(B,o)||B).split(""),I(void 0,!1,!1,V?B.reverse():B),e.isFunction(o.onBeforeWrite)&&o.onBeforeWrite(void 0,w(),0,o)),j(z);case"mask":!function(t){var n=function(t,n){var i=t.getAttribute("type"),r="INPUT"===t.tagName&&-1!==e.inArray(i,n.supportsInputType)||t.isContentEditable||"TEXTAREA"===t.tagName;if(!r)if("INPUT"===t.tagName){var o=document.createElement("input");o.setAttribute("type",i),r="text"===o.type,o=null}else r="partial";return!1!==r&&function(t){function i(){return this.inputmask?this.inputmask.opts.autoUnmask?this.inputmask.unmaskedvalue():-1!==f()||!0!==n.nullable?document.activeElement===this&&n.clearMaskOnLostFocus?(V?L(w().slice()).reverse():L(w().slice())).join(""):o.call(this):"":o.call(this)}function r(t){s.call(this,t),this.inputmask&&e(this).trigger("setvalue")}var o,s;if(!t.inputmask.__valueGet){if(!0!==n.noValuePatching){if(Object.getOwnPropertyDescriptor){"function"!=typeof Object.getPrototypeOf&&(Object.getPrototypeOf="object"==typeof"test".__proto__?function(e){return e.__proto__}:function(e){return e.constructor.prototype});var a=Object.getPrototypeOf?Object.getOwnPropertyDescriptor(Object.getPrototypeOf(t),"value"):void 0;a&&a.get&&a.set?(o=a.get,s=a.set,Object.defineProperty(t,"value",{get:i,set:r,configurable:!0})):"INPUT"!==t.tagName&&(o=function(){return this.textContent},s=function(e){this.textContent=e},Object.defineProperty(t,"value",{get:i,set:r,configurable:!0}))}else document.__lookupGetter__&&t.__lookupGetter__("value")&&(o=t.__lookupGetter__("value"),s=t.__lookupSetter__("value"),t.__defineGetter__("value",i),t.__defineSetter__("value",r));t.inputmask.__valueGet=o,t.inputmask.__valueSet=s}t.inputmask._valueGet=function(e){return V&&!0!==e?o.call(this.el).split("").reverse().join(""):o.call(this.el)},t.inputmask._valueSet=function(e,t){s.call(this.el,null===e||void 0===e?"":!0!==t&&V?e.split("").reverse().join(""):e)},void 0===o&&(o=function(){return this.value},s=function(e){this.value=e},function(t){if(e.valHooks&&(void 0===e.valHooks[t]||!0!==e.valHooks[t].inputmaskpatch)){var i=e.valHooks[t]&&e.valHooks[t].get?e.valHooks[t].get:function(e){return e.value},r=e.valHooks[t]&&e.valHooks[t].set?e.valHooks[t].set:function(e,t){return e.value=t,e};e.valHooks[t]={get:function(e){if(e.inputmask){if(e.inputmask.opts.autoUnmask)return e.inputmask.unmaskedvalue();var t=i(e);return-1!==f(void 0,void 0,e.inputmask.maskset.validPositions)||!0!==n.nullable?t:""}return i(e)},set:function(t,n){var i,o=e(t);return i=r(t,n),t.inputmask&&o.trigger("setvalue"),i},inputmaskpatch:!0}}}(t.type),function(t){X.on(t,"mouseenter",function(t){var n=e(this);this.inputmask._valueGet()!==w().join("")&&n.trigger("setvalue")})}(t))}}(t),r}(t,o);if(!1!==n&&($=e(z=t),("rtl"===z.dir||o.rightAlign)&&(z.style.textAlign="right"),("rtl"===z.dir||o.numericInput)&&(z.dir="ltr",z.removeAttribute("dir"),z.inputmask.isRTL=!0,V=!0),!0===o.colorMask&&F(z),l&&(z.hasOwnProperty("inputmode")&&(z.inputmode=o.inputmode,z.setAttribute("inputmode",o.inputmode)),"rtfm"===o.androidHack&&(!0!==o.colorMask&&F(z),z.type="password")),X.off(z),!0===n&&(X.on(z,"submit",J.submitEvent),X.on(z,"reset",J.resetEvent),X.on(z,"mouseenter",J.mouseenterEvent),X.on(z,"blur",J.blurEvent),X.on(z,"focus",J.focusEvent),X.on(z,"mouseleave",J.mouseleaveEvent),!0!==o.colorMask&&X.on(z,"click",J.clickEvent),X.on(z,"dblclick",J.dblclickEvent),X.on(z,"paste",J.pasteEvent),X.on(z,"dragdrop",J.pasteEvent),X.on(z,"drop",J.pasteEvent),X.on(z,"cut",J.cutEvent),X.on(z,"complete",o.oncomplete),X.on(z,"incomplete",o.onincomplete),X.on(z,"cleared",o.oncleared),!0!==o.inputEventOnly&&(X.on(z,"keydown",J.keydownEvent),X.on(z,"keypress",J.keypressEvent)),X.on(z,"compositionstart",e.noop),X.on(z,"compositionupdate",e.noop),X.on(z,"compositionend",e.noop),X.on(z,"keyup",e.noop),X.on(z,"input",J.inputFallBackEvent)),X.on(z,"setvalue",J.setValueEvent),_(),""!==z.inputmask._valueGet()||!1===o.clearMaskOnLostFocus||document.activeElement===z)){var i=e.isFunction(o.onBeforeMask)&&o.onBeforeMask(z.inputmask._valueGet(),o)||z.inputmask._valueGet();I(z,!0,!1,i.split(""));var r=w().slice();U=r.join(""),!1===M(r)&&o.clearIncomplete&&d(),o.clearMaskOnLostFocus&&document.activeElement!==z&&(-1===f()?r=[]:L(r)),A(z,r),document.activeElement===z&&N(z,x(f()))}}(z);break;case"format":return B=(e.isFunction(o.onBeforeMask)&&o.onBeforeMask(n.value,o)||n.value).split(""),I(void 0,!1,!1,V?B.reverse():B),e.isFunction(o.onBeforeWrite)&&o.onBeforeWrite(void 0,w(),0,o),n.metadata?{value:V?w().slice().reverse().join(""):w().join(""),metadata:r.call(this,{action:"getmetadata"},i,o)}:V?w().slice().reverse().join(""):w().join("");case"isValid":n.value?(B=n.value.split(""),I(void 0,!1,!0,V?B.reverse():B)):n.value=w().join("");for(var Z=w(),ee=P(),te=Z.length-1;te>ee&&!S(te);te--);return Z.splice(ee,te+1-ee),M(Z)&&n.value===w().join("");case"getemptymask":return _().join("");case"remove":if(z)$=e(z),z.inputmask._valueSet(j(z)),X.off(z),Object.getOwnPropertyDescriptor&&Object.getPrototypeOf?Object.getOwnPropertyDescriptor(Object.getPrototypeOf(z),"value")&&z.inputmask.__valueGet&&Object.defineProperty(z,"value",{get:z.inputmask.__valueGet,set:z.inputmask.__valueSet,configurable:!0}):document.__lookupGetter__&&z.__lookupGetter__("value")&&z.inputmask.__valueGet&&(z.__defineGetter__("value",z.inputmask.__valueGet),z.__defineSetter__("value",z.inputmask.__valueSet)),z.inputmask=void 0;return z;case"getmetadata":if(e.isArray(i.metadata)){var ne=u(!0,0,!1).join("");return e.each(i.metadata,function(e,t){if(t.mask===ne)return ne=t,!1}),ne}return i.metadata}}var o=navigator.userAgent,s=/mobile/i.test(o),a=/iemobile/i.test(o),c=/iphone/i.test(o)&&!a,l=/android/i.test(o)&&!a;t.prototype={defaults:{placeholder:"_",optionalmarker:{start:"[",end:"]"},quantifiermarker:{start:"{",end:"}"},groupmarker:{start:"(",end:")"},alternatormarker:"|",escapeChar:"\\",mask:null,oncomplete:e.noop,onincomplete:e.noop,oncleared:e.noop,repeat:0,greedy:!0,autoUnmask:!1,removeMaskOnSubmit:!1,clearMaskOnLostFocus:!0,insertMode:!0,clearIncomplete:!1,aliases:{},alias:null,onKeyDown:e.noop,onBeforeMask:null,onBeforePaste:function(t,n){return e.isFunction(n.onBeforeMask)?n.onBeforeMask(t,n):t},onBeforeWrite:null,onUnMask:null,showMaskOnFocus:!0,showMaskOnHover:!0,onKeyValidation:e.noop,skipOptionalPartCharacter:" ",numericInput:!1,rightAlign:!1,undoOnEscape:!0,radixPoint:"",radixPointDefinitionSymbol:void 0,groupSeparator:"",keepStatic:null,positionCaretOnTab:!0,tabThrough:!1,supportsInputType:["text","tel","password"],definitions:{9:{validator:"[0-9]",cardinality:1,definitionSymbol:"*"},a:{validator:"[A-Za-zА-яЁёÀ-ÿµ]",cardinality:1,definitionSymbol:"*"},"*":{validator:"[0-9A-Za-zА-яЁёÀ-ÿµ]",cardinality:1}},ignorables:[8,9,13,19,27,33,34,35,36,37,38,39,40,45,46,93,112,113,114,115,116,117,118,119,120,121,122,123],isComplete:null,canClearPosition:e.noop,postValidation:null,staticDefinitionSymbol:void 0,jitMasking:!1,nullable:!0,inputEventOnly:!1,noValuePatching:!1,positionCaretOnClick:"lvp",casing:null,inputmode:"verbatim",colorMask:!1,androidHack:!1},masksCache:{},mask:function(o){var s=this;return"string"==typeof o&&(o=document.getElementById(o)||document.querySelectorAll(o)),o=o.nodeName?[o]:o,e.each(o,function(o,a){var c=e.extend(!0,{},s.opts);!function(t,i,r,o){function s(e,n){null!==(n=void 0!==n?n:t.getAttribute(o+"-"+e))&&("string"==typeof n&&(0===e.indexOf("on")?n=window[n]:"false"===n?n=!1:"true"===n&&(n=!0)),r[e]=n)}var a,c,l,u,h=t.getAttribute(o);if(h&&""!==h&&(h=h.replace(new RegExp("'","g"),'"'),c=JSON.parse("{"+h+"}")),c)for(u in l=void 0,c)if("alias"===u.toLowerCase()){l=c[u];break}for(a in s("alias",l),r.alias&&n(r.alias,r,i),i){if(c)for(u in l=void 0,c)if(u.toLowerCase()===a.toLowerCase()){l=c[u];break}s(a,l)}e.extend(!0,i,r)}(a,c,e.extend(!0,{},s.userOptions),s.dataAttribute);var l=i(c,s.noMasksCache);void 0!==l&&(void 0!==a.inputmask&&a.inputmask.remove(),a.inputmask=new t,a.inputmask.opts=c,a.inputmask.noMasksCache=s.noMasksCache,a.inputmask.userOptions=e.extend(!0,{},s.userOptions),a.inputmask.el=a,a.inputmask.maskset=l,e.data(a,"_inputmask_opts",c),r.call(a.inputmask,{action:"mask"}))}),o&&o[0]&&o[0].inputmask||this},option:function(t,n){return"string"==typeof t?this.opts[t]:"object"==typeof t?(e.extend(this.userOptions,t),this.el&&!0!==n&&this.mask(this.el),this):void 0},unmaskedvalue:function(e){return this.maskset=this.maskset||i(this.opts,this.noMasksCache),r.call(this,{action:"unmaskedvalue",value:e})},remove:function(){return r.call(this,{action:"remove"})},getemptymask:function(){return this.maskset=this.maskset||i(this.opts,this.noMasksCache),r.call(this,{action:"getemptymask"})},hasMaskedValue:function(){return!this.opts.autoUnmask},isComplete:function(){return this.maskset=this.maskset||i(this.opts,this.noMasksCache),r.call(this,{action:"isComplete"})},getmetadata:function(){return this.maskset=this.maskset||i(this.opts,this.noMasksCache),r.call(this,{action:"getmetadata"})},isValid:function(e){return this.maskset=this.maskset||i(this.opts,this.noMasksCache),r.call(this,{action:"isValid",value:e})},format:function(e,t){return this.maskset=this.maskset||i(this.opts,this.noMasksCache),r.call(this,{action:"format",value:e,metadata:t})},analyseMask:function(t,n){function i(e,t,n,i){this.matches=[],this.openGroup=e||!1,this.isGroup=e||!1,this.isOptional=t||!1,this.isQuantifier=n||!1,this.isAlternator=i||!1,this.quantifier={min:1,max:1}}function r(t,i,r){var o=n.definitions[i];r=void 0!==r?r:t.matches.length;var s=t.matches[r-1];if(o&&!p){o.placeholder=e.isFunction(o.placeholder)?o.placeholder(n):o.placeholder;for(var a=o.prevalidator,c=a?a.length:0,l=1;l<o.cardinality;l++){var u=c>=l?a[l-1]:[],h=u.validator,d=u.cardinality;t.matches.splice(r++,0,{fn:h?"string"==typeof h?new RegExp(h):new function(){this.test=h}:new RegExp("."),cardinality:d||1,optionality:t.isOptional,newBlockMarker:void 0===s||s.def!==(o.definitionSymbol||i),casing:o.casing,def:o.definitionSymbol||i,placeholder:o.placeholder,nativeDef:i}),s=t.matches[r-1]}t.matches.splice(r++,0,{fn:o.validator?"string"==typeof o.validator?new RegExp(o.validator):new function(){this.test=o.validator}:new RegExp("."),cardinality:o.cardinality,optionality:t.isOptional,newBlockMarker:void 0===s||s.def!==(o.definitionSymbol||i),casing:o.casing,def:o.definitionSymbol||i,placeholder:o.placeholder,nativeDef:i})}else t.matches.splice(r++,0,{fn:null,cardinality:0,optionality:t.isOptional,newBlockMarker:void 0===s||s.def!==i,casing:null,def:n.staticDefinitionSymbol||i,placeholder:void 0!==n.staticDefinitionSymbol?i:void 0,nativeDef:i}),p=!1}function o(){if(v.length>0){if(r(l=v[v.length-1],a),l.isAlternator){u=v.pop();for(var e=0;e<u.matches.length;e++)u.matches[e].isGroup=!1;v.length>0?(l=v[v.length-1]).matches.push(u):m.matches.push(u)}}else r(m,a)}for(var s,a,c,l,u,h,d,f=/(?:[?*+]|\{[0-9\+\*]+(?:,[0-9\+\*]*)?\})|[^.?*+^${[]()|\\]+|./g,p=!1,m=new i,v=[],g=[];s=f.exec(t);)if(a=s[0],p)o();else switch(a.charAt(0)){case n.escapeChar:p=!0;break;case n.optionalmarker.end:case n.groupmarker.end:if((c=v.pop()).openGroup=!1,void 0!==c)if(v.length>0){if((l=v[v.length-1]).matches.push(c),l.isAlternator){u=v.pop();for(var y=0;y<u.matches.length;y++)u.matches[y].isGroup=!1;v.length>0?(l=v[v.length-1]).matches.push(u):m.matches.push(u)}}else m.matches.push(c);else o();break;case n.optionalmarker.start:v.push(new i(!1,!0));break;case n.groupmarker.start:v.push(new i(!0));break;case n.quantifiermarker.start:var b=new i(!1,!1,!0),_=(a=a.replace(/[{}]/g,"")).split(","),w=isNaN(_[0])?_[0]:parseInt(_[0]),k=1===_.length?w:isNaN(_[1])?_[1]:parseInt(_[1]);if("*"!==k&&"+"!==k||(w="*"===k?0:1),b.quantifier={min:w,max:k},v.length>0){var E=v[v.length-1].matches;(s=E.pop()).isGroup||((d=new i(!0)).matches.push(s),s=d),E.push(s),E.push(b)}else(s=m.matches.pop()).isGroup||((d=new i(!0)).matches.push(s),s=d),m.matches.push(s),m.matches.push(b);break;case n.alternatormarker:v.length>0?h=(l=v[v.length-1]).matches.pop():h=m.matches.pop(),h.isAlternator?v.push(h):((u=new i(!1,!1,!1,!0)).matches.push(h),v.push(u));break;default:o()}for(;v.length>0;)c=v.pop(),m.matches.push(c);return m.matches.length>0&&(function t(i){i&&i.matches&&e.each(i.matches,function(e,o){var s=i.matches[e+1];(void 0===s||void 0===s.matches||!1===s.isQuantifier)&&o&&o.isGroup&&(o.isGroup=!1,r(o,n.groupmarker.start,0),!0!==o.openGroup&&r(o,n.groupmarker.end)),t(o)})}(m),g.push(m)),n.numericInput&&function e(t){function i(e){return e===n.optionalmarker.start?e=n.optionalmarker.end:e===n.optionalmarker.end?e=n.optionalmarker.start:e===n.groupmarker.start?e=n.groupmarker.end:e===n.groupmarker.end&&(e=n.groupmarker.start),e}for(var r in t.matches=t.matches.reverse(),t.matches){var o=parseInt(r);if(t.matches[r].isQuantifier&&t.matches[o+1]&&t.matches[o+1].isGroup){var s=t.matches[r];t.matches.splice(r,1),t.matches.splice(o+1,0,s)}void 0!==t.matches[r].matches?t.matches[r]=e(t.matches[r]):t.matches[r]=i(t.matches[r])}return t}(g[0]),g}},t.extendDefaults=function(n){e.extend(!0,t.prototype.defaults,n)},t.extendDefinitions=function(n){e.extend(!0,t.prototype.defaults.definitions,n)},t.extendAliases=function(n){e.extend(!0,t.prototype.defaults.aliases,n)},t.format=function(e,n,i){return t(n).format(e,i)},t.unmask=function(e,n){return t(n).unmaskedvalue(e)},t.isValid=function(e,n){return t(n).isValid(e)},t.remove=function(t){e.each(t,function(e,t){t.inputmask&&t.inputmask.remove()})},t.escapeRegex=function(e){return e.replace(new RegExp("(\\"+["/",".","*","+","?","|","(",")","[","]","{","}","\\","$","^"].join("|\\")+")","gim"),"\\$1")},t.keyCode={ALT:18,BACKSPACE:8,BACKSPACE_SAFARI:127,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91,X:88},window.Inputmask=t}(jQuery),function(e,t){void 0===e.fn.inputmask&&(e.fn.inputmask=function(n,i){var r,o=this[0];if(void 0===i&&(i={}),"string"==typeof n)switch(n){case"unmaskedvalue":return o&&o.inputmask?o.inputmask.unmaskedvalue():e(o).val();case"remove":return this.each(function(){this.inputmask&&this.inputmask.remove()});case"getemptymask":return o&&o.inputmask?o.inputmask.getemptymask():"";case"hasMaskedValue":return!(!o||!o.inputmask)&&o.inputmask.hasMaskedValue();case"isComplete":return!o||!o.inputmask||o.inputmask.isComplete();case"getmetadata":return o&&o.inputmask?o.inputmask.getmetadata():void 0;case"setvalue":e(o).val(i),o&&void 0===o.inputmask&&e(o).triggerHandler("setvalue");break;case"option":if("string"!=typeof i)return this.each(function(){if(void 0!==this.inputmask)return this.inputmask.option(i)});if(o&&void 0!==o.inputmask)return o.inputmask.option(i);break;default:return i.alias=n,r=new t(i),this.each(function(){r.mask(this)})}else{if("object"==typeof n)return r=new t(n),void 0===n.mask&&void 0===n.alias?this.each(function(){return void 0!==this.inputmask?this.inputmask.option(n):void r.mask(this)}):this.each(function(){r.mask(this)});if(void 0===n)return this.each(function(){(r=new t(i)).mask(this)})}}),e.fn.inputmask}(jQuery,Inputmask),jQuery,Inputmask,function(e,t){t.extendAliases({"dd/mm/yyyy":{mask:"1/2/y",placeholder:"dd/mm/yyyy",regex:{val1pre:new RegExp("[0-3]"),val1:new RegExp("0[1-9]|[12][0-9]|3[01]"),val2pre:function(e){var n=t.escapeRegex.call(this,e);return new RegExp("((0[1-9]|[12][0-9]|3[01])"+n+"[01])")},val2:function(e){var n=t.escapeRegex.call(this,e);return new RegExp("((0[1-9]|[12][0-9])"+n+"(0[1-9]|1[012]))|(30"+n+"(0[13-9]|1[012]))|(31"+n+"(0[13578]|1[02]))")}},leapday:"29/02/",separator:"/",yearrange:{minyear:1900,maxyear:2099},isInYearRange:function(e,t,n){if(isNaN(e))return!1;var i=parseInt(e.concat(t.toString().slice(e.length))),r=parseInt(e.concat(n.toString().slice(e.length)));return!isNaN(i)&&t<=i&&i<=n||!isNaN(r)&&t<=r&&r<=n},determinebaseyear:function(e,t,n){var i=(new Date).getFullYear();if(e>i)return e;if(t<i){for(var r=t.toString().slice(0,2),o=t.toString().slice(2,4);t<r+n;)r--;var s=r+o;return e>s?e:s}if(e<=i&&i<=t){for(var a=i.toString().slice(0,2);t<a+n;)a--;var c=a+n;return c<e?e:c}return i},onKeyDown:function(n,i,r,o){var s=e(this);if(n.ctrlKey&&n.keyCode===t.keyCode.RIGHT){var a=new Date;s.val(a.getDate().toString()+(a.getMonth()+1).toString()+a.getFullYear().toString()),s.trigger("setvalue")}},getFrontValue:function(e,t,n){for(var i=0,r=0,o=0;o<e.length&&"2"!==e.charAt(o);o++){var s=n.definitions[e.charAt(o)];s?(i+=r,r=s.cardinality):r++}return t.join("").substr(i,r)},postValidation:function(e,t,n){var i,r,o=e.join("");return 0===n.mask.indexOf("y")?(r=o.substr(0,4),i=o.substr(4,11)):(r=o.substr(6,11),i=o.substr(0,6)),t&&(i!==n.leapday||function(e){return isNaN(e)||29===new Date(e,2,0).getDate()}(r))},definitions:{1:{validator:function(e,t,n,i,r){var o=r.regex.val1.test(e);return i||o||e.charAt(1)!==r.separator&&-1==="-./".indexOf(e.charAt(1))||!(o=r.regex.val1.test("0"+e.charAt(0)))?o:(t.buffer[n-1]="0",{refreshFromBuffer:{start:n-1,end:n},pos:n,c:e.charAt(0)})},cardinality:2,prevalidator:[{validator:function(e,t,n,i,r){var o=e;isNaN(t.buffer[n+1])||(o+=t.buffer[n+1]);var s=1===o.length?r.regex.val1pre.test(o):r.regex.val1.test(o);if(!i&&!s){if(s=r.regex.val1.test(e+"0"))return t.buffer[n]=e,t.buffer[++n]="0",{pos:n,c:"0"};if(s=r.regex.val1.test("0"+e))return t.buffer[n]="0",{pos:++n}}return s},cardinality:1}]},2:{validator:function(e,t,n,i,r){var o=r.getFrontValue(t.mask,t.buffer,r);-1!==o.indexOf(r.placeholder[0])&&(o="01"+r.separator);var s=r.regex.val2(r.separator).test(o+e);return i||s||e.charAt(1)!==r.separator&&-1==="-./".indexOf(e.charAt(1))||!(s=r.regex.val2(r.separator).test(o+"0"+e.charAt(0)))?s:(t.buffer[n-1]="0",{refreshFromBuffer:{start:n-1,end:n},pos:n,c:e.charAt(0)})},cardinality:2,prevalidator:[{validator:function(e,t,n,i,r){isNaN(t.buffer[n+1])||(e+=t.buffer[n+1]);var o=r.getFrontValue(t.mask,t.buffer,r);-1!==o.indexOf(r.placeholder[0])&&(o="01"+r.separator);var s=1===e.length?r.regex.val2pre(r.separator).test(o+e):r.regex.val2(r.separator).test(o+e);return i||s||!(s=r.regex.val2(r.separator).test(o+"0"+e))?s:(t.buffer[n]="0",{pos:++n})},cardinality:1}]},y:{validator:function(e,t,n,i,r){return r.isInYearRange(e,r.yearrange.minyear,r.yearrange.maxyear)},cardinality:4,prevalidator:[{validator:function(e,t,n,i,r){var o=r.isInYearRange(e,r.yearrange.minyear,r.yearrange.maxyear);if(!i&&!o){var s=r.determinebaseyear(r.yearrange.minyear,r.yearrange.maxyear,e+"0").toString().slice(0,1);if(o=r.isInYearRange(s+e,r.yearrange.minyear,r.yearrange.maxyear))return t.buffer[n++]=s.charAt(0),{pos:n};if(s=r.determinebaseyear(r.yearrange.minyear,r.yearrange.maxyear,e+"0").toString().slice(0,2),o=r.isInYearRange(s+e,r.yearrange.minyear,r.yearrange.maxyear))return t.buffer[n++]=s.charAt(0),t.buffer[n++]=s.charAt(1),{pos:n}}return o},cardinality:1},{validator:function(e,t,n,i,r){var o=r.isInYearRange(e,r.yearrange.minyear,r.yearrange.maxyear);if(!i&&!o){var s=r.determinebaseyear(r.yearrange.minyear,r.yearrange.maxyear,e).toString().slice(0,2);if(o=r.isInYearRange(e[0]+s[1]+e[1],r.yearrange.minyear,r.yearrange.maxyear))return t.buffer[n++]=s.charAt(1),{pos:n};if(s=r.determinebaseyear(r.yearrange.minyear,r.yearrange.maxyear,e).toString().slice(0,2),o=r.isInYearRange(s+e,r.yearrange.minyear,r.yearrange.maxyear))return t.buffer[n-1]=s.charAt(0),t.buffer[n++]=s.charAt(1),t.buffer[n++]=e.charAt(0),{refreshFromBuffer:{start:n-3,end:n},pos:n}}return o},cardinality:2},{validator:function(e,t,n,i,r){return r.isInYearRange(e,r.yearrange.minyear,r.yearrange.maxyear)},cardinality:3}]}},insertMode:!1,autoUnmask:!1},"mm/dd/yyyy":{placeholder:"mm/dd/yyyy",alias:"dd/mm/yyyy",regex:{val2pre:function(e){var n=t.escapeRegex.call(this,e);return new RegExp("((0[13-9]|1[012])"+n+"[0-3])|(02"+n+"[0-2])")},val2:function(e){var n=t.escapeRegex.call(this,e);return new RegExp("((0[1-9]|1[012])"+n+"(0[1-9]|[12][0-9]))|((0[13-9]|1[012])"+n+"30)|((0[13578]|1[02])"+n+"31)")},val1pre:new RegExp("[01]"),val1:new RegExp("0[1-9]|1[012]")},leapday:"02/29/",onKeyDown:function(n,i,r,o){var s=e(this);if(n.ctrlKey&&n.keyCode===t.keyCode.RIGHT){var a=new Date;s.val((a.getMonth()+1).toString()+a.getDate().toString()+a.getFullYear().toString()),s.trigger("setvalue")}}},"yyyy/mm/dd":{mask:"y/1/2",placeholder:"yyyy/mm/dd",alias:"mm/dd/yyyy",leapday:"/02/29",onKeyDown:function(n,i,r,o){var s=e(this);if(n.ctrlKey&&n.keyCode===t.keyCode.RIGHT){var a=new Date;s.val(a.getFullYear().toString()+(a.getMonth()+1).toString()+a.getDate().toString()),s.trigger("setvalue")}}},"dd.mm.yyyy":{mask:"1.2.y",placeholder:"dd.mm.yyyy",leapday:"29.02.",separator:".",alias:"dd/mm/yyyy"},"dd-mm-yyyy":{mask:"1-2-y",placeholder:"dd-mm-yyyy",leapday:"29-02-",separator:"-",alias:"dd/mm/yyyy"},"mm.dd.yyyy":{mask:"1.2.y",placeholder:"mm.dd.yyyy",leapday:"02.29.",separator:".",alias:"mm/dd/yyyy"},"mm-dd-yyyy":{mask:"1-2-y",placeholder:"mm-dd-yyyy",leapday:"02-29-",separator:"-",alias:"mm/dd/yyyy"},"yyyy.mm.dd":{mask:"y.1.2",placeholder:"yyyy.mm.dd",leapday:".02.29",separator:".",alias:"yyyy/mm/dd"},"yyyy-mm-dd":{mask:"y-1-2",placeholder:"yyyy-mm-dd",leapday:"-02-29",separator:"-",alias:"yyyy/mm/dd"},datetime:{mask:"1/2/y h:s",placeholder:"dd/mm/yyyy hh:mm",alias:"dd/mm/yyyy",regex:{hrspre:new RegExp("[012]"),hrs24:new RegExp("2[0-4]|1[3-9]"),hrs:new RegExp("[01][0-9]|2[0-4]"),ampm:new RegExp("^[a|p|A|P][m|M]"),mspre:new RegExp("[0-5]"),ms:new RegExp("[0-5][0-9]")},timeseparator:":",hourFormat:"24",definitions:{h:{validator:function(e,t,n,i,r){if("24"===r.hourFormat&&24===parseInt(e,10))return t.buffer[n-1]="0",t.buffer[n]="0",{refreshFromBuffer:{start:n-1,end:n},c:"0"};var o=r.regex.hrs.test(e);if(!i&&!o&&(e.charAt(1)===r.timeseparator||-1!=="-.:".indexOf(e.charAt(1)))&&(o=r.regex.hrs.test("0"+e.charAt(0))))return t.buffer[n-1]="0",t.buffer[n]=e.charAt(0),{refreshFromBuffer:{start:++n-2,end:n},pos:n,c:r.timeseparator};if(o&&"24"!==r.hourFormat&&r.regex.hrs24.test(e)){var s=parseInt(e,10);return 24===s?(t.buffer[n+5]="a",t.buffer[n+6]="m"):(t.buffer[n+5]="p",t.buffer[n+6]="m"),(s-=12)<10?(t.buffer[n]=s.toString(),t.buffer[n-1]="0"):(t.buffer[n]=s.toString().charAt(1),t.buffer[n-1]=s.toString().charAt(0)),{refreshFromBuffer:{start:n-1,end:n+6},c:t.buffer[n]}}return o},cardinality:2,prevalidator:[{validator:function(e,t,n,i,r){var o=r.regex.hrspre.test(e);return i||o||!(o=r.regex.hrs.test("0"+e))?o:(t.buffer[n]="0",{pos:++n})},cardinality:1}]},s:{validator:"[0-5][0-9]",cardinality:2,prevalidator:[{validator:function(e,t,n,i,r){var o=r.regex.mspre.test(e);return i||o||!(o=r.regex.ms.test("0"+e))?o:(t.buffer[n]="0",{pos:++n})},cardinality:1}]},t:{validator:function(e,t,n,i,r){return r.regex.ampm.test(e+"m")},casing:"lower",cardinality:1}},insertMode:!1,autoUnmask:!1},datetime12:{mask:"1/2/y h:s t\\m",placeholder:"dd/mm/yyyy hh:mm xm",alias:"datetime",hourFormat:"12"},"mm/dd/yyyy hh:mm xm":{mask:"1/2/y h:s t\\m",placeholder:"mm/dd/yyyy hh:mm xm",alias:"datetime12",regex:{val2pre:function(e){var n=t.escapeRegex.call(this,e);return new RegExp("((0[13-9]|1[012])"+n+"[0-3])|(02"+n+"[0-2])")},val2:function(e){var n=t.escapeRegex.call(this,e);return new RegExp("((0[1-9]|1[012])"+n+"(0[1-9]|[12][0-9]))|((0[13-9]|1[012])"+n+"30)|((0[13578]|1[02])"+n+"31)")},val1pre:new RegExp("[01]"),val1:new RegExp("0[1-9]|1[012]")},leapday:"02/29/",onKeyDown:function(n,i,r,o){var s=e(this);if(n.ctrlKey&&n.keyCode===t.keyCode.RIGHT){var a=new Date;s.val((a.getMonth()+1).toString()+a.getDate().toString()+a.getFullYear().toString()),s.trigger("setvalue")}}},"hh:mm t":{mask:"h:s t\\m",placeholder:"hh:mm xm",alias:"datetime",hourFormat:"12"},"h:s t":{mask:"h:s t\\m",placeholder:"hh:mm xm",alias:"datetime",hourFormat:"12"},"hh:mm:ss":{mask:"h:s:s",placeholder:"hh:mm:ss",alias:"datetime",autoUnmask:!1},"hh:mm":{mask:"h:s",placeholder:"hh:mm",alias:"datetime",autoUnmask:!1},date:{alias:"dd/mm/yyyy"},"mm/yyyy":{mask:"1/y",placeholder:"mm/yyyy",leapday:"donotuse",separator:"/",alias:"mm/dd/yyyy"},shamsi:{regex:{val2pre:function(e){var n=t.escapeRegex.call(this,e);return new RegExp("((0[1-9]|1[012])"+n+"[0-3])")},val2:function(e){var n=t.escapeRegex.call(this,e);return new RegExp("((0[1-9]|1[012])"+n+"(0[1-9]|[12][0-9]))|((0[1-9]|1[012])"+n+"30)|((0[1-6])"+n+"31)")},val1pre:new RegExp("[01]"),val1:new RegExp("0[1-9]|1[012]")},yearrange:{minyear:1300,maxyear:1499},mask:"y/1/2",leapday:"/12/30",placeholder:"yyyy/mm/dd",alias:"mm/dd/yyyy",clearIncomplete:!0}})}(jQuery,Inputmask),function(e,t){t.extendDefinitions({A:{validator:"[A-Za-zА-яЁёÀ-ÿµ]",cardinality:1,casing:"upper"},"&":{validator:"[0-9A-Za-zА-яЁёÀ-ÿµ]",cardinality:1,casing:"upper"},"#":{validator:"[0-9A-Fa-f]",cardinality:1,casing:"upper"}}),t.extendAliases({url:{definitions:{i:{validator:".",cardinality:1}},mask:"(\\http://)|(\\http\\s://)|(ftp://)|(ftp\\s://)i{+}",insertMode:!1,autoUnmask:!1,inputmode:"url"},ip:{mask:"i[i[i]].i[i[i]].i[i[i]].i[i[i]]",definitions:{i:{validator:function(e,t,n,i,r){return n-1>-1&&"."!==t.buffer[n-1]?(e=t.buffer[n-1]+e,e=n-2>-1&&"."!==t.buffer[n-2]?t.buffer[n-2]+e:"0"+e):e="00"+e,new RegExp("25[0-5]|2[0-4][0-9]|[01][0-9][0-9]").test(e)},cardinality:1}},onUnMask:function(e,t,n){return e},inputmode:"numeric"},email:{mask:"*{1,64}[.*{1,64}][.*{1,64}][.*{1,63}]@-{1,63}.-{1,63}[.-{1,63}][.-{1,63}]",greedy:!1,onBeforePaste:function(e,t){return(e=e.toLowerCase()).replace("mailto:","")},definitions:{"*":{validator:"[0-9A-Za-z!#$%&'*+/=?^_`{|}~-]",cardinality:1,casing:"lower"},"-":{validator:"[0-9A-Za-z-]",cardinality:1,casing:"lower"}},onUnMask:function(e,t,n){return e},inputmode:"email"},mac:{mask:"##:##:##:##:##:##"},vin:{mask:"V{13}9{4}",definitions:{V:{validator:"[A-HJ-NPR-Za-hj-npr-z\\d]",cardinality:1,casing:"upper"}},clearIncomplete:!0,autoUnmask:!0}})}(jQuery,Inputmask),function(e,t){t.extendAliases({numeric:{mask:function(e){function n(t){for(var n="",i=0;i<t.length;i++)n+=e.definitions[t.charAt(i)]||e.optionalmarker.start===t.charAt(i)||e.optionalmarker.end===t.charAt(i)||e.quantifiermarker.start===t.charAt(i)||e.quantifiermarker.end===t.charAt(i)||e.groupmarker.start===t.charAt(i)||e.groupmarker.end===t.charAt(i)||e.alternatormarker===t.charAt(i)?"\\"+t.charAt(i):t.charAt(i);return n}if(0!==e.repeat&&isNaN(e.integerDigits)&&(e.integerDigits=e.repeat),e.repeat=0,e.groupSeparator===e.radixPoint&&("."===e.radixPoint?e.groupSeparator=",":","===e.radixPoint?e.groupSeparator=".":e.groupSeparator="")," "===e.groupSeparator&&(e.skipOptionalPartCharacter=void 0),e.autoGroup=e.autoGroup&&""!==e.groupSeparator,e.autoGroup&&("string"==typeof e.groupSize&&isFinite(e.groupSize)&&(e.groupSize=parseInt(e.groupSize)),isFinite(e.integerDigits))){var i=Math.floor(e.integerDigits/e.groupSize),r=e.integerDigits%e.groupSize;e.integerDigits=parseInt(e.integerDigits)+(0===r?i-1:i),e.integerDigits<1&&(e.integerDigits="*")}e.placeholder.length>1&&(e.placeholder=e.placeholder.charAt(0)),"radixFocus"===e.positionCaretOnClick&&""===e.placeholder&&!1===e.integerOptional&&(e.positionCaretOnClick="lvp"),e.definitions[";"]=e.definitions["~"],e.definitions[";"].definitionSymbol="~",!0===e.numericInput&&(e.positionCaretOnClick="radixFocus"===e.positionCaretOnClick?"lvp":e.positionCaretOnClick,e.digitsOptional=!1,isNaN(e.digits)&&(e.digits=2),e.decimalProtect=!1);var o="[+]";if(o+=n(e.prefix),o+=!0===e.integerOptional?"~{1,"+e.integerDigits+"}":"~{"+e.integerDigits+"}",void 0!==e.digits){e.decimalProtect&&(e.radixPointDefinitionSymbol=":");var s=e.digits.toString().split(",");isFinite(s[0]&&s[1]&&isFinite(s[1]))?o+=(e.decimalProtect?":":e.radixPoint)+";{"+e.digits+"}":(isNaN(e.digits)||parseInt(e.digits)>0)&&(o+=e.digitsOptional?"["+(e.decimalProtect?":":e.radixPoint)+";{1,"+e.digits+"}]":(e.decimalProtect?":":e.radixPoint)+";{"+e.digits+"}")}return o+=n(e.suffix),o+="[-]",e.greedy=!1,null!==e.min&&(e.min=e.min.toString().replace(new RegExp(t.escapeRegex(e.groupSeparator),"g"),""),","===e.radixPoint&&(e.min=e.min.replace(e.radixPoint,"."))),null!==e.max&&(e.max=e.max.toString().replace(new RegExp(t.escapeRegex(e.groupSeparator),"g"),""),","===e.radixPoint&&(e.max=e.max.replace(e.radixPoint,"."))),o},placeholder:"",greedy:!1,digits:"*",digitsOptional:!0,radixPoint:".",positionCaretOnClick:"radixFocus",groupSize:3,groupSeparator:"",autoGroup:!1,allowPlus:!0,allowMinus:!0,negationSymbol:{front:"-",back:""},integerDigits:"+",integerOptional:!0,prefix:"",suffix:"",rightAlign:!0,decimalProtect:!0,min:null,max:null,step:1,insertMode:!0,autoUnmask:!1,unmaskAsNumber:!1,inputmode:"numeric",postFormat:function(n,i,r){var o,s;!0===r.numericInput&&(n=n.reverse(),isFinite(i)&&(i=n.join("").length-i-1));var a=n[i=i>=n.length?n.length-1:i<0?0:i],c=n.slice();a===r.groupSeparator&&(c.splice(i--,1),a=c[i]);var l=c.join("").match(new RegExp("^"+t.escapeRegex(r.negationSymbol.front)));i>((l=null!==l&&1===l.length)?r.negationSymbol.front.length:0)+r.prefix.length&&i<c.length-r.suffix.length&&(c[i]="!");var u=c.join(""),h=c.join();if(l&&(u=(u=u.replace(new RegExp("^"+t.escapeRegex(r.negationSymbol.front)),"")).replace(new RegExp(t.escapeRegex(r.negationSymbol.back)+"$"),"")),(u=(u=u.replace(new RegExp(t.escapeRegex(r.suffix)+"$"),"")).replace(new RegExp("^"+t.escapeRegex(r.prefix)),"")).length>0&&r.autoGroup||-1!==u.indexOf(r.groupSeparator)){var d=t.escapeRegex(r.groupSeparator),f=(u=u.replace(new RegExp(d,"g"),"")).split(a===r.radixPoint?"!":r.radixPoint);if(u=""===r.radixPoint?u:f[0],a!==r.negationSymbol.front&&(u=u.replace("!","?")),u.length>r.groupSize)for(var p=new RegExp("([-+]?[\\d?]+)([\\d?]{"+r.groupSize+"})");p.test(u)&&""!==r.groupSeparator;)u=(u=u.replace(p,"$1"+r.groupSeparator+"$2")).replace(r.groupSeparator+r.groupSeparator,r.groupSeparator);u=u.replace("?","!"),""!==r.radixPoint&&f.length>1&&(u+=(a===r.radixPoint?"!":r.radixPoint)+f[1])}u=r.prefix+u+r.suffix,l&&(u=r.negationSymbol.front+u+r.negationSymbol.back);var m=h!==u.split("").join(),v=e.inArray("!",u);if(-1===v&&(v=i),m){for(n.length=u.length,o=0,s=u.length;o<s;o++)n[o]=u.charAt(o);n[v]=a}return v=r.numericInput&&isFinite(i)?n.join("").length-v-1:v,r.numericInput&&(n=n.reverse(),e.inArray(r.radixPoint,n)<v&&n.join("").length-r.suffix.length!==v&&(v-=1)),{pos:v,refreshFromBuffer:m,buffer:n,isNegative:l}},onBeforeWrite:function(n,i,r,o){var s;if(n&&("blur"===n.type||"checkval"===n.type||"keydown"===n.type)){var a=o.numericInput?i.slice().reverse().join(""):i.join(""),c=a.replace(o.prefix,"");c=(c=c.replace(o.suffix,"")).replace(new RegExp(t.escapeRegex(o.groupSeparator),"g"),""),","===o.radixPoint&&(c=c.replace(o.radixPoint,"."));var l=c.match(new RegExp("[-"+t.escapeRegex(o.negationSymbol.front)+"]","g"));if(l=null!==l&&1===l.length,c=(c=c.replace(new RegExp("[-"+t.escapeRegex(o.negationSymbol.front)+"]","g"),"")).replace(new RegExp(t.escapeRegex(o.negationSymbol.back)+"$"),""),isNaN(o.placeholder)&&(c=c.replace(new RegExp(t.escapeRegex(o.placeholder),"g"),"")),""!==(c=c===o.negationSymbol.front?c+"0":c)&&isFinite(c)){var u=parseFloat(c),h=l?-1*u:u;if(null!==o.min&&isFinite(o.min)&&h<parseFloat(o.min)?(u=Math.abs(o.min),l=o.min<0,a=void 0):null!==o.max&&isFinite(o.max)&&h>parseFloat(o.max)&&(u=Math.abs(o.max),l=o.max<0,a=void 0),c=u.toString().replace(".",o.radixPoint).split(""),isFinite(o.digits)){var d=e.inArray(o.radixPoint,c),f=e.inArray(o.radixPoint,a);-1===d&&(c.push(o.radixPoint),d=c.length-1);for(var p=1;p<=o.digits;p++)o.digitsOptional||void 0!==c[d+p]&&c[d+p]!==o.placeholder.charAt(0)?-1!==f&&void 0!==a[f+p]&&(c[d+p]=c[d+p]||a[f+p]):c[d+p]="0";c[c.length-1]===o.radixPoint&&delete c[c.length-1]}if(u.toString()!==c&&u.toString()+"."!==c||l)return c=(o.prefix+c.join("")).split(""),!l||0===u&&"blur"===n.type||(c.unshift(o.negationSymbol.front),c.push(o.negationSymbol.back)),o.numericInput&&(c=c.reverse()),(s=o.postFormat(c,o.numericInput?r:r-1,o)).buffer&&(s.refreshFromBuffer=s.buffer.join("")!==i.join("")),s}}if(o.autoGroup)return(s=o.postFormat(i,o.numericInput?r:r-1,o)).caret=r<(s.isNegative?o.negationSymbol.front.length:0)+o.prefix.length||r>s.buffer.length-(s.isNegative?o.negationSymbol.back.length:0)?s.pos:s.pos+1,s},regex:{integerPart:function(e){return new RegExp("["+t.escapeRegex(e.negationSymbol.front)+"+]?\\d+")},integerNPart:function(e){return new RegExp("[\\d"+t.escapeRegex(e.groupSeparator)+t.escapeRegex(e.placeholder.charAt(0))+"]+")}},signHandler:function(e,t,n,i,r){if(!i&&r.allowMinus&&"-"===e||r.allowPlus&&"+"===e){var o=t.buffer.join("").match(r.regex.integerPart(r));if(o&&o[0].length>0)return t.buffer[o.index]===("-"===e?"+":r.negationSymbol.front)?"-"===e?""!==r.negationSymbol.back?{pos:0,c:r.negationSymbol.front,remove:0,caret:n,insert:{pos:t.buffer.length-1,c:r.negationSymbol.back}}:{pos:0,c:r.negationSymbol.front,remove:0,caret:n}:""!==r.negationSymbol.back?{pos:0,c:"+",remove:[0,t.buffer.length-1],caret:n}:{pos:0,c:"+",remove:0,caret:n}:t.buffer[0]===("-"===e?r.negationSymbol.front:"+")?"-"===e&&""!==r.negationSymbol.back?{remove:[0,t.buffer.length-1],caret:n-1}:{remove:0,caret:n-1}:"-"===e?""!==r.negationSymbol.back?{pos:0,c:r.negationSymbol.front,caret:n+1,insert:{pos:t.buffer.length,c:r.negationSymbol.back}}:{pos:0,c:r.negationSymbol.front,caret:n+1}:{pos:0,c:e,caret:n+1}}return!1},radixHandler:function(t,n,i,r,o){if(!r&&!0!==o.numericInput&&t===o.radixPoint&&void 0!==o.digits&&(isNaN(o.digits)||parseInt(o.digits)>0)){var s=e.inArray(o.radixPoint,n.buffer),a=n.buffer.join("").match(o.regex.integerPart(o));if(-1!==s&&n.validPositions[s])return n.validPositions[s-1]?{caret:s+1}:{pos:a.index,c:a[0],caret:s+1};if(!a||"0"===a[0]&&a.index+1!==i)return n.buffer[a?a.index:i]="0",{pos:(a?a.index:i)+1,c:o.radixPoint}}return!1},leadingZeroHandler:function(t,n,i,r,o,s){if(!r)if((a=n.buffer.slice("")).splice(0,o.prefix.length),a.splice(a.length-o.suffix.length,o.suffix.length),!0===o.numericInput){var a;if("0"===(a=a.reverse())[0]&&void 0===n.validPositions[i-1])return{pos:i,remove:a.length-1}}else{i-=o.prefix.length;var c=e.inArray(o.radixPoint,a),l=a.slice(0,-1!==c?c:void 0).join("").match(o.regex.integerNPart(o));if(l&&(-1===c||i<=c)){var u=-1===c?0:parseInt(a.slice(c+1).join(""));if(0===l[0].indexOf(""!==o.placeholder?o.placeholder.charAt(0):"0")&&(l.index+1===i||!0!==s&&0===u))return n.buffer.splice(l.index+o.prefix.length,1),{pos:l.index+o.prefix.length,remove:l.index+o.prefix.length};if("0"===t&&i<=l.index&&l[0]!==o.groupSeparator)return!1}}return!0},definitions:{"~":{validator:function(n,i,r,o,s,a){var c=s.signHandler(n,i,r,o,s);if(!c&&(!(c=s.radixHandler(n,i,r,o,s))&&(!0===(c=o?new RegExp("[0-9"+t.escapeRegex(s.groupSeparator)+"]").test(n):new RegExp("[0-9]").test(n))&&!0===(c=s.leadingZeroHandler(n,i,r,o,s,a))))){var l=e.inArray(s.radixPoint,i.buffer);c=-1!==l&&(!1===s.digitsOptional||i.validPositions[r])&&!0!==s.numericInput&&r>l&&!o?{pos:r,remove:r}:{pos:r}}return c},cardinality:1},"+":{validator:function(e,t,n,i,r){var o=r.signHandler(e,t,n,i,r);return!o&&(i&&r.allowMinus&&e===r.negationSymbol.front||r.allowMinus&&"-"===e||r.allowPlus&&"+"===e)&&(o=!(!i&&"-"===e)||(""!==r.negationSymbol.back?{pos:n,c:"-"===e?r.negationSymbol.front:"+",caret:n+1,insert:{pos:t.buffer.length,c:r.negationSymbol.back}}:{pos:n,c:"-"===e?r.negationSymbol.front:"+",caret:n+1})),o},cardinality:1,placeholder:""},"-":{validator:function(e,t,n,i,r){var o=r.signHandler(e,t,n,i,r);return!o&&i&&r.allowMinus&&e===r.negationSymbol.back&&(o=!0),o},cardinality:1,placeholder:""},":":{validator:function(e,n,i,r,o){var s=o.signHandler(e,n,i,r,o);if(!s){var a="["+t.escapeRegex(o.radixPoint)+"]";(s=new RegExp(a).test(e))&&n.validPositions[i]&&n.validPositions[i].match.placeholder===o.radixPoint&&(s={caret:i+1})}return s},cardinality:1,placeholder:function(e){return e.radixPoint}}},onUnMask:function(e,n,i){if(""===n&&!0===i.nullable)return n;var r=e.replace(i.prefix,"");return r=(r=r.replace(i.suffix,"")).replace(new RegExp(t.escapeRegex(i.groupSeparator),"g"),""),i.unmaskAsNumber?(""!==i.radixPoint&&-1!==r.indexOf(i.radixPoint)&&(r=r.replace(t.escapeRegex.call(this,i.radixPoint),".")),Number(r)):r},isComplete:function(e,n){var i=e.join(""),r=e.slice();if(n.postFormat(r,0,n),r.join("")!==i)return!1;var o=i.replace(n.prefix,"");return o=(o=o.replace(n.suffix,"")).replace(new RegExp(t.escapeRegex(n.groupSeparator),"g"),""),","===n.radixPoint&&(o=o.replace(t.escapeRegex(n.radixPoint),".")),isFinite(o)},onBeforeMask:function(e,n){if(!0===n.numericInput&&(e=e.split("").reverse().join("")),""!==n.radixPoint&&isFinite(e)){var i=e.split("."),r=""!==n.groupSeparator?parseInt(n.groupSize):0;2===i.length&&(i[0].length>r||i[1].length>r)&&(e=e.toString().replace(".",n.radixPoint))}var o=e.match(/,/g),s=e.match(/\./g);if(s&&o?s.length>o.length?e=(e=e.replace(/\./g,"")).replace(",",n.radixPoint):o.length>s.length?e=(e=e.replace(/,/g,"")).replace(".",n.radixPoint):e=e.indexOf(".")<e.indexOf(",")?e.replace(/\./g,""):e=e.replace(/,/g,""):e=e.replace(new RegExp(t.escapeRegex(n.groupSeparator),"g"),""),0===n.digits&&(-1!==e.indexOf(".")?e=e.substring(0,e.indexOf(".")):-1!==e.indexOf(",")&&(e=e.substring(0,e.indexOf(",")))),""!==n.radixPoint&&isFinite(n.digits)&&-1!==e.indexOf(n.radixPoint)){var a=e.split(n.radixPoint)[1].match(new RegExp("\\d*"))[0];if(parseInt(n.digits)<a.toString().length){var c=Math.pow(10,parseInt(n.digits));e=e.replace(t.escapeRegex(n.radixPoint),"."),e=(e=Math.round(parseFloat(e)*c)/c).toString().replace(".",n.radixPoint)}}return!0===n.numericInput&&(e=e.split("").reverse().join("")),e.toString()},canClearPosition:function(e,t,n,i,r){var o=e.validPositions[t].input;return o!==r.radixPoint||null!==e.validPositions[t].match.fn&&!1===r.decimalProtect||isFinite(o)||t===n||o===r.groupSeparator||o===r.negationSymbol.front||o===r.negationSymbol.back},onKeyDown:function(n,i,r,o){var s=e(this);if(n.ctrlKey)switch(n.keyCode){case t.keyCode.UP:s.val(parseFloat(this.inputmask.unmaskedvalue())+parseInt(o.step)),s.trigger("setvalue");break;case t.keyCode.DOWN:s.val(parseFloat(this.inputmask.unmaskedvalue())-parseInt(o.step)),s.trigger("setvalue")}}},currency:{prefix:"$ ",groupSeparator:",",alias:"numeric",placeholder:"0",autoGroup:!0,digits:2,digitsOptional:!1,clearMaskOnLostFocus:!1},decimal:{alias:"numeric"},integer:{alias:"numeric",digits:0,radixPoint:""},percentage:{alias:"numeric",digits:2,radixPoint:".",placeholder:"0",autoGroup:!1,min:0,max:100,suffix:" %",allowPlus:!1,allowMinus:!1}})}(jQuery,Inputmask),function(e,t){function n(e,t){var n=(e.mask||e).replace(/#/g,"9").replace(/\)/,"9").replace(/[+()#-]/g,""),i=(t.mask||t).replace(/#/g,"9").replace(/\)/,"9").replace(/[+()#-]/g,""),r=(e.mask||e).split("#")[0],o=(t.mask||t).split("#")[0];return 0===o.indexOf(r)?-1:0===r.indexOf(o)?1:n.localeCompare(i)}var i=t.prototype.analyseMask;t.prototype.analyseMask=function(t,n){var r={};return n.phoneCodes&&n.phoneCodes.length>1e3&&(function e(n,i,o){i=i||"",o=o||r,""!==i&&(o[i]={});for(var s="",a=o[i]||o,c=n.length-1;c>=0;c--)a[s=(t=n[c].mask||n[c]).substr(0,1)]=a[s]||[],a[s].unshift(t.substr(1)),n.splice(c,1);for(var l in a)a[l].length>500&&e(a[l].slice(),l,a)}((t=t.substr(1,t.length-2)).split(n.groupmarker.end+n.alternatormarker+n.groupmarker.start)),t=function t(i){var r=[];for(var o in i)e.isArray(i[o])?1===i[o].length?r.push(o+i[o]):r.push(o+n.groupmarker.start+i[o].join(n.groupmarker.end+n.alternatormarker+n.groupmarker.start)+n.groupmarker.end):r.push(o+t(i[o]));return""+(1===r.length?r[0]:n.groupmarker.start+r.join(n.groupmarker.end+n.alternatormarker+n.groupmarker.start)+n.groupmarker.end)}(r)),i.call(this,t,n)},t.extendAliases({abstractphone:{groupmarker:{start:"<",end:">"},countrycode:"",phoneCodes:[],mask:function(e){return e.definitions={"#":e.definitions[9]},e.phoneCodes.sort(n)},keepStatic:!0,onBeforeMask:function(e,t){var n=e.replace(/^0{1,2}/,"").replace(/[\s]/g,"");return(n.indexOf(t.countrycode)>1||-1===n.indexOf(t.countrycode))&&(n="+"+t.countrycode+n),n},onUnMask:function(e,t,n){return t},inputmode:"tel"}})}(jQuery,Inputmask),function(e,t){t.extendAliases({Regex:{mask:"r",greedy:!1,repeat:"*",regex:null,regexTokens:null,tokenizer:/\[\^?]?(?:[^\\\]]+|\\[\S\s]?)*]?|\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9][0-9]*|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}|c[A-Za-z]|[\S\s]?)|\((?:\?[:=!]?)?|(?:[?*+]|\{[0-9]+(?:,[0-9]*)?\})\??|[^.?*+^${[()|\\]+|./g,quantifierFilter:/[0-9]+[^,]/,isComplete:function(e,t){return new RegExp(t.regex).test(e.join(""))},definitions:{r:{validator:function(t,n,i,r,o){function s(e,t){this.matches=[],this.isGroup=e||!1,this.isQuantifier=t||!1,this.quantifier={min:1,max:1},this.repeaterPart=void 0}function a(t,n){var i=!1;n&&(h+="(",f++);for(var r=0;r<t.matches.length;r++){var o=t.matches[r];if(!0===o.isGroup)i=a(o,!0);else if(!0===o.isQuantifier){var s=e.inArray(o,t.matches),l=t.matches[s-1],u=h;if(isNaN(o.quantifier.max)){for(;o.repeaterPart&&o.repeaterPart!==h&&o.repeaterPart.length>h.length&&!(i=a(l,!0)););(i=i||a(l,!0))&&(o.repeaterPart=h),h=u+o.quantifier.max}else{for(var d=0,p=o.quantifier.max-1;d<p&&!(i=a(l,!0));d++);h=u+"{"+o.quantifier.min+","+o.quantifier.max+"}"}}else if(void 0!==o.matches)for(var m=0;m<o.length&&!(i=a(o[m],n));m++);else{var v;if("["==o.charAt(0)){v=h,v+=o;for(var g=0;g<f;g++)v+=")";i=new RegExp("^("+v+")$").test(c)}else for(var y=0,b=o.length;y<b;y++)if("\\"!==o.charAt(y)){v=h,v=(v+=o.substr(0,y+1)).replace(/\|$/,"");for(g=0;g<f;g++)v+=")";if(i=new RegExp("^("+v+")$").test(c))break}h+=o}if(i)break}return n&&(h+=")",f--),i}var c,l,u=n.buffer.slice(),h="",d=!1,f=0;null===o.regexTokens&&function(){var e,t,n=new s,i=[];for(o.regexTokens=[];e=o.tokenizer.exec(o.regex);)switch(t=e[0],t.charAt(0)){case"(":i.push(new s(!0));break;case")":l=i.pop(),i.length>0?i[i.length-1].matches.push(l):n.matches.push(l);break;case"{":case"+":case"*":var r=new s(!1,!0),a=(t=t.replace(/[{}]/g,"")).split(","),c=isNaN(a[0])?a[0]:parseInt(a[0]),u=1===a.length?c:isNaN(a[1])?a[1]:parseInt(a[1]);if(r.quantifier={min:c,max:u},i.length>0){var h=i[i.length-1].matches;(e=h.pop()).isGroup||((l=new s(!0)).matches.push(e),e=l),h.push(e),h.push(r)}else(e=n.matches.pop()).isGroup||((l=new s(!0)).matches.push(e),e=l),n.matches.push(e),n.matches.push(r);break;default:i.length>0?i[i.length-1].matches.push(t):n.matches.push(t)}n.matches.length>0&&o.regexTokens.push(n)}(),u.splice(i,0,t),c=u.join("");for(var p=0;p<o.regexTokens.length;p++){var m=o.regexTokens[p];if(d=a(m,m.isGroup))break}return d},cardinality:1}}}})}(jQuery,Inputmask)},"./node_modules/meta-lightbox/meta-lightbox.js":function(e,t){!function(e,t,n){var i="metaLightbox",r={effect:"fade",theme:"default",keyboardNav:!0,clickOverlayToClose:!0,onInit:function(){},beforeShowLightbox:function(){},afterShowLightbox:function(e){},beforeHideLightbox:function(){},afterHideLightbox:function(){},onPrev:function(e){},onNext:function(e){},errorMessage:"The requested content cannot be loaded. Please try again later."};function o(t,n){this.options=e.extend({},r,n),this._defaults=r,this._name=i,this.init()}o.prototype={init:function(){var t=this,i=e("html");this.ajaxLoaded=!1,n.MetaLightbox=this,i.hasClass("meta-lightbox-notouch")||i.addClass("meta-lightbox-notouch"),"ontouchstart"in n&&i.removeClass("meta-lightbox-notouch"),e(n).on("click",'[data-toggle="lightbox"]',function(e){return e.preventDefault(),e.stopPropagation(),t.showLightbox(this),!1}),this.options.keyboardNav&&e("body").off("keyup").on("keyup",function(n){var i=n.keyCode?n.keyCode:n.which;27===i&&t.destructLightbox(),37===i&&e(".meta-lightbox-prev").trigger("click"),39===i&&e(".meta-lightbox-next").trigger("click")}),this.options.onInit.call(this)},showLightbox:function(t){this.el=t,this.$el=e(this.el);var n,i,r,o,s=this;this.options.beforeShowLightbox.call(this),(n=this.constructLightbox())&&(i=n.find(".meta-lightbox-content"))&&(r=this.$el,e("body").addClass("meta-lightbox-body-effect-"+this.options.effect),this.processContent(i,r),this.$el.data("lightbox-gallery")&&(1===(o=e('[data-lightbox-gallery="'+this.$el.data("lightbox-gallery")+'"]')).length?e(".meta-lightbox-nav").hide():e(".meta-lightbox-nav").show(),e(".meta-lightbox-prev").off("click").on("click",function(t){t.preventDefault();var n=o.index(r);r=o.eq(n-1),e(r).length||(r=o.last()),s.processContent(i,r),s.options.onPrev.call(this,[r])}),e(".meta-lightbox-next").off("click").on("click",function(t){t.preventDefault();var n=o.index(r);r=o.eq(n+1),e(r).length||(r=o.first()),s.processContent(i,r),s.options.onNext.call(this,[r])})),setTimeout(function(){n.addClass("meta-lightbox-open"),s.options.afterShowLightbox.call(this,[n])},1))},processContent:function(i,r){var o,s,a,c,l,u,h=this,d=r.attr("href");i.html("").addClass("meta-lightbox-loading"),this.isHidpi()&&r.data("lightbox-hidpi")&&(d=r.data("lightbox-hidpi")),null!=d.match(/\.(jpeg|jpg|gif|png)$/i)?((o=e("<img>",{src:d})).on("load",function(){var n=e('<div class="meta-lightbox-image"></div>'),r=e(".meta-lightbox-content"),s=e('<span class="meta-lightbox-zoom-wrapper"></span>');s.append(o),n.append(s),n.css({"line-height":r.height()+"px",height:r.height()+"px"}),e(t).resize(function(){n.css({"line-height":r.height()+"px",height:r.height()+"px"})}),void 0!==s.zoom&&s.zoom(),i.html(n).removeClass("meta-lightbox-loading"),h.contentLoaded()}),o.on("error",function(){var t=e('<div class="meta-lightbox-error"><p>'+h.options.errorMessage+"</p></div>");i.html(t).removeClass("meta-lightbox-loading"),h.contentLoaded()}),r.data("title")?h.setTitle(r.data("title")):r.attr("title")?h.setTitle(r.attr("title")):e(".meta-lightbox-title-wrap").html(""),"function"==typeof ga&&ga("send","event","meta","Image Click",d)):(s=d.match(/(youtube|youtube-nocookie|youtu|vimeo)\.(com|be)\/(watch\?v=([\w-]+)|([\w-]+))/))?(a="",c="meta-lightbox-video","youtube"==s[1]&&(a="//www.youtube.com/embed/"+s[4],c="meta-lightbox-youtube"),"youtu"==s[1]&&(a="//www.youtube.com/embed/"+s[3],c="meta-lightbox-youtube"),"youtube-nocookie"==s[1]&&(a="//www.youtube-nocookie.com/embed/"+s[4],c="nivo-lightbox-youtube"),"vimeo"==s[1]&&(a="//player.vimeo.com/video/"+s[3],c="meta-lightbox-vimeo"),a&&(l=e("<iframe>",{src:a,class:c,frameborder:0,vspace:0,hspace:0,scrolling:"auto"}),i.html(l),l.on("load",function(){i.removeClass("meta-lightbox-loading"),h.contentLoaded()})),r.data("title")?h.setTitle(r.data("title")):r.attr("title")?h.setTitle(r.attr("title")):e(".meta-lightbox-title-wrap").html(""),"function"==typeof ga&&ga("send","event","meta","Video Click",s)):"#"==d.substring(0,1)?(e(d).length?((u=e('<div class="meta-lightbox-inline" />')).append(e(d).clone().show()),u.outerHeight()<i.height()&&u.css({position:"relative",top:"50%","margin-top":-u.outerHeight()/2+"px"}),e(t).resize(function(){u.outerHeight()<i.height()&&u.css({position:"relative",top:"50%","margin-top":-u.outerHeight()/2+"px"})}),i.html(u).removeClass("meta-lightbox-loading"),h.contentLoaded()):(u=e('<div class="meta-lightbox-error"><p>'+h.options.errorMessage+"</p></div>"),i.html(u).removeClass("meta-lightbox-loading"),h.contentLoaded()),e(".meta-lightbox-title-wrap").html(""),"function"==typeof ga&&ga("send","event","meta","inline HTML click",d)):e.ajax({sync:!1,async:!0,url:d,dataType:"html",method:"GET",cache:!1,statusCode:{404:function(){console.log("page not found"),t.location.href=url},302:function(){console.log("redirect 302"),t.location.href=url}},error:function(t){console.log("AJAX request failure."+t.statusText);var n=e('<div class="meta-lightbox-error"><p>'+h.options.errorMessage+"</p></div>");i.html(n).removeClass("meta-lightbox-loading"),h.contentLoaded(),"function"==typeof ga&&ga("send","event","error","AJAX ERROR",t.statusText)},success:function(r,o,s){try{if("object"==typeof(r=e.parseJSON(r))){if("object"==typeof r.regions&&"undefinded"!=typeof r.regions.LayoutAjax)(l=e('<div class="meta-lightbox-ajax" />')).html(r.regions.LayoutAjax),i.html(l).removeClass("meta-lightbox-loading");var a=s.getResponseHeader("X-Title"),c=s.getResponseHeader("X-Link");a&&a.length&&c&&c.length&&c!==t.location.href&&c.substring(0,c.indexOf("#"))!==t.location.href.replace(e("base").attr("href"),"/")&&(e(".meta-lightbox-ajax").data("curr-title",n.title),e(".meta-lightbox-ajax").data("curr-link",t.location.href),void 0!==t.localStorage&&"/"!==c&&t.localStorage.setItem("current-page",c),n.URL!==c&&n.URL!==e("base").attr("href")+c&&n.URL!==e("base").attr("href")+"/"+c&&t.history.pushState({title:a,page:c,ajax:"true"},a,c),e(".meta-lightbox-title-wrap").html(""),"function"==typeof ga&&(ga("set",{page:c.replace(e("base").attr("href"),""),title:a}),ga("send","pageview")))}}catch(t){var l;(l=e('<div class="meta-lightbox-ajax" />')).append(r),i.html(l).removeClass("meta-lightbox-loading")}l.outerHeight()<i.height()&&l.css({position:"relative",top:"50%","margin-top":-l.outerHeight()/2+"px"}),e(t).resize(function(){l.outerHeight()<i.height()&&l.css({position:"relative",top:"50%","margin-top":-l.outerHeight()/2+"px"})}),setTimeout(function(){e(t).resize(),t.imagesLoaded().then(function(){e(t).resize()})},500),h.contentLoaded()}})},setTitle:function(t){var n=e("<div>",{class:"meta-lightbox-title"});n.text(t),e(".meta-lightbox-title-wrap").html(n)},contentLoaded:function(){setTimeout(function(){e(t).trigger("meta-lightbox-loaded")},1),setTimeout(function(){e("body").addClass("meta-lightbox-body-effect-fade")},600)},constructLightbox:function(){var t=this,n=e("<div>",{class:"meta-lightbox-overlay meta-lightbox-theme-"+this.options.theme+" meta-lightbox-effect-"+this.options.effect}),i=e("<div>",{class:"meta-lightbox-wrap"}),r=e("<div>",{class:"meta-lightbox-content"}),o=e('<a href="#" class="meta-lightbox-nav meta-lightbox-prev"><i class="fa fa-chevron-left"></i> <span class="sr-only">Previous</span></a><a href="#" class="meta-lightbox-nav meta-lightbox-next"><i class="fa fa-chevron-right"></i> <span class="sr-only">Next</span></a>'),s=e('<a href="#" class="meta-lightbox-close fa fa-times" title="Close"><span class="sr-only">Close</span></a>'),a=e("<div>",{class:"meta-lightbox-title-wrap"}),c=e(".meta-lightbox-overlay");return c.length?c:(/*@cc_on!@*/i.append(r),i.append(a),n.append(i),n.append(o),n.append(s),e("body").append(n),t.options.clickOverlayToClose&&n.on("click",function(n){(n.target===this||e(n.target).hasClass("meta-lightbox-content")||e(n.target).hasClass("meta-lightbox-image"))&&t.destructLightbox()}),s.on("click",function(e){e.preventDefault(),t.destructLightbox()}),n)},destructLightbox:function(){var i=e(".meta-lightbox-overlay");this.options.beforeHideLightbox.call(this);var r=e(".meta-lightbox-ajax").data("curr-title"),o=e(".meta-lightbox-ajax").data("curr-link");r&&o&&(void 0!==t.localStorage&&"/"!==o&&t.localStorage.setItem("current-page",o),n.URL!==o&&n.URL!==e("base").attr("href")+o&&n.URL!==e("base").attr("href")+"/"+o&&t.history.replaceState({title:r,page:o,ajax:"true"},r,o)),i.removeClass("meta-lightbox-open"),e(".meta-lightbox-nav").hide(),e("body").removeClass("meta-lightbox-body-effect-"+this.options.effect),e(".meta-lightbox-content .meta-lightbox-zoom-wrapper").trigger("zoom.destroy"),e(".meta-lightbox-prev").off("click"),e(".meta-lightbox-next").off("click"),e(".meta-lightbox-content").empty(),e("body").removeClass("meta-lightbox-body-effect-fade"),this.options.afterHideLightbox.call(this)},isHidpi:function(){return t.devicePixelRatio>1||t.matchMedia&&t.matchMedia("(-webkit-min-device-pixel-ratio: 1.5),\t\t\t\t\t(min--moz-device-pixel-ratio: 1.5),\t\t\t\t\t(-o-min-device-pixel-ratio: 3/2),\t\t\t\t\t(min-resolution: 1.5dppx)").matches}},e.fn[i]=function(t){return this.each(function(){e.data(this,i)||e.data(this,i,new o(this,t))})},e(n).metaLightbox()}(jQuery,this,document)},"./node_modules/node-libs-browser/node_modules/process/browser.js":function(e,t){var n,i,r=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(e){if(n===setTimeout)return setTimeout(e,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(e){n=o}try{i="function"==typeof clearTimeout?clearTimeout:s}catch(e){i=s}}();var c,l=[],u=!1,h=-1;function d(){u&&c&&(u=!1,c.length?l=c.concat(l):h=-1,l.length&&f())}function f(){if(!u){var e=a(d);u=!0;for(var t=l.length;t;){for(c=l,l=[];++h<t;)c&&c[h].run();h=-1,t=l.length}c=null,u=!1,function(e){if(i===clearTimeout)return clearTimeout(e);if((i===s||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(e);try{i(e)}catch(t){try{return i.call(null,e)}catch(t){return i.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function m(){}r.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];l.push(new p(e,t)),1!==l.length||u||a(f)},p.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=m,r.addListener=m,r.once=m,r.off=m,r.removeListener=m,r.removeAllListeners=m,r.emit=m,r.prependListener=m,r.prependOnceListener=m,r.listeners=function(e){return[]},r.binding=function(e){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(e){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},"./node_modules/offcanvas-bootstrap/dist/js/bootstrap.offcanvas.js":function(e,t){(function(){var e=function(e,t){return function(){return e.apply(t,arguments)}};!function(t,n){var i,r,o;r=function(){function n(n){this.element=n,this._clickEvent=e(this._clickEvent,this),this.element=t(this.element),this.nav=this.element.closest(".nav"),this.dropdown=this.element.parent().find(".dropdown-menu"),this.element.on("click",this._clickEvent),this.nav.closest(".navbar-offcanvas").on("click",function(e){return function(){if(e.dropdown.is(".shown"))return e.dropdown.removeClass("shown").closest(".open").removeClass("open")}}(this))}return n.prototype._clickEvent=function(e){return this.dropdown.hasClass("shown")||e.preventDefault(),e.stopPropagation(),t(".dropdown-toggle").not(this.element).closest(".open").removeClass("open").find(".dropdown-menu").removeClass("shown"),this.dropdown.toggleClass("shown"),this.element.parent().toggleClass("open")},n}(),o=function(){function i(n,i,r,o){this.button=n,this.element=i,this.location=r,this.offcanvas=o,this._getFade=e(this._getFade,this),this._getCss=e(this._getCss,this),this._touchEnd=e(this._touchEnd,this),this._touchMove=e(this._touchMove,this),this._touchStart=e(this._touchStart,this),this.endThreshold=130,this.startThreshold=this.element.hasClass("navbar-offcanvas-right")?t("body").outerWidth()-60:20,this.maxStartThreshold=this.element.hasClass("navbar-offcanvas-right")?t("body").outerWidth()-20:60,this.currentX=0,this.fade=!!this.element.hasClass("navbar-offcanvas-fade"),t(document).on("touchstart",this._touchStart),t(document).on("touchmove",this._touchMove),t(document).on("touchend",this._touchEnd)}return i.prototype._touchStart=function(e){if(this.startX=e.originalEvent.touches[0].pageX,this.element.is(".in"))return this.element.height(t(n).outerHeight())},i.prototype._touchMove=function(e){var n;if(t(e.target).parents(".navbar-offcanvas").length>0)return!0;if(this.startX>this.startThreshold&&this.startX<this.maxStartThreshold){if(e.preventDefault(),n=e.originalEvent.touches[0].pageX-this.startX,n=this.element.hasClass("navbar-offcanvas-right")?-n:n,Math.abs(n)<this.element.outerWidth())return this.element.css(this._getCss(n)),this.element.css(this._getFade(n))}else if(this.element.hasClass("in")&&(e.preventDefault(),n=e.originalEvent.touches[0].pageX+(this.currentX-this.startX),n=this.element.hasClass("navbar-offcanvas-right")?-n:n,Math.abs(n)<this.element.outerWidth()))return this.element.css(this._getCss(n)),this.element.css(this._getFade(n))},i.prototype._touchEnd=function(e){var n,i,r;return t(e.target).parents(".navbar-offcanvas").length>0||(i=!1,r=e.originalEvent.changedTouches[0].pageX,Math.abs(r)!==this.startX?(n=this.element.hasClass("navbar-offcanvas-right")?Math.abs(r)>this.endThreshold+50:r<this.endThreshold+50,this.element.hasClass("in")&&n?(this.currentX=0,this.element.removeClass("in").css(this._clearCss()),this.button.removeClass("is-open"),i=!0):Math.abs(r-this.startX)>this.endThreshold&&this.startX>this.startThreshold&&this.startX<this.maxStartThreshold?(this.currentX=this.element.hasClass("navbar-offcanvas-right")?-this.element.outerWidth():this.element.outerWidth(),this.element.toggleClass("in").css(this._clearCss()),this.button.toggleClass("is-open"),i=!0):this.element.css(this._clearCss()),this.offcanvas.bodyOverflow(i)):void 0)},i.prototype._getCss=function(e){return{"-webkit-transform":"translate3d("+(e=this.element.hasClass("navbar-offcanvas-right")?-e:e)+"px, 0px, 0px)","-webkit-transition-duration":"0s","-moz-transform":"translate3d("+e+"px, 0px, 0px)","-moz-transition":"0s","-o-transform":"translate3d("+e+"px, 0px, 0px)","-o-transition":"0s",transform:"translate3d("+e+"px, 0px, 0px)",transition:"0s"}},i.prototype._getFade=function(e){return this.fade?{opacity:e/this.element.outerWidth()}:{}},i.prototype._clearCss=function(){return{"-webkit-transform":"","-webkit-transition-duration":"","-moz-transform":"","-moz-transition":"","-o-transform":"","-o-transition":"",transform:"",transition:"",opacity:""}},i}(),n.Offcanvas=i=function(){function i(n){var i;this.element=n,this.bodyOverflow=e(this.bodyOverflow,this),this._sendEventsAfter=e(this._sendEventsAfter,this),this._sendEventsBefore=e(this._sendEventsBefore,this),this._documentClicked=e(this._documentClicked,this),this._close=e(this._close,this),this._open=e(this._open,this),this._clicked=e(this._clicked,this),this._navbarHeight=e(this._navbarHeight,this),(i=!!this.element.attr("data-target")&&this.element.attr("data-target"))?(this.target=t(i),this.target.length&&!this.target.hasClass("js-offcanvas-done")&&(this.element.addClass("js-offcanvas-has-events"),this.location=this.target.hasClass("navbar-offcanvas-right")?"right":"left",this.target.addClass(this._transformSupported()?"offcanvas-transform js-offcanvas-done":"offcanvas-position js-offcanvas-done"),this.target.data("offcanvas",this),this.element.on("click",this._clicked),this.target.on("transitionend",function(e){return function(){if(e.target.is(":not(.in)"))return e.target.height("")}}(this)),t(document).on("click",this._documentClicked),this.target.hasClass("navbar-offcanvas-touch")&&new o(this.element,this.target,this.location,this),this.target.find(".dropdown-toggle").each(function(){return new r(this)}),this.target.on("offcanvas.toggle",function(e){return function(t){return e._clicked(t)}}(this)),this.target.on("offcanvas.close",function(e){return function(t){return e._close(t)}}(this)),this.target.on("offcanvas.open",function(e){return function(t){return e._open(t)}}(this)))):console.warn("Offcanvas: `data-target` attribute must be present.")}return i.prototype._navbarHeight=function(){if(this.target.is(".in"))return this.target.height(t(n).outerHeight())},i.prototype._clicked=function(e){return e.preventDefault(),this._sendEventsBefore(),t(".navbar-offcanvas").not(this.target).trigger("offcanvas.close"),this.target.toggleClass("in"),this.element.toggleClass("is-open"),this._navbarHeight(),this.bodyOverflow()},i.prototype._open=function(e){if(e.preventDefault(),!this.target.is(".in"))return this._sendEventsBefore(),this.target.addClass("in"),this.element.addClass("is-open"),this._navbarHeight(),this.bodyOverflow()},i.prototype._close=function(e){if(e.preventDefault(),!this.target.is(":not(.in)"))return this._sendEventsBefore(),this.target.removeClass("in"),this.element.removeClass("is-open"),this._navbarHeight(),this.bodyOverflow()},i.prototype._documentClicked=function(e){var n;if(!(n=t(e.target)).hasClass("offcanvas-toggle")&&0===n.parents(".offcanvas-toggle").length&&0===n.parents(".navbar-offcanvas").length&&!n.hasClass("navbar-offcanvas")&&this.target.hasClass("in"))return e.preventDefault(),this._sendEventsBefore(),this.target.removeClass("in"),this.element.removeClass("is-open"),this._navbarHeight(),this.bodyOverflow()},i.prototype._sendEventsBefore=function(){return this.target.hasClass("in")?this.target.trigger("hide.bs.offcanvas"):this.target.trigger("show.bs.offcanvas")},i.prototype._sendEventsAfter=function(){return this.target.hasClass("in")?this.target.trigger("shown.bs.offcanvas"):this.target.trigger("hidden.bs.offcanvas")},i.prototype.bodyOverflow=function(e){if(null==e&&(e=!0),this.target.is(".in")?t("body").addClass("offcanvas-stop-scrolling"):t("body").removeClass("offcanvas-stop-scrolling"),e)return this._sendEventsAfter()},i.prototype._transformSupported=function(){var e,t,n;return n="translate3d(0px, 0px, 0px)",t=/translate3d\(0px, 0px, 0px\)/g,(e=document.createElement("div")).style.cssText="-webkit-transform: "+n+"; -moz-transform: "+n+"; -o-transform: "+n+"; transform: "+n,null!=e.style.cssText.match(t).length},i}(),t.fn.bsOffcanvas=function(){return this.each(function(){return new i(t(this))})},t(function(){return t('[data-toggle="offcanvas"]').each(function(){return t(this).bsOffcanvas()}),t(n).on("resize",function(){return t(".navbar-offcanvas.in").each(function(){return t(this).height("").removeClass("in")}),t(".offcanvas-toggle").removeClass("is-open"),t("body").removeClass("offcanvas-stop-scrolling")}),t(".offcanvas-toggle").each(function(){return t(this).on("click",function(e){var n,i;if(!t(this).hasClass("js-offcanvas-has-events")&&(i=t(this).attr("data-target"),n=t(i)))return n.height(""),n.removeClass("in"),t("body").css({overflow:"",position:""})})})})}(window.jQuery,window)}).call(this)},"./node_modules/path-browserify/index.js":function(e,t,n){(function(e){function n(e,t){for(var n=0,i=e.length-1;i>=0;i--){var r=e[i];"."===r?e.splice(i,1):".."===r?(e.splice(i,1),n++):n&&(e.splice(i,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}var i=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,r=function(e){return i.exec(e).slice(1)};function o(e,t){if(e.filter)return e.filter(t);for(var n=[],i=0;i<e.length;i++)t(e[i],i,e)&&n.push(e[i]);return n}t.resolve=function(){for(var t="",i=!1,r=arguments.length-1;r>=-1&&!i;r--){var s=r>=0?arguments[r]:e.cwd();if("string"!=typeof s)throw new TypeError("Arguments to path.resolve must be strings");s&&(t=s+"/"+t,i="/"===s.charAt(0))}return t=n(o(t.split("/"),function(e){return!!e}),!i).join("/"),(i?"/":"")+t||"."},t.normalize=function(e){var i=t.isAbsolute(e),r="/"===s(e,-1);return(e=n(o(e.split("/"),function(e){return!!e}),!i).join("/"))||i||(e="."),e&&r&&(e+="/"),(i?"/":"")+e},t.isAbsolute=function(e){return"/"===e.charAt(0)},t.join=function(){var e=Array.prototype.slice.call(arguments,0);return t.normalize(o(e,function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e}).join("/"))},t.relative=function(e,n){function i(e){for(var t=0;t<e.length&&""===e[t];t++);for(var n=e.length-1;n>=0&&""===e[n];n--);return t>n?[]:e.slice(t,n-t+1)}e=t.resolve(e).substr(1),n=t.resolve(n).substr(1);for(var r=i(e.split("/")),o=i(n.split("/")),s=Math.min(r.length,o.length),a=s,c=0;c<s;c++)if(r[c]!==o[c]){a=c;break}var l=[];for(c=a;c<r.length;c++)l.push("..");return(l=l.concat(o.slice(a))).join("/")},t.sep="/",t.delimiter=":",t.dirname=function(e){var t=r(e),n=t[0],i=t[1];return n||i?(i&&(i=i.substr(0,i.length-1)),n+i):"."},t.basename=function(e,t){var n=r(e)[2];return t&&n.substr(-1*t.length)===t&&(n=n.substr(0,n.length-t.length)),n},t.extname=function(e){return r(e)[3]};var s="b"==="ab".substr(-1)?function(e,t,n){return e.substr(t,n)}:function(e,t,n){return t<0&&(t=e.length+t),e.substr(t,n)}}).call(this,n("./node_modules/node-libs-browser/node_modules/process/browser.js"))},"./node_modules/popper.js/dist/esm/popper.js":function(e,t,n){"use strict";n.r(t),function(e){for(
|
||
/**!
|
||
* @fileOverview Kickass library to create and place poppers near their reference elements.
|
||
* @version 1.15.0
|
||
* @license
|
||
* Copyright (c) 2016 Federico Zivolo and contributors
|
||
*
|
||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||
* of this software and associated documentation files (the "Software"), to deal
|
||
* in the Software without restriction, including without limitation the rights
|
||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||
* copies of the Software, and to permit persons to whom the Software is
|
||
* furnished to do so, subject to the following conditions:
|
||
*
|
||
* The above copyright notice and this permission notice shall be included in all
|
||
* copies or substantial portions of the Software.
|
||
*
|
||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||
* SOFTWARE.
|
||
*/
|
||
var n="undefined"!=typeof window&&"undefined"!=typeof document,i=["Edge","Trident","Firefox"],r=0,o=0;o<i.length;o+=1)if(n&&navigator.userAgent.indexOf(i[o])>=0){r=1;break}var s=n&&window.Promise?function(e){var t=!1;return function(){t||(t=!0,window.Promise.resolve().then(function(){t=!1,e()}))}}:function(e){var t=!1;return function(){t||(t=!0,setTimeout(function(){t=!1,e()},r))}};function a(e){return e&&"[object Function]"==={}.toString.call(e)}function c(e,t){if(1!==e.nodeType)return[];var n=e.ownerDocument.defaultView.getComputedStyle(e,null);return t?n[t]:n}function l(e){return"HTML"===e.nodeName?e:e.parentNode||e.host}function u(e){if(!e)return document.body;switch(e.nodeName){case"HTML":case"BODY":return e.ownerDocument.body;case"#document":return e.body}var t=c(e),n=t.overflow,i=t.overflowX,r=t.overflowY;return/(auto|scroll|overlay)/.test(n+r+i)?e:u(l(e))}var h=n&&!(!window.MSInputMethodContext||!document.documentMode),d=n&&/MSIE 10/.test(navigator.userAgent);function f(e){return 11===e?h:10===e?d:h||d}function p(e){if(!e)return document.documentElement;for(var t=f(10)?document.body:null,n=e.offsetParent||null;n===t&&e.nextElementSibling;)n=(e=e.nextElementSibling).offsetParent;var i=n&&n.nodeName;return i&&"BODY"!==i&&"HTML"!==i?-1!==["TH","TD","TABLE"].indexOf(n.nodeName)&&"static"===c(n,"position")?p(n):n:e?e.ownerDocument.documentElement:document.documentElement}function m(e){return null!==e.parentNode?m(e.parentNode):e}function v(e,t){if(!(e&&e.nodeType&&t&&t.nodeType))return document.documentElement;var n=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,i=n?e:t,r=n?t:e,o=document.createRange();o.setStart(i,0),o.setEnd(r,0);var s=o.commonAncestorContainer;if(e!==s&&t!==s||i.contains(r))return function(e){var t=e.nodeName;return"BODY"!==t&&("HTML"===t||p(e.firstElementChild)===e)}(s)?s:p(s);var a=m(e);return a.host?v(a.host,t):v(e,m(t).host)}function g(e){var t="top"===(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top")?"scrollTop":"scrollLeft",n=e.nodeName;if("BODY"===n||"HTML"===n){var i=e.ownerDocument.documentElement;return(e.ownerDocument.scrollingElement||i)[t]}return e[t]}function y(e,t){var n="x"===t?"Left":"Top",i="Left"===n?"Right":"Bottom";return parseFloat(e["border"+n+"Width"],10)+parseFloat(e["border"+i+"Width"],10)}function b(e,t,n,i){return Math.max(t["offset"+e],t["scroll"+e],n["client"+e],n["offset"+e],n["scroll"+e],f(10)?parseInt(n["offset"+e])+parseInt(i["margin"+("Height"===e?"Top":"Left")])+parseInt(i["margin"+("Height"===e?"Bottom":"Right")]):0)}function _(e){var t=e.body,n=e.documentElement,i=f(10)&&getComputedStyle(n);return{height:b("Height",t,n,i),width:b("Width",t,n,i)}}var w=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},k=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),E=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},C=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 S(e){return C({},e,{right:e.left+e.width,bottom:e.top+e.height})}function x(e){var t={};try{if(f(10)){t=e.getBoundingClientRect();var n=g(e,"top"),i=g(e,"left");t.top+=n,t.left+=i,t.bottom+=n,t.right+=i}else t=e.getBoundingClientRect()}catch(e){}var r={left:t.left,top:t.top,width:t.right-t.left,height:t.bottom-t.top},o="HTML"===e.nodeName?_(e.ownerDocument):{},s=o.width||e.clientWidth||r.right-r.left,a=o.height||e.clientHeight||r.bottom-r.top,l=e.offsetWidth-s,u=e.offsetHeight-a;if(l||u){var h=c(e);l-=y(h,"x"),u-=y(h,"y"),r.width-=l,r.height-=u}return S(r)}function T(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=f(10),r="HTML"===t.nodeName,o=x(e),s=x(t),a=u(e),l=c(t),h=parseFloat(l.borderTopWidth,10),d=parseFloat(l.borderLeftWidth,10);n&&r&&(s.top=Math.max(s.top,0),s.left=Math.max(s.left,0));var p=S({top:o.top-s.top-h,left:o.left-s.left-d,width:o.width,height:o.height});if(p.marginTop=0,p.marginLeft=0,!i&&r){var m=parseFloat(l.marginTop,10),v=parseFloat(l.marginLeft,10);p.top-=h-m,p.bottom-=h-m,p.left-=d-v,p.right-=d-v,p.marginTop=m,p.marginLeft=v}return(i&&!n?t.contains(a):t===a&&"BODY"!==a.nodeName)&&(p=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=g(t,"top"),r=g(t,"left"),o=n?-1:1;return e.top+=i*o,e.bottom+=i*o,e.left+=r*o,e.right+=r*o,e}(p,t)),p}function O(e){if(!e||!e.parentElement||f())return document.documentElement;for(var t=e.parentElement;t&&"none"===c(t,"transform");)t=t.parentElement;return t||document.documentElement}function A(e,t,n,i){var r=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o={top:0,left:0},s=r?O(e):v(e,t);if("viewport"===i)o=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.ownerDocument.documentElement,i=T(e,n),r=Math.max(n.clientWidth,window.innerWidth||0),o=Math.max(n.clientHeight,window.innerHeight||0),s=t?0:g(n),a=t?0:g(n,"left");return S({top:s-i.top+i.marginTop,left:a-i.left+i.marginLeft,width:r,height:o})}(s,r);else{var a=void 0;"scrollParent"===i?"BODY"===(a=u(l(t))).nodeName&&(a=e.ownerDocument.documentElement):a="window"===i?e.ownerDocument.documentElement:i;var h=T(a,s,r);if("HTML"!==a.nodeName||function e(t){var n=t.nodeName;if("BODY"===n||"HTML"===n)return!1;if("fixed"===c(t,"position"))return!0;var i=l(t);return!!i&&e(i)}(s))o=h;else{var d=_(e.ownerDocument),f=d.height,p=d.width;o.top+=h.top-h.marginTop,o.bottom=f+h.top,o.left+=h.left-h.marginLeft,o.right=p+h.left}}var m="number"==typeof(n=n||0);return o.left+=m?n:n.left||0,o.top+=m?n:n.top||0,o.right-=m?n:n.right||0,o.bottom-=m?n:n.bottom||0,o}function D(e,t,n,i,r){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(-1===e.indexOf("auto"))return e;var s=A(n,i,o,r),a={top:{width:s.width,height:t.top-s.top},right:{width:s.right-t.right,height:s.height},bottom:{width:s.width,height:s.bottom-t.bottom},left:{width:t.left-s.left,height:s.height}},c=Object.keys(a).map(function(e){return C({key:e},a[e],{area:function(e){return e.width*e.height}(a[e])})}).sort(function(e,t){return t.area-e.area}),l=c.filter(function(e){var t=e.width,i=e.height;return t>=n.clientWidth&&i>=n.clientHeight}),u=l.length>0?l[0].key:c[0].key,h=e.split("-")[1];return u+(h?"-"+h:"")}function I(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return T(n,i?O(t):v(t,n),i)}function j(e){var t=e.ownerDocument.defaultView.getComputedStyle(e),n=parseFloat(t.marginTop||0)+parseFloat(t.marginBottom||0),i=parseFloat(t.marginLeft||0)+parseFloat(t.marginRight||0);return{width:e.offsetWidth+i,height:e.offsetHeight+n}}function N(e){var t={left:"right",right:"left",bottom:"top",top:"bottom"};return e.replace(/left|right|bottom|top/g,function(e){return t[e]})}function P(e,t,n){n=n.split("-")[0];var i=j(e),r={width:i.width,height:i.height},o=-1!==["right","left"].indexOf(n),s=o?"top":"left",a=o?"left":"top",c=o?"height":"width",l=o?"width":"height";return r[s]=t[s]+t[c]/2-i[c]/2,r[a]=n===a?t[a]-i[l]:t[N(a)],r}function L(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function M(e,t,n){return(void 0===n?e:e.slice(0,function(e,t,n){if(Array.prototype.findIndex)return e.findIndex(function(e){return e[t]===n});var i=L(e,function(e){return e[t]===n});return e.indexOf(i)}(e,"name",n))).forEach(function(e){e.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var n=e.function||e.fn;e.enabled&&a(n)&&(t.offsets.popper=S(t.offsets.popper),t.offsets.reference=S(t.offsets.reference),t=n(t,e))}),t}function R(e,t){return e.some(function(e){var n=e.name;return e.enabled&&n===t})}function F(e){for(var t=[!1,"ms","Webkit","Moz","O"],n=e.charAt(0).toUpperCase()+e.slice(1),i=0;i<t.length;i++){var r=t[i],o=r?""+r+n:e;if(void 0!==document.body.style[o])return o}return null}function q(e){var t=e.ownerDocument;return t?t.defaultView:window}function U(e,t,n,i){n.updateBound=i,q(e).addEventListener("resize",n.updateBound,{passive:!0});var r=u(e);return function e(t,n,i,r){var o="BODY"===t.nodeName,s=o?t.ownerDocument.defaultView:t;s.addEventListener(n,i,{passive:!0}),o||e(u(s.parentNode),n,i,r),r.push(s)}(r,"scroll",n.updateBound,n.scrollParents),n.scrollElement=r,n.eventsEnabled=!0,n}function $(){this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=function(e,t){return q(e).removeEventListener("resize",t.updateBound),t.scrollParents.forEach(function(e){e.removeEventListener("scroll",t.updateBound)}),t.updateBound=null,t.scrollParents=[],t.scrollElement=null,t.eventsEnabled=!1,t}(this.reference,this.state))}function H(e){return""!==e&&!isNaN(parseFloat(e))&&isFinite(e)}function W(e,t){Object.keys(t).forEach(function(n){var i="";-1!==["width","height","top","right","bottom","left"].indexOf(n)&&H(t[n])&&(i="px"),e.style[n]=t[n]+i})}var B=n&&/Firefox/i.test(navigator.userAgent);function z(e,t,n){var i=L(e,function(e){return e.name===t}),r=!!i&&e.some(function(e){return e.name===n&&e.enabled&&e.order<i.order});if(!r){var o="`"+t+"`",s="`"+n+"`";console.warn(s+" modifier is required by "+o+" modifier in order to work, be sure to include it before "+o+"!")}return r}var V=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],G=V.slice(3);function K(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=G.indexOf(e),i=G.slice(n+1).concat(G.slice(0,n));return t?i.reverse():i}var Y={FLIP:"flip",CLOCKWISE:"clockwise",COUNTERCLOCKWISE:"counterclockwise"};function Q(e,t,n,i){var r=[0,0],o=-1!==["right","left"].indexOf(i),s=e.split(/(\+|\-)/).map(function(e){return e.trim()}),a=s.indexOf(L(s,function(e){return-1!==e.search(/,|\s/)}));s[a]&&-1===s[a].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var c=/\s*,\s*|\s+/,l=-1!==a?[s.slice(0,a).concat([s[a].split(c)[0]]),[s[a].split(c)[1]].concat(s.slice(a+1))]:[s];return(l=l.map(function(e,i){var r=(1===i?!o:o)?"height":"width",s=!1;return e.reduce(function(e,t){return""===e[e.length-1]&&-1!==["+","-"].indexOf(t)?(e[e.length-1]=t,s=!0,e):s?(e[e.length-1]+=t,s=!1,e):e.concat(t)},[]).map(function(e){return function(e,t,n,i){var r=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),o=+r[1],s=r[2];if(!o)return e;if(0===s.indexOf("%")){var a=void 0;switch(s){case"%p":a=n;break;case"%":case"%r":default:a=i}return S(a)[t]/100*o}if("vh"===s||"vw"===s)return("vh"===s?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*o;return o}(e,r,t,n)})})).forEach(function(e,t){e.forEach(function(n,i){H(n)&&(r[t]+=n*("-"===e[i-1]?-1:1))})}),r}var X={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:{shift:{order:100,enabled:!0,fn:function(e){var t=e.placement,n=t.split("-")[0],i=t.split("-")[1];if(i){var r=e.offsets,o=r.reference,s=r.popper,a=-1!==["bottom","top"].indexOf(n),c=a?"left":"top",l=a?"width":"height",u={start:E({},c,o[c]),end:E({},c,o[c]+o[l]-s[l])};e.offsets.popper=C({},s,u[i])}return e}},offset:{order:200,enabled:!0,fn:function(e,t){var n=t.offset,i=e.placement,r=e.offsets,o=r.popper,s=r.reference,a=i.split("-")[0],c=void 0;return c=H(+n)?[+n,0]:Q(n,o,s,a),"left"===a?(o.top+=c[0],o.left-=c[1]):"right"===a?(o.top+=c[0],o.left+=c[1]):"top"===a?(o.left+=c[0],o.top-=c[1]):"bottom"===a&&(o.left+=c[0],o.top+=c[1]),e.popper=o,e},offset:0},preventOverflow:{order:300,enabled:!0,fn:function(e,t){var n=t.boundariesElement||p(e.instance.popper);e.instance.reference===n&&(n=p(n));var i=F("transform"),r=e.instance.popper.style,o=r.top,s=r.left,a=r[i];r.top="",r.left="",r[i]="";var c=A(e.instance.popper,e.instance.reference,t.padding,n,e.positionFixed);r.top=o,r.left=s,r[i]=a,t.boundaries=c;var l=t.priority,u=e.offsets.popper,h={primary:function(e){var n=u[e];return u[e]<c[e]&&!t.escapeWithReference&&(n=Math.max(u[e],c[e])),E({},e,n)},secondary:function(e){var n="right"===e?"left":"top",i=u[n];return u[e]>c[e]&&!t.escapeWithReference&&(i=Math.min(u[n],c[e]-("right"===e?u.width:u.height))),E({},n,i)}};return l.forEach(function(e){var t=-1!==["left","top"].indexOf(e)?"primary":"secondary";u=C({},u,h[t](e))}),e.offsets.popper=u,e},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(e){var t=e.offsets,n=t.popper,i=t.reference,r=e.placement.split("-")[0],o=Math.floor,s=-1!==["top","bottom"].indexOf(r),a=s?"right":"bottom",c=s?"left":"top",l=s?"width":"height";return n[a]<o(i[c])&&(e.offsets.popper[c]=o(i[c])-n[l]),n[c]>o(i[a])&&(e.offsets.popper[c]=o(i[a])),e}},arrow:{order:500,enabled:!0,fn:function(e,t){var n;if(!z(e.instance.modifiers,"arrow","keepTogether"))return e;var i=t.element;if("string"==typeof i){if(!(i=e.instance.popper.querySelector(i)))return e}else if(!e.instance.popper.contains(i))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),e;var r=e.placement.split("-")[0],o=e.offsets,s=o.popper,a=o.reference,l=-1!==["left","right"].indexOf(r),u=l?"height":"width",h=l?"Top":"Left",d=h.toLowerCase(),f=l?"left":"top",p=l?"bottom":"right",m=j(i)[u];a[p]-m<s[d]&&(e.offsets.popper[d]-=s[d]-(a[p]-m)),a[d]+m>s[p]&&(e.offsets.popper[d]+=a[d]+m-s[p]),e.offsets.popper=S(e.offsets.popper);var v=a[d]+a[u]/2-m/2,g=c(e.instance.popper),y=parseFloat(g["margin"+h],10),b=parseFloat(g["border"+h+"Width"],10),_=v-e.offsets.popper[d]-y-b;return _=Math.max(Math.min(s[u]-m,_),0),e.arrowElement=i,e.offsets.arrow=(E(n={},d,Math.round(_)),E(n,f,""),n),e},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(e,t){if(R(e.instance.modifiers,"inner"))return e;if(e.flipped&&e.placement===e.originalPlacement)return e;var n=A(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement,e.positionFixed),i=e.placement.split("-")[0],r=N(i),o=e.placement.split("-")[1]||"",s=[];switch(t.behavior){case Y.FLIP:s=[i,r];break;case Y.CLOCKWISE:s=K(i);break;case Y.COUNTERCLOCKWISE:s=K(i,!0);break;default:s=t.behavior}return s.forEach(function(a,c){if(i!==a||s.length===c+1)return e;i=e.placement.split("-")[0],r=N(i);var l=e.offsets.popper,u=e.offsets.reference,h=Math.floor,d="left"===i&&h(l.right)>h(u.left)||"right"===i&&h(l.left)<h(u.right)||"top"===i&&h(l.bottom)>h(u.top)||"bottom"===i&&h(l.top)<h(u.bottom),f=h(l.left)<h(n.left),p=h(l.right)>h(n.right),m=h(l.top)<h(n.top),v=h(l.bottom)>h(n.bottom),g="left"===i&&f||"right"===i&&p||"top"===i&&m||"bottom"===i&&v,y=-1!==["top","bottom"].indexOf(i),b=!!t.flipVariations&&(y&&"start"===o&&f||y&&"end"===o&&p||!y&&"start"===o&&m||!y&&"end"===o&&v),_=!!t.flipVariationsByContent&&(y&&"start"===o&&p||y&&"end"===o&&f||!y&&"start"===o&&v||!y&&"end"===o&&m),w=b||_;(d||g||w)&&(e.flipped=!0,(d||g)&&(i=s[c+1]),w&&(o=function(e){return"end"===e?"start":"start"===e?"end":e}(o)),e.placement=i+(o?"-"+o:""),e.offsets.popper=C({},e.offsets.popper,P(e.instance.popper,e.offsets.reference,e.placement)),e=M(e.instance.modifiers,e,"flip"))}),e},behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:function(e){var t=e.placement,n=t.split("-")[0],i=e.offsets,r=i.popper,o=i.reference,s=-1!==["left","right"].indexOf(n),a=-1===["top","left"].indexOf(n);return r[s?"left":"top"]=o[n]-(a?r[s?"width":"height"]:0),e.placement=N(t),e.offsets.popper=S(r),e}},hide:{order:800,enabled:!0,fn:function(e){if(!z(e.instance.modifiers,"hide","preventOverflow"))return e;var t=e.offsets.reference,n=L(e.instance.modifiers,function(e){return"preventOverflow"===e.name}).boundaries;if(t.bottom<n.top||t.left>n.right||t.top>n.bottom||t.right<n.left){if(!0===e.hide)return e;e.hide=!0,e.attributes["x-out-of-boundaries"]=""}else{if(!1===e.hide)return e;e.hide=!1,e.attributes["x-out-of-boundaries"]=!1}return e}},computeStyle:{order:850,enabled:!0,fn:function(e,t){var n=t.x,i=t.y,r=e.offsets.popper,o=L(e.instance.modifiers,function(e){return"applyStyle"===e.name}).gpuAcceleration;void 0!==o&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!");var s=void 0!==o?o:t.gpuAcceleration,a=p(e.instance.popper),c=x(a),l={position:r.position},u=function(e,t){var n=e.offsets,i=n.popper,r=n.reference,o=Math.round,s=Math.floor,a=function(e){return e},c=o(r.width),l=o(i.width),u=-1!==["left","right"].indexOf(e.placement),h=-1!==e.placement.indexOf("-"),d=t?u||h||c%2==l%2?o:s:a,f=t?o:a;return{left:d(c%2==1&&l%2==1&&!h&&t?i.left-1:i.left),top:f(i.top),bottom:f(i.bottom),right:d(i.right)}}(e,window.devicePixelRatio<2||!B),h="bottom"===n?"top":"bottom",d="right"===i?"left":"right",f=F("transform"),m=void 0,v=void 0;if(v="bottom"===h?"HTML"===a.nodeName?-a.clientHeight+u.bottom:-c.height+u.bottom:u.top,m="right"===d?"HTML"===a.nodeName?-a.clientWidth+u.right:-c.width+u.right:u.left,s&&f)l[f]="translate3d("+m+"px, "+v+"px, 0)",l[h]=0,l[d]=0,l.willChange="transform";else{var g="bottom"===h?-1:1,y="right"===d?-1:1;l[h]=v*g,l[d]=m*y,l.willChange=h+", "+d}var b={"x-placement":e.placement};return e.attributes=C({},b,e.attributes),e.styles=C({},l,e.styles),e.arrowStyles=C({},e.offsets.arrow,e.arrowStyles),e},gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:function(e){return W(e.instance.popper,e.styles),function(e,t){Object.keys(t).forEach(function(n){!1!==t[n]?e.setAttribute(n,t[n]):e.removeAttribute(n)})}(e.instance.popper,e.attributes),e.arrowElement&&Object.keys(e.arrowStyles).length&&W(e.arrowElement,e.arrowStyles),e},onLoad:function(e,t,n,i,r){var o=I(r,t,e,n.positionFixed),s=D(n.placement,o,t,e,n.modifiers.flip.boundariesElement,n.modifiers.flip.padding);return t.setAttribute("x-placement",s),W(t,{position:n.positionFixed?"fixed":"absolute"}),n},gpuAcceleration:void 0}}},J=function(){function e(t,n){var i=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};w(this,e),this.scheduleUpdate=function(){return requestAnimationFrame(i.update)},this.update=s(this.update.bind(this)),this.options=C({},e.Defaults,r),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=t&&t.jquery?t[0]:t,this.popper=n&&n.jquery?n[0]:n,this.options.modifiers={},Object.keys(C({},e.Defaults.modifiers,r.modifiers)).forEach(function(t){i.options.modifiers[t]=C({},e.Defaults.modifiers[t]||{},r.modifiers?r.modifiers[t]:{})}),this.modifiers=Object.keys(this.options.modifiers).map(function(e){return C({name:e},i.options.modifiers[e])}).sort(function(e,t){return e.order-t.order}),this.modifiers.forEach(function(e){e.enabled&&a(e.onLoad)&&e.onLoad(i.reference,i.popper,i.options,e,i.state)}),this.update();var o=this.options.eventsEnabled;o&&this.enableEventListeners(),this.state.eventsEnabled=o}return k(e,[{key:"update",value:function(){return function(){if(!this.state.isDestroyed){var e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=I(this.state,this.popper,this.reference,this.options.positionFixed),e.placement=D(this.options.placement,e.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),e.originalPlacement=e.placement,e.positionFixed=this.options.positionFixed,e.offsets.popper=P(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",e=M(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}.call(this)}},{key:"destroy",value:function(){return function(){return this.state.isDestroyed=!0,R(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.position="",this.popper.style.top="",this.popper.style.left="",this.popper.style.right="",this.popper.style.bottom="",this.popper.style.willChange="",this.popper.style[F("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}.call(this)}},{key:"enableEventListeners",value:function(){return function(){this.state.eventsEnabled||(this.state=U(this.reference,this.options,this.state,this.scheduleUpdate))}.call(this)}},{key:"disableEventListeners",value:function(){return $.call(this)}}]),e}();J.Utils=("undefined"!=typeof window?window:e).PopperUtils,J.placements=V,J.Defaults=X,t.default=J}.call(this,n("./node_modules/webpack/buildin/global.js"))},"./node_modules/pouchdb/dist/pouchdb.js":function(e,t,n){(function(t){var n;e.exports=function e(t,i,r){function o(a,c){if(!i[a]){if(!t[a]){var l="function"==typeof n&&n;if(!c&&l)return n(a,!0);if(s)return s(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var h=i[a]={exports:{}};t[a][0].call(h.exports,function(e){var n=t[a][1][e];return o(n||e)},h,h.exports,e,t,i,r)}return i[a].exports}for(var s="function"==typeof n&&n,a=0;a<r.length;a++)o(r[a]);return o}({1:[function(e,t,n){"use strict";t.exports=function(e){return function(){var t=arguments.length;if(t){for(var n=[],i=-1;++i<t;)n[i]=arguments[i];return e.call(this,n)}return e.call(this,[])}}},{}],2:[function(e,t,n){(function(i){function r(){var e;try{e=n.storage.debug}catch(e){}return!e&&void 0!==i&&"env"in i&&(e=i.env.DEBUG),e}(n=t.exports=e(3)).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},n.formatArgs=function(e){var t=this.useColors;if(e[0]=(t?"%c":"")+this.namespace+(t?" %c":" ")+e[0]+(t?"%c ":" ")+"+"+n.humanize(this.diff),t){var i="color: "+this.color;e.splice(1,0,i,"color: inherit");var r=0,o=0;e[0].replace(/%[a-zA-Z%]/g,function(e){"%%"!==e&&"%c"===e&&(o=++r)}),e.splice(o,0,i)}},n.save=function(e){try{null==e?n.storage.removeItem("debug"):n.storage.debug=e}catch(e){}},n.load=r,n.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},n.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),n.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],n.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},n.enable(r())}).call(this,e(9))},{3:3,9:9}],3:[function(e,t,n){function i(e){var t;function i(){if(i.enabled){var e=i,r=+new Date,o=r-(t||r);e.diff=o,e.prev=t,e.curr=r,t=r;for(var s=new Array(arguments.length),a=0;a<s.length;a++)s[a]=arguments[a];s[0]=n.coerce(s[0]),"string"!=typeof s[0]&&s.unshift("%O");var c=0;s[0]=s[0].replace(/%([a-zA-Z%])/g,function(t,i){if("%%"===t)return t;c++;var r=n.formatters[i];if("function"==typeof r){var o=s[c];t=r.call(e,o),s.splice(c,1),c--}return t}),n.formatArgs.call(e,s);var l=i.log||n.log||console.log.bind(console);l.apply(e,s)}}return i.namespace=e,i.enabled=n.enabled(e),i.useColors=n.useColors(),i.color=function(e){var t,i=0;for(t in e)i=(i<<5)-i+e.charCodeAt(t),i|=0;return n.colors[Math.abs(i)%n.colors.length]}(e),i.destroy=r,"function"==typeof n.init&&n.init(i),n.instances.push(i),i}function r(){var e=n.instances.indexOf(this);return-1!==e&&(n.instances.splice(e,1),!0)}(n=t.exports=i.debug=i.default=i).coerce=function(e){return e instanceof Error?e.stack||e.message:e},n.disable=function(){n.enable("")},n.enable=function(e){var t;n.save(e),n.names=[],n.skips=[];var i=("string"==typeof e?e:"").split(/[\s,]+/),r=i.length;for(t=0;t<r;t++)i[t]&&("-"===(e=i[t].replace(/\*/g,".*?"))[0]?n.skips.push(new RegExp("^"+e.substr(1)+"$")):n.names.push(new RegExp("^"+e+"$")));for(t=0;t<n.instances.length;t++){var o=n.instances[t];o.enabled=n.enabled(o.namespace)}},n.enabled=function(e){if("*"===e[e.length-1])return!0;var t,i;for(t=0,i=n.skips.length;t<i;t++)if(n.skips[t].test(e))return!1;for(t=0,i=n.names.length;t<i;t++)if(n.names[t].test(e))return!0;return!1},n.humanize=e(8),n.instances=[],n.names=[],n.skips=[],n.formatters={}},{8:8}],4:[function(e,t,n){function i(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function r(e){return"function"==typeof e}function o(e){return"object"==typeof e&&null!==e}function s(e){return void 0===e}t.exports=i,i.EventEmitter=i,i.prototype._events=void 0,i.prototype._maxListeners=void 0,i.defaultMaxListeners=10,i.prototype.setMaxListeners=function(e){if(!function(e){return"number"==typeof e}(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},i.prototype.emit=function(e){var t,n,i,a,c,l;if(this._events||(this._events={}),"error"===e&&(!this._events.error||o(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;var u=new Error('Uncaught, unspecified "error" event. ('+t+")");throw u.context=t,u}if(s(n=this._events[e]))return!1;if(r(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:a=Array.prototype.slice.call(arguments,1),n.apply(this,a)}else if(o(n))for(a=Array.prototype.slice.call(arguments,1),l=n.slice(),i=l.length,c=0;c<i;c++)l[c].apply(this,a);return!0},i.prototype.addListener=function(e,t){var n;if(!r(t))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,r(t.listener)?t.listener:t),this._events[e]?o(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,o(this._events[e])&&!this._events[e].warned&&(n=s(this._maxListeners)?i.defaultMaxListeners:this._maxListeners)&&n>0&&this._events[e].length>n&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},i.prototype.on=i.prototype.addListener,i.prototype.once=function(e,t){if(!r(t))throw TypeError("listener must be a function");var n=!1;function i(){this.removeListener(e,i),n||(n=!0,t.apply(this,arguments))}return i.listener=t,this.on(e,i),this},i.prototype.removeListener=function(e,t){var n,i,s,a;if(!r(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(n=this._events[e],s=n.length,i=-1,n===t||r(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(o(n)){for(a=s;a-- >0;)if(n[a]===t||n[a].listener&&n[a].listener===t){i=a;break}if(i<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(i,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},i.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(r(n=this._events[e]))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},i.prototype.listeners=function(e){return this._events&&this._events[e]?r(this._events[e])?[this._events[e]]:this._events[e].slice():[]},i.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(r(t))return 1;if(t)return t.length}return 0},i.listenerCount=function(e,t){return e.listenerCount(t)}},{}],5:[function(e,n,i){(function(e){"use strict";var t,i,r=e.MutationObserver||e.WebKitMutationObserver;if(r){var o=0,s=new r(u),a=e.document.createTextNode("");s.observe(a,{characterData:!0}),t=function(){a.data=o=++o%2}}else if(e.setImmediate||void 0===e.MessageChannel)t="document"in e&&"onreadystatechange"in e.document.createElement("script")?function(){var t=e.document.createElement("script");t.onreadystatechange=function(){u(),t.onreadystatechange=null,t.parentNode.removeChild(t),t=null},e.document.documentElement.appendChild(t)}:function(){setTimeout(u,0)};else{var c=new e.MessageChannel;c.port1.onmessage=u,t=function(){c.port2.postMessage(0)}}var l=[];function u(){var e,t;i=!0;for(var n=l.length;n;){for(t=l,l=[],e=-1;++e<n;)t[e]();n=l.length}i=!1}n.exports=function(e){1!==l.push(e)||i||t()}}).call(this,void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],6:[function(e,t,n){"function"==typeof Object.create?t.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},{}],7:[function(e,t,n){"use strict";var i=e(5);function r(){}var o={},s=["REJECTED"],a=["FULFILLED"],c=["PENDING"];function l(e){if("function"!=typeof e)throw new TypeError("resolver must be a function");this.state=c,this.queue=[],this.outcome=void 0,e!==r&&f(this,e)}function u(e,t,n){this.promise=e,"function"==typeof t&&(this.onFulfilled=t,this.callFulfilled=this.otherCallFulfilled),"function"==typeof n&&(this.onRejected=n,this.callRejected=this.otherCallRejected)}function h(e,t,n){i(function(){var i;try{i=t(n)}catch(t){return o.reject(e,t)}i===e?o.reject(e,new TypeError("Cannot resolve promise with itself")):o.resolve(e,i)})}function d(e){var t=e&&e.then;if(e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof t)return function(){t.apply(e,arguments)}}function f(e,t){var n=!1;function i(t){n||(n=!0,o.reject(e,t))}function r(t){n||(n=!0,o.resolve(e,t))}var s=p(function(){t(r,i)});"error"===s.status&&i(s.value)}function p(e,t){var n={};try{n.value=e(t),n.status="success"}catch(e){n.status="error",n.value=e}return n}t.exports=l,l.prototype.catch=function(e){return this.then(null,e)},l.prototype.then=function(e,t){if("function"!=typeof e&&this.state===a||"function"!=typeof t&&this.state===s)return this;var n=new this.constructor(r);if(this.state!==c){var i=this.state===a?e:t;h(n,i,this.outcome)}else this.queue.push(new u(n,e,t));return n},u.prototype.callFulfilled=function(e){o.resolve(this.promise,e)},u.prototype.otherCallFulfilled=function(e){h(this.promise,this.onFulfilled,e)},u.prototype.callRejected=function(e){o.reject(this.promise,e)},u.prototype.otherCallRejected=function(e){h(this.promise,this.onRejected,e)},o.resolve=function(e,t){var n=p(d,t);if("error"===n.status)return o.reject(e,n.value);var i=n.value;if(i)f(e,i);else{e.state=a,e.outcome=t;for(var r=-1,s=e.queue.length;++r<s;)e.queue[r].callFulfilled(t)}return e},o.reject=function(e,t){e.state=s,e.outcome=t;for(var n=-1,i=e.queue.length;++n<i;)e.queue[n].callRejected(t);return e},l.resolve=function(e){return e instanceof this?e:o.resolve(new this(r),e)},l.reject=function(e){var t=new this(r);return o.reject(t,e)},l.all=function(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var n=e.length,i=!1;if(!n)return this.resolve([]);for(var s=new Array(n),a=0,c=-1,l=new this(r);++c<n;)u(e[c],c);return l;function u(e,r){t.resolve(e).then(function(e){s[r]=e,++a!==n||i||(i=!0,o.resolve(l,s))},function(e){i||(i=!0,o.reject(l,e))})}},l.race=function(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var n=e.length,i=!1;if(!n)return this.resolve([]);for(var s=-1,a=new this(r);++s<n;)c(e[s]);return a;function c(e){t.resolve(e).then(function(e){i||(i=!0,o.resolve(a,e))},function(e){i||(i=!0,o.reject(a,e))})}}},{5:5}],8:[function(e,t,n){var i=1e3,r=60*i,o=60*r,s=24*o,a=365.25*s;function c(e,t,n){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+n:Math.ceil(e/t)+" "+n+"s"}t.exports=function(e,t){t=t||{};var n=typeof e;if("string"===n&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var n=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return n*a;case"days":case"day":case"d":return n*s;case"hours":case"hour":case"hrs":case"hr":case"h":return n*o;case"minutes":case"minute":case"mins":case"min":case"m":return n*r;case"seconds":case"second":case"secs":case"sec":case"s":return n*i;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}(e);if("number"===n&&!1===isNaN(e))return t.long?function(e){return c(e,s,"day")||c(e,o,"hour")||c(e,r,"minute")||c(e,i,"second")||e+" ms"}(e):function(e){return e>=s?Math.round(e/s)+"d":e>=o?Math.round(e/o)+"h":e>=r?Math.round(e/r)+"m":e>=i?Math.round(e/i)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},{}],9:[function(e,t,n){var i,r,o=t.exports={};function s(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function c(e){if(i===setTimeout)return setTimeout(e,0);if((i===s||!i)&&setTimeout)return i=setTimeout,setTimeout(e,0);try{return i(e,0)}catch(t){try{return i.call(null,e,0)}catch(t){return i.call(this,e,0)}}}!function(){try{i="function"==typeof setTimeout?setTimeout:s}catch(e){i=s}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var l,u=[],h=!1,d=-1;function f(){h&&l&&(h=!1,l.length?u=l.concat(u):d=-1,u.length&&p())}function p(){if(!h){var e=c(f);h=!0;for(var t=u.length;t;){for(l=u,u=[];++d<t;)l&&l[d].run();d=-1,t=u.length}l=null,h=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function m(e,t){this.fun=e,this.array=t}function v(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];u.push(new m(e,t)),1!==u.length||h||c(p)},m.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=v,o.addListener=v,o.once=v,o.off=v,o.removeListener=v,o.removeAllListeners=v,o.emit=v,o.prependListener=v,o.prependOnceListener=v,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},{}],10:[function(e,t,n){!function(e){if("object"==typeof n)t.exports=e();else{var i;try{i=window}catch(e){i=self}i.SparkMD5=e()}}(function(e){"use strict";var t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function n(e,t){var n=e[0],i=e[1],r=e[2],o=e[3];n+=(i&r|~i&o)+t[0]-680876936|0,o+=((n=(n<<7|n>>>25)+i|0)&i|~n&r)+t[1]-389564586|0,r+=((o=(o<<12|o>>>20)+n|0)&n|~o&i)+t[2]+606105819|0,i+=((r=(r<<17|r>>>15)+o|0)&o|~r&n)+t[3]-1044525330|0,n+=((i=(i<<22|i>>>10)+r|0)&r|~i&o)+t[4]-176418897|0,o+=((n=(n<<7|n>>>25)+i|0)&i|~n&r)+t[5]+1200080426|0,r+=((o=(o<<12|o>>>20)+n|0)&n|~o&i)+t[6]-1473231341|0,i+=((r=(r<<17|r>>>15)+o|0)&o|~r&n)+t[7]-45705983|0,n+=((i=(i<<22|i>>>10)+r|0)&r|~i&o)+t[8]+1770035416|0,o+=((n=(n<<7|n>>>25)+i|0)&i|~n&r)+t[9]-1958414417|0,r+=((o=(o<<12|o>>>20)+n|0)&n|~o&i)+t[10]-42063|0,i+=((r=(r<<17|r>>>15)+o|0)&o|~r&n)+t[11]-1990404162|0,n+=((i=(i<<22|i>>>10)+r|0)&r|~i&o)+t[12]+1804603682|0,o+=((n=(n<<7|n>>>25)+i|0)&i|~n&r)+t[13]-40341101|0,r+=((o=(o<<12|o>>>20)+n|0)&n|~o&i)+t[14]-1502002290|0,i+=((r=(r<<17|r>>>15)+o|0)&o|~r&n)+t[15]+1236535329|0,n+=((i=(i<<22|i>>>10)+r|0)&o|r&~o)+t[1]-165796510|0,o+=((n=(n<<5|n>>>27)+i|0)&r|i&~r)+t[6]-1069501632|0,r+=((o=(o<<9|o>>>23)+n|0)&i|n&~i)+t[11]+643717713|0,i+=((r=(r<<14|r>>>18)+o|0)&n|o&~n)+t[0]-373897302|0,n+=((i=(i<<20|i>>>12)+r|0)&o|r&~o)+t[5]-701558691|0,o+=((n=(n<<5|n>>>27)+i|0)&r|i&~r)+t[10]+38016083|0,r+=((o=(o<<9|o>>>23)+n|0)&i|n&~i)+t[15]-660478335|0,i+=((r=(r<<14|r>>>18)+o|0)&n|o&~n)+t[4]-405537848|0,n+=((i=(i<<20|i>>>12)+r|0)&o|r&~o)+t[9]+568446438|0,o+=((n=(n<<5|n>>>27)+i|0)&r|i&~r)+t[14]-1019803690|0,r+=((o=(o<<9|o>>>23)+n|0)&i|n&~i)+t[3]-187363961|0,i+=((r=(r<<14|r>>>18)+o|0)&n|o&~n)+t[8]+1163531501|0,n+=((i=(i<<20|i>>>12)+r|0)&o|r&~o)+t[13]-1444681467|0,o+=((n=(n<<5|n>>>27)+i|0)&r|i&~r)+t[2]-51403784|0,r+=((o=(o<<9|o>>>23)+n|0)&i|n&~i)+t[7]+1735328473|0,i+=((r=(r<<14|r>>>18)+o|0)&n|o&~n)+t[12]-1926607734|0,n+=((i=(i<<20|i>>>12)+r|0)^r^o)+t[5]-378558|0,o+=((n=(n<<4|n>>>28)+i|0)^i^r)+t[8]-2022574463|0,r+=((o=(o<<11|o>>>21)+n|0)^n^i)+t[11]+1839030562|0,i+=((r=(r<<16|r>>>16)+o|0)^o^n)+t[14]-35309556|0,n+=((i=(i<<23|i>>>9)+r|0)^r^o)+t[1]-1530992060|0,o+=((n=(n<<4|n>>>28)+i|0)^i^r)+t[4]+1272893353|0,r+=((o=(o<<11|o>>>21)+n|0)^n^i)+t[7]-155497632|0,i+=((r=(r<<16|r>>>16)+o|0)^o^n)+t[10]-1094730640|0,n+=((i=(i<<23|i>>>9)+r|0)^r^o)+t[13]+681279174|0,o+=((n=(n<<4|n>>>28)+i|0)^i^r)+t[0]-358537222|0,r+=((o=(o<<11|o>>>21)+n|0)^n^i)+t[3]-722521979|0,i+=((r=(r<<16|r>>>16)+o|0)^o^n)+t[6]+76029189|0,n+=((i=(i<<23|i>>>9)+r|0)^r^o)+t[9]-640364487|0,o+=((n=(n<<4|n>>>28)+i|0)^i^r)+t[12]-421815835|0,r+=((o=(o<<11|o>>>21)+n|0)^n^i)+t[15]+530742520|0,i+=((r=(r<<16|r>>>16)+o|0)^o^n)+t[2]-995338651|0,n+=(r^((i=(i<<23|i>>>9)+r|0)|~o))+t[0]-198630844|0,o+=(i^((n=(n<<6|n>>>26)+i|0)|~r))+t[7]+1126891415|0,r+=(n^((o=(o<<10|o>>>22)+n|0)|~i))+t[14]-1416354905|0,i+=(o^((r=(r<<15|r>>>17)+o|0)|~n))+t[5]-57434055|0,n+=(r^((i=(i<<21|i>>>11)+r|0)|~o))+t[12]+1700485571|0,o+=(i^((n=(n<<6|n>>>26)+i|0)|~r))+t[3]-1894986606|0,r+=(n^((o=(o<<10|o>>>22)+n|0)|~i))+t[10]-1051523|0,i+=(o^((r=(r<<15|r>>>17)+o|0)|~n))+t[1]-2054922799|0,n+=(r^((i=(i<<21|i>>>11)+r|0)|~o))+t[8]+1873313359|0,o+=(i^((n=(n<<6|n>>>26)+i|0)|~r))+t[15]-30611744|0,r+=(n^((o=(o<<10|o>>>22)+n|0)|~i))+t[6]-1560198380|0,i+=(o^((r=(r<<15|r>>>17)+o|0)|~n))+t[13]+1309151649|0,n+=(r^((i=(i<<21|i>>>11)+r|0)|~o))+t[4]-145523070|0,o+=(i^((n=(n<<6|n>>>26)+i|0)|~r))+t[11]-1120210379|0,r+=(n^((o=(o<<10|o>>>22)+n|0)|~i))+t[2]+718787259|0,i=((i+=(o^((r=(r<<15|r>>>17)+o|0)|~n))+t[9]-343485551|0)<<21|i>>>11)+r|0,e[0]=n+e[0]|0,e[1]=i+e[1]|0,e[2]=r+e[2]|0,e[3]=o+e[3]|0}function i(e){var t,n=[];for(t=0;t<64;t+=4)n[t>>2]=e.charCodeAt(t)+(e.charCodeAt(t+1)<<8)+(e.charCodeAt(t+2)<<16)+(e.charCodeAt(t+3)<<24);return n}function r(e){var t,n=[];for(t=0;t<64;t+=4)n[t>>2]=e[t]+(e[t+1]<<8)+(e[t+2]<<16)+(e[t+3]<<24);return n}function o(e){var t,r,o,s,a,c,l=e.length,u=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=l;t+=64)n(u,i(e.substring(t-64,t)));for(e=e.substring(t-64),r=e.length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],t=0;t<r;t+=1)o[t>>2]|=e.charCodeAt(t)<<(t%4<<3);if(o[t>>2]|=128<<(t%4<<3),t>55)for(n(u,o),t=0;t<16;t+=1)o[t]=0;return s=(s=8*l).toString(16).match(/(.*?)(.{0,8})$/),a=parseInt(s[2],16),c=parseInt(s[1],16)||0,o[14]=a,o[15]=c,n(u,o),u}function s(e){var n,i="";for(n=0;n<4;n+=1)i+=t[e>>8*n+4&15]+t[e>>8*n&15];return i}function a(e){var t;for(t=0;t<e.length;t+=1)e[t]=s(e[t]);return e.join("")}function c(e){return/[\u0080-\uFFFF]/.test(e)&&(e=unescape(encodeURIComponent(e))),e}function l(e){var t,n=[],i=e.length;for(t=0;t<i-1;t+=2)n.push(parseInt(e.substr(t,2),16));return String.fromCharCode.apply(String,n)}function u(){this.reset()}return a(o("hello")),"undefined"==typeof ArrayBuffer||ArrayBuffer.prototype.slice||function(){function t(e,t){return(e=0|e||0)<0?Math.max(e+t,0):Math.min(e,t)}ArrayBuffer.prototype.slice=function(n,i){var r,o,s,a,c=this.byteLength,l=t(n,c),u=c;return i!==e&&(u=t(i,c)),l>u?new ArrayBuffer(0):(r=u-l,o=new ArrayBuffer(r),s=new Uint8Array(o),a=new Uint8Array(this,l,r),s.set(a),o)}}(),u.prototype.append=function(e){return this.appendBinary(c(e)),this},u.prototype.appendBinary=function(e){this._buff+=e,this._length+=e.length;var t,r=this._buff.length;for(t=64;t<=r;t+=64)n(this._hash,i(this._buff.substring(t-64,t)));return this._buff=this._buff.substring(t-64),this},u.prototype.end=function(e){var t,n,i=this._buff,r=i.length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t<r;t+=1)o[t>>2]|=i.charCodeAt(t)<<(t%4<<3);return this._finish(o,r),n=a(this._hash),e&&(n=l(n)),this.reset(),n},u.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},u.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash}},u.prototype.setState=function(e){return this._buff=e.buff,this._length=e.length,this._hash=e.hash,this},u.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},u.prototype._finish=function(e,t){var i,r,o,s=t;if(e[s>>2]|=128<<(s%4<<3),s>55)for(n(this._hash,e),s=0;s<16;s+=1)e[s]=0;i=(i=8*this._length).toString(16).match(/(.*?)(.{0,8})$/),r=parseInt(i[2],16),o=parseInt(i[1],16)||0,e[14]=r,e[15]=o,n(this._hash,e)},u.hash=function(e,t){return u.hashBinary(c(e),t)},u.hashBinary=function(e,t){var n=o(e),i=a(n);return t?l(i):i},u.ArrayBuffer=function(){this.reset()},u.ArrayBuffer.prototype.append=function(e){var t,i=function(e,t,n){var i=new Uint8Array(e.byteLength+t.byteLength);return i.set(new Uint8Array(e)),i.set(new Uint8Array(t),e.byteLength),n?i:i.buffer}(this._buff.buffer,e,!0),o=i.length;for(this._length+=e.byteLength,t=64;t<=o;t+=64)n(this._hash,r(i.subarray(t-64,t)));return this._buff=t-64<o?new Uint8Array(i.buffer.slice(t-64)):new Uint8Array(0),this},u.ArrayBuffer.prototype.end=function(e){var t,n,i=this._buff,r=i.length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t<r;t+=1)o[t>>2]|=i[t]<<(t%4<<3);return this._finish(o,r),n=a(this._hash),e&&(n=l(n)),this.reset(),n},u.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},u.ArrayBuffer.prototype.getState=function(){var e=u.prototype.getState.call(this);return e.buff=function(e){return String.fromCharCode.apply(null,new Uint8Array(e))}(e.buff),e},u.ArrayBuffer.prototype.setState=function(e){return e.buff=function(e,t){var n,i=e.length,r=new ArrayBuffer(i),o=new Uint8Array(r);for(n=0;n<i;n+=1)o[n]=e.charCodeAt(n);return t?o:r}(e.buff,!0),u.prototype.setState.call(this,e)},u.ArrayBuffer.prototype.destroy=u.prototype.destroy,u.ArrayBuffer.prototype._finish=u.prototype._finish,u.ArrayBuffer.hash=function(e,t){var i=function(e){var t,i,o,s,a,c,l=e.length,u=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=l;t+=64)n(u,r(e.subarray(t-64,t)));for(e=t-64<l?e.subarray(t-64):new Uint8Array(0),i=e.length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],t=0;t<i;t+=1)o[t>>2]|=e[t]<<(t%4<<3);if(o[t>>2]|=128<<(t%4<<3),t>55)for(n(u,o),t=0;t<16;t+=1)o[t]=0;return s=(s=8*l).toString(16).match(/(.*?)(.{0,8})$/),a=parseInt(s[2],16),c=parseInt(s[1],16)||0,o[14]=a,o[15]=c,n(u,o),u}(new Uint8Array(e)),o=a(i);return t?l(o):o},u})},{}],11:[function(e,t,n){var i=e(14),r=e(15),o=r;o.v1=i,o.v4=r,t.exports=o},{14:14,15:15}],12:[function(e,t,n){for(var i=[],r=0;r<256;++r)i[r]=(r+256).toString(16).substr(1);t.exports=function(e,t){var n=t||0,r=i;return r[e[n++]]+r[e[n++]]+r[e[n++]]+r[e[n++]]+"-"+r[e[n++]]+r[e[n++]]+"-"+r[e[n++]]+r[e[n++]]+"-"+r[e[n++]]+r[e[n++]]+"-"+r[e[n++]]+r[e[n++]]+r[e[n++]]+r[e[n++]]+r[e[n++]]+r[e[n++]]}},{}],13:[function(e,t,n){var i="undefined"!=typeof crypto&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&msCrypto.getRandomValues.bind(msCrypto);if(i){var r=new Uint8Array(16);t.exports=function(){return i(r),r}}else{var o=new Array(16);t.exports=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),o[t]=e>>>((3&t)<<3)&255;return o}}},{}],14:[function(e,t,n){var i,r,o=e(13),s=e(12),a=0,c=0;t.exports=function(e,t,n){var l=t&&n||0,u=t||[],h=(e=e||{}).node||i,d=void 0!==e.clockseq?e.clockseq:r;if(null==h||null==d){var f=o();null==h&&(h=i=[1|f[0],f[1],f[2],f[3],f[4],f[5]]),null==d&&(d=r=16383&(f[6]<<8|f[7]))}var p=void 0!==e.msecs?e.msecs:(new Date).getTime(),m=void 0!==e.nsecs?e.nsecs:c+1,v=p-a+(m-c)/1e4;if(v<0&&void 0===e.clockseq&&(d=d+1&16383),(v<0||p>a)&&void 0===e.nsecs&&(m=0),m>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");a=p,c=m,r=d;var g=(1e4*(268435455&(p+=122192928e5))+m)%4294967296;u[l++]=g>>>24&255,u[l++]=g>>>16&255,u[l++]=g>>>8&255,u[l++]=255&g;var y=p/4294967296*1e4&268435455;u[l++]=y>>>8&255,u[l++]=255&y,u[l++]=y>>>24&15|16,u[l++]=y>>>16&255,u[l++]=d>>>8|128,u[l++]=255&d;for(var b=0;b<6;++b)u[l+b]=h[b];return t||s(u)}},{12:12,13:13}],15:[function(e,t,n){var i=e(13),r=e(12);t.exports=function(e,t,n){var o=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var s=(e=e||{}).random||(e.rng||i)();if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,t)for(var a=0;a<16;++a)t[o+a]=s[a];return t||r(s)}},{12:12,13:13}],16:[function(e,t,n){"use strict";function i(e,t,n){var i=n[n.length-1];e===i.element&&(n.pop(),i=n[n.length-1]);var r=i.element,o=i.index;if(Array.isArray(r))r.push(e);else if(o===t.length-2){var s=t.pop();r[s]=e}else t.push(e)}n.stringify=function(e){var t=[];t.push({obj:e});for(var n,i,r,o,s,a,c,l,u,h,d,f="";n=t.pop();)if(i=n.obj,r=n.prefix||"",o=n.val||"",f+=r,o)f+=o;else if("object"!=typeof i)f+=void 0===i?null:JSON.stringify(i);else if(null===i)f+="null";else if(Array.isArray(i)){for(t.push({val:"]"}),s=i.length-1;s>=0;s--)a=0===s?"":",",t.push({obj:i[s],prefix:a});t.push({val:"["})}else{for(l in c=[],i)i.hasOwnProperty(l)&&c.push(l);for(t.push({val:"}"}),s=c.length-1;s>=0;s--)u=c[s],h=i[u],d=s>0?",":"",d+=JSON.stringify(u)+":",t.push({obj:h,prefix:d});t.push({val:"{"})}return f},n.parse=function(e){for(var t,n,r,o,s,a,c,l,u,h=[],d=[],f=0;;)if("}"!==(t=e[f++])&&"]"!==t&&void 0!==t)switch(t){case" ":case"\t":case"\n":case":":case",":break;case"n":f+=3,i(null,h,d);break;case"t":f+=3,i(!0,h,d);break;case"f":f+=4,i(!1,h,d);break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"-":for(n="",f--;;){if(r=e[f++],!/[\d\.\-e\+]/.test(r)){f--;break}n+=r}i(parseFloat(n),h,d);break;case'"':for(o="",s=void 0,a=0;'"'!==(c=e[f++])||"\\"===s&&a%2==1;)o+=c,"\\"===(s=c)?a++:a=0;i(JSON.parse('"'+o+'"'),h,d);break;case"[":l={element:[],index:h.length},h.push(l.element),d.push(l);break;case"{":u={element:{},index:h.length},h.push(u.element),d.push(u);break;default:throw new Error("unexpectedly reached end of input: "+t)}else{if(1===h.length)return h.pop();i(h.pop(),h,d)}}},{}],17:[function(e,n,i){(function(t){"use strict";function i(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var r=i(e(7)),o=i(e(1)),s=i(e(5)),a=e(4),c=i(e(6)),l=i(e(11)),u=i(e(2)),h=i(e(10)),d=i(e(16)),f="function"==typeof Promise?Promise:r;function p(e){if(e instanceof ArrayBuffer)return function(e){if("function"==typeof e.slice)return e.slice(0);var t=new ArrayBuffer(e.byteLength),n=new Uint8Array(t),i=new Uint8Array(e);return n.set(i),t}(e);var t=e.size,n=e.type;return"function"==typeof e.slice?e.slice(0,t,n):e.webkitSlice(0,t,n)}var m,v,g=Function.prototype.toString,y=g.call(Object);function b(e){var t,n,i;if(!e||"object"!=typeof e)return e;if(Array.isArray(e)){for(t=[],n=0,i=e.length;n<i;n++)t[n]=b(e[n]);return t}if(e instanceof Date)return e.toISOString();if(function(e){return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer||"undefined"!=typeof Blob&&e instanceof Blob}(e))return p(e);if(!function(e){var t=Object.getPrototypeOf(e);if(null===t)return!0;var n=t.constructor;return"function"==typeof n&&n instanceof n&&g.call(n)==y}(e))return e;for(n in t={},e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=b(e[n]);void 0!==r&&(t[n]=r)}return t}function _(e){var t=!1;return o(function(n){if(t)throw new Error("once called more than once");t=!0,e.apply(this,n)})}function w(e){return o(function(t){var n=this,i="function"==typeof(t=b(t))[t.length-1]&&t.pop(),r=new f(function(i,r){var o;try{var s=_(function(e,t){e?r(e):i(t)});t.push(s),(o=e.apply(n,t))&&"function"==typeof o.then&&i(o)}catch(e){r(e)}});return i&&r.then(function(e){i(null,e)},i),r})}function k(e,t){return w(o(function(n){if(this._closed)return f.reject(new Error("database is closed"));if(this._destroyed)return f.reject(new Error("database is destroyed"));var i=this;return function(e,t,n){if(e.constructor.listeners("debug").length){for(var i=["api",e.name,t],r=0;r<n.length-1;r++)i.push(n[r]);e.constructor.emit("debug",i);var o=n[n.length-1];n[n.length-1]=function(n,i){var r=["api",e.name,t];r=r.concat(n?["error",n]:["success",i]),e.constructor.emit("debug",r),o(n,i)}}}(i,e,n),this.taskqueue.isReady?t.apply(this,n):new f(function(t,r){i.taskqueue.addTask(function(o){o?r(o):t(i[e].apply(i,n))})})}))}function E(e){return"$"+e}function C(e){return e.substring(1)}function S(){this._store={}}function x(e){if(this._store=new S,e&&Array.isArray(e))for(var t=0,n=e.length;t<n;t++)this.add(e[t])}function T(e,t){for(var n={},i=0,r=t.length;i<r;i++){var o=t[i];o in e&&(n[o]=e[o])}return n}S.prototype.get=function(e){var t=E(e);return this._store[t]},S.prototype.set=function(e,t){var n=E(e);return this._store[n]=t,!0},S.prototype.has=function(e){var t=E(e);return t in this._store},S.prototype.delete=function(e){var t=E(e),n=t in this._store;return delete this._store[t],n},S.prototype.forEach=function(e){for(var t=Object.keys(this._store),n=0,i=t.length;n<i;n++){var r=t[n],o=this._store[r];r=C(r),e(o,r)}},Object.defineProperty(S.prototype,"size",{get:function(){return Object.keys(this._store).length}}),x.prototype.add=function(e){return this._store.set(e,!0)},x.prototype.has=function(e){return this._store.has(e)},x.prototype.forEach=function(e){this._store.forEach(function(t,n){e(n)})},Object.defineProperty(x.prototype,"size",{get:function(){return this._store.size}}),function(){if("undefined"==typeof Symbol||"undefined"==typeof Map||"undefined"==typeof Set)return!1;var e=Object.getOwnPropertyDescriptor(Map,Symbol.species);return e&&"get"in e&&Map[Symbol.species]===Map}()?(m=Set,v=Map):(m=x,v=S);var O,A=6;function D(e){return e}function I(e){return[{ok:e}]}function j(e,t,n){var i=t.docs,r=new v;i.forEach(function(e){r.has(e.id)?r.get(e.id).push(e):r.set(e.id,[e])});var o=r.size,s=0,a=new Array(o);function c(){++s===o&&function(){var e=[];a.forEach(function(t){t.docs.forEach(function(n){e.push({id:t.id,docs:[n]})})}),n(null,{results:e})}()}var l=[];r.forEach(function(e,t){l.push(t)});var u=0;function h(){if(!(u>=l.length)){var n=Math.min(u+A,l.length),i=l.slice(u,n);!function(n,i){n.forEach(function(n,o){var s=i+o,l=r.get(n),u=T(l[0],["atts_since","attachments"]);u.open_revs=l.map(function(e){return e.rev}),u.open_revs=u.open_revs.filter(D);var d=D;0===u.open_revs.length&&(delete u.open_revs,d=I),["revs","attachments","binary","ajax","latest"].forEach(function(e){e in t&&(u[e]=t[e])}),e.get(n,u,function(e,t){var i;i=e?[{error:e}]:d(t),function(e,t,n){a[e]={id:t,docs:n},c()}(s,n,i),h()})})}(i,u),u+=i.length}}h()}function N(){return"undefined"!=typeof chrome&&void 0!==chrome.storage&&void 0!==chrome.storage.local}if(N())O=!1;else try{localStorage.setItem("_pouch_check_localstorage",1),O=!!localStorage.getItem("_pouch_check_localstorage")}catch(e){O=!1}function P(){return O}function L(){a.EventEmitter.call(this),this._listeners={},function(e){N()?chrome.storage.onChanged.addListener(function(t){null!=t.db_name&&e.emit(t.dbName.newValue)}):P()&&("undefined"!=typeof addEventListener?addEventListener("storage",function(t){e.emit(t.key)}):window.attachEvent("storage",function(t){e.emit(t.key)}))}(this)}function M(e){if("undefined"!=typeof console&&"function"==typeof console[e]){var t=Array.prototype.slice.call(arguments,1);console[e].apply(console,t)}}function R(e){var t=0;return e||(t=2e3),function(e,t){e=parseInt(e,10)||0,(t=parseInt(t,10))!=t||t<=e?t=(e||1)<<1:t+=1,t>6e5&&(e=3e5,t=6e5);var n=Math.random();return~~((t-e)*n+e)}(e,t)}function F(e,t){M("info","The above "+e+" is totally normal. "+t)}c(L,a.EventEmitter),L.prototype.addListener=function(e,t,n,i){if(!this._listeners[t]){var r=this,o=!1;this._listeners[t]=a,this.on(e,a)}function a(){if(r._listeners[t])if(o)o="waiting";else{o=!0;var e=T(i,["style","include_docs","attachments","conflicts","filter","doc_ids","view","since","query_params","binary"]);n.changes(e).on("change",function(e){e.seq>i.since&&!i.cancelled&&(i.since=e.seq,i.onChange(e))}).on("complete",function(){"waiting"===o&&s(a),o=!1}).on("error",function(){o=!1})}}},L.prototype.removeListener=function(e,t){t in this._listeners&&(a.EventEmitter.prototype.removeListener.call(this,e,this._listeners[t]),delete this._listeners[t])},L.prototype.notifyLocalWindows=function(e){N()?chrome.storage.local.set({dbName:e}):P()&&(localStorage[e]="a"===localStorage[e]?"b":"a")},L.prototype.notify=function(e){this.emit(e),this.notifyLocalWindows(e)};var q="function"==typeof Object.assign?Object.assign:function(e){for(var t=Object(e),n=1;n<arguments.length;n++){var i=arguments[n];if(null!=i)for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(t[r]=i[r])}return t};function U(e,t,n){Error.call(this,n),this.status=e,this.name=t,this.message=n,this.error=!0}c(U,Error),U.prototype.toString=function(){return JSON.stringify({status:this.status,name:this.name,message:this.message,reason:this.reason})},new U(401,"unauthorized","Name or password is incorrect.");var $=new U(400,"bad_request","Missing JSON list of 'docs'"),H=new U(404,"not_found","missing"),W=new U(409,"conflict","Document update conflict"),B=new U(400,"bad_request","_id field must contain a string"),z=new U(412,"missing_id","_id is required for puts"),V=new U(400,"bad_request","Only reserved document ids may start with underscore."),G=(new U(412,"precondition_failed","Database not open"),new U(500,"unknown_error","Database encountered an unknown error")),K=new U(500,"badarg","Some query argument is invalid"),Y=(new U(400,"invalid_request","Request was invalid"),new U(400,"query_parse_error","Some query parameter is invalid")),Q=new U(500,"doc_validation","Bad special document member"),X=new U(400,"bad_request","Something wrong with the request"),J=new U(400,"bad_request","Document must be a JSON object"),Z=(new U(404,"not_found","Database not found"),new U(500,"indexed_db_went_bad","unknown")),ee=new U(500,"web_sql_went_bad","unknown"),te=(new U(500,"levelDB_went_went_bad","unknown"),new U(403,"forbidden","Forbidden by design doc validate_doc_update function"),new U(400,"bad_request","Invalid rev format")),ne=(new U(412,"file_exists","The database could not be created, the file already exists."),new U(412,"missing_stub","A pre-existing attachment stub wasn't found"));function ie(e,t){function n(t){for(var n in e)"function"!=typeof e[n]&&(this[n]=e[n]);void 0!==t&&(this.reason=t)}return n.prototype=U.prototype,new n(t)}function re(e){if("object"!=typeof e){var t=e;(e=G).data=t}return"error"in e&&"conflict"===e.error&&(e.name="conflict",e.status=409),"name"in e||(e.name=e.error||"unknown"),"status"in e||(e.status=500),"message"in e||(e.message=e.message||e.reason),e}function oe(e){var t={},n=e.filter&&"function"==typeof e.filter;return t.query=e.query_params,function(i){i.doc||(i.doc={});var r=n&&function(e,t,n){try{return!e(t,n)}catch(e){var i="Filter function threw: "+e.toString();return ie(X,i)}}(e.filter,i.doc,t);if("object"==typeof r)return r;if(r)return!1;if(e.include_docs){if(!e.attachments)for(var o in i.doc._attachments)i.doc._attachments.hasOwnProperty(o)&&(i.doc._attachments[o].stub=!0)}else delete i.doc;return!0}}function se(e){for(var t=[],n=0,i=e.length;n<i;n++)t=t.concat(e[n]);return t}function ae(e){var t;if(e?"string"!=typeof e?t=ie(B):/^_/.test(e)&&!/^_(design|local)/.test(e)&&(t=ie(V)):t=ie(z),t)throw t}function ce(e){return"boolean"==typeof e._remote?e._remote:"function"==typeof e.type&&(M("warn","db.type() is deprecated and will be removed in a future version of PouchDB"),"http"===e.type())}function le(e){if(!e)return null;var t=e.split("/");return 2===t.length?t:1===t.length?[e,e]:null}function ue(e){var t=le(e);return t?t.join("/"):null}new U(413,"invalid_url","Provided URL is invalid");var he=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],de="queryKey",fe=/(?:^|&)([^&=]*)=?([^&]*)/g,pe=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/;function me(e){for(var t=pe.exec(e),n={},i=14;i--;){var r=he[i],o=t[i]||"",s=-1!==["user","password"].indexOf(r);n[r]=s?decodeURIComponent(o):o}return n[de]={},n[he[12]].replace(fe,function(e,t,i){t&&(n[de][t]=i)}),n}function ve(e,t){var n=[],i=[];for(var r in t)t.hasOwnProperty(r)&&(n.push(r),i.push(t[r]));return n.push(e),Function.apply(null,n).apply(null,i)}function ge(e,t,n){return new f(function(i,r){e.get(t,function(o,s){if(o){if(404!==o.status)return r(o);s={}}var a=s._rev,c=n(s);if(!c)return i({updated:!1,rev:a});c._id=t,c._rev=a,i(function(e,t,n){return e.put(t).then(function(e){return{updated:!0,rev:e.rev}},function(i){if(409!==i.status)throw i;return ge(e,t._id,n)})}(e,c,n))})})}function ye(){return l.v4().replace(/-/g,"").toLowerCase()}var be=l.v4;function _e(e){for(var t,n,i,r,o=e.rev_tree.slice();r=o.pop();){var s=r.ids,a=s[2],c=r.pos;if(a.length)for(var l=0,u=a.length;l<u;l++)o.push({pos:c+1,ids:a[l]});else{var h=!!s[1].deleted,d=s[0];t&&!(i!==h?i:n!==c?n<c:t<d)||(t=d,n=c,i=h)}}return n+"-"+t}function we(e,t){for(var n,i=e.slice();n=i.pop();)for(var r=n.pos,o=n.ids,s=o[2],a=t(0===s.length,r,o[0],n.ctx,o[1]),c=0,l=s.length;c<l;c++)i.push({pos:r+1,ids:s[c],ctx:a})}function ke(e,t){return e.pos-t.pos}function Ee(e){var t=[];we(e,function(e,n,i,r,o){e&&t.push({rev:n+"-"+i,pos:n,opts:o})}),t.sort(ke).reverse();for(var n=0,i=t.length;n<i;n++)delete t[n].pos;return t}function Ce(e){for(var t=_e(e),n=Ee(e.rev_tree),i=[],r=0,o=n.length;r<o;r++){var s=n[r];s.rev===t||s.opts.deleted||i.push(s.rev)}return i}function Se(e){var t=[];return we(e.rev_tree,function(e,n,i,r,o){"available"!==o.status||e||(t.push(n+"-"+i),o.status="missing")}),t}function xe(e){for(var t,n=[],i=e.slice();t=i.pop();){var r=t.pos,o=t.ids,s=o[0],a=o[1],c=o[2],l=0===c.length,u=t.history?t.history.slice():[];u.push({id:s,opts:a}),l&&n.push({pos:r+1-u.length,ids:u});for(var h=0,d=c.length;h<d;h++)i.push({pos:r+1,ids:c[h],history:u})}return n.reverse()}function Te(e,t){return e.pos-t.pos}function Oe(e,t,n){var i=function(e,t,n){for(var i,r=0,o=e.length;r<o;)n(e[i=r+o>>>1],t)<0?r=i+1:o=i;return r}(e,t,n);e.splice(i,0,t)}function Ae(e,t){for(var n,i,r=t,o=e.length;r<o;r++){var s=e[r],a=[s.id,s.opts,[]];i?(i[2].push(a),i=a):n=i=a}return n}function De(e,t){return e[0]<t[0]?-1:1}function Ie(e,t){for(var n=[{tree1:e,tree2:t}],i=!1;n.length>0;){var r=n.pop(),o=r.tree1,s=r.tree2;(o[1].status||s[1].status)&&(o[1].status="available"===o[1].status||"available"===s[1].status?"available":"missing");for(var a=0;a<s[2].length;a++)if(o[2][0]){for(var c=!1,l=0;l<o[2].length;l++)o[2][l][0]===s[2][a][0]&&(n.push({tree1:o[2][l],tree2:s[2][a]}),c=!0);c||(i="new_branch",Oe(o[2],s[2][a],De))}else i="new_leaf",o[2][0]=s[2][a]}return{conflicts:i,tree:e}}function je(e,t,n){var i,r=[],o=!1,s=!1;if(!e.length)return{tree:[t],conflicts:"new_leaf"};for(var a=0,c=e.length;a<c;a++){var l=e[a];if(l.pos===t.pos&&l.ids[0]===t.ids[0])i=Ie(l.ids,t.ids),r.push({pos:l.pos,ids:i.tree}),o=o||i.conflicts,s=!0;else if(!0!==n){var u=l.pos<t.pos?l:t,h=l.pos<t.pos?t:l,d=h.pos-u.pos,f=[],p=[];for(p.push({ids:u.ids,diff:d,parent:null,parentIdx:null});p.length>0;){var m=p.pop();if(0!==m.diff)for(var v=m.ids[2],g=0,y=v.length;g<y;g++)p.push({ids:v[g],diff:m.diff-1,parent:m.ids,parentIdx:g});else m.ids[0]===h.ids[0]&&f.push(m)}var b=f[0];b?(i=Ie(b.ids,h.ids),b.parent[2][b.parentIdx]=i.tree,r.push({pos:u.pos,ids:u.ids}),o=o||i.conflicts,s=!0):r.push(l)}else r.push(l)}return s||r.push(t),r.sort(Te),{tree:r,conflicts:o||"internal_node"}}function Ne(e,t,n){var i=je(e,t),r=function(e,t){for(var n,i,r=xe(e),o=0,s=r.length;o<s;o++){var a,c=r[o],l=c.ids;if(l.length>t){n||(n={});var u=l.length-t;a={pos:c.pos+u,ids:Ae(l,u)};for(var h=0;h<u;h++){var d=c.pos+h+"-"+l[h].id;n[d]=!0}}else a={pos:c.pos,ids:Ae(l,0)};i=i?je(i,a,!0).tree:[a]}return n&&we(i,function(e,t,i){delete n[t+"-"+i]}),{tree:i,revs:n?Object.keys(n):[]}}(i.tree,n);return{tree:r.tree,stemmedRevs:r.revs,conflicts:i.conflicts}}function Pe(e){return e.ids}function Le(e,t){t||(t=_e(e));for(var n,i=t.substring(t.indexOf("-")+1),r=e.rev_tree.map(Pe);n=r.pop();){if(n[0]===i)return!!n[1].deleted;r=r.concat(n[2])}}function Me(e){return/^_local/.test(e)}function Re(e,t){for(var n,i=t.rev_tree.slice();n=i.pop();){var r=n.pos,o=n.ids,s=o[0],a=o[1],c=o[2],l=0===c.length,u=n.history?n.history.slice():[];if(u.push({id:s,pos:r,opts:a}),l)for(var h=0,d=u.length;h<d;h++){var f=u[h],p=f.pos+"-"+f.id;if(p===e)return r+"-"+s}for(var m=0,v=c.length;m<v;m++)i.push({pos:r+1,ids:c[m],history:u})}throw new Error("Unable to resolve latest revision for id "+t.id+", rev "+e)}function Fe(e,t,n){a.EventEmitter.call(this);var i=this;this.db=e;var r=(t=t?b(t):{}).complete=_(function(t,n){t?function(e,t){return"listenerCount"in e?e.listenerCount(t):a.EventEmitter.listenerCount(e,t)}(i,"error")>0&&i.emit("error",t):i.emit("complete",n),i.removeAllListeners(),e.removeListener("destroyed",o)});function o(){i.cancel()}n&&(i.on("complete",function(e){n(null,e)}),i.on("error",n)),e.once("destroyed",o),t.onChange=function(e,t,n){i.isCancelled||function(e,t,n,i){try{e.emit("change",t,n,i)}catch(e){M("error",'Error in .on("change", function):',e)}}(i,e,t,n)};var s=new f(function(e,n){t.complete=function(t,i){t?n(t):e(i)}});i.once("cancel",function(){e.removeListener("destroyed",o),t.complete(null,{status:"cancelled"})}),this.then=s.then.bind(s),this.catch=s.catch.bind(s),this.then(function(e){r(null,e)},r),e.taskqueue.isReady?i.validateChanges(t):e.taskqueue.addTask(function(e){e?t.complete(e):i.isCancelled?i.emit("cancel"):i.validateChanges(t)})}function qe(e,t,n){var i=[{rev:e._rev}];"all_docs"===n.style&&(i=Ee(t.rev_tree).map(function(e){return{rev:e.rev}}));var r={id:t.id,changes:i,doc:e};return Le(t,e._rev)&&(r.deleted=!0),n.conflicts&&(r.doc._conflicts=Ce(t),r.doc._conflicts.length||delete r.doc._conflicts),r}function Ue(e,t){return e<t?-1:e>t?1:0}function $e(e,t){return function(n,i){n||i[0]&&i[0].error?((n=n||i[0]).docId=t,e(n)):e(null,i.length?i[0]:i)}}function He(e,t){var n=Ue(e._id,t._id);if(0!==n)return n;var i=e._revisions?e._revisions.start:0,r=t._revisions?t._revisions.start:0;return Ue(i,r)}function We(){a.EventEmitter.call(this)}function Be(){this.isReady=!1,this.failed=!1,this.queue=[]}function ze(e,t){if(!(this instanceof ze))return new ze(e,t);var n=this;if(t=t||{},e&&"object"==typeof e&&(e=(t=e).name,delete t.name),this.__opts=t=b(t),n.auto_compaction=t.auto_compaction,n.prefix=ze.prefix,"string"!=typeof e)throw new Error("Missing/invalid DB name");var i=(t.prefix||"")+e,r=function(e,t){var n=e.match(/([a-z-]*):\/\/(.*)/);if(n)return{name:/https?/.test(n[1])?n[1]+"://"+n[2]:n[2],adapter:n[1]};var i=ze.adapters,r=ze.preferredAdapters,o=ze.prefix,s=t.adapter;if(!s)for(var a=0;a<r.length&&"idb"===(s=r[a])&&"websql"in i&&P()&&localStorage["_pouch__websqldb_"+o+e];++a)M("log",'PouchDB is downgrading "'+e+'" to WebSQL to avoid data loss, because it was already opened with WebSQL.');var c=i[s];return{name:c&&"use_prefix"in c&&!c.use_prefix?e:o+e,adapter:s}}(i,t);if(t.name=r.name,t.adapter=t.adapter||r.adapter,n.name=e,n._adapter=t.adapter,ze.emit("debug",["adapter","Picked adapter: ",t.adapter]),!ze.adapters[t.adapter]||!ze.adapters[t.adapter].valid())throw new Error("Invalid Adapter: "+t.adapter);We.call(n),n.taskqueue=new Be,n.adapter=t.adapter,ze.adapters[t.adapter].call(n,t,function(e){if(e)return n.taskqueue.fail(e);!function(e){function t(t){e.removeListener("closed",n),t||e.constructor.emit("destroyed",e.name)}function n(){e.removeListener("destroyed",t),e.constructor.emit("unref",e)}e.once("destroyed",t),e.once("closed",n),e.constructor.emit("ref",e)}(n),n.emit("created",n),ze.emit("created",n.name),n.taskqueue.ready(n)})}c(Fe,a.EventEmitter),Fe.prototype.cancel=function(){this.isCancelled=!0,this.db.taskqueue.isReady&&this.emit("cancel")},Fe.prototype.validateChanges=function(e){var t=e.complete,n=this;ze._changesFilterPlugin?ze._changesFilterPlugin.validate(e,function(i){if(i)return t(i);n.doChanges(e)}):n.doChanges(e)},Fe.prototype.doChanges=function(e){var t=this,n=e.complete;if("live"in(e=b(e))&&!("continuous"in e)&&(e.continuous=e.live),e.processChange=qe,"latest"===e.since&&(e.since="now"),e.since||(e.since=0),"now"!==e.since){if(ze._changesFilterPlugin){if(ze._changesFilterPlugin.normalize(e),ze._changesFilterPlugin.shouldFilter(this,e))return ze._changesFilterPlugin.filter(this,e)}else["doc_ids","filter","selector","view"].forEach(function(t){t in e&&M("warn",'The "'+t+'" option was passed in to changes/replicate, but pouchdb-changes-filter plugin is not installed, so it was ignored. Please install the plugin to enable filtering.')});"descending"in e||(e.descending=!1),e.limit=0===e.limit?1:e.limit,e.complete=n;var i=this.db._changes(e);if(i&&"function"==typeof i.cancel){var r=t.cancel;t.cancel=o(function(e){i.cancel(),r.apply(this,e)})}}else this.db.info().then(function(i){t.isCancelled?n(null,{status:"cancelled"}):(e.since=i.update_seq,t.doChanges(e))},n)},c(We,a.EventEmitter),We.prototype.post=k("post",function(e,t,n){if("function"==typeof t&&(n=t,t={}),"object"!=typeof e||Array.isArray(e))return n(ie(J));this.bulkDocs({docs:[e]},t,$e(n,e._id))}),We.prototype.put=k("put",function(e,t,n){if("function"==typeof t&&(n=t,t={}),"object"!=typeof e||Array.isArray(e))return n(ie(J));if(ae(e._id),Me(e._id)&&"function"==typeof this._putLocal)return e._deleted?this._removeLocal(e,n):this._putLocal(e,n);var i=this;function r(n){"function"==typeof i._put&&!1!==t.new_edits?i._put(e,t,n):i.bulkDocs({docs:[e]},t,$e(n,e._id))}t.force&&e._rev?(function(){var n=e._rev.split("-"),i=n[1],r=parseInt(n[0],10)+1,o=ye();e._revisions={start:r,ids:[o,i]},e._rev=r+"-"+o,t.new_edits=!1}(),r(function(t){var i=t?null:{ok:!0,id:e._id,rev:e._rev};n(t,i)})):r(n)}),We.prototype.putAttachment=k("putAttachment",function(e,t,n,i,r){var o=this;function s(e){var n="_rev"in e?parseInt(e._rev,10):0;return e._attachments=e._attachments||{},e._attachments[t]={content_type:r,data:i,revpos:++n},o.put(e)}return"function"==typeof r&&(r=i,i=n,n=null),void 0===r&&(r=i,i=n,n=null),r||M("warn","Attachment",t,"on document",e,"is missing content_type"),o.get(e).then(function(e){if(e._rev!==n)throw ie(W);return s(e)},function(t){if(t.reason===H.message)return s({_id:e});throw t})}),We.prototype.removeAttachment=k("removeAttachment",function(e,t,n,i){var r=this;r.get(e,function(e,o){if(e)i(e);else if(o._rev===n){if(!o._attachments)return i();delete o._attachments[t],0===Object.keys(o._attachments).length&&delete o._attachments,r.put(o,i)}else i(ie(W))})}),We.prototype.remove=k("remove",function(e,t,n,i){var r;"string"==typeof t?(r={_id:e,_rev:t},"function"==typeof n&&(i=n,n={})):(r=e,"function"==typeof t?(i=t,n={}):(i=n,n=t)),(n=n||{}).was_delete=!0;var o={_id:r._id,_rev:r._rev||n.rev,_deleted:!0};if(Me(o._id)&&"function"==typeof this._removeLocal)return this._removeLocal(r,i);this.bulkDocs({docs:[o]},n,$e(i,o._id))}),We.prototype.revsDiff=k("revsDiff",function(e,t,n){"function"==typeof t&&(n=t,t={});var i=Object.keys(e);if(!i.length)return n(null,{});var r=0,o=new v;function s(e,t){o.has(e)||o.set(e,{missing:[]}),o.get(e).missing.push(t)}i.map(function(t){this._getRevisionTree(t,function(a,c){if(a&&404===a.status&&"missing"===a.message)o.set(t,{missing:e[t]});else{if(a)return n(a);!function(t,n){var i=e[t].slice(0);we(n,function(e,n,r,o,a){var c=n+"-"+r,l=i.indexOf(c);-1!==l&&(i.splice(l,1),"available"!==a.status&&s(t,c))}),i.forEach(function(e){s(t,e)})}(t,c)}if(++r===i.length){var l={};return o.forEach(function(e,t){l[t]=e}),n(null,l)}})},this)}),We.prototype.bulkGet=k("bulkGet",function(e,t){j(this,e,t)}),We.prototype.compactDocument=k("compactDocument",function(e,t,n){var i=this;this._getRevisionTree(e,function(r,o){if(r)return n(r);var s=function(e){var t={},n=[];return we(e,function(e,i,r,o){var s=i+"-"+r;return e&&(t[s]=0),void 0!==o&&n.push({from:o,to:s}),s}),n.reverse(),n.forEach(function(e){void 0===t[e.from]?t[e.from]=1+t[e.to]:t[e.from]=Math.min(t[e.from],1+t[e.to])}),t}(o),a=[],c=[];Object.keys(s).forEach(function(e){s[e]>t&&a.push(e)}),we(o,function(e,t,n,i,r){var o=t+"-"+n;"available"===r.status&&-1!==a.indexOf(o)&&c.push(o)}),i._doCompaction(e,c,n)})}),We.prototype.compact=k("compact",function(e,t){"function"==typeof e&&(t=e,e={}),e=e||{},this._compactionQueue=this._compactionQueue||[],this._compactionQueue.push({opts:e,callback:t}),1===this._compactionQueue.length&&function e(t){var n=t._compactionQueue[0],i=n.opts,r=n.callback;t.get("_local/compaction").catch(function(){return!1}).then(function(n){n&&n.last_seq&&(i.last_seq=n.last_seq),t._compact(i,function(n,i){n?r(n):r(null,i),s(function(){t._compactionQueue.shift(),t._compactionQueue.length&&e(t)})})})}(this)}),We.prototype._compact=function(e,t){var n=this,i={return_docs:!1,last_seq:e.last_seq||0},r=[];n.changes(i).on("change",function(e){r.push(n.compactDocument(e.id,0))}).on("complete",function(e){var i=e.last_seq;f.all(r).then(function(){return ge(n,"_local/compaction",function(e){return(!e.last_seq||e.last_seq<i)&&(e.last_seq=i,e)})}).then(function(){t(null,{ok:!0})}).catch(t)}).on("error",t)},We.prototype.get=k("get",function(e,t,n){if("function"==typeof t&&(n=t,t={}),"string"!=typeof e)return n(ie(B));if(Me(e)&&"function"==typeof this._getLocal)return this._getLocal(e,n);var i=[],r=this;function o(){var o=[],s=i.length;if(!s)return n(null,o);i.forEach(function(i){r.get(e,{rev:i,revs:t.revs,latest:t.latest,attachments:t.attachments,binary:t.binary},function(e,t){if(e)o.push({missing:i});else{for(var r,a=0,c=o.length;a<c;a++)if(o[a].ok&&o[a].ok._rev===t._rev){r=!0;break}r||o.push({ok:t})}--s||n(null,o)})})}if(!t.open_revs)return this._get(e,t,function(i,o){if(i)return i.docId=e,n(i);var s=o.doc,a=o.metadata,c=o.ctx;if(t.conflicts){var l=Ce(a);l.length&&(s._conflicts=l)}if(Le(a,s._rev)&&(s._deleted=!0),t.revs||t.revs_info){for(var u=s._rev.split("-"),h=parseInt(u[0],10),d=u[1],f=xe(a.rev_tree),p=null,m=0;m<f.length;m++){var v=f[m],g=v.ids.map(function(e){return e.id}).indexOf(d),y=g===h-1;(y||!p&&-1!==g)&&(p=v)}var b=p.ids.map(function(e){return e.id}).indexOf(s._rev.split("-")[1])+1,_=p.ids.length-b;if(p.ids.splice(b,_),p.ids.reverse(),t.revs&&(s._revisions={start:p.pos+p.ids.length-1,ids:p.ids.map(function(e){return e.id})}),t.revs_info){var w=p.pos+p.ids.length;s._revs_info=p.ids.map(function(e){return{rev:--w+"-"+e.id,status:e.opts.status}})}}if(t.attachments&&s._attachments){var k=s._attachments,E=Object.keys(k).length;if(0===E)return n(null,s);Object.keys(k).forEach(function(e){this._getAttachment(s._id,e,k[e],{rev:s._rev,binary:t.binary,ctx:c},function(t,i){var r=s._attachments[e];r.data=i,delete r.stub,delete r.length,--E||n(null,s)})},r)}else{if(s._attachments)for(var C in s._attachments)s._attachments.hasOwnProperty(C)&&(s._attachments[C].stub=!0);n(null,s)}});if("all"===t.open_revs)this._getRevisionTree(e,function(e,t){if(e)return n(e);i=Ee(t).map(function(e){return e.rev}),o()});else{if(!Array.isArray(t.open_revs))return n(ie(G,"function_clause"));i=t.open_revs;for(var s=0;s<i.length;s++){var a=i[s];if("string"!=typeof a||!/^\d+-/.test(a))return n(ie(te))}o()}}),We.prototype.getAttachment=k("getAttachment",function(e,t,n,i){var r=this;n instanceof Function&&(i=n,n={}),this._get(e,n,function(o,s){return o?i(o):s.doc._attachments&&s.doc._attachments[t]?(n.ctx=s.ctx,n.binary=!0,void r._getAttachment(e,t,s.doc._attachments[t],n,i)):i(ie(H))})}),We.prototype.allDocs=k("allDocs",function(e,t){if("function"==typeof e&&(t=e,e={}),e.skip=void 0!==e.skip?e.skip:0,e.start_key&&(e.startkey=e.start_key),e.end_key&&(e.endkey=e.end_key),"keys"in e){if(!Array.isArray(e.keys))return t(new TypeError("options.keys must be an array"));var n=["startkey","endkey","key"].filter(function(t){return t in e})[0];if(n)return void t(ie(Y,"Query parameter `"+n+"` is not compatible with multi-get"));if(!ce(this)&&(function(e){var t="limit"in e?e.keys.slice(e.skip,e.limit+e.skip):e.skip>0?e.keys.slice(e.skip):e.keys;e.keys=t,e.skip=0,delete e.limit,e.descending&&(t.reverse(),e.descending=!1)}(e),0===e.keys.length))return this._allDocs({limit:0},t)}return this._allDocs(e,t)}),We.prototype.changes=function(e,t){return"function"==typeof e&&(t=e,e={}),new Fe(this,e,t)},We.prototype.close=k("close",function(e){return this._closed=!0,this.emit("closed"),this._close(e)}),We.prototype.info=k("info",function(e){var t=this;this._info(function(n,i){if(n)return e(n);i.db_name=i.db_name||t.name,i.auto_compaction=!(!t.auto_compaction||ce(t)),i.adapter=t.adapter,e(null,i)})}),We.prototype.id=k("id",function(e){return this._id(e)}),We.prototype.type=function(){return"function"==typeof this._type?this._type():this.adapter},We.prototype.bulkDocs=k("bulkDocs",function(e,t,n){if("function"==typeof t&&(n=t,t={}),t=t||{},Array.isArray(e)&&(e={docs:e}),!e||!e.docs||!Array.isArray(e.docs))return n(ie($));for(var i=0;i<e.docs.length;++i)if("object"!=typeof e.docs[i]||Array.isArray(e.docs[i]))return n(ie(J));var r;if(e.docs.forEach(function(e){e._attachments&&Object.keys(e._attachments).forEach(function(t){r=r||function(e){return"_"===e.charAt(0)&&e+" is not a valid attachment name, attachment names cannot start with '_'"}(t),e._attachments[t].content_type||M("warn","Attachment",t,"on document",e._id,"is missing content_type")})}),r)return n(ie(X,r));"new_edits"in t||(t.new_edits=!("new_edits"in e)||e.new_edits);var o=this;t.new_edits||ce(o)||e.docs.sort(He),function(e){for(var t=0;t<e.length;t++){var n=e[t];if(n._deleted)delete n._attachments;else if(n._attachments)for(var i=Object.keys(n._attachments),r=0;r<i.length;r++){var o=i[r];n._attachments[o]=T(n._attachments[o],["data","digest","content_type","length","revpos","stub"])}}}(e.docs);var s=e.docs.map(function(e){return e._id});return this._bulkDocs(e,t,function(e,i){if(e)return n(e);if(t.new_edits||(i=i.filter(function(e){return e.error})),!ce(o))for(var r=0,a=i.length;r<a;r++)i[r].id=i[r].id||s[r];n(null,i)})}),We.prototype.registerDependentDatabase=k("registerDependentDatabase",function(e,t){var n=new this.constructor(e,this.__opts);ge(this,"_local/_pouch_dependentDbs",function(t){return t.dependentDbs=t.dependentDbs||{},!t.dependentDbs[e]&&(t.dependentDbs[e]=!0,t)}).then(function(){t(null,{db:n})}).catch(t)}),We.prototype.destroy=k("destroy",function(e,t){"function"==typeof e&&(t=e,e={});var n=this,i=!("use_prefix"in n)||n.use_prefix;function r(){n._destroy(e,function(e,i){if(e)return t(e);n._destroyed=!0,n.emit("destroyed"),t(null,i||{ok:!0})})}if(ce(n))return r();n.get("_local/_pouch_dependentDbs",function(e,o){if(e)return 404!==e.status?t(e):r();var s=o.dependentDbs,a=n.constructor,c=Object.keys(s).map(function(e){var t=i?e.replace(new RegExp("^"+a.prefix),""):e;return new a(t,n.__opts).destroy()});f.all(c).then(r,t)})}),Be.prototype.execute=function(){var e;if(this.failed)for(;e=this.queue.shift();)e(this.failed);else for(;e=this.queue.shift();)e()},Be.prototype.fail=function(e){this.failed=e,this.execute()},Be.prototype.ready=function(e){this.isReady=!0,this.db=e,this.execute()},Be.prototype.addTask=function(e){this.queue.push(e),this.failed&&this.execute()},c(ze,We),ze.adapters={},ze.preferredAdapters=[],ze.prefix="_pouch_";var Ve=new a.EventEmitter;function Ge(e,t){for(var n=e,i=0,r=t.length;i<r;i++){var o=t[i];if(!(n=n[o]))break}return n}function Ke(e){for(var t=[],n="",i=0,r=e.length;i<r;i++){var o=e[i];"."===o?i>0&&"\\"===e[i-1]?n=n.substring(0,n.length-1)+".":(t.push(n),n=""):n+=o}return t.push(n),t}!function(e){Object.keys(a.EventEmitter.prototype).forEach(function(t){"function"==typeof a.EventEmitter.prototype[t]&&(e[t]=Ve[t].bind(Ve))});var t=e._destructionListeners=new v;e.on("ref",function(e){t.has(e.name)||t.set(e.name,[]),t.get(e.name).push(e)}),e.on("unref",function(e){if(t.has(e.name)){var n=t.get(e.name),i=n.indexOf(e);i<0||(n.splice(i,1),n.length>1?t.set(e.name,n):t.delete(e.name))}}),e.on("destroyed",function(e){if(t.has(e)){var n=t.get(e);t.delete(e),n.forEach(function(e){e.emit("destroyed",!0)})}})}(ze),ze.adapter=function(e,t,n){t.valid()&&(ze.adapters[e]=t,n&&ze.preferredAdapters.push(e))},ze.plugin=function(e){if("function"==typeof e)e(ze);else{if("object"!=typeof e||0===Object.keys(e).length)throw new Error('Invalid plugin: got "'+e+'", expected an object or a function');Object.keys(e).forEach(function(t){ze.prototype[t]=e[t]})}return this.__defaults&&(ze.__defaults=q({},this.__defaults)),ze},ze.defaults=function(e){function t(e,n){if(!(this instanceof t))return new t(e,n);n=n||{},e&&"object"==typeof e&&(e=(n=e).name,delete n.name),n=q({},t.__defaults,n),ze.call(this,e,n)}return c(t,ze),t.preferredAdapters=ze.preferredAdapters.slice(),Object.keys(ze).forEach(function(e){e in t||(t[e]=ze[e])}),t.__defaults=q({},this.__defaults,e),t};var Ye=["$or","$nor","$not"];function Qe(e){return Ye.indexOf(e)>-1}function Xe(e){return Object.keys(e)[0]}function Je(e){var t={};return e.forEach(function(e){Object.keys(e).forEach(function(n){var i=e[n];if("object"!=typeof i&&(i={$eq:i}),Qe(n))i instanceof Array?t[n]=i.map(function(e){return Je([e])}):t[n]=Je([i]);else{var r=t[n]=t[n]||{};Object.keys(i).forEach(function(e){var t=i[e];return"$gt"===e||"$gte"===e?function(e,t,n){void 0===n.$eq&&(void 0!==n.$gte?"$gte"===e?t>n.$gte&&(n.$gte=t):t>=n.$gte&&(delete n.$gte,n.$gt=t):void 0!==n.$gt?"$gte"===e?t>n.$gt&&(delete n.$gt,n.$gte=t):t>n.$gt&&(n.$gt=t):n[e]=t)}(e,t,r):"$lt"===e||"$lte"===e?function(e,t,n){void 0===n.$eq&&(void 0!==n.$lte?"$lte"===e?t<n.$lte&&(n.$lte=t):t<=n.$lte&&(delete n.$lte,n.$lt=t):void 0!==n.$lt?"$lte"===e?t<n.$lt&&(delete n.$lt,n.$lte=t):t<n.$lt&&(n.$lt=t):n[e]=t)}(e,t,r):"$ne"===e?function(e,t){"$ne"in t?t.$ne.push(e):t.$ne=[e]}(t,r):"$eq"===e?function(e,t){delete t.$gt,delete t.$gte,delete t.$lt,delete t.$lte,delete t.$ne,t.$eq=e}(t,r):void(r[e]=t)})}})}),t}var Ze=-324,et=3,tt="";function nt(e,t){if(e===t)return 0;e=it(e),t=it(t);var n=ct(e),i=ct(t);if(n-i!=0)return n-i;switch(typeof e){case"number":return e-t;case"boolean":return e<t?-1:1;case"string":return function(e,t){return e===t?0:e>t?1:-1}(e,t)}return Array.isArray(e)?function(e,t){for(var n=Math.min(e.length,t.length),i=0;i<n;i++){var r=nt(e[i],t[i]);if(0!==r)return r}return e.length===t.length?0:e.length>t.length?1:-1}(e,t):function(e,t){for(var n=Object.keys(e),i=Object.keys(t),r=Math.min(n.length,i.length),o=0;o<r;o++){var s=nt(n[o],i[o]);if(0!==s)return s;if(0!==(s=nt(e[n[o]],t[i[o]])))return s}return n.length===i.length?0:n.length>i.length?1:-1}(e,t)}function it(e){switch(typeof e){case"undefined":return null;case"number":return e===1/0||e===-1/0||isNaN(e)?null:e;case"object":var t=e;if(Array.isArray(e)){var n=e.length;e=new Array(n);for(var i=0;i<n;i++)e[i]=it(t[i])}else{if(e instanceof Date)return e.toJSON();if(null!==e)for(var r in e={},t)if(t.hasOwnProperty(r)){var o=t[r];void 0!==o&&(e[r]=it(o))}}}return e}function rt(e){if(null!==e)switch(typeof e){case"boolean":return e?1:0;case"number":return function(e){if(0===e)return"1";var t=e.toExponential().split(/e\+?/),n=parseInt(t[1],10),i=e<0,r=i?"0":"2",o=function(e,t,n){return function(e,t,n){for(var i="",r=n-e.length;i.length<r;)i+=t;return i}(e,t,n)+e}(((i?-n:n)-Ze).toString(),"0",et);r+=tt+o;var s=Math.abs(parseFloat(t[0]));i&&(s=10-s);var a=s.toFixed(20);return a=a.replace(/\.?0+$/,""),r+=tt+a}(e);case"string":return e.replace(/\u0002/g,"").replace(/\u0001/g,"").replace(/\u0000/g,"");case"object":var t=Array.isArray(e),n=t?e:Object.keys(e),i=-1,r=n.length,o="";if(t)for(;++i<r;)o+=ot(n[i]);else for(;++i<r;){var s=n[i];o+=ot(s)+ot(e[s])}return o}return""}function ot(e){return ct(e=it(e))+tt+rt(e)+"\0"}function st(e,t){var n,i=t,r="1"===e[t];if(r)n=0,t++;else{var o="0"===e[t];t++;var s="",a=e.substring(t,t+et),c=parseInt(a,10)+Ze;for(o&&(c=-c),t+=et;;){var l=e[t];if("\0"===l)break;s+=l,t++}s=s.split("."),n=1===s.length?parseInt(s,10):parseFloat(s[0]+"."+s[1]),o&&(n-=10),0!==c&&(n=parseFloat(n+"e"+c))}return{num:n,length:t-i}}function at(e,t){var n=e.pop();if(t.length){var i=t[t.length-1];n===i.element&&(t.pop(),i=t[t.length-1]);var r=i.element,o=i.index;if(Array.isArray(r))r.push(n);else if(o===e.length-2){var s=e.pop();r[s]=n}else e.push(n)}}function ct(e){var t=["boolean","number","string","object"].indexOf(typeof e);return~t?null===e?1:Array.isArray(e)?5:t<3?t+2:t+3:Array.isArray(e)?5:void 0}function lt(e,t,n){if(e=e.filter(function(e){return ut(e.doc,t.selector,n)}),t.sort){var i=function(e){function t(t){return e.map(function(e){var n=Xe(e),i=Ke(n),r=Ge(t,i);return r})}return function(e,n){var i=t(e.doc),r=t(n.doc),o=nt(i,r);return 0!==o?o:function(e,t){return e<t?-1:e>t?1:0}(e.doc._id,n.doc._id)}}(t.sort);e=e.sort(i),"string"!=typeof t.sort[0]&&"desc"===function(e){return e[Xe(e)]}(t.sort[0])&&(e=e.reverse())}if("limit"in t||"skip"in t){var r=t.skip||0,o=("limit"in t?t.limit:e.length)+r;e=e.slice(r,o)}return e}function ut(e,t,n){return n.every(function(n){var i=t[n],r=Ke(n),o=Ge(e,r);return Qe(n)?function(e,t,n){return"$or"===e?t.some(function(e){return ut(n,e,Object.keys(e))}):"$not"===e?!ut(n,t,Object.keys(t)):!t.find(function(e){return ut(n,e,Object.keys(e))})}(n,i,e):ht(i,e,r,o)})}function ht(e,t,n,i){return!e||Object.keys(e).every(function(r){var o=e[r];return function(e,t,n,i,r){if(!mt[e])throw new Error('unknown operator "'+e+'" - should be one of $eq, $lte, $lt, $gt, $gte, $exists, $ne, $in, $nin, $size, $mod, $regex, $elemMatch, $type, $allMatch or $all');return mt[e](t,n,i,r)}(r,t,o,n,i)})}function dt(e){return void 0!==e&&null!==e}function ft(e){return void 0!==e}function pt(e,t){return t.some(function(t){return e instanceof Array?e.indexOf(t)>-1:e===t})}var mt={$elemMatch:function(e,t,n,i){return!!Array.isArray(i)&&0!==i.length&&("object"==typeof i[0]?i.some(function(e){return ut(e,t,Object.keys(t))}):i.some(function(i){return ht(t,e,n,i)}))},$allMatch:function(e,t,n,i){return!!Array.isArray(i)&&0!==i.length&&("object"==typeof i[0]?i.every(function(e){return ut(e,t,Object.keys(t))}):i.every(function(i){return ht(t,e,n,i)}))},$eq:function(e,t,n,i){return ft(i)&&0===nt(i,t)},$gte:function(e,t,n,i){return ft(i)&&nt(i,t)>=0},$gt:function(e,t,n,i){return ft(i)&&nt(i,t)>0},$lte:function(e,t,n,i){return ft(i)&&nt(i,t)<=0},$lt:function(e,t,n,i){return ft(i)&&nt(i,t)<0},$exists:function(e,t,n,i){return t?ft(i):!ft(i)},$mod:function(e,t,n,i){return dt(i)&&function(e,t){var n=t[0],i=t[1];if(0===n)throw new Error("Bad divisor, cannot divide by zero");if(parseInt(n,10)!==n)throw new Error("Divisor is not an integer");if(parseInt(i,10)!==i)throw new Error("Modulus is not an integer");return parseInt(e,10)===e&&e%n===i}(i,t)},$ne:function(e,t,n,i){return t.every(function(e){return 0!==nt(i,e)})},$in:function(e,t,n,i){return dt(i)&&pt(i,t)},$nin:function(e,t,n,i){return dt(i)&&!pt(i,t)},$size:function(e,t,n,i){return dt(i)&&function(e,t){return e.length===t}(i,t)},$all:function(e,t,n,i){return Array.isArray(i)&&function(e,t){return t.every(function(t){return e.indexOf(t)>-1})}(i,t)},$regex:function(e,t,n,i){return dt(i)&&function(e,t){return new RegExp(t).test(e)}(i,t)},$type:function(e,t,n,i){return function(e,t){switch(t){case"null":return null===e;case"boolean":return"boolean"==typeof e;case"number":return"number"==typeof e;case"string":return"string"==typeof e;case"array":return e instanceof Array;case"object":return"[object Object]"==={}.toString.call(e)}throw new Error(t+" not supported as a type.Please use one of object, string, array, number, boolean or null.")}(i,t)}};function vt(e,t){if("object"!=typeof t)throw new Error("Selector error: expected a JSON object");t=function(e){var t=b(e),n=!1;"$and"in t&&(t=Je(t.$and),n=!0),["$or","$nor"].forEach(function(e){e in t&&t[e].forEach(function(e){for(var t=Object.keys(e),n=0;n<t.length;n++){var i=t[n],r=e[i];"object"==typeof r&&null!==r||(e[i]={$eq:r})}})}),"$not"in t&&(t.$not=Je([t.$not]));for(var i=Object.keys(t),r=0;r<i.length;r++){var o=i[r],s=t[o];"object"!=typeof s||null===s?s={$eq:s}:"$ne"in s&&!n&&(s.$ne=[s.$ne]),t[o]=s}return t}(t);var n={doc:e},i=lt([n],{selector:t},Object.keys(t));return i&&1===i.length}function gt(e,t){if(e.selector&&e.filter&&"_selector"!==e.filter){var n="string"==typeof e.filter?e.filter:"function";return t(new Error('selector invalid for filter "'+n+'"'))}t()}function yt(e){e.view&&!e.filter&&(e.filter="_view"),e.selector&&!e.filter&&(e.filter="_selector"),e.filter&&"string"==typeof e.filter&&("_view"===e.filter?e.view=ue(e.view):e.filter=ue(e.filter))}function bt(e,t){return t.filter&&"string"==typeof t.filter&&!t.doc_ids&&!ce(e.db)}function _t(e,t){var n=t.complete;if("_view"===t.filter){if(!t.view||"string"!=typeof t.view){var i=ie(X,"`view` filter parameter not found or invalid.");return n(i)}var r=le(t.view);e.db.get("_design/"+r[0],function(i,o){if(e.isCancelled)return n(null,{status:"cancelled"});if(i)return n(re(i));var s=o&&o.views&&o.views[r[1]]&&o.views[r[1]].map;if(!s)return n(ie(H,o.views?"missing json key: "+r[1]:"missing json key: views"));t.filter=function(e){return ve(["return function(doc) {",' "use strict";'," var emitted = false;"," var emit = function (a, b) {"," emitted = true;"," };"," var view = "+e+";"," view(doc);"," if (emitted) {"," return true;"," }","};"].join("\n"),{})}(s),e.doChanges(t)})}else if(t.selector)t.filter=function(e){return vt(e,t.selector)},e.doChanges(t);else{var o=le(t.filter);e.db.get("_design/"+o[0],function(i,r){if(e.isCancelled)return n(null,{status:"cancelled"});if(i)return n(re(i));var s=r&&r.filters&&r.filters[o[1]];if(!s)return n(ie(H,r&&r.filters?"missing json key: "+o[1]:"missing json key: filters"));t.filter=function(e){return ve('"use strict";\nreturn '+e+";",{})}(s),e.doChanges(t)})}}function wt(e){return e.reduce(function(e,t){return e[t]=!0,e},{})}ze.plugin(function(e){e.debug=u;var t={};e.on("debug",function(e){var n=e[0],i=e.slice(1);t[n]||(t[n]=u("pouchdb:"+n)),t[n].apply(null,i)})}),ze.plugin(function(e){e._changesFilterPlugin={validate:gt,normalize:yt,shouldFilter:bt,filter:_t}}),ze.version="6.4.3";var kt=wt(["_id","_rev","_attachments","_deleted","_revisions","_revs_info","_conflicts","_deleted_conflicts","_local_seq","_rev_tree","_replication_id","_replication_state","_replication_state_time","_replication_state_reason","_replication_stats","_removed"]),Et=wt(["_attachments","_replication_id","_replication_state","_replication_state_time","_replication_state_reason","_replication_stats"]);function Ct(e){if(!/^\d+-./.test(e))return ie(te);var t=e.indexOf("-"),n=e.substring(0,t),i=e.substring(t+1);return{prefix:parseInt(n,10),id:i}}function St(e,t){var n,i,r,o={status:"available"};if(e._deleted&&(o.deleted=!0),t)if(e._id||(e._id=be()),i=ye(),e._rev){if((r=Ct(e._rev)).error)return r;e._rev_tree=[{pos:r.prefix,ids:[r.id,{status:"missing"},[[i,o,[]]]]}],n=r.prefix+1}else e._rev_tree=[{pos:1,ids:[i,o,[]]}],n=1;else if(e._revisions&&(e._rev_tree=function(e,t){for(var n=e.start-e.ids.length+1,i=e.ids,r=[i[0],t,[]],o=1,s=i.length;o<s;o++)r=[i[o],{status:"missing"},[r]];return[{pos:n,ids:r}]}(e._revisions,o),n=e._revisions.start,i=e._revisions.ids[0]),!e._rev_tree){if((r=Ct(e._rev)).error)return r;n=r.prefix,i=r.id,e._rev_tree=[{pos:n,ids:[i,o,[]]}]}ae(e._id),e._rev=n+"-"+i;var s={metadata:{},data:{}};for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var c="_"===a[0];if(c&&!kt[a]){var l=ie(Q,a);throw l.message=Q.message+": "+a,l}c&&!Et[a]?s.metadata[a.slice(1)]=e[a]:s.data[a]=e[a]}return s}var xt=function(e){return atob(e)},Tt=function(e){return btoa(e)};function Ot(e,t){e=e||[],t=t||{};try{return new Blob(e,t)}catch(o){if("TypeError"!==o.name)throw o;for(var n="undefined"!=typeof BlobBuilder?BlobBuilder:"undefined"!=typeof MSBlobBuilder?MSBlobBuilder:"undefined"!=typeof MozBlobBuilder?MozBlobBuilder:WebKitBlobBuilder,i=new n,r=0;r<e.length;r+=1)i.append(e[r]);return i.getBlob(t.type)}}function At(e,t){return Ot([function(e){for(var t=e.length,n=new ArrayBuffer(t),i=new Uint8Array(n),r=0;r<t;r++)i[r]=e.charCodeAt(r);return n}(e)],{type:t})}function Dt(e,t){return At(xt(e),t)}function It(e){for(var t="",n=new Uint8Array(e),i=n.byteLength,r=0;r<i;r++)t+=String.fromCharCode(n[r]);return t}function jt(e,t){if("undefined"==typeof FileReader)return t(It((new FileReaderSync).readAsArrayBuffer(e)));var n=new FileReader,i="function"==typeof n.readAsBinaryString;n.onloadend=function(e){var n=e.target.result||"";if(i)return t(n);t(It(n))},i?n.readAsBinaryString(e):n.readAsArrayBuffer(e)}function Nt(e,t){jt(e,function(e){t(e)})}function Pt(e,t){Nt(e,function(e){t(Tt(e))})}function Lt(e,t){if("undefined"==typeof FileReader)return t((new FileReaderSync).readAsArrayBuffer(e));var n=new FileReader;n.onloadend=function(e){var n=e.target.result||new ArrayBuffer(0);t(n)},n.readAsArrayBuffer(e)}var Mt=t.setImmediate||t.setTimeout,Rt=32768;function Ft(e,t,n,i,r){(n>0||i<t.size)&&(t=function(e,t,n){return e.webkitSlice?e.webkitSlice(t,n):e.slice(t,n)}(t,n,i)),Lt(t,function(t){e.append(t),r()})}function qt(e,t,n,i,r){(n>0||i<t.length)&&(t=t.substring(n,i)),e.appendBinary(t),r()}function Ut(e,t){var n="string"==typeof e,i=n?e.length:e.size,r=Math.min(Rt,i),o=Math.ceil(i/r),s=0,a=n?new h:new h.ArrayBuffer,c=n?qt:Ft;function l(){Mt(d)}function u(){var e=a.end(!0),n=function(e){return Tt(e)}(e);t(n),a.destroy()}function d(){var t=s*r,n=t+r;c(a,e,t,n,++s<o?l:u)}d()}function $t(e,t,n){var i=function(e){try{return xt(e)}catch(e){var t=ie(K,"Attachment is not a valid base64 string");return{error:t}}}(e.data);if(i.error)return n(i.error);e.length=i.length,e.data="blob"===t?At(i,e.content_type):"base64"===t?Tt(i):i,Ut(i,function(t){e.digest="md5-"+t,n()})}function Ht(e,t,n){if(e.stub)return n();"string"==typeof e.data?$t(e,t,n):function(e,t,n){Ut(e.data,function(i){e.digest="md5-"+i,e.length=e.data.size||e.data.length||0,"binary"===t?Nt(e.data,function(t){e.data=t,n()}):"base64"===t?Pt(e.data,function(t){e.data=t,n()}):n()})}(e,t,n)}function Wt(e,t,n){if(!e.length)return n();var i,r=0;function o(){r++,e.length===r&&(i?n(i):n())}e.forEach(function(e){var n=e.data&&e.data._attachments?Object.keys(e.data._attachments):[],r=0;if(!n.length)return o();function s(e){i=e,++r===n.length&&o()}for(var a in e.data._attachments)e.data._attachments.hasOwnProperty(a)&&Ht(e.data._attachments[a],t,s)})}function Bt(e,t,n,i,r,o,s,a){if(function(e,t){for(var n,i=e.slice(),r=t.split("-"),o=parseInt(r[0],10),s=r[1];n=i.pop();){if(n.pos===o&&n.ids[0]===s)return!0;for(var a=n.ids[2],c=0,l=a.length;c<l;c++)i.push({pos:n.pos+1,ids:a[c]})}return!1}(t.rev_tree,n.metadata.rev))return i[r]=n,o();var c=t.winningRev||_e(t),l="deleted"in t?t.deleted:Le(t,c),u="deleted"in n.metadata?n.metadata.deleted:Le(n.metadata),h=/^1-/.test(n.metadata.rev);if(l&&!u&&a&&h){var d=n.data;d._rev=c,d._id=n.metadata.id,n=St(d,a)}var f=Ne(t.rev_tree,n.metadata.rev_tree[0],e),p=a&&(l&&u&&"new_leaf"!==f.conflicts||!l&&"new_leaf"!==f.conflicts||l&&!u&&"new_branch"===f.conflicts);if(p){var m=ie(W);return i[r]=m,o()}var v=n.metadata.rev;n.metadata.rev_tree=f.tree,n.stemmedRevs=f.stemmedRevs||[],t.rev_map&&(n.metadata.rev_map=t.rev_map);var g,y=_e(n.metadata),b=Le(n.metadata,y),_=l===b?0:l<b?-1:1;g=v===y?b:Le(n.metadata,v),s(n,y,b,g,!0,_,r,o)}function zt(e,t,n,i,r,o,s,a,c){e=e||1e3;var l=a.new_edits,u=new v,h=0,d=t.length;function f(){++h===d&&c&&c()}t.forEach(function(e,t){if(e._id&&Me(e._id)){var i=e._deleted?"_removeLocal":"_putLocal";n[i](e,{ctx:r},function(e,n){o[t]=e||n,f()})}else{var s=e.metadata.id;u.has(s)?(d--,u.get(s).push([e,t])):u.set(s,[[e,t]])}}),u.forEach(function(t,n){var r=0;function c(){++r<t.length?u():f()}function u(){var u=t[r],h=u[0],d=u[1];if(i.has(n))Bt(e,i.get(n),h,o,d,c,s,l);else{var f=Ne([],h.metadata.rev_tree[0],e);h.metadata.rev_tree=f.tree,h.stemmedRevs=f.stemmedRevs||[],function(e,t,n){var i=_e(e.metadata),r=Le(e.metadata,i);if("was_delete"in a&&r)return o[t]=ie(H,"deleted"),n();if(l&&function(e){return"missing"===e.metadata.rev_tree[0].ids[1].status}(e)){var c=ie(W);return o[t]=c,n()}s(e,i,r,r,!1,r?0:1,t,n)}(h,d,c)}}u()})}var Vt=5,Gt="document-store",Kt="by-sequence",Yt="attach-store",Qt="attach-seq-store",Xt="meta-store",Jt="local-store",Zt="detect-blob-support";function en(e){try{return JSON.parse(e)}catch(t){return d.parse(e)}}function tn(e){try{return JSON.stringify(e)}catch(t){return d.stringify(e)}}function nn(e){return function(t){var n="unknown_error";t.target&&t.target.error&&(n=t.target.error.name||t.target.error.message),e(ie(Z,n,t.type))}}function rn(e,t,n){return{data:tn(e),winningRev:t,deletedOrLocal:n?"1":"0",seq:e.seq,id:e.id}}function on(e){if(!e)return null;var t=en(e.data);return t.winningRev=e.winningRev,t.deleted="1"===e.deletedOrLocal,t.seq=e.seq,t}function sn(e){if(!e)return e;var t=e._doc_id_rev.lastIndexOf(":");return e._id=e._doc_id_rev.substring(0,t-1),e._rev=e._doc_id_rev.substring(t+1),delete e._doc_id_rev,e}function an(e,t,n,i){n?i(e?"string"!=typeof e?e:Dt(e,t):Ot([""],{type:t})):e?"string"!=typeof e?jt(e,function(e){i(Tt(e))}):i(e):i("")}function cn(e,t,n,i){var r=Object.keys(e._attachments||{});if(!r.length)return i&&i();var o=0;function s(){++o===r.length&&i&&i()}r.forEach(function(i){t.attachments&&t.include_docs?function(e,t){var i=e._attachments[t],r=i.digest;n.objectStore(Yt).get(r).onsuccess=function(e){i.body=e.target.result.body,s()}}(e,i):(e._attachments[i].stub=!0,s())})}function ln(e,t){return f.all(e.map(function(e){if(e.doc&&e.doc._attachments){var n=Object.keys(e.doc._attachments);return f.all(n.map(function(n){var i=e.doc._attachments[n];if("body"in i){var r=i.body,o=i.content_type;return new f(function(s){an(r,o,t,function(t){e.doc._attachments[n]=q(T(i,["digest","content_type"]),{data:t}),s()})})}}))}}))}function un(e,t,n){var i=[],r=n.objectStore(Kt),o=n.objectStore(Yt),s=n.objectStore(Qt),a=e.length;function c(){--a||i.length&&i.forEach(function(e){var t=s.index("digestSeq").count(IDBKeyRange.bound(e+"::",e+"::",!1,!1));t.onsuccess=function(t){var n=t.target.result;n||o.delete(e)}})}e.forEach(function(e){var n=r.index("_doc_id_rev"),o=t+"::"+e;n.getKey(o).onsuccess=function(e){var t=e.target.result;if("number"!=typeof t)return c();r.delete(t);var n=s.index("seq").openCursor(IDBKeyRange.only(t));n.onsuccess=function(e){var t=e.target.result;if(t){var n=t.value.digestSeq.split("::")[0];i.push(n),s.delete(t.primaryKey),t.continue()}else c()}}})}function hn(e,t,n){try{return{txn:e.transaction(t,n)}}catch(e){return{error:e}}}var dn=new L;function fn(e,t,n,i,r,o){for(var s,a,c,l,u,h,d,f,p=t.docs,m=0,g=p.length;m<g;m++){var y=p[m];y._id&&Me(y._id)||(y=p[m]=St(y,n.new_edits)).error&&!d&&(d=y)}if(d)return o(d);var b=!1,_=0,w=new Array(p.length),k=new v,E=!1,C=i._meta.blobSupport?"blob":"base64";function S(){b=!0,x()}function x(){f&&b&&(f.docCount+=_,h.put(f))}function T(){E||(dn.notify(i._meta.name),o(null,w))}function O(e,t,n,i,r,o,s,a){e.metadata.winningRev=t,e.metadata.deleted=n;var c=e.data;c._id=e.metadata.id,c._rev=e.metadata.rev,i&&(c._deleted=!0);var u=c._attachments&&Object.keys(c._attachments).length;if(u)return function(e,t,n,i,r,o){var s=e.data,a=0,c=Object.keys(s._attachments);function u(){a===c.length&&A(e,t,n,i,r,o)}function h(){a++,u()}c.forEach(function(n){var i=e.data._attachments[n];if(i.stub)a++,u();else{var r=i.data;delete i.data,i.revpos=parseInt(t,10);var o=i.digest;!function(e,t,n){l.count(e).onsuccess=function(i){var r=i.target.result;if(r)return n();var o={digest:e,body:t},s=l.put(o);s.onsuccess=n}}(o,r,h)}})}(e,t,n,r,s,a);_+=o,x(),A(e,t,n,r,s,a)}function A(e,t,n,r,o,l){var h=e.data,d=e.metadata;function f(o){var c=e.stemmedRevs||[];r&&i.auto_compaction&&(c=c.concat(Se(e.metadata))),c&&c.length&&un(c,e.metadata.id,s),d.seq=o.target.result;var l=rn(d,t,n),u=a.put(l);u.onsuccess=p}function p(){w[o]={ok:!0,id:d.id,rev:d.rev},k.set(e.metadata.id,e.metadata),function(e,t,n){var i=0,r=Object.keys(e.data._attachments||{});if(!r.length)return n();function o(){++i===r.length&&n()}function s(n){var i=e.data._attachments[n].digest,r=u.put({seq:t,digestSeq:i+"::"+t});r.onsuccess=o,r.onerror=function(e){e.preventDefault(),e.stopPropagation(),o()}}for(var a=0;a<r.length;a++)s(r[a])}(e,d.seq,l)}h._doc_id_rev=d.id+"::"+d.rev,delete h._id,delete h._rev;var m=c.put(h);m.onsuccess=f,m.onerror=function(e){e.preventDefault(),e.stopPropagation(),c.index("_doc_id_rev").getKey(h._doc_id_rev).onsuccess=function(e){var t=c.put(h,e.target.result);t.onsuccess=f}}}Wt(p,C,function(t){if(t)return o(t);!function(){var t=hn(r,[Gt,Kt,Yt,Jt,Qt,Xt],"readwrite");if(t.error)return o(t.error);(s=t.txn).onabort=nn(o),s.ontimeout=nn(o),s.oncomplete=T,a=s.objectStore(Gt),c=s.objectStore(Kt),l=s.objectStore(Yt),u=s.objectStore(Qt),(h=s.objectStore(Xt)).get(Xt).onsuccess=function(e){f=e.target.result,x()},function(e){var t=[];if(p.forEach(function(e){e.data&&e.data._attachments&&Object.keys(e.data._attachments).forEach(function(n){var i=e.data._attachments[n];i.stub&&t.push(i.digest)})}),!t.length)return e();var n,i=0;t.forEach(function(r){!function(e,t){l.get(e).onsuccess=function(n){if(n.target.result)t();else{var i=ie(ne,"unknown stub attachment with digest "+e);i.status=412,t(i)}}}(r,function(r){r&&!n&&(n=r),++i===t.length&&e(n)})})}(function(t){if(t)return E=!0,o(t);!function(){if(p.length)for(var t=0,r=0,o=p.length;r<o;r++){var c=p[r];if(c._id&&Me(c._id))u();else{var l=a.get(c.metadata.id);l.onsuccess=h}}function u(){++t===p.length&&zt(e.revs_limit,p,i,k,s,w,O,n,S)}function h(e){var t=on(e.target.result);t&&k.set(t.id,t),u()}}()})}()})}function pn(e,t,n,i,r){var o,s,a,c="function"==typeof e.getAll&&"function"==typeof e.getAllKeys&&i>1&&!n;function l(e){s=e.target.result,o&&r(o,s,a)}function u(e){o=e.target.result,s&&r(o,s,a)}function h(e){var t=e.target.result;if(!t)return r();r([t.key],[t.value],t)}c?(a={continue:function(){if(!o.length)return r();var n,a=o[o.length-1];if(t&&t.upper)try{n=IDBKeyRange.bound(a,t.upper,!0,t.upperOpen)}catch(e){if("DataError"===e.name&&0===e.code)return r()}else n=IDBKeyRange.lowerBound(a,!0);t=n,o=null,s=null,e.getAll(t,i).onsuccess=l,e.getAllKeys(t,i).onsuccess=u}},e.getAll(t,i).onsuccess=l,e.getAllKeys(t,i).onsuccess=u):n?e.openCursor(t,"prev").onsuccess=h:e.openCursor(t).onsuccess=h}function mn(e,t,n){var i,r,o="startkey"in e&&e.startkey,s="endkey"in e&&e.endkey,a="key"in e&&e.key,c="keys"in e&&e.keys,l=e.skip||0,u="number"==typeof e.limit?e.limit:-1,h=!1!==e.inclusive_end;if(!c&&(i=function(e,t,n,i,r){try{if(e&&t)return r?IDBKeyRange.bound(t,e,!n,!1):IDBKeyRange.bound(e,t,!1,!n);if(e)return r?IDBKeyRange.upperBound(e):IDBKeyRange.lowerBound(e);if(t)return r?IDBKeyRange.lowerBound(t,!n):IDBKeyRange.upperBound(t,!n);if(i)return IDBKeyRange.only(i)}catch(e){return{error:e}}return null}(o,s,h,a,e.descending),(r=i&&i.error)&&("DataError"!==r.name||0!==r.code)))return n(ie(Z,r.name,r.message));var d=[Gt,Kt,Xt];e.attachments&&d.push(Yt);var f=hn(t,d,"readonly");if(f.error)return n(f.error);var p=f.txn;p.oncomplete=function(){e.attachments?ln(w,e.binary).then(S):S()},p.onabort=nn(n);var m,v,g=p.objectStore(Gt),y=p.objectStore(Kt),b=p.objectStore(Xt),_=y.index("_doc_id_rev"),w=[];function k(t,n){var i={id:n.id,key:n.id,value:{rev:t}},r=n.deleted;r?c&&(w.push(i),i.value.deleted=!0,i.doc=null):l--<=0&&(w.push(i),e.include_docs&&function(t,n,i){var r=t.id+"::"+i;_.get(r).onsuccess=function(i){if(n.doc=sn(i.target.result),e.conflicts){var r=Ce(t);r.length&&(n.doc._conflicts=r)}cn(n.doc,e,p)}}(n,i,t))}function E(e){for(var t=0,n=e.length;t<n&&w.length!==u;t++){var i=e[t];if(i.error&&c)w.push(i);else{var r=on(i),o=r.winningRev;k(o,r)}}}function C(e,t,n){n&&(E(t),w.length<u&&n.continue())}function S(){var t={total_rows:m,offset:e.skip,rows:w};e.update_seq&&void 0!==v&&(t.update_seq=v),n(null,t)}return b.get(Xt).onsuccess=function(e){m=e.target.result.docCount},e.update_seq&&function(e,t){e.openCursor(null,"prev").onsuccess=function(e){var n=e.target.result,i=void 0;return n&&n.key&&(i=n.key),t({target:{result:[i]}})}}(y,function(e){e.target.result&&e.target.result.length>0&&(v=e.target.result[0])}),r||0===u?void 0:c?function(e,t,n){var i=[],r=0;e.forEach(function(o,s){t.get(o).onsuccess=function(t){t.target.result?i[s]=t.target.result:i[s]={key:o,error:"not_found"},++r===e.length&&n(e,i,{})}})}(e.keys,g,C):-1===u?function(e,t,n){if("function"!=typeof e.getAll){var i=[];e.openCursor(t).onsuccess=function(e){var t=e.target.result;t?(i.push(t.value),t.continue()):n({target:{result:i}})}}else e.getAll(t).onsuccess=n}(g,i,function(t){var n=t.target.result;e.descending&&(n=n.reverse()),E(n)}):void pn(g,i,e.descending,u+l,C)}var vn=!1,gn=[];function yn(){!vn&&gn.length&&(vn=!0,gn.shift()())}function bn(e,t,n,i){if((e=b(e)).continuous){var r=n+":"+be();return dn.addListener(n,r,t,e),dn.notify(n),{cancel:function(){dn.removeListener(n,r)}}}var o=e.doc_ids&&new m(e.doc_ids);e.since=e.since||0;var s,a=e.since,c="limit"in e?e.limit:-1;0===c&&(c=1),s="return_docs"in e?e.return_docs:!("returnDocs"in e)||e.returnDocs;var l,u,h,d,f=[],p=0,g=oe(e),y=new v;function _(e,t,n,i){if(n.seq!==t)return i();if(n.winningRev===e._rev)return i(n,e);var r=e._id+"::"+n.winningRev,o=d.get(r);o.onsuccess=function(e){i(n,sn(e.target.result))}}function w(){e.complete(null,{results:f,last_seq:a})}var k=[Gt,Kt];e.attachments&&k.push(Yt);var E=hn(i,k,"readonly");if(E.error)return e.complete(E.error);(l=E.txn).onabort=nn(e.complete),l.oncomplete=function(){!e.continuous&&e.attachments?ln(f).then(w):w()},u=l.objectStore(Kt),h=l.objectStore(Gt),d=u.index("_doc_id_rev");var C=e.since&&!e.descending?IDBKeyRange.lowerBound(e.since,!0):null;pn(u,C,e.descending,c,function(t,n,i){if(i&&t.length){var r=new Array(t.length),u=new Array(t.length),d=0;n.forEach(function(e,n){var s=sn(e),a=t[n];!function(e,t,n){if(o&&!o.has(e._id))return n();var i=y.get(e._id);if(i)return _(e,t,i,n);h.get(e._id).onsuccess=function(r){i=on(r.target.result),y.set(e._id,i),_(e,t,i,n)}}(s,a,function(e,o){u[n]=e,r[n]=o,++d===t.length&&function(){for(var e=0,t=r.length;e<t&&p!==c;e++){var n=r[e];if(n){var o=u[e];m(o,n)}}p!==c&&i.continue()}()})})}function m(t,n){var i=e.processChange(n,t,e);a=i.seq=t.seq;var r=g(i);if("object"==typeof r)return e.complete(r);r&&(p++,s&&f.push(i),e.attachments&&e.include_docs?cn(n,e,l,function(){ln([i],e.binary).then(function(){e.onChange(i)})}):e.onChange(i))}})}var _n,wn=new v,kn=new v;function En(e,t){var n=this;!function(e,t,n){gn.push(function(){e(function(e,i){!function(e,t,n,i){try{e(t,n)}catch(t){i.emit("error",t)}}(t,e,i,n),vn=!1,s(function(){yn()})})}),yn()}(function(t){!function(e,t,n){var i=t.name,r=null;function o(e,t){var n=e.objectStore(Gt);n.createIndex("deletedOrLocal","deletedOrLocal",{unique:!1}),n.openCursor().onsuccess=function(e){var i=e.target.result;if(i){var r=i.value,o=Le(r);r.deletedOrLocal=o?"1":"0",n.put(r),i.continue()}else t()}}function a(e,t){var n=e.objectStore(Jt),i=e.objectStore(Gt),r=e.objectStore(Kt),o=i.openCursor();o.onsuccess=function(e){var o=e.target.result;if(o){var s=o.value,a=s.id,c=Me(a),l=_e(s);if(c){var u=a+"::"+l,h=a+"::",d=a+"::~",f=r.index("_doc_id_rev"),p=IDBKeyRange.bound(h,d,!1,!1),m=f.openCursor(p);m.onsuccess=function(e){if(m=e.target.result){var t=m.value;t._doc_id_rev===u&&n.put(t),r.delete(m.primaryKey),m.continue()}else i.delete(o.primaryKey),o.continue()}}else o.continue()}else t&&t()}}function c(e,t){var n=e.objectStore(Kt),i=e.objectStore(Yt),r=e.objectStore(Qt),o=i.count();o.onsuccess=function(e){var i=e.target.result;if(!i)return t();n.openCursor().onsuccess=function(e){var n=e.target.result;if(!n)return t();for(var i=n.value,o=n.primaryKey,s=Object.keys(i._attachments||{}),a={},c=0;c<s.length;c++){var l=i._attachments[s[c]];a[l.digest]=!0}var u=Object.keys(a);for(c=0;c<u.length;c++){var h=u[c];r.put({seq:o,digestSeq:h+"::"+o})}n.continue()}}}function l(e){var t=e.objectStore(Kt),n=e.objectStore(Gt),i=n.openCursor();i.onsuccess=function(e){var i=e.target.result;if(i){var r=function(e){return e.data?on(e):(e.deleted="1"===e.deletedOrLocal,e)}(i.value);if(r.winningRev=r.winningRev||_e(r),r.seq)return o();!function(){var e=r.id+"::",n=r.id+"::",i=0;t.index("_doc_id_rev").openCursor(IDBKeyRange.bound(e,n)).onsuccess=function(e){var t=e.target.result;if(!t)return r.seq=i,o();var n=t.primaryKey;n>i&&(i=n),t.continue()}}()}function o(){var e=rn(r,r.winningRev,r.deleted),t=n.put(e);t.onsuccess=function(){i.continue()}}}}e._meta=null,e._remote=!1,e.type=function(){return"idb"},e._id=w(function(t){t(null,e._meta.instanceId)}),e._bulkDocs=function(n,i,o){fn(t,n,i,e,r,o)},e._get=function(e,t,n){var i,o,s,a=t.ctx;if(!a){var c=hn(r,[Gt,Kt,Yt],"readonly");if(c.error)return n(c.error);a=c.txn}function l(){n(s,{doc:i,metadata:o,ctx:a})}a.objectStore(Gt).get(e).onsuccess=function(e){if(!(o=on(e.target.result)))return s=ie(H,"missing"),l();var n;if(t.rev)n=t.latest?Re(t.rev,o):t.rev;else{n=o.winningRev;var r=Le(o);if(r)return s=ie(H,"deleted"),l()}var c=a.objectStore(Kt),u=o.id+"::"+n;c.index("_doc_id_rev").get(u).onsuccess=function(e){if((i=e.target.result)&&(i=sn(i)),!i)return s=ie(H,"missing"),l();l()}}},e._getAttachment=function(e,t,n,i,o){var s;if(i.ctx)s=i.ctx;else{var a=hn(r,[Gt,Kt,Yt],"readonly");if(a.error)return o(a.error);s=a.txn}var c=n.digest,l=n.content_type;s.objectStore(Yt).get(c).onsuccess=function(e){var t=e.target.result.body;an(t,l,i.binary,function(e){o(null,e)})}},e._info=function(t){var n,i,o=hn(r,[Xt,Kt],"readonly");if(o.error)return t(o.error);var s=o.txn;s.objectStore(Xt).get(Xt).onsuccess=function(e){i=e.target.result.docCount},s.objectStore(Kt).openCursor(null,"prev").onsuccess=function(e){var t=e.target.result;n=t?t.key:0},s.oncomplete=function(){t(null,{doc_count:i,update_seq:n,idb_attachment_format:e._meta.blobSupport?"binary":"base64"})}},e._allDocs=function(e,t){mn(e,r,t)},e._changes=function(t){return bn(t,e,i,r)},e._close=function(e){r.close(),wn.delete(i),e()},e._getRevisionTree=function(e,t){var n=hn(r,[Gt],"readonly");if(n.error)return t(n.error);var i=n.txn,o=i.objectStore(Gt).get(e);o.onsuccess=function(e){var n=on(e.target.result);n?t(null,n.rev_tree):t(ie(H))}},e._doCompaction=function(e,t,n){var i=[Gt,Kt,Yt,Qt],o=hn(r,i,"readwrite");if(o.error)return n(o.error);var s=o.txn,a=s.objectStore(Gt);a.get(e).onsuccess=function(n){var i=on(n.target.result);we(i.rev_tree,function(e,n,i,r,o){var s=n+"-"+i;-1!==t.indexOf(s)&&(o.status="missing")}),un(t,e,s);var r=i.winningRev,o=i.deleted;s.objectStore(Gt).put(rn(i,r,o))},s.onabort=nn(n),s.oncomplete=function(){n()}},e._getLocal=function(e,t){var n=hn(r,[Jt],"readonly");if(n.error)return t(n.error);var i=n.txn,o=i.objectStore(Jt).get(e);o.onerror=nn(t),o.onsuccess=function(e){var n=e.target.result;n?(delete n._doc_id_rev,t(null,n)):t(ie(H))}},e._putLocal=function(e,t,n){"function"==typeof t&&(n=t,t={}),delete e._revisions;var i=e._rev,o=e._id;e._rev=i?"0-"+(parseInt(i.split("-")[1],10)+1):"0-1";var s,a=t.ctx;if(!a){var c=hn(r,[Jt],"readwrite");if(c.error)return n(c.error);(a=c.txn).onerror=nn(n),a.oncomplete=function(){s&&n(null,s)}}var l,u=a.objectStore(Jt);i?(l=u.get(o)).onsuccess=function(r){var o=r.target.result;if(o&&o._rev===i){var a=u.put(e);a.onsuccess=function(){s={ok:!0,id:e._id,rev:e._rev},t.ctx&&n(null,s)}}else n(ie(W))}:((l=u.add(e)).onerror=function(e){n(ie(W)),e.preventDefault(),e.stopPropagation()},l.onsuccess=function(){s={ok:!0,id:e._id,rev:e._rev},t.ctx&&n(null,s)})},e._removeLocal=function(e,t,n){"function"==typeof t&&(n=t,t={});var i,o=t.ctx;if(!o){var s=hn(r,[Jt],"readwrite");if(s.error)return n(s.error);(o=s.txn).oncomplete=function(){i&&n(null,i)}}var a=e._id,c=o.objectStore(Jt),l=c.get(a);l.onerror=nn(n),l.onsuccess=function(r){var o=r.target.result;o&&o._rev===e._rev?(c.delete(a),i={ok:!0,id:a,rev:"0-0"},t.ctx&&n(null,i)):n(ie(H))}},e._destroy=function(e,t){dn.removeAllListeners(i);var n=kn.get(i);n&&n.result&&(n.result.close(),wn.delete(i));var r=indexedDB.deleteDatabase(i);r.onsuccess=function(){kn.delete(i),P()&&i in localStorage&&delete localStorage[i],t(null,{ok:!0})},r.onerror=nn(t)};var u,h=wn.get(i);if(h)return r=h.idb,e._meta=h.global,s(function(){n(null,e)});u=t.storage?function(e,t){try{return indexedDB.open(e,{version:Vt,storage:t})}catch(t){return indexedDB.open(e,Vt)}}(i,t.storage):indexedDB.open(i,Vt),kn.set(i,u),u.onupgradeneeded=function(e){var t=e.target.result;if(e.oldVersion<1)return function(e){var t=e.createObjectStore(Gt,{keyPath:"id"});e.createObjectStore(Kt,{autoIncrement:!0}).createIndex("_doc_id_rev","_doc_id_rev",{unique:!0}),e.createObjectStore(Yt,{keyPath:"digest"}),e.createObjectStore(Xt,{keyPath:"id",autoIncrement:!1}),e.createObjectStore(Zt),t.createIndex("deletedOrLocal","deletedOrLocal",{unique:!1}),e.createObjectStore(Jt,{keyPath:"_id"});var n=e.createObjectStore(Qt,{autoIncrement:!0});n.createIndex("seq","seq"),n.createIndex("digestSeq","digestSeq",{unique:!0})}(t);var n=e.currentTarget.transaction;e.oldVersion<3&&function(e){e.createObjectStore(Jt,{keyPath:"_id"}).createIndex("_doc_id_rev","_doc_id_rev",{unique:!0})}(t),e.oldVersion<4&&function(e){var t=e.createObjectStore(Qt,{autoIncrement:!0});t.createIndex("seq","seq"),t.createIndex("digestSeq","digestSeq",{unique:!0})}(t);var i=[o,a,c,l],r=e.oldVersion;!function e(){var t=i[r-1];r++,t&&t(n,e)}()},u.onsuccess=function(t){(r=t.target.result).onversionchange=function(){r.close(),wn.delete(i)},r.onabort=function(e){M("error","Database has a global failure",e.target.error),r.close(),wn.delete(i)};var o,s,a,c,l=r.transaction([Xt,Zt,Gt],"readwrite"),u=!1;function h(){void 0!==a&&u&&(e._meta={name:i,instanceId:c,blobSupport:a},wn.set(i,{idb:r,global:e._meta}),n(null,e))}function d(){if(void 0!==s&&void 0!==o){var e=i+"_id";e in o?c=o[e]:o[e]=c=be(),o.docCount=s,l.objectStore(Xt).put(o)}}l.objectStore(Xt).get(Xt).onsuccess=function(e){o=e.target.result||{id:Xt},d()},function(e,t){e.objectStore(Gt).index("deletedOrLocal").count(IDBKeyRange.only("0")).onsuccess=function(e){t(e.target.result)}}(l,function(e){s=e,d()}),_n||(_n=function(e){return new f(function(t){var n=Ot([""]),i=e.objectStore(Zt).put(n,"key");i.onsuccess=function(){var e=navigator.userAgent.match(/Chrome\/(\d+)/),n=navigator.userAgent.match(/Edge\//);t(n||!e||parseInt(e[1],10)>=43)},e.onabort=function(e){e.preventDefault(),e.stopPropagation(),t(!1)}}).catch(function(){return!1})}(l)),_n.then(function(e){a=e,h()}),l.oncomplete=function(){u=!0,h()},l.onabort=nn(n)},u.onerror=function(){var e="Failed to open indexedDB, are you in private browsing mode?";M("error",e),n(ie(Z,e))}}(n,e,t)},t,n.constructor)}function Cn(e){return e<65?e-48:e-55}function Sn(e,t){return"UTF-8"===t?function(e){return decodeURIComponent(escape(e))}(function(e,t,n){for(var i="";t<n;)i+=String.fromCharCode(Cn(e.charCodeAt(t++))<<4|Cn(e.charCodeAt(t++)));return i}(e,0,e.length)):function(e,t,n){for(var i="";t<n;)i+=String.fromCharCode(Cn(e.charCodeAt(t+2))<<12|Cn(e.charCodeAt(t+3))<<8|Cn(e.charCodeAt(t))<<4|Cn(e.charCodeAt(t+1))),t+=4;return i}(e,0,e.length)}function xn(e){return"'"+e+"'"}En.valid=function(){var e="undefined"!=typeof openDatabase&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),t="function"==typeof fetch&&-1!==fetch.toString().indexOf("[native code");try{return(!e||t)&&"undefined"!=typeof indexedDB&&"undefined"!=typeof IDBKeyRange}catch(e){return!1}};var Tn=7,On=xn("document-store"),An=xn("by-sequence"),Dn=xn("attach-store"),In=xn("local-store"),jn=xn("metadata-store"),Nn=xn("attach-seq-store");function Pn(e){return delete e._id,delete e._rev,JSON.stringify(e)}function Ln(e,t,n){return(e=JSON.parse(e))._id=t,e._rev=n,e}function Mn(e){for(var t="(";e--;)t+="?",e&&(t+=",");return t+")"}function Rn(e,t,n,i,r){return"SELECT "+e+" FROM "+("string"==typeof t?t:t.join(" JOIN "))+(n?" ON "+n:"")+(i?" WHERE "+("string"==typeof i?i:i.join(" AND ")):"")+(r?" ORDER BY "+r:"")}function Fn(e,t,n){if(e.length){var i=0,r=[];e.forEach(function(e){var i="SELECT seq FROM "+An+" WHERE doc_id=? AND rev=?";n.executeSql(i,[t,e],function(e,t){if(!t.rows.length)return o();var n=t.rows.item(0).seq;r.push(n),e.executeSql("DELETE FROM "+An+" WHERE seq=?",[n],o)})})}function o(){++i===e.length&&function(){if(r.length){var e="SELECT DISTINCT digest AS digest FROM "+Nn+" WHERE seq IN "+Mn(r.length);n.executeSql(e,r,function(e,t){for(var n=[],i=0;i<t.rows.length;i++)n.push(t.rows.item(i).digest);if(n.length){var o="DELETE FROM "+Nn+" WHERE seq IN ("+r.map(function(){return"?"}).join(",")+")";e.executeSql(o,r,function(e){var t="SELECT digest FROM "+Nn+" WHERE digest IN ("+n.map(function(){return"?"}).join(",")+")";e.executeSql(t,n,function(e,t){for(var i=new m,r=0;r<t.rows.length;r++)i.add(t.rows.item(r).digest);n.forEach(function(t){i.has(t)||(e.executeSql("DELETE FROM "+Nn+" WHERE digest=?",[t]),e.executeSql("DELETE FROM "+Dn+" WHERE digest=?",[t]))})})})}})}}()}}function qn(e){return function(t){M("error","WebSQL threw an error",t);var n=t&&t.constructor.toString().match(/function ([^(]+)/),i=(n&&n[1]||t.type,t.target||t.message);e(ie(ee,i))}}function Un(e,t,n,i,r,o,s){var a,c=n.new_edits,l=t.docs,u=l.map(function(e){if(e._id&&Me(e._id))return e;var t=St(e,c);return t}),h=u.filter(function(e){return e.error});if(h.length)return s(h[0]);var d,f=new Array(u.length),p=new v;function m(){if(d)return s(d);o.notify(i._name),s(null,f)}function g(e){var t=[];if(u.forEach(function(e){e.data&&e.data._attachments&&Object.keys(e.data._attachments).forEach(function(n){var i=e.data._attachments[n];i.stub&&t.push(i.digest)})}),!t.length)return e();var n,i=0;t.forEach(function(r){!function(e,t){var n="SELECT count(*) as cnt FROM "+Dn+" WHERE digest=?";a.executeSql(n,[e],function(n,i){if(0===i.rows.item(0).cnt){var r=ie(ne,"unknown stub attachment with digest "+e);t(r)}else t()})}(r,function(r){r&&!n&&(n=r),++i===t.length&&e(n)})})}function y(e,t,n,r,o,s,c,l){function u(){var t=e.data,n=r?1:0,i=t._id,o=t._rev,s=Pn(t),c="INSERT INTO "+An+" (doc_id, rev, json, deleted) VALUES (?, ?, ?, ?);",l=[i,o,s,n];function u(e,n){var i=0,r=Object.keys(t._attachments||{});if(!r.length)return n();function o(){return++i===r.length&&n(),!1}function s(n){var i="INSERT INTO "+Nn+" (digest, seq) VALUES (?,?)",r=[t._attachments[n].digest,e];a.executeSql(i,r,o,o)}for(var c=0;c<r.length;c++)s(r[c])}a.executeSql(c,l,function(e,t){var n=t.insertId;u(n,function(){y(e,n)})},function(){var e=Rn("seq",An,null,"doc_id=? AND rev=?");return a.executeSql(e,[i,o],function(e,t){var r=t.rows.item(0).seq,a="UPDATE "+An+" SET json=?, deleted=? WHERE doc_id=? AND rev=?;",c=[s,n,i,o];e.executeSql(a,c,function(e){u(r,function(){y(e,r)})})}),!1})}function h(e){d||(e?l(d=e):m===v.length&&u())}var d=null,m=0;e.data._id=e.metadata.id,e.data._rev=e.metadata.rev;var v=Object.keys(e.data._attachments||{});function g(e){m++,h(e)}function y(n,r){var s=e.metadata.id,a=e.stemmedRevs||[];o&&i.auto_compaction&&(a=Se(e.metadata).concat(a)),a.length&&Fn(a,s,n),e.metadata.seq=r;var u=e.metadata.rev;delete e.metadata.rev;var h=o?"UPDATE "+On+" SET json=?, max_seq=?, winningseq=(SELECT seq FROM "+An+" WHERE doc_id="+On+".id AND rev=?) WHERE id=?":"INSERT INTO "+On+" (id, winningseq, max_seq, json) VALUES (?,?,?,?);",d=tn(e.metadata),m=o?[d,r,t,s]:[s,r,r,d];n.executeSql(h,m,function(){f[c]={ok:!0,id:e.metadata.id,rev:u},p.set(s,e.metadata),l()})}r&&(e.data._deleted=!0),v.forEach(function(n){var i=e.data._attachments[n];if(i.stub)m++,h();else{var r=i.data;delete i.data,i.revpos=parseInt(t,10);var o=i.digest;!function(e,t,n){var i="SELECT digest FROM "+Dn+" WHERE digest=?";a.executeSql(i,[e],function(r,o){if(o.rows.length)return n();i="INSERT INTO "+Dn+" (digest, body, escaped) VALUES (?,?,1)",r.executeSql(i,[e,function(e){return e.replace(/\u0002/g,"").replace(/\u0001/g,"").replace(/\u0000/g,"")}(t)],function(){n()},function(){return n(),!1})})}(o,r,g)}}),v.length||u()}function b(){zt(e.revs_limit,u,i,p,a,f,y,n)}Wt(u,"binary",function(e){if(e)return s(e);r.transaction(function(e){a=e,g(function(e){e?d=e:function(e){if(!u.length)return e();var t=0;function n(){++t===u.length&&e()}u.forEach(function(e){if(e._id&&Me(e._id))return n();var t=e.metadata.id;a.executeSql("SELECT json FROM "+On+" WHERE id = ?",[t],function(e,i){if(i.rows.length){var r=en(i.rows.item(0).json);p.set(t,r)}n()})})}(b)})},qn(s),m)})}var $n=new v;function Hn(e){var t=$n.get(e.name);return t||(t=function(e){try{return{db:function(e){return e.websql(e.name,e.version,e.description,e.size)}(e)}}catch(e){return{error:e}}}(e),$n.set(e.name,t)),t}var Wn=new L;function Bn(e,t,n,i,r){var o=Object.keys(e._attachments||{});if(!o.length)return r&&r();var s=0;function a(){++s===o.length&&r&&r()}o.forEach(function(r){t.attachments&&t.include_docs?function(e,r){var o=e._attachments[r],s={binary:t.binary,ctx:i};n._getAttachment(e._id,r,o,s,function(t,n){e._attachments[r]=q(T(o,["digest","content_type"]),{data:n}),a()})}(e,r):(e._attachments[r].stub=!0,a())})}var zn=1,Vn="CREATE INDEX IF NOT EXISTS 'by-seq-deleted-idx' ON "+An+" (seq, deleted)",Gn="CREATE UNIQUE INDEX IF NOT EXISTS 'by-seq-doc-id-rev' ON "+An+" (doc_id, rev)",Kn="CREATE INDEX IF NOT EXISTS 'doc-winningseq-idx' ON "+On+" (winningseq)",Yn="CREATE INDEX IF NOT EXISTS 'attach-seq-seq-idx' ON "+Nn+" (seq)",Qn="CREATE UNIQUE INDEX IF NOT EXISTS 'attach-seq-digest-idx' ON "+Nn+" (digest, seq)",Xn=An+".seq = "+On+".winningseq",Jn=An+".seq AS seq, "+An+".deleted AS deleted, "+An+".json AS data, "+An+".rev AS rev, "+On+".json AS metadata";function Zn(e,t){var n,i=this,r=null,o=function(e){return"size"in e?1e6*e.size:"undefined"!=typeof navigator&&/Android/.test(navigator.userAgent)?5e6:1}(e),s=[];i._name=e.name;var a=q({},e,{version:zn,description:e.name,size:o}),c=Hn(a);if(c.error)return qn(t)(c.error);var l=c.db;function u(){P()&&(window.localStorage["_pouch__websqldb_"+i._name]=!0),t(null,i)}function h(e,t){e.executeSql(Kn),e.executeSql("ALTER TABLE "+An+" ADD COLUMN deleted TINYINT(1) DEFAULT 0",[],function(){e.executeSql(Vn),e.executeSql("ALTER TABLE "+On+" ADD COLUMN local TINYINT(1) DEFAULT 0",[],function(){e.executeSql("CREATE INDEX IF NOT EXISTS 'doc-store-local-idx' ON "+On+" (local, id)");var n="SELECT "+On+".winningseq AS seq, "+On+".json AS metadata FROM "+An+" JOIN "+On+" ON "+An+".seq = "+On+".winningseq";e.executeSql(n,[],function(e,n){for(var i=[],r=[],o=0;o<n.rows.length;o++){var s=n.rows.item(o),a=s.seq,c=JSON.parse(s.metadata);Le(c)&&i.push(a),Me(c.id)&&r.push(c.id)}e.executeSql("UPDATE "+On+"SET local = 1 WHERE id IN "+Mn(r.length),r,function(){e.executeSql("UPDATE "+An+" SET deleted = 1 WHERE seq IN "+Mn(i.length),i,t)})})})})}function d(e,t){var n="CREATE TABLE IF NOT EXISTS "+In+" (id UNIQUE, rev, json)";e.executeSql(n,[],function(){var n="SELECT "+On+".id AS id, "+An+".json AS data FROM "+An+" JOIN "+On+" ON "+An+".seq = "+On+".winningseq WHERE local = 1";e.executeSql(n,[],function(e,n){for(var i=[],r=0;r<n.rows.length;r++)i.push(n.rows.item(r));!function n(){if(!i.length)return t(e);var r=i.shift(),o=JSON.parse(r.data)._rev;e.executeSql("INSERT INTO "+In+" (id, rev, json) VALUES (?,?,?)",[r.id,o,r.data],function(e){e.executeSql("DELETE FROM "+On+" WHERE id=?",[r.id],function(e){e.executeSql("DELETE FROM "+An+" WHERE seq=?",[r.seq],function(){n()})})})}()})})}function f(e,t){function i(i){!function r(){if(!i.length)return t(e);var o=i.shift(),s=Sn(o.hex,n),a=s.lastIndexOf("::"),c=s.substring(0,a),l=s.substring(a+2),u="UPDATE "+An+" SET doc_id=?, rev=? WHERE doc_id_rev=?";e.executeSql(u,[c,l,s],function(){r()})}()}var r="ALTER TABLE "+An+" ADD COLUMN doc_id";e.executeSql(r,[],function(e){var t="ALTER TABLE "+An+" ADD COLUMN rev";e.executeSql(t,[],function(e){e.executeSql(Gn,[],function(e){var t="SELECT hex(doc_id_rev) as hex FROM "+An;e.executeSql(t,[],function(e,t){for(var n=[],r=0;r<t.rows.length;r++)n.push(t.rows.item(r));i(n)})})})})}function p(e,t){function n(e){var n="SELECT COUNT(*) AS cnt FROM "+Dn;e.executeSql(n,[],function(e,n){var i=n.rows.item(0).cnt;if(!i)return t(e);var r=0,o=10;!function n(){var i=Rn(Jn+", "+On+".id AS id",[On,An],Xn,null,On+".id ");i+=" LIMIT "+o+" OFFSET "+r,r+=o,e.executeSql(i,[],function(e,i){if(!i.rows.length)return t(e);var r={};function o(e,t){var n=r[e]=r[e]||[];-1===n.indexOf(t)&&n.push(t)}for(var s=0;s<i.rows.length;s++)for(var a=i.rows.item(s),c=Ln(a.data,a.id,a.rev),l=Object.keys(c._attachments||{}),u=0;u<l.length;u++){var h=c._attachments[l[u]];o(h.digest,a.seq)}var d=[];if(Object.keys(r).forEach(function(e){var t=r[e];t.forEach(function(t){d.push([e,t])})}),!d.length)return n();var f=0;d.forEach(function(t){var i="INSERT INTO "+Nn+" (digest, seq) VALUES (?,?)";e.executeSql(i,t,function(){++f===d.length&&n()})})})}()})}var i="CREATE TABLE IF NOT EXISTS "+Nn+" (digest, seq INTEGER)";e.executeSql(i,[],function(e){e.executeSql(Qn,[],function(e){e.executeSql(Yn,[],n)})})}function m(e,t){var n="ALTER TABLE "+Dn+" ADD COLUMN escaped TINYINT(1) DEFAULT 0";e.executeSql(n,[],t)}function v(e,t){var n="ALTER TABLE "+On+" ADD COLUMN max_seq INTEGER";e.executeSql(n,[],function(e){var n="UPDATE "+On+" SET max_seq=(SELECT MAX(seq) FROM "+An+" WHERE doc_id=id)";e.executeSql(n,[],function(e){var n="CREATE UNIQUE INDEX IF NOT EXISTS 'doc-max-seq-idx' ON "+On+" (max_seq)";e.executeSql(n,[],t)})})}function g(){for(;s.length>0;){var e=s.pop();e(null,r)}}function y(e,t){if(0===t){var n="CREATE TABLE IF NOT EXISTS "+jn+" (dbid, db_version INTEGER)",i="CREATE TABLE IF NOT EXISTS "+Dn+" (digest UNIQUE, escaped TINYINT(1), body BLOB)",o="CREATE TABLE IF NOT EXISTS "+Nn+" (digest, seq INTEGER)",s="CREATE TABLE IF NOT EXISTS "+On+" (id unique, json, winningseq, max_seq INTEGER UNIQUE)",a="CREATE TABLE IF NOT EXISTS "+An+" (seq INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, json, deleted TINYINT(1), doc_id, rev)",c="CREATE TABLE IF NOT EXISTS "+In+" (id UNIQUE, rev, json)";e.executeSql(i),e.executeSql(c),e.executeSql(o,[],function(){e.executeSql(Yn),e.executeSql(Qn)}),e.executeSql(s,[],function(){e.executeSql(Kn),e.executeSql(a,[],function(){e.executeSql(Vn),e.executeSql(Gn),e.executeSql(n,[],function(){var t="INSERT INTO "+jn+" (db_version, dbid) VALUES (?,?)";r=be();var n=[Tn,r];e.executeSql(t,n,function(){g()})})})})}else{var l=[h,d,f,p,m,v,function(){t<Tn&&e.executeSql("UPDATE "+jn+" SET db_version = "+Tn);var n="SELECT dbid FROM "+jn;e.executeSql(n,[],function(e,t){r=t.rows.item(0).dbid,g()})}],u=t,y=function(e){l[u-1](e,y),u++};y(e)}}function _(e,t){var n="SELECT MAX(seq) AS seq FROM "+An;e.executeSql(n,[],function(e,n){var i=n.rows.item(0).seq||0;t(i)})}function k(e,t){var n=Rn("COUNT("+On+".id) AS 'num'",[On,An],Xn,An+".deleted=0");e.executeSql(n,[],function(e,n){t(n.rows.item(0).num)})}"function"!=typeof l.readTransaction&&(l.readTransaction=l.transaction),l.transaction(function(e){!function(e,t){e.executeSql('SELECT HEX("a") AS hex',[],function(e,i){var r=i.rows.item(0).hex;n=2===r.length?"UTF-8":"UTF-16",t()})}(e,function(){!function(e){var t="SELECT sql FROM sqlite_master WHERE tbl_name = "+jn;e.executeSql(t,[],function(e,t){t.rows.length?/db_version/.test(t.rows.item(0).sql)?e.executeSql("SELECT db_version FROM "+jn,[],function(e,t){var n=t.rows.item(0).db_version;y(e,n)}):e.executeSql("ALTER TABLE "+jn+" ADD COLUMN db_version INTEGER",[],function(){y(e,1)}):y(e,0)})}(e)})},qn(t),u),i._remote=!1,i.type=function(){return"websql"},i._id=w(function(e){e(null,r)}),i._info=function(e){var t,i;l.readTransaction(function(e){_(e,function(e){t=e}),k(e,function(e){i=e})},qn(e),function(){e(null,{doc_count:i,update_seq:t,websql_encoding:n})})},i._bulkDocs=function(t,n,r){Un(e,t,n,i,l,Wn,r)},i._get=function(e,t,n){var r,o,s,a,c=t.ctx;if(!c)return l.readTransaction(function(r){i._get(e,q({ctx:r},t),n)});function u(e){n(e,{doc:r,metadata:o,ctx:c})}if(t.rev){if(t.latest)return void function(e,t,n,i,r){var o=Rn(Jn,[On,An],Xn,On+".id=?"),s=[t];e.executeSql(o,s,function(e,t){if(!t.rows.length){var o=ie(H,"missing");return r(o)}var s=t.rows.item(0),a=en(s.metadata);i(Re(n,a))})}(c,e,t.rev,function(r){t.latest=!1,t.rev=r,i._get(e,t,n)},u);s=Rn(Jn,[On,An],On+".id="+An+".doc_id",[An+".doc_id=?",An+".rev=?"]),a=[e,t.rev]}else s=Rn(Jn,[On,An],Xn,On+".id=?"),a=[e];c.executeSql(s,a,function(e,n){if(!n.rows.length){var i=ie(H,"missing");return u(i)}var s=n.rows.item(0);if(o=en(s.metadata),s.deleted&&!t.rev){var a=ie(H,"deleted");return u(a)}r=Ln(s.data,o.id,s.rev),u()})},i._allDocs=function(e,t){var n,r,o=[],s="startkey"in e&&e.startkey,a="endkey"in e&&e.endkey,c="key"in e&&e.key,u="keys"in e&&e.keys,h="descending"in e&&e.descending,d="limit"in e?e.limit:-1,f="skip"in e?e.skip:0,p=!1!==e.inclusive_end,m=[],v=[];if(u){var g=[],y="";u.forEach(function(e){-1===g.indexOf(e)&&(g.push(e),y+="?,")}),y=y.substring(0,y.length-1),v.push(On+".id IN ("+y+")"),m=m.concat(g)}else if(!1!==c)v.push(On+".id = ?"),m.push(c);else if(!1!==s||!1!==a){if(!1!==s&&(v.push(On+".id "+(h?"<=":">=")+" ?"),m.push(s)),!1!==a){var b=h?">":"<";p&&(b+="="),v.push(On+".id "+b+" ?"),m.push(a)}!1!==c&&(v.push(On+".id = ?"),m.push(c))}u||v.push(An+".deleted = 0"),l.readTransaction(function(t){if(k(t,function(e){n=e}),e.update_seq&&_(t,function(e){r=e}),0!==d){var s=Rn(Jn,[On,An],Xn,v,On+".id "+(h?"DESC":"ASC"));s+=" LIMIT "+d+" OFFSET "+f,t.executeSql(s,m,function(t,n){for(var r=0,s=n.rows.length;r<s;r++){var a=n.rows.item(r),c=en(a.metadata),l=c.id,h=Ln(a.data,l,a.rev),d=h._rev,f={id:l,key:l,value:{rev:d}};if(e.include_docs){if(f.doc=h,f.doc._rev=d,e.conflicts){var p=Ce(c);p.length&&(f.doc._conflicts=p)}Bn(f.doc,e,i,t)}if(a.deleted){if(!u)continue;f.value.deleted=!0,f.doc=null}if(u){var m=u.indexOf(l,m);do{o[m]=f,m=u.indexOf(l,m+1)}while(m>-1&&m<u.length)}else o.push(f)}u&&u.forEach(function(e,t){o[t]||(o[t]={key:e,error:"not_found"})})})}},qn(t),function(){var i={total_rows:n,offset:e.skip,rows:o};e.update_seq&&(i.update_seq=r),t(null,i)})},i._changes=function(e){if((e=b(e)).continuous){var t=i._name+":"+be();return Wn.addListener(i._name,t,i,e),Wn.notify(i._name),{cancel:function(){Wn.removeListener(i._name,t)}}}var n=e.descending;e.since=e.since&&!n?e.since:0;var r,o="limit"in e?e.limit:-1;0===o&&(o=1),r="return_docs"in e?e.return_docs:!("returnDocs"in e)||e.returnDocs;var s=[],a=0;!function(){var t=On+".json AS metadata, "+On+".max_seq AS maxSeq, "+An+".json AS winningDoc, "+An+".rev AS winningRev ",c=On+" JOIN "+An,u=On+".id="+An+".doc_id AND "+On+".winningseq="+An+".seq",h=["maxSeq > ?"],d=[e.since];e.doc_ids&&(h.push(On+".id IN "+Mn(e.doc_ids.length)),d=d.concat(e.doc_ids));var f=Rn(t,c,u,h,"maxSeq "+(n?"DESC":"ASC")),p=oe(e);e.view||e.filter||(f+=" LIMIT "+o);var m=e.since||0;l.readTransaction(function(t){t.executeSql(f,d,function(t,n){function c(t){return function(){e.onChange(t)}}for(var l=0,u=n.rows.length;l<u;l++){var h=n.rows.item(l),d=en(h.metadata);m=h.maxSeq;var f=Ln(h.winningDoc,d.id,h.winningRev),v=e.processChange(f,d,e);v.seq=h.maxSeq;var g=p(v);if("object"==typeof g)return e.complete(g);if(g&&(a++,r&&s.push(v),e.attachments&&e.include_docs?Bn(f,e,i,t,c(v)):c(v)()),a===o)break}})},qn(e.complete),function(){e.continuous||e.complete(null,{results:s,last_seq:m})})}()},i._close=function(e){e()},i._getAttachment=function(e,t,i,r,o){var s,a=r.ctx,c=i.digest,l=i.content_type,u="SELECT escaped, CASE WHEN escaped = 1 THEN body ELSE HEX(body) END AS body FROM "+Dn+" WHERE digest=?";a.executeSql(u,[c],function(e,t){var i=t.rows.item(0),a=i.escaped?function(e){return e.replace(/\u0001\u0001/g,"\0").replace(/\u0001\u0002/g,"").replace(/\u0002\u0002/g,"")}(i.body):Sn(i.body,n);s=r.binary?At(a,l):Tt(a),o(null,s)})},i._getRevisionTree=function(e,t){l.readTransaction(function(n){var i="SELECT json AS metadata FROM "+On+" WHERE id = ?";n.executeSql(i,[e],function(e,n){if(n.rows.length){var i=en(n.rows.item(0).metadata);t(null,i.rev_tree)}else t(ie(H))})})},i._doCompaction=function(e,t,n){if(!t.length)return n();l.transaction(function(n){var i="SELECT json AS metadata FROM "+On+" WHERE id = ?";n.executeSql(i,[e],function(n,i){var r=en(i.rows.item(0).metadata);we(r.rev_tree,function(e,n,i,r,o){var s=n+"-"+i;-1!==t.indexOf(s)&&(o.status="missing")});var o="UPDATE "+On+" SET json = ? WHERE id = ?";n.executeSql(o,[tn(r),e])}),Fn(t,e,n)},qn(n),function(){n()})},i._getLocal=function(e,t){l.readTransaction(function(n){var i="SELECT json, rev FROM "+In+" WHERE id=?";n.executeSql(i,[e],function(n,i){if(i.rows.length){var r=i.rows.item(0),o=Ln(r.json,e,r.rev);t(null,o)}else t(ie(H))})})},i._putLocal=function(e,t,n){"function"==typeof t&&(n=t,t={}),delete e._revisions;var i,r=e._rev,o=e._id;i=e._rev=r?"0-"+(parseInt(r.split("-")[1],10)+1):"0-1";var s,a=Pn(e);function c(e){var c,l;r?(c="UPDATE "+In+" SET rev=?, json=? WHERE id=? AND rev=?",l=[i,a,o,r]):(c="INSERT INTO "+In+" (id, rev, json) VALUES (?,?,?)",l=[o,i,a]),e.executeSql(c,l,function(e,r){r.rowsAffected?(s={ok:!0,id:o,rev:i},t.ctx&&n(null,s)):n(ie(W))},function(){return n(ie(W)),!1})}t.ctx?c(t.ctx):l.transaction(c,qn(n),function(){s&&n(null,s)})},i._removeLocal=function(e,t,n){var i;function r(r){var o="DELETE FROM "+In+" WHERE id=? AND rev=?",s=[e._id,e._rev];r.executeSql(o,s,function(r,o){if(!o.rowsAffected)return n(ie(H));i={ok:!0,id:e._id,rev:"0-0"},t.ctx&&n(null,i)})}"function"==typeof t&&(n=t,t={}),t.ctx?r(t.ctx):l.transaction(r,qn(n),function(){i&&n(null,i)})},i._destroy=function(e,t){Wn.removeAllListeners(i._name),l.transaction(function(e){var t=[On,An,Dn,jn,In,Nn];t.forEach(function(t){e.executeSql("DROP TABLE IF EXISTS "+t,[])})},qn(t),function(){P()&&(delete window.localStorage["_pouch__websqldb_"+i._name],delete window.localStorage[i._name]),t(null,{ok:!0})})}}function ei(){if("undefined"==typeof indexedDB||null===indexedDB||!/iP(hone|od|ad)/.test(navigator.userAgent))return!0;var e=P(),t="_pouch__websqldb_valid_"+navigator.userAgent;if(e&&localStorage[t])return"1"===localStorage[t];var n=function(){try{return openDatabase("_pouch_validate_websql",1,"",1),!0}catch(e){return!1}}();return e&&(localStorage[t]=n?"1":"0"),n}function ti(e,t,n,i){return openDatabase(e,t,n,i)}function ni(e,t){M("warn","WebSQL is deprecated and will be removed in future releases of PouchDB. Please migrate to IndexedDB: https://pouchdb.com/2018/01/23/pouchdb-6.4.2.html");var n=q({websql:ti},e);Zn.call(this,n,t)}function ii(e,t){var n,i,r,o=new Headers,s={method:e.method,credentials:"include",headers:o};return e.json&&(o.set("Accept","application/json"),o.set("Content-Type",e.headers["Content-Type"]||"application/json")),e.body&&e.processData&&"string"!=typeof e.body?s.body=JSON.stringify(e.body):s.body="body"in e?e.body:null,Object.keys(e.headers).forEach(function(t){e.headers.hasOwnProperty(t)&&o.set(t,e.headers[t])}),n=function(){for(var e={},t=new f(function(t,n){e.resolve=t,e.reject=n}),n=new Array(arguments.length),i=0;i<n.length;i++)n[i]=arguments[i];return e.promise=t,f.resolve().then(function(){return fetch.apply(null,n)}).then(function(t){e.resolve(t)}).catch(function(t){e.reject(t)}),e}(e.url,s),e.timeout>0&&(i=setTimeout(function(){n.reject(new Error("Load timeout for resource: "+e.url))},e.timeout)),n.promise.then(function(t){return r={statusCode:t.status},e.timeout>0&&clearTimeout(i),r.statusCode>=200&&r.statusCode<300?e.binary?t.blob():t.text():t.json()}).then(function(e){r.statusCode>=200&&r.statusCode<300?t(null,r,e):(e.status=r.statusCode,t(e))}).catch(function(e){e||(e=new Error("canceled")),t(e)}),{abort:n.reject}}ni.valid=function(){return"function"==typeof openDatabase&&ei()},ni.use_prefix=!0;var ri=function(){try{return new XMLHttpRequest,!0}catch(e){return!1}}();function oi(e,t){return ri||e.xhr?function(e,t){var n,i,r=!1,o=function(){r=!0,n.abort(),a()},s={abort:function(){n.abort(),a()}},a=function(){clearTimeout(i),s.abort=function(){},n&&(n.onprogress=void 0,n.upload&&(n.upload.onprogress=void 0),n.onreadystatechange=void 0,n=void 0)};n=e.xhr?new e.xhr:new XMLHttpRequest;try{n.open(e.method,e.url)}catch(e){return t(new Error(e.name||"Url is invalid"))}for(var c in n.withCredentials=!("withCredentials"in e)||e.withCredentials,"GET"===e.method?delete e.headers["Content-Type"]:e.json&&(e.headers.Accept="application/json",e.headers["Content-Type"]=e.headers["Content-Type"]||"application/json",e.body&&e.processData&&"string"!=typeof e.body&&(e.body=JSON.stringify(e.body))),e.binary&&(n.responseType="arraybuffer"),"body"in e||(e.body=null),e.headers)e.headers.hasOwnProperty(c)&&n.setRequestHeader(c,e.headers[c]);return e.timeout>0&&(i=setTimeout(o,e.timeout),n.onprogress=function(){clearTimeout(i),4!==n.readyState&&(i=setTimeout(o,e.timeout))},void 0!==n.upload&&(n.upload.onprogress=n.onprogress)),n.onreadystatechange=function(){if(4===n.readyState){var i={statusCode:n.status};if(n.status>=200&&n.status<300){var o;o=e.binary?Ot([n.response||""],{type:n.getResponseHeader("Content-Type")}):n.responseText,t(null,i,o)}else{var s={};if(r)(s=new Error("ETIMEDOUT")).code="ETIMEDOUT";else if("string"==typeof n.response&&""!==n.response)try{s=JSON.parse(n.response)}catch(e){}s.status=n.status,t(s)}a()}},e.body&&e.body instanceof Blob?Lt(e.body,function(e){n.send(e)}):n.send(e.body),s}(e,t):ii(e,t)}function si(e,t){return e=b(e),(e=q({method:"GET",headers:{},json:!0,processData:!0,timeout:1e4,cache:!1},e)).json&&(e.binary||(e.headers.Accept="application/json"),e.headers["Content-Type"]=e.headers["Content-Type"]||"application/json"),e.binary&&(e.encoding=null,e.json=!1),e.processData||(e.json=!1),oi(e,function(n,i,r){if(n)return t(re(n));var o,s=i.headers&&i.headers["content-type"],a=r||"";if(!e.binary&&(e.json||!e.processData)&&"object"!=typeof a&&(/json/.test(s)||/^[\s]*\{/.test(a)&&/\}[\s]*$/.test(a)))try{a=JSON.parse(a.toString())}catch(e){}i.statusCode>=200&&i.statusCode<300?function(t,n,i){if(!e.binary&&e.json&&"string"==typeof t)try{t=JSON.parse(t)}catch(e){return i(e)}Array.isArray(t)&&(t=t.map(function(e){return e.error||e.missing?re(e):e})),e.binary,i(null,t,n)}(a,i,t):((o=re(a)).status=i.statusCode,t(o))})}function ai(e,t){var n=navigator&&navigator.userAgent?navigator.userAgent.toLowerCase():"",i=-1!==n.indexOf("safari")&&-1===n.indexOf("chrome"),r=-1!==n.indexOf("msie"),o=-1!==n.indexOf("trident"),s=-1!==n.indexOf("edge"),a=i||(r||o||s)&&"GET"===e.method,c=!("cache"in e)||e.cache,l=/^blob:/.test(e.url);if(!l&&(a||!c)){var u=-1!==e.url.indexOf("?");e.url+=(u?"&":"?")+"_nonce="+Date.now()}return si(e,t)}var ci=25,li=50,ui=5e3,hi=1e4,di={};function fi(e){var t=e.doc||e.ok,n=t._attachments;n&&Object.keys(n).forEach(function(e){var t=n[e];t.data=Dt(t.data,t.content_type)})}function pi(e){return/^_design/.test(e)?"_design/"+encodeURIComponent(e.slice(8)):/^_local/.test(e)?"_local/"+encodeURIComponent(e.slice(7)):encodeURIComponent(e)}function mi(e){return e._attachments&&Object.keys(e._attachments)?f.all(Object.keys(e._attachments).map(function(t){var n=e._attachments[t];if(n.data&&"string"!=typeof n.data)return new f(function(e){Pt(n.data,e)}).then(function(e){n.data=e})})):f.resolve()}function vi(e,t){if(function(e){if(!e.prefix)return!1;var t=me(e.prefix).protocol;return"http"===t||"https"===t}(t)){var n=t.name.substr(t.prefix.length);e=t.prefix+encodeURIComponent(n)}var i=me(e);(i.user||i.password)&&(i.auth={username:i.user,password:i.password});var r=i.path.replace(/(^\/|\/$)/g,"").split("/");return i.db=r.pop(),-1===i.db.indexOf("%")&&(i.db=encodeURIComponent(i.db)),i.path=r.join("/"),i}function gi(e,t){return yi(e,e.db+"/"+t)}function yi(e,t){var n=e.path?"/":"";return e.protocol+"://"+e.host+(e.port?":"+e.port:"")+"/"+e.path+n+t}function bi(e){return"?"+Object.keys(e).map(function(t){return t+"="+encodeURIComponent(e[t])}).join("&")}function _i(e,t){var n,i=this,r=vi(e.name,e),a=gi(r,""),c=(e=b(e)).ajax||{};if(e.auth||r.auth){var l=e.auth||r.auth,u=l.username+":"+l.password,h=Tt(unescape(encodeURIComponent(u)));c.headers=c.headers||{},c.headers.Authorization="Basic "+h}function d(e,t,n){var r=(e||{}).ajax||{},o=q(b(c),r,t),s=b(c.headers||{});return o.headers=q(s,r.headers,t.headers||{}),i.constructor.listeners("debug").length&&i.constructor.emit("debug",["http",o.method,o.url]),i._ajax(o,n)}function p(e,t){return new f(function(n,i){d(e,t,function(e,t){if(e)return i(e);n(t)})})}function m(e,t){return k(e,o(function(e){v().then(function(){return t.apply(this,e)}).catch(function(t){var n=e.pop();n(t)})}))}function v(){if(e.skipSetup||e.skip_setup)return f.resolve();if(n)return n;var t={method:"GET",url:a};return(n=p({},t).catch(function(e){return e&&e.status&&404===e.status?(F(404,"PouchDB is just detecting if the remote exists."),p({},{method:"PUT",url:a})):f.reject(e)}).catch(function(e){return!(!e||!e.status||412!==e.status)||f.reject(e)})).catch(function(){n=null}),n}function g(e){return e.split("/").map(encodeURIComponent).join("/")}i._ajax=ai,s(function(){t(null,i)}),i._remote=!0,i.type=function(){return"http"},i.id=m("id",function(e){d({},{method:"GET",url:yi(r,"")},function(t,n){var i=n&&n.uuid?n.uuid+r.db:gi(r,"");e(null,i)})}),i.request=m("request",function(e,t){e.url=gi(r,e.url),d({},e,t)}),i.compact=m("compact",function(e,t){"function"==typeof e&&(t=e,e={}),d(e=b(e),{url:gi(r,"_compact"),method:"POST"},function(){!function n(){i.info(function(i,r){r&&!r.compact_running?t(null,{ok:!0}):setTimeout(n,e.interval||200)})}()})}),i.bulkGet=k("bulkGet",function(e,t){var n=this;function i(t){var n={};e.revs&&(n.revs=!0),e.attachments&&(n.attachments=!0),e.latest&&(n.latest=!0),d(e,{url:gi(r,"_bulk_get"+bi(n)),method:"POST",body:{docs:e.docs}},function(n,i){!n&&e.attachments&&e.binary&&i.results.forEach(function(e){e.docs.forEach(fi)}),t(n,i)})}function o(){var i=li,r=Math.ceil(e.docs.length/i),o=0,s=new Array(r);function a(e){return function(n,i){s[e]=i.results,++o===r&&t(null,{results:se(s)})}}for(var l=0;l<r;l++){var u=T(e,["revs","attachments","binary","latest"]);u.ajax=c,u.docs=e.docs.slice(l*i,Math.min(e.docs.length,(l+1)*i)),j(n,u,a(l))}}var s=yi(r,""),a=di[s];"boolean"!=typeof a?i(function(e,n){e?(di[s]=!1,F(e.status,"PouchDB is just detecting if the remote supports the _bulk_get API."),o()):(di[s]=!0,t(null,n))}):a?i(t):o()}),i._info=function(e){v().then(function(){d({},{method:"GET",url:gi(r,"")},function(t,n){if(t)return e(t);n.host=gi(r,""),e(null,n)})}).catch(e)},i.get=m("get",function(e,t,n){"function"==typeof t&&(n=t,t={});var i={};(t=b(t)).revs&&(i.revs=!0),t.revs_info&&(i.revs_info=!0),t.latest&&(i.latest=!0),t.open_revs&&("all"!==t.open_revs&&(t.open_revs=JSON.stringify(t.open_revs)),i.open_revs=t.open_revs),t.rev&&(i.rev=t.rev),t.conflicts&&(i.conflicts=t.conflicts),t.update_seq&&(i.update_seq=t.update_seq),e=pi(e);var o={method:"GET",url:gi(r,e+bi(i))};function s(e){var n=e._attachments,i=n&&Object.keys(n);if(n&&i.length){var o=i.map(function(i){return function(){return function(i){var o=n[i],s=pi(e._id)+"/"+g(i)+"?rev="+e._rev;return p(t,{method:"GET",url:gi(r,s),binary:!0}).then(function(e){return t.binary?e:new f(function(t){Pt(e,t)})}).then(function(e){delete o.stub,delete o.length,o.data=e})}(i)}});return function(e,t){return new f(function(n,i){var r,o=0,s=0,a=0,c=e.length;function l(){o++,e[s++]().then(h,d)}function u(){++a===c?r?i(r):n():f()}function h(){o--,u()}function d(e){o--,r=r||e,u()}function f(){for(;o<t&&s<c;)l()}f()})}(o,5)}}p(t,o).then(function(e){return f.resolve().then(function(){if(t.attachments)return function(e){return Array.isArray(e)?f.all(e.map(function(e){if(e.ok)return s(e.ok)})):s(e)}(e)}).then(function(){n(null,e)})}).catch(function(t){t.docId=e,n(t)})}),i.remove=m("remove",function(e,t,n,i){var o;"string"==typeof t?(o={_id:e,_rev:t},"function"==typeof n&&(i=n,n={})):(o=e,"function"==typeof t?(i=t,n={}):(i=n,n=t));var s=o._rev||n.rev;d(n,{method:"DELETE",url:gi(r,pi(o._id))+"?rev="+s},i)}),i.getAttachment=m("getAttachment",function(e,t,n,i){"function"==typeof n&&(i=n,n={});var o=n.rev?"?rev="+n.rev:"",s=gi(r,pi(e))+"/"+g(t)+o;d(n,{method:"GET",url:s,binary:!0},i)}),i.removeAttachment=m("removeAttachment",function(e,t,n,i){var o=gi(r,pi(e)+"/"+g(t))+"?rev="+n;d({},{method:"DELETE",url:o},i)}),i.putAttachment=m("putAttachment",function(e,t,n,i,o,s){"function"==typeof o&&(s=o,o=i,i=n,n=null);var a=pi(e)+"/"+g(t),l=gi(r,a);if(n&&(l+="?rev="+n),"string"==typeof i){var u;try{u=xt(i)}catch(e){return s(ie(K,"Attachment is not a valid base64 string"))}i=u?At(u,o):""}var h={headers:{"Content-Type":o},method:"PUT",url:l,processData:!1,body:i,timeout:c.timeout||6e4};d({},h,s)}),i._bulkDocs=function(e,t,n){e.new_edits=t.new_edits,v().then(function(){return f.all(e.docs.map(mi))}).then(function(){d(t,{method:"POST",url:gi(r,"_bulk_docs"),timeout:t.timeout,body:e},function(e,t){if(e)return n(e);t.forEach(function(e){e.ok=!0}),n(null,t)})}).catch(n)},i._put=function(e,t,n){v().then(function(){return mi(e)}).then(function(){d(t,{method:"PUT",url:gi(r,pi(e._id)),body:e},function(t,i){if(t)return t.docId=e&&e._id,n(t);n(null,i)})}).catch(n)},i.allDocs=m("allDocs",function(e,t){"function"==typeof e&&(t=e,e={});var n,i={},o="GET";(e=b(e)).conflicts&&(i.conflicts=!0),e.update_seq&&(i.update_seq=!0),e.descending&&(i.descending=!0),e.include_docs&&(i.include_docs=!0),e.attachments&&(i.attachments=!0),e.key&&(i.key=JSON.stringify(e.key)),e.start_key&&(e.startkey=e.start_key),e.startkey&&(i.startkey=JSON.stringify(e.startkey)),e.end_key&&(e.endkey=e.end_key),e.endkey&&(i.endkey=JSON.stringify(e.endkey)),void 0!==e.inclusive_end&&(i.inclusive_end=!!e.inclusive_end),void 0!==e.limit&&(i.limit=e.limit),void 0!==e.skip&&(i.skip=e.skip);var s=bi(i);void 0!==e.keys&&(o="POST",n={keys:e.keys}),p(e,{method:o,url:gi(r,"_all_docs"+s),body:n}).then(function(n){e.include_docs&&e.attachments&&e.binary&&n.rows.forEach(fi),t(null,n)}).catch(t)}),i._changes=function(e){var t="batch_size"in e?e.batch_size:ci;!(e=b(e)).continuous||"heartbeat"in e||(e.heartbeat=hi);var n="timeout"in e?e.timeout:"timeout"in c?c.timeout:3e4;"timeout"in e&&e.timeout&&n-e.timeout<ui&&(n=e.timeout+ui),"heartbeat"in e&&e.heartbeat&&n-e.heartbeat<ui&&(n=e.heartbeat+ui);var i={};"timeout"in e&&e.timeout&&(i.timeout=e.timeout);var o,a=void 0!==e.limit&&e.limit;o="return_docs"in e?e.return_docs:!("returnDocs"in e)||e.returnDocs;var l=a;if(e.style&&(i.style=e.style),(e.include_docs||e.filter&&"function"==typeof e.filter)&&(i.include_docs=!0),e.attachments&&(i.attachments=!0),e.continuous&&(i.feed="longpoll"),e.seq_interval&&(i.seq_interval=e.seq_interval),e.conflicts&&(i.conflicts=!0),e.descending&&(i.descending=!0),e.update_seq&&(i.update_seq=!0),"heartbeat"in e&&e.heartbeat&&(i.heartbeat=e.heartbeat),e.filter&&"string"==typeof e.filter&&(i.filter=e.filter),e.view&&"string"==typeof e.view&&(i.filter="_view",i.view=e.view),e.query_params&&"object"==typeof e.query_params)for(var u in e.query_params)e.query_params.hasOwnProperty(u)&&(i[u]=e.query_params[u]);var h,f,p,m="GET";e.doc_ids?(i.filter="_doc_ids",m="POST",h={doc_ids:e.doc_ids}):e.selector&&(i.filter="_selector",m="POST",h={selector:e.selector});var g=function(o,s){if(!e.aborted){i.since=o,"object"==typeof i.since&&(i.since=JSON.stringify(i.since)),e.descending?a&&(i.limit=l):i.limit=!a||l>t?t:l;var c={method:m,url:gi(r,"_changes"+bi(i)),timeout:n,body:h};p=o,e.aborted||v().then(function(){f=d(e,c,s)}).catch(s)}},y={results:[]},_=function(n,i){if(!e.aborted){var r=0;if(i&&i.results){r=i.results.length,y.last_seq=i.last_seq;var c=null,u=null;"number"==typeof i.pending&&(c=i.pending),"string"!=typeof y.last_seq&&"number"!=typeof y.last_seq||(u=y.last_seq),e.query_params,i.results=i.results.filter(function(t){l--;var n=oe(e)(t);return n&&(e.include_docs&&e.attachments&&e.binary&&fi(t),o&&y.results.push(t),e.onChange(t,c,u)),n})}else if(n)return e.aborted=!0,void e.complete(n);i&&i.last_seq&&(p=i.last_seq);var h=a&&l<=0||i&&r<t||e.descending;(!e.continuous||a&&l<=0)&&h?e.complete(null,y):s(function(){g(p,_)})}};return g(e.since||0,_),{cancel:function(){e.aborted=!0,f&&f.abort()}}},i.revsDiff=m("revsDiff",function(e,t,n){"function"==typeof t&&(n=t,t={}),d(t,{method:"POST",url:gi(r,"_revs_diff"),body:e},n)}),i._close=function(e){e()},i._destroy=function(e,t){d(e,{url:gi(r,""),method:"DELETE"},function(e,n){if(e&&e.status&&404!==e.status)return t(e);t(null,n)})}}function wi(e){this.status=400,this.name="query_parse_error",this.message=e,this.error=!0;try{Error.captureStackTrace(this,wi)}catch(e){}}function ki(e){this.status=404,this.name="not_found",this.message=e,this.error=!0;try{Error.captureStackTrace(this,ki)}catch(e){}}function Ei(e){this.status=500,this.name="invalid_value",this.message=e,this.error=!0;try{Error.captureStackTrace(this,Ei)}catch(e){}}function Ci(e,t){return t&&e.then(function(e){s(function(){t(null,e)})},function(e){s(function(){t(e)})}),e}function Si(e,t){return function(){var n=arguments,i=this;return e.add(function(){return t.apply(i,n)})}}function xi(e){var t=new m(e),n=new Array(t.size),i=-1;return t.forEach(function(e){n[++i]=e}),n}function Ti(e){var t=new Array(e.size),n=-1;return e.forEach(function(e,i){t[++n]=i}),t}function Oi(e){var t="builtin "+e+" function requires map values to be numbers or number arrays";return new Ei(t)}function Ai(e){for(var t=0,n=0,i=e.length;n<i;n++){var r=e[n];if("number"!=typeof r){if(!Array.isArray(r))throw Oi("_sum");t="number"==typeof t?[t]:t;for(var o=0,s=r.length;o<s;o++){var a=r[o];if("number"!=typeof a)throw Oi("_sum");void 0===t[o]?t.push(a):t[o]+=a}}else"number"==typeof t?t+=r:t[0]+=r}return t}_i.valid=function(){return!0},c(wi,Error),c(ki,Error),c(Ei,Error);var Di=M.bind(null,"log"),Ii=Array.isArray,ji=JSON.parse;function Ni(e,t){return ve("return ("+e.replace(/;\s*$/,"")+");",{emit:t,sum:Ai,log:Di,isArray:Ii,toJSON:ji})}function Pi(){this.promise=new f(function(e){e()})}function Li(e){if(!e)return"undefined";switch(typeof e){case"function":case"string":return e.toString();default:return JSON.stringify(e)}}function Mi(e,t,n,i,r,o){var s,a=function(e,t){return Li(e)+Li(t)+"undefined"}(n,i);if(!r&&(s=e._cachedViews=e._cachedViews||{})[a])return s[a];var c=e.info().then(function(c){var l=c.db_name+"-mrview-"+(r?"temp":function(e){return h.hash(e)}(a));return ge(e,"_local/"+o,function(e){e.views=e.views||{};var n=t;-1===n.indexOf("/")&&(n=t+"/"+t);var i=e.views[n]=e.views[n]||{};if(!i[l])return i[l]=!0,e}).then(function(){return e.registerDependentDatabase(l).then(function(t){var r=t.db;r.auto_compaction=!0;var o={name:l,db:r,sourceDB:e,adapter:e.adapter,mapFun:n,reduceFun:i};return o.db.get("_local/lastSeq").catch(function(e){if(404!==e.status)throw e}).then(function(e){return o.seq=e?e.seq:0,s&&o.db.once("destroyed",function(){delete s[a]}),o})})})});return s&&(s[a]=c),c}Pi.prototype.add=function(e){return this.promise=this.promise.catch(function(){}).then(function(){return e()}),this.promise},Pi.prototype.finish=function(){return this.promise};var Ri={},Fi=new Pi,qi=50;function Ui(e){return-1===e.indexOf("/")?[e,e]:e.split("/")}function $i(e,t){try{e.emit("error",t)}catch(e){M("error","The user's map/reduce function threw an uncaught error.\nYou can debug this error by doing:\nmyDatabase.on('error', function (err) { debugger; });\nPlease double-check your map/reduce function."),M("error",t)}}var Hi={_sum:function(e,t){return Ai(t)},_count:function(e,t){return t.length},_stats:function(e,t){return{sum:Ai(t),min:Math.min.apply(null,t),max:Math.max.apply(null,t),count:t.length,sumsqr:function(e){for(var t=0,n=0,i=e.length;n<i;n++){var r=e[n];t+=r*r}return t}(t)}}},Wi=function(e,t,n,i){function r(e,t,n){try{t(n)}catch(t){$i(e,t)}}function a(e,t,n,i,r){try{return{output:t(n,i,r)}}catch(t){return $i(e,t),{error:t}}}function c(e,t){var n=nt(e.key,t.key);return 0!==n?n:nt(e.value,t.value)}function l(e){var t=e.value,n=t&&"object"==typeof t&&t._id||e.id;return n}function u(e){return function(t){return e.include_docs&&e.attachments&&e.binary&&function(e){e.rows.forEach(function(e){var t=e.doc&&e.doc._attachments;t&&Object.keys(t).forEach(function(e){var n=t[e];t[e].data=Dt(n.data,n.content_type)})})}(t),t}}function h(e,t,n,i){var r=t[e];void 0!==r&&(i&&(r=encodeURIComponent(JSON.stringify(r))),n.push(e+"="+r))}function d(e){if(void 0!==e){var t=Number(e);return isNaN(t)||t!==parseInt(e,10)?e:t}}function p(e,t){var n=e.descending?"endkey":"startkey",i=e.descending?"startkey":"endkey";if(void 0!==e[n]&&void 0!==e[i]&&nt(e[n],e[i])>0)throw new wi("No rows can match your key range, reverse your start_key and end_key or set {descending : true}");if(t.reduce&&!1!==e.reduce){if(e.include_docs)throw new wi("{include_docs:true} is invalid for reduce");if(e.keys&&e.keys.length>1&&!e.group&&!e.group_level)throw new wi("Multi-key fetches for reduce views must use {group: true}")}["group_level","limit","skip"].forEach(function(t){var n=function(e){if(e){if("number"!=typeof e)return new wi('Invalid value for integer: "'+e+'"');if(e<0)return new wi('Invalid value for positive integer: "'+e+'"')}}(e[t]);if(n)throw n})}function g(e){return function(t){if(404===t.status)return e;throw t}}function y(e,t,n){var i="_local/doc_"+e,r={_id:i,keys:[]},o=n.get(e),s=o[0],a=o[1];return(function(e){return 1===e.length&&/^1-/.test(e[0].rev)}(a)?f.resolve(r):t.db.get(i).catch(g(r))).then(function(e){return function(e){return e.keys.length?t.db.allDocs({keys:e.keys,include_docs:!0}):f.resolve({rows:[]})}(e).then(function(t){return function(e,t){for(var n=[],i=new m,r=0,o=t.rows.length;r<o;r++){var a=t.rows[r],c=a.doc;if(c&&(n.push(c),i.add(c._id),c._deleted=!s.has(c._id),!c._deleted)){var l=s.get(c._id);"value"in l&&(c.value=l.value)}}var u=Ti(s);return u.forEach(function(e){if(!i.has(e)){var t={_id:e},r=s.get(e);"value"in r&&(t.value=r.value),n.push(t)}}),e.keys=xi(u.concat(e.keys)),n.push(e),n}(e,t)})})}function b(e){var t="string"==typeof e?e:e.name,n=Ri[t];return n||(n=Ri[t]=new Pi),n}function _(e){return Si(b(e),function(){return w(e)})()}function w(e){var n,i,o=t(e.mapFun,function(e,t){var r={id:i._id,key:it(e)};void 0!==t&&null!==t&&(r.value=it(t)),n.push(r)}),s=e.seq||0;function a(t,n){return function(){return function(e,t,n){return e.db.get("_local/lastSeq").catch(g({_id:"_local/lastSeq",seq:0})).then(function(i){var r=Ti(t);return f.all(r.map(function(n){return y(n,e,t)})).then(function(t){var r=se(t);return i.seq=n,r.push(i),e.db.bulkDocs({docs:r})})})}(e,t,n)}}var l=new Pi;function u(){return e.sourceDB.changes({conflicts:!0,include_docs:!0,style:"all_docs",since:s,limit:qi}).then(h)}function h(t){var h=t.results;if(h.length){var f=function(t){for(var a=new v,l=0,u=t.length;l<u;l++){var h=t[l];if("_"!==h.doc._id[0]){n=[],(i=h.doc)._deleted||r(e.sourceDB,o,i),n.sort(c);var f=d(n);a.set(h.doc._id,[f,h.changes])}s=h.seq}return a}(h);if(l.add(a(f,s)),!(h.length<qi))return u()}}function d(e){for(var t,n=new v,i=0,r=e.length;i<r;i++){var o=e[i],s=[o.key,o.id];i>0&&0===nt(o.key,t)&&s.push(i),n.set(ot(s),o),t=o.key}return n}return u().then(function(){return l.finish()}).then(function(){e.seq=s})}function k(e,t){return Si(b(e),function(){return E(e,t)})()}function E(e,t){var i,r=e.reduceFun&&!1!==t.reduce,o=t.skip||0;function s(t){return t.include_docs=!0,e.db.allDocs(t).then(function(e){return i=e.total_rows,e.rows.map(function(e){if("value"in e.doc&&"object"==typeof e.doc.value&&null!==e.doc.value){var t=Object.keys(e.doc.value).sort(),n=["id","key","value"];if(!(t<n||t>n))return e.doc.value}var i=function(e){for(var t=[],n=[],i=0;;){var r=e[i++];if("\0"!==r)switch(r){case"1":t.push(null);break;case"2":t.push("1"===e[i]),i++;break;case"3":var o=st(e,i);t.push(o.num),i+=o.length;break;case"4":for(var s="";;){var a=e[i];if("\0"===a)break;s+=a,i++}s=s.replace(/\u0001\u0001/g,"\0").replace(/\u0001\u0002/g,"").replace(/\u0002\u0002/g,""),t.push(s);break;case"5":var c={element:[],index:t.length};t.push(c.element),n.push(c);break;case"6":var l={element:{},index:t.length};t.push(l.element),n.push(l);break;default:throw new Error("bad collationIndex or unexpectedly reached end of input: "+r)}else{if(1===t.length)return t.pop();at(t,n)}}}(e.doc._id);return{key:i[0],id:i[1],value:"value"in e.doc?e.doc.value:null}})})}function c(s){var c;if(c=r?function(e,t,i){0===i.group_level&&delete i.group_level;var r=i.group||i.group_level,o=n(e.reduceFun),s=[],c=isNaN(i.group_level)?Number.POSITIVE_INFINITY:i.group_level;t.forEach(function(e){var t=s[s.length-1],n=r?e.key:null;if(r&&Array.isArray(n)&&(n=n.slice(0,c)),t&&0===nt(t.groupKey,n))return t.keys.push([e.key,e.id]),void t.values.push(e.value);s.push({keys:[[e.key,e.id]],values:[e.value],groupKey:n})}),t=[];for(var l=0,u=s.length;l<u;l++){var h=s[l],d=a(e.sourceDB,o,h.keys,h.values,!1);if(d.error&&d.error instanceof Ei)throw d.error;t.push({value:d.error?null:d.output,key:h.groupKey})}return{rows:function(e,t,n){return n=n||0,"number"==typeof t?e.slice(n,t+n):n>0?e.slice(n):e}(t,i.limit,i.skip)}}(e,s,t):{total_rows:i,offset:o,rows:s},t.update_seq&&(c.update_seq=e.seq),t.include_docs){var u=xi(s.map(l));return e.sourceDB.allDocs({keys:u,include_docs:!0,conflicts:t.conflicts,attachments:t.attachments,binary:t.binary}).then(function(e){var t=new v;return e.rows.forEach(function(e){t.set(e.id,e.doc)}),s.forEach(function(e){var n=l(e),i=t.get(n);i&&(e.doc=i)}),c})}return c}if(void 0===t.keys||t.keys.length||(t.limit=0,delete t.keys),void 0!==t.keys){var u=t.keys,h=u.map(function(e){var n={startkey:ot([e]),endkey:ot([e,{}])};return t.update_seq&&(n.update_seq=!0),s(n)});return f.all(h).then(se).then(c)}var d,p,m={descending:t.descending};if(t.update_seq&&(m.update_seq=!0),"start_key"in t&&(d=t.start_key),"startkey"in t&&(d=t.startkey),"end_key"in t&&(p=t.end_key),"endkey"in t&&(p=t.endkey),void 0!==d&&(m.startkey=t.descending?ot([d,{}]):ot([d])),void 0!==p){var g=!1!==t.inclusive_end;t.descending&&(g=!g),m.endkey=ot(g?[p,{}]:[p])}if(void 0!==t.key){var y=ot([t.key]),b=ot([t.key,{}]);m.descending?(m.endkey=y,m.startkey=b):(m.startkey=y,m.endkey=b)}return r||("number"==typeof t.limit&&(m.limit=t.limit),m.skip=o),s(m).then(c)}function C(t,n,r){if("function"==typeof t._query)return function(e,t,n){return new f(function(i,r){e._query(t,n,function(e,t){if(e)return r(e);i(t)})})}(t,n,r);if(ce(t))return function(e,t,n){var i,r=[],o="GET";if(h("reduce",n,r),h("include_docs",n,r),h("attachments",n,r),h("limit",n,r),h("descending",n,r),h("group",n,r),h("group_level",n,r),h("skip",n,r),h("stale",n,r),h("conflicts",n,r),h("startkey",n,r,!0),h("start_key",n,r,!0),h("endkey",n,r,!0),h("end_key",n,r,!0),h("inclusive_end",n,r),h("key",n,r,!0),h("update_seq",n,r),r=""===(r=r.join("&"))?"":"?"+r,void 0!==n.keys){var s="keys="+encodeURIComponent(JSON.stringify(n.keys));s.length+r.length+1<=2e3?r+=("?"===r[0]?"&":"?")+s:(o="POST","string"==typeof t?i={keys:n.keys}:t.keys=n.keys)}if("string"==typeof t){var a=Ui(t);return e.request({method:o,url:"_design/"+a[0]+"/_view/"+a[1]+r,body:i}).then(function(e){return e.rows.forEach(function(e){if(e.value&&e.value.error&&"builtin_reduce_error"===e.value.error)throw new Error(e.reason)}),e}).then(u(n))}return i=i||{},Object.keys(t).forEach(function(e){Array.isArray(t[e])?i[e]=t[e]:i[e]=t[e].toString()}),e.request({method:"POST",url:"_temp_view"+r,body:i}).then(u(n))}(t,n,r);if("string"!=typeof n)return p(r,n),Fi.add(function(){var i=Mi(t,"temp_view/temp_view",n.map,n.reduce,!0,e);return i.then(function(e){return function(e,t){return e.then(function(e){return t().then(function(){return e})},function(e){return t().then(function(){throw e})})}(_(e).then(function(){return k(e,r)}),function(){return e.db.destroy()})})}),Fi.finish();var o=n,a=Ui(o),c=a[0],l=a[1];return t.get("_design/"+c).then(function(n){var a=n.views&&n.views[l];if(!a)throw new ki("ddoc "+n._id+" has no view named "+l);i(n,l),p(r,a);var c=Mi(t,o,a.map,a.reduce,!1,e);return c.then(function(e){return"ok"===r.stale||"update_after"===r.stale?("update_after"===r.stale&&s(function(){_(e)}),k(e,r)):_(e).then(function(){return k(e,r)})})})}return{query:function(e,t,n){var i=this;"function"==typeof t&&(n=t,t={}),t=t?function(e){return e.group_level=d(e.group_level),e.limit=d(e.limit),e.skip=d(e.skip),e}(t):{},"function"==typeof e&&(e={map:e});var r=f.resolve().then(function(){return C(i,e,t)});return Ci(r,n),r},viewCleanup:function(e){return o(function(t){var n=t.pop(),i=e.apply(this,t);return"function"==typeof n&&Ci(i,n),i})}(function(){var t=this;return"function"==typeof t._viewCleanup?function(e){return new f(function(t,n){e._viewCleanup(function(e,i){if(e)return n(e);t(i)})})}(t):ce(t)?function(e){return e.request({method:"POST",url:"_view_cleanup"})}(t):function(t){return t.get("_local/"+e).then(function(e){var n=new v;Object.keys(e.views).forEach(function(e){var t=Ui(e),i="_design/"+t[0],r=t[1],o=n.get(i);o||(o=new m,n.set(i,o)),o.add(r)});var i={keys:Ti(n),include_docs:!0};return t.allDocs(i).then(function(i){var r={};i.rows.forEach(function(t){var i=t.key.substring(8);n.get(t.key).forEach(function(n){var o=i+"/"+n;e.views[o]||(o=n);var s=Object.keys(e.views[o]),a=t.doc&&t.doc.views&&t.doc.views[n];s.forEach(function(e){r[e]=r[e]||a})})});var o=Object.keys(r).filter(function(e){return!r[e]}),s=o.map(function(e){return Si(b(e),function(){return new t.constructor(e,t.__opts).destroy()})()});return f.all(s).then(function(){return{ok:!0}})})},g({ok:!0}))}(t)})}}("mrviews",function(e,t){if("function"==typeof e&&2===e.length){var n=e;return function(e){return n(e,t)}}return Ni(e.toString(),t)},function(e){var t=e.toString(),n=function(e){if(/^_sum/.test(e))return Hi._sum;if(/^_count/.test(e))return Hi._count;if(/^_stats/.test(e))return Hi._stats;if(/^_/.test(e))throw new Error(e+" is not a supported reduce function.")}(t);return n||Ni(t)},function(e,t){var n=e.views&&e.views[t];if("string"!=typeof n.map)throw new ki("ddoc "+e._id+" has no string view named "+t+", instead found object of type: "+typeof n.map)}),Bi={query:function(e,t,n){return Wi.query.call(this,e,t,n)},viewCleanup:function(e){return Wi.viewCleanup.call(this,e)}};function zi(e){return/^1-/.test(e)}function Vi(e,t){var n=Object.keys(t._attachments);return f.all(n.map(function(n){return e.getAttachment(t._id,n,{rev:t._rev})}))}function Gi(e,t,n,i){n=b(n);var r=[],o=!0;function s(t){return e.allDocs({keys:t,include_docs:!0,conflicts:!0}).then(function(e){if(i.cancelled)throw new Error("cancelled");e.rows.forEach(function(e){e.deleted||!e.doc||!zi(e.value.rev)||function(e){return e._attachments&&Object.keys(e._attachments).length>0}(e.doc)||function(e){return e._conflicts&&e._conflicts.length>0}(e.doc)||(e.doc._conflicts&&delete e.doc._conflicts,r.push(e.doc),delete n[e.id])})})}return f.resolve().then(function(){var e=Object.keys(n).filter(function(e){var t=n[e].missing;return 1===t.length&&zi(t[0])});if(e.length>0)return s(e)}).then(function(){var s=function(e){var t=[];return Object.keys(e).forEach(function(n){e[n].missing.forEach(function(e){t.push({id:n,rev:e})})}),{docs:t,revs:!0,latest:!0}}(n);if(s.docs.length)return e.bulkGet(s).then(function(n){if(i.cancelled)throw new Error("cancelled");return f.all(n.results.map(function(n){return f.all(n.docs.map(function(n){var i=n.ok;return n.error&&(o=!1),i&&i._attachments?function(e,t,n){var i=ce(t)&&!ce(e),r=Object.keys(n._attachments);return i?e.get(n._id).then(function(i){return f.all(r.map(function(r){return function(e,t,n){return!e._attachments||!e._attachments[n]||e._attachments[n].digest!==t._attachments[n].digest}(i,n,r)?t.getAttachment(n._id,r):e.getAttachment(i._id,r)}))}).catch(function(e){if(404!==e.status)throw e;return Vi(t,n)}):Vi(t,n)}(t,e,i).then(function(e){var t=Object.keys(i._attachments);return e.forEach(function(e,n){var r=i._attachments[t[n]];delete r.stub,delete r.length,r.data=e}),i}):i}))})).then(function(e){r=r.concat(se(e).filter(Boolean))})})}).then(function(){return{ok:o,docs:r}})}var Ki=1,Yi="pouchdb",Qi=5,Xi=0;function Ji(e,t,n,i,r){return e.get(t).catch(function(n){if(404===n.status)return"http"!==e.adapter&&"https"!==e.adapter||F(404,"PouchDB is just checking if a remote checkpoint exists."),{session_id:i,_id:t,history:[],replicator:Yi,version:Ki};throw n}).then(function(o){if(!r.cancelled&&o.last_seq!==n)return o.history=(o.history||[]).filter(function(e){return e.session_id!==i}),o.history.unshift({last_seq:n,session_id:i}),o.history=o.history.slice(0,Qi),o.version=Ki,o.replicator=Yi,o.session_id=i,o.last_seq=n,e.put(o).catch(function(o){if(409===o.status)return Ji(e,t,n,i,r);throw o})})}function Zi(e,t,n,i,r){this.src=e,this.target=t,this.id=n,this.returnValue=i,this.opts=r||{}}Zi.prototype.writeCheckpoint=function(e,t){var n=this;return this.updateTarget(e,t).then(function(){return n.updateSource(e,t)})},Zi.prototype.updateTarget=function(e,t){return this.opts.writeTargetCheckpoint?Ji(this.target,this.id,e,t,this.returnValue):f.resolve(!0)},Zi.prototype.updateSource=function(e,t){if(this.opts.writeSourceCheckpoint){var n=this;return Ji(this.src,this.id,e,t,this.returnValue).catch(function(e){if(nr(e))return n.opts.writeSourceCheckpoint=!1,!0;throw e})}return f.resolve(!0)};var er={undefined:function(e,t){return 0===nt(e.last_seq,t.last_seq)?t.last_seq:0},1:function(e,t){return function(e,t){return e.session_id===t.session_id?{last_seq:e.last_seq,history:e.history}:function e(t,n){var i=t[0],r=t.slice(1),o=n[0],s=n.slice(1);if(!i||0===n.length)return{last_seq:Xi,history:[]};var a=i.session_id;if(tr(a,n))return{last_seq:i.last_seq,history:t};var c=o.session_id;return tr(c,r)?{last_seq:o.last_seq,history:s}:e(r,s)}(e.history,t.history)}(t,e).last_seq}};function tr(e,t){var n=t[0],i=t.slice(1);return!(!e||0===t.length)&&(e===n.session_id||tr(e,i))}function nr(e){return"number"==typeof e.status&&4===Math.floor(e.status/100)}Zi.prototype.getCheckpoint=function(){var e=this;return e.opts&&e.opts.writeSourceCheckpoint&&!e.opts.writeTargetCheckpoint?e.src.get(e.id).then(function(e){return e.last_seq||Xi}).catch(function(e){if(404!==e.status)throw e;return Xi}):e.target.get(e.id).then(function(t){return e.opts&&e.opts.writeTargetCheckpoint&&!e.opts.writeSourceCheckpoint?t.last_seq||Xi:e.src.get(e.id).then(function(e){return t.version!==e.version?Xi:(n=t.version?t.version.toString():"undefined")in er?er[n](t,e):Xi;var n},function(n){if(404===n.status&&t.last_seq)return e.src.put({_id:e.id,last_seq:Xi}).then(function(){return Xi},function(n){return nr(n)?(e.opts.writeSourceCheckpoint=!1,t.last_seq):Xi});throw n})}).catch(function(e){if(404!==e.status)throw e;return Xi})};var ir=0;function rr(e,t,n){var i=n.doc_ids?n.doc_ids.sort(nt):"",r=n.filter?n.filter.toString():"",o="",s="",a="";return n.selector&&(a=JSON.stringify(n.selector)),n.filter&&n.query_params&&(o=JSON.stringify(function(e){return Object.keys(e).sort(nt).reduce(function(t,n){return t[n]=e[n],t},{})}(n.query_params))),n.filter&&"_view"===n.filter&&(s=n.view.toString()),f.all([e.id(),t.id()]).then(function(e){var t=e[0]+e[1]+r+s+o+i+a;return new f(function(e){Ut(t,e)})}).then(function(e){return"_local/"+(e=e.replace(/\//g,".").replace(/\+/g,"_"))})}function or(e,t,n,i,r){var o,s,a,c=[],l={seq:0,changes:[],docs:[]},u=!1,h=!1,d=!1,p=0,m=n.continuous||n.live||!1,v=n.batch_size||100,g=n.batches_limit||10,y=!1,_=n.doc_ids,w=n.selector,k=[],E=be(),C=n.seq_interval;r=r||{ok:!0,start_time:new Date,docs_read:0,docs_written:0,doc_write_failures:0,errors:[]};var S={};function x(){return a?f.resolve():rr(e,t,n).then(function(r){s=r;var o={};o=!1===n.checkpoint?{writeSourceCheckpoint:!1,writeTargetCheckpoint:!1}:"source"===n.checkpoint?{writeSourceCheckpoint:!0,writeTargetCheckpoint:!1}:"target"===n.checkpoint?{writeSourceCheckpoint:!1,writeTargetCheckpoint:!0}:{writeSourceCheckpoint:!0,writeTargetCheckpoint:!0},a=new Zi(e,t,s,i,o)})}function T(){if(k=[],0!==o.docs.length){var e=o.docs,s={timeout:n.timeout};return t.bulkDocs({docs:e,new_edits:!1},s).then(function(t){if(i.cancelled)throw N(),new Error("cancelled");var n=Object.create(null);t.forEach(function(e){e.error&&(n[e.id]=e)});var o=Object.keys(n).length;r.doc_write_failures+=o,r.docs_written+=e.length-o,e.forEach(function(e){var t=n[e._id];if(t){r.errors.push(t);var o=(t.name||"").toLowerCase();if("unauthorized"!==o&&"forbidden"!==o)throw t;i.emit("denied",b(t))}else k.push(e)})},function(t){throw r.doc_write_failures+=e.length,t})}}function O(){if(o.error)throw new Error("There was a problem getting docs.");r.last_seq=p=o.seq;var e=b(r);return k.length&&(e.docs=k,"number"==typeof o.pending&&(e.pending=o.pending,delete o.pending),i.emit("change",e)),u=!0,a.writeCheckpoint(o.seq,E).then(function(){if(u=!1,i.cancelled)throw N(),new Error("cancelled");o=void 0,F()}).catch(function(e){throw U(e),e})}function A(){return Gi(e,t,o.diffs,i).then(function(e){o.error=!e.ok,e.docs.forEach(function(e){delete o.diffs[e._id],r.docs_read++,o.docs.push(e)})})}function D(){i.cancelled||o||(0!==c.length?(o=c.shift(),function(){var e={};return o.changes.forEach(function(t){"_user/"!==t.id&&(e[t.id]=t.changes.map(function(e){return e.rev}))}),t.revsDiff(e).then(function(e){if(i.cancelled)throw N(),new Error("cancelled");o.diffs=e})}().then(A).then(T).then(O).then(D).catch(function(e){j("batch processing terminated with error",e)})):I(!0))}function I(e){0!==l.changes.length?(e||h||l.changes.length>=v)&&(c.push(l),l={seq:0,changes:[],docs:[]},"pending"!==i.state&&"stopped"!==i.state||(i.state="active",i.emit("active")),D()):0!==c.length||o||((m&&S.live||h)&&(i.state="pending",i.emit("paused")),h&&N())}function j(e,t){d||(t.message||(t.message=e),r.ok=!1,r.status="aborting",c=[],l={seq:0,changes:[],docs:[]},N(t))}function N(o){if(!(d||i.cancelled&&(r.status="cancelled",u)))if(r.status=r.status||"complete",r.end_time=new Date,r.last_seq=p,d=!0,o){(o=ie(o)).result=r;var s=(o.name||"").toLowerCase();"unauthorized"===s||"forbidden"===s?(i.emit("error",o),i.removeAllListeners()):function(e,t,n,i){if(!1===e.retry)return t.emit("error",n),void t.removeAllListeners();if("function"!=typeof e.back_off_function&&(e.back_off_function=R),t.emit("requestError",n),"active"===t.state||"pending"===t.state){t.emit("paused",n),t.state="stopped";var r=function(){e.current_back_off=ir};t.once("paused",function(){t.removeListener("active",r)}),t.once("active",r)}e.current_back_off=e.current_back_off||ir,e.current_back_off=e.back_off_function(e.current_back_off),setTimeout(i,e.current_back_off)}(n,i,o,function(){or(e,t,n,i)})}else i.emit("complete",r),i.removeAllListeners()}function P(e,t,r){if(i.cancelled)return N();"number"==typeof t&&(l.pending=t);var o=oe(n)(e);o&&(l.seq=e.seq||r,l.changes.push(e),I(0===c.length&&S.live))}function L(e){if(y=!1,i.cancelled)return N();if(e.results.length>0)S.since=e.last_seq,F(),I(!0);else{var t=function(){m?(S.live=!0,F()):h=!0,I(!0)};o||0!==e.results.length?t():(u=!0,a.writeCheckpoint(e.last_seq,E).then(function(){u=!1,r.last_seq=p=e.last_seq,t()}).catch(U))}}function M(e){if(y=!1,i.cancelled)return N();j("changes rejected",e)}function F(){if(!y&&!h&&c.length<g){y=!0,i._changes&&(i.removeListener("cancel",i._abortChanges),i._changes.cancel()),i.once("cancel",r);var t=e.changes(S).on("change",P);t.then(o,o),t.then(L).catch(M),n.retry&&(i._changes=t,i._abortChanges=r)}function r(){t.cancel()}function o(){i.removeListener("cancel",r)}}function q(){x().then(function(){if(!i.cancelled)return a.getCheckpoint().then(function(e){S={since:p=e,limit:v,batch_size:v,style:"all_docs",doc_ids:_,selector:w,return_docs:!0},!1!==C&&(S.seq_interval=C||v),n.filter&&("string"!=typeof n.filter?S.include_docs=!0:S.filter=n.filter),"heartbeat"in n&&(S.heartbeat=n.heartbeat),"timeout"in n&&(S.timeout=n.timeout),n.query_params&&(S.query_params=n.query_params),n.view&&(S.view=n.view),F()});N()}).catch(function(e){j("getCheckpoint rejected with ",e)})}function U(e){u=!1,j("writeCheckpoint completed with error",e)}i.ready(e,t),i.cancelled?N():(i._addedListeners||(i.once("cancel",N),"function"==typeof n.complete&&(i.once("error",n.complete),i.once("complete",function(e){n.complete(null,e)})),i._addedListeners=!0),void 0===n.since?q():x().then(function(){return u=!0,a.writeCheckpoint(n.since,E)}).then(function(){u=!1,i.cancelled?N():(p=n.since,q())}).catch(U))}function sr(){a.EventEmitter.call(this),this.cancelled=!1,this.state="pending";var e=this,t=new f(function(t,n){e.once("complete",t),e.once("error",n)});e.then=function(e,n){return t.then(e,n)},e.catch=function(e){return t.catch(e)},e.catch(function(){})}function ar(e,t){var n=t.PouchConstructor;return"string"==typeof e?new n(e,t):e}function cr(e,t,n,i){if("function"==typeof n&&(i=n,n={}),void 0===n&&(n={}),n.doc_ids&&!Array.isArray(n.doc_ids))throw ie(X,"`doc_ids` filter parameter is not a list.");n.complete=i,(n=b(n)).continuous=n.continuous||n.live,n.retry="retry"in n&&n.retry,n.PouchConstructor=n.PouchConstructor||this;var r=new sr(n),o=ar(e,n),s=ar(t,n);return or(o,s,n,r),r}function lr(e,t,n,i){return"function"==typeof n&&(i=n,n={}),void 0===n&&(n={}),(n=b(n)).PouchConstructor=n.PouchConstructor||this,e=ar(e,n),t=ar(t,n),new ur(e,t,n,i)}function ur(e,t,n,i){var r=this;this.canceled=!1;var o=n.push?q({},n,n.push):n,s=n.pull?q({},n,n.pull):n;function a(e){r.emit("change",{direction:"pull",change:e})}function c(e){r.emit("change",{direction:"push",change:e})}function l(e){r.emit("denied",{direction:"push",doc:e})}function u(e){r.emit("denied",{direction:"pull",doc:e})}function h(){r.pushPaused=!0,r.pullPaused&&r.emit("paused")}function d(){r.pullPaused=!0,r.pushPaused&&r.emit("paused")}function p(){r.pushPaused=!1,r.pullPaused&&r.emit("active",{direction:"push"})}function m(){r.pullPaused=!1,r.pushPaused&&r.emit("active",{direction:"pull"})}this.push=cr(e,t,o),this.pull=cr(t,e,s),this.pushPaused=!0,this.pullPaused=!0;var v={};function g(e){return function(t,n){var i="change"===t&&(n===a||n===c),o="denied"===t&&(n===u||n===l),s="paused"===t&&(n===d||n===h),f="active"===t&&(n===m||n===p);(i||o||s||f)&&(t in v||(v[t]={}),v[t][e]=!0,2===Object.keys(v[t]).length&&r.removeAllListeners(t))}}function y(e,t,n){-1==e.listeners(t).indexOf(n)&&e.on(t,n)}n.live&&(this.push.on("complete",r.pull.cancel.bind(r.pull)),this.pull.on("complete",r.push.cancel.bind(r.push))),this.on("newListener",function(e){"change"===e?(y(r.pull,"change",a),y(r.push,"change",c)):"denied"===e?(y(r.pull,"denied",u),y(r.push,"denied",l)):"active"===e?(y(r.pull,"active",m),y(r.push,"active",p)):"paused"===e&&(y(r.pull,"paused",d),y(r.push,"paused",h))}),this.on("removeListener",function(e){"change"===e?(r.pull.removeListener("change",a),r.push.removeListener("change",c)):"denied"===e?(r.pull.removeListener("denied",u),r.push.removeListener("denied",l)):"active"===e?(r.pull.removeListener("active",m),r.push.removeListener("active",p)):"paused"===e&&(r.pull.removeListener("paused",d),r.push.removeListener("paused",h))}),this.pull.on("removeListener",g("pull")),this.push.on("removeListener",g("push"));var b=f.all([this.push,this.pull]).then(function(e){var t={push:e[0],pull:e[1]};return r.emit("complete",t),i&&i(null,t),r.removeAllListeners(),t},function(e){if(r.cancel(),i?i(e):r.emit("error",e),r.removeAllListeners(),i)throw e});this.then=function(e,t){return b.then(e,t)},this.catch=function(e){return b.catch(e)}}c(sr,a.EventEmitter),sr.prototype.cancel=function(){this.cancelled=!0,this.state="cancelled",this.emit("cancel")},sr.prototype.ready=function(e,t){var n=this;function i(){n.cancel()}n._readyCalled||(n._readyCalled=!0,e.once("destroyed",i),t.once("destroyed",i),n.once("complete",function(){e.removeListener("destroyed",i),t.removeListener("destroyed",i)}))},c(ur,a.EventEmitter),ur.prototype.cancel=function(){this.canceled||(this.canceled=!0,this.push.cancel(),this.pull.cancel())},ze.plugin(function(e){e.adapter("idb",En,!0)}).plugin(function(e){e.adapter("websql",ni,!0)}).plugin(function(e){e.adapter("http",_i,!1),e.adapter("https",_i,!1)}).plugin(Bi).plugin(function(e){e.replicate=cr,e.sync=lr,Object.defineProperty(e.prototype,"replicate",{get:function(){var e=this;return void 0===this.replicateMethods&&(this.replicateMethods={from:function(t,n,i){return e.constructor.replicate(t,e,n,i)},to:function(t,n,i){return e.constructor.replicate(e,t,n,i)}}),this.replicateMethods}}),e.prototype.sync=function(e,t,n){return this.constructor.sync(this,e,t,n)}}),n.exports=ze}).call(this,void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{1:1,10:10,11:11,16:16,2:2,4:4,5:5,6:6,7:7}]},{},[17])(17)}).call(this,n("./node_modules/webpack/buildin/global.js"))},"./node_modules/routie/index.js":function(e,t,n){"use strict";var i=n("./node_modules/path-browserify/index.js"),r=["get","post","put","patch","delete","del","all"],o=[].slice;e.exports=function(e){var t,n,s,a;return"function"==typeof(t=o.call(arguments,1))[t.length-1]&&(a=t.pop()),n=i.join.apply(i,t),s={},r.forEach(function(t){s[t]=function(i){var r=o.call(arguments);return r.length<2?r.unshift(n):r[0]=n+r[0],e[t].apply(e,r)}}),a&&a(s),s}},"./node_modules/smooth-scroll/dist/smooth-scroll.polyfills.min.js":function(e,t,n){(function(n){var i;/*! smooth-scroll v14.2.1 | (c) 2018 Chris Ferdinandi | MIT License | http://github.com/cferdinandi/smooth-scroll */window.Element&&!Element.prototype.closest&&(Element.prototype.closest=function(e){var t,n=(this.document||this.ownerDocument).querySelectorAll(e),i=this;do{for(t=n.length;--t>=0&&n.item(t)!==i;);}while(t<0&&(i=i.parentElement));return i}),function(){function e(e,t){t=t||{bubbles:!1,cancelable:!1,detail:void 0};var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),n}if("function"==typeof window.CustomEvent)return!1;e.prototype=window.Event.prototype,window.CustomEvent=e}(),function(){for(var e=0,t=["ms","moz","webkit","o"],n=0;n<t.length&&!window.requestAnimationFrame;++n)window.requestAnimationFrame=window[t[n]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[t[n]+"CancelAnimationFrame"]||window[t[n]+"CancelRequestAnimationFrame"];window.requestAnimationFrame||(window.requestAnimationFrame=function(t,n){var i=(new Date).getTime(),r=Math.max(0,16-(i-e)),o=window.setTimeout(function(){t(i+r)},r);return e=i+r,o}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(e){clearTimeout(e)})}(),function(n,r){void 0===(i=function(){return function(e){"use strict";var t={ignore:"[data-scroll-ignore]",header:null,topOnEmptyHash:!0,speed:500,clip:!0,offset:0,easing:"easeInOutCubic",customEasing:null,updateURL:!0,popstate:!0,emitEvents:!0},n=function(){for(var e={},t=0;t<arguments.length;t++)!function(t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])}(arguments[t]);return e},i=function(t){return parseInt(e.getComputedStyle(t).height,10)},r=function(e){var t;try{t=decodeURIComponent(e)}catch(n){t=e}return t},o=function(e){"#"===e.charAt(0)&&(e=e.substr(1));for(var t,n=String(e),i=n.length,r=-1,o="",s=n.charCodeAt(0);++r<i;){if(0===(t=n.charCodeAt(r)))throw new InvalidCharacterError("Invalid character: the input contains U+0000.");o+=t>=1&&t<=31||127==t||0===r&&t>=48&&t<=57||1===r&&t>=48&&t<=57&&45===s?"\\"+t.toString(16)+" ":t>=128||45===t||95===t||t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122?n.charAt(r):"\\"+n.charAt(r)}var a;try{a=decodeURIComponent("#"+o)}catch(e){a="#"+o}return a},s=function(){return Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight)},a=function(e){return e?i(e)+e.offsetTop:0},c=function(t,n,i,r){if(n.emitEvents&&"function"==typeof e.CustomEvent){var o=new CustomEvent(t,{bubbles:!0,detail:{anchor:i,toggle:r}});document.dispatchEvent(o)}};return function(i,l){var u,h,d,f,p,m,v={cancelScroll:function(e){cancelAnimationFrame(m),m=null,e||c("scrollCancel",u)},animateScroll:function(i,r,o){var l=n(u||t,o||{}),h="[object Number]"===Object.prototype.toString.call(i),p=h||!i.tagName?null:i;if(h||p){var g=e.pageYOffset;l.header&&!d&&(d=document.querySelector(l.header)),f||(f=a(d));var y,b,_,w=h?i:function(t,n,i,r){var o=0;if(t.offsetParent)do{o+=t.offsetTop,t=t.offsetParent}while(t);return o=Math.max(o-n-i,0),r&&(o=Math.min(o,s()-e.innerHeight)),o}(p,f,parseInt("function"==typeof l.offset?l.offset(i,r):l.offset,10),l.clip),k=w-g,E=s(),C=0,S=function(t,n){var o=e.pageYOffset;if(t==n||o==n||(g<n&&e.innerHeight+o)>=E)return v.cancelScroll(!0),function(t,n,i){0===t&&document.body.focus(),i||(t.focus(),document.activeElement!==t&&(t.setAttribute("tabindex","-1"),t.focus(),t.style.outline="none"),e.scrollTo(0,n))}(i,n,h),c("scrollStop",l,i,r),y=null,m=null,!0},x=function(t){y||(y=t),b=(C+=t-y)/parseInt(l.speed,10),_=g+k*function(e,t){var n;return"easeInQuad"===e.easing&&(n=t*t),"easeOutQuad"===e.easing&&(n=t*(2-t)),"easeInOutQuad"===e.easing&&(n=t<.5?2*t*t:(4-2*t)*t-1),"easeInCubic"===e.easing&&(n=t*t*t),"easeOutCubic"===e.easing&&(n=--t*t*t+1),"easeInOutCubic"===e.easing&&(n=t<.5?4*t*t*t:(t-1)*(2*t-2)*(2*t-2)+1),"easeInQuart"===e.easing&&(n=t*t*t*t),"easeOutQuart"===e.easing&&(n=1- --t*t*t*t),"easeInOutQuart"===e.easing&&(n=t<.5?8*t*t*t*t:1-8*--t*t*t*t),"easeInQuint"===e.easing&&(n=t*t*t*t*t),"easeOutQuint"===e.easing&&(n=1+--t*t*t*t*t),"easeInOutQuint"===e.easing&&(n=t<.5?16*t*t*t*t*t:1+16*--t*t*t*t*t),e.customEasing&&(n=e.customEasing(t)),n||t}(l,b=b>1?1:b),e.scrollTo(0,Math.floor(_)),S(_,w)||(m=e.requestAnimationFrame(x),y=t)};0===e.pageYOffset&&e.scrollTo(0,0),function(e,t,n){t||history.pushState&&n.updateURL&&history.pushState({smoothScroll:JSON.stringify(n),anchor:e.id},document.title,e===document.documentElement?"#top":"#"+e.id)}(i,h,l),c("scrollStart",l,i,r),v.cancelScroll(!0),e.requestAnimationFrame(x)}}},g=function(t){if(!("matchMedia"in e&&e.matchMedia("(prefers-reduced-motion)").matches)&&0===t.button&&!t.metaKey&&!t.ctrlKey&&"closest"in t.target&&(h=t.target.closest(i))&&"a"===h.tagName.toLowerCase()&&!t.target.closest(u.ignore)&&h.hostname===e.location.hostname&&h.pathname===e.location.pathname&&/#/.test(h.href)){var n=o(r(h.hash)),s=u.topOnEmptyHash&&"#"===n?document.documentElement:document.querySelector(n);(s=s||"#top"!==n?s:document.documentElement)&&(t.preventDefault(),v.animateScroll(s,h))}},y=function(e){if(null!==history.state&&history.state.smoothScroll&&history.state.smoothScroll===JSON.stringify(u)&&history.state.anchor){var t=document.querySelector(o(r(history.state.anchor)));t&&v.animateScroll(t,null,{updateURL:!1})}},b=function(e){p||(p=setTimeout(function(){p=null,f=a(d)},66))};return v.destroy=function(){u&&(document.removeEventListener("click",g,!1),e.removeEventListener("resize",b,!1),e.removeEventListener("popstate",y,!1),v.cancelScroll(),u=null,null,h=null,d=null,f=null,p=null,m=null)},v.init=function(i){if(!("querySelector"in document&&"addEventListener"in e&&"requestAnimationFrame"in e&&"closest"in e.Element.prototype))throw"Smooth Scroll: This browser does not support the required JavaScript methods and browser APIs.";v.destroy(),u=n(t,i||{}),d=u.header?document.querySelector(u.header):null,f=a(d),document.addEventListener("click",g,!1),d&&e.addEventListener("resize",b,!1),u.updateURL&&u.popstate&&e.addEventListener("popstate",y,!1)},v.init(l),v}}(n)}.apply(t,[]))||(e.exports=i)}(void 0!==n?n:"undefined"!=typeof window?window:this)}).call(this,n("./node_modules/webpack/buildin/global.js"))},"./node_modules/webpack/buildin/global.js":function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},"./src/img sync \\.(png|jpe?g|svg)$":function(e,t,n){var i={"./bg.png":"./src/img/bg.png","./photo1.png":"./src/img/photo1.png","./photo2.jpg":"./src/img/photo2.jpg","./photo3.svg":"./src/img/photo3.svg"};function r(e){var t=o(e);return n(t)}function o(e){if(!n.o(i,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return i[e]}r.keys=function(){return Object.keys(i)},r.resolve=o,e.exports=r,r.id="./src/img sync \\.(png|jpe?g|svg)$"},"./src/img/bg.png":function(e,t){e.exports="../img/bg.png"},"./src/img/photo1.png":function(e,t){e.exports="../img/photo1.png"},"./src/img/photo2.jpg":function(e,t){e.exports="../img/photo2.jpg"},"./src/img/photo3.svg":function(e,t){e.exports="../fonts/photo3.svg"},"./src/js/_events.js":function(e,t){e.exports={AJAX:"ajax-load",LOADED:"load",SET_TARGET_UPDATE:"set-target-update",RESTORE_FIELD:"restore-field",FORM_INIT_BASICS:"form-basics",FORM_INIT_STEPPED:"form-init-stepped",FORM_INIT_VALIDATE:"form-init-validate",FORM_INIT_VALIDATE_FIELD:"form-init-validate-field",FORM_INIT_STORAGE:"form-init-storage",FORM_VALIDATION_FAILED:"form-validation-failed",FORM_STEPPED_NEW_STEP:"form-new-step",FORM_STEPPED_FIRST_STEP:"form-first-step",FORM_STEPPED_LAST_STEP:"form-last-step",FORM_FIELDS:"input,textarea,select"}},"./src/js/app.js":function(e,t,n){"use strict";n.r(t);n("./src/scss/app.scss"),n("./node_modules/popper.js/dist/esm/popper.js"),n("./node_modules/bootstrap/js/dist/util.js"),n("./node_modules/bootstrap/js/dist/alert.js"),n("./node_modules/bootstrap/js/dist/button.js"),n("./node_modules/bootstrap/js/dist/carousel.js"),n("./node_modules/bootstrap/js/dist/collapse.js"),n("./node_modules/bootstrap/js/dist/modal.js"),n("./node_modules/bootstrap/js/dist/tooltip.js"),n("./node_modules/bootstrap/js/dist/popover.js"),n("./node_modules/bootstrap/js/dist/scrollspy.js"),n("./node_modules/bootstrap/js/dist/tab.js"),n("./node_modules/offcanvas-bootstrap/dist/js/bootstrap.offcanvas.js"),n("./node_modules/jquery-zoom/jquery.zoom.js"),n("./node_modules/meta-lightbox/meta-lightbox.js");var i=n("jquery"),r=n.n(i),o=(n("./node_modules/hammerjs/hammer.js"),n("./node_modules/jquery-hammerjs/jquery.hammer.js"),n("./node_modules/pouchdb/dist/pouchdb.js"),n("./src/js/_events.js")),s=n.n(o),a=n("./node_modules/routie/index.js"),c=n.n(a);$(window).on(s.a.AJAX+" "+s.a.LOADED,function(){c()({navigation:function(){$("#NavbarCollapse").addClass("in")},"carousel:id:num":function(e,t){$("#Carousel"+e).carousel(t)}})});var l=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();var u=function(e){return function(){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t)}return l(t,null,[{key:"show",value:function(t){e("#PageLoading").show(0,t)}},{key:"hide",value:function(t){e("#PageLoading").hide("slow",t)}}]),t}()}(r.a),h=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();!function(e){var t="jsVideoPreviewUI",n=t,i=(window,document,function(){function i(r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),console.log("Initializing: "+t);var o=this;o.$_el=e(r),o.innerHTML=o.$_el[0].innerHTML,o.$_el.data(n,this);var s,a=o.$_el.attr("href")||o.$_el.data("href");if(s=a.match(/(youtube|youtube-nocookie|youtu|vimeo)\.(com|be)\/(watch\?v=([\w-]+)|([\w-]+))/)){var c=void 0;if("youtube"!==s[1]&&"youtube-nocookie"!==s[1]&&"youtu"!==s[1]||(c=function(e){return void 0!==(e=e.split(/(vi\/|v%3D|v=|\/v\/|youtu\.be\/|\/embed\/)/))[2]?e[2].split(/[^0-9a-z_\-]/i)[0]:e[0]}(a)),"vimeo"==s[1])return c=s[3],o.$_el.addClass("loading"),void e.ajax({type:"GET",url:"https://vimeo.com/api/v2/video/"+c+".json",jsonp:"callback",dataType:"jsonp",success:function(e){var t=e[0].thumbnail_large;o.show(t),o.$_el.removeClass("loading")}});c&&o.show("//i3.ytimg.com/vi/"+c+"/0.jpg")}}return h(i,[{key:"show",value:function(e){this.$_el[0].innerHTML="",this.$_el.append('<img src="'+e+'" alt="Video" />')}}],[{key:"dispose",value:function(){console.log("Destroying: "+t),ui.$_el[0].innerHTML=ui.innerHTML}},{key:"_jQueryInterface",value:function(){return this.each(function(t,r){var o=e(r),s=o.data(n);s||(s=new i(r),o.data(n,s))})}}]),i}());e.fn[t]=i._jQueryInterface,e.fn[t].Constructor=i,e.fn[t].noConflict=function(){return e.fn[t]=JQUERY_NO_CONFLICT,i._jQueryInterface},e(window).on(s.a.AJAX+" "+s.a.LOADED,function(){e('[data-video-preview="true"]').jsVideoPreviewUI()})}(r.a);var d=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();!function(e){var t=function(){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t)}return d(t,null,[{key:"each",value:function(t){e(".js-carousel").each(function(n,i){t(n,e(i))})}},{key:"init",value:function(){this.dispose(),this.each(function(t,n){var i=e(n),r="Carousel"+t;i.attr("id",r),i.data("id",t);var o=e(n).find(".carousel-item").length;if(o){if(i.data("indicators")){var s=e('<ol class="carousel-indicators"></ol>');s.append('<li data-target="#'+r+'" data-slide-to="0" class="active"></li>');for(var a=1;a<o;a++)s.append('<li data-target="#'+r+'" data-slide-to="'+a+'"></li>');i.prepend(s)}i.data("arrows")&&(i.prepend('<i class="carousel-control-prev" data-target="#'+r+'" role="button" data-slide="prev"><i class="fas fa-chevron-left" aria-hidden="true"></i><i class="sr-only">Previous</i></i>'),i.prepend('<i class="carousel-control-next" data-target="#'+r+'" role="button" data-slide="next"><i class="fas fa-chevron-right" aria-hidden="true"></i><i class="sr-only">Next</i></i>')),i.carousel(),i.hammer().bind("swipeleft",function(t){e(t.target).carousel("next")}),i.hammer().bind("swiperight",function(t){e(t.target).carousel("prev")}),i.hammer().bind("panleft",function(t){e(t.target).carousel("next")}),i.hammer().bind("panright",function(t){e(t.target).carousel("prev")}),i.hammer().bind("tap",function(t){e(t.target).carousel("next")})}})}},{key:"dispose",value:function(){this.each(function(t,n){e(n).carousel("dispose")})}}]),t}();e(window).on(s.a.AJAX+" "+s.a.LOADED,function(){t.init()})}(r.a);var f=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();(function(e){var t="jsSlidingMenu",n=t,i=function(){function i(n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),this._element=n;var r=e(this._element);r.addClass(t+"-active"),e(window).on("keyup",function(e){27===e.which&&r.find('.is-open[data-toggle="offcanvas"]').click()})}return f(i,[{key:"dispose",value:function(){console.log("Disposing: "+t+" elements"),e(this._element).removeClass(t+"-active"),e.removeData(this._element,n),this._element=null}}],[{key:"_jQueryInterface",value:function(){return this.each(function(){var t=e(this),r=t.data(n);r||(r=new i(this),t.data(n,r))})}}]),i}();e.fn[t]=i._jQueryInterface,e.fn[t].Constructor=i,e.fn[t].noConflict=function(){return e.fn[t]=JQUERY_NO_CONFLICT,i._jQueryInterface},e(".ui."+t).ready(function(){e(".ui."+t).jsSlidingMenu()})})(r.a),n("./node_modules/bootstrap-select/dist/js/bootstrap-select.js"),n("./node_modules/jquery.inputmask/dist/jquery.inputmask.bundle.js");var p=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();var m=function(e){var t="jsFormFieldUI",n=t,i=(e("html, body"),function(){function i(r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);var o=this;return o.$el=e(r),o.$el.data(n,o),o.shown=!0,o.vals={val:o.$el.val(),checked:o.$el.is(":checked")},o.$el.parents(".optionset").not(".field").removeClass("collapse"),o.$collapse=o.$el.parents(".field.collapse").not(".composite").first(),o.$collapse.length&&(o.$el.removeClass("collapse"),o.$collapse.on("show.bs.collapse",function(e){o.show()}),o.$collapse.on("hidden.bs.collapse",function(e){o.hide()})),o.$el.addClass(t+"-active"),o}return p(i,[{key:"dispose",value:function(){this.$el.removeClass(t+"-active"),e.removeData(this._el,n)}},{key:"show",value:function(){var e=this.$el;this.restore(),this.shown=!0,e.trigger("shown."+t)}},{key:"hide",value:function(){var e=this.$el;this.wipe(),this.shown=!1,e.trigger("hidden."+t)}},{key:"wipe",value:function(){var e=this.$el;this.vals={name:e.attr("name"),val:e.val(),checked:e.is(":checked")},e.val(""),e.prop("checked",!1)}},{key:"restore",value:function(){var e=this.$el,t=this.vals.checked;e.val(this.vals.val),e.prop("checked",t)}}],[{key:"_jQueryInterface",value:function(){return this.each(function(){var t=e(this),r=t.data(n);r||(r=new i(this),t.data(n,r))})}}]),i}());return e.fn[t]=i._jQueryInterface,e.fn[t].Constructor=i,e.fn[t].noConflict=function(){return e.fn[t]=JQUERY_NO_CONFLICT,i._jQueryInterface},i}(r.a),v=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();r.a.fn.selectpicker.Constructor.BootstrapVersion="4";!function(e){var t="jsFormBasics",n=t,i=(e("html, body"),window),r=(document,function(){function i(r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);var o=e(r);this._element=r,o.data(n,this),e("[data-inputmask]").inputmask();var a=o.find(s.a.FORM_FIELDS);a.each(function(e,t){new m(t)});var c=o.find("select:not([readonly])"),l=o.find('input[type="radio"]');c.each(function(t,n){var i=e(n),r=i.data("max-options")||!1;if(i.selectpicker(e.extend({iconBase:"fas",tickIcon:"fa-check",virtualScroll:!1,dropupAuto:!1,size:10,maxOptions:r},i.data(),{multipleSeparator:"::;::"})),r>1){var o=function t(){if(!i.val().length)return!0;var n=i.parent().find(".dropdown-toggle .filter-option"),r="";n.text().split("::;::").forEach(function(t){var n=i.find("option").filter(function(n,i){return e(i).text()===t});r+='<span class="option" data-val='+n.attr("value")+">"+t+' <i class="fas fa-times btn-remove"></i></span>'}),n.html(r),n.find(".option").on("click",function(n){n.preventDefault();var r=e(n.currentTarget).data("val").toString(),o=i.selectpicker("val"),s=o.indexOf(r);s>-1&&(o.splice(s,1),i.selectpicker("val",o)),t()})};i.on("rendered.bs.select changed.bs.select refreshed.bs.select loaded.bs.select change",o),o()}}),e('[data-toggle="dropdown"]').on("click",function(t){e(t.currentTarget).siblings(".dropdown-menu").toggleClass("show")}),e(".dropdown-menu a").on("click",function(t){e(t.currentTarget).parents(".dropdown-menu").removeClass("show")}),a.each(function(t,n){var i=e(n);(i.hasClass("required")||i.attr("aria-required"))&&i.closest(".field").addClass("required")}),l.each(function(t,n){var i=e(n);i.is(":checked")&&i.parents(".radio").addClass("checked")}),l.on("change",function(t){var n=e(t.currentTarget),i=n.parents(".radio");i.siblings(".radio").each(function(t,n){var i=e(n);i.find("input").is(":checked")||i.removeClass("checked")}),n.is(":checked")&&i.addClass("checked")}),o.on("submit",function(e){u.show()}),o.addClass(t+"-active"),o.trigger(s.a.FORM_INIT_BASICS)}return v(i,[{key:"dispose",value:function(){e(this._element).removeClass(t+"-active"),e.removeData(this._element,n),this._element=null}}],[{key:"_jQueryInterface",value:function(){var t=this;return this.each(function(){var r=e(t),o=r.data(n);o||(o=new i(t),r.data(n,o))})}}]),i}());e.fn[t]=r._jQueryInterface,e.fn[t].Constructor=r,e.fn[t].noConflict=function(){return e.fn[t]=JQUERY_NO_CONFLICT,r._jQueryInterface};e(i).on(s.a.AJAX+" "+s.a.LOADED,function(){e("form").jsFormBasics()})}(r.a);var g=n("./src/js/lang/_en.js"),y=n.n(g),b=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();var _=function(e){var t="jsFormValidateField",n=t,i=e("html, body"),r=function(){function r(i){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r);var o=this,a=e(i);o._element=i,o._actions=a.parents("form").children(".btn-toolbar,.form-actions"),a.data(n,this),a.attr("novalidate","novalidate"),a.on("change focusout",function(e){o.validate(!1)}),a.addClass(t+"-active"),a.trigger(s.a.FORM_INIT_VALIDATE_FIELD)}return b(r,[{key:"dispose",value:function(){e(this._element).removeClass(t+"-active"),e.removeData(this._element,n),this._element=null}},{key:"validate",value:function(){var n=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],i=e(this._element),r=(i.closest(".field"),i.data(t+"-extra")),o=!0,s=null,a=i.val();return this._element.checkValidity()&&(!i.hasClass("required")||a.length&&a.trim().length&&(!this.isHtml(a)||e(a).text().length))||(o=!1),i.hasClass("url")&&a.length&&!this.valideURL(a)&&(o=!1,s="URL must start with http:// or https://. For example: https://your-domain.com/"),this.removeError(),r&&r.forEach(function(e){o=o&&e()}),!!o||(this.setError(n,s),!1)}},{key:"isHtml",value:function(e){var t=(new DOMParser).parseFromString(e,"text/html");return Array.from(t.body.childNodes).some(function(e){return 1===e.nodeType})}},{key:"valideURL",value:function(e){return new RegExp("^(https?:\\/\\/){1}((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.?)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[;&a-z\\d%_.~+=-]*)?(\\#[-a-z\\d_]*)?$","i").test(e)}},{key:"setError",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=e(this._element).closest(".field"),o=r.offset().top;r.addClass("error"),n&&r.append('<div class="message alert alert-error alert-danger">'+n+"</div>"),t&&(r.focus(),i.scrollTop(o-100))}},{key:"removeError",value:function(){var t=e(this._element).closest(".field");t.removeClass("error"),t.removeClass("holder-error"),t.removeClass("holder-validation"),t.find(".message").remove()}}],[{key:"_jQueryInterface",value:function(){return this.each(function(){var t=e(this),i=t.data(n);i||(i=new r(this),t.data(n,i))})}}]),r}();return e.fn[t]=r._jQueryInterface,e.fn[t].Constructor=r,e.fn[t].noConflict=function(){return e.fn[t]=JQUERY_NO_CONFLICT,r._jQueryInterface},r}(r.a),w=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();!function(e){var t="jsSteppedForm",n=t,i=function(){function i(r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);var o=this,a=e(r);a.data(n,this),a.find(".steps-counter").length||a.prepend(y.a.en[t].STEPCOUNTER),a.find(".steps-buttons").length||a.append(y.a.en[t].STEPBUTTONS),o._currentStepCounter=a.find(".steps-counter .current-step"),o._totalStepsCounter=a.find(".steps-counter .total-steps"),o._steps=a.find(".step"),o._stepNext=a.find(".step-next"),o._stepPrev=a.find(".step-prev"),o._actions=a.children(".btn-toolbar,.form-actions"),o._element=r,o._currentStep=1,o._totalSteps=o._steps.last().data("step")||o._steps.length,o._stepsOrder=[],o._totalStepsCounter.text(o._totalSteps);var c=o._steps.find(".field.error,.field.holder-error,.field.holder-validation,.field.holder-info,.field.holder-warning,.field.holder-good").first();if(c.length){var l=a.parents(".modal");l.length&&void 0!==l.modal&&l.modal("show"),o._currentStep=c.parents(".step").data("step")||o._currentStep}o.step('.step[data-step="'+o._currentStep+'"]'),o._stepNext.on("click",function(e){e.preventDefault(),o.next()}),o._stepPrev.on("click",function(e){e.preventDefault(),o.prev()}),a.find(".step-toggle").on("click",function(t){var n=e(t.currentTarget);t.preventDefault(),o.step(n.data("target"))}),a.addClass(t+"-active"),a.trigger(s.a.FORM_INIT_STEPPED)}return w(i,[{key:"dispose",value:function(){e(this._element).removeClass(t+"-active"),e.removeData(this._element,n),this._element=null}},{key:"next",value:function(){this._currentStep>=this._totalSteps||this.step('.step[data-step="'+(this._currentStep+1)+'"]')}},{key:"prev",value:function(){this._currentStep<=1||this.step(this._stepsOrder[this._currentStep-1])}},{key:"step",value:function(t){var n=this,i=e(n._element),r=i.find(t),o=parseInt(r.data("step")),a=!0;if(o>n._currentStep&&n.currentStep().find("input,textarea,select").each(function(t,n){var i=e(n).data("jsFormValidateField");i&&!i.validate()&&(a=!1)}),!a)return!1;parseInt(r.data("step"))<="1"?(n._stepPrev.hide(),i.trigger(s.a.FORM_STEPPED_FIRST_STEP)):n._stepPrev.show(),parseInt(r.data("step"))>=n._totalSteps?(n._stepNext.hide(),n._actions.show(),i.trigger(s.a.FORM_STEPPED_LAST_STEP)):(n._stepNext.show(),n._actions.hide()),n._currentStep=o,n._stepsOrder[n._currentStep]=r,n._steps.removeClass("active"),r.addClass("active"),n._currentStepCounter.text(n._currentStep),r.trigger(s.a.FORM_STEPPED_NEW_STEP),i.trigger(s.a.FORM_STEPPED_NEW_STEP)}},{key:"currentStep",value:function(){return e(this._element).find(".step.active")}}],[{key:"_jQueryInterface",value:function(){return this.each(function(){var t=e(this),r=t.data(n);r||(r=new i(this),t.data(n,r))})}}]),i}();e.fn[t]=i._jQueryInterface,e.fn[t].Constructor=i,e.fn[t].noConflict=function(){return e.fn[t]=JQUERY_NO_CONFLICT,i._jQueryInterface},e(window).on(s.a.AJAX+" "+s.a.LOADED,function(){e(".form-stepped").jsSteppedForm()})}(r.a);var k=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();!function(e){var t="jsFormValidate",n=t,i=(e("html, body"),function(){function i(r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);var o=this,a=e(r),c=a.find("input,textarea,select");o._element=r,a.data(n,this),o._fields=c,o._stepped_form=a.data("jsSteppedForm"),a.attr("novalidate","novalidate"),a.on(s.a.FORM_INIT_STEPPED,function(){o._stepped_form=a.data("jsSteppedForm")}),c.each(function(t,n){"combobox"!==e(n).attr("role")&&new _(n)}),a.on("submit",function(e){o.validate(!0,function(){if(e.preventDefault(),o._stepped_form){var t=a.find(".error").first();t.length&&o._stepped_form.step(t.parents(".step"))}a.trigger(s.a.FORM_VALIDATION_FAILED)})}),a.addClass(t+"-active"),a.trigger(s.a.FORM_INIT_VALIDATE)}return k(i,[{key:"dispose",value:function(){e(this._element).removeClass(t+"-active"),e.removeData(this._element,n),this._element=null}},{key:"validate",value:function(){!(arguments.length>0&&void 0!==arguments[0])||arguments[0];var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];console.log("Checking the form ...");var n=!0;return this._fields.each(function(i,r){var o=e(r),s=o.data("jsFormValidateField");if(s&&!s.validate())return t&&t(),console.log("Invalid form data:"),console.log(o),u.hide(),n=!1,!1}),n}}],[{key:"_jQueryInterface",value:function(){return this.each(function(){var t=e(this),r=t.data(n);r||(r=new i(this),t.data(n,r))})}}]),i}());e.fn[t]=i._jQueryInterface,e.fn[t].Constructor=i,e.fn[t].noConflict=function(){return e.fn[t]=JQUERY_NO_CONFLICT,i._jQueryInterface},e(window).on(s.a.AJAX+" "+s.a.LOADED,function(){e("form").each(function(t,n){var i=e(n);if(i.hasClass("no-validation"))return!0;i.jsFormValidate()})})}(r.a);var E=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();!function(e){var t="jsFormStorage",n=t,i=window.localStorage,r=function(){function r(o){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r);var a=e(o),c=a.find("input, textarea, select"),l=function(t){var n=e(t);n.siblings(".value").text(n.val())};this._element=o,a.data(n,this),a.addClass(t+"-active"),c.each(function(n,r){var o=e(r),a=o.attr("id"),c=o.attr("type"),l=i.getItem(t+a);if("file"===c)return!0;a&&l&&c&&(!c||"checkbox"!==c&&"radio"!==c?o.val(l):o.prop("checked",l)),o.trigger(s.a.RESTORE_FIELD)}),e('input[type="range"]').each(function(e,t){l(t)}),a.trigger(s.a.RESTORE_FIELD),e('input[type="range"]').on("change",function(e){l(e.currentTarget)}),c.on("change",function(n){var r=e(n.currentTarget),o=r.attr("id"),s=r.attr("type");if(r.hasClass("no-storage"))return!0;var a=r.val();!s||"checkbox"!==s&&"radio"!==s||(a=!!r.is(":checked")),o&&s&&"password"!==s&&i.setItem(t+o,a)}),a.on("submit",function(){a.data(n).clear()}),a.find(".btn-toolbar,.form-actions").children('button,[type="submit"],[type="clear"]').on("click",function(){a.data(n).clear()}),a.addClass(t+"-active"),a.trigger(s.a.FORM_INIT_STORAGE)}return E(r,[{key:"dispose",value:function(){e(this._element).removeClass(t+"-active"),e.removeData(this._element,n),this._element=null}},{key:"clear",value:function(){i.clear()}}],[{key:"_jQueryInterface",value:function(){if(void 0!==window.localStorage)return this.each(function(){var t=e(this),i=t.data(n);i||(i=new r(this),t.data(n,i))})}}]),r}();e.fn[t]=r._jQueryInterface,e.fn[t].Constructor=r,e.fn[t].noConflict=function(){return e.fn[t]=JQUERY_NO_CONFLICT,r._jQueryInterface},e(window).on(s.a.AJAX+" "+s.a.LOADED,function(){e("form").each(function(t,n){var i=e(n);if(i.hasClass("no-storage"))return!0;i.jsFormStorage()})})}(r.a);var C="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},S=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();var x=function(e){var t=window,n=document,i=e("html"),r=e("body"),o="jsAjaxUI",a=o,c=function(){function i(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),this._element=t;var n=e(this._element);n.addClass(o+"-active"),n.bind("click",function(t){t.preventDefault();var n=e(this);e(".ajax").each(function(){var t=e(this);t.removeClass("active"),t.parents(".nav-item").removeClass("active")}),n.addClass("loading"),i.load(n.attr("href"),function(){n.removeClass("loading"),n.parents(".nav-item").addClass("active"),n.addClass("active")})})}return S(i,[{key:"dispose",value:function(){e(this._element).removeClass(o+"-active"),e.removeData(this._element,a),this._element=null}}],[{key:"load",value:function(n,o){u.show(function(){r.removeClass("loaded")}),t.MainUI.updateLocation(n);var s=t.URLDetails.base+t.URLDetails.relative.substring(1);s!==t.location.href&&t.history.pushState({ajax:!0,page:s},document.title,s),e.ajax({sync:!1,async:!0,url:n,dataType:"json",method:"GET",cache:!1,error:function(e){console.warn("AJAX request failure: "+e.statusText),t.location.href=n,"function"==typeof t.ga&&t.ga("send","event","error","AJAX ERROR",e.statusText)},success:function(e,n,r){i.process(e,r,o),"function"==typeof t.ga&&(t.ga("set",{page:t.URLDetails.relative+t.URLDetails.hash,title:r.getResponseHeader("X-Title")}),t.ga("send","pageview"))}})}},{key:"process",value:function(o,a,c){var l=this,u=a.getResponseHeader("X-Include-CSS").split(",")||[],h=a.getResponseHeader("X-Include-JS").split(",")||[];if("object"===C(o.regions))for(var d in o.regions)"string"==typeof o.regions[d]&&i.replaceRegion(o.regions[d],d);e('link[type="text/css"]').each(function(){var t=u.indexOf(e(this).attr("href"));t>-1?u.splice(t,1):r.data("unload-blocked")||(console.log("Unloading: "+e(this).attr("href")),e(this).remove())}),e('script[type="text/javascript"]').each(function(){var t=h.indexOf(e(this).attr("src"));t>-1?h.splice(t,1):r.data("unload-blocked")||(console.log("Unloading: "+e(this).attr("src")),e(this).remove())}),this.preload(u).then(function(){var i=e("head");u.forEach(function(e){i.append('<link rel="stylesheet" type="text/css" href="'+e+'" />')}),l.preload(h,"script").then(function(){if(h.forEach(function(e){r.append('<script type="text/javascript" charset="UTF-8" src="'+e+'"><\/script>')}),console.log("New page is loaded!"),"object"===C(o.events))for(var i in o.events)e(n).trigger(i,[o.events[i]]);void 0!==c&&c(),e(t).trigger(s.a.AJAX)})})}},{key:"preload",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"text",i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(!t.length)return e.Deferred().resolve().promise();var o=[];return t.forEach(function(t,s){var a=e.Deferred();e.ajax({dataType:n,cache:i,url:t}).always(function(){a.resolve(),r&&r(s,t)}),o.push(a)}),e.when.apply(e,o)}},{key:"replaceRegion",value:function(t,n){var i=e('[data-ajax-region="'+n+'"]');i.length?i.empty().append(t):console.warn("Region returned without class or id!")}},{key:"_jQueryInterface",value:function(){return this.each(function(){var t=e(this),n=t.data(a);n||(n=new i(this),t.data(a,n))})}}]),i}();return e.fn[o]=c._jQueryInterface,e.fn[o].Constructor=c,e.fn[o].noConflict=function(){return e.fn[o]=JQUERY_NO_CONFLICT,c._jQueryInterface},e(".ajax").ready(function(){e(".ajax").jsAjaxUI()}),e(n).on("layoutRefresh",function(e,t){n.title=t.Title,i.attr("class",""),t.ClassName&&i.addClass(t.ClassName)}),t.onpopstate=function(i){var r=e('a[href^="'+n.location+'"]');null!==i.state&&i.state.ajax?(console.log("GOBACK (AJAX state)"),c.load(i.state.page)):r.length&&r.hasClass("ajax")?(console.log("GOBACK (AJAX link)"),r.trigger("click")):(console.log("GOBACK (HTTP)"),t.location.href=n.location)},c}(r.a),T=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();!function(e){var t=window,n=(document,e("body"),"NoCaptcha"),i=function(){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t)}return T(t,null,[{key:"init",value:function(){this.dispose(),console.log("Initializing: "+n),this.renderCaptcha()}},{key:"dispose",value:function(){console.log("Destroying: "+n)}},{key:"renderCaptcha",value:function(){console.log("Rendering Captcha: "+n),"undefined"==typeof grecaptcha&&console.log("Captcha API isn't available yet");var t=function(e){e.preventDefault(),grecaptcha.execute()};e(".g-recaptcha").each(function(n,i){var r=e(i);if(!r.data("widgetid")){var o=r.data("form")?e("#"+r.data("form")):r.parents("form");"invisible"!==r.data("size")||r.data("callback")||o.on("submit",t);var s=grecaptcha.render(i,r.data());r.data("widgetid",s)}})}}]),t}();e(t).on(""+s.a.AJAX,function(){i.init()}),t.NoCaptcha=i,t.noCaptchaFieldRender=i.renderCaptcha}(r.a);var O=n("./node_modules/smooth-scroll/dist/smooth-scroll.polyfills.min.js"),A=n.n(O),D=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();var I=A()(),j=(function(e){var t=window,n=document,i=e("body"),r=e("#AlertNotify"),o=e("#SiteWideMessage");n.addEventListener("visibilitychange",function(){"hidden"===n.visibilityState?(console.log("Tab: hidden"),i.addClass("is-hidden"),i.trigger("tabHidden")):(console.log("Tab: focused"),i.removeClass("is-hidden"),i.trigger("tabFocused"))});var a=function(){navigator.onLine?(console.log("Tab: online"),i.removeClass("is-offline"),i.trigger("online")):(console.log("Tab: offline"),i.addClass("is-offline"),i.trigger("offline"))};void 0!==navigator.onLine&&(t.addEventListener("offline",function(){a()},!1),t.addEventListener("online",function(){a()},!1),t.addEventListener("load",function(){a()}));setInterval(function(){i.hasClass("is-offline")||e.ajax({sync:!1,async:!0,cache:!1,url:"/Security/ping",global:!1,type:"POST",complete:function(e,n){"success"!==n&&t.location.reload(!1)}})},3e5),t.URLDetails={base:e("base").attr("href"),relative:"/",hash:""};var c=function(){function a(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a)}return D(a,null,[{key:"init",value:function(){this.dispose(),console.log("Initializing: MainUI"),this.updateLocation(),"caches"in t&&e("a.offline").addClass("offline-available"),void 0!==x&&this.loadImages(),e('a.external,a[rel="external"]').attr("target","_blank"),e(n).on("click",".js-scrollTo",function(t){t.preventDefault();var i=t.currentTarget,r=e(t.currentTarget),o=r.data("target")||r.attr("href");e(o).length?function(e,t){I.animateScroll(n.querySelector(t),e,{speed:500,offset:-20})}(i,o):console.log("[ScrollTo] Undefined target: "+o)}),e("[data-extfont]").length&&e.getScript("//ajax.googleapis.com/ajax/libs/webfont/1/webfont.js",function(){var n=[];e("[data-extfont]").each(function(t,i){n[t]=e(i).attr("data-extfont")}),t.WebFont.load({google:{families:n}})}),e("[data-set-target]").on("click",function(t){var n=e(t.currentTarget),i=e(n.data("set-target"));i.length&&(i.each(function(t,i){var r=e(i),o=r.prop("tagName").toLowerCase();"input"===o||"select"===o?r.val(n.data("set-val")):r.hasClass("field")||r.text(n.data("set-val"))}),n.trigger(s.a.SET_TARGET_UPDATE),i.closest("form").trigger(s.a.SET_TARGET_UPDATE))}),u.hide(function(){i.addClass("loaded")}),t.URLDetails.hash.indexOf("printpage")>-1&&t.print()}},{key:"updateLocation",value:function(e){var n=e||t.location.href,i=(n=n.replace(t.URLDetails.base,"/")).indexOf("#");t.URLDetails.relative=n.split("#")[0],t.URLDetails.hash=i>=0?n.substr(n.indexOf("#")):""}},{key:"alert",value:function(n,i){o.fadeOut("fast"),o.html('<div class="page-alert"><div class="alert alert-'+i+'"><i class="close" data-dismiss="alert">×</i>'+n+"</div></div>"),o.find(".page-alert").alert(),o.find('.close[data-dismiss="alert"]').click(function(){o.fadeOut("slow",function(){o.find(".page-alert").alert("close")})}),o.fadeIn("slow"),r.length&&r[0].play(),e(t).trigger("alert-appeared")}},{key:"alertHide",value:function(){0!==o.length&&o.fadeOut("slow",function(){o.find(".alert").alert("close")}),r.length&&void 0!==r[0].stop&&r[0].stop(),e(t).trigger("alert-removed")}},{key:"loadImages",value:function(){var n=[],r=[];i.find("img").each(function(t,i){var o=e(i),s=o.attr("src"),a=o.data("lazy-src");s&&s.length&&n.push(s),a&&a.length&&(r.push(a),o.addClass("loading"),x.preload([a]).then(function(){o.attr("src",a),o.addClass("loaded"),o.removeClass("loading"),o.trigger("image-lazy-loaded")}))}),x.preload(n).then(function(){e(t).trigger("images-loaded"),x.preload(r).then(function(){console.log("All images are loaded!"),e(t).trigger("images-lazy-loaded")})})}},{key:"dispose",value:function(){console.log("Destroying: MainUI")}}]),a}();e(t).on(s.a.AJAX+" "+s.a.LOADED,function(){c.init()}),e(t).on("beforeunload",function(){u.show(function(){i.removeClass("loaded")})}),t.MainUI=c}(r.a),n("./node_modules/bootstrap-datepicker/dist/js/bootstrap-datepicker.js"),n("./node_modules/bootstrap-timepicker/js/bootstrap-timepicker.js"),function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}());!function(e){window,document;var t=e("body"),n="jsDatetimeUI",i={autoclose:!0,startDate:0,todayHighlight:!0,clearBtn:!0},r=function(){function r(n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r);var o=e(n);if(this._el=n,o.hasClass("date")||"date"===o.attr("type")){var s=-1!==o.attr("name").toLowerCase().indexOf("end")?"+4d":"+3d";o.attr("readonly","true"),o.datepicker(e.extend(i,{defaultViewDate:s,multidate:o.data("multidate")},o.data()))}else(o.hasClass("time")||"time"===o.attr("type"))&&(o.attr("readonly","true"),o.timepicker(e.extend({snapToStep:!0,icons:{up:"fas fa-chevron-up",down:"fas fa-chevron-down"}},o.data())).on("show.timepicker",function(n){var i=e(n.currentTarget),r=t.find(".bootstrap-timepicker-widget");r.find('[data-action="clear"]').length||r.find("tbody").append('<tr><td colspan="5"><a href="#" data-action="clear">Clear</a></td></tr>'),r.find('[data-action="clear"]').on("click",function(e){e.preventDefault(),i.timepicker("clear"),i.timepicker("hideWidget")})}))}return j(r,null,[{key:"dispose",value:function(){console.log("Destroying: "+n)}},{key:"_jQueryInterface",value:function(){return this.each(function(){var t=e(this),n=t.data("jsDatetimeUI");n||(n=new r(this),t.data("jsDatetimeUI",n))})}}]),r}();e.fn[n]=r._jQueryInterface,e.fn[n].Constructor=r,e.fn[n].noConflict=function(){return e.fn[n]=JQUERY_NO_CONFLICT,r._jQueryInterface},e(window).on(s.a.AJAX+" "+s.a.LOADED,function(){e('input.date, input.time,input[type="date"], input[type="time"]').jsDatetimeUI()})}(r.a);var N=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();!function(e){var t=window,n=(document,e("body"),function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return N(e,null,[{key:"init",value:function(){this.dispose(),console.log("Initializing: LayoutUI")}},{key:"dispose",value:function(){console.log("Destroying: LayoutUI")}}]),e}());e(t).on(s.a.AJAX+" "+s.a.LOADED,function(){n.init()}),t.LayoutUI=n}(r.a);function P(e){return e.keys().map(e)}P(n("./src/img sync \\.(png|jpe?g|svg)$")),P(n("./node_modules/font-awesome sync \\.(otf|eot|svg|ttf|woff|woff2)$"))},"./src/js/lang/_en.js":function(e,t){e.exports={en:{jsSteppedForm:{STEPCOUNTER:'<div class="steps-counter">Step <b class="current-step"></b> of <b class="total-steps"></b></div>',STEPBUTTONS:'<div class="steps-buttons"><a href="#" class="step-ctrl step-prev"><i class="fas fa-chevron-left"></i> Prev</a> <a href="#" class="step-ctrl step-next">Next <i class="fas fa-chevron-right"></i></a></div>'}}}},"./src/scss/app.scss":function(e,t){},jquery:function(e,t){e.exports=jQuery}}); |