/* Outlook specific API library */ /* Version: 15.0.4856.3003 */ /* Copyright (c) Microsoft Corporation. All rights reserved. */ /* Your use of this file is governed by the Microsoft Services Agreement http://go.microsoft.com/fwlink/?LinkId=266419. */ /*! Copyright (c) Microsoft Corporation. All rights reserved. */ /*! Your use of this file is governed by the Microsoft Services Agreement http://go.microsoft.com/fwlink/?LinkId=266419. */ Type.registerNamespace("Microsoft.Office.WebExtension.MailboxEnums");Microsoft.Office.WebExtension.MailboxEnums.EntityType={MeetingSuggestion:"meetingSuggestion",TaskSuggestion:"taskSuggestion",Address:"address",EmailAddress:"emailAddress",Url:"url",PhoneNumber:"phoneNumber",Contact:"contact",FlightReservations:"flightReservations",ParcelDeliveries:"parcelDeliveries"};Microsoft.Office.WebExtension.MailboxEnums.ItemType={Message:"message",Appointment:"appointment"};Microsoft.Office.WebExtension.MailboxEnums.ResponseType={None:"none",Organizer:"organizer",Tentative:"tentative",Accepted:"accepted",Declined:"declined"};Microsoft.Office.WebExtension.MailboxEnums.RecipientType={Other:"other",DistributionList:"distributionList",User:"user",ExternalUser:"externalUser"};Microsoft.Office.WebExtension.MailboxEnums.AttachmentType={File:"file",Item:"item",Cloud:"cloud"};Microsoft.Office.WebExtension.MailboxEnums.BodyType={Text:"text",Html:"html"};Microsoft.Office.WebExtension.MailboxEnums.ItemNotificationMessageType={ProgressIndicator:"progressIndicator",InformationalMessage:"informationalMessage",ErrorMessage:"errorMessage"};Microsoft.Office.WebExtension.CoercionType={Text:"text",Html:"html"};Microsoft.Office.WebExtension.MailboxEnums.UserProfileType={Office365:"office365",OutlookCom:"outlookCom",Enterprise:"enterprise"};Microsoft.Office.WebExtension.MailboxEnums.RestVersion={v1_0:"v1.0",v2_0:"v2.0",Beta:"beta"};Type.registerNamespace("OSF.DDA");var OSF=window.OSF||{};OSF.DDA=OSF.DDA||{};window.OSF.DDA.OutlookAppOm=OSF.DDA.OutlookAppOm=function(d,e,c){this.$$d__callAppReadyCallback$p$0=Function.createDelegate(this,this._callAppReadyCallback$p$0);this.$$d_displayContactCardAsync=Function.createDelegate(this,this.displayContactCardAsync);this.$$d_displayNewMessageFormApi=Function.createDelegate(this,this.displayNewMessageFormApi);this.$$d__displayNewAppointmentFormApi$p$0=Function.createDelegate(this,this._displayNewAppointmentFormApi$p$0);this.$$d_windowOpenOverrideHandler=Function.createDelegate(this,this.windowOpenOverrideHandler);this.$$d__getEwsUrl$p$0=Function.createDelegate(this,this._getEwsUrl$p$0);this.$$d__getDiagnostics$p$0=Function.createDelegate(this,this._getDiagnostics$p$0);this.$$d__getUserProfile$p$0=Function.createDelegate(this,this._getUserProfile$p$0);this.$$d__getItem$p$0=Function.createDelegate(this,this._getItem$p$0);this.$$d__getInitialDataResponseHandler$p$0=Function.createDelegate(this,this._getInitialDataResponseHandler$p$0);window.OSF.DDA.OutlookAppOm._instance$p=this;this._officeAppContext$p$0=d;this._appReadyCallback$p$0=c;var a=this,b=function(){if(c)if(!d.get_isDialog())a.invokeHostMethod(1,null,a.$$d__getInitialDataResponseHandler$p$0);else window.setTimeout(a.$$d__callAppReadyCallback$p$0,0)};if(this._areStringsLoaded$p$0())b();else this._loadLocalizedScript$p$0(b)};window.OSF.DDA.OutlookAppOm._throwOnPropertyAccessForRestrictedPermission$i=function(a){if(!a)throw Error.create(window._u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text);};window.OSF.DDA.OutlookAppOm._throwOnOutOfRange$i=function(a,d,c,b){if(ac)throw Error.argumentOutOfRange(b);};window.OSF.DDA.OutlookAppOm._getHtmlBody$p=function(a){var b="";if("htmlBody"in a){window.OSF.DDA.OutlookAppOm._throwOnInvalidHtmlBody$p(a.htmlBody);b=a.htmlBody}return b};window.OSF.DDA.OutlookAppOm._getAttachments$p=function(b){var a=[];if("attachments"in b){a=b.attachments;window.OSF.DDA.OutlookAppOm._throwOnInvalidAttachmentsArray$p(a)}return a};window.OSF.DDA.OutlookAppOm._getOptionsAndCallback$p=function(b){var a=[];if("options"in b)a[0]=b.options;if("callback"in b)a[a.length]=b.callback;return a};window.OSF.DDA.OutlookAppOm._createAttachmentsDataForHost$p=function(b){var c=new Array(0);if(Array.isInstanceOfType(b))for(var a=0;a2048)throw Error.argumentOutOfRange("attachments",a.length,window._u.ExtensibilityStrings.l_AttachmentUrlTooLong_Text);window.OSF.DDA.OutlookAppOm._throwOnInvalidAttachmentName$p(b)};window.OSF.DDA.OutlookAppOm._throwOnInvalidAttachmentItemIdOrName$p=function(a,b){if(!String.isInstanceOfType(a)||!String.isInstanceOfType(b))throw Error.argument("attachments");if(a.length>200)throw Error.argumentOutOfRange("attachments",a.length,window._u.ExtensibilityStrings.l_AttachmentItemIdTooLong_Text);window.OSF.DDA.OutlookAppOm._throwOnInvalidAttachmentName$p(b)};window.OSF.DDA.OutlookAppOm._throwOnInvalidAttachmentName$p=function(a){if(a.length>255)throw Error.argumentOutOfRange("attachments",a.length,window._u.ExtensibilityStrings.l_AttachmentNameTooLong_Text);};window.OSF.DDA.OutlookAppOm._throwOnInvalidRestVersion$p=function(a){if(!a)throw Error.argumentNull("restVersion");if(a!==window.Microsoft.Office.WebExtension.MailboxEnums.RestVersion.v1_0&&a!==window.Microsoft.Office.WebExtension.MailboxEnums.RestVersion.v2_0&&a!==window.Microsoft.Office.WebExtension.MailboxEnums.RestVersion.Beta)throw Error.argument("restVersion");};window.OSF.DDA.OutlookAppOm.getItemIdBasedOnHost=function(a){if(window.OSF.DDA.OutlookAppOm._instance$p._initialData$p$0&&window.OSF.DDA.OutlookAppOm._instance$p._initialData$p$0.get__isRestIdSupported$i$0())return window.OSF.DDA.OutlookAppOm._instance$p.convertToRestId(a,window.Microsoft.Office.WebExtension.MailboxEnums.RestVersion.v1_0);return window.OSF.DDA.OutlookAppOm._instance$p.convertToEwsId(a,window.Microsoft.Office.WebExtension.MailboxEnums.RestVersion.v1_0)};window.OSF.DDA.OutlookAppOm._throwOnArgumentType$p=function(c,b,a){if(Object.getType(c)!==b)throw Error.argumentType(a);};window.OSF.DDA.OutlookAppOm._validateOptionalStringParameter$p=function(a,e,d,b){if($h.ScriptHelpers.isNullOrUndefined(a))return;window.OSF.DDA.OutlookAppOm._throwOnArgumentType$p(a,String,b);var c=a;window.OSF.DDA.OutlookAppOm._throwOnOutOfRange$i(c.length,e,d,b)};window.OSF.DDA.OutlookAppOm._convertToOutlookParameters$p=function(d,a){var b=null;switch(d){case 1:case 2:case 12:case 3:case 14:case 18:case 26:case 32:case 41:case 34:break;case 4:var c=window.JSON.stringify(a.customProperties);b=[c];break;case 5:b=[a.body];break;case 8:case 9:b=[a.itemId];break;case 7:b=[window.OSF.DDA.OutlookAppOm._convertRecipientArrayParameterForOutlookForDisplayApi$p(a.requiredAttendees),window.OSF.DDA.OutlookAppOm._convertRecipientArrayParameterForOutlookForDisplayApi$p(a.optionalAttendees),a.start,a.end,a.location,window.OSF.DDA.OutlookAppOm._convertRecipientArrayParameterForOutlookForDisplayApi$p(a.resources),a.subject,a.body];break;case 44:b=[window.OSF.DDA.OutlookAppOm._convertRecipientArrayParameterForOutlookForDisplayApi$p(a.toRecipients),window.OSF.DDA.OutlookAppOm._convertRecipientArrayParameterForOutlookForDisplayApi$p(a.ccRecipients),window.OSF.DDA.OutlookAppOm._convertRecipientArrayParameterForOutlookForDisplayApi$p(a.bccRecipients),a.subject,a.htmlBody,a.attachments];break;case 43:b=[a.ewsIdOrEmail];break;case 40:b=[a.extensionId,a.consentState];break;case 11:case 10:b=[a.htmlBody];break;case 31:case 30:b=[a.htmlBody,a.attachments];break;case 23:case 13:case 38:case 29:b=[a.data,a.coercionType];break;case 37:case 28:b=[a.coercionType];break;case 17:b=[a.subject];break;case 15:b=[a.recipientField];break;case 22:case 21:b=[a.recipientField,window.OSF.DDA.OutlookAppOm._convertComposeEmailDictionaryParameterForSetApi$p(a.recipientArray)];break;case 19:b=[a.itemId,a.name];break;case 16:b=[a.uri,a.name];break;case 20:b=[a.attachmentIndex];break;case 25:b=[a.TimeProperty,a.time];break;case 24:b=[a.TimeProperty];break;case 27:b=[a.location];break;case 33:case 35:b=[a.key,a.type,a.persistent,a.message,a.icon];break;case 36:b=[a.key];break;default:Sys.Debug.fail("Unexpected method dispid");break}return b};window.OSF.DDA.OutlookAppOm._convertRecipientArrayParameterForOutlookForDisplayApi$p=function(a){return a?a.join(";"):null};window.OSF.DDA.OutlookAppOm._convertComposeEmailDictionaryParameterForSetApi$p=function(a){if(!a)return null;for(var c=new Array(a.length),b=0;bwindow.OSF.DDA.OutlookAppOm._maxEwsRequestSize$p)throw Error.argument("data",window._u.ExtensibilityStrings.l_EwsRequestOversized_Text);this._throwOnMethodCallForInsufficientPermission$i$0(3,"makeEwsRequestAsync");var d=$h.CommonParameters.parse(e,true,true),a=new $h.EwsRequest(d._asyncContext$p$0),f=this;a.onreadystatechange=function(){4===a.get__requestState$i$1()&&d._callback$p$0(a._asyncResult$p$0)};a.send(c)},recordDataPoint:function(a){if($h.ScriptHelpers.isNullOrUndefined(a))throw Error.argumentNull("data");this.invokeHostMethod(402,a,null)},recordTrace:function(a){if($h.ScriptHelpers.isNullOrUndefined(a))throw Error.argumentNull("data");this.invokeHostMethod(401,a,null)},trackCtq:function(a){if($h.ScriptHelpers.isNullOrUndefined(a))throw Error.argumentNull("data");this.invokeHostMethod(400,a,null)},convertToLocalClientTime:function(d){var a=new Date(d.getTime()),b=a.getTimezoneOffset()*-1;if(this._initialData$p$0&&this._initialData$p$0.get__timeZoneOffsets$i$0()){a.setUTCMinutes(a.getUTCMinutes()-b);b=this._findOffset$p$0(a);a.setUTCMinutes(a.getUTCMinutes()+b)}var c=this._dateToDictionary$i$0(a);c.timezoneOffset=b;return c},convertToUtcClientTime:function(c){var a=this._dictionaryToDate$i$0(c);if(this._initialData$p$0&&this._initialData$p$0.get__timeZoneOffsets$i$0()){var b=this._findOffset$p$0(a);a.setUTCMinutes(a.getUTCMinutes()-b);b=!c.timezoneOffset?a.getTimezoneOffset()*-1:c.timezoneOffset;a.setUTCMinutes(a.getUTCMinutes()+b)}return a},convertToRestId:function(a,b){if(!a)throw Error.argumentNull("itemId");window.OSF.DDA.OutlookAppOm._throwOnInvalidRestVersion$p(b);return a.replace(new RegExp("[/]","g"),"-").replace(new RegExp("[+]","g"),"_")},convertToEwsId:function(a,b){if(!a)throw Error.argumentNull("itemId");window.OSF.DDA.OutlookAppOm._throwOnInvalidRestVersion$p(b);return a.replace(new RegExp("[-]","g"),"/").replace(new RegExp("[_]","g"),"+")},getUserIdentityTokenAsync:function(){for(var c=[],a=0;a1&&c[1]){b.error=true;b.errorCode=c[1]}else b.error=false;a(f,b)}else if(Number.isInstanceOfType(d)){var e={};e.error=true;e.errorCode=d;a(f,e)}else throw Error.notImplemented("Return data type from host must be Dictionary or int");}})}else a&&a(-2,null)},_dictionaryToDate$i$0:function(a){var b=new Date(a.year,a.month,a.date,a.hours,a.minutes,a.seconds,!a.milliseconds?0:a.milliseconds);if(window.isNaN(b.getTime()))throw Error.format(window._u.ExtensibilityStrings.l_InvalidDate_Text);return b},_dateToDictionary$i$0:function(b){var a={};a.month=b.getMonth();a.date=b.getDate();a.year=b.getFullYear();a.hours=b.getHours();a.minutes=b.getMinutes();a.seconds=b.getSeconds();a.milliseconds=b.getMilliseconds();return a},_isOwaOnlyMethod$p$0:function(a){switch(a){case 402:case 401:case 400:case 403:return true;default:return false}},_displayNewAppointmentFormApi$p$0:function(a){var d=window.OSF.DDA.OutlookAppOm._validateAndNormalizeRecipientEmails$p(a.requiredAttendees,"requiredAttendees"),c=window.OSF.DDA.OutlookAppOm._validateAndNormalizeRecipientEmails$p(a.optionalAttendees,"optionalAttendees");window.OSF.DDA.OutlookAppOm._validateOptionalStringParameter$p(a.location,0,window.OSF.DDA.OutlookAppOm._maxLocationLength$p,"location");window.OSF.DDA.OutlookAppOm._validateOptionalStringParameter$p(a.body,0,window.OSF.DDA.OutlookAppOm.maxBodyLength,"body");window.OSF.DDA.OutlookAppOm._validateOptionalStringParameter$p(a.subject,0,window.OSF.DDA.OutlookAppOm._maxSubjectLength$p,"subject");if(!$h.ScriptHelpers.isNullOrUndefined(a.start)){window.OSF.DDA.OutlookAppOm._throwOnArgumentType$p(a.start,Date,"start");var f=a.start;a.start=f.getTime();if(!$h.ScriptHelpers.isNullOrUndefined(a.end)){window.OSF.DDA.OutlookAppOm._throwOnArgumentType$p(a.end,Date,"end");var e=a.end;if(e=0&&d.getTime()-f<0)return window.parseInt(a.offset)}throw Error.format(window._u.ExtensibilityStrings.l_InvalidDate_Text);},_areStringsLoaded$p$0:function(){var a=false;try{a=!$h.ScriptHelpers.isNullOrUndefined(window._u.ExtensibilityStrings.l_EwsRequestOversized_Text)}catch(b){}return a},_loadLocalizedScript$p$0:function(i){for(var g=null,l="",m=document.getElementsByTagName("script"),h=m.length-1;h>=0;h--){var b=null,j=m[h].attributes;if(j){var k=j.getNamedItem("src");if(k)b=k.value;if(b){var o=false;b=b.toLowerCase();var e=b.indexOf("office_strings.js");if(e<0){e=b.indexOf("office_strings.debug.js");o=true}if(e>0&&ed+1)l=c.substring(0,d+1);break}}}}if(g){var p=document.getElementsByTagName("head")[0],a=null,r=this,f=function(){if(i&&(!a.readyState||a.readyState&&(a.readyState==="loaded"||a.readyState==="complete"))){a.onload=null;a.onreadystatechange=null;i()}},n=this,q=function(){if(!n._areStringsLoaded$p$0()){var b=l+"en-us/outlook_strings.js";a.onload=null;a.onreadystatechange=null;a=n._createScriptElement$p$0(b);a.onload=f;a.onreadystatechange=f;p.appendChild(a)}};a=this._createScriptElement$p$0(g);a.onload=f;a.onreadystatechange=f;window.setTimeout(q,2e3);p.appendChild(a)}},_createScriptElement$p$0:function(b){var a=document.createElement("script");a.type="text/javascript";a.src=b;return a}};window.OSF.DDA.Settings=OSF.DDA.Settings=function(a){this._rawData$p$0=a};window.OSF.DDA.Settings._convertFromRawSettings$p=function(a){if(!a)return{};if(window.OSF.DDA.OutlookAppOm._instance$p.get__appName$i$0()===8){var b=a.SettingsKey;if(b)return window.OSF.DDA.SettingsManager.deserializeSettings(b)}return a};OSF.DDA.Settings.prototype={_rawData$p$0:null,_settingsData$p$0:null,get__data$p$0:function(){if(!this._settingsData$p$0){this._settingsData$p$0=window.OSF.DDA.Settings._convertFromRawSettings$p(this._rawData$p$0);this._rawData$p$0=null}return this._settingsData$p$0},"get":function(a){return this.get__data$p$0()[a]},"set":function(b,a){this.get__data$p$0()[b]=a},remove:function(a){delete this.get__data$p$0()[a]},saveAsync:function(){for(var c=[],b=0;b32768){var d=window.OSF.DDA.OutlookAppOm._instance$p.createAsyncResult(null,1,9019,a._asyncContext$p$0,""),e=this;window.setTimeout(function(){a._callback$p$0(d)},0);return}if(window.OSF.DDA.OutlookAppOm._instance$p.get__appName$i$0()===64)this._saveSettingsForOwa$p$0(a._callback$p$0,a._asyncContext$p$0);else this._saveSettingsForOutlook$p$0(a._callback$p$0,a._asyncContext$p$0)},_saveSettingsForOutlook$p$0:function(d,c){var a=null;try{var f=window.OSF.DDA.SettingsManager.serializeSettings(this.get__data$p$0()),g=window.JSON.stringify(f),e={SettingsKey:g};window.OSF.DDA.RichClientSettingsManager.write(e)}catch(h){a=h}if(d){var b;if(a)b=window.OSF.DDA.OutlookAppOm._instance$p.createAsyncResult(null,1,9019,c,a.message);else b=window.OSF.DDA.OutlookAppOm._instance$p.createAsyncResult(null,0,0,c,null);d(b)}},_saveSettingsForOwa$p$0:function(b,a){var c=window.OSF.DDA.SettingsManager.serializeSettings(this.get__data$p$0()),d=this;window.OSF.DDA.OutlookAppOm._instance$p.invokeHostMethod(404,[c],function(e,f){if(b){var c;if(e)c=window.OSF.DDA.OutlookAppOm._instance$p.createAsyncResult(null,1,9017,a,String.format(window._u.ExtensibilityStrings.l_InternalProtocolError_Text,e));else{var d=f;if(!d.error)c=window.OSF.DDA.OutlookAppOm._instance$p.createAsyncResult(null,0,0,a,null);else c=window.OSF.DDA.OutlookAppOm._instance$p.createAsyncResult(null,1,9019,a,d.errorMessage)}b(c)}})}};Type.registerNamespace("$h");var $h=window.$h||{};Type.registerNamespace("Office.cast");var Office=window.Office||{};Office.cast=Office.cast||{};$h.Appointment=function(a){this.$$d__getOrganizer$p$2=Function.createDelegate(this,this._getOrganizer$p$2);this.$$d__getNormalizedSubject$p$2=Function.createDelegate(this,this._getNormalizedSubject$p$2);this.$$d__getSubject$p$2=Function.createDelegate(this,this._getSubject$p$2);this.$$d__getResources$p$2=Function.createDelegate(this,this._getResources$p$2);this.$$d__getRequiredAttendees$p$2=Function.createDelegate(this,this._getRequiredAttendees$p$2);this.$$d__getOptionalAttendees$p$2=Function.createDelegate(this,this._getOptionalAttendees$p$2);this.$$d__getLocation$p$2=Function.createDelegate(this,this._getLocation$p$2);this.$$d__getEnd$p$2=Function.createDelegate(this,this._getEnd$p$2);this.$$d__getStart$p$2=Function.createDelegate(this,this._getStart$p$2);$h.Appointment.initializeBase(this,[a]);$h.InitialData._defineReadOnlyProperty$i(this,"start",this.$$d__getStart$p$2);$h.InitialData._defineReadOnlyProperty$i(this,"end",this.$$d__getEnd$p$2);$h.InitialData._defineReadOnlyProperty$i(this,"location",this.$$d__getLocation$p$2);$h.InitialData._defineReadOnlyProperty$i(this,"optionalAttendees",this.$$d__getOptionalAttendees$p$2);$h.InitialData._defineReadOnlyProperty$i(this,"requiredAttendees",this.$$d__getRequiredAttendees$p$2);$h.InitialData._defineReadOnlyProperty$i(this,"resources",this.$$d__getResources$p$2);$h.InitialData._defineReadOnlyProperty$i(this,"subject",this.$$d__getSubject$p$2);$h.InitialData._defineReadOnlyProperty$i(this,"normalizedSubject",this.$$d__getNormalizedSubject$p$2);$h.InitialData._defineReadOnlyProperty$i(this,"organizer",this.$$d__getOrganizer$p$2)};$h.Appointment.prototype={getEntities:function(){return this._data$p$0._getEntities$i$0()},getEntitiesByType:function(a){return this._data$p$0._getEntitiesByType$i$0(a)},getRegExMatches:function(){window.OSF.DDA.OutlookAppOm._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getRegExMatches");return this._data$p$0._getRegExMatches$i$0()},getFilteredEntitiesByName:function(a){return this._data$p$0._getFilteredEntitiesByName$i$0(a)},getRegExMatchesByName:function(a){window.OSF.DDA.OutlookAppOm._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getRegExMatchesByName");return this._data$p$0._getRegExMatchesByName$i$0(a)},displayReplyForm:function(a){window.OSF.DDA.OutlookAppOm._instance$p._displayReplyForm$i$0(a)},displayReplyAllForm:function(a){window.OSF.DDA.OutlookAppOm._instance$p._displayReplyAllForm$i$0(a)},getItemType:function(){return window.Microsoft.Office.WebExtension.MailboxEnums.ItemType.Appointment},_getStart$p$2:function(){return this._data$p$0.get__start$i$0()},_getEnd$p$2:function(){return this._data$p$0.get__end$i$0()},_getLocation$p$2:function(){return this._data$p$0.get__location$i$0()},_getOptionalAttendees$p$2:function(){return this._data$p$0.get__cc$i$0()},_getRequiredAttendees$p$2:function(){return this._data$p$0.get__to$i$0()},_getResources$p$2:function(){return this._data$p$0.get__resources$i$0()},_getSubject$p$2:function(){return this._data$p$0.get__subject$i$0()},_getNormalizedSubject$p$2:function(){return this._data$p$0.get__normalizedSubject$i$0()},_getOrganizer$p$2:function(){return this._data$p$0.get__organizer$i$0()}};$h.AppointmentCompose=function(a){this.$$d__getLocation$p$2=Function.createDelegate(this,this._getLocation$p$2);this.$$d__getEnd$p$2=Function.createDelegate(this,this._getEnd$p$2);this.$$d__getStart$p$2=Function.createDelegate(this,this._getStart$p$2);this.$$d__getOptionalAttendees$p$2=Function.createDelegate(this,this._getOptionalAttendees$p$2);this.$$d__getRequiredAttendees$p$2=Function.createDelegate(this,this._getRequiredAttendees$p$2);$h.AppointmentCompose.initializeBase(this,[a]);$h.InitialData._defineReadOnlyProperty$i(this,"requiredAttendees",this.$$d__getRequiredAttendees$p$2);$h.InitialData._defineReadOnlyProperty$i(this,"optionalAttendees",this.$$d__getOptionalAttendees$p$2);$h.InitialData._defineReadOnlyProperty$i(this,"start",this.$$d__getStart$p$2);$h.InitialData._defineReadOnlyProperty$i(this,"end",this.$$d__getEnd$p$2);$h.InitialData._defineReadOnlyProperty$i(this,"location",this.$$d__getLocation$p$2)};$h.AppointmentCompose.prototype={_requiredAttendees$p$2:null,_optionalAttendees$p$2:null,_start$p$2:null,_end$p$2:null,_location$p$2:null,getItemType:function(){return window.Microsoft.Office.WebExtension.MailboxEnums.ItemType.Appointment},_getRequiredAttendees$p$2:function(){this._data$p$0._throwOnRestrictedPermissionLevel$i$0();if(!this._requiredAttendees$p$2)this._requiredAttendees$p$2=new $h.ComposeRecipient(0,"requiredAttendees");return this._requiredAttendees$p$2},_getOptionalAttendees$p$2:function(){this._data$p$0._throwOnRestrictedPermissionLevel$i$0();if(!this._optionalAttendees$p$2)this._optionalAttendees$p$2=new $h.ComposeRecipient(1,"optionalAttendees");return this._optionalAttendees$p$2},_getStart$p$2:function(){this._data$p$0._throwOnRestrictedPermissionLevel$i$0();if(!this._start$p$2)this._start$p$2=new $h.ComposeTime(1);return this._start$p$2},_getEnd$p$2:function(){this._data$p$0._throwOnRestrictedPermissionLevel$i$0();if(!this._end$p$2)this._end$p$2=new $h.ComposeTime(2);return this._end$p$2},_getLocation$p$2:function(){this._data$p$0._throwOnRestrictedPermissionLevel$i$0();if(!this._location$p$2)this._location$p$2=new $h.ComposeLocation;return this._location$p$2}};$h.AttachmentConstants=function(){};$h.AttachmentDetails=function(a){this.$$d__getIsInline$p$0=Function.createDelegate(this,this._getIsInline$p$0);this.$$d__getAttachmentType$p$0=Function.createDelegate(this,this._getAttachmentType$p$0);this.$$d__getSize$p$0=Function.createDelegate(this,this._getSize$p$0);this.$$d__getContentType$p$0=Function.createDelegate(this,this._getContentType$p$0);this.$$d__getName$p$0=Function.createDelegate(this,this._getName$p$0);this.$$d__getId$p$0=Function.createDelegate(this,this._getId$p$0);this._data$p$0=a;$h.InitialData._defineReadOnlyProperty$i(this,"id",this.$$d__getId$p$0);$h.InitialData._defineReadOnlyProperty$i(this,"name",this.$$d__getName$p$0);$h.InitialData._defineReadOnlyProperty$i(this,"contentType",this.$$d__getContentType$p$0);$h.InitialData._defineReadOnlyProperty$i(this,"size",this.$$d__getSize$p$0);$h.InitialData._defineReadOnlyProperty$i(this,"attachmentType",this.$$d__getAttachmentType$p$0);$h.InitialData._defineReadOnlyProperty$i(this,"isInline",this.$$d__getIsInline$p$0)};$h.AttachmentDetails.prototype={_data$p$0:null,_getId$p$0:function(){return this._data$p$0.id},_getName$p$0:function(){return this._data$p$0.name},_getContentType$p$0:function(){return this._data$p$0.contentType},_getSize$p$0:function(){return this._data$p$0.size},_getAttachmentType$p$0:function(){var a=this._data$p$0.attachmentType;return a<$h.AttachmentDetails._attachmentTypeMap$p.length?$h.AttachmentDetails._attachmentTypeMap$p[a]:window.Microsoft.Office.WebExtension.MailboxEnums.AttachmentType.File},_getIsInline$p$0:function(){return this._data$p$0.isInline}};$h.Body=function(){};$h.Body._tryMapToHostCoercionType$i=function(b,a){a.val=undefined;if(b===window.Microsoft.Office.WebExtension.CoercionType.Html)a.val=3;else if(b===window.Microsoft.Office.WebExtension.CoercionType.Text)a.val=0;else return false;return true};$h.Body.prototype={getAsync:function(g){for(var f=[],a=1;a255)throw Error.argumentOutOfRange("recipients",b.length,window._u.ExtensibilityStrings.l_DisplayNameTooLong_Text);if(a&&a.length>571)throw Error.argumentOutOfRange("recipients",a.length,window._u.ExtensibilityStrings.l_EmailAddressTooLong_Text);};$h.ComposeRecipient._getAsyncFormatter$p=function(d){for(var c=d,b=[],a=0;a864e13)throw Error.argumentOutOfRange("dateTime");var c=$h.CommonParameters.parse(d,false);window.OSF.DDA.OutlookAppOm._instance$p._standardInvokeHostMethod$i$0(25,{TimeProperty:this._timeType$p$0,time:a.getTime()},null,c._asyncContext$p$0,c._callback$p$0)},_ticksToDateFormatter$p$0:function(a){var b=a;return new Date(b)},_getPropertyName$p$0:function(){return this._timeType$p$0===1?"start":"end"}};$h.ComposeTime.TimeType=function(){};$h.ComposeTime.TimeType.prototype={start:1,end:2};$h.ComposeTime.TimeType.registerEnum("$h.ComposeTime.TimeType",false);$h.Contact=function(a){this.$$d__getContactString$p$0=Function.createDelegate(this,this._getContactString$p$0);this.$$d__getAddresses$p$0=Function.createDelegate(this,this._getAddresses$p$0);this.$$d__getUrls$p$0=Function.createDelegate(this,this._getUrls$p$0);this.$$d__getEmailAddresses$p$0=Function.createDelegate(this,this._getEmailAddresses$p$0);this.$$d__getPhoneNumbers$p$0=Function.createDelegate(this,this._getPhoneNumbers$p$0);this.$$d__getBusinessName$p$0=Function.createDelegate(this,this._getBusinessName$p$0);this.$$d__getPersonName$p$0=Function.createDelegate(this,this._getPersonName$p$0);this._data$p$0=a;$h.InitialData._defineReadOnlyProperty$i(this,"personName",this.$$d__getPersonName$p$0);$h.InitialData._defineReadOnlyProperty$i(this,"businessName",this.$$d__getBusinessName$p$0);$h.InitialData._defineReadOnlyProperty$i(this,"phoneNumbers",this.$$d__getPhoneNumbers$p$0);$h.InitialData._defineReadOnlyProperty$i(this,"emailAddresses",this.$$d__getEmailAddresses$p$0);$h.InitialData._defineReadOnlyProperty$i(this,"urls",this.$$d__getUrls$p$0);$h.InitialData._defineReadOnlyProperty$i(this,"addresses",this.$$d__getAddresses$p$0);$h.InitialData._defineReadOnlyProperty$i(this,"contactString",this.$$d__getContactString$p$0)};$h.Contact.prototype={_data$p$0:null,_phoneNumbers$p$0:null,_getPersonName$p$0:function(){return this._data$p$0.PersonName},_getBusinessName$p$0:function(){return this._data$p$0.BusinessName},_getAddresses$p$0:function(){return $h.Entities._getExtractedStringProperty$i(this._data$p$0,"Addresses")},_getEmailAddresses$p$0:function(){return $h.Entities._getExtractedStringProperty$i(this._data$p$0,"EmailAddresses")},_getUrls$p$0:function(){return $h.Entities._getExtractedStringProperty$i(this._data$p$0,"Urls")},_getPhoneNumbers$p$0:function(){if(!this._phoneNumbers$p$0){var a=this;this._phoneNumbers$p$0=$h.Entities._getExtractedObjects$i($h.PhoneNumber,this._data$p$0,"PhoneNumbers",function(a){return new $h.PhoneNumber(a)})}return this._phoneNumbers$p$0},_getContactString$p$0:function(){return this._data$p$0.ContactString}};$h.CustomProperties=function(a){if($h.ScriptHelpers.isNullOrUndefined(a))throw Error.argumentNull("data");if(Array.isInstanceOfType(a)){var b=a;if(b.length>0)this._data$p$0=b[0];else throw Error.argument("data");}else this._data$p$0=a};$h.CustomProperties.prototype={_data$p$0:null,"get":function(f){var b=this._data$p$0[f];if(typeof b==="string"){var a=b;if(a.length>6&&a.startsWith("Date(")&&a.endsWith(")")){var e=a.substring(5,a.length-1),d=window.parseInt(e);if(!window.isNaN(d)){var c=new Date(d);if(c)b=c}}}return b},"set":function(b,a){if(window.OSF.OUtil.isDate(a))a="Date("+a.getTime()+")";this._data$p$0[b]=a},remove:function(a){delete this._data$p$0[a]},saveAsync:function(){for(var c=[],a=0;ad)throw Error.argument();var b=$h.CommonParameters.parse(c,false,true),e=new $h.SaveDictionaryRequest(b._callback$p$0,b._asyncContext$p$0);e._sendRequest$i$0(4,"SaveCustomProperties",{customProperties:this._data$p$0})}};$h.Diagnostics=function(b,a){this.$$d__getOwaView$p$0=Function.createDelegate(this,this._getOwaView$p$0);this.$$d__getHostVersion$p$0=Function.createDelegate(this,this._getHostVersion$p$0);this.$$d__getHostName$p$0=Function.createDelegate(this,this._getHostName$p$0);this._data$p$0=b;this._appName$p$0=a;$h.InitialData._defineReadOnlyProperty$i(this,"hostName",this.$$d__getHostName$p$0);$h.InitialData._defineReadOnlyProperty$i(this,"hostVersion",this.$$d__getHostVersion$p$0);64===this._appName$p$0&&$h.InitialData._defineReadOnlyProperty$i(this,"OWAView",this.$$d__getOwaView$p$0)};$h.Diagnostics.prototype={_data$p$0:null,_appName$p$0:0,_getHostName$p$0:function(){if(8===this._appName$p$0)return"Outlook";else if(64===this._appName$p$0)return"OutlookWebApp";return null},_getHostVersion$p$0:function(){return this._data$p$0.get__hostVersion$i$0()},_getOwaView$p$0:function(){return this._data$p$0.get__owaView$i$0()}};$h.EmailAddressDetails=function(a){this.$$d__getRecipientType$p$0=Function.createDelegate(this,this._getRecipientType$p$0);this.$$d__getAppointmentResponse$p$0=Function.createDelegate(this,this._getAppointmentResponse$p$0);this.$$d__getDisplayName$p$0=Function.createDelegate(this,this._getDisplayName$p$0);this.$$d__getEmailAddress$p$0=Function.createDelegate(this,this._getEmailAddress$p$0);this._data$p$0=a;$h.InitialData._defineReadOnlyProperty$i(this,"emailAddress",this.$$d__getEmailAddress$p$0);$h.InitialData._defineReadOnlyProperty$i(this,"displayName",this.$$d__getDisplayName$p$0);$h.ScriptHelpers.dictionaryContainsKey(a,"appointmentResponse")&&$h.InitialData._defineReadOnlyProperty$i(this,"appointmentResponse",this.$$d__getAppointmentResponse$p$0);$h.ScriptHelpers.dictionaryContainsKey(a,"recipientType")&&$h.InitialData._defineReadOnlyProperty$i(this,"recipientType",this.$$d__getRecipientType$p$0)};$h.EmailAddressDetails._createFromEmailUserDictionary$i=function(b){var a={},d=b.Name,c=b.UserId;a.name=d||$h.EmailAddressDetails._emptyString$p;a.address=c||$h.EmailAddressDetails._emptyString$p;return new $h.EmailAddressDetails(a)};$h.EmailAddressDetails.prototype={_data$p$0:null,toJSON:function(){var a={};a.emailAddress=this._getEmailAddress$p$0();a.displayName=this._getDisplayName$p$0();if($h.ScriptHelpers.dictionaryContainsKey(this._data$p$0,"appointmentResponse"))a.appointmentResponse=this._getAppointmentResponse$p$0();if($h.ScriptHelpers.dictionaryContainsKey(this._data$p$0,"recipientType"))a.recipientType=this._getRecipientType$p$0();return a},_getEmailAddress$p$0:function(){return this._data$p$0.address},_getDisplayName$p$0:function(){return this._data$p$0.name},_getAppointmentResponse$p$0:function(){var a=this._data$p$0.appointmentResponse;return a<$h.EmailAddressDetails._responseTypeMap$p.length?$h.EmailAddressDetails._responseTypeMap$p[a]:window.Microsoft.Office.WebExtension.MailboxEnums.ResponseType.None},_getRecipientType$p$0:function(){var a=this._data$p$0.recipientType;return a<$h.EmailAddressDetails._recipientTypeMap$p.length?$h.EmailAddressDetails._recipientTypeMap$p[a]:window.Microsoft.Office.WebExtension.MailboxEnums.RecipientType.Other}};$h.Entities=function(d,a,c,b){this.$$d__createMeetingSuggestion$p$0=Function.createDelegate(this,this._createMeetingSuggestion$p$0);this.$$d__getParcelDeliveries$p$0=Function.createDelegate(this,this._getParcelDeliveries$p$0);this.$$d__getFlightReservations$p$0=Function.createDelegate(this,this._getFlightReservations$p$0);this.$$d__getContacts$p$0=Function.createDelegate(this,this._getContacts$p$0);this.$$d__getPhoneNumbers$p$0=Function.createDelegate(this,this._getPhoneNumbers$p$0);this.$$d__getUrls$p$0=Function.createDelegate(this,this._getUrls$p$0);this.$$d__getEmailAddresses$p$0=Function.createDelegate(this,this._getEmailAddresses$p$0);this.$$d__getMeetingSuggestions$p$0=Function.createDelegate(this,this._getMeetingSuggestions$p$0);this.$$d__getTaskSuggestions$p$0=Function.createDelegate(this,this._getTaskSuggestions$p$0);this.$$d__getAddresses$p$0=Function.createDelegate(this,this._getAddresses$p$0);this._data$p$0=d||{};this._filteredData$p$0=a||{};this._dateTimeSent$p$0=c;$h.InitialData._defineReadOnlyProperty$i(this,"addresses",this.$$d__getAddresses$p$0);$h.InitialData._defineReadOnlyProperty$i(this,"taskSuggestions",this.$$d__getTaskSuggestions$p$0);$h.InitialData._defineReadOnlyProperty$i(this,"meetingSuggestions",this.$$d__getMeetingSuggestions$p$0);$h.InitialData._defineReadOnlyProperty$i(this,"emailAddresses",this.$$d__getEmailAddresses$p$0);$h.InitialData._defineReadOnlyProperty$i(this,"urls",this.$$d__getUrls$p$0);$h.InitialData._defineReadOnlyProperty$i(this,"phoneNumbers",this.$$d__getPhoneNumbers$p$0);$h.InitialData._defineReadOnlyProperty$i(this,"contacts",this.$$d__getContacts$p$0);$h.InitialData._defineReadOnlyProperty$i(this,"flightReservations",this.$$d__getFlightReservations$p$0);$h.InitialData._defineReadOnlyProperty$i(this,"parcelDeliveries",this.$$d__getParcelDeliveries$p$0);this._permissionLevel$p$0=b};$h.Entities._getExtractedObjects$i=function(m,k,l,f,i,h){var b=null,a=k[l];if(!a)return new Array(0);if(i)a=$h.Entities._removeDuplicate$p(Object,a,$h.Entities._entityDictionaryEquals$p,h);b=new Array(a.length);for(var g=0,e=a,j=e.length,c=0;c=0;a--){for(var d=false,c=a-1;c>=0;c--)if(f(b[a],b[c],e)){d=true;break}d&&Array.removeAt(b,a)}return b};$h.Entities.prototype={_dateTimeSent$p$0:null,_data$p$0:null,_filteredData$p$0:null,_filteredEntitiesCache$p$0:null,_permissionLevel$p$0:0,_taskSuggestions$p$0:null,_meetingSuggestions$p$0:null,_phoneNumbers$p$0:null,_contacts$p$0:null,_addresses$p$0:null,_emailAddresses$p$0:null,_urls$p$0:null,_flightReservations$p$0:null,_parcelDeliveries$p$0:null,_getByType$i$0:function(a){if(a===window.Microsoft.Office.WebExtension.MailboxEnums.EntityType.MeetingSuggestion)return this._getMeetingSuggestions$p$0();else if(a===window.Microsoft.Office.WebExtension.MailboxEnums.EntityType.TaskSuggestion)return this._getTaskSuggestions$p$0();else if(a===window.Microsoft.Office.WebExtension.MailboxEnums.EntityType.Address)return this._getAddresses$p$0();else if(a===window.Microsoft.Office.WebExtension.MailboxEnums.EntityType.PhoneNumber)return this._getPhoneNumbers$p$0();else if(a===window.Microsoft.Office.WebExtension.MailboxEnums.EntityType.EmailAddress)return this._getEmailAddresses$p$0();else if(a===window.Microsoft.Office.WebExtension.MailboxEnums.EntityType.Url)return this._getUrls$p$0();else if(a===window.Microsoft.Office.WebExtension.MailboxEnums.EntityType.Contact)return this._getContacts$p$0();else if(a===window.Microsoft.Office.WebExtension.MailboxEnums.EntityType.FlightReservations)return this._getFlightReservations$p$0();else if(a===window.Microsoft.Office.WebExtension.MailboxEnums.EntityType.ParcelDeliveries)return this._getParcelDeliveries$p$0();return null},_getFilteredEntitiesByName$i$0:function(a){if(!this._filteredEntitiesCache$p$0)this._filteredEntitiesCache$p$0={};if(!$h.ScriptHelpers.dictionaryContainsKey(this._filteredEntitiesCache$p$0,a)){for(var e=false,c=0;c<$h.Entities._allEntityKeys$p.length;c++){var d=$h.Entities._allEntityKeys$p[c],b=this._filteredData$p$0[d];if(!b)continue;if($h.ScriptHelpers.dictionaryContainsKey(b,a)){switch(d){case"EmailAddresses":case"Urls":this._filteredEntitiesCache$p$0[a]=$h.Entities._getExtractedStringProperty$i(b,a);break;case"Addresses":this._filteredEntitiesCache$p$0[a]=$h.Entities._getExtractedStringProperty$i(b,a,true);break;case"PhoneNumbers":this._filteredEntitiesCache$p$0[a]=$h.Entities._getExtractedObjects$i($h.PhoneNumber,b,a,$h.Entities._createPhoneNumber$p,false,null);break;case"TaskSuggestions":this._filteredEntitiesCache$p$0[a]=$h.Entities._getExtractedObjects$i($h.TaskSuggestion,b,a,$h.Entities._createTaskSuggestion$p,true,"TaskString");break;case"MeetingSuggestions":this._filteredEntitiesCache$p$0[a]=$h.Entities._getExtractedObjects$i($h.MeetingSuggestion,b,a,this.$$d__createMeetingSuggestion$p$0,true,"MeetingString");break;case"Contacts":this._filteredEntitiesCache$p$0[a]=$h.Entities._getExtractedObjects$i($h.Contact,b,a,$h.Entities._createContact$p,true,"ContactString");break}e=true;break}}if(!e)this._filteredEntitiesCache$p$0[a]=null}return this._filteredEntitiesCache$p$0[a]},_createMeetingSuggestion$p$0:function(a){return new $h.MeetingSuggestion(a,this._dateTimeSent$p$0)},_getAddresses$p$0:function(){if(!this._addresses$p$0)this._addresses$p$0=$h.Entities._getExtractedStringProperty$i(this._data$p$0,"Addresses",true);return this._addresses$p$0},_getEmailAddresses$p$0:function(){window.OSF.DDA.OutlookAppOm._throwOnPropertyAccessForRestrictedPermission$i(this._permissionLevel$p$0);if(!this._emailAddresses$p$0)this._emailAddresses$p$0=$h.Entities._getExtractedStringProperty$i(this._data$p$0,"EmailAddresses",false);return this._emailAddresses$p$0},_getUrls$p$0:function(){if(!this._urls$p$0)this._urls$p$0=$h.Entities._getExtractedStringProperty$i(this._data$p$0,"Urls",false);return this._urls$p$0},_getPhoneNumbers$p$0:function(){if(!this._phoneNumbers$p$0)this._phoneNumbers$p$0=$h.Entities._getExtractedObjects$i($h.PhoneNumber,this._data$p$0,"PhoneNumbers",$h.Entities._createPhoneNumber$p);return this._phoneNumbers$p$0},_getTaskSuggestions$p$0:function(){window.OSF.DDA.OutlookAppOm._throwOnPropertyAccessForRestrictedPermission$i(this._permissionLevel$p$0);if(!this._taskSuggestions$p$0)this._taskSuggestions$p$0=$h.Entities._getExtractedObjects$i($h.TaskSuggestion,this._data$p$0,"TaskSuggestions",$h.Entities._createTaskSuggestion$p,true,"TaskString");return this._taskSuggestions$p$0},_getMeetingSuggestions$p$0:function(){window.OSF.DDA.OutlookAppOm._throwOnPropertyAccessForRestrictedPermission$i(this._permissionLevel$p$0);if(!this._meetingSuggestions$p$0)this._meetingSuggestions$p$0=$h.Entities._getExtractedObjects$i($h.MeetingSuggestion,this._data$p$0,"MeetingSuggestions",this.$$d__createMeetingSuggestion$p$0,true,"MeetingString");return this._meetingSuggestions$p$0},_getContacts$p$0:function(){window.OSF.DDA.OutlookAppOm._throwOnPropertyAccessForRestrictedPermission$i(this._permissionLevel$p$0);if(!this._contacts$p$0)this._contacts$p$0=$h.Entities._getExtractedObjects$i($h.Contact,this._data$p$0,"Contacts",$h.Entities._createContact$p,true,"ContactString");return this._contacts$p$0},_getParcelDeliveries$p$0:function(){window.OSF.DDA.OutlookAppOm._throwOnPropertyAccessForRestrictedPermission$i(this._permissionLevel$p$0);if(!this._parcelDeliveries$p$0)this._parcelDeliveries$p$0=$h.Entities._getExtractedObjects$i(Object,this._data$p$0,"ParcelDeliveries",null);return this._parcelDeliveries$p$0},_getFlightReservations$p$0:function(){window.OSF.DDA.OutlookAppOm._throwOnPropertyAccessForRestrictedPermission$i(this._permissionLevel$p$0);if(!this._flightReservations$p$0)this._flightReservations$p$0=$h.Entities._getExtractedObjects$i(Object,this._data$p$0,"FlightReservations",null);return this._flightReservations$p$0}};$h.ReplyConstants=function(){};$h.AsyncConstants=function(){};window.Office.cast.item=Office.cast.item=function(){};window.Office.cast.item.toItemRead=function(a){if($h.Item.isInstanceOfType(a))return a;throw Error.argumentType();};window.Office.cast.item.toItemCompose=function(a){if($h.ComposeItem.isInstanceOfType(a))return a;throw Error.argumentType();};window.Office.cast.item.toMessage=function(a){return window.Office.cast.item.toMessageRead(a)};window.Office.cast.item.toMessageRead=function(a){if($h.Message.isInstanceOfType(a))return a;throw Error.argumentType();};window.Office.cast.item.toMessageCompose=function(a){if($h.MessageCompose.isInstanceOfType(a))return a;throw Error.argumentType();};window.Office.cast.item.toMeetingRequest=function(a){if($h.MeetingRequest.isInstanceOfType(a))return a;throw Error.argumentType();};window.Office.cast.item.toAppointment=function(a){return window.Office.cast.item.toAppointmentRead(a)};window.Office.cast.item.toAppointmentRead=function(a){if($h.Appointment.isInstanceOfType(a))return a;throw Error.argumentType();};window.Office.cast.item.toAppointmentCompose=function(a){if($h.AppointmentCompose.isInstanceOfType(a))return a;throw Error.argumentType();};$h.Item=function(a){this.$$d__getBody$p$1=Function.createDelegate(this,this._getBody$p$1);this.$$d__getAttachments$p$1=Function.createDelegate(this,this._getAttachments$p$1);this.$$d__getItemClass$p$1=Function.createDelegate(this,this._getItemClass$p$1);this.$$d__getItemId$p$1=Function.createDelegate(this,this._getItemId$p$1);this.$$d__getDateTimeModified$p$1=Function.createDelegate(this,this._getDateTimeModified$p$1);this.$$d__getDateTimeCreated$p$1=Function.createDelegate(this,this._getDateTimeCreated$p$1);$h.Item.initializeBase(this,[a]);$h.InitialData._defineReadOnlyProperty$i(this,"dateTimeCreated",this.$$d__getDateTimeCreated$p$1);$h.InitialData._defineReadOnlyProperty$i(this,"dateTimeModified",this.$$d__getDateTimeModified$p$1);$h.InitialData._defineReadOnlyProperty$i(this,"itemId",this.$$d__getItemId$p$1);$h.InitialData._defineReadOnlyProperty$i(this,"itemClass",this.$$d__getItemClass$p$1);$h.InitialData._defineReadOnlyProperty$i(this,"attachments",this.$$d__getAttachments$p$1);$h.InitialData._defineReadOnlyProperty$i(this,"body",this.$$d__getBody$p$1)};$h.Item.prototype={_body$p$1:null,_getItemId$p$1:function(){return this._data$p$0.get__itemId$i$0()},_getItemClass$p$1:function(){return this._data$p$0.get__itemClass$i$0()},_getDateTimeCreated$p$1:function(){return this._data$p$0.get__dateTimeCreated$i$0()},_getDateTimeModified$p$1:function(){return this._data$p$0.get__dateTimeModified$i$0()},_getAttachments$p$1:function(){return this._data$p$0.get__attachments$i$0()},_getBody$p$1:function(){if(!this._body$p$1)this._body$p$1=new $h.Body;return this._body$p$1}};$h.ItemBase=function(a){this.$$d__createCustomProperties$i$0=Function.createDelegate(this,this._createCustomProperties$i$0);this.$$d__getNotificationMessages$p$0=Function.createDelegate(this,this._getNotificationMessages$p$0);this.$$d_getItemType=Function.createDelegate(this,this.getItemType);this._data$p$0=a;$h.InitialData._defineReadOnlyProperty$i(this,"itemType",this.$$d_getItemType);$h.InitialData._defineReadOnlyProperty$i(this,"notificationMessages",this.$$d__getNotificationMessages$p$0)};$h.ItemBase.prototype={_data$p$0:null,_notificationMessages$p$0:null,get_data:function(){return this._data$p$0},loadCustomPropertiesAsync:function(){for(var c=[],a=0;a0)return new Date(b.getFullYear()+c._offset$i$1,0,1);break;default:break}return b};$h.MeetingSuggestionTimeDecoder._findBestDateForWeekDate$p=function(a,c,e){if(c>-5&&c<5){var d,b;d=(e+6)%7+1;b=7*c+(d-a.getDay());a.setDate(a.getDate()+b);return a}else{var b=(e-a.getDay())%7;if(b<0)b+=7;a.setDate(a.getDate()+b);return a}};$h.MeetingSuggestionTimeDecoder._findBestDateForWeekOfMonthDate$p=function(d,c){var f,a,b;f=d;if(c._tag$i$1<=0||c._tag$i$1>12||c._offset$i$1<=0||c._offset$i$1>5)return d;var g=(12+c._tag$i$1-f.getMonth()-1)%12;a=new Date(f.getFullYear(),f.getMonth()+g,1);if(c._modifier$i$1===1)if(c._offset$i$1===1&&a.getDay()!==6&&a.getDay())return a;else{b=new Date(a.getFullYear(),a.getMonth(),a.getDate());b.setDate(b.getDate()+(7+(1-a.getDay()))%7);a.getDay()!==6&&a.getDay()&&a.getDay()!==1&&b.setDate(b.getDate()-7);b.setDate(b.getDate()+7*(c._offset$i$1-1));if(b.getMonth()+1!==c._tag$i$1)return d;return b}else{b=new Date(a.getFullYear(),a.getMonth(),$h.MeetingSuggestionTimeDecoder._daysInMonth$p(a.getMonth(),a.getFullYear()));var e=1-b.getDay();if(e>0)e=e-7;b.setDate(b.getDate()+e);b.setDate(b.getDate()+7*(1-c._offset$i$1));if(b.getMonth()+1!==c._tag$i$1)if(a.getDay()!==6&&a.getDay())return a;else return d;else return b}};$h.MeetingSuggestionTimeDecoder._decode$p=function(b,c,d){var f=32767;c.val=null;d.val=0;if(!b)return false;d.val=$h.MeetingSuggestionTimeDecoder._getTimeOfDayInMillisecondsUTC$p(b);var e=b.getTime()-d.val,a=(e-$h.MeetingSuggestionTimeDecoder._baseDate$p.getTime())/864e5;if(a<0)return false;else if(a>=262144)return false;else{var g=a>>15;a=a&f;switch(g){case 0:return $h.MeetingSuggestionTimeDecoder._decodePreciseDate$p(a,c);case 1:return $h.MeetingSuggestionTimeDecoder._decodeRelativeDate$p(a,c);default:return false}}};$h.MeetingSuggestionTimeDecoder._decodePreciseDate$p=function(b,e){var h=7,d=15,j=31,i=127,f=null,c=0,g=0;e.val=null;var a=b>>12&h;if((a&4)===4){f=b>>5&i;if((a&2)===2){if((a&1)===1)return false;c=b>>1&d}}else{if((a&2)===2)c=b>>8&d;if((a&1)===1)g=b>>3&j}e.val=new $h._preciseDate(g,c,f);return true};$h.MeetingSuggestionTimeDecoder._decodeRelativeDate$p=function(a,b){var g=15,d=63,f=7,c=3,j=a&g;a>>=4;var h=$h.MeetingSuggestionTimeDecoder._fromComplement$p(a&d,6);a>>=6;var i=a&f;a>>=3;var e=a&c;try{b.val=new $h._relativeDate(e,h,i,j);return true}catch(k){b.val=null;return false}};$h.MeetingSuggestionTimeDecoder._fromComplement$p=function(a,c){var b=1<31)throw Error.argumentOutOfRange("day");if(a<0||a>12)throw Error.argumentOutOfRange("month");this._day$i$1=c;this._month$i$1=a;if(!$h.MeetingSuggestionTimeDecoder._isNullOrUndefined$i(b)){if(!a&&c)throw Error.argument("Invalid arguments");if(b<0||b>2099)throw Error.argumentOutOfRange("year");this._year$i$1=b%100}else if(!this._month$i$1&&!this._day$i$1)throw Error.argument("Invalid datetime");};$h._preciseDate.prototype={_day$i$1:0,_month$i$1:0,_year$i$1:null};$h._relativeDate=function(d,a,c,b){$h._relativeDate.initializeBase(this);if(a<-32||a>31)throw Error.argumentOutOfRange("offset");if(b<0||b>15)throw Error.argumentOutOfRange("tag");if(!c&&a<0)throw Error.argument("unit & offset do not form a valid date");this._modifier$i$1=d;this._offset$i$1=a;this._unit$i$1=c;this._tag$i$1=b};$h._relativeDate.prototype={_modifier$i$1:0,_offset$i$1:0,_unit$i$1:0,_tag$i$1:0};$h.Message=function(a){this.$$d__getConversationId$p$2=Function.createDelegate(this,this._getConversationId$p$2);this.$$d__getInternetMessageId$p$2=Function.createDelegate(this,this._getInternetMessageId$p$2);this.$$d__getCc$p$2=Function.createDelegate(this,this._getCc$p$2);this.$$d__getTo$p$2=Function.createDelegate(this,this._getTo$p$2);this.$$d__getFrom$p$2=Function.createDelegate(this,this._getFrom$p$2);this.$$d__getSender$p$2=Function.createDelegate(this,this._getSender$p$2);this.$$d__getNormalizedSubject$p$2=Function.createDelegate(this,this._getNormalizedSubject$p$2);this.$$d__getSubject$p$2=Function.createDelegate(this,this._getSubject$p$2);$h.Message.initializeBase(this,[a]);$h.InitialData._defineReadOnlyProperty$i(this,"subject",this.$$d__getSubject$p$2);$h.InitialData._defineReadOnlyProperty$i(this,"normalizedSubject",this.$$d__getNormalizedSubject$p$2);$h.InitialData._defineReadOnlyProperty$i(this,"sender",this.$$d__getSender$p$2);$h.InitialData._defineReadOnlyProperty$i(this,"from",this.$$d__getFrom$p$2);$h.InitialData._defineReadOnlyProperty$i(this,"to",this.$$d__getTo$p$2);$h.InitialData._defineReadOnlyProperty$i(this,"cc",this.$$d__getCc$p$2);$h.InitialData._defineReadOnlyProperty$i(this,"internetMessageId",this.$$d__getInternetMessageId$p$2);$h.InitialData._defineReadOnlyProperty$i(this,"conversationId",this.$$d__getConversationId$p$2)};$h.Message.prototype={getEntities:function(){return this._data$p$0._getEntities$i$0()},getEntitiesByType:function(a){return this._data$p$0._getEntitiesByType$i$0(a)},getFilteredEntitiesByName:function(a){return this._data$p$0._getFilteredEntitiesByName$i$0(a)},getRegExMatches:function(){window.OSF.DDA.OutlookAppOm._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getRegExMatches");return this._data$p$0._getRegExMatches$i$0()},getRegExMatchesByName:function(a){window.OSF.DDA.OutlookAppOm._instance$p._throwOnMethodCallForInsufficientPermission$i$0(1,"getRegExMatchesByName");return this._data$p$0._getRegExMatchesByName$i$0(a)},displayReplyForm:function(a){window.OSF.DDA.OutlookAppOm._instance$p._displayReplyForm$i$0(a)},displayReplyAllForm:function(a){window.OSF.DDA.OutlookAppOm._instance$p._displayReplyAllForm$i$0(a)},getItemType:function(){return window.Microsoft.Office.WebExtension.MailboxEnums.ItemType.Message},_getSubject$p$2:function(){return this._data$p$0.get__subject$i$0()},_getNormalizedSubject$p$2:function(){return this._data$p$0.get__normalizedSubject$i$0()},_getSender$p$2:function(){return this._data$p$0.get__sender$i$0()},_getFrom$p$2:function(){return this._data$p$0.get__from$i$0()},_getTo$p$2:function(){return this._data$p$0.get__to$i$0()},_getCc$p$2:function(){return this._data$p$0.get__cc$i$0()},_getInternetMessageId$p$2:function(){return this._data$p$0.get__internetMessageId$i$0()},_getConversationId$p$2:function(){return this._data$p$0.get__conversationId$i$0()}};$h.MessageCompose=function(a){this.$$d__getConversationId$p$2=Function.createDelegate(this,this._getConversationId$p$2);this.$$d__getBcc$p$2=Function.createDelegate(this,this._getBcc$p$2);this.$$d__getCc$p$2=Function.createDelegate(this,this._getCc$p$2);this.$$d__getTo$p$2=Function.createDelegate(this,this._getTo$p$2);$h.MessageCompose.initializeBase(this,[a]);$h.InitialData._defineReadOnlyProperty$i(this,"to",this.$$d__getTo$p$2);$h.InitialData._defineReadOnlyProperty$i(this,"cc",this.$$d__getCc$p$2);$h.InitialData._defineReadOnlyProperty$i(this,"bcc",this.$$d__getBcc$p$2);$h.InitialData._defineReadOnlyProperty$i(this,"conversationId",this.$$d__getConversationId$p$2)};$h.MessageCompose.prototype={_to$p$2:null,_cc$p$2:null,_bcc$p$2:null,getItemType:function(){return window.Microsoft.Office.WebExtension.MailboxEnums.ItemType.Message},_getTo$p$2:function(){this._data$p$0._throwOnRestrictedPermissionLevel$i$0();if(!this._to$p$2)this._to$p$2=new $h.ComposeRecipient(0,"to");return this._to$p$2},_getCc$p$2:function(){this._data$p$0._throwOnRestrictedPermissionLevel$i$0();if(!this._cc$p$2)this._cc$p$2=new $h.ComposeRecipient(1,"cc");return this._cc$p$2},_getBcc$p$2:function(){this._data$p$0._throwOnRestrictedPermissionLevel$i$0();if(!this._bcc$p$2)this._bcc$p$2=new $h.ComposeRecipient(2,"bcc");return this._bcc$p$2},_getConversationId$p$2:function(){return this._data$p$0.get__conversationId$i$0()}};$h.NotificationMessages=function(){};$h.NotificationMessages._mapToHostItemNotificationMessageType$p=function(c){var b,a;b=c.type;if(b===window.Microsoft.Office.WebExtension.MailboxEnums.ItemNotificationMessageType.ProgressIndicator)a=1;else if(b===window.Microsoft.Office.WebExtension.MailboxEnums.ItemNotificationMessageType.InformationalMessage)a=0;else if(b===window.Microsoft.Office.WebExtension.MailboxEnums.ItemNotificationMessageType.ErrorMessage)a=2;else throw Error.argument("type");c.type=a};$h.NotificationMessages._validateKey$p=function(a){if(!$h.ScriptHelpers.isNonEmptyString(a))throw Error.argument("key");window.OSF.DDA.OutlookAppOm._throwOnOutOfRange$i(a.length,0,32,"key")};$h.NotificationMessages._validateDictionary$p=function(a){if(!$h.ScriptHelpers.isNonEmptyString(a.type))throw Error.argument("type");if(a.type===window.Microsoft.Office.WebExtension.MailboxEnums.ItemNotificationMessageType.InformationalMessage){if(!$h.ScriptHelpers.isNonEmptyString(a.icon))throw Error.argument("icon");window.OSF.DDA.OutlookAppOm._throwOnOutOfRange$i(a.icon.length,0,32,"icon");if($h.ScriptHelpers.isUndefined(a.persistent))throw Error.argument("persistent");if(!Boolean.isInstanceOfType(a.persistent))throw Error.argumentType("persistent",Object.getType(a.persistent),Boolean);}else{if(!$h.ScriptHelpers.isUndefined(a.icon))throw Error.argument("icon");if(!$h.ScriptHelpers.isUndefined(a.persistent))throw Error.argument("persistent");}if(!$h.ScriptHelpers.isNonEmptyString(a.message))throw Error.argument("message");window.OSF.DDA.OutlookAppOm._throwOnOutOfRange$i(a.message.length,0,150,"message")};$h.NotificationMessages.prototype={addAsync:function(f,d){for(var e=[],b=2;b2)return false;if(!Function.isInstanceOfType(a[0]))return false;e=a[0];if(b>1)d=a[1];c.val=new $h.CommonParameters(null,e,d);return true};$h.CommonParameters.prototype={_options$p$0:null,_callback$p$0:null,_asyncContext$p$0:null,get_options:function(){return this._options$p$0},get_callback:function(){return this._callback$p$0},get_asyncContext:function(){return this._asyncContext$p$0}};$h.EwsRequest=function(a){$h.EwsRequest.initializeBase(this,[a])};$h.EwsRequest.prototype={readyState:1,status:0,statusText:null,onreadystatechange:null,responseText:null,get__statusCode$i$1:function(){return this.status},set__statusCode$i$1:function(a){this.status=a;return a},get__statusDescription$i$1:function(){return this.statusText},set__statusDescription$i$1:function(a){this.statusText=a;return a},get__requestState$i$1:function(){return this.readyState},set__requestState$i$1:function(a){this.readyState=a;return a},get_hasOnReadyStateChangeCallback:function(){return!$h.ScriptHelpers.isNullOrUndefined(this.onreadystatechange)},get__response$i$1:function(){return this.responseText},set__response$i$1:function(a){this.responseText=a;return a},send:function(a){this._checkSendConditions$i$1();$h.ScriptHelpers.isNullOrUndefined(a)&&this._throwInvalidStateException$i$1();this._sendRequest$i$0(5,"EwsRequest",{body:a})},_callOnReadyStateChangeCallback$i$1:function(){!$h.ScriptHelpers.isNullOrUndefined(this.onreadystatechange)&&this.onreadystatechange()},_parseExtraResponseData$i$1:function(a){},executeExtraFailedResponseSteps:function(){}};$h.InitialData=function(a){this._data$p$0=a;this._permissionLevel$p$0=this._calculatePermissionLevel$p$0()};$h.InitialData._defineReadOnlyProperty$i=function(d,b,c){var a={"get":c,configurable:false};Object.defineProperty(d,b,a)};$h.InitialData.prototype={_toRecipients$p$0:null,_ccRecipients$p$0:null,_attachments$p$0:null,_resources$p$0:null,_entities$p$0:null,_data$p$0:null,_permissionLevel$p$0:0,get__isRestIdSupported$i$0:function(){return this._data$p$0.isRestIdSupported},get__itemId$i$0:function(){return this._data$p$0.id},get__itemClass$i$0:function(){return this._data$p$0.itemClass},get__dateTimeCreated$i$0:function(){return new Date(this._data$p$0.dateTimeCreated)},get__dateTimeModified$i$0:function(){return new Date(this._data$p$0.dateTimeModified)},get__dateTimeSent$i$0:function(){return new Date(this._data$p$0.dateTimeSent)},get__subject$i$0:function(){this._throwOnRestrictedPermissionLevel$i$0();return this._data$p$0.subject},get__normalizedSubject$i$0:function(){this._throwOnRestrictedPermissionLevel$i$0();return this._data$p$0.normalizedSubject},get__internetMessageId$i$0:function(){return this._data$p$0.internetMessageId},get__conversationId$i$0:function(){return this._data$p$0.conversationId},get__sender$i$0:function(){this._throwOnRestrictedPermissionLevel$i$0();var a=this._data$p$0.sender;return $h.ScriptHelpers.isNullOrUndefined(a)?null:new $h.EmailAddressDetails(a)},get__from$i$0:function(){this._throwOnRestrictedPermissionLevel$i$0();var a=this._data$p$0.from;return $h.ScriptHelpers.isNullOrUndefined(a)?null:new $h.EmailAddressDetails(a)},get__to$i$0:function(){this._throwOnRestrictedPermissionLevel$i$0();if(null===this._toRecipients$p$0)this._toRecipients$p$0=this._createEmailAddressDetails$p$0("to");return this._toRecipients$p$0},get__cc$i$0:function(){this._throwOnRestrictedPermissionLevel$i$0();if(null===this._ccRecipients$p$0)this._ccRecipients$p$0=this._createEmailAddressDetails$p$0("cc");return this._ccRecipients$p$0},get__attachments$i$0:function(){this._throwOnRestrictedPermissionLevel$i$0();if(null===this._attachments$p$0)this._attachments$p$0=this._createAttachmentDetails$p$0();return this._attachments$p$0},get__ewsUrl$i$0:function(){return this._data$p$0.ewsUrl},get__marketplaceAssetId$i$0:function(){return this._data$p$0.marketplaceAssetId},get__extensionId$i$0:function(){return this._data$p$0.extensionId},get__marketplaceContentMarket$i$0:function(){return this._data$p$0.marketplaceContentMarket},get__consentMetadata$i$0:function(){return this._data$p$0.consentMetadata},get__isRead$i$0:function(){return this._data$p$0.isRead},get__endNodeUrl$i$0:function(){return this._data$p$0.endNodeUrl},get__entryPointUrl$i$0:function(){return this._data$p$0.entryPointUrl},get__start$i$0:function(){return new Date(this._data$p$0.start)},get__end$i$0:function(){return new Date(this._data$p$0.end)},get__location$i$0:function(){return this._data$p$0.location},get__userProfileType$i$0:function(){return this._data$p$0.userProfileType},get__resources$i$0:function(){this._throwOnRestrictedPermissionLevel$i$0();if(null===this._resources$p$0)this._resources$p$0=this._createEmailAddressDetails$p$0("resources");return this._resources$p$0},get__organizer$i$0:function(){this._throwOnRestrictedPermissionLevel$i$0();var a=this._data$p$0.organizer;return $h.ScriptHelpers.isNullOrUndefined(a)?null:new $h.EmailAddressDetails(a)},get__userDisplayName$i$0:function(){return this._data$p$0.userDisplayName},get__userEmailAddress$i$0:function(){return this._data$p$0.userEmailAddress},get__userTimeZone$i$0:function(){return this._data$p$0.userTimeZone},get__timeZoneOffsets$i$0:function(){return this._data$p$0.timeZoneOffsets},get__hostVersion$i$0:function(){return this._data$p$0.hostVersion},get__owaView$i$0:function(){return this._data$p$0.owaView},get__overrideWindowOpen$i$0:function(){return this._data$p$0.overrideWindowOpen},_getEntities$i$0:function(){if(!this._entities$p$0)this._entities$p$0=new $h.Entities(this._data$p$0.entities,this._data$p$0.filteredEntities,this.get__dateTimeSent$i$0(),this._permissionLevel$p$0);return this._entities$p$0},_getEntitiesByType$i$0:function(a){var b=this._getEntities$i$0();return b._getByType$i$0(a)},_getFilteredEntitiesByName$i$0:function(b){var a=this._getEntities$i$0();return a._getFilteredEntitiesByName$i$0(b)},_getRegExMatches$i$0:function(){if(!this._data$p$0.regExMatches)return null;return this._data$p$0.regExMatches},_getRegExMatchesByName$i$0:function(b){var a=this._getRegExMatches$i$0();if(!a||!a[b])return null;return a[b]},_throwOnRestrictedPermissionLevel$i$0:function(){window.OSF.DDA.OutlookAppOm._throwOnPropertyAccessForRestrictedPermission$i(this._permissionLevel$p$0)},_createEmailAddressDetails$p$0:function(d){var b=this._data$p$0[d];if($h.ScriptHelpers.isNullOrUndefined(b))return[];for(var c=[],a=0;a0&&b.push(c)}}}catch(i){}return b}var c=[OSF.DDA.PropertyDescriptors.FileProperties,OSF.DDA.PropertyDescriptors.FileSliceProperties,OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor,OSF.DDA.PropertyDescriptors.BindingProperties,OSF.DDA.SafeArray.UniqueArguments.BindingSpecificData,OSF.DDA.SafeArray.UniqueArguments.Offset,OSF.DDA.SafeArray.UniqueArguments.Run,OSF.DDA.PropertyDescriptors.Subset,OSF.DDA.PropertyDescriptors.DataPartProperties,OSF.DDA.PropertyDescriptors.DataNodeProperties,OSF.DDA.EventDescriptors.BindingSelectionChangedEvent,OSF.DDA.EventDescriptors.DataNodeInsertedEvent,OSF.DDA.EventDescriptors.DataNodeReplacedEvent,OSF.DDA.EventDescriptors.DataNodeDeletedEvent,OSF.DDA.EventDescriptors.DocumentThemeChangedEvent,OSF.DDA.EventDescriptors.OfficeThemeChangedEvent,OSF.DDA.EventDescriptors.ActiveViewChangedEvent,OSF.DDA.EventDescriptors.AppCommandInvokedEvent,OSF.DDA.DataNodeEventProperties.OldNode,OSF.DDA.DataNodeEventProperties.NewNode,OSF.DDA.DataNodeEventProperties.NextSiblingNode,Microsoft.Office.Internal.Parameters.OfficeTheme,Microsoft.Office.Internal.Parameters.DocumentTheme],a={};a[Microsoft.Office.WebExtension.Parameters.Data]=function(){var c=0,a=1;return{toHost:function(b){if(typeof b!="string"&&b[OSF.DDA.TableDataProperties.TableRows]!==undefined){var d=[];d[c]=b[OSF.DDA.TableDataProperties.TableRows];d[a]=b[OSF.DDA.TableDataProperties.TableHeaders];b=d}return b},fromHost:function(f){var e;if(f.toArray){var g=f.dimensions();if(g===2)e=b(f);else{var d=f.toArray();if(d.length===2&&(d[0]!=null&&d[0].toArray||d[1]!=null&&d[1].toArray)){e={};e[OSF.DDA.TableDataProperties.TableRows]=b(d[c]);e[OSF.DDA.TableDataProperties.TableHeaders]=b(d[a])}else e=d}}else e=f;return e}}}();OSF.DDA.SafeArray.Delegate.SpecialProcessor.uber.constructor.call(this,c,a);this.pack=function(c,d){var b;if(this.isDynamicType(c))b=a[c].toHost(d);else b=d;return b};this.unpack=function(c,d){var b;if(this.isComplexType(c)||OSF.DDA.ListType.isListType(c))try{b=d.toArray()}catch(e){b=d||{}}else if(this.isDynamicType(c))b=a[c].fromHost(d);else b=d;return b};this.dynamicTypes=a};OSF.OUtil.extend(OSF.DDA.SafeArray.Delegate.SpecialProcessor,OSF.DDA.SpecialProcessor);OSF.DDA.SafeArray.Delegate.ParameterMap=function(){var e=new OSF.DDA.HostParameterMap(new OSF.DDA.SafeArray.Delegate.SpecialProcessor),a,d=e.self;function f(a){var c=null;if(a){c={};for(var d=a.length,b=0;b2){d=[];for(var e=1;e