function FixDateText(n,t){var i=$(n).val();$(n).removeClass(SelectedClass);$(n).siblings(".remove.date-remove").hide();i!==t&&($(n).addClass(SelectedClass),$(n).siblings(".remove.date-remove").show())}function HighlightKeyword(n){var t;$("input.search-bar").each(function(){$(this).val()&&(t=$(this).val())});t&&$(n||"#main-table").highlight(t)}function ToggleToggleHighlight(){var n;$("input.search-bar").each(function(){$(this).val()&&(n=$(this).val())});n?$("#ToggleHighlight").show():$("#ToggleHighlight").hide()}function FixDropdown(n){var t=$(n).closest(".admin-checkbox-dropdown").find("span.selected"),r=$(n).closest("ul").data("filter-key"),i=$(".dropdown-menu[data-filter-key='"+r+"'] input:checkbox:checked").length;i>0?$(t).removeClass("hidden").addClass(SelectedClass).text("("+i+")"):$(t).text("").removeClass(SelectedClass).addClass("hidden")}function ToggleClearFilter(){var n=!1;$(".admin-checkbox-dropdown span.selected").each(function(){return $(this).text()===""?!0:(n=!0,!1)});$(".filterdatetimepicker").each(function(){return $(this).hasClass(SelectedClass)?(n=!0,!1):!0});$("input.search-bar").each(function(){$(this).val()&&(n=!0)});$("#ClearFilter").toggle(n)}function SetFilter(n,t,i,r){$.ajax({url:"/Admin/PersistentFilter/SetPersistentFilter",type:"POST",data:{key:n,value:t,prefix:i},dataType:"json",success:function(n){n&&n.success?(typeof r=="function"&&r(n.data),table&&table.draw()):ShowWarning(n.message)}})}function InitDataTablesModalSearch(n,t){var i=$(n).find(".dataTables_filter .form-control"),r=$(n).find("table.dataTable").DataTable();i.unbind();i.bind("keyup",function(n){n.keyCode===13&&(r.search(i.val()).draw(),i.siblings(".modal-search-clear").css("display","inline-block"))});t?i.after(searchClear,searchSubmit,searchHelp):i.after(searchClear,searchSubmit)}function InitDataTablesSearchClick(n){$(n).on("click",".modal-search-submit",function(){var n=$(this).siblings(".form-control"),t=$(this).parents(".dataTables_wrapper").find("table.dataTable").DataTable();n.val()!==""&&(t.search(n.val()).draw(),n.siblings(".modal-search-clear").css("display","inline-block"))});$(n).on("click",".modal-search-info",function(){ShowMessageDialog("User Search Help",$("<div><\/div>").load("/search-help.htm"))});$(n).on("click",".modal-search-clear",function(){var n=$(this).siblings(".form-control"),t=$(this).parents(".dataTables_wrapper").find("table.dataTable").DataTable();n.val("");t.search(n.val()).draw();$(this).hide()})}function InitFilterDisplay(n,t,i){var u,r;i||(i="div.admin-filter-container");u=$(i);$(n).closest(".dataTables_wrapper").prepend(u);$(n).closest(".dataTables_wrapper").find(".form-control").addClass("ui-corner-all");r=$("<div class='DTTT'><\/div>");r.append("<button class='btn btn-primary table-refresh' type='button'><i class='fa fa-refresh'><\/i><\/button>");t&&r.append(" <button id='export-button' class='btn btn-default export-item' type='button'><i class='fa fa-file-excel-o'><\/i>&nbsp;Export to Excel<\/button>");$(n).closest(".dataTables_wrapper").find(".export-button-wrapper, .refresh-button-wrapper, .add-button-wrapper").append(r)}function InitMobileNotificationFilterDisplay(n){var i=$("div.admin-filter-container"),t;$(n).closest(".dataTables_wrapper").prepend(i);$(n).closest(".dataTables_wrapper").find(".form-control").addClass("ui-corner-all");t=$("<div class='DTTT'><\/div>");t.append("<button class='btn btn-primary button' id='sendPush' type='button'>Send Push Notification<\/button>");t.append(" <button class='btn btn-primary button' id='createPlatformApp' type='button'>Create Platform<\/button>");t.append(" <button class='btn btn-primary button' id='updatePlatformApp' type='button'>Update Platform<\/button>");t.append(" <button class='btn btn-primary button' id='createTopic' type='button'>Create Topic<\/button>");t.append(" <button class='btn btn-primary table-refresh' type='button'><i class='fa fa-refresh'><\/i><\/button>");t.append(" <button id='export-button' class='btn btn-default export-item' type='button'><i class='fa fa-file-excel-o'><\/i>&nbsp;Export to Excel<\/button>");$(n).closest(".dataTables_wrapper").find(".export-button-wrapper").append(t)}function SetPersistentFilterTable(n){table=n}var DateFormatter,SelectedClass,DefaultDateValue;(function(){"use strict";var t,n,i,f,r,u;r=864e5;u=3600;t=function(n,t){return typeof n=="string"&&typeof t=="string"&&n.toLowerCase()===t.toLowerCase()};n=function(t,i,r){var f=r||"0",u=t.toString();return u.length<i?n(f+u,i):u};i=function(n){var u,t,r;for(n=n||{},u=1;u<arguments.length;u++)if(t=arguments[u],t)for(r in t)t.hasOwnProperty(r)&&(typeof t[r]=="object"?i(n[r],t[r]):n[r]=t[r]);return n};f={dateSettings:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],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"],meridiem:["AM","PM"],ordinal:function(n){var t=n%10,i={1:"st",2:"nd",3:"rd"};return Math.floor(n%100/10)===1||!i[t]?"th":i[t]}},separators:/[ \-+\/\.T:@]/g,validParts:/[dDjlNSwzWFmMntLoYyaABgGhHisueTIOPZcrU]/g,intParts:/[djwNzmnyYhHgGis]/g,tzParts:/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,tzClip:/[^-+\dA-Z]/g};DateFormatter=function(n){var t=this,r=i(f,n);t.dateSettings=r.dateSettings;t.separators=r.separators;t.validParts=r.validParts;t.intParts=r.intParts;t.tzParts=r.tzParts;t.tzClip=r.tzClip};DateFormatter.prototype={constructor:DateFormatter,parseDate:function(n,i){var v=this,f,c,e,l=!1,h=!1,o,r,a=v.dateSettings,s,y,p,w,b,u={date:null,year:null,month:null,day:null,hour:0,min:0,sec:0};if(!n)return undefined;if(n instanceof Date)return n;if(typeof n=="number")return new Date(n);if(i==="U")return e=parseInt(n),e?new Date(e*1e3):n;if(typeof n!="string")return"";if(f=i.match(v.validParts),!f||f.length===0)throw new Error("Invalid date format definition.");for(c=n.replace(v.separators,'\0').split('\0'),e=0;e<c.length;e++){o=c[e];r=parseInt(o);switch(f[e]){case"y":case"Y":w=o.length;w===2?u.year=parseInt((r<70?"20":"19")+o):w===4&&(u.year=r);l=!0;break;case"m":case"n":case"M":case"F":isNaN(o)?(s=a.monthsShort.indexOf(o),s>-1&&(u.month=s+1),s=a.months.indexOf(o),s>-1&&(u.month=s+1)):r>=1&&r<=12&&(u.month=r);l=!0;break;case"d":case"j":r>=1&&r<=31&&(u.day=r);l=!0;break;case"g":case"h":y=f.indexOf("a")>-1?f.indexOf("a"):f.indexOf("A")>-1?f.indexOf("A"):-1;b=c[y];y>-1?(p=t(b,a.meridiem[0])?0:t(b,a.meridiem[1])?12:-1,r>=1&&r<=12&&p>-1?u.hour=r+p:r>=0&&r<=23&&(u.hour=r)):r>=0&&r<=23&&(u.hour=r);h=!0;break;case"G":case"H":r>=0&&r<=23&&(u.hour=r);h=!0;break;case"i":r>=0&&r<=59&&(u.min=r);h=!0;break;case"s":r>=0&&r<=59&&(u.sec=r);h=!0}}if(l===!0&&u.year&&u.month&&u.day)u.date=new Date(u.year,u.month-1,u.day,u.hour,u.min,u.sec,0);else{if(h!==!0)return!1;u.date=new Date(0,0,0,u.hour,u.min,u.sec,0)}return u.date},guessDate:function(n,t){if(typeof n!="string")return n;var h=this,s=n.replace(h.separators,'\0').split('\0'),e=t.match(h.validParts),i=new Date,o=0,c,f,r,u;if(!/^[djmn]/g.test(e[0]))return n;for(f=0;f<s.length;f++){o=2;r=s[f];u=parseInt(r.substr(0,2));switch(f){case 0:e[0]==="m"||e[0]==="n"?i.setMonth(u-1):i.setDate(u);break;case 1:e[0]==="m"||e[0]==="n"?i.setDate(u):i.setMonth(u-1);break;case 2:c=i.getFullYear();r.length<4?(i.setFullYear(parseInt(c.toString().substr(0,4-r.length)+r)),o=r.length):(i.setFullYear=parseInt(r.substr(0,4)),o=4);break;case 3:i.setHours(u);break;case 4:i.setMinutes(u);break;case 5:i.setSeconds(u)}r.substr(o).length>0&&s.splice(f+1,0,r.substr(o))}return i},parseFormat:function(t,i){var o=this,e=o.dateSettings,f,h=/\\?(.?)/gi,s=function(n,t){return f[n]?f[n]():t};return f={d:function(){return n(f.j(),2)},D:function(){return e.daysShort[f.w()]},j:function(){return i.getDate()},l:function(){return e.days[f.w()]},N:function(){return f.w()||7},w:function(){return i.getDay()},z:function(){var n=new Date(f.Y(),f.n()-1,f.j()),t=new Date(f.Y(),0,1);return Math.round((n-t)/r)},W:function(){var t=new Date(f.Y(),f.n()-1,f.j()-f.N()+3),i=new Date(t.getFullYear(),0,4);return n(1+Math.round((t-i)/r/7),2)},F:function(){return e.months[i.getMonth()]},m:function(){return n(f.n(),2)},M:function(){return e.monthsShort[i.getMonth()]},n:function(){return i.getMonth()+1},t:function(){return new Date(f.Y(),f.n(),0).getDate()},L:function(){var n=f.Y();return n%4==0&&n%100!=0||n%400==0?1:0},o:function(){var n=f.n(),t=f.W(),i=f.Y();return i+(n===12&&t<9?1:n===1&&t>9?-1:0)},Y:function(){return i.getFullYear()},y:function(){return f.Y().toString().slice(-2)},a:function(){return f.A().toLowerCase()},A:function(){var n=f.G()<12?0:1;return e.meridiem[n]},B:function(){var t=i.getUTCHours()*u,r=i.getUTCMinutes()*60,f=i.getUTCSeconds();return n(Math.floor((t+r+f+u)/86.4)%1e3,3)},g:function(){return f.G()%12||12},G:function(){return i.getHours()},h:function(){return n(f.g(),2)},H:function(){return n(f.G(),2)},i:function(){return n(i.getMinutes(),2)},s:function(){return n(i.getSeconds(),2)},u:function(){return n(i.getMilliseconds()*1e3,6)},e:function(){var n=/\((.*)\)/.exec(String(i))[1];return n||"Coordinated Universal Time"},T:function(){var n=(String(i).match(o.tzParts)||[""]).pop().replace(o.tzClip,"");return n||"UTC"},I:function(){var n=new Date(f.Y(),0),t=Date.UTC(f.Y(),0),i=new Date(f.Y(),6),r=Date.UTC(f.Y(),6);return n-t!=i-r?1:0},O:function(){var t=i.getTimezoneOffset(),r=Math.abs(t);return(t>0?"-":"+")+n(Math.floor(r/60)*100+r%60,4)},P:function(){var n=f.O();return n.substr(0,3)+":"+n.substr(3,2)},Z:function(){return-i.getTimezoneOffset()*60},c:function(){return"Y-m-d\\TH:i:sP".replace(h,s)},r:function(){return"D, d M Y H:i:s O".replace(h,s)},U:function(){return i.getTime()/1e3||0}},s(t,t)},formatDate:function(n,t){var r=this,i,o,e,u,f,s="";if(typeof n=="string"&&(n=r.parseDate(n,t),n===!1))return!1;if(n instanceof Date){for(e=t.length,i=0;i<e;i++)(f=t.charAt(i),f!=="S")&&(u=r.parseFormat(f,n),i!==e-1&&r.intParts.test(f)&&t.charAt(i+1)==="S"&&(o=parseInt(u),u+=r.dateSettings.ordinal(o)),s+=u);return s}return""}}})(),function(n){typeof define=="function"&&define.amd?define(["jquery","jquery-mousewheel"],n):typeof exports=="object"?module.exports=n:n(jQuery)}(function(n){"use strict";function e(n,t,i){this.date=n;this.desc=t;this.style=i}var u=!1,r={i18n:{ar:{months:["كانون الثاني","شباط","آذار","نيسان","مايو","حزيران","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول"],dayOfWeekShort:["ن","ث","ع","خ","ج","س","ح"],dayOfWeek:["الأحد","الاثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت","الأحد"]},ro:{months:["Ianuarie","Februarie","Martie","Aprilie","Mai","Iunie","Iulie","August","Septembrie","Octombrie","Noiembrie","Decembrie"],dayOfWeekShort:["Du","Lu","Ma","Mi","Jo","Vi","Sâ"],dayOfWeek:["Duminică","Luni","Marţi","Miercuri","Joi","Vineri","Sâmbătă"]},id:{months:["Januari","Februari","Maret","April","Mei","Juni","Juli","Agustus","September","Oktober","November","Desember"],dayOfWeekShort:["Min","Sen","Sel","Rab","Kam","Jum","Sab"],dayOfWeek:["Minggu","Senin","Selasa","Rabu","Kamis","Jumat","Sabtu"]},is:{months:["Janúar","Febrúar","Mars","Apríl","Maí","Júní","Júlí","Ágúst","September","Október","Nóvember","Desember"],dayOfWeekShort:["Sun","Mán","Þrið","Mið","Fim","Fös","Lau"],dayOfWeek:["Sunnudagur","Mánudagur","Þriðjudagur","Miðvikudagur","Fimmtudagur","Föstudagur","Laugardagur"]},bg:{months:["Януари","Февруари","Март","Април","Май","Юни","Юли","Август","Септември","Октомври","Ноември","Декември"],dayOfWeekShort:["Нд","Пн","Вт","Ср","Чт","Пт","Сб"],dayOfWeek:["Неделя","Понеделник","Вторник","Сряда","Четвъртък","Петък","Събота"]},fa:{months:["فروردین","اردیبهشت","خرداد","تیر","مرداد","شهریور","مهر","آبان","آذر","دی","بهمن","اسفند"],dayOfWeekShort:["یکشنبه","دوشنبه","سه شنبه","چهارشنبه","پنجشنبه","جمعه","شنبه"],dayOfWeek:["یک‌شنبه","دوشنبه","سه‌شنبه","چهارشنبه","پنج‌شنبه","جمعه","شنبه","یک‌شنبه"]},ru:{months:["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],dayOfWeekShort:["Вс","Пн","Вт","Ср","Чт","Пт","Сб"],dayOfWeek:["Воскресенье","Понедельник","Вторник","Среда","Четверг","Пятница","Суббота"]},uk:{months:["Січень","Лютий","Березень","Квітень","Травень","Червень","Липень","Серпень","Вересень","Жовтень","Листопад","Грудень"],dayOfWeekShort:["Ндл","Пнд","Втр","Срд","Чтв","Птн","Сбт"],dayOfWeek:["Неділя","Понеділок","Вівторок","Середа","Четвер","П'ятниця","Субота"]},en:{months:["January","February","March","April","May","June","July","August","September","October","November","December"],dayOfWeekShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},el:{months:["Ιανουάριος","Φεβρουάριος","Μάρτιος","Απρίλιος","Μάιος","Ιούνιος","Ιούλιος","Αύγουστος","Σεπτέμβριος","Οκτώβριος","Νοέμβριος","Δεκέμβριος"],dayOfWeekShort:["Κυρ","Δευ","Τρι","Τετ","Πεμ","Παρ","Σαβ"],dayOfWeek:["Κυριακή","Δευτέρα","Τρίτη","Τετάρτη","Πέμπτη","Παρασκευή","Σάββατο"]},de:{months:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],dayOfWeekShort:["So","Mo","Di","Mi","Do","Fr","Sa"],dayOfWeek:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"]},nl:{months:["januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december"],dayOfWeekShort:["zo","ma","di","wo","do","vr","za"],dayOfWeek:["zondag","maandag","dinsdag","woensdag","donderdag","vrijdag","zaterdag"]},tr:{months:["Ocak","Şubat","Mart","Nisan","Mayıs","Haziran","Temmuz","Ağustos","Eylül","Ekim","Kasım","Aralık"],dayOfWeekShort:["Paz","Pts","Sal","Çar","Per","Cum","Cts"],dayOfWeek:["Pazar","Pazartesi","Salı","Çarşamba","Perşembe","Cuma","Cumartesi"]},fr:{months:["Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Août","Septembre","Octobre","Novembre","Décembre"],dayOfWeekShort:["Dim","Lun","Mar","Mer","Jeu","Ven","Sam"],dayOfWeek:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"]},es:{months:["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"],dayOfWeekShort:["Dom","Lun","Mar","Mié","Jue","Vie","Sáb"],dayOfWeek:["Domingo","Lunes","Martes","Miércoles","Jueves","Viernes","Sábado"]},th:{months:["มกราคม","กุมภาพันธ์","มีนาคม","เมษายน","พฤษภาคม","มิถุนายน","กรกฎาคม","สิงหาคม","กันยายน","ตุลาคม","พฤศจิกายน","ธันวาคม"],dayOfWeekShort:["อา.","จ.","อ.","พ.","พฤ.","ศ.","ส."],dayOfWeek:["อาทิตย์","จันทร์","อังคาร","พุธ","พฤหัส","ศุกร์","เสาร์","อาทิตย์"]},pl:{months:["styczeń","luty","marzec","kwiecień","maj","czerwiec","lipiec","sierpień","wrzesień","październik","listopad","grudzień"],dayOfWeekShort:["nd","pn","wt","śr","cz","pt","sb"],dayOfWeek:["niedziela","poniedziałek","wtorek","środa","czwartek","piątek","sobota"]},pt:{months:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],dayOfWeekShort:["Dom","Seg","Ter","Qua","Qui","Sex","Sab"],dayOfWeek:["Domingo","Segunda","Terça","Quarta","Quinta","Sexta","Sábado"]},ch:{months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],dayOfWeekShort:["日","一","二","三","四","五","六"]},se:{months:["Januari","Februari","Mars","April","Maj","Juni","Juli","Augusti","September","Oktober","November","December"],dayOfWeekShort:["Sön","Mån","Tis","Ons","Tor","Fre","Lör"]},kr:{months:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],dayOfWeekShort:["일","월","화","수","목","금","토"],dayOfWeek:["일요일","월요일","화요일","수요일","목요일","금요일","토요일"]},it:{months:["Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Novembre","Dicembre"],dayOfWeekShort:["Dom","Lun","Mar","Mer","Gio","Ven","Sab"],dayOfWeek:["Domenica","Lunedì","Martedì","Mercoledì","Giovedì","Venerdì","Sabato"]},da:{months:["January","Februar","Marts","April","Maj","Juni","July","August","September","Oktober","November","December"],dayOfWeekShort:["Søn","Man","Tir","Ons","Tor","Fre","Lør"],dayOfWeek:["søndag","mandag","tirsdag","onsdag","torsdag","fredag","lørdag"]},no:{months:["Januar","Februar","Mars","April","Mai","Juni","Juli","August","September","Oktober","November","Desember"],dayOfWeekShort:["Søn","Man","Tir","Ons","Tor","Fre","Lør"],dayOfWeek:["Søndag","Mandag","Tirsdag","Onsdag","Torsdag","Fredag","Lørdag"]},ja:{months:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayOfWeekShort:["日","月","火","水","木","金","土"],dayOfWeek:["日曜","月曜","火曜","水曜","木曜","金曜","土曜"]},vi:{months:["Tháng 1","Tháng 2","Tháng 3","Tháng 4","Tháng 5","Tháng 6","Tháng 7","Tháng 8","Tháng 9","Tháng 10","Tháng 11","Tháng 12"],dayOfWeekShort:["CN","T2","T3","T4","T5","T6","T7"],dayOfWeek:["Chủ nhật","Thứ hai","Thứ ba","Thứ tư","Thứ năm","Thứ sáu","Thứ bảy"]},sl:{months:["Januar","Februar","Marec","April","Maj","Junij","Julij","Avgust","September","Oktober","November","December"],dayOfWeekShort:["Ned","Pon","Tor","Sre","Čet","Pet","Sob"],dayOfWeek:["Nedelja","Ponedeljek","Torek","Sreda","Četrtek","Petek","Sobota"]},cs:{months:["Leden","Únor","Březen","Duben","Květen","Červen","Červenec","Srpen","Září","Říjen","Listopad","Prosinec"],dayOfWeekShort:["Ne","Po","Út","St","Čt","Pá","So"]},hu:{months:["Január","Február","Március","Április","Május","Június","Július","Augusztus","Szeptember","Október","November","December"],dayOfWeekShort:["Va","Hé","Ke","Sze","Cs","Pé","Szo"],dayOfWeek:["vasárnap","hétfő","kedd","szerda","csütörtök","péntek","szombat"]},az:{months:["Yanvar","Fevral","Mart","Aprel","May","Iyun","Iyul","Avqust","Sentyabr","Oktyabr","Noyabr","Dekabr"],dayOfWeekShort:["B","Be","Ça","Ç","Ca","C","Ş"],dayOfWeek:["Bazar","Bazar ertəsi","Çərşənbə axşamı","Çərşənbə","Cümə axşamı","Cümə","Şənbə"]},bs:{months:["Januar","Februar","Mart","April","Maj","Jun","Jul","Avgust","Septembar","Oktobar","Novembar","Decembar"],dayOfWeekShort:["Ned","Pon","Uto","Sri","Čet","Pet","Sub"],dayOfWeek:["Nedjelja","Ponedjeljak","Utorak","Srijeda","Četvrtak","Petak","Subota"]},ca:{months:["Gener","Febrer","Març","Abril","Maig","Juny","Juliol","Agost","Setembre","Octubre","Novembre","Desembre"],dayOfWeekShort:["Dg","Dl","Dt","Dc","Dj","Dv","Ds"],dayOfWeek:["Diumenge","Dilluns","Dimarts","Dimecres","Dijous","Divendres","Dissabte"]},"en-GB":{months:["January","February","March","April","May","June","July","August","September","October","November","December"],dayOfWeekShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},et:{months:["Jaanuar","Veebruar","Märts","Aprill","Mai","Juuni","Juuli","August","September","Oktoober","November","Detsember"],dayOfWeekShort:["P","E","T","K","N","R","L"],dayOfWeek:["Pühapäev","Esmaspäev","Teisipäev","Kolmapäev","Neljapäev","Reede","Laupäev"]},eu:{months:["Urtarrila","Otsaila","Martxoa","Apirila","Maiatza","Ekaina","Uztaila","Abuztua","Iraila","Urria","Azaroa","Abendua"],dayOfWeekShort:["Ig.","Al.","Ar.","Az.","Og.","Or.","La."],dayOfWeek:["Igandea","Astelehena","Asteartea","Asteazkena","Osteguna","Ostirala","Larunbata"]},fi:{months:["Tammikuu","Helmikuu","Maaliskuu","Huhtikuu","Toukokuu","Kesäkuu","Heinäkuu","Elokuu","Syyskuu","Lokakuu","Marraskuu","Joulukuu"],dayOfWeekShort:["Su","Ma","Ti","Ke","To","Pe","La"],dayOfWeek:["sunnuntai","maanantai","tiistai","keskiviikko","torstai","perjantai","lauantai"]},gl:{months:["Xan","Feb","Maz","Abr","Mai","Xun","Xul","Ago","Set","Out","Nov","Dec"],dayOfWeekShort:["Dom","Lun","Mar","Mer","Xov","Ven","Sab"],dayOfWeek:["Domingo","Luns","Martes","Mércores","Xoves","Venres","Sábado"]},hr:{months:["Siječanj","Veljača","Ožujak","Travanj","Svibanj","Lipanj","Srpanj","Kolovoz","Rujan","Listopad","Studeni","Prosinac"],dayOfWeekShort:["Ned","Pon","Uto","Sri","Čet","Pet","Sub"],dayOfWeek:["Nedjelja","Ponedjeljak","Utorak","Srijeda","Četvrtak","Petak","Subota"]},ko:{months:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],dayOfWeekShort:["일","월","화","수","목","금","토"],dayOfWeek:["일요일","월요일","화요일","수요일","목요일","금요일","토요일"]},lt:{months:["Sausio","Vasario","Kovo","Balandžio","Gegužės","Birželio","Liepos","Rugpjūčio","Rugsėjo","Spalio","Lapkričio","Gruodžio"],dayOfWeekShort:["Sek","Pir","Ant","Tre","Ket","Pen","Šeš"],dayOfWeek:["Sekmadienis","Pirmadienis","Antradienis","Trečiadienis","Ketvirtadienis","Penktadienis","Šeštadienis"]},lv:{months:["Janvāris","Februāris","Marts","Aprīlis ","Maijs","Jūnijs","Jūlijs","Augusts","Septembris","Oktobris","Novembris","Decembris"],dayOfWeekShort:["Sv","Pr","Ot","Tr","Ct","Pk","St"],dayOfWeek:["Svētdiena","Pirmdiena","Otrdiena","Trešdiena","Ceturtdiena","Piektdiena","Sestdiena"]},mk:{months:["јануари","февруари","март","април","мај","јуни","јули","август","септември","октомври","ноември","декември"],dayOfWeekShort:["нед","пон","вто","сре","чет","пет","саб"],dayOfWeek:["Недела","Понеделник","Вторник","Среда","Четврток","Петок","Сабота"]},mn:{months:["1-р сар","2-р сар","3-р сар","4-р сар","5-р сар","6-р сар","7-р сар","8-р сар","9-р сар","10-р сар","11-р сар","12-р сар"],dayOfWeekShort:["Дав","Мяг","Лха","Пүр","Бсн","Бям","Ням"],dayOfWeek:["Даваа","Мягмар","Лхагва","Пүрэв","Баасан","Бямба","Ням"]},"pt-BR":{months:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],dayOfWeekShort:["Dom","Seg","Ter","Qua","Qui","Sex","Sáb"],dayOfWeek:["Domingo","Segunda","Terça","Quarta","Quinta","Sexta","Sábado"]},sk:{months:["Január","Február","Marec","Apríl","Máj","Jún","Júl","August","September","Október","November","December"],dayOfWeekShort:["Ne","Po","Ut","St","Št","Pi","So"],dayOfWeek:["Nedeľa","Pondelok","Utorok","Streda","Štvrtok","Piatok","Sobota"]},sq:{months:["Janar","Shkurt","Mars","Prill","Maj","Qershor","Korrik","Gusht","Shtator","Tetor","Nëntor","Dhjetor"],dayOfWeekShort:["Die","Hën","Mar","Mër","Enj","Pre","Shtu"],dayOfWeek:["E Diel","E Hënë","E Martē","E Mërkurë","E Enjte","E Premte","E Shtunë"]},"sr-YU":{months:["Januar","Februar","Mart","April","Maj","Jun","Jul","Avgust","Septembar","Oktobar","Novembar","Decembar"],dayOfWeekShort:["Ned","Pon","Uto","Sre","čet","Pet","Sub"],dayOfWeek:["Nedelja","Ponedeljak","Utorak","Sreda","Četvrtak","Petak","Subota"]},sr:{months:["јануар","фебруар","март","април","мај","јун","јул","август","септембар","октобар","новембар","децембар"],dayOfWeekShort:["нед","пон","уто","сре","чет","пет","суб"],dayOfWeek:["Недеља","Понедељак","Уторак","Среда","Четвртак","Петак","Субота"]},sv:{months:["Januari","Februari","Mars","April","Maj","Juni","Juli","Augusti","September","Oktober","November","December"],dayOfWeekShort:["Sön","Mån","Tis","Ons","Tor","Fre","Lör"],dayOfWeek:["Söndag","Måndag","Tisdag","Onsdag","Torsdag","Fredag","Lördag"]},"zh-TW":{months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],dayOfWeekShort:["日","一","二","三","四","五","六"],dayOfWeek:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"]},zh:{months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],dayOfWeekShort:["日","一","二","三","四","五","六"],dayOfWeek:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"]},he:{months:["ינואר","פברואר","מרץ","אפריל","מאי","יוני","יולי","אוגוסט","ספטמבר","אוקטובר","נובמבר","דצמבר"],dayOfWeekShort:["א'","ב'","ג'","ד'","ה'","ו'","שבת"],dayOfWeek:["ראשון","שני","שלישי","רביעי","חמישי","שישי","שבת","ראשון"]},hy:{months:["Հունվար","Փետրվար","Մարտ","Ապրիլ","Մայիս","Հունիս","Հուլիս","Օգոստոս","Սեպտեմբեր","Հոկտեմբեր","Նոյեմբեր","Դեկտեմբեր"],dayOfWeekShort:["Կի","Երկ","Երք","Չոր","Հնգ","Ուրբ","Շբթ"],dayOfWeek:["Կիրակի","Երկուշաբթի","Երեքշաբթի","Չորեքշաբթի","Հինգշաբթի","Ուրբաթ","Շաբաթ"]},kg:{months:["Үчтүн айы","Бирдин айы","Жалган Куран","Чын Куран","Бугу","Кулжа","Теке","Баш Оона","Аяк Оона","Тогуздун айы","Жетинин айы","Бештин айы"],dayOfWeekShort:["Жек","Дүй","Шей","Шар","Бей","Жум","Ише"],dayOfWeek:["Жекшемб","Дүйшөмб","Шейшемб","Шаршемб","Бейшемби","Жума","Ишенб"]},rm:{months:["Schaner","Favrer","Mars","Avrigl","Matg","Zercladur","Fanadur","Avust","Settember","October","November","December"],dayOfWeekShort:["Du","Gli","Ma","Me","Gie","Ve","So"],dayOfWeek:["Dumengia","Glindesdi","Mardi","Mesemna","Gievgia","Venderdi","Sonda"]},ka:{months:["იანვარი","თებერვალი","მარტი","აპრილი","მაისი","ივნისი","ივლისი","აგვისტო","სექტემბერი","ოქტომბერი","ნოემბერი","დეკემბერი"],dayOfWeekShort:["კვ","ორშ","სამშ","ოთხ","ხუთ","პარ","შაბ"],dayOfWeek:["კვირა","ორშაბათი","სამშაბათი","ოთხშაბათი","ხუთშაბათი","პარასკევი","შაბათი"]}},value:"",rtl:!1,format:"Y/m/d H:i",formatTime:"H:i",formatDate:"Y/m/d",startDate:!1,step:60,monthChangeSpinner:!0,closeOnDateSelect:!1,closeOnTimeSelect:!0,closeOnWithoutClick:!0,closeOnInputClick:!0,timepicker:!0,datepicker:!0,weeks:!1,defaultTime:!1,defaultDate:!1,minDate:!1,maxDate:!1,minTime:!1,maxTime:!1,disabledMinTime:!1,disabledMaxTime:!1,allowTimes:[],opened:!1,initTime:!0,inline:!1,theme:"",onSelectDate:function(){},onSelectTime:function(){},onChangeMonth:function(){},onGetWeekOfYear:function(){},onChangeYear:function(){},onChangeDateTime:function(){},onShow:function(){},onClose:function(){},onGenerate:function(){},withoutCopyright:!0,inverseButton:!1,hours12:!1,next:"xdsoft_next",prev:"xdsoft_prev",dayOfWeekStart:0,parentID:"body",timeHeightInTimePicker:25,timepickerScrollbar:!0,todayButton:!0,prevButton:!0,nextButton:!0,defaultSelect:!0,scrollMonth:!0,scrollTime:!0,scrollInput:!0,lazyInit:!1,mask:!1,validateOnBlur:!0,allowBlank:!0,yearStart:1950,yearEnd:2050,monthStart:0,monthEnd:11,style:"",id:"",fixed:!1,roundTime:"round",className:"",weekends:[],highlightedDates:[],highlightedPeriods:[],allowDates:[],allowDateRe:null,disabledDates:[],disabledWeekDays:[],yearOffset:0,beforeShowDay:null,enterLikeTab:!0,showApplyButton:!1},t=null,o="en",i="en",s={meridiem:["AM","PM"]},f=function(){var u=r.i18n[i],f={days:u.dayOfWeek,daysShort:u.dayOfWeekShort,months:u.months,monthsShort:n.map(u.months,function(n){return n.substring(0,3)})};t=new DateFormatter({dateSettings:n.extend({},s,f)})};n.datetimepicker={setLocale:function(n){var t=r.i18n[n]?n:o;i!=t&&(i=t,f())},setDateFormatter:function(n){t=n},RFC_2822:"D, d M Y H:i:s O",ATOM:"Y-m-dTH:i:sP",ISO_8601:"Y-m-dTH:i:sO",RFC_822:"D, d M y H:i:s O",RFC_850:"l, d-M-y H:i:s T",RFC_1036:"D, d M y H:i:s O",RFC_1123:"D, d M Y H:i:s O",RSS:"D, d M Y H:i:s O",W3C:"Y-m-dTH:i:sP"};f();window.getComputedStyle||(window.getComputedStyle=function(n){return this.el=n,this.getPropertyValue=function(t){var i=/(\-([a-z]){1})/g;return t==="float"&&(t="styleFloat"),i.test(t)&&(t=t.replace(i,function(n,t,i){return i.toUpperCase()})),n.currentStyle[t]||null},this});Array.prototype.indexOf||(Array.prototype.indexOf=function(n,t){for(var i=t||0,r=this.length;i<r;i+=1)if(this[i]===n)return i;return-1});Date.prototype.countDaysInMonth=function(){return new Date(this.getFullYear(),this.getMonth()+1,0).getDate()};n.fn.xdsoftScroller=function(t){return this.each(function(){var i=n(this),s=function(n){var t={x:0,y:0},i;return n.type==="touchstart"||n.type==="touchmove"||n.type==="touchend"||n.type==="touchcancel"?(i=n.originalEvent.touches[0]||n.originalEvent.changedTouches[0],t.x=i.clientX,t.y=i.clientY):(n.type==="mousedown"||n.type==="mouseup"||n.type==="mousemove"||n.type==="mouseover"||n.type==="mouseout"||n.type==="mouseenter"||n.type==="mouseleave")&&(t.x=n.clientX,t.y=n.clientY),t},f,u,e,o,r,h=100,c=!1,w=0,a=0,v=0,y=!1,p=0,l=function(){};if(t==="hide"){i.find(".xdsoft_scrollbar").hide();return}if(!n(this).hasClass("xdsoft_scroller_box")){f=i.children().eq(0);u=i[0].clientHeight;e=f[0].offsetHeight;o=n('<div class="xdsoft_scrollbar"><\/div>');r=n('<div class="xdsoft_scroller"><\/div>');o.append(r);i.addClass("xdsoft_scroller_box").append(o);l=function(n){var t=s(n).y-w+p;t<0&&(t=0);t+r[0].offsetHeight>v&&(t=v-r[0].offsetHeight);i.trigger("scroll_element.xdsoft_scroller",[h?t/h:0])};r.on("touchstart.xdsoft_scroller mousedown.xdsoft_scroller",function(f){if(u||i.trigger("resize_scroll.xdsoft_scroller",[t]),w=s(f).y,p=parseInt(r.css("margin-top"),10),v=o[0].offsetHeight,f.type==="mousedown"||f.type==="touchstart"){document&&n(document.body).addClass("xdsoft_noselect");n([document.body,window]).on("touchend mouseup.xdsoft_scroller",function e(){n([document.body,window]).off("touchend mouseup.xdsoft_scroller",e).off("mousemove.xdsoft_scroller",l).removeClass("xdsoft_noselect")});n(document.body).on("mousemove.xdsoft_scroller",l)}else y=!0,f.stopPropagation(),f.preventDefault()}).on("touchmove",function(n){y&&(n.preventDefault(),l(n))}).on("touchend touchcancel",function(){y=!1;p=0});i.on("scroll_element.xdsoft_scroller",function(n,t){u||i.trigger("resize_scroll.xdsoft_scroller",[t,!0]);t=t>1?1:t<0||isNaN(t)?0:t;r.css("margin-top",h*t);setTimeout(function(){f.css("marginTop",-parseInt((f[0].offsetHeight-u)*t,10))},10)}).on("resize_scroll.xdsoft_scroller",function(n,t,s){var c,l;u=i[0].clientHeight;e=f[0].offsetHeight;c=u/e;l=c*o[0].offsetHeight;c>1?r.hide():(r.show(),r.css("height",parseInt(l>10?l:10,10)),h=o[0].offsetHeight-r[0].offsetHeight,s!==!0&&i.trigger("scroll_element.xdsoft_scroller",[t||Math.abs(parseInt(f.css("marginTop"),10))/(e-u)]))});i.on("mousewheel",function(n){var t=Math.abs(parseInt(f.css("marginTop"),10));return t=t-n.deltaY*20,t<0&&(t=0),i.trigger("scroll_element.xdsoft_scroller",[t/(e-u)]),n.stopPropagation(),!1});i.on("touchstart",function(n){c=s(n);a=Math.abs(parseInt(f.css("marginTop"),10))});i.on("touchmove",function(n){if(c){n.preventDefault();var t=s(n);i.trigger("scroll_element.xdsoft_scroller",[(a-(t.y-c.y))/(e-u)])}});i.on("touchend touchcancel",function(){c=!1;a=0})}i.trigger("resize_scroll.xdsoft_scroller",[t])})};n.fn.datetimepicker=function(f,o){var y=this,p=48,tt=57,w=96,b=105,l=17,h=46,k=13,it=27,c=8,rt=37,ut=38,ft=39,et=40,d=9,ot=116,st=65,ht=67,ct=86,lt=90,at=89,a=!1,s=n.isPlainObject(f)||!f?n.extend(!0,{},r,f):n.extend(!0,{},r),g=0,v,nt,vt=function(n){n.on("open.xdsoft focusin.xdsoft mousedown.xdsoft touchstart",function t(){n.is(":disabled")||n.data("xdsoft_datetimepicker")||(clearTimeout(g),g=setTimeout(function(){n.data("xdsoft_datetimepicker")||v(n);n.off("open.xdsoft focusin.xdsoft mousedown.xdsoft touchstart",t).trigger("open.xdsoft")},100))})};v=function(r){function fi(){var n=!1,t;return s.startDate?n=v.strToDate(s.startDate):(n=s.value||(r&&r.val&&r.val()?r.val():""),n?n=v.strToDateTime(n):s.defaultDate&&(n=v.strToDateTime(s.defaultDate),s.defaultTime&&(t=v.strtotime(s.defaultTime),n.setHours(t.getHours()),n.setMinutes(t.getMinutes())))),n&&v.isValidDate(n)?o.data("changed",!0):n="",n||0}function oi(t){var i=function(n,t){var i=n.replace(/([\[\]\/\{\}\(\)\-\.\+]{1})/g,"\\$1").replace(/_/g,"{digit+}").replace(/([0-9]{1})/g,"{digit$1}").replace(/\{digit([0-9]{1})\}/g,"[0-$1_]{1}").replace(/\{digit[\+]\}/g,"[0-9_]{1}");return new RegExp(i).test(t)},f=function(n){try{if(document.selection&&document.selection.createRange){var t=document.selection.createRange();return t.getBookmark().charCodeAt(2)-2}if(n.setSelectionRange)return n.selectionStart}catch(i){return 0}},u=function(n,t){if(n=typeof n=="string"||n instanceof String?document.getElementById(n):n,!n)return!1;if(n.createTextRange){var i=n.createTextRange();return i.collapse(!0),i.moveEnd("character",t),i.moveStart("character",t),i.select(),!0}return n.setSelectionRange?(n.setSelectionRange(t,t),!0):!1};if(t.mask&&r.off("keydown.xdsoft"),t.mask===!0&&(t.mask=typeof moment!="undefined"?t.format.replace(/Y{4}/g,"9999").replace(/Y{2}/g,"99").replace(/M{2}/g,"19").replace(/D{2}/g,"39").replace(/H{2}/g,"29").replace(/m{2}/g,"59").replace(/s{2}/g,"59"):t.format.replace(/Y/g,"9999").replace(/F/g,"9999").replace(/m/g,"19").replace(/d/g,"39").replace(/H/g,"29").replace(/i/g,"59").replace(/s/g,"59")),n.type(t.mask)==="string"){i(t.mask,r.val())||(r.val(t.mask.replace(/[0-9]/g,"_")),u(r[0],0));r.on("keydown.xdsoft",function(e){var v=this.value,o=e.which,s,y;if(o>=p&&o<=tt||o>=w&&o<=b||o===c||o===h){for(s=f(this),y=o!==c&&o!==h?String.fromCharCode(w<=o&&o<=b?o-p:o):"_",(o===c||o===h)&&s&&(s-=1,y="_");/[^0-9_]/.test(t.mask.substr(s,1))&&s<t.mask.length&&s>0;)s+=o===c||o===h?-1:1;if(v=v.substr(0,s)+y+v.substr(s+1),n.trim(v)==="")v=t.mask.replace(/[0-9]/g,"_");else if(s===t.mask.length)return e.preventDefault(),!1;for(s+=o===c||o===h?0:1;/[^0-9_]/.test(t.mask.substr(s,1))&&s<t.mask.length&&s>0;)s+=o===c||o===h?-1:1;i(t.mask,v)?(this.value=v,u(this,s)):n.trim(v)===""?this.value=t.mask.replace(/[0-9]/g,"_"):r.trigger("error_input.xdsoft")}else if([st,ht,ct,lt,at].indexOf(o)!==-1&&a||[it,ut,et,rt,ft,ot,l,d,k].indexOf(o)!==-1)return!0;return e.preventDefault(),!1})}}var o=n('<div class="xdsoft_datetimepicker xdsoft_noselect"><\/div>'),si=n('<div class="xdsoft_copyright"><a target="_blank" href="http://xdsoft.net/jqplugins/datetimepicker/">xdsoft.net<\/a><\/div>'),vt=n('<div class="xdsoft_datepicker active"><\/div>'),g=n('<div class="xdsoft_monthpicker"><button type="button" class="xdsoft_prev"><\/button><button type="button" class="xdsoft_today_button"><\/button><div class="xdsoft_label xdsoft_month"><span><\/span><i><\/i><\/div><div class="xdsoft_label xdsoft_year"><span><\/span><i><\/i><\/div><button type="button" class="xdsoft_next"><\/button><\/div>'),dt=n('<div class="xdsoft_calendar"><\/div>'),pt=n('<div class="xdsoft_timepicker active"><button type="button" class="xdsoft_prev"><\/button><div class="xdsoft_time_box"><\/div><button type="button" class="xdsoft_next"><\/button><\/div>'),nt=pt.find(".xdsoft_time_box").eq(0),y=n('<div class="xdsoft_time_variant"><\/div>'),gt=n('<button type="button" class="xdsoft_save_selected blue-gradient-button">Save Selected<\/button>'),ni=n('<div class="xdsoft_select xdsoft_monthselect"><div><\/div><\/div>'),ti=n('<div class="xdsoft_select xdsoft_yearselect"><div><\/div><\/div>'),wt=!1,ei,ii,bt,yt,kt,ri=0,v,ui;s.id&&o.attr("id",s.id);s.style&&o.attr("style",s.style);s.weeks&&o.addClass("xdsoft_showweeks");s.rtl&&o.addClass("xdsoft_rtl");o.addClass("xdsoft_"+s.theme);o.addClass(s.className);g.find(".xdsoft_month span").after(ni);g.find(".xdsoft_year span").after(ti);g.find(".xdsoft_month,.xdsoft_year").on("touchstart mousedown.xdsoft",function(t){var i=n(this).find(".xdsoft_select").eq(0),f=0,e=0,o=i.is(":visible"),r,u;for(g.find(".xdsoft_select").hide(),v.currentTime&&(f=v.currentTime[n(this).hasClass("xdsoft_month")?"getMonth":"getFullYear"]()),i[o?"hide":"show"](),r=i.find("div.xdsoft_option"),u=0;u<r.length;u+=1)if(r.eq(u).data("value")===f)break;else e+=r[0].offsetHeight;return i.xdsoftScroller(e/(i.children()[0].offsetHeight-i[0].clientHeight)),t.stopPropagation(),!1});g.find(".xdsoft_select").xdsoftScroller().on("touchstart mousedown.xdsoft",function(n){n.stopPropagation();n.preventDefault()}).on("touchstart mousedown.xdsoft",".xdsoft_option",function(){(v.currentTime===undefined||v.currentTime===null)&&(v.currentTime=v.now());var t=v.currentTime.getFullYear();v&&v.currentTime&&v.currentTime[n(this).parent().parent().hasClass("xdsoft_monthselect")?"setMonth":"setFullYear"](n(this).data("value"));n(this).parent().parent().hide();o.trigger("xchange.xdsoft");s.onChangeMonth&&n.isFunction(s.onChangeMonth)&&s.onChangeMonth.call(o,v.currentTime,o.data("input"));t!==v.currentTime.getFullYear()&&n.isFunction(s.onChangeYear)&&s.onChangeYear.call(o,v.currentTime,o.data("input"))});o.getValue=function(){return v.getCurrentTime()};o.setOptions=function(i){var u={};if(s=n.extend(!0,{},s,i),i.allowTimes&&n.isArray(i.allowTimes)&&i.allowTimes.length&&(s.allowTimes=n.extend(!0,[],i.allowTimes)),i.weekends&&n.isArray(i.weekends)&&i.weekends.length&&(s.weekends=n.extend(!0,[],i.weekends)),i.allowDates&&n.isArray(i.allowDates)&&i.allowDates.length&&(s.allowDates=n.extend(!0,[],i.allowDates)),i.allowDateRe&&Object.prototype.toString.call(i.allowDateRe)==="[object String]"&&(s.allowDateRe=new RegExp(i.allowDateRe)),i.highlightedDates&&n.isArray(i.highlightedDates)&&i.highlightedDates.length&&(n.each(i.highlightedDates,function(i,r){var c=n.map(r.split(","),n.trim),o,f=new e(t.parseDate(c[0],s.formatDate),c[1],c[2]),h=t.formatDate(f.date,s.formatDate);u[h]!==undefined?(o=u[h].desc,o&&o.length&&f.desc&&f.desc.length&&(u[h].desc=o+"\n"+f.desc)):u[h]=f}),s.highlightedDates=n.extend(!0,[],u)),i.highlightedPeriods&&n.isArray(i.highlightedPeriods)&&i.highlightedPeriods.length&&(u=n.extend(!0,[],s.highlightedDates),n.each(i.highlightedPeriods,function(i,r){var f,a,v,o,h,l,y,c;for(n.isArray(r)?(f=r[0],a=r[1],v=r[2],y=r[3]):(c=n.map(r.split(","),n.trim),f=t.parseDate(c[0],s.formatDate),a=t.parseDate(c[1],s.formatDate),v=c[2],y=c[3]);f<=a;)o=new e(f,v,y),h=t.formatDate(f,s.formatDate),f.setDate(f.getDate()+1),u[h]!==undefined?(l=u[h].desc,l&&l.length&&o.desc&&o.desc.length&&(u[h].desc=l+"\n"+o.desc)):u[h]=o}),s.highlightedDates=n.extend(!0,[],u)),i.disabledDates&&n.isArray(i.disabledDates)&&i.disabledDates.length&&(s.disabledDates=n.extend(!0,[],i.disabledDates)),i.disabledWeekDays&&n.isArray(i.disabledWeekDays)&&i.disabledWeekDays.length&&(s.disabledWeekDays=n.extend(!0,[],i.disabledWeekDays)),(s.open||s.opened)&&!s.inline&&r.trigger("open.xdsoft"),s.inline&&(wt=!0,o.addClass("xdsoft_inline"),r.after(o).hide()),s.inverseButton&&(s.next="xdsoft_prev",s.prev="xdsoft_next"),s.datepicker?vt.addClass("active"):vt.removeClass("active"),s.timepicker?pt.addClass("active"):pt.removeClass("active"),s.value&&(v.setCurrentTime(s.value),r&&r.val&&r.val(v.str)),s.dayOfWeekStart=isNaN(s.dayOfWeekStart)?0:parseInt(s.dayOfWeekStart,10)%7,s.timepickerScrollbar||nt.xdsoftScroller("hide"),s.minDate&&/^[\+\-](.*)$/.test(s.minDate)&&(s.minDate=t.formatDate(v.strToDateTime(s.minDate),s.formatDate)),s.maxDate&&/^[\+\-](.*)$/.test(s.maxDate)&&(s.maxDate=t.formatDate(v.strToDateTime(s.maxDate),s.formatDate)),gt.toggle(s.showApplyButton),g.find(".xdsoft_today_button").css("visibility",s.todayButton?"visible":"hidden"),g.find("."+s.prev).css("visibility",s.prevButton?"visible":"hidden"),g.find("."+s.next).css("visibility",s.nextButton?"visible":"hidden"),oi(s),s.validateOnBlur)r.off("blur.xdsoft").on("blur.xdsoft",function(){var u,i,r;s.allowBlank&&(!n.trim(n(this).val()).length||typeof s.mask=="string"&&n.trim(n(this).val())===s.mask.replace(/[0-9]/g,"_"))?(n(this).val(null),o.data("xdsoft_datetime").empty()):(u=t.parseDate(n(this).val(),s.format),u?n(this).val(t.formatDate(u,s.format)):(i=+[n(this).val()[0],n(this).val()[1]].join(""),r=+[n(this).val()[2],n(this).val()[3]].join(""),!s.datepicker&&s.timepicker&&i>=0&&i<24&&r>=0&&r<60?n(this).val([i,r].map(function(n){return n>9?n:"0"+n}).join(":")):n(this).val(t.formatDate(v.now(),s.format))),o.data("xdsoft_datetime").setCurrentTime(n(this).val()));o.trigger("changedatetime.xdsoft");o.trigger("close.xdsoft")});s.dayOfWeekStartPrev=s.dayOfWeekStart===0?6:s.dayOfWeekStart-1;o.trigger("xchange.xdsoft").trigger("afterOpen.xdsoft")};o.data("options",s).on("touchstart mousedown.xdsoft",function(n){return n.stopPropagation(),n.preventDefault(),ti.hide(),ni.hide(),!1});nt.append(y);nt.xdsoftScroller();o.on("afterOpen.xdsoft",function(){nt.xdsoftScroller()});o.append(vt).append(pt);s.withoutCopyright!==!0&&o.append(si);vt.append(g).append(dt).append(gt);n(s.parentID).append(o);ei=function(){var i=this;i.now=function(n){var t=new Date,r,u;return!n&&s.defaultDate&&(r=i.strToDateTime(s.defaultDate),t.setFullYear(r.getFullYear()),t.setMonth(r.getMonth()),t.setDate(r.getDate())),s.yearOffset&&t.setFullYear(t.getFullYear()+s.yearOffset),!n&&s.defaultTime&&(u=i.strtotime(s.defaultTime),t.setHours(u.getHours()),t.setMinutes(u.getMinutes())),t};i.isValidDate=function(n){return Object.prototype.toString.call(n)!=="[object Date]"?!1:!isNaN(n.getTime())};i.setCurrentTime=function(n,t){i.currentTime=typeof n=="string"?i.strToDateTime(n):i.isValidDate(n)?n:n||t||!s.allowBlank?i.now():null;o.trigger("xchange.xdsoft")};i.empty=function(){i.currentTime=null};i.getCurrentTime=function(){return i.currentTime};i.nextMonth=function(){(i.currentTime===undefined||i.currentTime===null)&&(i.currentTime=i.now());var t=i.currentTime.getMonth()+1,r;return t===12&&(i.currentTime.setFullYear(i.currentTime.getFullYear()+1),t=0),r=i.currentTime.getFullYear(),i.currentTime.setDate(Math.min(new Date(i.currentTime.getFullYear(),t+1,0).getDate(),i.currentTime.getDate())),i.currentTime.setMonth(t),s.onChangeMonth&&n.isFunction(s.onChangeMonth)&&s.onChangeMonth.call(o,v.currentTime,o.data("input")),r!==i.currentTime.getFullYear()&&n.isFunction(s.onChangeYear)&&s.onChangeYear.call(o,v.currentTime,o.data("input")),o.trigger("xchange.xdsoft"),t};i.prevMonth=function(){(i.currentTime===undefined||i.currentTime===null)&&(i.currentTime=i.now());var t=i.currentTime.getMonth()-1;return t===-1&&(i.currentTime.setFullYear(i.currentTime.getFullYear()-1),t=11),i.currentTime.setDate(Math.min(new Date(i.currentTime.getFullYear(),t+1,0).getDate(),i.currentTime.getDate())),i.currentTime.setMonth(t),s.onChangeMonth&&n.isFunction(s.onChangeMonth)&&s.onChangeMonth.call(o,v.currentTime,o.data("input")),o.trigger("xchange.xdsoft"),t};i.getWeekOfYear=function(t){var r,i;return s.onGetWeekOfYear&&n.isFunction(s.onGetWeekOfYear)&&(r=s.onGetWeekOfYear.call(o,t),typeof r!="undefined")?r:(i=new Date(t.getFullYear(),0,1),i.getDay()!=4&&i.setMonth(0,1+(11-i.getDay())%7),Math.ceil(((t-i)/864e5+i.getDay()+1)/7))};i.strToDateTime=function(n){var r=[],f,u;return n&&n instanceof Date&&i.isValidDate(n)?n:(r=/^(\+|\-)(.*)$/.exec(n),r&&(r[2]=t.parseDate(r[2],s.formatDate)),r&&r[2]?(f=r[2].getTime()-r[2].getTimezoneOffset()*6e4,u=new Date(i.now(!0).getTime()+parseInt(r[1]+"1",10)*f)):u=n?t.parseDate(n,s.format):i.now(),i.isValidDate(u)||(u=i.now()),u)};i.strToDate=function(n){if(n&&n instanceof Date&&i.isValidDate(n))return n;var r=n?t.parseDate(n,s.formatDate):i.now(!0);return i.isValidDate(r)||(r=i.now(!0)),r};i.strtotime=function(n){if(n&&n instanceof Date&&i.isValidDate(n))return n;var r=n?t.parseDate(n,s.formatTime):i.now(!0);return i.isValidDate(r)||(r=i.now(!0)),r};i.str=function(){return t.formatDate(i.currentTime,s.format)};i.currentTime=this.now()};v=new ei;gt.on("touchend click",function(n){n.preventDefault();o.data("changed",!0);v.setCurrentTime(fi());r.val(v.str());o.trigger("close.xdsoft")});g.find(".xdsoft_today_button").on("touchend mousedown.xdsoft",function(){o.data("changed",!0);v.setCurrentTime(0,!0);o.trigger("afterOpen.xdsoft")}).on("dblclick.xdsoft",function(){var n=v.getCurrentTime(),t,i;(n=new Date(n.getFullYear(),n.getMonth(),n.getDate()),t=v.strToDate(s.minDate),t=new Date(t.getFullYear(),t.getMonth(),t.getDate()),n<t)||(i=v.strToDate(s.maxDate),i=new Date(i.getFullYear(),i.getMonth(),i.getDate()),n>i)||(r.val(v.str()),r.trigger("change"),o.trigger("close.xdsoft"))});g.find(".xdsoft_prev,.xdsoft_next").on("touchend mousedown.xdsoft",function(){var t=n(this),i=0,r=!1;(function u(n){t.hasClass(s.next)?v.nextMonth():t.hasClass(s.prev)&&v.prevMonth();s.monthChangeSpinner&&(r||(i=setTimeout(u,n||100)))})(500);n([document.body,window]).on("touchend mouseup.xdsoft",function f(){clearTimeout(i);r=!0;n([document.body,window]).off("touchend mouseup.xdsoft",f)})});pt.find(".xdsoft_prev,.xdsoft_next").on("touchend mousedown.xdsoft",function(){var i=n(this),r=0,u=!1,t=110;(function f(n){var o=nt[0].clientHeight,h=y[0].offsetHeight,e=Math.abs(parseInt(y.css("marginTop"),10));i.hasClass(s.next)&&h-o-s.timeHeightInTimePicker>=e?y.css("marginTop","-"+(e+s.timeHeightInTimePicker)+"px"):i.hasClass(s.prev)&&e-s.timeHeightInTimePicker>=0&&y.css("marginTop","-"+(e-s.timeHeightInTimePicker)+"px");nt.trigger("scroll_element.xdsoft_scroller",[Math.abs(parseInt(y[0].style.marginTop,10)/(h-o))]);t=t>10?10:t-10;u||(r=setTimeout(f,n||t))})(500);n([document.body,window]).on("touchend mouseup.xdsoft",function e(){clearTimeout(r);u=!0;n([document.body,window]).off("touchend mouseup.xdsoft",e)})});ii=0;o.on("xchange.xdsoft",function(u){clearTimeout(ii);ii=setTimeout(function(){if(v.currentTime===undefined||v.currentTime===null){if(s.allowBlank)return;v.currentTime=v.now()}for(var c="",u=new Date(v.currentTime.getFullYear(),v.currentTime.getMonth(),1,12,0,0),e=0,l,tt=v.now(),p=!1,w=!1,k,et,nt,ot,a,st,h=[],b,it=!0,rt="",d="",ut,ft;u.getDay()!==s.dayOfWeekStart;)u.setDate(u.getDate()-1);for(c+="<table><thead><tr>",s.weeks&&(c+="<th><\/th>"),l=0;l<7;l+=1)c+="<th>"+s.i18n[i].dayOfWeekShort[(l+s.dayOfWeekStart)%7]+"<\/th>";for(c+="<\/tr><\/thead>",c+="<tbody>",s.maxDate!==!1&&(p=v.strToDate(s.maxDate),p=new Date(p.getFullYear(),p.getMonth(),p.getDate(),23,59,59,999)),s.minDate!==!1&&(w=v.strToDate(s.minDate),w=new Date(w.getFullYear(),w.getMonth(),w.getDate()));e<v.currentTime.countDaysInMonth()||u.getDay()!==s.dayOfWeekStart||v.currentTime.getMonth()===u.getMonth();)h=[],e+=1,et=u.getDay(),nt=u.getDate(),ot=u.getFullYear(),a=u.getMonth(),st=v.getWeekOfYear(u),ft="",h.push("xdsoft_date"),b=s.beforeShowDay&&n.isFunction(s.beforeShowDay.call)?s.beforeShowDay.call(o,u):null,s.allowDateRe&&Object.prototype.toString.call(s.allowDateRe)==="[object RegExp]"?s.allowDateRe.test(t.formatDate(u,s.formatDate))||h.push("xdsoft_disabled"):s.allowDates&&s.allowDates.length>0?s.allowDates.indexOf(t.formatDate(u,s.formatDate))===-1&&h.push("xdsoft_disabled"):p!==!1&&u>p||w!==!1&&u<w||b&&b[0]===!1?h.push("xdsoft_disabled"):s.disabledDates.indexOf(t.formatDate(u,s.formatDate))!==-1?h.push("xdsoft_disabled"):s.disabledWeekDays.indexOf(et)!==-1?h.push("xdsoft_disabled"):r.is("[readonly]")&&h.push("xdsoft_disabled"),b&&b[1]!==""&&h.push(b[1]),v.currentTime.getMonth()!==a&&h.push("xdsoft_other_month"),(s.defaultSelect||o.data("changed"))&&t.formatDate(v.currentTime,s.formatDate)===t.formatDate(u,s.formatDate)&&h.push("xdsoft_current"),t.formatDate(tt,s.formatDate)===t.formatDate(u,s.formatDate)&&h.push("xdsoft_today"),(u.getDay()===0||u.getDay()===6||s.weekends.indexOf(t.formatDate(u,s.formatDate))!==-1)&&h.push("xdsoft_weekend"),s.highlightedDates[t.formatDate(u,s.formatDate)]!==undefined&&(k=s.highlightedDates[t.formatDate(u,s.formatDate)],h.push(k.style===undefined?"xdsoft_highlighted_default":k.style),ft=k.desc===undefined?"":k.desc),s.beforeShowDay&&n.isFunction(s.beforeShowDay)&&h.push(s.beforeShowDay(u)),it&&(c+="<tr>",it=!1,s.weeks&&(c+="<th>"+st+"<\/th>")),c+='<td data-date="'+nt+'" data-month="'+a+'" data-year="'+ot+'" class="xdsoft_date xdsoft_day_of_week'+u.getDay()+" "+h.join(" ")+'" title="'+ft+'"><div>'+nt+"<\/div><\/td>",u.getDay()===s.dayOfWeekStartPrev&&(c+="<\/tr>",it=!0),u.setDate(nt+1);if(c+="<\/tbody><\/table>",dt.html(c),g.find(".xdsoft_label span").eq(0).text(s.i18n[i].months[v.currentTime.getMonth()]),g.find(".xdsoft_label span").eq(1).text(v.currentTime.getFullYear()),rt="",d="",a="",ut=function(i,u){var f=v.now(),e,c,l=s.allowTimes&&n.isArray(s.allowTimes)&&s.allowTimes.length;f.setHours(i);i=parseInt(f.getHours(),10);f.setMinutes(u);u=parseInt(f.getMinutes(),10);e=new Date(v.currentTime);e.setHours(i);e.setMinutes(u);h=[];s.minDateTime!==!1&&s.minDateTime>e||s.maxTime!==!1&&v.strtotime(s.maxTime).getTime()<f.getTime()||s.minTime!==!1&&v.strtotime(s.minTime).getTime()>f.getTime()?h.push("xdsoft_disabled"):s.minDateTime!==!1&&s.minDateTime>e||s.disabledMinTime!==!1&&f.getTime()>v.strtotime(s.disabledMinTime).getTime()&&s.disabledMaxTime!==!1&&f.getTime()<v.strtotime(s.disabledMaxTime).getTime()?h.push("xdsoft_disabled"):r.is("[readonly]")&&h.push("xdsoft_disabled");c=new Date(v.currentTime);c.setHours(parseInt(v.currentTime.getHours(),10));l||c.setMinutes(Math[s.roundTime](v.currentTime.getMinutes()/s.step)*s.step);(s.initTime||s.defaultSelect||o.data("changed"))&&c.getHours()===parseInt(i,10)&&(!l&&s.step>59||c.getMinutes()===parseInt(u,10))&&(s.defaultSelect||o.data("changed")?h.push("xdsoft_current"):s.initTime&&h.push("xdsoft_init_time"));parseInt(tt.getHours(),10)===parseInt(i,10)&&parseInt(tt.getMinutes(),10)===parseInt(u,10)&&h.push("xdsoft_today");rt+='<div class="xdsoft_time '+h.join(" ")+'" data-hour="'+i+'" data-minute="'+u+'">'+t.formatDate(f,s.formatTime)+"<\/div>"},s.allowTimes&&n.isArray(s.allowTimes)&&s.allowTimes.length)for(e=0;e<s.allowTimes.length;e+=1)d=v.strtotime(s.allowTimes[e]).getHours(),a=v.strtotime(s.allowTimes[e]).getMinutes(),ut(d,a);else for(e=0,l=0;e<(s.hours12?12:24);e+=1)for(l=0;l<60;l+=s.step)d=(e<10?"0":"")+e,a=(l<10?"0":"")+l,ut(d,a);for(y.html(rt),f="",e=0,e=parseInt(s.yearStart,10)+s.yearOffset;e<=parseInt(s.yearEnd,10)+s.yearOffset;e+=1)f+='<div class="xdsoft_option '+(v.currentTime.getFullYear()===e?"xdsoft_current":"")+'" data-value="'+e+'">'+e+"<\/div>";for(ti.children().eq(0).html(f),e=parseInt(s.monthStart,10),f="";e<=parseInt(s.monthEnd,10);e+=1)f+='<div class="xdsoft_option '+(v.currentTime.getMonth()===e?"xdsoft_current":"")+'" data-value="'+e+'">'+s.i18n[i].months[e]+"<\/div>";ni.children().eq(0).html(f);n(o).trigger("generate.xdsoft")},10);u.stopPropagation()}).on("afterOpen.xdsoft",function(){if(s.timepicker){var n,t,i,r;y.find(".xdsoft_current").length?n=".xdsoft_current":y.find(".xdsoft_init_time").length&&(n=".xdsoft_init_time");n?(t=nt[0].clientHeight,i=y[0].offsetHeight,r=y.find(n).index()*s.timeHeightInTimePicker+1,i-t<r&&(r=i-t),nt.trigger("scroll_element.xdsoft_scroller",[parseInt(r,10)/(i-t)])):nt.trigger("scroll_element.xdsoft_scroller",[0])}});bt=0;dt.on("touchend click.xdsoft","td",function(t){t.stopPropagation();bt+=1;var u=n(this),i=v.currentTime;if((i===undefined||i===null)&&(v.currentTime=v.now(),i=v.currentTime),u.hasClass("xdsoft_disabled"))return!1;i.setDate(1);i.setFullYear(u.data("year"));i.setMonth(u.data("month"));i.setDate(u.data("date"));o.trigger("select.xdsoft",[i]);r.val(v.str());s.onSelectDate&&n.isFunction(s.onSelectDate)&&s.onSelectDate.call(o,v.currentTime,o.data("input"),t);o.data("changed",!0);o.trigger("xchange.xdsoft");o.trigger("changedatetime.xdsoft");(bt>1||s.closeOnDateSelect===!0||s.closeOnDateSelect===!1&&!s.timepicker)&&!s.inline&&o.trigger("close.xdsoft");setTimeout(function(){bt=0},200)});y.on("touchmove","div",function(){u=!0}).on("touchend click.xdsoft","div",function(t){if(t.stopPropagation(),u){u=!1;return}var r=n(this),i=v.currentTime;if((i===undefined||i===null)&&(v.currentTime=v.now(),i=v.currentTime),r.hasClass("xdsoft_disabled"))return!1;i.setHours(r.data("hour"));i.setMinutes(r.data("minute"));o.trigger("select.xdsoft",[i]);o.data("input").val(v.str());s.onSelectTime&&n.isFunction(s.onSelectTime)&&s.onSelectTime.call(o,v.currentTime,o.data("input"),t);o.data("changed",!0);o.trigger("xchange.xdsoft");o.trigger("changedatetime.xdsoft");s.inline!==!0&&s.closeOnTimeSelect===!0&&o.trigger("close.xdsoft")});vt.on("mousewheel.xdsoft",function(n){return s.scrollMonth?(n.deltaY<0?v.nextMonth():v.prevMonth(),!1):!0});r.on("mousewheel.xdsoft",function(n){return s.scrollInput?!s.datepicker&&s.timepicker?(yt=y.find(".xdsoft_current").length?y.find(".xdsoft_current").eq(0).index():0,yt+n.deltaY>=0&&yt+n.deltaY<y.children().length&&(yt+=n.deltaY),y.children().eq(yt).length&&y.children().eq(yt).trigger("mousedown"),!1):s.datepicker&&!s.timepicker?(vt.trigger(n,[n.deltaY,n.deltaX,n.deltaY]),r.val&&r.val(v.str()),o.trigger("changedatetime.xdsoft"),!1):void 0:!0});o.on("changedatetime.xdsoft",function(t){if(s.onChangeDateTime&&n.isFunction(s.onChangeDateTime)){var i=o.data("input");s.onChangeDateTime.call(o,v.currentTime,i,t);delete s.value;i.trigger("change")}}).on("generate.xdsoft",function(){s.onGenerate&&n.isFunction(s.onGenerate)&&s.onGenerate.call(o,v.currentTime,o.data("input"));wt&&(o.trigger("afterOpen.xdsoft"),wt=!1)}).on("click.xdsoft",function(n){n.stopPropagation()});yt=0;ui=function(n,t){do if(n=n.parentNode,t(n)===!1)break;while(n.nodeName!=="HTML")};kt=function(){var u,r,t,i,c,p,a,e,h,v,y,l,f,w;e=o.data("input");u=e.offset();r=e[0];v="top";t=u.top+r.offsetHeight-1;i=u.left;c="absolute";h=n(window).width();l=n(window).height();f=n(window).scrollTop();document.documentElement.clientWidth-u.left<vt.parent().outerWidth(!0)&&(w=vt.parent().outerWidth(!0)-r.offsetWidth,i=i-w);e.parent().css("direction")==="rtl"&&(i-=o.outerWidth()-e.outerWidth());s.fixed?(t-=f,i-=n(window).scrollLeft(),c="fixed"):(a=!1,ui(r,function(n){if(window.getComputedStyle(n).getPropertyValue("position")==="fixed")return a=!0,!1}),a?(c="fixed",t+o.outerHeight()>l+f?(v="bottom",t=l+f-u.top):t-=f):t+r.offsetHeight>l+f&&(t=u.top-r.offsetHeight+1),t<0&&(t=0),i+r.offsetWidth>h&&(i=h-r.offsetWidth));p=o[0];ui(p,function(n){var t;return t=window.getComputedStyle(n).getPropertyValue("position"),t==="relative"&&h>=n.offsetWidth?(i=i-(h-n.offsetWidth)/2,!1):void 0});y={position:c,left:i,top:"",bottom:""};y[v]=t;o.css(y)};o.on("open.xdsoft",function(t){var i=!0;if(s.onShow&&n.isFunction(s.onShow)&&(i=s.onShow.call(o,v.currentTime,o.data("input"),t)),i!==!1){o.show();kt();n(window).off("resize.xdsoft",kt).on("resize.xdsoft",kt);if(s.closeOnWithoutClick)n([document.body,window]).on("touchstart mousedown.xdsoft",function r(){o.trigger("close.xdsoft");n([document.body,window]).off("touchstart mousedown.xdsoft",r)})}}).on("close.xdsoft",function(t){var i=!0;g.find(".xdsoft_month,.xdsoft_year").find(".xdsoft_select").hide();s.onClose&&n.isFunction(s.onClose)&&(i=s.onClose.call(o,v.currentTime,o.data("input"),t));i===!1||s.opened||s.inline||o.hide();t.stopPropagation()}).on("toggle.xdsoft",function(){o.is(":visible")?o.trigger("close.xdsoft"):o.trigger("open.xdsoft")}).data("input",r);ri=0;o.data("xdsoft_datetime",v);o.setOptions(s);v.setCurrentTime(fi());r.data("xdsoft_datetimepicker",o).on("open.xdsoft focusin.xdsoft mousedown.xdsoft touchstart",function(){r.is(":disabled")||r.data("xdsoft_datetimepicker").is(":visible")&&s.closeOnInputClick||(clearTimeout(ri),ri=setTimeout(function(){r.is(":disabled")||(wt=!0,v.setCurrentTime(fi(),!0),s.mask&&oi(s),o.trigger("open.xdsoft"))},100))}).on("keydown.xdsoft",function(t){var i,r=t.which;return[k].indexOf(r)!==-1&&s.enterLikeTab?(i=n("input:visible,textarea:visible,button:visible,a:visible"),o.trigger("close.xdsoft"),i.eq(i.index(this)+1).focus(),!1):[d].indexOf(r)!==-1?(o.trigger("close.xdsoft"),!0):void 0}).on("blur.xdsoft",function(){o.trigger("close.xdsoft")})};nt=function(t){var i=t.data("xdsoft_datetimepicker");i&&(i.data("xdsoft_datetime",null),i.remove(),t.data("xdsoft_datetimepicker",null).off(".xdsoft"),n(window).off("resize.xdsoft"),n([window,document.body]).off("mousedown.xdsoft touchstart"),t.unmousewheel&&t.unmousewheel())};n(document).off("keydown.xdsoftctrl keyup.xdsoftctrl").on("keydown.xdsoftctrl",function(n){n.keyCode===l&&(a=!0)}).on("keyup.xdsoftctrl",function(n){n.keyCode===l&&(a=!1)});return this.each(function(){var i=n(this).data("xdsoft_datetimepicker"),r;if(i){if(n.type(f)==="string")switch(f){case"show":n(this).select().focus();i.trigger("open.xdsoft");break;case"hide":i.trigger("close.xdsoft");break;case"toggle":i.trigger("toggle.xdsoft");break;case"destroy":nt(n(this));break;case"reset":this.value=this.defaultValue;this.value&&i.data("xdsoft_datetime").isValidDate(t.parseDate(this.value,s.format))||i.data("changed",!1);i.data("xdsoft_datetime").setCurrentTime(this.value);break;case"validate":r=i.data("input");r.trigger("blur.xdsoft");break;default:i[f]&&n.isFunction(i[f])&&(y=i[f](o))}else i.setOptions(f);return 0}n.type(f)!=="string"&&(!s.lazyInit||s.open||s.inline?v(n(this)):vt(n(this)))}),y};n.fn.datetimepicker.defaults=r}),function(n){typeof define=="function"&&define.amd?define(["jquery"],n):typeof exports=="object"?module.exports=n:n(jQuery)}(function(n){function e(r){var f=r||window.event,w=h.call(arguments,1),l=0,o=0,e=0,a=0,b=0,k=0,v,y,p;if(r=n.event.fix(f),r.type="mousewheel","detail"in f&&(e=f.detail*-1),"wheelDelta"in f&&(e=f.wheelDelta),"wheelDeltaY"in f&&(e=f.wheelDeltaY),"wheelDeltaX"in f&&(o=f.wheelDeltaX*-1),"axis"in f&&f.axis===f.HORIZONTAL_AXIS&&(o=e*-1,e=0),l=e===0?o:e,"deltaY"in f&&(e=f.deltaY*-1,l=e),"deltaX"in f&&(o=f.deltaX,e===0&&(l=o*-1)),e!==0||o!==0)return f.deltaMode===1?(v=n.data(this,"mousewheel-line-height"),l*=v,e*=v,o*=v):f.deltaMode===2&&(y=n.data(this,"mousewheel-page-height"),l*=y,e*=y,o*=y),a=Math.max(Math.abs(e),Math.abs(o)),(!t||a<t)&&(t=a,s(f,a)&&(t/=40)),s(f,a)&&(l/=40,o/=40,e/=40),l=Math[l>=1?"floor":"ceil"](l/t),o=Math[o>=1?"floor":"ceil"](o/t),e=Math[e>=1?"floor":"ceil"](e/t),i.settings.normalizeOffset&&this.getBoundingClientRect&&(p=this.getBoundingClientRect(),b=r.clientX-p.left,k=r.clientY-p.top),r.deltaX=o,r.deltaY=e,r.deltaFactor=t,r.offsetX=b,r.offsetY=k,r.deltaMode=0,w.unshift(r,l,o,e),u&&clearTimeout(u),u=setTimeout(c,200),(n.event.dispatch||n.event.handle).apply(this,w)}function c(){t=null}function s(n,t){return i.settings.adjustOldDeltas&&n.type==="mousewheel"&&t%120==0}var o=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],r="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],h=Array.prototype.slice,u,t,f,i;if(n.event.fixHooks)for(f=o.length;f;)n.event.fixHooks[o[--f]]=n.event.mouseHooks;i=n.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var t=r.length;t;)this.addEventListener(r[--t],e,!1);else this.onmousewheel=e;n.data(this,"mousewheel-line-height",i.getLineHeight(this));n.data(this,"mousewheel-page-height",i.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var t=r.length;t;)this.removeEventListener(r[--t],e,!1);else this.onmousewheel=null;n.removeData(this,"mousewheel-line-height");n.removeData(this,"mousewheel-page-height")},getLineHeight:function(t){var r=n(t),i=r["offsetParent"in n.fn?"offsetParent":"parent"]();return i.length||(i=n("body")),parseInt(i.css("fontSize"),10)||parseInt(r.css("fontSize"),10)||16},getPageHeight:function(t){return n(t).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};n.fn.extend({mousewheel:function(n){return n?this.bind("mousewheel",n):this.trigger("mousewheel")},unmousewheel:function(n){return this.unbind("mousewheel",n)}})});SelectedClass="SearchTerm";DefaultDateValue="All";$(document).ready(function(){$(".dropdown-menu input:checkbox").prop("checked",!1);$(".dropdown-menu input:checkbox[data-checkonpageload='True']").prop("checked",!0);$(".panel").on("click",".table-refresh",function(){table&&table.draw(!1)});if(window.isDateOnly)$(".filterdatetimepicker").datepicker({changeMonth:!0,changeYear:!0,onClose:function(n){var t=this,u;if(n!==""){var i=$(t).closest(".admin-datebox").data("filter-key"),f=$("#filterPrefix").val(),r=window.defaultStartDate;i==="DateEnd"&&(r=window.defaultEndDate);u=n;SetFilter(i,u,f,function(){FixDateText(t,r)})}}});else{$("#DateStart").datetimepicker({});$("#DateEnd").datetimepicker({});$("#DateStart").on("blur",function(){var n=this,t=$(n).attr("value");if(t!==""){var i=$(n).closest(".admin-datebox").data("filter-key"),r=$("#filterPrefix").val(),u=window.defaultStartDate,f=t;SetFilter(i,f,r,function(){FixDateText(n,u)})}});$("#DateEnd").on("blur",function(){var n=this,t=$(n).attr("value");if(t!==""){var i=$(n).closest(".admin-datebox").data("filter-key"),r=$("#filterPrefix").val(),u=window.defaultEndDate,f=t;SetFilter(i,f,r,function(){FixDateText(n,u)})}})}$(".dropdown-menu").mouseleave(function(){var n=this;$(n).parent(".admin-checkbox-dropdown").removeClass("open");var t=$(n).closest("ul").data("filter-key"),r=$(n).closest("ul").data("isbool"),u=$("#filterPrefix").val(),i=[];return r?!1:$(".dropdown-menu[data-filter-key='"+t+"'] input:checkbox:checked").length===0?!1:($(".dropdown-menu[data-filter-key='"+t+"'] input:checkbox:checked").each(function(){i.push($(this).data("value"))}),SetFilter(t,i.toString(),u,function(){FixDropdown(n)}),!1)});$(".admin-checkbox-dropdown").on("click","li .admin-checkbox-dropdown-filter",function(){var n=this,t=$(n).closest("ul").data("filter-key"),u=$(n).closest("ul").data("isbool"),r=$("#filterPrefix").val(),i;u?(i=null,$(n).is(":checked")&&(i=$(n).data("value"),$(".dropdown-menu[data-filter-key='"+t+"'] input:checked").each(function(){$(this).prop("checked",!1);$(this).removeAttr("checked")}),$(n).prop("checked",!0)),SetFilter(t,i,r,function(){FixDropdown(n)})):$(".dropdown-menu[data-filter-key='"+t+"'] input:checkbox:checked").length===0&&SetFilter(t,null,r,function(){FixDropdown(n)})});$(".admin-checkbox-dropdown").on("click","li .clear-filters",function(){var n=this,t=$(n).closest("ul").data("filter-key"),i=$("#filterPrefix").val();$(".dropdown-menu[data-filter-key='"+t+"'] input:checkbox:checked").removeAttr("checked");SetFilter(t,null,i,function(){FixDropdown(n)})});$("#ToggleHighlight").on("click",function(){var n="highlight",t=$("input[name=k]").val();$(this).hasClass(n)?($("#main-table").unhighlight(t),$(this).removeClass(n)):($("#main-table").highlight(t),$(this).addClass(n))});$("#ClearFilter").on("click",function(){var n=$("#filterPrefix").val();$.ajax({url:"/Admin/PersistentFilter/ClearPersistentFilter",type:"POST",data:{prefix:n},dataType:"json",success:function(n){n&&($(".admin-checkbox-dropdown-filter").removeAttr("checked"),$(".admin-checkbox-dropdown").each(function(){FixDropdown(this)}),$(".admin-datebox input.filterdatetimepicker").each(function(){var n=this,i=$(n).closest(".admin-datebox").data("filter-key"),t=window.defaultStartDate;i==="DateEnd"&&(t=window.defaultEndDate);$(n).val(t);FixDateText(n,t)}),$("input[name=k]").val(""),$(".search-bar-reset").hide(),table&&table.draw())}})});$(".admin-filter-container").on("click",".remove.date-remove",function(){var i=this,r=$(i).closest("div").data("filter-key"),u=$("#filterPrefix").val(),n=window.defaultStartDate,t;r==="DateEnd"&&(n=window.defaultEndDate);t=$(i).closest("div").find("input");$(t).val(n);SetFilter(r,null,u,function(){FixDateText(t,n)})});InitDataTablesSearchClick(document)});var searchSubmit="<i class='fa fa-fw fa-search modal-search-submit'><\/i>",searchHelp="<i class='fa fa-fw fa-info-circle modal-search-info'><\/i>",searchClear="<i class='fa fa-fw fa-times modal-search-clear'><\/i>";!function(n){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=n();else if("function"==typeof define&&define.amd)define([],n);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this;t.Clipboard=n()}}(function(){var n;return function n(t,i,r){function u(f,o){var h,c,s;if(!i[f]){if(!t[f]){if(h="function"==typeof require&&require,!o&&h)return h(f,!0);if(e)return e(f,!0);c=new Error("Cannot find module '"+f+"'");throw c.code="MODULE_NOT_FOUND",c;}s=i[f]={exports:{}};t[f][0].call(s.exports,function(n){var i=t[f][1][n];return u(i?i:n)},s,s.exports,n,t,i,r)}return i[f].exports}for(var e="function"==typeof require&&require,f=0;f<r.length;f++)u(r[f]);return u}({1:[function(n,t){function r(n,t){for(;n&&n.nodeType!==u;){if(n.matches(t))return n;n=n.parentNode}}var u=9,i;Element&&!Element.prototype.matches&&(i=Element.prototype,i.matches=i.matchesSelector||i.mozMatchesSelector||i.msMatchesSelector||i.oMatchesSelector||i.webkitMatchesSelector);t.exports=r},{}],2:[function(n,t){function i(n,t,i,u,f){var e=r.apply(this,arguments);return n.addEventListener(i,e,f),{destroy:function(){n.removeEventListener(i,e,f)}}}function r(n,t,i,r){return function(i){i.delegateTarget=u(i.target,t);i.delegateTarget&&r.call(n,i)}}var u=n("./closest");t.exports=i},{"./closest":1}],3:[function(n,t,i){i.node=function(n){return void 0!==n&&n instanceof HTMLElement&&1===n.nodeType};i.nodeList=function(n){var t=Object.prototype.toString.call(n);return void 0!==n&&("[object NodeList]"===t||"[object HTMLCollection]"===t)&&"length"in n&&(0===n.length||i.node(n[0]))};i.string=function(n){return"string"==typeof n||n instanceof String};i.fn=function(n){var t=Object.prototype.toString.call(n);return"[object Function]"===t}},{}],4:[function(n,t){function r(n,t,r){if(!n&&!t&&!r)throw new Error("Missing required arguments");if(!i.string(t))throw new TypeError("Second argument must be a String");if(!i.fn(r))throw new TypeError("Third argument must be a Function");if(i.node(n))return u(n,t,r);if(i.nodeList(n))return f(n,t,r);if(i.string(n))return e(n,t,r);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList");}function u(n,t,i){return n.addEventListener(t,i),{destroy:function(){n.removeEventListener(t,i)}}}function f(n,t,i){return Array.prototype.forEach.call(n,function(n){n.addEventListener(t,i)}),{destroy:function(){Array.prototype.forEach.call(n,function(n){n.removeEventListener(t,i)})}}}function e(n,t,i){return o(document.body,n,t,i)}var i=n("./is"),o=n("delegate");t.exports=r},{"./is":3,delegate:2}],5:[function(n,t){function i(n){var t,i,r;return"SELECT"===n.nodeName?(n.focus(),t=n.value):"INPUT"===n.nodeName||"TEXTAREA"===n.nodeName?(n.focus(),n.setSelectionRange(0,n.value.length),t=n.value):(n.hasAttribute("contenteditable")&&n.focus(),i=window.getSelection(),r=document.createRange(),r.selectNodeContents(n),i.removeAllRanges(),i.addRange(r),t=i.toString()),t}t.exports=i},{}],6:[function(n,t){function i(){}i.prototype={on:function(n,t,i){var r=this.e||(this.e={});return(r[n]||(r[n]=[])).push({fn:t,ctx:i}),this},once:function(n,t,i){function r(){u.off(n,r);t.apply(i,arguments)}var u=this;return r._=t,this.on(n,r,i)},emit:function(n){var r=[].slice.call(arguments,1),i=((this.e||(this.e={}))[n]||[]).slice(),t=0,u=i.length;for(t;t<u;t++)i[t].fn.apply(i[t].ctx,r);return this},off:function(n,t){var u=this.e||(this.e={}),r=u[n],f=[],i,e;if(r&&t)for(i=0,e=r.length;i<e;i++)r[i].fn!==t&&r[i].fn._!==t&&f.push(r[i]);return f.length?u[n]=f:delete u[n],this}};t.exports=i},{}],7:[function(t,i,r){!function(u,f){if("function"==typeof n&&n.amd)n(["module","select"],f);else if("undefined"!=typeof r)f(i,t("select"));else{var e={exports:{}};f(e,u.select);u.clipboardAction=e.exports}}(this,function(n,t){"use strict";function r(n){return n&&n.__esModule?n:{"default":n}}function u(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}var i=r(t),f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},e=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),o=function(){function n(t){u(this,n);this.resolveOptions(t);this.initSelection()}return e(n,[{key:"resolveOptions",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.action=n.action;this.emitter=n.emitter;this.target=n.target;this.text=n.text;this.trigger=n.trigger;this.selectedText=""}},{key:"initSelection",value:function(){this.text?this.selectFake():this.target&&this.selectTarget()}},{key:"selectFake",value:function(){var t=this,r="rtl"==document.documentElement.getAttribute("dir"),n;this.removeFake();this.fakeHandlerCallback=function(){return t.removeFake()};this.fakeHandler=document.body.addEventListener("click",this.fakeHandlerCallback)||!0;this.fakeElem=document.createElement("textarea");this.fakeElem.style.fontSize="12pt";this.fakeElem.style.border="0";this.fakeElem.style.padding="0";this.fakeElem.style.margin="0";this.fakeElem.style.position="absolute";this.fakeElem.style[r?"right":"left"]="-9999px";n=window.pageYOffset||document.documentElement.scrollTop;this.fakeElem.addEventListener("focus",window.scrollTo(0,n));this.fakeElem.style.top=n+"px";this.fakeElem.setAttribute("readonly","");this.fakeElem.value=this.text;document.body.appendChild(this.fakeElem);this.selectedText=i.default(this.fakeElem);this.copyText()}},{key:"removeFake",value:function(){this.fakeHandler&&(document.body.removeEventListener("click",this.fakeHandlerCallback),this.fakeHandler=null,this.fakeHandlerCallback=null);this.fakeElem&&(document.body.removeChild(this.fakeElem),this.fakeElem=null)}},{key:"selectTarget",value:function(){this.selectedText=i.default(this.target);this.copyText()}},{key:"copyText",value:function(){var n=void 0;try{n=document.execCommand(this.action)}catch(t){n=!1}this.handleResult(n)}},{key:"handleResult",value:function(n){this.emitter.emit(n?"success":"error",{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)})}},{key:"clearSelection",value:function(){this.target&&this.target.blur();window.getSelection().removeAllRanges()}},{key:"destroy",value:function(){this.removeFake()}},{key:"action",set:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"copy";if(this._action=n,"copy"!==this._action&&"cut"!==this._action)throw new Error('Invalid "action" value, use either "copy" or "cut"');},get:function(){return this._action}},{key:"target",set:function(n){if(void 0!==n){if(!n||"object"!==("undefined"==typeof n?"undefined":f(n))||1!==n.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===this.action&&n.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===this.action&&(n.hasAttribute("readonly")||n.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');this._target=n}},get:function(){return this._target}}]),n}();n.exports=o})},{select:5}],8:[function(t,i,r){!function(u,f){if("function"==typeof n&&n.amd)n(["module","./clipboard-action","tiny-emitter","good-listener"],f);else if("undefined"!=typeof r)f(i,t("./clipboard-action"),t("tiny-emitter"),t("good-listener"));else{var e={exports:{}};f(e,u.clipboardAction,u.tinyEmitter,u.goodListener);u.clipboard=e.exports}}(this,function(n,t,i,r){"use strict";function u(n){return n&&n.__esModule?n:{"default":n}}function e(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");}function o(n,t){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?n:t}function s(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}});t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}function f(n,t){var i="data-clipboard-"+n;if(t.hasAttribute(i))return t.getAttribute(i)}var h=u(t),c=u(i),l=u(r),a=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),v=function(n){function t(n,i){e(this,t);var r=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r.resolveOptions(i),r.listenClick(n),r}return s(t,n),a(t,[{key:"resolveOptions",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof n.action?n.action:this.defaultAction;this.target="function"==typeof n.target?n.target:this.defaultTarget;this.text="function"==typeof n.text?n.text:this.defaultText}},{key:"listenClick",value:function(n){var t=this;this.listener=l.default(n,"click",function(n){return t.onClick(n)})}},{key:"onClick",value:function(n){var t=n.delegateTarget||n.currentTarget;this.clipboardAction&&(this.clipboardAction=null);this.clipboardAction=new h.default({action:this.action(t),target:this.target(t),text:this.text(t),trigger:t,emitter:this})}},{key:"defaultAction",value:function(n){return f("action",n)}},{key:"defaultTarget",value:function(n){var t=f("target",n);if(t)return document.querySelector(t)}},{key:"defaultText",value:function(n){return f("text",n)}},{key:"destroy",value:function(){this.listener.destroy();this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)}}]),t}(c.default);n.exports=v})},{"./clipboard-action":7,"good-listener":4,"tiny-emitter":6}]},{},[8])(8)}),function(n,t){"use strict";if(typeof module!="undefined"&&module.exports){var i=typeof process!="undefined",r=i&&"electron"in process.versions;r?n.SelectorModal=t(n.jQuery):module.exports=t(require("jquery"))}else typeof define=="function"&&define.amd?define("selector-modal",["jquery","bootstrap"],function(n){return t(n)}):n.SelectorModal=t(n.jQuery)}(this,function(n){"use strict";var t=function(i){this.options=n.extend({},{id:"selectormodal-"+t.newGuid()},t.defaultOptions,i);this.realized=!1;this.opened=!1;this.holdThisInstance()};return t.TABLE_ID="selector-datatables-modal-table",t.defaultOptions={data:{},type:"POST",dataType:"json",title:"Selector Modal",modalType:BootstrapDialog.TYPE_PRIMARY,modalSize:BootstrapDialog.SIZE_WIDE,modalButtons:[{label:"Close",cssClass:"btn-primary",action:function(n){n.close()}}],columns:[],columnNames:[],columnDefs:[],dtOrder:[0,"asc"],dtDom:"<'row'<'col-xs-3'<'sm-processing'>><'col-xs-9 text-right'f>>rt<'row'<'col-sm-5'i><'col-sm-7'p>>",actions:[],isLoginModal:!1,multiAction:""},t.configDefaultOptions=function(i){t.defaultOptions=n.extend({},t.defaultOptions,i)},t.dialogs={},t.getDialog=function(n){var i=null;return typeof t.dialogs[n]!="undefined"&&(i=t.dialogs[n]),i},t.setDialog=function(n){return t.dialogs[n.getId()]=n,n},t.addDialog=function(n){return t.setDialog(n)},t.prototype={constructor:t,holdThisInstance:function(){return t.addDialog(this),this},setId:function(n){return this.options.id=n,this},getId:function(){return this.options.id},getModal:function(){return this.$bootstrapDialog},setModal:function(n){return this.$bootstrapDialog=n,this},isRealized:function(){return this.realized},buildTable:function(i){var r=n("<table id='"+t.TABLE_ID+"' class='table table-striped table-bordered'><\/table>"),u,f;return r.append("<thead><tr><\/tr><\/thead>"),u=r.find("thead").find("tr"),f=this.options,i.forEach(function(n){var t=n.replace(" ","");f.multiAction===n?u.append("<th class='"+t+"'><input type='checkbox' id='multiActionCheck' /><\/th>"):u.append("<th class='"+t+"'>"+n+"<\/th>")}),r},buildDataTable:function(){var i=this.options;n("#"+t.TABLE_ID).DataTable({order:this.options.dtOrder,autoWidth:!1,pageLength:10,serverSide:!0,destroy:!0,ajax:{url:i.url,type:i.type,data:i.data},dom:i.dtDom,columnDefs:i.columnDefs})},buildModal:function(){var i=this,n=this.options,t=this.buildTable(this.options.columnNames);this.$bootstrapDialog=new BootstrapDialog({id:n.id,buttons:n.modalButtons,closable:!0,draggable:!0,type:n.modalType,size:n.modalSize,title:n.title,message:t})},closeModal:function(){return this.isRealized()||this.realize(),n("#"+this.options.id).modal("hide"),this},show:function(){this.openModal()},openModal:function(){return this.isRealized()||this.realize(),this.$bootstrapDialog.open(),this.initActions(),this},initActions:function(){var r=this,i=this.options,u=[{actionType:"shown.bs.modal",selector:"#"+i.id,callback:function(){r.buildDataTable();r.setupActions(i.actions)}},{actionType:"hide.bs.modal",selector:"#"+i.id,callback:function(){n("#"+t.TABLE_ID).DataTable().destroy(!0);n("#"+t.TABLE_ID).remove()}},{actionType:"draw.dt",selector:"#"+t.TABLE_ID,callback:function(){ToggleToggleHighlight();ToggleClearFilter()}},{actionType:"init.dt",selector:"#"+t.TABLE_ID,callback:function(){InitDataTablesModalSearch("#"+i.id,i.isLoginModal);n("#"+t.TABLE_ID).wrap("<div class='table-responsive'><\/div>")}},{actionType:"processing.dt",selector:"#"+t.TABLE_ID,callback:function(t,i,r,u){u?n(".sm-processing").html("<i class='fa fa-spinner fa-spin fa-2x'><\/i>"):n(".sm-processing").find("i").remove()}}];i.multiAction&&u.push({actionType:"click",selector:"#multiActionCheck",callback:function(t){var i=n(t).is(":checked");n("input[type=checkbox]").prop("checked",i)}});this.setupActions(u)},setupActions:function(t){var i=this;t&&t.forEach(function(t){var r=t.parent||"body";n(r).off(t.actionType,t.selector).on(t.actionType,t.selector,function(n,r,u,f){t.autoClose&&i.closeModal();t.callback(this,n,r,u,f)})})},realize:function(){this.buildModal()}},t.newGuid=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(n){var t=Math.random()*16|0,i=n==="x"?t:t&3|8;return i.toString(16)})},t.init=function(n){return new t(n)},t.show=function(n){return new t(n).openModal()},t}),function(n){n.multiSelectorModal={};n.fn.multiSelectorModal=function(t){var i=n.extend({},n.fn.multiSelectorModal.defaults,t),r=[],u=new BootstrapDialog({id:"selector-dialog-modal",buttons:[{label:"Select",cssClass:"btn-primary",action:function(t){r=[];n("input.multi-selector:checked").each(function(t,i){r.push(n(i).attr("id"))});t.close();i.action(r)}},{label:"Close",cssClass:"btn-primary",action:function(n){n.close()}}],closable:!0,draggable:!0,type:i.modalType,size:i.modalSize,title:i.title,message:"<i class='fa fa-spinner fa-spin'><\/i>"}).open();n.ajax({url:i.url,data:i.data||{},type:i.type||"POST",dataType:i.dataType||"json"}).done(function(t){var r=t.data,i=n("<div><\/div>");r.forEach(function(n){i.append("<div><input type='checkbox' class='multi-selector' id='"+n.Value+"' data-guid='"+n.Value+"' />&nbsp;&nbsp;<label for='"+n.Value+"'>"+n.Text+"<\/label><\/div>")});u.setMessage(i)}).fail(function(){ShowWarning("Selector modal failed.")})};n.fn.multiSelectorModal.defaults={url:"",data:{},type:"POST",dataType:"json",title:"Selector Modal",modalType:BootstrapDialog.TYPE_PRIMARY,modalSize:BootstrapDialog.SIZE_WIDE,action:n.noop}}(jQuery),function(n){n.selectorModal={};n.fn.selectorModal=function(t){var i=n.extend({},n.fn.selectorModal.defaults,t),r=new BootstrapDialog({id:"selector-dialog-modal",buttons:[{label:"Close",cssClass:"btn-primary",action:function(n){n.close()}}],closable:!0,draggable:!0,type:i.modalType,title:i.title,message:"<i class='fa fa-spinner fa-spin'><\/i>"}).open();n.ajax({url:i.url,data:i.data||{},type:i.type||"POST",dataType:i.dataType||"json"}).done(function(t){var f=t.data,u=n("<div><\/div>");f.forEach(function(n){u.append("<div><button class='btn btn-primary btn-xs btn-select-guid' id='"+n.Value+"'>Select<\/button>&nbsp;&nbsp;"+n.Text+"<\/div>")});r.setMessage(u);n(".btn-select-guid").on("click",function(){var t=n(this).attr("id");i.action(t);r.close()})}).fail(function(){ShowWarning("Selector modal failed.")})};n.fn.selectorModal.defaults={url:"",data:{},type:"POST",dataType:"json",title:"Selector Modal",modalType:BootstrapDialog.TYPE_PRIMARY,action:n.noop}}(jQuery)