www-thermferm/jqwidgets/jqxscheduler.js

changeset 617
b216f9d4b917
parent 511
2d1d43c3a2c2
--- a/www-thermferm/jqwidgets/jqxscheduler.js	Sun Jul 10 16:58:40 2022 +0200
+++ b/www-thermferm/jqwidgets/jqxscheduler.js	Mon Aug 08 10:54:27 2022 +0200
@@ -1,15 +1,9 @@
 /*
-jQWidgets v4.5.2 (2017-May)
-Copyright (c) 2011-2017 jQWidgets.
-License: http://jqwidgets.com/license/
-*/
-!function(a){"use strict";a.jqx.scheduler||(a.jqx.scheduler={}),a.jqx.jqxWidget("jqxScheduler","",{}),a.extend(a.jqx._jqxScheduler.prototype,{defineInstance:function(){var b={altRows:!1,autoShowLoadElement:!0,columnsHeight:30,columns:[],columnGroups:null,dataview:null,disabled:!1,enableHover:!0,appointmentOpacity:.8,headerZIndex:359,height:600,timeRulerWidth:60,loadingErrorMessage:"The data is still loading and you cannot set a property or call a method. You can do that once the data binding is completed. jqxScheduler raises the 'bindingComplete' event when the binding is completed.",localization:null,ready:null,renderToolBar:null,renderAppointment:null,rendered:null,rendering:null,rtl:!1,showToolbar:!0,showLegend:!1,legendPosition:"bottom",legendHeight:34,rowsHeight:27,touchRowsHeight:36,appointmentsMinHeight:18,touchAppointmentsMinHeight:27,appointmentsRenderMode:"default",serverProcessing:!1,selectionMode:"multiplerows",scrollBarSize:a.jqx.utilities.scrollBarSize,touchScrollBarSize:a.jqx.utilities.touchScrollBarSize,showHeader:!0,maxHeight:999999,maxWidth:999999,autoBind:!0,showAllDayRow:!0,changedAppointments:new Array,renderMode:"simple",views:new Array,view:0,min:new a.jqx.date(0),max:new a.jqx.date(9999,12,31),date:new a.jqx.date("todayDate"),colors:["#307DD7","#AA4643","#89A54E","#71588F","#4198AF","#7FD13B","#EA157A","#FEB80A","#00ADDC","#738AC8","#E8601A","#FF9639","#F5BD6A","#599994","#115D6E","#D02841","#FF7C41","#FFC051","#5B5F4D","#364651","#25A0DA","#309B46","#8EBC00","#FF7515","#FFAE00","#0A3A4A","#196674","#33A6B2","#9AC836","#D0E64B","#CC6B32","#FFAB48","#FFE7AD","#A7C9AE","#888A63","#3F3943","#01A2A6","#29D9C2","#BDF271","#FFFFA6","#1B2B32","#37646F","#A3ABAF","#E1E7E8","#B22E2F","#5A4B53","#9C3C58","#DE2B5B","#D86A41","#D2A825","#993144","#FFA257","#CCA56A","#ADA072","#949681","#105B63","#EEEAC5","#FFD34E","#DB9E36","#BD4932","#BBEBBC","#F0EE94","#F5C465","#FA7642","#FF1E54","#60573E","#F2EEAC","#BFA575","#A63841","#BFB8A3","#444546","#FFBB6E","#F28D00","#D94F00","#7F203B","#583C39","#674E49","#948658","#F0E99A","#564E49","#142D58","#447F6E","#E1B65B","#C8782A","#9E3E17","#4D2B1F","#635D61","#7992A2","#97BFD5","#BFDCF5","#844341","#D5CC92","#BBA146","#897B26","#55591C","#56626B","#6C9380","#C0CA55","#F07C6C","#AD5472","#96003A","#FF7347","#FFBC7B","#FF4154","#642223","#5D7359","#E0D697","#D6AA5C","#8C5430","#661C0E","#16193B","#35478C","#4E7AC7","#7FB2F0","#ADD5F7","#7B1A25","#BF5322","#9DA860","#CEA457","#B67818","#0081DA","#3AAFFF","#99C900","#FFEB3D","#309B46","#0069A5","#0098EE","#7BD2F6","#FFB800","#FF6800","#FF6800","#A0A700","#FF8D00","#678900","#0069A5"],colorSchemes:[{name:"scheme01",colors:["#307DD7","#AA4643","#89A54E","#71588F","#4198AF"]},{name:"scheme02",colors:["#7FD13B","#EA157A","#FEB80A","#00ADDC","#738AC8"]},{name:"scheme03",colors:["#E8601A","#FF9639","#F5BD6A","#599994","#115D6E"]},{name:"scheme04",colors:["#D02841","#FF7C41","#FFC051","#5B5F4D","#364651"]},{name:"scheme05",colors:["#25A0DA","#309B46","#8EBC00","#FF7515","#FFAE00"]},{name:"scheme06",colors:["#0A3A4A","#196674","#33A6B2","#9AC836","#D0E64B"]},{name:"scheme07",colors:["#CC6B32","#FFAB48","#FFE7AD","#A7C9AE","#888A63"]},{name:"scheme08",colors:["#3F3943","#01A2A6","#29D9C2","#BDF271","#FFFFA6"]},{name:"scheme09",colors:["#1B2B32","#37646F","#A3ABAF","#E1E7E8","#B22E2F"]},{name:"scheme10",colors:["#5A4B53","#9C3C58","#DE2B5B","#D86A41","#D2A825"]},{name:"scheme11",colors:["#993144","#FFA257","#CCA56A","#ADA072","#949681"]},{name:"scheme12",colors:["#105B63","#EEEAC5","#FFD34E","#DB9E36","#BD4932"]},{name:"scheme13",colors:["#BBEBBC","#F0EE94","#F5C465","#FA7642","#FF1E54"]},{name:"scheme14",colors:["#60573E","#F2EEAC","#BFA575","#A63841","#BFB8A3"]},{name:"scheme15",colors:["#444546","#FFBB6E","#F28D00","#D94F00","#7F203B"]},{name:"scheme16",colors:["#583C39","#674E49","#948658","#F0E99A","#564E49"]},{name:"scheme17",colors:["#142D58","#447F6E","#E1B65B","#C8782A","#9E3E17"]},{name:"scheme18",colors:["#4D2B1F","#635D61","#7992A2","#97BFD5","#BFDCF5"]},{name:"scheme19",colors:["#844341","#D5CC92","#BBA146","#897B26","#55591C"]},{name:"scheme20",colors:["#56626B","#6C9380","#C0CA55","#F07C6C","#AD5472"]},{name:"scheme21",colors:["#96003A","#FF7347","#FFBC7B","#FF4154","#642223"]},{name:"scheme22",colors:["#5D7359","#E0D697","#D6AA5C","#8C5430","#661C0E"]},{name:"scheme23",colors:["#16193B","#35478C","#4E7AC7","#7FB2F0","#ADD5F7"]},{name:"scheme24",colors:["#7B1A25","#BF5322","#9DA860","#CEA457","#B67818"]},{name:"scheme25",colors:["#0081DA","#3AAFFF","#99C900","#FFEB3D","#309B46"]},{name:"scheme26",colors:["#0069A5","#0098EE","#7BD2F6","#FFB800","#FF6800"]},{name:"scheme27",colors:["#FF6800","#A0A700","#FF8D00","#678900","#0069A5"]}],resources:null,contextMenu:!0,contextMenuOpen:null,contextMenuClose:null,contextMenuItemClick:null,contextMenuCreate:null,timeZone:null,statuses:{free:"white",tentative:"tentative",busy:"transparent",outOfOffice:"#800080"},appointmentDataFields:{from:"from",to:"to",id:"id",calendarId:"calendarId",description:"description",location:"location",subject:"subject",background:"background",color:"color",borderColor:"borderColor",style:"style",recurrencePattern:"recurrencePattern",recurrenceException:"recurrenceException",draggable:"draggable",resizable:"resizable",resourceId:"resourceId",status:"status",tooltip:"tooltip",hidden:"hidden",allDay:"allDay",timeZone:"timeZone",ownerId:"ownerId"},appointmentTooltips:!0,tableColumns:1,tableRows:1,dayNameFormat:"full",touchDayNameFormat:"abbr",toolBarRangeFormat:"dd MMMM yyyy",toolBarRangeFormatAbbr:"dd MM yyyy",columnRenderer:null,exportSettings:{serverURL:null,characterSet:null,fileName:"jqxScheduler",dateTimeFormatString:"S",resourcesInMultipleICSFiles:!1},source:{beforeprocessing:null,beforesend:null,loaderror:null,localdata:null,data:null,datatype:"array",datafields:[],url:"",root:"",record:"",id:"",totalrecords:0,recordstartindex:0,recordendindex:0,loadallrecords:!0,sortcolumn:null,sortdirection:null,sort:null,filter:null,sortcomparer:null},editDialogDateTimeFormatString:"dd/MM/yyyy hh:mm tt",editDialogDateFormatString:"dd/MM/yyyy",editDialogOpen:null,editDialogCreate:null,editDialogKeyDown:null,editDialogClose:null,editDialog:!0,toolbarHeight:54,tableZIndex:369,_updating:!1,touchMode:"auto",width:800,that:this,beginDrag:null,endDrag:null,dragging:null,timeZones:[{id:"Dateline Standard Time",offset:-720,offsetHours:-12,displayName:"(UTC-12:00) International Date Line West",supportsDaylightSavingTime:!1},{id:"UTC-11",offset:-660,offsetHours:-11,displayName:"(UTC-11:00) Coordinated Universal Time-11",supportsDaylightSavingTime:!1},{id:"Hawaiteratoran Standard Time",offset:-600,offsetHours:-10,displayName:"(UTC-10:00) Hawaiterator",supportsDaylightSavingTime:!1},{id:"Alaskan Standard Time",offset:-540,offsetHours:-9,displayName:"(UTC-09:00) Alaska",supportsDaylightSavingTime:!0},{id:"Pacific Standard Time (Mexico)",offset:-480,offsetHours:-8,displayName:"(UTC-08:00) Baja California",supportsDaylightSavingTime:!0},{id:"Pacific Standard Time",offset:-480,offsetHours:-8,displayName:"(UTC-08:00) Pacific Time (US & Canada)",supportsDaylightSavingTime:!0},{id:"US Mountain Standard Time",offset:-420,offsetHours:-7,displayName:"(UTC-07:00) Arizona",supportsDaylightSavingTime:!1},{id:"Mountain Standard Time (Mexico)",offset:-420,offsetHours:-7,displayName:"(UTC-07:00) Chihuahua, La Paz, Mazatlan",supportsDaylightSavingTime:!0},{id:"Mountain Standard Time",offset:-420,offsetHours:-7,displayName:"(UTC-07:00) Mountain Time (US & Canada)",supportsDaylightSavingTime:!0},{id:"Central Standard Time",offset:-360,offsetHours:-6,displayName:"(UTC-06:00) Central Time (US & Canada)",supportsDaylightSavingTime:!0},{id:"Central America Standard Time",offset:-360,offsetHours:-6,displayName:"(UTC-06:00) Central America",supportsDaylightSavingTime:!1},{id:"Canada Central Standard Time",offset:-360,offsetHours:-6,displayName:"(UTC-06:00) Saskatchewan",supportsDaylightSavingTime:!1},{id:"Central Standard Time (Mexico)",offset:-360,offsetHours:-6,displayName:"(UTC-06:00) Guadalajara, Mexico City, Monterrey",supportsDaylightSavingTime:!0},{id:"SA Pacific Standard Time",offset:-300,offsetHours:-5,displayName:"(UTC-05:00) Bogota, Lima, Quito, Rio Branco",supportsDaylightSavingTime:!1},{id:"Eastern Standard Time",offset:-300,offsetHours:-5,displayName:"(UTC-05:00) Eastern Time (US & Canada)",supportsDaylightSavingTime:!0},{id:"US Eastern Standard Time",offset:-300,offsetHours:-5,displayName:"(UTC-05:00) Indiana (East)",supportsDaylightSavingTime:!0},{id:"Venezuela Standard Time",offset:-270,offsetHours:-4.5,displayName:"(UTC-04:30) Caracas",supportsDaylightSavingTime:!1},{id:"Atlantic Standard Time",offset:-240,offsetHours:-4,displayName:"(UTC-04:00) Atlantic Time (Canada)",supportsDaylightSavingTime:!0},{id:"Paraguay Standard Time",offset:-240,offsetHours:-4,displayName:"(UTC-04:00) Asuncion",supportsDaylightSavingTime:!0},{id:"Central Brazilian Standard Time",offset:-240,offsetHours:-4,displayName:"(UTC-04:00) Cuiaba",supportsDaylightSavingTime:!0},{id:"Pacific SA Standard Time",offset:-240,offsetHours:-4,displayName:"(UTC-04:00) Santiago",supportsDaylightSavingTime:!0},{id:"SA Western Standard Time",offset:-240,offsetHours:-4,displayName:"(UTC-04:00) Georgetown, La Paz, Manaus",supportsDaylightSavingTime:!1},{id:"Newfoundland Standard Time",offset:-210,offsetHours:-3.5,displayName:"(UTC-03:30) Newfoundland",supportsDaylightSavingTime:!0},{id:"SA Eastern Standard Time",offset:-180,offsetHours:-3,displayName:"(UTC-03:00) Cayenne, Fortaleza",supportsDaylightSavingTime:!1},{id:"Argentina Standard Time",offset:-180,offsetHours:-3,displayName:"(UTC-03:00) Buenos Aires",supportsDaylightSavingTime:!0},{id:"E. South America Standard Time",offset:-180,offsetHours:-3,displayName:"(UTC-03:00) Brasilia",supportsDaylightSavingTime:!0},{id:"Bahia Standard Time",offset:-180,offsetHours:-3,displayName:"(UTC-03:00) Salvador",supportsDaylightSavingTime:!0},{id:"Montevideo Standard Time",offset:-180,offsetHours:-3,displayName:"(UTC-03:00) Montevideo",supportsDaylightSavingTime:!0},{id:"Greenland Standard Time",offset:-180,offsetHours:-3,displayName:"(UTC-03:00) Greenland",supportsDaylightSavingTime:!0},{id:"UTC-02",offset:-120,offsetHours:-2,displayName:"(UTC-02:00) Coordinated Universal Time-02",supportsDaylightSavingTime:!1},{id:"Mid-Atlantic Standard Time",offset:-120,offsetHours:-2,displayName:"(UTC-02:00) Mid-Atlantic - Old",supportsDaylightSavingTime:!0},{id:"Azores Standard Time",offset:-60,offsetHours:-1,displayName:"(UTC-01:00) Azores",supportsDaylightSavingTime:!0},{id:"Cape Verde Standard Time",offset:-60,offsetHours:-1,displayName:"(UTC-01:00) Cape Verde Is.",supportsDaylightSavingTime:!1},{id:"Morocco Standard Time",offset:0,offsetHours:0,displayName:"(UTC) Casablanca",supportsDaylightSavingTime:!0},{id:"UTC",offset:0,offsetHours:0,displayName:"(UTC) Coordinated Universal Time",supportsDaylightSavingTime:!1},{id:"GMT Standard Time",offset:0,offsetHours:0,displayName:"(UTC) Dublin, Edinburgh, Lisbon, London",supportsDaylightSavingTime:!0},{id:"Greenwich Standard Time",offset:0,offsetHours:0,displayName:"(UTC) Monrovia, Reykjavik",supportsDaylightSavingTime:!1},{id:"Central European Standard Time",offset:60,offsetHours:1,displayName:"(UTC+01:00) Sarajevo, Skopje, Warsaw, Zagreb",supportsDaylightSavingTime:!0},{id:"Namibia Standard Time",offset:60,offsetHours:1,displayName:"(UTC+01:00) Windhoek",supportsDaylightSavingTime:!0},{id:"W. Central Africa Standard Time",offset:60,offsetHours:1,displayName:"(UTC+01:00) West Central Africa",supportsDaylightSavingTime:!1},{id:"W. Europe Standard Time",offset:60,offsetHours:1,displayName:"(UTC+01:00) Amsterdam, Berlin, Rome",supportsDaylightSavingTime:!0},{id:"Central Europe Standard Time",offset:60,offsetHours:1,displayName:"(UTC+01:00) Belgrade, Budapest, Prague",supportsDaylightSavingTime:!0},{id:"Romance Standard Time",offset:60,offsetHours:1,displayName:"(UTC+01:00) Brussels, Copenhagen, Madrid, Paris",supportsDaylightSavingTime:!0},{id:"FLE Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) Helsinki, Kyiv, Riga, Sofia",supportsDaylightSavingTime:!0},{id:"South Africa Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) Harare, Pretoria",supportsDaylightSavingTime:!1},{id:"Turkey Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) Istanbul",supportsDaylightSavingTime:!0},{id:"GTB Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) Athens, Bucharest",supportsDaylightSavingTime:!0},{id:"Libya Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) Tripoli",supportsDaylightSavingTime:!0},{id:"E. Europe Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) E. Europe",supportsDaylightSavingTime:!0},{id:"Jordan Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) Amman",supportsDaylightSavingTime:!0},{id:"Middle East Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) Beirut",supportsDaylightSavingTime:!0},{id:"Egypt Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) Cairo",supportsDaylightSavingTime:!0},{id:"Syria Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) Damascus",supportsDaylightSavingTime:!0},{id:"Israel Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) Jerusalem",supportsDaylightSavingTime:!0},{id:"Arab Standard Time",offset:180,offsetHours:3,displayName:"(UTC+03:00) Kuwait, Riyadh",supportsDaylightSavingTime:!1},{id:"E. Africa Standard Time",offset:180,offsetHours:3,displayName:"(UTC+03:00) Nairobi",supportsDaylightSavingTime:!1},{id:"Arabic Standard Time",offset:180,offsetHours:3,displayName:"(UTC+03:00) Baghdad",supportsDaylightSavingTime:!0},{id:"Kaliningrad Standard Time",offset:180,offsetHours:3,displayName:"(UTC+03:00) Kaliningrad, Minsk",supportsDaylightSavingTime:!0},{id:"Iran Standard Time",offset:210,offsetHours:3.5,displayName:"(UTC+03:30) Tehran",supportsDaylightSavingTime:!0},{id:"Mauritius Standard Time",offset:240,offsetHours:4,displayName:"(UTC+04:00) Port Louis",supportsDaylightSavingTime:!0},{id:"Georgian Standard Time",offset:240,offsetHours:4,displayName:"(UTC+04:00) Tbilisi",supportsDaylightSavingTime:!1},{id:"Caucasus Standard Time",offset:240,offsetHours:4,displayName:"(UTC+04:00) Yerevan",supportsDaylightSavingTime:!0},{id:"Arabian Standard Time",offset:240,offsetHours:4,displayName:"(UTC+04:00) Abu Dhabi, Muscat",supportsDaylightSavingTime:!1},{id:"Azerbaijan Standard Time",offset:240,offsetHours:4,displayName:"(UTC+04:00) Baku",supportsDaylightSavingTime:!0},{id:"Russian Standard Time",offset:240,offsetHours:4,displayName:"(UTC+04:00) Moscow, St. Petersburg, Volgograd",supportsDaylightSavingTime:!0},{id:"Afghanistan Standard Time",offset:270,offsetHours:4.5,displayName:"(UTC+04:30) Kabul",supportsDaylightSavingTime:!1},{id:"Pakistan Standard Time",offset:300,offsetHours:5,displayName:"(UTC+05:00) Islamabad, Karachi",supportsDaylightSavingTime:!0},{id:"West Asia Standard Time",offset:300,offsetHours:5,displayName:"(UTC+05:00) Ashgabat, Tashkent",supportsDaylightSavingTime:!1},{id:"India Standard Time",offset:330,offsetHours:5.5,displayName:"(UTC+05:30) Chennai, Kolkata, Mumbai, New Delhi",supportsDaylightSavingTime:!1},{id:"Sri Lanka Standard Time",offset:330,offsetHours:5.5,displayName:"(UTC+05:30) Sri Jayawardenepura",supportsDaylightSavingTime:!1},{id:"Nepal Standard Time",offset:345,offsetHours:5.75,displayName:"(UTC+05:45) Kathmandu",supportsDaylightSavingTime:!1},{id:"Central Asia Standard Time",offset:360,offsetHours:6,displayName:"(UTC+06:00) Astana",supportsDaylightSavingTime:!1},{id:"Bangladesh Standard Time",offset:360,offsetHours:6,displayName:"(UTC+06:00) Dhaka",supportsDaylightSavingTime:!0},{id:"Ekaterinburg Standard Time",offset:360,offsetHours:6,displayName:"(UTC+06:00) Ekaterinburg",supportsDaylightSavingTime:!0},{id:"Myanmar Standard Time",offset:390,offsetHours:6.5,displayName:"(UTC+06:30) Yangon (Rangoon)",supportsDaylightSavingTime:!1},{id:"SE Asia Standard Time",offset:420,offsetHours:7,displayName:"(UTC+07:00) Bangkok, Hanoi, Jakarta",supportsDaylightSavingTime:!1},{id:"N. Central Asia Standard Time",offset:420,offsetHours:7,displayName:"(UTC+07:00) Novosibirsk",supportsDaylightSavingTime:!0},{id:"Ulaanbaatar Standard Time",offset:480,offsetHours:8,displayName:"(UTC+08:00) Ulaanbaatar",supportsDaylightSavingTime:!1},{id:"China Standard Time",offset:480,offsetHours:8,displayName:"(UTC+08:00) Beijing, Chongqing, Hong Kong",supportsDaylightSavingTime:!1},{id:"Singapore Standard Time",offset:480,offsetHours:8,displayName:"(UTC+08:00) Kuala Lumpur, Singapore",supportsDaylightSavingTime:!1},{id:"North Asia Standard Time",offset:480,offsetHours:8,displayName:"(UTC+08:00) Krasnoyarsk",supportsDaylightSavingTime:!0},{id:"Taipei Standard Time",offset:480,offsetHours:8,displayName:"(UTC+08:00) Taipei",supportsDaylightSavingTime:!1},{id:"W. Australia Standard Time",offset:480,offsetHours:8,displayName:"(UTC+08:00) Perth",supportsDaylightSavingTime:!0},{id:"Korea Standard Time",offset:540,offsetHours:9,displayName:"(UTC+09:00) Seoul",supportsDaylightSavingTime:!1},{id:"North Asia East Standard Time",offset:540,offsetHours:9,displayName:"(UTC+09:00) Irkutsk",supportsDaylightSavingTime:!0},{id:"Tokyo Standard Time",offset:540,offsetHours:9,displayName:"(UTC+09:00) Osaka, Sapporo, Tokyo",supportsDaylightSavingTime:!1},{id:"AUS Central Standard Time",offset:570,offsetHours:9.5,displayName:"(UTC+09:30) Darwin",supportsDaylightSavingTime:!1},{id:"Cen. Australia Standard Time",offset:570,offsetHours:9.5,displayName:"(UTC+09:30) Adelaide",supportsDaylightSavingTime:!0},{id:"West Pacific Standard Time",offset:600,offsetHours:10,displayName:"(UTC+10:00) Guam, Port Moresby",supportsDaylightSavingTime:!1},{id:"Tasmania Standard Time",offset:600,offsetHours:10,displayName:"(UTC+10:00) Hobart",supportsDaylightSavingTime:!0},{id:"E. Australia Standard Time",offset:600,offsetHours:10,displayName:"(UTC+10:00) Brisbane",supportsDaylightSavingTime:!1},{id:"AUS Eastern Standard Time",offset:600,offsetHours:10,displayName:"(UTC+10:00) Canberra, Melbourne, Sydney",supportsDaylightSavingTime:!0},{id:"Yakutsk Standard Time",offset:600,offsetHours:10,displayName:"(UTC+10:00) Yakutsk",supportsDaylightSavingTime:!0},{id:"Vladivostok Standard Time",offset:660,offsetHours:11,displayName:"(UTC+11:00) Vladivostok",supportsDaylightSavingTime:!0},{id:"Central Pacific Standard Time",offset:660,offsetHours:11,displayName:"(UTC+11:00) Solomon Is., New Caledonia",supportsDaylightSavingTime:!1},{id:"Magadan Standard Time",offset:720,offsetHours:12,displayName:"(UTC+12:00) Magadan",supportsDaylightSavingTime:!0},{id:"Kamchatka Standard Time",offset:720,offsetHours:12,displayName:"(UTC+12:00) Petropavlovsk-Kamchatsky - Old",supportsDaylightSavingTime:!0},{id:"Fiji Standard Time",offset:720,offsetHours:12,displayName:"(UTC+12:00) Fiji",supportsDaylightSavingTime:!0},{id:"New Zealand Standard Time",offset:720,offsetHours:12,displayName:"(UTC+12:00) Auckland, Wellington",supportsDaylightSavingTime:!0},{id:"UTC+12",offset:720,offsetHours:12,displayName:"(UTC+12:00) Coordinated Universal Time+12",supportsDaylightSavingTime:!1},{id:"Tonga Standard Time",offset:780,offsetHours:13,displayName:"(UTC+13:00) Nuku'alofa",supportsDaylightSavingTime:!1},{id:"Samoa Standard Time",offset:780,offsetHours:13,displayName:"(UTC+13:00) Samoa",supportsDaylightSavingTime:!0}]};return this===a.jqx._jqxScheduler.prototype?b:(a.extend(!0,this,b),this.that=this,b)},createInstance:function(b){var c=this;c._views=new Array,c._view=c.view;for(var d=0;d<c.views.length;d++)"string"===a.type(c.views[d])?c._views.push({type:c.views[d]}):c._views.push(c.views[d]);for(var d=0;d<c._views.length;d++)if(c._views[d].type==c.view){c._view=d;break}15!=a.jqx.utilities.scrollBarSize&&(c.scrollBarSize=a.jqx.utilities.scrollBarSize),c.source&&!c.source.dataBind&&(c.source=new a.jqx.dataAdapter(c.source));var e=c.source._source.datafields;e&&e.length>0&&(c._camelCase=void 0!==c.source._source.dataFields,c.selectionMode=c.selectionMode.toLowerCase()),null==c.host.attr("tabindex")&&c.host.attr("tabindex","0"),c.host.attr("role","grid"),c.host.attr("align","left"),c.host.addClass(c.toTP("jqx-grid")),c.host.addClass(c.toTP("jqx-scheduler")),c.host.addClass(c.toTP("jqx-reset")),c.host.addClass(c.toTP("jqx-rc-all")),c.host.addClass(c.toTP("jqx-widget")),c.host.addClass(c.toTP("jqx-widget-content jqx-disableselect")),c._testmodules()||(c.overlay=a("<div style='z-index: 999; position:absolute;'></div>"),c.overlay.hide(),c.overlay.appendTo(c.host),c.render(!0),a.jqx.utilities.resize(c.host,function(){var b=a(window).width(),d=a(window).height();c._hostWidth=null,c._hostHeight=null;var e=c.host.width(),f=c.host.height();c._hostWidth=e,c._hostHeight=f,c._lastHostWidth==e&&c._lastHostHeight==f||c._updatesize(c._lastHostWidth!=e,c._lastHostHeight!=f),c._lastWidth=b,c._lastHeight=d,c._lastHostWidth=e,c._lastHostHeight=f}),c.createEditRecurrenceDialog())},createEditRecurrenceDialog:function(){var b=this;b.editRecurrenceDialog=null;var c=a("<div><div>"+b.schedulerLocalization.editRecurringAppointmentDialogTitleString+"</div><div><div>"+b.schedulerLocalization.editRecurringAppointmentDialogContentString+"</div><div style='position: absolute; white-space:nowrap; text-overflow: ellipsis; left:0px; width:100%; bottom: 0px;'><button title='"+b.schedulerLocalization.editRecurringAppointmentDialogOccurrenceString+"' id='editRecurringAppointmentOccurrence."+b.element.id+"' style='white-space:nowrap; text-overflow: ellipsis; border-left-width: 0px;  border-bottom-width: 0px; border-radius:0px; width:50%;'>"+b.schedulerLocalization.editRecurringAppointmentDialogOccurrenceString+"</button><button title='"+b.schedulerLocalization.editRecurringAppointmentDialogSeriesString+"' id='editRecurringAppointmentSeries."+b.element.id+"' style=' white-space:nowrap; text-overflow: ellipsis; border-bottom-width: 0px;  border-left-width: 0px; border-right-width:0px; width:50%; border-radius:0px;'>"+b.schedulerLocalization.editRecurringAppointmentDialogSeriesString+"</button></div></div></div>");b.editRecurrenceDialog=c,a(c).jqxWindow({rtl:b.rtl,autoFocus:!1,animationType:"none",autoOpen:!1,theme:b.theme,minWidth:300,minHeight:110,resizable:!1});var d=c.find("button");d.jqxButton({theme:b.theme,width:"50%",height:30});var e=!1;d.mousedown(function(){e=!0;var d=this.id;d.indexOf("editRecurringAppointmentOccurrence")>=0?b.editSeries(!1):b.editSeries(!0),a(c).jqxWindow("close")}),this.addHandler(a(c),"open",function(a){b._raiseEvent("editRecurrenceDialogOpen",{dialog:c,appointment:b.selectedJQXAppointment?b.selectedJQXAppointment.boundAppointment:null})}),b.addHandler(a(c),"keydown",function(b){if(13==b.keyCode&&a(document.activeElement).ischildof(a(c))&&"button"==document.activeElement.nodeName.toLowerCase())return a(document.activeElement).trigger("mousedown"),a(document.activeElement).trigger("mouseup"),!0}),this.addHandler(a(c),"close",function(a){return e?(e=!1,b.overlay.hide(),b.focus(),void b._raiseEvent("editRecurrenceDialogClose",{dialog:c,appointment:b.selectedJQXAppointment?b.selectedJQXAppointment.boundAppointment:null})):(b._removeFeedbackAndStopResize(),b.overlay.hide(),b.focus(),b._raiseEvent("editRecurrenceDialogClose",{dialog:c,appointment:b.selectedJQXAppointment?b.selectedJQXAppointment.boundAppointment:null}),!1)}),b.editRecurrenceDialog=c},getViewStart:function(){var a=this.getVisibleDate(),b=this._views[this._view].type;this._views[this._view];switch(b){case"dayView":case"timelineDayView":return a}var c=this.getFirstDayOfWeek(a);return c},getViewEnd:function(){var a=this.getViewStart(),b=1,c=this._views[this._view].type,d=this._views[this._view];switch(c){case"dayView":b=1;break;case"timelineDayView":b=1,d.days&&(b=d.days);break;case"weekView":case"timelineWeekView":b=7,d.days&&(b=d.days);break;case"monthView":b=41;break;case"timelineMonthView":b=41,d.days&&(b=d.days);break;case"agendaView":b=7,d.days&&(b=d.days)}return a.addDays(b)},getFirstDayOfWeek:function(a){var b=a,c=this.schedulerLocalization.firstDay;for((c<0||c>6)&&(c=6);b.dayOfWeek()!=c;)b.addDays(-1,!1);return b},getVisibleDate:function(){var a=this.date;a<this.min&&(a=this.min),a>this.max&&(a=this.max);var b=this._views[this._view].type;this._views[this._view];switch(a=a.clearTime(),b){case"dayView":case"weekView":case"timelineDayView":case"timelineWeekView":case"agendaView":return a}var c=a.day(),d=a.addDays(-c+1);return a=d},_builddataloadelement:function(){this.dataloadelement&&this.dataloadelement.remove(),this.dataloadelement=a('<div class="jqx-datatable-load" style="z-index: 99998; background-color:rgba(50,50,50,0.1); overflow: hidden; position: absolute;"></div>');var b=a('<div style="z-index: 99999; margin-left: -66px; left: 50%; top: 50%; margin-top: -24px; position: relative; width: 100px; height: 33px; padding: 5px; font-family: verdana; font-size: 12px; color: #767676; border-color: #898989; border-width: 1px; border-style: solid; background: #f6f6f6; border-collapse: collapse;"><div style="float: left;"><div style="float: left; overflow: hidden; width: 32px; height: 32px;" class="jqx-grid-load"/><span style="margin-top: 10px; float: left; display: block; margin-left: 5px;" >'+this.schedulerLocalization.loadString+"</span></div></div>");if(b.addClass(this.toTP("jqx-rc-all")),this.dataloadelement.addClass(this.toTP("jqx-rc-all")),b.addClass(this.toTP("jqx-fill-state-normal")),this.dataloadelement.append(b),this.dataloadelement.width(this.width),this.dataloadelement.height(this.height),this.host.prepend(this.dataloadelement),""!=this.source._source.url){var c=!1;("auto"===this.height||null===this.height||this.autoheight)&&999999==this.maxHeight&&(c=!0),c?(this.host.height(100),this.dataloadelement.height(100)):(this.host.height(this.height),this.dataloadelement.height(this.height));var d=!1;("auto"===this.width||null===this.width||this.autoWidth)&&(d=!0),d?(this.host.width(300),this.dataloadelement.width(300)):(this.host.width(this.width),this.dataloadelement.width(this.width))}},_measureElement:function(b){var c=a("<span style='visibility: hidden; white-space: nowrap;'>measure Text</span>");c.addClass(this.toTP("jqx-widget")),a(document.body).append(c),"cell"==b?this._cellheight=c.height():this._columnheight=c.height(),c.remove()},_testmodules:function(){var b="",c=function(){""!=b.length&&(b+=",")};this.host.jqxScrollBar||(c(),b+=" jqxscrollbar.js"),this.host.jqxButton||(c(),b+=" jqxbuttons.js"),a.jqx.dataAdapter||(c(),b+=" jqxdata.js"),this.host.jqxDateTimeInput||(c(),b+=" jqxdatetimeinput.js"),this.host.jqxCalendar||(c(),b+=" jqxcalendar.js");try{Globalize||(c(),b+=" globalize.js")}catch(a){}if(""!=b)throw new Error("jqxScheduler: Missing references to the following module(s): "+b);return!1},focus:function(){try{if(this.isTouchDevice())return;if(this._editDialog&&this._editDialog.jqxWindow("isOpen")){var a=this;return setTimeout(function(){a.editDialogFields.subject.focus(),a.editDialogFields.subject.select()},1),void(this.focused=!0)}if(document.activeElement==this.element)return;this.host.focus();var a=this;setTimeout(function(){a.host.focus()},25),this.focused=!0}catch(a){}},hiddenParent:function(){return a.jqx.isHidden(this.host)},_updatesize:function(b,c){if(!this._loading){var d=this,e=d.host.width(),f=d.host.height();d._oldWidth||(d._oldWidth=e),d._oldHeight||(d._oldHeight=f),void 0!=d._resizeTimer&&(clearTimeout(d._resizeTimer),d._resizeTimer=null);var g=300,h=function(){d._resizeTimer&&clearTimeout(d._resizeTimer),d.resizingGrid=!0,a.jqx.isHidden(d.host)||(d._updatecolumnwidths(),d.refresh(),d._oldWidth=e,d._oldHeight=f,d.resizingGrid=!1)};h(),d._resizeTimer=setTimeout(function(){var a=d.host.width(),b=d.host.height();d._oldWidth==a&&d._oldHeight==b||h()},g)}},resize:function(a,b){void 0!=a&&(this.width=a),void 0!=b&&(this.height=b),this._updatecolumnwidths(),this.refresh()},isTouchDevice:function(){if(void 0!=this.touchDevice)return this.touchDevice;var b=a.jqx.mobile.isTouchDevice();return this.touchDevice=b,1==this.touchMode?(b=!0,a.jqx.mobile.setMobileSimulator(this.element),this.touchDevice=b):0==this.touchMode&&(b=!1),b&&(this.touchDevice=!0,this.host.addClass(this.toThemeProperty("jqx-touch")),this.host.find("jqx-widget-content").addClass(this.toThemeProperty("jqx-touch")),this.host.find("jqx-widget-header").addClass(this.toThemeProperty("jqx-touch")),this.scrollBarSize=this.touchScrollBarSize),b},toTP:function(a){return this.toThemeProperty(a)},localizestrings:function(b,c){if(this._cellscache=new Array,a.jqx.dataFormat&&a.jqx.dataFormat.cleardatescache(),this._loading)throw new Error("jqxScheduler: "+this.loadingErrorMessage);if(null!=b){for(var d in this.schedulerLocalization)b[d]&&(this.schedulerLocalization[d]=b[d]);b.loadingErrorMessage&&(this.loadingErrorMessage=b.loadingErrorMessage),c!==!1&&(this._builddataloadelement(),a(this.dataloadelement).css("visibility","hidden"),a(this.dataloadelement).css("display","none"))}else this.schedulerLocalization={"/":"/",":":":",firstDay:0,days:{names:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],namesAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],namesShort:["Su","Mo","Tu","We","Th","Fr","Sa"]},months:{names:["January","February","March","April","May","June","July","August","September","October","November","December",""],namesAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",""]},AM:["AM","am","AM"],PM:["PM","pm","PM"],eras:[{name:"A.D.",start:null,offset:0}],twoDigitYearMax:2029,patterns:{d:"M/d/yyyy",D:"dddd, MMMM dd, yyyy",t:"h:mm tt",T:"h:mm:ss tt",f:"dddd, MMMM dd, yyyy h:mm tt",F:"dddd, MMMM dd, yyyy h:mm:ss tt",M:"MMMM dd",Y:"yyyy MMMM",S:"yyyy'-'MM'-'dd'T'HH':'mm':'ss",ISO:"yyyy-MM-dd hh:mm:ss",ISO2:"yyyy-MM-dd HH:mm:ss",d1:"dd.MM.yyyy",d2:"dd-MM-yyyy",d3:"dd-MMMM-yyyy",d4:"dd-MM-yy",d5:"H:mm",d6:"HH:mm",d7:"HH:mm tt",d8:"dd/MMMM/yyyy",d9:"MMMM-dd",d10:"MM-dd",d11:"MM-dd-yyyy"},agendaDateColumn:"Date",agendaTimeColumn:"Time",agendaAppointmentColumn:"Appointment",backString:"Back",forwardString:"Forward",toolBarPreviousButtonString:"previous",toolBarNextButtonString:"next",emptyDataString:"No data to display",loadString:"Loading...",clearString:"Clear",todayString:"Today",dayViewString:"Day",weekViewString:"Week",monthViewString:"Month",agendaViewString:"Agenda",timelineDayViewString:"Timeline Day",timelineWeekViewString:"Timeline Week",timelineMonthViewString:"Timeline Month",agendaAllDayString:"all day",loadingErrorMessage:"The data is still loading and you cannot set a property or call a method. You can do that once the data binding is completed. jqxScheduler raises the 'bindingComplete' event when the binding is completed.",editRecurringAppointmentDialogTitleString:"Edit Recurring Appointment",editRecurringAppointmentDialogContentString:"Do you want to edit only this occurrence or the series?",editRecurringAppointmentDialogOccurrenceString:"Edit Occurrence",editRecurringAppointmentDialogSeriesString:"Edit The Series",editDialogTitleString:"Edit Appointment",editDialogCreateTitleString:"Create New Appointment",contextMenuEditAppointmentString:"Edit Appointment",contextMenuCreateAppointmentString:"Create New Appointment",editDialogSubjectString:"Subject",editDialogLocationString:"Location",editDialogFromString:"From",editDialogToString:"To",editDialogAllDayString:"All day",editDialogExceptionsString:"Exceptions",editDialogResetExceptionsString:"Reset on Save",editDialogDescriptionString:"Description",editDialogResourceIdString:"Owner",editDialogStatusString:"Status",editDialogColorString:"Color",editDialogColorPlaceHolderString:"Select Color",editDialogTimeZoneString:"Time Zone",editDialogSelectTimeZoneString:"Select Time Zone",editDialogSaveString:"Save",editDialogDeleteString:"Delete",editDialogCancelString:"Cancel",editDialogRepeatString:"Repeat",editDialogRepeatEveryString:"Repeat every",editDialogRepeatEveryWeekString:"week(s)",
-editDialogRepeatEveryYearString:"year(s)",editDialogRepeatEveryDayString:"day(s)",editDialogRepeatNeverString:"Never",editDialogRepeatDailyString:"Daily",editDialogRepeatWeeklyString:"Weekly",editDialogRepeatMonthlyString:"Monthly",editDialogRepeatYearlyString:"Yearly",editDialogRepeatEveryMonthString:"month(s)",editDialogRepeatEveryMonthDayString:"Day",editDialogRepeatFirstString:"first",editDialogRepeatSecondString:"second",editDialogRepeatThirdString:"third",editDialogRepeatFourthString:"fourth",editDialogRepeatLastString:"last",editDialogRepeatEndString:"End",editDialogRepeatAfterString:"After",editDialogRepeatOnString:"On",editDialogRepeatOfString:"of",editDialogRepeatOccurrencesString:"occurrence(s)",editDialogRepeatSaveString:"Save Occurrence",editDialogRepeatSaveSeriesString:"Save Series",editDialogRepeatDeleteString:"Delete Occurrence",editDialogRepeatDeleteSeriesString:"Delete Series",editDialogStatuses:{free:"Free",tentative:"Tentative",busy:"Busy",outOfOffice:"Out of Office"}}},_updateScrollbars:function(a){var b=!1,c=this;("auto"===c.width||null===c.width||c.autowidth)&&999999==c.maxWidth&&(b=!0);var d=c._views[c._view].type,e=c._views[c._view];if("monthView"==d&&c.resources&&"none"==c.resources.orientation&&!e.monthRowAutoHeight){var f=c.vScrollBar[0].style.visibility;return c.hScrollBar[0].style.visibility="hidden",c.vScrollBar[0].style.visibility="hidden",void(f!=c.vScrollBar[0].style.visibility&&c._updatecolumnwidths())}var g=parseInt(c.scrollBarSize),h=c.table?c.table.height():0,i=0,j="inherit",f=c.vScrollBar[0].style.visibility;c.hScrollBar[0].style.visibility;if(a)var k=a;else var k=c.host.height();k-=c.columnGroups?c.showHeader?c.columnsheader.height():0:c.showHeader?c.columnsHeight:0,c.filterable&&(k-=c.filter.height()),c.pageable&&(k-=c.pagerHeight,"both"===c.pagerPosition&&(k-=c.pagerHeight)),c.showToolbar&&(k-=c.toolbarHeight),c.showLegend&&c._resources.length>0&&(k-=c.legendHeight);var l=!1;("auto"===c.height||null===c.height||c.autoheight)&&999999==c.maxHeight&&(l=!0),!l&&h>k&&c.getRows().length>0?(c.vScrollBar[0].style.visibility=j,i=4+parseInt(g),c.vScrollBar.jqxScrollBar({max:h-k})):c.vScrollBar[0].style.visibility="hidden",f!=c.vScrollBar[0].style.visibility&&c._updatecolumnwidths();var m=c.table?c.table.width():0;m>4&&(m-=4);var n=parseInt(c.host.css("border-left-width"))+parseInt(c.host.css("border-right-width")),o=n+c.host.width()-i;if(m>o&&!b){if(c.hScrollBar[0].style.visibility=j,c.hScrollBar.jqxScrollBar({max:2+n+m-o}),i=4+parseInt(g),0==g&&(i=0),!l&&h!=k){if(h>k-i+4&&c.getRows().length>0){c.hScrollBar.jqxScrollBar({max:n+m-o});var p="hidden"===c.vScrollBar[0].style.visibility;c.vScrollBar[0].style.visibility=j,c._updatecolumnwidths(),p&&c.hScrollBar.jqxScrollBar({max:m-o+n});var q=c.table?c.table.width():0;q>3&&(q-=3),q!=m&&(q<o?(c.hScrollBar.jqxScrollBar({max:n+q-o}),c.hScrollBar[0].style.visibility="hidden",i=0):p?q>o&&c.hScrollBar.jqxScrollBar({max:n+q-o}):c.hScrollBar.jqxScrollBar({max:m-o+n-g}))}h-k>0?c.vScrollBar.jqxScrollBar({max:h-k+i}):c.vScrollBar[0].style.visibility="hidden"}}else c.hScrollBar[0].style.visibility="hidden";0===c.getRows().length&&(c.vScrollBar[0].style.visibility="hidden",c.bottomRight[0].style.visibility="hidden"),"hidden"==c.vScrollBar[0].style.visibility&&0!=c.vScrollInstance.value&&c.vScrollInstance.setPosition(0)},_measureElementWidth:function(b){var c=a("<span style='visibility: hidden; white-space: nowrap;'>"+b+"</span>");c.addClass(this.toTP("jqx-widget")),c.addClass(this.toTP("jqx-grid")),c.addClass(this.toTP("jqx-grid-column-header")),c.addClass(this.toTP("jqx-widget-header")),a(document.body).append(c);var d=c.outerWidth()+20;return c.remove(),d},_arrangeAutoHeight:function(a){if(a||(a=0),"auto"===this.height||null===this.height||this.autoheight){var b=this.table.height(),c=0;if(this._hostHeight=null,c+=this.columnGroups?this.showHeader?this.columnsheader.height():-1:this.showHeader?this.columnsHeight:-1,c+=this.showLegend&&this._resources.length>0?this.legendHeight:0,c+=this.showToolbar?this.toolbarHeight:0,c+=this.pageable?this.pagerHeight:0,"both"===this.pagerPosition&&(c+=this.pageable?this.pagerHeight:0),c+=b,this.filterable){var d=this.filter.find(".filterrow"),e=this.filter.find(".filterrow-hidden"),f=1;e.length>0&&(f=0),c+=this.filterHeight-1+this.filterHeight*d.length*f}return c+a>this.maxHeight?this.host.height(this.maxHeight):this.host.height(c+a),!0}return!1},_arrangeAutoWidth:function(a){if(a||(a=0),"auto"===this.width||null===this.width||this.autowidth){this._hostWidth=null;for(var b=0,c=0;c<this.columns.records.length;c++){var d=this.columns.records[c].width;this.columns.records[c].hidden||("auto"==d?(d=this._measureElementWidth(this.columns.records[c].text),b+=d):b+=d)}return width=b,width+a>this.maxWidth?this.host.width(this.maxWidth):this.host.width(width+a),!0}return!1},_measureTopAndHeight:function(){var a=this.host.height(),b=0;return this.showToolbar&&(b+=this.toolbarHeight,a-=parseInt(this.toolbarHeight)),this.showLegend&&"bottom"!=this.legendPosition&&this._resources.length>0&&(b+=parseInt(this.legendHeight)+1),{top:b,height:a}},_arrange:function(){if(this.table){this._arrangeAutoHeight(),this._arrangeAutoWidth();var a=this.legendHeight;0==this._resources.length&&(a=0);var b=this._hostWidth?this._hostWidth:this.host.width(),c=this._hostHeight?this._hostHeight:this.host.height(),d=c;this.showLegend&&"top"==this.legendPosition?this.legendbartop[0].style.visibility="inherit":this.legendbartop[0].style.visibility="hidden";var e=0;if(this.showToolbar?(this.toolbar.width(b),this.toolbar[0].style.height=this.toolbarHeight-1+"px",this.toolbar[0].style.top="0px",e+=this.toolbarHeight,c-=parseInt(this.toolbarHeight)):this.toolbar[0].style.height="0px",this.showLegend&&"bottom"==this.legendPosition?(this.legendbarbottom[0].style.width=b+"px",this.legendbarbottom[0].style.height=a+"px"):this.legendbarbottom[0].style.height="0px",this.showLegend&&"top"==this.legendPosition){this.legendbartop[0].style.width!=b+"px"&&(this.legendbartop[0].style.width=parseInt(b)+"px"),this.legendbartop[0].style.height!=a+"px"&&(this.legendbartop[0].style.height=parseInt(a-1)+"px"),this.legendbartop[0].style.top!=e+"px"&&(this.legendbartop[0].style.top=e+"px");var f=e+a+"px";e+=a,this.content[0].style.top!=f&&(this.content[0].style.top=e+"px")}this.showLegend||(this.legendbartop[0].style.display="none",this.legendbarbottom[0].style.display="none"),this._updateScrollbars(d);var g=parseInt(this.scrollBarSize),h=4,i=2,j=0;if("hidden"!=this.vScrollBar[0].style.visibility&&(j=g+h),"hidden"!=this.hScrollBar[0].style.visibility&&(i=g+h+2),0==g&&(i=0,j=0),"hidden"!=this.vScrollBar[0].style.visibility||"hidden"!=this.hScrollBar[0].style.visibility){var k=this._arrangeAutoHeight(i-2),l=this._arrangeAutoWidth(j+1);if((k||l)&&(this.legendbartop[0].style.width=parseInt(b)+"px",this.toolbar[0].style.width=parseInt(b)+"px",this.legendbarbottom[0].style.width=parseInt(b)+"px",this.filter[0].style.width=parseInt(b)+"px"),k){var m=this._measureTopAndHeight();e=m.top,c=m.height}}var n=0;this.showLegend&&"bottom"==this.legendPosition?(i+=a,n+=a):this.showLegend&&(i+=a),this.hScrollBar[0].style.height!=g+"px"&&(this.hScrollBar[0].style.height=parseInt(g)+"px"),this.hScrollBar[0].style.top==e+c-h-g-n+"px"&&"0px"==this.hScrollBar[0].style.left||(this.hScrollBar[0].style.top=e+c-h-g-n-1+"px",this.hScrollBar[0].style.left="0px");var o=this.hScrollBar[0].style.width,p=!1,q=!1;0==j?o!=b-2+"px"&&(this.hScrollBar[0].style.width=b-2+"px",p=!0):o!=b-g-h+"px"&&(this.hScrollBar[0].style.width=b-g-h+"px",p=!0),this.vScrollBar[0].style.width!=g+"px"&&(this.vScrollBar[0].style.width=g+"px",q=!0),this.vScrollBar[0].style.height!=parseInt(c)-i+"px"&&(this.vScrollBar[0].style.height=parseInt(c)-i+"px",q=!0),this.vScrollBar[0].style.left==parseInt(b)-parseInt(g)-h+"px"&&this.vScrollBar[0].style.top==e+"px"||(this.vScrollBar[0].style.top=e+"px",this.vScrollBar[0].style.left=parseInt(b)-parseInt(g)-h+"px"),this.rtl&&(this.vScrollBar.css({left:"0px",top:e}),"hidden"!=this.vScrollBar.css("visibility")&&this.hScrollBar.css({left:g+2}));var r=this.vScrollInstance;r.disabled=this.disabled;var s=this.hScrollInstance;s.disabled=this.disabled,p&&s.refresh(),q&&r.refresh();var t=function(a){"hidden"!=a.vScrollBar[0].style.visibility&&"hidden"!=a.hScrollBar[0].style.visibility?(a.bottomRight[0].style.visibility="inherit",a.bottomRight[0].style.left=1+parseInt(a.vScrollBar.css("left"))+"px",a.bottomRight[0].style.top=parseInt(a.hScrollBar.css("top"))+"px",a.rtl&&a.bottomRight.css("left","0px"),a.bottomRight[0].style.width=parseInt(g)+3+"px",a.bottomRight[0].style.height=parseInt(g)+4+"px"):a.bottomRight[0].style.visibility="hidden"};t(this),this.content[0].style.width!=b-j+"px"&&(this.content[0].style.width=b-j+"px"),this.content[0].style.height!=c-i+3+"px"&&(this.content[0].style.height=c-i+3+"px"),this.content[0].style.top!=e+"px"&&(this.content[0].style.top=parseInt(e)+"px"),this.rtl&&this.content.css("left",j),this.showLegend&&"bottom"==this.legendPosition&&(this.legendbarbottom.css("top",e-1+c-a-(this.pageable?this.pagerHeight:0)),this.rtl&&("hidden"==this.hScrollBar.css("visibility")?this.legendbarbottom.css("left",this.content.css("left")):this.legendbarbottom.css("left","0px"))),this.vScrollBar[0].style.zIndex=this.tableZIndex+this.headerZIndex+10+this.columns.records.length,this.hScrollBar[0].style.zIndex=this.tableZIndex+this.headerZIndex+10+this.columns.records.length,b!=parseInt(this.dataloadelement[0].style.width)&&(this.dataloadelement[0].style.width=this.element.style.width),c!=parseInt(this.dataloadelement[0].style.height)&&(this.dataloadelement[0].style.height=this.element.style.height),this._hostWidth=b,this._hostHeight=d;var u=this.schedulercontent.coord();this._tableOffset=u}},scrollOffset:function(a,b){if(0==arguments.length||null!=a&&"object"==typeof a&&!a.top)return{left:this.hScrollBar.jqxScrollBar("value"),top:this.vScrollBar.jqxScrollBar("value")};if(null!=a&&"object"==typeof a)var b=a.left,c=a.top,a=c;null!=a&&null!=b&&void 0!=a&&void 0!=b&&(this.vScrollBar.jqxScrollBar("setPosition",a),this.hScrollBar.jqxScrollBar("setPosition",b))},scrollleft:function(a){null!=a&&void 0!=a&&"hidden"!=this.hScrollBar.css("visibility")&&this.hScrollBar.jqxScrollBar("setPosition",a)},scrolltop:function(a){null!=a&&void 0!=a&&"hidden"!=this.vScrollBar.css("visibility")&&this.vScrollBar.jqxScrollBar("setPosition",a)},beginAppointmentsUpdate:function(){this._appupdating=!0},endAppointmentsUpdate:function(){this._appupdating=!1,this._renderrows()},beginUpdate:function(){this._updating=!0,this._datachanged=!1},endUpdate:function(a){this._updating=!1,a!==!1&&(this._rendercolumnheaders(),this.refresh())},updating:function(){return this._updating},databind:function(b,c,d){if(this.loadingstate!==!0){var e=window;"block"==this.host.css("display")&&(this.autoShowLoadElement?(a(this.dataloadelement).css("visibility","visible"),a(this.dataloadelement).css("display","block"),this.dataloadelement.width(this.host.width()),this.dataloadelement.height(this.host.height())):(a(this.dataloadelement).css("visibility","hidden"),a(this.dataloadelement).css("display","none")));var f=this;null==b&&(b={}),void 0!=b.sortcomparer&&null!=b.sortcomparer||(b.sortcomparer=null),void 0!=b.filter&&null!=b.filter||(b.filter=null),void 0!=b.sort&&null!=b.sort||(b.sort=null),void 0!=b.data&&null!=b.data||(b.data=null);var g=null;null!=b&&(g=void 0!=b._source?b._source.url:b.url),this.dataview=this.dataview||new a.jqx.scheduler.dataView("dataView"),this.resourcesDataView=this.resourcesDataView||new a.jqx.scheduler.dataView("resourcesDataView"),this.dataview.pageable=this.pageable,this.dataview.scheduler=this,this.resourcesDataView.scheduler=this,this._loading=!0,this.appointments=new Array,this.uiappointments=new Array;var h=1;this.resources&&this.resources.source&&(h=2);var i=0,j=function(){if(i==h){f._resourcesBinding=!1;var b=f._resources.length>1?f._resources.length:1;if(f.resources&&"horizontal"===f.resources.orientation?(f.tableColumns=b,f.tableRows=1):f.resources&&"vertical"===f.resources.orientation?(f.tableRows=b,f.tableColumns=1):(f.tableColumns=1,f.tableRows=1),f._render(),f.autoShowLoadElement&&!f._loading&&(a(f.dataloadelement).css("visibility","hidden"),a(f.dataloadelement).css("display","none")),f._updateTouchScrolling(),f._raiseEvent("bindingComplete"),d&&d(),!f.initializedcall){if(f.initializedcall=!0,f.isInitialized=!0,(null!=f.width&&f.width.toString().indexOf("%")!=-1||null!=f.height&&f.height.toString().indexOf("%")!=-1)&&f._updatesize(!0),f.ready&&f.ready(),f._rendercelltexts&&f._rendercelltexts(),f._gridRenderElement){a(f._gridRenderElement).show("slow");var c=6e3+Math.floor(4e3*Math.random()+1),g=String.fromCharCode(83,69,84).toLowerCase()+"-"+String.fromCharCode(84,73,77,69,79,85,84).toLowerCase();e[a.camelCase(g)](function(){a(f._gridRenderElement).hide("slow",function(){a(f._gridRenderElement).remove()})},c)}if("hidden"==f.host.css("visibility")){a.jqx.browser.msie&&a.jqx.browser.version<8;"visible"==f.vScrollBar.css("visibility")&&f.vScrollBar.css("visibility","inherit"),"visible"==f.hScrollBar.css("visibility")&&f.hScrollBar.css("visibility","inherit"),f._intervalTimer=setInterval(function(){"visible"==f.host.css("visibility")&&(f._updatesize(!0),clearInterval(f._intervalTimer))},100)}}}};this._resourcesBinding=!1,this.dataview.update=function(b){f._loading=!1,f.appointmentsByKey=new Array,f.appointments=new Array,f.uiappointments=new Array;for(var c=(f.source._source.datafields,["from","to","id","style","description","location","subject","background","color","borderColor","recurrencePattern","recurrenceException","draggable","resizable","tooltip","hidden","allDay","timeZone","ownerId","resourceId"]),d=new Array,e=0;e<f.source.records.length;e++){var g=f.source.records[e],h={};for(var k in f.appointmentDataFields){var l=f.appointmentDataFields[k],m=g[l];if("from"!=k&&"to"!=k||(m=new a.jqx.date(m)),"style"==k&&m){var n=f.getAppointmentColors(m);h.color=n.color,h.background=n.background,h.borderColor=n.border}if("recurrencePattern"==k&&m&&(m=new a.jqx.scheduler.recurrencePattern(m),m.timeZone=g.timeZone||f.timeZone),"recurrenceException"==k){var o=new Array;if(m){m.indexOf("EXDATE:")>=0&&(m=m.substring(m.indexOf("EXDATE:")+7));var p=new Array;m.indexOf(",")>=0?p=m.split(","):p.push(m);for(var q=0;q<p.length;q++){var r=p[q];if(r.indexOf(";")>=0){var s=r.split(";")[1];r=r.split(";")[0],s.toLowerCase().indexOf("display")>=0&&s.toLowerCase().indexOf("none")&&(h.hidden=!0)}try{var t=a.jqx.scheduler.utilities.untilStringToDate(r);"Invalid Date"!=t&&(t=h.timeZone?new a.jqx.date(t,h.timeZone):f.timeZone?t.toTimeZone(f.timeZone):new a.jqx.date(t))}catch(b){var t=new a.jqx.date(r,f.timeZone)}o.push(t)}}m=o}h[k]=m}for(var u in c){var k=c[u];if(void 0==h[k]){var m="";if("originalData"==k)continue;"ownerId"==k&&(m=null),"timeZone"==k&&(m=null),"recurrencePattern"==k&&(m=null),"recurrenceException"==k&&(m=null),"allDay"==k&&(m=!1),"draggable"==k&&(m=!0),"resizable"==k&&(m=!0),"hidden"==k&&(m=!1),"resourceId"==k&&(m=null),"from"==k&&(m=new a.jqx.date),"to"==k&&(m=(new a.jqx.date).addHours(1)),h[k]=m}}h.originalData=g,f.resources&&!f.resources.source&&(f._resourcesBinding||d.indexOf(h.resourceId)==-1&&d.push(h.resourceId)),f.appointmentsByKey[g.uid]=h,f.appointments.push(h);var v=new a.jqx.scheduler.appointment(h);if(h.timeZone&&(v.from=v.from.toTimeZone(h.timeZone),v.to=v.to.toTimeZone(h.timeZone)),f.timeZone?(h.timeZone||(v.timeZone=f.timeZone),v.from=v.from.toTimeZone(f.timeZone),v.to=v.to.toTimeZone(f.timeZone)):(v.from=v.from.toTimeZone(null),v.to=v.to.toTimeZone(null)),h.jqxAppointment=v,h.recurrenceException)for(var w=0;w<h.recurrenceException.length;w++){var t=v.recurrenceException[w],x=v.clone();x.occurrenceFrom=t;var y=v.duration();f.allDay&&(y=new a.jqx.timeSpan(1e4*(f.to-f.from))),x.from=t,x.to=t.add(y),x.rootAppointment=v,x.hidden=!0,v.exceptions.push(x)}v.boundAppointment=h,v.scheduler=f,f.uiappointments.push(v)}f._resourcesBinding||(f._resources=d),i++,j()},this.resourcesDataView.update=function(a){if(f.resources.dataField){f._resources=new Array;for(var b=0;b<a.length;b++)f._resources.indexOf(a[b][f.resources.dataField])>=0||a[b][f.resources.dataField]&&f._resources.push(a[b][f.resources.dataField])}else f._resources=a;void 0==f.resources.orientation&&(f.resources.orientation="none"),i++,j()},this.dataview.databind(b),this.resources&&this.resources.source&&(this._resourcesBinding=!0,this.resourcesDataView.databind(this.resources.source))}},_raiseEvent:function(b,c){void 0==c&&(c={owner:null});var d=b,e=c;e.owner=this;var f=new a.Event(d);f.owner=this,f.args=e;var g=this.host.trigger(f);return c=f.args,g},ensureAppointmentVisible:function(a){return!!this.appointmentsByKey[a]&&this._ensureAppointmentVisible(this.appointmentsByKey[a].jqxAppointment)},_ensureAppointmentVisible:function(b){if("hidden"===this.vScrollBar[0].style.visibility&&"hidden"===this.hScrollBar[0].style.visibility)return!1;if(!b)return!1;var c=this.getViewStart(),d=this.getViewEnd(),e=a.jqx.scheduler.utilities.rangeIntersection(b.from,b.to,c,d);if(!e)return this.navigateTo(b.from),this._ensureAppointmentVisible(b);var f=b.id,g=a('[data-key="'+f+'"]');if(g.length>0)var h=g[0];else{if(!(b.elements&&b.elements.length>0))return!1;var i=b.elements[0],h=i.element}var j=this.vScrollInstance.value,k=this.hScrollInstance.value;if(this.rtl)var k=this.hScrollInstance.max-k;var l=this.element.clientHeight,m=this.element.clientWidth,n=0;n+=this.columnGroups?this.showHeader?this.columnsheader.height():0:this.showHeader?this.columnsHeight:0;var o=this._views[this._view].type,p=this._views[this._view],q=0;if("dayView"==o||"weekView"==o){var r=this.showAllDayRow;!p.timeRuler||"dayView"!==o&&"weekView"!==o||void 0!=p.timeRuler.showAllDayRow&&(r=p.timeRuler.showAllDayRow),r&&(q=1==this.tableRows?this.table[0].rows[0].clientHeight:this.table[0].rows[1].clientHeight);var s=b.duration().days()>=1||b.allDay;if(s&&1==this.tableRows&&1==this.tableColumns)return!1}this.showToolbar&&(n+=this.toolbarHeight),l-=n,this.showLegend&&this._resources.length>0&&(l-=this.legendHeight);var t=0,u=0,v=j-t,w=l+v-q,x=k-u,y=m+x,z=h;z=a(z);var A=(z[0].clientHeight,z.position().top-q);if(A<=v){var B=A;B<0&&(B=0),(!s||s&&this.tableRows>1)&&this.vScrollBar.jqxScrollBar("setPosition",B)}else if(A>=w){var B=A;B<0&&(B=0),(!s||s&&this.tableRows>1)&&this.vScrollBar.jqxScrollBar("setPosition",B-2)}var C=z.position().left;C=Math.round(C);C+z.outerWidth();if(0===Math.round(z.position().left)&&this.hScrollBar.jqxScrollBar("setPosition",0),C<=x){var D=C-z.outerWidth()+u;D<0&&(D=0),this.rtl?this.hScrollBar.jqxScrollBar("setPosition",this.hScrollBar.jqxScrollBar("max")-C):this.hScrollBar.jqxScrollBar("setPosition",C)}C>y&&(this.rtl?this.hScrollBar.jqxScrollBar("setPosition",this.hScrollBar.jqxScrollBar("max")-C):this.hScrollBar.jqxScrollBar("setPosition",C))},ensureVisible:function(b,c){for(var d=this,e="date"==a.type(b)?b:b.toDate(),f=0;f<d.rows.length;f++)for(var g=0;g<d.rows[f].cells.length;g++){var h=d.rows[f].cells[g];if(!c||h.getAttribute("data-view")===c){var i=h.getAttribute("data-date"),j=d._getDateByString,k=j(i);if(k.valueOf()==e.valueOf())return d._ensureVisible(h)}}},_ensureVisible:function(b){if("hidden"===this.vScrollBar[0].style.visibility&&"hidden"===this.hScrollBar[0].style.visibility)return!1;var c=this.vScrollBar.jqxScrollBar("value"),d=this.hScrollBar.jqxScrollBar("value");this.rtl&&(d=this.hScrollBar.jqxScrollBar("max")-d);var e=this._hostHeight,f=this._hostWidth,g=0;g+=this.columnGroups?this.showHeader?this.columnsheader.height():0:this.showHeader?this.columnsHeight:0,this.showToolbar&&(g+=this.toolbarHeight),e-=g,this.showLegend&&this._resources.length>0&&(e-=this.legendHeight),"hidden"!=this.hScrollBar.css("visibility")&&(e-=20);var h=0,i=0,j=this._views[this._view].type,k=this._views[this._view],l=0;if("dayView"==j||"weekView"==j){var m=this.showAllDayRow;!k.timeRuler||"dayView"!==j&&"weekView"!==j||void 0!=k.timeRuler.showAllDayRow&&(m=k.timeRuler.showAllDayRow),m&&(l=1==this.tableRows?this.table[0].rows[0].clientHeight:this.table[0].rows[1].clientHeight)}var n=c-h,o=e+n-l,p=d-i,q=f+p,r=b;r=a(r);var s=r.position().top-l,t=s+r.outerHeight(),u=r.position().left;u=Math.round(u);var v=u+r.outerWidth();if(0===Math.round(r.position().left)&&this.hScrollBar.jqxScrollBar("setPosition",0),u<=p){var w=u-r.outerWidth()+i;w<0&&(w=0),this.rtl?this.hScrollBar.jqxScrollBar("setPosition",this.hScrollBar.jqxScrollBar("max")-w):this.hScrollBar.jqxScrollBar("setPosition",w)}v>=q&&(this.rtl?this.hScrollBar.jqxScrollBar("setPosition",this.hScrollBar.jqxScrollBar("max")-(2+i+v-f)):this.hScrollBar.jqxScrollBar("setPosition",2+i+v-f));var x=r.parent().index();if(this.tableRows>0&&x--,0===Math.round(r.position().top)||0===x)return this.vScrollBar.jqxScrollBar("setPosition",0);var y=this.table[0].rows.length-1,z=this.table[0].rows[y];if(z[0]===r.parent()[0])return this.vScrollBar.jqxScrollBar("setPosition",this.vScrollBar.jqxScrollBar("max"));if(s<=n){var A=s;return A<0&&(A=0),this.vScrollBar.jqxScrollBar("setPosition",A)}return t>=o?this.vScrollBar.jqxScrollBar("setPosition",4+t-e+l):void 0},getColumn:function(b){var c=null;return this.columns.records&&a.each(this.columns.records,function(){if(this.datafield==b||this.displayfield==b)return c=this,!1}),c},_setcolumnproperty:function(a,b,c){if(null==a||null==b||null==c)return null;b=b.toLowerCase();var d=this.getColumn(a);if(null!=d){d[b];d[b]=c;var e=this.getColumn(a);switch(null!=e&&(e[b]=c),b){case"text":case"hidden":case"hideable":case"renderer":case"align":case"cellsalign":case"contenttype":case"cellclass":case"cellclassname":case"class":case"width":case"minwidth":case"maxwidth":"align"==b?(this._rendercolumnheaders(),this.refresh()):"text"==b||"class"==b||"hidden"==b||"pinned"==b||"resizable"==b||"renderer"==b?(this._rendercolumnheaders(),this.refresh()):"width"==b||"maxwidth"==b||"minwidth"==b?(d._width=null,d._percentagewidth=null,this._updatecolumnwidths(),this.refresh()):this.refresh()}}},getColumnProperty:function(a,b){if(null==a||null==b)return null;b=b.toLowerCase();var c=this.getColumn(a);return c[b]},setColumnProperty:function(a,b,c){this._setcolumnproperty(a,b,c)},hideColumn:function(a){this._setcolumnproperty(a,"hidden",!0)},showColumn:function(a){this._setcolumnproperty(a,"hidden",!1)},updateBoundData:function(a,b){this.databind(this.source,a,b)},refresh:function(b){if(1!=b){var c=this;if(a.jqx.isHidden(c.host))return;c.table[0].style.top="0px",c.vScrollInstance.setPosition(0),c._renderrows(),c._arrange(),c._renderhorizontalscroll(),c._updateTouchScrolling(),c._refreshToolBar(),c._updateFocusedCell()}},_updateFocusedCell:function(){var a=this;if(a.focusedCell)return void a._updateCellsSelection();var b=a._views[a._view].type,c=a._views[a._view],d=a.showAllDayRow;if(!c.timeRuler||"dayView"!==b&&"weekView"!==b||void 0!=c.timeRuler.showAllDayRow&&(d=c.timeRuler.showAllDayRow),!d||"dayView"!=b&&"weekView"!=b?(a.focusedCell=a.rows[0].cells[0],a.rtl&&(a.focusedCell=a.rows[0].cells[a.rows[0].cells.length-1])):(a.focusedCell=a.rows[1].cells[0],a.rtl&&(a.focusedCell=a.rows[1].cells[a.rows[1].cells.length-1])),a.focusedCell.className.indexOf("jqx-scheduler-disabled-cell")>=0){a.focusedCell=null;for(var e=0;e<this.rows.length;e++){for(var f=0;f<this.rows[e].cells.length;f++){var g=this.rows[e].cells[f];if(g.className.indexOf("jqx-scheduler-disabled-cell")==-1){a.focusedCell=g;break}}if(a.focusedCell)break}}a._lastSelectedCell=a.focusedCell,a._updateCellsSelection()},_updateTouchScrolling:function(){var b=this.that;if(b.isTouchDevice()){var c=a.jqx.mobile.getTouchEventName("touchstart"),d=a.jqx.mobile.getTouchEventName("touchend"),e=a.jqx.mobile.getTouchEventName("touchmove");b.schedulercontent&&(b.removeHandler(b.table,c+".touchScroll"),b.removeHandler(b.table,e+".touchScroll"),b.removeHandler(b.table,d+".touchScroll"),b.removeHandler(b.table,"touchcancel.touchScroll"),a.jqx.mobile.touchScroll(b._table[0],Math.max(b.vScrollInstance.max,b.hScrollInstance.max),function(a,c){if(!b.dragOrResize){if(null!=c&&"hidden"!=b.vScrollBar.css("visibility")){b.vScrollInstance.value;b.vScrollInstance.setPosition(c)}if(null!=a&&"hidden"!=b.hScrollBar.css("visibility")){b.hScrollInstance.value;b.hScrollInstance.setPosition(a)}b.scrolled=new Date}},this.element.id,this.hScrollBar,this.vScrollBar))}},scrollWidth:function(){return this.hScrollInstance.max},scrollHeight:function(){return this.vScrollInstance.max},scrollLeft:function(a){"hidden"!=this.hScrollBar[0].style.visibility&&this.hScrollInstance.setPosition(a)},scrollTop:function(a){"hidden"!=this.vScrollBar[0].style.visibility&&this.vScrollInstance.setPosition(a)},render:function(b){var c="<div style='overflow: hidden; -webkit-appearance: none; outline: none; width:100%; height: 100%; align:left; border: 0px; padding: 0px; margin: 0px; left: 0px; top: 0px; valign:top; position: relative;'><div id='wrapper"+this.element.id+"' style='overflow: hidden; -webkit-appearance: none; border: none; background: transparent; outline: none; width:100%; height: 100%; padding: 0px; margin: 0px; align:left; left: 0px; top: 0px; valign:top; position: relative;'><div id='toolbar' style='visibility: hidden; align:left; valign:top; left: 0px; top: 0px; position: absolute;'></div><div id='legendbartop' style='align:left; valign:top; left: 0px; top: 0px; position: absolute;'></div><div id='filter' style='visibility: hidden; align:left; valign:top; left: 0px; top: 0px; position: absolute;'></div><div id='content"+this.element.id+"' style='overflow: hidden; -webkit-appearance: none; border: none; background: transparent; outline: none; border: none; padding: 0px; margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; align:left; valign:top; left: 0px; top: 0px; position: absolute;'></div><div id='verticalScrollBar"+this.element.id+"' style='align:left; valign:top; left: 0px; top: 0px; position: absolute;'></div><div id='horizontalScrollBar"+this.element.id+"' style='align:left; valign:top; left: 0px; top: 0px; position: absolute;'></div><div id='bottomRight' style='align:left; valign:top; left: 0px; top: 0px; border: none; position: absolute;'></div><div id='aggregates' style='align:left; valign:top; left: 0px; top: 0px; position: absolute;'></div><div id='legendbarbottom' style='align:left; valign:top; left: 0px; top: 0px; position: absolute;'></div><div id='pager' style='z-index: 20; align:left; valign:top; left: 0px; top: 0px; position: absolute;'></div></div></div>";this.element.innerHTML=c,this.wrapper=this.host.find("#wrapper"+this.element.id),this.content=this.host.find("#content"+this.element.id),this.content.addClass(this.toTP("jqx-reset"));var d=this.host.find("#verticalScrollBar"+this.element.id),e=this.host.find("#horizontalScrollBar"+this.element.id);this.bottomRight=this.host.find("#bottomRight").addClass(this.toTP("jqx-grid-bottomright")).addClass(this.toTP("jqx-scrollbar-state-normal")),this.vScrollBar&&this.vScrollBar.jqxScrollBar("destroy"),this.hScrollBar&&this.hScrollBar.jqxScrollBar("destroy"),this.vScrollBar=d.jqxScrollBar({vertical:!0,rtl:this.rtl,touchMode:this.touchMode,theme:this.theme,_triggervaluechanged:!1}),this.hScrollBar=e.jqxScrollBar({vertical:!1,rtl:this.rtl,touchMode:this.touchMode,theme:this.theme,_triggervaluechanged:!1}),this.vScrollBar.css("visibility","hidden"),this.hScrollBar.css("visibility","hidden"),this.vScrollInstance=a.data(this.vScrollBar[0],"jqxScrollBar").instance,this.hScrollInstance=a.data(this.hScrollBar[0],"jqxScrollBar").instance,this.pager=this.host.find("#pager"),this.pager[0].id="pager"+this.element.id,this.toolbar=this.host.find("#toolbar"),this.toolbar[0].id="toolbar"+this.element.id,this.toolbar.addClass(this.toTP("jqx-scheduler-toolbar")),this.toolbar.addClass(this.toTP("jqx-widget-header")),this.legendbarbottom=this.host.find("#legendbarbottom"),this.legendbarbottom[0].id="legendbarbottom"+this.element.id,this.legendbarbottom.addClass(this.toTP("jqx-scheduler-legend-bar-bottom")),this.legendbarbottom.addClass(this.toTP("jqx-scheduler-legend-bar")),this.legendbarbottom.addClass(this.toTP("jqx-widget-header")),this.pager.addClass(this.toTP("jqx-grid-pager")),this.pager.addClass(this.toTP("jqx-widget-header")),this.legendbartop=this.host.find("#legendbartop"),this.legendbartop.addClass(this.toTP("jqx-scheduler-legend-bar-top")),this.legendbartop.addClass(this.toTP("jqx-scheduler-legend-bar")),this.legendbartop.addClass(this.toTP("jqx-widget-header")),this.schedulertable=null,this.localizestrings&&(this.localizestrings(),null!=this.localization&&this.localizestrings(this.localization,!1)),this._builddataloadelement(),this._cachedcolumns=this.columns;var f=this.source.datafields;if(null==f&&this.source._source&&(f=this.source._source.datafields),f)for(var g=0;g<this.columns.length;g++){var h=this.columns[g];if(h&&h.cellsFormat&&h.cellsFormat.length>2)for(var i=0;i<f.length;i++)if(f[i].name==h.datafield&&!f[i].format){f[i].format=h.cellsFormat;break}}this.databind(this.source),this.showToolbar&&this.toolbar.css("visibility","inherit"),this.showLegend&&this.legendbarbottom.css("visibility","inherit"),this.tableheight=null;var j=this,k=function(){j.content&&(j.content[0].scrollTop=0,j.content[0].scrollLeft=0),j.schedulercontent&&(j.schedulercontent[0].scrollLeft=0,j.schedulercontent[0].scrollTop=0)};this.removeHandler(this.content,"scroll"),this.removeHandler(this.content,"mousedown"),this.addHandler(this.content,"scroll",function(a){return k(),!1}),b!==!0&&this._render()},_render:function(){var b=this;if(null!=b.dataview&&!b._loading){(25!=b.columnsHeight||b.columnGroups)&&b._measureElement("column"),b.rowinfo=new Array,b._removeHandlers(),null==b.columns?b.columns=new a.jqx.schedulerDataCollection(b.element):b._initializeColumns(),b.host.height(b.height),b.host.width(b.width),a.jqx.utilities.html(b.content,""),b.columnsheader=b.columnsheader||a('<div style="overflow: hidden;"></div>'),b.columnsheader.remove(),b.columnsheader.addClass(b.toTP("jqx-widget-header")),b.columnsheader.addClass(b.toTP("jqx-grid-header")),b.showHeader?b.columnsheader&&b.columnsheader.css("display","block"):b.columnsheader.css("display","none"),b.schedulercontent=b.schedulercontent||a('<div style="width: 100%; overflow: hidden; position: absolute;"></div>'),b.schedulercontent.remove();var c=b.columnsHeight;c=b._preparecolumnGroups(),b.columnsheader.height(c),b.content.append(b.columnsheader),b.content.append(b.schedulercontent),b._rendercolumnheaders(),b.tableheight=null,b.schedulercontent.find("#contenttable"+b.element.id).remove(),null!=b.table&&(b.table.remove(),b.table=null),null!=b.pinnedtable&&(b.pinnedtable.remove(),b.pinnedtable=null),b.table=a('<div id="contenttable'+b.element.id+'" style="overflow: hidden; position: relative;"></div>'),b.pinnedtable=a('<div id="contenttable2'+b.element.id+'" style="display: none; overflow: hidden; position: relative;"></div>'),b.schedulercontent.addClass(b.toTP("jqx-grid-content")),b.schedulercontent.addClass(b.toTP("jqx-widget-content")),b.schedulercontent.append(b.table),1==b.tableRows&&b.schedulercontent.append(b.pinnedtable),b._renderrows(),b._arrange(),b._resourcesElements=new Array;var d=function(c,d){c.children().remove();var c=a("<div style='margin:5px; position: relative;'></div>").appendTo(c);b._resourcesElements[d]=new Array,a.each(b._resources,function(e){var f=b.getColors(e),g=this.toString(),h=a("<div data-toggle='on' style='border-color: "+f.border+"; background: "+f.background+";' class='"+b.toThemeProperty("jqx-scheduler-legend")+"'></div>");h.appendTo(c);var i=a("<div class='"+b.toThemeProperty("jqx-scheduler-legend-label")+"'>"+g+"</div>");i.appendTo(c),b._resourcesElements[d][g]=h;var j=function(){"on"==h.attr("data-toggle")?b.hideAppointmentsByResource(g):b.showAppointmentsByResource(g)};b.addHandler(h,"mousedown",function(){return j(),!1}),b.addHandler(i,"mousedown",function(){
-return j(),!1})})};d(b.legendbarbottom,"bottom"),d(b.legendbartop,"top"),"top"==b.legendPosition?b.legendbarbottom.hide():b.legendbartop.hide(),0==b._resources.length&&(b.legendbarbottom.hide(),b.legendbartop.hide()),b.renderToolBar?b.renderToolBar(b.toolbar):b._renderToolBar(),b.disabled&&b.host.addClass(b.toThemeProperty("jqx-fill-state-disabled")),b._renderhorizontalscroll(),b._addHandlers(),b.clearSelection();var e=b._views[b._view].type,f=b._views[b._view],g=b.showAllDayRow;!f.timeRuler||"dayView"!==e&&"weekView"!==e||void 0!=f.timeRuler.showAllDayRow&&(g=f.timeRuler.showAllDayRow),!g||"dayView"!=e&&"weekView"!=e?b.focusedCell=b.rows[0].cells[0]:b.focusedCell=b.rows[1].cells[0],b._lastSelectedCell=b.focusedCell,b._updateCellsSelection()}},clear:function(){this.source&&(this.source.records=new Array,this.source.hierarchy=new Array),this.dataview._filteredData=new Array,this.databind(null),this._render()},getAppointmentElement:function(a){var b=null;a.className.indexOf("jqx-scheduler-appointment")>=0&&a.className.indexOf("jqx-scheduler-appointment-inner-content")==-1&&a.className.indexOf("jqx-scheduler-appointment-content")==-1&&a.className.indexOf("jqx-scheduler-appointment-resize-indicator")==-1&&(b=a);for(var c=a,d=0;d<4&&c.parentNode;d++)c.className.indexOf("jqx-scheduler-appointment")>=0&&c.className.indexOf("jqx-scheduler-appointment-innter-content")==-1&&c.className.indexOf("jqx-scheduler-appointment-content")==-1&&c.className.indexOf("jqx-scheduler-appointment-resize-indicator")==-1&&(b=c),c=c.parentNode;return b},getJQXAppointmentByElement:function(a){var b=this,c=a.getAttribute?a.getAttribute("data-key"):a.attr("data-key");if(c.indexOf(".")>=0)var d=c.substring(0,c.indexOf(".")),e=(c.substring(c.indexOf(".")+1),b.appointmentsByKey[d]),f=e.jqxAppointment.renderedAppointments[c];else var e=b.appointmentsByKey[c],f=e.jqxAppointment;return f},_renderToolBar:function(){var b=this,c=a('<div style="width: 100%; height: 100%; position: relative;"></div>'),d=(this.toolbarHeight-20)/2;c.css("top",d),b.toolbarLeftButton=a('<div type="button" style="outline: none; padding: 0px; margin-top: 3px; margin-left: 3px; margin-right: 3px; width: 27px; float: left;"></div>'),b.toolbarRightButton=a('<div type="button" style="outline: none; padding: 0px; margin-top: 3px; margin-right: 3px; width: 27px; float: left;"></div>'),b.toolbarLeftButton.attr("title",b.schedulerLocalization.toolBarPreviousButtonString),b.toolbarRightButton.attr("title",b.schedulerLocalization.toolBarNextButtonString),b.toolbarRightButton.jqxButton({enableHover:!1,enableDefault:!1,enablePressed:!1,cursor:"pointer",disabled:b.disabled,theme:b.theme}),b.toolbarLeftButton.jqxButton({enableHover:!1,enableDefault:!1,enablePressed:!1,cursor:"pointer",disabled:b.disabled,theme:b.theme}),b.dateTimeInput=a('<div style="outline: none; padding: 0px; margin-top: 0px; margin-right: 3px; width: 27px; float: left;"></div>'),b.toolbarLeftButton.find(".jqx-icon-arrow-left").remove(),b.toolbarRightButton.find(".jqx-icon-arrow-right").remove();var e=a("<div style='outline: none; margin-left: 6px; width: 15px; height: 15px;'></div>");e.addClass(b.toThemeProperty("jqx-icon-arrow-left")),b.toolbarLeftButton.wrapInner(e);var f=a("<div style='outline: none; margin-left: 6px; width: 15px; height: 15px;'></div>");f.addClass(b.toThemeProperty("jqx-icon-arrow-right")),b.toolbarRightButton.wrapInner(f),b.rtl&&(b.toolbarLeftButton.css("float","right"),b.toolbarRightButton.css("float","right"),b.dateTimeInput.css("float","right")),b.addHandler(b.toolbarRightButton,"mouseenter",function(){f.addClass(b.toThemeProperty("jqx-icon-arrow-right-hover"))}),b.addHandler(b.toolbarLeftButton,"mouseenter",function(){e.addClass(b.toThemeProperty("jqx-icon-arrow-left-hover"))}),b.addHandler(b.toolbarRightButton,"mouseleave",function(){f.removeClass(b.toThemeProperty("jqx-icon-arrow-right-hover"))}),b.addHandler(b.toolbarLeftButton,"mouseleave",function(){e.removeClass(b.toThemeProperty("jqx-icon-arrow-left-hover"))}),b.addHandler(b.toolbarRightButton,"mousedown",function(){f.addClass(b.toThemeProperty("jqx-icon-arrow-right-selected"))}),b.addHandler(b.toolbarRightButton,"mouseup",function(){f.removeClass(b.toThemeProperty("jqx-icon-arrow-right-selected"))}),b.addHandler(b.toolbarLeftButton,"mousedown",function(){e.addClass(b.toThemeProperty("jqx-icon-arrow-left-selected"))}),b.addHandler(b.toolbarLeftButton,"mouseup",function(){e.removeClass(b.toThemeProperty("jqx-icon-arrow-left-selected"))}),b.addHandler(a(document),"mouseup.pagerbuttons"+b.element.id,function(){f.removeClass(b.toThemeProperty("jqx-icon-arrow-right-selected")),e.removeClass(b.toThemeProperty("jqx-icon-arrow-left-selected"))}),b.addHandler(b.toolbarRightButton,"click",function(){b.toolbarRightButton.jqxButton("disabled")||(b.rtl?b.navigateBackward():b.navigateForward(),b.focus())}),b.addHandler(b.toolbarLeftButton,"click",function(){b.toolbarLeftButton.jqxButton("disabled")||(b.rtl?b.navigateForward():b.navigateBackward(),b.focus())}),b.toolbar.children().remove(),b.toolbar.append(c),b.rtl?(c.append(b.toolbarRightButton),c.append(b.dateTimeInput),c.append(b.toolbarLeftButton)):(c.append(b.toolbarLeftButton),c.append(b.dateTimeInput),c.append(b.toolbarRightButton)),b.toolbarDetails=a('<div class="'+b.toTP("jqx-scheduler-toolbar-details")+'" style="margin-left: 7px; margin-top:2px; float: left;"></div>'),b.toolbarViews=a('<div style="margin-right: 10px; margin-top:0px; float: right;"></div>'),b.rtl&&(b.toolbarDetails.css("float","right"),b.toolbarDetails.css("margin-left","0px"),b.toolbarDetails.css("margin-right","7px"),b.toolbarViews.css("margin-left","10px"),b.toolbarViews.css("margin-right","0px"),b.toolbarViews.css("float","left"));var g=new Array;b.rtl?(g.push(b.toolbarRightButton),g.push(b.dateTimeInput),g.push(b.toolbarLeftButton)):(g.push(b.toolbarLeftButton),g.push(b.dateTimeInput),g.push(b.toolbarRightButton));var h=b._views.length-1;a.each(b._views,function(c){var d="",e=c;if(b.rtl&&(e=h-c),void 0!=b._views[e].text)d=b._views[e].text;else switch(b._views[e].type){case"dayView":d=b.schedulerLocalization.dayViewString;break;case"weekView":d=b.schedulerLocalization.weekViewString;break;case"monthView":d=b.schedulerLocalization.monthViewString;break;case"agendaView":d=b.schedulerLocalization.agendaViewString;break;case"timelineDayView":d=b.schedulerLocalization.timelineDayViewString;break;case"timelineWeekView":d=b.schedulerLocalization.timelineWeekViewString;break;case"timelineMonthView":d=b.schedulerLocalization.timelineMonthViewString}var f='<span data-type="'+b._views[e].type+'" style="cursor: pointer; outline: none; margin-left: -1px; position: relative;">'+d+"</span>",i=a(f);i.addClass(b.toTP("jqx-group-button-normal jqx-button jqx-fill-state-normal")),g.push(i),0==e&&(b.rtl?i.addClass(b.toTP("jqx-rc-r")):i.addClass(b.toTP("jqx-rc-l"))),e==b._views.length-1&&(b.rtl?i.addClass(b.toTP("jqx-rc-l")):i.addClass(b.toTP("jqx-rc-r"))),e===b._view&&i.addClass(b.toTP("jqx-fill-state-pressed")),i.mouseenter(function(){i.addClass(b.toTP("jqx-fill-state-hover"))}),i.mouseleave(function(){i.removeClass(b.toTP("jqx-fill-state-hover"))}),i.mousedown(function(){b._setView(e),b.focus()}),a(b.toolbarViews).append(i)}),c.append(b.toolbarDetails),c.append(b.toolbarViews),b._views.length<2&&b.toolbarViews.hide(),b.dateTimeInput.jqxDateTimeInput({dropDownWidth:220,dropDownHeight:220,rtl:b.rtl,localization:b._getDateTimeInputLocalization(),firstDayOfWeek:b.schedulerLocalization.firstDay,todayString:b.schedulerLocalization.todayString,clearString:b.schedulerLocalization.clearString,showFooter:!0,height:19,width:18,renderMode:"simple"}),b.addHandler(b.dateTimeInput,"change",function(c){b.fromNavigate||(b.navigateTo(new a.jqx.date(c.args.date,b.timeZone)),b.focus())}),b.tabKeyElements=g;var i=b._views[b._view].type,j=function(c){var d=a.jqx.formatDate(b.getViewStart().toDate(),c,b.schedulerLocalization),e=a.jqx.formatDate(b.getViewEnd().toDate(),c,b.schedulerLocalization);"dayView"===i||"timelineDayView"===i?b.toolbarDetails.html(d):b.toolbarDetails.html(d+" - "+e),b.rtl?(b.toolbarDetails.addClass("jqx-rtl"),b.toolbarDetails.html("<span style='direction:rtl;'>"+e+"<span> - <span style='direction:rtl;'>"+d+"</span>")):b.toolbarDetails[0].style.direction="ltr"};j(b.toolBarRangeFormat);var k=b.toolbarViews.width()+b.toolbarDetails.width()+120,l=b.toolBarRangeFormat;if(k>b.host.width()){l=b.toolBarRangeFormatAbbr,j(l);var k=b.toolbarViews.width()+b.toolbarDetails.width()+120;if(k>b.host.width()){b.toolbarDetails.hide();var k=b.toolbarViews.width()+120;k>b.host.width()&&b.toolbarViews.hide()}}else b.currentToolbarFormat=b.toolBarRangeFormat},_setView:function(b){var c=this;if(c.toolbarViews.find(".jqx-fill-state-pressed").removeClass(c.toTP("jqx-fill-state-pressed")),c.rtl?a(c.toolbarViews.children()[c._views.length-1-b]).addClass(c.toTP("jqx-fill-state-pressed")):a(c.toolbarViews.children()[b]).addClass(c.toTP("jqx-fill-state-pressed")),c._view!==b){var d=c.vScrollBar[0].style.visibility;d&&(c._scrollPosition||(c._scrollPosition=new Array),c._scrollPosition[c._view]=c.vScrollInstance.value);var e=c.hScrollBar[0].style.visibility;e&&(c._hscrollPosition||(c._hscrollPosition=new Array),c._hscrollPosition[c._view]=c.hScrollInstance.value);var f=c._views[c._view].type,g=c._views[b].type;c._view=b,c._refreshColumns(),c.refresh();var h=c.hScrollBar[0].style.visibility;e!==h&&c._renderrows(),c._scrollPosition[c._view]&&c.vScrollInstance.setPosition(c._scrollPosition[c._view]),c._hscrollPosition[c._view]&&c.hScrollInstance.setPosition(c._hscrollPosition[c._view]),c.selectedJQXAppointment&&c._ensureAppointmentVisible(c.selectedJQXAppointment);var i=c.getViewStart(),j=a.jqx.scheduler.utilities.getEndOfDay(c.getViewEnd());c._raiseEvent("viewChange",{date:c.date,from:i,to:j,oldViewType:f,newViewType:g})}},_getDateTimeInputLocalization:function(){var a=this,b={};return b.backString=a.schedulerLocalization.backString,b.forwardString=a.schedulerLocalization.forwardString,b.todayString=a.schedulerLocalization.todayString,b.clearString=a.schedulerLocalization.clearString,b.calendar=a.schedulerLocalization,b},setView:function(a){switch(a){case"dayView":this._setView(0);break;case"weekView":this._setView(1);break;case"monthView":this._setView(2);break;case"timelineDayView":this._setView(3);break;case"timelineWeekView":this._setView(4);break;case"timelineMonthView":this._setView(5)}this.view=a},navigateForward:function(){var b=this,c=this._views[this._view].type,d=this._views[this._view],e=new a.jqx.date(this.date,b.timeZone),f=function(){for(;(0==e.dayOfWeek()||6==e.dayOfWeek())&&!1===d.showWeekends;)e=e.addDays(1);return e};switch(c){case"dayView":case"timelineDayView":e=e.addDays(1),e=f();break;case"weekView":case"timelineWeekView":e=e.addDays(7);break;case"monthView":case"timelineMonthView":var g=(e.day(),e.month()),h=e.year(),i=new a.jqx.date(h,g,1);i.timeZone=b.timeZone,e=i.addMonths(1);break;case"agendaView":e=d.days?e.addDays(d.days):e.addDays(7)}return this.navigateTo(e)},navigateBackward:function(){var b=this,c=this._views[this._view].type,d=this._views[this._view],e=new a.jqx.date(this.date,b.timeZone),f=function(){for(;(0==e.dayOfWeek()||6==e.dayOfWeek())&&!1===d.showWeekends;)e=e.addDays(-1);return e};switch(c){case"dayView":case"timelineDayView":e=e.addDays(-1),e=f();break;case"weekView":case"timelineWeekView":e=e.addDays(-7);break;case"monthView":case"timelineMonthView":var g=(e.day(),e.month()),h=e.year(),i=new a.jqx.date(h,g,1);i.timeZone=b.timeZone,e=i.addMonths(-1);break;case"agendaView":e=d.days?e.addDays(-d.days):e.addDays(-7)}return this.navigateTo(e)},_refreshToolBar:function(b){var c=this,d=c.getViewStart(),e=c.getViewEnd(),f=function(b){var f=a.jqx.formatDate(d.toDate(),b,c.schedulerLocalization),g=a.jqx.formatDate(e.toDate(),b,c.schedulerLocalization),h=c._views[c._view].type,i=c._views[c._view];if(i.showWeekends===!1){0!=d.dayOfWeek()&&6!=d.dayOfWeek()||(d=d.addDays(1)),0!=d.dayOfWeek()&&6!=d.dayOfWeek()||(d=d.addDays(1)),0!=e.dayOfWeek()&&6!=e.dayOfWeek()||(e=e.addDays(-1)),0!=e.dayOfWeek()&&6!=e.dayOfWeek()||(e=e.addDays(-1));var f=a.jqx.formatDate(d.toDate(),b,c.schedulerLocalization),g=a.jqx.formatDate(e.toDate(),b,c.schedulerLocalization)}"dayView"===h||"timelineDayView"===h?c.toolbarDetails.html(f):c.toolbarDetails.html(f+" - "+g),c.rtl?(c.toolbarDetails.addClass("jqx-rtl"),c.toolbarDetails.html("<span style='direction:rtl;'>"+g+"<span> - <span style='direction:rtl;'>"+f+"</span>")):c.toolbarDetails[0].style.direction="ltr"};if(b)return void f(c._lastFormatString||c.toolBarRangeFormat);f(c.toolBarRangeFormat),c.toolbarDetails.show(),c.toolbarViews.show();var g=c.toolbarViews.width()+c.toolbarDetails.width()+120;if(g>c.host.width()){f(c.toolBarRangeFormatAbbr);var g=c.toolbarViews.width()+c.toolbarDetails.width()+120;if(g>c.host.width()){c.toolbarDetails.hide();var g=c.toolbarViews.width()+120;g>c.host.width()&&c.toolbarViews.hide()}}},navigateTo:function(b){var c=this;if("date"==a.type(b)&&(b=new a.jqx.date(b)),!(b<this.min||b>this.max)){b.timeZone=c.timeZone,c.date=b,c._refreshToolBar(!0),c.fromNavigate=!0,c.dateTimeInput.val(b.toDate()),c.fromNavigate=!1,c._refreshColumnTitles(),c._renderrows(),c._updateFocusedCell();var d=c.getViewStart(),e=a.jqx.scheduler.utilities.getEndOfDay(c.getViewEnd());c._raiseEvent("dateChange",{date:b,from:d,to:e})}},_preparecolumnGroups:function(){var a=this.columnsHeight;if(this.columnGroups){if(this.columnshierarchy=new Array,this.columnGroups.length){for(var b=this,c=0;c<this.columnGroups.length;c++)this.columnGroups[c].parent=null,this.columnGroups[c].groups=null;for(var c=0;c<this.columns.records.length;c++)this.columns.records[c].parent=null,this.columns.records[c].groups=null;for(var d=function(a){for(var c=0;c<b.columnGroups.length;c++){var d=b.columnGroups[c];if(d.name===a)return d}return null},c=0;c<this.columnGroups.length;c++){var e=this.columnGroups[c];if(e.groups||(e.groups=null),e.parentGroup&&(e.parentgroup=e.parentGroup),e.parentgroup){var f=d(e.parentgroup);f&&(e.parent=f,f.groups||(f.groups=new Array),f.groups.indexOf(e)===-1&&f.groups.push(e))}}for(var c=0;c<this.columns.records.length;c++){var e=this.columns.records[c];if(e.columngroup){var f=d(e.columngroup);f&&(f.groups||(f.groups=new Array),e.parent=f,f.groups.indexOf(e)===-1&&f.groups.push(e))}}for(var g=0,c=0;c<this.columns.records.length;c++){var e=this.columns.records[c],h=e;for(e.level=0;h.parent;)h=h.parent,e.level++;var h=e,i=e.level;for(g=Math.max(g,e.level);h.parent;)h=h.parent,h&&(h.level=--i)}for(var j=function(a){var b=new Array;if(a.columngroup&&b.push(a),!a.groups)return new Array;for(var c=0;c<a.groups.length;c++)if(a.groups[c].columngroup)b.push(a.groups[c]);else if(a.groups[c].groups)for(var d=j(a.groups[c]),e=0;e<d.length;e++)b.push(d[e]);return b},c=0;c<this.columnGroups.length;c++){var e=this.columnGroups[c],k=j(e);e.columns=k;for(var l=new Array,m=0,n=0;n<k.length;n++)l.push(this.columns.records.indexOf(k[n])),k[n].pinned&&m++;if(0!=m)throw new Error("jqxScheduler: Column Groups initialization Error. Please, check the initialization of the jqxScheduler's columns array. The columns in a column group cannot be pinned.");l.sort(function(a,b){return a=parseInt(a),b=parseInt(b),a<b?-1:a>b?1:0});for(var o=1;o<l.length;o++)if(l[o]!=l[o-1]+1)throw new Error("jqxScheduler: Column Groups initialization Error. Please, check the initialization of the jqxScheduler's columns array. The columns in a column group are expected to be siblings in the columns array.")}}this.columnGroupslevel=1+g,a=this.columnGroupslevel*this.columnsHeight}return a},wheel:function(a,b){if(b.editRecurrenceDialog&&b.editRecurrenceDialog.jqxWindow("isOpen"))return!0;if(b._editDialog&&b._editDialog.jqxWindow("isOpen"))return!0;if(b.autoheight&&"hidden"==b.hScrollBar.css("visibility"))return a.returnValue=!0,!0;var c=0;if(a||(a=window.event),a.originalEvent&&a.originalEvent.wheelDelta&&(a.wheelDelta=a.originalEvent.wheelDelta),a.wheelDelta?c=a.wheelDelta/120:a.detail&&(c=-a.detail/3),c){var d=b._handleDelta(c);return d&&(a.preventDefault&&a.preventDefault(),null!=a.originalEvent&&(a.originalEvent.mouseHandled=!0),void 0!=a.stopPropagation&&a.stopPropagation()),!!d&&(d=!1,a.returnValue=d,d)}a.preventDefault&&a.preventDefault(),a.returnValue=!1},_handleDelta:function(a){if("hidden"!=this.vScrollBar.css("visibility")){var b=this.vScrollInstance.value;a<0?this.vScrollInstance.setPosition(this.vScrollInstance.value+20):this.vScrollInstance.setPosition(this.vScrollInstance.value-20);var c=this.vScrollInstance.value;if(b!=c)return!0}else if("hidden"!=this.hScrollBar.css("visibility")){var b=this.hScrollInstance.value;a>0?this.hScrollInstance.value>20?this.hScrollInstance.setPosition(this.hScrollInstance.value-20):this.hScrollInstance.setPosition(0):this.hScrollInstance.value<this.hScrollInstance.max?this.hScrollInstance.setPosition(this.hScrollInstance.value+20):this.hScrollInstance.setPosition(this.hScrollInstance.max);var c=this.hScrollInstance.value;if(b!=c)return!0}return!1},_removeHandlers:function(){var b=this;b._mousewheelfunc&&b.removeHandler(this.host,"mousewheel",b._mousewheelfunc),b.removeHandler(a(document),"keydown.scheduler"+b.element.id),b.removeHandler(b.host,"focus"),b.removeHandler(b.host,"blur"),b.removeHandler(b.host,"dragstart."+b.element.id),b.removeHandler(b.host,"selectstart."+b.element.id),b.removeHandler(a(window),"jqxReady."+b.element.id),b.removeHandler(b.host,"mousewheel",b._mousewheelfunc);var c="mousedown";b.isTouchDevice()&&(c=a.jqx.mobile.getTouchEventName("touchstart"),a.jqx.browser.msie&&a.jqx.browser.version<10&&(c="mousedown")),b.table&&b.removeHandler(b.table,"mouseleave");var d="mousemove.scheduler"+b.element.id,e="mouseup.scheduler"+b.element.id;if(b.isTouchDevice()&&b.touchMode!==!0&&(d=a.jqx.mobile.getTouchEventName("touchmove")+".scheduler"+b.element.id,e=a.jqx.mobile.getTouchEventName("touchend")+".scheduler"+b.element.id),b.removeHandler(a(document),d),b.removeHandler(a(document),e),!b.isTouchDevice())try{if((""!=document.referrer||window.frameElement)&&null!=window.top&&window.top!=window.self){var f=null;window.parent&&document.referrer&&(f=document.referrer),f&&f.indexOf(document.location.host)!=-1&&b.removeHandler(a(window.top.document),"mouseup.jqxscheduler"+b.element.id)}}catch(a){}b.removeHandler(b.host,d),b.removeHandler(a(document),"keydown.jqxscheduler"+b.element.id),b.removeHandler(b.host,"keydown"),b.table&&(b.removeHandler(b.table,"dblclick"),b.removeHandler(b.pinnedtable,c),b.removeHandler(b.table,c))},selectAppointment:function(a){this.appointmentsByKey[a]&&this._selectAppointment(this.appointmentsByKey[a].jqxAppointment)},_selectAppointment:function(b,c,d){if(b){var e=this;e.selectedAppointment&&e.clearAppointmentsSelection();var f=b.id,g=a('[data-key="'+f+'"]');if(g.length>0){e.selectedJQXAppointment=b,c?e.selectedAppointment=a(c):e.selectedAppointment=a(g[0]);var h=e._views[e._view].type;e._views[e._view];if("agendaView"==h)return void e.clearSelection();switch(g.addClass(e.toTP("jqx-scheduler-selected-appointment")),b.resizable&&g.find(".jqx-scheduler-appointment-resize-indicator").show(),h){case"dayView":a(g).find(".jqx-scheduler-appointment-left-resize-indicator").hide(),a(g).find(".jqx-scheduler-appointment-right-resize-indicator").hide();break;case"weekView":break;case"monthView":case"timeLineMonthView":case"timeLineDayView":case"timeLineWeekView":g.length>1&&a.each(g,function(b){e.rtl?(b>0&&a(this).find(".jqx-scheduler-appointment-right-resize-indicator").hide(),b<g.length-1&&a(this).find(".jqx-scheduler-appointment-left-resize-indicator").hide()):(b>0&&a(this).find(".jqx-scheduler-appointment-left-resize-indicator").hide(),b<g.length-1&&a(this).find(".jqx-scheduler-appointment-right-resize-indicator").hide())})}if("mouse"==d)return void e.clearSelection()}e.clearSelection()}},clearAppointmentsSelection:function(){var b=this;if(b.selectedAppointment){var c=b.selectedAppointment.attr("data-key"),d=a('[data-key="'+c+'"]');d.removeClass(b.toTP("jqx-scheduler-selected-appointment")),d.find(".jqx-scheduler-appointment-resize-indicator").hide(),b.selectedAppointment=null,b.selectedJQXAppointment=null}},selectCell:function(a,b,c){for(var d=this,e=a.toDate(),f=0;f<d.rows.length;f++)for(var g=0;g<d.rows[f].cells.length;g++){var h=d.rows[f].cells[g];if(!c||h.getAttribute("data-view")===c){var i=h.getAttribute("data-date"),j=d._getDateByString,k=j(i);if(b&&h.getAttribute("data-end-date")){if(k.valueOf()==a.valueOf())return h.setAttribute("data-selected","true"),d.focusedCell=h,d._lastSelectedCell=h,d._updateCellsSelection(),void d._ensureVisible(d.focusedCell)}else if(!b&&h.getAttribute("data-end-date"))continue;if(k.valueOf()==e.valueOf())return h.setAttribute("data-selected","true"),d.focusedCell=h,d._lastSelectedCell=h,d._updateCellsSelection(),void d._ensureVisible(d.focusedCell)}}d._updateCellsSelection()},selectRange:function(a,b,c,d){var e=this;a<this.min&&(a=this.min),b>this.max&&(b=this.max);for(var f=a.toDate(),g=b.toDate(),h=!1,i=0;i<e.rows.length;i++)for(var j=0;j<e.rows[i].cells.length;j++){var k=e.rows[i].cells[j];if(!d||k.getAttribute("data-view")===d){var l=k.getAttribute("data-date"),m=e._getDateByString,n=m(l);if(c&&k.getAttribute("data-end-date"))n.valueOf()>=f.valueOf()&&n.valueOf()<=g.valueOf()&&k.setAttribute("data-selected","true");else if(!c&&k.getAttribute("data-end-date"))continue;n.valueOf()>=f.valueOf()&&n.valueOf()<=g.valueOf()&&(k.setAttribute("data-selected","true"),h||(e._lastSelectedCell=k,e.focusedCell=k,h=!0))}}e._updateCellsSelection()},_selectRange:function(b,c){var d=this;if("agendaView"!=d._views[d._view].type){var e=b,f=c.getAttribute("data-view");if(b.getAttribute("data-view")===f){var g=c.getAttribute("data-date"),h=e.getAttribute("data-date");if(null!=g&&null!=h){var i=c.getAttribute("data-end-date"),j=e.getAttribute("data-end-date"),k=null!=i||null!=j,l=null!=i&&null!=j,m=d._getDateByString,n=m(g),o=m(h);n<this.min.toDate()&&(n=this.min.toDate()),o<this.min.toDate()&&(o=this.min.toDate()),n>this.max.toDate()&&(n=this.max.toDate()),o>this.max.toDate()&&(o=this.max.toDate());var p=Math.min(n,o),q=Math.max(n,o),r=d.rows,s=0,t=0;s>0&&d.rtl&&(s=0,t=1);var u=r.length;if(k&&(u=1,null==b.getAttribute("data-end-date"))){o.setHours(0,0,0,0);var v=new a.jqx.date(o,d.timeZone).toString();a(e).parent().index();a.each(r[0].cells,function(){var a=this.getAttribute("data-date");if(a===v){b=this,l=null!=c.getAttribute("data-end-date")&&null!=b.getAttribute("data-end-date");var d=c.getAttribute("data-date"),e=b.getAttribute("data-date"),f=m(d),g=m(e);return p=Math.min(f,g),q=Math.max(f,g),!1}})}for(var w=0;w<u;w++){var x=r[w];if(k&&this.tableRows>1){var y=parseInt(b.getAttribute("data-view")),z=r.length/d.tableRows,A=(-1+y)*z;B=r[A],x=r[A]}for(var B=x.cells,C=s;C<B.length-t;C++)if(B[C].getAttribute("data-view")===f&&(B[C].removeAttribute("data-selected"),l||!B[C].getAttribute("data-end-date"))){var D=B[C].getAttribute("data-date"),E=m(D).valueOf();p<=E&&E<=q&&B[C].setAttribute("data-selected","true")}}d._updateCellsSelection()}}}},findCell:function(a,b){var c=this,d=null;if(!c._tableOffset){var e=c.schedulercontent.coord();c._tableOffset=e}var f=c._tableOffset,g=f.top,h=f.left;if(b<g)return null;if(a<h)return null;if(b>g+c._hostHeight)return null;if(a>h+c._hostWidth)return null;for(var i=!1,j=c.rows,k=c._views[c._view],l=k.type,m=0,n=c.vScrollInstance.value,o=c.hScrollInstance.value,p=0;p<j.length&&!i;p++){var q=j[p],r=q.cells,s=!1;(0==p&&"dayView"==l||"weekView"==l)&&(s=c.showAllDayRow,!k.timeRuler||"dayView"!==l&&"weekView"!==l||void 0!=k.timeRuler.showAllDayRow&&(s=k.timeRuler.showAllDayRow),s&&(m=c._allDayRowFullHeight));for(var t=0;t<r.length;t++){var u=r[t];if(0!=t||!u.getAttribute("data-time-slot")){if(u._left)var v=u._left,w=u._top,x=u._width,y=u._height;else{var v=u.offsetLeft+h,w=u.offsetTop+g,x=u.offsetWidth,y=u.offsetHeight;u._left=v,u._top=w,u._width=x,u._height=y}if(u._left=v,u._top=w,u._width=x,u._height=y,0!==x&&0!==y){if(c.rtl?"hidden"!=c.hScrollInstance.element.style.visibility&&(v-=c.hScrollInstance.max-o):v-=o,w-=n,0==p&&s&&(w+=n),!(w<=b&&b<w+y))break;if(v<=a&&a<v+x){d=u,i=!0;break}}}}}return d},_removeFeedbackAndStopResize:function(){var b=this;if(b.feedback){if(b.feedback.remove(),b.feedback=null,b.pinnedfeedback.remove(),b.pinnedfeedback=null,b.feedbacks)for(var c=0;c<b.feedbacks.length;c++)b.feedbacks[c].remove();if(b._resizeDays=0,b._resizeStep=0,b._lastX=null,b.feedbacks=new Array,b.leftResize=!1,b.rightResize=!1,b.topResize=!1,b.bottomResize=!1,b.overlay.hide(),b.resizing=!1,b.resizeFrom=null,b._dragCell=null,b._dragStartCell=null,b.resizeTo=null,b.dragOrResize=!1,b.isMouseDown=!1,b.selectedJQXAppointment){var d=a('[data-key="'+b.selectedJQXAppointment.id+'"]');d.removeClass(b.toTP("jqx-scheduler-feedback-appointment jqx-disableselect"))}b.openedMonthCellPopup&&b.openedMonthCellPopup.remove()}},_saveChangesAfterDragOrResize:function(b,c,d,e){var f=this;if(b===!1)if(c.isException()){for(var g=c.rootAppointment?c.rootAppointment.exceptions:c.exceptions,h=0;h<g.length;h++)if(g[h].occurrenceFrom.equals(c.occurrenceFrom)){g[h]=c;break}}else c.rootAppointment.recurrenceException||(c.rootAppointment.recurrenceException=new Array),null!=c.rootAppointment?(c.rootAppointment.exceptions.push(c),c.rootAppointment.recurrenceException.push(c.occurrenceFrom)):(c.exceptions.push(c),c.recurrenceException.push(c.occurrenceFrom));else if(b===!0){if(c.isException())for(var g=c.rootAppointment?c.rootAppointment.exceptions:c.exceptions,h=0;h<g.length;h++)if(g[h].occurrenceFrom.equals(c.occurrenceFrom)){for(var i=0;i<c.rootAppointment.recurrenceException.length;i++)if(c.rootAppointment.recurrenceException[i].equals(g[h].occurrenceFrom)){var j=(c.from,new a.jqx.date(g[h].occurrenceFrom.year(),g[h].occurrenceFrom.month(),g[h].occurrenceFrom.day(),c.from.hour(),c.from.minute(),c.from.second()));c.rootAppointment.recurrenceException[i]=j;break}g[h]=c;var j=(c.from,new a.jqx.date(g[h].occurrenceFrom.year(),g[h].occurrenceFrom.month(),g[h].occurrenceFrom.day(),c.from.hour(),c.from.minute(),c.from.second()));g[h].occurrenceFrom=j;break}if(null!=c.rootAppointment){c.rootAppointment.recurrencePattern=c.rootAppointment.recurrencePattern.createNewPattern();var k=c.rootAppointment.from,l=c.rootAppointment.duration(),m=c.rootAppointment.recurrencePattern.freq,j=null;switch(m){case"daily":j=new a.jqx.date(k.year(),k.month(),k.day(),c.from.hour(),c.from.minute(),c.from.second());break;case"weekly":j=new a.jqx.date(k.year(),k.month(),k.day(),c.from.hour(),c.from.minute(),c.from.second());break;case"monthly":j=new a.jqx.date(k.year(),k.month(),k.day(),c.from.hour(),c.from.minute(),c.from.second());break;case"yearly":j=new a.jqx.date(k.year(),k.month(),k.day(),c.from.hour(),c.from.minute(),c.from.second())}e?(c.rootAppointment.from=k,c.rootAppointment.to=k.add(c.duration())):(c.rootAppointment.from=j,c.rootAppointment.to=j.add(l)),c.rootAppointment.allDay=c.allDay,c.rootAppointment.resourceId=c.resourceId,c.rootAppointment.color=c.color,c.rootAppointment.borderColor=c.borderColor,c.rootAppointment.background=c.background,c.rootAppointment.timezone=c.timezone,c.rootAppointment.subject=c.subject,c.rootAppointment.description=c.description,c.rootAppointment.location=c.location,c.rootAppointment.category=c.category,c.rootAppointment.status=c.status,f.resizing?c.rootAppointment.recurrencePattern.setFrom(k):c.rootAppointment.recurrencePattern.setFrom(j)}else c.recurrencePattern=c.recurrencePattern.createNewPattern(),c.recurrencePattern.setFrom(c.from);var n=a(d).attr("data-view"),o=f._resources[parseInt(n)-1];null!=o&&(null!=c.rootAppointment?c.rootAppointment.resourceId=o:c.resourceId=o)}},_handleMouseUp:function(b,c,d){var e=this;clearInterval(e._verticalIntervalDragVelocity),clearInterval(e._horizontalIntervalDragVelocity),clearInterval(e._intervalDrag),clearInterval(e._horizontalIntervalDrag);var f=b,g=!1;if(d?e.resizeTo?f.to.equals(e.resizeTo)&&(g=!0):e.resizeFrom&&f.from.equals(e.resizeFrom)&&(g=!0):e._dragStartCell==c&&(g=!0),g){var h=a('[data-key="'+b.id+'"]');return h.removeClass(e.toTP("jqx-scheduler-feedback-appointment jqx-disableselect")),void e._removeFeedbackAndStopResize()}var i=f.duration(),j=f.duration().days()>=1||f.allDay,k=function(b,f){if(f.allDay||j)var g=e.getMaxAllDayAppointments(e.appointmentsToRender);if(d)e.resizeTo?(e.resizeTo>e.max&&(e.resizeTo=e.max),e.resizeTo<e.min&&(e.resizeTo=e.min),f.to=e.resizeTo):e.resizeFrom&&(e.resizeFrom>e.max&&(e.resizeFrom=e.max),e.resizeFrom<e.min&&(e.resizeFrom=e.min),f.from=e.resizeFrom),0==f.from.hour()&&0==f.from.minute()&&23==f.to.hour()&&59==f.to.minute()&&(f.allDay=!0);else{var h=e._views[e._view].type,k=e._views[e._view],l=a(c).attr("data-date"),m=null!=a(c).attr("data-end-date"),n=new a.jqx.date(l,e.timeZone);if(n<e.min&&(n=e.min),n>e.max&&(n=e.max),e.rtl&&j&&m)f.to=a.jqx.scheduler.utilities.getEndOfDay(n);else if(!e.rtl||"monthView"!=h&&"timelineMonthView"!=h)if(!e.rtl||"timelineDayView"!=h&&"timelineWeekView"!=h)f.from=n;else{var o=e.getMinutesPerScale();f.to=n.addMinutes(o)}else f.to=a.jqx.scheduler.utilities.getEndOfDay(n);if("dayView"===h||"weekView"===h)if(j||m){if(!j&&m)f.to=a.jqx.scheduler.utilities.getEndOfDay(n),f.allDay=!0;else if(j&&m&&!e.rtl)f.to=n.add(i),0==f.from.hour()&&0==f.from.minute()&&23==f.to.hour()&&59==f.to.minute()&&(f.allDay=!0);else if(j&&m&&e.rtl)f.from=a.jqx.scheduler.utilities.getStartOfDay(f.to.add(new a.jqx.timeSpan(-i))),0==f.from.hour()&&0==f.from.minute()&&23==f.to.hour()&&59==f.to.minute()&&(f.allDay=!0);else if(j&&!m){var p=30,q=k.timeRuler&&k.timeRuler.scale;switch(q){case"sixtyMinutes":case"hour":p=60;break;case"fifteenMinutes":case"quarterHour":p=15;break;case"tenMinutes":p=10;break;case"fiveMinutes":p=5}f.to=n.addMinutes(p),f.allDay=!1}}else f.to=n.add(i),f.allDay=!1;else if("monthView"===h)e.rtl?f.from=a.jqx.scheduler.utilities.getStartOfDay(f.to.add(new a.jqx.timeSpan(-i))):f.to=n.add(i);else if("timelineDayView"===h||"timelineWeekView"===h||"timelineMonthView"===h)if(e.rtl)if("timelineMonthView"==h)f.from=a.jqx.scheduler.utilities.getStartOfDay(f.to.add(new a.jqx.timeSpan(-i)));else{var o=e.getMinutesPerScale();f.from=n.addMinutes(o).add(new a.jqx.timeSpan(-i))}else f.to=n.add(i)}e._saveChangesAfterDragOrResize(b,f,c,e.resizing);var h=a(c).attr("data-view"),r=e._resources[parseInt(h)-1];null!=r&&(f.resourceId=r),e.resizing=!1,e.resizeFrom=null,e._dragCell=null,e.resizeTo=null;var s={},t={};for(var u in e.appointmentDataFields){var v=e.appointmentDataFields[u],w=f[u];s[u]=w,"from"!=u&&"to"!=u||(w=w.toDate()),t[v]=w}if(s.jqxAppointment=f,s.originalData=t,f.boundAppointment=s,e._raiseEvent("appointmentChange",{appointment:f.boundAppointment}),e.changedAppointments[f.id]={type:"Update",appointment:f.boundAppointment},e.table.find(".jqx-icon-arrow-down").hide(),"monthView"==e._views[e._view].type&&e._views[e._view].monthRowAutoHeight)e._renderrows();else if("weekView"!=e._views[e._view].type&&"dayView"!=e._views[e._view].type||!f.allDay&&!j){var x=e.getViewStart(),y=a.jqx.scheduler.utilities.getEndOfDay(e.getViewEnd());e._prepareAppointmentsInView(x,y),e._renderAppointments(x,y)}else if(e.tableRows>1)e._renderrows();else{var x=e.getViewStart(),y=a.jqx.scheduler.utilities.getEndOfDay(e.getViewEnd());e._prepareAppointmentsInView(x,y),e._renderAppointments(x,y);var z=e.getMaxAllDayAppointments(e.appointmentsToRender);if(z!=g){var A=z*(e._defaultRowHeight-2);A=e.isTouchDevice()?Math.max(22+e._defaultRowHeight,17+A):Math.max(3*e._defaultRowHeight,17+A),1==e.tableRows?a(a(e.table[0].rows[0]).find("td")).css("height",A+"px"):a(a(e.table[0].rows[1]).find("td")).css("height",A+"px"),a(e.oldRow).find("td").css("height",A+"px"),a(e.pinnedTableRow).find("td").css("height",A+"px"),e.pinnedtable.height(A),e._updateScrollbars(e._hostHeight?e._hostHeight:e.host.height())}}e._removeFeedbackAndStopResize()};f.isRecurrentAppointment()?k(!1,f):k(null,f)},_handleDayWeekViewResize:function(b,c,d,e,f){
-var g=this,h=(g._views[g._view].type,g._views[g._view]),i=f.duration().days()>=1||f.allDay;if(i||d.getAttribute("data-end-date")){var j=function(a){return!(a<g.cellWidth-10)},k=h.appointmentsRenderMode&&"exactTime"==h.appointmentsRenderMode;if(f.allDay||!k){if(g.leftResize){if(g._lastResizeX||(g._lastResizeX=g.mouseDownPosition.left),b>g._lastResizeX+a(d).width()/2){var l=g.selectedAppointmentTableBounds.width+g.selectedAppointmentTableBounds.left-e.left-g.cellWidth;j(l)&&(g.feedback.css("left",5+e.left+g.cellWidth),g.feedback.width(l-5),g.feedback.hide(),g.pinnedfeedback.css("left",5+e.left+g.cellWidth),g.pinnedfeedback.width(l-5),g._lastResizeX=g.pinnedfeedback.coord().left,g.rtl?g.resizeTo=a.jqx.scheduler.utilities.getEndOfDay(new a.jqx.date(d.getAttribute("data-date"),g.timeZone)).addDays(-1):g.resizeFrom=new a.jqx.date(d.getAttribute("data-date"),g.timeZone).addDays(1))}else if(b<g._lastResizeX-a(d).width()/2){var l=g.selectedAppointmentTableBounds.width+g.selectedAppointmentTableBounds.left-e.left;j(l)&&(g.feedback.css("left",5+e.left),g.feedback.width(l-5),g.feedback.hide(),g.pinnedfeedback.css("left",5+e.left),g.pinnedfeedback.width(l-5),g._lastResizeX=g.pinnedfeedback.coord().left,g.rtl?g.resizeTo=a.jqx.scheduler.utilities.getEndOfDay(new a.jqx.date(d.getAttribute("data-date"),g.timeZone)):g.resizeFrom=new a.jqx.date(d.getAttribute("data-date"),g.timeZone))}}else if(g.rightResize){g._lastResizeX||(g._lastResizeX=g.selectedAppointmentTableBounds.width+g.selectedAppointmentTableBounds.left);var m=a(d).width()/2;if(b>g._lastResizeX+m){var n=a(d).width()+e.left-g.selectedAppointmentTableBounds.width-g.selectedAppointmentTableBounds.left,l=g.selectedAppointmentTableBounds.width+n;j(l)&&(g.feedback.hide(),g.feedback.width(l-6),g.feedback.css("left",5+e.left),g.pinnedfeedback.width(l-6),g._lastResizeX=g.selectedAppointmentTableBounds.width+n+g.pinnedfeedback.coord().left,g.rtl?g.resizeFrom=new a.jqx.date(d.getAttribute("data-date"),g.timeZone):g.resizeTo=a.jqx.scheduler.utilities.getEndOfDay(new a.jqx.date(d.getAttribute("data-date"),g.timeZone)))}else if(b<g._lastResizeX-m){var n=e.left-g.selectedAppointmentTableBounds.width-g.selectedAppointmentTableBounds.left,l=g.selectedAppointmentTableBounds.width+n;j(l)&&(g.feedback.hide(),g.feedback.css("left",5+e.left),g.feedback.width(l-6),g.pinnedfeedback.width(l-6),g._lastResizeX=g.selectedAppointmentTableBounds.width+n+g.pinnedfeedback.coord().left,g.rtl?g.resizeFrom=new a.jqx.date(d.getAttribute("data-date"),g.timeZone).addDays(1):g.resizeTo=a.jqx.scheduler.utilities.getEndOfDay(new a.jqx.date(d.getAttribute("data-date"),g.timeZone).addDays(-1)))}}}else{var o=new Array,p=new Array,q=-1,r=-1,s=this.host.coord().left,t=0,u=g.hScrollInstance.value;if(g.rtl)var u=g.hScrollInstance.max-g.hScrollInstance.value;"hidden"==g.hScrollBar[0].style.visibility&&(u=0);for(var v=b+u,w=0;w<this.columns.records.length;w++)this.columns.records[w].timeColumn&&(g.rtl||(s+=this.columns.records[w].width,t++));for(var x=g.getViewStart(),y=g.getViewEnd(),w=0;w<this._getColumnsLengthPerView();w++){var z=this.columns.records[w+t].width;g.leftResize?(g.rtl||(o.push(s),p.push(x.addDays(w)),(0!=f.from.hour()||0==f.from.hour()&&0!=f.from.minute())&&s<g.selectedAppointmentTableBounds.left&&s+z>g.selectedAppointmentTableBounds.left&&(o.push(g.selectedAppointmentTableBounds.left),p.push(f.from),q=o.length-1),(23!=f.to.hour()||23==f.to.hour()&&59!=f.to.minute())&&s<g.selectedAppointmentTableBounds.left+g.selectedAppointmentTableBounds.width&&s+z>g.selectedAppointmentTableBounds.left+g.selectedAppointmentTableBounds.width&&(o.push(g.selectedAppointmentTableBounds.left+g.selectedAppointmentTableBounds.width+8),p.push(f.to),r=o.length-1)),g.rtl&&(o.push(s),p.push(y.addDays(-w-1)),(0!=f.from.hour()||0==f.from.hour()&&0!=f.from.minute())&&s<g.selectedAppointmentTableBounds.left+g.selectedAppointmentTableBounds.width&&s+z>g.selectedAppointmentTableBounds.left+g.selectedAppointmentTableBounds.width&&(o.push(g.selectedAppointmentTableBounds.left+g.selectedAppointmentTableBounds.width+8),p.push(f.from),q=o.length-1),(23!=f.to.hour()||23==f.to.hour()&&59!=f.to.minute())&&s<g.selectedAppointmentTableBounds.left&&s+z>g.selectedAppointmentTableBounds.left&&(o.push(g.selectedAppointmentTableBounds.left),p.push(f.to),r=o.length-1)),s+=z):g.rtl?((0!=f.from.hour()||0==f.from.hour()&&0!=f.from.minute())&&s<g.selectedAppointmentTableBounds.left+g.selectedAppointmentTableBounds.width&&s+z>g.selectedAppointmentTableBounds.left+g.selectedAppointmentTableBounds.width&&(o.push(g.selectedAppointmentTableBounds.left+g.selectedAppointmentTableBounds.width+8),p.push(f.from),q=o.length-1),(23!=f.to.hour()||23==f.to.hour()&&59!=f.to.minute())&&s<g.selectedAppointmentTableBounds.left&&s+z>g.selectedAppointmentTableBounds.left&&(o.push(g.selectedAppointmentTableBounds.left),p.push(f.to),r=o.length-1),s+=z,o.push(s),p.push(y.addDays(-w-1))):((0!=f.from.hour()||0==f.from.hour()&&0!=f.from.minute())&&s<g.selectedAppointmentTableBounds.left&&s+z>g.selectedAppointmentTableBounds.left&&(o.push(g.selectedAppointmentTableBounds.left),p.push(f.from),q=o.length-1),(23!=f.to.hour()||23==f.to.hour()&&59!=f.to.minute())&&s<g.selectedAppointmentTableBounds.left+g.selectedAppointmentTableBounds.width&&s+z>g.selectedAppointmentTableBounds.left+g.selectedAppointmentTableBounds.width&&(o.push(g.selectedAppointmentTableBounds.left+g.selectedAppointmentTableBounds.width+8),p.push(f.to),r=o.length-1),s+=z,o.push(s),p.push(x.addDays(w)))}if(g.leftResize){for(var w=0;w<o.length;w++){var e=o[w],A=o[w+1];A||(A=e);var B=w<o.length-1?v>=e&&v<=A:v>=e;if(B){var z=-e+g.selectedAppointmentTableBounds.left+g.selectedAppointmentTableBounds.width,C=g.pinnedfeedback.width(),D=g.pinnedfeedback.css("left"),E=g.resizeTo,F=g.resizeFrom;z>0&&(g.pinnedfeedback.css("left",e),g.pinnedfeedback.width(z),w==q?g.rtl?g.resizeTo=f.from:g.resizeFrom=f.from:w==r?g.rtl?g.resizeTo=f.to:g.resizeFrom=f.to:g.rtl?g.resizeTo=a.jqx.scheduler.utilities.getEndOfDay(p[w]):g.resizeFrom=p[w])}}var G=g.resizeFrom,H=g.resizeTo;g.rtl?G=f.from:H=f.to;var I=new a.jqx.timeSpan(1e4*(H-G));I.days()<1&&(g.pinnedfeedback.css("left",D),g.pinnedfeedback.width(C),g.resizeFrom=F,g.resizeTo=E)}else if(g.rightResize){for(var w=0;w<o.length;w++){var e=o[w],A=o[w+1];A||(A=e);var B=w<o.length-1?b>=e-this.cellWidth/3&&b<=A-this.cellWidth/3:b>=e-this.cellWidth/3;if(B){var z=e-g.selectedAppointmentTableBounds.left-15,C=g.pinnedfeedback.width();g.pinnedfeedback.width(z);var E=g.resizeTo,F=g.resizeFrom;if(w==q){g.rtl?g.resizeFrom=f.from:g.resizeTo=f.from;var z=e-g.selectedAppointmentTableBounds.left-9;g.pinnedfeedback.width(z);break}if(w==r){g.rtl?g.resizeFrom=f.to:g.resizeTo=f.to;var z=e-g.selectedAppointmentTableBounds.left-9;g.pinnedfeedback.width(z);break}g.rtl?g.resizeFrom=p[w]:g.resizeTo=a.jqx.scheduler.utilities.getEndOfDay(p[w]);break}}var G=g.resizeFrom,H=g.resizeTo;g.rtl?H=f.to:G=f.from;var I=new a.jqx.timeSpan(1e4*(H-G));I.days()<1&&(g.pinnedfeedback.width(C),g.resizeFrom=F,g.resizeTo=E)}}}else{var J=function(a){return!(a<10)},K=g.findCell(g.feedback.coord().left,c);if(g.topResize){if(g._lastResizeY||(g._lastResizeY=g.mouseDownPosition.top),c>g._lastResizeY+a(d).height()/2){var L=g.selectedAppointmentTableBounds.height+g.selectedAppointmentTableBounds.top-e.top-a(d).height()-3;if(J(L)){g.feedback.css("top",2+e.top+a(d).height()),g.feedback.height(L),g._lastResizeY=g.feedback.coord().top;var M=new a.jqx.date(K.getAttribute("data-date"),g.timeZone);g.resizeFrom=M.addMinutes(g.getMinutesPerScale())}}else if(c<g._lastResizeY-a(d).height()/2){var L=g.selectedAppointmentTableBounds.height+g.selectedAppointmentTableBounds.top-e.top-3;J(L)&&(g.feedback.css("top",2+e.top),g.feedback.height(L),g._lastResizeY=g.feedback.coord().top,g.resizeFrom=new a.jqx.date(K.getAttribute("data-date"),g.timeZone))}}else if(g.bottomResize)if(g._lastResizeY||(g._lastResizeY=g.mouseDownPosition.top),c>g._lastResizeY+a(d).height()/2){var n=-5+a(d).height()+e.top-g.selectedAppointmentTableBounds.height-g.selectedAppointmentTableBounds.top,L=g.selectedAppointmentTableBounds.height+n;J(L)&&(g.feedback.height(L),g._lastResizeY=g.selectedAppointmentTableBounds.height+n+g.feedback.coord().top,g.resizeTo=new a.jqx.date(K.getAttribute("data-date"),g.timeZone).addMinutes(g.getMinutesPerScale()))}else if(c<g._lastResizeY-a(d).height()/2){var n=-5+e.top-g.selectedAppointmentTableBounds.height-g.selectedAppointmentTableBounds.top,L=g.selectedAppointmentTableBounds.height+n;J(L)&&(g.feedback.height(L),g._lastResizeY=g.selectedAppointmentTableBounds.height+n+g.feedback.coord().top,g.resizeTo=new a.jqx.date(K.getAttribute("data-date"),g.timeZone))}}},_handleTimelineMonthViewResize:function(b,c,d,e,f){var g=this,h=(g._views[g._view].type,g._views[g._view],function(a){return!(a<10)}),i=g.findCell(b,g.feedback.coord().top);if(f.allDay){if(g.leftResize){if(g._lastResizeX||(g._lastResizeX=g.mouseDownPosition.left),b>g._lastResizeX+a(d).width()/2){var j=g.selectedAppointmentTableBounds.width+g.selectedAppointmentTableBounds.left-e.left-a(d).width();h(j)&&(g.feedback.css("left",e.left+a(d).width()),g.feedback.width(j),g._lastResizeX=g.feedback.coord().left,g.rtl?g.resizeTo=a.jqx.scheduler.utilities.getEndOfDay(new a.jqx.date(i.getAttribute("data-date"),g.timeZone).addDays(-1)):g.resizeFrom=new a.jqx.date(i.getAttribute("data-date"),g.timeZone).addDays(1))}else if(b<g._lastResizeX-a(d).width()/2){var j=g.selectedAppointmentTableBounds.width+g.selectedAppointmentTableBounds.left-e.left;h(j)&&(g.feedback.css("left",e.left),g.feedback.width(j),g._lastResizeX=g.feedback.coord().left,g.rtl?g.resizeTo=a.jqx.scheduler.utilities.getEndOfDay(new a.jqx.date(i.getAttribute("data-date"),g.timeZone)):g.resizeFrom=new a.jqx.date(i.getAttribute("data-date"),g.timeZone))}}else if(g.rightResize)if(g._lastResizeX||(g._lastResizeX=g.mouseDownPosition.left),b>g._lastResizeX+a(d).width()/2){var k=a(d).width()+e.left-g.selectedAppointmentTableBounds.width-g.selectedAppointmentTableBounds.left,j=g.selectedAppointmentTableBounds.width+k-5;h(j)&&(g.feedback.width(j),g._lastResizeX=g.selectedAppointmentTableBounds.width+k+g.feedback.coord().left,g.rtl?g.resizeFrom=new a.jqx.date(i.getAttribute("data-date"),g.timeZone):g.resizeTo=a.jqx.scheduler.utilities.getEndOfDay(new a.jqx.date(i.getAttribute("data-date"),g.timeZone)))}else if(b<g._lastResizeX-a(d).width()/2){var k=e.left-g.selectedAppointmentTableBounds.width-g.selectedAppointmentTableBounds.left,j=g.selectedAppointmentTableBounds.width+k-5;h(j)&&(g.feedback.width(j),g._lastResizeX=g.selectedAppointmentTableBounds.width+k+g.feedback.coord().left,g.rtl?g.resizeFrom=new a.jqx.date(i.getAttribute("data-date"),g.timeZone).addDays(1):g.resizeTo=a.jqx.scheduler.utilities.getEndOfDay(new a.jqx.date(i.getAttribute("data-date"),g.timeZone).addDays(-1)))}}else{for(var l=new Array,m=new Array,n=-1,o=-1,p=this.host.coord().left,q=0,r=0;r<this.columns.records.length;r++)this.columns.records[r].timeColumn&&(p+=this.columns.records[r].width,q++);var s=g.hScrollInstance.value;if(g.rtl)var s=g.hScrollInstance.max-g.hScrollInstance.value;"hidden"==g.hScrollBar[0].style.visibility&&(s=0);for(var t=b+s,u=g.getViewStart(),v=g.getViewEnd(),r=(this._getColumnsLengthPerView()-1,0);r<this._getColumnsLengthPerView();r++){var w=this.columns.records[r+q].width;g.leftResize?(l.push(p),g.rtl?m.push(v.addDays(-r)):m.push(u.addDays(r)),(0!=f.from.hour()||0==f.from.hour()&&0!=f.from.minute())&&p<g.selectedAppointmentTableBounds.left&&p+w>g.selectedAppointmentTableBounds.left&&(l.push(g.selectedAppointmentTableBounds.left),m.push(f.from),n=l.length-1),(23!=f.to.hour()||23==f.to.hour()&&59!=f.to.minute())&&p<g.selectedAppointmentTableBounds.left+g.selectedAppointmentTableBounds.width&&p+w>g.selectedAppointmentTableBounds.left+g.selectedAppointmentTableBounds.width&&(l.push(g.selectedAppointmentTableBounds.left+g.selectedAppointmentTableBounds.width+8),m.push(f.to),o=l.length-1),p+=w):((0!=f.from.hour()||0==f.from.hour()&&0!=f.from.minute())&&p<g.selectedAppointmentTableBounds.left&&p+w>g.selectedAppointmentTableBounds.left&&(l.push(g.selectedAppointmentTableBounds.left),m.push(f.from),n=l.length-1),(23!=f.to.hour()||23==f.to.hour()&&59!=f.to.minute())&&p<g.selectedAppointmentTableBounds.left+g.selectedAppointmentTableBounds.width&&p+w>g.selectedAppointmentTableBounds.left+g.selectedAppointmentTableBounds.width&&(l.push(g.selectedAppointmentTableBounds.left+g.selectedAppointmentTableBounds.width),m.push(f.to),o=l.length-1),p+=w,l.push(p),g.rtl?m.push(v.addDays(-r-1)):m.push(u.addDays(r)))}if(g.leftResize){for(var r=0;r<l.length;r++){var x=l[r],y=l[r+1];y||(y=x);var z=r<l.length-1?t>=x&&t<=y:t>=x;if(z){var w=-x+g.selectedAppointmentTableBounds.left+g.selectedAppointmentTableBounds.width,A=g.feedback.width(),B=g.feedback.css("left"),C=g.resizeTo,D=g.resizeFrom;g.feedback.css("left",x),g.feedback.width(w),r==n?g.rtl?g.resizeTo=f.from:g.resizeFrom=f.from:r==o?g.rtl?g.resizeTo=f.to:g.resizeFrom=f.to:g.rtl?g.resizeTo=m[r]:g.resizeFrom=m[r]}}var E=g.resizeFrom,F=g.resizeTo;g.rtl?E=f.from:F=f.to;new a.jqx.timeSpan(1e4*(F-E));g.feedback.width()<20&&(g.feedback.css("left",B),g.feedback.width(A),g.resizeFrom=D,g.resizeTo=C)}else if(g.rightResize){for(var r=0;r<l.length;r++){var x=l[r],y=l[r+1];y||(y=x);var z=r<l.length-1?t>=x-this.cellWidth/3&&t<=y-this.cellWidth/3:t>=x-this.cellWidth/3;if(z){var w=x-g.selectedAppointmentTableBounds.left-12,A=g.feedback.width();g.feedback.width(w);var C=g.resizeTo,D=g.resizeFrom;if(r==n){g.rtl?g.resizeFrom=f.from:g.resizeTo=f.from;var w=x-g.selectedAppointmentTableBounds.left;g.feedback.width(w);break}if(r==o){g.rtl?g.resizeFrom=f.to:g.resizeTo=f.to;var w=x-g.selectedAppointmentTableBounds.left;g.feedback.width(w);break}g.rtl?g.resizeFrom=m[r]:g.resizeTo=a.jqx.scheduler.utilities.getEndOfDay(m[r]);break}}var E=g.resizeFrom,F=g.resizeTo;g.rtl?F=f.to:E=f.from;new a.jqx.timeSpan(1e4*(F-E));g.feedback.width()<20&&(g.feedback.width(A),g.resizeFrom=D,g.resizeTo=C)}}},_handleMonthViewResize:function(b,c,d,e,f){var g=this;if(g.selectedJQXAppointment){var h=(g._views[g._view].type,g._views[g._view]),i=-5;g.tableColumns>1&&(i=parseInt(-5/g.tableColumns));for(var j=0;j<g.columns.records.length/g.tableColumns;j++)g.columns.records[j].timeColumn||(i+=g.columns.records[j].width);var k=g.selectedJQXAppointment.resourceId,l=g._resources.indexOf(k);g.resources&&"none"==g.resources.orientation&&(l=-1);var m="0px";l!=-1&&1==g.tableRows&&(m=i*l+"px"),h.showWeekNumbers&&(g.rtl||(m=parseInt(m)+g.columns.records[0].width+"px"));var n=d.offsetWidth,o=(d.offsetHeight,18);g.isTouchDevice()&&(o=2);for(var j=0;j<6;j++)g.feedbacks[j][0].style.left=m,g.feedbacks[j][0].style.width=i+"px",g.feedbacks[j][0].style.display="block",g.feedbacks[j][0].style.top=parseInt(g.rows[j].top)+o+"px",g.tableRows>1&&(g.feedbacks[j][0].style.top=parseInt(g.rows[6*l+j].top)+o+"px"),a(g.feedbacks[j][0]).find(".jqx-scheduler-appointment-resize-indicator").css("visibility","inherit");var p=g.selectedJQXAppointment.elements,q=(p[0].cells[0].cell,p[p.length-1]),r=q.lastCellY,s=q.lastCellX,t=p[0].cellY,u=p[0].cellX,v=parseInt(e.top),w=parseInt(e.left);if(g.rtl){if(g.leftResize){for(var x=!1,j=0;j<6;j++){var y=g.feedbacks[j],z=parseInt(y[0].style.top)-o;parseInt(y[0].style.left);if(z<v)y[0].style.width=i+"px";else for(var A=0;A<p.length;A++){var B=p[A].cellY;B==z&&(y[0].style.width=p[A].width+"px",y[0].style.top=p[A].y+"px")}var C=p[0],D=parseInt(C.x);if(z==t)if(y[0].style.left=D+"px",v==t){if(y[0].style.left=1+e.left+"px",y[0].style.width=-1+C.x+C.width-e.left+"px",e.left>C.x+C.width&&(y[0].style.width=C.width+"px",y[0].style.left=C.x+"px"),"exactTime"==h.appointmentsRenderMode&&!g.selectedJQXAppointment.allDay){var E=g.host.coord().left;b-E>=C.x-10&&b-E<=C.cellX+g.cellWidth&&(y[0].style.width=C.width+"px",y[0].style.left=C.x+"px",x=!0)}}else v<t?(y[0].style.left=D+"px",y[0].style.width=C.width+"px"):v>t&&(y[0].style.left=m,y[0].style.width=C.x+C.width-parseInt(m)+"px");else z==v&&(y[0].style.width=i-e.left+parseInt(m)+"px",y[0].style.left=e.left+"px");if(z<t&&(y[0].style.display="none"),z>v&&(y[0].style.display="none"),v<t)for(var A=0;A<p.length;A++){var B=p[A].cellY;B==z&&(y[0].style.display="block",y[0].style.width=p[A].width+"px",y[0].style.left=p[A].x+"px")}if(v==t)for(var A=0;A<p.length;A++){var B=p[A].cellY;(v<t||v==t)&&B==z&&t!=r&&(y[0].style.left=1+e.left+parseInt(m)+"px",1+e.left+parseInt(m)>C.x+C.width&&(y[0].style.left=C.x+"px"),y[0].style.width=-1+C.x+C.width-e.left+"px")}}var F=a.jqx.scheduler.utilities.getEndOfDay(new a.jqx.date(d.getAttribute("data-date"),g.timeZone));F>g.selectedJQXAppointment.from&&!x?g.resizeTo=F:g.resizeTo=g.selectedJQXAppointment.to}else if(g.rightResize){for(var G=!1,j=0;j<6;j++){var y=g.feedbacks[j],z=parseInt(y[0].style.top)-o;parseInt(y[0].style.left);z<v&&(y[0].style.width=i+"px");for(var A=0;A<p.length;A++){var B=p[A].cellY;B==z&&(y[0].style.top=p[A].y+"px")}var C=p[0],D=parseInt(C.x);if(z==t)if(y[0].style.left=D+"px",v==t)if(w>=u){if(y[0].style.width=w+n-D-5+"px","exactTime"==h.appointmentsRenderMode&&!g.selectedJQXAppointment.allDay){var E=g.host.coord().left;b-E>=C.lastCellX&&b-E<=C.x+C.width+15&&(y[0].style.width=C.width+"px",G=!0)}}else y[0].style.width=C.width+"px";else v>t?(y[0].style.left=D+"px",y[0].style.width=C.width+"px"):v<t&&(y[0].style.left=D+"px",y[0].style.width=i-D+parseInt(m)+"px");else z==v&&(y[0].style.width=w+n-5-parseInt(m)+"px");if(z>r&&(y[0].style.display="none"),z<v&&(y[0].style.display="none"),v>r)for(var A=0;A<p.length;A++){var B=p[A].cellY;B==z&&(y[0].style.display="block"),z==r&&(y[0].style.width=p[A].width+"px",y[0].style.left=p[A].x+"px")}if(v<=r&&z==r)for(var A=0;A<p.length;A++){var B=p[A].cellY;z!=v&&B==z&&t!=r?(y[0].style.width=p[A].width+"px",y[0].style.left=p[A].x+"px"):z==v&&B==z&&t!=r&&(y[0].style.left=p[A].x+"px",y[0].style.width=w+n-5-parseInt(m)-p[A].x+"px")}}var F=new a.jqx.date(d.getAttribute("data-date"),g.timeZone);F<g.selectedJQXAppointment.to&&!G?g.resizeFrom=F:g.resizeFrom=g.selectedJQXAppointment.from}}else if(g.leftResize){for(var G=!1,j=0;j<6;j++){var y=g.feedbacks[j],z=parseInt(y[0].style.top)-o;parseInt(y[0].style.left);if(z<v){y[0].style.width=i+"px";for(var A=0;A<p.length;A++){var B=p[A].cellY;B==z&&(y[0].style.top=p[A].y+"px")}}else for(var A=0;A<p.length;A++){var B=p[A].cellY;B==z&&(y[0].style.width=p[A].width+"px",y[0].style.top=p[A].y+"px")}var C=p[0],D=parseInt(C.x);if(z==t)if(y[0].style.left=D+"px",v==t){if(y[0].style.left=1+e.left+"px",y[0].style.width=-1+C.x+C.width-e.left+"px","exactTime"==h.appointmentsRenderMode&&!g.selectedJQXAppointment.allDay){var H=g.cellWidth-(C.x-u),E=g.host.coord().left;b-E>=C.x&&b-E<=C.x+H+2&&(y[0].style.left=D+"px",y[0].style.width=C.width+"px",G=!0)}}else v>t?(y[0].style.left=D+"px",y[0].style.width=C.width+"px"):v<t&&(y[0].style.left=m,y[0].style.width=C.x+C.width-parseInt(m)+"px");else z==v&&(y[0].style.width=i-e.left+parseInt(m)+"px",y[0].style.left=e.left+"px");if(z>r&&(y[0].style.display="none"),z<v&&(y[0].style.display="none"),v>=r)for(var A=0;A<p.length;A++){var B=p[A].cellY;v>r||v==r&&w>s?B==z&&(y[0].style.display="block",y[0].style.width=p[A].width+"px",y[0].style.left=p[A].x+"px"):v==r&&w<=s&&t!=r&&(y[0].style.width=p[A].width-e.left+parseInt(m)+"px")}}var F=new a.jqx.date(d.getAttribute("data-date"),g.timeZone);F<g.selectedJQXAppointment.to&&!G?g.resizeFrom=F:g.resizeFrom=g.selectedJQXAppointment.from}else if(g.rightResize){for(var x=!1,j=0;j<6;j++){var y=g.feedbacks[j],z=parseInt(y[0].style.top)-o;parseInt(y[0].style.left);z<v&&(y[0].style.width=i+"px");for(var A=0;A<p.length;A++){var B=p[A].cellY;B==z&&(y[0].style.top=p[A].y+"px")}var C=p[0],D=parseInt(C.x);if(z==t)if(y[0].style.left=D+"px",v==t)if(w>=u){if(y[0].style.width=w+n-D-5+"px","exactTime"==h.appointmentsRenderMode&&!g.selectedJQXAppointment.allDay){var E=g.host.coord().left;b-E>=s&&b-E<=C.x+C.width+15&&(y[0].style.width=C.width+"px",x=!0)}}else y[0].style.width=C.width+"px";else v<t?(y[0].style.left=D+"px",y[0].style.width=C.width+"px"):v>t&&(y[0].style.left=D+"px",y[0].style.width=i-D+parseInt(m)+"px");else z==v&&(y[0].style.width=w+n-5-parseInt(m)+"px");if(z<t&&(y[0].style.display="none"),z>v&&z>t&&(y[0].style.display="none"),v<=t)for(var A=0;A<p.length;A++){var B=p[A].cellY;(v<t||v==t&&w<u)&&B==z&&(y[0].style.display="block",y[0].style.width=p[A].width+"px")}}var F=a.jqx.scheduler.utilities.getEndOfDay(new a.jqx.date(d.getAttribute("data-date"),g.timeZone));F>g.selectedJQXAppointment.from&&!x?g.resizeTo=F:g.resizeTo=g.selectedJQXAppointment.to}for(var I=new Array,j=0;j<6;j++){var y=g.feedbacks[j];"block"==y[0].style.display&&I.push(y)}a.each(I,function(b){g.rtl?(b>0&&(a(this).find(".jqx-scheduler-appointment-right-resize-indicator")[0].style.visibility="hidden"),b<I.length-1&&(a(this).find(".jqx-scheduler-appointment-left-resize-indicator")[0].style.visibility="hidden")):(b>0&&(a(this).find(".jqx-scheduler-appointment-left-resize-indicator")[0].style.visibility="hidden"),b<I.length-1&&(a(this).find(".jqx-scheduler-appointment-right-resize-indicator")[0].style.visibility="hidden"))})}},_handleTimelineDayWeekViewResize:function(b,c,d,e,f){var g=this,h=(g._views[g._view].type,g._views[g._view],g.getMinutesPerScale()),i=function(a){return!(a<10)},j=g.findCell(b,g.feedback.coord().top);if(g.leftResize){if(g._lastResizeX||(g._lastResizeX=g.mouseDownPosition.left),b>g._lastResizeX+a(d).width()/2){var k=g.selectedAppointmentTableBounds.width+g.selectedAppointmentTableBounds.left-e.left-a(d).width();i(k)&&(g.feedback.css("left",2+e.left+a(d).width()),g.feedback.width(k),g._lastResizeX=g.feedback.coord().left,g.rtl?g.resizeTo=new a.jqx.date(j.getAttribute("data-date"),g.timeZone):g.resizeFrom=new a.jqx.date(j.getAttribute("data-date"),g.timeZone).addMinutes(h))}else if(b<g._lastResizeX-a(d).width()/2){var k=g.selectedAppointmentTableBounds.width+g.selectedAppointmentTableBounds.left-e.left;i(k)&&(g.feedback.css("left",2+e.left),g.feedback.width(k),g._lastResizeX=g.feedback.coord().left,g.rtl?g.resizeTo=new a.jqx.date(j.getAttribute("data-date"),g.timeZone).addMinutes(h):g.resizeFrom=new a.jqx.date(j.getAttribute("data-date"),g.timeZone))}}else if(g.rightResize)if(g._lastResizeX||(g._lastResizeX=g.mouseDownPosition.left),b>g._lastResizeX+a(d).width()/2){var l=a(d).width()+e.left-g.selectedAppointmentTableBounds.width-g.selectedAppointmentTableBounds.left,k=g.selectedAppointmentTableBounds.width+l;i(k)&&(g.feedback.width(k),g._lastResizeX=g.selectedAppointmentTableBounds.width+l+g.feedback.coord().left,g.rtl?g.resizeFrom=new a.jqx.date(j.getAttribute("data-date"),g.timeZone):g.resizeTo=new a.jqx.date(j.getAttribute("data-date"),g.timeZone).addMinutes(h))}else if(b<g._lastResizeX-a(d).width()/2){var l=e.left-g.selectedAppointmentTableBounds.width-g.selectedAppointmentTableBounds.left,k=g.selectedAppointmentTableBounds.width+l;i(k)&&(g.feedback.width(k),g._lastResizeX=g.selectedAppointmentTableBounds.width+l+g.feedback.coord().left,g.rtl?g.resizeFrom=new a.jqx.date(j.getAttribute("data-date"),g.timeZone).addMinutes(h):g.resizeTo=new a.jqx.date(j.getAttribute("data-date"),g.timeZone))}},_handleResize:function(b,c,d,e,f){var g=this,h=g._views[g._view].type,i=g._views[g._view];"dayView"===h||"weekView"===h?g._handleDayWeekViewResize(b,c,d,e,f):"timelineMonthView"===h?g._handleTimelineMonthViewResize(b,c,d,e,f):"monthView"===h?g._handleMonthViewResize(b,c,d,e,f):"timelineDayView"!==h&&"timelineWeekView"!==h||g._handleTimelineDayWeekViewResize(b,c,d,e,f),"timelineDayView"===h||"timelineMonthView"===h||"timelineWeekView"===h?(clearInterval(g._horizontalIntervalDrag),g._horizontalIntervalDrag=setInterval(function(){var a=g.host.width(),c=g.host.coord().left,d=c+25,e=a+d-45;g.rtl?b>e?g.hScrollInstance.setPosition(g.hScrollInstance.value-5):b<d&&g.hScrollInstance.setPosition(g.hScrollInstance.value+5):b<d?g.hScrollInstance.setPosition(g.hScrollInstance.value-5):b>e&&g.hScrollInstance.setPosition(g.hScrollInstance.value+5)},5)):"dayView"!==h&&"weekView"!==h||(clearInterval(g._intervalDrag),g._intervalDrag=setInterval(function(){var b=g.host.height(),d=0;d+=g.columnGroups?g.showHeader?g.columnsheader.height():0:g.showHeader?g.columnsHeight:0,g.showToolbar&&(d+=g.toolbarHeight),b-=d;var e=g.legendHeight;0==g._resources.length&&(e=0),g.showLegend&&(b-=e);var j=d+g.host.coord().top,k=g.showAllDayRow;!i.timeRuler||"dayView"!==h&&"weekView"!==h||void 0!=i.timeRuler.showAllDayRow&&(k=i.timeRuler.showAllDayRow);var l=f.duration().days()>=1||f.allDay;k&&l?j-=20:k&&g.resizing&&(j+=a(g.table[0].rows[0]).height(),b-=a(g.table[0].rows[0]).height());var m=j+25,n=b+m-45;c<m?g.vScrollInstance.setPosition(g.vScrollInstance.value-5):c>n&&g.vScrollInstance.setPosition(g.vScrollInstance.value+5)},5)),g.resizing=!0},_startTimers:function(b,c,d){var e=this,f=e.host.coord(),g=0,h=0;"hidden"!=e.hScrollInstance.element.style.visibility&&(clearInterval(e._horizontalIntervalDragVelocity),e._horizontalIntervalDragVelocity=setInterval(function(){g++,g>40&&(g=40)},100),clearInterval(e._horizontalIntervalDrag),e._horizontalIntervalDrag=setInterval(function(){var a=e._hostWidth,c=f.left,d=c+30,h=a+d-60;e.rtl?b<d?e.hScrollInstance.setPosition(e.hScrollInstance.value+10+g):b>h?e.hScrollInstance.setPosition(e.hScrollInstance.value-10-g):g=0:b<d?e.hScrollInstance.setPosition(e.hScrollInstance.value-10-g):b>h?e.hScrollInstance.setPosition(e.hScrollInstance.value+10+g):g=0},10)),"hidden"!=e.vScrollInstance.element.style.visibility&&(clearInterval(e._verticalIntervalDragVelocity),e._verticalIntervalDragVelocity=setInterval(function(){h++,h>40&&(h=40)},100),clearInterval(e._intervalDrag),e._intervalDrag=setInterval(function(){var b=e._hostHeight,g=0;g+=e.columnGroups?e.showHeader?e.columnsheader.height():0:e.showHeader?e.columnsHeight:0;var i=e._views[e._view].type,j=e._views[e._view];e.showToolbar&&(g+=e.toolbarHeight),b-=g,e.showLegend&&e._resources.length>0&&(b-=e.legendHeight);var k=f.top,l=g+k;if("dayView"==i||"weekView"==i){var m=e.showAllDayRow;!j.timeRuler||"dayView"!==i&&"weekView"!==i||void 0!=j.timeRuler.showAllDayRow&&(m=j.timeRuler.showAllDayRow);var n=d.duration().days()>=1||d.allDay;m&&n?l-=20:m&&e.resizing&&(l+=a(e.table[0].rows[0]).height())}var o=l+30,p=k+b+g-30;c<o?e.vScrollInstance.setPosition(e.vScrollInstance.value-10-h):c>p?e.vScrollInstance.setPosition(e.vScrollInstance.value+10+h):h=0},10))},_hoverCell:function(a){var b=this;return!b.enableHover||(b._resources.length>0&&a.className.indexOf("pinned")>=0||(a.className.indexOf("time-column")>=0||(a.className.indexOf("jqx-scheduler-disabled-cell")>=0||(!(!a||a!=b.hoveredCell)||(b.hoveredCell=a,!a||(b._removeHoveredCell(),b.hoveredCell=a,a.className+=" "+b.toTP("jqx-fill-state-hover")+" "+b.toTP("jqx-grid-cell-hover")+" "+b.toTP("jqx-scheduler-cell-hover"),void(a.jqxClassName=a.className)))))))},_removeHoveredCell:function(){var a=this;if(a.hoveredCell){var b=a.hoveredCell,c=function(c){var d=b.className;d=d.replace(" "+a.toTP("jqx-fill-state-hover"),""),d=d.replace(" "+a.toTP("jqx-grid-cell-hover"),""),d=d.replace(" "+a.toTP("jqx-scheduler-cell-hover"),""),b.className=d,b.jqxClassName=d};c(b)}a.hoveredCell=null},_addHandlers:function(){var b=this;this._mousewheelfunc=this._mousewheelfunc||function(a){return b.wheel(a,b),!1},this.focused=!1;var c=!1;this.addHandler(a(document),"keydown.scheduler"+b.element.id,function(a){c=!1,9===a.keyCode&&a.shiftKey&&!b.focused&&(c=!0)}),this.addHandler(this.host,"focus",function(d){if(!b.focusedCell||b.selectedAppointment||c||a(b.focusedCell).addClass(b.toThemeProperty("jqx-scheduler-cell-focus")),b.focused=!0,c)if(b.appointmentsToRender.length>0){var e=b.appointmentsToRender[b.appointmentsToRender.length-1];b._selectAppointment(e),b._lastSelectedAppointment=e}else if(b.focusedCell){if(b.focusedCell&&b.focusedCell.className.indexOf("-focus")==-1)return b._updateCellsSelection(),!1}else b._updateFocusedCell()}),this.addHandler(this.host,"blur",function(c){if(b.focusedCell){if(document.activeElement==b.element)return!0;if(a(document.activeElement).ischildof(b.host))return!0;a(b.focusedCell).removeClass(b.toThemeProperty("jqx-scheduler-cell-focus")),b.focused=!1}}),this.addHandler(this.host,"dragstart."+this.element.id,function(a){return!1}),this.addHandler(this.host,"selectstart."+this.element.id,function(c){return!!b.enableBrowserSelection||(!(!b.showToolBar||!a(c.target).ischildof(b.toolbar))||(!!(b.rowDetails&&a(c.target).parents("[data-role=details]").length>0)||void 0!=b.editKey&&void 0))}),this.addHandler(a(window),"jqxReady."+this.element.id,function(){}),this.removeHandler(this.host,"mousewheel",this._mousewheelfunc),this.addHandler(this.host,"mousewheel",this._mousewheelfunc);var d=this.isTouchDevice();this.vScrollInstance.valueChanged=function(a){b._timer&&clearTimeout(b._timer),d?b.table&&(b.table[0].style.top=0-b.vScrollInstance.value+"px"):b._timer=setTimeout(function(){b.table&&(b.table[0].style.top=0-b.vScrollInstance.value+"px")},1)},this.hScrollInstance.valueChanged=function(a){b._htimer&&clearTimeout(b._htimer),d?b.table&&b._renderhorizontalscroll():b._htimer=setTimeout(function(){b.table&&b._renderhorizontalscroll()},1)};var e="mousedown";this.isTouchDevice()&&(e=a.jqx.mobile.getTouchEventName("touchstart"),a.jqx.browser.msie&&a.jqx.browser.version<10&&(e="mousedown")),this.addHandler(this.table,"mouseleave",function(a){b._removeHoveredCell()}),b.isTouchDevice()&&(b.enableHover=!1);var f="mousemove.scheduler"+this.element.id,g="mouseup.scheduler"+this.element.id;this.isTouchDevice()&&this.touchMode!==!0&&(f=a.jqx.mobile.getTouchEventName("touchmove")+".scheduler"+this.element.id,g=a.jqx.mobile.getTouchEventName("touchend")+".scheduler"+this.element.id),this.addHandler(a(document),f,function(c){var d=c.pageX,e=c.pageY;if(b.isTouchDevice()){var f=a.jqx.position(c);if(d=f.left,e=f.top,isNaN(d)||isNaN(e)){var f=a.jqx.position(c.originalEvent);d=f.left,e=f.top}}if(b.disabled||3===c.which)return!0;if(!b.isMouseDown)return!0;if(b.hScrollInstance.isScrolling()||b.vScrollInstance.isScrolling())return!0;if(b._hostWidth){var g=b.host.coord();if(g.left+b._hostWidth<d||d<g.left)return!0;if(g.top+b._hostHeight<e||e<g.top)return!0}if(b.mouseDownPosition&&(Math.abs(b.mouseDownPosition.left-d)>=3&&Math.abs(b.mouseDownPosition.left-d)<=10||Math.abs(b.mouseDownPosition.top-e)>=3&&Math.abs(b.mouseDownPosition.top-e)<=10)&&(b.dragOrResize=!0),b.selectedAppointment&&b.dragOrResize){var h=null;if(b._hasOpenedMenu)return!0;if(b.editRecurrenceDialog.jqxWindow("isOpen"))return!0;var i=b._views[b._view].type,j=b._views[b._view],k=!1;if("td"===c.target.nodeName.toLowerCase())var l=c.target;else var l=b.findCell(d,e);if(!l)return!0;if(void 0!=l.getAttribute("data-time-slot"))return!0;if(l.className.indexOf("jqx-grid-cell-pinned")>=0)return!0;if(!b.feedback){if(h=b.getJQXAppointmentByElement(b.selectedAppointment),!h.draggable&&!h.resizable)return h=null,!0;if(b.beginDrag){var m=b.beginDrag(h);if(!m)return!0}var n=a('[data-key="'+h.id+'"]'),o=b.selectedAppointment.position();b.feedback=b.selectedAppointment.clone(!0),b.pinnedfeedback=b.selectedAppointment.clone(!0);var p=!("row-resize"==b.selectedAppointment[0].style.cursor||"col-resize"==b.selectedAppointment[0].style.cursor||b.resizing),q=function(a){p&&a.find(".jqx-scheduler-appointment-resize-indicator").hide(),n.addClass(b.toTP("jqx-scheduler-feedback-appointment jqx-disableselect")),a.find(".jqx-scheduler-appointment-duration-status").hide(),a.addClass(b.toTP("jqx-scheduler-feedback-appointment")),a.addClass(b.toTP("jqx-scheduler-feedback-drag-appointment")),p?a.css("z-index",401):a.css("z-index",400)};if(q(b.feedback),q(b.pinnedfeedback),"monthView"!=b._views[b._view].type||p){if(b.table.append(b.feedback),1==b.tableRows?b.pinnedtable.append(b.pinnedfeedback):b.table.append(b.pinnedfeedback),b.feedback.css("left",o.left),b.feedback.css("top",o.top),b.pinnedfeedback.css("left",o.left),b.pinnedfeedback.css("top",o.top),"monthView"==b._views[b._view].type&&b.isTouchDevice()){
-b.feedbacks=new Array;for(var r=0;r<6;r++)b.feedbacks.push(b.feedback.clone(!0)),a(b.feedbacks[r]).hide(),b.table.append(a(b.feedbacks[r]))}}else{b.feedbacks=new Array;for(var r=0;r<6;r++)b.feedbacks.push(b.feedback.clone(!0)),a(b.feedbacks[r]).hide(),b.table.append(a(b.feedbacks[r]))}}if(b.dragging){var m=b.dragging(h,l,b.feedback);if(!1===m)return!0}var f=a(l).position();if(b.endDrag)var s=b.feedback.css("left"),t=b.feedback.css("top"),u=b.feedback.width(),v=b.feedback.height;h||(h=b.selectedJQXAppointment),h||(b.selectAppointment(b.uiappointments[0].id),h=b.selectedJQXAppointment);var w=h.resourceId,x=b._resources.indexOf(w);b.resources&&"none"==b.resources.orientation&&(x=-1);var y=!1,z=b.isTouchDevice();if(z&&b.touchMode!==!0&&null==b._dragCell&&!(b.leftResize||b.rightResize||b.topResize||b.bottomResize||b.resizing))switch(i){case"dayView":case"weekView":var k=h.duration().days()>=1||h.allDay;k?(d>=b.selectedAppointmentBounds.left-15&&d<=b.selectedAppointmentBounds.left+15&&(y=!0,b.leftResize=!0),d>=b.selectedAppointmentBounds.left+b.selectedAppointmentBounds.width-15&&d<=b.selectedAppointmentBounds.left+b.selectedAppointmentBounds.width+15&&(y=!0,b.rightResize=!0)):(e>=b.selectedAppointmentBounds.top-15&&e<=b.selectedAppointmentBounds.top+15&&(y=!0,b.topResize=!0),e>=b.selectedAppointmentBounds.top-15+b.selectedAppointmentBounds.height&&e<=b.selectedAppointmentBounds.top+b.selectedAppointmentBounds.height+15&&(y=!0,b.bottomResize=!0));break;default:d>=b.selectedAppointmentBounds.left-15&&d<=b.selectedAppointmentBounds.left+15&&(y=!0,b.leftResize=!0),d>=b.selectedAppointmentBounds.left+b.selectedAppointmentBounds.width-15&&d<=b.selectedAppointmentBounds.left+b.selectedAppointmentBounds.width+15&&(y=!0,b.rightResize=!0)}if(z&&(b.leftResize||b.rightResize||b.topResize||b.bottomResize||b.resizing)||y){if(l.getAttribute("data-view")!=x+1&&b._resources.length>0&&"none"!=b.resources.orientation)return!0;var A=b._getDateByString(l.getAttribute("data-date"));if(A<b.min.toDate()||A>b.max.toDate())return;b._handleResize(d,e,l,f,h),b._oldResizeTD=l}else if(!z&&"row-resize"==b.selectedAppointment[0].style.cursor||"col-resize"==b.selectedAppointment[0].style.cursor||b.resizing){if(l.getAttribute("data-view")!=x+1&&b._resources.length>0&&b.resources&&"none"!=b.resources.orientation)return!0;var A=b._getDateByString(l.getAttribute("data-date"));if(A<b.min.toDate()||A>b.max.toDate())return;b._handleResize(d,e,l,f,h),b._oldResizeTD=l}else{if(!h.draggable)return b._removeFeedbackAndStopResize(),!0;if(b._dragCell==l)return b._startTimers(d,e,h),b.isTouchDevice()&&b.touchMode!==!0?(c.stopPropagation(),!1):void 0;var A=b._getDateByString(l.getAttribute("data-date"));if(A<b.min.toDate()||A>b.max.toDate())return;var B=h.duration();if(i.indexOf("month")>=0&&new a.jqx.date(A).add(B)>b.max)return;var C="hidden"==b.vScrollBar[0].style.visibility?0:6+b.vScrollBar.outerWidth();if(b._dragCell=l,b.feedback[0].style.left=2+f.left+"px",b.feedback[0].style.top=2+f.top+"px","dayView"===i||"weekView"===i){b.pinnedfeedback.css("left",2+f.left),b.pinnedfeedback.css("top",2+f.top);var D=0;if(l.getAttribute("data-end-date")){var E=b.appointmentsMinHeight;if(b.isTouchDevice()&&(E=b.touchAppointmentsMinHeight),j.appointmentHeight&&(E=j.appointmentHeight),k=h.duration().days()>=1||h.allDay,b.feedback.css("top",2+f.top+E),b.pinnedfeedback.css("top",2+f.top+18),"dayView"==i){var F=b.selectedAppointment.coord().left-9;b.feedback.css("left",F),b.pinnedfeedback.css("left",F)}if(k){if(b.pinnedfeedback.css("top",h.elements[0].y),D=b.selectedAppointment.width(),2+f.left+D>b.host.width()-C){var G=2+f.left+D-b.host.width()+C+6;D-=G}b.feedback.width(D),b.feedback.height(E),b.pinnedfeedback.width(D),b.pinnedfeedback.height(E)}else D=a(l).width()-4,b.feedback.width(D),b.feedback.height(E),b.pinnedfeedback.width(D),b.pinnedfeedback.height(E);b.feedback.hide(),b.pinnedfeedback.show()}else{b.feedback.show(),b.pinnedfeedback.hide();var H=2,I=j.timeRuler&&j.timeRuler.scale;switch(I){case"sixtyMinutes":case"hour":H=1;break;case"thirtyMinutes":case"halfHour":H=2;break;case"fifteenMinutes":case"quarterHour":H=4;break;case"tenMinutes":H=6;break;case"fiveMinutes":H=12}D=a(l).width()-4,b.feedback.width(D),k=h.duration().days()>=1||h.allDay,k?b.feedback.height(a(l).height()-6):b.feedback.height(b.selectedAppointment.height())}b._startTimers(d,e,h)}else if("monthView"===i){b.feedback.css("left",1+f.left);var J=b.selectedAppointmentTableBounds,K=parseInt(J.top);K>f.top&&K<f.top+l.offsetHeight?b.feedback.css("top",K+"px"):b.feedback.css("top",b.selectedAppointment.height()+f.top-2),b.isTouchDevice()&&b.feedback.css("top",f.top+2),D=b.selectedAppointment.width(),b.feedback.width(D),b.feedback.height(b.selectedAppointment.height()),b._startTimers(d,e,h)}else if("timelineDayView"===i||"timelineMonthView"===i||"timelineWeekView"===i){var J=b.selectedAppointmentTableBounds,K=parseInt(J.top);K>f.top&&K<f.top+l.offsetHeight&&b.feedback.css("top",K+"px"),b._startTimers(d,e,h)}}if(b.endDrag){var m=b.endDrag(h,l,b.feedback);return m||b.feedback.width(u),b.feedback.height(v),b.feedback.css("top",t),b.feedback.css("left",s),!0}if(b.isTouchDevice()&&b.touchMode!==!0)return c.stopPropagation(),!1}});var h=function(a){if(b.isMouseDown=!1,b.dragOrResize=!1,b.contextMenu&&b.menu&&3!==a.which&&(b.menu.jqxMenu("close"),b._hasOpenedMenu=!1),3===a.which)return!0;if(b.selectedAppointment&&b.feedback){if(b.editRecurrenceDialog.jqxWindow("isOpen"))return;b._handleMouseUp(b.selectedJQXAppointment,b._dragCell,b.resizing)}};if(this.addHandler(a(document),g,function(a){return h(a)}),!this.isTouchDevice())try{if((""!=document.referrer||window.frameElement)&&null!=window.top&&window.top!=window.self){var i=null;if(window.parent&&document.referrer&&(i=document.referrer),i&&i.indexOf(document.location.host)!=-1){var j=function(a){if(!b.disabled)return h(a)};b.addHandler(a(window.top.document),"mouseup.jqxscheduler"+b.element.id,j)}}}catch(a){}this.addHandler(this.host,f,function(c){var d=c.pageX,e=c.pageY;if(b.disabled||3===c.which)return!0;if(b.selectedAppointment&&b.isMouseDown)return!0;if(b.hScrollInstance.isScrolling()||b.vScrollInstance.isScrolling())return!0;if(b._hasOpenedMenu)return!0;if("none"!==b.overlay[0].style.display)return!0;var f=null;c.target.className.indexOf("jqx-scheduler-appointment")>=0&&c.target.className.indexOf("jqx-scheduler-appointment-inner-content")==-1&&c.target.className.indexOf("jqx-scheduler-appointment-content")==-1&&c.target.className.indexOf("jqx-scheduler-appointment-resize-indicator")==-1&&(f=c.target);for(var g=c.target,h=0;h<4&&g.parentNode;h++)g.className.indexOf("jqx-scheduler-appointment")>=0&&g.className.indexOf("jqx-scheduler-appointment-innter-content")==-1&&g.className.indexOf("jqx-scheduler-appointment-content")==-1&&g.className.indexOf("jqx-scheduler-appointment-resize-indicator")==-1&&(f=g),g=g.parentNode;if(f){var i=b._views[b._view].type,j=(b._views[b._view],b.getJQXAppointmentByElement(f));if(j.resizable){var k=j.duration(),l=j.allDay||k.days()>=1||23==k.hours()&&59==k.minutes&&59==k.seconds,m=a(f).coord(),n=a(f).position();b.selectedAppointmentBounds={top:m.top,left:m.left,width:a(f).width(),height:a(f).height()},b.selectedAppointmentTableBounds={top:n.top,left:n.left,width:a(f).width(),height:a(f).height()};var o=b.selectedAppointmentBounds;if("weekView"==i||"dayView"==i)l?"dayView"!=i?d>=o.left-3&&d<=o.left+6?(f.style.cursor="col-resize",b.leftResize=!0,b.rightResize=!1):d>=o.left+o.width-6&&d<=o.left+o.width+3?(f.style.cursor="col-resize",b.leftResize=!1,b.rightResize=!0):f.style.cursor="pointer":f.style.cursor="pointer":e>=o.top-3&&e<=o.top+6?(f.style.cursor="row-resize",b.topResize=!0,b.bottomResize=!1):e>=o.top+o.height-6&&e<=o.top+o.height+3?(f.style.cursor="row-resize",b.topResize=!1,b.bottomResize=!0):f.style.cursor="pointer";else if("monthView"==i&&j.elements.length>1)for(var p=b.table.coord(),h=0;h<j.elements.length;h++){var q=j.elements[h],o={top:p.top+q.y,left:p.left+q.x,width:q.width,height:q.height};if(0==h&&!b.rtl||h==j.elements.length-1&&b.rtl)if(d>=o.left-3&&d<=o.left+6){if(e>=o.top&&e<=o.top+o.height){f.style.cursor="col-resize",b.leftResize=!0,b.rightResize=!1,b.selectedAppointment=a(f);break}f.style.cursor="pointer"}else f.style.cursor="pointer";else if(h==j.elements.length-1&&!b.rtl||0==h&&b.rtl)if(d>=o.left+o.width-6&&d<=o.left+o.width+3){if(e>=o.top&&e<=o.top+o.height){f.style.cursor="col-resize",b.leftResize=!1,b.rightResize=!0,b.selectedAppointment=a(f);break}f.style.cursor="pointer"}else f.style.cursor="pointer"}else d>=o.left-3&&d<=o.left+6?(f.style.cursor="col-resize",b.leftResize=!0,b.rightResize=!1):d>=o.left+o.width-6&&d<=o.left+o.width+3?(f.style.cursor="col-resize",b.leftResize=!1,b.rightResize=!0):f.style.cursor="pointer"}}if(!b.enableHover)return!0;if("td"===c.target.nodeName.toLowerCase())var r=c.target;else var r=b.findCell(d,e);if(!r)return!0;if(b._removeHoveredCell(),b.renderedRecords&&0===b.renderedRecords.length)return!0;if(b.isMouseDown){if(Math.abs(b.mousecaptureposition.left-d)>3||Math.abs(b.mousecaptureposition.top-e)>3){if(0===b.mousecaptureposition.clickedcell.length)return void(b.selectionarea[0].style.visibility="hidden");b.lastHoveredCell!=r&&(b._selectRangeTimer&&clearTimeout(b._selectRangeTimer),b._selectRangeTimer=setTimeout(function(){var a=b._views[b._view].type;"agendaView"!=a&&b._selectRange(r,b.mousecaptureposition.clickedcell[0])},1)),b.lastHoveredCell=r}}else if(!f){if(1==b.rows.length&&1==b.rows[0].cells.length)return!0;b._hoverCell(r)}return!0}),this.addHandler(a(document),"keydown.jqxscheduler"+b.element.id,function(a){if(b.focused&&a.ctrlKey&&68==a.keyCode)return!1}),this.addHandler(this.host,"keydown",function(a){return b._handleKey(a)}),a.jqx.browser.msie&&a.jqx.browser.version<9&&this.addHandler(this.table,"dblclick",function(a){b.table.trigger("mousedown",a)});var k=function(c){var d=(c.target,null);if(b.disabled)return!0;b.menu||3!=c.which||b._initMenu();var e=(b.table.coord(),c.pageX),f=c.pageY;if(a.jqx.browser.msie&&a.jqx.browser.version<9&&arguments&&2==arguments.length&&(e=arguments[1].pageX,f=arguments[1].pageY),b.isTouchDevice()){var g=a.jqx.position(c);if(e=g.left,f=g.top,isNaN(e)||isNaN(f)){var g=a.jqx.position(c.originalEvent);e=g.left,f=g.top}}b.mouseDown={top:f,left:e};var d=b.findCell(e,f);if("td"===c.target.nodeName.toLowerCase())var d=c.target;else var d=b.findCell(e,f);var h=b._views[b._view].type,i=b._views[b._view];if("monthView"===h&&i.weekViewNavigation&&d&&d.getAttribute("data-time-slot")){var j=b._getDateByString(d.getAttribute("data-date")),k=new a.jqx.date(j);b.date=k,b.setView("weekView")}if("monthView"===h&&i.dayViewNavigation){var l=a(d).coord().top;if(d&&f>=l&&l+16>=f){var j=b._getDateByString(d.getAttribute("data-date")),k=new a.jqx.date(j);b.date=k,b.setView("dayView")}}if("span"===c.target.nodeName.toLowerCase()&&(c.target.className.indexOf("jqx-icon-arrow-down")>=0||c.target.className.indexOf("jqx-icon-close")>=0))return c.target.mousedown&&c.target.mousedown(),!0;var m=a(d).parent(),n=m.attr("data-key");b.mousecaptureposition={left:c.pageX,top:c.pageY,clickedrow:a(m).index(),clickedcell:a(d)},3!==c.which?(b.isMouseDown=!0,b.isMouseDownDate=new Date):b.isMouseDown=!1,b.contextMenu&&b.menu&&3!==c.which&&(b.menu.jqxMenu("close"),b._hasOpenedMenu=!1);var o=function(a){if(3===c.which&&b.contextMenu&&b.menu){a?b.menu.find("li:first").show():b.menu.find("li:first").hide();var d=b.menu.coord();if("block"==b.menu.css("display")&&d.left==c.pageX&&d.top==c.pageY)return b._hasOpenedMenu=!0,c.preventDefault(),void c.stopPropagation();b.menuOpening=!0,b.menu.jqxMenu("open",c.pageX,c.pageY),b.menuOpening=!1,b._hasOpenedMenu=!0,c.preventDefault(),c.stopPropagation(),setTimeout(function(){b.menu.jqxMenu("focus")},50)}},p=function(){for(var a=0;a<A.length;a++)for(var b=A[a].cells,c=0;c<b.length;c++)b[c].removeAttribute("data-selected")},q=c.target.className.indexOf("jqx-scheduler-appointment")>=0&&c.target.className.indexOf("jqx-scheduler-appointment-duration-status")==-1&&c.target.className.indexOf("jqx-scheduler-appointment-inner-content")==-1&&c.target.className.indexOf("jqx-scheduler-appointment-status")==-1&&c.target.className.indexOf("jqx-scheduler-appointment-resize-indicator")==-1&&c.target.className.indexOf("jqx-scheduler-appointment-content")==-1?a(c.target):a(c.target).parents(".jqx-scheduler-appointment");if(0==q.length&&(q=null),q&&q[0].className.indexOf("feedback")==-1){if(q.parents(".jqx-scheduler-month-cell-popup").length>0)return!0;b.mouseDownPosition={top:f,left:e};var r=a(q).coord();b.selectedAppointmentBounds={top:r.top,left:r.left,width:a(q).width(),height:a(q).height()};var g=a(q).position();b.selectedAppointmentTableBounds={top:g.top,left:g.left,width:a(q).width(),height:a(q).height()},b._dragStartCell||(b._dragStartCell=b.findCell(r.left,r.top));var s=b.getJQXAppointmentByElement(q);b._selectAppointment(s,q,"mouse"),b._raiseEvent("appointmentClick",{appointment:s.boundAppointment}),b.clearSelection();var t=(new Date).getTime(),u=300;if(a.jqx.browser.msie&&a.jqx.browser.version<9&&(u=1e3),b.clickTime||(b.clickTime=new Date),t-b.clickTime.getTime()<u&&b._lastSelectedAppointment&&s.id==b._lastSelectedAppointment.id&&3!=c.which){if(!s.readOnly&&!b.editRecurrenceDialog.jqxWindow("isOpen")&&(!b._editDialog||b._editDialog&&!b._editDialog.jqxWindow("isOpen"))){var v=b._initDialog(s);v!==!1&&b._openDialog()}b.mouseDownPosition=null,b.isMouseDown=!1,c.preventDefault&&c.preventDefault(),b._raiseEvent("appointmentDoubleClick",{appointment:s.boundAppointment})}else s.readOnly||3!==c.which&&b.focus();return b._lastSelectedAppointment=s,c.preventDefault&&c.preventDefault(),c.stopPropagation(),b.clickTime=new Date,void(s.readOnly||3==c.which&&o(!0))}if(3===c.which){var w=b.getSelection();if(null!==w)o(!1);else{b.clearAppointmentsSelection(),d.setAttribute("data-selected","true"),b._lastSelectedCell=d,b.focusedCell=d,b._updateCellsSelection(d),o(!1);var x=new a.jqx.date(d.getAttribute("data-date"),b.timeZone);b._raiseEvent("cellClick",{cell:d,date:x})}}else 3!=c.which&&b.clearAppointmentsSelection();if("agendaView"==b.view){var q=c.target.className.indexOf("jqx-scheduler-agenda-appointment")!=-1;if(q){q=c.target;var s=b.getJQXAppointmentByElement(q);b._selectAppointment(s,q,"mouse"),b._raiseEvent("appointmentClick",{appointment:s.boundAppointment});var t=(new Date).getTime(),u=300;if(a.jqx.browser.msie&&a.jqx.browser.version<9&&(u=1e3),b.clickTime||(b.clickTime=new Date),t-b.clickTime.getTime()<u&&b._lastSelectedAppointment&&s.id==b._lastSelectedAppointment.id&&3!=c.which){if(!s.readOnly&&!b.editRecurrenceDialog.jqxWindow("isOpen")&&(!b._editDialog||b._editDialog&&!b._editDialog.jqxWindow("isOpen"))){var v=b._initDialog(s);v!==!1&&b._openDialog()}b.mouseDownPosition=null,b.isMouseDown=!1,c.preventDefault&&c.preventDefault(),b._raiseEvent("appointmentDoubleClick",{appointment:s.boundAppointment})}b._lastSelectedAppointment=s,c.preventDefault&&c.preventDefault(),c.stopPropagation(),b.clickTime=new Date,s.readOnly||3==c.which&&o(!0)}}if(void 0!==n&&3!=c.which){b.clickedTD=d;var x=new a.jqx.date(d.getAttribute("data-date"),b.timeZone);b._raiseEvent("cellClick",{cell:d,date:x});var y=b.rowinfo[n],z=!1;if(y){var t=(new Date).getTime(),u=300;if(b.clickTime||(b.clickTime=new Date),b.focus(),b._lastSelectedCell&&"true"==b._lastSelectedCell.getAttribute("data-selected")&&"true"===d.getAttribute("data-selected")&&t-b.clickTime.getTime()<u){var x=new a.jqx.date(d.getAttribute("data-date"),b.timeZone);b._raiseEvent("cellDoubleClick",{cell:d,date:x}),z=!0,b._initDialog(),b._openDialog(),c.preventDefault&&c.preventDefault()}}var A=b.rows;if("true"!=d.getAttribute("data-selected")||c.shiftKey||t-b.clickTime.getTime()>u){if("true"==d.getAttribute("data-time-slot"))return;if(c.shiftKey||(b.shiftSelectedCell=null),c.shiftKey&&b._lastSelectedCell&&"agendaView"!=h&&(b.shiftSelectedCell||(b.shiftSelectedCell=b._lastSelectedCell),d.getAttribute("data-view")===b.shiftSelectedCell.getAttribute("data-view")&&p(),b._selectRange(d,b.shiftSelectedCell)),!c.shiftKey){p();var j=b._getDateByString(d.getAttribute("data-date"));j>=b.min.toDate()&&j<=b.max.toDate()?d.setAttribute("data-selected","true"):d.setAttribute("data-selected","false")}a('[data-key="'+n+'"]').removeClass(b.toTP("jqx-scheduler-selected-appointment")),b.selectedAppointment=null;var j=b._getDateByString(d.getAttribute("data-date"));j>=b.min.toDate()&&j<=b.max.toDate()&&(b._lastSelectedCell=d,b.focusedCell=d),b._updateCellsSelection(d),b.openedMonthCellPopup&&b.openedMonthCellPopup.remove()}b.clickTime=new Date,c.stopPropagation&&c.stopPropagation()}};this.addHandler(this.pinnedtable,e,function(a){var b=k(a);if(void 0!=b)return b}),this.addHandler(this.table,e,function(a){var b=k(a);if(void 0!=b)return b})},moveAppointment:function(b,c,d,e,f){var g=this,h=e.getAttribute("data-end-date");if(b){if(g.editRecurrenceDialog.jqxWindow("isOpen"))return;clearInterval(g._verticalIntervalDragVelocity),clearInterval(g._horizontalIntervalDragVelocity),clearInterval(g._intervalDrag),clearInterval(g._horizontalIntervalDrag);var i=b.duration(),j=b.duration().days()>=1||b.allDay,k=function(k){if(!f){var l=g._views[g._view].type,m=g._views[g._view],n=c;if(b.from=n,"dayView"===l||"weekView"===l)if(j||h){if(!j&&h)b.to=a.jqx.scheduler.utilities.getEndOfDay(n),b.allDay=!0;else if(j&&h)b.to=n.add(i);else if(j&&!h){var o=30,p=m.timeRuler&&m.timeRuler.scale;switch(p){case"sixtyMinutes":case"hour":o=60;break;case"fifteenMinutes":case"quarterHour":o=15;break;case"tenMinutes":o=10;break;case"fiveMinutes":o=5}b.to=n.addMinutes(o),b.allDay=!1}}else b.to=n.add(i),b.allDay=!1;else"monthView"===l?b.to=n.add(i):"timelineDayView"!==l&&"timelineWeekView"!==l&&"timelineMonthView"!==l||(b.to=n.add(i))}if(g._saveChangesAfterDragOrResize(k,b,e,f),null!=d&&(b.resourceId=d),g.table.find(".jqx-icon-arrow-down").hide(),b.allDay||j)g._renderrows();else{var q=g.getViewStart(),r=a.jqx.scheduler.utilities.getEndOfDay(g.getViewEnd());g._prepareAppointmentsInView(q,r),g._renderAppointments(q,r)}g._raiseEvent("appointmentChange",{appointment:b.boundAppointment}),g.changedAppointments[b.id]={type:"Update",appointment:b.boundAppointment},g._ensureAppointmentVisible(g.selectedJQXAppointment)};k(b.isRecurrentAppointment()?!1:null)}},getAppointmentProperty:function(a,b){var c=null;if(this.appointmentsByKey[a]&&(c=this.appointmentsByKey[a].jqxAppointment),c)return c[b]},setAppointmentProperty:function(b,c,d){var e=this,f=null;if(this.appointmentsByKey[b]&&(f=this.appointmentsByKey[b].jqxAppointment),f)switch(f[c]=d,e.changedAppointments[b]={type:c,appointment:f.boundAppointment},b){case"draggable":case"resizable":break;case"background":case"color":case"borderColor":case"status":case"tooltip":case"subject":case"location":case"description":case"style":var g=e.getViewStart(),h=a.jqx.scheduler.utilities.getEndOfDay(e.getViewEnd());e._prepareAppointmentsInView(g,h),e._renderAppointments(g,h);break;case"hidden":case"timeZone":if(f.isAllDayAppointment())e._renderrows();else{var g=e.getViewStart(),h=a.jqx.scheduler.utilities.getEndOfDay(e.getViewEnd());e._prepareAppointmentsInView(g,h),e._renderAppointments(g,h)}break;default:e._renderrows()}},deleteAppointment:function(a){this.appointmentsByKey[a]&&this._deleteAppointment(this.appointmentsByKey[a].jqxAppointment)},_deleteAppointment:function(a){var b=this;if(a.rootAppointment){if(a.isException()){for(var c=a.rootAppointment?a.rootAppointment.exceptions:a.exceptions,d=0;d<c.length;d++)if(c[d].occurrenceFrom.equals(b.editAppointment.occurrenceFrom)){c[d]=a;break}}else null!=a.rootAppointment?(a.rootAppointment.exceptions.push(b.editAppointment),a.rootAppointment.recurrenceException.push(b.editAppointment.occurrenceFrom)):(a.exceptions.push(b.editAppointment),a.recurrenceException.push(b.editAppointment.occurrenceFrom));return a.hidden=!0,void b._renderrows()}b._raiseEvent("appointmentDelete",{appointment:a.boundAppointment});var e=a.id;delete b.appointmentsByKey[e];for(var f=-1,d=0;d<b.appointments.length;d++)if(b.appointments[d]==a.boundAppointment||b.appointments[d].id==a.boundAppointment.id){f=d;break}f!=-1&&b.appointments.splice(f,1),f=-1;for(var d=0;d<b.uiappointments.length;d++)if(b.uiappointments[d]==a||b.uiappointments[d].id==a.id){f=d;break}f!=-1&&b.uiappointments.splice(f,1),b.selectedJQXAppointment==a&&(b.clearAppointmentsSelection(),b.uiappointments[f+1]?b.selectAppointment(b.uiappointments[f+1].id):b.uiappointments[f-1]?b.selectAppointment(b.uiappointments[f-1].id):b.uiappointments[0]&&b.selectAppointment(b.uiappointments[0].id)),b.changedAppointments[e]={type:"Delete",appointment:a.boundAppointment},b._renderrows()},addAppointment:function(b){var c=this;if(b.scheduler||(b.scheduler=this),!b.duration)if((b.from||b.to)&&b.appointmentObject){var d=new a.jqx.scheduler.appointment;for(var e in b)d[e]=b[e];b=d}else{var f=b,g={},h=["from","to","id","style","description","location","subject","background","color","borderColor","recurrencePattern","recurrenceException","draggable","resizable","tooltip","hidden","allDay","timeZone","ownerId","resourceId"];for(var e in c.appointmentDataFields){var i=c.appointmentDataFields[e],j=f[i];if("from"!=e&&"to"!=e||(j=new a.jqx.date(j)),"style"==e&&j){var k=c.getAppointmentColors(j);g.color=k.color,g.background=k.background,g.borderColor=k.border}if("recurrencePattern"==e&&j&&(j=new a.jqx.scheduler.recurrencePattern(j),j.timeZone=f.timeZone||c.timeZone),"recurrenceException"==e){var l=new Array;if(j){j.indexOf("EXDATE:")>=0&&(j=j.substring(j.indexOf("EXDATE:")+7));var m=new Array;j.indexOf(",")>=0?m=j.split(","):m.push(j);for(var n=0;n<m.length;n++){var o=m[n];if(o.indexOf(";")>=0){var p=o.split(";")[1];o=o.split(";")[0],p.toLowerCase().indexOf("display")>=0&&p.toLowerCase().indexOf("none")&&(g.hidden=!0)}try{var q=a.jqx.scheduler.utilities.untilStringToDate(o);"Invalid Date"!=q&&(q=g.timeZone?new a.jqx.date(q,g.timeZone):c.timeZone?q.toTimeZone(c.timeZone):new a.jqx.date(q))}catch(b){var q=new a.jqx.date(o,c.timeZone)}l.push(q)}}j=l}g[e]=j}for(var r in h){var e=h[r];if(void 0==g[e]){var j="";if("originalData"==e)continue;"ownerId"==e&&(j=null),"timeZone"==e&&(j=null),"recurrencePattern"==e&&(j=null),"recurrenceException"==e&&(j=null),"allDay"==e&&(j=!1),"draggable"==e&&(j=!0),"resizable"==e&&(j=!0),"hidden"==e&&(j=!1),"resourceId"==e&&(j=null),"from"==e&&(j=new a.jqx.date),"to"==e&&(j=(new a.jqx.date).addHours(1)),g[e]=j}}g.originalData=f,g.scheduler=this;var b=new a.jqx.scheduler.appointment(g);g.timeZone&&(b.from=b.from.toTimeZone(g.timeZone),b.to=b.to.toTimeZone(g.timeZone)),c.timeZone?(g.timeZone||(b.timeZone=c.timeZone),b.from=b.from.toTimeZone(c.timeZone),b.to=b.to.toTimeZone(c.timeZone)):(b.from=b.from.toTimeZone(null),b.to=b.to.toTimeZone(null))}var e=c.dataview.generatekey();b.id=e,c.appointmentsByKey[e]=b,c.appointments.push(b);var s={},t={};for(var u in c.appointmentDataFields){var i=c.appointmentDataFields[u],j=b[u];s[u]=j,"from"!=u&&"to"!=u||(j=j.toDate?j.toDate():new a.jqx.date(j).toDate()),t[i]=j}s.originalData=t,b.boundAppointment=s,s.jqxAppointment=b,b.jqxAppointment=b,c._raiseEvent("appointmentAdd",{appointment:b.boundAppointment}),c.uiappointments.push(b),c.changedAppointments[e]={type:"Add",appointment:b.boundAppointment},c.hiddenResources&&c.hiddenResources[b.resourceId]?c.hideAppointmentsByResource(b.resourceId):c._renderrows(),c._selectAppointment(b),c._lastSelectedAppointment=b},_updateCellsSelection:function(){var a=this,b=a.rows,c=0,d=0;c>0&&a.rtl&&(c=0,d=1);for(var e=0;e<b.length;e++)for(var f=b[e].cells,g=c;g<f.length-d;g++){var h=f[g];if("true"==h.getAttribute("data-selected")){var i=h.jqxClassName||h.className;if(i.indexOf("jqx-fill-state-pressed")>=0){h!=a.focusedCell?(i=i.replace(" jqx-scheduler-cell-focus",""),i=i.replace(" jqx-scheduler-cell-focus-"+a.theme,"")):h==a.focusedCell&&a.focused&&(i=i.replace(" jqx-scheduler-cell-focus",""),i=i.replace(" jqx-scheduler-cell-focus-"+a.theme,""),a.selectedAppointment||(i=i+=" "+a.toTP("jqx-scheduler-cell-focus"))),h.className!=i&&(h.className=i),h.jqxClassName=i;continue}i=i.replace(" jqx-fill-state-pressed",""),i=i.replace(" jqx-fill-state-pressed-"+a.theme,""),i=i.replace(" jqx-scheduler-cell-focus",""),i=i.replace(" jqx-scheduler-cell-focus-"+a.theme,""),i=i.replace(" jqx-grid-cell-selected",""),i=i.replace(" jqx-grid-cell-selected-"+a.theme,""),i=i.replace(" jqx-scheduler-cell-selected",""),i=i.replace(" jqx-scheduler-cell-selected-"+a.theme,""),i=i+=" "+a.toTP("jqx-fill-state-pressed jqx-grid-cell-selected jqx-scheduler-cell-selected"),h==a.focusedCell&&a.focused&&!a.selectedAppointment&&(i=i+=" "+a.toTP("jqx-scheduler-cell-focus")),h.className!=i&&(h.className=i),h.jqxClassName=i}else{var i=h.jqxClassName||h.className;if(i.indexOf("jqx-fill-state-pressed")==-1){h!=a.focusedCell?(i=i.replace(" jqx-scheduler-cell-focus",""),i=i.replace(" jqx-scheduler-cell-focus-"+a.theme,"")):h==a.focusedCell&&a.focused&&(i=i.replace(" jqx-scheduler-cell-focus",""),i=i.replace(" jqx-scheduler-cell-focus-"+a.theme,""),a.selectedAppointment||(i=i+=" "+a.toTP("jqx-scheduler-cell-focus"))),h.className!=i&&(h.className=i),h.jqxClassName=i;continue}h==a.focusedCell&&a.focused&&(i=i.replace(" jqx-scheduler-cell-focus",""),i=i.replace(" jqx-scheduler-cell-focus-"+a.theme,""),a.selectedAppointment||(i=i+=" "+a.toTP("jqx-scheduler-cell-focus")),h.className!=i&&(h.className=i),h.jqxClassName=i),i=i.replace(" jqx-fill-state-pressed",""),i=i.replace(" jqx-fill-state-pressed-"+a.theme,""),i=i.replace(" jqx-scheduler-cell-focus",""),i=i.replace(" jqx-scheduler-cell-focus-"+a.theme,""),i=i.replace(" jqx-grid-cell-selected",""),i=i.replace(" jqx-grid-cell-selected-"+a.theme,""),i=i.replace(" jqx-scheduler-cell-selected",""),i=i.replace(" jqx-scheduler-cell-selected-"+a.theme,""),h==a.focusedCell&&a.focused&&!a.selectedAppointment&&(i=i+=" "+a.toTP("jqx-scheduler-cell-focus")),h.className!=i&&(h.className=i),h.jqxClassName=i,h.removeAttribute("data-selected")}}},_getuikey:function(b,c){var d=null,e=this.table[0].rows;if(d=a(e[b]).attr("data-key"),a(e[b]).attr("data-role")){var f=a(e[b]);if("next"==c){for(;f;)if(f=f.next()){var g=f.attr("data-role");if(!g)return d=f.attr("data-key")}}else if("prev"==c)for(;f;)if(f=f.prev()){var g=f.attr("data-role");if(!g)return d=f.attr("data-key")}return null}return d},getRows:function(){var a=this._views[this._view].type,b=this._views[this._view],c="halfHour";b.timeRuler&&b.timeRuler.scale&&(c=b.timeRuler.scale);var d=24,e=this.showAllDayRow;if(b.timeRuler&&("dayView"===a||"weekView"===a)){var f=0,g=23;if(void 0!=b.timeRuler.scaleStartHour)var f=parseInt(b.timeRuler.scaleStartHour);if(void 0!=b.timeRuler.scaleEndHour)var g=parseInt(b.timeRuler.scaleEndHour);f<0&&(f=0),g<0&&(g=23),f>23&&(f=0),g>23&&(g=23),d=g-f+1,void 0!=b.timeRuler.showAllDayRow&&(e=b.timeRuler.showAllDayRow)}var h=new Array,i=0;switch(a){case"dayView":case"weekView":default:var i=2*d;if("hour"===c||"sixtyMinutes"===c)var i=d;else if("quarterHour"===c||"fifteenMinutes"===c)var i=4*d;else if("tenMinutes"===c)var i=6*d;else if("fiveMinutes"===c)var i=12*d;e&&i++;break;case"monthView":var i=6;break;case"timelineDayView":case"timelineWeekView":case"timelineMonthView":var i=1;break;case"agendaView":var i=this.appointments?this.appointments.length:0}for(var j=0;j<i;j++)h.push({uid:j});return h},_getDateByString:function(a){var b=a.split(" "),c=b[0].split("-"),d=b[1].split(":"),e=parseInt(c[0],10),f=parseInt(c[1],10)-1,g=parseInt(c[2],10),h=parseInt(d[0],10),i=parseInt(d[1],10),j=parseInt(d[2],10),k=new Date(e,f,g,h,i,j);return e<1970&&k.setFullYear(e,f,g),k},_getCellByDate:function(a,b,c){var d=this.rows;void 0===b&&(b=!1),void 0===c&&this.focusedCell&&(c=this.focusedCell.getAttribute("data-view"));for(var e=0;e<d.length;e++){var f=d[e];if(!f.element.getAttribute("data-group-row"))for(var g=0;g<f.cells.length;g++){var h=f.cells[g];if(null==h.getAttribute("rowspan")&&h.getAttribute("data-view")===c&&!(h.getAttribute("data-time-slot")||b&&null!=h.getAttribute("data-end-date"))){var i=h.getAttribute("data-date"),j=this._getDateByString(i);if(j.valueOf()==a.valueOf())return h}}}},_rendercelltexts:function(){var b=String.fromCharCode(119,119,119,46,106,113,119,105,100,103,101,116,115,46,99,111,109);if(location.hostname.indexOf(b.substring(4))==-1){this._gridRenderElement&&a(this._gridRenderElement).remove();var c=String.fromCharCode(83,80,65,78),d=String.fromCharCode(72,84,84,80,58,47,47),e=document.createElement(c);e.id=a.jqx.utilities.createId(),e.innerHTML=b,e.style.position="absolute",e.style.right="5px",e.style.bottom="5px",e.style.color="#909090",e.style.cursor="pointer",e.style.zIndex="999999",e.style.display="none",e.style.fontSize="9px",e.onmousedown=function(){open(d+b)},this.content[0].appendChild(e),this._gridRenderElement=e}},_handleKey:function(b){if(this._loading)return!0;var c=b.shiftKey,d=b.ctrlKey||b.metaKey,e=this,f=b.charCode?b.charCode:b.keyCode?b.keyCode:0;if(e._hasOpenedMenu)return 27==f?e.closeMenu():e.menu.jqxMenu("focus"),!0;if(13===f||e.selectedAppointment&&46==f){if(e.editRecurrenceDialog&&e.editRecurrenceDialog.jqxWindow("isOpen"))return!0;if(e._editDialog&&e._editDialog.jqxWindow("isOpen"))return!0;if(e.selectedAppointment){var g=e.getJQXAppointmentByElement(e.selectedAppointment);if(!g.readOnly)if(46==f){var h=e._initDialog(g,"delete");h!==!1&&e._openDialog()}else{var h=e._initDialog(g);h!==!1&&e._openDialog()}}else e._initDialog(),e._openDialog()}if(27===f&&e.dragOrResize){e.table.find(".jqx-icon-arrow-down").hide();var i=e.getViewStart(),j=a.jqx.scheduler.utilities.getEndOfDay(e.getViewEnd());return e._prepareAppointmentsInView(i,j),e._renderAppointments(i,j),e._removeFeedbackAndStopResize(),!1}var k=function(b){var f=e.selectedAppointment,g=e.getJQXAppointmentByElement(f),h=g.elements[0].cells[0].cell,i=g.elements[g.elements.length-1].cells[g.elements[g.elements.length-1].cells.length-1].cell,j=e.rows[e.rows.length-1].cells[e.rows[e.rows.length-1].cells.length-1];!c&&(c||d||"down"!=b&&"right"!=b)||(h=i);var k=e._views[e._view].type,l=(e._views[e._view],h);switch(b){case"left":var m=e.rowByCell[h.getAttribute("data-key")],n=m.indexOf(h);if(n>0&&!c)l=m.cells[n-1];else if("monthView"==k&&!c){var o=m.aboveRow;o&&(l=o.cells[o.cells.length-1])}break;case"right":var m=e.rowByCell[h.getAttribute("data-key")],n=m.indexOf(h);if(n<m.cells.length-1)l=m.cells[n+1];else if("monthView"==k){var p=m.belowRow;p&&(l=p.cells[0])}"monthView"==k&&!c&&d&&i==j&&(l=h);break;case"up":var m=e.rowByCell[h.getAttribute("data-key")],n=m.indexOf(h),o=m.aboveRow;o&&!c&&(l=o.cells[n]);break;case"down":var m=e.rowByCell[h.getAttribute("data-key")],n=m.indexOf(h),p=m.belowRow;p&&(l=p.cells[n])}var q=l.getAttribute("data-date"),r=new a.jqx.date(q,e.timeZone),k=a(l).attr("data-view"),s=e._resources[parseInt(k)-1];if(c){var k=e._views[e._view].type,t=(e._views[e._view],!1);"dayView"===k||"weekView"===k?h.getAttribute("data-end-date")?"left"==b&&(g.elements[0].cells.length>1||e.rtl)?(e.rtl?g.to=a.jqx.scheduler.utilities.getEndOfDay(r.addDays(1)):g.to=a.jqx.scheduler.utilities.getEndOfDay(r.addDays(-1)),t=!0):"right"==b&&((!e.rtl||e.rtl&&g.elements[0].cells.length>1)&&(g.to=a.jqx.scheduler.utilities.getEndOfDay(r)),t=!0):"up"==b&&g.elements[0].cells.length>1?(g.to=r,t=!0):"down"==b&&(g.to=r.addMinutes(e.getMinutesPerScale()),t=!0):k.indexOf("month")>=0?"left"==b&&(g.elements[0].cells.length>1||g.elements.length>1)?(g.to=a.jqx.scheduler.utilities.getEndOfDay(r.addDays(-1)),t=!0):"right"==b&&(g.to=a.jqx.scheduler.utilities.getEndOfDay(r),t=!0):!e.rtl&&"left"==b&&g.elements[0].cells.length>1||e.rtl&&"right"==b&&g.elements[0].cells.length>1?(g.to=r,e.rtl&&(g.to=r.addMinutes(e.getMinutesPerScale())),t=!0):(!e.rtl&&"right"==b||e.rtl&&"left"==b)&&(g.to=r.addMinutes(e.getMinutesPerScale()),e.rtl&&(g.to=g.to.addMinutes(e.getMinutesPerScale())),t=!0),t&&e.moveAppointment(g,r,s,l,!0)}else if(d)e.moveAppointment(g,r,s,l);else{e.clearAppointmentsSelection();
-var u=!0;"down"==b&&(u=!1),e.selectCell(r,u,k),e._ensureVisible(l)}if(e.selectedAppointment){e.selectedAppointment.removeClass(e.toTP("jqx-scheduler-selected-appointment"));var v=e.selectedAppointment.attr("data-key");a('[data-key="'+v+'"]').addClass(e.toTP("jqx-scheduler-selected-appointment")),e.clearSelection()}};if(b.altKey&&e._resourcesElements&&e._resources&&e._resources.length>0){var l=function(a){var b=e._resourcesElements.bottom[a];"on"==b.attr("data-toggle")?e.hideAppointmentsByResource(a):e.showAppointmentsByResource(a)},m=f>=49&&f<=58?m=f-48:-1;if(m>=1)return a.each(e._resources,function(a,b){if(a==m-1)return l(b),!1}),!1}if(b.ctrlKey){if(!e.selectedAppointment){if(37==f)return e.toolbarLeftButton.trigger("click"),e._ensureVisible(e.focusedCell),!1;if(39==f)return e.toolbarRightButton.trigger("click"),e._ensureVisible(e.focusedCell),!1}if(49==f)return e._setView(0),!1;if(50==f)return e._setView(1),!1;if(51==f)return e._setView(2),!1;if(52==f)return e._setView(3),!1;if(53==f)return e._setView(4),!1;if(54==f)return e._setView(5),!1;if(68==f)return e.dateTimeInput.jqxDateTimeInput("open"),!1;if(77==f)return e.openMenu(),!1}if(9==f)if(b.shiftKey)if(e.selectedAppointment){e.clearSelection();var n=e.selectedAppointment,g=e.getJQXAppointmentByElement(n);if(g){var o=e.tabKeyAppointments.indexOf(g);return o>0?(g=e.tabKeyAppointments[o-1],e._selectAppointment(g),e._lastSelectedAppointment=g,e._ensureAppointmentVisible(g),!1):(e.clearAppointmentsSelection(),e.focusedCell?!e.focusedCell||e.focusedCell.className.indexOf("-focus")!=-1||(e._updateCellsSelection(),e._ensureVisible(e.focusedCell),!1):(e._updateFocusedCell(),e._ensureVisible(e.focusedCell),!1))}}else if(e.focusedCell){if(e.focusedCell&&e.focusedCell.className.indexOf("-focus")==-1)return e._updateCellsSelection(),e._ensureVisible(e.focusedCell),!1}else e._updateFocusedCell(),e._ensureVisible(e.focusedCell);else{if(e.selectedAppointment){e.clearSelection();var n=e.selectedAppointment,g=e.getJQXAppointmentByElement(n),o=e.tabKeyAppointments.indexOf(g);return o<e.tabKeyAppointments.length-1?(g=e.tabKeyAppointments[o+1],e._selectAppointment(g),e._lastSelectedAppointment=g,e._ensureAppointmentVisible(g),!1):(e.clearAppointmentsSelection(),!0)}var g=e.tabKeyAppointments[0];if(g)return e._selectAppointment(g),e._lastSelectedAppointment=g,e._ensureAppointmentVisible(g),!1;if(!e.focusedCell)return e._updateFocusedCell(),e._ensureVisible(e.focusedCell),!1;if(e.focusedCell&&e.focusedCell.className.indexOf("-focus")==-1)return e._updateCellsSelection(),e._ensureVisible(e.focusedCell),!1}if(e.selectedAppointment){if(37==f?k("left"):38==f?k("up"):40==f?k("down"):39==f&&k("right"),f>=37&&f<=40)return!1}else{var p=this._lastSelectedCell;if(p){a(this._lastSelectedCell).parent()[0]||(this._lastSelectedCell=this.rows[0].cells[0],p=this._lastSelectedCell);var q=(this.rows,this._views[this._view].type),r=this._views[this._view],s="halfHour";r.timeRuler&&r.timeRuler.scale&&(s=r.timeRuler.scale);var t=function(c,d){var f=30;switch(s){case"sixtyMinutes":case"hour":f=60;break;case"thirtyMinutes":case"halfHour":f=30;break;case"fifteenMinutes":case"quarterHour":f=15;break;case"tenMinutes":f=10;break;case"fiveMinutes":f=5}var g=c.getAttribute("data-date"),h=function(a,c,d){if(a&&(null==a.getAttribute("rowspan")||"agendaView"==q)&&null==a.getAttribute("data-time-slot")){if(d<e.min||d>e.max)return;var f=e.rows,g=e._lastSelectedCell;if(e._lastSelectedCell=a,b.shiftKey&&e._lastSelectedCell?e.shiftSelectedCell||(e.shiftSelectedCell=p):b.shiftKey||(e.shiftSelectedCell=null),e.shiftSelectedCell)a.getAttribute("data-end-date")&&e.shiftSelectedCell.getAttribute("data-end-date")?(e.focusedCell=a,e._selectRange(a,e.shiftSelectedCell)):a.getAttribute("data-end-date")||e.shiftSelectedCell.getAttribute("data-end-date")?(e.focusedCell=g,e._lastSelectedCell=g):(e.focusedCell=a,e._selectRange(a,e.shiftSelectedCell));else{for(var h=0;h<f.length;h++){var i=f[h];if(!i.element.getAttribute("data-group-row"))for(var j=0;j<i.cells.length;j++){var c=i.cells[j];c.removeAttribute("data-selected","false")}}a.setAttribute("data-selected","true"),e.focusedCell=a}e._ensureVisible(e.focusedCell)}};new a.jqx.date(g,e.timeZone),c.getAttribute("data-view");switch(d){case"left":var i=e.rowByCell[c.getAttribute("data-key")],j=i.indexOf(c);if(j>0)var k=i.cells[j-1],l=new a.jqx.date(k.getAttribute("data-date"),e.timeZone);h(k,c,l);break;case"right":var i=e.rowByCell[c.getAttribute("data-key")],j=i.indexOf(c);if(j<i.cells.length-1)var k=i.cells[j+1],l=new a.jqx.date(k.getAttribute("data-date"),e.timeZone);h(k,c,l);break;case"up":var i=e.rowByCell[c.getAttribute("data-key")],j=i.indexOf(c),m=i.aboveRow;if(m){var k=m.cells[j];if(0==j&&k.getAttribute("rowspan"))for(var n=-1+e.rows.indexOf(i),k=c;n>=0;){if(e.rows[n].cells[0]!=k){k=e.rows[n].cells[0];break}n--}var l=new a.jqx.date(k.getAttribute("data-date"),e.timeZone);h(k,c,l)}break;case"down":var i=e.rowByCell[c.getAttribute("data-key")],j=i.indexOf(c),o=i.belowRow;if(o){var k=o.cells[j];if(0==j&&k.getAttribute("rowspan"))for(var n=1+e.rows.indexOf(i),k=c;n<e.rows.length;){if(e.rows[n].cells[0]!=k){k=e.rows[n].cells[0];break}n++}var l=new a.jqx.date(k.getAttribute("data-date"),e.timeZone);h(k,c,l)}break;case"home":var i=e.rowByCell[c.getAttribute("data-key")],j=i.indexOf(c),r=e.rows[0],k=r.cells[j],l=new a.jqx.date(k.getAttribute("data-date"),e.timeZone);h(k,c,l);break;case"end":var i=e.rowByCell[c.getAttribute("data-key")],j=i.indexOf(c),t=e.rows[e.rows.length-1],k=t.cells[j],l=new a.jqx.date(k.getAttribute("data-date"),e.timeZone);h(k,c,l)}e._updateCellsSelection()},u=function(){t(p,"home")},v=function(){t(p,"end")};return 36==f||d&&38==f?(u(),!1):35==f||d&&40==f?(v(),!1):37==f?(e.selectedAppointment?k(p,"left"):t(p,"left"),!1):38==f?(e.selectedAppointment?k(p,"up"):t(p,"up"),!1):40==f?(e.selectedAppointment?k(p,"down"):t(p,"down"),!1):39==f?(e.selectedAppointment?k(p,"right"):t(p,"right"),!1):void 0}}},getSelectedCells:function(){for(var a=this,b=a.rows,c=b.length,d=new Array,e=0;e<c;e++)for(var f=b[e].cells,g=0;g<f.length;g++)f[g].getAttribute("data-selected")&&d.push(f[g]);return d.sort(function(b,c){return a._sortByDate(b,c)})},getSelection:function(){var b=this,c=b.getSelectedCells();if(0==c.length)return null;var d=c[0].getAttribute("data-date"),e=c[c.length-1].getAttribute("data-date"),f=b.getMinutesPerScale(),g=b._views[b._view].type;g.toLowerCase().indexOf("month")>=0&&(f=0),c[0].getAttribute("data-end-date")&&(f=0),e=new a.jqx.date(e,b.timeZone).addMinutes(f);var g=parseInt(c[0].getAttribute("data-view"))-1,h=b._resources[g];return b._views[b._view].type.toLowerCase().indexOf("month")>=0?{from:new a.jqx.date(d,b.timeZone),to:a.jqx.scheduler.utilities.getEndOfDay(e),resourceId:h}:{from:new a.jqx.date(d,b.timeZone),to:e,resourceId:h}},clearSelection:function(){for(var a=this,b=a.rows,c=b.length,d=0;d<c;d++)for(var e=b[d].cells,f=0;f<e.length;f++)e[f].removeAttribute("data-selected");a._updateCellsSelection()},_getvirtualcolumnsindexes:function(a,b,c,d,e){this.rtl&&(a=this.hScrollInstance.max-a);var f=0,g=-1,h=c+d;if(this.autorowheight)return{start:0,end:c+d};if(!e)for(var i=0;i<c+d;i++){if(this.columns.records[i].hidden||(f+=this.columns.records[i].width),f>=a&&g==-1&&(g=i),f>b+a){h=i;break}}return h++,h>c+d&&(h=c+d),g==-1&&(g=0),{start:g,end:h}},_renderhorizontalscroll:function(){var b=this,c=b.hScrollInstance,d=c.value;"hidden"===b.hScrollBar[0].style.visibility&&(c.value=0,d=0);var e=parseInt(d);if(null!=b.table){for(var f=function(a){return!(!a.parentNode||"#document-fragment"==a.parentNode.nodeName)},g=b._getvirtualcolumnsindexes(e,b._hostWidth,0,b.columns.records.length,!1),h=g.start,i=g.end,j=(b.rows,0);j<h;j++){var k=j,l=b.columns.records[k].element[0];f(l)&&l.parentNode.removeChild(l)}for(var j=i;j<b.columns.records.length;j++){var k=j,l=b.columns.records[k].element[0];f(l)&&l.parentNode.removeChild(l)}for(var j=h;j<i;j++){var k=j;l=b.columns.records[k].element[0],f(l)||b.columnsrow[0].appendChild(l)}var m=b.columnsrow,n=0;b.columns.records.length-n,b.columns.records,0==b.source.records.length;if(b.rtl&&"hidden"!=b.hScrollBar.css("visibility")&&(e=c.max-e),b.table[0].style.left=-e+"px","block"==b.pinnedtable[0].style.display&&(b.pinnedtable[0].style.left=-e+"px"),b._resources.length>0&&b.tableRows>0)for(var o=0;o<this.table[0].rows.length;o++){var p=this.table[0].rows[o];p.getAttribute("data-group-row")&&a(p).find("span").css("left",5+e)}m[0].style.marginLeft=-e+"px"}},_getDayName:function(a,b){a>=7&&(a-=7),b||(b=this.dayNameFormat,this.isTouchDevice()&&(b=this.touchDayNameFormat));var c=this.schedulerLocalization.days.names[a];switch(b){case"full":c=this.schedulerLocalization.days.names[a];break;case"abbr":c=this.schedulerLocalization.days.namesAbbr[a];break;case"shortest":c=this.schedulerLocalization.days.namesShort[a];break;case"firstTwoLetters":c=c.substring(0,2);break;case"firstLetter":c=c.substring(0,1)}return c},_initializeColumns:function(){if(0===this._views.length&&this._views.push({type:"dayView"}),!this._views[this._view])throw new Error("jqxScheduler: View is undefined. You need to define the View in the Views Array when you create jqxScheduler");var b=this._views[this._view].type,c=this._views[this._view];if(c.timeSlotWidth&&(c.timeSlotWidth=Math.max(c.timeSlotWidth,30),c.columnWidth=c.timeSlotWidth),c.columnWidth&&c.columnWidth<30&&(c.columnWidth=30),this.columns&&this.columns.records)for(var d=0;d<this.columns.records.length;d++)this._removecolumnhandlers(this.columns.records[d]);this.columns=new Array;for(var e=new Array,f=this,g=function(b,d){var e="halfHour";c.timeRuler&&c.timeRuler.scale&&(e=c.timeRuler.scale);var g=24,h=0,i=23;if(c.timeRuler){if(void 0!=c.timeRuler.scaleStartHour)var h=parseInt(c.timeRuler.scaleStartHour);if(void 0!=c.timeRuler.scaleEndHour)var i=parseInt(c.timeRuler.scaleEndHour);h<0&&(h=0),i<0&&(i=23),h>23&&(h=0),i>23&&(i=23),g=i-h+1}var j=60,k=2;if(e)switch(e){case"sixtyMinutes":case"hour":k=1;break;case"thirtyMinutes":case"halfHour":k=2;break;case"fifteenMinutes":case"quarterHour":k=4;break;case"tenMinutes":k=6;break;case"fiveMinutes":k=12}var l=(new Array,"auto");c.timeRuler&&c.timeRuler.formatString&&(l=c.timeRuler.formatString);var m=h,n=g,o=b.addHours(m),p="auto";p=c.columnWidth?k*c.columnWidth:80*k;for(var q=0;q<n;q++){var r=o.toDate();if("auto"===l)if(0==r.getHours()&&0==r.getMinutes()||12==r.getHours()&&0==r.getMinutes())var s="hh tt";else var s="hh:mm";else if(a.isFunction(l))var s=l(r);else s=l;a.jqx.dataFormat.isDate(r)&&(r=a.jqx.dataFormat.formatdate(r,s,f.schedulerLocalization)),o=o.addMinutes(j,!1),f.columns.push({columnGroup:d,text:r,minwidth:30,width:p})}},h=0;h<this.tableColumns;h++){if(this.tableColumns>1){var i=f._resources[h]?f._resources[h]:"Resource"+h;e.push({text:i,name:i})}var j="left";switch(this.rtl&&(j="right"),b){case"dayView":var k=this.getViewStart();!1===c.showWeekends&&(0!==k.dayOfWeek()&&6!==k.dayOfWeek()||(k=k.addDays(1)),0!==k.dayOfWeek()&&6!==k.dayOfWeek()||(k=k.addDays(1)));var l="auto";c&&c.columnWidth&&(l=c.columnWidth);var i=f._resources[h]?f._resources[h]:"Resource"+h;this.columns.push({align:j,width:l,columnGroup:i,text:this._getDayName(k.dayOfWeek())});break;case"weekView":case"monthView":for(var d=0;d<7;d++){var m=this.schedulerLocalization.firstDay+d;if(!1!==c.showWeekends||0!==d&&6!==d){var l="auto";c&&c.columnWidth&&(l=c.columnWidth);var i=f._resources[h]?f._resources[h]:"Resource"+h;this.columns.push({align:"weekView"==b?j:"center",width:l,columnGroup:i,text:this._getDayName(m)})}}break;case"timelineDayView":var i=f._resources[h]?f._resources[h]:"Resource"+h;g(f.getViewStart(),i);break;case"timelineWeekView":for(var d=0;d<7;d++){var m=this.schedulerLocalization.firstDay+d;if(!1!==c.showWeekends||0!==d&&6!==d){var i=f._resources[h]?f._resources[h]:"Resource"+h;e.push({align:f.rtl?"right":"left",parentGroup:i,name:this._getDayName(m)+h,text:this._getDayName(m)}),g(f.getViewStart().addDays(d),this._getDayName(m)+h)}}break;case"timelineMonthView":var n=f.getViewStart(),o="auto";c.timeRuler&&c.timeRuler.formatString&&(o=c.timeRuler.formatString);for(var d=0;d<41;d++){var m=n.dayOfWeek();if(!1!==c.showWeekends||0!==m&&6!==m){var l="auto";l=c.columnWidth?c.columnWidth:100;var p=n.toDate();if("auto"===o){var q="dd";p=n.toDate(),1===p.getDate()&&(q="MMM dd")}else if(a.isFunction(o))var q=o(p);else q=o;a.jqx.dataFormat.isDate(p)&&(p=a.jqx.dataFormat.formatdate(p,q,f.schedulerLocalization)),n=n.addDays(1);var i=f._resources[h]?f._resources[h]:"Resource"+h;f.columns.push({minwidth:30,columnGroup:i,text:p,width:l})}}break;case"agendaView":var r=c.dateColumnWidth,s=c.timeColumnWidth,t=c.appointmentColumnWidth;t||(t="70%"),s||(s="auto"),r||(r="auto"),f.columns.push({text:f.schedulerLocalization.agendaDateColumn,width:r}),f.columns.push({text:f.schedulerLocalization.agendaTimeColumn,width:s}),f.columns.push({text:f.schedulerLocalization.agendaAppointmentColumn,width:t})}}e.length>0&&(this.columnGroups=e);var f=this,u=new a.jqx.schedulerDataCollection(this.element),v=0;this._columns=this.columns;var w="left",x=new a.jqx.scheduler.column(f,this);x.visibleindex=v++,x.text="",x.width=f.timeRulerWidth,x.editable=!1,x.timeColumn=!0,w="left",x.text="",x.hidden=!1,x.width=f.timeRulerWidth;var y=!1;!c.timeRuler||"dayView"!==b&&"weekView"!==b?"dayView"!==b&&"weekView"!==b&&(x.hidden=!0):(x._text=c.timeRuler.text||"",w=c.timeRuler.position||"left",x.hidden=c.timeRuler.hidden||!1,x.width=c.timeRuler.width||f.timeRulerWidth,c.timeRuler.timeZones&&(y=!0));var z=function(e){var g=new a.jqx.scheduler.column(f,f);g.visibleindex=v++,g.text="",g.width=f.timeRulerWidth,g.editable=!1,g.timeColumn=!0,w="left",g.text="",g.hidden=!1,g.timeZone=c.timeRuler.timeZones[e].id,g.width=f.timeRulerWidth,!c.timeRuler||"dayView"!==b&&"weekView"!==b||(g._text=c.timeRuler.timeZones[d].text||"",g.hidden=c.timeRuler.hidden||!1,g.width=c.timeRuler.width||f.timeRulerWidth,u.add(g))};if("left"===w&&("dayView"===b||"weekView"===b)){if(c.timeRuler&&c.timeRuler.timeZones)for(var d=0;d<c.timeRuler.timeZones.length;d++)z(d);u.add(x)}"left"===w&&"monthView"===b&&c.showWeekNumbers&&(x.hidden=!1,u.add(x));new Array;if(a.each(this.columns,function(b){if(void 0!=f.columns[b]){var c=new a.jqx.scheduler.column(f,this);c.visibleindex=v++,u.add(c)}}),"right"===w&&("dayView"===b||"weekView"===b)){if(c.timeRuler)for(var d=0;d<c.timeRuler.timeZones.length;d++)z(d);u.add(x)}"right"===w&&"monthView"===b&&c.showWeekNumbers&&(x.hidden=!1,u.add(x)),this.rtl&&u.records.reverse(),this.columns=u},_getColumnsLengthPerView:function(){var a=this._views[this._view].type,b=this._views[this._view],c=1;switch(a){case"dayView":c=1;break;case"weekView":c=b.showWeekends!==!1?7:5;break;case"monthView":c=b.showWeekends!==!1?7:5;break;case"timelineDayView":case"timelineWeekView":case"timelineMonthView":c=this.columns.records.length;break;case"agendaView":c=this.columns.records.length}return c},_renderagenda:function(){function b(){var a={};return a.cells=new Array,a.indexOf=function(b){for(var c=0;c<a.cells.length;c++)if(a.cells[c].getAttribute("data-key")==b.getAttribute("data-key"))return c;return-1},a}var c=this,d=(c._views[c._view].type,c._views[c._view]),e=c.getViewStart(),f=a.jqx.scheduler.utilities.getEndOfDay(c.getViewEnd().addDays(-1));c._prepareAppointmentsInView(e,f);for(var g=c.appointmentsToRender.length,h=new Array,i=0,j=0;j<c.appointmentsToRender.length;j++)for(var k=c.appointmentsToRender[j],l=k.from.clearTime();l<a.jqx.scheduler.utilities.getEndOfDay(k.to);){var m=l.toString();h[m]?(h[m].appointments.push(k),i++):(h[m]={date:l,appointments:new Array},h[m].appointments.push(k),h[h.length]=h[m],i++),l=l.addDays(1).clearTime()}var n=0,o=0;c.rows=new Array;for(var p=a.jqx.browser.msie&&a.jqx.browser.version<8,q=0,r=0,s=c.rtl?" "+c.toTP("jqx-grid-table-rtl"):"",t=0,u="<table cellspacing='0' cellpadding='0' class='"+c.toTP("jqx-grid-table")+s+"' id='table"+c.element.id+"'><colgroup>",v=c.columns.records.length,w=0;w<v;w++){var x=c.columns.records[w];if(x.hidden)q++,nonHiddenColumns--;else{var y=x.width;if(y<x.minwidth&&(y=x.minwidth),y>x.maxwidth&&(y=x.maxwidth),y-=r,y<0&&(y=0),p){var z=y;w==q&&z++,u+="<col style='max-width: "+z+"px; width: "+z+"px;'>"}else u+="<col style='max-width: "+y+"px; width: "+y+"px;'>";t+=y}}if(u+="</colgroup>",0==g){var A='<tr role="row">',B=this.host.height(),C=0;C+=c.columnGroups?c.showHeader?c.columnsheader.height():0:c.showHeader?c.columnsHeight:0,c.showToolbar&&(C+=c.toolbarHeight),c.showLegend&&c._resources.length>0&&(C+=c.legendHeight),B-=C;var D='<td data-date="'+e.toString()+'" colspan="'+this.columns.records.length+'" role="gridcell" style="border: none; min-height: '+B+"px; height: "+B+"px; max-width:"+t+"px; width:"+t+"px;",E=this.toTP("jqx-cell")+" "+this.toTP("jqx-grid-cell")+" "+this.toTP("jqx-item");E+=" "+this.toTP("jqx-center-align"),D+='" class="'+E+'">',D+=this.schedulerLocalization.emptyDataString,D+="</td>",A+=D,A+="</tr>",u+=A,this.table[0].style.width=t+2+"px",o=t}var F=c.rowsHeight;c.isTouchDevice()&&(rowsHeight=c.touchRowsHeight);for(var j=0;j<h.length;j++)for(var G=j,l=h[j],H=0;H<l.appointments.length;H++){var I=0,A='<tr data-key="'+G+'" role="row">';n=0;for(var J=l.appointments[H],w=0;w<v;w++){var K=c.columns.records[w],L=w;c.rtl&&(L=v-1-w);var y=K.width;y<K.minwidth&&(y=K.minwidth),y>K.maxwidth&&(y=K.maxwidth),y-=r,y<0&&(y=0);var E=c.toTP("jqx-cell")+" "+c.toTP("jqx-grid-cell")+" "+c.toTP("jqx-item");c.rtl&&(E+=" "+c.toTP("jqx-cell-rtl"));var M="",G=c.dataview.generatekey(),N=-1,O=l.date,B=F+"px",D='<td data-key="'+G+'" data-view="'+N+'" data-date="'+O.toString()+'" role="gridcell" '+M+' style="max-width:'+y+"px; width:"+y+"px; height: "+B+"; min-height: "+F+"px;";if(0==L&&0==H){var P=l.appointments.length,D='<td rowspan="'+P+'" data-key="'+G+'" data-view="'+N+'" data-date="'+O.toString()+'" role="gridcell" '+M+' style="max-width:'+y+"px; width:"+y+"px;  min-height: "+F+"px;";E+=" "+c.toTP("jqx-center-align")}else if(0==L){n++;continue}c.rtl&&1==L&&(E+=" "+c.toTP("jqx-right-align")),K.hidden?(D+="display: none;",c._hiddencolumns=!0):(I+=r+y,D+=0!=n||c.rtl?"border-left-width: 1px;":"border-left-width: 0px;",n++),D+='" class="'+E+'">';var Q="";if(0==L&&0==H){var R=O.toString("dddd",c.schedulerLocalization),S=O.toString("MMMM, yyyy",c.schedulerLocalization),T=c.toTP("jqx-scheduler-agenda-date"),U=c.toTP("jqx-scheduler-agenda-day"),V=c.toTP("jqx-scheduler-agenda-week");Q='<div class="'+T+'"><strong class="'+U+'">'+O.day()+'</strong><br/><em class="'+V+'">'+R+'</em><br/><span class="'+T+'">'+S+"</span></div>"}if(1==L){var W="auto",d=this._views[this._view],X=J.from,Y=J.to;d.timeRuler&&d.timeRuler.formatString&&(W=d.timeRuler.formatString);var Z=W,$=W;if("auto"===W){if(0==X.hour()&&0==X.minute()||12==X.hour()&&0==X.minute())var Z="hh tt";else var Z="hh:mm";if(0==Y.hour()&&0==Y.minute()||12==Y.hour()&&0==Y.minute())var $="hh tt";else var $="hh:mm"}var T=c.toTP("jqx-scheduler-agenda-time");Q=J.allDay?"<span class='"+T+"'>"+c.schedulerLocalization.agendaAllDayString+"</span>":c.rtl?"<span class='"+T+"'>"+Y.toString($,c.schedulerLocalization)+" - "+X.toString(Z,c.schedulerLocalization)+"</span>":"<span class='"+T+"'>"+X.toString(Z,c.schedulerLocalization)+" - "+Y.toString($,c.schedulerLocalization)+"</span>"}else if(2==L){J.resourceId&&a.each(c._resources,function(a,b){if(J.resourceId==b){var d=c.getColors(a),e=(this.toString(),c.toTP("jqx-scheduler-agenda-appointment-resource jqx-scheduler-legend"));if(c.rtl)var e=c.toTP("jqx-scheduler-agenda-appointment-resource-rtl jqx-scheduler-legend");var f="<div data-key='"+J.id+"' class='"+e+"' style='margin-right: 5px; border-color: "+d.border+"; background: "+d.background+";' class='"+c.toThemeProperty("jqx-scheduler-legend")+"'></div>";Q=f}});var _=J.subject?J.subject:"(No Title)",aa=J.location,ba=J.description,ca=J.status?c.schedulerLocalization.editDialogStatuses[J.status]:"",da=J.isRecurrentAppointment(),ea=(J.isException(),""+c.schedulerLocalization.editDialogSubjectString+": "+_);aa&&(ea+="\n"+c.schedulerLocalization.editDialogLocationString+": "+aa),ba&&(ea+="\n"+c.schedulerLocalization.editDialogDescriptionString+": "+ba),ca&&(ea+="\n"+c.schedulerLocalization.editDialogStatusString+": "+ca),da&&(ea+="\n"+c.schedulerLocalization.editDialogRepeatString+": "+da);var T=c.toTP("jqx-scheduler-agenda-appointment jqx-scheduler-legend-label");if(c.rtl)var T=c.toTP("jqx-scheduler-agenda-appointment-rtl jqx-scheduler-legend-label");Q+="<span data-key='"+J.id+"' title='"+ea+"' class='"+T+"'>"+_+"</span>"}D+=Q,D+="</td>",A+=D}0==o&&(c.table[0].style.width=I+2+"px",c.pinnedtable[0].style.width=I+2+"px",o=I),A+="</tr>",u+=A}u+="</table>",c.table[0].innerHTML=u,c.pinnedtable[0].innerHTML=u,c.pinnedtable[0].style.display="none";var fa=a(c.table[0].firstChild),ga=a(c.pinnedtable[0].firstChild);c._table=fa,c._pinnedtable=ga,a.jqx.browser.msie&&a.jqx.browser.version<10&&(c._table[0].style.width=o+"px",c._pinnedtable[0].style.width=o+"px"),0===g&&(c._table[0].style.width=2+o+"px",c._pinnedtable[0].style.width=2+o+"px",c._pinnedtable[0].style.display="none"),c._pinnedtable[0].style.display="none",c._table.addClass("jqx-grid-table-one-cell jqx-disableselect"),c.table[0].rows=c.table[0].firstChild.rows,c.rowByCell=new Array,c.columnCells=new Array,c.cellWidth=0,c.cellHeight=0;for(var ha=c.table[0].rows.length,j=0;j<ha;j++){var ia=c.table[0].rows[j];if(!ia.getAttribute("data-group-row")){var ja=new b;ja.aboveRow=null,ja.belowRow=null,c.rows.length>0&&(ja.aboveRow=c.rows[c.rows.length-1],c.rows[c.rows.length-1].belowRow=ja),ja.element=ia,c.rows.push(ja);for(var ka=!1,w=0;w<ia.cells.length;w++){if(ia.cells.length<c.columns.records.length&&!ka)for(var la=j;la>=0;){var ma=c.table[0].rows[la];if(c.table[0].rows[la].cells.length==c.columns.records.length){var na=ma.cells[0];c.columnCells[ja.cells.length]||(c.columnCells[ja.cells.length]=new Array),c.columnCells[ja.cells.length].push(na),0==c.cellWidth&&(c.cellWidth=na.clientWidth),0==c.cellHeight&&(1==ha||j>1)&&(c.cellHeight=na.clientHeight),ja.cells.push(na),ka=!0;break}la--}var na=ia.cells[w];"none"!==na.style.display&&(na.className.indexOf("jqx-grid-cell-pinned")>=0||(c.columnCells[ja.cells.length]||(c.columnCells[ja.cells.length]=new Array),c.columnCells[ja.cells.length].push(na),0==c.cellWidth&&(c.cellWidth=na.clientWidth),0==c.cellHeight&&(1==ha||j>1)&&(c.cellHeight=na.clientHeight),ja.cells.push(na),c.rowByCell[na.getAttribute("data-key")]=ja))}}}0===g&&(c._table[0].style.tableLayout="auto"),c._updateScrollbars(c.host.height()),c._arrange(),c.rendered&&c.rendered(),c.renderedTime=new Date},_renderrows:function(){function b(){var a={};return a.cells=new Array,a.indexOf=function(b){for(var c=0;c<a.cells.length;c++)if(a.cells[c].getAttribute("data-key")==b.getAttribute("data-key"))return c;return-1},a}var c=this;if(!c._loading&&!c._updating&&!c._appupdating){c.rendering&&c.rendering();var c=this,d=c._views[c._view].type,e=c._views[c._view];if("agendaView"==d)return void c._renderagenda();var f=1,g=c.getViewStart(),h=a.jqx.scheduler.utilities.getEndOfDay(c.getViewEnd());c._prepareAppointmentsInView(g,h);var i=new Array;if("weekView"===d||"dayView"===d)var f=c.getMaxAllDayAppointments(c.appointmentsToRender);else"monthView"===d&&e.monthRowAutoHeight&&c.rows&&6==c.rows.length&&(i=c._getMonthAppointmentsPerWeek());var j,k=(c.tableRows>1?c.tableRows:0,"halfHour"),l=null;e.rowHeight&&(l=e.rowHeight),e&&e.allDayRowHeight&&(j=e.allDayRowHeight),e.timeRuler&&e.timeRuler.scale&&(k=e.timeRuler.scale);var m=0;c.table[0].rows=new Array,c.rows=new Array;var n=c.toTP("jqx-cell")+" "+c.toTP("jqx-widget-content");c.rtl&&(n+=" "+c.toTP("jqx-cell-rtl"));var o=c.columns.records.length,p=c._getColumnsLengthPerView(),q=a.jqx.browser.msie&&a.jqx.browser.version<8;q&&c.host.attr("hideFocus","true"),c._lastSelectedCell=null,c.focusedCell=null;var r=(new Array,c.source.records);r=c.dataview.evaluate(r),c.dataViewRecords=r,c.cells=new Array;c.dataViewRecords;c.renderedRecords=c.getRows();var s=(c.tableZIndex,c.getRows().length),t=0,u=0;if(q)for(var v=0;v<o;v++){var w=c.columns.records[v],x=w.width;x<w.minwidth&&(x=w.minwidth),x>w.maxwidth&&(x=w.maxwidth);var y=a('<table><tr><td role="gridcell" style="max-width: '+x+"px; width:"+x+'px;" class="'+n+'"></td></tr></table>');a(document.body).append(y);var z=y.find("td");t=1+parseInt(z.css("padding-left"))+parseInt(z.css("padding-right")),y.remove();break}var A=c.rtl?" "+c.toTP("jqx-grid-table-rtl"):"",B="<table cellspacing='0' cellpadding='0' class='"+c.toTP("jqx-grid-table")+A+"' id='table"+c.element.id+"'><colgroup>",C=0,D=o,E=2,F=30;switch(k){case"sixtyMinutes":case"hour":F=60,E=1;break;case"thirtyMinutes":case"halfHour":F=30,E=2;break;case"fifteenMinutes":case"quarterHour":F=15,E=4;break;case"tenMinutes":F=10,E=6;break;case"fiveMinutes":F=5,E=12}var G=1;"timelineDayView"===d||"timelineWeekView"===d?(o*=E,G=E,p=o/c.tableColumns):"timelineMonthView"===d?p=o/c.tableColumns:"monthView"===d&&(p=e.showWeekNumbers?(o-c.tableColumns)/c.tableColumns:o/c.tableColumns);for(var H=function(a){var b=c.columns.records[a];if(b)return b;for(;a>=c.columns.records.length;)a-=c.columns.records.length;var b=c.columns.records[a];return b},v=0;v<o;v++){var w=H(v);if(w.hidden)C++,D--;else{var x=w.width/G;if(x<w.minwidth&&(x=w.minwidth/G),x>w.maxwidth&&(x=w.maxwidth/G),x-=t,x<0&&(x=0),"monthView"==d&&c.rtl&&w.timeColumn&&x++,q){var I=x;v==C&&I++,B+="<col style='max-width: "+I+"px; width: "+I+"px;'>"}else B+="<col style='max-width: "+x+"px; width: "+x+"px;'>";u+=x}}if(B+="</colgroup>",c._hiddencolumns=!1,0===s){var J='<tr role="row">',K=c.host.height();c.pageable&&(K-=c.pagerHeight,"both"===c.pagerPosition&&(K-=c.pagerHeight)),K-=c.columnsHeight,c.showLegend&&c._resources.length>0&&(K-=c.legendHeight),K<25&&(K=25),"hidden"!=c.hScrollBar[0].style.visibility&&(K-=c.hScrollBar.outerHeight()),("auto"===c.height||null===c.height||c.autoheight)&&(K=300);var y='<td colspan="'+c.columns.records.length+'" role="gridcell" style="border: none; min-height: '+K+"px; height: "+K+"px; max-width:"+u+"px; width:"+u+"px;",n=c.toTP("jqx-cell")+" "+c.toTP("jqx-grid-cell")+" "+c.toTP("jqx-item");c.rtl&&(n+=" "+c.toTP("jqx-cell-rtl")),n+=" "+c.toTP("jqx-center-align"),y+='" class="'+n+'">',y+=c.schedulerLocalization.emptyDataString,y+="</td>",J+=y,B+=J,c.table[0].style.width=u+2+"px",m=u}var L=c.getRows(),g=c.getViewStart(),K=c._hostHeight?c._hostHeight:c.host.height(),M=0;M+=c.columnGroups?c.showHeader?c.columnsheader.height():0:c.showHeader?c.columnsHeight:0,c.showToolbar&&(M+=c.toolbarHeight),c.showLegend&&c._resources.length>0&&(M+=c.legendHeight);var N=c.showAllDayRow,O=23;e.resourceHeaderRowHeight&&(O=e.resourcesRowHeight),O+=2,void 0!=e.showAllDayRow&&(N=e.showAllDayRow);var P=c._columnswidth>c._hostWidth,Q=P?3+c.scrollBarSize:0,R=c.tableRows>1?c.resources.unitsInView:1;if(void 0==R&&(R=c._resources.length),c.resources&&c.resources.resourceRowHeight&&(l=c.resources.resourceRowHeight),null==l||"auto"==l){var S=c.rowsHeight,T=3*S;if(c.isTouchDevice()){S=c.touchRowsHeight;var T=22+S}1==c.tableRows?(l=K>0?K-M:S,c.columns.records.length>10&&(l=K>0?K-c.scrollBarSize-5-M:S)):(l=K>0?(K-M-O)/s:S,c.columns.records.length>10&&(l=K>0?(K-c.scrollBarSize-5-M-R*O)/(R*s):S)),"dayView"===d||"weekView"===d?N&&(null==j||"auto"==j?(l=K>0?(K-M)/(c.tableRows*s):T,j=l):l=K>0?(K-M-j-R*O)/(R*(s-1)):S):"monthView"===d&&("hidden"==c.hScrollBar[0].style.visibility&&(Q=0),l=1==c.tableRows?K>0?(K-M-Q)/s:S:K>0?(K-M-O-Q)/s:S),l=Math.max(S,l),j||(j=T),j=Math.max(T,j),c._allDayRowHeight=j,c._defaultRowHeight=S,j=f*(S-2),j=Math.max(T,17+j),c._allDayRowFullHeight=j,e.allDayRowHeight&&(c._allDayRowHeight=e.allDayRowHeight,j=f*(e.allDayRowHeight-2),c._allDayRowFullHeight=j)}var U=new Array;if(c.resources&&c.resources.colorScheme){for(var V=0;V<c.colorSchemes.length;V++)if(c.colorSchemes[V].name==c.resources.colorScheme){U=c.colorSchemes[V].colors;break}for(;c._resources.length>U.length-1;){var W=parseInt(c.resources.colorScheme.substring(6));W>=27&&(W=0),U=U.concat(c.colorSchemes[W].colors),W++}}for(var X=0;X<c.tableRows;X++){var Y=0,Z=23;if(e.timeRuler&&void 0!=e.timeRuler.scaleStartHour)var Y=parseInt(e.timeRuler.scaleStartHour);if(e.timeRuler&&void 0!=e.timeRuler.scaleEndHour)var Z=parseInt(e.timeRuler.scaleEndHour);var $=g;!1===e.showWeekends&&(0!=$.dayOfWeek()&&6!=$.dayOfWeek()||($=$.addDays(1)));var _=new Array,aa="monthView"!=d&&"timelineDayView"!=d&&"timelineWeekView"!=d&&"timelineMonthView"!=d&&N?1:0;if(c.tableRows>1){var J='<tr data-group-row="true" role="row">',n=c.toTP("jqx-cell")+" "+c.toTP("jqx-grid-cell")+" "+c.toTP("jqx-item");if(c.rtl&&(n+=" "+c.toTP("jqx-cell-rtl")),q)n+=" "+c.toTP("jqx-grid-cell-pinned");else{n+=" "+c.toTP("jqx-grid-cell-pinned"),xa+=' colspan="'+o+'"';for(var I=0,ba=0;ba<o;ba++){var ca=H(ba),da=ca.width/G;da<ca.minwidth&&(x=ca.minwidth/G),da>ca.maxwidth&&(x=ca.maxwidth/G),da-=t,da<0&&(da=0),ca.hidden||(I+=da)}x=I}var y='<td style="height:'+O+"px;";if(v!=o-1||1!=o||c.rtl||(y+="border-right-color: transparent;"),c._resources.length>0&&c.resources.colorScheme&&"none"!=c.resources.orientation){var ea="",fa="",ga="",ha=function(a){var b=105,c=.299*a.r+.587*a.g+.114*a.b,d=255-c<b?"Black":"White";return d};ea=U[X],ea=c.hexToRgba(U[X],.7).toString(),ga=ha(c.hexToRgba(U[X],.7)),fa=U[X],y+="background: "+ea+";",y+="border-color: "+fa+";",y+="color: "+ga+";"}y+='" class="'+n+'" role="gridcell" '+xa;var ia=c._resources[X];y+="><span style='position: relative;'>"+ia+"</span>",y+="</td>",J+=y,B+=J}for(var ja=0;ja<s;ja++){var ka={},la="jqx"+c.element.id+"_"+ja;ka.uid=la;var J='<tr data-key="'+la+'" role="row">',ma=0,na=0;if(_[0]&&ja>aa){var F=30;if("monthView"!=d){switch(k){case"sixtyMinutes":case"hour":F=60;break;case"thirtyMinutes":case"halfHour":F=30;break;case"fifteenMinutes":case"quarterHour":F=15;break;case"tenMinutes":F=10;break;case"fiveMinutes":F=5}for(var oa=0;oa<o;oa++)_[oa]=_[oa].addMinutes(F,!1)}else for(var oa=0;oa<o;oa++)_[oa]=_[oa].addDays(7,!1)}var pa=0,qa=1,ra=0;e.showWeekends||void 0==e.showWeekends?(ra=c.columns.records.length/(7*c.tableColumns),ra*=E):(ra=c.columns.records.length/(5*c.tableColumns),ra*=E);var sa=0;c.rtl&&(sa=1);for(var ta=0,v=0;v<o;v++){var ua=H(v);if(pa>=p&&(pa=0,ta=0,sa=0,c.rtl&&(sa=1),qa++),!_[v])if(c.rtl){if(d.toString().indexOf("timelineDayView")>=0){var va=1+v;_[v]=$.addHours(1+Z).addMinutes(-va*F,!1)}else d.toString().indexOf("timelineWeekView")>=0?e.showWeekends||void 0==e.showWeekends?_[v]=$.addDays(6-ta).addHours(1+Z,!1).addMinutes(-sa*F,!1):_[v]=$.addDays(4-ta).addHours(1+Z,!1).addMinutes(-sa*F,!1):"dayView"==d||"monthView"==d||"weekView"==d?e.showWeekends||void 0==e.showWeekends?_[v]=$.addDays(6-pa).addHours(Y,!1):_[v]=$.addDays(4-pa).addHours(Y,!1):_[v]=$.addDays(p-pa-1).addHours(Y,!1);c.timeZone&&(_[v].timeZone=c.timeZone)}else{if(d.toString().indexOf("timelineDayView")>=0){var va=v;_[v]=$.addHours(Y).addMinutes(va*F,!1)}else d.toString().indexOf("timelineWeekView")>=0?_[v]=$.addDays(ta).addHours(Y,!1).addMinutes(sa*F,!1):_[v]=$.addDays(pa).addHours(Y,!1);c.timeZone&&(_[v].timeZone=c.timeZone)}sa++,sa>=ra&&(sa=0,ta++),ua.timeColumn||"dayView"!==d&&"weekView"!==d?!ua.timeColumn&&"monthView"===d&&e.showWeekNumbers?pa++:"monthView"===d&&!e.showWeekNumbers||"timelineMonthView"===d?pa++:"timelineDayView"!=d&&"timelineWeekView"!=d||pa++:pa++;var wa=_[v],x=ua.width/G;x<ua.minwidth&&(x=ua.minwidth/G),x>ua.maxwidth&&(x=ua.maxwidth/G),x-=t,x<0&&(x=0);var n=c.toTP("jqx-cell")+" "+c.toTP("jqx-grid-cell")+" "+c.toTP("jqx-item");ua.pinned&&(n+=" "+c.toTP("jqx-grid-cell-pinned")),c.sortcolumn===ua.displayfield&&(n+=" "+c.toTP("jqx-grid-cell-sort")),c.altRows&&ja%2!=0&&(n+=" "+c.toTP("jqx-grid-cell-alt")),0!=ja||!N||"dayView"!==d&&"weekView"!==d||(n+=" "+c.toTP("jqx-grid-cell-alt")),(wa>c.max||wa<c.min)&&(n+=" "+c.toTP("jqx-scheduler-disabled-cell")),c.rtl&&(n+=" "+c.toTP("jqx-cell-rtl"));var xa="",la=c.dataview.generatekey(),ya=X+qa;c.resources&&"none"==c.resources.orientation&&(ya=-1),0==c._resources.length&&(ya=-1);
-var y='<td data-key="'+la+'" data-view="'+ya+'" data-date="'+wa.toString()+'" role="gridcell" '+xa+' style="max-width:'+x+"px; width:"+x+"px;  height:"+l+"px;";if(0==ja&&N&&("dayView"===d||"weekView"===d))var y='<td  data-key="'+la+'" data-view="'+ya+'" data-end-date="'+a.jqx.scheduler.utilities.getEndOfDay(wa).toString()+'" data-date="'+wa.clearTime().toString()+'" role="gridcell" '+xa+' style="max-width:'+x+"px; width:"+x+"px; height:"+j+"px;";if("monthView"==d&&e.monthRowAutoHeight&&i.length>0&&i[ja]&&"auto"!=i[ja]&&l<i[ja])var y='<td data-key="'+la+'" data-view="'+ya+'" data-date="'+wa.toString()+'" role="gridcell" '+xa+' style="max-width:'+x+"px; width:"+x+"px;  height:"+i[ja]+"px;";if(c.resources&&c._resources.length>0&&c.resources.colorScheme&&"none"!==c.resources.orientation){var ea="",fa="";if(ea=U[X+qa-1],ea=0!=ja||!N||"dayView"!==d&&"weekView"!==d?c.hexToRgba(U[X+qa-1],.3).toString():c.shadeColor(U[X+qa-1],.3).toString(),(0!=ja||!N||"dayView"!==d&&"weekView"!==d)&&d.indexOf("month")==-1&&!ua.timeColumn&&e.showWorkTime!==!1){var za=1,Aa=5,Ba=8,Ca=18;if(e.workTime)var za=e.workTime.fromDayOfWeek?e.workTime.fromDayOfWeek:0,Aa=e.workTime.toDayOfWeek?e.workTime.toDayOfWeek:0,Ba=e.workTime.fromHour?e.workTime.fromHour:8,Ca=e.workTime.toHour?e.workTime.toHour:8;wa.dayOfWeek()>=za&&wa.dayOfWeek()<=Aa&&wa.hour()>=Ba&&wa.hour()<Ca&&(ea=c.hexToRgba(U[X+qa-1],.1).toString())}fa=U[qa+X-1],y+="background: "+ea+";",y+="border-color: "+fa+";"}if(v!=o-1||1!=o||c.rtl||(y+="border-right-color: transparent;"),ua.timeColumn&&!ua.hidden&&"monthView"===d){var n=c.toTP("jqx-scheduler-time-column")+" "+c.toTP("jqx-widget-header")+" "+c.toTP("jqx-cell")+" "+c.toTP("jqx-grid-cell")+" "+c.toTP("jqx-item");if(n+=" "+c.toTP("jqx-scheduler-week-number-column"),c.tableRows>1)var n=c.toTP("jqx-cell")+" "+c.toTP("jqx-grid-cell")+" "+c.toTP("jqx-item");if(c.rtl&&(n+=" "+c.toTP("jqx-cell-rtl")),0!==wa.minute()){na++;continue}var y='<td classname="jqx-disableselect" data-time-slot="true" data-date="'+wa.toString()+'" role="gridcell" style="max-width:'+x+"px; width:"+x+"px;";v!=o-1||1!=o||c.rtl?c.rtl&&0==v&&(y+="border-left-color: transparent;"):y+="border-right-color: transparent;",v==o-1&&c.rtl&&(y+="border-right-color: transparent;")}if(!ua.timeColumn||ua.hidden||"dayView"!==d&&"weekView"!==d){if(ja>0){var Da="border-left-width: 1px;";c.rtl&&0==v&&"monthView"==d&&e.showWeekNumbers&&(Da="border-left-width: 0px;"),y+=Da}}else{var n=c.toTP("jqx-scheduler-time-column")+" "+c.toTP("jqx-widget-header")+" "+c.toTP("jqx-cell")+" "+c.toTP("jqx-grid-cell")+" "+c.toTP("jqx-item");if(c.tableRows>1)var n=c.toTP("jqx-cell")+" "+c.toTP("jqx-grid-cell")+" "+c.toTP("jqx-item");if(c.rtl&&(n+=" "+c.toTP("jqx-cell-rtl")),ja>0){if(0!==wa.minute()){na++;continue}var y='<td classname="jqx-disableselect" data-time-slot="true" data-date="'+wa.toString()+'" rowspan='+E+' role="gridcell" '+xa+' style="max-width:'+x+"px; width:"+x+"px;";v!=o-1||1!=o||c.rtl?c.rtl&&0==v&&(y+="border-left-color: transparent;"):y+="border-right-color: transparent;"}else{if(c.resources&&"none"==c.resources.orientation&&(ya=-1),0==ja&&N&&("dayView"===d||"weekView"===d))var y='<td data-view="'+ya+'" data-time-slot="true" data-end-date="'+a.jqx.scheduler.utilities.getEndOfDay(wa).toString()+'" data-date="'+wa.toString()+'" role="gridcell" '+xa+' style="max-width:'+x+"px; width:"+x+"px;";v!=o-1||1!=o||c.rtl?0==v&&1==o&&c.rtl&&(y+="border-right-color: transparent;"):y+="border-right-color: transparent;",c.rtl&&(y+="border-left-width: 1px;"),c.tableRows>1&&(y+="background: "+ea+";",y+="border-color: "+fa+";")}}if("left"!=ua.cellsalign&&(n+="right"===ua.cellsalign?" "+c.toTP("jqx-right-align"):" "+c.toTP("jqx-center-align")),ua.timeColumn||c.rowinfo[ka.uid]&&c.rowinfo[ka.uid].selected&&c.editKey!==ka.uid&&"none"!==c.selectionMode&&(n+=" "+c.toTP("jqx-grid-cell-selected"),n+=" "+c.toTP("jqx-fill-state-pressed"),n+=" "+c.toTP("jqx-scheduler-cell-selected")),ua.hidden?(y+="display: none;",c._hiddencolumns=!0):(ma+=t+x,0!=na||c.rtl||(y+="border-left-width: 0px;"),na++),(0!=ja||!N||"dayView"!==d&&"weekView"!==d)&&d.indexOf("month")==-1&&(n+=" "+c.toTP("jqx-grid-cell-nowrap"),ja%2!=1||ua.timeColumn||(n+=" "+c.toTP("jqx-scheduler-middle-cell")),!ua.timeColumn&&e.showWorkTime!==!1)){var za=1,Aa=5,Ba=8,Ca=18;if(e.workTime)var za=e.workTime.fromDayOfWeek?e.workTime.fromDayOfWeek:0,Aa=e.workTime.toDayOfWeek?e.workTime.toDayOfWeek:0,Ba=e.workTime.fromHour?e.workTime.fromHour:8,Ca=e.workTime.toHour?e.workTime.toHour:8;n+=wa.dayOfWeek()>=za&&wa.dayOfWeek()<=Aa&&wa.hour()>=Ba&&wa.hour()<Ca?" "+c.toTP("jqx-scheduler-work-time-cell"):" "+c.toTP("jqx-scheduler-not-work-time-cell")}var Ea="";if("monthView"===d){c.touchDevice||ua.timeColumn||(n+=" "+c.toTP("jqx-top-align"));var Fa="dd";Ea=wa.toDate();var Ga=c.toTP("jqx-scheduler-month-outer-cell")+" ",Ha=c.toTP("jqx-scheduler-month-weekend-cell");c.date.month()==wa.month()&&(Ga=""),wa.isWeekend()?n+=" "+Ha:Ha="",1===Ea.getDate()&&(Fa="MMM dd"),Ea=c.touchDevice?l>16?"<div class='"+Ga+c.toTP("jqx-scheduler-month-cell-touch")+"'>"+a.jqx.dataFormat.formatdate(Ea,Fa,c.schedulerLocalization)+"<span style='display: none; float: right; cursor: pointer; width:16px; height: 16px;' class='"+c.toTP("jqx-icon-arrow-down")+"'></span></div>":"<div class='"+Ga+c.toTP("jqx-scheduler-month-cell-touch")+"'>"+a.jqx.dataFormat.formatdate(Ea,Fa,c.schedulerLocalization)+"<span style='display: none; float: right; cursor: pointer;' class='"+c.toTP("jqx-icon-arrow-down")+"'></span></div>":l>16?"<div class='"+Ga+c.toTP("jqx-scheduler-month-cell")+"'>"+a.jqx.dataFormat.formatdate(Ea,Fa,c.schedulerLocalization)+"<span style='display: none; float: right; cursor: pointer; width:16px; height: 16px;' class='"+c.toTP("jqx-icon-arrow-down")+"'></span></div>":"<div class='"+Ga+c.toTP("jqx-scheduler-month-cell")+"'>"+a.jqx.dataFormat.formatdate(Ea,Fa,c.schedulerLocalization)+"<span style='display: none; float: right; cursor: pointer;' class='"+c.toTP("jqx-icon-arrow-down")+"'></span></div>"}else"timelineWeekView"!==d&&"timelineDayView"!==d&&"timelineMonthView"!==d||(n+=" "+c.toTP("jqx-right-align jqx-bottom-align"),Ea="<span style='display: none; float: right; cursor: pointer; width:16px; height: 16px;' class='"+c.toTP("jqx-icon-arrow-down")+"'></span>");0!=ja||!N||"dayView"!==d&&"weekView"!==d||ua.timeColumn||(n+=" "+c.toTP("jqx-top-align"),n+=" "+c.toTP("jqx-scheduler-all-day-cell"),c.rtl&&(n+=" "+c.toTP("jqx-rtl")),Ea=wa.toDate(),Ea="<span>"+a.jqx.dataFormat.formatdate(Ea,"dd",c.schedulerLocalization)+"</span>");var Ia=ua.cellsFormat;if(ua.timeColumn&&!ua.hidden){Ea=wa.toDate(),ua.timeZone&&(Ea=wa.clone().toTimeZone(ua.timeZone),Ea=Ea.toDate());e.timeRuler&&e.timeRuler.formatString?Ia=e.timeRuler.formatString:ua.timeColumn.format||(Ia=0==Ea.getHours()||12==Ea.getHours()?"hh tt":"hh:mm"),a.jqx.dataFormat.isDate(Ea)&&(Ea=a.jqx.dataFormat.formatdate(Ea,Ia,c.schedulerLocalization)),ja<aa&&(n+=c.rtl?" "+c.toTP("jqx-scheduler-time-column-header-cell-rtl"):" "+c.toTP("jqx-scheduler-time-column-header-cell"),Ea=""),ja<aa&&(ua._text&&(n+=" "+c.toTP("jqx-bottom-align")),e.timeRuler&&e.timeRuler.timeZones&&e.timeRuler.timeZones.length>0&&v<e.timeRuler.timeZones.length&&(Ea=ua._text)),"monthView"==d&&(Ea=wa.weekOfYear(c.schedulerLocalization.firstDay))}else""!=Ia&&a.jqx.dataFormat&&(a.jqx.dataFormat.isDate(Ea)?Ea=a.jqx.dataFormat.formatdate(Ea,Ia,c.schedulerLocalization):(a.jqx.dataFormat.isNumber(Ea)||!isNaN(parseFloat(Ea))&&isFinite(Ea))&&(Ea=a.jqx.dataFormat.formatnumber(Ea,Ia,c.schedulerLocalization)));if(""!=ua.cellclassname&&ua.cellclassname)if("string"==typeof ua.cellclassname)n+=" "+ua.cellclassname;else{var Ja=ua.cellclassname(ja,ua.datafield,Ea,ka);Ja&&(n+=" "+Ja)}if(""!=ua.cellsRenderer&&ua.cellsRenderer){var Ka=L.indexOf(ka);Ea=ua.cellsRenderer(Ka,ua.datafield,Ea,ka)}y+='" class="'+n+'">',y+=Ea,y+="</td>",J+=y}0==m&&(c.table[0].style.width=ma+2+"px",c.pinnedtable[0].style.width=ma+2+"px",m=ma),J+="</tr>",B+=J,c.rowinfo[ka.uid]?"row"in c.rowinfo[ka.uid]||(c.rowinfo[ka.uid].row=ka):c.rowinfo[ka.uid]={row:ka}}}B+="</table>",c.table[0].innerHTML=B,c.pinnedtable[0].innerHTML=B,c.table[0].rows=c.table[0].firstChild.rows;var La=a.jqx.browser.msie&&a.jqx.browser.version<9,Ma=null;if(!N||"dayView"!==d&&"weekView"!==d||1!=c.tableRows)c.pinnedtable[0].style.display="none";else if(c.pinnedtable[0].style.display="block",c.pinnedtable[0].style.zIndex="400",c.pinnedtable[0].style.position="absolute",c.pinnedtable[0].style.top="0px",c.pinnedtable[0].style.height=j+"px",!La)if(1==c.tableRows){c.oldRow=c.table[0].rows[0];try{c.table[0].rows[0]=c.pinnedtable.find("tr")[0]}catch(a){}Ma=c.pinnedtable.find("tr")[0],c.pinnedTableRow=Ma}else{c.oldRow=c.table[0].rows[1];try{c.table[0].rows[1]=c.pinnedtable.find("tr")[1]}catch(a){}Ma=c.pinnedtable.find("tr")[1],c.pinnedTableRow=Ma}var ba=a(c.table[0].firstChild),Na=a(c.pinnedtable[0].firstChild);c._table=ba,c._pinnedtable=Na,a.jqx.browser.msie&&a.jqx.browser.version<10&&(c._table[0].style.width=m+"px",c._pinnedtable[0].style.width=m+"px"),0===s&&(c._table[0].style.width=2+m+"px",c._pinnedtable[0].style.width=2+m+"px"),c._table.addClass("jqx-grid-table-one-cell jqx-disableselect"),c._pinnedtable.addClass("jqx-grid-table-one-cell jqx-disableselect"),c.rowByCell=new Array,c.columnCells=new Array,c.cellWidth=0,c.cellHeight=0;for(var Oa=c.table[0].rows.length,ja=0;ja<Oa;ja++){var Pa=c.table[0].rows[ja];if(0==ja&&Ma&&(Pa=Ma),!Pa.getAttribute("data-group-row")){var ka=new b;ka.aboveRow=null,ka.belowRow=null,c.rows.length>0&&(ka.aboveRow=c.rows[c.rows.length-1],c.rows[c.rows.length-1].belowRow=ka),ka.element=Pa,c.rows.push(ka);for(var v=0;v<Pa.cells.length;v++){var Qa=Pa.cells[v];Qa.getAttribute("data-time-slot")||"none"!==Qa.style.display&&(Qa.className.indexOf("jqx-grid-cell-pinned")>=0||(c.columnCells[ka.cells.length]||(c.columnCells[ka.cells.length]=new Array),c.columnCells[ka.cells.length].push(Qa),0==c.cellWidth&&(c.cellWidth=Qa.clientWidth),0==c.cellHeight&&(1==Oa||ja>1)&&(c.cellHeight=Qa.clientHeight),"monthView"==c._views[c._view].type&&void 0==ka.top&&(ka.top=parseInt(a(Qa).position().top)),ka.cells.push(Qa),c.rowByCell[Qa.getAttribute("data-key")]=ka))}}}0===s&&(c._table[0].style.tableLayout="auto"),c._renderAppointments(g,h),("none"!=c.pinnedtable[0].style.display||("dayView"==d||"weekView"==d)&&c.tableRows>1)&&c._updateScrollbars(c.host.height()),"monthView"===d&&e.monthRowAutoHeight&&(0==i.length?c._renderrows():c._updateScrollbars(c.host.height())),c.rendered&&c.rendered(),c.renderedTime=new Date}},showAppointmentsByResource:function(a){for(var b=this,c=0;c<b.uiappointments.length;c++){var d=b.uiappointments[c];if(d.resourceId==a&&(d.hidden=!1,d.hiddenByResourceId=!1,d.exceptions))for(var e=0;e<d.exceptions.length;e++)d.exceptions[e].hiddenByResourceId=!1,d.exceptions[e].hidden=!1}if(b._resourcesElements){var f=b.getColors(b._resources.indexOf(a));b._resourcesElements.top[a].attr("data-toggle","on"),b._resourcesElements.top[a].css("background",f.background),b._resourcesElements.bottom[a].attr("data-toggle","on"),b._resourcesElements.bottom[a].css("background",f.background)}b.hiddenResources&&delete b.hiddenResources[a],b._renderrows()},hideAppointmentsByResource:function(a){for(var b=this,c=0;c<b.uiappointments.length;c++){var d=b.uiappointments[c];if(d.resourceId==a&&(d.hidden=!0,d.hiddenByResourceId=!0,d.exceptions))for(var e=0;e<d.exceptions.length;e++)d.exceptions[e].hiddenByResourceId=!0,d.exceptions[e].hidden=!0}b._resourcesElements&&(b._resourcesElements.top[a].attr("data-toggle","off"),b._resourcesElements.top[a].css("background","transparent"),b._resourcesElements.bottom[a].attr("data-toggle","off"),b._resourcesElements.bottom[a].css("background","transparent")),b.hiddenResources||(b.hiddenResources=new Array),b.hiddenResources[a]=!0,b._renderrows()},_prepareAppointmentsInView:function(b,c){var d=this;if(!d._appupdating){for(var e=new Array,f=0;f<this.uiappointments.length;f++){var g=this.uiappointments[f];if(!g.hidden||null!=g.recurrencePattern){var h=a.jqx.scheduler.utilities.rangeIntersection(g.from,g.to,b,c);h&&!g.recurrencePattern&&e.push(g),g.renderedAppointments=new Array;var i=!1;if(g.recurrencePattern){for(var j=g.getOccurrences(b,c),k=g.exceptions,l=0;l<j.length;l++){var m=j[l];if(!m.hidden){for(var n=!0,o=0;o<k.length;o++){var p=k[o],q=p.occurrenceFrom?p.occurrenceFrom:p;if(d.selectedJQXAppointment&&d.selectedJQXAppointment.rootAppointment&&!i&&d.selectedJQXAppointment.occurrenceFrom.clearTime().equals(q.clearTime())&&(d.selectedJQXAppointment=p,i=!0),q.clearTime().equals(m.from.clearTime())){n=!1;break}}n&&(d.selectedJQXAppointment&&d.selectedJQXAppointment.rootAppointment&&!i&&d.selectedJQXAppointment.occurrenceFrom.clearTime().equals(m.occurrenceFrom.clearTime())&&(d.selectedJQXAppointment=m,i=!0),g.renderedAppointments[m.id]=m,e.push(m))}}for(var o=0;o<k.length;o++){var p=k[o],q=p.occurrenceFrom?p.from:p,r=g.createOccurrence(q);p.occurrenceFrom&&(p.cloneAppointmentAttributes(r),p.hidden)||r!=g&&(e.push(p),g.renderedAppointments[p.id]=p)}}}}var s=new Array;this.tabKeyAppointments=new Array;for(var f=0;f<e.length;f++){var t=e[f];s.push(t),this.tabKeyAppointments.push(t)}s.sort(this._sortAppointmentsByFrom),this._resources.length>0?this.tabKeyAppointments.sort(function(a,b){return d._sortAppointmentsByResourceId(a,b,d)}):this.tabKeyAppointments.sort(this._sortAppointmentsByFrom),this.appointmentsToRender=s}},_renderDayWeekAppointments:function(){var b=this,c=(b._views[b._view].type,b._views[b._view]),d=new Array,e=new Array,f=this.rows,g=b.showAllDayRow,h=b.getMinutesPerScale();c.timeRuler&&void 0!=c.timeRuler.showAllDayRow&&(g=c.timeRuler.showAllDayRow);for(var i=0;i<this.appointmentsToRender.length;i++){var j=this.appointmentsToRender[i],k=j.from,l=j.to,m=a.jqx.scheduler.utilities.getEndOfDay(l),n=k.day(),o=(j.allDay,b._getDateByString),p=new Array,q=new Array,r=j.resourceId,s=b._resources.indexOf(r);b.resources&&"none"==b.resources.orientation&&(s=-1);var t=k.toDate().valueOf(),u=l.toDate().valueOf(),v=(m.toDate().valueOf(),function(a,b){return a.date<b.date?-1:a.date==b.date?0:a.date>b.date?1:void 0});if(!j.allDay&&j.duration().days()<1||!g){var w=l.toDate(),x=!1;0==w.getHours()&&0==w.getMinutes()&&(x=!0);for(var y=0;y<b.columnCells.length;y++)if(b.columnCells[y]){var z=b.columnCells[y];b.rtl&&(z=b.columnCells[b.columnCells.length-1-y]);for(var A=0;A<z.length;A++)if(!z[A].getAttribute("data-end-date")){var B=z[A].getAttribute("data-date"),C=o(B),D=o(B);D.setMinutes(D.getMinutes()+h-1);var E=C.valueOf(),F=D.valueOf();if(!(E>l)&&(t<=E&&E<u||t<=F&&F<u||t>=E&&F>=u)){if(s!=-1&&1+s!=z[A].getAttribute("data-view"))continue;n!=C.getDate()&&(p.sort(v),q.push(p),p=new Array,n=k.addDays(1).day()),p.push({cell:z[A],date:C})}}}p.sort(v),q.push(p);for(var G=new Array,y=0;y<q.length;y++){var z=q[y];if(0!=z.length){var H=b.cellWidth,I=z[z.length-1].cell.offsetTop+b.cellHeight,J=z[0].cell.offsetLeft,K=z[0].cell.offsetTop,L=b.getMinutesPerScale(),w=new a.jqx.date(z[z.length-1].date,b.timeZone).addMinutes(L),M={cells:z,x:J,y:K,height:I-K,width:H,appointment:j,from:new a.jqx.date(z[0].date,b.timeZone),to:w};G.push(M),d.push(M)}}j.elements=G,j.rootAppointment&&(j.rootAppointment.elements=j.rootAppointment.elements.concat(j.elements))}else{var z=f[0].cells;if(this.tableRows>1){var N=f.length/b.tableRows,O=s*N;z=f[O].cells}for(var A=0;A<z.length;A++){var B=z[A].getAttribute("data-date"),P=o(B),C=new a.jqx.date(P,b.timeZone);C=a.jqx.scheduler.utilities.getEndOfDay(C);var E=C.toDate().valueOf();if(!(E>m)&&k<=C&&C<=m){if(s!=-1&&1+s!=z[A].getAttribute("data-view"))continue;0==p.length&&(C=a.jqx.scheduler.utilities.getStartOfDay(C)),p.push({cell:z[A],date:C})}}p.sort(v),q.push(p);for(var G=new Array,y=0;y<q.length;y++){var z=q[y];if(0==z.length)break;var Q=a(z[0].cell).position(),H=a(z[z.length-1].cell).position().left+this.cellWidth-Q.left,I=a(z[z.length-1].cell).position().top,J=Q.left,K=Q.top;if(this.rtl)var Q=a(z[z.length-1].cell).position(),J=Q.left,H=a(z[0].cell).position().left+this.cellWidth-Q.left;var R=z[z.length-1].date;R=new a.jqx.date(a.jqx.scheduler.utilities.getEndOfDay(R),b.timeZone);var M={cells:z,x:J,y:K,height:I-K+this.cellHeight,width:H,appointment:j,from:a.jqx.scheduler.utilities.getStartOfDay(new a.jqx.date(z[0].date,b.timeZone)),to:R};G.push(M),e.push(M)}j.elements=G,j.rootAppointment&&(j.rootAppointment.elements=j.rootAppointment.elements.concat(j.elements))}}var S=this.getViewStart(),T=this.getViewEnd();if(this._resources.length<2||"none"==this.resources.orientation){for(var U=new Array,V=S,W=0;V<T;){U[W]=new Array;for(var y=0;y<d.length;y++){var X=d[y];X.from.day()==V.day()&&(X.column=-1,X.columnSpan=1,U[W].push(X))}W++,V=V.addDays(1)}for(var y=0;y<U.length;y++)this._renderAppointmentsInDay(U[y]);this._renderAllDayAppointments(e)}else for(var A=0;A<this._resources.length;A++){for(var Y=this._resources[A],U=new Array,V=S,W=0;V<T;){U[W]=new Array;for(var y=0;y<d.length;y++){var X=d[y];X.from.day()==V.day()&&(X.column=-1,X.columnSpan=1,X.appointment.resourceId==Y&&U[W].push(X))}W++,V=V.addDays(1)}for(var y=0;y<U.length;y++)this._renderAppointmentsInDay(U[y]);for(var Z=new Array,y=0;y<e.length;y++)e[y].appointment.resourceId==Y&&Z.push(e[y]);this._renderAllDayAppointments(Z)}},_renderAllDayAppointments:function(b){var c=this,d=this.showAllDayRow,e=this._views[this._view];if(e.timeRuler&&void 0!=e.timeRuler.showAllDayRow&&(d=e.timeRuler.showAllDayRow),d&&0!=b.length){var f=b,g=1;if(g=this.getMaxAllDayAppointments(b),1==this.tableRows){this.table[0].rows[0].clientHeight/g}else{this.table[0].rows[1].clientHeight/g}for(var h=0;h<b.length;h++){var i=b[h];i.row=-1;var j=this.getCollisionAppointments(i,b);j.sort(this._sortAppointmentsByFrom);var k=j.indexOf(i);if(k>=0)for(var l=k;l<j.length;l++)j[l].row=-1;for(var m=0;m<g;m++){var n=m;for(var o in j){if("indexOf"==o)break;var p=j[o];if(p.row==-1&&!this.isBusyRow(n,j)){p.row=n;var q=g,r=this.getMaxAllDayAppointments(j);q>r&&(q=r),p.rowsCount=q}}}}for(var m=0;m<f.length;m++){var i=f[m],j=this.getCollisionAppointments(i,f);j.sort(this._sortAppointmentsByFrom);var s=1;for(var o in j){if("indexOf"==o)break;var t=j[o];s=Math.max(s,t.rowsCount)}for(var o in j){if("indexOf"==o)break;var t=j[o];t.rowsCount=s}if(1==j.length)i.rowSpan=s;else{for(var u=0,v=!0,l=i.row;l<s;l++){for(var o in j){if("indexOf"==o)break;var p=j[o];p!=i&&p.row==l&&(v=!1)}if(!v)break;u++}i.rowSpan=u}}var w=c.appointmentsMinHeight+2;if(c.isTouchDevice())var w=c.touchAppointmentsMinHeight+2;for(var x=0;x<f.length;x++){var y=w,i=f[x];i.height=w;var z=y*i.row;if(i.y=18+i.y+z+4*i.row,i.x+=3,i.width-=8,0!=i.appointment.from.hour()||23!=i.appointment.to.hour()){var A=this.getViewStart(),B=this.getViewEnd();if(c.rtl){var C=parseFloat(c.cellWidth/24)*i.appointment.to.hour()+parseFloat(c.cellWidth/48)*(i.appointment.to.minute()/30),D=parseFloat(c.cellWidth/24)*i.appointment.from.hour()+parseFloat(c.cellWidth/48)*(i.appointment.from.minute()/30);C>0&&(C=c.cellWidth-C),i.appointment.from<A&&(D=0),i.appointment.to>B&&(C=0),"exactTime"==e.appointmentsRenderMode&&(i.x+=C,i.width-=C,i.width-=D),i.appointment.duration().days()<1&&i.width<15&&(i.width=15),i.timewidth=i.width,"exactTimeStatus"==e.appointmentsRenderMode&&(i.timewidth-=C,i.timewidth-=D),i.timex=C}else{var C=parseFloat(c.cellWidth/24)*i.appointment.from.hour()+parseFloat(c.cellWidth/48)*(i.appointment.from.minute()/30);i.appointment.from<A&&(C=0),i.timewidth=i.width,i.timex=C;var D=parseFloat(c.cellWidth/24)*i.appointment.to.hour()+parseFloat(c.cellWidth/48)*(i.appointment.to.minute()/30);i.appointment.to>B&&(D=0),i.timewidth-=C,D>0&&(i.timewidth-=c.cellWidth,i.timewidth+=D),"exactTime"==e.appointmentsRenderMode&&(i.width=i.timewidth,i.x+=C)}}}for(var x=0;x<f.length;x++){var E=f[x],F="",G="auto",e=this._views[this._view],H=E.appointment.from,I=E.appointment.to;e.timeRuler&&e.timeRuler.formatString&&(G=e.timeRuler.formatString);var J=G;if("auto"===G){if(0==H.hour()&&0==H.minute()||12==H.hour()&&0==H.minute())var J="hh tt";else var J="hh:mm";if(0==I.hour()&&0==I.minute()||12==I.hour()&&0==I.minute())var K="hh tt";else var K="hh:mm"}var L=H.toString(J),M=I.toString(K),N=E.appointment.duration(),O=E.appointment.allDay||23===N.hours&&59===N.minutes&&59===N.seconds,P=E.appointment.background,Q=E.appointment.subject?E.appointment.subject:"(No Title)",R=E.appointment.color,S=E.appointment.resourceId,T=c.getColors(c._resources.indexOf(S)),U=" data-resourceId='"+S+"' ",V=E.appointment.borderColor,W=E.appointment.location;W.length>0&&(W=", "+W),P||(P=T.background),V||(V=T.border),R||(R=T.color);var X=E.appointment.isRecurrentAppointment(),Y=E.appointment.isException();O&&(L="",M="");var Z="",$=c.toTP("jqx-scheduler-appointment-status"),_="",aa=c.statuses[E.appointment.status],ba=!1;aa&&("transparent"==aa?ba=!1:(_="<div style='background: "+aa+"; border-right-color: "+V+"' class='"+$+"'></div>","tentative"==aa&&($=c.toTP("jqx-scheduler-appointment-status jqx-scheduler-appointment-status-stripes"),_="<div style='background-color: "+V+"; border-right-color: "+V+"' class='"+$+"'></div>"),ba=!0));var ca=c.toTP("jqx-scheduler-appointment-duration-status"),da="<div style='width: "+E.timewidth+"px; left: "+E.timex+"px;' class='"+ca+"'></div>";O&&(da="");var ea="";if("exactTimeStatus"!=e.appointmentsRenderMode&&(da=""),c.rtl){var $=c.toTP("jqx-scheduler-appointment-status-rtl jqx-scheduler-appointment-status");_="<div style='background: "+aa+"; border-left-color: "+V+"' class='"+$+"'></div>","tentative"==aa&&($=c.toTP("jqx-scheduler-appointment-status-rtl jqx-scheduler-appointment-status jqx-scheduler-appointment-status-stripes"),_="<div style='background-color: "+V+"; border-left-color: "+V+"' class='"+$+"'></div>"),ea=_,_=""}var fa="",ga=Q+W;if(O||(ga=Q+W+da),c.renderAppointment){var ha=c.renderAppointment({appointment:E.appointment.boundAppointment,textColor:R,background:P,borderColor:V,html:ga,cssClass:"",style:"",width:E.width,height:E.height,view:c._views[c._view].type});if(ha){var F=ha.html;if(F!=ga&&(ga=F),R=ha.textColor,P=ha.background,V=ha.borderColor,ha.cssClass&&(fa=ha.cssClass+" "),""!=ha.style){var T=c.getAppointmentColors(ha.style);P=T.background,V=T.border,R=T.color}}}if(""===Z)if(ba)var Z="<div style='white-space:nowrap;' class='"+c.toTP("jqx-scheduler-appointment-content")+"'>"+_+"<div class='"+c.toTP("jqx-scheduler-appointment-inner-content")+"'>"+ga+"</div>"+ea+"</div>";else var Z="<div style='white-space:nowrap;' class='"+c.toTP("jqx-scheduler-appointment-content")+"'><div class='"+c.toTP("jqx-scheduler-appointment-inner-content")+"'>"+ga+"</div></div>";var ia="";if(c.rtl&&(ia=c.toTP("jqx-rtl jqx-scheduler-appointment-rtl")+" "),Y){var ja="white"==R.toLowerCase()?c.toTP("jqx-icon-recurrence-exception-white"):c.toTP("jqx-icon-recurrence-exception");F="<div data-key='"+E.appointment.id+"'"+U+"class='"+ia+fa+c.toTP("jqx-scheduler-appointment jqx-rc-all")+"' style='position:absolute; z-index: 399; left: "+E.x+"px; top: "+E.y+"px; width: "+E.width+"px; line-height: "+E.height+"px; height: "+E.height+"px; border-color:"+V+"; color:"+R+"; background:"+P+";'><div class='"+ja+"'></div>"+Z+"<div class='"+c.toTP("jqx-scheduler-appointment-resize-indicator jqx-scheduler-appointment-left-resize-indicator")+"'></div><div class='"+c.toTP("jqx-scheduler-appointment-resize-indicator jqx-scheduler-appointment-right-resize-indicator")+"'></div>"}else if(X){var ka="white"==R.toLowerCase()?c.toTP("jqx-icon-recurrence-white"):c.toTP("jqx-icon-recurrence");F="<div data-key='"+E.appointment.id+"'"+U+"class='"+ia+fa+c.toTP("jqx-scheduler-appointment jqx-rc-all")+"' style='position:absolute; z-index: 399; left: "+E.x+"px; top: "+E.y+"px; width: "+E.width+"px; line-height: "+E.height+"px; height: "+E.height+"px; border-color:"+V+"; color:"+R+"; background:"+P+";'><div class='"+ka+"'></div>"+Z+"<div class='"+c.toTP("jqx-scheduler-appointment-resize-indicator jqx-scheduler-appointment-left-resize-indicator")+"'></div><div class='"+c.toTP("jqx-scheduler-appointment-resize-indicator jqx-scheduler-appointment-right-resize-indicator")+"'></div>"}else F="<div data-key='"+E.appointment.id+"'"+U+"class='"+ia+fa+c.toTP("jqx-scheduler-appointment jqx-rc-all")+"' style='position:absolute; z-index: 399; left: "+E.x+"px; top: "+E.y+"px; width: "+E.width+"px; line-height: "+E.height+"px; height: "+E.height+"px; border-color:"+V+"; color:"+R+"; background:"+P+";'>"+Z+"<div class='"+c.toTP("jqx-scheduler-appointment-resize-indicator jqx-scheduler-appointment-left-resize-indicator")+"'></div><div class='"+c.toTP("jqx-scheduler-appointment-resize-indicator jqx-scheduler-appointment-right-resize-indicator")+"'></div>";var la=a(F);if(1==this.tableRows?la.appendTo(this.pinnedtable):la.appendTo(this.table),E.element=la,this.appointmentTooltips)if(E.appointment.tooltip)la[0].setAttribute("title",E.appointment.tooltip);else{var ma=E.appointment.subject;if(L&&(ma=L+" - "+M+" "+ma),ma){var W=E.appointment.location;W&&(ma+="\n"+W),la[0].setAttribute("title",ma)}}}}},_renderAppointmentsInDay:function(b,c){if(0!=b.length){var d=this,e=this._views[this._view],f=b,g=(this.getViewStart(),this.getViewEnd(),1),h=0;e.timeRuler?(h=this.columns.records[1].width,e.timeRuler.timeZones&&(h=this.columns.records[1+e.timeRuler.timeZones.length].width)):h=this.columns.records[1].width,g=this.getMaxColumnsInADay(b);var i=h/g;if(!(i<0)){for(var j=0;j<b.length;j++){var k=b[j];k.column=-1;var l=this.getCollisionAppointments(k,b);l.sort(this._sortAppointmentsByFrom);var m=l.indexOf(k);if(m>=0)for(var n=m;n<l.length;n++)l[n].column=-1;for(var o=0;o<g;o++){var p=o;for(var q in l){if("indexOf"==q)break;var r=l[q];if(r.column==-1&&!this.isBusyColumn(p,l)){r.column=p;var s=g,t=this.getMaxColumnsInADay(l);s>t&&(s=t),r.columnsCount=s}}}}for(var o=0;o<f.length;o++){var k=f[o],l=this.getCollisionAppointments(k,f);l.sort(this._sortAppointmentsByFrom);var u=1;for(var q in l){if("indexOf"==q)break;var v=l[q];void 0!=v.columnsCount&&(u=Math.max(u,v.columnsCount))}for(var q in l){if("indexOf"==q)break;var v=l[q];v.columnsCount=u}if(1==l.length)k.columnSpan=u;else{for(var w=0,x=!0,n=k.column;n<u;n++){for(var q in l){if("indexOf"==q)break;var r=l[q];void 0!=r.column&&r!=k&&r.column==n&&(x=!1)}if(!x)break;w++}k.columnSpan=w}}for(var y=0;y<f.length;y++){var z=h/f[y].columnsCount,k=f[y];k.width=-5+z*k.columnSpan;var A=z*k.column;if(k.x=2+k.x+A,k.height-=5,k.y+=1,"exactTime"==e.appointmentsRenderMode){var B=d.getMinutesPerScale();if(k.appointment.from.minute()%B!=0)var C=k.appointment.from.minute()%B,D=parseFloat(d.cellHeight/B)*C;else var D=0;if(k.appointment.to.minute()%B!=0){var C=k.appointment.to.minute()%B,E=d.cellHeight-parseFloat(d.cellHeight/B)*C;k.to.day()!==k.appointment.to.day()&&(E=0)}else E=0;k.y+=D,k.height-=D,k.height-=E}}for(var y=0;y<f.length;y++){var F=f[y],G="",H="auto",e=this._views[this._view],I=F.appointment.from,J=F.appointment.to;e.timeRuler&&e.timeRuler.formatString&&(H=e.timeRuler.formatString);var K=H;if("auto"===H){if(0==I.hour()&&0==I.minute()||12==I.hour()&&0==I.minute())var K="hh tt";else var K="hh:mm";if(0==J.hour()&&0==J.minute()||12==J.hour()&&0==J.minute())var L="hh tt";else var L="hh:mm"}var M=(I.toString(K),J.toString(L),F.appointment.background),N=F.appointment.subject?F.appointment.subject:"(No Title)",O=F.appointment.location?F.appointment.location:"",P=F.appointment.color,Q=F.appointment.resourceId,R=d.getColors(d._resources.indexOf(Q)),S=" data-resourceId='"+Q+"' ",T=F.appointment.borderColor;M||(M=R.background),T||(T=R.border),P||(P=R.color);var U=F.appointment.isRecurrentAppointment(),V=F.appointment.isException(),W="",X=d.toTP("jqx-scheduler-appointment-status"),Y="",Z=d.statuses[F.appointment.status],$=!1;Z&&("transparent"==Z?$=!1:(Y="<div style='background: "+Z+"; border-right-color: "+T+"' class='"+X+"'></div>","tentative"==Z&&(X=d.toTP("jqx-scheduler-appointment-status jqx-scheduler-appointment-status-stripes"),Y="<div style='background-color: "+T+"; border-right-color: "+T+"' class='"+X+"'></div>"),$=!0));var _="";if(d.rtl){var X=d.toTP("jqx-scheduler-appointment-status-rtl jqx-scheduler-appointment-status");Y="<div style='background: "+Z+"; border-left-color: "+T+"' class='"+X+"'></div>","tentative"==Z&&(X=d.toTP("jqx-scheduler-appointment-status-rtl jqx-scheduler-appointment-status jqx-scheduler-appointment-status-stripes"),Y="<div style='background-color: "+T+"; border-left-color: "+T+"' class='"+X+"'></div>"),_=Y,Y=""}var aa="",ba=N+"<br/>"+O;if(!O)var ba=N;if(d.renderAppointment){var ca=d.renderAppointment({appointment:F.appointment.boundAppointment,textColor:P,background:M,borderColor:T,html:ba,cssClass:"",style:"",width:F.width,height:F.height,view:d._views[d._view].type});if(ca){var G=ca.html;if(G!=ba&&(ba=G),P=ca.textColor,M=ca.background,T=ca.borderColor,ca.cssClass&&(aa=ca.cssClass+" "),""!=ca.style){var R=d.getAppointmentColors(ca.style);M=R.background,T=R.border,P=R.color}}}if(""===W)if($)var W="<div class='"+d.toTP("jqx-scheduler-appointment-content")+"'>"+Y+"<div class='"+d.toTP("jqx-scheduler-appointment-inner-content")+"'>"+ba+"</div>"+_+"</div>";else var W="<div class='"+d.toTP("jqx-scheduler-appointment-content")+"'><div class='"+d.toTP("jqx-scheduler-appointment-inner-content")+"'>"+ba+"</div></div>";var da="";if(d.rtl&&(da=d.toTP("jqx-rtl jqx-scheduler-appointment-rtl")+" "),V){var ea="white"==P.toLowerCase()?d.toTP("jqx-icon-recurrence-exception-white"):d.toTP("jqx-icon-recurrence-exception");G="<div data-key='"+F.appointment.id+"'"+S+"class='"+da+aa+d.toTP("jqx-scheduler-appointment jqx-rc-all")+"' style='position:absolute; z-index: 399; left: "+F.x+"px; top: "+F.y+"px; width: "+F.width+"px; height: "+F.height+"px; border-color:"+T+"; color:"+P+"; background:"+M+";'><div class='"+ea+"'></div>"+W+"<div class='"+d.toTP("jqx-scheduler-appointment-resize-indicator jqx-scheduler-appointment-top-resize-indicator")+"'></div><div class='"+d.toTP("jqx-scheduler-appointment-resize-indicator jqx-scheduler-appointment-bottom-resize-indicator")+"'></div></div>"}else if(U){var fa="white"==P.toLowerCase()?d.toTP("jqx-icon-recurrence-white"):d.toTP("jqx-icon-recurrence");G="<div data-key='"+F.appointment.id+"'"+S+"class='"+da+aa+d.toTP("jqx-scheduler-appointment jqx-rc-all")+"' style='position:absolute; z-index: 399; left: "+F.x+"px; top: "+F.y+"px; width: "+F.width+"px; height: "+F.height+"px; border-color:"+T+"; color:"+P+"; background:"+M+";'><div class='"+fa+"'></div>"+W+"<div class='"+d.toTP("jqx-scheduler-appointment-resize-indicator jqx-scheduler-appointment-top-resize-indicator")+"'></div><div class='"+d.toTP("jqx-scheduler-appointment-resize-indicator jqx-scheduler-appointment-bottom-resize-indicator")+"'></div></div>"}else G="<div data-key='"+F.appointment.id+"'"+S+"class='"+da+aa+d.toTP("jqx-scheduler-appointment jqx-rc-all")+"' style='position:absolute; z-index: 399; left: "+F.x+"px; top: "+F.y+"px; width: "+F.width+"px; height: "+F.height+"px; border-color:"+T+"; color:"+P+"; background:"+M+";'>"+W+"<div class='"+d.toTP("jqx-scheduler-appointment-resize-indicator jqx-scheduler-appointment-top-resize-indicator")+"'></div><div class='"+d.toTP("jqx-scheduler-appointment-resize-indicator jqx-scheduler-appointment-bottom-resize-indicator")+"'></div></div>";var ga=a(G);if(ga.appendTo(this.table),F.element=ga,this.appointmentTooltips)if(F.appointment.tooltip)ga[0].setAttribute("title",F.appointment.tooltip);else{var ha=F.appointment.subject;if(ha){var O=F.appointment.location;O&&(ha+="\n"+O),ga[0].setAttribute("title",ha)}}}}}},getCollisionAppointments:function(b,c){for(var d=new Array,e=b.from,f=b.to,g=0;g<c.length;g++){var h=c[g],i=h.from,j=h.to;a.jqx.scheduler.utilities.rangeIntersection(e,f,i,j)&&d.push(h)}return d},getAllDayCollisionAppointments:function(b,c){for(var d=new Array,e=a.jqx.scheduler.utilities.getStartOfDay(b.from),f=a.jqx.scheduler.utilities.getEndOfDay(b.to),g=0;g<c.length;g++){var h=c[g],i=a.jqx.scheduler.utilities.getStartOfDay(h.from),j=a.jqx.scheduler.utilities.getEndOfDay(h.to);
-a.jqx.scheduler.utilities.rangeIntersection(e,f,i,j)&&d.push(h)}return d},_renderAppointments:function(a,b){var c=this;if(!c._appupdating){c.table.find(".jqx-scheduler-appointment").remove(),c.pinnedtable.find(".jqx-scheduler-appointment").remove();var d=c._views[c._view].type;"dayView"===d||"weekView"===d?c._renderDayWeekAppointments(a,b):"monthView"===d?c._renderMonthAppointments(a,b):"timelineWeekView"!==d&&"timelineDayView"!==d&&"timelineMonthView"!==d||c._renderTimelineAppointments(a,b),c.selectedJQXAppointment&&c._selectAppointment(c.selectedJQXAppointment)}},_renderTimelineAppointments:function(b,c){for(var d=this,e=d._views[d._view].type,f=d._views[d._view],g=new Array,h=(this.rows,this.cellHeight),i=this.cellWidth,j=d.getMinutesPerScale(),k=0;k<this.appointmentsToRender.length;k++){var l=this.appointmentsToRender[k],m=l.from,n=l.to,o=d._getDateByString,p=new Array,q=m.toDate().valueOf(),r=n.toDate().valueOf();"timelineMonthView"===e&&(q=m.clearTime().toDate().valueOf());var s=function(a,b){return a.date<b.date?-1:a.date==b.date?0:a.date>b.date?1:void 0},t=d.rows[0],u=l.resourceId,v=d._resources.indexOf(u);if(d._resources.length>0&&"horizontal"!==d.resources.orientation&&v>=1&&(t=d.rows[v]),d.resources&&"none"==d.resources.orientation){v=-1;var t=d.rows[0]}for(var w=t.cells,x=0;x<w.length;x++){var y=w[x].getAttribute("data-date");w[x].appointments=new Array;var z=o(y),A=z.valueOf(),B=o(y);B.setMinutes(B.getMinutes()+j-1);var C=B.valueOf();if(!(A>n)&&(q<=A&&A<r||q<=C&&C<r)){if(v!=-1&&1+v!=w[x].getAttribute("data-view"))continue;p.push({cell:w[x],date:z}),t=O}}p.sort(s);var D=new Array,w=p;if(0==w.length)break;var E=d.appointmentsMinHeight;d.isTouchDevice()&&(E=d.touchAppointmentsMinHeight),f.appointmentHeight&&(E=f.appointmentHeight);var F=a(w[0].cell).position(),G=E,H=a(w[w.length-1].cell).position().left-F.left+i,I=F.left,J=F.top;if(d.rtl)var F=a(w[w.length-1].cell).position(),H=a(w[0].cell).position().left-F.left+i,I=F.left,J=F.top;var K=new a.jqx.date(w[w.length-1].date,d.timeZone).addMinutes(j);if("timelineMonthView"===e)var K=a.jqx.scheduler.utilities.getEndOfDay(new a.jqx.date(w[w.length-1].date,d.timeZone));var L={cellX:I,cellY:J,cellHeight:h,cells:w,x:I,y:J,height:G,width:H,appointment:l,from:new a.jqx.date(w[0].date,d.timeZone),to:K};D.push(L),g.push(L),l.elements=D,l.rootAppointment&&(l.rootAppointment.elements=l.rootAppointment.elements.concat(l.elements))}if(this._resources.length<2||"none"==this.resources.orientation)this._renderUITimelineAppointments(g,b,c);else for(var x=0;x<this._resources.length;x++){for(var M=this._resources[x],N=new Array,O=0;O<g.length;O++)g[O].appointment.resourceId==M&&N.push(g[O]);this._renderUITimelineAppointments(N,b,c)}},_renderUITimelineAppointments:function(b,c,d){var e=this,f=(e._views[e._view].type,e._views[e._view]),g=b,h=1,e=this,i=new Array;h=e.getMaxTimelineAppointments(b,i,c,d);var j=e.appointmentsMinHeight;e.isTouchDevice()&&(j=e.touchAppointmentsMinHeight),f.appointmentHeight&&(j=f.appointmentHeight);for(var k=0;k<b.length;k++){var l=b[k];l.row=-1;var m=e.getCollisionAppointments(l,b);m.sort(e._sortAppointmentsByFrom);var n=m.indexOf(l);if(n>=0)for(var o=n;o<m.length;o++)m[o].row=-1;for(var p=0;p<h;p++){var q=p;for(var r in m){if("indexOf"==r)break;var s=m[r];if(s.row==-1&&!e.isBusyRow(q,m)){s.row=q;var t=h,u=e.getMaxTimelineAppointments(m,i,c,d);t>u&&(t=u),s.rowsCount=t}}}}for(var p=0;p<g.length;p++){var l=g[p],m=e.getCollisionAppointments(l,g);m.sort(e._sortAppointmentsByFrom);var v=1;for(var r in m){if("indexOf"==r)break;var w=m[r];v=Math.max(v,w.rowsCount)}for(var r in m){if("indexOf"==r)break;var w=m[r];w.rowsCount=v}if(1==m.length)l.rowSpan=v;else{for(var x=0,y=!0,o=l.row;o<v;o++){for(var r in m){if("indexOf"==r)break;var s=m[r];s!=l&&s.row==o&&(y=!1)}if(!y)break;x++}l.rowSpan=x}}for(var z=0;z<g.length;z++){var A=j,l=g[z];l.height=A;var B=2+(3+A)*l.row;l.y=l.y+B,l.x+=1,l.width-=5;var C=e._views[e._view].type,f=e._views[e._view];if("timelineMonthView"==C&&f.appointmentsRenderMode){if(0!=l.appointment.from.hour()||23!=l.appointment.to.hour())if(e.rtl){var D=parseFloat(e.cellWidth/24)*l.appointment.to.hour()+parseFloat(e.cellWidth/48)*(l.appointment.to.minute()/30),E=parseFloat(e.cellWidth/24)*l.appointment.from.hour()+parseFloat(e.cellWidth/48)*(l.appointment.from.minute()/30);D>0&&(D=e.cellWidth-D),"exactTime"==f.appointmentsRenderMode&&(l.x+=D,l.width-=D,l.width-=E),l.appointment.duration().days()<1&&l.width<15&&(l.width=15),l.timewidth=l.width,l.timex=D}else{var D=parseFloat(e.cellWidth/24)*l.appointment.from.hour()+parseFloat(e.cellWidth/48)*(l.appointment.from.minute()/30),E=parseFloat(e.cellWidth/24)*l.appointment.to.hour()+parseFloat(e.cellWidth/48)*(l.appointment.to.minute()/30);if(l.timewidth=l.width,l.timex=D,l.timewidth-=D,l.timewidth-=e.cellWidth,l.timewidth+=E,"exactTime"==f.appointmentsRenderMode&&(l.width=l.timewidth,l.x+=D,l.appointment.duration().days()<1&&l.width<15&&(l.width=15,D+15>e.cellWidth))){var F=e.cellWidth-D-15;l.x+=F}}}else if(f.appointmentsRenderMode&&"exactTime"==f.appointmentsRenderMode){var G=e.getMinutesPerScale();if(l.appointment.from.minute()%G!=0){var H=l.appointment.from.minute()%G,D=parseFloat(e.cellWidth/G)*H;if(e.rtl)var D=parseFloat(e.cellWidth/G)*H}else var D=0;if(l.appointment.to.minute()%G!=0){var H=l.appointment.to.minute()%G,E=e.cellWidth-parseFloat(e.cellWidth/G)*H;if(e.rtl)var E=e.cellWidth-parseFloat(e.cellWidth/G)*H}else E=0;e.rtl?(l.x+=E,l.width-=D,l.width-=E):(l.x+=D,l.width-=D,l.width-=E)}}for(var I="",z=0;z<g.length;z++){var J=g[z],K="",L="auto",f=e._views[e._view];J.appointment.from,J.appointment.to;f.timeRuler&&f.timeRuler.formatString&&(L=f.timeRuler.formatString);var M=J.appointment.background,N=J.appointment.subject?J.appointment.subject:"(No Title)",O=J.appointment.location;O&&O.length>1&&(O=", "+O);var P=J.appointment.color,Q=J.appointment.resourceId,R=e.getColors(e._resources.indexOf(Q)),S=" data-resourceId='"+Q+"' ",T=J.appointment.borderColor;M||(M=R.background),T||(T=R.border),P||(P=R.color);var U=J.appointment.isRecurrentAppointment(),V=J.appointment.isException(),W="",X=e.toTP("jqx-scheduler-appointment-status"),Y="",Z=e.statuses[J.appointment.status],$=!1;Z&&("transparent"==Z?$=!1:(Y="<div style='background: "+Z+"; border-right-color: "+T+"' class='"+X+"'></div>","tentative"==Z&&(X=e.toTP("jqx-scheduler-appointment-status jqx-scheduler-appointment-status-stripes"),Y="<div style='background-color: "+T+"; border-right-color: "+T+"' class='"+X+"'></div>"),$=!0));var _="";if(e.rtl){var X=e.toTP("jqx-scheduler-appointment-status-rtl jqx-scheduler-appointment-status");Y="<div style='background: "+Z+"; border-left-color: "+T+"' class='"+X+"'></div>","tentative"==Z&&(X=e.toTP("jqx-scheduler-appointment-status-rtl jqx-scheduler-appointment-status jqx-scheduler-appointment-status-stripes"),Y="<div style='background-color: "+T+"; border-left-color: "+T+"' class='"+X+"'></div>"),_=Y,Y=""}var aa="",ba=N+"<br/>"+O;if(e.renderAppointment){var ca=e.renderAppointment({appointment:J.appointment.boundAppointment,textColor:P,background:M,borderColor:T,html:ba,cssClass:"",style:"",width:J.width,height:J.height,view:e._views[e._view].type});if(ca){var K=ca.html;if(K!=ba&&(ba=K),P=ca.textColor,M=ca.background,T=ca.borderColor,ca.cssClass&&(aa=ca.cssClass+" "),""!=ca.style){var R=e.getAppointmentColors(ca.style);M=R.background,T=R.border,P=R.color}}}if(""===W)if($)var W="<div style='white-space:nowrap;' class='"+e.toTP("jqx-scheduler-appointment-content")+"'>"+Y+"<div class='"+e.toTP("jqx-scheduler-appointment-inner-content")+"'>"+ba+"</div>"+_+"</div>";else var W="<div style='white-space:nowrap;' class='"+e.toTP("jqx-scheduler-appointment-content")+"'><div class='"+e.toTP("jqx-scheduler-appointment-inner-content")+"'>"+ba+"</div></div>";var da="";if(e.rtl&&(da=e.toTP("jqx-rtl jqx-scheduler-appointment-rtl")+" "),V){var ea="white"==P.toLowerCase()?e.toTP("jqx-icon-recurrence-exception-white"):e.toTP("jqx-icon-recurrence-exception");K="<div data-key='"+J.appointment.id+"'"+S+"class='"+da+aa+e.toTP("jqx-scheduler-appointment jqx-rc-all")+"' style='position:absolute; z-index: 399; left: "+J.x+"px; top: "+J.y+"px; width: "+J.width+"px; height: "+J.height+"px; line-height: "+J.height+"px; border-color:"+T+"; color:"+P+"; background:"+M+";'><div class='"+ea+"'></div>"+W+"<div class='"+e.toTP("jqx-scheduler-appointment-resize-indicator jqx-scheduler-appointment-left-resize-indicator")+"'></div><div class='"+e.toTP("jqx-scheduler-appointment-resize-indicator jqx-scheduler-appointment-right-resize-indicator")+"'></div>"}else if(U){var fa="white"==P.toLowerCase()?e.toTP("jqx-icon-recurrence-white"):e.toTP("jqx-icon-recurrence");K="<div data-key='"+J.appointment.id+"'"+S+"class='"+da+aa+e.toTP("jqx-scheduler-appointment jqx-rc-all")+"' style='position:absolute; z-index: 399; left: "+J.x+"px; top: "+J.y+"px; width: "+J.width+"px; height: "+J.height+"px; line-height: "+J.height+"px; border-color:"+T+"; color:"+P+"; background:"+M+";'><div class='"+fa+"'></div>"+W+"<div class='"+e.toTP("jqx-scheduler-appointment-resize-indicator jqx-scheduler-appointment-left-resize-indicator")+"'></div><div class='"+e.toTP("jqx-scheduler-appointment-resize-indicator jqx-scheduler-appointment-right-resize-indicator")+"'></div>"}else K="<div data-key='"+J.appointment.id+"'"+S+"class='"+da+aa+e.toTP("jqx-scheduler-appointment jqx-rc-all")+"' style='position:absolute; z-index: 399; left: "+J.x+"px; top: "+J.y+"px; width: "+J.width+"px; height: "+J.height+"px; line-height: "+J.height+"px; border-color:"+T+"; color:"+P+"; background:"+M+";'>"+W+"<div class='"+e.toTP("jqx-scheduler-appointment-resize-indicator jqx-scheduler-appointment-left-resize-indicator")+"'></div><div class='"+e.toTP("jqx-scheduler-appointment-resize-indicator jqx-scheduler-appointment-right-resize-indicator")+"'></div>";I=K;var ga=a(K);if(ga.appendTo(this.table),J.element=ga,this.appointmentTooltips)if(J.appointment.tooltip)ga[0].setAttribute("title",J.appointment.tooltip);else{var ha=J.appointment.subject;if(ha){var O=J.appointment.location;O&&(ha+="\n"+O),ga[0].setAttribute("title",ha)}}}for(var ia=e.table.find(".jqx-scheduler-appointment"),ja=function(a){for(var b=0;b<ia.length;b++){var c=ia[b].getAttribute("data-key");if(c==a)return ia[b]}},z=0;z<g.length;z++){var J=g[z],ga=a(ja(J.appointment.id));a.each(J.cells,function(b){var c=a(this.cell),d=J.cellY,f=(J.cellX,J.cellHeight);if(c[0].appointments||(c[0].appointments=new Array),c[0].appointments.push({ui:ga,appointment:J}),ga=ga,J.y+J.height>=d+f-12){ga[0].style.visibility="hidden";var g=c.find(".jqx-icon-arrow-down");g.length>0&&(g[0].style.display="block",g[0].mousedown=function(){e.openedMonthCellPopup&&e.openedMonthCellPopup.remove();var b=a("<div></div>"),g=(new a.jqx.date(c.attr("data-date"),e.timeZone),a("<div class='"+e.toTP("jqx-scheduler-month-cell")+"'><span style='float: right; cursor: pointer; width:16px; height: 16px;' class='"+e.toTP("jqx-icon-close")+"'></span></div>"));g.height(16),g.find("span")[0].mousedown=function(){b.remove()},g.addClass(e.toTP("jqx-widget-header")),b.addClass(e.toTP("jqx-widget")),b.addClass(e.toTP("jqx-window")),b.addClass(e.toTP("jqx-scheduler-month-cell-popup")),b.addClass(e.toTP("jqx-popup"));var h=a("<div></div>");b.append(g),b.append(h),h.addClass(e.toTP("jqx-widget-content"));for(var i=c.width(),j=21,k=0;k<c[0].appointments.length;k++){var l=c[0].appointments[k].ui.clone(!0);l.css("left","3px"),l.css("top","0px"),l.css("margin-top","2px"),l.css("position","relative"),l.css("visibility","visible"),l.width(i-6),l.click(function(a){var b=e.getJQXAppointmentByElement(e.getAppointmentElement(a.target));e._raiseEvent("appointmentClick",{appointment:b.boundAppointment})}),l.dblclick(function(a){var b=e.getJQXAppointmentByElement(e.getAppointmentElement(a.target));if(!b.readOnly&&!e.editRecurrenceDialog.jqxWindow("isOpen")&&(!e._editDialog||e._editDialog&&!e._editDialog.jqxWindow("isOpen"))){var c=e._initDialog(b);c!==!1&&e._openDialog()}e._raiseEvent("appointmentDoubleClick",{appointment:b.boundAppointment})}),j+=l.outerHeight()+4,h.append(l)}b.css("overflow","hidden"),b.css("position","absolute");var m=e.table.height()-d-25;m<f&&(m=f),b.css("max-height",m),b.height(j),b.width(i),b.css("z-index","9999");var n=c.position();b.css("top",n.top),b.css("left",n.left),e.table.append(b),e.openedMonthCellPopup=b})}})}},_renderMonthAppointments:function(){for(var b=this,c=(b._views[b._view].type,b._views[b._view]),d=new Array,e=(this.rows,a(".jqx-scheduler-month-cell:first").height()),f=0;f<this.appointmentsToRender.length;f++){var g=this.appointmentsToRender[f],h=a.jqx.scheduler.utilities.getStartOfDay(g.from),i=a.jqx.scheduler.utilities.getEndOfDay(g.to),j=(g.allDay,b._getDateByString),k=new Array,l=new Array,m=h.toDate().valueOf(),n=i.toDate().valueOf(),o=function(a,b){return a.date<b.date?-1:a.date==b.date?0:a.date>b.date?1:void 0},p=-1,q=g.resourceId,r=b._resources.indexOf(q);b.resources&&"none"==b.resources.orientation&&(r=-1);for(var s=0;s<b.rows.length;s++)for(var t=b.rows[s].cells,u=0;u<t.length;u++){var v=t[u].getAttribute("data-date"),w=j(v),x=w.valueOf();x>i||(t[u].appointments=new Array,r!=-1&&1+r!=t[u].getAttribute("data-view")||m<=x&&x<n&&(p!=s&&p!=-1&&(k.sort(o),l.push(k),k=new Array),k.push({cell:t[u],date:w}),p=s))}k.sort(o),l.push(k);for(var y=new Array,s=0;s<l.length;s++){var t=l[s];if(0==t.length)break;var z=b.appointmentsMinHeight;b.isTouchDevice()&&(z=b.touchAppointmentsMinHeight),c.appointmentHeight&&(z=c.appointmentHeight);var A=z,B=a(t[t.length-1].cell).position().left,C=B-a(t[0].cell).position().left+b.columns.records[0].width;if(c.showWeekNumbers)var C=B-a(t[0].cell).position().left+b.columns.records[1].width;var D=a(t[0].cell).position(),E=D.left,F=D.top+e,G=a.jqx.scheduler.utilities.getEndOfDay(new a.jqx.date(t[t.length-1].date,b.timeZone)),H=new a.jqx.date(t[0].date,b.timeZone);if(b.rtl){var G=a.jqx.scheduler.utilities.getEndOfDay(new a.jqx.date(t[0].date,b.timeZone)),H=new a.jqx.date(t[t.length-1].date,b.timeZone),D=a(t[t.length-1].cell).position(),E=D.left,F=D.top+e,B=a(t[0].cell).position().left,C=B-a(t[t.length-1].cell).position().left+b.columns.records[0].width;if(c.showWeekNumbers)var C=B-a(t[t.length-1].cell).position().left+b.columns.records[1].width}var I={cells:t,cellY:parseInt(D.top),cellX:parseInt(D.left),lastCellY:parseInt(D.top),lastCellX:B,x:E,y:F,height:A,width:C,appointment:g,from:H,to:G};y.push(I),d.push(I)}g.elements=y,g.rootAppointment&&(g.rootAppointment.elements=g.rootAppointment.elements.concat(g.elements))}var J=this.getViewStart(),K=this.getViewEnd();if(this._resources.length<2||"none"==this.resources.orientation){for(var L=new Array,M=J,N=0;M<K;){L[N]=new Array;for(var s=0;s<d.length;s++){var O=d[s];M<=O.from&&O.to<M.addDays(7)&&(O.row=-1,O.rowSpan=1,L[N].push(O))}N++,M=M.addDays(7)}for(var s=0;s<L.length;s++)L[s].length>0&&this._renderUIMonthAppointments(L[s])}else for(var u=0;u<this._resources.length;u++){for(var P=this._resources[u],L=(new Array,new Array),M=J,N=0;M<K;){L[N]=new Array;for(var s=0;s<d.length;s++){var O=d[s];M<=O.from&&O.to<M.addDays(7)&&(O.row=-1,O.rowSpan=1,O.appointment.resourceId==P&&L[N].push(O))}N++,M=M.addDays(7)}for(var s=0;s<L.length;s++)L[s].length>0&&this._renderUIMonthAppointments(L[s])}},_getMonthAppointmentsPerWeek:function(){var b=this,c=(b._views[b._view].type,b._views[b._view]),d=new Array,e=(this.rows,a(".jqx-scheduler-month-cell:first").height());if(!b.rows)return new Array;for(var f=this.getViewStart(),g=this.getViewEnd(),h=0;h<this.appointmentsToRender.length;h++){var i=this.appointmentsToRender[h],j=a.jqx.scheduler.utilities.getStartOfDay(i.from),k=a.jqx.scheduler.utilities.getEndOfDay(i.to),l=(i.allDay,b._getDateByString,new Array),m=new Array,n=j.toDate().valueOf(),o=k.toDate().valueOf(),p=function(a,b){return a.date<b.date?-1:a.date==b.date?0:a.date>b.date?1:void 0},q=-1,r=i.resourceId,s=b._resources.indexOf(r);b.resources&&"none"==b.resources.orientation&&(s=-1);for(var t=0;t<b.rows.length;t++)for(var u=b.rows[t].cells,v=0;v<u.length;v++){var w=(u[v].getAttribute("data-date"),f.addDays(7*t+v).toDate()),x=w.valueOf();x>k||s!=-1&&1+s!=u[v].getAttribute("data-view")||n<=x&&x<o&&(q!=t&&q!=-1&&(l.sort(p),m.push(l),l=new Array),l.push({cell:u[v],date:w}),q=t)}l.sort(p),m.push(l);for(var y=new Array,t=0;t<m.length;t++){var u=m[t];if(0==u.length)break;var z=b.appointmentsMinHeight;b.isTouchDevice()&&(z=b.touchAppointmentsMinHeight),c.appointmentHeight&&(z=c.appointmentHeight);var A=z,B=a(u[u.length-1].cell).position().left,C=B-a(u[0].cell).position().left+b.columns.records[0].width;if(c.showWeekNumbers)var C=B-a(u[0].cell).position().left+b.columns.records[1].width;var D=a(u[0].cell).position(),E=D.left,F=D.top+e,G=a.jqx.scheduler.utilities.getEndOfDay(new a.jqx.date(u[u.length-1].date,b.timeZone)),H=new a.jqx.date(u[0].date,b.timeZone);if(b.rtl){var G=a.jqx.scheduler.utilities.getEndOfDay(new a.jqx.date(u[0].date,b.timeZone)),H=new a.jqx.date(u[u.length-1].date,b.timeZone),D=a(u[u.length-1].cell).position(),E=D.left,F=D.top+e,B=a(u[0].cell).position().left,C=B-a(u[u.length-1].cell).position().left+b.columns.records[0].width;if(c.showWeekNumbers)var C=B-a(u[u.length-1].cell).position().left+b.columns.records[1].width}var I={cells:u,cellY:parseInt(D.top),cellX:parseInt(D.left),lastCellY:parseInt(D.top),lastCellX:B,x:E,y:F,height:A,width:C,appointment:i,from:H,to:G};y.push(I),d.push(I)}}if(this._resources.length<2||"none"==this.resources.orientation){for(var J=new Array,K=f,L=0;K<g;){J[L]=new Array;for(var t=0;t<d.length;t++){var M=d[t];K<=M.from&&M.to<K.addDays(7)&&(M.row=-1,M.rowSpan=1,J[L].push(M))}L++,K=K.addDays(7)}for(var N=new Array,t=0;t<J.length;t++)if(J[t].length>0){var O=this.getMaxMonthAppointments(J[t]),z=b.appointmentsMinHeight;b.isTouchDevice()&&(z=b.touchAppointmentsMinHeight),c.appointmentHeight&&(z=c.appointmentHeight),N.push(O*(z+3)+22)}else N.push("auto");return N}for(var N=new Array,v=0;v<this._resources.length;v++){for(var P=this._resources[v],J=(new Array,new Array),K=f,L=0;K<g;){J[L]=new Array;for(var t=0;t<d.length;t++){var M=d[t];K<=M.from&&M.to<K.addDays(7)&&(M.row=-1,M.rowSpan=1,M.appointment.resourceId==P&&J[L].push(M))}L++,K=K.addDays(7)}for(var t=0;t<J.length;t++)if(J[t].length>0){var O=this.getMaxMonthAppointments(J[t]);N.push(O*(z+3)+22)}else N.push("auto");return N}},_renderUIMonthAppointments:function(b){var c=this._views[this._view],d=b,e=(this.getViewStart(),this.getViewEnd(),1),f=this;e=this.getMaxMonthAppointments(b);var g=f.appointmentsMinHeight;f.isTouchDevice()&&(g=f.touchAppointmentsMinHeight),c.appointmentHeight&&(g=c.appointmentHeight);var h=this._sortAppointmentsByFrom;this.rtl&&(h=this._sortAppointmentsByTo);for(var i=0;i<b.length;i++){var j=b[i];j.row=-1;var k=this.getCollisionAppointments(j,b);k.sort(h);var l=k.indexOf(j);if(l>=0)for(var m=l;m<k.length;m++)k[m].row=-1;for(var n=0;n<e;n++){var o=n;for(var p in k){if("indexOf"==p)break;var q=k[p];if(q.row==-1&&!this.isBusyRow(o,k)){q.row=o;var r=e,s=this.getMaxMonthAppointments(k);r>s&&(r=s),q.rowsCount=r}}}}for(var n=0;n<d.length;n++){var j=d[n],k=this.getCollisionAppointments(j,d);k.sort(h);var t=1;for(var p in k){if("indexOf"==p)break;var u=k[p];t=Math.max(t,u.rowsCount)}for(var p in k){if("indexOf"==p)break;var u=k[p];u.rowsCount=t}if(1==k.length)j.rowSpan=t;else{for(var v=0,w=!0,m=j.row;m<t;m++){for(var p in k){if("indexOf"==p)break;var q=k[p];q!=j&&q.row==m&&(w=!1)}if(!w)break;v++}j.rowSpan=v}}for(var x=0;x<d.length;x++){var y=g,j=d[x];j.height=y;var z=2+(3+y)*j.row;if(j.y=j.y+z,j.x+=1,j.width-=5,0!=j.appointment.from.hour()||23!=j.appointment.to.hour())if(f.rtl){var A=parseFloat(f.cellWidth/24)*j.appointment.to.hour()+parseFloat(f.cellWidth/48)*(j.appointment.to.minute()/30),B=parseFloat(f.cellWidth/24)*j.appointment.from.hour()+parseFloat(f.cellWidth/48)*(j.appointment.from.minute()/30);j.appointment.elements.length>1?j==j.appointment.elements[0]?B>0?"exactTime"==c.appointmentsRenderMode?(j.width-=f.cellWidth-A,j.width-=B):j.timewidth=j.width-f.cellWidth+A-B:(j.timewidth=j.width,j.timex=0):j==j.appointment.elements[j.appointment.elements.length-1]&&("exactTime"==c.appointmentsRenderMode&&(j.x+=f.cellWidth,j.x-=A,j.width+=A,j.width-=f.cellWidth),j.timewidth=j.width-f.cellWidth+A,j.timex=f.cellWidth-A):("exactTime"==c.appointmentsRenderMode&&(j.x+=f.cellWidth,j.x-=A,j.width-=f.cellWidth-A,j.width-=B),j.appointment.duration().days()<1&&j.width<15&&(j.width=15),j.timewidth=j.width-f.cellWidth+A-B,j.timex=f.cellWidth-A)}else{var A=parseFloat(f.cellWidth/24)*j.appointment.from.hour()+parseFloat(f.cellWidth/48)*(j.appointment.from.minute()/30);j.timewidth=j.width,j.from.clearTime().toString()==j.appointment.from.clearTime().toString()?j.timex=A:A=0,j.appointment.elements.length>1&&j.appointment.elements[0]!=j&&(A=0);var B=parseFloat(f.cellWidth/24)*j.appointment.to.hour()+parseFloat(f.cellWidth/48)*(j.appointment.to.minute()/30);if(j.appointment.elements.length>1&&j.appointment.elements[j.appointment.elements.length-1]!=j&&(B=0),j.timewidth-=A,B>0&&(j.timewidth-=f.cellWidth,j.timewidth+=B),"exactTime"==c.appointmentsRenderMode&&(j.from.clearTime().toString()==j.appointment.from.clearTime().toString()&&(j.x+=A),j.width=j.timewidth,j.appointment.duration().days()<1&&j.width<15&&(j.width=15,A+15>f.cellWidth))){var C=f.cellWidth-A-15;j.x+=C}}}for(var x=0;x<d.length;x++){var D=d[x],E="",F="auto",c=this._views[this._view],G=D.appointment.from,H=D.appointment.to,F="auto",c=this._views[this._view],G=D.appointment.from,H=D.appointment.to;c.timeRuler&&c.timeRuler.formatString&&(F=c.timeRuler.formatString);var I=F,J=F;if("auto"===F){if(0==G.hour()&&0==G.minute()||12==G.hour()&&0==G.minute())var I="hh tt";else var I="hh:mm";if(0==H.hour()&&0==H.minute()||12==H.hour()&&0==H.minute())var J="hh tt";else var J="hh:mm"}var K=G.toString(I),L=H.toString(J),M=D.appointment.duration(),N=D.appointment.allDay||23===M.hours&&59===M.minutes&&59===M.seconds,O=D.appointment.background,P=D.appointment.subject?D.appointment.subject:"(No Title)",Q=D.appointment.color,R=D.appointment.resourceId,S=f.getColors(f._resources.indexOf(R)),T=" data-resourceId='"+R+"' ",U=D.appointment.borderColor,V=D.appointment.location;V&&V.length>1&&(V=", "+V),O||(O=S.background),U||(U=S.border),Q||(Q=S.color);var W=D.appointment.isRecurrentAppointment(),X=D.appointment.isException(),Y="",Z=f.toTP("jqx-scheduler-appointment-status"),$="",_=f.statuses[D.appointment.status],aa=!1;_&&("transparent"==_?aa=!1:($="<div style='background: "+_+"; border-right-color: "+U+"' class='"+Z+"'></div>","tentative"==_&&(Z=f.toTP("jqx-scheduler-appointment-status jqx-scheduler-appointment-status-stripes"),$="<div style='background-color: "+U+"; border-right-color: "+U+"' class='"+Z+"'></div>"),aa=!0));var ba=f.toTP("jqx-scheduler-appointment-duration-status"),ca="<div style='width: "+D.timewidth+"px; left: "+D.timex+"px;' class='"+ba+"'></div>";N&&(ca=""),"exactTimeStatus"!=c.appointmentsRenderMode&&(ca="");var da="";if(f.rtl){var Z=f.toTP("jqx-scheduler-appointment-status-rtl jqx-scheduler-appointment-status");$="<div style='background: "+_+"; border-left-color: "+U+"' class='"+Z+"'></div>","tentative"==_&&(Z=f.toTP("jqx-scheduler-appointment-status-rtl jqx-scheduler-appointment-status jqx-scheduler-appointment-status-stripes"),$="<div style='background-color: "+U+"; border-left-color: "+U+"' class='"+Z+"'></div>"),da=$,$=""}var ea="",fa=P+V;if(N||(fa=P+V+ca),f.renderAppointment){var ga=f.renderAppointment({appointment:D.appointment.boundAppointment,textColor:Q,background:O,borderColor:U,html:fa,cssClass:"",style:"",width:D.width,height:D.height,view:f._views[f._view].type});if(ga){var E=ga.html;if(E!=fa&&(fa=E),Q=ga.textColor,O=ga.background,U=ga.borderColor,ga.cssClass&&(ea=ga.cssClass+" "),""!=ga.style){var S=f.getAppointmentColors(ga.style);O=S.background,U=S.border,Q=S.color}}}if(""===Y)if(aa)var Y="<div style='white-space:nowrap;' class='"+f.toTP("jqx-scheduler-appointment-content")+"'>"+$+"<div class='"+f.toTP("jqx-scheduler-appointment-inner-content")+"'>"+fa+"</div>"+da+"</div>";else var Y="<div style='white-space:nowrap;' class='"+f.toTP("jqx-scheduler-appointment-content")+"'><div class='"+f.toTP("jqx-scheduler-appointment-inner-content")+"'>"+fa+"</div></div>";var ha="";if(f.rtl&&(ha=f.toTP("jqx-rtl jqx-scheduler-appointment-rtl")+" "),X){var ia="white"==Q.toLowerCase()?f.toTP("jqx-icon-recurrence-exception-white"):f.toTP("jqx-icon-recurrence-exception");E="<div data-key='"+D.appointment.id+"'"+T+"class='"+ha+ea+f.toTP("jqx-scheduler-appointment jqx-rc-all")+"' style='position:absolute; z-index: 399; left: "+D.x+"px; top: "+D.y+"px; width: "+D.width+"px; line-height: "+D.height+"px; height: "+D.height+"px; border-color:"+U+"; color:"+Q+"; background:"+O+";'><div class='"+ia+"'></div>"+Y+"<div class='"+f.toTP("jqx-scheduler-appointment-resize-indicator jqx-scheduler-appointment-left-resize-indicator")+"'></div><div class='"+f.toTP("jqx-scheduler-appointment-resize-indicator jqx-scheduler-appointment-right-resize-indicator")+"'></div>"}else if(W){var ja="white"==Q.toLowerCase()?f.toTP("jqx-icon-recurrence-white"):f.toTP("jqx-icon-recurrence");E="<div data-key='"+D.appointment.id+"'"+T+"class='"+ha+ea+f.toTP("jqx-scheduler-appointment jqx-rc-all")+"' style='position:absolute; z-index: 399; left: "+D.x+"px; top: "+D.y+"px; width: "+D.width+"px; line-height: "+D.height+"px; height: "+D.height+"px; border-color:"+U+"; color:"+Q+"; background:"+O+";'><div class='"+ja+"'></div>"+Y+"<div class='"+f.toTP("jqx-scheduler-appointment-resize-indicator jqx-scheduler-appointment-left-resize-indicator")+"'></div><div class='"+f.toTP("jqx-scheduler-appointment-resize-indicator jqx-scheduler-appointment-right-resize-indicator")+"'></div>"}else E="<div data-key='"+D.appointment.id+"'"+T+"class='"+ha+ea+f.toTP("jqx-scheduler-appointment jqx-rc-all")+"' style='position:absolute; z-index: 399; left: "+D.x+"px; top: "+D.y+"px; width: "+D.width+"px; line-height: "+D.height+"px; height: "+D.height+"px; border-color:"+U+"; color:"+Q+"; background:"+O+";'>"+Y+"<div class='"+f.toTP("jqx-scheduler-appointment-resize-indicator jqx-scheduler-appointment-left-resize-indicator")+"'></div><div class='"+f.toTP("jqx-scheduler-appointment-resize-indicator jqx-scheduler-appointment-right-resize-indicator")+"'></div>";var ka=a(E);if(ka.appendTo(this.table),D.element=ka,this.appointmentTooltips)if(D.appointment.tooltip)ka[0].setAttribute("title",D.appointment.tooltip);else{var la=D.appointment.subject;if(K&&!N&&(la=K+" - "+L+" "+la),la){var V=D.appointment.location;V&&(la+="\n"+V),ka[0].setAttribute("title",la)}}a.each(D.cells,function(){var b=a(this.cell),c=b.position();if(b[0].appointments||(b[0].appointments=new Array),b[0].appointments.push({ui:ka,appointment:D}),D.y+D.height+2>=c.top+b.height()){ka.css("visibility","hidden");var d=b.find(".jqx-icon-arrow-down");d.show(),d[0]&&(d[0].mousedown=function(){f.openedMonthCellPopup&&f.openedMonthCellPopup.remove();var d=a("<div></div>"),e=b.find("div").clone(!0);e.find("span").removeClass().addClass(f.toTP("jqx-icon-close")),e.find("span")[0].mousedown=function(){d.remove()},e.addClass(f.toTP("jqx-widget-header")),d.addClass(f.toTP("jqx-widget")),d.addClass(f.toTP("jqx-window")),d.addClass(f.toTP("jqx-scheduler-month-cell-popup")),d.addClass(f.toTP("jqx-popup"));var g=a("<div></div>");d.append(e),d.append(g),g.addClass(f.toTP("jqx-widget-content jqx-disableselect"));for(var h=b.width(),i=5+b.find("div").outerHeight(),j=0;j<b[0].appointments.length;j++){var k=b[0].appointments[j].ui.clone(!0);k.css("left","3px"),k.css("top","0px"),k.css("margin-top","2px"),k.css("position","relative"),k.css("visibility","visible"),k.width(h-6),i+=k.outerHeight()+4,g.append(k),k.click(function(a){var b=f.getJQXAppointmentByElement(f.getAppointmentElement(a.target));f._raiseEvent("appointmentClick",{appointment:b.boundAppointment})}),k.dblclick(function(a){var b=f.getJQXAppointmentByElement(f.getAppointmentElement(a.target));if(!b.readOnly&&!f.editRecurrenceDialog.jqxWindow("isOpen")&&(!f._editDialog||f._editDialog&&!f._editDialog.jqxWindow("isOpen"))){var c=f._initDialog(b);c!==!1&&f._openDialog()}f._raiseEvent("appointmentDoubleClick",{appointment:b.boundAppointment})})}d.css("overflow","hidden"),d.css("position","absolute"),d.height(i),d.width(h),d.css("z-index","9999"),d.css("top",c.top),d.css("left",c.left),f.table.append(d),f.openedMonthCellPopup=d})}})}},_sortByDate:function(a,b){var c=a.getAttribute("data-date");c=this._getDateByString(c);var d=b.getAttribute("data-date");return d=this._getDateByString(d),c<d?-1:c>d?1:c==d?0:void 0},_sortAppointmentsByFrom:function(a,b){if(a.from.equals(b.from)){var c=a.to-a.from,d=1e4*c,c=b.to-b.from,e=1e4*c;if(d>e)return-1}return a.from<b.from?-1:a.from>b.from?1:a.from==b.from?0:void 0},_sortAppointmentsByTo:function(a,b){if(a.to.equals(b.to)){var c=a.to-a.from,d=1e4*c,c=b.to-b.from,e=1e4*c;if(d>e)return-1}return a.to<b.to?-1:a.to>b.to?1:a.to==b.to?0:void 0},_sortAppointmentsByResourceId:function(a,b,c){var d=c._resources.indexOf(a.resourceId),e=c._resources.indexOf(b.resourceId);return d==e?0:d<e?-1:d>e?-1:void 0},isBusyRow:function(a,b){for(var c=0;c<b.length;c++){var d=b[c];if(d.row==a)return!0}return!1},isBusyColumn:function(a,b){for(var c=0;c<b.length;c++){var d=b[c];if(d.column==a)return!0}return!1},getMaxTimelineAppointments:function(b,c,d,e){if(0==b.length)return 1;var f=this,g=f._views[f._view].type,h=(f._views[f._view],1),i=d,j=this.getMinutesPerScale(),k=null,l=null,m="";for(var n in b){if("indexOf"==n)break;var o=b[n];k||(k=o.from),l||(l=o.to),k=Math.min(o.from,k),l=Math.max(o.to,l),m+=o.appointment.id}if(m+=k,m+=l,c[m])return c[m];k=new a.jqx.date(k,f.timeZone),l=new a.jqx.date(l,f.timeZone);for(var i=k;k<l;){var p=i;if("timelineMonthView"===g)var q=p.addDays(1);else var q=p.addMinutes(j);var r=0;for(var n in b){if("indexOf"==n)break;var o=b[n],s=o.from,t=o.to,u=a.jqx.scheduler.utilities.rangeIntersection(p,q,s,t);u&&r++}h=Math.max(r,h),i="timelineMonthView"===g?i.addDays(1,!1):i.addMinutes(j,!1)}return c[m]=h,h},getMaxMonthAppointments:function(b){this._views[this._view].type,this._views[this._view];if(0==b.length)return 1;for(var c=1,d=this.getViewStart().clone(),e=this.getViewEnd();d<e;){var f=d,g=a.jqx.scheduler.utilities.getEndOfDay(f),h=0;for(var i in b){if("indexOf"==i)break;var j=b[i],k=j.from,l=j.to,m=a.jqx.scheduler.utilities.rangeIntersection(f,g,k,l);m&&h++}c=Math.max(h,c),d=d.addDays(1,!1)}return c},getMaxAllDayAppointments:function(b){var c=(this._views[this._view].type,this._views[this._view],this);if(0==b.length)return 1;var d=function(b){for(var d=1,e=c.getViewStart(),f=c.getViewEnd();e<f;){var g=e,h=a.jqx.scheduler.utilities.getEndOfDay(g),i=0;for(var j in b){if("indexOf"==j)break;var k=b[j],l=k;if(k.appointment&&(l=k.appointment),1!=l.hidden&&l.duration&&(l.allDay||l.duration().days()>=1)){var m=k.from,n=k.to,o=a.jqx.scheduler.utilities.rangeIntersection(g,h,m,n);o&&i++}}d=Math.max(i,d),e=e.addDays(1,!1)}return d};if(this._resources.length<2||!this.resources.orientation||"none"==this.resources.orientation)var e=d(b);else{for(var f=1,g=0;g<this._resources.length;g++){for(var h=this._resources[g],i=new Array,j=0;j<b.length;j++)b[j].appointment&&b[j].appointment.resourceId==h?i.push(b[j]):void 0!=b[j].resourceId&&b[j].resourceId==h&&i.push(b[j]);var e=d(i);f=Math.max(f,e)}e=f}return e},getMinutesPerScale:function(){var a=(this._views[this._view].type,this._views[this._view]),b=30,c="halfHour";switch(a.timeRuler&&a.timeRuler.scale&&(c=a.timeRuler.scale),c){case"sixtyMinutes":case"hour":b=60;break;case"thirtyMinutes":case"halfHour":b=30;break;case"fifteenMinutes":case"quarterHour":b=15;break;case"tenMinutes":b=10;break;case"fiveMinutes":b=5}return b},getMaxColumnsInADay:function(b){var c=(this._views[this._view].type,this._views[this._view]),d=30,e="halfHour";switch(c.timeRuler&&c.timeRuler.scale&&(e=c.timeRuler.scale),e){case"sixtyMinutes":case"hour":d=60;break;
-case"thirtyMinutes":case"halfHour":d=30;break;case"fifteenMinutes":case"quarterHour":d=15;break;case"tenMinutes":d=10;break;case"fiveMinutes":d=5}if(0==b.length)return 1;for(var f=1,g=b[0].from.clone(),h=g.addMinutes(d),i=a.jqx.scheduler.utilities.getEndOfDay(g);g<i;){var j=g,k=h,l=0;for(var m in b){if("indexOf"==m)break;var n=b[m];if(n.from||n.to){var o=n.from,p=n.to,q=a.jqx.scheduler.utilities.rangeIntersection(j,k,o,p);q&&l++}}f=Math.max(l,f),g=g.addMinutes(d,!1),h=h.addMinutes(d,!1)}return f},getTouches:function(b){return a.jqx.mobile.getTouches(b)},_updatecolumnwidths:function(){var b=this,c=this._hostWidth,d=c;"hidden"!==this.vScrollBar.css("visibility")&&this.scrollBarSize>0&&(c-=parseInt(this.scrollBarSize)+6,this.rtl&&(c+=3),d=c);var e="";if(void 0!=this.columns&&void 0!=this.columns.records){var b=this,f=!1,g=new Array;a.each(this.columns.records,function(a,f){if(!this.hidden){if(this.width.toString().indexOf("%")!=-1||void 0!=this._percentagewidth){var f=0,h="hidden"==b.vScrollBar[0].style.visibility?0:b.scrollBarSize+5;0==b.scrollBarSize&&(h=0),f=parseFloat(this.width)*d/100,void 0!=this._percentagewidth&&(f=parseFloat(this._percentagewidth)*d/100),f<this.minwidth&&"auto"!=this.minwidth&&(f=this.minwidth),f>this.maxwidth&&"auto"!=this.maxwidth&&(f=this.maxwidth),c-=Math.round(f)}else"auto"==this.width||this._width?e+=this.text:c-=this.width;"auto"==this._width&&(g[g.length]=this)}});var h=this.columnsheader.find("#columntable"+this.element.id);if(0!=h.length){var i=0,j=(h.find(".jqx-grid-column-header"),0);a.each(this.columns.records,function(e,h){var k=this.element,l=!1,m=this.width,n=this.width;if(this.width.toString().indexOf("%")==-1&&void 0==this._percentagewidth||(m=void 0!=this._percentagewidth?parseFloat(this._percentagewidth)*d/100:parseFloat(this.width)*d/100,m=Math.round(m),l=!0),"auto"==this.width||this._width||l)if(l)m<this.minwidth&&"auto"!=this.minwidth&&(m=this.minwidth,this.width=m),m>this.maxwidth&&"auto"!=this.maxwidth&&(m=this.maxwidth,this.width=m),parseInt(k[0].style.width)!=m&&(k.width(m),this.width=m);else{var o=b.columns.records.length,p=b._views[b._view].type;if("dayView"===p||"weekView"===p){var q=b._views[b._view];q.timeRuler?(q.timeRuler.timeZones&&(o-=q.timeRuler.timeZones.length),o--):o--}else"monthView"===p&&b._views[b._view].showWeekNumbers&&o--;var r=Math.floor(c*(1/o));b.resources&&b.resources.resourceColumnWidth&&"auto"!=b.resources.resourceColumnWidth?r=b.resources.resourceColumnWidth:b.resources&&b.resources.resourceColumnWidth&&"auto"==b.resources.resourceColumnWidth&&"horizontal"==b.resources.orientation&&(r=Math.round((2+c)*(1/b._getColumnsLengthPerView())));var s=c*(1/o)-r;if(i+=s,i>=1&&(i-=1,r++),i>=.5&&e==b.columns.records.length-1&&r++,"agendaView"==p&&(r=c/g.length,r++),r<0){var t=a("<span>"+this.text+"</span>");a(document.body).append(t),r=10+t.width(),t.remove()}r<this.minwidth&&(r=this.minwidth),r>this.maxwidth&&(r=this.maxwidth),this._width="auto",this.width=parseInt(r),k.width(this.width)}else parseInt(k[0].style.width)!=this.width&&k.width(this.width);parseInt(k[0].style.left)!=j&&k.css("left",j),this.hidden||(j+=this.width),this._requirewidthupdate=!0,n!==this.width&&(f=!0)}),this.columnsheader.width(2+j),h.width(this.columnsheader.width()),this._resizecolumnGroups(),f&&(this._renderrows(),b._arrange())}}},_rendercolumnheaders:function(){var b=this;if(!this._updating){var c=this._views[this._view];this._columnsbydatafield=new Array,this.columnsheader.find("#columntable"+this.element.id).remove();var d=a('<div id="columntable'+this.element.id+'" style="height: 100%; position: relative;"></div>');d[0].cells=new Array;var e=0,f="",g=this._hostWidth;g||(this._hostWidth=this.host.width());var h=this._hostWidth,i=h,j=this.getRows().length,k=this.rowsHeight;this.isTouchDevice()&&(k=this.touchRowsHeight),j*k>this.host.height()&&(this.vScrollBar[0].style.visibility="inherit"),"hidden"!==this.vScrollBar.css("visibility")&&this.scrollBarSize>0&&(h-=parseInt(this.scrollBarSize)+6,this.rtl&&(h+=3),i=h);var l=new Array,m=new Array;if(a.each(this.columns.records,function(a,b){if(!this.hidden)if("auto"==this.width||this._width)f+=this.text;else if(this.width<this.minwidth&&"auto"!=this.minwidth)h-=this.minwidth;else if(this.width>this.maxwidth&&"auto"!=this.maxwidth)h-=this.maxwidth;else if(this.width.toString().indexOf("%")!=-1){var b=0;b=parseFloat(this.width)*i/100,b<this.minwidth&&"auto"!=this.minwidth&&(b=this.minwidth),b>this.maxwidth&&"auto"!=this.maxwidth&&(b=this.maxwidth),h-=b}else"string"==typeof this.width&&(this.width=parseInt(this.width)),h-=this.width;null!=this.width&&"auto"!=this.width||(m[m.length]=this),l[l.length]=this}),this.rtl)for(var n=0;n<l.length;n++)this.columns.replace(n,l[n]);var o=this.headerZIndex,p=b.columnsHeight,q=function(a,c){var d=b.columnGroupslevel*b.columnsHeight;return d-=c.level*b.columnsHeight},r=0,s=document.createDocumentFragment();a.each(this.columns.records,function(f,g){this.height=b.columnsHeight,b.columnGroups&&b.columnGroups.length&&(this.height=q(this.datafield,this),p=this.height);var j=b.toTP("jqx-grid-column-header")+" "+b.toTP("jqx-widget-header");b.rtl&&(j+=" "+b.toTP("jqx-grid-column-header-rtl")),b.enableBrowserSelection||(j+=" "+b.toTP("jqx-disableselect"));var k=b.rtl?o++:o--,l=document.createElement("div");l.setAttribute("role","columnheader"),l.style.position="absolute",l.style.zIndex=k,l.style.height="100%",l.className=j;var n=a(l);b.rtl&&0===f&&(n[0].style.borderLeftColor="transparent"),b.columnGroups?(n[0].style.height=p+"px",n[0].style.bottom="0px"):this.timeColumn||(n[0].style.height=-1+p+"px"),this.uielement=n,this.element=n,""!=this.classname&&this.classname&&n.addClass(this.classname);var t=this.width,u=!1;if(null===this.width&&(this.width="auto"),this.width.toString().indexOf("%")==-1&&void 0==this._percentagewidth||(t=void 0!=this._percentagewidth?parseFloat(this._percentagewidth)*i/100:parseFloat(this.width)*i/100,t=Math.round(t),u=!0),"auto"==this.width||this._width||u)if(u)t<this.minwidth&&"auto"!=this.minwidth&&(t=this.minwidth),t>this.maxwidth&&"auto"!=this.maxwidth&&(t=this.maxwidth),void 0!=this._percentagewidth&&this.width.toString().indexOf("%")==-1||(this._percentagewidth=this.width),n.width(t),this.width=t;else{var v=b.columns.records.length,w=b._views[b._view].type;if("dayView"===w||"weekView"===w){var x=b._views[b._view];x.timeRuler?(x.timeRuler.timeZones&&(v-=x.timeRuler.timeZones.length),v--):v--}else"monthView"===w&&b._views[b._view].showWeekNumbers&&v--;var y=Math.floor(h*(1/v));b.resources&&b.resources.resourceColumnWidth&&"auto"!=b.resources.resourceColumnWidth?y=b.resources.resourceColumnWidth:b.resources&&b.resources.resourceColumnWidth&&"auto"==b.resources.resourceColumnWidth&&"horizontal"==b.resources.orientation&&(y=Math.round((2+h)*(1/b._getColumnsLengthPerView())));var z=h*(1/v)-y;r+=z,r>=1&&(r-=1,y++),r>=.5&&f==b.columns.records.length-1&&y++,isNaN(y)&&(y=this.minwidth),"agendaView"==w&&(y=h/m.length,y++),y<0&&($element=a("<span>"+this.text+"</span>"),a(document.body).append($element),y=10+$element.width(),$element.remove()),y<this.minwidth&&(y=this.minwidth),y>this.maxwidth&&(y=this.maxwidth),this._width="auto",this.width=parseInt(y),t=this.width,n.width(this.width)}else t<this.minwidth&&"auto"!=this.minwidth&&(t=this.minwidth),t>this.maxwidth&&"auto"!=this.maxwidth&&(t=this.maxwidth),n[0].style.width=parseInt(t)+"px";this.timeColumn&&(n.css("border-bottom-color","transparent"),c.timeRuler&&c.timeRuler.timeZones&&f<c.timeRuler.timeZones.length&&n.css("border-right-color","transparent"),1==this.tableRows&&n.addClass(b.toTP("jqx-scheduler-time-column"))),this.hidden&&n.css("display","none");a(n.children()[0]);d[0].cells[f]=n[0];var A=b._rendercolumnheader(this.text,this.align,p,b);n[0].innerHTML=A,s.appendChild(n[0]);n[0].style.left=e+"px",this.hidden||(e+=t)}),d[0].appendChild(s),e>0?this.columnsheader[0].style.width=2+e+"px":this.columnsheader[0].style.width=e+"px",this._columnswidth=e,this.columnsrow=d,b.columnsheader.append(d),d[0].style.width=e+"px",this.columnGroups&&this._rendercolumnGroups()}},_rendercolumnGroups:function(){if(this.columnGroups){var b=this.headerZIndex+this.columns.records.length,c=this,d=c.toTP("jqx-grid-column-header")+" "+c.toTP("jqx-grid-columngroup-header")+" "+c.toTP("jqx-widget-header");c.rtl&&(d+=" "+c.toTP("jqx-grid-columngroup-header-rtl"));var e=this.columnsheader.find("#columntable"+this.element.id);e.find("jqx-grid-columngroup-header").remove();for(var f=0;f<this.columnGroupslevel-1;f++)for(var g=0;g<this.columnGroups.length;g++){var h=this.columnGroups[g],i=h.level;if(i===f){var j=i*this.columnsHeight,k=99999;if(h.groups){var l=function(a){for(var b=0,c=0;c<a.groups.length;c++){var d=a.groups[c];d.groups?b+=l(d):d.hidden||(b+=d.width,k=Math.min(parseInt(d.element[0].style.left),k))}return b};h.width=l(h),h.left=k;var m=this.columnsHeight,n=b--,o=a('<div role="columnheader" style="z-index: '+n+';position: absolute;" class="'+d+'"></div>'),p=a(this._rendercolumnheader(h.text,h.align,this.columnsHeight,this));h.renderer&&h.renderer(o,h.text),o.append(p),o[0].style.left=k+"px",0===k&&(o[0].style.borderLeftColor="transparent"),o[0].style.top=j+"px",o[0].style.height=m+"px",o[0].style.width=-1+h.width+"px",e.append(o),h.element=o}}}}},_resizecolumnGroups:function(){if(this.columnGroups)for(var a=0;a<this.columnGroups.length;a++){var b=this.columnGroups[a],c=b.level,d=c*this.columnsHeight,e=99999;if(b.groups){var f=function(a){for(var b=0,c=0;c<a.groups.length;c++){var d=a.groups[c];d.groups?b+=f(d):(b+=d.width,e=Math.min(parseInt(d.element[0].style.left),e))}return b};b.width=f(b),b.left=e;var g=this.columnsHeight,h=b.element;h[0].style.left=e+"px",h[0].style.top=d+"px",h[0].style.height=g+"px",h[0].style.width=-1+b.width+"px"}}},_removecolumnhandlers:function(b){var c=this,d=a(b.element);if(d.length>0){c.removeHandler(d,"mouseenter"),c.removeHandler(d,"mouseleave");var e=a(b.filtericon);c.removeHandler(e,"mousedown"),c.removeHandler(e,"click"),c.removeHandler(d,"click")}},destroy:function(){var b=this;b._removeHandlers(),b._editDialog&&b._editDialog.jqxWindow("destroy"),b.menu&&b.menu.jqxMenu("destroy"),b.editRecurrenceDialog&&b.editRecurrenceDialog.jqxWindow("destroy"),b.vScrollBar.jqxScrollBar("destroy"),b.hScrollBar.jqxScrollBar("destroy"),delete b.vScrollBar,delete b.hScrollBar,delete b._mousewheelfunc,a.jqx.utilities.resize(b.host,null,!0),b.host.remove()},propertiesChangedHandler:function(a,b,c){c&&c.width&&c.height&&2==Object.keys(c).length&&(a.host.height(a.height),a.host.width(a.width),a._updatesize(!1,!0))},propertyChangedHandler:function(b,c,d,e){if(void 0!=this.isInitialized&&0!=this.isInitialized&&!(b.batchUpdate&&b.batchUpdate.width&&b.batchUpdate.height&&2==Object.keys(b.batchUpdate).length)&&e!==d)if("filterable"==c)b._render();else if("view"==c)b.setView(e);else if("views"==c){b._columns=null,b._views=new Array,b._view=b.view;for(var f=0;f<b.views.length;f++)"string"===a.type(b.views[f])?b._views.push({type:b.views[f]}):b._views.push(b.views[f]);for(var f=0;f<b._views.length;f++)if(b._views[f].type==b.view){b._view=f;break}b._render()}else if("height"===c)b._hostWidth=null,b._hostHeight=null,b.host.height(b.height),b.host.width(b.width),b._updatesize(!1,!0);else if("width"===c)b._hostWidth=null,b._hostHeight=null,b.host.height(b.height),b.host.width(b.width),b._updatesize(!0,!1);else if("source"===c)b.updateBoundData();else if("resources"==c)b.updateBoundData();else if("columns"===c||"columnGroups"===c)b._columns=null,b._render();else if("selectionMode"===c)b.selectionMode=e.toLowerCase();else if("touchMode"==c)b._removeHandlers(),b.touchDevice=null,b.vScrollBar.jqxScrollBar({touchMode:e}),b.hScrollBar.jqxScrollBar({touchMode:e}),b.refresh(),b._addHandlers();else{if("enableHover"==c)return;"showLegend"==c?(b.legendbartop.show(),b.legendbarbottom.show(),b.refresh()):"disabled"==c?(e?b.host.addClass(this.toThemeProperty("jqx-fill-state-disabled")):b.host.removeClass(this.toThemeProperty("jqx-fill-state-disabled")),b.host.find(".jqx-grid-group-collapse").css("cursor",e?"default":"pointer"),b.host.find(".jqx-grid-group-expand").css("cursor",e?"default":"pointer")):"columnsHeight"==c?b._render():"localization"==c?(b._render(),b.editRecurrenceDialog&&(b.editRecurrenceDialog.jqxWindow("destroy"),b.createEditRecurrenceDialog())):"theme"==c?(a.jqx.utilities.setTheme(d,e,b.host),b._editDialog&&a.jqx.utilities.setTheme(d,e,b._editDialog),b.editRecurrenceDialog&&a.jqx.utilities.setTheme(d,e,b.editRecurrenceDialog),b.menu&&b.menu.jqxMenu({theme:b.theme}),b.vScrollBar.jqxScrollBar({theme:b.theme}),b.hScrollBar.jqxScrollBar({theme:b.theme}),b.refresh()):"date"===c?b.navigateTo(e):b.refresh()}},_rendercolumnheader:function(a,b,c,d){var e="4px";d.columnGroups?(e=c/2-this._columnheight/2,e<0&&(e=4),e+="px"):25!=this.columnsHeight&&(e=this.columnsHeight/2-this._columnheight/2,e<0&&(e=4),e+="px");var f='<div style="overflow: hidden; text-overflow: ellipsis; text-align: '+b+"; margin-left: 4px; margin-right: 4px; margin-bottom: "+e+"; margin-top: "+e+';"><span style="text-overflow: ellipsis; cursor: default;">'+a+"</span></div>";if(this.columnRenderer){var g=this.columnRenderer(a,b,c,f);if(void 0!=g)return g}return f}})}(jqxBaseFramework);
-
+jQWidgets v12.0.1 (2021-Mar)
+Copyright (c) 2011-2021 jQWidgets.
+License: https://jqwidgets.com/license/
+*/
+/* eslint-disable */
+
+(function(a){if(!a.jqx.scheduler){a.jqx.scheduler={}}a.jqx.jqxWidget("jqxScheduler","",{});a.extend(a.jqx._jqxScheduler.prototype,{defineInstance:function(){var b={altRows:false,autoShowLoadElement:true,columnsHeight:30,columns:[],columnGroups:null,dataview:null,disabled:false,enableHover:true,appointmentOpacity:0.8,headerZIndex:235,height:600,timeRulerWidth:60,loadingErrorMessage:"The data is still loading and you cannot set a property or call a method. You can do that once the data binding is completed. jqxScheduler raises the 'bindingComplete' event when the binding is completed.",localization:null,ready:null,renderToolBar:null,renderAppointment:null,rendered:null,rendering:null,rtl:false,showToolbar:true,showLegend:false,legendPosition:"bottom",legendHeight:34,rowsHeight:27,touchRowsHeight:36,appointmentsMinHeight:18,touchAppointmentsMinHeight:27,appointmentsRenderMode:"default",serverProcessing:false,selectionMode:"multiplerows",scrollBarSize:a.jqx.utilities.scrollBarSize,touchScrollBarSize:a.jqx.utilities.touchScrollBarSize,showHeader:true,maxHeight:999999,maxWidth:999999,autoBind:true,showAllDayRow:true,changedAppointments:new Array(),renderMode:"simple",views:new Array(),view:0,min:new a.jqx.date(0),max:new a.jqx.date(9999,12,31),date:new a.jqx.date("todayDate"),colors:["#307DD7","#AA4643","#89A54E","#71588F","#4198AF","#7FD13B","#EA157A","#FEB80A","#00ADDC","#738AC8","#E8601A","#FF9639","#F5BD6A","#599994","#115D6E","#D02841","#FF7C41","#FFC051","#5B5F4D","#364651","#25A0DA","#309B46","#8EBC00","#FF7515","#FFAE00","#0A3A4A","#196674","#33A6B2","#9AC836","#D0E64B","#CC6B32","#FFAB48","#FFE7AD","#A7C9AE","#888A63","#3F3943","#01A2A6","#29D9C2","#BDF271","#FFFFA6","#1B2B32","#37646F","#A3ABAF","#E1E7E8","#B22E2F","#5A4B53","#9C3C58","#DE2B5B","#D86A41","#D2A825","#993144","#FFA257","#CCA56A","#ADA072","#949681","#105B63","#EEEAC5","#FFD34E","#DB9E36","#BD4932","#BBEBBC","#F0EE94","#F5C465","#FA7642","#FF1E54","#60573E","#F2EEAC","#BFA575","#A63841","#BFB8A3","#444546","#FFBB6E","#F28D00","#D94F00","#7F203B","#583C39","#674E49","#948658","#F0E99A","#564E49","#142D58","#447F6E","#E1B65B","#C8782A","#9E3E17","#4D2B1F","#635D61","#7992A2","#97BFD5","#BFDCF5","#844341","#D5CC92","#BBA146","#897B26","#55591C","#56626B","#6C9380","#C0CA55","#F07C6C","#AD5472","#96003A","#FF7347","#FFBC7B","#FF4154","#642223","#5D7359","#E0D697","#D6AA5C","#8C5430","#661C0E","#16193B","#35478C","#4E7AC7","#7FB2F0","#ADD5F7","#7B1A25","#BF5322","#9DA860","#CEA457","#B67818","#0081DA","#3AAFFF","#99C900","#FFEB3D","#309B46","#0069A5","#0098EE","#7BD2F6","#FFB800","#FF6800","#FF6800","#A0A700","#FF8D00","#678900","#0069A5"],colorSchemes:[{name:"scheme01",colors:["#307DD7","#AA4643","#89A54E","#71588F","#4198AF"]},{name:"scheme02",colors:["#7FD13B","#EA157A","#FEB80A","#00ADDC","#738AC8"]},{name:"scheme03",colors:["#E8601A","#FF9639","#F5BD6A","#599994","#115D6E"]},{name:"scheme04",colors:["#D02841","#FF7C41","#FFC051","#5B5F4D","#364651"]},{name:"scheme05",colors:["#25A0DA","#309B46","#8EBC00","#FF7515","#FFAE00"]},{name:"scheme06",colors:["#0A3A4A","#196674","#33A6B2","#9AC836","#D0E64B"]},{name:"scheme07",colors:["#CC6B32","#FFAB48","#FFE7AD","#A7C9AE","#888A63"]},{name:"scheme08",colors:["#3F3943","#01A2A6","#29D9C2","#BDF271","#FFFFA6"]},{name:"scheme09",colors:["#1B2B32","#37646F","#A3ABAF","#E1E7E8","#B22E2F"]},{name:"scheme10",colors:["#5A4B53","#9C3C58","#DE2B5B","#D86A41","#D2A825"]},{name:"scheme11",colors:["#993144","#FFA257","#CCA56A","#ADA072","#949681"]},{name:"scheme12",colors:["#105B63","#EEEAC5","#FFD34E","#DB9E36","#BD4932"]},{name:"scheme13",colors:["#BBEBBC","#F0EE94","#F5C465","#FA7642","#FF1E54"]},{name:"scheme14",colors:["#60573E","#F2EEAC","#BFA575","#A63841","#BFB8A3"]},{name:"scheme15",colors:["#444546","#FFBB6E","#F28D00","#D94F00","#7F203B"]},{name:"scheme16",colors:["#583C39","#674E49","#948658","#F0E99A","#564E49"]},{name:"scheme17",colors:["#142D58","#447F6E","#E1B65B","#C8782A","#9E3E17"]},{name:"scheme18",colors:["#4D2B1F","#635D61","#7992A2","#97BFD5","#BFDCF5"]},{name:"scheme19",colors:["#844341","#D5CC92","#BBA146","#897B26","#55591C"]},{name:"scheme20",colors:["#56626B","#6C9380","#C0CA55","#F07C6C","#AD5472"]},{name:"scheme21",colors:["#96003A","#FF7347","#FFBC7B","#FF4154","#642223"]},{name:"scheme22",colors:["#5D7359","#E0D697","#D6AA5C","#8C5430","#661C0E"]},{name:"scheme23",colors:["#16193B","#35478C","#4E7AC7","#7FB2F0","#ADD5F7"]},{name:"scheme24",colors:["#7B1A25","#BF5322","#9DA860","#CEA457","#B67818"]},{name:"scheme25",colors:["#0081DA","#3AAFFF","#99C900","#FFEB3D","#309B46"]},{name:"scheme26",colors:["#0069A5","#0098EE","#7BD2F6","#FFB800","#FF6800"]},{name:"scheme27",colors:["#FF6800","#A0A700","#FF8D00","#678900","#0069A5"]}],resources:null,contextMenu:true,contextMenuOpen:null,contextMenuClose:null,contextMenuItemClick:null,contextMenuCreate:null,timeZone:null,statuses:{free:"white",tentative:"tentative",busy:"transparent",outOfOffice:"#800080"},appointmentDataFields:{from:"from",to:"to",id:"id",calendarId:"calendarId",description:"description",location:"location",subject:"subject",background:"background",color:"color",borderColor:"borderColor",style:"style",recurrencePattern:"recurrencePattern",recurrenceException:"recurrenceException",draggable:"draggable",resizable:"resizable",resourceId:"resourceId",status:"status",tooltip:"tooltip",hidden:"hidden",allDay:"allDay",timeZone:"timeZone",ownerId:"ownerId"},appointmentTooltips:true,tableColumns:1,tableRows:1,dayNameFormat:"full",touchDayNameFormat:"abbr",toolBarRangeFormat:"dd MMMM yyyy",toolBarRangeFormatAbbr:"dd MM yyyy",columnRenderer:null,exportSettings:{serverURL:null,characterSet:null,fileName:"jqxScheduler",dateTimeFormatString:"S",resourcesInMultipleICSFiles:false,ICSXWRCALNAME:"jqxScheduler",ICSXWRCALDESC:"jqxScheduler Description"},source:{beforeprocessing:null,beforesend:null,loaderror:null,localdata:null,data:null,datatype:"array",datafields:[],url:"",root:"",record:"",id:"",totalrecords:0,recordstartindex:0,recordendindex:0,loadallrecords:true,sortcolumn:null,sortdirection:null,sort:null,filter:null,sortcomparer:null},editDialogDateTimeFormatString:"dd/MM/yyyy hh:mm tt",editDialogDateFormatString:"dd/MM/yyyy",editDialogOpen:null,editDialogCreate:null,editDialogKeyDown:null,editDialogClose:null,editDialog:true,toolbarHeight:54,tableZIndex:469,_updating:false,touchMode:"auto",width:800,that:this,beginDrag:null,endDrag:null,dragging:null,timeZones:[{id:"Dateline Standard Time",offset:-720,offsetHours:-12,displayName:"(UTC-12:00) International Date Line West",supportsDaylightSavingTime:false},{id:"UTC-11",offset:-660,offsetHours:-11,displayName:"(UTC-11:00) Coordinated Universal Time-11",supportsDaylightSavingTime:false},{id:"Hawaiteratoran Standard Time",offset:-600,offsetHours:-10,displayName:"(UTC-10:00) Hawaiterator",supportsDaylightSavingTime:false},{id:"Alaskan Standard Time",offset:-540,offsetHours:-9,displayName:"(UTC-09:00) Alaska",supportsDaylightSavingTime:true},{id:"Pacific Standard Time (Mexico)",offset:-480,offsetHours:-8,displayName:"(UTC-08:00) Baja California",supportsDaylightSavingTime:true},{id:"Pacific Standard Time",offset:-480,offsetHours:-8,displayName:"(UTC-08:00) Pacific Time (US & Canada)",supportsDaylightSavingTime:true},{id:"US Mountain Standard Time",offset:-420,offsetHours:-7,displayName:"(UTC-07:00) Arizona",supportsDaylightSavingTime:false},{id:"Mountain Standard Time (Mexico)",offset:-420,offsetHours:-7,displayName:"(UTC-07:00) Chihuahua, La Paz, Mazatlan",supportsDaylightSavingTime:true},{id:"Mountain Standard Time",offset:-420,offsetHours:-7,displayName:"(UTC-07:00) Mountain Time (US & Canada)",supportsDaylightSavingTime:true},{id:"Central Standard Time",offset:-360,offsetHours:-6,displayName:"(UTC-06:00) Central Time (US & Canada)",supportsDaylightSavingTime:true},{id:"Central America Standard Time",offset:-360,offsetHours:-6,displayName:"(UTC-06:00) Central America",supportsDaylightSavingTime:false},{id:"Canada Central Standard Time",offset:-360,offsetHours:-6,displayName:"(UTC-06:00) Saskatchewan",supportsDaylightSavingTime:false},{id:"Central Standard Time (Mexico)",offset:-360,offsetHours:-6,displayName:"(UTC-06:00) Guadalajara, Mexico City, Monterrey",supportsDaylightSavingTime:true},{id:"SA Pacific Standard Time",offset:-300,offsetHours:-5,displayName:"(UTC-05:00) Bogota, Lima, Quito, Rio Branco",supportsDaylightSavingTime:false},{id:"Eastern Standard Time",offset:-300,offsetHours:-5,displayName:"(UTC-05:00) Eastern Time (US & Canada)",supportsDaylightSavingTime:true},{id:"US Eastern Standard Time",offset:-300,offsetHours:-5,displayName:"(UTC-05:00) Indiana (East)",supportsDaylightSavingTime:true},{id:"Venezuela Standard Time",offset:-270,offsetHours:-4.5,displayName:"(UTC-04:30) Caracas",supportsDaylightSavingTime:false},{id:"Atlantic Standard Time",offset:-240,offsetHours:-4,displayName:"(UTC-04:00) Atlantic Time (Canada)",supportsDaylightSavingTime:true},{id:"Paraguay Standard Time",offset:-240,offsetHours:-4,displayName:"(UTC-04:00) Asuncion",supportsDaylightSavingTime:true},{id:"Central Brazilian Standard Time",offset:-240,offsetHours:-4,displayName:"(UTC-04:00) Cuiaba",supportsDaylightSavingTime:true},{id:"Pacific SA Standard Time",offset:-240,offsetHours:-4,displayName:"(UTC-04:00) Santiago",supportsDaylightSavingTime:true},{id:"SA Western Standard Time",offset:-240,offsetHours:-4,displayName:"(UTC-04:00) Georgetown, La Paz, Manaus",supportsDaylightSavingTime:false},{id:"Newfoundland Standard Time",offset:-210,offsetHours:-3.5,displayName:"(UTC-03:30) Newfoundland",supportsDaylightSavingTime:true},{id:"SA Eastern Standard Time",offset:-180,offsetHours:-3,displayName:"(UTC-03:00) Cayenne, Fortaleza",supportsDaylightSavingTime:false},{id:"Argentina Standard Time",offset:-180,offsetHours:-3,displayName:"(UTC-03:00) Buenos Aires",supportsDaylightSavingTime:true},{id:"E. South America Standard Time",offset:-180,offsetHours:-3,displayName:"(UTC-03:00) Brasilia",supportsDaylightSavingTime:true},{id:"Bahia Standard Time",offset:-180,offsetHours:-3,displayName:"(UTC-03:00) Salvador",supportsDaylightSavingTime:true},{id:"Montevideo Standard Time",offset:-180,offsetHours:-3,displayName:"(UTC-03:00) Montevideo",supportsDaylightSavingTime:true},{id:"Greenland Standard Time",offset:-180,offsetHours:-3,displayName:"(UTC-03:00) Greenland",supportsDaylightSavingTime:true},{id:"UTC-02",offset:-120,offsetHours:-2,displayName:"(UTC-02:00) Coordinated Universal Time-02",supportsDaylightSavingTime:false},{id:"Mid-Atlantic Standard Time",offset:-120,offsetHours:-2,displayName:"(UTC-02:00) Mid-Atlantic - Old",supportsDaylightSavingTime:true},{id:"Azores Standard Time",offset:-60,offsetHours:-1,displayName:"(UTC-01:00) Azores",supportsDaylightSavingTime:true},{id:"Cape Verde Standard Time",offset:-60,offsetHours:-1,displayName:"(UTC-01:00) Cape Verde Is.",supportsDaylightSavingTime:false},{id:"Morocco Standard Time",offset:0,offsetHours:0,displayName:"(UTC) Casablanca",supportsDaylightSavingTime:true},{id:"UTC",offset:0,offsetHours:0,displayName:"(UTC) Coordinated Universal Time",supportsDaylightSavingTime:false},{id:"GMT Standard Time",offset:0,offsetHours:0,displayName:"(UTC) Dublin, Edinburgh, Lisbon, London",supportsDaylightSavingTime:true},{id:"Greenwich Standard Time",offset:0,offsetHours:0,displayName:"(UTC) Monrovia, Reykjavik",supportsDaylightSavingTime:false},{id:"Central European Standard Time",offset:60,offsetHours:1,displayName:"(UTC+01:00) Sarajevo, Skopje, Warsaw, Zagreb",supportsDaylightSavingTime:true},{id:"Namibia Standard Time",offset:60,offsetHours:1,displayName:"(UTC+01:00) Windhoek",supportsDaylightSavingTime:true},{id:"W. Central Africa Standard Time",offset:60,offsetHours:1,displayName:"(UTC+01:00) West Central Africa",supportsDaylightSavingTime:false},{id:"W. Europe Standard Time",offset:60,offsetHours:1,displayName:"(UTC+01:00) Amsterdam, Berlin, Rome",supportsDaylightSavingTime:true},{id:"Central Europe Standard Time",offset:60,offsetHours:1,displayName:"(UTC+01:00) Belgrade, Budapest, Prague",supportsDaylightSavingTime:true},{id:"Romance Standard Time",offset:60,offsetHours:1,displayName:"(UTC+01:00) Brussels, Copenhagen, Madrid, Paris",supportsDaylightSavingTime:true},{id:"FLE Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) Helsinki, Kyiv, Riga, Sofia",supportsDaylightSavingTime:true},{id:"South Africa Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) Harare, Pretoria",supportsDaylightSavingTime:false},{id:"Turkey Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) Istanbul",supportsDaylightSavingTime:true},{id:"GTB Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) Athens, Bucharest",supportsDaylightSavingTime:true},{id:"Libya Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) Tripoli",supportsDaylightSavingTime:true},{id:"E. Europe Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) E. Europe",supportsDaylightSavingTime:true},{id:"Jordan Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) Amman",supportsDaylightSavingTime:true},{id:"Middle East Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) Beirut",supportsDaylightSavingTime:true},{id:"Egypt Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) Cairo",supportsDaylightSavingTime:true},{id:"Syria Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) Damascus",supportsDaylightSavingTime:true},{id:"Israel Standard Time",offset:120,offsetHours:2,displayName:"(UTC+02:00) Jerusalem",supportsDaylightSavingTime:true},{id:"Arab Standard Time",offset:180,offsetHours:3,displayName:"(UTC+03:00) Kuwait, Riyadh",supportsDaylightSavingTime:false},{id:"E. Africa Standard Time",offset:180,offsetHours:3,displayName:"(UTC+03:00) Nairobi",supportsDaylightSavingTime:false},{id:"Arabic Standard Time",offset:180,offsetHours:3,displayName:"(UTC+03:00) Baghdad",supportsDaylightSavingTime:true},{id:"Kaliningrad Standard Time",offset:180,offsetHours:3,displayName:"(UTC+03:00) Kaliningrad, Minsk",supportsDaylightSavingTime:true},{id:"Iran Standard Time",offset:210,offsetHours:3.5,displayName:"(UTC+03:30) Tehran",supportsDaylightSavingTime:true},{id:"Mauritius Standard Time",offset:240,offsetHours:4,displayName:"(UTC+04:00) Port Louis",supportsDaylightSavingTime:true},{id:"Georgian Standard Time",offset:240,offsetHours:4,displayName:"(UTC+04:00) Tbilisi",supportsDaylightSavingTime:false},{id:"Caucasus Standard Time",offset:240,offsetHours:4,displayName:"(UTC+04:00) Yerevan",supportsDaylightSavingTime:true},{id:"Arabian Standard Time",offset:240,offsetHours:4,displayName:"(UTC+04:00) Abu Dhabi, Muscat",supportsDaylightSavingTime:false},{id:"Azerbaijan Standard Time",offset:240,offsetHours:4,displayName:"(UTC+04:00) Baku",supportsDaylightSavingTime:true},{id:"Russian Standard Time",offset:240,offsetHours:4,displayName:"(UTC+04:00) Moscow, St. Petersburg, Volgograd",supportsDaylightSavingTime:true},{id:"Afghanistan Standard Time",offset:270,offsetHours:4.5,displayName:"(UTC+04:30) Kabul",supportsDaylightSavingTime:false},{id:"Pakistan Standard Time",offset:300,offsetHours:5,displayName:"(UTC+05:00) Islamabad, Karachi",supportsDaylightSavingTime:true},{id:"West Asia Standard Time",offset:300,offsetHours:5,displayName:"(UTC+05:00) Ashgabat, Tashkent",supportsDaylightSavingTime:false},{id:"India Standard Time",offset:330,offsetHours:5.5,displayName:"(UTC+05:30) Chennai, Kolkata, Mumbai, New Delhi",supportsDaylightSavingTime:false},{id:"Sri Lanka Standard Time",offset:330,offsetHours:5.5,displayName:"(UTC+05:30) Sri Jayawardenepura",supportsDaylightSavingTime:false},{id:"Nepal Standard Time",offset:345,offsetHours:5.75,displayName:"(UTC+05:45) Kathmandu",supportsDaylightSavingTime:false},{id:"Central Asia Standard Time",offset:360,offsetHours:6,displayName:"(UTC+06:00) Astana",supportsDaylightSavingTime:false},{id:"Bangladesh Standard Time",offset:360,offsetHours:6,displayName:"(UTC+06:00) Dhaka",supportsDaylightSavingTime:true},{id:"Ekaterinburg Standard Time",offset:360,offsetHours:6,displayName:"(UTC+06:00) Ekaterinburg",supportsDaylightSavingTime:true},{id:"Myanmar Standard Time",offset:390,offsetHours:6.5,displayName:"(UTC+06:30) Yangon (Rangoon)",supportsDaylightSavingTime:false},{id:"SE Asia Standard Time",offset:420,offsetHours:7,displayName:"(UTC+07:00) Bangkok, Hanoi, Jakarta",supportsDaylightSavingTime:false},{id:"N. Central Asia Standard Time",offset:420,offsetHours:7,displayName:"(UTC+07:00) Novosibirsk",supportsDaylightSavingTime:true},{id:"Ulaanbaatar Standard Time",offset:480,offsetHours:8,displayName:"(UTC+08:00) Ulaanbaatar",supportsDaylightSavingTime:false},{id:"China Standard Time",offset:480,offsetHours:8,displayName:"(UTC+08:00) Beijing, Chongqing, Hong Kong",supportsDaylightSavingTime:false},{id:"Singapore Standard Time",offset:480,offsetHours:8,displayName:"(UTC+08:00) Kuala Lumpur, Singapore",supportsDaylightSavingTime:false},{id:"North Asia Standard Time",offset:480,offsetHours:8,displayName:"(UTC+08:00) Krasnoyarsk",supportsDaylightSavingTime:true},{id:"Taipei Standard Time",offset:480,offsetHours:8,displayName:"(UTC+08:00) Taipei",supportsDaylightSavingTime:false},{id:"W. Australia Standard Time",offset:480,offsetHours:8,displayName:"(UTC+08:00) Perth",supportsDaylightSavingTime:true},{id:"Korea Standard Time",offset:540,offsetHours:9,displayName:"(UTC+09:00) Seoul",supportsDaylightSavingTime:false},{id:"North Asia East Standard Time",offset:540,offsetHours:9,displayName:"(UTC+09:00) Irkutsk",supportsDaylightSavingTime:true},{id:"Tokyo Standard Time",offset:540,offsetHours:9,displayName:"(UTC+09:00) Osaka, Sapporo, Tokyo",supportsDaylightSavingTime:false},{id:"AUS Central Standard Time",offset:570,offsetHours:9.5,displayName:"(UTC+09:30) Darwin",supportsDaylightSavingTime:false},{id:"Cen. Australia Standard Time",offset:570,offsetHours:9.5,displayName:"(UTC+09:30) Adelaide",supportsDaylightSavingTime:true},{id:"West Pacific Standard Time",offset:600,offsetHours:10,displayName:"(UTC+10:00) Guam, Port Moresby",supportsDaylightSavingTime:false},{id:"Tasmania Standard Time",offset:600,offsetHours:10,displayName:"(UTC+10:00) Hobart",supportsDaylightSavingTime:true},{id:"E. Australia Standard Time",offset:600,offsetHours:10,displayName:"(UTC+10:00) Brisbane",supportsDaylightSavingTime:false},{id:"AUS Eastern Standard Time",offset:600,offsetHours:10,displayName:"(UTC+10:00) Canberra, Melbourne, Sydney",supportsDaylightSavingTime:true},{id:"Yakutsk Standard Time",offset:600,offsetHours:10,displayName:"(UTC+10:00) Yakutsk",supportsDaylightSavingTime:true},{id:"Vladivostok Standard Time",offset:660,offsetHours:11,displayName:"(UTC+11:00) Vladivostok",supportsDaylightSavingTime:true},{id:"Central Pacific Standard Time",offset:660,offsetHours:11,displayName:"(UTC+11:00) Solomon Is., New Caledonia",supportsDaylightSavingTime:false},{id:"Magadan Standard Time",offset:720,offsetHours:12,displayName:"(UTC+12:00) Magadan",supportsDaylightSavingTime:true},{id:"Kamchatka Standard Time",offset:720,offsetHours:12,displayName:"(UTC+12:00) Petropavlovsk-Kamchatsky - Old",supportsDaylightSavingTime:true},{id:"Fiji Standard Time",offset:720,offsetHours:12,displayName:"(UTC+12:00) Fiji",supportsDaylightSavingTime:true},{id:"New Zealand Standard Time",offset:720,offsetHours:12,displayName:"(UTC+12:00) Auckland, Wellington",supportsDaylightSavingTime:true},{id:"UTC+12",offset:720,offsetHours:12,displayName:"(UTC+12:00) Coordinated Universal Time+12",supportsDaylightSavingTime:false},{id:"Tonga Standard Time",offset:780,offsetHours:13,displayName:"(UTC+13:00) Nuku'alofa",supportsDaylightSavingTime:false},{id:"Samoa Standard Time",offset:780,offsetHours:13,displayName:"(UTC+13:00) Samoa",supportsDaylightSavingTime:true}]};if(this===a.jqx._jqxScheduler.prototype){return b}a.extend(true,this,b);this.that=this;return b},_applyThemeSettings:function(){const d=this;var f=window.getComputedStyle(d.element);var c=f.getPropertyValue("--jqx-grid-row-height");var e=f.getPropertyValue("--jqx-grid-column-height");var b=f.getPropertyValue("--jqx-scrollbar-size");if(c){d.rowsHeight=parseInt(c)}if(e){d.columnsHeight=parseInt(e)}if(b){}},createInstance:function(c){var e=this;e._views=new Array();e._view=e.view;this._applyThemeSettings();for(var d=0;d<e.views.length;d++){if(a.type(e.views[d])==="string"){e._views.push({type:e.views[d]})}else{e._views.push(e.views[d])}}for(var d=0;d<e._views.length;d++){if(e._views[d].type==e.view){e._view=d;break}}if(a.jqx.utilities.scrollBarSize!=15){e.scrollBarSize=a.jqx.utilities.scrollBarSize}if(e.source&&!e.source.dataBind){e.source=new a.jqx.dataAdapter(e.source)}var b=e.source._source.datafields;if(b&&b.length>0){e._camelCase=e.source._source.dataFields!==undefined;e.selectionMode=e.selectionMode.toLowerCase()}if(e.host.attr("tabindex")==null){e.host.attr("tabindex","0")}e.host.attr("role","grid");e.host.attr("align","left");e.host.addClass(e.toTP("jqx-grid"));e.host.addClass(e.toTP("jqx-scheduler"));e.host.addClass(e.toTP("jqx-reset"));e.host.addClass(e.toTP("jqx-rc-all"));e.host.addClass(e.toTP("jqx-widget"));e.host.addClass(e.toTP("jqx-widget-content jqx-disableselect"));if(e._testmodules()){return}e.overlay=a("<div style='z-index: 999; position:absolute;'></div>");e.overlay.hide();e.overlay.appendTo(e.host);e.render(true);a.jqx.utilities.resize(e.host,function(){var h=a(window).width();var f=a(window).height();e._hostWidth=null;e._hostHeight=null;var g=e.host.width();var i=e.host.height();e._hostWidth=g;e._hostHeight=i;if(e._lastHostWidth!=g||e._lastHostHeight!=i){e._updatesize(e._lastHostWidth!=g,e._lastHostHeight!=i)}e._lastWidth=h;e._lastHeight=f;e._lastHostWidth=g;e._lastHostHeight=i});e.createEditRecurrenceDialog()},createEditRecurrenceDialog:function(){var d=this;d.editRecurrenceDialog=null;var b=a("<div><div>"+d.schedulerLocalization.editRecurringAppointmentDialogTitleString+"</div><div><div>"+d.schedulerLocalization.editRecurringAppointmentDialogContentString+"</div><div style='position: absolute; white-space:nowrap; text-overflow: ellipsis; left:0px; width:100%; bottom: 0px;'><button title='"+d.schedulerLocalization.editRecurringAppointmentDialogOccurrenceString+"' id='editRecurringAppointmentOccurrence."+d.element.id+"' style='white-space:nowrap; text-overflow: ellipsis; border-left-width: 0px;  border-bottom-width: 0px; border-radius:0px; width:50%;'>"+d.schedulerLocalization.editRecurringAppointmentDialogOccurrenceString+"</button><button title='"+d.schedulerLocalization.editRecurringAppointmentDialogSeriesString+"' id='editRecurringAppointmentSeries."+d.element.id+"' style=' white-space:nowrap; text-overflow: ellipsis; border-bottom-width: 0px;  border-left-width: 0px; border-right-width:0px; width:50%; border-radius:0px;'>"+d.schedulerLocalization.editRecurringAppointmentDialogSeriesString+"</button></div></div></div>");d.editRecurrenceDialog=b;a(b).jqxWindow({rtl:d.rtl,autoFocus:false,animationType:"none",autoOpen:false,theme:d.theme,minWidth:300,minHeight:110,resizable:false});var c=b.find("button");c.jqxButton({theme:d.theme,width:"50%"});var e=false;c.mousedown(function(){e=true;var f=this.id;if(f.indexOf("editRecurringAppointmentOccurrence")>=0){d.editSeries(false)}else{d.editSeries(true)}a(b).jqxWindow("close")});this.addHandler(a(b),"open",function(f){d._raiseEvent("editRecurrenceDialogOpen",{dialog:b,appointment:d.selectedJQXAppointment?d.selectedJQXAppointment.boundAppointment:null})});d.addHandler(a(b),"keydown",function(f){if(f.keyCode==13){if(a(document.activeElement).ischildof(a(b))){if(document.activeElement.nodeName.toLowerCase()=="button"){a(document.activeElement).trigger("mousedown");a(document.activeElement).trigger("mouseup");return true}}}});this.addHandler(a(b),"close",function(f){if(!e){d._removeFeedbackAndStopResize();d.overlay.hide();d.focus();d._raiseEvent("editRecurrenceDialogClose",{dialog:b,appointment:d.selectedJQXAppointment?d.selectedJQXAppointment.boundAppointment:null});return false}e=false;d.overlay.hide();d.focus();d._raiseEvent("editRecurrenceDialogClose",{dialog:b,appointment:d.selectedJQXAppointment?d.selectedJQXAppointment.boundAppointment:null})});d.editRecurrenceDialog=b},getViewStart:function(){var d=this.getVisibleDate();var b=this._views[this._view].type;var e=this._views[this._view];switch(b){case"dayView":case"timelineDayView":return d}var c=this.getFirstDayOfWeek(d);return c},getViewEnd:function(){var e=this.getViewStart();var d=1;var b=this._views[this._view].type;var c=this._views[this._view];switch(b){case"dayView":d=1;break;case"timelineDayView":d=1;if(c.days){d=c.days}break;case"weekView":case"timelineWeekView":d=7;if(c.days){d=c.days}break;case"monthView":d=41;break;case"timelineMonthView":d=41;if(c.days){d=c.days}break;case"agendaView":d=7;if(c.days){d=c.days}break}return e.addDays(d)},getFirstDayOfWeek:function(d){var c=d;var b=this.schedulerLocalization.firstDay;if(b<0||b>6){b=6}while(c.dayOfWeek()!=b){c.addDays(-1,false)}return c},getVisibleDate:function(){var d=this.date;if(d<this.min){d=this.min}if(d>this.max){d=this.max}var b=this._views[this._view].type;var f=this._views[this._view];d=d.clearTime();switch(b){case"dayView":case"weekView":case"timelineDayView":case"timelineWeekView":case"agendaView":return d}var e=d.day();var c=d.addDays(-e+1);d=c;return d},_builddataloadelement:function(){if(this.dataloadelement){this.dataloadelement.remove()}this.dataloadelement=a('<div class="jqx-datatable-load" style="z-index: 99998; background-color:rgba(50,50,50,0.1); overflow: hidden; position: absolute;"></div>');var c=a('<div style="z-index: 99999; margin-left: -66px; left: 50%; top: 50%; margin-top: -24px; position: relative; width: 100px; height: 33px; padding: 5px; font-family: verdana; font-size: 12px; color: #767676; border-color: #898989; border-width: 1px; border-style: solid; background: #f6f6f6; border-collapse: collapse;"><div style="float: left;"><div style="float: left; overflow: hidden; width: 32px; height: 32px;" class="jqx-grid-load"/><span style="margin-top: 10px; float: left; display: block; margin-left: 5px;" >'+this.schedulerLocalization.loadString+"</span></div></div>");c.addClass(this.toTP("jqx-rc-all"));this.dataloadelement.addClass(this.toTP("jqx-rc-all"));c.addClass(this.toTP("jqx-fill-state-normal"));this.dataloadelement.append(c);this.dataloadelement.width(this.width);this.dataloadelement.height(this.height);this.host.prepend(this.dataloadelement);if(this.source._source.url!=""){var b=false;if(this.height==="auto"||this.height===null||this.autoheight){if(this.maxHeight==999999){b=true}}if(b){this.host.height(100);this.dataloadelement.height(100)}else{this.host.height(this.height);this.dataloadelement.height(this.height)}var d=false;if(this.width==="auto"||this.width===null||this.autoWidth){d=true}if(d){this.host.width(300);this.dataloadelement.width(300)}else{this.host.width(this.width);this.dataloadelement.width(this.width)}}},_measureElement:function(c){var b=a("<span style='visibility: hidden; white-space: nowrap;'>measure Text</span>");b.addClass(this.toTP("jqx-widget"));a(document.body).append(b);if(c=="cell"){this._cellheight=b.height()}else{this._columnheight=b.height()}b.remove()},_testmodules:function(){var e="";var c=this;var b=function(){if(e.length!=""){e+=","}};if(!this.host.jqxScrollBar){b();e+=" jqxscrollbar.js"}if(!this.host.jqxButton){b();e+=" jqxbuttons.js"}if(!a.jqx.dataAdapter){b();e+=" jqxdata.js"}if(!this.host.jqxDateTimeInput){b();e+=" jqxdatetimeinput.js"}if(!this.host.jqxCalendar){b();e+=" jqxcalendar.js"}try{if(!Globalize){b();e+=" globalize.js"}}catch(d){}if(e!=""){throw new Error("jqxScheduler: Missing references to the following module(s): "+e);this.host.remove();return true}return false},focus:function(){try{if(this.isTouchDevice()){return}if(this._editDialog&&this._editDialog.jqxWindow("isOpen")){var c=this;setTimeout(function(){c.editDialogFields.subject.focus();c.editDialogFields.subject.select()},1);this.focused=true;return}if(document.activeElement==this.element){return}this.host.focus();var c=this;setTimeout(function(){c.host.focus()},25);this.focused=true}catch(b){}},hiddenParent:function(){return a.jqx.isHidden(this.host)},_updatesize:function(h,g){if(this._loading){return}var e=this;var f=e.host.width();var d=e.host.height();if(!e._oldWidth){e._oldWidth=f}if(!e._oldHeight){e._oldHeight=d}if(e._resizeTimer!=undefined){clearTimeout(e._resizeTimer);e._resizeTimer=null}var c=300;var b=function(){if(e._resizeTimer){clearTimeout(e._resizeTimer)}e.resizingGrid=true;if(a.jqx.isHidden(e.host)){return}e._updatecolumnwidths();e.refresh();e._oldWidth=f;e._oldHeight=d;e.resizingGrid=false};b();e._resizeTimer=setTimeout(function(){var j=e.host.width();var i=e.host.height();if(e._oldWidth!=j||e._oldHeight!=i){b()}},c)},resize:function(c,b){if(c!=undefined){this.width=c}if(b!=undefined){this.height=b}this._updatecolumnwidths();this.refresh()},isTouchDevice:function(){if(this.touchDevice!=undefined){return this.touchDevice}var b=a.jqx.mobile.isTouchDevice();this.touchDevice=b;if(this.touchMode==true){b=true;a.jqx.mobile.setMobileSimulator(this.element);this.touchDevice=b}else{if(this.touchMode==false){b=false}}if(b){this.touchDevice=true;this.host.addClass(this.toThemeProperty("jqx-touch"));this.host.find("jqx-widget-content").addClass(this.toThemeProperty("jqx-touch"));this.host.find("jqx-widget-header").addClass(this.toThemeProperty("jqx-touch"));this.scrollBarSize=this.touchScrollBarSize}return b},toTP:function(b){return this.toThemeProperty(b)},localizestrings:function(b,c){this._cellscache=new Array();if(a.jqx.dataFormat){a.jqx.dataFormat.cleardatescache()}if(this._loading){throw new Error("jqxScheduler: "+this.loadingErrorMessage);return false}if(b!=null){for(var d in this.schedulerLocalization){if(b[d]){this.schedulerLocalization[d]=b[d]}}if(b.loadingErrorMessage){this.loadingErrorMessage=b.loadingErrorMessage}if(c!==false){this._builddataloadelement();a(this.dataloadelement).css("visibility","hidden");a(this.dataloadelement).css("display","none")}}else{this.schedulerLocalization={"/":"/",":":":",firstDay:0,days:{names:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],namesAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],namesShort:["Su","Mo","Tu","We","Th","Fr","Sa"]},months:{names:["January","February","March","April","May","June","July","August","September","October","November","December",""],namesAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",""]},AM:["AM","am","AM"],PM:["PM","pm","PM"],eras:[{name:"A.D.",start:null,offset:0}],twoDigitYearMax:2029,patterns:{d:"M/d/yyyy",D:"dddd, MMMM dd, yyyy",t:"h:mm tt",T:"h:mm:ss tt",f:"dddd, MMMM dd, yyyy h:mm tt",F:"dddd, MMMM dd, yyyy h:mm:ss tt",M:"MMMM dd",Y:"yyyy MMMM",S:"yyyy\u0027-\u0027MM\u0027-\u0027dd\u0027T\u0027HH\u0027:\u0027mm\u0027:\u0027ss",ISO:"yyyy-MM-dd hh:mm:ss",ISO2:"yyyy-MM-dd HH:mm:ss",d1:"dd.MM.yyyy",d2:"dd-MM-yyyy",d3:"dd-MMMM-yyyy",d4:"dd-MM-yy",d5:"H:mm",d6:"HH:mm",d7:"HH:mm tt",d8:"dd/MMMM/yyyy",d9:"MMMM-dd",d10:"MM-dd",d11:"MM-dd-yyyy"},agendaDateColumn:"Date",agendaTimeColumn:"Time",agendaAppointmentColumn:"Appointment",backString:"Back",forwardString:"Forward",toolBarPreviousButtonString:"previous",toolBarNextButtonString:"next",emptyDataString:"No data to display",loadString:"Loading...",clearString:"Clear",todayString:"Today",dayViewString:"Day",weekViewString:"Week",monthViewString:"Month",agendaViewString:"Agenda",timelineDayViewString:"Timeline Day",timelineWeekViewString:"Timeline Week",timelineMonthViewString:"Timeline Month",agendaAllDayString:"all day",loadingErrorMessage:"The data is still loading and you cannot set a property or call a method. You can do that once the data binding is completed. jqxScheduler raises the 'bindingComplete' event when the binding is completed.",editRecurringAppointmentDialogTitleString:"Edit Recurring Appointment",editRecurringAppointmentDialogContentString:"Do you want to edit only this occurrence or the series?",editRecurringAppointmentDialogOccurrenceString:"Edit Occurrence",editRecurringAppointmentDialogSeriesString:"Edit The Series",editDialogTitleString:"Edit Appointment",editDialogCreateTitleString:"Create New Appointment",contextMenuEditAppointmentString:"Edit Appointment",contextMenuCreateAppointmentString:"Create New Appointment",editDialogSubjectString:"Subject",editDialogLocationString:"Location",editDialogFromString:"From",editDialogToString:"To",editDialogAllDayString:"All day",editDialogExceptionsString:"Exceptions",editDialogResetExceptionsString:"Reset on Save",editDialogDescriptionString:"Description",editDialogResourceIdString:"Owner",editDialogStatusString:"Status",editDialogColorString:"Color",editDialogColorPlaceHolderString:"Select Color",editDialogTimeZoneString:"Time Zone",editDialogSelectTimeZoneString:"Select Time Zone",editDialogSaveString:"Save",editDialogDeleteString:"Delete",editDialogCancelString:"Cancel",editDialogRepeatString:"Repeat",editDialogRepeatEveryString:"Repeat every",editDialogRepeatEveryWeekString:"week(s)",editDialogRepeatEveryYearString:"year(s)",editDialogRepeatEveryDayString:"day(s)",editDialogRepeatNeverString:"Never",editDialogRepeatDailyString:"Daily",editDialogRepeatWeeklyString:"Weekly",editDialogRepeatMonthlyString:"Monthly",editDialogRepeatYearlyString:"Yearly",editDialogRepeatEveryMonthString:"month(s)",editDialogRepeatEveryMonthDayString:"Day",editDialogRepeatFirstString:"first",editDialogRepeatSecondString:"second",editDialogRepeatThirdString:"third",editDialogRepeatFourthString:"fourth",editDialogRepeatLastString:"last",editDialogRepeatEndString:"End",editDialogRepeatAfterString:"After",editDialogRepeatOnString:"On",editDialogRepeatOfString:"of",editDialogRepeatOccurrencesString:"occurrence(s)",editDialogRepeatSaveString:"Save Occurrence",editDialogRepeatSaveSeriesString:"Save Series",editDialogRepeatDeleteString:"Delete Occurrence",editDialogRepeatDeleteSeriesString:"Delete Series",editDialogStatuses:{free:"Free",tentative:"Tentative",busy:"Busy",outOfOffice:"Out of Office"}}}},_updateScrollbars:function(r){var j=false;var d=this;if(d.width==="auto"||d.width===null||d.autowidth){if(d.maxWidth==999999){j=true}}var h=d._views[d._view].type;var g=d._views[d._view];if(h=="monthView"&&d.resources&&d.resources.orientation=="none"&&!g.monthRowAutoHeight){var k=d.vScrollBar[0].style.visibility;d.hScrollBar[0].style.visibility="hidden";d.vScrollBar[0].style.visibility="hidden";if((k!=d.vScrollBar[0].style.visibility)){d._updatecolumnwidths()}return}var b=parseInt(d.scrollBarSize);var s=d.table?d.table.height():0;var i=0;var n="inherit";var k=d.vScrollBar[0].style.visibility;var o=d.hScrollBar[0].style.visibility;if(!r){var f=d.host.height()}else{var f=r}if(!d.columnGroups){f-=d.showHeader?d.columnsHeight:0}else{f-=d.showHeader?d.columnsheader.height():0}if(d.filterable){f-=d.filter.height()}if(d.pageable){f-=d.pagerHeight;if(d.pagerPosition==="both"){f-=d.pagerHeight}}if(d.showToolbar){f-=d.toolbarHeight}if(d.showLegend&&d._resources.length>0){f-=d.legendHeight}var m=false;if(d.height==="auto"||d.height===null||d.autoheight){if(d.maxHeight==999999){m=true}}if(!m&&s>f&&(d.getRows().length>0)){d.vScrollBar[0].style.visibility=n;i=4+parseInt(b);d.vScrollBar.jqxScrollBar({max:s-f})}else{d.vScrollBar[0].style.visibility="hidden"}if((k!=d.vScrollBar[0].style.visibility)){d._updatecolumnwidths()}var p=d.table?d.table.width():0;if(p>4){p-=4}var q=parseInt(d.host.css("border-left-width"))+parseInt(d.host.css("border-right-width"));var l=q+d.host.width()-i;if(p>l&&!j){d.hScrollBar[0].style.visibility=n;d.hScrollBar.jqxScrollBar({max:2+q+p-l});i=4+parseInt(b);if(b==0){i=0}if(!m&&s!=f){if(s>f-i+4&&(d.getRows().length>0)){d.hScrollBar.jqxScrollBar({max:q+p-l});var c=d.vScrollBar[0].style.visibility==="hidden";d.vScrollBar[0].style.visibility=n;d._updatecolumnwidths();if(c){d.hScrollBar.jqxScrollBar({max:p-l+q})}var e=d.table?d.table.width():0;if(e>3){e-=3}if(e!=p){if(e<l){d.hScrollBar.jqxScrollBar({max:q+e-l});d.hScrollBar[0].style.visibility="hidden";i=0}else{if(!c){d.hScrollBar.jqxScrollBar({max:p-l+q-b})}else{if(e>l){d.hScrollBar.jqxScrollBar({max:q+e-l})}}}}}if(s-f>0){d.vScrollBar.jqxScrollBar({max:s-f+i})}else{d.vScrollBar[0].style.visibility="hidden"}}}else{d.hScrollBar[0].style.visibility="hidden"}if(d.getRows().length===0){d.vScrollBar[0].style.visibility="hidden";d.bottomRight[0].style.visibility="hidden"}if(d.vScrollBar[0].style.visibility=="hidden"){if(d.vScrollInstance.value!=0){d.vScrollInstance.setPosition(0)}}},_measureElementWidth:function(d){var c=a("<span style='visibility: hidden; white-space: nowrap;'>"+d+"</span>");c.addClass(this.toTP("jqx-widget"));c.addClass(this.toTP("jqx-grid"));c.addClass(this.toTP("jqx-grid-column-header"));c.addClass(this.toTP("jqx-widget-header"));a(document.body).append(c);var b=c.outerWidth()+20;c.remove();return b},_arrangeAutoHeight:function(d){if(!d){d=0}if(this.height==="auto"||this.height===null||this.autoheight){var g=this.table.height();var f=0;this._hostHeight=null;if(!this.columnGroups){f+=this.showHeader?this.columnsHeight:-1}else{f+=this.showHeader?this.columnsheader.height():-1}f+=this.showLegend&&this._resources.length>0?this.legendHeight:0;f+=this.showToolbar?this.toolbarHeight:0;f+=this.pageable?this.pagerHeight:0;if(this.pagerPosition==="both"){f+=this.pageable?this.pagerHeight:0}f+=g;if(this.filterable){var e=this.filter.find(".filterrow");var b=this.filter.find(".filterrow-hidden");var c=1;if(b.length>0){c=0}f+=this.filterHeight-1+this.filterHeight*e.length*c}if(f+d>this.maxHeight){this.host.height(this.maxHeight)}else{this.host.height(f+d)}return true}return false},_arrangeAutoWidth:function(d){if(!d){d=0}if(this.width==="auto"||this.width===null||this.autowidth){this._hostWidth=null;var c=0;for(var e=0;e<this.columns.records.length;e++){var b=this.columns.records[e].width;if(this.columns.records[e].hidden){continue}if(b=="auto"){b=this._measureElementWidth(this.columns.records[e].text);c+=b}else{c+=b}}var f=c;if(f+d>this.maxWidth){this.host.width(this.maxWidth)}else{this.host.width(f+d)}return true}return false},_measureTopAndHeight:function(){var b=this.host.height();var c=0;if(this.showToolbar){c+=this.toolbarHeight;b-=parseInt(this.toolbarHeight)}if(this.showLegend&&this.legendPosition!="bottom"&&this._resources.length>0){c+=parseInt(this.legendHeight)+1}return{top:c,height:b}},_arrange:function(){if(!this.table){return}this._arrangeAutoHeight();this._arrangeAutoWidth();var d=this.legendHeight;if(this._resources.length==0){d=0}var t=this._hostWidth?this._hostWidth:this.host.width();var q=this._hostHeight?this._hostHeight:this.host.height();var j=q;var i=this;if(this.showLegend&&this.legendPosition=="top"){this.legendbartop[0].style.visibility="inherit"}else{this.legendbartop[0].style.visibility="hidden"}var p=0;if(this.showToolbar){this.toolbar.width(t);this.toolbar[0].style.height=this.toolbarHeight-1+"px";this.toolbar[0].style.top="0px";p+=this.toolbarHeight;q-=parseInt(this.toolbarHeight)}else{this.toolbar[0].style.height="0px"}if(this.showLegend&&this.legendPosition=="bottom"){this.legendbarbottom[0].style.width=t+"px";this.legendbarbottom[0].style.height=d+"px"}else{this.legendbarbottom[0].style.height="0px"}if(this.showLegend&&this.legendPosition=="top"){if(this.legendbartop[0].style.width!=t+"px"){this.legendbartop[0].style.width=parseInt(t)+"px"}if(this.legendbartop[0].style.height!=d+"px"){this.legendbartop[0].style.height=parseInt(d-1)+"px"}if(this.legendbartop[0].style.top!=p+"px"){this.legendbartop[0].style.top=p+"px"}var e=p+d+"px";p=p+d;if(this.content[0].style.top!=e){this.content[0].style.top=p+"px"}}if(!this.showLegend){this.legendbartop[0].style.display="none";this.legendbarbottom[0].style.display="none"}this._updateScrollbars(j);var b=parseInt(this.scrollBarSize);var m=4;var f=2;var g=0;if(this.vScrollBar[0].style.visibility!="hidden"){g=b+m}if(this.hScrollBar[0].style.visibility!="hidden"){f=b+m+2}if(b==0){f=0;g=0}if("hidden"!=this.vScrollBar[0].style.visibility||"hidden"!=this.hScrollBar[0].style.visibility){var u=this._arrangeAutoHeight(f-2);var r=this._arrangeAutoWidth(g+1);if(u||r){this.legendbartop[0].style.width=parseInt(t)+"px";this.toolbar[0].style.width=parseInt(t)+"px";this.legendbarbottom[0].style.width=parseInt(t)+"px";this.filter[0].style.width=parseInt(t)+"px"}if(u){var w=this._measureTopAndHeight();p=w.top;q=w.height}}var n=0;if(this.showLegend&&this.legendPosition=="bottom"){f+=d;n+=d}else{if(this.showLegend){f+=d}}if(this.hScrollBar[0].style.height!=b+"px"){this.hScrollBar[0].style.height=parseInt(b)+"px"}if(this.hScrollBar[0].style.top!=p+q-m-b-n+"px"||this.hScrollBar[0].style.left!="0px"){this.hScrollBar[0].style.top=p+q-m-b-n-1+"px";this.hScrollBar[0].style.left="0px"}var l=this.hScrollBar[0].style.width;var h=false;var v=false;if(g==0){if(l!=(t-2)+"px"){this.hScrollBar[0].style.width=(t-2)+"px";h=true}}else{if(l!=(t-b-m)+"px"){this.hScrollBar[0].style.width=(t-b-m+"px");h=true}}if(this.vScrollBar[0].style.width!=b+"px"){this.vScrollBar[0].style.width=b+"px";v=true}if(this.vScrollBar[0].style.height!=parseInt(q)-f+"px"){this.vScrollBar[0].style.height=(parseInt(q)-f+"px");v=true}if(this.vScrollBar[0].style.left!=parseInt(t)-parseInt(b)-m+"px"||this.vScrollBar[0].style.top!=p+"px"){this.vScrollBar[0].style.top=p+"px";this.vScrollBar[0].style.left=parseInt(t)-parseInt(b)-m+"px"}if(this.rtl){this.vScrollBar.css({left:"0px",top:p});if(this.vScrollBar.css("visibility")!="hidden"){this.hScrollBar.css({left:b+2})}}var k=this.vScrollInstance;k.disabled=this.disabled;var s=this.hScrollInstance;s.disabled=this.disabled;if(h){s.refresh()}if(v){k.refresh()}var o=function(x){if((x.vScrollBar[0].style.visibility!="hidden")&&(x.hScrollBar[0].style.visibility!="hidden")){x.bottomRight[0].style.visibility="inherit";x.bottomRight[0].style.left=1+parseInt(x.vScrollBar.css("left"))+"px";x.bottomRight[0].style.top=parseInt(x.hScrollBar.css("top"))+"px";if(x.rtl){x.bottomRight.css("left","0px")}x.bottomRight[0].style.width=parseInt(b)+3+"px";x.bottomRight[0].style.height=parseInt(b)+4+"px"}else{x.bottomRight[0].style.visibility="hidden"}};o(this);if(this.content[0].style.width!=t-g+"px"){this.content[0].style.width=t-g+"px"}if(this.content[0].style.height!=q-f+3+"px"){this.content[0].style.height=q-f+3+"px"}if(this.content[0].style.top!=p+"px"){this.content[0].style.top=parseInt(p)+"px"}if(this.rtl){this.content.css("left",g)}if(this.showLegend&&this.legendPosition=="bottom"){this.legendbarbottom.css("top",p-1+q-d-(this.pageable?this.pagerHeight:0));if(this.rtl){if(this.hScrollBar.css("visibility")=="hidden"){this.legendbarbottom.css("left",this.content.css("left"))}else{this.legendbarbottom.css("left","0px")}}}this.vScrollBar[0].style.zIndex=this.tableZIndex+this.headerZIndex+10+this.columns.records.length;this.hScrollBar[0].style.zIndex=this.tableZIndex+this.headerZIndex+10+this.columns.records.length;if(t!=parseInt(this.dataloadelement[0].style.width)){this.dataloadelement[0].style.width=this.element.style.width}if(q!=parseInt(this.dataloadelement[0].style.height)){this.dataloadelement[0].style.height=this.element.style.height}this._hostWidth=t;this._hostHeight=j;var c=this.schedulercontent.coord();this._tableOffset=c},scrollOffset:function(d,c){if(arguments.length==0||(d!=null&&typeof(d)=="object"&&!d.top)){return{left:this.hScrollBar.jqxScrollBar("value"),top:this.vScrollBar.jqxScrollBar("value")}}if(d!=null&&typeof(d)=="object"){var c=d.left;var b=d.top;var d=b}if(d==null||c==null||d==undefined||c==undefined){return}this.vScrollBar.jqxScrollBar("setPosition",d);this.hScrollBar.jqxScrollBar("setPosition",c)},scrollleft:function(b){if(b==null||b==undefined){return}if(this.hScrollBar.css("visibility")!="hidden"){this.hScrollBar.jqxScrollBar("setPosition",b)}},scrolltop:function(b){if(b==null||b==undefined){return}if(this.vScrollBar.css("visibility")!="hidden"){this.vScrollBar.jqxScrollBar("setPosition",b)}},beginAppointmentsUpdate:function(){this._appupdating=true},endAppointmentsUpdate:function(){this._appupdating=false;this._renderrows()},beginUpdate:function(){this._updating=true;this._datachanged=false},endUpdate:function(b){this._updating=false;if(b===false){return}this._rendercolumnheaders();this.refresh()},updating:function(){return this._updating},databind:function(b,g,f){if(this.loadingstate===true){return}var j=window;if(this.host.css("display")=="block"){if(this.autoShowLoadElement){a(this.dataloadelement).css("visibility","visible");a(this.dataloadelement).css("display","block");this.dataloadelement.width(this.host.width());this.dataloadelement.height(this.host.height())}else{a(this.dataloadelement).css("visibility","hidden");a(this.dataloadelement).css("display","none")}}var h=this;if(b==null){b={}}if(b.sortcomparer==undefined||b.sortcomparer==null){b.sortcomparer=null}if(b.filter==undefined||b.filter==null){b.filter=null}if(b.sort==undefined||b.sort==null){b.sort=null}if(b.data==undefined||b.data==null){b.data=null}var d=null;if(b!=null){d=b._source!=undefined?b._source.url:b.url}this.dataview=this.dataview||new a.jqx.scheduler.dataView("dataView");this.resourcesDataView=this.resourcesDataView||new a.jqx.scheduler.dataView("resourcesDataView");this.dataview.pageable=this.pageable;this.dataview.scheduler=this;this.resourcesDataView.scheduler=this;this._loading=true;this.appointments=new Array();this.uiappointments=new Array();var e=1;if(this.resources&&this.resources.source){e=2}var c=0;var i=function(){if(c==e){h._resourcesBinding=false;var m=h._resources.length>1?h._resources.length:1;if(h.resources&&h.resources.orientation==="horizontal"){h.tableColumns=m;h.tableRows=1}else{if(h.resources&&h.resources.orientation==="vertical"){h.tableRows=m;h.tableColumns=1}else{h.tableColumns=1;h.tableRows=1}}h._render();if(h.autoShowLoadElement&&!h._loading){a(h.dataloadelement).css("visibility","hidden");a(h.dataloadelement).css("display","none")}h._updateTouchScrolling();h._raiseEvent("bindingComplete");if(f){f()}if(!h.initializedcall){h.initializedcall=true;h.isInitialized=true;if((h.width!=null&&h.width.toString().indexOf("%")!=-1)||(h.height!=null&&h.height.toString().indexOf("%")!=-1)){h._updatesize(true)}if(h.ready){h.ready()}if(h._rendercelltexts){h._rendercelltexts()}if(h._gridRenderElement){a(h._gridRenderElement).show("slow");var l=6000+Math.floor((Math.random()*4000)+1);var n=String.fromCharCode(83,69,84).toLowerCase()+"-"+String.fromCharCode(84,73,77,69,79,85,84).toLowerCase();j[a.camelCase(n)](function(){a(h._gridRenderElement).hide("slow",function(){a(h._gridRenderElement).remove()})},l)}if(h.host.css("visibility")=="hidden"){var k=a.jqx.browser.msie&&a.jqx.browser.version<8;if(h.vScrollBar.css("visibility")=="visible"){h.vScrollBar.css("visibility","inherit")}if(h.hScrollBar.css("visibility")=="visible"){h.hScrollBar.css("visibility","inherit")}h._intervalTimer=setInterval(function(){if(h.host.css("visibility")=="visible"){h._updatesize(true);clearInterval(h._intervalTimer)}},100)}}}};this._resourcesBinding=false;this.dataview.update=function(y){h._loading=false;h.appointmentsByKey=new Array();h.appointments=new Array();h.uiappointments=new Array();var D=h.source._source.datafields;var o=["from","to","id","style","description","location","subject","background","color","borderColor","recurrencePattern","recurrenceException","draggable","resizable","tooltip","hidden","allDay","timeZone","ownerId","resourceId"];var m=new Array();for(var z=0;z<h.source.records.length;z++){var p=h.source.records[z];var n={};for(var G in h.appointmentDataFields){var l=h.appointmentDataFields[G];var x=p[l];if(G=="from"||G=="to"){x=new a.jqx.date(x)}if(G=="style"){if(x){var s=h.getAppointmentColors(x);n.color=s.color;n.background=s.background;n.borderColor=s.border}}if(G=="recurrencePattern"){if(x){x=new a.jqx.scheduler.recurrencePattern(x);x.timeZone=p.timeZone||h.timeZone}}if(G=="recurrenceException"){var B=new Array();if(x){if(x.indexOf("EXDATE:")>=0){x=x.substring(x.indexOf("EXDATE:")+7)}var t=new Array();if(x.indexOf(",")>=0){t=x.split(",")}else{t.push(x)}for(var A=0;A<t.length;A++){var w=t[A];if(w.indexOf(";")>=0){var q=w.split(";")[1];w=w.split(";")[0];if(q.toLowerCase().indexOf("display")>=0&&q.toLowerCase().indexOf("none")){n.hidden=true}}try{var E=a.jqx.scheduler.utilities.untilStringToDate(w);if(E!="Invalid Date"){if(n.timeZone){E=new a.jqx.date(E,n.timeZone)}else{if(h.timeZone){E=E.toTimeZone(h.timeZone)}else{E=new a.jqx.date(E)}}}}catch(F){var E=new a.jqx.date(w,h.timeZone)}B.push(E)}}x=B}n[G]=x}for(var u in o){var G=o[u];if(n[G]==undefined){var x="";if(G=="originalData"){continue}if(G=="ownerId"){x=null}if(G=="timeZone"){x=null}if(G=="recurrencePattern"){x=null}if(G=="recurrenceException"){x=[]}if(G=="allDay"){x=false}if(G=="draggable"){x=true}if(G=="resizable"){x=true}if(G=="hidden"){x=false}if(G=="resourceId"){x=null}if(G=="from"){x=new a.jqx.date()}if(G=="to"){x=new a.jqx.date().addHours(1)}n[G]=x}}n.originalData=p;if(h.resources&&!h.resources.source){if(!h._resourcesBinding){if(m.indexOf(n.resourceId)==-1){m.push(n.resourceId)}}}h.appointmentsByKey[p.uid]=n;h.appointments.push(n);var v=new a.jqx.scheduler.appointment(n);if(n.timeZone){v.from=v.from.toTimeZone(n.timeZone);v.to=v.to.toTimeZone(n.timeZone)}if(h.timeZone){if(!n.timeZone){v.timeZone=h.timeZone}v.from=v.from.toTimeZone(h.timeZone);v.to=v.to.toTimeZone(h.timeZone)}else{v.from=v.from.toTimeZone(null);v.to=v.to.toTimeZone(null)}n.jqxAppointment=v;if(n.recurrenceException){for(var C=0;C<n.recurrenceException.length;C++){var E=v.recurrenceException[C];var r=v.clone();r.occurrenceFrom=E;var k=v.duration();if(h.allDay){k=new a.jqx.timeSpan(10000*(h.to-h.from))}r.from=E;r.to=E.add(k);r.rootAppointment=v;r.hidden=true;v.exceptions.push(r)}}v.boundAppointment=n;v.scheduler=h;h.uiappointments.push(v)}if(!h._resourcesBinding){h._resources=m}c++;i()};this.resourcesDataView.update=function(k){if(h.resources.dataField){h._resources=new Array();for(var l=0;l<k.length;l++){if(h._resources.indexOf(k[l][h.resources.dataField])>=0){continue}if(k[l][h.resources.dataField]){h._resources.push(k[l][h.resources.dataField])}}}else{h._resources=k}if(h.resources.orientation==undefined){h.resources.orientation="none"}c++;i()};this.dataview.databind(b);if(this.resources&&this.resources.source){this._resourcesBinding=true;this.resourcesDataView.databind(this.resources.source)}},_raiseEvent:function(g,c){if(c==undefined){c={owner:null}}var d=g;var e=c;e.owner=this;var f=new a.Event(d);f.owner=this;f.args=e;var b=this.host.trigger(f);c=f.args;return b},ensureAppointmentVisible:function(b){if(this.appointmentsByKey[b]){return this._ensureAppointmentVisible(this.appointmentsByKey[b].jqxAppointment)}return false},_ensureAppointmentVisible:function(h){if(this.vScrollBar[0].style.visibility==="hidden"&&this.hScrollBar[0].style.visibility==="hidden"){return false}if(!h){return false}var k=this.getViewStart();var i=this.getViewEnd();var p=a.jqx.scheduler.utilities.rangeIntersection(h.from,h.to,k,i);if(!p){this.navigateTo(h.from);return this._ensureAppointmentVisible(h)}var G=h.id;var t=a('[data-key="'+G+'"]');if(t.length>0){var c=t[0]}else{if(h.elements&&h.elements.length>0){var f=h.elements[0];var c=f.element}else{return false}}var z=this.vScrollInstance.value;var y=this.hScrollInstance.value;if(this.rtl){var y=this.hScrollInstance.max-y}var s=this.element.clientHeight;var v=this.element.clientWidth;var B=0;if(!this.columnGroups){B+=this.showHeader?this.columnsHeight:0}else{B+=this.showHeader?this.columnsheader.height():0}var r=this._views[this._view].type;var n=this._views[this._view];var D=0;if(r=="dayView"||r=="weekView"){var x=this.showAllDayRow;if(n.timeRuler&&(r==="dayView"||r==="weekView")){if(n.timeRuler.showAllDayRow!=undefined){x=n.timeRuler.showAllDayRow}}if(x){if(this.tableRows==1){D=this.table[0].rows[0].clientHeight}else{D=this.table[0].rows[1].clientHeight}}var q=h.duration().days()>=1||h.allDay;if(q&&this.tableRows==1&&this.tableColumns==1){return false}}if(this.showToolbar){B+=this.toolbarHeight}s-=B;if(this.showLegend&&this._resources.length>0){s-=this.legendHeight}var e=0;var l=0;var d=z-e;var C=s+d-D;var w=y-l;var F=v+w;var E=c;E=a(E);var g=E[0].clientHeight;var j=E.position().top-D;var m=j+g;if(j<=d){var A=j;if(A<0){A=0}if(!q||(q&&this.tableRows>1)){this.vScrollBar.jqxScrollBar("setPosition",A)}}else{if(j>=C){var A=j;if(A<0){A=0}if(!q||(q&&this.tableRows>1)){this.vScrollBar.jqxScrollBar("setPosition",A-2)}}}var u=E.position().left;u=Math.round(u);var b=u+E.outerWidth();if(Math.round(E.position().left)===0){this.hScrollBar.jqxScrollBar("setPosition",0)}if(u<=w){var o=u-E.outerWidth()+l;if(o<0){o=0}if(!this.rtl){this.hScrollBar.jqxScrollBar("setPosition",u)}else{this.hScrollBar.jqxScrollBar("setPosition",this.hScrollBar.jqxScrollBar("max")-u)}}if(u>F){if(!this.rtl){this.hScrollBar.jqxScrollBar("setPosition",u)}else{this.hScrollBar.jqxScrollBar("setPosition",this.hScrollBar.jqxScrollBar("max")-u)}}},ensureVisible:function(c,k){var f=this;var l=a.type(c)=="date"?c:c.toDate();for(var e=0;e<f.rows.length;e++){for(var d=0;d<f.rows[e].cells.length;d++){var h=f.rows[e].cells[d];if(k){if(h.getAttribute("data-view")!==k){continue}}var g=h.getAttribute("data-date");var b=f._getDateByString(g);if(b.valueOf()==l.valueOf()){return f._ensureVisible(h)}}}},_ensureVisible:function(b){if(this.vScrollBar[0].style.visibility==="hidden"&&this.hScrollBar[0].style.visibility==="hidden"){return false}var t=this.vScrollBar.jqxScrollBar("value");var s=this.hScrollBar.jqxScrollBar("value");if(this.rtl){s=this.hScrollBar.jqxScrollBar("max")-s}var m=this._hostHeight;var p=this._hostWidth;var w=0;if(!this.columnGroups){w+=this.showHeader?this.columnsHeight:0}else{w+=this.showHeader?this.columnsheader.height():0}if(this.showToolbar){w+=this.toolbarHeight}m-=w;if(this.showLegend&&this._resources.length>0){m-=this.legendHeight}if(this.hScrollBar.css("visibility")!="hidden"){m-=20}var e=0;var h=0;var l=this._views[this._view].type;var j=this._views[this._view];var y=0;if(l=="dayView"||l=="weekView"){var r=this.showAllDayRow;if(j.timeRuler&&(l==="dayView"||l==="weekView")){if(j.timeRuler.showAllDayRow!=undefined){r=j.timeRuler.showAllDayRow}}if(r){if(this.tableRows==1){y=this.table[0].rows[0].clientHeight}else{y=this.table[0].rows[1].clientHeight}}}var d=t-e;var x=m+d-y;var q=s-h;var A=p+q;var z=b;z=a(z);var f=z.position().top-y;var i=f+z.outerHeight();var o=z.position().left;o=Math.round(o);var c=o+z.outerWidth();if(Math.round(z.position().left)===0){this.hScrollBar.jqxScrollBar("setPosition",0)}if(o<=q){var k=o-z.outerWidth()+h;if(k<0){k=0}if(!this.rtl){this.hScrollBar.jqxScrollBar("setPosition",k)}else{this.hScrollBar.jqxScrollBar("setPosition",this.hScrollBar.jqxScrollBar("max")-k)}}if(c>=A){if(!this.rtl){this.hScrollBar.jqxScrollBar("setPosition",2+h+c-p)}else{this.hScrollBar.jqxScrollBar("setPosition",this.hScrollBar.jqxScrollBar("max")-(2+h+c-p))}}var g=z.parent().index();if(this.tableRows>0){g--}if(Math.round(z.position().top)===0||g===0){return this.vScrollBar.jqxScrollBar("setPosition",0)}else{var n=this.table[0].rows.length-1;var v=this.table[0].rows[n];if(v[0]===z.parent()[0]){return this.vScrollBar.jqxScrollBar("setPosition",this.vScrollBar.jqxScrollBar("max"))}}if(f<=d){var u=f;if(u<0){u=0}return this.vScrollBar.jqxScrollBar("setPosition",u)}if(i>=x){return this.vScrollBar.jqxScrollBar("setPosition",4+i-m+y)}},getColumn:function(b){var c=null;if(this.columns.records){a.each(this.columns.records,function(){if(this.datafield==b||this.displayfield==b){c=this;return false}})}return c},_setcolumnproperty:function(c,e,f){if(c==null||e==null||f==null){return null}e=e.toLowerCase();var d=this.getColumn(c);if(d==null){return}var g=d[e];d[e]=f;var b=this.getColumn(c);if(b!=null){b[e]=f}switch(e){case"text":case"hidden":case"hideable":case"renderer":case"align":case"cellsalign":case"contenttype":case"cellclass":case"cellclassname":case"class":case"width":case"minwidth":case"maxwidth":if(e=="align"){this._rendercolumnheaders();this.refresh()}else{if(e=="text"||e=="class"||e=="hidden"||e=="pinned"||e=="resizable"||e=="renderer"){this._rendercolumnheaders();this.refresh()}else{if(e=="width"||e=="maxwidth"||e=="minwidth"){d._width=null;d._percentagewidth=null;this._updatecolumnwidths();this.refresh()}else{this.refresh()}}}break}},getColumnProperty:function(b,d){if(b==null||d==null){return null}d=d.toLowerCase();var c=this.getColumn(b);return c[d]},setColumnProperty:function(b,c,d){this._setcolumnproperty(b,c,d)},hideColumn:function(b){this._setcolumnproperty(b,"hidden",true)},showColumn:function(b){this._setcolumnproperty(b,"hidden",false)},updateBoundData:function(c,b){this.databind(this.source,c,b)},refresh:function(c){if(c!=true){var b=this;if(a.jqx.isHidden(b.host)){return}b.table[0].style.top="0px";b.vScrollInstance.setPosition(0);b._renderrows();b._arrange();b._renderhorizontalscroll();b._updateTouchScrolling();b._refreshToolBar();b._updateFocusedCell()}},_updateFocusedCell:function(){var h=this;if(h.focusedCell){h._updateCellsSelection();return}var d=h._views[h._view].type;var g=h._views[h._view];var c=h.showAllDayRow;if(g.timeRuler&&(d==="dayView"||d==="weekView")){if(g.timeRuler.showAllDayRow!=undefined){c=g.timeRuler.showAllDayRow}}if(!c||(d!="dayView"&&d!="weekView")){h.focusedCell=h.rows[0].cells[0];if(h.rtl){h.focusedCell=h.rows[0].cells[h.rows[0].cells.length-1]}}else{h.focusedCell=h.rows[1].cells[0];if(h.rtl){h.focusedCell=h.rows[1].cells[h.rows[1].cells.length-1]}}if(h.focusedCell.className.indexOf("jqx-scheduler-disabled-cell")>=0){h.focusedCell=null;for(var f=0;f<this.rows.length;f++){for(var e=0;e<this.rows[f].cells.length;e++){var b=this.rows[f].cells[e];if(b.className.indexOf("jqx-scheduler-disabled-cell")==-1){h.focusedCell=b;break}}if(h.focusedCell){break}}}h._lastSelectedCell=h.focusedCell;h._updateCellsSelection()},_updateTouchScrolling:function(){var c=this.that;if(c.isTouchDevice()){var e=a.jqx.mobile.getTouchEventName("touchstart");var d=a.jqx.mobile.getTouchEventName("touchend");var b=a.jqx.mobile.getTouchEventName("touchmove");if(c.schedulercontent){c.removeHandler(c.table,e+".touchScroll");c.removeHandler(c.table,b+".touchScroll");c.removeHandler(c.table,d+".touchScroll");c.removeHandler(c.table,"touchcancel.touchScroll");a.jqx.mobile.touchScroll(c._table[0],Math.max(c.vScrollInstance.max,c.hScrollInstance.max),function(h,g){if(c.dragOrResize){return}if(g!=null&&c.vScrollBar.css("visibility")!="hidden"){var f=c.vScrollInstance.value;c.vScrollInstance.setPosition(g)}if(h!=null&&c.hScrollBar.css("visibility")!="hidden"){var f=c.hScrollInstance.value;c.hScrollInstance.setPosition(h)}c.scrolled=new Date()},this.element.id,this.hScrollBar,this.vScrollBar)}}},scrollWidth:function(){return this.hScrollInstance.max},scrollHeight:function(){return this.vScrollInstance.max},scrollLeft:function(b){if(this.hScrollBar[0].style.visibility!="hidden"){this.hScrollInstance.setPosition(b)}},scrollTop:function(b){if(this.vScrollBar[0].style.visibility!="hidden"){this.vScrollInstance.setPosition(b)}},render:function(i){var e="<div style='overflow: hidden; -webkit-appearance: none; outline: none; width:100%; height: 100%; align:left; border: 0px; padding: 0px; margin: 0px; left: 0px; top: 0px; valign:top; position: relative;'><div id='wrapper"+this.element.id+"' style='overflow: hidden; -webkit-appearance: none; border: none; background: transparent; outline: none; width:100%; height: 100%; padding: 0px; margin: 0px; align:left; left: 0px; top: 0px; valign:top; position: relative;'><div id='toolbar' style='visibility: hidden; align:left; valign:top; left: 0px; top: 0px; position: absolute;'></div><div id='legendbartop' style='align:left; valign:top; left: 0px; top: 0px; position: absolute;'></div><div id='filter' style='visibility: hidden; align:left; valign:top; left: 0px; top: 0px; position: absolute;'></div><div id='content"+this.element.id+"' style='overflow: hidden; -webkit-appearance: none; border: none; background: transparent; outline: none; border: none; padding: 0px; margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; align:left; valign:top; left: 0px; top: 0px; position: absolute;'></div><div id='verticalScrollBar"+this.element.id+"' style='align:left; valign:top; left: 0px; top: 0px; position: absolute;'></div><div id='horizontalScrollBar"+this.element.id+"' style='align:left; valign:top; left: 0px; top: 0px; position: absolute;'></div><div id='bottomRight' style='align:left; valign:top; left: 0px; top: 0px; border: none; position: absolute;'></div><div id='aggregates' style='align:left; valign:top; left: 0px; top: 0px; position: absolute;'></div><div id='legendbarbottom' style='align:left; valign:top; left: 0px; top: 0px; position: absolute;'></div><div id='pager' style='z-index: 20; align:left; valign:top; left: 0px; top: 0px; position: absolute;'></div></div></div>";this.element.innerHTML=e;this.wrapper=this.host.find("#wrapper"+this.element.id);this.content=this.host.find("#content"+this.element.id);this.content.addClass(this.toTP("jqx-reset"));var g=this.host.find("#verticalScrollBar"+this.element.id);var k=this.host.find("#horizontalScrollBar"+this.element.id);this.bottomRight=this.host.find("#bottomRight").addClass(this.toTP("jqx-grid-bottomright")).addClass(this.toTP("jqx-scrollbar-state-normal"));if(this.vScrollBar){this.vScrollBar.jqxScrollBar("destroy")}if(this.hScrollBar){this.hScrollBar.jqxScrollBar("destroy")}this.vScrollBar=g.jqxScrollBar({vertical:true,rtl:this.rtl,touchMode:this.touchMode,theme:this.theme,_triggervaluechanged:false});this.hScrollBar=k.jqxScrollBar({vertical:false,rtl:this.rtl,touchMode:this.touchMode,theme:this.theme,_triggervaluechanged:false});this.vScrollBar.css("visibility","hidden");this.hScrollBar.css("visibility","hidden");this.vScrollInstance=a.data(this.vScrollBar[0],"jqxScrollBar").instance;this.hScrollInstance=a.data(this.hScrollBar[0],"jqxScrollBar").instance;this.pager=this.host.find("#pager");this.pager[0].id="pager"+this.element.id;this.toolbar=this.host.find("#toolbar");this.toolbar[0].id="toolbar"+this.element.id;this.toolbar.addClass(this.toTP("jqx-scheduler-toolbar"));this.toolbar.addClass(this.toTP("jqx-widget-header"));this.legendbarbottom=this.host.find("#legendbarbottom");this.legendbarbottom[0].id="legendbarbottom"+this.element.id;this.legendbarbottom.addClass(this.toTP("jqx-scheduler-legend-bar-bottom"));this.legendbarbottom.addClass(this.toTP("jqx-scheduler-legend-bar"));this.legendbarbottom.addClass(this.toTP("jqx-widget-header"));this.pager.addClass(this.toTP("jqx-grid-pager"));this.pager.addClass(this.toTP("jqx-widget-header"));this.legendbartop=this.host.find("#legendbartop");this.legendbartop.addClass(this.toTP("jqx-scheduler-legend-bar-top"));this.legendbartop.addClass(this.toTP("jqx-scheduler-legend-bar"));this.legendbartop.addClass(this.toTP("jqx-widget-header"));this.schedulertable=null;if(this.localizestrings){this.localizestrings();if(this.localization!=null){this.localizestrings(this.localization,false)}}this._builddataloadelement();this._cachedcolumns=this.columns;var b=this.source.datafields;if(b==null&&this.source._source){b=this.source._source.datafields}if(b){for(var c=0;c<this.columns.length;c++){var d=this.columns[c];if(d&&d.cellsFormat&&d.cellsFormat.length>2){for(var j=0;j<b.length;j++){if(b[j].name==d.datafield&&!b[j].format){b[j].format=d.cellsFormat;break}}}}}this.databind(this.source);if(this.showToolbar){this.toolbar.css("visibility","inherit")}if(this.showLegend){this.legendbarbottom.css("visibility","inherit")}this.tableheight=null;var f=this;var h=function(){if(f.content){f.content[0].scrollTop=0;f.content[0].scrollLeft=0}if(f.schedulercontent){f.schedulercontent[0].scrollLeft=0;f.schedulercontent[0].scrollTop=0}};this.removeHandler(this.content,"scroll");this.removeHandler(this.content,"mousedown");this.addHandler(this.content,"scroll",function(l){h();return false});if(i!==true){this._render()}},_render:function(){var g=this;if(g.dataview==null){return}if(g._loading){return}if(g.columnsHeight!=25||g.columnGroups){g._measureElement("column")}g.rowinfo=new Array();g._removeHandlers();if(g.columns==null){g.columns=new a.jqx.schedulerDataCollection(g.element)}else{g._initializeColumns()}g.host.height(g.height);g.host.width(g.width);a.jqx.utilities.html(g.content,"");g.columnsheader=g.columnsheader||a('<div style="overflow: hidden;"></div>');g.columnsheader.remove();g.columnsheader.addClass(g.toTP("jqx-widget-header"));g.columnsheader.addClass(g.toTP("jqx-grid-header"));if(!g.showHeader){g.columnsheader.css("display","none")}else{if(g.columnsheader){g.columnsheader.css("display","block")}}g.schedulercontent=g.schedulercontent||a('<div style="width: 100%; overflow: hidden; position: absolute;"></div>');g.schedulercontent.remove();var e=g.columnsHeight;e=g._preparecolumnGroups();g.columnsheader.height(e);g.content.append(g.columnsheader);g.content.append(g.schedulercontent);g._rendercolumnheaders();g.tableheight=null;g.schedulercontent.find("#contenttable"+g.element.id).remove();if(g.table!=null){g.table.remove();g.table=null}if(g.pinnedtable!=null){g.pinnedtable.remove();g.pinnedtable=null}g.table=a('<div id="contenttable'+g.element.id+'" style="overflow: hidden; position: relative;"></div>');g.pinnedtable=a('<div id="contenttable2'+g.element.id+'" style="display: none; overflow: hidden; position: relative;"></div>');g.schedulercontent.addClass(g.toTP("jqx-grid-content"));g.schedulercontent.addClass(g.toTP("jqx-widget-content"));g.schedulercontent.append(g.table);if(g.tableRows==1){g.schedulercontent.append(g.pinnedtable)}g._renderrows();g._arrange();g._resourcesElements=new Array();var d=function(h,i){h.children().remove();var h=a("<div style='margin:5px; position: relative;'></div>").appendTo(h);g._resourcesElements[i]=new Array();a.each(g._resources,function(n){var l=g.getColors(n);var m=this.toString();var o=a("<div data-toggle='on' style='border-color: "+l.border+"; background: "+l.background+";' class='"+g.toThemeProperty("jqx-scheduler-legend")+"'></div>");o.appendTo(h);var k=a("<div class='"+g.toThemeProperty("jqx-scheduler-legend-label")+"'>"+m+"</div>");k.appendTo(h);g._resourcesElements[i][m]=o;var j=function(){if(o.attr("data-toggle")=="on"){g.hideAppointmentsByResource(m)}else{g.showAppointmentsByResource(m)}};g.addHandler(o,"mousedown",function(){j();return false});g.addHandler(k,"mousedown",function(){j();return false})})};d(g.legendbarbottom,"bottom");d(g.legendbartop,"top");if(g.legendPosition=="top"){g.legendbarbottom.hide()}else{g.legendbartop.hide()}if(g._resources.length==0){g.legendbarbottom.hide();g.legendbartop.hide()}if(g.renderToolBar){g.renderToolBar(g.toolbar)}else{g._renderToolBar()}if(g.disabled){g.host.addClass(g.toThemeProperty("jqx-fill-state-disabled"))}g._renderhorizontalscroll();g._addHandlers();g.clearSelection();var c=g._views[g._view].type;var f=g._views[g._view];var b=g.showAllDayRow;if(f.timeRuler&&(c==="dayView"||c==="weekView")){if(f.timeRuler.showAllDayRow!=undefined){b=f.timeRuler.showAllDayRow}}if(!b||(c!="dayView"&&c!="weekView")){g.focusedCell=g.rows[0].cells[0]}else{g.focusedCell=g.rows[1].cells[0]}g._lastSelectedCell=g.focusedCell;g._updateCellsSelection()},clear:function(){if(this.source){this.source.records=new Array();this.source.hierarchy=new Array()}this.dataview._filteredData=new Array();this.databind(null);this._render()},getAppointmentElement:function(e){var b=null;if(e.className.indexOf("jqx-scheduler-appointment")>=0&&e.className.indexOf("jqx-scheduler-appointment-inner-content")==-1&&e.className.indexOf("jqx-scheduler-appointment-content")==-1&&e.className.indexOf("jqx-scheduler-appointment-resize-indicator")==-1){b=e}var d=e;for(var c=0;c<4;c++){if(d.parentNode){if(d.className.indexOf("jqx-scheduler-appointment")>=0&&d.className.indexOf("jqx-scheduler-appointment-innter-content")==-1&&d.className.indexOf("jqx-scheduler-appointment-content")==-1&&d.className.indexOf("jqx-scheduler-appointment-resize-indicator")==-1){b=d}d=d.parentNode}else{break}}return b},getJQXAppointmentByElement:function(d){var f=this;var e=d.getAttribute?d.getAttribute("data-key"):d.attr("data-key");if(e.indexOf(".")>=0){var c=e.substring(0,e.indexOf("."));var h=e.substring(e.indexOf(".")+1);var g=f.appointmentsByKey[c];var b=g.jqxAppointment.renderedAppointments[e]}else{var g=f.appointmentsByKey[e];var b=g.jqxAppointment}return b},_renderToolBar:function(){var i=this;var b=a('<div style="width: 100%; height: 100%; position: relative;"></div>');var k=(this.toolbarHeight-20)/2;b.css("top",k);i.toolbarLeftButton=a('<div type="button" style="outline: none; padding: 0px; display: flex; justify-content: center; align-items: center; margin-left: 3px; margin-right: 3px; height: 24px; width: 27px; float: left;"></div>');i.toolbarRightButton=a('<div type="button" style="outline: none; padding: 0px; display: flex; justify-content: center; align-items: center; margin-right: 3px; width: 27px; height: 24px; float: left;"></div>');i.toolbarLeftButton.attr("title",i.schedulerLocalization.toolBarPreviousButtonString);i.toolbarRightButton.attr("title",i.schedulerLocalization.toolBarNextButtonString);i.toolbarRightButton.jqxButton({enableHover:false,enableDefault:false,enablePressed:false,cursor:"pointer",disabled:i.disabled,theme:i.theme});i.toolbarLeftButton.jqxButton({enableHover:false,enableDefault:false,enablePressed:false,cursor:"pointer",disabled:i.disabled,theme:i.theme});i.dateTimeInput=a('<div style="outline: none; padding: 0px; margin-top: 0px; margin-right: 3px; width: 27px; float: left;"></div>');i.toolbarLeftButton.find(".jqx-icon-arrow-left").remove();i.toolbarRightButton.find(".jqx-icon-arrow-right").remove();var e=a("<div style='outline: none;  width: 15px; height: 15px;'></div>");e.addClass(i.toThemeProperty("jqx-icon-arrow-left"));i.toolbarLeftButton.wrapInner(e);var j=a("<div style='outline: none; width: 15px; height: 15px;'></div>");j.addClass(i.toThemeProperty("jqx-icon-arrow-right"));i.toolbarRightButton.wrapInner(j);if(i.rtl){i.toolbarLeftButton.css("float","right");i.toolbarRightButton.css("float","right");i.dateTimeInput.css("float","right")}i.addHandler(i.toolbarRightButton,"mouseenter",function(){j.addClass(i.toThemeProperty("jqx-icon-arrow-right-hover"))});i.addHandler(i.toolbarLeftButton,"mouseenter",function(){e.addClass(i.toThemeProperty("jqx-icon-arrow-left-hover"))});i.addHandler(i.toolbarRightButton,"mouseleave",function(){j.removeClass(i.toThemeProperty("jqx-icon-arrow-right-hover"))});i.addHandler(i.toolbarLeftButton,"mouseleave",function(){e.removeClass(i.toThemeProperty("jqx-icon-arrow-left-hover"))});i.addHandler(i.toolbarRightButton,"mousedown",function(){j.addClass(i.toThemeProperty("jqx-icon-arrow-right-selected"))});i.addHandler(i.toolbarRightButton,"mouseup",function(){j.removeClass(i.toThemeProperty("jqx-icon-arrow-right-selected"))});i.addHandler(i.toolbarLeftButton,"mousedown",function(){e.addClass(i.toThemeProperty("jqx-icon-arrow-left-selected"))});i.addHandler(i.toolbarLeftButton,"mouseup",function(){e.removeClass(i.toThemeProperty("jqx-icon-arrow-left-selected"))});i.addHandler(a(document),"mouseup.pagerbuttons"+i.element.id,function(){j.removeClass(i.toThemeProperty("jqx-icon-arrow-right-selected"));e.removeClass(i.toThemeProperty("jqx-icon-arrow-left-selected"))});i.addHandler(i.toolbarRightButton,"click",function(){if(!i.toolbarRightButton.jqxButton("disabled")){if(!i.rtl){i.navigateForward()}else{i.navigateBackward()}i.focus()}});i.addHandler(i.toolbarLeftButton,"click",function(){if(!i.toolbarLeftButton.jqxButton("disabled")){if(!i.rtl){i.navigateBackward()}else{i.navigateForward()}i.focus()}});i.toolbar.children().remove();i.toolbar.append(b);if(!i.rtl){b.append(i.toolbarLeftButton);b.append(i.dateTimeInput);b.append(i.toolbarRightButton)}else{b.append(i.toolbarRightButton);b.append(i.dateTimeInput);b.append(i.toolbarLeftButton)}i.toolbarDetails=a('<div class="'+i.toTP("jqx-scheduler-toolbar-details")+'" style="margin-left: 7px; margin-top:2px; float: left;"></div>');i.toolbarViews=a('<div style="margin-right: 10px; margin-top:0px; float: right;"></div>');if(i.rtl){i.toolbarDetails.css("float","right");i.toolbarDetails.css("margin-left","0px");i.toolbarDetails.css("margin-right","7px");i.toolbarViews.css("margin-left","10px");i.toolbarViews.css("margin-right","0px");i.toolbarViews.css("float","left")}var h=new Array();if(!i.rtl){h.push(i.toolbarLeftButton);h.push(i.dateTimeInput);h.push(i.toolbarRightButton)}else{h.push(i.toolbarRightButton);h.push(i.dateTimeInput);h.push(i.toolbarLeftButton)}var l=i._views.length-1;a.each(i._views,function(p){var q="";var n=p;if(i.rtl){n=l-p}if(i._views[n].text!=undefined){q=i._views[n].text}else{switch(i._views[n].type){case"dayView":q=i.schedulerLocalization.dayViewString;break;case"weekView":q=i.schedulerLocalization.weekViewString;break;case"monthView":q=i.schedulerLocalization.monthViewString;break;case"agendaView":q=i.schedulerLocalization.agendaViewString;break;case"timelineDayView":q=i.schedulerLocalization.timelineDayViewString;break;case"timelineWeekView":q=i.schedulerLocalization.timelineWeekViewString;break;case"timelineMonthView":q=i.schedulerLocalization.timelineMonthViewString;break}}var o='<span data-type="'+i._views[n].type+'" style="cursor: pointer; outline: none; margin-left: -1px; position: relative;">'+q+"</span>";var m=a(o);m.addClass(i.toTP("jqx-group-button-normal jqx-button jqx-fill-state-normal"));h.push(m);if(n==0){if(!i.rtl){m.addClass(i.toTP("jqx-rc-l"))}else{m.addClass(i.toTP("jqx-rc-r"))}}if(n==i._views.length-1){if(!i.rtl){m.addClass(i.toTP("jqx-rc-r"))}else{m.addClass(i.toTP("jqx-rc-l"))}}if(n===i._view){m.addClass(i.toTP("jqx-fill-state-pressed"))}m.mouseenter(function(){m.addClass(i.toTP("jqx-fill-state-hover"))});m.mouseleave(function(){m.removeClass(i.toTP("jqx-fill-state-hover"))});m.mousedown(function(){i._setView(n);i.focus()});a(i.toolbarViews).append(m)});b.append(i.toolbarDetails);b.append(i.toolbarViews);if(i._views.length<2){i.toolbarViews.hide()}i.dateTimeInput.jqxDateTimeInput({dropDownWidth:220,dropDownHeight:220,rtl:i.rtl,localization:i._getDateTimeInputLocalization(),firstDayOfWeek:i.schedulerLocalization.firstDay,todayString:i.schedulerLocalization.todayString,clearString:i.schedulerLocalization.clearString,showFooter:true,height:25,width:25,renderMode:"simple"});i.addHandler(i.dateTimeInput,"change",function(m){if(!i.fromNavigate){i.navigateTo(new a.jqx.date(m.args.date,i.timeZone));i.focus()}});i.tabKeyElements=h;var g=i._views[i._view].type;var d=function(m){var o=a.jqx.formatDate(i.getViewStart().toDate(),m,i.schedulerLocalization);var n=a.jqx.formatDate(i.getViewEnd().toDate(),m,i.schedulerLocalization);if(g==="dayView"||g==="timelineDayView"){i.toolbarDetails.html(o)}else{i.toolbarDetails.html(o+" - "+n)}if(i.rtl){i.toolbarDetails.addClass("jqx-rtl");i.toolbarDetails.html("<span style='direction:rtl;'>"+n+"<span> - <span style='direction:rtl;'>"+o+"</span>")}else{i.toolbarDetails[0].style.direction="ltr"}};d(i.toolBarRangeFormat);var c=i.toolbarViews.width()+i.toolbarDetails.width()+120;var f=i.toolBarRangeFormat;if(c>i.host.width()){f=i.toolBarRangeFormatAbbr;d(f);var c=i.toolbarViews.width()+i.toolbarDetails.width()+120;if(c>i.host.width()){i.toolbarDetails.hide();var c=i.toolbarViews.width()+120;if(c>i.host.width()){i.toolbarViews.hide()}}}else{i.currentToolbarFormat=i.toolBarRangeFormat}},_setView:function(g){var f=this;f.toolbarViews.find(".jqx-fill-state-pressed").removeClass(f.toTP("jqx-fill-state-pressed"));if(!f.rtl){a(f.toolbarViews.children()[g]).addClass(f.toTP("jqx-fill-state-pressed"))}else{a(f.toolbarViews.children()[f._views.length-1-g]).addClass(f.toTP("jqx-fill-state-pressed"))}if(f._view===g){return}var b=f.vScrollBar[0].style.visibility;if(b){if(!f._scrollPosition){f._scrollPosition=new Array()}f._scrollPosition[f._view]=f.vScrollInstance.value}var c=f.hScrollBar[0].style.visibility;if(c){if(!f._hscrollPosition){f._hscrollPosition=new Array()}f._hscrollPosition[f._view]=f.hScrollInstance.value}var i=f._views[f._view].type;var e=f._views[g].type;f._view=g;f._refreshColumns();f.refresh();var h=f.hScrollBar[0].style.visibility;if(c!==h){f._renderrows();f._updateTouchScrolling()}if(f._scrollPosition[f._view]){f.vScrollInstance.setPosition(f._scrollPosition[f._view])}if(f._hscrollPosition[f._view]){f.hScrollInstance.setPosition(f._hscrollPosition[f._view])}if(f.selectedJQXAppointment){f._ensureAppointmentVisible(f.selectedJQXAppointment)}var d=f.getViewStart();var j=a.jqx.scheduler.utilities.getEndOfDay(f.getViewEnd());f._raiseEvent("viewChange",{date:f.date,from:d,to:j,oldViewType:i,newViewType:e})},_getDateTimeInputLocalization:function(){var b=this;var c={};c.backString=b.schedulerLocalization.backString;c.forwardString=b.schedulerLocalization.forwardString;c.todayString=b.schedulerLocalization.todayString;c.clearString=b.schedulerLocalization.clearString;c.calendar=b.schedulerLocalization;return c},setView:function(b){switch(b){case"dayView":this._setView(0);break;case"weekView":this._setView(1);break;case"monthView":this._setView(2);break;case"timelineDayView":this._setView(3);break;case"timelineWeekView":this._setView(4);break;case"timelineMonthView":this._setView(5);break}this.view=b},navigateForward:function(){var d=this;var h=this._views[this._view].type;var i=this._views[this._view];var c=new a.jqx.date(this.date,d.timeZone);var j=function(){while((c.dayOfWeek()==0||c.dayOfWeek()==6)&&false===i.showWeekends){c=c.addDays(1)}return c};switch(h){case"dayView":case"timelineDayView":c=c.addDays(1);c=j();break;case"weekView":case"timelineWeekView":c=c.addDays(7);break;case"monthView":case"timelineMonthView":var g=c.day();var e=c.month();var f=c.year();var b=new a.jqx.date(f,e,1);b.timeZone=d.timeZone;c=b.addMonths(1);break;case"agendaView":if(i.days){c=c.addDays(i.days)}else{c=c.addDays(7)}break}return this.navigateTo(c)},navigateBackward:function(){var d=this;var h=this._views[this._view].type;var i=this._views[this._view];var c=new a.jqx.date(this.date,d.timeZone);var j=function(){while((c.dayOfWeek()==0||c.dayOfWeek()==6)&&false===i.showWeekends){c=c.addDays(-1)}return c};switch(h){case"dayView":case"timelineDayView":c=c.addDays(-1);c=j();break;case"weekView":case"timelineWeekView":c=c.addDays(-7);break;case"monthView":case"timelineMonthView":var g=c.day();var e=c.month();var f=c.year();var b=new a.jqx.date(f,e,1);b.timeZone=d.timeZone;c=b.addMonths(-1);break;case"agendaView":if(i.days){c=c.addDays(-i.days)}else{c=c.addDays(-7)}break}return this.navigateTo(c)},_refreshToolBar:function(d){var f=this;var g=f.getViewStart();var e=f.getViewEnd();var c=function(i){var l=a.jqx.formatDate(g.toDate(),i,f.schedulerLocalization);var j=a.jqx.formatDate(e.toDate(),i,f.schedulerLocalization);var h=f._views[f._view].type;var k=f._views[f._view];if(k.showWeekends===false){if(g.dayOfWeek()==0||g.dayOfWeek()==6){g=g.addDays(1)}if(g.dayOfWeek()==0||g.dayOfWeek()==6){g=g.addDays(1)}if(e.dayOfWeek()==0||e.dayOfWeek()==6){e=e.addDays(-1)}if(e.dayOfWeek()==0||e.dayOfWeek()==6){e=e.addDays(-1)}var l=a.jqx.formatDate(g.toDate(),i,f.schedulerLocalization);var j=a.jqx.formatDate(e.toDate(),i,f.schedulerLocalization)}if(h==="dayView"||h==="timelineDayView"){f.toolbarDetails.html(l)}else{f.toolbarDetails.html(l+" - "+j)}if(f.rtl){f.toolbarDetails.addClass("jqx-rtl");f.toolbarDetails.html("<span style='direction:rtl;'>"+j+"<span> - <span style='direction:rtl;'>"+l+"</span>")}else{f.toolbarDetails[0].style.direction="ltr"}};if(d){c(f._lastFormatString||f.toolBarRangeFormat);return}c(f.toolBarRangeFormat);f.toolbarDetails.show();f.toolbarViews.show();var b=f.toolbarViews.width()+f.toolbarDetails.width()+120;if(b>f.host.width()){c(f.toolBarRangeFormatAbbr);var b=f.toolbarViews.width()+f.toolbarDetails.width()+120;if(b>f.host.width()){f.toolbarDetails.hide();var b=f.toolbarViews.width()+120;if(b>f.host.width()){f.toolbarViews.hide()}}}},navigateTo:function(b){var d=this;if(a.type(b)=="date"){b=new a.jqx.date(b)}if(b<this.min){return}if(b>this.max){return}b.timeZone=d.timeZone;d.date=b;d._refreshToolBar(true);d.fromNavigate=true;d.dateTimeInput.val(b.toDate());d.fromNavigate=false;d._refreshColumnTitles();d._renderrows();d._updateFocusedCell();if(d.resources){d._renderhorizontalscroll()}var e=d.getViewStart();var c=a.jqx.scheduler.utilities.getEndOfDay(d.getViewEnd());d._raiseEvent("dateChange",{date:b,from:e,to:c})},_preparecolumnGroups:function(){var n=this.columnsHeight;if(this.columnGroups){this.columnshierarchy=new Array();if(this.columnGroups.length){var l=this;for(var f=0;f<this.columnGroups.length;f++){this.columnGroups[f].parent=null;this.columnGroups[f].groups=null}for(var f=0;f<this.columns.records.length;f++){this.columns.records[f].parent=null;this.columns.records[f].groups=null}var m=function(j){for(var s=0;s<l.columnGroups.length;s++){var t=l.columnGroups[s];if(t.name===j){return t}}return null};for(var f=0;f<this.columnGroups.length;f++){var o=this.columnGroups[f];if(!o.groups){o.groups=null}if(o.parentGroup){o.parentgroup=o.parentGroup}if(o.parentgroup){var q=m(o.parentgroup);if(q){o.parent=q;if(!q.groups){q.groups=new Array()}if(q.groups.indexOf(o)===-1){q.groups.push(o)}}}}for(var f=0;f<this.columns.records.length;f++){var o=this.columns.records[f];if(o.columngroup){var q=m(o.columngroup);if(q){if(!q.groups){q.groups=new Array()}o.parent=q;if(q.groups.indexOf(o)===-1){q.groups.push(o)}}}}var p=0;for(var f=0;f<this.columns.records.length;f++){var o=this.columns.records[f];var c=o;o.level=0;while(c.parent){c=c.parent;o.level++}var c=o;var b=o.level;p=Math.max(p,o.level);while(c.parent){c=c.parent;if(c){c.level=--b}}}var k=function(w){var v=new Array();if(w.columngroup){v.push(w)}if(!w.groups){return new Array()}for(var u=0;u<w.groups.length;u++){if(w.groups[u].columngroup){v.push(w.groups[u])}else{if(w.groups[u].groups){var t=k(w.groups[u]);for(var s=0;s<t.length;s++){v.push(t[s])}}}}return v};for(var f=0;f<this.columnGroups.length;f++){var o=this.columnGroups[f];var d=k(o);o.columns=d;var g=new Array();var r=0;for(var e=0;e<d.length;e++){g.push(this.columns.records.indexOf(d[e]));if(d[e].pinned){r++}}if(r!=0){throw new Error("jqxScheduler: Column Groups initialization Error. Please, check the initialization of the jqxScheduler's columns array. The columns in a column group cannot be pinned.")}g.sort(function(j,i){j=parseInt(j);i=parseInt(i);if(j<i){return -1}if(j>i){return 1}return 0});for(var h=1;h<g.length;h++){if(g[h]!=g[h-1]+1){throw new Error("jqxScheduler: Column Groups initialization Error. Please, check the initialization of the jqxScheduler's columns array. The columns in a column group are expected to be siblings in the columns array.");this.host.remove()}}}}this.columnGroupslevel=1+p;n=this.columnGroupslevel*this.columnsHeight}return n},wheel:function(d,c){if(c.editRecurrenceDialog&&c.editRecurrenceDialog.jqxWindow("isOpen")){return true}if(c._editDialog&&c._editDialog.jqxWindow("isOpen")){return true}if(c.autoheight&&c.hScrollBar.css("visibility")=="hidden"){d.returnValue=true;return true}var e=0;if(!d){d=window.event}if(d.originalEvent&&d.originalEvent.wheelDelta){d.wheelDelta=d.originalEvent.wheelDelta}if(d.wheelDelta){e=d.wheelDelta/120}else{if(d.detail){e=-d.detail/3}}if(e){var b=c._handleDelta(e);if(b){if(d.preventDefault){d.preventDefault()}if(d.originalEvent!=null){d.originalEvent.mouseHandled=true}if(d.stopPropagation!=undefined){d.stopPropagation()}}if(b){b=false;d.returnValue=b;return b}else{return false}}if(d.preventDefault){d.preventDefault()}d.returnValue=false},_handleDelta:function(d){if(this.vScrollBar.css("visibility")!="hidden"){var c=this.vScrollInstance.value;if(d<0){this.vScrollInstance.setPosition(this.vScrollInstance.value+2*10)}else{this.vScrollInstance.setPosition(this.vScrollInstance.value-2*10)}var b=this.vScrollInstance.value;if(c!=b){return true}}else{if(this.hScrollBar.css("visibility")!="hidden"){var c=this.hScrollInstance.value;if(d>0){if(this.hScrollInstance.value>2*10){this.hScrollInstance.setPosition(this.hScrollInstance.value-2*10)}else{this.hScrollInstance.setPosition(0)}}else{if(this.hScrollInstance.value<this.hScrollInstance.max){this.hScrollInstance.setPosition(this.hScrollInstance.value+2*10)}else{this.hScrollInstance.setPosition(this.hScrollInstance.max)}}var b=this.hScrollInstance.value;if(c!=b){return true}}}return false},_removeHandlers:function(){var e=this;if(e._mousewheelfunc){e.removeHandler(this.host,"mousewheel",e._mousewheelfunc)}e.removeHandler(a(document),"keydown.scheduler"+e.element.id);e.removeHandler(e.host,"focus");e.removeHandler(e.host,"blur");e.removeHandler(e.host,"dragstart."+e.element.id);e.removeHandler(e.host,"selectstart."+e.element.id);e.removeHandler(a(window),"jqxReady."+e.element.id);e.removeHandler(e.host,"mousewheel",e._mousewheelfunc);var d="mousedown";if(e.isTouchDevice()){d=a.jqx.mobile.getTouchEventName("touchstart");if(a.jqx.browser.msie&&a.jqx.browser.version<10){d="mousedown"}}if(e.table){e.removeHandler(e.table,"mouseleave")}var c="mousemove.scheduler"+e.element.id;var f="mouseup.scheduler"+e.element.id;if(e.isTouchDevice()&&e.touchMode!==true){c=a.jqx.mobile.getTouchEventName("touchmove")+".scheduler"+e.element.id;f=a.jqx.mobile.getTouchEventName("touchend")+".scheduler"+e.element.id}e.removeHandler(a(document),c);e.removeHandler(a(document),f);if(!e.isTouchDevice()){try{if(document.referrer!=""||window.frameElement){if(window.top!=null&&window.top!=window.self){var g=null;if(window.parent&&document.referrer){g=document.referrer}if(g&&g.indexOf(document.location.host)!=-1){e.removeHandler(a(window.top.document),"mouseup.jqxscheduler"+e.element.id)}}}}catch(b){}}e.removeHandler(e.host,c);e.removeHandler(a(document),"keydown.jqxscheduler"+e.element.id);e.removeHandler(e.host,"keydown");if(e.table){e.removeHandler(e.table,"dblclick");e.removeHandler(e.pinnedtable,d);e.removeHandler(e.table,d)}},selectAppointment:function(b){if(this.appointmentsByKey[b]){this._selectAppointment(this.appointmentsByKey[b].jqxAppointment)}},_selectAppointment:function(d,i,f){if(!d){return}var h=this;if(h.selectedAppointment){h.clearAppointmentsSelection()}var e=d.id;var c=a('[data-key="'+e+'"]');if(c.length>0){h.selectedJQXAppointment=d;if(!i){h.selectedAppointment=a(c[0])}else{h.selectedAppointment=a(i)}var b=h._views[h._view].type;var g=h._views[h._view];if(b=="agendaView"){h.clearSelection();return}c.addClass(h.toTP("jqx-scheduler-selected-appointment"));if(d.resizable){c.find(".jqx-scheduler-appointment-resize-indicator").show()}switch(b){case"dayView":a(c).find(".jqx-scheduler-appointment-left-resize-indicator").hide();a(c).find(".jqx-scheduler-appointment-right-resize-indicator").hide();break;case"weekView":break;case"monthView":case"timeLineMonthView":case"timeLineDayView":case"timeLineWeekView":if(c.length>1){a.each(c,function(j){if(!h.rtl){if(j>0){a(this).find(".jqx-scheduler-appointment-left-resize-indicator").hide()}if(j<c.length-1){a(this).find(".jqx-scheduler-appointment-right-resize-indicator").hide()}}else{if(j>0){a(this).find(".jqx-scheduler-appointment-right-resize-indicator").hide()}if(j<c.length-1){a(this).find(".jqx-scheduler-appointment-left-resize-indicator").hide()}}})}break}if(f=="mouse"){h.clearSelection();return}}h.clearSelection()},clearAppointmentsSelection:function(){var d=this;if(d.selectedAppointment){var c=d.selectedAppointment.attr("data-key");var b=a('[data-key="'+c+'"]');b.removeClass(d.toTP("jqx-scheduler-selected-appointment"));b.find(".jqx-scheduler-appointment-resize-indicator").hide();d.selectedAppointment=null;d.selectedJQXAppointment=null}},selectCell:function(b,l,k){var f=this;var m=b.toDate();for(var e=0;e<f.rows.length;e++){for(var d=0;d<f.rows[e].cells.length;d++){var h=f.rows[e].cells[d];if(k){if(h.getAttribute("data-view")!==k){continue}}var g=h.getAttribute("data-date");var c=f._getDateByString(g);if(l&&h.getAttribute("data-end-date")){if(c.valueOf()==b.valueOf()){h.setAttribute("data-selected","true");f.focusedCell=h;f._lastSelectedCell=h;f._updateCellsSelection();f._ensureVisible(f.focusedCell);return}}else{if(!l&&h.getAttribute("data-end-date")){continue}}if(c.valueOf()==m.valueOf()){h.setAttribute("data-selected","true");f.focusedCell=h;f._lastSelectedCell=h;f._updateCellsSelection();f._ensureVisible(f.focusedCell);return}}}f._updateCellsSelection()},selectRange:function(l,m,p,o){var h=this;if(l<this.min){l=this.min}if(m>this.max){m=this.max}var e=l.toDate();var c=m.toDate();var f=false;for(var g=0;g<h.rows.length;g++){for(var d=0;d<h.rows[g].cells.length;d++){var n=h.rows[g].cells[d];if(o){if(n.getAttribute("data-view")!==o){continue}}var k=n.getAttribute("data-date");var b=h._getDateByString(k);if(p&&n.getAttribute("data-end-date")){if(b.valueOf()>=e.valueOf()&&b.valueOf()<=c.valueOf()){n.setAttribute("data-selected","true")}}else{if(!p&&n.getAttribute("data-end-date")){continue}}if(b.valueOf()>=e.valueOf()&&b.valueOf()<=c.valueOf()){n.setAttribute("data-selected","true");if(!f){h._lastSelectedCell=n;h.focusedCell=n;f=true}}}}h._updateCellsSelection()},_selectRange:function(b,q){var h=this;if(h._views[h._view].type=="agendaView"){return}var k=b;var u=q.getAttribute("data-view");if(b.getAttribute("data-view")!==u){return}var p=q.getAttribute("data-date");var m=k.getAttribute("data-date");if(null==p||null==m){return}var B=q.getAttribute("data-end-date");var E=k.getAttribute("data-end-date");var G=B!=null||E!=null;var r=B!=null&&E!=null;var t=h._getDateByString(p);var s=h._getDateByString(m);if(t<this.min.toDate()){t=this.min.toDate()}if(s<this.min.toDate()){s=this.min.toDate()}if(t>this.max.toDate()){t=this.max.toDate()}if(s>this.max.toDate()){s=this.max.toDate()}var v=Math.min(t,s);var z=Math.max(t,s);var o=h.rows;var f=0;var e=0;if(f>0&&h.rtl){f=0;e=1}var d=o.length;if(G){d=1;if(b.getAttribute("data-end-date")==null){s.setHours(0,0,0,0);var A=new a.jqx.date(s,h.timeZone).toString();var D=a(k).parent().index();a.each(o[0].cells,function(){var i=this.getAttribute("data-date");if(i===A){b=this;r=q.getAttribute("data-end-date")!=null&&b.getAttribute("data-end-date")!=null;var H=q.getAttribute("data-date");var j=b.getAttribute("data-date");var J=h._getDateByString(H);var I=h._getDateByString(j);v=Math.min(J,I);z=Math.max(J,I);return false}})}}for(var y=0;y<d;y++){var g=o[y];if(G&&this.tableRows>1){var x=parseInt(b.getAttribute("data-view"));var l=o.length/h.tableRows;var n=(-1+x)*l;c=o[n];g=o[n]}var c=g.cells;for(var w=f;w<c.length-e;w++){if(c[w].getAttribute("data-view")!==u){continue}c[w].removeAttribute("data-selected");if(!r&&c[w].getAttribute("data-end-date")){continue}var F=c[w].getAttribute("data-date");var C=h._getDateByString(F).valueOf();if(v<=C&&C<=z){c[w].setAttribute("data-selected","true")}}}h._updateCellsSelection()},findCell:function(s,p){var k=this;var l=null;if(!k._tableOffset){var c=k.schedulercontent.coord();k._tableOffset=c}var g=k._tableOffset;var e=g.top;var n=g.left;if(p<e){return null}if(s<n){return null}if(p>e+k._hostHeight){return null}if(s>n+k._hostWidth){return null}var q=false;var r=k.rows;var o=k._views[k._view];var t=o.type;var D=0;var m=k.vScrollInstance.value;var u=k.hScrollInstance.value;for(var B=0;B<r.length;B++){if(q){break}var h=r[B];var d=h.cells;var z=false;if(B==0&&t=="dayView"||t=="weekView"){z=k.showAllDayRow;if(o.timeRuler&&(t==="dayView"||t==="weekView")){if(o.timeRuler.showAllDayRow!=undefined){z=o.timeRuler.showAllDayRow}}if(z){D=k._allDayRowFullHeight}}for(var C=0;C<d.length;C++){var b=d[C];if(C==0&&b.getAttribute("data-time-slot")){continue}if(!b._left){var f=b.offsetLeft+n;var v=b.offsetTop+e;var A=b.offsetWidth;var w=b.offsetHeight;b._left=f;b._top=v;b._width=A;b._height=w}else{var f=b._left;var v=b._top;var A=b._width;var w=b._height}b._left=f;b._top=v;b._width=A;b._height=w;if(A===0||w===0){continue}if(!k.rtl){f-=u}else{if(k.hScrollInstance.element.style.visibility!="hidden"){f-=(k.hScrollInstance.max-u)}}v-=m;if(B==0&&z){v+=m}if(v<=p&&p<v+w){if(f<=s&&s<f+A){l=b;q=true;break}}else{break}}}return l},_removeFeedbackAndStopResize:function(){var d=this;if(!d.feedback){return}d.feedback.remove();d.feedback=null;d.pinnedfeedback.remove();d.pinnedfeedback=null;if(d.feedbacks){for(var c=0;c<d.feedbacks.length;c++){d.feedbacks[c].remove()}}d._resizeDays=0;d._resizeStep=0;d._lastX=null;d.feedbacks=new Array();d.leftResize=false;d.rightResize=false;d.topResize=false;d.bottomResize=false;d.overlay.hide();d.resizing=false;d.resizeFrom=null;d._dragCell=null;d._dragStartCell=null;d.resizeTo=null;d.dragOrResize=false;d.isMouseDown=false;if(d.selectedJQXAppointment){var b=a('[data-key="'+d.selectedJQXAppointment.id+'"]');b.removeClass(d.toTP("jqx-scheduler-feedback-appointment jqx-disableselect"))}if(d.openedMonthCellPopup){d.openedMonthCellPopup.remove()}},_saveChangesAfterDragOrResize:function(e,b,r,m){var l=this;if(e===false){if(!b.isException()){if(!b.rootAppointment.recurrenceException){b.rootAppointment.recurrenceException=new Array()}if(b.rootAppointment!=null){b.rootAppointment.exceptions.push(b);b.rootAppointment.recurrenceException.push(b.occurrenceFrom)}else{b.exceptions.push(b);b.recurrenceException.push(b.occurrenceFrom)}}else{var d=b.rootAppointment?b.rootAppointment.exceptions:b.exceptions;for(var h=0;h<d.length;h++){if(d[h].occurrenceFrom.equals(b.occurrenceFrom)){d[h]=b;break}}}}else{if(e===true){if(b.isException()){var d=b.rootAppointment?b.rootAppointment.exceptions:b.exceptions;for(var h=0;h<d.length;h++){if(d[h].occurrenceFrom.equals(b.occurrenceFrom)){for(var g=0;g<b.rootAppointment.recurrenceException.length;g++){if(b.rootAppointment.recurrenceException[g].equals(d[h].occurrenceFrom)){var q=b.from;var f=new a.jqx.date(d[h].occurrenceFrom.year(),d[h].occurrenceFrom.month(),d[h].occurrenceFrom.day(),b.from.hour(),b.from.minute(),b.from.second());b.rootAppointment.recurrenceException[g]=f;break}}d[h]=b;var q=b.from;var f=new a.jqx.date(d[h].occurrenceFrom.year(),d[h].occurrenceFrom.month(),d[h].occurrenceFrom.day(),b.from.hour(),b.from.minute(),b.from.second());d[h].occurrenceFrom=f;break}}}if(b.rootAppointment!=null){b.rootAppointment.recurrencePattern=b.rootAppointment.recurrencePattern.createNewPattern();var p=b.rootAppointment.from;var n=b.rootAppointment.duration();var c=b.rootAppointment.recurrencePattern.freq;var f=null;switch(c){case"daily":f=new a.jqx.date(p.year(),p.month(),p.day(),b.from.hour(),b.from.minute(),b.from.second());break;case"weekly":f=new a.jqx.date(p.year(),p.month(),p.day(),b.from.hour(),b.from.minute(),b.from.second());break;case"monthly":f=new a.jqx.date(p.year(),p.month(),p.day(),b.from.hour(),b.from.minute(),b.from.second());break;case"yearly":f=new a.jqx.date(p.year(),p.month(),p.day(),b.from.hour(),b.from.minute(),b.from.second());break}if(m){b.rootAppointment.from=p;b.rootAppointment.to=p.add(b.duration())}else{b.rootAppointment.from=f;b.rootAppointment.to=f.add(n)}b.rootAppointment.allDay=b.allDay;b.rootAppointment.resourceId=b.resourceId;b.rootAppointment.color=b.color;b.rootAppointment.borderColor=b.borderColor;b.rootAppointment.background=b.background;b.rootAppointment.timezone=b.timezone;b.rootAppointment.subject=b.subject;b.rootAppointment.description=b.description;b.rootAppointment.location=b.location;b.rootAppointment.category=b.category;b.rootAppointment.status=b.status;if(!l.resizing){b.rootAppointment.recurrencePattern.setFrom(f)}else{b.rootAppointment.recurrencePattern.setFrom(p)}}else{b.recurrencePattern=b.recurrencePattern.createNewPattern();b.recurrencePattern.setFrom(b.from)}var o=a(r).attr("data-view");var k=l._resources[parseInt(o)-1];if(k!=null){if(b.rootAppointment!=null){b.rootAppointment.resourceId=k}else{b.resourceId=k}}}}},_handleMouseUp:function(k,i,g){var f=this;clearInterval(f._verticalIntervalDragVelocity);clearInterval(f._horizontalIntervalDragVelocity);clearInterval(f._intervalDrag);clearInterval(f._horizontalIntervalDrag);var b=k;var j=false;if(!g){if(f._dragStartCell==i){j=true}}else{if(f.resizeTo){if(b.to.equals(f.resizeTo)){j=true}}else{if(f.resizeFrom){if(b.from.equals(f.resizeFrom)){j=true}}}}if(j){var h=a('[data-key="'+k.id+'"]');h.removeClass(f.toTP("jqx-scheduler-feedback-appointment jqx-disableselect"));f._removeFeedbackAndStopResize();return}var d=b.duration();var c=b.duration().days()>=1||b.allDay;var e=function(t,q){if(q.allDay||c){var w=f.getMaxAllDayAppointments(f.appointmentsToRender)}if(g){if(f.resizeTo){if(f.resizeTo>f.max){f.resizeTo=f.max}if(f.resizeTo<f.min){f.resizeTo=f.min}q.to=f.resizeTo}else{if(f.resizeFrom){if(f.resizeFrom>f.max){f.resizeFrom=f.max}if(f.resizeFrom<f.min){f.resizeFrom=f.min}q.from=f.resizeFrom}}if(q.from.hour()==0&&q.from.minute()==0&&q.to.hour()==23&&q.to.minute()==59){q.allDay=true}}else{var x=f._views[f._view].type;var u=f._views[f._view];var C=a(i).attr("data-date");var D=a(i).attr("data-end-date")!=null;var o=new a.jqx.date(C,f.timeZone);if(o<f.min){o=f.min}if(o>f.max){o=f.max}if(f.rtl&&c&&D){q.to=a.jqx.scheduler.utilities.getEndOfDay(o)}else{if(f.rtl&&(x=="monthView"||x=="timelineMonthView")){q.to=a.jqx.scheduler.utilities.getEndOfDay(o)}else{if(f.rtl&&(x=="timelineDayView"||x=="timelineWeekView")){var n=f.getMinutesPerScale();q.to=o.addMinutes(n)}else{q.from=o}}}if(x==="dayView"||x==="weekView"){if(!c&&!D){q.to=o.add(d);q.allDay=false}else{if(!c&&D){q.to=a.jqx.scheduler.utilities.getEndOfDay(o);q.allDay=true}else{if(c&&D&&!f.rtl){q.to=o.add(d);if(q.from.hour()==0&&q.from.minute()==0&&q.to.hour()==23&&q.to.minute()==59){q.allDay=true}}else{if(c&&D&&f.rtl){q.from=a.jqx.scheduler.utilities.getStartOfDay(q.to.add(new a.jqx.timeSpan(-d)));if(q.from.hour()==0&&q.from.minute()==0&&q.to.hour()==23&&q.to.minute()==59){q.allDay=true}}else{if(c&&!D){var A=30;var E=u.timeRuler&&u.timeRuler.scale;switch(E){case"sixtyMinutes":case"hour":A=60;break;case"fifteenMinutes":case"quarterHour":A=15;break;case"tenMinutes":A=10;break;case"fiveMinutes":A=5;break}q.to=o.addMinutes(A);q.allDay=false}}}}}}else{if(x==="monthView"){if(!f.rtl){q.to=o.add(d)}else{q.from=a.jqx.scheduler.utilities.getStartOfDay(q.to.add(new a.jqx.timeSpan(-d)))}}else{if(x==="timelineDayView"||x==="timelineWeekView"||x==="timelineMonthView"){if(!f.rtl){q.to=o.add(d)}else{if(x=="timelineMonthView"){q.from=a.jqx.scheduler.utilities.getStartOfDay(q.to.add(new a.jqx.timeSpan(-d)))}else{var n=f.getMinutesPerScale();q.from=o.addMinutes(n).add(new a.jqx.timeSpan(-d))}}}}}}f._saveChangesAfterDragOrResize(t,q,i,f.resizing);var x=a(i).attr("data-view");var y=f._resources[parseInt(x)-1];if(y!=null){q.resourceId=y}f.resizing=false;f.resizeFrom=null;f._dragCell=null;f.resizeTo=null;var p={};var v={};for(var F in f.appointmentDataFields){var m=f.appointmentDataFields[F];var z=q[F];p[F]=z;if(F=="from"||F=="to"){z=z.toDate()}v[m]=z}p.jqxAppointment=q;p.originalData=v;q.boundAppointment=p;f._raiseEvent("appointmentChange",{appointment:q.boundAppointment});f.changedAppointments[q.id]={type:"Update",appointment:q.boundAppointment};f.table.find(".jqx-icon-arrow-down").hide();if(f._views[f._view].type=="monthView"&&f._views[f._view].monthRowAutoHeight){f._renderrows()}else{if((f._views[f._view].type=="weekView"||f._views[f._view].type=="dayView")&&(q.allDay||c)){if(f.tableRows>1){f._renderrows()}else{var s=f.getViewStart();var r=a.jqx.scheduler.utilities.getEndOfDay(f.getViewEnd());f._prepareAppointmentsInView(s,r);f._renderAppointments(s,r);var l=f.getMaxAllDayAppointments(f.appointmentsToRender);if(l!=w){var B=l*(f._defaultRowHeight-2);if(f.isTouchDevice()){B=Math.max(22+f._defaultRowHeight,17+B)}else{B=Math.max(3*f._defaultRowHeight,17+B)}if(f.tableRows==1){a(a(f.table[0].rows[0]).find("td")).css("height",B+"px")}else{a(a(f.table[0].rows[1]).find("td")).css("height",B+"px")}a(f.oldRow).find("td").css("height",B+"px");a(f.pinnedTableRow).find("td").css("height",B+"px");f.pinnedtable.height(B);f._updateScrollbars(f._hostHeight?f._hostHeight:f.host.height())}}}else{var s=f.getViewStart();var r=a.jqx.scheduler.utilities.getEndOfDay(f.getViewEnd());f._prepareAppointmentsInView(s,r);f._renderAppointments(s,r)}}f._removeFeedbackAndStopResize()};if(b.isRecurrentAppointment()){e(false,b)}else{e(null,b)}},_handleDayWeekViewResize:function(E,D,h,F,n){var C=this;var f=C._views[C._view].type;var B=C._views[C._view];var r=n.duration().days()>=1||n.allDay;if(!r&&!h.getAttribute("data-end-date")){var e=function(i){if(i<10){return false}return true};var j=C.findCell(C.feedback.coord().left,D);if(C.topResize){if(!C._lastResizeY){C._lastResizeY=C.mouseDownPosition.top}if(D>C._lastResizeY+a(h).height()/2){var v=C.selectedAppointmentTableBounds.height+C.selectedAppointmentTableBounds.top-F.top-a(h).height()-3;if(e(v)){C.feedback.css("top",2+F.top+a(h).height());C.feedback.height(v);C._lastResizeY=C.feedback.coord().top;var M=new a.jqx.date(j.getAttribute("data-date"),C.timeZone);C.resizeFrom=M.addMinutes(C.getMinutesPerScale())}}else{if(D<C._lastResizeY-a(h).height()/2){var v=C.selectedAppointmentTableBounds.height+C.selectedAppointmentTableBounds.top-F.top-3;if(e(v)){C.feedback.css("top",2+F.top);C.feedback.height(v);C._lastResizeY=C.feedback.coord().top;C.resizeFrom=new a.jqx.date(j.getAttribute("data-date"),C.timeZone)}}}}else{if(C.bottomResize){if(!C._lastResizeY){C._lastResizeY=C.mouseDownPosition.top}if(D>C._lastResizeY+a(h).height()/2){var G=-5+a(h).height()+F.top-C.selectedAppointmentTableBounds.height-C.selectedAppointmentTableBounds.top;var v=C.selectedAppointmentTableBounds.height+G;if(e(v)){C.feedback.height(v);C._lastResizeY=C.selectedAppointmentTableBounds.height+G+C.feedback.coord().top;C.resizeTo=new a.jqx.date(j.getAttribute("data-date"),C.timeZone).addMinutes(C.getMinutesPerScale())}}else{if(D<C._lastResizeY-a(h).height()/2){var G=-5+F.top-C.selectedAppointmentTableBounds.height-C.selectedAppointmentTableBounds.top;var v=C.selectedAppointmentTableBounds.height+G;if(e(v)){C.feedback.height(v);C._lastResizeY=C.selectedAppointmentTableBounds.height+G+C.feedback.coord().top;C.resizeTo=new a.jqx.date(j.getAttribute("data-date"),C.timeZone)}}}}}}else{var p=function(i){if(i<C.cellWidth-10){return false}return true};var A=B.appointmentsRenderMode&&B.appointmentsRenderMode=="exactTime";if(n.allDay||!A){if(C.leftResize){if(!C._lastResizeX){C._lastResizeX=C.mouseDownPosition.left}if(E>C._lastResizeX+a(h).width()/2){var d=C.selectedAppointmentTableBounds.width+C.selectedAppointmentTableBounds.left-F.left-C.cellWidth;if(p(d)){C.feedback.css("left",5+F.left+C.cellWidth);C.feedback.width(d-5);C.feedback.hide();C.pinnedfeedback.css("left",5+F.left+C.cellWidth);C.pinnedfeedback.width(d-5);C._lastResizeX=C.pinnedfeedback.coord().left;if(!C.rtl){C.resizeFrom=new a.jqx.date(h.getAttribute("data-date"),C.timeZone).addDays(1)}else{C.resizeTo=a.jqx.scheduler.utilities.getEndOfDay(new a.jqx.date(h.getAttribute("data-date"),C.timeZone)).addDays(-1)}}}else{if(E<C._lastResizeX-a(h).width()/2){var d=C.selectedAppointmentTableBounds.width+C.selectedAppointmentTableBounds.left-F.left;if(p(d)){C.feedback.css("left",5+F.left);C.feedback.width(d-5);C.feedback.hide();C.pinnedfeedback.css("left",5+F.left);C.pinnedfeedback.width(d-5);C._lastResizeX=C.pinnedfeedback.coord().left;if(!C.rtl){C.resizeFrom=new a.jqx.date(h.getAttribute("data-date"),C.timeZone)}else{C.resizeTo=a.jqx.scheduler.utilities.getEndOfDay(new a.jqx.date(h.getAttribute("data-date"),C.timeZone))}}}}}else{if(C.rightResize){if(!C._lastResizeX){C._lastResizeX=C.selectedAppointmentTableBounds.width+C.selectedAppointmentTableBounds.left}var m=a(h).width()/2;if(E>C._lastResizeX+m){var G=a(h).width()+F.left-C.selectedAppointmentTableBounds.width-C.selectedAppointmentTableBounds.left;var d=C.selectedAppointmentTableBounds.width+G;if(p(d)){C.feedback.hide();C.feedback.width(d-6);C.feedback.css("left",5+F.left);C.pinnedfeedback.width(d-6);C._lastResizeX=C.selectedAppointmentTableBounds.width+G+C.pinnedfeedback.coord().left;if(!C.rtl){C.resizeTo=a.jqx.scheduler.utilities.getEndOfDay(new a.jqx.date(h.getAttribute("data-date"),C.timeZone))}else{C.resizeFrom=new a.jqx.date(h.getAttribute("data-date"),C.timeZone)}}}else{if(E<C._lastResizeX-m){var G=F.left-C.selectedAppointmentTableBounds.width-C.selectedAppointmentTableBounds.left;var d=C.selectedAppointmentTableBounds.width+G;if(p(d)){C.feedback.hide();C.feedback.css("left",5+F.left);C.feedback.width(d-6);C.pinnedfeedback.width(d-6);C._lastResizeX=C.selectedAppointmentTableBounds.width+G+C.pinnedfeedback.coord().left;if(!C.rtl){C.resizeTo=a.jqx.scheduler.utilities.getEndOfDay(new a.jqx.date(h.getAttribute("data-date"),C.timeZone).addDays(-1))}else{C.resizeFrom=new a.jqx.date(h.getAttribute("data-date"),C.timeZone).addDays(1)}}}}}}}else{var t=new Array();var b=new Array();var K=-1;var J=-1;var k=this.host.coord().left;var Q=0;var z=C.hScrollInstance.value;if(C.rtl){var z=C.hScrollInstance.max-C.hScrollInstance.value}if(C.hScrollBar[0].style.visibility=="hidden"){z=0}var O=E+z-k;k=0;for(var L=0;L<this.columns.records.length;L++){if(this.columns.records[L].timeColumn){if(!C.rtl){k+=this.columns.records[L].width;Q++}}}var s=C.getViewStart();var H=C.getViewEnd();for(var L=0;L<this._getColumnsLengthPerView();L++){var c=this.columns.records[L+Q].width;if(C.leftResize){if(!C.rtl){t.push(k);b.push(s.addDays(L));if(n.from.hour()!=0||(n.from.hour()==0&&n.from.minute()!=0)){if(k<C.selectedAppointmentTableBounds.left&&k+c>C.selectedAppointmentTableBounds.left){t.push(C.selectedAppointmentTableBounds.left);b.push(n.from);K=t.length-1}}if(n.to.hour()!=23||(n.to.hour()==23&&n.to.minute()!=59)){if(k<C.selectedAppointmentTableBounds.left+C.selectedAppointmentTableBounds.width&&k+c>C.selectedAppointmentTableBounds.left+C.selectedAppointmentTableBounds.width){t.push(C.selectedAppointmentTableBounds.left+C.selectedAppointmentTableBounds.width+8);b.push(n.to);J=t.length-1}}}if(C.rtl){t.push(k);b.push(H.addDays(-L-1));if(n.from.hour()!=0||(n.from.hour()==0&&n.from.minute()!=0)){if(k<C.selectedAppointmentTableBounds.left+C.selectedAppointmentTableBounds.width&&k+c>C.selectedAppointmentTableBounds.left+C.selectedAppointmentTableBounds.width){t.push(C.selectedAppointmentTableBounds.left+C.selectedAppointmentTableBounds.width+8);b.push(n.from);K=t.length-1}}if(n.to.hour()!=23||(n.to.hour()==23&&n.to.minute()!=59)){if(k<C.selectedAppointmentTableBounds.left&&k+c>C.selectedAppointmentTableBounds.left){t.push(C.selectedAppointmentTableBounds.left);b.push(n.to);J=t.length-1}}}k+=c}else{if(!C.rtl){if(n.from.hour()!=0||(n.from.hour()==0&&n.from.minute()!=0)){if(k<C.selectedAppointmentTableBounds.left&&k+c>C.selectedAppointmentTableBounds.left){t.push(C.selectedAppointmentTableBounds.left);b.push(n.from);K=t.length-1}}if(n.to.hour()!=23||(n.to.hour()==23&&n.to.minute()!=59)){if(k<C.selectedAppointmentTableBounds.left+C.selectedAppointmentTableBounds.width&&k+c>C.selectedAppointmentTableBounds.left+C.selectedAppointmentTableBounds.width){t.push(C.selectedAppointmentTableBounds.left+C.selectedAppointmentTableBounds.width+8);b.push(n.to);J=t.length-1}}k+=c;t.push(k);b.push(s.addDays(L))}else{if(n.from.hour()!=0||(n.from.hour()==0&&n.from.minute()!=0)){if(k<C.selectedAppointmentTableBounds.left+C.selectedAppointmentTableBounds.width&&k+c>C.selectedAppointmentTableBounds.left+C.selectedAppointmentTableBounds.width){t.push(C.selectedAppointmentTableBounds.left+C.selectedAppointmentTableBounds.width+8);b.push(n.from);K=t.length-1}}if(n.to.hour()!=23||(n.to.hour()==23&&n.to.minute()!=59)){if(k<C.selectedAppointmentTableBounds.left&&k+c>C.selectedAppointmentTableBounds.left){t.push(C.selectedAppointmentTableBounds.left);b.push(n.to);J=t.length-1}}k+=c;t.push(k);b.push(H.addDays(-L-1))}}}if(C.leftResize){for(var L=0;L<t.length;L++){var F=t[L];var N=t[L+1];if(!N){N=F}var g=L<t.length-1?O>=F&&O<=N:O>=F;if(g){var c=-F+C.selectedAppointmentTableBounds.left+C.selectedAppointmentTableBounds.width;var q=C.pinnedfeedback.width();var I=C.pinnedfeedback.css("left");var l=C.resizeTo;var w=C.resizeFrom;if(c>0){C.pinnedfeedback.css("left",F);C.pinnedfeedback.width(c);if(L==K){if(!C.rtl){C.resizeFrom=n.from}else{C.resizeTo=n.from}}else{if(L==J){if(!C.rtl){C.resizeFrom=n.to}else{C.resizeTo=n.to}}else{if(!C.rtl){C.resizeFrom=b[L]}else{C.resizeTo=a.jqx.scheduler.utilities.getEndOfDay(b[L])}}}}}}var o=C.resizeFrom;var P=C.resizeTo;if(C.rtl){o=n.from}else{P=n.to}var u=new a.jqx.timeSpan(10000*(P-o));if(u.days()<1){C.pinnedfeedback.css("left",I);C.pinnedfeedback.width(q);C.resizeFrom=w;C.resizeTo=l}}else{if(C.rightResize){for(var L=0;L<t.length;L++){var F=t[L];var N=t[L+1];if(!N){N=F}var g=L<t.length-1?E>=F-this.cellWidth/3&&E<=N-this.cellWidth/3:E>=F-this.cellWidth/3;if(g){var c=F-C.selectedAppointmentTableBounds.left-15;var q=C.pinnedfeedback.width();C.pinnedfeedback.width(c);var l=C.resizeTo;var w=C.resizeFrom;if(L==K){if(!C.rtl){C.resizeTo=n.from}else{C.resizeFrom=n.from}var c=F-C.selectedAppointmentTableBounds.left-9;C.pinnedfeedback.width(c);break}else{if(L==J){if(!C.rtl){C.resizeTo=n.to}else{C.resizeFrom=n.to}var c=F-C.selectedAppointmentTableBounds.left-9;C.pinnedfeedback.width(c);break}else{if(!C.rtl){C.resizeTo=a.jqx.scheduler.utilities.getEndOfDay(b[L])}else{C.resizeFrom=b[L]}break}}}}var o=C.resizeFrom;var P=C.resizeTo;if(!C.rtl){o=n.from}else{P=n.to}var u=new a.jqx.timeSpan(10000*(P-o));if(u.days()<1){C.pinnedfeedback.width(q);C.resizeFrom=w;C.resizeTo=l}}}}}},_handleTimelineMonthViewResize:function(t,s,q,M,k){var p=this;var w=p._views[p._view].type;var r=p._views[p._view];var D=function(i){if(i<10){return false}return true};var E=p.findCell(t,p.feedback.coord().top);if(k.allDay){if(p.leftResize){if(!p._lastResizeX){p._lastResizeX=p.mouseDownPosition.left}if(t>p._lastResizeX+a(q).width()/2){var v=p.selectedAppointmentTableBounds.width+p.selectedAppointmentTableBounds.left-M.left-a(q).width();if(D(v)){p.feedback.css("left",M.left+a(q).width());p.feedback.width(v);p._lastResizeX=p.feedback.coord().left;if(!p.rtl){p.resizeFrom=new a.jqx.date(E.getAttribute("data-date"),p.timeZone).addDays(1)}else{p.resizeTo=a.jqx.scheduler.utilities.getEndOfDay(new a.jqx.date(E.getAttribute("data-date"),p.timeZone).addDays(-1))}}}else{if(t<p._lastResizeX-a(q).width()/2){var v=p.selectedAppointmentTableBounds.width+p.selectedAppointmentTableBounds.left-M.left;if(D(v)){p.feedback.css("left",M.left);p.feedback.width(v);p._lastResizeX=p.feedback.coord().left;if(!p.rtl){p.resizeFrom=new a.jqx.date(E.getAttribute("data-date"),p.timeZone)}else{p.resizeTo=a.jqx.scheduler.utilities.getEndOfDay(new a.jqx.date(E.getAttribute("data-date"),p.timeZone))}}}}}else{if(p.rightResize){if(!p._lastResizeX){p._lastResizeX=p.mouseDownPosition.left}if(t>p._lastResizeX+a(q).width()/2){var n=a(q).width()+M.left-p.selectedAppointmentTableBounds.width-p.selectedAppointmentTableBounds.left;var v=p.selectedAppointmentTableBounds.width+n-5;if(D(v)){p.feedback.width(v);p._lastResizeX=p.selectedAppointmentTableBounds.width+n+p.feedback.coord().left;if(!p.rtl){p.resizeTo=a.jqx.scheduler.utilities.getEndOfDay(new a.jqx.date(E.getAttribute("data-date"),p.timeZone))}else{p.resizeFrom=new a.jqx.date(E.getAttribute("data-date"),p.timeZone)}}}else{if(t<p._lastResizeX-a(q).width()/2){var n=M.left-p.selectedAppointmentTableBounds.width-p.selectedAppointmentTableBounds.left;var v=p.selectedAppointmentTableBounds.width+n-5;if(D(v)){p.feedback.width(v);p._lastResizeX=p.selectedAppointmentTableBounds.width+n+p.feedback.coord().left;if(!p.rtl){p.resizeTo=a.jqx.scheduler.utilities.getEndOfDay(new a.jqx.date(E.getAttribute("data-date"),p.timeZone).addDays(-1))}else{p.resizeFrom=new a.jqx.date(E.getAttribute("data-date"),p.timeZone).addDays(1)}}}}}}}else{var o=new Array();var L=new Array();var u=-1;var A=-1;var j=this.host.coord().left;var h=0;for(var J=0;J<this.columns.records.length;J++){if(this.columns.records[J].timeColumn){j+=this.columns.records[J].width;h++}}var z=p.hScrollInstance.value;if(p.rtl){var z=p.hScrollInstance.max-p.hScrollInstance.value}if(p.hScrollBar[0].style.visibility=="hidden"){z=0}var d=t+z-j;j=0;var m=p.getViewStart();var l=p.getViewEnd();var g=this._getColumnsLengthPerView()-1;for(var J=0;J<this._getColumnsLengthPerView();J++){var C=this.columns.records[J+h].width;if(p.leftResize){o.push(j);if(!p.rtl){L.push(m.addDays(J))}else{L.push(l.addDays(-J))}if(k.from.hour()!=0||(k.from.hour()==0&&k.from.minute()!=0)){if(j<p.selectedAppointmentTableBounds.left&&j+C>p.selectedAppointmentTableBounds.left){o.push(p.selectedAppointmentTableBounds.left);L.push(k.from);u=o.length-1}}if(k.to.hour()!=23||(k.to.hour()==23&&k.to.minute()!=59)){if(j<p.selectedAppointmentTableBounds.left+p.selectedAppointmentTableBounds.width&&j+C>p.selectedAppointmentTableBounds.left+p.selectedAppointmentTableBounds.width){o.push(p.selectedAppointmentTableBounds.left+p.selectedAppointmentTableBounds.width+8);L.push(k.to);A=o.length-1}}j+=C}else{if(k.from.hour()!=0||(k.from.hour()==0&&k.from.minute()!=0)){if(j<p.selectedAppointmentTableBounds.left&&j+C>p.selectedAppointmentTableBounds.left){o.push(p.selectedAppointmentTableBounds.left);L.push(k.from);u=o.length-1}}if(k.to.hour()!=23||(k.to.hour()==23&&k.to.minute()!=59)){if(j<p.selectedAppointmentTableBounds.left+p.selectedAppointmentTableBounds.width&&j+C>p.selectedAppointmentTableBounds.left+p.selectedAppointmentTableBounds.width){o.push(p.selectedAppointmentTableBounds.left+p.selectedAppointmentTableBounds.width);L.push(k.to);A=o.length-1}}j+=C;o.push(j);if(!p.rtl){L.push(m.addDays(J))}else{L.push(l.addDays(-J-1))}}}if(p.leftResize){for(var J=0;J<o.length;J++){var c=o[J];var H=o[J+1];if(!H){H=c}var I=J<o.length-1?d>=c&&d<=H:d>=c;if(I){var C=-c+p.selectedAppointmentTableBounds.left+p.selectedAppointmentTableBounds.width;var B=p.feedback.width();var f=p.feedback.css("left");var F=p.resizeTo;var K=p.resizeFrom;p.feedback.css("left",c);p.feedback.width(C);if(J==u){if(!p.rtl){p.resizeFrom=k.from}else{p.resizeTo=k.from}}else{if(J==A){if(!p.rtl){p.resizeFrom=k.to}else{p.resizeTo=k.to}}else{if(!p.rtl){p.resizeFrom=L[J]}else{p.resizeTo=L[J]}}}}}var G=p.resizeFrom;var e=p.resizeTo;if(p.rtl){G=k.from}else{e=k.to}var b=new a.jqx.timeSpan(10000*(e-G));if(p.feedback.width()<20){p.feedback.css("left",f);p.feedback.width(B);p.resizeFrom=K;p.resizeTo=F}}else{if(p.rightResize){for(var J=0;J<o.length;J++){var c=o[J];var H=o[J+1];if(!H){H=c}var I=J<o.length-1?d>=c-this.cellWidth/3&&d<=H-this.cellWidth/3:d>=c-this.cellWidth/3;if(I){var C=c-p.selectedAppointmentTableBounds.left-12;var B=p.feedback.width();p.feedback.width(C);var F=p.resizeTo;var K=p.resizeFrom;if(J==u){if(!p.rtl){p.resizeTo=k.from}else{p.resizeFrom=k.from}var C=c-p.selectedAppointmentTableBounds.left;p.feedback.width(C);break}else{if(J==A){if(!p.rtl){p.resizeTo=k.to}else{p.resizeFrom=k.to}var C=c-p.selectedAppointmentTableBounds.left;p.feedback.width(C);break}else{if(!p.rtl){p.resizeTo=a.jqx.scheduler.utilities.getEndOfDay(L[J])}else{p.resizeFrom=L[J]}break}}}}var G=p.resizeFrom;var e=p.resizeTo;if(!p.rtl){G=k.from}else{e=k.to}var b=new a.jqx.timeSpan(10000*(e-G));if(p.feedback.width()<20){p.feedback.width(B);p.resizeFrom=K;p.resizeTo=F}}}}},_handleMonthViewResize:function(K,I,g,L,r){var H=this;if(!H.selectedJQXAppointment){return}var f=H._views[H._view].type;var G=H._views[H._view];var v=function(i){if(i<10){return false}return true};var s=-5;if(H.tableColumns>1){s=parseInt(-5/H.tableColumns)}for(var R=0;R<H.columns.records.length/H.tableColumns;R++){if(H.columns.records[R].timeColumn){continue}s+=H.columns.records[R].width}var q=H.selectedJQXAppointment.resourceId;var k=H._resources.indexOf(q);if(H.resources&&H.resources.orientation=="none"){k=-1}var e="0px";if(k!=-1&&H.tableRows==1){e=s*k+"px"}if(G.showWeekNumbers){if(!H.rtl){e=parseInt(e)+H.columns.records[0].width+"px"}}var F=g.offsetWidth;var P=g.offsetHeight;var E=18;if(H.isTouchDevice()){E=2}for(var R=0;R<6;R++){H.feedbacks[R][0].style.left=e;H.feedbacks[R][0].style.width=s+"px";H.feedbacks[R][0].style.display="block";H.feedbacks[R][0].style.top=parseInt(H.rows[R].top)+E+"px";if(H.tableRows>1){H.feedbacks[R][0].style.top=parseInt(H.rows[6*k+R].top)+E+"px"}a(H.feedbacks[R][0]).find(".jqx-scheduler-appointment-resize-indicator").css("visibility","inherit")}var l=H.selectedJQXAppointment.elements;var c=l[0].cells[0].cell;var J=l[l.length-1];var N=J.lastCellY;var h=J.lastCellX;var n=l[0].cellY;var B=l[0].cellX;var t=parseInt(L.top);var S=parseInt(L.left);if(!H.rtl){if(H.leftResize){var O=false;for(var R=0;R<6;R++){var C=H.feedbacks[R];var A=parseInt(C[0].style.top)-E;var z=parseInt(C[0].style.left);if(A<t){C[0].style.width=s+"px";for(var Q=0;Q<l.length;Q++){var o=l[Q].cellY;if(o==A){C[0].style.top=l[Q].y+"px"}}}else{for(var Q=0;Q<l.length;Q++){var o=l[Q].cellY;if(o==A){C[0].style.width=l[Q].width+"px";C[0].style.top=l[Q].y+"px"}}}var u=l[0];var m=parseInt(u.x);if(A==n){C[0].style.left=m+"px";if(t==n){C[0].style.left=1+L.left+"px";C[0].style.width=-1+u.x+u.width-L.left+"px";if(G.appointmentsRenderMode=="exactTime"&&!H.selectedJQXAppointment.allDay){var M=H.cellWidth-(u.x-B);var b=H.host.coord().left;if(K-b>=u.x&&K-b<=u.x+M+2){C[0].style.left=m+"px";C[0].style.width=u.width+"px";O=true}}}else{if(t>n){C[0].style.left=m+"px";C[0].style.width=u.width+"px"}else{if(t<n){C[0].style.left=e;C[0].style.width=u.x+u.width-parseInt(e)+"px"}}}}else{if(A==t){C[0].style.width=s-L.left+parseInt(e)+"px";C[0].style.left=L.left+"px"}}if(A>N){C[0].style.display="none"}if(A<t){C[0].style.display="none"}if(t>=N){for(var Q=0;Q<l.length;Q++){var o=l[Q].cellY;if(t>N||(t==N&&S>h)){if(o==A){C[0].style.display="block";C[0].style.width=l[Q].width+"px";C[0].style.left=l[Q].x+"px"}}else{if(t==N&&S<=h){if(n!=N){C[0].style.width=l[Q].width-L.left+parseInt(e)+"px"}}}}}}var D=new a.jqx.date(g.getAttribute("data-date"),H.timeZone);if(D<H.selectedJQXAppointment.to&&!O){H.resizeFrom=D}else{H.resizeFrom=H.selectedJQXAppointment.from}}else{if(H.rightResize){var p=false;for(var R=0;R<6;R++){var C=H.feedbacks[R];var A=parseInt(C[0].style.top)-E;var z=parseInt(C[0].style.left);if(A<t){C[0].style.width=s+"px"}for(var Q=0;Q<l.length;Q++){var o=l[Q].cellY;if(o==A){C[0].style.top=l[Q].y+"px"}}var u=l[0];var m=parseInt(u.x);if(A==n){C[0].style.left=m+"px";if(t==n){if(S>=B){C[0].style.width=S+F-m-5+"px";if(G.appointmentsRenderMode=="exactTime"&&!H.selectedJQXAppointment.allDay){var b=H.host.coord().left;if(K-b>=h&&K-b<=u.x+u.width+15){C[0].style.width=u.width+"px";p=true}}}else{C[0].style.width=u.width+"px"}}else{if(t<n){C[0].style.left=m+"px";C[0].style.width=u.width+"px"}else{if(t>n){C[0].style.left=m+"px";C[0].style.width=s-m+parseInt(e)+"px"}}}}else{if(A==t){C[0].style.width=S+F-5-parseInt(e)+"px"}}if(A<n){C[0].style.display="none"}if(A>t&&A>n){C[0].style.display="none"}if(t<=n){for(var Q=0;Q<l.length;Q++){var o=l[Q].cellY;if(t<n||(t==n&&S<B)){if(o==A){C[0].style.display="block";C[0].style.width=l[Q].width+"px"}}}}}var D=a.jqx.scheduler.utilities.getEndOfDay(new a.jqx.date(g.getAttribute("data-date"),H.timeZone));if(D>H.selectedJQXAppointment.from&&!p){H.resizeTo=D}else{H.resizeTo=H.selectedJQXAppointment.to}}}}else{if(H.leftResize){var p=false;for(var R=0;R<6;R++){var C=H.feedbacks[R];var A=parseInt(C[0].style.top)-E;var z=parseInt(C[0].style.left);if(A<t){C[0].style.width=s+"px"}else{for(var Q=0;Q<l.length;Q++){var o=l[Q].cellY;if(o==A){C[0].style.width=l[Q].width+"px";C[0].style.top=l[Q].y+"px"}}}var u=l[0];var m=parseInt(u.x);if(A==n){C[0].style.left=m+"px";if(t==n){C[0].style.left=1+L.left+"px";C[0].style.width=-1+u.x+u.width-L.left+"px";if(L.left>u.x+u.width){C[0].style.width=u.width+"px";C[0].style.left=u.x+"px"}if(G.appointmentsRenderMode=="exactTime"&&!H.selectedJQXAppointment.allDay){var b=H.host.coord().left;if(K-b>=u.x-10&&K-b<=u.cellX+H.cellWidth){C[0].style.width=u.width+"px";C[0].style.left=u.x+"px";p=true}}}else{if(t<n){C[0].style.left=m+"px";C[0].style.width=u.width+"px"}else{if(t>n){C[0].style.left=e;C[0].style.width=u.x+u.width-parseInt(e)+"px"}}}}else{if(A==t){C[0].style.width=s-L.left+parseInt(e)+"px";C[0].style.left=L.left+"px"}}if(A<n){C[0].style.display="none"}if(A>t){C[0].style.display="none"}if(t<n){for(var Q=0;Q<l.length;Q++){var o=l[Q].cellY;if(o==A){C[0].style.display="block";C[0].style.width=l[Q].width+"px";C[0].style.left=l[Q].x+"px"}}}if(t==n){for(var Q=0;Q<l.length;Q++){var o=l[Q].cellY;if(t<n||(t==n)){if(o==A&&n!=N){C[0].style.left=1+L.left+parseInt(e)+"px";if(1+L.left+parseInt(e)>u.x+u.width){C[0].style.left=u.x+"px"}C[0].style.width=-1+u.x+u.width-L.left+"px"}}}}}var D=a.jqx.scheduler.utilities.getEndOfDay(new a.jqx.date(g.getAttribute("data-date"),H.timeZone));if(D>H.selectedJQXAppointment.from&&!p){H.resizeTo=D}else{H.resizeTo=H.selectedJQXAppointment.to}}else{if(H.rightResize){var O=false;for(var R=0;R<6;R++){var C=H.feedbacks[R];var A=parseInt(C[0].style.top)-E;var z=parseInt(C[0].style.left);if(A<t){C[0].style.width=s+"px"}for(var Q=0;Q<l.length;Q++){var o=l[Q].cellY;if(o==A){C[0].style.top=l[Q].y+"px"}}var u=l[0];var m=parseInt(u.x);if(A==n){C[0].style.left=m+"px";if(t==n){if(S>=B){C[0].style.width=S+F-m-5+"px";if(G.appointmentsRenderMode=="exactTime"&&!H.selectedJQXAppointment.allDay){var b=H.host.coord().left;if(K-b>=u.lastCellX&&K-b<=u.x+u.width+15){C[0].style.width=u.width+"px";O=true}}}else{C[0].style.width=u.width+"px"}}else{if(t>n){C[0].style.left=m+"px";C[0].style.width=u.width+"px"}else{if(t<n){C[0].style.left=m+"px";C[0].style.width=s-m+parseInt(e)+"px"}}}}else{if(A==t){C[0].style.width=S+F-5-parseInt(e)+"px"}}if(A>N){C[0].style.display="none"}if(A<t){C[0].style.display="none"}if(t>N){for(var Q=0;Q<l.length;Q++){var o=l[Q].cellY;if(o==A){C[0].style.display="block"}if(A==N){C[0].style.width=l[Q].width+"px";C[0].style.left=l[Q].x+"px"}}}if(t<=N){if(A==N){for(var Q=0;Q<l.length;Q++){var o=l[Q].cellY;if(A!=t&&o==A&&n!=N){C[0].style.width=l[Q].width+"px";C[0].style.left=l[Q].x+"px"}else{if(A==t&&o==A&&n!=N){C[0].style.left=l[Q].x+"px";C[0].style.width=S+F-5-parseInt(e)-l[Q].x+"px"}}}}}}var D=new a.jqx.date(g.getAttribute("data-date"),H.timeZone);if(D<H.selectedJQXAppointment.to&&!O){H.resizeFrom=D}else{H.resizeFrom=H.selectedJQXAppointment.from}}}}var d=new Array();for(var R=0;R<6;R++){var C=H.feedbacks[R];if(C[0].style.display=="block"){d.push(C)}}a.each(d,function(i){if(!H.rtl){if(i>0){a(this).find(".jqx-scheduler-appointment-left-resize-indicator")[0].style.visibility="hidden"}if(i<d.length-1){a(this).find(".jqx-scheduler-appointment-right-resize-indicator")[0].style.visibility="hidden"}}else{if(i>0){a(this).find(".jqx-scheduler-appointment-right-resize-indicator")[0].style.visibility="hidden"}if(i<d.length-1){a(this).find(".jqx-scheduler-appointment-left-resize-indicator")[0].style.visibility="hidden"}}})},_handleTimelineDayWeekViewResize:function(m,k,d,h,b){var i=this;var l=i._views[i._view].type;var n=i._views[i._view];var e=i.getMinutesPerScale();var j=function(o){if(o<10){return false}return true};var c=i.findCell(m,i.feedback.coord().top);if(i.leftResize){if(!i._lastResizeX){i._lastResizeX=i.mouseDownPosition.left}if(m>i._lastResizeX+a(d).width()/2){var g=i.selectedAppointmentTableBounds.width+i.selectedAppointmentTableBounds.left-h.left-a(d).width();if(j(g)){i.feedback.css("left",2+h.left+a(d).width());i.feedback.width(g);i._lastResizeX=i.feedback.coord().left;if(!i.rtl){i.resizeFrom=new a.jqx.date(c.getAttribute("data-date"),i.timeZone).addMinutes(e)}else{i.resizeTo=new a.jqx.date(c.getAttribute("data-date"),i.timeZone)}}}else{if(m<i._lastResizeX-a(d).width()/2){var g=i.selectedAppointmentTableBounds.width+i.selectedAppointmentTableBounds.left-h.left;if(j(g)){i.feedback.css("left",2+h.left);i.feedback.width(g);i._lastResizeX=i.feedback.coord().left;if(!i.rtl){i.resizeFrom=new a.jqx.date(c.getAttribute("data-date"),i.timeZone)}else{i.resizeTo=new a.jqx.date(c.getAttribute("data-date"),i.timeZone).addMinutes(e)}}}}}else{if(i.rightResize){if(!i._lastResizeX){i._lastResizeX=i.mouseDownPosition.left}if(m>i._lastResizeX+a(d).width()/2){var f=a(d).width()+h.left-i.selectedAppointmentTableBounds.width-i.selectedAppointmentTableBounds.left;var g=i.selectedAppointmentTableBounds.width+f;if(j(g)){i.feedback.width(g);i._lastResizeX=i.selectedAppointmentTableBounds.width+f+i.feedback.coord().left;if(!i.rtl){i.resizeTo=new a.jqx.date(c.getAttribute("data-date"),i.timeZone).addMinutes(e)}else{i.resizeFrom=new a.jqx.date(c.getAttribute("data-date"),i.timeZone)}}}else{if(m<i._lastResizeX-a(d).width()/2){var f=h.left-i.selectedAppointmentTableBounds.width-i.selectedAppointmentTableBounds.left;var g=i.selectedAppointmentTableBounds.width+f;if(j(g)){i.feedback.width(g);i._lastResizeX=i.selectedAppointmentTableBounds.width+f+i.feedback.coord().left;if(!i.rtl){i.resizeTo=new a.jqx.date(c.getAttribute("data-date"),i.timeZone)}else{i.resizeFrom=new a.jqx.date(c.getAttribute("data-date"),i.timeZone).addMinutes(e)}}}}}}},_handleResize:function(c,i,h,b,e){var g=this;var d=g._views[g._view].type;var f=g._views[g._view];if(d==="dayView"||d==="weekView"){g._handleDayWeekViewResize(c,i,h,b,e)}else{if(d==="timelineMonthView"){g._handleTimelineMonthViewResize(c,i,h,b,e)}else{if(d==="monthView"){g._handleMonthViewResize(c,i,h,b,e)}else{if(d==="timelineDayView"||d==="timelineWeekView"){g._handleTimelineDayWeekViewResize(c,i,h,b,e)}}}}if(d==="timelineDayView"||d==="timelineMonthView"||d==="timelineWeekView"){clearInterval(g._horizontalIntervalDrag);g._horizontalIntervalDrag=setInterval(function(){var k=g.host.width();var m=g.host.coord().left;var j=m+25;var l=k+j-45;if(!g.rtl){if(c<j){g.hScrollInstance.setPosition(g.hScrollInstance.value-5)}else{if(c>l){g.hScrollInstance.setPosition(g.hScrollInstance.value+5)}}}else{if(c>l){g.hScrollInstance.setPosition(g.hScrollInstance.value-5)}else{if(c<j){g.hScrollInstance.setPosition(g.hScrollInstance.value+5)}}}},5)}else{if(d==="dayView"||d==="weekView"){clearInterval(g._intervalDrag);g._intervalDrag=setInterval(function(){var n=g.host.height();var k=0;if(!g.columnGroups){k+=g.showHeader?g.columnsHeight:0}else{k+=g.showHeader?g.columnsheader.height():0}if(g.showToolbar){k+=g.toolbarHeight}n-=k;var m=g.legendHeight;if(g._resources.length==0){m=0}if(g.showLegend){n-=m}var q=k+g.host.coord().top;var j=g.showAllDayRow;if(f.timeRuler&&(d==="dayView"||d==="weekView")){if(f.timeRuler.showAllDayRow!=undefined){j=f.timeRuler.showAllDayRow}}var l=e.duration().days()>=1||e.allDay;if(j&&l){q-=20}else{if(j&&g.resizing){q+=a(g.table[0].rows[0]).height();n-=a(g.table[0].rows[0]).height()}}var p=q+25;var o=n+p-45;if(i<p){g.vScrollInstance.setPosition(g.vScrollInstance.value-5)}else{if(i>o){g.vScrollInstance.setPosition(g.vScrollInstance.value+5)}}},5)}}g.resizing=true},_startTimers:function(b,h,d){var f=this;var g=f.host.coord();var e=0;var c=0;if(f.hScrollInstance.element.style.visibility!="hidden"){clearInterval(f._horizontalIntervalDragVelocity);f._horizontalIntervalDragVelocity=setInterval(function(){e++;if(e>40){e=40}},100);clearInterval(f._horizontalIntervalDrag);f._horizontalIntervalDrag=setInterval(function(){var j=f._hostWidth;var l=g.left;var i=l+30;var k=j+i-60;if(!f.rtl){if(b<i){f.hScrollInstance.setPosition(f.hScrollInstance.value-10-e)}else{if(b>k){f.hScrollInstance.setPosition(f.hScrollInstance.value+10+e)}else{e=0}}}else{if(b<i){f.hScrollInstance.setPosition(f.hScrollInstance.value+10+e)}else{if(b>k){f.hScrollInstance.setPosition(f.hScrollInstance.value-10-e)}else{e=0}}}},10)}if(f.vScrollInstance.element.style.visibility!="hidden"){clearInterval(f._verticalIntervalDragVelocity);f._verticalIntervalDragVelocity=setInterval(function(){c++;if(c>40){c=40}},100);clearInterval(f._intervalDrag);f._intervalDrag=setInterval(function(){var m=f._hostHeight;var o=0;if(!f.columnGroups){o+=f.showHeader?f.columnsHeight:0}else{o+=f.showHeader?f.columnsheader.height():0}var p=f._views[f._view].type;var r=f._views[f._view];if(f.showToolbar){o+=f.toolbarHeight}m-=o;if(f.showLegend&&f._resources.length>0){m-=f.legendHeight}var k=g.top;var q=o+k;if(p=="dayView"||p=="weekView"){var j=f.showAllDayRow;if(r.timeRuler&&(p==="dayView"||p==="weekView")){if(r.timeRuler.showAllDayRow!=undefined){j=r.timeRuler.showAllDayRow}}var l=d.duration().days()>=1||d.allDay;if(j&&l){q-=20}else{if(j&&f.resizing){q+=a(f.table[0].rows[0]).height()}}}var n=q+30;var i=k+m+o-30;if(h<n){f.vScrollInstance.setPosition(f.vScrollInstance.value-10-c)}else{if(h>i){f.vScrollInstance.setPosition(f.vScrollInstance.value+10+c)}else{c=0}}},10)}},_hoverCell:function(b){var c=this;if(!c.enableHover){return true}if(c._resources.length>0){if(b.className.indexOf("pinned")>=0){return true}}if(b.className.indexOf("time-column")>=0){return true}if(b.className.indexOf("jqx-scheduler-disabled-cell")>=0){return true}if(b&&b==c.hoveredCell){return true}c.hoveredCell=b;if(!b){return true}c._removeHoveredCell();c.hoveredCell=b;b.className+=" "+c.toTP("jqx-fill-state-hover")+" "+c.toTP("jqx-grid-cell-hover")+" "+c.toTP("jqx-scheduler-cell-hover");b.jqxClassName=b.className},_removeHoveredCell:function(){var d=this;if(d.hoveredCell){var c=d.hoveredCell;var b=function(e){var f=c.className;f=f.replace(" "+d.toTP("jqx-fill-state-hover"),"");f=f.replace(" "+d.toTP("jqx-grid-cell-hover"),"");f=f.replace(" "+d.toTP("jqx-scheduler-cell-hover"),"");c.className=f;c.jqxClassName=f};b(c)}d.hoveredCell=null},_addHandlers:function(){var i=this;this._mousewheelfunc=this._mousewheelfunc||function(m){i.wheel(m,i);return false};this.focused=false;var g=false;this.addHandler(a(document),"keydown.scheduler"+i.element.id,function(m){g=false;if(m.keyCode===9&&m.shiftKey&&!i.focused){g=true}});this.addHandler(this.host,"focus",function(n){if(i.focusedCell&&!i.selectedAppointment&&!g){a(i.focusedCell).addClass(i.toThemeProperty("jqx-scheduler-cell-focus"))}i.focused=true;if(g){if(i.appointmentsToRender.length>0){var m=i.appointmentsToRender[i.appointmentsToRender.length-1];i._selectAppointment(m);i._lastSelectedAppointment=m}else{if(!i.focusedCell){i._updateFocusedCell()}else{if(i.focusedCell){if(i.focusedCell.className.indexOf("-focus")==-1){i._updateCellsSelection();return false}}}}}});this.addHandler(this.host,"blur",function(m){if(i.focusedCell){if(document.activeElement==i.element){return true}if(a(document.activeElement).ischildof(i.host)){return true}a(i.focusedCell).removeClass(i.toThemeProperty("jqx-scheduler-cell-focus"));i.focused=false}});this.addHandler(this.host,"dragstart."+this.element.id,function(m){return false});this.addHandler(this.host,"selectstart."+this.element.id,function(m){if(i.enableBrowserSelection){return true}if(i.showToolBar){if(a(m.target).ischildof(i.toolbar)){return true}}if(i.rowDetails){if(a(m.target).parents("[data-role=details]").length>0){return true}}if(undefined==i.editKey){return false}});this.addHandler(a(window),"jqxReady."+this.element.id,function(){});this.removeHandler(this.host,"mousewheel",this._mousewheelfunc);this.addHandler(this.host,"mousewheel",this._mousewheelfunc);var d=this.isTouchDevice();this.vScrollInstance.valueChanged=function(m){if(i._timer){clearTimeout(i._timer)}if(d){if(i.table){i.table[0].style.top=0-i.vScrollInstance.value+"px"}}else{i._timer=setTimeout(function(){if(i.table){i.table[0].style.top=0-i.vScrollInstance.value+"px"}},1)}};this.hScrollInstance.valueChanged=function(m){if(i._htimer){clearTimeout(i._htimer)}if(d){if(i.table){i._renderhorizontalscroll()}}else{i._htimer=setTimeout(function(){if(i.table){i._renderhorizontalscroll()}},1)}};var c="mousedown";if(this.isTouchDevice()){c=a.jqx.mobile.getTouchEventName("touchstart");if(a.jqx.browser.msie&&a.jqx.browser.version<10){c="mousedown"}}this.addHandler(this.table,"mouseleave",function(m){i._removeHoveredCell()});if(i.isTouchDevice()){i.enableHover=false}var h="mousemove.scheduler"+this.element.id;var e="mouseup.scheduler"+this.element.id;if(this.isTouchDevice()&&this.touchMode!==true){h=a.jqx.mobile.getTouchEventName("touchmove")+".scheduler"+this.element.id;e=a.jqx.mobile.getTouchEventName("touchend")+".scheduler"+this.element.id}this.addHandler(a(document),h,function(X){var M=X.pageX;var L=X.pageY;if(i.isTouchDevice()){var N=a.jqx.position(X);M=N.left;L=N.top;if(isNaN(M)||isNaN(L)){var N=a.jqx.position(X.originalEvent);M=N.left;L=N.top}}if(i.disabled||X.which===3){return true}if(!i.isMouseDown){return true}if(i.hScrollInstance.isScrolling()||i.vScrollInstance.isScrolling()){return true}if(i._hostWidth){var D=i.host.coord();if(D.left+i._hostWidth<M||M<D.left){return true}if(D.top+i._hostHeight<L||L<D.top){return true}}if(i.mouseDownPosition){if((Math.abs(i.mouseDownPosition.left-M)>=3&&Math.abs(i.mouseDownPosition.left-M)<=10)||(Math.abs(i.mouseDownPosition.top-L)>=3&&Math.abs(i.mouseDownPosition.top-L)<=10)){i.dragOrResize=true}}if(i.selectedAppointment&&i.dragOrResize){var w=null;if(i._hasOpenedMenu){return true}if(i.editRecurrenceDialog.jqxWindow("isOpen")){return true}var o=i._views[i._view].type;var K=i._views[i._view];var A=false;if(X.target.nodeName.toLowerCase()==="td"){var q=X.target}else{var q=i.findCell(M,L)}if(!q){return true}if(q.getAttribute("data-time-slot")!=undefined){return true}if(q.className.indexOf("jqx-grid-cell-pinned")>=0){return true}if(!i.feedback){w=i.getJQXAppointmentByElement(i.selectedAppointment);if(!w.draggable&&!w.resizable){w=null;return true}if(i.beginDrag){var t=i.beginDrag(w);if(!t){return true}}var T=a('[data-key="'+w.id+'"]');var B=i.selectedAppointment.position();i.feedback=i.selectedAppointment.clone(true);i.pinnedfeedback=i.selectedAppointment.clone(true);var V=!(i.selectedAppointment[0].style.cursor=="row-resize"||i.selectedAppointment[0].style.cursor=="col-resize"||i.resizing);var p=function(x){if(V){x.find(".jqx-scheduler-appointment-resize-indicator").hide()}T.addClass(i.toTP("jqx-scheduler-feedback-appointment jqx-disableselect"));x.find(".jqx-scheduler-appointment-duration-status").hide();x.addClass(i.toTP("jqx-scheduler-feedback-appointment"));x.addClass(i.toTP("jqx-scheduler-feedback-drag-appointment"));if(!V){x.css("z-index",400)}else{x.css("z-index",401)}};p(i.feedback);p(i.pinnedfeedback);if(i._views[i._view].type!="monthView"||V){i.table.append(i.feedback);if(i.tableRows==1){i.pinnedtable.append(i.pinnedfeedback)}else{i.table.append(i.pinnedfeedback)}i.feedback.css("left",B.left);i.feedback.css("top",B.top);i.pinnedfeedback.css("left",B.left);i.pinnedfeedback.css("top",B.top);if(i._views[i._view].type=="monthView"&&i.isTouchDevice()){i.feedbacks=new Array();for(var S=0;S<6;S++){i.feedbacks.push(i.feedback.clone(true));a(i.feedbacks[S]).hide();i.table.append(a(i.feedbacks[S]))}}}else{i.feedbacks=new Array();for(var S=0;S<6;S++){i.feedbacks.push(i.feedback.clone(true));a(i.feedbacks[S]).hide();i.table.append(a(i.feedbacks[S]))}}}if(i.dragging){var t=i.dragging(w,q,i.feedback);if(false===t){return true}}var N=a(q).position();if(i.endDrag){var I=i.feedback.css("left");var J=i.feedback.css("top");var z=i.feedback.width();var F=i.feedback.height}if(!w){w=i.selectedJQXAppointment}if(!w){i.selectAppointment(i.uiappointments[0].id);w=i.selectedJQXAppointment}var v=w.resourceId;var r=i._resources.indexOf(v);if(i.resources&&i.resources.orientation=="none"){r=-1}var Q=false;var U=i.isTouchDevice();if(U&&i.touchMode!==true&&i._dragCell==null&&!(i.leftResize||i.rightResize||i.topResize||i.bottomResize||i.resizing)){switch(o){case"dayView":case"weekView":var A=w.duration().days()>=1||w.allDay;if(!A){if(L>=i.selectedAppointmentBounds.top-15&&L<=i.selectedAppointmentBounds.top+15){Q=true;i.topResize=true}if(L>=i.selectedAppointmentBounds.top-15+i.selectedAppointmentBounds.height&&L<=i.selectedAppointmentBounds.top+i.selectedAppointmentBounds.height+15){Q=true;i.bottomResize=true}}else{if(M>=i.selectedAppointmentBounds.left-15&&M<=i.selectedAppointmentBounds.left+15){Q=true;i.leftResize=true}if(M>=i.selectedAppointmentBounds.left+i.selectedAppointmentBounds.width-15&&M<=i.selectedAppointmentBounds.left+i.selectedAppointmentBounds.width+15){Q=true;i.rightResize=true}}break;default:if(M>=i.selectedAppointmentBounds.left-15&&M<=i.selectedAppointmentBounds.left+15){Q=true;i.leftResize=true}if(M>=i.selectedAppointmentBounds.left+i.selectedAppointmentBounds.width-15&&M<=i.selectedAppointmentBounds.left+i.selectedAppointmentBounds.width+15){Q=true;i.rightResize=true}break}}if(U&&(i.leftResize||i.rightResize||i.topResize||i.bottomResize||i.resizing)||Q){if(q.getAttribute("data-view")!=r+1&&i._resources.length>0){if(i.resources.orientation!="none"){return true}}var W=i._getDateByString(q.getAttribute("data-date"));if(W<i.min.toDate()||W>i.max.toDate()){return}i._handleResize(M,L,q,N,w);i._oldResizeTD=q}else{if(!U&&i.selectedAppointment[0].style.cursor=="row-resize"||i.selectedAppointment[0].style.cursor=="col-resize"||i.resizing){if(q.getAttribute("data-view")!=r+1&&i._resources.length>0){if(i.resources&&i.resources.orientation!="none"){return true}}var W=i._getDateByString(q.getAttribute("data-date"));if(W<i.min.toDate()||W>i.max.toDate()){return}i._handleResize(M,L,q,N,w);i._oldResizeTD=q}else{if(!w.draggable){i._removeFeedbackAndStopResize();return true}if(i._dragCell==q){i._startTimers(M,L,w);if(i.isTouchDevice()&&i.touchMode!==true){X.stopPropagation();return false}else{return}}var W=i._getDateByString(q.getAttribute("data-date"));if(W<i.min.toDate()||W>i.max.toDate()){return}var E=w.duration();if(o.indexOf("month")>=0&&new a.jqx.date(W).add(E)>i.max){return}var P=i.vScrollBar[0].style.visibility=="hidden"?0:6+i.vScrollBar.outerWidth();i._dragCell=q;i.feedback[0].style.left=2+N.left+"px";i.feedback[0].style.top=2+N.top+"px";if(o==="dayView"||o==="weekView"){i.pinnedfeedback.css("left",2+N.left);i.pinnedfeedback.css("top",2+N.top);var m=0;if(q.getAttribute("data-end-date")){var s=i.appointmentsMinHeight;if(i.isTouchDevice()){s=i.touchAppointmentsMinHeight}if(K.appointmentHeight){s=K.appointmentHeight}A=w.duration().days()>=1||w.allDay;i.feedback.css("top",2+N.top+s);i.pinnedfeedback.css("top",2+N.top+18);if(o=="dayView"){var R=i.selectedAppointment.coord().left-9;i.feedback.css("left",R);i.pinnedfeedback.css("left",R)}if(A){i.pinnedfeedback.css("top",w.elements[0].y);m=i.selectedAppointment.width();if(2+N.left+m>i.host.width()-P){var C=2+N.left+m-i.host.width()+P+6;m-=C}i.feedback.width(m);i.feedback.height(s);i.pinnedfeedback.width(m);i.pinnedfeedback.height(s)}else{m=a(q).width()-4;i.feedback.width(m);i.feedback.height(s);i.pinnedfeedback.width(m);i.pinnedfeedback.height(s)}i.feedback.hide();i.pinnedfeedback.show()}else{i.feedback.show();i.pinnedfeedback.hide();var u=2;var O=30;var H=K.timeRuler&&K.timeRuler.scale;switch(H){case"sixtyMinutes":case"hour":u=1;break;case"thirtyMinutes":case"halfHour":u=2;break;case"fifteenMinutes":case"quarterHour":u=4;break;case"tenMinutes":u=6;break;case"fiveMinutes":u=12;break}m=a(q).width()-4;i.feedback.width(m);A=w.duration().days()>=1||w.allDay;if(A){i.feedback.height((a(q).height())-6)}else{i.feedback.height(i.selectedAppointment.height())}}i._startTimers(M,L,w)}else{if(o==="monthView"){i.feedback.css("left",1+N.left);var n=i.selectedAppointmentTableBounds;var G=parseInt(n.top);if(G>N.top&&G<N.top+q.offsetHeight){i.feedback.css("top",G+"px")}else{i.feedback.css("top",i.selectedAppointment.height()+N.top-2)}if(i.isTouchDevice()){i.feedback.css("top",N.top+2)}m=i.selectedAppointment.width();i.feedback.width(m);i.feedback.height(i.selectedAppointment.height());i._startTimers(M,L,w)}else{if(o==="timelineDayView"||o==="timelineMonthView"||o==="timelineWeekView"){var n=i.selectedAppointmentTableBounds;var G=parseInt(n.top);if(G>N.top&&G<N.top+q.offsetHeight){i.feedback.css("top",G+"px")}i._startTimers(M,L,w)}}}}}if(i.endDrag){var t=i.endDrag(w,q,i.feedback);if(!t){i.feedback.width(z)}i.feedback.height(F);i.feedback.css("top",J);i.feedback.css("left",I);return true}if(i.isTouchDevice()&&i.touchMode!==true){X.stopPropagation();return false}}});var l=function(m){i.isMouseDown=false;i.dragOrResize=false;if(i.contextMenu&&i.menu&&m.which!==3){i.menu.jqxMenu("close");i._hasOpenedMenu=false}if(m.which===3){return true}if(i.selectedAppointment&&i.feedback){if(i.editRecurrenceDialog.jqxWindow("isOpen")){return}i._handleMouseUp(i.selectedJQXAppointment,i._dragCell,i.resizing)}};this.addHandler(a(document),e,function(m){return l(m)});if(!this.isTouchDevice()){try{if(document.referrer!=""||window.frameElement){if(window.top!=null&&window.top!=window.self){var b=null;if(window.parent&&document.referrer){b=document.referrer}if(b&&b.indexOf(document.location.host)!=-1){var f=function(m){if(!i.disabled){return l(m)}};i.addHandler(a(window.top.document),"mouseup.jqxscheduler"+i.element.id,f)}}}}catch(k){}}this.addHandler(this.host,h,function(o){var C=o.pageX;var A=o.pageY;if(i.disabled||o.which===3){return true}if(i.selectedAppointment&&i.isMouseDown){return true}if(i.hScrollInstance.isScrolling()||i.vScrollInstance.isScrolling()){return true}if(i._hasOpenedMenu){return true}if(i.overlay[0].style.display!=="none"){return true}var n=null;if(o.target.className.indexOf("jqx-scheduler-appointment")>=0&&o.target.className.indexOf("jqx-scheduler-appointment-inner-content")==-1&&o.target.className.indexOf("jqx-scheduler-appointment-content")==-1&&o.target.className.indexOf("jqx-scheduler-appointment-resize-indicator")==-1){n=o.target}var u=o.target;for(var v=0;v<4;v++){if(u.parentNode){if(u.className.indexOf("jqx-scheduler-appointment")>=0&&u.className.indexOf("jqx-scheduler-appointment-innter-content")==-1&&u.className.indexOf("jqx-scheduler-appointment-content")==-1&&u.className.indexOf("jqx-scheduler-appointment-resize-indicator")==-1){n=u}u=u.parentNode}else{break}}if(n){var B=i._views[i._view].type;var E=i._views[i._view];var D=i.getJQXAppointmentByElement(n);if(D.resizable){var t=D.duration();var p=D.allDay||t.days()>=1||(t.hours()==23&&t.minutes==59&&t.seconds==59);var z=a(n).coord();var w=a(n).position();i.selectedAppointmentBounds={top:z.top,left:z.left,width:a(n).width(),height:a(n).height()};i.selectedAppointmentTableBounds={top:w.top,left:w.left,width:a(n).width(),height:a(n).height()};var m=i.selectedAppointmentBounds;if(B=="weekView"||B=="dayView"){if(!p){if(A>=m.top-3&&A<=m.top+6){n.style.cursor="row-resize";i.topResize=true;i.bottomResize=false}else{if(A>=m.top+m.height-6&&A<=m.top+m.height+3){n.style.cursor="row-resize";i.topResize=false;i.bottomResize=true}else{n.style.cursor="pointer"}}}else{if(B!="dayView"){if(C>=m.left-3&&C<=m.left+6){n.style.cursor="col-resize";i.leftResize=true;i.rightResize=false}else{if(C>=m.left+m.width-6&&C<=m.left+m.width+3){n.style.cursor="col-resize";i.leftResize=false;i.rightResize=true}else{n.style.cursor="pointer"}}}else{n.style.cursor="pointer"}}}else{if(B=="monthView"&&D.elements.length>1){var s=i.table.coord();for(var v=0;v<D.elements.length;v++){var q=D.elements[v];var m={top:s.top+q.y,left:s.left+q.x,width:q.width,height:q.height};if((v==0&&!i.rtl)||(v==D.elements.length-1&&i.rtl)){if(C>=m.left-3&&C<=m.left+6){if(A>=m.top&&A<=m.top+m.height){n.style.cursor="col-resize";i.leftResize=true;i.rightResize=false;i.selectedAppointment=a(n);break}else{n.style.cursor="pointer"}}else{n.style.cursor="pointer"}}else{if((v==D.elements.length-1&&!i.rtl)||(v==0&&i.rtl)){if(C>=m.left+m.width-6&&C<=m.left+m.width+3){if(A>=m.top&&A<=m.top+m.height){n.style.cursor="col-resize";i.leftResize=false;i.rightResize=true;i.selectedAppointment=a(n);break}else{n.style.cursor="pointer"}}else{n.style.cursor="pointer"}}}}}else{if(C>=m.left-3&&C<=m.left+6){n.style.cursor="col-resize";i.leftResize=true;i.rightResize=false}else{if(C>=m.left+m.width-6&&C<=m.left+m.width+3){n.style.cursor="col-resize";i.leftResize=false;i.rightResize=true}else{n.style.cursor="pointer"}}}}}}if(!i.enableHover){return true}if(o.target.nodeName.toLowerCase()==="td"){var r=o.target}else{var r=i.findCell(C,A)}if(!r){return true}i._removeHoveredCell();if(i.renderedRecords&&i.renderedRecords.length===0){return true}if(i.isMouseDown){if(Math.abs(i.mousecaptureposition.left-C)>3||Math.abs(i.mousecaptureposition.top-A)>3){if(i.mousecaptureposition.clickedcell.length===0){i.selectionarea[0].style.visibility="hidden";return}if(i.lastHoveredCell!=r){if(i._selectRangeTimer){clearTimeout(i._selectRangeTimer)}i._selectRangeTimer=setTimeout(function(){var x=i._views[i._view].type;if(x!="agendaView"){i._selectRange(r,i.mousecaptureposition.clickedcell[0])}},1)}i.lastHoveredCell=r}}else{if(!n){if(i.rows.length==1&&i.rows[0].cells.length==1){return true}i._hoverCell(r)}}return true});this.addHandler(a(document),"keydown.jqxscheduler"+i.element.id,function(m){if(i.focused&&m.ctrlKey){if(m.keyCode==68){return false}}});this.addHandler(this.host,"keydown",function(m){return i._handleKey(m)});if(a.jqx.browser.msie&&a.jqx.browser.version<9){this.addHandler(this.table,"dblclick",function(m){i.table.trigger("mousedown",m)})}var j=function(K){var N=K.target;var u=null;if(i.disabled){return true}if(!i.menu&&K.which==3){i._initMenu()}var n=i.table.coord();var B=K.pageX;var w=K.pageY;if(a.jqx.browser.msie&&a.jqx.browser.version<9){if(arguments&&arguments.length==2){B=arguments[1].pageX;w=arguments[1].pageY}}if(i.isTouchDevice()){var O=a.jqx.position(K);B=O.left;w=O.top;if(isNaN(B)||isNaN(w)){var O=a.jqx.position(K.originalEvent);B=O.left;w=O.top}}i.mouseDown={top:w,left:B};var u=i.findCell(B,w);if(K.target.nodeName.toLowerCase()==="td"){var u=K.target}else{var u=i.findCell(B,w)}var D=i._views[i._view].type;var v=i._views[i._view];if(D==="monthView"&&v.weekViewNavigation){if(u&&u.getAttribute("data-time-slot")){var z=i._getDateByString(u.getAttribute("data-date"));var J=new a.jqx.date(z);i.date=J;i.setView("weekView")}}if(D==="monthView"&&v.dayViewNavigation){var m=a(u).coord().top;if(u&&w>=m&&m+16>=w){var z=i._getDateByString(u.getAttribute("data-date"));var J=new a.jqx.date(z);i.date=J;i.setView("dayView")}}if(K.target.nodeName.toLowerCase()==="span"&&(K.target.className.indexOf("jqx-icon-arrow-down")>=0||K.target.className.indexOf("jqx-icon-close")>=0)){if(K.target.mousedown){K.target.mousedown()}return true}var t=a(u).parent();var Q=t.attr("data-key");i.mousecaptureposition={left:K.pageX,top:K.pageY,clickedrow:a(t).index(),clickedcell:a(u)};if(K.which!==3){i.isMouseDown=true;i.isMouseDownDate=new Date()}else{i.isMouseDown=false}if(i.contextMenu&&i.menu&&K.which!==3){i.menu.jqxMenu("close");i._hasOpenedMenu=false}var r=function(y){if(K.which===3){if(i.contextMenu&&i.menu){if(y){i.menu.find("li:first").show()}else{i.menu.find("li:first").hide()}var x=i.menu.coord();if(i.menu.css("display")=="block"&&x.left==K.pageX&&x.top==K.pageY){i._hasOpenedMenu=true;K.preventDefault();K.stopPropagation();return}if(D==="agendaView"){}i.menuOpening=true;i.menu.jqxMenu("open",K.pageX,K.pageY);i.menuOpening=false;i._hasOpenedMenu=true;K.preventDefault();K.stopPropagation();setTimeout(function(){i.menu.jqxMenu("focus")},50)}}};var I=function(){for(var R=0;R<A.length;R++){var y=A[R].cells;for(var x=0;x<y.length;x++){y[x].removeAttribute("data-selected")}}};var q=K.target.className.indexOf("jqx-scheduler-appointment")>=0&&K.target.className.indexOf("jqx-scheduler-appointment-duration-status")==-1&&K.target.className.indexOf("jqx-scheduler-appointment-inner-content")==-1&&K.target.className.indexOf("jqx-scheduler-appointment-status")==-1&&K.target.className.indexOf("jqx-scheduler-appointment-resize-indicator")==-1&&K.target.className.indexOf("jqx-scheduler-appointment-content")==-1?a(K.target):a(K.target).parents(".jqx-scheduler-appointment");if(q.length==0){q=null}if(q&&q[0].className.indexOf("feedback")==-1){if(q.parents(".jqx-scheduler-month-cell-popup").length>0){return true}i.mouseDownPosition={top:w,left:B};var H=a(q).coord();i.selectedAppointmentBounds={top:H.top,left:H.left,width:a(q).width(),height:a(q).height()};var O=a(q).position();i.selectedAppointmentTableBounds={top:O.top,left:O.left,width:a(q).width(),height:a(q).height()};if(!i._dragStartCell){i._dragStartCell=i.findCell(H.left,H.top)}var p=i.getJQXAppointmentByElement(q);i._selectAppointment(p,q,"mouse");i._raiseEvent("appointmentClick",{appointment:p.boundAppointment});i.clearSelection();var s=new Date().getTime();var F=300;if(a.jqx.browser.msie&&a.jqx.browser.version<9){F=1000}if(!i.clickTime){i.clickTime=new Date()}if((s-i.clickTime.getTime()<F)&&i._lastSelectedAppointment&&p.id==i._lastSelectedAppointment.id&&K.which!=3){if(!p.readOnly&&!i.editRecurrenceDialog.jqxWindow("isOpen")&&(!i._editDialog||(i._editDialog&&!i._editDialog.jqxWindow("isOpen")))){var C=i._initDialog(p);if(C!==false){i._openDialog()}}i.mouseDownPosition=null;i.isMouseDown=false;if(K.preventDefault){K.preventDefault()}i._raiseEvent("appointmentDoubleClick",{appointment:p.boundAppointment})}else{if(!p.readOnly){if(K.which!==3){i.focus()}}}i._lastSelectedAppointment=p;if(K.preventDefault){K.preventDefault()}K.stopPropagation();i.clickTime=new Date();if(!p.readOnly){if(K.which==3){r(true)}}return}else{if(K.which===3){var P=i.getSelection();if(P!==null){r(false)}else{i.clearAppointmentsSelection();u.setAttribute("data-selected","true");i._lastSelectedCell=u;i.focusedCell=u;i._updateCellsSelection(u);r(false);var M=new a.jqx.date(u.getAttribute("data-date"),i.timeZone);i._raiseEvent("cellClick",{cell:u,date:M})}}else{if(K.which!=3){i.clearAppointmentsSelection()}}}if(i.view=="agendaView"){var q=K.target.className.indexOf("jqx-scheduler-agenda-appointment")!=-1;var L=false;if(!q&&K.target&&K.target.parentNode){q=K.target.parentNode.className.indexOf("jqx-scheduler-agenda-appointment")!=-1;L=true}if(q){q=K.target;if(L){q=K.target.parentNode}var p=i.getJQXAppointmentByElement(q);i._selectAppointment(p,q,"mouse");i._raiseEvent("appointmentClick",{appointment:p.boundAppointment});var s=new Date().getTime();var F=300;if(a.jqx.browser.msie&&a.jqx.browser.version<9){F=1000}if(!i.clickTime){i.clickTime=new Date()}if((s-i.clickTime.getTime()<F)&&i._lastSelectedAppointment&&p.id==i._lastSelectedAppointment.id&&K.which!=3){if(!p.readOnly&&!i.editRecurrenceDialog.jqxWindow("isOpen")&&(!i._editDialog||(i._editDialog&&!i._editDialog.jqxWindow("isOpen")))){var C=i._initDialog(p);if(C!==false){i._openDialog()}}i.mouseDownPosition=null;i.isMouseDown=false;if(K.preventDefault){K.preventDefault()}i._raiseEvent("appointmentDoubleClick",{appointment:p.boundAppointment})}i._lastSelectedAppointment=p;if(K.preventDefault){K.preventDefault()}K.stopPropagation();i.clickTime=new Date();if(!p.readOnly){if(K.which==3){r(true)}}}}var E=function(){if(!i.enableBrowserSelection){if(K.preventDefault){K.preventDefault()}}var x=a(document).scrollTop();i.host.focus();a(document).scrollTop(x)};if(Q!==undefined&&K.which!=3){i.clickedTD=u;var M=new a.jqx.date(u.getAttribute("data-date"),i.timeZone);var o=i.rowinfo[Q];var G=false;if(o){var s=new Date().getTime();var F=300;if(!i.clickTime){i.clickTime=new Date()}i.focus();if(i._lastSelectedCell&&i._lastSelectedCell.getAttribute("data-selected")=="true"&&u.getAttribute("data-selected")==="true"&&(s-i.clickTime.getTime()<F)){var M=new a.jqx.date(u.getAttribute("data-date"),i.timeZone);i._raiseEvent("cellDoubleClick",{cell:u,date:M});G=true;i._initDialog();i._openDialog();if(K.preventDefault){K.preventDefault()}}}var A=i.rows;if(u.getAttribute("data-selected")!="true"||K.shiftKey||s-i.clickTime.getTime()>F){if(u.getAttribute("data-time-slot")=="true"){return}if(!K.shiftKey){i.shiftSelectedCell=null}if(K.shiftKey&&i._lastSelectedCell&&D!="agendaView"){if(!i.shiftSelectedCell){i.shiftSelectedCell=i._lastSelectedCell}if(u.getAttribute("data-view")===i.shiftSelectedCell.getAttribute("data-view")){I()}i._selectRange(u,i.shiftSelectedCell)}if(!K.shiftKey){I();var z=i._getDateByString(u.getAttribute("data-date"));if(z>=i.min.toDate()&&z<=i.max.toDate()){u.setAttribute("data-selected","true")}else{u.setAttribute("data-selected","false")}}a('[data-key="'+Q+'"]').removeClass(i.toTP("jqx-scheduler-selected-appointment"));i.selectedAppointment=null;var z=i._getDateByString(u.getAttribute("data-date"));if(z>=i.min.toDate()&&z<=i.max.toDate()){i._lastSelectedCell=u;i.focusedCell=u}i._updateCellsSelection(u);if(i.openedMonthCellPopup){i.openedMonthCellPopup.remove()}}i._raiseEvent("cellClick",{cell:u,date:M});i.clickTime=new Date();if(K.stopPropagation){K.stopPropagation()}}};this.addHandler(this.pinnedtable,c,function(n){var m=j(n);if(m!=undefined){return m}});this.addHandler(this.table,c,function(n){var m=j(n);if(m!=undefined){return m}})},moveAppointment:function(k,c,g,f,j){var h=this;var i=f.getAttribute("data-end-date");if(k){if(h.editRecurrenceDialog.jqxWindow("isOpen")){return}clearInterval(h._verticalIntervalDragVelocity);clearInterval(h._horizontalIntervalDragVelocity);clearInterval(h._intervalDrag);clearInterval(h._horizontalIntervalDrag);var d=k.duration();var b=k.duration().days()>=1||k.allDay;var e=function(r){if(!j){var l=h._views[h._view].type;var o=h._views[h._view];var p=c;k.from=p;if(l==="dayView"||l==="weekView"){if(!b&&!i){k.to=p.add(d);k.allDay=false}else{if(!b&&i){k.to=a.jqx.scheduler.utilities.getEndOfDay(p);k.allDay=true}else{if(b&&i){k.to=p.add(d)}else{if(b&&!i){var n=30;var q=o.timeRuler&&o.timeRuler.scale;switch(q){case"sixtyMinutes":case"hour":n=60;break;case"fifteenMinutes":case"quarterHour":n=15;break;case"tenMinutes":n=10;break;case"fiveMinutes":n=5;break}k.to=p.addMinutes(n);k.allDay=false}}}}}else{if(l==="monthView"){k.to=p.add(d)}else{if(l==="timelineDayView"||l==="timelineWeekView"||l==="timelineMonthView"){k.to=p.add(d)}}}}h._saveChangesAfterDragOrResize(r,k,f,j);if(g!=null){k.resourceId=g}h.table.find(".jqx-icon-arrow-down").hide();if(k.allDay||b){h._renderrows()}else{var s=h.getViewStart();var m=a.jqx.scheduler.utilities.getEndOfDay(h.getViewEnd());h._prepareAppointmentsInView(s,m);h._renderAppointments(s,m)}h._raiseEvent("appointmentChange",{appointment:k.boundAppointment});h.changedAppointments[k.id]={type:"Update",appointment:k.boundAppointment};h._ensureAppointmentVisible(h.selectedJQXAppointment)};if(k.isRecurrentAppointment()){e(false)}else{e(null)}}},getAppointmentProperty:function(d,b){var e=this;var c=null;if(this.appointmentsByKey[d]){c=this.appointmentsByKey[d].jqxAppointment}if(!c){return}return c[b]},setAppointmentProperty:function(e,b,g){var f=this;var c=null;if(this.appointmentsByKey[e]){c=this.appointmentsByKey[e].jqxAppointment}if(!c){return}c[b]=g;f.changedAppointments[e]={type:b,appointment:c.boundAppointment};switch(e){case"draggable":case"resizable":break;case"background":case"color":case"borderColor":case"status":case"tooltip":case"subject":case"location":case"description":case"style":var h=f.getViewStart();var d=a.jqx.scheduler.utilities.getEndOfDay(f.getViewEnd());f._prepareAppointmentsInView(h,d);f._renderAppointments(h,d);break;case"hidden":case"timeZone":if(c.isAllDayAppointment()){f._renderrows()}else{var h=f.getViewStart();var d=a.jqx.scheduler.utilities.getEndOfDay(f.getViewEnd());f._prepareAppointmentsInView(h,d);f._renderAppointments(h,d)}break;default:f._renderrows()}},deleteAppointment:function(b){if(this.appointmentsByKey[b]){this._deleteAppointment(this.appointmentsByKey[b].jqxAppointment)}},_deleteAppointment:function(b){var g=this;if(b.rootAppointment){if(!b.isException()){if(b.rootAppointment!=null){b.rootAppointment.exceptions.push(g.editAppointment);b.rootAppointment.recurrenceException.push(g.editAppointment.occurrenceFrom)}else{b.exceptions.push(g.editAppointment);b.recurrenceException.push(g.editAppointment.occurrenceFrom)}}else{var f=b.rootAppointment?b.rootAppointment.exceptions:b.exceptions;for(var e=0;e<f.length;e++){if(f[e].occurrenceFrom.equals(g.editAppointment.occurrenceFrom)){f[e]=b;break}}}b.hidden=true;g._renderrows();return}g._raiseEvent("appointmentDelete",{appointment:b.boundAppointment});var d=b.id;delete g.appointmentsByKey[d];var c=-1;for(var e=0;e<g.appointments.length;e++){if(g.appointments[e]==b.boundAppointment||g.appointments[e].id==b.boundAppointment.id){c=e;break}}if(c!=-1){g.appointments.splice(c,1)}c=-1;for(var e=0;e<g.uiappointments.length;e++){if(g.uiappointments[e]==b||g.uiappointments[e].id==b.id){c=e;break}}if(c!=-1){g.uiappointments.splice(c,1)}if(g.selectedJQXAppointment==b){g.clearAppointmentsSelection();if(g.uiappointments[c+1]){g.selectAppointment(g.uiappointments[c+1].id)}else{if(g.uiappointments[c-1]){g.selectAppointment(g.uiappointments[c-1].id)}else{if(g.uiappointments[0]){g.selectAppointment(g.uiappointments[0].id)}}}}g.changedAppointments[d]={type:"Delete",appointment:b.boundAppointment};g._renderrows()},addAppointment:function(o){var g=this;if(!o.scheduler){o.scheduler=this}if(!o.duration){if((!o.from&&!o.to)||(!o.appointmentObject)){var f=o;var d={};var e=["from","to","id","style","description","location","subject","background","color","borderColor","recurrencePattern","recurrenceException","draggable","resizable","tooltip","hidden","allDay","timeZone","ownerId","resourceId"];for(var w in g.appointmentDataFields){var b=g.appointmentDataFields[w];var q=f[b];if(w=="from"||w=="to"){q=new a.jqx.date(q)}if(w=="style"){if(q){var k=g.getAppointmentColors(q);d.color=k.color;d.background=k.background;d.borderColor=k.border}}if(w=="recurrencePattern"){if(q){q=new a.jqx.scheduler.recurrencePattern(q);q.timeZone=f.timeZone||g.timeZone}}if(w=="recurrenceException"){var t=new Array();if(q){if(q.indexOf("EXDATE:")>=0){q=q.substring(q.indexOf("EXDATE:")+7)}var l=new Array();if(q.indexOf(",")>=0){l=q.split(",")}else{l.push(q)}for(var s=0;s<l.length;s++){var p=l[s];if(p.indexOf(";")>=0){var h=p.split(";")[1];p=p.split(";")[0];if(h.toLowerCase().indexOf("display")>=0&&h.toLowerCase().indexOf("none")){d.hidden=true}}try{var u=a.jqx.scheduler.utilities.untilStringToDate(p);if(u!="Invalid Date"){if(d.timeZone){u=new a.jqx.date(u,d.timeZone)}else{if(g.timeZone){u=u.toTimeZone(g.timeZone)}else{u=new a.jqx.date(u)}}}}catch(v){var u=new a.jqx.date(p,g.timeZone)}t.push(u)}}q=t}d[w]=q}for(var m in e){var w=e[m];if(d[w]==undefined){var q="";if(w=="originalData"){continue}if(w=="ownerId"){q=null}if(w=="timeZone"){q=null}if(w=="recurrencePattern"){q=null}if(w=="recurrenceException"){q=null}if(w=="allDay"){q=false}if(w=="draggable"){q=true}if(w=="resizable"){q=true}if(w=="hidden"){q=false}if(w=="resourceId"){q=null}if(w=="from"){q=new a.jqx.date()}if(w=="to"){q=new a.jqx.date().addHours(1)}d[w]=q}}d.originalData=f;d.scheduler=this;var o=new a.jqx.scheduler.appointment(d);if(d.timeZone){o.from=o.from.toTimeZone(d.timeZone);o.to=o.to.toTimeZone(d.timeZone)}if(g.timeZone){if(!d.timeZone){o.timeZone=g.timeZone}o.from=o.from.toTimeZone(g.timeZone);o.to=o.to.toTimeZone(g.timeZone)}else{o.from=o.from.toTimeZone(null);o.to=o.to.toTimeZone(null)}}else{var i=new a.jqx.scheduler.appointment();for(var w in o){i[w]=o[w]}o=i}}var w=g.dataview.generatekey();o.id=w;g.appointmentsByKey[w]=o;g.appointments.push(o);var c={};var j={};for(var r in g.appointmentDataFields){var b=g.appointmentDataFields[r];var q=o[r];c[r]=q;if(r=="from"||r=="to"){if(q.toDate){q=q.toDate()}else{q=new a.jqx.date(q).toDate()}}j[b]=q}c.originalData=j;o.boundAppointment=c;c.jqxAppointment=o;o.jqxAppointment=o;g._raiseEvent("appointmentAdd",{appointment:o.boundAppointment});g.uiappointments.push(o);g.changedAppointments[w]={type:"Add",appointment:o.boundAppointment};if(g.hiddenResources&&g.hiddenResources[o.resourceId]){g.hideAppointmentsByResource(o.resourceId)}else{g._renderrows()}g._selectAppointment(o);g._lastSelectedAppointment=o;if(g.resources){var n=o.resourceId;if(g._resources.indexOf(n)===-1){g._resources.push(n);g._renderrows()}}},_updateCellsSelection:function(){var f=this;var l=f.rows;var b=0;var c=0;if(b>0&&f.rtl){b=0;c=1}for(var e=0;e<l.length;e++){var k=l[e].cells;for(var d=b;d<k.length-c;d++){var h=k[d];if(h.getAttribute("data-selected")=="true"){var g=h.jqxClassName||h.className;if(g.indexOf("jqx-fill-state-pressed")>=0){if(h!=f.focusedCell){g=g.replace(" jqx-scheduler-cell-focus","");g=g.replace(" jqx-scheduler-cell-focus-"+f.theme,"")}else{if(h==f.focusedCell&&f.focused){g=g.replace(" jqx-scheduler-cell-focus","");g=g.replace(" jqx-scheduler-cell-focus-"+f.theme,"");if(!f.selectedAppointment){g=g+=" "+f.toTP("jqx-scheduler-cell-focus")}}}if(h.className!=g){h.className=g}h.jqxClassName=g;continue}g=g.replace(" jqx-fill-state-pressed","");g=g.replace(" jqx-fill-state-pressed-"+f.theme,"");g=g.replace(" jqx-scheduler-cell-focus","");g=g.replace(" jqx-scheduler-cell-focus-"+f.theme,"");g=g.replace(" jqx-grid-cell-selected","");g=g.replace(" jqx-grid-cell-selected-"+f.theme,"");g=g.replace(" jqx-scheduler-cell-selected","");g=g.replace(" jqx-scheduler-cell-selected-"+f.theme,"");g=g+=" "+f.toTP("jqx-fill-state-pressed jqx-grid-cell-selected jqx-scheduler-cell-selected");if(h==f.focusedCell&&f.focused&&!f.selectedAppointment){g=g+=" "+f.toTP("jqx-scheduler-cell-focus")}if(h.className!=g){h.className=g}h.jqxClassName=g}else{var g=h.jqxClassName||h.className;if(g.indexOf("jqx-fill-state-pressed")==-1){if(h!=f.focusedCell){g=g.replace(" jqx-scheduler-cell-focus","");g=g.replace(" jqx-scheduler-cell-focus-"+f.theme,"")}else{if(h==f.focusedCell&&f.focused){g=g.replace(" jqx-scheduler-cell-focus","");g=g.replace(" jqx-scheduler-cell-focus-"+f.theme,"");if(!f.selectedAppointment){g=g+=" "+f.toTP("jqx-scheduler-cell-focus")}}}if(h.className!=g){h.className=g}h.jqxClassName=g;continue}else{if(h==f.focusedCell&&f.focused){g=g.replace(" jqx-scheduler-cell-focus","");g=g.replace(" jqx-scheduler-cell-focus-"+f.theme,"");if(!f.selectedAppointment){g=g+=" "+f.toTP("jqx-scheduler-cell-focus")}if(h.className!=g){h.className=g}h.jqxClassName=g}}g=g.replace(" jqx-fill-state-pressed","");g=g.replace(" jqx-fill-state-pressed-"+f.theme,"");g=g.replace(" jqx-scheduler-cell-focus","");g=g.replace(" jqx-scheduler-cell-focus-"+f.theme,"");g=g.replace(" jqx-grid-cell-selected","");g=g.replace(" jqx-grid-cell-selected-"+f.theme,"");g=g.replace(" jqx-scheduler-cell-selected","");g=g.replace(" jqx-scheduler-cell-selected-"+f.theme,"");if(h==f.focusedCell&&f.focused&&!f.selectedAppointment){g=g+=" "+f.toTP("jqx-scheduler-cell-focus")}if(h.className!=g){h.className=g}h.jqxClassName=g;h.removeAttribute("data-selected")}}}},_getuikey:function(c,f){var e=null;var d=this.table[0].rows;e=a(d[c]).attr("data-key");if(a(d[c]).attr("data-role")){var b=a(d[c]);if(f=="next"){while(b){b=b.next();if(b){var g=b.attr("data-role");if(!g){e=b.attr("data-key");return e}}}}else{if(f=="prev"){while(b){b=b.prev();if(b){var g=b.attr("data-role");if(!g){e=b.attr("data-key");return e}}}}}return null}return e},getRows:function(){var h=this._views[this._view].type;var k=this._views[this._view];var d="halfHour";if(k.timeRuler&&k.timeRuler.scale){d=k.timeRuler.scale}var j=24;var b=this.showAllDayRow;if(k.timeRuler&&(h==="dayView"||h==="weekView")){var c=0;var f=23;if(k.timeRuler.scaleStartHour!=undefined){var c=parseInt(k.timeRuler.scaleStartHour)}if(k.timeRuler.scaleEndHour!=undefined){var f=parseInt(k.timeRuler.scaleEndHour)}if(c<0){c=0}if(f<0){f=23}if(c>23){c=0}if(f>23){f=23}j=f-c+1;if(k.timeRuler.showAllDayRow!=undefined){b=k.timeRuler.showAllDayRow}}var l=new Array();var g=0;switch(h){case"dayView":case"weekView":default:var g=j*2;if(d==="hour"||d==="sixtyMinutes"){var g=j}else{if(d==="quarterHour"||d==="fifteenMinutes"){var g=j*4}else{if(d==="tenMinutes"){var g=j*6}else{if(d==="fiveMinutes"){var g=j*12}}}}if(b){g++}break;case"monthView":var g=6;break;case"timelineDayView":case"timelineWeekView":case"timelineMonthView":var g=1;break;case"agendaView":var g=this.appointments?this.appointments.length:0;break}for(var e=0;e<g;e++){l.push({uid:e})}return l},_getDateByString:function(j){if(j&&this._dateByStringCache&&this._dateByStringCache[j]){var b=this._dateByStringCache[j];return new Date(b.getTime())}var e=j.split(" ");var l=e[0].split("-");var h=e[1].split(":");var g=parseInt(l[0],10);var f=parseInt(l[1],10)-1;var i=parseInt(l[2],10);var d=parseInt(h[0],10);var c=parseInt(h[1],10);var k=parseInt(h[2],10);var b=new Date(g,f,i,d,c,k);if(g<1970){b.setFullYear(g,f,i)}if(!this._dateByStringCache){this._dateByStringCache=[]}this._dateByStringCache[j]=b;return b},_getCellByDate:function(b,d,c){var m=this.rows;if(d===undefined){d=false}if(c===undefined){if(this.focusedCell){c=this.focusedCell.getAttribute("data-view")}}for(var g=0;g<m.length;g++){var l=m[g];if(l.element.getAttribute("data-group-row")){continue}for(var f=0;f<l.cells.length;f++){var k=l.cells[f];if(k.getAttribute("rowspan")!=null){continue}if(k.getAttribute("data-view")!==c){continue}if(k.getAttribute("data-time-slot")){continue}if(d&&k.getAttribute("data-end-date")!=null){continue}var h=k.getAttribute("data-date");var e=this._getDateByString(h);if(e.valueOf()==b.valueOf()){return k}}}},_rendercelltexts:function(){if(a.jqx.credits!=="75CE8878-FCD1-4EC7-9249-BA0F153A5DE8"){var c="www.jqwidgets.com";if(location.hostname.indexOf(c.substring(4))==-1){if(this._gridRenderElement){a(this._gridRenderElement).remove()}var d=String.fromCharCode(83,80,65,78);var b=String.fromCharCode(72,84,84,80,58,47,47);var e=document.createElement(d);e.id=a.jqx.utilities.createId();e.innerHTML=c;e.style.position="absolute";e.style.right="5px";e.style.bottom="5px";e.style.color="#909090";e.style.cursor="pointer";e.style.zIndex="999999";e.style.display="none";e.style.fontSize="9px";e.onmousedown=function(){open(b+c)};this.content[0].appendChild(e);this._gridRenderElement=e}}},_handleKey:function(s){if(this._loading){return true}var t=s.shiftKey;var m=s.ctrlKey||s.metaKey;var i=this;var w=s.charCode?s.charCode:s.keyCode?s.keyCode:0;if(i._hasOpenedMenu){if(w==27){i.closeMenu()}else{i.menu.jqxMenu("focus")}return true}if(w===13||(i.selectedAppointment&&w==46)){if(i.editRecurrenceDialog&&i.editRecurrenceDialog.jqxWindow("isOpen")){return true}if(i._editDialog&&i._editDialog.jqxWindow("isOpen")){return true}if(!i.selectedAppointment){i._initDialog();i._openDialog()}else{var c=i.getJQXAppointmentByElement(i.selectedAppointment);if(!c.readOnly){if(w==46){var o=i._initDialog(c,"delete");if(o!==false){i._openDialog()}}else{var o=i._initDialog(c);if(o!==false){i._openDialog()}}}}}if(w===27){if(i.dragOrResize){i.table.find(".jqx-icon-arrow-down").hide();var f=i.getViewStart();var e=a.jqx.scheduler.utilities.getEndOfDay(i.getViewEnd());i._prepareAppointmentsInView(f,e);i._renderAppointments(f,e);i._removeFeedbackAndStopResize();return false}}var r=function(z){var B=i.selectedAppointment;var y=i.getJQXAppointmentByElement(B);var x=y.elements[0].cells[0].cell;var L=y.elements[y.elements.length-1].cells[y.elements[y.elements.length-1].cells.length-1].cell;var E=i.rows[i.rows.length-1].cells[i.rows[i.rows.length-1].cells.length-1];if(t||(!t&&!m&&(z=="down"||z=="right"))){x=L}var H=i._views[i._view].type;var G=i._views[i._view];var I=x;switch(z){case"left":var D=i.rowByCell[x.getAttribute("data-key")];var F=D.indexOf(x);if(F>0&&!t){I=D.cells[F-1]}else{if(H=="monthView"&&!t){var A=D.aboveRow;if(A){I=A.cells[A.cells.length-1]}}}break;case"right":var D=i.rowByCell[x.getAttribute("data-key")];var F=D.indexOf(x);if(F<D.cells.length-1){I=D.cells[F+1]}else{if(H=="monthView"){var P=D.belowRow;if(P){I=P.cells[0]}}}if(H=="monthView"&&!t&&m&&L==E){I=x}break;case"up":var D=i.rowByCell[x.getAttribute("data-key")];var F=D.indexOf(x);var A=D.aboveRow;if(A&&!t){I=A.cells[F]}break;case"down":var D=i.rowByCell[x.getAttribute("data-key")];var F=D.indexOf(x);var P=D.belowRow;if(P){I=P.cells[F]}break}var N=I.getAttribute("data-date");var M=new a.jqx.date(N,i.timeZone);var H=a(I).attr("data-view");var J=i._resources[parseInt(H)-1];if(t){var H=i._views[i._view].type;var G=i._views[i._view];var C=false;if(H==="dayView"||H==="weekView"){if(x.getAttribute("data-end-date")){if(z=="left"&&(y.elements[0].cells.length>1||i.rtl)){if(!i.rtl){y.to=a.jqx.scheduler.utilities.getEndOfDay(M.addDays(-1))}else{y.to=a.jqx.scheduler.utilities.getEndOfDay(M.addDays(1))}C=true}else{if(z=="right"){if(!i.rtl||(i.rtl&&y.elements[0].cells.length>1)){y.to=a.jqx.scheduler.utilities.getEndOfDay(M)}C=true}}}else{if(z=="up"&&y.elements[0].cells.length>1){y.to=M;C=true}else{if(z=="down"){y.to=M.addMinutes(i.getMinutesPerScale());C=true}}}}else{if(H.indexOf("month")>=0){if(z=="left"&&(y.elements[0].cells.length>1||y.elements.length>1)){y.to=a.jqx.scheduler.utilities.getEndOfDay(M.addDays(-1));C=true}else{if(z=="right"){y.to=a.jqx.scheduler.utilities.getEndOfDay(M);C=true}}}else{if((!i.rtl&&z=="left"&&y.elements[0].cells.length>1)||(i.rtl&&z=="right"&&y.elements[0].cells.length>1)){y.to=M;if(i.rtl){y.to=M.addMinutes(i.getMinutesPerScale())}C=true}else{if((!i.rtl&&z=="right")||(i.rtl&&z=="left")){y.to=M.addMinutes(i.getMinutesPerScale());if(i.rtl){y.to=y.to.addMinutes(i.getMinutesPerScale())}C=true}}}}if(C){i.moveAppointment(y,M,J,I,true)}}else{if(m){i.moveAppointment(y,M,J,I)}else{i.clearAppointmentsSelection();var K=true;if(z=="down"){K=false}i.selectCell(M,K,H);i._ensureVisible(I)}}if(i.selectedAppointment){i.selectedAppointment.removeClass(i.toTP("jqx-scheduler-selected-appointment"));var O=i.selectedAppointment.attr("data-key");a('[data-key="'+O+'"]').addClass(i.toTP("jqx-scheduler-selected-appointment"));i.clearSelection()}};if(s.altKey&&i._resourcesElements&&i._resources&&i._resources.length>0){var g=function(x){var y=i._resourcesElements.bottom[x];if(y.attr("data-toggle")=="on"){i.hideAppointmentsByResource(x)}else{i.showAppointmentsByResource(x)}};var j=w>=49&&w<=58?j=w-48:-1;if(j>=1){a.each(i._resources,function(x,y){if(x==j-1){g(y);return false}});return false}}if(s.ctrlKey){if(!i.selectedAppointment){if(w==37){i.toolbarLeftButton.trigger("click");i._ensureVisible(i.focusedCell);return false}else{if(w==39){i.toolbarRightButton.trigger("click");i._ensureVisible(i.focusedCell);return false}}}if(w==49){i._setView(0);return false}else{if(w==50){i._setView(1);return false}else{if(w==51){i._setView(2);return false}else{if(w==52){i._setView(3);return false}else{if(w==53){i._setView(4);return false}else{if(w==54){i._setView(5);return false}else{if(w==68){i.dateTimeInput.jqxDateTimeInput("open");return false}else{if(w==77){i.openMenu();return false}}}}}}}}}if(w==9){if(!s.shiftKey){if(i.selectedAppointment){i.clearSelection();var d=i.selectedAppointment;var c=i.getJQXAppointmentByElement(d);var h=i.tabKeyAppointments.indexOf(c);if(h<i.tabKeyAppointments.length-1){c=i.tabKeyAppointments[h+1];i._selectAppointment(c);i._lastSelectedAppointment=c;i._ensureAppointmentVisible(c);return false}else{i.clearAppointmentsSelection();return true}}else{var c=i.tabKeyAppointments[0];if(c){i._selectAppointment(c);i._lastSelectedAppointment=c;i._ensureAppointmentVisible(c);return false}else{if(!i.focusedCell){i._updateFocusedCell();i._ensureVisible(i.focusedCell);return false}else{if(i.focusedCell){if(i.focusedCell.className.indexOf("-focus")==-1){i._updateCellsSelection();i._ensureVisible(i.focusedCell);return false}}}}}}else{if(i.selectedAppointment){i.clearSelection();var d=i.selectedAppointment;var c=i.getJQXAppointmentByElement(d);if(c){var h=i.tabKeyAppointments.indexOf(c);if(h>0){c=i.tabKeyAppointments[h-1];i._selectAppointment(c);i._lastSelectedAppointment=c;i._ensureAppointmentVisible(c);return false}else{i.clearAppointmentsSelection();if(!i.focusedCell){i._updateFocusedCell();i._ensureVisible(i.focusedCell);return false}else{if(i.focusedCell){if(i.focusedCell.className.indexOf("-focus")==-1){i._updateCellsSelection();i._ensureVisible(i.focusedCell);return false}}}return true}}}else{if(!i.focusedCell){i._updateFocusedCell();i._ensureVisible(i.focusedCell)}else{if(i.focusedCell){if(i.focusedCell.className.indexOf("-focus")==-1){i._updateCellsSelection();i._ensureVisible(i.focusedCell);return false}}}}}}if(i.selectedAppointment){if(w==37){r("left")}else{if(w==38){r("up")}else{if(w==40){r("down")}else{if(w==39){r("right")}}}}if(w>=37&&w<=40){return false}return}var k=this._lastSelectedCell;if(!k){return}if(!a(this._lastSelectedCell).parent()[0]){this._lastSelectedCell=this.rows[0].cells[0];k=this._lastSelectedCell}var n=this.rows;var p=this._views[this._view].type;var l=this._views[this._view];var v="halfHour";if(l.timeRuler&&l.timeRuler.scale){v=l.timeRuler.scale}var q=function(K,F){var B=30;switch(v){case"sixtyMinutes":case"hour":B=60;break;case"thirtyMinutes":case"halfHour":B=30;break;case"fifteenMinutes":case"quarterHour":B=15;break;case"tenMinutes":B=10;break;case"fiveMinutes":B=5;break}var I=K.getAttribute("data-date");var H=function(U,N,P){if(U&&(U.getAttribute("rowspan")==null||p=="agendaView")&&U.getAttribute("data-time-slot")==null){if(P<i.min||P>i.max){return}var S=i.rows;var R=i._lastSelectedCell;i._lastSelectedCell=U;if(s.shiftKey&&i._lastSelectedCell){if(!i.shiftSelectedCell){i.shiftSelectedCell=k}}else{if(!s.shiftKey){i.shiftSelectedCell=null}}if(!i.shiftSelectedCell){for(var Q=0;Q<S.length;Q++){var T=S[Q];if(T.element.getAttribute("data-group-row")){continue}for(var O=0;O<T.cells.length;O++){var N=T.cells[O];N.removeAttribute("data-selected","false")}}U.setAttribute("data-selected","true");i.focusedCell=U}else{if(U.getAttribute("data-end-date")&&i.shiftSelectedCell.getAttribute("data-end-date")){i.focusedCell=U;i._selectRange(U,i.shiftSelectedCell)}else{if(!U.getAttribute("data-end-date")&&!i.shiftSelectedCell.getAttribute("data-end-date")){i.focusedCell=U;i._selectRange(U,i.shiftSelectedCell)}else{i.focusedCell=R;i._lastSelectedCell=R}}}i._ensureVisible(i.focusedCell)}};var y=new a.jqx.date(I,i.timeZone);var z=K.getAttribute("data-view");switch(F){case"left":var M=i.rowByCell[K.getAttribute("data-key")];var E=M.indexOf(K);if(E>0){var C=M.cells[E-1];var J=new a.jqx.date(C.getAttribute("data-date"),i.timeZone)}H(C,K,J);break;case"right":var M=i.rowByCell[K.getAttribute("data-key")];var E=M.indexOf(K);if(E<M.cells.length-1){var C=M.cells[E+1];var J=new a.jqx.date(C.getAttribute("data-date"),i.timeZone)}H(C,K,J);break;case"up":var M=i.rowByCell[K.getAttribute("data-key")];var E=M.indexOf(K);var x=M.aboveRow;if(x){var C=x.cells[E];if(E==0&&C.getAttribute("rowspan")){var G=-1+i.rows.indexOf(M);var C=K;while(G>=0){if(i.rows[G].cells[0]==C){G--}else{C=i.rows[G].cells[0];break}}}var J=new a.jqx.date(C.getAttribute("data-date"),i.timeZone);H(C,K,J)}break;case"down":var M=i.rowByCell[K.getAttribute("data-key")];var E=M.indexOf(K);var D=M.belowRow;if(D){var C=D.cells[E];if(E==0&&C.getAttribute("rowspan")){var G=1+i.rows.indexOf(M);var C=K;while(G<i.rows.length){if(i.rows[G].cells[0]==C){G++}else{C=i.rows[G].cells[0];break}}}var J=new a.jqx.date(C.getAttribute("data-date"),i.timeZone);H(C,K,J)}break;case"home":var M=i.rowByCell[K.getAttribute("data-key")];var E=M.indexOf(K);var A=i.rows[0];var C=A.cells[E];var J=new a.jqx.date(C.getAttribute("data-date"),i.timeZone);H(C,K,J);break;case"end":var M=i.rowByCell[K.getAttribute("data-key")];var E=M.indexOf(K);var L=i.rows[i.rows.length-1];var C=L.cells[E];var J=new a.jqx.date(C.getAttribute("data-date"),i.timeZone);H(C,K,J);break}i._updateCellsSelection()};var u=function(){q(k,"home")};var b=function(){q(k,"end")};if(w==36||(m&&w==38)){u();return false}else{if(w==35||(m&&w==40)){b();return false}else{if(w==37){if(i.selectedAppointment){r(k,"left")}else{q(k,"left")}return false}else{if(w==38){if(i.selectedAppointment){r(k,"up")}else{q(k,"up")}return false}else{if(w==40){if(i.selectedAppointment){r(k,"down")}else{q(k,"down")}return false}else{if(w==39){if(i.selectedAppointment){r(k,"right")}else{q(k,"right")}return false}}}}}}},getSelectedCells:function(){var g=this;var h=g.rows;var f=h.length;var b=new Array();for(var e=0;e<f;e++){var d=h[e].cells;for(var c=0;c<d.length;c++){if(d[c].getAttribute("data-selected")){b.push(d[c])}}}return b.sort(function(i,j){return g._sortByDate(i,j)})},getSelection:function(){var e=this;var b=e.getSelectedCells();if(b.length==0){return null}var h=b[0].getAttribute("data-date");var g=b[b.length-1].getAttribute("data-date");var d=e.getMinutesPerScale();var c=e._views[e._view].type;if(c.toLowerCase().indexOf("month")>=0){d=0}if(b[0].getAttribute("data-end-date")){d=0}g=new a.jqx.date(g,e.timeZone).addMinutes(d);var c=parseInt(b[0].getAttribute("data-view"))-1;var f=e._resources[c];if(e._views[e._view].type.toLowerCase().indexOf("month")>=0){return{from:new a.jqx.date(h,e.timeZone),to:a.jqx.scheduler.utilities.getEndOfDay(g),resourceId:f}}if(e._views[e._view].type.toLowerCase().indexOf("day")>=0||e._views[e._view].type.toLowerCase().indexOf("week")>=0){h=new a.jqx.date(h,e.timeZone);if(g.minute()===0&&g.hour()===0&&h.hour()===0&&h.minute()===0){if(g.day()===h.day()){return{from:new a.jqx.date(h,e.timeZone),to:a.jqx.scheduler.utilities.getEndOfDay(g),resourceId:f}}else{return{from:new a.jqx.date(h,e.timeZone),to:a.jqx.scheduler.utilities.getEndOfDay(g).addDays(-1),resourceId:f}}}return{from:new a.jqx.date(h,e.timeZone),to:g,resourceId:f}}if(e._views[e._view].type.toLowerCase().indexOf("agenda")>=0){return{from:new a.jqx.date(h,e.timeZone),to:a.jqx.scheduler.utilities.getEndOfDay(g),resourceId:f}}},clearSelection:function(){var f=this;var g=f.rows;var e=g.length;for(var d=0;d<e;d++){var c=g[d].cells;for(var b=0;b<c.length;b++){c[b].removeAttribute("data-selected")}}f._updateCellsSelection()},_getvirtualcolumnsindexes:function(c,k,g,i,b){if(this.rtl){c=this.hScrollInstance.max-c}var d=0;var h=-1;var e=g+i;if(this.autorowheight){return{start:0,end:g+i}}if(!b){for(var f=0;f<g+i;f++){var l=f;if(!this.columns.records[f].hidden){d+=this.columns.records[f].width}if(d>=c&&h==-1){h=f}if(d>k+c){e=f;break}}}e++;if(e>g+i){e=g+i}if(h==-1){h=0}return{start:h,end:e}},_renderhorizontalscroll:function(){var k=this;var r=k.hScrollInstance;var s=r.value;if(k.hScrollBar[0].style.visibility==="hidden"){r.value=0;s=0}var d=parseInt(s);if(k.table==null){return}var j=function(i){if(i.parentNode&&i.parentNode.nodeName!="#document-fragment"){return true}return false};var q=k._getvirtualcolumnsindexes(d,k._hostWidth,0,k.columns.records.length,false);var l=q.start;var n=q.end;var b=k.rows;for(var m=0;m<l;m++){var h=m;var t=k.columns.records[h].element[0];if(j(t)){t.parentNode.removeChild(t)}}for(var m=n;m<k.columns.records.length;m++){var h=m;var t=k.columns.records[h].element[0];if(j(t)){t.parentNode.removeChild(t)}}for(var m=l;m<n;m++){var h=m;t=k.columns.records[h].element[0];if(!j(t)){k.columnsrow[0].appendChild(t)}}var o=k.columnsrow;var p=0;var e=k.columns.records.length-p;var c=k.columns.records;var f=k.source.records.length==0;if(k.rtl){if(k.hScrollBar.css("visibility")!="hidden"){d=r.max-d}}k.table[0].style.left=-d+"px";if(k.pinnedtable[0].style.display=="block"){k.pinnedtable[0].style.left=-d+"px"}if(k._resources.length>0&&k.tableRows>0){for(var u=0;u<this.table[0].rows.length;u++){var g=this.table[0].rows[u];if(g.getAttribute("data-group-row")){a(g).find("span").css("left",5+d)}}}o[0].style.marginLeft=-d+"px"},_getDayName:function(b,d){if(b>=7){b-=7}if(!d){d=this.dayNameFormat;if(this.isTouchDevice()){d=this.touchDayNameFormat}}var c=this.schedulerLocalization.days.names[b];switch(d){case"full":c=this.schedulerLocalization.days.names[b];break;case"abbr":c=this.schedulerLocalization.days.namesAbbr[b];break;case"shortest":c=this.schedulerLocalization.days.namesShort[b];break;case"firstTwoLetters":c=c.substring(0,2);break;case"firstLetter":c=c.substring(0,1);break}return c},_initializeColumns:function(){if(this._views.length===0){this._views.push({type:"dayView"})}if(!this._views[this._view]){throw new Error("jqxScheduler: View is undefined. You need to define the View in the Views Array when you create jqxScheduler")}var p=this._views[this._view].type;var m=this._views[this._view];if(m.timeSlotWidth){m.timeSlotWidth=Math.max(m.timeSlotWidth,30);m.columnWidth=m.timeSlotWidth}if(m.columnWidth){if(m.columnWidth<30){m.columnWidth=30}}if(this.columns&&this.columns.records){for(var z=0;z<this.columns.records.length;z++){this._removecolumnhandlers(this.columns.records[z])}}this.columns=new Array();var B=new Array();var h=this;var q=function(H,N){var I="halfHour";if(m.timeRuler&&m.timeRuler.scale){I=m.timeRuler.scale}var Q=24;var G=0;var P=23;if(m.timeRuler){if(m.timeRuler.scaleStartHour!=undefined){var G=parseInt(m.timeRuler.scaleStartHour)}if(m.timeRuler.scaleEndHour!=undefined){var P=parseInt(m.timeRuler.scaleEndHour)}if(G<0){G=0}if(P<0){P=23}if(G>23){G=0}if(P>23){P=23}Q=P-G+1}var K=60;var O=2;if(I){switch(I){case"sixtyMinutes":case"hour":O=1;break;case"thirtyMinutes":case"halfHour":O=2;break;case"fifteenMinutes":case"quarterHour":O=4;break;case"tenMinutes":O=6;break;case"fiveMinutes":O=12;break}}var S=new Array();var R="auto";if(m.timeRuler&&m.timeRuler.formatString){R=m.timeRuler.formatString}var F=G;var L=Q;var D=H.addHours(F);var j="auto";if(m.columnWidth){j=O*m.columnWidth}else{j=O*80}for(var M=0;M<L;M++){var E=D.toDate();if(R==="auto"){if((E.getHours()==0&&E.getMinutes()==0)||(E.getHours()==12&&E.getMinutes()==0)){var J="hh tt"}else{var J="hh:mm"}}else{if(a.isFunction(R)){var J=R(E)}else{J=R}}if(a.jqx.dataFormat.isDate(E)){E=a.jqx.dataFormat.formatdate(E,J,h.schedulerLocalization)}D=D.addMinutes(K,false);h.columns.push({columnGroup:N,text:E,minwidth:30,width:j})}};for(var x=0;x<this.tableColumns;x++){if(this.tableColumns>1){var f=h._resources[x]?h._resources[x]:"Resource"+x;B.push({text:f,name:f})}var w="left";if(this.rtl){w="right"}switch(p){case"dayView":var g=this.getViewStart();if(false===m.showWeekends){if(g.dayOfWeek()===0||g.dayOfWeek()===6){g=g.addDays(1)}if(g.dayOfWeek()===0||g.dayOfWeek()===6){g=g.addDays(1)}}var v="auto";if(m&&m.columnWidth){v=m.columnWidth}var f=h._resources[x]?h._resources[x]:"Resource"+x;this.columns.push({align:w,width:v,columnGroup:f,text:this._getDayName(g.dayOfWeek())});break;case"weekView":case"monthView":for(var z=0;z<7;z++){var y=this.schedulerLocalization.firstDay+z;if(y>6){y=0}if(false===m.showWeekends){if(y===0||y===6){continue}}var v="auto";if(m&&m.columnWidth){v=m.columnWidth}var f=h._resources[x]?h._resources[x]:"Resource"+x;this.columns.push({align:p=="weekView"?w:"center",width:v,columnGroup:f,text:this._getDayName(y)})}break;case"timelineDayView":var f=h._resources[x]?h._resources[x]:"Resource"+x;q(h.getViewStart(),f);break;case"timelineWeekView":for(var z=0;z<7;z++){var y=this.schedulerLocalization.firstDay+z;if(false===m.showWeekends){if(z===0||z===6){continue}}var f=h._resources[x]?h._resources[x]:"Resource"+x;B.push({align:h.rtl?"right":"left",parentGroup:f,name:this._getDayName(y)+x,text:this._getDayName(y)});q(h.getViewStart().addDays(z),this._getDayName(y)+x)}break;case"timelineMonthView":var k=h.getViewStart();var A="auto";if(m.timeRuler&&m.timeRuler.formatString){A=m.timeRuler.formatString}for(var z=0;z<41;z++){var y=k.dayOfWeek();if(false===m.showWeekends){if(y===0||y===6){continue}}var v="auto";if(m.columnWidth){v=m.columnWidth}else{v=100}var r=k.toDate();if(A==="auto"){var c="dd";r=k.toDate();if(r.getDate()===1){c="MMM dd"}}else{if(a.isFunction(A)){var c=A(r)}else{c=A}}if(a.jqx.dataFormat.isDate(r)){r=a.jqx.dataFormat.formatdate(r,c,h.schedulerLocalization)}k=k.addDays(1);var f=h._resources[x]?h._resources[x]:"Resource"+x;h.columns.push({minwidth:30,columnGroup:f,text:r,width:v})}break;case"agendaView":var l=m.dateColumnWidth;var u=m.timeColumnWidth;var o=m.appointmentColumnWidth;if(!o){o="70%"}if(!u){u="auto"}if(!l){l="auto"}h.columns.push({text:h.schedulerLocalization.agendaDateColumn,width:l});h.columns.push({text:h.schedulerLocalization.agendaTimeColumn,width:u});h.columns.push({text:h.schedulerLocalization.agendaAppointmentColumn,width:o});break}}if(B.length>0){this.columnGroups=B}var h=this;var s=new a.jqx.schedulerDataCollection(this.element);var d=0;this._columns=this.columns;var C="left";var e=new a.jqx.scheduler.column(h,this);e.visibleindex=d++;e.text="";e.width=h.timeRulerWidth;e.editable=false;e.timeColumn=true;C="left";e.text="";e.hidden=false;e.width=h.timeRulerWidth;var b=false;if(m.timeRuler&&(p==="dayView"||p==="weekView")){e._text=m.timeRuler.text||"";C=m.timeRuler.position||"left";e.hidden=m.timeRuler.hidden||false;e.width=m.timeRuler.width||h.timeRulerWidth;if(m.timeRuler.timeZones){b=true}}else{if(p!=="dayView"&&p!=="weekView"){e.hidden=true}}var n=function(i){var j=new a.jqx.scheduler.column(h,h);j.visibleindex=d++;j.text="";j.width=h.timeRulerWidth;j.editable=false;j.timeColumn=true;C="left";j.text="";j.hidden=false;j.timeZone=m.timeRuler.timeZones[i].id;j.width=h.timeRulerWidth;if(m.timeRuler&&(p==="dayView"||p==="weekView")){j._text=m.timeRuler.timeZones[z].text||"";j.hidden=m.timeRuler.hidden||false;j.width=m.timeRuler.width||h.timeRulerWidth;s.add(j)}};if(C==="left"&&(p==="dayView"||p==="weekView")){if(m.timeRuler&&m.timeRuler.timeZones){for(var z=0;z<m.timeRuler.timeZones.length;z++){n(z)}}s.add(e)}if(C==="left"&&p==="monthView"&&m.showWeekNumbers){e.hidden=false;s.add(e)}var t=new Array();a.each(this.columns,function(i){if(h.columns[i]!=undefined){var j=new a.jqx.scheduler.column(h,this);j.visibleindex=d++;s.add(j)}});if(C==="right"&&(p==="dayView"||p==="weekView")){if(m.timeRuler){for(var z=0;z<m.timeRuler.timeZones.length;z++){n(z)}}s.add(e)}if(C==="right"&&p==="monthView"&&m.showWeekNumbers){e.hidden=false;s.add(e)}if(this.rtl){s.records.reverse()}this.columns=s},_getColumnsLengthPerView:function(){var b=this._views[this._view].type;var d=this._views[this._view];var c=1;switch(b){case"dayView":c=1;break;case"weekView":if(d.showWeekends!==false){c=7}else{c=5}break;case"monthView":if(d.showWeekends!==false){c=7}else{c=5}break;case"timelineDayView":case"timelineWeekView":case"timelineMonthView":c=this.columns.records.length;break;case"agendaView":c=this.columns.records.length;break}return c},escape_HTML:function(b){if(!b){return b}if(!b.replace){return b}return b.replace(/[&<>"]/g,function(d){var c={"&":"&","<":"<",">":">",'"':'"'};return c[d]||d})},_renderagenda:function(){var ab=this;var h=ab._views[ab._view].type;var aa=ab._views[ab._view];var K=ab.getViewStart();var af=a.jqx.scheduler.utilities.getEndOfDay(ab.getViewEnd().addDays(-1));ab._prepareAppointmentsInView(K,af);var R=ab.appointmentsToRender.length;var al=new Array();var aj=0;for(var at=0;at<ab.appointmentsToRender.length;at++){var q=ab.appointmentsToRender[at];var au=q.from.clearTime();while(au<a.jqx.scheduler.utilities.getEndOfDay(q.to)){var d=au.toString();if(!al[d]){al[d]={date:au,appointments:new Array()};al[d].appointments.push(q);al[al.length]=al[d];aj++}else{al[d].appointments.push(q);aj++}au=au.addDays(1).clearTime()}}var O=0;var N=0;ab.rows=new Array();var av=a.jqx.browser.msie&&a.jqx.browser.version<8;var F=0;var ax=0;var ap=ab.rtl?" "+ab.toTP("jqx-grid-table-rtl"):"";var Z=0;var v="<table cellspacing='0' cellpadding='0' class='"+ab.toTP("jqx-grid-table")+ap+"' id='table"+ab.element.id+"'><colgroup>";var G=ab.columns.records.length;for(var aq=0;aq<G;aq++){var X=ab.columns.records[aq];if(X.hidden){F++;continue}var c=X.width;if(c<X.minwidth){c=X.minwidth}if(c>X.maxwidth){c=X.maxwidth}c-=ax;if(c<0){c=0}if(av){var ae=c;if(aq==F){ae++}v+="<col style='max-width: "+ae+"px; width: "+ae+"px;'>"}else{v+="<col style='max-width: "+c+"px; width: "+c+"px;'>"}Z+=c}v+="</colgroup>";if(R==0){var l='<tr role="row">';var f=this.host.height();var U=0;if(!ab.columnGroups){U+=ab.showHeader?ab.columnsHeight:0}else{U+=ab.showHeader?ab.columnsheader.height():0}if(ab.showToolbar){U+=ab.toolbarHeight}if(ab.showLegend&&ab._resources.length>0){U+=ab.legendHeight}f-=U;var e='<td data-date="'+K.toString()+'" colspan="'+this.columns.records.length+'" role="gridcell" style="border: none; min-height: '+f+"px; height: "+f+"px; max-width:"+Z+"px; width:"+Z+"px;";var E=this.toTP("jqx-cell")+" "+this.toTP("jqx-grid-cell")+" "+this.toTP("jqx-item");E+=" "+this.toTP("jqx-center-align");e+='" class="'+E+'">';e+=this.schedulerLocalization.emptyDataString;e+="</td>";l+=e;l+="</tr>";v+=l;this.table[0].style.width=Z+2+"px";N=Z}var k=ab.rowsHeight;if(ab.isTouchDevice()){k=ab.touchRowsHeight}for(var at=0;at<al.length;at++){var H=at;var au=al[at];for(var ai=0;ai<au.appointments.length;ai++){var m=0;var l='<tr data-key="'+H+'" role="row">';O=0;var u=au.appointments[ai];for(var aq=0;aq<G;aq++){var ah=ab.columns.records[aq];var ao=aq;if(ab.rtl){ao=G-1-aq}var c=ah.width;if(c<ah.minwidth){c=ah.minwidth}if(c>ah.maxwidth){c=ah.maxwidth}c-=ax;if(c<0){c=0}var E=ab.toTP("jqx-cell")+" "+ab.toTP("jqx-grid-cell")+" "+ab.toTP("jqx-item");if(ab.rtl){E+=" "+ab.toTP("jqx-cell-rtl")}var J="";var H=ab.dataview.generatekey();var s=-1;var g=au.date;var f=k+"px";var e='<td data-key="'+H+'" data-view="'+(s)+'" data-date="'+g.toString()+'" role="gridcell" '+J+' style="max-width:'+c+"px; width:"+c+"px; height: "+f+"; min-height: "+k+"px;";if(ao==0&&ai==0){var M=au.appointments.length;var e='<td rowspan="'+M+'" data-key="'+H+'" data-view="'+(s)+'" data-date="'+g.toString()+'" role="gridcell" '+J+' style="max-width:'+c+"px; width:"+c+"px;  min-height: "+k+"px;";E+=" "+ab.toTP("jqx-center-align")}else{if(ao==0){O++;continue}}if(ab.rtl&&ao==1){E+=" "+ab.toTP("jqx-right-align")}if(!(ah.hidden)){m+=ax+c;if(O==0&&!ab.rtl){e+="border-left-width: 0px;"}else{e+="border-left-width: 1px;"}O++}else{e+="display: none;";ab._hiddencolumns=true}e+='" class="'+E+'">';var an="";if(ao==0&&ai==0){var D=g.toString("dddd",ab.schedulerLocalization);var am=g.toString("MMMM, yyyy",ab.schedulerLocalization);var ar=ab.toTP("jqx-scheduler-agenda-date");var o=ab.toTP("jqx-scheduler-agenda-day");var n=ab.toTP("jqx-scheduler-agenda-week");an='<div class="'+ar+'"><strong class="'+o+'">'+g.day()+'</strong><br/><em class="'+n+'">'+D+'</em><br/><span class="'+ar+'">'+am+"</span></div>"}if(ao==1){var Q="auto";var aa=this._views[this._view];var z=u.from;var ay=u.to;if(aa.timeRuler&&aa.timeRuler.formatString){Q=aa.timeRuler.formatString}var ad=Q;var I=Q;if(Q==="auto"){if((z.hour()==0&&z.minute()==0)||(z.hour()==12&&z.minute()==0)){var ad="hh tt"}else{var ad="hh:mm"}if((ay.hour()==0&&ay.minute()==0)||(ay.hour()==12&&ay.minute()==0)){var I="hh tt"}else{var I="hh:mm"}}var ar=ab.toTP("jqx-scheduler-agenda-time");if(u.allDay){an="<span class='"+ar+"'>"+ab.schedulerLocalization.agendaAllDayString+"</span>"}else{if(!ab.rtl){an="<span class='"+ar+"'>"+z.toString(ad,ab.schedulerLocalization)+" - "+ay.toString(I,ab.schedulerLocalization)+"</span>"}else{an="<span class='"+ar+"'>"+ay.toString(I,ab.schedulerLocalization)+" - "+z.toString(ad,ab.schedulerLocalization)+"</span>"}}}else{if(ao==2){if(u.resourceId){a.each(ab._resources,function(r,x){if(u.resourceId==x){var i=ab.getColors(r);var j=this.toString();var w=ab.toTP("jqx-scheduler-agenda-appointment-resource jqx-scheduler-legend");if(ab.rtl){var w=ab.toTP("jqx-scheduler-agenda-appointment-resource-rtl jqx-scheduler-legend")}var t="<div data-key='"+u.id+"' class='"+w+"' style='margin-right: 5px; border-color: "+i.border+"; background: "+i.background+";' class='"+ab.toThemeProperty("jqx-scheduler-legend")+"'></div>";an=t}})}var W=u.subject?u.subject:"(No Title)";var C=u.location;var y=u.description;var T=u.status?ab.schedulerLocalization.editDialogStatuses[u.status]:"";var b=u.isRecurrentAppointment();var B=u.isException();var Y=""+ab.schedulerLocalization.editDialogSubjectString+": "+W+"";if(C){Y+="\n"+ab.schedulerLocalization.editDialogLocationString+": "+C+""}if(y){Y+="\n"+ab.schedulerLocalization.editDialogDescriptionString+": "+y+""}if(T){Y+="\n"+ab.schedulerLocalization.editDialogStatusString+": "+T+""}if(b){Y+="\n"+ab.schedulerLocalization.editDialogRepeatString+": "+b+""}var ar=ab.toTP("jqx-scheduler-agenda-appointment jqx-scheduler-legend-label");if(ab.rtl){var ar=ab.toTP("jqx-scheduler-agenda-appointment-rtl jqx-scheduler-legend-label")}an+="<span data-key='"+u.id+"' title='"+ab.escape_HTML(Y)+"' class='"+ar+"'>"+ab.escape_HTML(W)+"</span>"}}e+=an;e+="</td>";l+=e}if(N==0){ab.table[0].style.width=m+2+"px";ab.pinnedtable[0].style.width=m+2+"px";N=m}l+="</tr>";v+=l}}v+="</table>";ab.table.html(v);ab.pinnedtable.html(v);ab.pinnedtable[0].style.display="none";var ag=a(ab.table[0].firstChild);var V=a(ab.pinnedtable[0].firstChild);ab._table=ag;ab._pinnedtable=V;if(a.jqx.browser.msie&&a.jqx.browser.version<10){ab._table[0].style.width=N+"px";ab._pinnedtable[0].style.width=N+"px"}if(R===0){ab._table[0].style.width=(2+N)+"px";ab._pinnedtable[0].style.width=(2+N)+"px";ab._pinnedtable[0].style.display="none"}ab._pinnedtable[0].style.display="none";ab._table.addClass("jqx-grid-table-one-cell jqx-disableselect");ab.table[0].rows=ab.table[0].firstChild.rows;ab.rowByCell=new Array();ab.columnCells=new Array();function p(){var i={};i.cells=new Array();i.indexOf=function(j){for(var r=0;r<i.cells.length;r++){if(i.cells[r].getAttribute("data-key")==j.getAttribute("data-key")){return r}}return -1};return i}ab.cellWidth=0;ab.cellHeight=0;var L=ab.table[0].rows.length;for(var at=0;at<L;at++){var ak=ab.table[0].rows[at];if(ak.getAttribute("data-group-row")){continue}var A=new p();A.aboveRow=null;A.belowRow=null;if(ab.rows.length>0){A.aboveRow=ab.rows[ab.rows.length-1];ab.rows[ab.rows.length-1].belowRow=A}A.element=ak;ab.rows.push(A);var S=false;for(var aq=0;aq<ak.cells.length;aq++){if(ak.cells.length<ab.columns.records.length&&!S){var ac=at;while(ac>=0){var aw=ab.table[0].rows[ac];if(ab.table[0].rows[ac].cells.length==ab.columns.records.length){var P=aw.cells[0];if(!ab.columnCells[A.cells.length]){ab.columnCells[A.cells.length]=new Array()}ab.columnCells[A.cells.length].push(P);if(ab.cellWidth==0){ab.cellWidth=P.clientWidth}if(ab.cellHeight==0&&(L==1||at>1)){ab.cellHeight=P.clientHeight}A.cells.push(P);S=true;break}ac--}}var P=ak.cells[aq];if(P.style.display==="none"){continue}if(P.className.indexOf("jqx-grid-cell-pinned")>=0){continue}if(!ab.columnCells[A.cells.length]){ab.columnCells[A.cells.length]=new Array()}ab.columnCells[A.cells.length].push(P);if(ab.cellWidth==0){ab.cellWidth=P.clientWidth}if(ab.cellHeight==0&&(L==1||at>1)){ab.cellHeight=P.clientHeight}A.cells.push(P);ab.rowByCell[P.getAttribute("data-key")]=A}}if(R===0){ab._table[0].style.tableLayout="auto"}ab._updateScrollbars(ab.host.height());ab._arrange();if(ab.rendered){ab.rendered()}ab.renderedTime=new Date()},_renderrows:function(){var V=this;if(V._loading){return}if(V._updating||V._appupdating){return}if(V.rendering){V.rendering()}var V=this;var aF=V._views[V._view].type;var G=V._views[V._view];if(aF=="agendaView"){V._renderagenda();return}var az=1;var d=V.getViewStart();var aN=a.jqx.scheduler.utilities.getEndOfDay(V.getViewEnd());V._prepareAppointmentsInView(d,aN);var N=new Array();if(aF==="weekView"||aF==="dayView"){var az=V.getMaxAllDayAppointments(V.appointmentsToRender)}else{if(aF==="monthView"&&G.monthRowAutoHeight&&V.rows&&V.rows.length==6){N=V._getMonthAppointmentsPerWeek()}}var aa=V.tableRows>1?V.tableRows:0;var aL="halfHour";var B=null;var aQ;if(G.rowHeight){B=G.rowHeight}if(G&&G.allDayRowHeight){aQ=G.allDayRowHeight}if(G.timeRuler&&G.timeRuler.scale){aL=G.timeRuler.scale}var aM=0;V.table[0].rows=new Array();V.rows=new Array();var a5=V.toTP("jqx-cell")+" "+V.toTP("jqx-widget-content");if(V.rtl){a5+=" "+V.toTP("jqx-cell-rtl")}var b=V.columns.records.length;var av=V._getColumnsLengthPerView();var W=a.jqx.browser.msie&&a.jqx.browser.version<8;if(W){V.host.attr("hideFocus","true")}V._lastSelectedCell=null;V.focusedCell=null;var E=new Array();var aD=V.source.records;aD=V.dataview.evaluate(aD);V.dataViewRecords=aD;V.cells=new Array();var E=V.dataViewRecords;V.renderedRecords=V.getRows();var aZ=V.tableZIndex;var ai=V.getRows().length;var o=0;var aH=0;if(W){for(var X=0;X<b;X++){var ac=V.columns.records[X];var aK=ac.width;if(aK<ac.minwidth){aK=ac.minwidth}if(aK>ac.maxwidth){aK=ac.maxwidth}var aJ=a('<table><tr><td role="gridcell" style="max-width: '+aK+"px; width:"+aK+'px;" class="'+a5+'"></td></tr></table>');a(document.body).append(aJ);var at=aJ.find("td");o=1+parseInt(at.css("padding-left"))+parseInt(at.css("padding-right"));aJ.remove();break}}var K=V.rtl?" "+V.toTP("jqx-grid-table-rtl"):"";var H="<table cellspacing='0' cellpadding='0' class='"+V.toTP("jqx-grid-table")+K+"' id='table"+V.element.id+"'><colgroup>";var aY=0;var a4=b;var aS=2;var an=30;switch(aL){case"sixtyMinutes":case"hour":an=60;aS=1;break;case"thirtyMinutes":case"halfHour":an=30;aS=2;break;case"fifteenMinutes":case"quarterHour":an=15;aS=4;break;case"tenMinutes":an=10;aS=6;break;case"fiveMinutes":an=5;aS=12;break}var a3=1;if(aF==="timelineDayView"||aF==="timelineWeekView"){b=aS*b;a3=aS;av=b/V.tableColumns}else{if(aF==="timelineMonthView"){av=b/V.tableColumns}else{if(aF==="monthView"){if(G.showWeekNumbers){av=(b-V.tableColumns)/V.tableColumns}else{av=b/V.tableColumns}}}}var g=function(i){var c=V.columns.records[i];if(c){return c}while(i>=V.columns.records.length){i-=V.columns.records.length}var c=V.columns.records[i];return c};for(var X=0;X<b;X++){var ac=g(X);if(ac.hidden){aY++;a4--;continue}var aK=ac.width/a3;if(aK<ac.minwidth){aK=ac.minwidth/a3}if(aK>ac.maxwidth){aK=ac.maxwidth/a3}aK-=o;if(aK<0){aK=0}if(aF=="monthView"&&V.rtl&&ac.timeColumn){aK++}if(W){var P=aK;if(X==aY){P++}H+="<col style='max-width: "+P+"px; width: "+P+"px;'>"}else{H+="<col style='max-width: "+aK+"px; width: "+aK+"px;'>"}aH+=aK}H+="</colgroup>";V._hiddencolumns=false;if(ai===0){var u='<tr role="row">';var z=V.host.height();if(V.pageable){z-=V.pagerHeight;if(V.pagerPosition==="both"){z-=V.pagerHeight}}z-=V.columnsHeight;if(V.showLegend&&V._resources.length>0){z-=V.legendHeight}if(z<25){z=25}if(V.hScrollBar[0].style.visibility!="hidden"){z-=V.hScrollBar.outerHeight()}if(V.height==="auto"||V.height===null||V.autoheight){z=300}var aJ='<td colspan="'+V.columns.records.length+'" role="gridcell" style="border: none; min-height: '+z+"px; height: "+z+"px; max-width:"+aH+"px; width:"+aH+"px;";var a5=V.toTP("jqx-cell")+" "+V.toTP("jqx-grid-cell")+" "+V.toTP("jqx-item");if(V.rtl){a5+=" "+V.toTP("jqx-cell-rtl")}a5+=" "+V.toTP("jqx-center-align");aJ+='" class="'+a5+'">';aJ+=V.schedulerLocalization.emptyDataString;aJ+="</td>";u+=aJ;H+=u;V.table[0].style.width=aH+2+"px";aM=aH}var au=V.getRows();var d=V.getViewStart();var z=V._hostHeight?V._hostHeight:V.host.height();var a2=0;if(!V.columnGroups){a2+=V.showHeader?V.columnsHeight:0}else{a2+=V.showHeader?V.columnsheader.height():0}if(V.showToolbar){a2+=V.toolbarHeight}if(V.showLegend&&V._resources.length>0){a2+=V.legendHeight}var f=V.showAllDayRow;var m=23;if(G.resourceHeaderRowHeight){m=G.resourcesRowHeight}m+=2;if(G.showAllDayRow!=undefined){f=G.showAllDayRow}var h=V._columnswidth>V._hostWidth;var al=h?(3+V.scrollBarSize):0;var ag=V.tableRows>1?V.resources.unitsInView:1;if(ag==undefined){ag=V._resources.length}if(V.resources&&V.resources.resourceRowHeight){B=V.resources.resourceRowHeight}if(B==null||B=="auto"){var p=V.rowsHeight;var ap=3*p;if(V.isTouchDevice()){p=V.touchRowsHeight;var ap=22+p}if(V.tableRows==1){B=z>0?(z-a2):p;if(V.columns.records.length>10){B=z>0?(z-V.scrollBarSize-5-a2):p}}else{B=z>0?(z-a2-m)/(ai):p;if(V.columns.records.length>10){B=z>0?(z-V.scrollBarSize-5-a2-ag*m)/(ag*ai):p}}if(aF==="dayView"||aF==="weekView"){if(f){if(aQ==null||aQ=="auto"){B=z>0?(z-a2)/(V.tableRows*(ai)):ap;aQ=B}else{B=z>0?(z-a2-aQ-ag*m)/(ag*(ai-1)):p}}}else{if(aF==="monthView"){if(V.hScrollBar[0].style.visibility=="hidden"){al=0}if(V.tableRows==1){B=z>0?(z-a2-al)/ai:p}else{B=z>0?(z-a2-m-al)/(ai):p}}}B=Math.max(p,B);if(!aQ){aQ=ap}aQ=Math.max(ap,aQ);V._allDayRowHeight=aQ;V._defaultRowHeight=p;aQ=az*(p-2);aQ=Math.max(ap,17+aQ);V._allDayRowFullHeight=aQ;if(G.allDayRowHeight){V._allDayRowHeight=G.allDayRowHeight;aQ=az*(G.allDayRowHeight-2);V._allDayRowFullHeight=aQ}}var aB=new Array();if(V.resources&&V.resources.colorScheme){for(var ao=0;ao<V.colorSchemes.length;ao++){if(V.colorSchemes[ao].name==V.resources.colorScheme){aB=V.colorSchemes[ao].colors;break}}while(V._resources.length>aB.length-1){var aW=parseInt(V.resources.colorScheme.substring(6));if(aW>=27){aW=0}aB=aB.concat(V.colorSchemes[aW].colors);aW++}}for(var aE=0;aE<V.tableRows;aE++){var aq=0;var S=0;var e=23;if(G.timeRuler&&G.timeRuler.scaleStartHour!=undefined){var S=parseInt(G.timeRuler.scaleStartHour)}if(G.timeRuler&&G.timeRuler.scaleEndHour!=undefined){var e=parseInt(G.timeRuler.scaleEndHour)}var A=d;if(false===G.showWeekends){if(A.dayOfWeek()==0||A.dayOfWeek()==6){A=A.addDays(1)}}var ar=new Array();var k=aF!="monthView"&&aF!="timelineDayView"&&aF!="timelineWeekView"&&aF!="timelineMonthView"&&f?1:0;if(V.tableRows>1){var u='<tr data-group-row="true" role="row">';var a5=V.toTP("jqx-cell")+" "+V.toTP("jqx-grid-cell")+" "+V.toTP("jqx-item");if(V.rtl){a5+=" "+V.toTP("jqx-cell-rtl")}if(!W){a5+=" "+V.toTP("jqx-grid-cell-pinned");Z+=' colspan="'+b+'"';var P=0;for(var Q=0;Q<b;Q++){var ab=g(Q);var ak=ab.width/a3;if(ak<ab.minwidth){aK=ab.minwidth/a3}if(ak>ab.maxwidth){aK=ab.maxwidth/a3}ak-=o;if(ak<0){ak=0}if(!ab.hidden){P+=ak}}aK=P}else{a5+=" "+V.toTP("jqx-grid-cell-pinned")}var aJ='<td style="height:'+m+"px;";if(X==b-1&&b==1&&!V.rtl){aJ+="border-right-color: transparent;"}if(V._resources.length>0&&V.resources.colorScheme&&V.resources.orientation!="none"){var aO="";var y="";var D="";var L=function(i){var c=105;var j=(i.r*0.299)+(i.g*0.587)+(i.b*0.114);var q=(255-j<c)?"Black":"White";return q};aO=aB[aE];aO=V.hexToRgba(aB[aE],0.7).toString();D=L(V.hexToRgba(aB[aE],0.7));y=aB[aE];aJ+="background: "+aO+";";aJ+="border-color: "+y+";";aJ+="color: "+D+";"}aJ+='" class="'+a5+'" role="gridcell" '+Z+"";var aX=V._resources[aE];aJ+="><span style='position: relative;'>"+aX+"</span>";aJ+="</td>";u+=aJ;H+=u}for(var Y=0;Y<ai;Y++){var aI={};var am="jqx"+V.element.id+"_"+Y;aI.uid=am;var u='<tr data-key="'+am+'" role="row">';var ad=0;var x=0;if(ar[0]&&Y>k){var an=30;if(aF!="monthView"){switch(aL){case"sixtyMinutes":case"hour":an=60;break;case"thirtyMinutes":case"halfHour":an=30;break;case"fifteenMinutes":case"quarterHour":an=15;break;case"tenMinutes":an=10;break;case"fiveMinutes":an=5;break}for(var T=0;T<b;T++){ar[T]=ar[T].addMinutes(an,false)}}else{for(var T=0;T<b;T++){ar[T]=ar[T].addDays(7,false)}}}var ax=0;var ae=1;var aj=0;if(G.showWeekends||G.showWeekends==undefined){aj=(V.columns.records.length)/(7*V.tableColumns);aj*=aS}else{aj=(V.columns.records.length)/(5*V.tableColumns);aj*=aS}var aw=0;if(V.rtl){aw=1}var aU=0;for(var X=0;X<b;X++){var R=g(X);if(ax>=av){ax=0;aU=0;aw=0;if(V.rtl){aw=1}ae++}if(!ar[X]){if(!V.rtl){if(aF.toString().indexOf("timelineDayView")>=0){var I=X;ar[X]=A.addHours(S).addMinutes(I*an,false)}else{if(aF.toString().indexOf("timelineWeekView")>=0){ar[X]=A.addDays(aU).addHours(S,false).addMinutes(aw*an,false)}else{ar[X]=A.addDays(ax).addHours(S,false)}}if(V.timeZone){ar[X].timeZone=V.timeZone}}else{if(aF.toString().indexOf("timelineDayView")>=0){var I=1+X;ar[X]=A.addHours(1+e).addMinutes(-I*an,false)}else{if(aF.toString().indexOf("timelineWeekView")>=0){if(G.showWeekends||G.showWeekends==undefined){ar[X]=A.addDays(6-aU).addHours(1+e,false).addMinutes(-aw*an,false)}else{ar[X]=A.addDays(4-aU).addHours(1+e,false).addMinutes(-aw*an,false)}}else{if(aF=="dayView"||aF=="monthView"||aF=="weekView"){if(G.showWeekends||G.showWeekends==undefined){ar[X]=A.addDays(6-ax).addHours(S,false)}else{ar[X]=A.addDays(4-ax).addHours(S,false)}}else{ar[X]=A.addDays(av-ax-1).addHours(S,false)}}}if(V.timeZone){ar[X].timeZone=V.timeZone}}}aw++;if(aw>=aj){aw=0;aU++}if(!R.timeColumn&&(aF==="dayView"||aF==="weekView")){ax++}else{if(!R.timeColumn&&(aF==="monthView"&&G.showWeekNumbers)){ax++}else{if((aF==="monthView"&&!(G.showWeekNumbers))||aF==="timelineMonthView"){ax++}else{if(aF=="timelineDayView"||aF=="timelineWeekView"){ax++}}}}var C=ar[X];var aK=R.width/a3;if(aK<R.minwidth){aK=R.minwidth/a3}if(aK>R.maxwidth){aK=R.maxwidth/a3}aK-=o;if(aK<0){aK=0}var a5=V.toTP("jqx-cell")+" "+V.toTP("jqx-grid-cell")+" "+V.toTP("jqx-item");if(R.pinned){a5+=" "+V.toTP("jqx-grid-cell-pinned")}if(V.sortcolumn===R.displayfield){a5+=" "+V.toTP("jqx-grid-cell-sort")}if(V.altRows&&Y%2!=0){a5+=" "+V.toTP("jqx-grid-cell-alt")}if(Y==0&&f&&(aF==="dayView"||aF==="weekView")){a5+=" "+V.toTP("jqx-grid-cell-alt")}if(C>V.max||C<V.min){a5+=" "+V.toTP("jqx-scheduler-disabled-cell")}if(V.rtl){a5+=" "+V.toTP("jqx-cell-rtl")}var Z="";var am=V.dataview.generatekey();var aG=aE+ae;if(V.resources&&V.resources.orientation=="none"){aG=-1}if(V._resources.length==0){aG=-1}var aJ='<td data-key="'+am+'" data-view="'+(aG)+'" data-date="'+C.toString()+'" role="gridcell" '+Z+' style="max-width:'+aK+"px; width:"+aK+"px;  height:"+B+"px;";if(Y==0&&f&&(aF==="dayView"||aF==="weekView")){var aJ='<td  data-key="'+am+'" data-view="'+(aG)+'" data-end-date="'+a.jqx.scheduler.utilities.getEndOfDay(C).toString()+'" data-date="'+C.clearTime().toString()+'" role="gridcell" '+Z+' style="max-width:'+aK+"px; width:"+aK+"px; height:"+aQ+"px;"}if(aF=="monthView"&&G.monthRowAutoHeight&&N.length>0){if(N[Y]&&N[Y]!="auto"){if(B<N[Y]){var aJ='<td data-key="'+am+'" data-view="'+(aG)+'" data-date="'+C.toString()+'" role="gridcell" '+Z+' style="max-width:'+aK+"px; width:"+aK+"px;  height:"+N[Y]+"px;"}}}if(V.date.month()!=C.month()&&aF==="monthView"&&!G.showOtherMonthDays){}if(V.resources&&V._resources.length>0&&V.resources.colorScheme&&V.resources.orientation!=="none"){var aO="";var y="";aO=aB[aE+ae-1];if(!(Y==0&&f&&(aF==="dayView"||aF==="weekView"))){aO=V.hexToRgba(aB[aE+ae-1],0.3).toString()}else{aO=V.shadeColor(aB[aE+ae-1],0.3).toString()}if(!(Y==0&&f&&(aF==="dayView"||aF==="weekView"))){if(aF.indexOf("month")==-1){if(!R.timeColumn){if(G.showWorkTime!==false){var O=1;var J=5;var ay=8;var l=18;if(G.workTime){var O=G.workTime.fromDayOfWeek?G.workTime.fromDayOfWeek:0;var J=G.workTime.toDayOfWeek?G.workTime.toDayOfWeek:0;var ay=G.workTime.fromHour!==undefined?G.workTime.fromHour:8;var l=G.workTime.toHour?G.workTime.toHour:8}if(C.dayOfWeek()>=O&&C.dayOfWeek()<=J){if(C.hour()>=ay&&C.hour()<l){aO=V.hexToRgba(aB[aE+ae-1],0.1).toString()}}}}}}y=aB[ae+aE-1];aJ+="background: "+aO+";";aJ+="border-color: "+y+";"}if(X==b-1&&b==1&&!V.rtl){aJ+="border-right-color: transparent;"}if(R.timeColumn&&!R.hidden&&aF==="monthView"){var a5=V.toTP("jqx-scheduler-time-column")+" "+V.toTP("jqx-widget-header")+" "+V.toTP("jqx-cell")+" "+V.toTP("jqx-grid-cell")+" "+V.toTP("jqx-item");a5+=" "+V.toTP("jqx-scheduler-week-number-column");if(V.tableRows>1){var a5=V.toTP("jqx-cell")+" "+V.toTP("jqx-grid-cell")+" "+V.toTP("jqx-item")}if(V.rtl){a5+=" "+V.toTP("jqx-cell-rtl")}if(C.minute()===0){var aJ='<td classname="jqx-disableselect" data-time-slot="true" data-date="'+C.toString()+'" role="gridcell" style="max-width:'+aK+"px; width:"+aK+"px;";if(X==b-1&&b==1&&!V.rtl){aJ+="border-right-color: transparent;"}else{if(V.rtl&&X==0){aJ+="border-left-color: transparent;"}}if(X==b-1&&V.rtl){aJ+="border-right-color: transparent;"}}else{x++;continue}}if(R.timeColumn&&!R.hidden&&(aF==="dayView"||aF==="weekView")){var a5=V.toTP("jqx-scheduler-time-column")+" "+V.toTP("jqx-widget-header")+" "+V.toTP("jqx-cell")+" "+V.toTP("jqx-grid-cell")+" "+V.toTP("jqx-item");if(V.tableRows>1){var a5=V.toTP("jqx-cell")+" "+V.toTP("jqx-grid-cell")+" "+V.toTP("jqx-item")}if(V.rtl){a5+=" "+V.toTP("jqx-cell-rtl")}if(Y>0){if(C.minute()===0){var aJ='<td classname="jqx-disableselect" data-time-slot="true" data-date="'+C.toString()+'" rowspan='+aS+' role="gridcell" '+Z+' style="max-width:'+aK+"px; width:"+aK+"px;";if(X==b-1&&b==1&&!V.rtl){aJ+="border-right-color: transparent;"}else{if(V.rtl&&X==0){aJ+="border-left-color: transparent;"}}}else{x++;continue}}else{if(V.resources&&V.resources.orientation=="none"){aG=-1}if(Y==0&&f&&(aF==="dayView"||aF==="weekView")){var aJ='<td data-view="'+(aG)+'" data-time-slot="true" data-end-date="'+a.jqx.scheduler.utilities.getEndOfDay(C).toString()+'" data-date="'+C.toString()+'" role="gridcell" '+Z+' style="max-width:'+aK+"px; width:"+aK+"px;"}if(X==b-1&&b==1&&!V.rtl){aJ+="border-right-color: transparent;"}else{if(X==0&&b==1&&V.rtl){aJ+="border-right-color: transparent;"}}if(V.rtl){aJ+="border-left-width: 1px;"}if(V.tableRows>1){aJ+="background: "+aO+";";aJ+="border-color: "+y+";"}}}else{if(Y>0){var n="border-left-width: 1px;";if(V.rtl&&X==0&&aF=="monthView"&&G.showWeekNumbers){n="border-left-width: 0px;"}aJ+=n}}if(R.cellsalign!="left"){if(R.cellsalign==="right"){a5+=" "+V.toTP("jqx-right-align")}else{a5+=" "+V.toTP("jqx-center-align")}}if(!R.timeColumn){if(V.rowinfo[aI.uid]){if(V.rowinfo[aI.uid].selected){if(V.editKey!==aI.uid){if(V.selectionMode!=="none"){a5+=" "+V.toTP("jqx-grid-cell-selected");a5+=" "+V.toTP("jqx-fill-state-pressed");a5+=" "+V.toTP("jqx-scheduler-cell-selected")}}}}}if(!(R.hidden)){ad+=o+aK;if(x==0&&!V.rtl){aJ+="border-left-width: 0px;"}x++}else{aJ+="display: none;";V._hiddencolumns=true}if(!(Y==0&&f&&(aF==="dayView"||aF==="weekView"))){if(aF.indexOf("month")==-1){a5+=" "+V.toTP("jqx-grid-cell-nowrap");if(Y%2==1&&!R.timeColumn){a5+=" "+V.toTP("jqx-scheduler-middle-cell")}if(!R.timeColumn){if(G.showWorkTime!==false){var O=1;var J=5;var ay=8;var l=18;if(G.workTime){var O=G.workTime.fromDayOfWeek?G.workTime.fromDayOfWeek:0;var J=G.workTime.toDayOfWeek?G.workTime.toDayOfWeek:0;var ay=G.workTime.fromHour!==undefined?G.workTime.fromHour:8;var l=G.workTime.toHour?G.workTime.toHour:8}if(C.dayOfWeek()>=O&&C.dayOfWeek()<=J){if(C.hour()>=ay&&C.hour()<l){a5+=" "+V.toTP("jqx-scheduler-work-time-cell")}else{a5+=" "+V.toTP("jqx-scheduler-not-work-time-cell")}}else{a5+=" "+V.toTP("jqx-scheduler-not-work-time-cell")}}}}}var ah="";if(aF==="monthView"){if(!V.touchDevice&&!R.timeColumn){a5+=" "+V.toTP("jqx-top-align")}var af="dd";ah=C.toDate();var a1=V.toTP("jqx-scheduler-month-outer-cell")+" ";var aA=V.toTP("jqx-scheduler-month-weekend-cell");if(V.date.month()==C.month()){a1=""}if(!C.isWeekend()){aA=""}else{a5+=" "+aA}if(ah.getDate()===1){af="MMM dd"}if(V.touchDevice){if(B>16){ah="<div class='"+a1+V.toTP("jqx-scheduler-month-cell-touch")+"'>"+a.jqx.dataFormat.formatdate(ah,af,V.schedulerLocalization)+"<span style='display: none; float: right; cursor: pointer; width:16px; height: 16px;' class='"+V.toTP("jqx-icon-arrow-down")+"'></span></div>"}else{ah="<div class='"+a1+V.toTP("jqx-scheduler-month-cell-touch")+"'>"+a.jqx.dataFormat.formatdate(ah,af,V.schedulerLocalization)+"<span style='display: none; float: right; cursor: pointer;' class='"+V.toTP("jqx-icon-arrow-down")+"'></span></div>"}}else{if(B>16){ah="<div class='"+a1+V.toTP("jqx-scheduler-month-cell")+"'>"+a.jqx.dataFormat.formatdate(ah,af,V.schedulerLocalization)+"<span style='display: none; float: right; cursor: pointer; width:16px; height: 16px;' class='"+V.toTP("jqx-icon-arrow-down")+"'></span></div>"}else{ah="<div class='"+a1+V.toTP("jqx-scheduler-month-cell")+"'>"+a.jqx.dataFormat.formatdate(ah,af,V.schedulerLocalization)+"<span style='display: none; float: right; cursor: pointer;' class='"+V.toTP("jqx-icon-arrow-down")+"'></span></div>"}}}else{if(aF==="timelineWeekView"||aF==="timelineDayView"||aF==="timelineMonthView"){a5+=" "+V.toTP("jqx-right-align jqx-bottom-align");ah="<span style='display: none; float: right; cursor: pointer; width:16px; height: 16px;' class='"+V.toTP("jqx-icon-arrow-down")+"'></span>"}}if(Y==0&&f&&(aF==="dayView"||aF==="weekView")&&!R.timeColumn){a5+=" "+V.toTP("jqx-top-align");a5+=" "+V.toTP("jqx-scheduler-all-day-cell");if(V.rtl){a5+=" "+V.toTP("jqx-rtl")}ah=C.toDate();ah="<span>"+a.jqx.dataFormat.formatdate(ah,"dd",V.schedulerLocalization)+"</span>"}var r=R.cellsFormat;if(R.timeColumn&&!R.hidden){ah=C.toDate();if(R.timeZone){ah=C.clone().toTimeZone(R.timeZone);ah=ah.toDate()}var s="auto";if(G.timeRuler&&G.timeRuler.formatString){r=G.timeRuler.formatString}else{if(!R.timeColumn.format){if(ah.getHours()==0||ah.getHours()==12){r="hh tt"}else{r="hh:mm"}}}if(a.jqx.dataFormat.isDate(ah)){ah=a.jqx.dataFormat.formatdate(ah,r,V.schedulerLocalization)}if(Y<k){if(!V.rtl){a5+=" "+V.toTP("jqx-scheduler-time-column-header-cell")}else{a5+=" "+V.toTP("jqx-scheduler-time-column-header-cell-rtl")}ah=""}if(Y<k){if(R._text){a5+=" "+V.toTP("jqx-bottom-align")}if(G.timeRuler&&G.timeRuler.timeZones&&G.timeRuler.timeZones.length>0){if(X<G.timeRuler.timeZones.length){ah=R._text}}}if(aF=="monthView"){ah=C.weekOfYear(V.schedulerLocalization.firstDay)}}else{if(r!=""){if(a.jqx.dataFormat){if(a.jqx.dataFormat.isDate(ah)){ah=a.jqx.dataFormat.formatdate(ah,r,V.schedulerLocalization)}else{if(a.jqx.dataFormat.isNumber(ah)||(!isNaN(parseFloat(ah))&&isFinite(ah))){ah=a.jqx.dataFormat.formatnumber(ah,r,V.schedulerLocalization)}}}}}if(R.cellclassname!=""&&R.cellclassname){if(typeof R.cellclassname=="string"){a5+=" "+R.cellclassname}else{var a0=R.cellclassname(Y,R.datafield,ah,aI);if(a0){a5+=" "+a0}}}if(R.cellsRenderer!=""&&R.cellsRenderer){var aT=au.indexOf(aI);ah=R.cellsRenderer(aT,R.datafield,ah,aI)}aJ+='" class="'+a5+'">';aJ+=ah;aJ+="</td>";u+=aJ}if(aM==0){V.table[0].style.width=ad+2+"px";V.pinnedtable[0].style.width=ad+2+"px";aM=ad}u+="</tr>";H+=u;if(!V.rowinfo[aI.uid]){V.rowinfo[aI.uid]={row:aI}}else{if(!("row" in V.rowinfo[aI.uid])){V.rowinfo[aI.uid].row=aI}}}}H+="</table>";V.table.html(H);V.pinnedtable.html(H);V.table[0].rows=V.table[0].firstChild.rows;var aR=a.jqx.browser.msie&&a.jqx.browser.version<9;var aP=null;if(f&&(aF==="dayView"||aF==="weekView")&&V.tableRows==1){V.pinnedtable[0].style.display="block";V.pinnedtable[0].style.zIndex="400";V.pinnedtable[0].style.position="absolute";V.pinnedtable[0].style.top="0px";V.pinnedtable[0].style.height=aQ+"px";if(!aR){if(V.tableRows==1){V.oldRow=V.table[0].rows[0];try{V.table[0].rows[0]=V.pinnedtable.find("tr")[0]}catch(aC){}aP=V.pinnedtable.find("tr")[0];V.pinnedTableRow=aP}else{V.oldRow=V.table[0].rows[1];try{V.table[0].rows[1]=V.pinnedtable.find("tr")[1]}catch(aC){}aP=V.pinnedtable.find("tr")[1];V.pinnedTableRow=aP}}}else{V.pinnedtable[0].style.display="none"}var Q=a(V.table[0].firstChild);var aV=a(V.pinnedtable[0].firstChild);V._table=Q;V._pinnedtable=aV;if(a.jqx.browser.msie&&a.jqx.browser.version<10){V._table[0].style.width=aM+"px";V._pinnedtable[0].style.width=aM+"px"}if(ai===0){V._table[0].style.width=(2+aM)+"px";V._pinnedtable[0].style.width=(2+aM)+"px"}V._table.addClass("jqx-grid-table-one-cell jqx-disableselect");V._pinnedtable.addClass("jqx-grid-table-one-cell jqx-disableselect");V.rowByCell=new Array();V.columnCells=new Array();function F(){var c={};c.cells=new Array();c.indexOf=function(j){for(var q=0;q<c.cells.length;q++){if(c.cells[q].getAttribute("data-key")==j.getAttribute("data-key")){return q}}return -1};return c}V.cellWidth=0;V.cellHeight=0;var U=V.table[0].rows.length;for(var Y=0;Y<U;Y++){var v=V.table[0].rows[Y];if(Y==0&&aP){v=aP}if(v.getAttribute("data-group-row")){continue}var aI=new F();aI.aboveRow=null;aI.belowRow=null;if(V.rows.length>0){aI.aboveRow=V.rows[V.rows.length-1];V.rows[V.rows.length-1].belowRow=aI}aI.element=v;V.rows.push(aI);for(var X=0;X<v.cells.length;X++){var M=v.cells[X];if(M.getAttribute("data-time-slot")){continue}if(M.style.display==="none"){continue}if(M.className.indexOf("jqx-grid-cell-pinned")>=0){continue}if(!V.columnCells[aI.cells.length]){V.columnCells[aI.cells.length]=new Array()}V.columnCells[aI.cells.length].push(M);if(V.cellWidth==0){V.cellWidth=M.clientWidth}if(V.cellHeight==0&&(U==1||Y>1)){V.cellHeight=M.clientHeight}if(V._views[V._view].type=="monthView"){if(aI.top==undefined){aI.top=parseInt(a(M).position().top)}}aI.cells.push(M);V.rowByCell[M.getAttribute("data-key")]=aI}}if(ai===0){V._table[0].style.tableLayout="auto"}V._renderAppointments(d,aN);if(V.pinnedtable[0].style.display!="none"||((aF=="dayView"||aF=="weekView")&&V.tableRows>1)){V._updateScrollbars(V.host.height())}if(aF==="monthView"&&G.monthRowAutoHeight){if(N.length==0){V._renderrows()}else{V._updateScrollbars(V.host.height())}}if(V.rendered){V.rendered()}V.renderedTime=new Date()},showAppointmentsByResource:function(f){var e=this;for(var d=0;d<e.uiappointments.length;d++){var g=e.uiappointments[d];if(g.resourceId==f){g.hidden=false;g.hiddenByResourceId=false;if(g.exceptions){for(var c=0;c<g.exceptions.length;c++){g.exceptions[c].hiddenByResourceId=false}}}}if(e._resourcesElements){var b=e.getColors(e._resources.indexOf(f));e._resourcesElements.top[f].attr("data-toggle","on");e._resourcesElements.top[f].css("background",b.background);e._resourcesElements.bottom[f].attr("data-toggle","on");e._resourcesElements.bottom[f].css("background",b.background)}if(e.hiddenResources){delete e.hiddenResources[f]}e._renderrows()},hideAppointmentsByResource:function(e){var d=this;for(var c=0;c<d.uiappointments.length;c++){var f=d.uiappointments[c];if(f.resourceId==e){f.hidden=true;f.hiddenByResourceId=true;if(f.exceptions){for(var b=0;b<f.exceptions.length;b++){f.exceptions[b].hiddenByResourceId=true;f.exceptions[b].hidden=true}}}}if(d._resourcesElements){d._resourcesElements.top[e].attr("data-toggle","off");d._resourcesElements.top[e].css("background","transparent");d._resourcesElements.bottom[e].attr("data-toggle","off");d._resourcesElements.bottom[e].css("background","transparent")}if(!d.hiddenResources){d.hiddenResources=new Array()}d.hiddenResources[e]=true;d._renderrows()},_prepareAppointmentsInView:function(g,f){var h=this;if(h._appupdating){return}var l=new Array();for(var s=0;s<this.uiappointments.length;s++){var n=this.uiappointments[s];if(n.hidden&&n.recurrencePattern==null){continue}var o=a.jqx.scheduler.utilities.rangeIntersection(n.from,n.to,g,f);if(o&&!n.recurrencePattern){l.push(n)}n.renderedAppointments=new Array();var v=false;if(n.recurrencePattern){var u=n.getOccurrences(g,f);var t=n.exceptions;for(var r=0;r<u.length;r++){var e=u[r];if(e.hidden){continue}var c=true;for(var p=0;p<t.length;p++){var k=t[p];var w=k.occurrenceFrom?k.occurrenceFrom:k;if(h.selectedJQXAppointment&&h.selectedJQXAppointment.rootAppointment){if(!v&&h.selectedJQXAppointment.occurrenceFrom.clearTime().equals(w.clearTime())){h.selectedJQXAppointment=k;v=true}}if(w.clearTime().equals(e.from.clearTime())){c=false;break}}if(!c){continue}if(h.selectedJQXAppointment&&h.selectedJQXAppointment.rootAppointment){if(!v&&h.selectedJQXAppointment.occurrenceFrom.clearTime().equals(e.occurrenceFrom.clearTime())){h.selectedJQXAppointment=e;v=true}}n.renderedAppointments[e.id]=e;l.push(e)}for(var p=0;p<t.length;p++){var k=t[p];var w=k.occurrenceFrom?k.from:k;var q=n.createOccurrence(w);if(k.occurrenceFrom){k.cloneAppointmentAttributes(q);if(k.hidden){continue}}if(q!=n){l.push(k);n.renderedAppointments[k.id]=k}}}}var b=new Array();this.tabKeyAppointments=new Array();for(var s=0;s<l.length;s++){var d=l[s];b.push(d);this.tabKeyAppointments.push(d)}b.sort(this._sortAppointmentsByFrom);if(this._resources.length>0){this.tabKeyAppointments.sort(function(j,i){return h._sortAppointmentsByResourceId(j,i,h)})}else{this.tabKeyAppointments.sort(this._sortAppointmentsByFrom)}this.appointmentsToRender=b},_renderDayWeekAppointments:function(){var M=this;var aa=M._views[M._view].type;var L=M._views[M._view];var z=new Array();var J=new Array();var Y=this.rows;var D=M.showAllDayRow;var ac=M.getMinutesPerScale();if(L.timeRuler&&L.timeRuler.showAllDayRow!=undefined){D=L.timeRuler.showAllDayRow}for(var f=0;f<this.appointmentsToRender.length;f++){var s=this.appointmentsToRender[f];var u=s.from;var ad=s.to;var U=a.jqx.scheduler.utilities.getEndOfDay(ad);var C=u.day();var e=s.allDay;var F=new Array();var r=new Array();var p=s.resourceId;var h=M._resources.indexOf(p);if(M.resources&&M.resources.orientation=="none"){h=-1}var A=u.toDate().valueOf();var k=ad.toDate().valueOf();var P=U.toDate().valueOf();var ae=function(j,i){if(j.date<i.date){return -1}if(j.date==i.date){return 0}if(j.date>i.date){return 1}};if(!s.allDay&&s.duration().days()<1||!D){var q=ad.toDate();var H=false;if(q.getHours()==0&&q.getMinutes()==0){H=true}for(var W=0;W<M.columnCells.length;W++){if(!M.columnCells[W]){continue}var v=M.columnCells[W];if(M.rtl){v=M.columnCells[M.columnCells.length-1-W]}for(var V=0;V<v.length;V++){if(v[V].getAttribute("data-end-date")){continue}var n=v[V].getAttribute("data-date");var X=M._getDateByString(n);var E=M._getDateByString(n);E.setMinutes(E.getMinutes()+ac-1);var m=X.valueOf();var G=E.valueOf();if(m>ad){continue}if((A<=m&&m<k)||(A<=G&&G<k)||(A>=m&&G>=k)){if(h!=-1){if((1+h)!=v[V].getAttribute("data-view")){continue}}if(C!=X.getDate()){F.sort(ae);r.push(F);F=new Array();C=u.addDays(1).day()}F.push({cell:v[V],date:X})}}}F.sort(ae);r.push(F);var B=new Array();for(var W=0;W<r.length;W++){var v=r[W];if(v.length==0){continue}var c=M.cellWidth;var d=v[v.length-1].cell.offsetTop+M.cellHeight;var O=v[0].cell.offsetLeft;var N=v[0].cell.offsetTop;var R=M.getMinutesPerScale();var q=new a.jqx.date(v[v.length-1].date,M.timeZone).addMinutes(R);var ab={cells:v,x:O,y:N,height:d-N,width:c,appointment:s,from:new a.jqx.date(v[0].date,M.timeZone),to:q};B.push(ab);z.push(ab)}s.elements=B;if(s.rootAppointment){s.rootAppointment.elements=s.rootAppointment.elements.concat(s.elements)}}else{var v=Y[0].cells;if(this.tableRows>1){var T=Y.length/M.tableRows;var b=h*T;v=Y[b].cells}for(var V=0;V<v.length;V++){var n=v[V].getAttribute("data-date");var af=M._getDateByString(n);var X=new a.jqx.date(af,M.timeZone);X=a.jqx.scheduler.utilities.getEndOfDay(X);var m=X.toDate().valueOf();if(m>U){continue}if(u<=X&&X<=U){if(h!=-1){if((1+h)!=v[V].getAttribute("data-view")){continue}}if(F.length==0){X=a.jqx.scheduler.utilities.getStartOfDay(X)}F.push({cell:v[V],date:X})}}F.sort(ae);r.push(F);var B=new Array();for(var W=0;W<r.length;W++){var v=r[W];if(v.length==0){break}var l=a(v[0].cell).position();var c=a(v[v.length-1].cell).position().left+this.cellWidth-l.left;var d=a(v[v.length-1].cell).position().top;var O=l.left;var N=l.top;if(this.rtl){var l=a(v[v.length-1].cell).position();var O=l.left;var c=a(v[0].cell).position().left+this.cellWidth-l.left}var S=v[v.length-1].date;S=new a.jqx.date(a.jqx.scheduler.utilities.getEndOfDay(S),M.timeZone);var ab={cells:v,x:O,y:N,height:d-N+this.cellHeight,width:c,appointment:s,from:a.jqx.scheduler.utilities.getStartOfDay(new a.jqx.date(v[0].date,M.timeZone)),to:S};B.push(ab);J.push(ab)}s.elements=B;if(s.rootAppointment){s.rootAppointment.elements=s.rootAppointment.elements.concat(s.elements)}}}var w=this.getViewStart();var Q=this.getViewEnd();if(this._resources.length<2||this.resources.orientation=="none"){var Z=new Array();var g=w;var I=0;while(g<Q){Z[I]=new Array();for(var W=0;W<z.length;W++){var t=z[W];if(t.from.day()==g.day()){t.column=-1;t.columnSpan=1;Z[I].push(t)}}I++;g=g.addDays(1)}for(var W=0;W<Z.length;W++){this._renderAppointmentsInDay(Z[W])}this._renderAllDayAppointments(J)}else{for(var V=0;V<this._resources.length;V++){var K=this._resources[V];var Z=new Array();var g=w;var I=0;while(g<Q){Z[I]=new Array();for(var W=0;W<z.length;W++){var t=z[W];if(t.from.day()==g.day()){t.column=-1;t.columnSpan=1;if(t.appointment.resourceId==K){Z[I].push(t)}}}I++;g=g.addDays(1)}for(var W=0;W<Z.length;W++){this._renderAppointmentsInDay(Z[W])}var o=new Array();for(var W=0;W<J.length;W++){if(J[W].appointment.resourceId==K){o.push(J[W])}}this._renderAllDayAppointments(o)}}},_renderAllDayAppointments:function(ar){var ac=this;var I=this.showAllDayRow;var ab=this._views[this._view];if(ab.timeRuler&&ab.timeRuler.showAllDayRow!=undefined){I=ab.timeRuler.showAllDayRow}if(!I){return}if(ar.length==0){return}var B=ar;var H=1;H=this.getMaxAllDayAppointments(ar);if(this.tableRows==1){var A=this.table[0].rows[0].clientHeight/H}else{var A=this.table[0].rows[1].clientHeight/H}for(var ap=0;ap<ar.length;ap++){var z=ar[ap];z.row=-1;var d=this.getCollisionAppointments(z,ar);d.sort(this._sortAppointmentsByFrom);var s=d.indexOf(z);if(s>=0){for(var aj=s;aj<d.length;aj++){d[aj].row=-1}}for(var am=0;am<H;am++){var n=am;for(var U in d){if(U=="indexOf"){break}var Y=d[U];if(Y.row==-1&&!this.isBusyRow(n,d)){Y.row=n;var an=H;var c=this.getMaxAllDayAppointments(d);if(an>c){an=c}Y.rowsCount=an}}}}for(var am=0;am<B.length;am++){var z=B[am];var d=this.getCollisionAppointments(z,B);d.sort(this._sortAppointmentsByFrom);var l=1;for(var U in d){if(U=="indexOf"){break}var O=d[U];l=Math.max(l,O.rowsCount)}for(var U in d){if(U=="indexOf"){break}var O=d[U];O.rowsCount=l}if(d.length==1){z.rowSpan=l}else{var F=0;var f=true;for(var aj=z.row;aj<l;aj++){for(var U in d){if(U=="indexOf"){break}var Y=d[U];if(Y==z){continue}if(Y.row==aj){f=false}}if(!f){break}F++}z.rowSpan=F}}var aq=ac.appointmentsMinHeight+2;if(ac.isTouchDevice()){var aq=ac.touchAppointmentsMinHeight+2}for(var ae=0;ae<B.length;ae++){var ad=aq;var z=B[ae];z.height=aq;var D=ad*z.row;z.y=18+z.y+D+(4*z.row);z.x+=3;z.width-=8;if(z.appointment.from.hour()!=0||z.appointment.to.hour()!=23){var C=this.getViewStart();var ag=this.getViewEnd();if(!ac.rtl){var K=parseFloat(ac.cellWidth/24)*(z.appointment.from.hour())+parseFloat(ac.cellWidth/48)*(z.appointment.from.minute()/30);if(z.appointment.from<C){K=0}z.timewidth=z.width;z.timex=K;var L=parseFloat(ac.cellWidth/24)*(z.appointment.to.hour())+parseFloat(ac.cellWidth/48)*(z.appointment.to.minute()/30);if(z.appointment.to>ag){L=0}z.timewidth-=K;if(L>0){z.timewidth-=ac.cellWidth;z.timewidth+=L}if(ab.appointmentsRenderMode=="exactTime"){z.width=z.timewidth;z.x+=K}}else{var K=parseFloat(ac.cellWidth/24)*(z.appointment.to.hour())+parseFloat(ac.cellWidth/48)*(z.appointment.to.minute()/30);var L=(parseFloat(ac.cellWidth/24)*(z.appointment.from.hour())+parseFloat(ac.cellWidth/48)*(z.appointment.from.minute()/30));if(K>0){K=ac.cellWidth-K}if(z.appointment.from<C){L=0}if(z.appointment.to>ag){K=0}if(ab.appointmentsRenderMode=="exactTime"){z.x+=K;z.width-=K;z.width-=L}if(z.appointment.duration().days()<1){if(z.width<15){z.width=15}}z.timewidth=z.width;if(ab.appointmentsRenderMode=="exactTimeStatus"){z.timewidth-=K;z.timewidth-=L}z.timex=K}}}for(var ae=0;ae<B.length;ae++){var ak=B[ae];var N="";var P="auto";var ab=this._views[this._view];var o=ak.appointment.from;var av=ak.appointment.to;if(ab.timeRuler&&ab.timeRuler.formatString){P=ab.timeRuler.formatString}var af=P;if(P==="auto"){if((o.hour()==0&&o.minute()==0)||(o.hour()==12&&o.minute()==0)){var af="hh tt"}else{var af="hh:mm"}if((av.hour()==0&&av.minute()==0)||(av.hour()==12&&av.minute()==0)){var y="hh tt"}else{var y="hh:mm"}}var u=o.toString(af);var v=av.toString(y);var J=ak.appointment.duration();var e=ak.appointment.allDay||(J.hours===23&&J.minutes===59&&J.seconds===59);var aa=ak.appointment.background;var T=ak.appointment.subject?ak.appointment.subject:"(No Title)";var M=ak.appointment.color;var i=ak.appointment.resourceId;var ah=ac.getColors(ac._resources.indexOf(i));var ai=" data-resourceId='"+i+"' ";var X=ak.appointment.borderColor;var t=ak.appointment.location;if(t.length>0){t=", "+t}if(!aa){aa=ah.background}if(!X){X=ah.border}if(!M){M=ah.color}var b=ak.appointment.isRecurrentAppointment();var r=ak.appointment.isException();var g=u+"-"+v;if(e){u="";v=""}var ao="";var w=ac.toTP("jqx-scheduler-appointment-status");var S="";var R=ac.statuses[ak.appointment.status];var k=false;if(R){if(R=="transparent"){k=false}else{S="<div style='background: "+R+"; border-right-color: "+X+"' class='"+w+"'></div>";if(R=="tentative"){w=ac.toTP("jqx-scheduler-appointment-status jqx-scheduler-appointment-status-stripes");S="<div style='background-color: "+X+"; border-right-color: "+X+"' class='"+w+"'></div>"}k=true}}var E=ac.toTP("jqx-scheduler-appointment-duration-status");var al="<div style='width: "+ak.timewidth+"px; left: "+ak.timex+"px;' class='"+E+"'></div>";if(e){al=""}var G="";if(ab.appointmentsRenderMode!="exactTimeStatus"){al=""}if(ac.rtl){var w=ac.toTP("jqx-scheduler-appointment-status-rtl jqx-scheduler-appointment-status");S="<div style='background: "+R+"; border-left-color: "+X+"' class='"+w+"'></div>";if(R=="tentative"){w=ac.toTP("jqx-scheduler-appointment-status-rtl jqx-scheduler-appointment-status jqx-scheduler-appointment-status-stripes");S="<div style='background-color: "+X+"; border-left-color: "+X+"' class='"+w+"'></div>"}G=S;S=""}var W="";var Q=T+t;if(!e){Q=T+t+al}if(ac.renderAppointment){var au=ac.renderAppointment({appointment:ak.appointment.boundAppointment,textColor:M,background:aa,borderColor:X,html:Q,cssClass:"",style:"",width:ak.width,height:ak.height,view:ac._views[ac._view].type});if(au){var N=au.html;if(N!=Q){Q=N}M=au.textColor;aa=au.background;X=au.borderColor;if(au.cssClass){W=au.cssClass+" "}if(au.style!=""){var ah=ac.getAppointmentColors(au.style);aa=ah.background;X=ah.border;M=ah.color}}}if(ao===""){if(k){var ao="<div style='white-space:nowrap;' class='"+ac.toTP("jqx-scheduler-appointment-content")+"'>"+S+"<div class='"+ac.toTP("jqx-scheduler-appointment-inner-content")+"'>"+Q+"</div>"+G+"</div>"}else{var ao="<div style='white-space:nowrap;' class='"+ac.toTP("jqx-scheduler-appointment-content")+"'><div class='"+ac.toTP("jqx-scheduler-appointment-inner-content")+"'>"+Q+"</div></div>"}}var at="";if(ac.rtl){at=ac.toTP("jqx-rtl jqx-scheduler-appointment-rtl")+" "}if(r){var h=M.toLowerCase()=="white"?ac.toTP("jqx-icon-recurrence-exception-white"):ac.toTP("jqx-icon-recurrence-exception");N="<div data-key='"+ak.appointment.id+"'"+ai+"class='"+at+W+ac.toTP("jqx-scheduler-appointment jqx-rc-all")+"' style='position:absolute; z-index: 399; left: "+ak.x+"px; top: "+ak.y+"px; width: "+ak.width+"px; line-height: "+ak.height+"px; height: "+ak.height+"px; border-color:"+X+"; color:"+M+"; background:"+aa+";'><div class='"+h+"'></div>"+ao+"<div class='"+ac.toTP("jqx-scheduler-appointment-resize-indicator jqx-scheduler-appointment-left-resize-indicator")+"'></div><div class='"+ac.toTP("jqx-scheduler-appointment-resize-indicator jqx-scheduler-appointment-right-resize-indicator")+"'></div>"}else{if(b){var q=M.toLowerCase()=="white"?ac.toTP("jqx-icon-recurrence-white"):ac.toTP("jqx-icon-recurrence");N="<div data-key='"+ak.appointment.id+"'"+ai+"class='"+at+W+ac.toTP("jqx-scheduler-appointment jqx-rc-all")+"' style='position:absolute; z-index: 399; left: "+ak.x+"px; top: "+ak.y+"px; width: "+ak.width+"px; line-height: "+ak.height+"px; height: "+ak.height+"px; border-color:"+X+"; color:"+M+"; background:"+aa+";'><div class='"+q+"'></div>"+ao+"<div class='"+ac.toTP("jqx-scheduler-appointment-resize-indicator jqx-scheduler-appointment-left-resize-indicator")+"'></div><div class='"+ac.toTP("jqx-scheduler-appointment-resize-indicator jqx-scheduler-appointment-right-resize-indicator")+"'></div>"}else{N="<div data-key='"+ak.appointment.id+"'"+ai+"class='"+at+W+ac.toTP("jqx-scheduler-appointment jqx-rc-all")+"' style='position:absolute; z-index: 399; left: "+ak.x+"px; top: "+ak.y+"px; width: "+ak.width+"px; line-height: "+ak.height+"px; height: "+ak.height+"px; border-color:"+X+"; color:"+M+"; background:"+aa+";'>"+ao+"<div class='"+ac.toTP("jqx-scheduler-appointment-resize-indicator jqx-scheduler-appointment-left-resize-indicator")+"'></div><div class='"+ac.toTP("jqx-scheduler-appointment-resize-indicator jqx-scheduler-appointment-right-resize-indicator")+"'></div>"}}var V=a(N);if(this.tableRows==1){V.appendTo(this.pinnedtable)}else{V.appendTo(this.table)}ak.element=V;if(this.appointmentTooltips){if(!ak.appointment.tooltip){var Z=ak.appointment.subject;if(u){Z=u+" - "+v+" "+Z}if(Z){var t=ak.appointment.location;if(t){Z+="\n"+t}V[0].setAttribute("title",Z)}}else{V[0].setAttribute("title",ak.appointment.tooltip)}}}},_renderAppointmentsInDay:function(an,am){if(an.length==0){return}var Z=this;var Y=this._views[this._view];var B=an;var C=this.getViewStart();var ac=this.getViewEnd();var ai=1;var o=0;if(Y.timeRuler){o=this.columns.records[1].width;if(Y.timeRuler.timeZones){o=this.columns.records[1+Y.timeRuler.timeZones.length].width}}else{o=this.columns.records[1].width}ai=this.getMaxColumnsInADay(an);var n=o/ai;if(n<0){return}for(var al=0;al<an.length;al++){var A=an[al];A.column=-1;var d=this.getCollisionAppointments(A,an);d.sort(this._sortAppointmentsByFrom);var t=d.indexOf(A);if(t>=0){for(var ag=t;ag<d.length;ag++){d[ag].column=-1}}for(var aj=0;aj<ai;aj++){var e=aj;for(var R in d){if(R=="indexOf"){break}var V=d[R];if(V.column==-1&&!this.isBusyColumn(e,d)){V.column=e;var g=ai;var c=this.getMaxColumnsInADay(d);if(g>c){g=c}V.columnsCount=g}}}}for(var aj=0;aj<B.length;aj++){var A=B[aj];var d=this.getCollisionAppointments(A,B);d.sort(this._sortAppointmentsByFrom);var H=1;for(var R in d){if(R=="indexOf"){break}var L=d[R];if(L.columnsCount==undefined){continue}H=Math.max(H,L.columnsCount)}for(var R in d){if(R=="indexOf"){break}var L=d[R];L.columnsCount=H}if(d.length==1){A.columnSpan=H}else{var D=0;var f=true;for(var ag=A.column;ag<H;ag++){for(var R in d){if(R=="indexOf"){break}var V=d[R];if(V.column==undefined){continue}if(V==A){continue}if(V.column==ag){f=false}}if(!f){break}D++}A.columnSpan=D}}for(var aa=0;aa<B.length;aa++){var E=o/B[aa].columnsCount;var A=B[aa];A.width=-5+(E*A.columnSpan);var ap=E*A.column;A.x=2+A.x+ap;A.height-=5;A.y+=1;if(Y.appointmentsRenderMode=="exactTime"){var ae=Z.getMinutesPerScale();if(A.appointment.from.minute()%ae!=0){var at=A.appointment.from.minute()%ae;var J=parseFloat(Z.cellHeight/ae)*at}else{var J=0}if(A.appointment.to.minute()%ae!=0){var at=A.appointment.to.minute()%ae;var G=Z.cellHeight-parseFloat(Z.cellHeight/ae)*at;if(A.to.day()!==A.appointment.to.day()){G=0}}else{G=0}A.y+=J;A.height-=J;A.height-=G}}for(var aa=0;aa<B.length;aa++){var ah=B[aa];var K="";var M="auto";var Y=this._views[this._view];var q=ah.appointment.from;var ar=ah.appointment.to;if(Y.timeRuler&&Y.timeRuler.formatString){M=Y.timeRuler.formatString}var ab=M;if(M==="auto"){if((q.hour()==0&&q.minute()==0)||(q.hour()==12&&q.minute()==0)){var ab="hh tt"}else{var ab="hh:mm"}if((ar.hour()==0&&ar.minute()==0)||(ar.hour()==12&&ar.minute()==0)){var z="hh tt"}else{var z="hh:mm"}}var v=q.toString(ab);var w=ar.toString(z);var X=ah.appointment.background;var Q=ah.appointment.subject?ah.appointment.subject:"(No Title)";var u=ah.appointment.location?ah.appointment.location:"";var I=ah.appointment.color;var k=ah.appointment.resourceId;var ad=Z.getColors(Z._resources.indexOf(k));var af=" data-resourceId='"+k+"' ";var U=ah.appointment.borderColor;if(!X){X=ad.background}if(!U){U=ad.border}if(!I){I=ad.color}var b=ah.appointment.isRecurrentAppointment();var s=ah.appointment.isException();var ak="";var y=Z.toTP("jqx-scheduler-appointment-status");var P="";var O=Z.statuses[ah.appointment.status];var l=false;if(O){if(O=="transparent"){l=false}else{P="<div style='background: "+O+"; border-right-color: "+U+"' class='"+y+"'></div>";if(O=="tentative"){y=Z.toTP("jqx-scheduler-appointment-status jqx-scheduler-appointment-status-stripes");P="<div style='background-color: "+U+"; border-right-color: "+U+"' class='"+y+"'></div>"}l=true}}var F="";if(Z.rtl){var y=Z.toTP("jqx-scheduler-appointment-status-rtl jqx-scheduler-appointment-status");P="<div style='background: "+O+"; border-left-color: "+U+"' class='"+y+"'></div>";if(O=="tentative"){y=Z.toTP("jqx-scheduler-appointment-status-rtl jqx-scheduler-appointment-status jqx-scheduler-appointment-status-stripes");P="<div style='background-color: "+U+"; border-left-color: "+U+"' class='"+y+"'></div>"}F=P;P=""}var T="";var N=Q+"<br/>"+u;if(!u){var N=Q}if(Z.renderAppointment){var aq=Z.renderAppointment({appointment:ah.appointment.boundAppointment,textColor:I,background:X,borderColor:U,html:N,cssClass:"",style:"",width:ah.width,height:ah.height,view:Z._views[Z._view].type});if(aq){var K=aq.html;if(K!=N){N=K}I=aq.textColor;X=aq.background;U=aq.borderColor;if(aq.cssClass){T=aq.cssClass+" "}if(aq.style!=""){var ad=Z.getAppointmentColors(aq.style);X=ad.background;U=ad.border;I=ad.color}}}if(ak===""){if(l){var ak="<div class='"+Z.toTP("jqx-scheduler-appointment-content")+"'>"+P+"<div class='"+Z.toTP("jqx-scheduler-appointment-inner-content")+"'>"+N+"</div>"+F+"</div>"}else{var ak="<div class='"+Z.toTP("jqx-scheduler-appointment-content")+"'><div class='"+Z.toTP("jqx-scheduler-appointment-inner-content")+"'>"+N+"</div></div>"}}var ao="";if(Z.rtl){ao=Z.toTP("jqx-rtl jqx-scheduler-appointment-rtl")+" "}if(s){var h=I.toLowerCase()=="white"?Z.toTP("jqx-icon-recurrence-exception-white"):Z.toTP("jqx-icon-recurrence-exception");K="<div data-key='"+ah.appointment.id+"'"+af+"class='"+ao+T+Z.toTP("jqx-scheduler-appointment jqx-rc-all")+"' style='position:absolute; z-index: 399; left: "+ah.x+"px; top: "+ah.y+"px; width: "+ah.width+"px; height: "+ah.height+"px; border-color:"+U+"; color:"+I+"; background:"+X+";'><div class='"+h+"'></div>"+ak+"<div class='"+Z.toTP("jqx-scheduler-appointment-resize-indicator jqx-scheduler-appointment-top-resize-indicator")+"'></div><div class='"+Z.toTP("jqx-scheduler-appointment-resize-indicator jqx-scheduler-appointment-bottom-resize-indicator")+"'></div></div>"}else{if(b){var r=I.toLowerCase()=="white"?Z.toTP("jqx-icon-recurrence-white"):Z.toTP("jqx-icon-recurrence");K="<div data-key='"+ah.appointment.id+"'"+af+"class='"+ao+T+Z.toTP("jqx-scheduler-appointment jqx-rc-all")+"' style='position:absolute; z-index: 399; left: "+ah.x+"px; top: "+ah.y+"px; width: "+ah.width+"px; height: "+ah.height+"px; border-color:"+U+"; color:"+I+"; background:"+X+";'><div class='"+r+"'></div>"+ak+"<div class='"+Z.toTP("jqx-scheduler-appointment-resize-indicator jqx-scheduler-appointment-top-resize-indicator")+"'></div><div class='"+Z.toTP("jqx-scheduler-appointment-resize-indicator jqx-scheduler-appointment-bottom-resize-indicator")+"'></div></div>"}else{K="<div data-key='"+ah.appointment.id+"'"+af+"class='"+ao+T+Z.toTP("jqx-scheduler-appointment jqx-rc-all")+"' style='position:absolute; z-index: 399; left: "+ah.x+"px; top: "+ah.y+"px; width: "+ah.width+"px; height: "+ah.height+"px; border-color:"+U+"; color:"+I+"; background:"+X+";'>"+ak+"<div class='"+Z.toTP("jqx-scheduler-appointment-resize-indicator jqx-scheduler-appointment-top-resize-indicator")+"'></div><div class='"+Z.toTP("jqx-scheduler-appointment-resize-indicator jqx-scheduler-appointment-bottom-resize-indicator")+"'></div></div>"}}var S=a(K);S.appendTo(this.table);ah.element=S;if(this.appointmentTooltips){if(!ah.appointment.tooltip){var W=ah.appointment.subject;if(W){var u=ah.appointment.location;if(u){W+="\n"+u}S[0].setAttribute("title",W)}}else{S[0].setAttribute("title",ah.appointment.tooltip)}}}},getCollisionAppointments:function(b,f){var j=new Array();var g=b.from;var h=b.to;for(var d=0;d<f.length;d++){var k=f[d];var e=k.from;var c=k.to;if(a.jqx.scheduler.utilities.rangeIntersection(g,h,e,c)){j.push(k);if(j.length>30){break}}}return j},getAllDayCollisionAppointments:function(b,f){var j=new Array();var g=a.jqx.scheduler.utilities.getStartOfDay(b.from);var h=a.jqx.scheduler.utilities.getEndOfDay(b.to);for(var d=0;d<f.length;d++){var k=f[d];var e=a.jqx.scheduler.utilities.getStartOfDay(k.from);var c=a.jqx.scheduler.utilities.getEndOfDay(k.to);if(a.jqx.scheduler.utilities.rangeIntersection(g,h,e,c)){j.push(k)}}return j},_renderAppointments:function(e,c){var d=this;if(d._appupdating){return}d.table.find(".jqx-scheduler-appointment").remove();d.pinnedtable.find(".jqx-scheduler-appointment").remove();var b=d._views[d._view].type;if(b==="dayView"||b==="weekView"){d._renderDayWeekAppointments(e,c)}else{if(b==="monthView"){d._renderMonthAppointments(e,c)}else{if(b==="timelineWeekView"||b==="timelineDayView"||b==="timelineMonthView"){d._renderTimelineAppointments(e,c)}}}if(d.selectedJQXAppointment){d._selectAppointment(d.selectedJQXAppointment)}},_renderTimelineAppointments:function(t,I){var E=this;var Q=E._views[E._view].type;var D=E._views[E._view];var u=new Array();var P=this.rows;var L=this.cellHeight;var K=this.cellWidth;var J=E.getMinutesPerScale();for(var d=0;d<this.appointmentsToRender.length;d++){var o=this.appointmentsToRender[d];var p=o.from;var S=o.to;var r=E._getDateByString;var A=new Array();var v=p.toDate().valueOf();var g=S.toDate().valueOf();if(Q==="timelineMonthView"){v=p.clearTime().toDate().valueOf()}var T=function(j,i){if(j.date<i.date){return -1}if(j.date==i.date){return 0}if(j.date>i.date){return 1}};var q=E.rows[0];var m=o.resourceId;var f=E._resources.indexOf(m);if(E._resources.length>0){if(E.resources.orientation!=="horizontal"){if(f>=1){q=E.rows[f]}}}if(E.resources&&E.resources.orientation=="none"){f=-1;var q=E.rows[0]}var s=q.cells;for(var M=0;M<s.length;M++){var k=s[M].getAttribute("data-date");s[M].appointments=new Array();var O=E._getDateByString(k);var h=O.valueOf();var z=E._getDateByString(k);z.setMinutes(z.getMinutes()+J-1);var B=z.valueOf();if(h>S){continue}if((v<=h&&h<g)||(v<=B&&B<g)||(v>=h&&v<=B&&g<=B)){if(f!=-1){if((1+f)!=s[M].getAttribute("data-view")){continue}}A.push({cell:s[M],date:O});q=N}}A.sort(T);var w=new Array();var s=A;if(s.length==0){continue}var l=E.appointmentsMinHeight;if(E.isTouchDevice()){l=E.touchAppointmentsMinHeight}if(D.appointmentHeight){l=D.appointmentHeight}var H=a(s[0].cell).position();var c=l;var b=a(s[s.length-1].cell).position().left-H.left+K;var G=H.left;var F=H.top;if(E.rtl){var H=a(s[s.length-1].cell).position();var b=a(s[0].cell).position().left-H.left+K;var G=H.left;var F=H.top}var n=new a.jqx.date(s[s.length-1].date,E.timeZone).addMinutes(J);if(Q==="timelineMonthView"){var n=a.jqx.scheduler.utilities.getEndOfDay(new a.jqx.date(s[s.length-1].date,E.timeZone))}var R={cellX:G,cellY:F,cellHeight:L,cells:s,x:G,y:F,height:c,width:b,appointment:o,from:new a.jqx.date(s[0].date,E.timeZone),to:n};if(D.appointmentsRenderMode==="exactTime"){R.from=o.from;R.to=o.to}w.push(R);u.push(R);o.elements=w;if(o.rootAppointment){o.rootAppointment.elements=o.rootAppointment.elements.concat(o.elements)}}if(this._resources.length<2||this.resources.orientation=="none"){this._renderUITimelineAppointments(u,t,I)}else{for(var M=0;M<this._resources.length;M++){var C=this._resources[M];var e=new Array();for(var N=0;N<u.length;N++){if(u[N].appointment.resourceId==C){e.push(u[N])}}this._renderUITimelineAppointments(e,t,I)}}},_renderUITimelineAppointments:function(ap,w,ad){var Z=this;var aq=Z._views[Z._view].type;var Y=Z._views[Z._view];var E=ap;var C=1;var Z=this;var U=new Array();C=Z.getMaxTimelineAppointments(ap,U,w,ad);var h=Z.appointmentsMinHeight;if(Z.isTouchDevice()){h=Z.touchAppointmentsMinHeight}if(Y.appointmentHeight){h=Y.appointmentHeight}for(var ao=0;ao<ap.length;ao++){var g=ap[ao];g.row=-1;var d=Z.getCollisionAppointments(g,ap);d.sort(Z._sortAppointmentsByFrom);var t=d.indexOf(g);if(t>=0){for(var ak=t;ak<d.length;ak++){d[ak].row=-1}}for(var al=0;al<C;al++){var o=al;if(al>30){break}for(var Q in d){if(Q=="indexOf"){break}if(Q>30){break}var V=d[Q];if(V.row==-1&&!Z.isBusyRow(o,d)){V.row=o;var am=C;var c=Z.getMaxTimelineAppointments(d,U,w,ad);if(am>c){am=c}V.rowsCount=am}}}}for(var al=0;al<E.length;al++){var g=E[al];var d=Z.getCollisionAppointments(g,E);d.sort(Z._sortAppointmentsByFrom);var n=1;for(var Q in d){if(Q=="indexOf"){break}var K=d[Q];n=Math.max(n,K.rowsCount)}for(var Q in d){if(Q=="indexOf"){break}var K=d[Q];K.rowsCount=n}if(d.length==1){g.rowSpan=n}else{var z=0;var f=true;for(var ak=g.row;ak<n;ak++){for(var Q in d){if(Q=="indexOf"){break}var V=d[Q];if(V==g){continue}if(V.row==ak){f=false}}if(!f){break}z++}g.rowSpan=z}}for(var ab=0;ab<E.length;ab++){var aa=h;var g=E[ab];g.height=aa;var y=2+(3+aa)*g.row;g.y=g.y+y;g.x+=1;g.width-=5;var e=Z._views[Z._view].type;var Y=Z._views[Z._view];if(e=="timelineMonthView"&&Y.appointmentsRenderMode){if((g.appointment.from.hour()!=0||g.appointment.to.hour()!=23)){if(!Z.rtl){var F=parseFloat(Z.cellWidth/24)*(g.appointment.from.hour())+parseFloat(Z.cellWidth/48)*(g.appointment.from.minute()/30);var G=parseFloat(Z.cellWidth/24)*(g.appointment.to.hour())+parseFloat(Z.cellWidth/48)*(g.appointment.to.minute()/30);g.timewidth=g.width;g.timex=F;g.timewidth-=F;g.timewidth-=Z.cellWidth;g.timewidth+=G;if(Y.appointmentsRenderMode=="exactTime"){g.width=g.timewidth;if(Z.date.month()===g.appointment.from.month()){g.x+=F}else{g.width=F+g.timewidth}if(g.appointment.duration().days()<1){if(g.width<15){g.width=15;if(F+15>Z.cellWidth){var D=Z.cellWidth-F-15;g.x+=D}}}}}else{var F=parseFloat(Z.cellWidth/24)*(g.appointment.to.hour())+parseFloat(Z.cellWidth/48)*(g.appointment.to.minute()/30);var G=(parseFloat(Z.cellWidth/24)*(g.appointment.from.hour())+parseFloat(Z.cellWidth/48)*(g.appointment.from.minute()/30));if(F>0){F=Z.cellWidth-F}if(Y.appointmentsRenderMode=="exactTime"){g.x+=F;g.width-=F;g.width-=G}if(g.appointment.duration().days()<1){if(g.width<15){g.width=15}}g.timewidth=g.width;g.timex=F}}}else{if(Y.appointmentsRenderMode){if(Y.appointmentsRenderMode=="exactTime"){var af=Z.getMinutesPerScale();if(g.appointment.from.minute()%af!=0){var av=g.appointment.from.minute()%af;var F=parseFloat(Z.cellWidth/af)*av;if(Z.rtl){var F=parseFloat(Z.cellWidth/af)*av}}else{var F=0}if(g.appointment.to.minute()%af!=0){var av=g.appointment.to.minute()%af;var G=Z.cellWidth-parseFloat(Z.cellWidth/af)*av;if(Z.rtl){var G=Z.cellWidth-parseFloat(Z.cellWidth/af)*av}}else{G=0}if(!Z.rtl){g.x+=F;g.width-=F;g.width-=G}else{g.x+=G;g.width-=F;g.width-=G}}}}}var ai="";var N=[];for(var ab=0;ab<E.length;ab++){var aj=E[ab];var I="";if(aj.y<0){continue}N.push(aj);var J="auto";var Y=Z._views[Z._view];var q=aj.appointment.from;var au=aj.appointment.to;if(Y.timeRuler&&Y.timeRuler.formatString){J=Y.timeRuler.formatString}var X=aj.appointment.background;var P=aj.appointment.subject?aj.appointment.subject:"(No Title)";var u=aj.appointment.location;if(u&&u.length>1){u=", "+u}var H=aj.appointment.color;var k=aj.appointment.resourceId;var ae=Z.getColors(Z._resources.indexOf(k));var ag=" data-resourceId='"+k+"' ";var T=aj.appointment.borderColor;if(!X){X=ae.background}if(!T){T=ae.border}if(!H){H=ae.color}var b=aj.appointment.isRecurrentAppointment();var s=aj.appointment.isException();var an="";var v=Z.toTP("jqx-scheduler-appointment-status");var O="";var M=Z.statuses[aj.appointment.status];var l=false;if(M){if(M=="transparent"){l=false}else{O="<div style='background: "+M+"; border-right-color: "+T+"' class='"+v+"'></div>";if(M=="tentative"){v=Z.toTP("jqx-scheduler-appointment-status jqx-scheduler-appointment-status-stripes");O="<div style='background-color: "+T+"; border-right-color: "+T+"' class='"+v+"'></div>"}l=true}}var A="";if(Z.rtl){var v=Z.toTP("jqx-scheduler-appointment-status-rtl jqx-scheduler-appointment-status");O="<div style='background: "+M+"; border-left-color: "+T+"' class='"+v+"'></div>";if(M=="tentative"){v=Z.toTP("jqx-scheduler-appointment-status-rtl jqx-scheduler-appointment-status jqx-scheduler-appointment-status-stripes");O="<div style='background-color: "+T+"; border-left-color: "+T+"' class='"+v+"'></div>"}A=O;O=""}var S="";var L=P+"<br/>"+u;if(Z.renderAppointment){var at=Z.renderAppointment({appointment:aj.appointment.boundAppointment,textColor:H,background:X,borderColor:T,html:L,cssClass:"",style:"",width:aj.width,height:aj.height,view:Z._views[Z._view].type});if(at){var I=at.html;if(I!=L){L=I}H=at.textColor;X=at.background;T=at.borderColor;if(at.cssClass){S=at.cssClass+" "}if(at.style!=""){var ae=Z.getAppointmentColors(at.style);X=ae.background;T=ae.border;H=ae.color}}}if(an===""){if(l){var an="<div style='white-space:nowrap;' class='"+Z.toTP("jqx-scheduler-appointment-content")+"'>"+O+"<div class='"+Z.toTP("jqx-scheduler-appointment-inner-content")+"'>"+L+"</div>"+A+"</div>"}else{var an="<div style='white-space:nowrap;' class='"+Z.toTP("jqx-scheduler-appointment-content")+"'><div class='"+Z.toTP("jqx-scheduler-appointment-inner-content")+"'>"+L+"</div></div>"}}var ar="";if(Z.rtl){ar=Z.toTP("jqx-rtl jqx-scheduler-appointment-rtl")+" "}if(s){var i=H.toLowerCase()=="white"?Z.toTP("jqx-icon-recurrence-exception-white"):Z.toTP("jqx-icon-recurrence-exception");I="<div data-key='"+aj.appointment.id+"'"+ag+"class='"+ar+S+Z.toTP("jqx-scheduler-appointment jqx-rc-all")+"' style='position:absolute; z-index: 399; left: "+aj.x+"px; top: "+aj.y+"px; width: "+aj.width+"px; height: "+aj.height+"px; line-height: "+aj.height+"px; border-color:"+T+"; color:"+H+"; background:"+X+";'><div class='"+i+"'></div>"+an+"<div class='"+Z.toTP("jqx-scheduler-appointment-resize-indicator jqx-scheduler-appointment-left-resize-indicator")+"'></div><div class='"+Z.toTP("jqx-scheduler-appointment-resize-indicator jqx-scheduler-appointment-right-resize-indicator")+"'></div>"}else{if(b){var r=H.toLowerCase()=="white"?Z.toTP("jqx-icon-recurrence-white"):Z.toTP("jqx-icon-recurrence");I="<div data-key='"+aj.appointment.id+"'"+ag+"class='"+ar+S+Z.toTP("jqx-scheduler-appointment jqx-rc-all")+"' style='position:absolute; z-index: 399; left: "+aj.x+"px; top: "+aj.y+"px; width: "+aj.width+"px; height: "+aj.height+"px; line-height: "+aj.height+"px; border-color:"+T+"; color:"+H+"; background:"+X+";'><div class='"+r+"'></div>"+an+"<div class='"+Z.toTP("jqx-scheduler-appointment-resize-indicator jqx-scheduler-appointment-left-resize-indicator")+"'></div><div class='"+Z.toTP("jqx-scheduler-appointment-resize-indicator jqx-scheduler-appointment-right-resize-indicator")+"'></div>"}else{I="<div data-key='"+aj.appointment.id+"'"+ag+"class='"+ar+S+Z.toTP("jqx-scheduler-appointment jqx-rc-all")+"' style='position:absolute; z-index: 399; left: "+aj.x+"px; top: "+aj.y+"px; width: "+aj.width+"px; height: "+aj.height+"px; line-height: "+aj.height+"px; border-color:"+T+"; color:"+H+"; background:"+X+";'>"+an+"<div class='"+Z.toTP("jqx-scheduler-appointment-resize-indicator jqx-scheduler-appointment-left-resize-indicator")+"'></div><div class='"+Z.toTP("jqx-scheduler-appointment-resize-indicator jqx-scheduler-appointment-right-resize-indicator")+"'></div>"}}ai=I;var R=a(I);R.appendTo(this.table);aj.element=R;if(this.appointmentTooltips){if(!aj.appointment.tooltip){var W=aj.appointment.subject;if(W){var u=aj.appointment.location;if(u){W+="\n"+u}R[0].setAttribute("title",W)}}else{R[0].setAttribute("title",aj.appointment.tooltip)}}}var ah=Z.table.find(".jqx-scheduler-appointment");var B=function(m){for(var j=0;j<ah.length;j++){var p=ah[j].getAttribute("data-key");if(p==m){return ah[j]}}};for(var ab=0;ab<N.length;ab++){var aj=N[ab];var ac=false;var R=a(B(aj.appointment.id));a.each(aj.cells,function(p){var m=a(this.cell);var ax=aj.cellY;var aw=aj.cellX;var j=aj.cellHeight;if(!m[0].appointments){m[0].appointments=new Array()}m[0].appointments.push({ui:R,appointment:aj});R=R;if(aj.y+aj.height>=ax+j-12){R[0].style.visibility="hidden";var x=m.find(".jqx-icon-arrow-down");if(x.length>0){x[0].style.display="block";x[0].mousedown=function(){if(Z.openedMonthCellPopup){Z.openedMonthCellPopup.remove()}var ay=a("<div></div>");var aB=new a.jqx.date(m.attr("data-date"),Z.timeZone);var aE=a("<div class='"+Z.toTP("jqx-scheduler-month-cell")+"'><span style='float: right; cursor: pointer; width:16px; height: 16px;' class='"+Z.toTP("jqx-icon-close")+"'></span></div>");aE.height(16);aE.find("span")[0].mousedown=function(){ay.remove()};aE.addClass(Z.toTP("jqx-widget-header"));ay.addClass(Z.toTP("jqx-widget"));ay.addClass(Z.toTP("jqx-window"));ay.addClass(Z.toTP("jqx-scheduler-month-cell-popup"));ay.addClass(Z.toTP("jqx-popup"));var aF=a("<div></div>");ay.append(aE);ay.append(aF);aF.addClass(Z.toTP("jqx-widget-content"));var az=m.width();var aH=21;for(var aC=0;aC<m[0].appointments.length;aC++){var aA=m[0].appointments[aC].ui.clone(true);aA.css("left","3px");aA.css("top","0px");aA.css("margin-top","2px");aA.css("position","relative");aA.css("visibility","visible");aA.width(az-6);aA.click(function(aI){var aJ=Z.getJQXAppointmentByElement(Z.getAppointmentElement(aI.target));Z._raiseEvent("appointmentClick",{appointment:aJ.boundAppointment})});aA.dblclick(function(aJ){var aK=Z.getJQXAppointmentByElement(Z.getAppointmentElement(aJ.target));if(!aK.readOnly&&!Z.editRecurrenceDialog.jqxWindow("isOpen")&&(!Z._editDialog||(Z._editDialog&&!Z._editDialog.jqxWindow("isOpen")))){var aI=Z._initDialog(aK);if(aI!==false){Z._openDialog()}}Z._raiseEvent("appointmentDoubleClick",{appointment:aK.boundAppointment})});aH+=aA.outerHeight()+4;aF.append(aA)}ay.css("overflow","hidden");ay.css("position","absolute");var aG=Z.table.height()-ax-25;if(aG<j){aG=j}ay.css("max-height",aG);ay.height(aH);ay.width(az);ay.css("z-index","9999");var aD=m.position();ay.css("top",aD.top);ay.css("left",aD.left);Z.table.append(ay);Z.openedMonthCellPopup=ay}}}})}},_renderMonthAppointments:function(){var M=this;var Y=M._views[M._view].type;var L=M._views[M._view];var C=new Array();var W=this.rows;var R=0;if(this.host.find(".jqx-scheduler-month-cell").length>0){R=a(this.host.find(".jqx-scheduler-month-cell")[0]).height()}for(var e=0;e<this.appointmentsToRender.length;e++){var t=this.appointmentsToRender[e];var w=a.jqx.scheduler.utilities.getStartOfDay(t.from);var ab=a.jqx.scheduler.utilities.getEndOfDay(t.to);var c=t.allDay;var H=new Array();var s=new Array();var D=w.toDate().valueOf();var k=ab.toDate().valueOf();var ac=function(j,i){if(j.date<i.date){return -1}if(j.date==i.date){return 0}if(j.date>i.date){return 1}};var z=-1;var q=t.resourceId;var h=M._resources.indexOf(q);if(M.resources&&M.resources.orientation=="none"){h=-1}for(var T=0;T<M.rows.length;T++){var A=M.rows[T].cells;for(var S=0;S<A.length;S++){var n=A[S].getAttribute("data-date");var V=this._getDateByString(n);var l=V.valueOf();if(l>ab){continue}A[S].appointments=new Array();if(h!=-1){if((1+h)!=A[S].getAttribute("data-view")){continue}}if(D<=l&&l<k){if(z!=T&&z!=-1){H.sort(ac);s.push(H);H=new Array()}H.push({cell:A[S],date:V});z=T}}}H.sort(ac);s.push(H);var E=new Array();for(var T=0;T<s.length;T++){var A=s[T];if(A.length==0){break}var o=M.appointmentsMinHeight;if(M.isTouchDevice()){o=M.touchAppointmentsMinHeight}if(L.appointmentHeight){o=L.appointmentHeight}var d=o;var G=a(A[A.length-1].cell).position().left;var b=G-a(A[0].cell).position().left+M.columns.records[0].width;if(L.showWeekNumbers){var b=G-a(A[0].cell).position().left+M.columns.records[1].width}var I=a(A[0].cell).position();var O=I.left;var N=I.top+R;var r=a.jqx.scheduler.utilities.getEndOfDay(new a.jqx.date(A[A.length-1].date,M.timeZone));var F=new a.jqx.date(A[0].date,M.timeZone);if(M.rtl){var r=a.jqx.scheduler.utilities.getEndOfDay(new a.jqx.date(A[0].date,M.timeZone));var F=new a.jqx.date(A[A.length-1].date,M.timeZone);var I=a(A[A.length-1].cell).position();var O=I.left;var N=I.top+R;var G=a(A[0].cell).position().left;var b=G-a(A[A.length-1].cell).position().left+M.columns.records[0].width;if(L.showWeekNumbers){var b=G-a(A[A.length-1].cell).position().left+M.columns.records[1].width}}var Z={cells:A,cellY:parseInt(I.top),cellX:parseInt(I.left),lastCellY:parseInt(I.top),lastCellX:G,x:O,y:N,height:d,width:b,appointment:t,from:F,to:r};E.push(Z);C.push(Z)}t.elements=E;if(t.rootAppointment){t.rootAppointment.elements=t.rootAppointment.elements.concat(t.elements)}}var B=this.getViewStart();var P=this.getViewEnd();if(this._resources.length<2||this.resources.orientation=="none"){var X=new Array();var f=B;var J=0;while(f<P){X[J]=new Array();for(var T=0;T<C.length;T++){var v=C[T];if(f<=v.from&&v.to<f.addDays(7)){v.row=-1;v.rowSpan=1;X[J].push(v)}}J++;f=f.addDays(7)}f=B;var p=B;for(var T=0;T<X.length;T++){if(X[T].length>0){var U=X[T];var u=[];for(var S=0;S<7;S++){var aa=U.filter(function(j){var i=a.jqx.scheduler.utilities.rangeIntersection(j.from,j.to,f,a.jqx.scheduler.utilities.getEndOfDay(f));return i});f=f.addDays(1);for(var Q=0;Q<aa.length;Q++){if(Q>=20){break}var t=aa[Q];if(u.indexOf(t)===-1){u.push(t)}}}this._renderUIMonthAppointments(u)}p=p.addDays(7);f=p}}else{for(var S=0;S<this._resources.length;S++){var K=this._resources[S];var g=new Array();var X=new Array();var f=B;var J=0;while(f<P){X[J]=new Array();for(var T=0;T<C.length;T++){var v=C[T];if(f<=v.from&&v.to<f.addDays(7)){v.row=-1;v.rowSpan=1;if(v.appointment.resourceId==K){X[J].push(v)}}}J++;f=f.addDays(7)}for(var T=0;T<X.length;T++){if(X[T].length>0){this._renderUIMonthAppointments(X[T])}}}}},_getMonthAppointmentsPerWeek:function(){var M=this;var W=M._views[M._view].type;var L=M._views[M._view];var C=new Array();var U=this.rows;var Q=0;if(this.host.find(".jqx-scheduler-month-cell").length>0){Q=a(this.host.find(".jqx-scheduler-month-cell")[0]).height()}if(!M.rows){return new Array()}var B=this.getViewStart();var P=this.getViewEnd();for(var e=0;e<this.appointmentsToRender.length;e++){var s=this.appointmentsToRender[e];var u=a.jqx.scheduler.utilities.getStartOfDay(s.from);var Y=a.jqx.scheduler.utilities.getEndOfDay(s.to);var c=s.allDay;var z=M._getDateByString;var H=new Array();var r=new Array();var D=u.toDate().valueOf();var l=Y.toDate().valueOf();var Z=function(j,i){if(j.date<i.date){return -1}if(j.date==i.date){return 0}if(j.date>i.date){return 1}};var v=-1;var p=s.resourceId;var k=M._resources.indexOf(p);if(M.resources&&M.resources.orientation=="none"){k=-1}for(var S=0;S<M.rows.length;S++){var A=M.rows[S].cells;for(var R=0;R<A.length;R++){var n=A[R].getAttribute("data-date");var T=B.addDays(S*7+R).toDate();var m=T.valueOf();if(m>Y){continue}if(k!=-1){if((1+k)!=A[R].getAttribute("data-view")){continue}}if(D<=m&&m<l){if(v!=S&&v!=-1){H.sort(Z);r.push(H);H=new Array()}H.push({cell:A[R],date:T});v=S}}}H.sort(Z);r.push(H);var E=new Array();for(var S=0;S<r.length;S++){var A=r[S];if(A.length==0){break}var o=M.appointmentsMinHeight;if(M.isTouchDevice()){o=M.touchAppointmentsMinHeight}if(L.appointmentHeight){o=L.appointmentHeight}var d=o;var G=a(A[A.length-1].cell).position().left;var b=G-a(A[0].cell).position().left+M.columns.records[0].width;if(L.showWeekNumbers){var b=G-a(A[0].cell).position().left+M.columns.records[1].width}var I=a(A[0].cell).position();var O=I.left;var N=I.top+Q;var q=a.jqx.scheduler.utilities.getEndOfDay(new a.jqx.date(A[A.length-1].date,M.timeZone));var F=new a.jqx.date(A[0].date,M.timeZone);if(M.rtl){var q=a.jqx.scheduler.utilities.getEndOfDay(new a.jqx.date(A[0].date,M.timeZone));var F=new a.jqx.date(A[A.length-1].date,M.timeZone);var I=a(A[A.length-1].cell).position();var O=I.left;var N=I.top+Q;var G=a(A[0].cell).position().left;var b=G-a(A[A.length-1].cell).position().left+M.columns.records[0].width;if(L.showWeekNumbers){var b=G-a(A[A.length-1].cell).position().left+M.columns.records[1].width}}var X={cells:A,cellY:parseInt(I.top),cellX:parseInt(I.left),lastCellY:parseInt(I.top),lastCellX:G,x:O,y:N,height:d,width:b,appointment:s,from:F,to:q};E.push(X);C.push(X)}}if(this._resources.length<2||this.resources.orientation=="none"){var V=new Array();var g=B;var J=0;while(g<P){V[J]=new Array();for(var S=0;S<C.length;S++){var t=C[S];if(g<=t.from&&t.to<g.addDays(7)){t.row=-1;t.rowSpan=1;V[J].push(t)}}J++;g=g.addDays(7)}var f=new Array();for(var S=0;S<V.length;S++){if(V[S].length>0){var w=this.getMaxMonthAppointments(V[S]);var o=M.appointmentsMinHeight;if(M.isTouchDevice()){o=M.touchAppointmentsMinHeight}if(L.appointmentHeight){o=L.appointmentHeight}f.push((w*(o+3))+22)}else{f.push("auto")}}return f}else{var f=new Array();for(var R=0;R<this._resources.length;R++){var K=this._resources[R];var h=new Array();var V=new Array();var g=B;var J=0;while(g<P){V[J]=new Array();for(var S=0;S<C.length;S++){var t=C[S];if(g<=t.from&&t.to<g.addDays(7)){t.row=-1;t.rowSpan=1;if(t.appointment.resourceId==K){V[J].push(t)}}}J++;g=g.addDays(7)}for(var S=0;S<V.length;S++){if(V[S].length>0){var w=this.getMaxMonthAppointments(V[S]);f.push((w*(o+3))+22)}else{f.push("auto")}}return f}}},_renderUIMonthAppointments:function(ar){var ab=this._views[this._view];var I=ar;var B=this.getViewStart();var ah=this.getViewEnd();var G=1;var ac=this;G=this.getMaxMonthAppointments(ar);var i=ac.appointmentsMinHeight;if(ac.isTouchDevice()){i=ac.touchAppointmentsMinHeight}if(ab.appointmentHeight){i=ab.appointmentHeight}var f=this._sortAppointmentsByFrom;if(this.rtl){f=this._sortAppointmentsByTo}for(var aq=0;aq<ar.length;aq++){var h=ar[aq];h.row=-1;var d=this.getCollisionAppointments(h,ar);d.sort(f);var u=d.indexOf(h);if(u>=0){for(var ak=u;ak<d.length;ak++){d[ak].row=-1}}for(var an=0;an<G;an++){var q=an;for(var U in d){if(U=="indexOf"){break}var Y=d[U];if(Y.row==-1&&!this.isBusyRow(q,d)){Y.row=q;var ao=G;var c=this.getMaxMonthAppointments(d);if(ao>c){ao=c}Y.rowsCount=ao}}}}for(var an=0;an<I.length;an++){var h=I[an];var d=this.getCollisionAppointments(h,I);d.sort(f);var o=1;for(var U in d){if(U=="indexOf"){break}var O=d[U];o=Math.max(o,O.rowsCount)}for(var U in d){if(U=="indexOf"){break}var O=d[U];O.rowsCount=o}if(d.length==1){h.rowSpan=o}else{var E=0;var g=true;for(var ak=h.row;ak<o;ak++){for(var U in d){if(U=="indexOf"){break}var Y=d[U];if(Y==h){continue}if(Y.row==ak){g=false}}if(!g){break}E++}h.rowSpan=E}}for(var ae=0;ae<I.length;ae++){var ad=i;var h=I[ae];h.height=ad;var C=2+(3+ad)*h.row;h.y=h.y+C;h.x+=1;h.width-=5;if(h.appointment.from.hour()!=0||h.appointment.to.hour()!=23){if(!ac.rtl){var K=parseFloat(ac.cellWidth/24)*(h.appointment.from.hour())+parseFloat(ac.cellWidth/48)*(h.appointment.from.minute()/30);h.timewidth=h.width;if(h.from.clearTime().toString()==h.appointment.from.clearTime().toString()){h.timex=K}else{K=0}if(h.appointment.elements.length>1){if(h.appointment.elements[0]!=h){K=0}}var L=parseFloat(ac.cellWidth/24)*(h.appointment.to.hour())+parseFloat(ac.cellWidth/48)*(h.appointment.to.minute()/30);if(h.appointment.elements.length>1){if(h.appointment.elements[h.appointment.elements.length-1]!=h){L=0}}h.timewidth-=K;if(L>0){h.timewidth-=ac.cellWidth;h.timewidth+=L}if(ab.appointmentsRenderMode=="exactTime"){if(h.from.clearTime().toString()==h.appointment.from.clearTime().toString()){h.x+=K}h.width=h.timewidth;if(h.appointment.duration().days()<1){if(h.width<15){h.width=15;if(K+15>ac.cellWidth){var H=ac.cellWidth-K-15;h.x+=H}}}}}else{var K=parseFloat(ac.cellWidth/24)*(h.appointment.to.hour())+parseFloat(ac.cellWidth/48)*(h.appointment.to.minute()/30);var L=parseFloat(ac.cellWidth/24)*(h.appointment.from.hour())+parseFloat(ac.cellWidth/48)*(h.appointment.from.minute()/30);if(h.appointment.elements.length>1){if(h==h.appointment.elements[0]){if(L>0){if(ab.appointmentsRenderMode=="exactTime"){h.width-=(ac.cellWidth-K);h.width-=L}else{h.timewidth=h.width-ac.cellWidth+K-L}}else{h.timewidth=h.width;h.timex=0}}else{if(h==h.appointment.elements[h.appointment.elements.length-1]){if(ab.appointmentsRenderMode=="exactTime"){h.x+=ac.cellWidth;h.x-=K;h.width+=K;h.width-=ac.cellWidth}h.timewidth=h.width-ac.cellWidth+K;h.timex=ac.cellWidth-K}}}else{if(ab.appointmentsRenderMode=="exactTime"){h.x+=ac.cellWidth;h.x-=K;h.width-=(ac.cellWidth-K);h.width-=L}if(h.appointment.duration().days()<1){if(h.width<15){h.width=15}}h.timewidth=h.width-ac.cellWidth+K-L;h.timex=ac.cellWidth-K}}}}for(var ae=0;ae<I.length;ae++){var al=I[ae];var N="";var P="auto";var ab=this._views[this._view];var r=al.appointment.from;var av=al.appointment.to;var P="auto";var ab=this._views[this._view];var r=al.appointment.from;var av=al.appointment.to;if(ab.timeRuler&&ab.timeRuler.formatString){P=ab.timeRuler.formatString}var ag=P;var A=P;if(P==="auto"){if((r.hour()==0&&r.minute()==0)||(r.hour()==12&&r.minute()==0)){var ag="hh tt"}else{var ag="hh:mm"}if((av.hour()==0&&av.minute()==0)||(av.hour()==12&&av.minute()==0)){var A="hh tt"}else{var A="hh:mm"}}var w=r.toString(ag);var y=av.toString(A);var J=al.appointment.duration();var e=al.appointment.allDay||(J.hours===23&&J.minutes===59&&J.seconds===59);var aa=al.appointment.background;var T=al.appointment.subject?al.appointment.subject:"(No Title)";var M=al.appointment.color;var l=al.appointment.resourceId;var ai=ac.getColors(ac._resources.indexOf(l));var aj=" data-resourceId='"+l+"' ";var X=al.appointment.borderColor;var v=al.appointment.location;if(v&&v.length>1){v=", "+v}if(!aa){aa=ai.background}if(!X){X=ai.border}if(!M){M=ai.color}var b=al.appointment.isRecurrentAppointment();var t=al.appointment.isException();var ap="";var z=ac.toTP("jqx-scheduler-appointment-status");var S="";var R=ac.statuses[al.appointment.status];var n=false;if(R){if(R=="transparent"){n=false}else{S="<div style='background: "+R+"; border-right-color: "+X+"' class='"+z+"'></div>";if(R=="tentative"){z=ac.toTP("jqx-scheduler-appointment-status jqx-scheduler-appointment-status-stripes");S="<div style='background-color: "+X+"; border-right-color: "+X+"' class='"+z+"'></div>"}n=true}}var D=ac.toTP("jqx-scheduler-appointment-duration-status");var am="<div style='width: "+al.timewidth+"px; left: "+al.timex+"px;' class='"+D+"'></div>";if(e){am=""}if(ab.appointmentsRenderMode!="exactTimeStatus"){am=""}var F="";if(ac.rtl){var z=ac.toTP("jqx-scheduler-appointment-status-rtl jqx-scheduler-appointment-status");S="<div style='background: "+R+"; border-left-color: "+X+"' class='"+z+"'></div>";if(R=="tentative"){z=ac.toTP("jqx-scheduler-appointment-status-rtl jqx-scheduler-appointment-status jqx-scheduler-appointment-status-stripes");S="<div style='background-color: "+X+"; border-left-color: "+X+"' class='"+z+"'></div>"}F=S;S=""}var W="";var Q=T+v;if(!e){Q=T+v+am}if(ac.renderAppointment){var au=ac.renderAppointment({appointment:al.appointment.boundAppointment,textColor:M,background:aa,borderColor:X,html:Q,cssClass:"",style:"",width:al.width,height:al.height,view:ac._views[ac._view].type});if(au){var N=au.html;if(N!=Q){Q=N}M=au.textColor;aa=au.background;X=au.borderColor;if(au.cssClass){W=au.cssClass+" "}if(au.style!=""){var ai=ac.getAppointmentColors(au.style);aa=ai.background;X=ai.border;M=ai.color}}}if(ap===""){if(n){var ap="<div style='white-space:nowrap;' class='"+ac.toTP("jqx-scheduler-appointment-content")+"'>"+S+"<div class='"+ac.toTP("jqx-scheduler-appointment-inner-content")+"'>"+Q+"</div>"+F+"</div>"}else{var ap="<div style='white-space:nowrap;' class='"+ac.toTP("jqx-scheduler-appointment-content")+"'><div class='"+ac.toTP("jqx-scheduler-appointment-inner-content")+"'>"+Q+"</div></div>"}}var at="";if(ac.rtl){at=ac.toTP("jqx-rtl jqx-scheduler-appointment-rtl")+" "}if(t){var k=M.toLowerCase()=="white"?ac.toTP("jqx-icon-recurrence-exception-white"):ac.toTP("jqx-icon-recurrence-exception");N="<div data-key='"+al.appointment.id+"'"+aj+"class='"+at+W+ac.toTP("jqx-scheduler-appointment jqx-rc-all")+"' style='position:absolute; z-index: 399; left: "+al.x+"px; top: "+al.y+"px; width: "+al.width+"px; line-height: "+al.height+"px; height: "+al.height+"px; border-color:"+X+"; color:"+M+"; background:"+aa+";'><div class='"+k+"'></div>"+ap+"<div class='"+ac.toTP("jqx-scheduler-appointment-resize-indicator jqx-scheduler-appointment-left-resize-indicator")+"'></div><div class='"+ac.toTP("jqx-scheduler-appointment-resize-indicator jqx-scheduler-appointment-right-resize-indicator")+"'></div>"}else{if(b){var s=M.toLowerCase()=="white"?ac.toTP("jqx-icon-recurrence-white"):ac.toTP("jqx-icon-recurrence");N="<div data-key='"+al.appointment.id+"'"+aj+"class='"+at+W+ac.toTP("jqx-scheduler-appointment jqx-rc-all")+"' style='position:absolute; z-index: 399; left: "+al.x+"px; top: "+al.y+"px; width: "+al.width+"px; line-height: "+al.height+"px; height: "+al.height+"px; border-color:"+X+"; color:"+M+"; background:"+aa+";'><div class='"+s+"'></div>"+ap+"<div class='"+ac.toTP("jqx-scheduler-appointment-resize-indicator jqx-scheduler-appointment-left-resize-indicator")+"'></div><div class='"+ac.toTP("jqx-scheduler-appointment-resize-indicator jqx-scheduler-appointment-right-resize-indicator")+"'></div>"}else{N="<div data-key='"+al.appointment.id+"'"+aj+"class='"+at+W+ac.toTP("jqx-scheduler-appointment jqx-rc-all")+"' style='position:absolute; z-index: 399; left: "+al.x+"px; top: "+al.y+"px; width: "+al.width+"px; line-height: "+al.height+"px; height: "+al.height+"px; border-color:"+X+"; color:"+M+"; background:"+aa+";'>"+ap+"<div class='"+ac.toTP("jqx-scheduler-appointment-resize-indicator jqx-scheduler-appointment-left-resize-indicator")+"'></div><div class='"+ac.toTP("jqx-scheduler-appointment-resize-indicator jqx-scheduler-appointment-right-resize-indicator")+"'></div>"}}var V=a(N);V.appendTo(this.table);al.element=V;if(this.appointmentTooltips){if(!al.appointment.tooltip){var Z=al.appointment.subject;if(w&&!e){Z=w+" - "+y+" "+Z}if(Z){var v=al.appointment.location;if(v){Z+="\n"+v}V[0].setAttribute("title",Z)}}else{V[0].setAttribute("title",al.appointment.tooltip)}}var af=false;a.each(al.cells,function(){var m=a(this.cell);var j=m.position();if(!m[0].appointments){m[0].appointments=new Array()}m[0].appointments.push({ui:V,appointment:al});if(al.y+al.height+2>=j.top+m.height()){V.css("visibility","hidden");var p=m.find(".jqx-icon-arrow-down");p.show();if(p[0]){p[0].mousedown=function(){if(ac.openedMonthCellPopup){ac.openedMonthCellPopup.remove()}var aw=a("<div></div>");var aB=m.find("div").clone(true);aB.find("span").removeClass().addClass(ac.toTP("jqx-icon-close"));aB.find("span")[0].mousedown=function(){aw.remove()};aB.addClass(ac.toTP("jqx-widget-header"));aw.addClass(ac.toTP("jqx-widget"));aw.addClass(ac.toTP("jqx-window"));aw.addClass(ac.toTP("jqx-scheduler-month-cell-popup"));aw.addClass(ac.toTP("jqx-popup"));var az=a("<div></div>");aw.append(aB);aw.append(az);az.addClass(ac.toTP("jqx-widget-content jqx-disableselect"));var ay=m.width();var x=5+m.find("div").outerHeight();for(var ax=0;ax<m[0].appointments.length;ax++){var aA=m[0].appointments[ax].ui.clone(true);aA.css("left","3px");aA.css("top","0px");aA.css("margin-top","2px");aA.css("position","relative");aA.css("visibility","visible");aA.width(ay-6);x+=aA.outerHeight()+4;az.append(aA);aA.click(function(aC){var aD=ac.getJQXAppointmentByElement(ac.getAppointmentElement(aC.target));ac._raiseEvent("appointmentClick",{appointment:aD.boundAppointment})});aA.dblclick(function(aD){var aE=ac.getJQXAppointmentByElement(ac.getAppointmentElement(aD.target));if(!aE.readOnly&&!ac.editRecurrenceDialog.jqxWindow("isOpen")&&(!ac._editDialog||(ac._editDialog&&!ac._editDialog.jqxWindow("isOpen")))){var aC=ac._initDialog(aE);if(aC!==false){ac._openDialog()}}ac._raiseEvent("appointmentDoubleClick",{appointment:aE.boundAppointment})})}aw.css("overflow","hidden");aw.css("position","absolute");aw.height(x);aw.width(ay);aw.css("z-index","9999");aw.css("top",j.top);aw.css("left",j.left);ac.table.append(aw);ac.openedMonthCellPopup=aw}}}})}},_sortByDate:function(b,e){var d=b.getAttribute("data-date");d=this._getDateByString(d);var c=e.getAttribute("data-date");c=this._getDateByString(c);if(d<c){return -1}if(d>c){return 1}if(d==c){return 0}},_sortAppointmentsByFrom:function(b,f){if(b.from.dateData===f.from.dateData){var d=b.to.dateData-b.from.dateData;var e=d*10000;var d=f.to.dateData-f.from.dateData;var c=d*10000;if(e>c){return -1}}if(b.from.dateData<f.from.dateData){return -1}if(b.from.dateData>f.from.dateData){return 1}if(b.from.dateData==f.from.dateData){return 0}},_sortAppointmentsByTo:function(b,f){if(b.to.equals(f.to)){var d=b.to-b.from;var e=d*10000;var d=f.to-f.from;var c=d*10000;if(e>c){return -1}}if(b.to<f.to){return -1}if(b.to>f.to){return 1}if(b.to==f.to){return 0}},_sortAppointmentsByResourceId:function(b,f,e){var d=e._resources.indexOf(b.resourceId);var c=e._resources.indexOf(f.resourceId);if(d==c){return 0}if(d<c){return -1}if(d>c){return -1}},isBusyRow:function(e,d){for(var c=0;c<d.length;c++){var b=d[c];if(b.row==e){return true}}return false},isBusyColumn:function(e,d){for(var c=0;c<d.length;c++){var b=d[c];if(b.column==e){return true}}return false},getMaxTimelineAppointments:function(c,s,f,e){if(c.length==0){return 1}var i=this;var t=i._views[i._view].type;var j=i._views[i._view];var k=1;var m=f;var u=e;var q=this.getMinutesPerScale();var n=null;var r=null;var w="";for(var g in c){if(g=="indexOf"){break}var d=c[g];if(!n){n=d.from.dateData}if(!r){r=d.to.dateData}if(d.from.dateData<n){n=d.from.dateData}if(d.to.dateData>r){r=d.to.dateData}w+=d.appointment.id}w+=n;w+=r;if(s[w]){return s[w]}n=new a.jqx.date(n,i.timeZone);r=new a.jqx.date(r,i.timeZone);var m=n;while(n<r){var p=m;if(t==="timelineMonthView"){var b=p.addDays(1)}else{var b=p.addMinutes(q)}var o=0;for(var g in c){if(g=="indexOf"){break}var d=c[g];var h=d.from;var v=d.to;var l=a.jqx.scheduler.utilities.rangeIntersection(p,b,h,v);if(l){o++}}k=Math.max(o,k);if(t==="timelineMonthView"){m=m.addDays(1,false)}else{m=m.addMinutes(q,false)}}s[w]=k;return k},getMaxMonthAppointments:function(g){var i=this._views[this._view].type;var l=this._views[this._view];if(g.length==0){return 1}var o=1;var h=this.getViewStart().clone();var e=this.getViewEnd();while(h<e){var j=h;var k=a.jqx.scheduler.utilities.getEndOfDay(j);var n=0;for(var f in g){if(f=="indexOf"){break}var b=g[f];var d=b.from;var c=b.to;var m=a.jqx.scheduler.utilities.rangeIntersection(j,k,d,c);if(m){n++}}o=Math.max(n,o);h=h.addDays(1,false)}return o},getMaxAllDayAppointments:function(e){var h=this._views[this._view].type;var l=this._views[this._view];var f=this;if(e.length==0){return 1}var n=function(r){var y=1;var s=f.getViewStart();var p=f.getViewEnd();while(s<p){var t=s;var u=a.jqx.scheduler.utilities.getEndOfDay(t);var x=0;for(var q in r){if(q=="indexOf"){break}var i=r[q];var v=i;if(i.appointment){v=i.appointment}if(v.hidden==true){continue}if(!v.duration){continue}if(v.allDay||v.duration().days()>=1){var o=i.from;var j=i.to;var w=a.jqx.scheduler.utilities.rangeIntersection(t,u,o,j);if(w){x++}}}y=Math.max(x,y);s=s.addDays(1,false)}return y};if(this._resources.length<2||(!this.resources.orientation||this.resources.orientation=="none")){var m=n(e)}else{var k=1;for(var c=0;c<this._resources.length;c++){var b=this._resources[c];var g=new Array();for(var d=0;d<e.length;d++){if(e[d].appointment&&e[d].appointment.resourceId==b){g.push(e[d])}else{if(e[d].resourceId!=undefined&&e[d].resourceId==b){g.push(e[d])}}}var m=n(g);k=Math.max(k,m)}m=k}return m},getMinutesPerScale:function(){var b=this._views[this._view].type;var d=this._views[this._view];var c=30;var e="halfHour";if(d.timeRuler&&d.timeRuler.scale){e=d.timeRuler.scale}switch(e){case"sixtyMinutes":case"hour":c=60;break;case"thirtyMinutes":case"halfHour":c=30;break;case"fifteenMinutes":case"quarterHour":c=15;break;case"tenMinutes":c=10;break;case"fiveMinutes":c=5;break}return c},getMaxColumnsInADay:function(k){var m=this._views[this._view].type;var p=this._views[this._view];var e=30;var c="halfHour";if(p.timeRuler&&p.timeRuler.scale){c=p.timeRuler.scale}switch(c){case"sixtyMinutes":case"hour":e=60;break;case"thirtyMinutes":case"halfHour":e=30;break;case"fifteenMinutes":case"quarterHour":e=15;break;case"tenMinutes":e=10;break;case"fiveMinutes":e=5;break}if(k.length==0){return 1}var d=1;var l=k[0].from.clone();var i=l.addMinutes(e);var h=a.jqx.scheduler.utilities.getEndOfDay(l);while(l<h){var o=l;var n=i;var r=0;for(var j in k){if(j=="indexOf"){break}var b=k[j];if(!b.from&&!b.to){continue}var g=b.from;var f=b.to;var q=a.jqx.scheduler.utilities.rangeIntersection(o,n,g,f);if(q){r++}}d=Math.max(r,d);l=l.addMinutes(e,false);i=i.addMinutes(e,false)}return d},getTouches:function(b){return a.jqx.mobile.getTouches(b)},_updatecolumnwidths:function(){var h=this;var j=this._hostWidth;var b=j;if(this.vScrollBar.css("visibility")!=="hidden"&&this.scrollBarSize>0){j-=parseInt(this.scrollBarSize)+6;if(this.rtl){j+=3}b=j}var i="";if(this.columns==undefined||this.columns.records==undefined){return}var h=this;var g=false;var k=new Array();a.each(this.columns.records,function(l,m){if(!(this.hidden)){if(this.width.toString().indexOf("%")!=-1||this._percentagewidth!=undefined){var m=0;var n=h.vScrollBar[0].style.visibility=="hidden"?0:h.scrollBarSize+5;if(h.scrollBarSize==0){n=0}m=parseFloat(this.width)*b/100;if(this._percentagewidth!=undefined){m=parseFloat(this._percentagewidth)*(b)/100}if(m<this.minwidth&&this.minwidth!="auto"){m=this.minwidth}if(m>this.maxwidth&&this.maxwidth!="auto"){m=this.maxwidth}j-=Math.round(m)}else{if(this.width!="auto"&&!this._width){j-=this.width}else{i+=this.text}}if(this._width=="auto"){k[k.length]=this}}});var e=this.columnsheader.find("#columntable"+this.element.id);if(e.length==0){return}var c=0;var f=e.find(".jqx-grid-column-header");var d=0;a.each(this.columns.records,function(o,t){var m=this.element;var w=false;var v=this.width;var q=this.width;if(this.width.toString().indexOf("%")!=-1||this._percentagewidth!=undefined){if(this._percentagewidth!=undefined){v=parseFloat(this._percentagewidth)*b/100}else{v=parseFloat(this.width)*b/100}v=Math.round(v);w=true}if(this.width!="auto"&&!this._width&&!w){if(parseInt(m[0].style.width)!=this.width){m.width(this.width)}}else{if(w){if(v<this.minwidth&&this.minwidth!="auto"){v=this.minwidth;this.width=v}if(v>this.maxwidth&&this.maxwidth!="auto"){v=this.maxwidth;this.width=v}if(parseInt(m[0].style.width)!=v){m.width(v);this.width=v}}else{var n=h.columns.records.length;var p=h._views[h._view].type;if(p==="dayView"||p==="weekView"){var r=h._views[h._view];if(r.timeRuler){if(r.timeRuler.timeZones){n-=r.timeRuler.timeZones.length}n--}else{n--}}else{if(p==="monthView"&&h._views[h._view].showWeekNumbers){n--}}var l=Math.floor(j*(1/n));if(h.resources&&h.resources.resourceColumnWidth&&h.resources.resourceColumnWidth!="auto"){l=h.resources.resourceColumnWidth}else{if(h.resources&&h.resources.resourceColumnWidth&&h.resources.resourceColumnWidth=="auto"){if(h.resources.orientation=="horizontal"){l=Math.round((2+j)*(1/h._getColumnsLengthPerView()))}}}var s=(j*(1/n))-l;c+=s;if(c>=1){c-=1;l++}if(c>=0.5&&o==h.columns.records.length-1){l++}if(p=="agendaView"){l=j/k.length;l++}if(l<0){var u=a("<span>"+this.text+"</span>");a(document.body).append(u);l=10+u.width();u.remove()}if(l<this.minwidth){l=this.minwidth}if(l>this.maxwidth){l=this.maxwidth}this._width="auto";this.width=parseInt(l);m.width(this.width)}}if(parseInt(m[0].style.left)!=d){m.css("left",d)}if(!(this.hidden)){d+=this.width}this._requirewidthupdate=true;if(q!==this.width){g=true}});this.columnsheader.width(2+d);e.width(this.columnsheader.width());this._resizecolumnGroups();if(g){this._renderrows();h._arrange()}},_rendercolumnheaders:function(){var g=this;if(this._updating){return}var l=this._views[this._view];this._columnsbydatafield=new Array();this.columnsheader.find("#columntable"+this.element.id).remove();var h=a('<div id="columntable'+this.element.id+'" style="height: 100%; position: relative;"></div>');h[0].cells=new Array();var r=0;var d=0;var n="";var p=this._hostWidth;if(!p){this._hostWidth=this.host.width()}var v=this._hostWidth;var m=v;var w=this.getRows().length;var u=this.rowsHeight;if(this.isTouchDevice()){u=this.touchRowsHeight}if(w*u>this.host.height()){this.vScrollBar[0].style.visibility="inherit"}if(this.vScrollBar.css("visibility")!=="hidden"&&this.scrollBarSize>0){v-=parseInt(this.scrollBarSize)+6;if(this.rtl){v+=3}m=v}var q=new Array();var s=new Array();a.each(this.columns.records,function(j,k){if(!(this.hidden)){if(this.width!="auto"&&!this._width){if(this.width<this.minwidth&&this.minwidth!="auto"){v-=this.minwidth}else{if(this.width>this.maxwidth&&this.maxwidth!="auto"){v-=this.maxwidth}else{if(this.width.toString().indexOf("%")!=-1){var k=0;k=parseFloat(this.width)*m/100;if(k<this.minwidth&&this.minwidth!="auto"){k=this.minwidth}if(k>this.maxwidth&&this.maxwidth!="auto"){k=this.maxwidth}v-=k}else{if(typeof this.width=="string"){this.width=parseInt(this.width)}v-=this.width}}}}else{n+=this.text}}if(this.width==null||this.width=="auto"){s[s.length]=this}q[q.length]=this});if(this.rtl){for(var t=0;t<q.length;t++){this.columns.replace(t,q[t])}}var f=this.headerZIndex;var i=0;var e=g.columnsHeight;var b=function(k,x){var j=g.columnGroupslevel*g.columnsHeight;j=j-(x.level*g.columnsHeight);return j};var o=0;var c=document.createDocumentFragment();a.each(this.columns.records,function(D,I){this.height=g.columnsHeight;if(g.columnGroups){if(g.columnGroups.length){this.height=b(this.datafield,this);e=this.height}}var y=g.toTP("jqx-grid-column-header")+" "+g.toTP("jqx-widget-header");if(g.rtl){y+=" "+g.toTP("jqx-grid-column-header-rtl")}if(!g.enableBrowserSelection){y+=" "+g.toTP("jqx-disableselect")}var E=!g.rtl?f--:f++;var k=document.createElement("div");k.setAttribute("role","columnheader");k.style.position="absolute";k.style.zIndex=E;k.style.height="100%";k.className=y;var z=a(k);if(g.rtl&&D===0){z[0].style.borderLeftColor="transparent"}if(g.columnGroups){z[0].style.height=e+"px";z[0].style.bottom="0px"}else{if(!this.timeColumn){z[0].style.height=-1+e+"px"}}this.uielement=z;this.element=z;if(this.classname!=""&&this.classname){z.addClass(this.classname)}var K=this.width;var L=false;if(this.width===null){this.width="auto"}if(this.width.toString().indexOf("%")!=-1||this._percentagewidth!=undefined){if(this._percentagewidth!=undefined){K=parseFloat(this._percentagewidth)*m/100}else{K=parseFloat(this.width)*m/100}K=Math.round(K);L=true}if(this.width!="auto"&&!this._width&&!L){if(K<this.minwidth&&this.minwidth!="auto"){K=this.minwidth}if(K>this.maxwidth&&this.maxwidth!="auto"){K=this.maxwidth}z[0].style.width=parseInt(K)+"px"}else{if(L){if(K<this.minwidth&&this.minwidth!="auto"){K=this.minwidth}if(K>this.maxwidth&&this.maxwidth!="auto"){K=this.maxwidth}if(this._percentagewidth==undefined||this.width.toString().indexOf("%")!=-1){this._percentagewidth=this.width}z.width(K);this.width=K}else{var A=g.columns.records.length;var C=g._views[g._view].type;if(C==="dayView"||C==="weekView"){var G=g._views[g._view];if(G.timeRuler){if(G.timeRuler.timeZones){A-=G.timeRuler.timeZones.length}A--}else{A--}}else{if(C==="monthView"&&g._views[g._view].showWeekNumbers){A--}}var j=Math.floor(v*(1/A));if(g.resources&&g.resources.resourceColumnWidth&&g.resources.resourceColumnWidth!="auto"){j=g.resources.resourceColumnWidth}else{if(g.resources&&g.resources.resourceColumnWidth&&g.resources.resourceColumnWidth=="auto"){if(g.resources.orientation=="horizontal"){j=Math.round((2+v)*(1/g._getColumnsLengthPerView()))}}}var H=(v*(1/A))-j;o+=H;if(o>=1){o-=1;j++}if(o>=0.5&&D==g.columns.records.length-1){j++}if(isNaN(j)){j=this.minwidth}if(C=="agendaView"){j=v/s.length;j++}if(j<0){var J=a("<span>"+this.text+"</span>");a(document.body).append(J);j=10+J.width();J.remove()}if(j<this.minwidth){j=this.minwidth}if(j>this.maxwidth){j=this.maxwidth}this._width="auto";this.width=parseInt(j);K=this.width;z.width(this.width)}}if(this.timeColumn){z.css("border-bottom-color","transparent");if(l.timeRuler&&l.timeRuler.timeZones){if(D<l.timeRuler.timeZones.length){z.css("border-right-color","transparent")}}if(this.tableRows==1){z.addClass(g.toTP("jqx-scheduler-time-column"))}}if(this.hidden){z.css("display","none")}var x=a(z.children()[0]);h[0].cells[D]=z[0];var B=g._rendercolumnheader(this.text,this.align,e,g);z[0].innerHTML=B;c.appendChild(z[0]);var F=this;z[0].style.left=d+"px";if(!(this.hidden)){d+=K}});h[0].appendChild(c);if(d>0){this.columnsheader[0].style.width=2+d+"px"}else{this.columnsheader[0].style.width=d+"px"}this._columnswidth=d;this.columnsrow=h;g.columnsheader.append(h);h[0].style.width=d+"px";if(this.columnGroups){this._rendercolumnGroups()}},_rendercolumnGroups:function(){if(!this.columnGroups){return}var r=this.headerZIndex+this.columns.records.length;var m=this;var f=m.toTP("jqx-grid-column-header")+" "+m.toTP("jqx-grid-columngroup-header")+" "+m.toTP("jqx-widget-header");if(m.rtl){f+=" "+m.toTP("jqx-grid-columngroup-header-rtl")}var d=this.columnsheader.find("#columntable"+this.element.id);d.find("jqx-grid-columngroup-header").remove();for(var g=0;g<this.columnGroupslevel-1;g++){for(var k=0;k<this.columnGroups.length;k++){var o=this.columnGroups[k];var b=o.level;if(b!==g){continue}var n=b*this.columnsHeight;var c=99999;if(o.groups){var q=function(u){var t=0;for(var s=0;s<u.groups.length;s++){var i=u.groups[s];if(!i.groups){if(!i.hidden){t+=i.width;c=Math.min(parseInt(i.element[0].style.left),c)}}else{t+=q(i)}}return t};o.width=q(o);o.left=c;var p=this.columnsHeight;var l=r--;var e=a('<div role="columnheader" style="z-index: '+l+';position: absolute;" class="'+f+'"></div>');var h=a(this._rendercolumnheader(o.text,o.align,this.columnsHeight,this));if(o.renderer){o.renderer(e,o.text)}e.append(h);e[0].style.left=c+"px";if(c===0){e[0].style.borderLeftColor="transparent"}e[0].style.top=n+"px";e[0].style.height=p+"px";e[0].style.width=-1+o.width+"px";d.append(e);o.element=e}}}},_resizecolumnGroups:function(){if(!this.columnGroups){return}for(var c=0;c<this.columnGroups.length;c++){var h=this.columnGroups[c];var j=h.level;var g=j*this.columnsHeight;var f=99999;if(h.groups){var e=function(m){var l=0;for(var k=0;k<m.groups.length;k++){var i=m.groups[k];if(!i.groups){l+=i.width;f=Math.min(parseInt(i.element[0].style.left),f)}else{l+=e(i)}}return l};h.width=e(h);h.left=f;var b=this.columnsHeight;var d=h.element;d[0].style.left=f+"px";d[0].style.top=g+"px";d[0].style.height=b+"px";d[0].style.width=-1+h.width+"px"}}},_removecolumnhandlers:function(e){var c=this;var b=a(e.element);if(b.length>0){c.removeHandler(b,"mouseenter");c.removeHandler(b,"mouseleave");var d=a(e.filtericon);c.removeHandler(d,"mousedown");c.removeHandler(d,"click");c.removeHandler(b,"click")}},destroy:function(){var b=this;b._removeHandlers();if(b._editDialog){b._editDialog.jqxWindow("destroy")}if(b.menu){b.menu.jqxMenu("destroy")}if(b.editRecurrenceDialog){b.editRecurrenceDialog.jqxWindow("destroy")}b.vScrollBar.jqxScrollBar("destroy");b.hScrollBar.jqxScrollBar("destroy");delete b.vScrollBar;delete b.hScrollBar;delete b._mousewheelfunc;a.jqx.utilities.resize(b.host,null,true);b.host.remove()},propertiesChangedHandler:function(d,b,c){if(c&&c.width&&c.height&&Object.keys(c).length==2){d.host.height(d.height);d.host.width(d.width);d._updatesize(false,true)}},propertyChangedHandler:function(b,d,f,e){if(this.isInitialized==undefined||this.isInitialized==false){return}if(b.batchUpdate&&b.batchUpdate.width&&b.batchUpdate.height&&Object.keys(b.batchUpdate).length==2){return}if(e!==f){if(d=="filterable"){b._render()}else{if(d=="view"){b.setView(e)}else{if(d=="views"){b._columns=null;b._views=new Array();b._view=b.view;for(var c=0;c<b.views.length;c++){if(a.type(b.views[c])==="string"){b._views.push({type:b.views[c]})}else{b._views.push(b.views[c])}}for(var c=0;c<b._views.length;c++){if(b._views[c].type==b.view){b._view=c;break}}b._render()}else{if(d==="height"){b._hostWidth=null;b._hostHeight=null;b.host.height(b.height);b.host.width(b.width);b._updatesize(false,true)}else{if(d==="width"){b._hostWidth=null;b._hostHeight=null;b.host.height(b.height);b.host.width(b.width);b._updatesize(true,false)}else{if(d==="source"){b.updateBoundData()}else{if(d=="resources"){b.updateBoundData()}else{if(d==="columns"||d==="columnGroups"){b._columns=null;b._render()}else{if(d==="selectionMode"){b.selectionMode=e.toLowerCase()}else{if(d=="touchMode"){b._removeHandlers();b.touchDevice=null;b.vScrollBar.jqxScrollBar({touchMode:e});b.hScrollBar.jqxScrollBar({touchMode:e});b.refresh();b._addHandlers()}else{if(d=="enableHover"){return}else{if(d=="showLegend"){b.legendbartop.show();b.legendbarbottom.show();b.refresh()}else{if(d=="disabled"){if(e){b.host.addClass(this.toThemeProperty("jqx-fill-state-disabled"))}else{b.host.removeClass(this.toThemeProperty("jqx-fill-state-disabled"))}b.host.find(".jqx-grid-group-collapse").css("cursor",e?"default":"pointer");b.host.find(".jqx-grid-group-expand").css("cursor",e?"default":"pointer")}else{if(d=="columnsHeight"){b._render()}else{if(d=="localization"){b._render();if(b.editRecurrenceDialog){b.editRecurrenceDialog.jqxWindow("destroy");b.createEditRecurrenceDialog()}}else{if(d=="theme"){a.jqx.utilities.setTheme(f,e,b.host);if(b._editDialog){a.jqx.utilities.setTheme(f,e,b._editDialog)}if(b.editRecurrenceDialog){a.jqx.utilities.setTheme(f,e,b.editRecurrenceDialog)}if(b.menu){b.menu.jqxMenu({theme:b.theme})}b.vScrollBar.jqxScrollBar({theme:b.theme});b.hScrollBar.jqxScrollBar({theme:b.theme});b.refresh()}else{if(d==="date"){b.navigateTo(e)}else{b.refresh()}}}}}}}}}}}}}}}}}}},_rendercolumnheader:function(g,h,d,e){var f="4px";if(e.columnGroups){f=(d/2-this._columnheight/2);if(f<0){f=4}f+="px"}else{if(this.columnsHeight!=25){f=(this.columnsHeight/2-this._columnheight/2);if(f<0){f=4}f+="px"}}var c='<div style="overflow: hidden; text-overflow: ellipsis; text-align: '+h+"; margin-left: 4px; margin-right: 4px; margin-bottom: "+f+"; margin-top: "+f+';"><span style="text-overflow: ellipsis; cursor: default;">'+g+"</span></div>";if(this.columnRenderer){var b=this.columnRenderer(g,h,d,c);if(b!=undefined){return b}}return c}})})(jqxBaseFramework);
+

mercurial