403Webshell
Server IP : 80.87.202.40  /  Your IP : 216.73.216.169
Web Server : Apache
System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64
User : bitrix ( 600)
PHP Version : 8.2.27
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : OFF |  Sudo : ON |  Pkexec : ON
Directory :  /home/bitrix/ext_www/rospirotorg.ru/bitrix/js/calendar/new/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /home/bitrix/ext_www/rospirotorg.ru/bitrix/js/calendar/new/calendar-util.min.js
(function(e){function t(e,t,i){this.calendar=e;this.config=t||{};if(!this.config.userSettings){this.config.userSettings={}}this.additionalParams=i;this.dayLength=864e5;this.type=this.config.type;this.userId=parseInt(this.config.userId);this.ownerId=parseInt(this.config.ownerId);this.accessNames={};if(this.config.accessNames){this.handleAccessNames(this.config.accessNames)}this.DATE_FORMAT_BX=BX.message("FORMAT_DATE");this.DATETIME_FORMAT_BX=BX.message("FORMAT_DATETIME");this.DATE_FORMAT=BX.Main.DateTimeFormat.convertBitrixFormat(BX.message("FORMAT_DATE"));this.DATETIME_FORMAT=BX.Main.DateTimeFormat.convertBitrixFormat(BX.message("FORMAT_DATETIME"));if(this.DATETIME_FORMAT_BX.substr(0,this.DATE_FORMAT_BX.length)===this.DATE_FORMAT_BX){this.TIME_FORMAT=BX.util.trim(this.DATETIME_FORMAT.substr(this.DATE_FORMAT.length));this.TIME_FORMAT_BX=BX.util.trim(this.DATETIME_FORMAT_BX.substr(this.DATE_FORMAT_BX.length))}else{this.TIME_FORMAT_BX=BX.isAmPmMode()?"H:MI:SS T":"HH:MI:SS";this.TIME_FORMAT=BX.Main.DateTimeFormat.convertBitrixFormat(BX.isAmPmMode()?"H:MI:SS T":"HH:MI:SS")}this.TIME_FORMAT_SHORT_BX=this.TIME_FORMAT_BX.replace(":SS","");this.TIME_FORMAT_SHORT=this.TIME_FORMAT.replace(":s","");this.KEY_CODES={backspace:8,enter:13,escape:27,space:32,delete:46,left:37,right:39,up:38,down:40,z:90,y:89,shift:16,ctrl:17,alt:18,cmd:91,cmdRight:93,pageUp:33,pageDown:34}}t.prototype={getWeekDays:function(){return this.config.weekDays},getWeekStart:function(){return this.config.weekStart},getWeekEnd:function(){return{MO:"SU",TU:"MO",WE:"TU",TH:"WE",FR:"TH",SA:"FR",SU:"SA"}[this.config.weekStart]},getWeekDayOffset:function(e){if(!this.weekDayOffsetIndex){var t,i=this.getWeekDays();this.weekDayOffsetIndex={};for(t=0;t<i.length;t++)this.weekDayOffsetIndex[i[t][2]]=t}return this.weekDayOffsetIndex[e]},getWeekDayByInd:function(e){return["SU","MO","TU","WE","TH","FR","SA"][e]},isHoliday:function(e){var t;if(!this.weekHolidays){this.weekHolidays={};for(t in this.config.week_holidays){if(this.config.week_holidays.hasOwnProperty(t)){this.weekHolidays[this.config.week_holidays[t]]=true}}this.yearHolidays={};for(t in this.config.year_holidays){if(this.config.year_holidays.hasOwnProperty(t)){this.yearHolidays[this.config.year_holidays[t]]=true}}this.yearWorkdays={};for(t in this.config.year_workdays){if(this.config.year_workdays.hasOwnProperty(t)){this.yearWorkdays[this.config.year_workdays[t]]=true}}}var i=[6,0,1,2,3,4,5][e.getDay()],n=e.getDate(),r=e.getMonth();return(this.weekHolidays[i]||this.yearHolidays[n+"."+r])&&!this.yearWorkdays[n+"."+r]},isToday:function(e){var t=new Date;return t.getDate()==e.getDate()&&t.getMonth()==e.getMonth()&&t.getFullYear()==e.getFullYear()},getWorkTime:function(){this.config.userWorkTime=this.config.userWorkTime||[];if(this.config.userSettings.work_time_start&&this.config.userSettings.work_time_end){this.workTime={start:Math.floor(parseFloat(this.config.userSettings.work_time_start||9)),end:Math.ceil(parseFloat(this.config.userSettings.work_time_end||18))}}else{this.workTime={start:Math.floor(parseFloat(this.config.userWorkTime[0]||9)),end:Math.ceil(parseFloat(this.config.userWorkTime[1]||18))}}this.getWorkTime=BX.proxy((function(){return this.workTime}),this);return this.workTime},setWorkTime:function(e){this.workTime={start:Math.min(Math.max(e.start,0),24),end:Math.min(Math.max(e.end,e.start),24)};BX.userOptions.save("calendar","workTime","start",this.workTime.start);BX.userOptions.save("calendar","workTime","end",this.workTime.end);return this.workTime},formatTime:function(e,t,i){if(BX.type.isDate(e)){t=e.getMinutes();e=e.getHours()}var n="";if(i!==true||!BX.isAmPmMode())i=false;if(t==undefined){t="00"}else{t=parseInt(t,10);if(isNaN(t)){t="00"}else{if(t>59)t=59;t=t<10?"0"+t.toString():t.toString()}}e=parseInt(e,10);if(e>24){e=24}if(isNaN(e)){e=0}if(BX.isAmPmMode()){var r="am";if(e==0){e=12}else if(e==12){r="pm"}else if(e>12){r="pm";e-=12}if(i){n=e.toString()+" "+r}else{n=e.toString()+":"+t.toString()+" "+r}}else{n=e.toString()+":"+t.toString()}return n},formatDate:function(e){if(BX.type.isDate(e))e=e.getTime();return BX.Main.DateTimeFormat.format(this.DATE_FORMAT,e/1e3)},formatDateTime:function(e){if(BX.type.isDate(e))e=e.getTime();return BX.Main.DateTimeFormat.format(this.DATETIME_FORMAT,e/1e3)},formatDateUsable:function(e,t){var i=BX.Main.DateTimeFormat.convertBitrixFormat(BX.message("FORMAT_DATE"));if(BX.message("LANGUAGE_ID")=="ru"||BX.message("LANGUAGE_ID")=="ua"){i="j F";if(e.getFullYear&&e.getFullYear()!=(new Date).getFullYear()&&t!==false){i+=" Y"}}return BX.Main.DateTimeFormat.format([["today","today"],["tommorow","tommorow"],["yesterday","yesterday"],["",i]],e)},parseTime:function(e){var t=this.parseDate(BX.Main.DateTimeFormat.format(this.DATE_FORMAT,new Date)+" "+e,false);return t?{h:t.getHours(),m:t.getMinutes()}:t},parseDate:function(e,t,i){var n,r,s,a,o=false;if(!t)t=BX.message("FORMAT_DATETIME");e=BX.util.trim(e);if(i!==false)t=t.replace(":SS","");if(BX.type.isNotEmptyString(e)){a="";for(n=1;n<=12;n++){a=a+"|"+BX.message("MON_"+n)}var u=new RegExp("([0-9]+|[a-z]+"+a+")","ig"),c=e.match(u),f=BX.message("FORMAT_DATE").match(/(DD|MI|MMMM|MM|M|YYYY)/gi),l=[],g=[],h={};if(!c){return null}if(c.length>f.length){f=t.match(/(DD|MI|MMMM|MM|M|YYYY|HH|H|SS|TT|T|GG|G)/gi)}for(n=0,r=c.length;n<r;n++){if(BX.util.trim(c[n])!=""){l[l.length]=c[n]}}for(n=0,r=f.length;n<r;n++){if(BX.util.trim(f[n])!=""){g[g.length]=f[n]}}var m=BX.util.array_search("MMMM",g);if(m>0){l[m]=BX.getNumMonth(l[m]);g[m]="MM"}else{m=BX.util.array_search("M",g);if(m>0){l[m]=BX.getNumMonth(l[m]);g[m]="MM"}}for(n=0,r=g.length;n<r;n++){s=g[n].toUpperCase();h[s]=s=="T"||s=="TT"?l[n]:parseInt(l[n],10)}if(h["DD"]>0&&h["MM"]>0&&h["YYYY"]>0){var d=new Date;if(o){d.setUTCDate(1);d.setUTCFullYear(h["YYYY"]);d.setUTCMonth(h["MM"]-1);d.setUTCDate(h["DD"]);d.setUTCHours(0,0,0)}else{d.setDate(1);d.setFullYear(h["YYYY"]);d.setMonth(h["MM"]-1);d.setDate(h["DD"]);d.setHours(0,0,0)}if((!isNaN(h["HH"])||!isNaN(h["GG"])||!isNaN(h["H"])||!isNaN(h["G"]))&&!isNaN(h["MI"])){if(!isNaN(h["H"])||!isNaN(h["G"])){var T=(h["T"]||h["TT"]||"am").toUpperCase()=="PM";var p=parseInt(h["H"]||h["G"]||0,10);if(T){h["HH"]=p+(p==12?0:12)}else{h["HH"]=p<12?p:0}}else{h["HH"]=parseInt(h["HH"]||h["GG"]||0,10)}if(isNaN(h["SS"]))h["SS"]=0;if(o){d.setUTCHours(h["HH"],h["MI"],h["SS"])}else{d.setHours(h["HH"],h["MI"],h["SS"])}}return d}}return null},findTargetNode:function(e,t){if(e){var i=false,n="data-bx-calendar",r;if(!t)t=this.calendar.viewsCont;if(e.attributes&&e.attributes.length){for(r=0;r<e.attributes.length;r++){if(e.attributes[r].name&&e.attributes[r].name.substr(0,n.length)==n){i=e;break}}}if(!i){i=BX.findParent(e,(function(e){var t;if(e.attributes&&e.attributes.length){for(t=0;t<e.attributes.length;t++){if(e.attributes[t].name&&e.attributes[t].name.substr(0,n.length)==n)return true}}return false}),t)}}return i},getViewHeight:function(){var e=756,t=BX.GetWindowInnerSize(document).innerHeight-300;return Math.max(e,t)},showWeekNumber:function(){return this.getUserOption("showWeekNumbers","N")=="Y"},getWeekNumber:function(e){var t;if(this.getWeekStart()=="SU"){e+=this.dayLength*2}else if(this.getWeekStart()=="MO"){e+=this.dayLength}t=BX.Main.DateTimeFormat.format("W",e/1e3);return t},getScrollbarWidth:function(){if(BX.browser.IsMac()){r=17}else{var e=this.calendar.mainCont.appendChild(BX.create("DIV",{props:{className:"calendar-tmp-outer"}})),t=e.offsetWidth;e.style.overflow="scroll";var i=e.appendChild(BX.create("DIV",{props:{className:"calendar-tmp-inner"}})),n=i.offsetWidth,r=t-n;BX.cleanNode(e,true)}this.getScrollbarWidth=function(){return r};return r},getMessagePlural:function(e,t){return BX.Loc.getMessagePlural(e,t)},getUserOption:function(e,t){if(this.config.userSettings[e]===undefined)return t;return this.config.userSettings[e]},setUserOption:function(e,t){if(this.config.userSettings[e]!==t){BX.userOptions.save("calendar","user_settings",e,t);this.config.userSettings[e]=t}},getKeyCodes:function(){return this.KEY_CODES},getMousePos:function(t){if(!t)t=e.event;var i=0,n=0;if(t.pageX||t.pageY){i=t.pageX;n=t.pageY}else if(t.clientX||t.clientY){i=t.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft)-document.documentElement.clientLeft;n=t.clientY+(document.documentElement.scrollTop||document.body.scrollTop)-document.documentElement.clientTop}return{x:i,y:n}},getDayCode:function(e){return e.getFullYear()+"-"+("0"+~~(e.getMonth()+1)).substr(-2,2)+"-"+("0"+~~e.getDate()).substr(-2,2)},getTextColor:function(e){if(!e)return false;if(e.charAt(0)=="#")e=e.substring(1,7);var t=parseInt(e.substring(0,2),16),i=parseInt(e.substring(2,4),16),n=parseInt(e.substring(4,6),16),r=(t*.8+i+n*.2)/510*100;return r<50},getTimeValue:function(e){return e.getHours()+Math.round(e.getMinutes()*100/60)/100},getTimeEx:function(e){return Math.round(e.getTime()/6e4)*6e4},getTimeByInt:function(e){e=parseInt(e);var t=Math.floor(e/60),i=e-t*60;return{hour:t,min:i}},getTimeByFraction:function(e,t){t=t||5;e=Math.min(Math.max(e,0),24);var i=true,n=Math.floor(e),r=i?Math.floor((e-n)*60/t)*t:Math.round((e-n)*60/t)*t;if(r==60){r=0;n++}if(n==24&&r==0){n=23;r=59}return{h:n,m:r}},getWeekNumberInMonthByDate:function(e){var t=new Date;t.setFullYear(e.getFullYear(),e.getMonth(),1);return parseInt(BX.Main.DateTimeFormat.format("W",e.getTime()/1e3))-parseInt(BX.Main.DateTimeFormat.format("W",t.getTime()/1e3))},getSimpleTimeList:function(){var e,t=[];for(e=0;e<24;e++){t.push({value:e*60,label:this.formatTime(e,0)});t.push({value:e*60+30,label:this.formatTime(e,30)})}this.getSimpleTimeList=function(){return t};return t},adaptTimeValue:function(e){e=parseInt(e.h*60)+parseInt(e.m);var t=this.getSimpleTimeList(),i=24*60,n=false,r;for(r=0;r<t.length;r++){if(Math.abs(t[r].value-e)<i){i=Math.abs(t[r].value-e);n=r;if(i<=15)break}}return t[n||0]},getMeetingRoomList:function(){return this.config.meetingRooms||[]},mergeSocnetDestinationConfig:function(e){if(e.USERS){for(var t in e.USERS){if(e.USERS.hasOwnProperty(t)&&!this.additionalParams["socnetDestination"].USERS[t]){this.additionalParams["socnetDestination"].USERS[t]=e.USERS[t]}}}},getSocnetDestinationConfig:function(e){var t,i=this.additionalParams["socnetDestination"]||{};if(e=="items"){t={users:i.USERS||{},groups:i.EXTRANET_USER=="Y"||i.DENY_TOALL?{}:{UA:{id:"UA",name:i.DEPARTMENT?BX.message("EC_SOCNET_DESTINATION_4"):BX.message("EC_SOCNET_DESTINATION_3")}},sonetgroups:i.SONETGROUPS||{},department:i.DEPARTMENT||{},departmentRelation:i.DEPARTMENT_RELATION||{}}}else if(e=="itemsLast"&&i.LAST){t={users:i.LAST.USERS||{},groups:i.EXTRANET_USER=="Y"?{}:{UA:true},sonetgroups:i.LAST.SONETGROUPS||{},department:i.LAST.DEPARTMENT||{}}}else if(e=="itemsSelected"){t=i.SELECTED||{}}return t||{}},getActionUrl:function(){return this.config.actionUrl},getTimezoneList:function(){return this.additionalParams.timezoneList||[]},getDefaultColors:function(){return this.additionalParams.defaultColorsList},getFormSettings:function(e){return this.additionalParams.formSettings&&this.additionalParams.formSettings[e]?this.additionalParams.formSettings[e]:{}},saveFormSettings:function(e,t){if(e){BX.userOptions.save("calendar",e,"pinnedFields",t.pinnedFields)}},randomInt:function(e,t){return Math.round(e-.5+Math.random()*(t-e+1))},handleAccessNames:function(e){for(var t in e){if(e.hasOwnProperty(t)){this.accessNames[t]=e[t]}}},getAccessName:function(e){return this.accessNames[e]||e},setAccessName:function(e,t){this.accessNames[e]=t},getSectionAccessTasks:function(){return this.config.sectionAccessTasks},getTypeAccessTasks:function(){return this.config.typeAccessTasks},getDefaultTypeAccessTask:function(){var e,t=this.getTypeAccessTasks();for(e in t){if(t.hasOwnProperty(e)&&t[e].name=="calendar_type_view"){break}}this.getDefaultTypeAccessTask=function(){return e};return e},getDefaultSectionAccessTask:function(){var e,t=this.getSectionAccessTasks();for(e in t){if(t.hasOwnProperty(e)&&t[e].name==="calendar_view"){break}}this.getDefaultSectionAccessTask=function(){return e};return e},getSuperposedTrackedUsers:function(){return(this.config.trackingUsersList||[]).sort((function(e,t){if(!e.LAST_NAME)e.LAST_NAME="";if(!t.LAST_NAME)t.LAST_NAME="";return e.LAST_NAME.localeCompare(t.LAST_NAME)}))},isUserCalendar:function(){return this.type==="user"},isCompanyCalendar:function(){return this.type==="company_calendar"||this.type==="calendar_company"||this.type==="company"},isGroupCalendar:function(){return this.type==="group"},userIsOwner:function(){return this.isUserCalendar()&&this.userId===this.ownerId},isExtranetUser:function(){return this.config.isExtranetUser},hexToRgb:function(e){var t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}:null},addOpacityToHex(e,t){return this.rgbaToHex(this.hexToRgba(e,t))},hexToRgba:function(e,t){var i=this.hexToRgb(e);if(!i)i=this.hexToRgb("#9dcf00");return"rgba("+i.r+", "+i.g+", "+i.b+", "+t+")"},rgbaToHex:function(e){return this.rgbToHex(this.rgbaToRgb(e))},rgbToHex:function(e){function t(e){const t=e.toString(16);return t.length===1?"0"+t:t}return"#"+t(e.r)+t(e.g)+t(e.b)},rgbaToRgb:function(e){if(e.r===undefined){e=this.rgbaFromString(e)}return{r:Math.round((e.a*(e.r/255)+(1-e.a))*255),g:Math.round((e.a*(e.g/255)+(1-e.a))*255),b:Math.round((e.a*(e.b/255)+(1-e.a))*255)}},rgbaFromString(e){const t=e.replace(/^rgba?\(|\s+|\)$/g,"").split(",").map((e=>parseFloat(e)));return{r:t[0],g:t[1],b:t[2],a:t[3]??255}},parseLocation:function(e){if(!e)e="";var t,i={type:false,value:false,str:e};if(e.length>5&&e.substr(0,5)=="ECMR_"){i.type="mr";t=e.split("_");if(t.length>=2){if(!isNaN(parseInt(t[1]))&&parseInt(t[1])>0){i.value=i.mrid=parseInt(t[1])}if(!isNaN(parseInt(t[2]))&&parseInt(t[2])>0){i.mrevid=parseInt(t[2])}}}else if(e.length>5&&e.substr(0,9)=="calendar_"){i.type="calendar";t=e.split("_");if(t.length>=2){if(!isNaN(parseInt(t[1]))&&parseInt(t[1])>0){i.value=i.room_id=parseInt(t[1])}if(!isNaN(parseInt(t[2]))&&parseInt(t[2])>0){i.room_event_id=parseInt(t[2])}}}return i},getTextLocation:function(e){var t=BX.Type.isObject(e)?e:this.parseLocation(e),i,n=t.str;if(t.type=="mr"){n=BX.message("EC_LOCATION_EMPTY");var r=this.calendar.util.getMeetingRoomList();for(i=0;i<r.length;i++){if(t.value==r[i].ID){n=r[i].NAME;break}}}if(t.type=="calendar"){n=BX.message("EC_LOCATION_EMPTY");var s=BX.Calendar.Controls.Location.getLocationList();for(i=0;i<s.length;i++){if(t.value==s[i].ID){n=s[i].NAME;break}}}return n},getTextReminder:function(e){if(BX.util.in_array(e,[0,5,10,15,30,60,120,1440,2880])){return BX.message("EC_REMIND1_SHORT_"+e)}return""},getEditTaskPath:function(){return this.config.editTaskPath},getViewTaskPath:function(e){return this.config.viewTaskPath.replace("#task_id#",e)},readOnlyMode:function(){this.readOnly=this.config.readOnly;if(this.readOnly===undefined){var e=this.calendar.sectionController.getSectionListForEdit();if(!e||!e.length)this.readOnly=true}this.readOnlyMode=BX.proxy((function(){return this.readOnly}),this);return this.readOnly},getLoader:function(e){return BX.create("DIV",{props:{className:"calendar-loader"},html:'<svg class="calendar-loader-circular"'+(e?'style="width: '+parseInt(e)+"px; height: "+parseInt(e)+'px;"':"")+' viewBox="25 25 50 50">'+'<circle class="calendar-loader-path" cx="50" cy="50" r="20" fill="none" stroke-miterlimit="10"/>'+'<circle class="calendar-loader-inner-path" cx="50" cy="50" r="20" fill="none" stroke-miterlimit="10"/>'+"</svg>"})},isFilterEnabled:function(){return this.isUserCalendar()&&this.ownerId===this.userId||this.isCompanyCalendar()||this.isGroupCalendar()},getCounters:function(){return this.config.counters},getCalDavConnections:function(){return this.config.connections||[]},isRichLocationEnabled:function(){return!!this.config.locationFeatureEnabled},isDarkColor:function(e){e=e.toLowerCase();if({"#86b100":true,"#0092cc":true,"#00afc7":true,"#da9100":true,"#e89b06":true,"#00b38c":true,"#de2b24":true,"#bd7ac9":true,"#838fa0":true,"#ab7917":true,"#c3612c":true,"#e97090":true,"#9dcf00":true,"#2fc6f6":true,"#56d1e0":true,"#ffa900":true,"#47e4c2":true,"#f87396":true,"#9985dd":true,"#a8adb4":true,"#af7e00":true}[e]){return true}if(!e)return false;if(e.charAt(0)==="#")e=e.substring(1,7);var t=parseInt(e.substring(0,2),16),i=parseInt(e.substring(2,4),16),n=parseInt(e.substring(4,6),16),r=(t*.8+i+n*.2)/510*100;return r<50},getAvilableViews:function(){return this.config.avilableViews||["day","week","month","list"]},getCustumViews:function(){var e=[];if(this.config.placementParams&&this.config.placementParams.gridPlacementList){e=this.config.placementParams.gridPlacementList}return e},isMeetingsEnabled:function(){return this.config.bSocNet&&this.config.bIntranet},isAccessibilityEnabled:function(){return this.config.bSocNet&&this.config.bIntranet},isPrivateEventsEnabled:function(){return this.config.bSocNet&&this.config.bIntranet},useViewSlider:function(){return this.isMeetingsEnabled()},showEventDescriptionInSimplePopup:function(){return!this.isMeetingsEnabled()},doBxContextFix:function(){if(e.top!==e){Object.keys(e.BX.message).forEach((function(t){var i={};i[t]=e.BX.message[t];e.top.BX.message(i)}));e.__BX=e.BX;if(e.BX.Access&&!e.top.BX.Access){e.top.BX.Access=e.BX.Access}if(e.BX.SocNetLogDestination&&!e.top.BX.SocNetLogDestination){e.top.BX.SocNetLogDestination=e.BX.SocNetLogDestination}e.BX=e.top.BX}},restoreBxContextFix:function(){if(e.__BX){e.BX=e.__BX;delete e.__BX}},getCollabColor:function(){return"#19CC45"}};t.getSimpleTimeList=t.prototype.getSimpleTimeList;t.formatTime=t.prototype.formatTime;t.getTimeByInt=t.prototype.getTimeByInt;if(e.BXEventCalendar){e.BXEventCalendar.Util=t}else{BX.addCustomEvent(e,"onBXEventCalendarInit",(function(){e.BXEventCalendar.Util=t}))}})(window);
//# sourceMappingURL=calendar-util.map.js

Youez - 2016 - github.com/yon3zu
LinuXploit