(function(){page.using={types:["SearchOptionProvider","DayWeekPlanning"]};page.onLoad=function(){var r={parent:page,infoAreaIds:[],search:{},calendar:{model:{appointmentDefaultValues:{},defaultValuesModel:{expandName:"MADayWeekPlanningDefaults",mode:"New",uid:{infoAreaId:"MA"}}},settingsRecordUid:page.url.getUid("settingsRecord")||page.url.getUid()||page.url.getUid("saved"),settingsName:"DayWeekPlanning"}};i(r);e(r);a(r);n(r,"defaultFilterName","defaultFilterSet");t(r);var s=$("#dayWeekPlanning").uniqueId("dayWeekPlanning",true);u8.widget("DayWeekPlanning",s,r)};function e(e){var a=u8.services.searchOptionProvider;var n=a.buildFromPage(page,{showRelatedView:false});e.infoAreaIds=a.getInfoAreaIds(n);for(var t=0;t<e.infoAreaIds.length;t++){var i=e.infoAreaIds[t];e.search[i]=a.filterByInfoArea(n,i)}}function a(e){var a=page.url.get(["defaultFieldValuesForMA","MADefaultValues"],"").split(";");for(var n=0;n<a.length;n++){var t=a[n];var i=t.indexOf(":");if(i>0){var r=t.substring(0,i);var s=t.substring(i+1);if(s&&s.startsWith('"')&&s.endsWith('"')){s=s.substring(1,s.length-1)}if(s&&s.startsWith("#")){s=s.substring(1)}e.calendar.model.appointmentDefaultValues[r]=s}}}function n(e,a,n){var t=page.url.get(a,"").split(";");for(var i=0;i<t.length;i++){var r=t[i].trim();var s=r.indexOf(".");if(s<0){continue}var l=r.substring(0,s);if(e.infoAreaIds.contains(l)){continue}var u=e.calendar[n];if(!u){u={items:[],__useContextInfoAreas:true};e.calendar[n]=u}u.items.push({infoAreaId:l,filterName:r})}}function t(e){var a=page.url.get("linkOfMAToSource");if(!a){a=page.url.get("sourceLink")}e.sourceLink=a}function i(e){var a=page.url.get("contactTimeTypes");if(!a){return}if(a.indexOf("=")>=0){e.contactTimeTypes=u8.csv.splitKeyValue(a,"object")}else{e.contactTimeTypes={"*":a}}}})();