").append(t)))));return i.inline&&f.removeClass("dropdown-menu"),s&&f.addClass("usetwentyfour"),E("s")&&!s&&f.addClass("wider"),i.sideBySide&&B()&&D()?(f.addClass("timepicker-sbs"),"top"===i.toolbarPlacement&&f.append(g),f.append(e("").addClass("row").append(h.addClass("col-md-6")).append(A.addClass("col-md-6"))),"bottom"===i.toolbarPlacement&&f.append(g),f):("top"===i.toolbarPlacement&&m.append(g),B()&&m.append(e("
").addClass(i.collapse&&D()?"collapse in":"").append(h)),"default"===i.toolbarPlacement&&m.append(g),D()&&m.append(e("").addClass(i.collapse&&B()?"collapse":"").append(A)),"bottom"===i.toolbarPlacement&&m.append(g),f.append(m))},I=function(){var t,r=(A||n).position(),o=(A||n).offset(),a=i.widgetPositioning.vertical,s=i.widgetPositioning.horizontal;if(i.widgetParent)t=i.widgetParent.append(m);else if(n.is("input"))t=n.after(m).parent();else{if(i.inline)return void(t=n.append(m));t=n,n.children().first().after(m)}if("auto"===a&&(a=o.top+1.5*m.height()>=e(window).height()+e(window).scrollTop()&&m.height()+n.outerHeight()e(window).width()?"right":"left"),"top"===a?m.addClass("top").removeClass("bottom"):m.addClass("bottom").removeClass("top"),"right"===s?m.addClass("pull-right"):m.removeClass("pull-right"),"static"===t.css("position")&&(t=t.parents().filter((function(){return"static"!==e(this).css("position")})).first()),0===t.length)throw new Error("datetimepicker component should be placed within a non-static positioned container");m.css({top:"top"===a?"auto":r.top+n.outerHeight(),bottom:"top"===a?t.outerHeight()-(t===n?0:r.top):"auto",left:"left"===s?t===n?0:r.left:"auto",right:"left"===s?"auto":t.outerWidth()-n.outerWidth()-(t===n?0:r.left)})},S=function(e){"dp.change"===e.type&&(e.date&&e.date.isSame(e.oldDate)||!e.date&&!e.oldDate)||n.trigger(e)},R=function(e){"y"===e&&(e="YYYY"),S({type:"dp.update",change:e,viewDate:o.clone()})},M=function(e){m&&(e&&(u=Math.max(g,Math.min(3,u+e))),m.find(".datepicker > div").hide().filter(".datepicker-"+C[u].clsName).show())},L=function(t,n){if(!t.isValid())return!1;if(i.disabledDates&&"d"===n&&(r=t,!0===i.disabledDates[r.format("YYYY-MM-DD")]))return!1;var r;if(i.enabledDates&&"d"===n&&!function(e){return!0===i.enabledDates[e.format("YYYY-MM-DD")]}(t))return!1;if(i.minDate&&t.isBefore(i.minDate,n))return!1;if(i.maxDate&&t.isAfter(i.maxDate,n))return!1;if(i.daysOfWeekDisabled&&"d"===n&&-1!==i.daysOfWeekDisabled.indexOf(t.day()))return!1;if(i.disabledHours&&("h"===n||"m"===n||"s"===n)&&function(e){return!0===i.disabledHours[e.format("H")]}(t))return!1;if(i.enabledHours&&("h"===n||"m"===n||"s"===n)&&!function(e){return!0===i.enabledHours[e.format("H")]}(t))return!1;if(i.disabledTimeIntervals&&("h"===n||"m"===n||"s"===n)){var o=!1;if(e.each(i.disabledTimeIntervals,(function(){if(t.isBetween(this[0],this[1]))return o=!0,!1})),o)return!1}return!0},$=function(){var n,a,s,l=m.find(".datepicker-days"),c=l.find("th"),u=[],d=[];if(B()){for(c.eq(0).find("span").attr("title",i.tooltips.prevMonth),c.eq(1).attr("title",i.tooltips.selectMonth),c.eq(2).find("span").attr("title",i.tooltips.nextMonth),l.find(".disabled").removeClass("disabled"),c.eq(1).text(o.format(i.dayViewHeaderFormat)),L(o.clone().subtract(1,"M"),"M")||c.eq(0).addClass("disabled"),L(o.clone().add(1,"M"),"M")||c.eq(2).addClass("disabled"),n=o.clone().startOf("M").startOf("w").startOf("d"),s=0;s<42;s++)0===n.weekday()&&(a=e(""),i.calendarWeeks&&a.append(''+n.week()+" | "),u.push(a)),d=["day"],n.isBefore(o,"M")&&d.push("old"),n.isAfter(o,"M")&&d.push("new"),n.isSame(r,"d")&&!h&&d.push("active"),L(n,"d")||d.push("disabled"),n.isSame(T(),"d")&&d.push("today"),0!==n.day()&&6!==n.day()||d.push("weekend"),S({type:"dp.classify",date:n,classNames:d}),a.append(''+n.date()+" | "),n.add(1,"d");var p,f,A;l.find("tbody").empty().append(u),p=m.find(".datepicker-months"),f=p.find("th"),A=p.find("tbody").find("span"),f.eq(0).find("span").attr("title",i.tooltips.prevYear),f.eq(1).attr("title",i.tooltips.selectYear),f.eq(2).find("span").attr("title",i.tooltips.nextYear),p.find(".disabled").removeClass("disabled"),L(o.clone().subtract(1,"y"),"y")||f.eq(0).addClass("disabled"),f.eq(1).text(o.year()),L(o.clone().add(1,"y"),"y")||f.eq(2).addClass("disabled"),A.removeClass("active"),r.isSame(o,"y")&&!h&&A.eq(r.month()).addClass("active"),A.each((function(t){L(o.clone().month(t),"M")||e(this).addClass("disabled")})),function(){var e=m.find(".datepicker-years"),t=e.find("th"),n=o.clone().subtract(5,"y"),a=o.clone().add(6,"y"),s="";for(t.eq(0).find("span").attr("title",i.tooltips.prevDecade),t.eq(1).attr("title",i.tooltips.selectDecade),t.eq(2).find("span").attr("title",i.tooltips.nextDecade),e.find(".disabled").removeClass("disabled"),i.minDate&&i.minDate.isAfter(n,"y")&&t.eq(0).addClass("disabled"),t.eq(1).text(n.year()+"-"+a.year()),i.maxDate&&i.maxDate.isBefore(a,"y")&&t.eq(2).addClass("disabled");!n.isAfter(a,"y");)s+=''+n.year()+"",n.add(1,"y");e.find("td").html(s)}(),function(){var e,n=m.find(".datepicker-decades"),a=n.find("th"),s=t({y:o.year()-o.year()%100-1}),l=s.clone().add(100,"y"),c=s.clone(),u=!1,d=!1,p="";for(a.eq(0).find("span").attr("title",i.tooltips.prevCentury),a.eq(2).find("span").attr("title",i.tooltips.nextCentury),n.find(".disabled").removeClass("disabled"),(s.isSame(t({y:1900}))||i.minDate&&i.minDate.isAfter(s,"y"))&&a.eq(0).addClass("disabled"),a.eq(1).text(s.year()+"-"+l.year()),(s.isSame(t({y:2e3}))||i.maxDate&&i.maxDate.isBefore(l,"y"))&&a.eq(2).addClass("disabled");!s.isAfter(l,"y");)e=s.year()+12,u=i.minDate&&i.minDate.isAfter(s,"y")&&i.minDate.year()<=e,d=i.maxDate&&i.maxDate.isAfter(s,"y")&&i.maxDate.year()<=e,p+=''+(s.year()+1)+" - "+(s.year()+12)+"",s.add(12,"y");p+="",n.find("td").html(p),a.eq(1).text(c.year()+1+"-"+s.year())}()}},K=function(){var t,n,a=m.find(".timepicker span[data-time-component]");s||(t=m.find(".timepicker [data-action=togglePeriod]"),n=r.clone().add(r.hours()>=12?-12:12,"h"),t.text(r.format("A")),L(n,"h")?t.removeClass("disabled"):t.addClass("disabled")),a.filter("[data-time-component=hours]").text(r.format(s?"HH":"hh")),a.filter("[data-time-component=minutes]").text(r.format("mm")),a.filter("[data-time-component=seconds]").text(r.format("ss")),function(){var t=m.find(".timepicker-hours table"),n=o.clone().startOf("d"),i=[],r=e("
");for(o.hour()>11&&!s&&n.hour(12);n.isSame(o,"d")&&(s||o.hour()<12&&n.hour()<12||o.hour()>11);)n.hour()%4==0&&(r=e("
"),i.push(r)),r.append(''+n.format(s?"HH":"hh")+" | "),n.add(1,"h");t.empty().append(i)}(),function(){for(var t=m.find(".timepicker-minutes table"),n=o.clone().startOf("h"),r=[],a=e("
"),s=1===i.stepping?5:i.stepping;o.isSame(n,"h");)n.minute()%(4*s)==0&&(a=e("
"),r.push(a)),a.append(''+n.format("mm")+" | "),n.add(s,"m");t.empty().append(r)}(),function(){for(var t=m.find(".timepicker-seconds table"),n=o.clone().startOf("m"),i=[],r=e("
");o.isSame(n,"m");)n.second()%20==0&&(r=e("
"),i.push(r)),r.append(''+n.format("ss")+" | "),n.add(5,"s");t.empty().append(i)}()},P=function(){m&&($(),K())},N=function(e){var t=h?null:r;if(!e)return h=!0,a.val(""),n.data("date",""),S({type:"dp.change",date:!1,oldDate:t}),void P();if(e=e.clone().locale(i.locale),x()&&e.tz(i.timeZone),1!==i.stepping)for(e.minutes(Math.round(e.minutes()/i.stepping)*i.stepping).seconds(0);i.minDate&&e.isBefore(i.minDate);)e.add(i.stepping,"minutes");L(e)?(o=(r=e).clone(),a.val(r.format(l)),n.data("date",r.format(l)),h=!1,P(),S({type:"dp.change",date:r.clone(),oldDate:t})):(i.keepInvalid?S({type:"dp.change",date:e,oldDate:t}):a.val(h?"":r.format(l)),S({type:"dp.error",date:e,oldDate:t}))},Y=function(){var t=!1;return m?(m.find(".collapse").each((function(){var n=e(this).data("collapse");return!n||!n.transitioning||(t=!0,!1)})),t||(A&&A.hasClass("btn")&&A.toggleClass("active"),m.hide(),e(window).off("resize",I),m.off("click","[data-action]"),m.off("mousedown",!1),m.remove(),m=!1,S({type:"dp.hide",date:r.clone()}),a.blur(),o=r.clone()),f):f},F=function(){N(null)},j=function(e){return void 0===i.parseInputDate?(!t.isMoment(e)||e instanceof Date)&&(e=T(e)):e=i.parseInputDate(e),e},H={next:function(){var e=C[u].navFnc;o.add(C[u].navStep,e),$(),R(e)},previous:function(){var e=C[u].navFnc;o.subtract(C[u].navStep,e),$(),R(e)},pickerSwitch:function(){M(1)},selectMonth:function(t){var n=e(t.target).closest("tbody").find("span").index(e(t.target));o.month(n),u===g?(N(r.clone().year(o.year()).month(o.month())),i.inline||Y()):(M(-1),$()),R("M")},selectYear:function(t){var n=parseInt(e(t.target).text(),10)||0;o.year(n),u===g?(N(r.clone().year(o.year())),i.inline||Y()):(M(-1),$()),R("YYYY")},selectDecade:function(t){var n=parseInt(e(t.target).data("selection"),10)||0;o.year(n),u===g?(N(r.clone().year(o.year())),i.inline||Y()):(M(-1),$()),R("YYYY")},selectDay:function(t){var n=o.clone();e(t.target).is(".old")&&n.subtract(1,"M"),e(t.target).is(".new")&&n.add(1,"M"),N(n.date(parseInt(e(t.target).text(),10))),D()||i.keepOpen||i.inline||Y()},incrementHours:function(){var e=r.clone().add(1,"h");L(e,"h")&&N(e)},incrementMinutes:function(){var e=r.clone().add(i.stepping,"m");L(e,"m")&&N(e)},incrementSeconds:function(){var e=r.clone().add(1,"s");L(e,"s")&&N(e)},decrementHours:function(){var e=r.clone().subtract(1,"h");L(e,"h")&&N(e)},decrementMinutes:function(){var e=r.clone().subtract(i.stepping,"m");L(e,"m")&&N(e)},decrementSeconds:function(){var e=r.clone().subtract(1,"s");L(e,"s")&&N(e)},togglePeriod:function(){N(r.clone().add(r.hours()>=12?-12:12,"h"))},togglePicker:function(t){var n,r=e(t.target),o=r.closest("ul"),a=o.find(".in"),s=o.find(".collapse:not(.in)");if(a&&a.length){if((n=a.data("collapse"))&&n.transitioning)return;a.collapse?(a.collapse("hide"),s.collapse("show")):(a.removeClass("in"),s.addClass("in")),r.is("span")?r.toggleClass(i.icons.time+" "+i.icons.date):r.find("span").toggleClass(i.icons.time+" "+i.icons.date)}},showPicker:function(){m.find(".timepicker > div:not(.timepicker-picker)").hide(),m.find(".timepicker .timepicker-picker").show()},showHours:function(){m.find(".timepicker .timepicker-picker").hide(),m.find(".timepicker .timepicker-hours").show()},showMinutes:function(){m.find(".timepicker .timepicker-picker").hide(),m.find(".timepicker .timepicker-minutes").show()},showSeconds:function(){m.find(".timepicker .timepicker-picker").hide(),m.find(".timepicker .timepicker-seconds").show()},selectHour:function(t){var n=parseInt(e(t.target).text(),10);s||(r.hours()>=12?12!==n&&(n+=12):12===n&&(n=0)),N(r.clone().hours(n)),H.showPicker.call(f)},selectMinute:function(t){N(r.clone().minutes(parseInt(e(t.target).text(),10))),H.showPicker.call(f)},selectSecond:function(t){N(r.clone().seconds(parseInt(e(t.target).text(),10))),H.showPicker.call(f)},clear:F,today:function(){var e=T();L(e,"d")&&N(e)},close:Y},z=function(t){return e(t.currentTarget).is(".disabled")||H[e(t.currentTarget).data("action")].apply(f,arguments),!1},U=function(){var t;return a.prop("disabled")||!i.ignoreReadonly&&a.prop("readonly")||m||(void 0!==a.val()&&0!==a.val().trim().length?N(j(a.val().trim())):h&&i.useCurrent&&(i.inline||a.is("input")&&0===a.val().trim().length)&&(t=T(),"string"==typeof i.useCurrent&&(t={year:function(e){return e.month(0).date(1).hours(0).seconds(0).minutes(0)},month:function(e){return e.date(1).hours(0).seconds(0).minutes(0)},day:function(e){return e.hours(0).seconds(0).minutes(0)},hour:function(e){return e.seconds(0).minutes(0)},minute:function(e){return e.seconds(0)}}[i.useCurrent](t)),N(t)),m=O(),function(){var t=e("
"),n=o.clone().startOf("w").startOf("d");for(!0===i.calendarWeeks&&t.append(e("").addClass("cw").text("#"));n.isBefore(o.clone().endOf("w"));)t.append(e(" | ").addClass("dow").text(n.format("dd"))),n.add(1,"d");m.find(".datepicker-days thead").append(t)}(),function(){for(var t=[],n=o.clone().startOf("y").startOf("d");n.isSame(o,"y");)t.push(e("").attr("data-action","selectMonth").addClass("month").text(n.format("MMM"))),n.add(1,"M");m.find(".datepicker-months td").empty().append(t)}(),m.find(".timepicker-hours").hide(),m.find(".timepicker-minutes").hide(),m.find(".timepicker-seconds").hide(),P(),M(),e(window).on("resize",I),m.on("click","[data-action]",z),m.on("mousedown",!1),A&&A.hasClass("btn")&&A.toggleClass("active"),I(),m.show(),i.focusOnShow&&!a.is(":focus")&&a.focus(),S({type:"dp.show"})),f},q=function(){return m?Y():U()},V=function(e){var t,n,r,o,a=null,s=[],l={},c=e.which;for(t in w[c]="p",w)w.hasOwnProperty(t)&&"p"===w[t]&&(s.push(t),parseInt(t,10)!==c&&(l[t]=!0));for(t in i.keyBinds)if(i.keyBinds.hasOwnProperty(t)&&"function"==typeof i.keyBinds[t]&&(r=t.split(" ")).length===s.length&&k[c]===r[r.length-1]){for(o=!0,n=r.length-2;n>=0;n--)if(!(k[r[n]]in l)){o=!1;break}if(o){a=i.keyBinds[t];break}}a&&(a.call(f,m),e.stopPropagation(),e.preventDefault())},W=function(e){w[e.which]="r",e.stopPropagation(),e.preventDefault()},G=function(t){var n=e(t.target).val().trim(),i=n?j(n):null;return N(i),t.stopImmediatePropagation(),!1},X=function(t){var n={};return e.each(t,(function(){var e=j(this);e.isValid()&&(n[e.format("YYYY-MM-DD")]=!0)})),!!Object.keys(n).length&&n},Q=function(t){var n={};return e.each(t,(function(){n[this]=!0})),!!Object.keys(n).length&&n},J=function(){var e=i.format||"L LT";l=e.replace(/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,(function(e){return(r.localeData().longDateFormat(e)||e).replace(/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,(function(e){return r.localeData().longDateFormat(e)||e}))})),(c=i.extraFormats?i.extraFormats.slice():[]).indexOf(e)<0&&c.indexOf(l)<0&&c.push(l),s=l.toLowerCase().indexOf("a")<1&&l.replace(/\[.*?\]/g,"").indexOf("h")<1,E("y")&&(g=2),E("M")&&(g=1),E("d")&&(g=0),u=Math.max(g,u),h||N(r)};if(f.destroy=function(){Y(),a.off({change:G,blur:blur,keydown:V,keyup:W,focus:i.allowInputToggle?Y:""}),n.is("input")?a.off({focus:U}):A&&(A.off("click",q),A.off("mousedown",!1)),n.removeData("DateTimePicker"),n.removeData("date")},f.toggle=q,f.show=U,f.hide=Y,f.disable=function(){return Y(),A&&A.hasClass("btn")&&A.addClass("disabled"),a.prop("disabled",!0),f},f.enable=function(){return A&&A.hasClass("btn")&&A.removeClass("disabled"),a.prop("disabled",!1),f},f.ignoreReadonly=function(e){if(0===arguments.length)return i.ignoreReadonly;if("boolean"!=typeof e)throw new TypeError("ignoreReadonly () expects a boolean parameter");return i.ignoreReadonly=e,f},f.options=function(t){if(0===arguments.length)return e.extend(!0,{},i);if(!(t instanceof Object))throw new TypeError("options() options parameter should be an object");return e.extend(!0,i,t),e.each(i,(function(e,t){if(void 0===f[e])throw new TypeError("option "+e+" is not recognized!");f[e](t)})),f},f.date=function(e){if(0===arguments.length)return h?null:r.clone();if(!(null===e||"string"==typeof e||t.isMoment(e)||e instanceof Date))throw new TypeError("date() parameter must be one of [null, string, moment or Date]");return N(null===e?null:j(e)),f},f.format=function(e){if(0===arguments.length)return i.format;if("string"!=typeof e&&("boolean"!=typeof e||!1!==e))throw new TypeError("format() expects a string or boolean:false parameter "+e);return i.format=e,l&&J(),f},f.timeZone=function(e){if(0===arguments.length)return i.timeZone;if("string"!=typeof e)throw new TypeError("newZone() expects a string parameter");return i.timeZone=e,f},f.dayViewHeaderFormat=function(e){if(0===arguments.length)return i.dayViewHeaderFormat;if("string"!=typeof e)throw new TypeError("dayViewHeaderFormat() expects a string parameter");return i.dayViewHeaderFormat=e,f},f.extraFormats=function(e){if(0===arguments.length)return i.extraFormats;if(!1!==e&&!(e instanceof Array))throw new TypeError("extraFormats() expects an array or false parameter");return i.extraFormats=e,c&&J(),f},f.disabledDates=function(t){if(0===arguments.length)return i.disabledDates?e.extend({},i.disabledDates):i.disabledDates;if(!t)return i.disabledDates=!1,P(),f;if(!(t instanceof Array))throw new TypeError("disabledDates() expects an array parameter");return i.disabledDates=X(t),i.enabledDates=!1,P(),f},f.enabledDates=function(t){if(0===arguments.length)return i.enabledDates?e.extend({},i.enabledDates):i.enabledDates;if(!t)return i.enabledDates=!1,P(),f;if(!(t instanceof Array))throw new TypeError("enabledDates() expects an array parameter");return i.enabledDates=X(t),i.disabledDates=!1,P(),f},f.daysOfWeekDisabled=function(e){if(0===arguments.length)return i.daysOfWeekDisabled.splice(0);if("boolean"==typeof e&&!e)return i.daysOfWeekDisabled=!1,P(),f;if(!(e instanceof Array))throw new TypeError("daysOfWeekDisabled() expects an array parameter");if(i.daysOfWeekDisabled=e.reduce((function(e,t){return(t=parseInt(t,10))>6||t<0||isNaN(t)||-1===e.indexOf(t)&&e.push(t),e}),[]).sort(),i.useCurrent&&!i.keepInvalid){for(var t=0;!L(r,"d");){if(r.add(1,"d"),31===t)throw"Tried 31 times to find a valid date";t++}N(r)}return P(),f},f.maxDate=function(e){if(0===arguments.length)return i.maxDate?i.maxDate.clone():i.maxDate;if("boolean"==typeof e&&!1===e)return i.maxDate=!1,P(),f;"string"==typeof e&&("now"!==e&&"moment"!==e||(e=T()));var t=j(e);if(!t.isValid())throw new TypeError("maxDate() Could not parse date parameter: "+e);if(i.minDate&&t.isBefore(i.minDate))throw new TypeError("maxDate() date parameter is before options.minDate: "+t.format(l));return i.maxDate=t,i.useCurrent&&!i.keepInvalid&&r.isAfter(e)&&N(i.maxDate),o.isAfter(t)&&(o=t.clone().subtract(i.stepping,"m")),P(),f},f.minDate=function(e){if(0===arguments.length)return i.minDate?i.minDate.clone():i.minDate;if("boolean"==typeof e&&!1===e)return i.minDate=!1,P(),f;"string"==typeof e&&("now"!==e&&"moment"!==e||(e=T()));var t=j(e);if(!t.isValid())throw new TypeError("minDate() Could not parse date parameter: "+e);if(i.maxDate&&t.isAfter(i.maxDate))throw new TypeError("minDate() date parameter is after options.maxDate: "+t.format(l));return i.minDate=t,i.useCurrent&&!i.keepInvalid&&r.isBefore(e)&&N(i.minDate),o.isBefore(t)&&(o=t.clone().add(i.stepping,"m")),P(),f},f.defaultDate=function(e){if(0===arguments.length)return i.defaultDate?i.defaultDate.clone():i.defaultDate;if(!e)return i.defaultDate=!1,f;"string"==typeof e&&(e="now"===e||"moment"===e?T():T(e));var t=j(e);if(!t.isValid())throw new TypeError("defaultDate() Could not parse date parameter: "+e);if(!L(t))throw new TypeError("defaultDate() date passed is invalid according to component setup validations");return i.defaultDate=t,(i.defaultDate&&i.inline||""===a.val().trim())&&N(i.defaultDate),f},f.locale=function(e){if(0===arguments.length)return i.locale;if(!t.localeData(e))throw new TypeError("locale() locale "+e+" is not loaded from moment locales!");return i.locale=e,r.locale(i.locale),o.locale(i.locale),l&&J(),m&&(Y(),U()),f},f.stepping=function(e){return 0===arguments.length?i.stepping:(e=parseInt(e,10),(isNaN(e)||e<1)&&(e=1),i.stepping=e,f)},f.useCurrent=function(e){var t=["year","month","day","hour","minute"];if(0===arguments.length)return i.useCurrent;if("boolean"!=typeof e&&"string"!=typeof e)throw new TypeError("useCurrent() expects a boolean or string parameter");if("string"==typeof e&&-1===t.indexOf(e.toLowerCase()))throw new TypeError("useCurrent() expects a string parameter of "+t.join(", "));return i.useCurrent=e,f},f.collapse=function(e){if(0===arguments.length)return i.collapse;if("boolean"!=typeof e)throw new TypeError("collapse() expects a boolean parameter");return i.collapse===e||(i.collapse=e,m&&(Y(),U())),f},f.icons=function(t){if(0===arguments.length)return e.extend({},i.icons);if(!(t instanceof Object))throw new TypeError("icons() expects parameter to be an Object");return e.extend(i.icons,t),m&&(Y(),U()),f},f.tooltips=function(t){if(0===arguments.length)return e.extend({},i.tooltips);if(!(t instanceof Object))throw new TypeError("tooltips() expects parameter to be an Object");return e.extend(i.tooltips,t),m&&(Y(),U()),f},f.useStrict=function(e){if(0===arguments.length)return i.useStrict;if("boolean"!=typeof e)throw new TypeError("useStrict() expects a boolean parameter");return i.useStrict=e,f},f.sideBySide=function(e){if(0===arguments.length)return i.sideBySide;if("boolean"!=typeof e)throw new TypeError("sideBySide() expects a boolean parameter");return i.sideBySide=e,m&&(Y(),U()),f},f.viewMode=function(e){if(0===arguments.length)return i.viewMode;if("string"!=typeof e)throw new TypeError("viewMode() expects a string parameter");if(-1===b.indexOf(e))throw new TypeError("viewMode() parameter must be one of ("+b.join(", ")+") value");return i.viewMode=e,u=Math.max(b.indexOf(e),g),M(),f},f.toolbarPlacement=function(e){if(0===arguments.length)return i.toolbarPlacement;if("string"!=typeof e)throw new TypeError("toolbarPlacement() expects a string parameter");if(-1===_.indexOf(e))throw new TypeError("toolbarPlacement() parameter must be one of ("+_.join(", ")+") value");return i.toolbarPlacement=e,m&&(Y(),U()),f},f.widgetPositioning=function(t){if(0===arguments.length)return e.extend({},i.widgetPositioning);if("[object Object]"!=={}.toString.call(t))throw new TypeError("widgetPositioning() expects an object variable");if(t.horizontal){if("string"!=typeof t.horizontal)throw new TypeError("widgetPositioning() horizontal variable must be a string");if(t.horizontal=t.horizontal.toLowerCase(),-1===y.indexOf(t.horizontal))throw new TypeError("widgetPositioning() expects horizontal parameter to be one of ("+y.join(", ")+")");i.widgetPositioning.horizontal=t.horizontal}if(t.vertical){if("string"!=typeof t.vertical)throw new TypeError("widgetPositioning() vertical variable must be a string");if(t.vertical=t.vertical.toLowerCase(),-1===v.indexOf(t.vertical))throw new TypeError("widgetPositioning() expects vertical parameter to be one of ("+v.join(", ")+")");i.widgetPositioning.vertical=t.vertical}return P(),f},f.calendarWeeks=function(e){if(0===arguments.length)return i.calendarWeeks;if("boolean"!=typeof e)throw new TypeError("calendarWeeks() expects parameter to be a boolean value");return i.calendarWeeks=e,P(),f},f.showTodayButton=function(e){if(0===arguments.length)return i.showTodayButton;if("boolean"!=typeof e)throw new TypeError("showTodayButton() expects a boolean parameter");return i.showTodayButton=e,m&&(Y(),U()),f},f.showClear=function(e){if(0===arguments.length)return i.showClear;if("boolean"!=typeof e)throw new TypeError("showClear() expects a boolean parameter");return i.showClear=e,m&&(Y(),U()),f},f.widgetParent=function(t){if(0===arguments.length)return i.widgetParent;if("string"==typeof t&&(t=e(t)),null!==t&&"string"!=typeof t&&!(t instanceof e))throw new TypeError("widgetParent() expects a string or a jQuery object parameter");return i.widgetParent=t,m&&(Y(),U()),f},f.keepOpen=function(e){if(0===arguments.length)return i.keepOpen;if("boolean"!=typeof e)throw new TypeError("keepOpen() expects a boolean parameter");return i.keepOpen=e,f},f.focusOnShow=function(e){if(0===arguments.length)return i.focusOnShow;if("boolean"!=typeof e)throw new TypeError("focusOnShow() expects a boolean parameter");return i.focusOnShow=e,f},f.inline=function(e){if(0===arguments.length)return i.inline;if("boolean"!=typeof e)throw new TypeError("inline() expects a boolean parameter");return i.inline=e,f},f.clear=function(){return F(),f},f.keyBinds=function(e){return 0===arguments.length?i.keyBinds:(i.keyBinds=e,f)},f.getMoment=function(e){return T(e)},f.debug=function(e){if("boolean"!=typeof e)throw new TypeError("debug() expects a boolean parameter");return i.debug=e,f},f.allowInputToggle=function(e){if(0===arguments.length)return i.allowInputToggle;if("boolean"!=typeof e)throw new TypeError("allowInputToggle() expects a boolean parameter");return i.allowInputToggle=e,f},f.showClose=function(e){if(0===arguments.length)return i.showClose;if("boolean"!=typeof e)throw new TypeError("showClose() expects a boolean parameter");return i.showClose=e,f},f.keepInvalid=function(e){if(0===arguments.length)return i.keepInvalid;if("boolean"!=typeof e)throw new TypeError("keepInvalid() expects a boolean parameter");return i.keepInvalid=e,f},f.datepickerInput=function(e){if(0===arguments.length)return i.datepickerInput;if("string"!=typeof e)throw new TypeError("datepickerInput() expects a string parameter");return i.datepickerInput=e,f},f.parseInputDate=function(e){if(0===arguments.length)return i.parseInputDate;if("function"!=typeof e)throw new TypeError("parseInputDate() sholud be as function");return i.parseInputDate=e,f},f.disabledTimeIntervals=function(t){if(0===arguments.length)return i.disabledTimeIntervals?e.extend({},i.disabledTimeIntervals):i.disabledTimeIntervals;if(!t)return i.disabledTimeIntervals=!1,P(),f;if(!(t instanceof Array))throw new TypeError("disabledTimeIntervals() expects an array parameter");return i.disabledTimeIntervals=t,P(),f},f.disabledHours=function(t){if(0===arguments.length)return i.disabledHours?e.extend({},i.disabledHours):i.disabledHours;if(!t)return i.disabledHours=!1,P(),f;if(!(t instanceof Array))throw new TypeError("disabledHours() expects an array parameter");if(i.disabledHours=Q(t),i.enabledHours=!1,i.useCurrent&&!i.keepInvalid){for(var n=0;!L(r,"h");){if(r.add(1,"h"),24===n)throw"Tried 24 times to find a valid date";n++}N(r)}return P(),f},f.enabledHours=function(t){if(0===arguments.length)return i.enabledHours?e.extend({},i.enabledHours):i.enabledHours;if(!t)return i.enabledHours=!1,P(),f;if(!(t instanceof Array))throw new TypeError("enabledHours() expects an array parameter");if(i.enabledHours=Q(t),i.disabledHours=!1,i.useCurrent&&!i.keepInvalid){for(var n=0;!L(r,"h");){if(r.add(1,"h"),24===n)throw"Tried 24 times to find a valid date";n++}N(r)}return P(),f},f.viewDate=function(e){if(0===arguments.length)return o.clone();if(!e)return o=r.clone(),f;if(!("string"==typeof e||t.isMoment(e)||e instanceof Date))throw new TypeError("viewDate() parameter must be one of [string, moment or Date]");return o=j(e),R(),f},n.is("input"))a=n;else if(0===(a=n.find(i.datepickerInput)).length)a=n.find("input");else if(!a.is("input"))throw new Error('CSS class "'+i.datepickerInput+'" cannot be applied to non input element');if(n.hasClass("input-group")&&(A=0===n.find(".datepickerbutton").length?n.find(".input-group-addon"):n.find(".datepickerbutton")),!i.inline&&!a.is("input"))throw new Error("Could not initialize DateTimePicker without an input element");return r=T(),o=r.clone(),e.extend(!0,i,(p={},(d=n.is("input")||i.inline?n.data():n.find("input").data()).dateOptions&&d.dateOptions instanceof Object&&(p=e.extend(!0,p,d.dateOptions)),e.each(i,(function(e){var t="date"+e.charAt(0).toUpperCase()+e.slice(1);void 0!==d[t]&&(p[e]=d[t])})),p)),f.options(i),J(),a.on({change:G,blur:i.debug?"":Y,keydown:V,keyup:W,focus:i.allowInputToggle?U:""}),n.is("input")?a.on({focus:U}):A&&(A.on("click",q),A.on("mousedown",!1)),a.prop("disabled")&&f.disable(),a.is("input")&&0!==a.val().trim().length?N(j(a.val().trim())):i.defaultDate&&void 0===a.attr("placeholder")&&N(i.defaultDate),i.inline&&U(),f};return e.fn.datetimepicker=function(t){t=t||{};var i,r=Array.prototype.slice.call(arguments,1),o=!0,a=["destroy","hide","show","toggle"];if("object"==typeof t)return this.each((function(){var i,r=e(this);r.data("DateTimePicker")||(i=e.extend(!0,{},e.fn.datetimepicker.defaults,t),r.data("DateTimePicker",n(r,i)))}));if("string"==typeof t)return this.each((function(){var n=e(this).data("DateTimePicker");if(!n)throw new Error('bootstrap-datetimepicker("'+t+'") method was called on an element that is not using DateTimePicker');i=n[t].apply(n,r),o=i===n})),o||e.inArray(t,a)>-1?this:i;throw new TypeError("Invalid arguments for DateTimePicker: "+t)},e.fn.datetimepicker.defaults={timeZone:"",format:!1,dayViewHeaderFormat:"MMMM YYYY",extraFormats:!1,stepping:1,minDate:!1,maxDate:!1,useCurrent:!0,collapse:!0,locale:t.locale(),defaultDate:!1,disabledDates:!1,enabledDates:!1,icons:{time:"glyphicon glyphicon-time",date:"glyphicon glyphicon-calendar",up:"glyphicon glyphicon-chevron-up",down:"glyphicon glyphicon-chevron-down",previous:"glyphicon glyphicon-chevron-left",next:"glyphicon glyphicon-chevron-right",today:"glyphicon glyphicon-screenshot",clear:"glyphicon glyphicon-trash",close:"glyphicon glyphicon-remove"},tooltips:{today:"Go to today",clear:"Clear selection",close:"Close the picker",selectMonth:"Select Month",prevMonth:"Previous Month",nextMonth:"Next Month",selectYear:"Select Year",prevYear:"Previous Year",nextYear:"Next Year",selectDecade:"Select Decade",prevDecade:"Previous Decade",nextDecade:"Next Decade",prevCentury:"Previous Century",nextCentury:"Next Century",pickHour:"Pick Hour",incrementHour:"Increment Hour",decrementHour:"Decrement Hour",pickMinute:"Pick Minute",incrementMinute:"Increment Minute",decrementMinute:"Decrement Minute",pickSecond:"Pick Second",incrementSecond:"Increment Second",decrementSecond:"Decrement Second",togglePeriod:"Toggle Period",selectTime:"Select Time"},useStrict:!1,sideBySide:!1,daysOfWeekDisabled:!1,calendarWeeks:!1,viewMode:"days",toolbarPlacement:"default",showTodayButton:!1,showClear:!1,showClose:!1,widgetPositioning:{horizontal:"auto",vertical:"auto"},widgetParent:null,ignoreReadonly:!1,keepOpen:!1,focusOnShow:!0,inline:!1,keepInvalid:!1,datepickerInput:".datepickerinput",keyBinds:{up:function(e){if(e){var t=this.date()||this.getMoment();e.find(".datepicker").is(":visible")?this.date(t.clone().subtract(7,"d")):this.date(t.clone().add(this.stepping(),"m"))}},down:function(e){if(e){var t=this.date()||this.getMoment();e.find(".datepicker").is(":visible")?this.date(t.clone().add(7,"d")):this.date(t.clone().subtract(this.stepping(),"m"))}else this.show()},"control up":function(e){if(e){var t=this.date()||this.getMoment();e.find(".datepicker").is(":visible")?this.date(t.clone().subtract(1,"y")):this.date(t.clone().add(1,"h"))}},"control down":function(e){if(e){var t=this.date()||this.getMoment();e.find(".datepicker").is(":visible")?this.date(t.clone().add(1,"y")):this.date(t.clone().subtract(1,"h"))}},left:function(e){if(e){var t=this.date()||this.getMoment();e.find(".datepicker").is(":visible")&&this.date(t.clone().subtract(1,"d"))}},right:function(e){if(e){var t=this.date()||this.getMoment();e.find(".datepicker").is(":visible")&&this.date(t.clone().add(1,"d"))}},pageUp:function(e){if(e){var t=this.date()||this.getMoment();e.find(".datepicker").is(":visible")&&this.date(t.clone().subtract(1,"M"))}},pageDown:function(e){if(e){var t=this.date()||this.getMoment();e.find(".datepicker").is(":visible")&&this.date(t.clone().add(1,"M"))}},enter:function(){this.hide()},escape:function(){this.hide()},"control space":function(e){e&&e.find(".timepicker").is(":visible")&&e.find('.btn[data-action="togglePeriod"]').click()},t:function(){this.date(this.getMoment())},delete:function(){this.clear()}},debug:!1,allowInputToggle:!1,disabledTimeIntervals:!1,disabledHours:!1,enabledHours:!1,viewDate:!1},e.fn.datetimepicker})?i.apply(t,r):i)||(e.exports=o)}()},function(e,t){},function(e,t){},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var i,r=n(6),o=n(7),a=n(10),s=n(14),l=n(85),c=function(){function e(){this.enqueue=!0,this.typeQueue=[],this.defaultTypes=Object(r.z)(e.prototype,["hash","string","query","path","int","bool","date","json","any"]);this.types=Object(r.t)(Object(r.u)(this.defaultTypes,(function(e,t){return new l.a(Object(r.l)({name:t},e))})),{})}return e.prototype.dispose=function(){this.types={}},e.prototype.type=function(e,t,n){if(!Object(o.c)(t))return this.types[e];if(this.types.hasOwnProperty(e))throw new Error("A type named '"+e+"' has already been defined.");return this.types[e]=new l.a(Object(r.l)({name:e},t)),n&&(this.typeQueue.push({name:e,def:n}),this.enqueue||this._flushTypeQueue()),this},e.prototype._flushTypeQueue=function(){for(;this.typeQueue.length;){var e=this.typeQueue.shift();if(e.pattern)throw new Error("You cannot override a type's .pattern at runtime.");Object(r.l)(this.types[e.name],s.b.$injector.invoke(e.def))}},e}();i=function(e){var t=function(e){return null!=e?e.toString():e},n={encode:t,decode:t,is:Object(a.e)(String),pattern:/.*/,equals:function(e,t){return e==t}};return Object(r.l)({},n,e)},Object(r.l)(c.prototype,{string:i({}),path:i({pattern:/[^/]*/}),query:i({}),hash:i({inherit:!1}),int:i({decode:function(e){return parseInt(e,10)},is:function(e){return!Object(o.g)(e)&&this.decode(e.toString())===e},pattern:/-?\d+/}),bool:i({encode:function(e){return e?1:0},decode:function(e){return 0!==parseInt(e,10)},is:Object(a.e)(Boolean),pattern:/0|1/}),date:i({encode:function(e){return this.is(e)?[e.getFullYear(),("0"+(e.getMonth()+1)).slice(-2),("0"+e.getDate()).slice(-2)].join("-"):void 0},decode:function(e){if(this.is(e))return e;var t=this.capture.exec(e);return t?new Date(t[1],t[2]-1,t[3]):void 0},is:function(e){return e instanceof Date&&!isNaN(e.valueOf())},equals:function(e,t){return["getFullYear","getMonth","getDate"].reduce((function(n,i){return n&&e[i]()===t[i]()}),!0)},pattern:/[0-9]{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])/,capture:/([0-9]{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])/}),json:i({encode:r.H,decode:r.q,is:Object(a.e)(Object),equals:r.k,pattern:/[^/]*/}),any:i({encode:r.r,decode:r.r,is:function(){return!0},equals:r.k})})},function(e,t,n){"use strict";n(86),n(33)},function(e,t){},function(e,t,n){"use strict";n(27),n(150),n(66),n(20),n(87),n(32),n(159),n(90)},function(e,t,n){"use strict";var i=n(437);n.o(i,"BaseUrlRule")&&n.d(t,"BaseUrlRule",(function(){return i.BaseUrlRule})),n.o(i,"UIRouter")&&n.d(t,"UIRouter",(function(){return i.UIRouter})),n.o(i,"ViewService")&&n.d(t,"ViewService",(function(){return i.ViewService}));n(47),n(152),n(153);var r=n(88);n.d(t,"BaseUrlRule",(function(){return r.a}));n(156),n(157),n(158)},function(e,t){},function(e,t,n){"use strict";var i=n(439);n.o(i,"BaseUrlRule")&&n.d(t,"BaseUrlRule",(function(){return i.BaseUrlRule})),n.o(i,"UIRouter")&&n.d(t,"UIRouter",(function(){return i.UIRouter})),n.o(i,"ViewService")&&n.d(t,"ViewService",(function(){return i.ViewService}));var r=n(154);n.d(t,"ViewService",(function(){return r.a}))},function(e,t){},function(e,t,n){"use strict";var i=n(441);n.o(i,"BaseUrlRule")&&n.d(t,"BaseUrlRule",(function(){return i.BaseUrlRule})),n.o(i,"ViewService")&&n.d(t,"ViewService",(function(){return i.ViewService}))},function(e,t,n){"use strict";var i=n(442);n.o(i,"BaseUrlRule")&&n.d(t,"BaseUrlRule",(function(){return i.BaseUrlRule})),n.o(i,"ViewService")&&n.d(t,"ViewService",(function(){return i.ViewService}));n(120),n(121),n(62),n(160),n(161),n(162),n(163),n(122),n(45),n(443)},function(e,t){},function(e,t,n){"use strict";var i=n(122),r=n(160),o=n(45),a=n(162),s=n(161),l=n(163);n(121),n(120),n(14);Object(o.c)("vanilla.hashBangLocation",!1,r.a,i.a),Object(o.c)("vanilla.pushStateLocation",!0,a.a,i.a),Object(o.c)("vanilla.memoryLocation",!1,s.a,l.a)},function(e,t,n){"use strict";!function(){function e(){}e.prototype.dispose=function(e){}}()},,function(e,t){var n,i,r,o,a,s,l,c,u;window.CKEDITOR&&window.CKEDITOR.dom||(window.CKEDITOR||(window.CKEDITOR=function(){var e=/(^|.*[\\\/])ckeditor\.js(?:\?.*|;.*)?$/i,t={timestamp:"KA9B",version:"4.15.1 (Standard)",revision:"1aa21195b",rnd:Math.floor(900*Math.random())+100,_:{pending:[],basePathSrcPattern:e},status:"unloaded",basePath:function(){var t=window.CKEDITOR_BASEPATH||"";if(!t)for(var n=document.getElementsByTagName("script"),i=0;il.getListenerIndex(n)){l=l.listeners,i||(i=this),isNaN(o)&&(o=10);var c=this;a.fn=n,a.priority=o;for(var u=l.length-1;0<=u;u--)if(l[u].priority<=o)return l.splice(u+1,0,a),{removeListener:s};l.unshift(a)}return{removeListener:s}},once:function(){var e=Array.prototype.slice.call(arguments),t=e[1];return e[1]=function(e){return e.removeListener(),t.apply(this,arguments)},this.on.apply(this,e)},capture:function(){CKEDITOR.event.useCapture=1;var e=this.on.apply(this,arguments);return CKEDITOR.event.useCapture=0,e},fire:function(){var e=0,n=function(){e=1},i=0,r=function(){i=1};return function(o,a,s){var l=t(this)[o];o=e;var c=i;if(e=i=0,l&&(d=l.listeners).length)for(var u,d=d.slice(0),p=0;pdocument.documentMode),mobile:-1i||n.quirks),n.gecko&&(t=e.match(/rv:([\d\.]+)/))&&(i=1e4*(t=t[1].split("."))[0]+100*(t[1]||0)+1*(t[2]||0)),n.air&&(i=parseFloat(e.match(/ adobeair\/(\d+)/)[1])),n.webkit&&(i=parseFloat(e.match(/ applewebkit\/(\d+)/)[1])),n.version=i,n.isCompatible=!(n.ie&&7>i||n.gecko&&4e4>i||n.webkit&&534>i),n.hidpi=2<=window.devicePixelRatio,n.needsBrFiller=n.gecko||n.webkit||n.ie&&10i,n.cssClass="cke_browser_"+(n.ie?"ie":n.gecko?"gecko":n.webkit?"webkit":"unknown"),n.quirks&&(n.cssClass+=" cke_browser_quirks"),n.ie&&(n.cssClass+=" cke_browser_ie"+(n.quirks?"6 cke_browser_iequirks":n.version)),n.air&&(n.cssClass+=" cke_browser_air"),n.iOS&&(n.cssClass+=" cke_browser_ios"),n.hidpi&&(n.cssClass+=" cke_hidpi"),n}()),"unloaded"==CKEDITOR.status&&(CKEDITOR.event.implementOn(CKEDITOR),CKEDITOR.loadFullCore=function(){if("basic_ready"!=CKEDITOR.status)CKEDITOR.loadFullCore._load=1;else{delete CKEDITOR.loadFullCore;var e=document.createElement("script");e.type="text/javascript",e.src=CKEDITOR.basePath+"ckeditor.js",document.getElementsByTagName("head")[0].appendChild(e)}},CKEDITOR.loadFullCoreTimeout=0,CKEDITOR.add=function(e){(this._.pending||(this._.pending=[])).push(e)},CKEDITOR.domReady((function(){var e=CKEDITOR.loadFullCore,t=CKEDITOR.loadFullCoreTimeout;e&&(CKEDITOR.status="basic_ready",e&&e._load?e():t&&setTimeout((function(){CKEDITOR.loadFullCore&&CKEDITOR.loadFullCore()}),1e3*t))})),CKEDITOR.status="basic_loaded"),CKEDITOR.VERBOSITY_WARN=1,CKEDITOR.VERBOSITY_ERROR=2,CKEDITOR.verbosity=CKEDITOR.VERBOSITY_WARN|CKEDITOR.VERBOSITY_ERROR,CKEDITOR.warn=function(e,t){CKEDITOR.verbosity&CKEDITOR.VERBOSITY_WARN&&CKEDITOR.fire("log",{type:"warn",errorCode:e,additionalData:t})},CKEDITOR.error=function(e,t){CKEDITOR.verbosity&CKEDITOR.VERBOSITY_ERROR&&CKEDITOR.fire("log",{type:"error",errorCode:e,additionalData:t})},CKEDITOR.on("log",(function(e){if(window.console&&window.console.log){var t=console[e.data.type]?e.data.type:"log",n=e.data.errorCode;(e=e.data.additionalData)?console[t]("[CKEDITOR] Error code: "+n+".",e):console[t]("[CKEDITOR] Error code: "+n+"."),console[t]("[CKEDITOR] For more information about this error go to https://ckeditor.com/docs/ckeditor4/latest/guide/dev_errors.html#"+n)}}),null,null,999),CKEDITOR.dom={},function(){function e(e,t,n){this._minInterval=e,this._context=n,this._lastOutput=this._scheduledTimer=0,this._output=CKEDITOR.tools.bind(t,n||{});var i=this;this.input=function(){function e(){i._lastOutput=(new Date).getTime(),i._scheduledTimer=0,i._call()}if(!i._scheduledTimer||!1!==i._reschedule()){var t=(new Date).getTime()-i._lastOutput;t/g,a=/",amp:"&",quot:'"',nbsp:" ",shy:""},u=function(e,t){return"#"==t[0]?String.fromCharCode(parseInt(t.slice(1),10)):c[t]};CKEDITOR.on("reset",(function(){n=[]})),CKEDITOR.tools={arrayCompare:function(e,t){if(!e&&!t)return!0;if(!e||!t||e.length!=t.length)return!1;for(var n=0;n"+t+""):n.push(''));return n.join("")},htmlEncode:function(e){return null==e?"":String(e).replace(r,"&").replace(o,">").replace(a,"<")},htmlDecode:function(e){return e.replace(l,u)},htmlEncodeAttr:function(e){return CKEDITOR.tools.htmlEncode(e).replace(s,""")},htmlDecodeAttr:function(e){return CKEDITOR.tools.htmlDecode(e)},transformPlainTextToHtml:function(e,t){var n=t==CKEDITOR.ENTER_BR,i=(i=this.htmlEncode(e.replace(/\r\n/g,"\n"))).replace(/\t/g," "),r=t==CKEDITOR.ENTER_P?"p":"div";if(!n){var o=/\n{2}/g;if(o.test(i)){var a="<"+r+">",s=""+r+">";i=a+i.replace(o,(function(){return s+a}))+s}}return i=i.replace(/\n/g," "),n||(i=i.replace(new RegExp(" (?="+r+">)"),(function(e){return CKEDITOR.tools.repeat(e,2)}))),(i=i.replace(/^ | $/g," ")).replace(/(>|\s) /g,(function(e,t){return t+" "})).replace(/ (?=<)/g," ")},getNextNumber:function(){var e=0;return function(){return++e}}(),getNextId:function(){return"cke_"+this.getNextNumber()},getUniqueId:function(){for(var e="e",t=0;8>t;t++)e+=Math.floor(65536*(1+Math.random())).toString(16).substring(1);return e},override:function(e,t){var n=t(e);return n.prototype=e.prototype,n},setTimeout:function(e,t,n,i,r){return r||(r=window),n||(n=r),r.setTimeout((function(){i?e.apply(n,[].concat(i)):e.apply(n)}),t||0)},throttle:function(e,t,n){return new this.buffers.throttle(e,t,n)},trim:function(){var e=/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g;return function(t){return t.replace(e,"")}}(),ltrim:function(){var e=/^[ \t\n\r]+/g;return function(t){return t.replace(e,"")}}(),rtrim:function(){var e=/[ \t\n\r]+$/g;return function(t){return t.replace(e,"")}}(),indexOf:function(e,t){if("function"==typeof t){for(var n=0,i=e.length;n',CKEDITOR.document),CKEDITOR.document.getBody().append(e)),!/%$/.test(t)){var n=0>parseFloat(t);return n&&(t=t.replace("-","")),e.setStyle("width",t),t=e.$.clientWidth,n?-t:t}return t}}(),repeat:function(e,t){return Array(t+1).join(e)},tryThese:function(){for(var e,t=0,n=arguments.length;tt;t++)e[t]=("0"+parseInt(e[t],10).toString(16)).slice(-2);return"#"+e.join("")}))},normalizeHex:function(e){return e.replace(/#(([0-9a-f]{3}){1,2})($|;|\s+)/gi,(function(e,t,n,i){return 3==(e=t.toLowerCase()).length&&(e=[(e=e.split(""))[0],e[0],e[1],e[1],e[2],e[2]].join("")),"#"+e+i}))},_isValidColorFormat:function(e){return!!e&&(e=e.replace(/\s+/g,""),/^[a-z0-9()#%,./]+$/i.test(e))},parseCssText:function(e,t,n){var i={};return n&&(e=new CKEDITOR.dom.element("span").setAttribute("style",e).getAttribute("style")||""),e&&(e=CKEDITOR.tools.normalizeHex(CKEDITOR.tools.convertRgbToHex(e))),e&&";"!=e?(e.replace(/"/g,'"').replace(/\s*([^:;\s]+)\s*:\s*([^;]+)\s*(?=;|$)/g,(function(e,n,r){t&&("font-family"==(n=n.toLowerCase())&&(r=r.replace(/\s*,\s*/g,",")),r=CKEDITOR.tools.trim(r)),i[n]=r})),i):i},writeCssText:function(e,t){var n,i=[];for(n in e)i.push(n+":"+e[n]);return t&&i.sort(),i.join("; ")},objectCompare:function(e,t,n){var i;if(!e&&!t)return!0;if(!e||!t)return!1;for(i in e)if(e[i]!=t[i])return!1;if(!n)for(i in t)if(e[i]!=t[i])return!1;return!0},objectKeys:function(e){return CKEDITOR.tools.object.keys(e)},convertArrayToObject:function(e,t){var n={};1==arguments.length&&(t=!0);for(var i=0,r=e.length;in;n++)e.push(Math.floor(256*Math.random()));for(n=0;na)for(r=a;3>r;r++)o[r]=0;for(s[0]=(252&o[0])>>2,s[1]=(3&o[0])<<4|o[1]>>4,s[2]=(15&o[1])<<2|(192&o[2])>>6,s[3]=63&o[2],r=0;4>r;r++)n=r<=a?n+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(s[r]):n+"="}return n},style:{parse:{_colors:{aliceblue:"#F0F8FF",antiquewhite:"#FAEBD7",aqua:"#00FFFF",aquamarine:"#7FFFD4",azure:"#F0FFFF",beige:"#F5F5DC",bisque:"#FFE4C4",black:"#000000",blanchedalmond:"#FFEBCD",blue:"#0000FF",blueviolet:"#8A2BE2",brown:"#A52A2A",burlywood:"#DEB887",cadetblue:"#5F9EA0",chartreuse:"#7FFF00",chocolate:"#D2691E",coral:"#FF7F50",cornflowerblue:"#6495ED",cornsilk:"#FFF8DC",crimson:"#DC143C",cyan:"#00FFFF",darkblue:"#00008B",darkcyan:"#008B8B",darkgoldenrod:"#B8860B",darkgray:"#A9A9A9",darkgreen:"#006400",darkgrey:"#A9A9A9",darkkhaki:"#BDB76B",darkmagenta:"#8B008B",darkolivegreen:"#556B2F",darkorange:"#FF8C00",darkorchid:"#9932CC",darkred:"#8B0000",darksalmon:"#E9967A",darkseagreen:"#8FBC8F",darkslateblue:"#483D8B",darkslategray:"#2F4F4F",darkslategrey:"#2F4F4F",darkturquoise:"#00CED1",darkviolet:"#9400D3",deeppink:"#FF1493",deepskyblue:"#00BFFF",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1E90FF",firebrick:"#B22222",floralwhite:"#FFFAF0",forestgreen:"#228B22",fuchsia:"#FF00FF",gainsboro:"#DCDCDC",ghostwhite:"#F8F8FF",gold:"#FFD700",goldenrod:"#DAA520",gray:"#808080",green:"#008000",greenyellow:"#ADFF2F",grey:"#808080",honeydew:"#F0FFF0",hotpink:"#FF69B4",indianred:"#CD5C5C",indigo:"#4B0082",ivory:"#FFFFF0",khaki:"#F0E68C",lavender:"#E6E6FA",lavenderblush:"#FFF0F5",lawngreen:"#7CFC00",lemonchiffon:"#FFFACD",lightblue:"#ADD8E6",lightcoral:"#F08080",lightcyan:"#E0FFFF",lightgoldenrodyellow:"#FAFAD2",lightgray:"#D3D3D3",lightgreen:"#90EE90",lightgrey:"#D3D3D3",lightpink:"#FFB6C1",lightsalmon:"#FFA07A",lightseagreen:"#20B2AA",lightskyblue:"#87CEFA",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#B0C4DE",lightyellow:"#FFFFE0",lime:"#00FF00",limegreen:"#32CD32",linen:"#FAF0E6",magenta:"#FF00FF",maroon:"#800000",mediumaquamarine:"#66CDAA",mediumblue:"#0000CD",mediumorchid:"#BA55D3",mediumpurple:"#9370DB",mediumseagreen:"#3CB371",mediumslateblue:"#7B68EE",mediumspringgreen:"#00FA9A",mediumturquoise:"#48D1CC",mediumvioletred:"#C71585",midnightblue:"#191970",mintcream:"#F5FFFA",mistyrose:"#FFE4E1",moccasin:"#FFE4B5",navajowhite:"#FFDEAD",navy:"#000080",oldlace:"#FDF5E6",olive:"#808000",olivedrab:"#6B8E23",orange:"#FFA500",orangered:"#FF4500",orchid:"#DA70D6",palegoldenrod:"#EEE8AA",palegreen:"#98FB98",paleturquoise:"#AFEEEE",palevioletred:"#DB7093",papayawhip:"#FFEFD5",peachpuff:"#FFDAB9",peru:"#CD853F",pink:"#FFC0CB",plum:"#DDA0DD",powderblue:"#B0E0E6",purple:"#800080",rebeccapurple:"#663399",red:"#FF0000",rosybrown:"#BC8F8F",royalblue:"#4169E1",saddlebrown:"#8B4513",salmon:"#FA8072",sandybrown:"#F4A460",seagreen:"#2E8B57",seashell:"#FFF5EE",sienna:"#A0522D",silver:"#C0C0C0",skyblue:"#87CEEB",slateblue:"#6A5ACD",slategray:"#708090",slategrey:"#708090",snow:"#FFFAFA",springgreen:"#00FF7F",steelblue:"#4682B4",tan:"#D2B48C",teal:"#008080",thistle:"#D8BFD8",tomato:"#FF6347",turquoise:"#40E0D0",violet:"#EE82EE",windowtext:"windowtext",wheat:"#F5DEB3",white:"#FFFFFF",whitesmoke:"#F5F5F5",yellow:"#FFFF00",yellowgreen:"#9ACD32"},_borderStyle:"none hidden dotted dashed solid double groove ridge inset outset".split(" "),_widthRegExp:/^(thin|medium|thick|[\+-]?\d+(\.\d+)?[a-z%]+|[\+-]?0+(\.0+)?|\.\d+[a-z%]+)$/,_rgbaRegExp:/rgba?\(\s*\d+%?\s*,\s*\d+%?\s*,\s*\d+%?\s*(?:,\s*[0-9.]+\s*)?\)/gi,_hslaRegExp:/hsla?\(\s*[0-9.]+\s*,\s*\d+%\s*,\s*\d+%\s*(?:,\s*[0-9.]+\s*)?\)/gi,background:function(e){var t={},n=this._findColor(e);return n.length&&(t.color=n[0],CKEDITOR.tools.array.forEach(n,(function(t){e=e.replace(t,"")}))),(e=CKEDITOR.tools.trim(e))&&(t.unprocessed=e),t},margin:function(e){return CKEDITOR.tools.style.parse.sideShorthand(e,(function(e){return e.match(/(?:\-?[\.\d]+(?:%|\w*)|auto|inherit|initial|unset|revert)/g)||["0px"]}))},sideShorthand:function(e,t){function n(e){i.top=r[e[0]],i.right=r[e[1]],i.bottom=r[e[2]],i.left=r[e[3]]}var i={},r=t?t(e):e.split(/\s+/);switch(r.length){case 1:n([0,0,0,0]);break;case 2:n([0,1,0,1]);break;case 3:n([0,1,2,1]);break;case 4:n([0,1,2,3])}return i},border:function(e){return CKEDITOR.tools.style.border.fromCssRule(e)},_findColor:function(e){var t=[],n=CKEDITOR.tools.array;return(t=(t=t.concat(e.match(this._rgbaRegExp)||[])).concat(e.match(this._hslaRegExp)||[])).concat(n.filter(e.split(/\s+/),(function(e){return!!e.match(/^\#[a-f0-9]{3}(?:[a-f0-9]{3})?$/gi)||e.toLowerCase()in CKEDITOR.tools.style.parse._colors})))}}},array:{filter:function(e,t,n){var i=[];return this.forEach(e,(function(r,o){t.call(n,r,o,e)&&i.push(r)})),i},find:function(e,t,n){for(var i=e.length,r=0;rCKEDITOR.env.version&&(!e||"object"!=typeof e)){if(t=[],"string"==typeof e)for(n=0;nCKEDITOR.env.version)for(r=0;rCKEDITOR.env.version&&(this.type==CKEDITOR.NODE_ELEMENT||this.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT)&&function t(n){if(n.type==CKEDITOR.NODE_ELEMENT||n.type==CKEDITOR.NODE_DOCUMENT_FRAGMENT){if(n.type!=CKEDITOR.NODE_DOCUMENT_FRAGMENT){var i=n.getName();":"==i[0]&&n.renameNode(i.substring(1))}if(e)for(i=0;it.sourceIndex||0>n.sourceIndex?CKEDITOR.POSITION_DISCONNECTED:t.sourceIndex=document.documentMode||!t||(e=t+":"+e),new CKEDITOR.dom.nodeList(this.$.getElementsByTagName(e))},getHead:function(){var e=this.$.getElementsByTagName("head")[0];return e?new CKEDITOR.dom.element(e):this.getDocumentElement().append(new CKEDITOR.dom.element("head"),!0)},getBody:function(){return new CKEDITOR.dom.element(this.$.body)},getDocumentElement:function(){return new CKEDITOR.dom.element(this.$.documentElement)},getWindow:function(){return new CKEDITOR.dom.window(this.$.parentWindow||this.$.defaultView)},write:function(e){this.$.open("text/html","replace"),CKEDITOR.env.ie&&(e=e.replace(/(?:^\s*]*?>)|^/i,'$&\n |