/* Excel specific API library */
/* Version: 15.0.5365.3001 */
/*
	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.
*/

var OSF=OSF||{};OSF.OUtil=function(){var e="on",h="configurable",g="writable",d="enumerable",f="undefined",c=true,b=null,a=false,k=-1,n="&_xdm_Info=",m="_xdm_",i="#",j={},p=3e4,l=a;function o(){return Math.floor(100000001*Math.random()).toString()}return {extend:function(b,a){var c=function(){};c.prototype=a.prototype;b.prototype=new c;b.prototype.constructor=b;b.uber=a.prototype;if(a.prototype.constructor===Object.prototype.constructor)a.prototype.constructor=a},setNamespace:function(b,a){if(a&&b&&!a[b])a[b]={}},unsetNamespace:function(b,a){if(a&&b&&a[b])delete a[b]},loadScript:function(f,g,h){if(f&&g){var l=window.document,d=j[f];if(!d){var e=l.createElement("script");e.type="text/javascript";d={loaded:a,pendingCallbacks:[g],timer:b};j[f]=d;var i=function(){if(d.timer!=b){clearTimeout(d.timer);delete d.timer}d.loaded=c;for(var e=d.pendingCallbacks.length,a=0;a<e;a++){var f=d.pendingCallbacks.shift();f()}},k=function(){delete j[f];if(d.timer!=b){clearTimeout(d.timer);delete d.timer}for(var c=d.pendingCallbacks.length,a=0;a<c;a++){var e=d.pendingCallbacks.shift();e()}};if(e.readyState)e.onreadystatechange=function(){if(e.readyState=="loaded"||e.readyState=="complete"){e.onreadystatechange=b;i()}};else e.onload=i;e.onerror=k;h=h||p;d.timer=setTimeout(k,h);e.src=f;l.getElementsByTagName("head")[0].appendChild(e)}else if(d.loaded)g();else d.pendingCallbacks.push(g)}},loadCSS:function(c){if(c){var b=window.document,a=b.createElement("link");a.type="text/css";a.rel="stylesheet";a.href=c;b.getElementsByTagName("head")[0].appendChild(a)}},parseEnum:function(b,c){var a=c[b.trim()];if(typeof a==f){OsfMsAjaxFactory.msAjaxDebug.trace("invalid enumeration string:"+b);throw OsfMsAjaxFactory.msAjaxError.argument("str")}return a},delayExecutionAndCache:function(){var a={calc:arguments[0]};return function(){if(a.calc){a.val=a.calc.apply(this,arguments);delete a.calc}return a.val}},getUniqueId:function(){k=k+1;return k.toString()},formatString:function(){var a=arguments,b=a[0];return b.replace(/{(\d+)}/gm,function(d,b){var c=parseInt(b,10)+1;return a[c]===undefined?"{"+b+"}":a[c]})},generateConversationId:function(){return [o(),o(),(new Date).getTime().toString()].join("_")},getFrameNameAndConversationId:function(b,c){var a=m+b+this.generateConversationId();c.setAttribute("name",a);return this.generateConversationId()},addXdmInfoAsHash:function(a,d){a=a.trim()||"";var b=a.split(i),c=b.shift(),e=b.join(i);return [c,i,e,n,d].join("")},parseXdmInfo:function(){var g=window.location.hash,d=g.split(n),a=d.length>1?d[d.length-1]:b;if(window.sessionStorage){var c=window.name.indexOf(m);if(c>-1){var e=window.name.indexOf(";",c);if(e==-1)e=window.name.length;var f=window.name.substring(c,e);if(a)window.sessionStorage.setItem(f,a);else a=window.sessionStorage.getItem(f)}}return a},getConversationId:function(){var c=window.location.search,a=b;if(c){var d=c.indexOf("&");a=d>0?c.substring(1,d):c.substr(1);if(a&&a.charAt(a.length-1)==="="){a=a.substring(0,a.length-1);if(a)a=decodeURIComponent(a)}}return a},validateParamObject:function(f,e){var b=Function._validateParams(arguments,[{name:"params",type:Object,mayBeNull:a},{name:"expectedProperties",type:Object,mayBeNull:a},{name:"callback",type:Function,mayBeNull:c}]);if(b)throw b;for(var d in e){b=Function._validateParameter(f[d],e[d],d);if(b)throw b}},writeProfilerMark:function(a){if(window.msWriteProfilerMark){window.msWriteProfilerMark(a);OsfMsAjaxFactory.msAjaxDebug.trace(a)}},defineNondefaultProperty:function(e,f,a,b){a=a||{};for(var g in b){var d=b[g];if(a[d]==undefined)a[d]=c}Object.defineProperty(e,f,a);return e},defineNondefaultProperties:function(c,a,d){a=a||{};for(var b in a)OSF.OUtil.defineNondefaultProperty(c,b,a[b],d);return c},defineEnumerableProperty:function(c,b,a){return OSF.OUtil.defineNondefaultProperty(c,b,a,[d])},defineEnumerableProperties:function(b,a){return OSF.OUtil.defineNondefaultProperties(b,a,[d])},defineMutableProperty:function(c,b,a){return OSF.OUtil.defineNondefaultProperty(c,b,a,[g,d,h])},defineMutableProperties:function(b,a){return OSF.OUtil.defineNondefaultProperties(b,a,[g,d,h])},finalizeProperties:function(e,d){d=d||{};for(var g=Object.getOwnPropertyNames(e),i=g.length,f=0;f<i;f++){var h=g[f],b=Object.getOwnPropertyDescriptor(e,h);if(!b.get&&!b.set)b.writable=d.writable||a;b.configurable=d.configurable||a;b.enumerable=d.enumerable||c;Object.defineProperty(e,h,b)}return e},mapList:function(a,c){var b=[];if(a)for(var d in a)b.push(c(a[d]));return b},listContainsKey:function(d,e){for(var b in d)if(e==b)return c;return a},listContainsValue:function(b,d){for(var e in b)if(d==b[e])return c;return a},augmentList:function(a,b){var d=a.push?function(c,b){a.push(b)}:function(c,b){a[c]=b};for(var c in b)d(c,b[c])},redefineList:function(a,b){for(var d in a)delete a[d];for(var c in b)a[c]=b[c]},isArray:function(a){return Object.prototype.toString.apply(a)==="[object Array]"},isFunction:function(a){return Object.prototype.toString.apply(a)==="[object Function]"},isDate:function(a){return Object.prototype.toString.apply(a)==="[object Date]"},addEventListener:function(b,c,d){if(b.attachEvent)b.attachEvent(e+c,d);else if(b.addEventListener)b.addEventListener(c,d,a);else b[e+c]=d},removeEventListener:function(c,d,f){if(c.detachEvent)c.detachEvent(e+d,f);else if(c.removeEventListener)c.removeEventListener(d,f,a);else c[e+d]=b},encodeBase64:function(c){var j="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",h=[],a=[],b=0,f,d,e,i=c.length;do{f=c[b++];d=c[b++];e=c[b++];a[0]=f>>2;a[1]=(f&3)<<4|d>>4;a[2]=(d&15)<<2|e>>6;a[3]=e&63;if(isNaN(d))a[2]=a[3]=64;else if(isNaN(e))a[3]=64;for(var g=0;g<4;g++)h.push(j.charAt(a[g]))}while(b<i);return h.join("")},getLocalStorage:function(){var a=b;if(!l)try{if(window.localStorage)a=window.localStorage}catch(d){l=c}return a},isEdge:function(){return window.navigator.userAgent.indexOf("Edge")>0},isIE:function(){return window.navigator.userAgent.indexOf("Trident")>0},parseUrl:function(c,e){if(typeof c===f||!c)return undefined;e=typeof e!==f?e:a;var h="NotHttps",i=this.isIE(),m=this.isEdge(),d={protocol:undefined,hostname:undefined,port:undefined};try{if(i)throw"Browser doesn't support new URL library";else if(m)throw"Browser has inconsistent URL library";var g=new URL(c);if(g){d.protocol=g.protocol;d.hostname=g.hostname;d.port=g.port;if(e&&g.protocol!="https:")throw new Error(h)}}catch(j){if(j.message===h)throw j;var b=document.createElement("a");b.href=c;if((b.pathname==""||b.pathname=="/")&&!(c.substring(c.length-1,c.length)==="/"))c+="/";if(e&&b.protocol!="https:")throw new Error(h);var k=b.protocol+"//"+b.hostname+(i?"/":"")+b.pathname+b.search+b.hash,l=b.protocol+"//"+b.host+(i?"/":"")+b.pathname+b.search+b.hash;if(c==k||c==l){d.protocol=b.protocol;d.hostname=b.hostname;d.port=b.port}}return d},splitStringToList:function(j,h){for(var e=a,i=-1,g=[],f=a,d=h+j,b=0;b<d.length;b++)if(d[b]=="\\"&&!e)e=c;else{if(d[b]==h&&!f){g.push("");i++}else if(d[b]=='"'&&!e)f=!f;else g[i]+=d[b];e=a}return g},convertIntToHex:function(b){var a="#"+(Number(b)+16777216).toString(16).slice(-6);return a}}}();OSF.OUtil.Guid=function(){var a=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];return {generateNewGuid:function(){for(var c="",d=(new Date).getTime(),b=0;b<32&&d>0;b++){if(b==8||b==12||b==16||b==20)c+="-";c+=a[d%16];d=Math.floor(d/16)}for(;b<32;b++){if(b==8||b==12||b==16||b==20)c+="-";c+=a[Math.floor(Math.random()*16)]}return c}}}();window.OSF=OSF;OSF.OUtil.setNamespace("OSF",window);OSF.InternalPerfMarker={DataCoercionBegin:"Agave.HostCall.CoerceDataStart",DataCoercionEnd:"Agave.HostCall.CoerceDataEnd"};OSF.HostCallPerfMarker={IssueCall:"Agave.HostCall.IssueCall",ReceiveResponse:"Agave.HostCall.ReceiveResponse",RuntimeExceptionRaised:"Agave.HostCall.RuntimeExecptionRaised"};OSF.AgaveHostAction={Select:0,UnSelect:1};OSF.SharedConstants={NotificationConversationIdSuffix:"_ntf"};OSF.OfficeAppContext=function(q,m,i,h,k,n,j,l,p,e,o,g,f,s,r,d,c,b){var a=this;a._id=q;a._appName=m;a._appVersion=i;a._appUILocale=h;a._dataLocale=k;a._docUrl=n;a._clientMode=j;a._settings=l;a._reason=p;a._osfControlType=e;a._eToken=o;a._correlationId=g;a._appMinorVersion=d;a._requirementMatrix=c;a._appInstanceId=f;a._isDialog=false;a._dialogRequirementMatrix=b;a.get_id=function(){return this._id};a.get_appName=function(){return this._appName};a.get_appVersion=function(){return this._appVersion};a.get_appUILocale=function(){return this._appUILocale};a.get_dataLocale=function(){return this._dataLocale};a.get_docUrl=function(){return this._docUrl};a.get_clientMode=function(){return this._clientMode};a.get_bindings=function(){return this._bindings};a.get_settings=function(){return this._settings};a.get_reason=function(){return this._reason};a.get_osfControlType=function(){return this._osfControlType};a.get_eToken=function(){return this._eToken};a.get_correlationId=function(){return this._correlationId};a.get_appInstanceId=function(){return this._appInstanceId};a.get_appMinorVersion=function(){return this._appMinorVersion};a.get_requirementMatrix=function(){return this._requirementMatrix};a.get_isDialog=function(){return this._isDialog};a.get_dialogRequirementMatrix=function(){return this._dialogRequirementMatrix}};OSF.AppName={Unsupported:0,Excel:1,Word:2,PowerPoint:4,Outlook:8,ExcelWebApp:16,WordWebApp:32,OutlookWebApp:64,Project:128};OSF.OsfControlType={DocumentLevel:0,ContainerLevel:1};OSF.ClientMode={ReadOnly:0,ReadWrite:1};OSF.OUtil.setNamespace("Microsoft",window);OSF.OUtil.setNamespace("Office",Microsoft);OSF.OUtil.setNamespace("Client",Microsoft.Office);OSF.OUtil.setNamespace("WebExtension",Microsoft.Office);OSF.OUtil.setNamespace("Internal",Microsoft.Office);OSF.NamespaceManager=function(){var b,a=false;return {enableShortcut:function(){if(!a){if(window.Office)b=window.Office;else OSF.OUtil.setNamespace("Office",window);window.Office=Microsoft.Office.WebExtension;a=true}},disableShortcut:function(){if(a){if(b)window.Office=b;else OSF.OUtil.unsetNamespace("Office",window);a=false}}}}();OSF.NamespaceManager.enableShortcut();Microsoft.Office.WebExtension.InitializationReason={Inserted:"inserted",DocumentOpened:"documentOpened",Browser:"browser"};Microsoft.Office.WebExtension.ActiveView={Read:"read",Edit:"edit"};Microsoft.Office.WebExtension.ApplicationMode={WebEditor:"webEditor",WebViewer:"webViewer",Client:"client"};Microsoft.Office.WebExtension.DocumentMode={ReadOnly:"readOnly",ReadWrite:"readWrite"};Microsoft.Office.WebExtension.CoercionType={Text:"text",Matrix:"matrix",Table:"table",Image:"image"};Microsoft.Office.WebExtension.ValueFormat={Unformatted:"unformatted",Formatted:"formatted"};Microsoft.Office.WebExtension.FilterType={All:"all"};Microsoft.Office.WebExtension.PlatformType={PC:"PC",OfficeOnline:"OfficeOnline",Mac:"Mac",iOS:"iOS",Android:"Android",Universal:"Universal"};Microsoft.Office.WebExtension.HostType={Word:"Word",Excel:"Excel",PowerPoint:"PowerPoint",Outlook:"Outlook",OneNote:"OneNote",Project:"Project",Access:"Access"};Microsoft.Office.WebExtension.BindingType={Text:"text",Matrix:"matrix",Table:"table"};Microsoft.Office.WebExtension.GoToType={Binding:"binding",NamedItem:"namedItem",Slide:"slide",Index:"index"};Microsoft.Office.WebExtension.SelectionMode={Default:"default",Selected:"selected",None:"none"};Microsoft.Office.WebExtension.EventType={DocumentSelectionChanged:"documentSelectionChanged",BindingSelectionChanged:"bindingSelectionChanged",BindingDataChanged:"bindingDataChanged",DialogMessageReceived:"dialogMessageReceived",DialogEventReceived:"dialogEventReceived"};Microsoft.Office.Internal.EventType={OfficeThemeChanged:"officeThemeChanged",DocumentThemeChanged:"documentThemeChanged"};Microsoft.Office.WebExtension.AsyncResultStatus={Succeeded:"succeeded",Failed:"failed"};Microsoft.Office.WebExtension.Parameters={BindingType:"bindingType",CoercionType:"coercionType",ValueFormat:"valueFormat",FilterType:"filterType",Id:"id",GoToType:"goToType",SelectionMode:"selectionMode",PromptText:"promptText",ItemName:"itemName",FailOnCollision:"failOnCollision",StartRow:"startRow",StartColumn:"startColumn",RowCount:"rowCount",ColumnCount:"columnCount",Callback:"callback",AsyncContext:"asyncContext",Data:"data",Rows:"rows",OverwriteIfStale:"overwriteIfStale",FileType:"fileType",EventType:"eventType",Handler:"handler",SliceSize:"sliceSize",SliceIndex:"sliceIndex",ActiveView:"activeView",Xml:"xml",Namespace:"namespace",Prefix:"prefix",XPath:"xPath",Text:"text",HostType:"hostType",PlatformType:"platformType",ImageLeft:"imageLeft",ImageTop:"imageTop",ImageWidth:"imageWidth",ImageHeight:"imageHeight",TaskId:"taskId",FieldId:"fieldId",FieldValue:"fieldValue",ServerUrl:"serverUrl",ListName:"listName",ResourceId:"resourceId",ViewType:"viewType",ViewName:"viewName",GetRawValue:"getRawValue",CellFormat:"cellFormat",TableOptions:"tableOptions",Url:"url",MessageHandler:"messageHandler",Width:"width",Height:"height",RequireHTTPs:"requireHTTPS",MessageToParent:"messageToParent",XFrameDenySafe:"xFrameDenySafe",TargetOrigin:"targetOrigin"};Microsoft.Office.Internal.Parameters={DocumentTheme:"documentTheme",OfficeTheme:"officeTheme"};Microsoft.Office.WebExtension.DefaultParameterValues={};OSF.OUtil.setNamespace("DDA",OSF);OSF.DDA.DocumentMode={ReadOnly:1,ReadWrite:0};OSF.OUtil.setNamespace("DispIdHost",OSF.DDA);OSF.DDA.DispIdHost.Methods={InvokeMethod:"invokeMethod",AddEventHandler:"addEventHandler",RemoveEventHandler:"removeEventHandler",OpenDialog:"openDialog",CloseDialog:"closeDialog",MessageParent:"messageParent"};OSF.DDA.DispIdHost.Delegates={ExecuteAsync:"executeAsync",RegisterEventAsync:"registerEventAsync",UnregisterEventAsync:"unregisterEventAsync",ParameterMap:"parameterMap",MessageParent:"messageParent"};OSF.OUtil.setNamespace("AsyncResultEnum",OSF.DDA);OSF.DDA.AsyncResultEnum.Properties={Context:"Context",Value:"Value",Status:"Status",Error:"Error"};OSF.DDA.AsyncResultEnum.ErrorProperties={Name:"Name",Message:"Message",Code:"Code"};OSF.DDA.PropertyDescriptors={AsyncResultStatus:"AsyncResultStatus",FileProperties:"FileProperties",FilePropertiesDescriptor:"FilePropertiesDescriptor",FileSliceProperties:"FileSliceProperties",Subset:"subset",BindingProperties:"BindingProperties",TableDataProperties:"TableDataProperties",DataPartProperties:"DataPartProperties",DataNodeProperties:"DataNodeProperties",MessageType:"messageType",MessageContent:"messageContent",MessageOrigin:"messageOrigin"};OSF.DDA.EventDescriptors={BindingSelectionChangedEvent:"BindingSelectionChangedEvent",DataNodeInsertedEvent:"DataNodeInsertedEvent",DataNodeReplacedEvent:"DataNodeReplacedEvent",DataNodeDeletedEvent:"DataNodeDeletedEvent",OfficeThemeChangedEvent:"OfficeThemeChangedEvent",DocumentThemeChangedEvent:"DocumentThemeChangedEvent",ActiveViewChangedEvent:"ActiveViewChangedEvent",AppCommandInvokedEvent:"AppCommandInvokedEvent",DialogMessageReceivedEvent:"DialogMessageReceivedEvent"};OSF.DDA.ListDescriptors={BindingList:"BindingList",DataPartList:"DataPartList",DataNodeList:"DataNodeList"};OSF.DDA.FileProperties={Handle:"FileHandle",FileSize:"FileSize",SliceSize:Microsoft.Office.WebExtension.Parameters.SliceSize};OSF.DDA.FilePropertiesDescriptor={Url:"Url"};OSF.DDA.BindingProperties={Id:"BindingId",Type:Microsoft.Office.WebExtension.Parameters.BindingType,RowCount:"BindingRowCount",ColumnCount:"BindingColumnCount",HasHeaders:"HasHeaders"};OSF.DDA.TableDataProperties={TableRows:"TableRows",TableHeaders:"TableHeaders"};OSF.DDA.DataPartProperties={Id:Microsoft.Office.WebExtension.Parameters.Id,BuiltIn:"DataPartBuiltIn"};OSF.DDA.DataNodeProperties={Handle:"DataNodeHandle",BaseName:"DataNodeBaseName",NamespaceUri:"DataNodeNamespaceUri",NodeType:"DataNodeType"};OSF.DDA.DataNodeEventProperties={OldNode:"OldNode",NewNode:"NewNode",NextSiblingNode:"NextSiblingNode",InUndoRedo:"InUndoRedo"};OSF.DDA.AsyncResultEnum.ErrorCode={Success:0,Failed:1};OSF.DialogMessageType={DialogMessageReceived:0,DialogClosed:12006};OSF.DDA.getXdmEventName=function(b,a){if(a==Microsoft.Office.WebExtension.EventType.BindingSelectionChanged||a==Microsoft.Office.WebExtension.EventType.BindingDataChanged)return b+"_"+a;else return a};var __extends=this.__extends||function(b,a){for(var c in a)if(a.hasOwnProperty(c))b[c]=a[c];function d(){this.constructor=b}d.prototype=a.prototype;b.prototype=new d},OfficeExt;(function(a){var b;(function(b){var a=1.1,d=function(){function a(a){this.isSetSupported=function(b,a){if(b==undefined)return false;if(a==undefined)a=0;var e=this._setMap,d=e._sets;if(d.hasOwnProperty(b.toLowerCase())){var c=d[b.toLowerCase()];return c>0&&c>=a}else return false};this._setMap=a}return a}();b.RequirementMatrix=d;var c=function(){function a(a){this._addSetMap=function(a){for(var b in a)this._sets[b]=a[b]};this._sets=a}return a}();b.DefaultSetRequirement=c;var o=function(c){__extends(b,c);function b(){c.call(this,{dialogapi:a})}return b}(c);b.DefaultRequiredDialogSetRequirement=o;var n=function(c){__extends(b,c);function b(){c.call(this,{dialogorigin:a})}return b}(c);b.DefaultOptionalDialogSetRequirement=n;var f=function(c){__extends(b,c);function b(){c.call(this,{bindingevents:a,documentevents:a,matrixbindings:a,matrixcoercion:a,selection:a,settings:a,tablebindings:a,tablecoercion:a,textbindings:a,textcoercion:a})}return b}(c);b.ExcelClientDefaultSetRequirement=f;var p=function(c){__extends(b,c);function b(){c.call(this);this._addSetMap({imagecoercion:a})}return b}(f);b.ExcelClientV2DefaultSetRequirement=p;var q=function(c){__extends(b,c);function b(){c.call(this,{mailbox:a})}return b}(c);b.OutlookClientDefaultSetRequirement=q;var k=function(c){__extends(b,c);function b(){c.call(this,{mailbox:a})}return b}(c);b.OutlookClientV1DefaultSetRequirement=k;var l=function(b){__extends(a,b);function a(){b.call(this,{mailbox:1.2})}return a}(c);b.OutlookClientV2DefaultSetRequirement=l;var m=function(b){__extends(a,b);function a(){b.call(this,{mailbox:1.3})}return a}(c);b.OutlookClientV3DefaultSetRequirement=m;var g=function(c){__extends(b,c);function b(){c.call(this,{bindingevents:a,compressedfile:a,customxmlparts:a,documentevents:a,file:a,htmlcoercion:a,matrixbindings:a,matrixcoercion:a,ooxmlcoercion:a,selection:a,settings:a,tablebindings:a,tablecoercion:a,textbindings:a,textcoercion:a,textfile:a})}return b}(c);b.WordClientDefaultSetRequirement=g;var s=function(c){__extends(b,c);function b(){c.call(this);this._addSetMap({imagecoercion:a,pdffile:a})}return b}(g);b.WordClientV2DefaultSetRequirement=s;var e=function(c){__extends(b,c);function b(){c.call(this,{compressedfile:a,documentevents:a,file:a,selection:a,settings:a,textcoercion:a})}return b}(c);b.PowerpointClientDefaultSetRequirement=e;var j=function(c){__extends(b,c);function b(){c.call(this);this._addSetMap({activeview:a,imagecoercion:a,pdffile:a})}return b}(e);b.PowerpointClientV2DefaultSetRequirement=j;var h=function(c){__extends(b,c);function b(){c.call(this,{selection:a,textcoercion:a})}return b}(c);b.ProjectClientDefaultSetRequirement=h;var i=function(c){__extends(b,c);function b(){c.call(this,{bindingevents:a,documentevents:a,matrixbindings:a,matrixcoercion:a,selection:a,settings:a,tablebindings:a,tablecoercion:a,textbindings:a,textcoercion:a,file:a})}return b}(c);b.ExcelWebDefaultSetRequirement=i;var t=function(c){__extends(b,c);function b(){c.call(this);this._addSetMap({activeview:a})}return b}(i);b.ExcelWebV2DefaultSetRequirement=t;var u=function(c){__extends(b,c);function b(){c.call(this,{mailbox:a})}return b}(c);b.OutlookWebDefaultSetRequirement=u;var r=function(b){__extends(a,b);function a(){b.call(this,{mailbox:1.3})}return a}(c);b.OutlookWebV1DefaultSetRequirement=r;var v=function(){var b="undefined";function a(){}a.initializeOsfDda=function(){OSF.OUtil.setNamespace("Requirement",OSF.DDA)};a.getDefaultRequirementMatrix=function(f){this.initializeDefaultSetMatrix();var e=undefined,g=f.get_requirementMatrix();if(g!=undefined&&g.length>0&&typeof JSON!==b){var j=JSON.parse(f.get_requirementMatrix().toLowerCase());e=new d(new c(j))}else{var i=f.get_appVersion(),h=f.get_appName()+"-"+i;if(a.DefaultSetArrayMatrix!=undefined&&a.DefaultSetArrayMatrix[h]!=undefined)e=new d(a.DefaultSetArrayMatrix[h]);else e=new d(new c({}))}return e};a.getDialogDefaultRequirementMatrix=function(i){var g=undefined,j=i.get_dialogRequirementMatrix();if(j!=undefined&&j.length>0&&typeof JSON!==b){var e=JSON.parse(i.get_requirementMatrix().toLowerCase());g=new d(new c(e))}else{var f=new o,h=i.get_requirementMatrix();if(h!=undefined&&h.length>0&&typeof JSON!==b){var e=JSON.parse(h.toLowerCase());for(var a in f._sets)if(e.hasOwnProperty(a))f._sets[a]=e[a];var k=new n;for(var a in k._sets)if(e.hasOwnProperty(a))f._sets[a]=e[a]}g=new d(f)}return g};a.initializeDefaultSetMatrix=function(){a.DefaultSetArrayMatrix[a.Excel_RCLIENT_1500]=new f;a.DefaultSetArrayMatrix[a.Excel_RCLIENT_1501]=new f;a.DefaultSetArrayMatrix[a.Excel_RCLIENT_1502]=new p;a.DefaultSetArrayMatrix[a.Word_RCLIENT_1500]=new g;a.DefaultSetArrayMatrix[a.Word_RCLIENT_1501]=new g;a.DefaultSetArrayMatrix[a.Word_RCLIENT_1502]=new s;a.DefaultSetArrayMatrix[a.PowerPoint_RCLIENT_1500]=new e;a.DefaultSetArrayMatrix[a.PowerPoint_RCLIENT_1501]=new e;a.DefaultSetArrayMatrix[a.PowerPoint_RCLIENT_1502]=new j;a.DefaultSetArrayMatrix[a.Outlook_RCLIENT_1500]=new q;a.DefaultSetArrayMatrix[a.Outlook_RCLIENT_1501]=new k;a.DefaultSetArrayMatrix[a.Outlook_RCLIENT_1502]=new l;a.DefaultSetArrayMatrix[a.Outlook_RCLIENT_1503]=new m;a.DefaultSetArrayMatrix[a.Excel_WAC_1500]=new i;a.DefaultSetArrayMatrix[a.Excel_WAC_1501]=new i;a.DefaultSetArrayMatrix[a.Excel_WAC_1502]=new t;a.DefaultSetArrayMatrix[a.Outlook_WAC_1500]=new u;a.DefaultSetArrayMatrix[a.Outlook_WAC_1501]=new r;a.DefaultSetArrayMatrix[a.Project_RCLIENT_1500]=new h;a.DefaultSetArrayMatrix[a.Project_RCLIENT_1501]=new h;a.DefaultSetArrayMatrix[a.Project_RCLIENT_1502]=new h;a.DefaultSetArrayMatrix[a.Excel_IOS_1500]=new f;a.DefaultSetArrayMatrix[a.Word_IOS_1500]=new g;a.DefaultSetArrayMatrix[a.PowerPoint_IOS_1500]=new e};a.Excel_RCLIENT_1500="1-15.00";a.Excel_RCLIENT_1501="1-15.01";a.Excel_RCLIENT_1502="1-15.02";a.Word_RCLIENT_1500="2-15.00";a.Word_RCLIENT_1501="2-15.01";a.Word_RCLIENT_1502="2-15.02";a.PowerPoint_RCLIENT_1500="4-15.00";a.PowerPoint_RCLIENT_1501="4-15.01";a.PowerPoint_RCLIENT_1502="4-15.02";a.Outlook_RCLIENT_1500="8-15.00";a.Outlook_RCLIENT_1501="8-15.01";a.Outlook_RCLIENT_1502="8-15.02";a.Outlook_RCLIENT_1503="8-15.03";a.Excel_WAC_1500="16-15.00";a.Excel_WAC_1501="16-15.01";a.Excel_WAC_1502="16-15.02";a.Outlook_WAC_1500="64-15.00";a.Outlook_WAC_1501="64-15.01";a.Project_RCLIENT_1500="128-15.00";a.Project_RCLIENT_1501="128-15.01";a.Project_RCLIENT_1502="128-15.02";a.Excel_IOS_1500="1024-15.00";a.Word_IOS_1500="4096-15.00";a.PowerPoint_IOS_1500="8192-15.00";a.DefaultSetArrayMatrix={};return a}();b.RequirementsMatrixFactory=v})(b=a.Requirement||(a.Requirement={}))})(OfficeExt||(OfficeExt={}));OfficeExt.Requirement.RequirementsMatrixFactory.initializeOsfDda();var OfficeExt;(function(a){var b;(function(a){var b=function(){var a=null;function b(){var b=this;b.getHost=function(d){var b=this.getFullHost(d);if(b){for(var e in this.platformPossibilities){var c=b.indexOf(e);if(c>=0){b=b.substring(0,c);return Microsoft.Office.WebExtension.HostType[b]||a}}return Microsoft.Office.WebExtension.HostType[b]||a}return a};b.getDiagnostics=function(a){var b={host:this.getHost(a),version:"15.0.0000.0000",platform:this.getPlatform(a)};return b};b.platformPossibilities={WebApp:Microsoft.Office.WebExtension.PlatformType.OfficeOnline,Unsupported:a};b.getHost=b.getHost.bind(b);b.getDiagnostics=b.getDiagnostics.bind(b)}b.getInstance=function(){if(b.hostObj===undefined)b.hostObj=new b;return b.hostObj};b.prototype.getPlatform=function(d){var b=this.getFullHost(d);if(b===a)return a;var e=Microsoft.Office.WebExtension.PlatformType.PC;for(var c in this.platformPossibilities)if(b.indexOf(c)>=0)return this.platformPossibilities[c];return e};b.prototype.getFullHost=function(d){var b=a;for(var c in OSF.AppName)if(OSF.AppName[c]===d){b=c;break}return b};return b}();a.Host=b})(b=a.HostName||(a.HostName={}))})(OfficeExt||(OfficeExt={}));OSF.DDA.ErrorCodeManager=function(){var a={};return {getErrorArgs:function(b){return a[b]||a[this.errorCodes.ooeInternalError]},addErrorMessage:function(c,b){a[c]=b},errorCodes:{ooeSuccess:0,ooeCoercionTypeNotSupported:1e3,ooeGetSelectionNotMatchDataType:1001,ooeCoercionTypeNotMatchBinding:1002,ooeInvalidGetRowColumnCounts:1003,ooeSelectionNotSupportCoercionType:1004,ooeInvalidGetStartRowColumn:1005,ooeNonUniformPartialGetNotSupported:1006,ooeGetDataIsTooLarge:1008,ooeFileTypeNotSupported:1009,ooeUnsupportedDataObject:2e3,ooeCannotWriteToSelection:2001,ooeDataNotMatchSelection:2002,ooeOverwriteWorksheetData:2003,ooeDataNotMatchBindingSize:2004,ooeInvalidSetStartRowColumn:2005,ooeInvalidDataFormat:2006,ooeDataNotMatchCoercionType:2007,ooeDataNotMatchBindingType:2008,ooeSetDataIsTooLarge:2009,ooeNonUniformPartialSetNotSupported:2010,ooeSelectionCannotBound:3e3,ooeBindingNotExist:3002,ooeBindingToMultipleSelection:3003,ooeInvalidSelectionForBindingType:3004,ooeOperationNotSupportedOnThisBindingType:3005,ooeNamedItemNotFound:3006,ooeMultipleNamedItemFound:3007,ooeInvalidNamedItemForBindingType:3008,ooeUnknownBindingType:3009,ooeOperationNotSupportedOnMatrixData:3010,ooeSettingNameNotExist:4e3,ooeSettingsCannotSave:4001,ooeSettingsAreStale:4002,ooeOperationNotSupported:5e3,ooeInternalError:5001,ooeDocumentReadOnly:5002,ooeEventHandlerNotExist:5003,ooeInvalidApiCallInContext:5004,ooeShuttingDown:5005,ooeUnsupportedEnumeration:5007,ooeIndexOutOfRange:5008,ooeCustomXmlNodeNotFound:6e3,ooeCustomXmlError:6100,ooeNoCapability:7e3,ooeCannotNavTo:7001,ooeSpecifiedIdNotExist:7002,ooeNavOutOfBound:7004,ooeElementMissing:8e3,ooeProtectedError:8001,ooeInvalidCellsValue:8010,ooeInvalidTableOptionValue:8011,ooeInvalidFormatValue:8012,ooeRowIndexOutOfRange:8020,ooeColIndexOutOfRange:8021,ooeFormatValueOutOfRange:8022},initializeErrorMessages:function(b){a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported]={name:b.L_InvalidCoercion,message:b.L_CoercionTypeNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetSelectionNotMatchDataType]={name:b.L_DataReadError,message:b.L_GetSelectionNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding]={name:b.L_InvalidCoercion,message:b.L_CoercionTypeNotMatchBinding};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRowColumnCounts]={name:b.L_DataReadError,message:b.L_InvalidGetRowColumnCounts};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionNotSupportCoercionType]={name:b.L_DataReadError,message:b.L_SelectionNotSupportCoercionType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetStartRowColumn]={name:b.L_DataReadError,message:b.L_InvalidGetStartRowColumn};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialGetNotSupported]={name:b.L_DataReadError,message:b.L_NonUniformPartialGetNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataIsTooLarge]={name:b.L_DataReadError,message:b.L_GetDataIsTooLarge};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeFileTypeNotSupported]={name:b.L_DataReadError,message:b.L_FileTypeNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject]={name:b.L_DataWriteError,message:b.L_UnsupportedDataObject};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotWriteToSelection]={name:b.L_DataWriteError,message:b.L_CannotWriteToSelection};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchSelection]={name:b.L_DataWriteError,message:b.L_DataNotMatchSelection};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeOverwriteWorksheetData]={name:b.L_DataWriteError,message:b.L_OverwriteWorksheetData};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingSize]={name:b.L_DataWriteError,message:b.L_DataNotMatchBindingSize};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetStartRowColumn]={name:b.L_DataWriteError,message:b.L_InvalidSetStartRowColumn};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidDataFormat]={name:b.L_InvalidFormat,message:b.L_InvalidDataFormat};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchCoercionType]={name:b.L_InvalidDataObject,message:b.L_DataNotMatchCoercionType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingType]={name:b.L_InvalidDataObject,message:b.L_DataNotMatchBindingType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataIsTooLarge]={name:b.L_DataWriteError,message:b.L_SetDataIsTooLarge};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialSetNotSupported]={name:b.L_DataWriteError,message:b.L_NonUniformPartialSetNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionCannotBound]={name:b.L_BindingCreationError,message:b.L_SelectionCannotBound};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingNotExist]={name:b.L_InvalidBindingError,message:b.L_BindingNotExist};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingToMultipleSelection]={name:b.L_BindingCreationError,message:b.L_BindingToMultipleSelection};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSelectionForBindingType]={name:b.L_BindingCreationError,message:b.L_InvalidSelectionForBindingType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnThisBindingType]={name:b.L_InvalidBindingOperation,message:b.L_OperationNotSupportedOnThisBindingType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNamedItemNotFound]={name:b.L_BindingCreationError,message:b.L_NamedItemNotFound};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeMultipleNamedItemFound]={name:b.L_BindingCreationError,message:b.L_MultipleNamedItemFound};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidNamedItemForBindingType]={name:b.L_BindingCreationError,message:b.L_InvalidNamedItemForBindingType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnknownBindingType]={name:b.L_InvalidBinding,message:b.L_UnknownBindingType};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnMatrixData]={name:b.L_InvalidBindingOperation,message:b.L_OperationNotSupportedOnMatrixData};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingNameNotExist]={name:b.L_ReadSettingsError,message:b.L_SettingNameNotExist};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsCannotSave]={name:b.L_SaveSettingsError,message:b.L_SettingsCannotSave};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsAreStale]={name:b.L_SettingsStaleError,message:b.L_SettingsAreStale};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupported]={name:b.L_HostError,message:b.L_OperationNotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError]={name:b.L_InternalError,message:b.L_InternalErrorDescription};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentReadOnly]={name:b.L_PermissionDenied,message:b.L_DocumentReadOnly};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist]={name:b.L_EventRegistrationError,message:b.L_EventHandlerNotExist};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext]={name:b.L_InvalidAPICall,message:b.L_InvalidApiCallInContext};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeShuttingDown]={name:b.L_ShuttingDown,message:b.L_ShuttingDown};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration]={name:b.L_UnsupportedEnumeration,message:b.L_UnsupportedEnumerationMessage};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange]={name:b.L_IndexOutOfRange,message:b.L_IndexOutOfRange};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlNodeNotFound]={name:b.L_InvalidNode,message:b.L_CustomXmlNodeNotFound};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlError]={name:b.L_CustomXmlError,message:b.L_CustomXmlError};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability]={name:b.L_PermissionDenied,message:b.L_NoCapability};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotNavTo]={name:b.L_CannotNavigateTo,message:b.L_CannotNavigateTo};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSpecifiedIdNotExist]={name:b.L_SpecifiedIdNotExist,message:b.L_SpecifiedIdNotExist};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavOutOfBound]={name:b.L_NavOutOfBound,message:b.L_NavOutOfBound};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeElementMissing]={name:b.L_MissingParameter,message:b.L_ElementMissing};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeProtectedError]={name:b.L_PermissionDenied,message:b.L_NoCapability};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCellsValue]={name:b.L_InvalidValue,message:b.L_InvalidCellsValue};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidTableOptionValue]={name:b.L_InvalidValue,message:b.L_InvalidTableOptionValue};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidFormatValue]={name:b.L_InvalidValue,message:b.L_InvalidFormatValue};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeRowIndexOutOfRange]={name:b.L_OutOfRange,message:b.L_RowIndexOutOfRange};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeColIndexOutOfRange]={name:b.L_OutOfRange,message:b.L_ColIndexOutOfRange};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeFormatValueOutOfRange]={name:b.L_OutOfRange,message:b.L_FormatValueOutOfRange}}}}();OSF.DDA.MethodDispId={dispidMethodMin:64,dispidGetSelectedDataMethod:64,dispidSetSelectedDataMethod:65,dispidAddBindingFromSelectionMethod:66,dispidAddBindingFromPromptMethod:67,dispidGetBindingMethod:68,dispidReleaseBindingMethod:69,dispidGetBindingDataMethod:70,dispidSetBindingDataMethod:71,dispidAddRowsMethod:72,dispidClearAllRowsMethod:73,dispidGetAllBindingsMethod:74,dispidLoadSettingsMethod:75,dispidSaveSettingsMethod:76,dispidGetDocumentCopyMethod:77,dispidAddBindingFromNamedItemMethod:78,dispidAddColumnsMethod:79,dispidGetDocumentCopyChunkMethod:80,dispidReleaseDocumentCopyMethod:81,dispidNavigateToMethod:82,dispidGetActiveViewMethod:83,dispidGetDocumentThemeMethod:84,dispidGetOfficeThemeMethod:85,dispidGetFilePropertiesMethod:86,dispidClearFormatsMethod:87,dispidSetTableOptionsMethod:88,dispidSetFormatsMethod:89,dispidExecuteRichApiRequestMethod:93,dispidAppCommandInvocationCompletedMethod:94,dispidAddDataPartMethod:128,dispidGetDataPartByIdMethod:129,dispidGetDataPartsByNamespaceMethod:130,dispidGetDataPartXmlMethod:131,dispidGetDataPartNodesMethod:132,dispidDeleteDataPartMethod:133,dispidGetDataNodeValueMethod:134,dispidGetDataNodeXmlMethod:135,dispidGetDataNodesMethod:136,dispidSetDataNodeValueMethod:137,dispidSetDataNodeXmlMethod:138,dispidAddDataNamespaceMethod:139,dispidGetDataUriByPrefixMethod:140,dispidGetDataPrefixByUriMethod:141,dispidGetDataNodeTextMethod:142,dispidSetDataNodeTextMethod:143,dispidMethodMax:143,dispidGetSelectedTaskMethod:110,dispidGetSelectedResourceMethod:111,dispidGetTaskMethod:112,dispidGetResourceFieldMethod:113,dispidGetWSSUrlMethod:114,dispidGetTaskFieldMethod:115,dispidGetProjectFieldMethod:116,dispidGetSelectedViewMethod:117};OSF.DDA.EventDispId={dispidEventMin:0,dispidInitializeEvent:0,dispidSettingsChangedEvent:1,dispidDocumentSelectionChangedEvent:2,dispidBindingSelectionChangedEvent:3,dispidBindingDataChangedEvent:4,dispidDocumentOpenEvent:5,dispidDocumentCloseEvent:6,dispidActiveViewChangedEvent:7,dispidDocumentThemeChangedEvent:8,dispidOfficeThemeChangedEvent:9,dispidDialogMessageReceivedEvent:10,dispidAppCommandInvokedEvent:39,dispidDataNodeAddedEvent:60,dispidDataNodeReplacedEvent:61,dispidDataNodeDeletedEvent:62,dispidEventMax:63,dispidTaskSelectionChangedEvent:56,dispidResourceSelectionChangedEvent:57,dispidViewSelectionChangedEvent:58};OSF.OUtil.setNamespace("Microsoft",window);OSF.OUtil.setNamespace("Office",Microsoft);OSF.OUtil.setNamespace("Common",Microsoft.Office);Microsoft.Office.Common.InvokeType={async:0,sync:1,asyncRegisterEvent:2,asyncUnregisterEvent:3,syncRegisterEvent:4,syncUnregisterEvent:5};Microsoft.Office.Common.InvokeResultCode={noError:0,errorInRequest:-1,errorHandlingRequest:-2,errorInResponse:-3,errorHandlingResponse:-4,errorHandlingRequestAccessDenied:-5,errorHandlingMethodCallTimedout:-6};Microsoft.Office.Common.MessageType={request:0,response:1};Microsoft.Office.Common.ActionType={invoke:0,registerEvent:1,unregisterEvent:2};Microsoft.Office.Common.ResponseType={forCalling:0,forEventing:1};Microsoft.Office.Common.HostTrustStatus={unknown:0,untrusted:1,nothttps:2,trusted:3};Microsoft.Office.Common.MethodObject=function(c,b,a){this._method=c;this._invokeType=b;this._blockingOthers=a};Microsoft.Office.Common.MethodObject.prototype={getMethod:function(){return this._method},getInvokeType:function(){return this._invokeType},getBlockingFlag:function(){return this._blockingOthers}};Microsoft.Office.Common.EventMethodObject=function(b,a){this._registerMethodObject=b;this._unregisterMethodObject=a};Microsoft.Office.Common.EventMethodObject.prototype={getRegisterMethodObject:function(){return this._registerMethodObject},getUnregisterMethodObject:function(){return this._unregisterMethodObject}};Microsoft.Office.Common.ServiceEndPoint=function(c){var a=this,b=Function._validateParams(arguments,[{name:"serviceEndPointId",type:String,mayBeNull:false}]);if(b)throw b;a._methodObjectList={};a._eventHandlerProxyList={};a._Id=c;a._conversations={};a._policyManager=null};Microsoft.Office.Common.ServiceEndPoint.prototype={registerMethod:function(g,h,b,e){var c="invokeType",a=false,d=Function._validateParams(arguments,[{name:"methodName",type:String,mayBeNull:a},{name:"method",type:Function,mayBeNull:a},{name:c,type:Number,mayBeNull:a},{name:"blockingOthers",type:Boolean,mayBeNull:a}]);if(d)throw d;if(b!==Microsoft.Office.Common.InvokeType.async&&b!==Microsoft.Office.Common.InvokeType.sync)throw OsfMsAjaxFactory.msAjaxError.argument(c);var f=new Microsoft.Office.Common.MethodObject(h,b,e);this._methodObjectList[g]=f},unregisterMethod:function(b){var a=Function._validateParams(arguments,[{name:"methodName",type:String,mayBeNull:false}]);if(a)throw a;delete this._methodObjectList[b]},registerEvent:function(f,d,c){var a=false,b=Function._validateParams(arguments,[{name:"eventName",type:String,mayBeNull:a},{name:"registerMethod",type:Function,mayBeNull:a},{name:"unregisterMethod",type:Function,mayBeNull:a}]);if(b)throw b;var e=new Microsoft.Office.Common.EventMethodObject(new Microsoft.Office.Common.MethodObject(d,Microsoft.Office.Common.InvokeType.syncRegisterEvent,a),new Microsoft.Office.Common.MethodObject(c,Microsoft.Office.Common.InvokeType.syncUnregisterEvent,a));this._methodObjectList[f]=e},registerEventEx:function(h,f,d,e,c){var a=false,b=Function._validateParams(arguments,[{name:"eventName",type:String,mayBeNull:a},{name:"registerMethod",type:Function,mayBeNull:a},{name:"registerMethodInvokeType",type:Number,mayBeNull:a},{name:"unregisterMethod",type:Function,mayBeNull:a},{name:"unregisterMethodInvokeType",type:Number,mayBeNull:a}]);if(b)throw b;var g=new Microsoft.Office.Common.EventMethodObject(new Microsoft.Office.Common.MethodObject(f,d,a),new Microsoft.Office.Common.MethodObject(e,c,a));this._methodObjectList[h]=g},unregisterEvent:function(b){var a=Function._validateParams(arguments,[{name:"eventName",type:String,mayBeNull:false}]);if(a)throw a;this.unregisterMethod(b)},registerConversation:function(b){var a=Function._validateParams(arguments,[{name:"conversationId",type:String,mayBeNull:false}]);if(a)throw a;this._conversations[b]=window.location.href},unregisterConversation:function(b){var a=Function._validateParams(arguments,[{name:"conversationId",type:String,mayBeNull:false}]);if(a)throw a;delete this._conversations[b]},setPolicyManager:function(a){var b="policyManager",c=Function._validateParams(arguments,[{name:b,type:Object,mayBeNull:false}]);if(c)throw c;if(!a.checkPermission)throw OsfMsAjaxFactory.msAjaxError.argument(b);this._policyManager=a},getPolicyManager:function(){return this._policyManager}};Microsoft.Office.Common.ClientEndPoint=function(e,b,f){var c="targetWindow",a=this,d=Function._validateParams(arguments,[{name:"conversationId",type:String,mayBeNull:false},{name:c,mayBeNull:false},{name:"targetUrl",type:String,mayBeNull:false}]);if(d)throw d;if(!b.postMessage)throw OsfMsAjaxFactory.msAjaxError.argument(c);a._conversationId=e;a._targetWindow=b;a._targetUrl=f;a._callingIndex=0;a._callbackList={};a._eventHandlerList={};a._checkReceiverOriginAndRun=null;a._hostTrustCheckStatus=Microsoft.Office.Common.HostTrustStatus.unknown};Microsoft.Office.Common.ClientEndPoint.prototype={invoke:function(d,c,b){var f=Function._validateParams(arguments,[{name:"targetMethodName",type:String,mayBeNull:false},{name:"callback",type:Function,mayBeNull:true},{name:"param",mayBeNull:true}]);if(f)throw f;var a=this,e=function(){var e=a._callingIndex++,j=new Date,f={callback:c,createdOn:j.getTime()};if(b&&typeof b==="object"&&typeof b.__timeout__==="number"){f.timeout=b.__timeout__;delete b.__timeout__}a._callbackList[e]=f;try{if(a._hostTrustCheckStatus!==Microsoft.Office.Common.HostTrustStatus.trusted)if(d!=="ContextActivationManager_getAppContextAsync")throw"Access Denied";var h=new Microsoft.Office.Common.Request(d,Microsoft.Office.Common.ActionType.invoke,a._conversationId,e,b),i=Microsoft.Office.Common.MessagePackager.envelope(h);a._targetWindow.postMessage(i,a._targetUrl);Microsoft.Office.Common.XdmCommunicationManager._startMethodTimeoutTimer()}catch(g){try{c!==null&&c(Microsoft.Office.Common.InvokeResultCode.errorInRequest,g)}finally{delete a._callbackList[e]}}};if(a._checkReceiverOriginAndRun)a._checkReceiverOriginAndRun(e);else{a._hostTrustCheckStatus=Microsoft.Office.Common.HostTrustStatus.trusted;e()}},registerForEvent:function(d,g,c,i){var a=this,f=Function._validateParams(arguments,[{name:"targetEventName",type:String,mayBeNull:false},{name:"eventHandler",type:Function,mayBeNull:false},{name:"callback",type:Function,mayBeNull:true},{name:"data",mayBeNull:true,optional:true}]);if(f)throw f;var b=a._callingIndex++,k=new Date;a._callbackList[b]={callback:c,createdOn:k.getTime()};try{var h=new Microsoft.Office.Common.Request(d,Microsoft.Office.Common.ActionType.registerEvent,a._conversationId,b,i),j=Microsoft.Office.Common.MessagePackager.envelope(h);a._targetWindow.postMessage(j,a._targetUrl);Microsoft.Office.Common.XdmCommunicationManager._startMethodTimeoutTimer();a._eventHandlerList[d]=g}catch(e){try{c!==null&&c(Microsoft.Office.Common.InvokeResultCode.errorInRequest,e)}finally{delete a._callbackList[b]}}},unregisterForEvent:function(d,c,h){var a=this,f=Function._validateParams(arguments,[{name:"targetEventName",type:String,mayBeNull:false},{name:"callback",type:Function,mayBeNull:true},{name:"data",mayBeNull:true,optional:true}]);if(f)throw f;var b=a._callingIndex++,j=new Date;a._callbackList[b]={callback:c,createdOn:j.getTime()};try{var g=new Microsoft.Office.Common.Request(d,Microsoft.Office.Common.ActionType.unregisterEvent,a._conversationId,b,h),i=Microsoft.Office.Common.MessagePackager.envelope(g);a._targetWindow.postMessage(i,a._targetUrl);Microsoft.Office.Common.XdmCommunicationManager._startMethodTimeoutTimer()}catch(e){try{c!==null&&c(Microsoft.Office.Common.InvokeResultCode.errorInRequest,e)}finally{delete a._callbackList[b]}}finally{delete a._eventHandlerList[d]}}};Microsoft.Office.Common.XdmCommunicationManager=function(){var i="channel is not ready.",c="conversationId",h="Unknown conversation Id.",b=false,a=null,k=[],e=a,x=10,j=b,f=a,p=2e3,l=6e4,g={},d={},n=b;function r(b){for(var a in g)if(g[a]._conversations[b])return g[a];OsfMsAjaxFactory.msAjaxDebug.trace(h);throw OsfMsAjaxFactory.msAjaxError.argument(c)}function s(b){var a=d[b];if(!a){OsfMsAjaxFactory.msAjaxDebug.trace(h);throw OsfMsAjaxFactory.msAjaxError.argument(c)}return a}function v(e,c){var b=e._methodObjectList[c._actionName];if(!b){OsfMsAjaxFactory.msAjaxDebug.trace("The specified method is not registered on service endpoint:"+c._actionName);throw OsfMsAjaxFactory.msAjaxError.argument("messageObject")}var d=a;if(c._actionType===Microsoft.Office.Common.ActionType.invoke)d=b;else if(c._actionType===Microsoft.Office.Common.ActionType.registerEvent)d=b.getRegisterMethodObject();else d=b.getUnregisterMethodObject();return d}function z(a){k.push(a)}function y(){if(e!==a){if(!j)if(k.length>0){var b=k.shift();j=b.getInvokeBlockingFlag();b.invoke()}else{clearInterval(e);e=a}}else OsfMsAjaxFactory.msAjaxDebug.trace(i)}function u(){if(f){var c,e=0,k=new Date,h;for(var j in d){c=d[j];for(var g in c._callbackList){var b=c._callbackList[g];h=b.timeout?b.timeout:l;if(Math.abs(k.getTime()-b.createdOn)>=h)try{b.callback&&b.callback(Microsoft.Office.Common.InvokeResultCode.errorHandlingMethodCallTimedout,a)}finally{delete c._callbackList[g]}else e++}}if(e===0){clearInterval(f);f=a}}else OsfMsAjaxFactory.msAjaxDebug.trace(i)}function t(){j=b}function w(a){if(window.addEventListener)window.addEventListener("message",a,b);else if(navigator.userAgent.indexOf("MSIE")>-1&&window.attachEvent)window.attachEvent("onmessage",a);else{OsfMsAjaxFactory.msAjaxDebug.trace("Browser doesn't support the required API.");throw OsfMsAjaxFactory.msAjaxError.argument("Browser")}}function m(f,d){var e=b;if(!f||!d||!f.length||!d.length)return e;var c,a;c=document.createElement("a");a=document.createElement("a");c.href=f;a.href=d;e=c.hostname==a.hostname&&c.protocol==a.protocol&&c.port==a.port;delete c,a;return e}function q(a){if(!a||a==="null")return b;var c=["^office-int\\.com$","^officeapps\\.live-int\\.com$","^.*\\.dod\\.online\\.office365\\.us$","^.*\\.gov\\.online\\.office365\\.us$","^.*\\.officeapps\\.live\\.com$","^.*\\.officeapps\\.live-int\\.com$","^.*\\.officeapps-df\\.live\\.com$","^.*\\.online\\.office\\.de$","^.*\\.partner\\.officewebapps\\.cn$","^"+document.domain.replace(new RegExp("\\.","g"),"\\.")+"$"],d=new RegExp(c.join("|"));return d.test(a)}function A(c){var h="Access Denied",g="Failed origin check";if(c.data!=""){var b;try{b=Microsoft.Office.Common.MessagePackager.unenvelope(c.data)}catch(i){return}if(typeof b._messageType=="undefined")return;if(b._messageType===Microsoft.Office.Common.MessageType.request){var n=c.origin==a||c.origin=="null"?b._origin:c.origin;try{var d=r(b._conversationId),w=d._conversations[b._conversationId];if(!m(w,c.origin))throw g;var l=d.getPolicyManager();if(l&&!l.checkPermission(b._conversationId,b._actionName,b._data))throw h;var A=v(d,b),p=new Microsoft.Office.Common.InvokeCompleteCallback(c.source,n,b._actionName,b._conversationId,b._correlationId,t),B=new Microsoft.Office.Common.Invoker(A,b._data,p,d._eventHandlerProxyList,b._conversationId,b._actionName);if(e==a)e=setInterval(y,x);z(B)}catch(i){var o=Microsoft.Office.Common.InvokeResultCode.errorHandlingRequest;if(i==h)o=Microsoft.Office.Common.InvokeResultCode.errorHandlingRequestAccessDenied;var u=new Microsoft.Office.Common.Response(b._actionName,b._conversationId,b._correlationId,o,Microsoft.Office.Common.ResponseType.forCalling,i),q=Microsoft.Office.Common.MessagePackager.envelope(u);c.source&&c.source.postMessage&&c.source.postMessage(q,n)}}else if(b._messageType===Microsoft.Office.Common.MessageType.response){var f=s(b._conversationId);if(!m(f._targetUrl,c.origin))throw g;if(b._responseType===Microsoft.Office.Common.ResponseType.forCalling){var j=f._callbackList[b._correlationId];if(j)try{j.callback&&j.callback(b._errorCode,b._data)}finally{delete f._callbackList[b._correlationId]}}else{var k=f._eventHandlerList[b._actionName];k!==undefined&&k!==a&&k(b._data)}}else return}}function o(){if(!n){w(A);n=true}}return {connect:function(b,c,e){var a=d[b];if(!a){o();a=new Microsoft.Office.Common.ClientEndPoint(b,c,e);d[b]=a}return a},getClientEndPoint:function(e){var a=Function._validateParams(arguments,[{name:c,type:String,mayBeNull:b}]);if(a)throw a;return d[e]},createServiceEndPoint:function(a){o();var b=new Microsoft.Office.Common.ServiceEndPoint(a);g[a]=b;return b},getServiceEndPoint:function(c){var a=Function._validateParams(arguments,[{name:"serviceEndPointId",type:String,mayBeNull:b}]);if(a)throw a;return g[c]},deleteClientEndPoint:function(e){var a=Function._validateParams(arguments,[{name:c,type:String,mayBeNull:b}]);if(a)throw a;delete d[e]},_setMethodTimeout:function(a){var c=Function._validateParams(arguments,[{name:"methodTimeout",type:Number,mayBeNull:b}]);if(c)throw c;l=a<=0?6e4:a},_startMethodTimeoutTimer:function(){if(!f)f=setInterval(u,p)},isHostNameValidWacDomain:function(a){return q(a)}}}();Microsoft.Office.Common.Message=function(g,h,e,f,c){var b=false,a=this,d=Function._validateParams(arguments,[{name:"messageType",type:Number,mayBeNull:b},{name:"actionName",type:String,mayBeNull:b},{name:"conversationId",type:String,mayBeNull:b},{name:"correlationId",mayBeNull:b},{name:"data",mayBeNull:true,optional:true}]);if(d)throw d;a._messageType=g;a._actionName=h;a._conversationId=e;a._correlationId=f;a._origin=window.location.origin;if(typeof c=="undefined")a._data=null;else a._data=c};Microsoft.Office.Common.Message.prototype={getActionName:function(){return this._actionName},getConversationId:function(){return this._conversationId},getCorrelationId:function(){return this._correlationId},getOrigin:function(){return this._origin},getData:function(){return this._data},getMessageType:function(){return this._messageType}};Microsoft.Office.Common.Request=function(c,d,a,b,e){Microsoft.Office.Common.Request.uber.constructor.call(this,Microsoft.Office.Common.MessageType.request,c,a,b,e);this._actionType=d};OSF.OUtil.extend(Microsoft.Office.Common.Request,Microsoft.Office.Common.Message);Microsoft.Office.Common.Request.prototype.getActionType=function(){return this._actionType};Microsoft.Office.Common.Response=function(d,a,b,e,c,f){Microsoft.Office.Common.Response.uber.constructor.call(this,Microsoft.Office.Common.MessageType.response,d,a,b,f);this._errorCode=e;this._responseType=c};OSF.OUtil.extend(Microsoft.Office.Common.Response,Microsoft.Office.Common.Message);Microsoft.Office.Common.Response.prototype.getErrorCode=function(){return this._errorCode};Microsoft.Office.Common.Response.prototype.getResponseType=function(){return this._responseType};Microsoft.Office.Common.MessagePackager={envelope:function(a){return JSON.stringify(a)},unenvelope:function(a){return JSON.parse(a)}};Microsoft.Office.Common.ResponseSender=function(e,h,j,f,g,i){var c=false,a=this,d=Function._validateParams(arguments,[{name:"requesterWindow",mayBeNull:c},{name:"requesterUrl",type:String,mayBeNull:c},{name:"actionName",type:String,mayBeNull:c},{name:"conversationId",type:String,mayBeNull:c},{name:"correlationId",mayBeNull:c},{name:"responsetype",type:Number,maybeNull:c}]);if(d)throw d;a._requesterWindow=e;a._requesterUrl=h;a._actionName=j;a._conversationId=f;a._correlationId=g;a._invokeResultCode=Microsoft.Office.Common.InvokeResultCode.noError;a._responseType=i;var b=a;a._send=function(d){var c=new Microsoft.Office.Common.Response(b._actionName,b._conversationId,b._correlationId,b._invokeResultCode,b._responseType,d),a=Microsoft.Office.Common.MessagePackager.envelope(c);b._requesterWindow.postMessage(a,b._requesterUrl)}};Microsoft.Office.Common.ResponseSender.prototype={getRequesterWindow:function(){return this._requesterWindow},getRequesterUrl:function(){return this._requesterUrl},getActionName:function(){return this._actionName},getConversationId:function(){return this._conversationId},getCorrelationId:function(){return this._correlationId},getSend:function(){return this._send},setResultCode:function(a){this._invokeResultCode=a}};Microsoft.Office.Common.InvokeCompleteCallback=function(d,g,h,e,f,c){var b=this;Microsoft.Office.Common.InvokeCompleteCallback.uber.constructor.call(b,d,g,h,e,f,Microsoft.Office.Common.ResponseType.forCalling);b._postCallbackHandler=c;var a=b;b._send=function(d){var c=new Microsoft.Office.Common.Response(a._actionName,a._conversationId,a._correlationId,a._invokeResultCode,a._responseType,d),b=Microsoft.Office.Common.MessagePackager.envelope(c);a._requesterWindow.postMessage(b,a._requesterUrl);a._postCallbackHandler()}};OSF.OUtil.extend(Microsoft.Office.Common.InvokeCompleteCallback,Microsoft.Office.Common.ResponseSender);Microsoft.Office.Common.Invoker=function(g,h,d,e,f,i){var b=false,a=this,c=Function._validateParams(arguments,[{name:"methodObject",mayBeNull:b},{name:"paramValue",mayBeNull:true},{name:"invokeCompleteCallback",mayBeNull:b},{name:"eventHandlerProxyList",mayBeNull:true},{name:"conversationId",type:String,mayBeNull:b},{name:"eventName",type:String,mayBeNull:b}]);if(c)throw c;a._methodObject=g;a._param=h;a._invokeCompleteCallback=d;a._eventHandlerProxyList=e;a._conversationId=f;a._eventName=i};Microsoft.Office.Common.Invoker.prototype={invoke:function(){var a=this;try{var b;switch(a._methodObject.getInvokeType()){case Microsoft.Office.Common.InvokeType.async:a._methodObject.getMethod()(a._param,a._invokeCompleteCallback.getSend());break;case Microsoft.Office.Common.InvokeType.sync:b=a._methodObject.getMethod()(a._param);a._invokeCompleteCallback.getSend()(b);break;case Microsoft.Office.Common.InvokeType.syncRegisterEvent:var d=a._createEventHandlerProxyObject(a._invokeCompleteCallback);b=a._methodObject.getMethod()(d.getSend(),a._param);a._eventHandlerProxyList[a._conversationId+a._eventName]=d.getSend();a._invokeCompleteCallback.getSend()(b);break;case Microsoft.Office.Common.InvokeType.syncUnregisterEvent:var g=a._eventHandlerProxyList[a._conversationId+a._eventName];b=a._methodObject.getMethod()(g,a._param);delete a._eventHandlerProxyList[a._conversationId+a._eventName];a._invokeCompleteCallback.getSend()(b);break;case Microsoft.Office.Common.InvokeType.asyncRegisterEvent:var c=a._createEventHandlerProxyObject(a._invokeCompleteCallback);a._methodObject.getMethod()(c.getSend(),a._invokeCompleteCallback.getSend(),a._param);a._eventHandlerProxyList[a._callerId+a._eventName]=c.getSend();break;case Microsoft.Office.Common.InvokeType.asyncUnregisterEvent:var f=a._eventHandlerProxyList[a._callerId+a._eventName];a._methodObject.getMethod()(f,a._invokeCompleteCallback.getSend(),a._param);delete a._eventHandlerProxyList[a._callerId+a._eventName]}}catch(e){a._invokeCompleteCallback.setResultCode(Microsoft.Office.Common.InvokeResultCode.errorInResponse);a._invokeCompleteCallback.getSend()(e)}},getInvokeBlockingFlag:function(){return this._methodObject.getBlockingFlag()},_createEventHandlerProxyObject:function(a){return new Microsoft.Office.Common.ResponseSender(a.getRequesterWindow(),a.getRequesterUrl(),a.getActionName(),a.getConversationId(),a.getCorrelationId(),Microsoft.Office.Common.ResponseType.forEventing)}};OSF.EventDispatch=function(b){var a=this;a._eventHandlers={};a._queuedEventsArgs={};for(var d in b){var c=b[d];a._eventHandlers[c]=[];a._queuedEventsArgs[c]=[]}};OSF.EventDispatch.prototype={getSupportedEvents:function(){var a=[];for(var b in this._eventHandlers)a.push(b);return a},supportsEvent:function(c){var a=false;for(var b in this._eventHandlers)if(c==b){a=true;break}return a},hasEventHandler:function(b,c){var a=this._eventHandlers[b];if(a&&a.length>0)for(var d in a)if(a[d]===c)return true;return false},addEventHandler:function(b,a){if(typeof a!="function")return false;var c=this._eventHandlers[b];if(c&&!this.hasEventHandler(b,a)){c.push(a);return true}else return false},addEventHandlerAndFireQueuedEvent:function(a,e){var d=this._eventHandlers[a],c=d.length==0,b=this.addEventHandler(a,e);c&&b&&this.fireQueuedEvent(a);return b},removeEventHandler:function(c,d){var a=this._eventHandlers[c];if(a&&a.length>0)for(var b=0;b<a.length;b++)if(a[b]===d){a.splice(b,1);return true}return false},clearEventHandlers:function(a){this._eventHandlers[a]=[]},getEventHandlerCount:function(a){return this._eventHandlers[a]!=undefined?this._eventHandlers[a].length:-1},fireEvent:function(a){if(a.type==undefined)return false;var b=a.type;if(b&&this._eventHandlers[b]){var c=this._eventHandlers[b];for(var d in c)c[d](a);return true}else return false},fireOrQueueEvent:function(c){var b=this,a=c.type;if(a&&b._eventHandlers[a]){var d=b._eventHandlers[a],e=b._queuedEventsArgs[a];if(d.length==0)e.push(c);else b.fireEvent(c);return true}else return false},fireQueuedEvent:function(a){if(a&&this._eventHandlers[a]){var b=this._eventHandlers[a],c=this._queuedEventsArgs[a];if(b.length>0){var d=b[0];while(c.length>0){var e=c.shift();d(e)}return true}}return false}};OSF.DDA.DataCoercion=function(){var a=null;return {findArrayDimensionality:function(c){if(OSF.OUtil.isArray(c)){for(var b=0,a=0;a<c.length;a++)b=Math.max(b,OSF.DDA.DataCoercion.findArrayDimensionality(c[a]));return b+1}else return 0},getCoercionDefaultForBinding:function(a){switch(a){case Microsoft.Office.WebExtension.BindingType.Matrix:return Microsoft.Office.WebExtension.CoercionType.Matrix;case Microsoft.Office.WebExtension.BindingType.Table:return Microsoft.Office.WebExtension.CoercionType.Table;case Microsoft.Office.WebExtension.BindingType.Text:default:return Microsoft.Office.WebExtension.CoercionType.Text}},getBindingDefaultForCoercion:function(a){switch(a){case Microsoft.Office.WebExtension.CoercionType.Matrix:return Microsoft.Office.WebExtension.BindingType.Matrix;case Microsoft.Office.WebExtension.CoercionType.Table:return Microsoft.Office.WebExtension.BindingType.Table;case Microsoft.Office.WebExtension.CoercionType.Text:case Microsoft.Office.WebExtension.CoercionType.Html:case Microsoft.Office.WebExtension.CoercionType.Ooxml:default:return Microsoft.Office.WebExtension.BindingType.Text}},determineCoercionType:function(b){if(b==a||b==undefined)return a;var c=a,d=typeof b;if(b.rows!==undefined)c=Microsoft.Office.WebExtension.CoercionType.Table;else if(OSF.OUtil.isArray(b))c=Microsoft.Office.WebExtension.CoercionType.Matrix;else if(d=="string"||d=="number"||d=="boolean"||OSF.OUtil.isDate(b))c=Microsoft.Office.WebExtension.CoercionType.Text;else throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject;return c},coerceData:function(b,c,a){a=a||OSF.DDA.DataCoercion.determineCoercionType(b);if(a&&a!=c){OSF.OUtil.writeProfilerMark(OSF.InternalPerfMarker.DataCoercionBegin);b=OSF.DDA.DataCoercion._coerceDataFromTable(c,OSF.DDA.DataCoercion._coerceDataToTable(b,a));OSF.OUtil.writeProfilerMark(OSF.InternalPerfMarker.DataCoercionEnd)}return b},_matrixToText:function(a){if(a.length==1&&a[0].length==1)return ""+a[0][0];for(var b="",c=0;c<a.length;c++)b+=a[c].join("\t")+"\n";return b.substring(0,b.length-1)},_textToMatrix:function(c){for(var a=c.split("\n"),b=0;b<a.length;b++)a[b]=a[b].split("\t");return a},_tableToText:function(c){var b="";if(c.headers!=a)b=OSF.DDA.DataCoercion._matrixToText([c.headers])+"\n";var d=OSF.DDA.DataCoercion._matrixToText(c.rows);if(d=="")b=b.substring(0,b.length-1);return b+d},_tableToMatrix:function(b){var c=b.rows;b.headers!=a&&c.unshift(b.headers);return c},_coerceDataFromTable:function(c,b){var a;switch(c){case Microsoft.Office.WebExtension.CoercionType.Table:a=b;break;case Microsoft.Office.WebExtension.CoercionType.Matrix:a=OSF.DDA.DataCoercion._tableToMatrix(b);break;case Microsoft.Office.WebExtension.CoercionType.SlideRange:try{var d=OSF.DDA.DataCoercion._tableToText(b);a=new OSF.DDA.SlideRange(d)}catch(e){a=OSF.DDA.DataCoercion._tableToText(b)}break;case Microsoft.Office.WebExtension.CoercionType.Text:case Microsoft.Office.WebExtension.CoercionType.Html:case Microsoft.Office.WebExtension.CoercionType.Ooxml:default:a=OSF.DDA.DataCoercion._tableToText(b)}return a},_coerceDataToTable:function(b,c){if(c==undefined)c=OSF.DDA.DataCoercion.determineCoercionType(b);var a;switch(c){case Microsoft.Office.WebExtension.CoercionType.Table:a=b;break;case Microsoft.Office.WebExtension.CoercionType.Matrix:a=new Microsoft.Office.WebExtension.TableData(b);break;case Microsoft.Office.WebExtension.CoercionType.Text:case Microsoft.Office.WebExtension.CoercionType.Html:case Microsoft.Office.WebExtension.CoercionType.Ooxml:default:a=new Microsoft.Office.WebExtension.TableData(OSF.DDA.DataCoercion._textToMatrix(b))}return a}}}();OSF.DDA.issueAsyncResult=function(d,f,a){var e=d[Microsoft.Office.WebExtension.Parameters.Callback];if(e){var c={};c[OSF.DDA.AsyncResultEnum.Properties.Context]=d[Microsoft.Office.WebExtension.Parameters.AsyncContext];var b;if(f==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)c[OSF.DDA.AsyncResultEnum.Properties.Value]=a;else{b={};a=a||OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError);b[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]=f||OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError;b[OSF.DDA.AsyncResultEnum.ErrorProperties.Name]=a.name||a;b[OSF.DDA.AsyncResultEnum.ErrorProperties.Message]=a.message||a}e(new OSF.DDA.AsyncResult(c,b))}};OSF.DDA.generateBindingId=function(){return "UnnamedBinding_"+OSF.OUtil.getUniqueId()+"_"+(new Date).getTime()};OSF.DDA.SettingsManager={SerializedSettings:"serializedSettings",DateJSONPrefix:"Date(",DataJSONSuffix:")",serializeSettings:function(b){var d={};for(var c in b){var a=b[c];try{if(JSON)a=JSON.stringify(a,function(a,b){return OSF.OUtil.isDate(this[a])?OSF.DDA.SettingsManager.DateJSONPrefix+this[a].getTime()+OSF.DDA.SettingsManager.DataJSONSuffix:b});else a=Sys.Serialization.JavaScriptSerializer.serialize(a);d[c]=a}catch(e){}}return d},deserializeSettings:function(b){var d={};b=b||{};for(var c in b){var a=b[c];try{if(JSON)a=JSON.parse(a,function(c,a){var b;if(typeof a==="string"&&a&&a.length>6&&a.slice(0,5)===OSF.DDA.SettingsManager.DateJSONPrefix&&a.slice(-1)===OSF.DDA.SettingsManager.DataJSONSuffix){b=new Date(parseInt(a.slice(5,-1)));if(b)return b}return a});else a=Sys.Serialization.JavaScriptSerializer.deserialize(a,true);d[c]=a}catch(e){}}return d}};OSF.DDA.OMFactory={manufactureBinding:function(a,c){var d=a[OSF.DDA.BindingProperties.Id],g=a[OSF.DDA.BindingProperties.RowCount],f=a[OSF.DDA.BindingProperties.ColumnCount],h=a[OSF.DDA.BindingProperties.HasHeaders],b;switch(a[OSF.DDA.BindingProperties.Type]){case Microsoft.Office.WebExtension.BindingType.Text:b=new OSF.DDA.TextBinding(d,c);break;case Microsoft.Office.WebExtension.BindingType.Matrix:b=new OSF.DDA.MatrixBinding(d,c,g,f);break;case Microsoft.Office.WebExtension.BindingType.Table:var i=function(){return OSF.DDA.ExcelDocument&&Microsoft.Office.WebExtension.context.document&&Microsoft.Office.WebExtension.context.document instanceof OSF.DDA.ExcelDocument},e;if(i()&&OSF.DDA.ExcelTableBinding)e=OSF.DDA.ExcelTableBinding;else e=OSF.DDA.TableBinding;b=new e(d,c,g,f,h);break;default:b=new OSF.DDA.UnknownBinding(d,c)}return b},manufactureTableData:function(a){return new Microsoft.Office.WebExtension.TableData(a[OSF.DDA.TableDataProperties.TableRows],a[OSF.DDA.TableDataProperties.TableHeaders])},manufactureDataNode:function(a){if(a)return new OSF.DDA.CustomXmlNode(a[OSF.DDA.DataNodeProperties.Handle],a[OSF.DDA.DataNodeProperties.NodeType],a[OSF.DDA.DataNodeProperties.NamespaceUri],a[OSF.DDA.DataNodeProperties.BaseName])},manufactureDataPart:function(a,b){return new OSF.DDA.CustomXmlPart(b,a[OSF.DDA.DataPartProperties.Id],a[OSF.DDA.DataPartProperties.BuiltIn])},manufactureEventArgs:function(e,c,a){var d=this,b;switch(e){case Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged:b=new OSF.DDA.DocumentSelectionChangedEventArgs(c);break;case Microsoft.Office.WebExtension.EventType.BindingSelectionChanged:b=new OSF.DDA.BindingSelectionChangedEventArgs(d.manufactureBinding(a,c.document),a[OSF.DDA.PropertyDescriptors.Subset]);break;case Microsoft.Office.WebExtension.EventType.BindingDataChanged:b=new OSF.DDA.BindingDataChangedEventArgs(d.manufactureBinding(a,c.document));break;case Microsoft.Office.WebExtension.EventType.SettingsChanged:b=new OSF.DDA.SettingsChangedEventArgs(c);break;case Microsoft.Office.Internal.EventType.OfficeThemeChanged:b=new OSF.DDA.OfficeThemeChangedEventArgs(a);break;case Microsoft.Office.Internal.EventType.DocumentThemeChanged:b=new OSF.DDA.DocumentThemeChangedEventArgs(a);break;case Microsoft.Office.WebExtension.EventType.ActiveViewChanged:b=new OSF.DDA.ActiveViewChangedEventArgs(a);break;case Microsoft.Office.WebExtension.EventType.AppCommandInvoked:b=OSF.DDA.AppCommand.AppCommandInvokedEventArgs.create(a);break;case Microsoft.Office.WebExtension.EventType.DataNodeInserted:b=new OSF.DDA.NodeInsertedEventArgs(d.manufactureDataNode(a[OSF.DDA.DataNodeEventProperties.NewNode]),a[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeReplaced:b=new OSF.DDA.NodeReplacedEventArgs(d.manufactureDataNode(a[OSF.DDA.DataNodeEventProperties.OldNode]),d.manufactureDataNode(a[OSF.DDA.DataNodeEventProperties.NewNode]),a[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeDeleted:b=new OSF.DDA.NodeDeletedEventArgs(d.manufactureDataNode(a[OSF.DDA.DataNodeEventProperties.OldNode]),d.manufactureDataNode(a[OSF.DDA.DataNodeEventProperties.NextSiblingNode]),a[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.TaskSelectionChanged:b=new OSF.DDA.TaskSelectionChangedEventArgs(c);break;case Microsoft.Office.WebExtension.EventType.ResourceSelectionChanged:b=new OSF.DDA.ResourceSelectionChangedEventArgs(c);break;case Microsoft.Office.WebExtension.EventType.ViewSelectionChanged:b=new OSF.DDA.ViewSelectionChangedEventArgs(c);break;case Microsoft.Office.WebExtension.EventType.DialogMessageReceived:b=new OSF.DDA.DialogEventArgs(a);break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,e))}return b}};OSF.DDA.UI={};OSF.DDA.UI.ParentUI=function(){var c=new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DialogMessageReceived,Microsoft.Office.WebExtension.EventType.DialogEventReceived]),b=OSF.DDA.AsyncMethodNames.DisplayDialogAsync.displayName,a=this;!a[b]&&OSF.OUtil.defineEnumerableProperty(a,b,{value:function(){var b=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.OpenDialog];b(arguments,c,a)}});OSF.OUtil.finalizeProperties(this)};OSF.DDA.UI.ChildUI=function(){var b=OSF.DDA.SyncMethodNames.MessageParent.displayName,a=this;!a[b]&&OSF.OUtil.defineEnumerableProperty(a,b,{value:function(){var b=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.MessageParent];return b(arguments,a)}});OSF.OUtil.finalizeProperties(this)};OSF.DialogHandler=function(){};OSF.DDA.DialogEventArgs=function(a){if(a[OSF.DDA.PropertyDescriptors.MessageType]==OSF.DialogMessageType.DialogMessageReceived)OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogMessageReceived},message:{value:a[OSF.DDA.PropertyDescriptors.MessageContent]},origin:{value:a[OSF.DDA.PropertyDescriptors.MessageOrigin]}});else OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogEventReceived},error:{value:a[OSF.DDA.PropertyDescriptors.MessageType]}})};OSF.DDA.ListType=function(){var a={};a[OSF.DDA.ListDescriptors.BindingList]=OSF.DDA.PropertyDescriptors.BindingProperties;a[OSF.DDA.ListDescriptors.DataPartList]=OSF.DDA.PropertyDescriptors.DataPartProperties;a[OSF.DDA.ListDescriptors.DataNodeList]=OSF.DDA.PropertyDescriptors.DataNodeProperties;return {isListType:function(b){return OSF.OUtil.listContainsKey(a,b)},getDescriptor:function(b){return a[b]}}}();OSF.DDA.ApiMethodCall=function(c,f,e,g,h){var a=this,d=c.length,b=OSF.OUtil.delayExecutionAndCache(function(){return OSF.OUtil.formatString(Strings.OfficeOM.L_InvalidParameters,h)});a.verifyArguments=function(d,f){for(var e in d){var a=d[e],c=f[e];if(a["enum"])switch(typeof c){case "string":if(OSF.OUtil.listContainsValue(a["enum"],c))break;case "undefined":throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration;default:throw b()}if(a["types"])if(!OSF.OUtil.listContainsValue(a["types"],typeof c))throw b()}};a.extractRequiredArguments=function(g,l,j){if(g.length<d)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_MissingRequiredArguments);for(var e=[],a=0;a<d;a++)e.push(g[a]);this.verifyArguments(c,e);var i={};for(a=0;a<d;a++){var f=c[a],h=e[a];if(f.verify){var k=f.verify(h,l,j);if(!k)throw b()}i[f.name]=h}return i};a.fillOptions=function(a,e,h,g){a=a||{};for(var d in f)if(!OSF.OUtil.listContainsKey(a,d)){var c=undefined,b=f[d];if(b.calculate&&e)c=b.calculate(e,h,g);if(!c&&b.defaultValue!==undefined)c=b.defaultValue;a[d]=c}return a};a.constructCallArgs=function(c,d,f,b){var a={};for(var i in c)a[i]=c[i];for(var h in d)a[h]=d[h];for(var j in e)a[j]=e[j](f,b);if(g)a=g(a,f,b);return a}};OSF.DDA.AsyncMethodCall=function(d,e,i,f,g,j,k){var a="function",c=d.length,b=new OSF.DDA.ApiMethodCall(d,e,i,j,k);function h(h,j,l,k){if(h.length>c+2)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(var d,f,i=h.length-1;i>=c;i--){var g=h[i];switch(typeof g){case "object":if(d)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else d=g;break;case a:if(f)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalFunction);else f=g;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument)}}d=b.fillOptions(d,j,l,k);if(f)if(d[Microsoft.Office.WebExtension.Parameters.Callback])throw Strings.OfficeOM.L_RedundantCallbackSpecification;else d[Microsoft.Office.WebExtension.Parameters.Callback]=f;b.verifyArguments(e,d);return d}this.verifyAndExtractCall=function(e,c,a){var d=b.extractRequiredArguments(e,c,a),g=h(e,d,c,a),f=b.constructCallArgs(d,g,c,a);return f};this.processResponse=function(c,b,d,e){var a;if(c==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)if(f)a=f(b,d,e);else a=b;else if(g)a=g(c,b);else a=OSF.DDA.ErrorCodeManager.getErrorArgs(c);return a};this.getCallArgs=function(g){for(var b,d,f=g.length-1;f>=c;f--){var e=g[f];switch(typeof e){case "object":b=e;break;case a:d=e}}b=b||{};if(d)b[Microsoft.Office.WebExtension.Parameters.Callback]=d;return b}};OSF.DDA.SyncMethodCall=function(b,c,f,g,h){var d=b.length,a=new OSF.DDA.ApiMethodCall(b,c,f,g,h);function e(e,h,j,i){if(e.length>d+1)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(var b,k,f=e.length-1;f>=d;f--){var g=e[f];switch(typeof g){case "object":if(b)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else b=g;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument)}}b=a.fillOptions(b,h,j,i);a.verifyArguments(c,b);return b}this.verifyAndExtractCall=function(f,c,b){var d=a.extractRequiredArguments(f,c,b),h=e(f,d,c,b),g=a.constructCallArgs(d,h,c,b);return g}};OSF.DDA.ConvertToDocumentTheme=function(f){var b=false,a=true;for(var d=[{name:"primaryFontColor",needToConvertToHex:a},{name:"primaryBackgroundColor",needToConvertToHex:a},{name:"secondaryFontColor",needToConvertToHex:a},{name:"secondaryBackgroundColor",needToConvertToHex:a},{name:"accent1",needToConvertToHex:a},{name:"accent2",needToConvertToHex:a},{name:"accent3",needToConvertToHex:a},{name:"accent4",needToConvertToHex:a},{name:"accent5",needToConvertToHex:a},{name:"accent6",needToConvertToHex:a},{name:"hyperlink",needToConvertToHex:a},{name:"followedHyperlink",needToConvertToHex:a},{name:"headerLatinFont",needToConvertToHex:b},{name:"headerEastAsianFont",needToConvertToHex:b},{name:"headerScriptFont",needToConvertToHex:b},{name:"headerLocalizedFont",needToConvertToHex:b},{name:"bodyLatinFont",needToConvertToHex:b},{name:"bodyEastAsianFont",needToConvertToHex:b},{name:"bodyScriptFont",needToConvertToHex:b},{name:"bodyLocalizedFont",needToConvertToHex:b}],e={},c=0;c<d.length;c++)if(d[c].needToConvertToHex)e[d[c].name]=OSF.OUtil.convertIntToHex(f[d[c].name]);else e[d[c].name]=f[d[c].name];return e};OSF.DDA.ConvertToOfficeTheme=function(a){var b={};for(var c in a)b[c]=OSF.OUtil.convertIntToHex(a[c]);return b};OSF.DDA.AsyncMethodNames={};OSF.DDA.AsyncMethodNames.addNames=function(b){for(var a in b){var c={};OSF.OUtil.defineEnumerableProperties(c,{id:{value:a},displayName:{value:b[a]}});OSF.DDA.AsyncMethodNames[a]=c}};OSF.DDA.AsyncMethodNames.addNames({GoToByIdAsync:"goToByIdAsync",GetSelectedDataAsync:"getSelectedDataAsync",SetSelectedDataAsync:"setSelectedDataAsync",GetDocumentCopyAsync:"getFileAsync",GetDocumentCopyChunkAsync:"getSliceAsync",ReleaseDocumentCopyAsync:"closeAsync",GetFilePropertiesAsync:"getFilePropertiesAsync",AddFromSelectionAsync:"addFromSelectionAsync",AddFromPromptAsync:"addFromPromptAsync",AddFromNamedItemAsync:"addFromNamedItemAsync",GetAllAsync:"getAllAsync",GetByIdAsync:"getByIdAsync",ReleaseByIdAsync:"releaseByIdAsync",GetDataAsync:"getDataAsync",SetDataAsync:"setDataAsync",AddRowsAsync:"addRowsAsync",AddColumnsAsync:"addColumnsAsync",DeleteAllDataValuesAsync:"deleteAllDataValuesAsync",ClearFormatsAsync:"clearFormatsAsync",SetTableOptionsAsync:"setTableOptionsAsync",SetFormatsAsync:"setFormatsAsync",RefreshAsync:"refreshAsync",SaveAsync:"saveAsync",AddHandlerAsync:"addHandlerAsync",RemoveHandlerAsync:"removeHandlerAsync",GetActiveViewAsync:"getActiveViewAsync",AppCommandInvocationCompletedAsync:"appCommandInvocationCompletedAsync",AddDataPartAsync:"addAsync",GetDataPartByIdAsync:"getByIdAsync",GetDataPartsByNameSpaceAsync:"getByNamespaceAsync",DeleteDataPartAsync:"deleteAsync",GetPartNodesAsync:"getNodesAsync",GetPartXmlAsync:"getXmlAsync",AddDataPartNamespaceAsync:"addNamespaceAsync",GetDataPartNamespaceAsync:"getNamespaceAsync",GetDataPartPrefixAsync:"getPrefixAsync",GetRelativeNodesAsync:"getNodesAsync",GetNodeValueAsync:"getNodeValueAsync",GetNodeXmlAsync:"getXmlAsync",SetNodeValueAsync:"setNodeValueAsync",SetNodeXmlAsync:"setXmlAsync",GetNodeTextAsync:"getTextAsync",SetNodeTextAsync:"setTextAsync",GetOfficeThemeAsync:"getOfficeThemeAsync",GetDocumentThemeAsync:"getDocumentThemeAsync",GetSelectedTask:"getSelectedTaskAsync",GetTask:"getTaskAsync",GetWSSUrl:"getWSSUrlAsync",GetTaskField:"getTaskFieldAsync",GetSelectedResource:"getSelectedResourceAsync",GetResourceField:"getResourceFieldAsync",GetProjectField:"getProjectFieldAsync",GetSelectedView:"getSelectedViewAsync",DisplayDialogAsync:"displayDialogAsync",CloseAsync:"close"});OSF.DDA.SyncMethodNames={};OSF.DDA.SyncMethodNames.addNames=function(b){for(var a in b){var c={};OSF.OUtil.defineEnumerableProperties(c,{id:{value:a},displayName:{value:b[a]}});OSF.DDA.SyncMethodNames[a]=c}};OSF.DDA.SyncMethodNames.addNames({MessageParent:"messageParent",AddMessageHandler:"addEventHandler"});OSF.DDA.AsyncMethodCallFactory=function(){function a(a){var c=null;if(a){c={};for(var d=a.length,b=0;b<d;b++)c[a[b].name]=a[b].value}return c}return {manufacture:function(b){var d=b.supportedOptions?a(b.supportedOptions):[],c=b.privateStateCallbacks?a(b.privateStateCallbacks):[];return new OSF.DDA.AsyncMethodCall(b.requiredArguments||[],d,c,b.onSucceeded,b.onFailed,b.checkCallArgs,b.method.displayName)}}}();OSF.DDA.SyncMethodCallFactory=function(){function a(a){var c=null;if(a){c={};for(var d=a.length,b=0;b<d;b++)c[a[b].name]=a[b].value}return c}return {manufacture:function(b){var c=b.supportedOptions?a(b.supportedOptions):[];return new OSF.DDA.SyncMethodCall(b.requiredArguments||[],c,b.privateStateCallbacks,b.checkCallArgs,b.method.displayName)}}}();OSF.DDA.AsyncMethodCalls={};OSF.DDA.AsyncMethodCalls.define=function(a){OSF.DDA.AsyncMethodCalls[a.method.id]=OSF.DDA.AsyncMethodCallFactory.manufacture(a)};(function(){var o="function",k=true,i=false,d="boolean",f="object",c="number",b="string";function a(a){OSF.DDA.AsyncMethodCalls.define(a)}function g(b,d,c){var a=b[Microsoft.Office.WebExtension.Parameters.Data];if(a&&(a[OSF.DDA.TableDataProperties.TableRows]!=undefined||a[OSF.DDA.TableDataProperties.TableHeaders]!=undefined))a=OSF.DDA.OMFactory.manufactureTableData(a);a=OSF.DDA.DataCoercion.coerceData(a,c[Microsoft.Office.WebExtension.Parameters.CoercionType]);return a==undefined?null:a}function j(a){return OSF.DDA.OMFactory.manufactureBinding(a,Microsoft.Office.WebExtension.context.document)}function l(a){return OSF.DDA.OMFactory.manufactureDataPart(a,Microsoft.Office.WebExtension.context.document.customXmlParts)}function n(a){return OSF.DDA.OMFactory.manufactureDataNode(a)}function e(a){return a.id}function m(b,a){return a}function h(b,a){return a}a({method:OSF.DDA.AsyncMethodNames.GoToByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:[b,c]},{name:Microsoft.Office.WebExtension.Parameters.GoToType,"enum":Microsoft.Office.WebExtension.GoToType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.SelectionMode,value:{"enum":Microsoft.Office.WebExtension.SelectionMode,defaultValue:Microsoft.Office.WebExtension.SelectionMode.Default}}]});a({method:OSF.DDA.AsyncMethodNames.GetSelectedDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,"enum":Microsoft.Office.WebExtension.CoercionType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:{"enum":Microsoft.Office.WebExtension.ValueFormat,defaultValue:Microsoft.Office.WebExtension.ValueFormat.Unformatted}},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:{"enum":Microsoft.Office.WebExtension.FilterType,defaultValue:Microsoft.Office.WebExtension.FilterType.All}}],privateStateCallbacks:[],onSucceeded:g});a({method:OSF.DDA.AsyncMethodNames.SetSelectedDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:[b,f,c,d]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(a){return OSF.DDA.DataCoercion.determineCoercionType(a[Microsoft.Office.WebExtension.Parameters.Data])}}},{name:Microsoft.Office.WebExtension.Parameters.CellFormat,value:{types:[f],defaultValue:[]}},{name:Microsoft.Office.WebExtension.Parameters.TableOptions,value:{types:[f],defaultValue:[]}},{name:Microsoft.Office.WebExtension.Parameters.ImageLeft,value:{types:[c,d],defaultValue:i}},{name:Microsoft.Office.WebExtension.Parameters.ImageTop,value:{types:[c,d],defaultValue:i}},{name:Microsoft.Office.WebExtension.Parameters.ImageWidth,value:{types:[c,d],defaultValue:i}},{name:Microsoft.Office.WebExtension.Parameters.ImageHeight,value:{types:[c,d],defaultValue:i}}],privateStateCallbacks:[]});a({method:OSF.DDA.AsyncMethodNames.GetFilePropertiesAsync,onSucceeded:function(a){return new Microsoft.Office.WebExtension.FileProperties(a)}});a({method:OSF.DDA.AsyncMethodNames.GetDocumentCopyAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.FileType,"enum":Microsoft.Office.WebExtension.FileType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.SliceSize,value:{types:[c],defaultValue:4*1024*1024}}],onSucceeded:function(a,c,b){return new OSF.DDA.File(a[OSF.DDA.FileProperties.Handle],a[OSF.DDA.FileProperties.FileSize],b[Microsoft.Office.WebExtension.Parameters.SliceSize])}});a({method:OSF.DDA.AsyncMethodNames.GetDocumentCopyChunkAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.SliceIndex,types:[c]}],privateStateCallbacks:[{name:OSF.DDA.FileProperties.Handle,value:function(b,a){return a[OSF.DDA.FileProperties.Handle]}},{name:OSF.DDA.FileProperties.SliceSize,value:function(b,a){return a[OSF.DDA.FileProperties.SliceSize]}}],checkCallArgs:function(a,d,c){var b=a[Microsoft.Office.WebExtension.Parameters.SliceIndex];if(b<0||b>=d.sliceCount)throw OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange;a[OSF.DDA.FileSliceOffset]=parseInt(b*c[OSF.DDA.FileProperties.SliceSize]);return a},onSucceeded:function(a,d,c){var b={};OSF.OUtil.defineEnumerableProperties(b,{data:{value:a[Microsoft.Office.WebExtension.Parameters.Data]},index:{value:c[Microsoft.Office.WebExtension.Parameters.SliceIndex]},size:{value:a[OSF.DDA.FileProperties.SliceSize]}});return b}});a({method:OSF.DDA.AsyncMethodNames.ReleaseDocumentCopyAsync,privateStateCallbacks:[{name:OSF.DDA.FileProperties.Handle,value:function(b,a){return a[OSF.DDA.FileProperties.Handle]}}]});a({method:OSF.DDA.AsyncMethodNames.AddFromSelectionAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.BindingType,"enum":Microsoft.Office.WebExtension.BindingType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:{types:[b],calculate:OSF.DDA.generateBindingId}}],privateStateCallbacks:[],onSucceeded:j});a({method:OSF.DDA.AsyncMethodNames.AddFromPromptAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.BindingType,"enum":Microsoft.Office.WebExtension.BindingType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:{types:[b],calculate:OSF.DDA.generateBindingId}},{name:Microsoft.Office.WebExtension.Parameters.PromptText,value:{types:[b],calculate:function(){return Strings.OfficeOM.L_AddBindingFromPromptDefaultText}}}],privateStateCallbacks:[],onSucceeded:j});a({method:OSF.DDA.AsyncMethodNames.AddFromNamedItemAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.ItemName,types:[b]},{name:Microsoft.Office.WebExtension.Parameters.BindingType,"enum":Microsoft.Office.WebExtension.BindingType}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:{types:[b],calculate:OSF.DDA.generateBindingId}}],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.FailOnCollision,value:function(){return k}}],onSucceeded:j});a({method:OSF.DDA.AsyncMethodNames.GetAllAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[],onSucceeded:function(a){return OSF.OUtil.mapList(a[OSF.DDA.ListDescriptors.BindingList],j)}});a({method:OSF.DDA.AsyncMethodNames.GetByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:[b]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:j});a({method:OSF.DDA.AsyncMethodNames.ReleaseByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:[b]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:function(d,a,b){var c=b[Microsoft.Office.WebExtension.Parameters.Id];delete a._eventDispatches[c]}});a({method:OSF.DDA.AsyncMethodNames.GetDataAsync,requiredArguments:[],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(b,a){return OSF.DDA.DataCoercion.getCoercionDefaultForBinding(a.type)}}},{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:{"enum":Microsoft.Office.WebExtension.ValueFormat,defaultValue:Microsoft.Office.WebExtension.ValueFormat.Unformatted}},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:{"enum":Microsoft.Office.WebExtension.FilterType,defaultValue:Microsoft.Office.WebExtension.FilterType.All}},{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:{types:[c],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:{types:[c],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.RowCount,value:{types:[c],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.ColumnCount,value:{types:[c],defaultValue:0}}],checkCallArgs:function(a,b){if(a[Microsoft.Office.WebExtension.Parameters.StartRow]==0&&a[Microsoft.Office.WebExtension.Parameters.StartColumn]==0&&a[Microsoft.Office.WebExtension.Parameters.RowCount]==0&&a[Microsoft.Office.WebExtension.Parameters.ColumnCount]==0){delete a[Microsoft.Office.WebExtension.Parameters.StartRow];delete a[Microsoft.Office.WebExtension.Parameters.StartColumn];delete a[Microsoft.Office.WebExtension.Parameters.RowCount];delete a[Microsoft.Office.WebExtension.Parameters.ColumnCount]}if(a[Microsoft.Office.WebExtension.Parameters.CoercionType]!=OSF.DDA.DataCoercion.getCoercionDefaultForBinding(b.type)&&(a[Microsoft.Office.WebExtension.Parameters.StartRow]||a[Microsoft.Office.WebExtension.Parameters.StartColumn]||a[Microsoft.Office.WebExtension.Parameters.RowCount]||a[Microsoft.Office.WebExtension.Parameters.ColumnCount]))throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding;return a},privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:e}],onSucceeded:g});a({method:OSF.DDA.AsyncMethodNames.SetDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:[b,f,c,d]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(a){return OSF.DDA.DataCoercion.determineCoercionType(a[Microsoft.Office.WebExtension.Parameters.Data])}}},{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:{types:[c],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:{types:[c],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.CellFormat,value:{types:[f],defaultValue:[]}},{name:Microsoft.Office.WebExtension.Parameters.TableOptions,value:{types:[f],defaultValue:[]}}],checkCallArgs:function(a,c){var b=Microsoft.Office.WebExtension.Parameters;if(a[b.StartRow]==0&&a[b.StartColumn]==0&&OSF.OUtil.isArray(a[b.CellFormat])&&a[b.CellFormat].length===0&&OSF.OUtil.isArray(a[b.TableOptions])&&a[b.TableOptions].length===0){delete a[b.StartRow];delete a[b.StartColumn];delete a[b.CellFormat];delete a[b.TableOptions]}if(a[b.CoercionType]!=OSF.DDA.DataCoercion.getCoercionDefaultForBinding(c.type)&&(a[b.StartRow]&&a[b.StartRow]!=0||a[b.StartColumn]&&a[b.StartColumn]!=0||a[b.CellFormat]||a[b.TableOptions]))throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding;return a},privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:e}]});a({method:OSF.DDA.AsyncMethodNames.AddRowsAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:[f]}],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:e}]});a({method:OSF.DDA.AsyncMethodNames.AddColumnsAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:[f]}],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:e}]});a({method:OSF.DDA.AsyncMethodNames.DeleteAllDataValuesAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:e}]});a({method:OSF.DDA.AsyncMethodNames.ClearFormatsAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:e}]});a({method:OSF.DDA.AsyncMethodNames.SetTableOptionsAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.TableOptions,defaultValue:[]}],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:e}]});a({method:OSF.DDA.AsyncMethodNames.SetFormatsAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.CellFormat,defaultValue:[]}],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:e}]});a({method:OSF.DDA.AsyncMethodNames.RefreshAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[],onSucceeded:function(a){var b=a[OSF.DDA.SettingsManager.SerializedSettings],c=OSF.DDA.SettingsManager.deserializeSettings(b);return c}});a({method:OSF.DDA.AsyncMethodNames.SaveAsync,requiredArguments:[],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale,value:{types:[d],defaultValue:k}}],privateStateCallbacks:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:function(b,a){return OSF.DDA.SettingsManager.serializeSettings(a)}}]});a({method:OSF.DDA.AsyncMethodNames.AddHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(b,c,a){return a.supportsEvent(b)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:[o]}],supportedOptions:[],privateStateCallbacks:[]});a({method:OSF.DDA.AsyncMethodNames.RemoveHandlerAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(b,c,a){return a.supportsEvent(b)}}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Handler,value:{types:[o],defaultValue:null}}],privateStateCallbacks:[]});a({method:OSF.DDA.AsyncMethodNames.GetDocumentThemeAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[],onSucceeded:OSF.DDA.ConvertToDocumentTheme});a({method:OSF.DDA.AsyncMethodNames.GetOfficeThemeAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[],onSucceeded:OSF.DDA.ConvertToOfficeTheme});a({method:OSF.DDA.AsyncMethodNames.GetActiveViewAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[],onSucceeded:function(b){var a=b[Microsoft.Office.WebExtension.Parameters.ActiveView];return a==undefined?null:a}});a({method:OSF.DDA.AsyncMethodNames.AddDataPartAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Xml,types:[b]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:l});a({method:OSF.DDA.AsyncMethodNames.GetDataPartByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:[b]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:l});a({method:OSF.DDA.AsyncMethodNames.GetDataPartsByNameSpaceAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Namespace,types:[b]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:function(a){return OSF.OUtil.mapList(a[OSF.DDA.ListDescriptors.DataPartList],l)}});a({method:OSF.DDA.AsyncMethodNames.DeleteDataPartAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataPartProperties.Id,value:e}]});a({method:OSF.DDA.AsyncMethodNames.GetPartNodesAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.XPath,types:[b]}],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataPartProperties.Id,value:e}],onSucceeded:function(a){return OSF.OUtil.mapList(a[OSF.DDA.ListDescriptors.DataNodeList],n)}});a({method:OSF.DDA.AsyncMethodNames.GetPartXmlAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataPartProperties.Id,value:e}],onSucceeded:g});a({method:OSF.DDA.AsyncMethodNames.AddDataPartNamespaceAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Prefix,types:[b]},{name:Microsoft.Office.WebExtension.Parameters.Namespace,types:[b]}],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataPartProperties.Id,value:m}]});a({method:OSF.DDA.AsyncMethodNames.GetDataPartNamespaceAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Prefix,types:[b]}],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataPartProperties.Id,value:m}],onSucceeded:g});a({method:OSF.DDA.AsyncMethodNames.GetDataPartPrefixAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Namespace,types:[b]}],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataPartProperties.Id,value:m}],onSucceeded:g});a({method:OSF.DDA.AsyncMethodNames.GetRelativeNodesAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.XPath,types:[b]}],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataNodeProperties.Handle,value:h}],onSucceeded:function(a){return OSF.OUtil.mapList(a[OSF.DDA.ListDescriptors.DataNodeList],n)}});a({method:OSF.DDA.AsyncMethodNames.GetNodeValueAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataNodeProperties.Handle,value:h}],onSucceeded:g});a({method:OSF.DDA.AsyncMethodNames.GetNodeXmlAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataNodeProperties.Handle,value:h}],onSucceeded:g});a({method:OSF.DDA.AsyncMethodNames.SetNodeValueAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:[b]}],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataNodeProperties.Handle,value:h}]});a({method:OSF.DDA.AsyncMethodNames.SetNodeXmlAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Xml,types:[b]}],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataNodeProperties.Handle,value:h}]});a({method:OSF.DDA.AsyncMethodNames.GetNodeTextAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataNodeProperties.Handle,value:h}],onSucceeded:g});a({method:OSF.DDA.AsyncMethodNames.SetNodeTextAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Text,types:[b]}],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataNodeProperties.Handle,value:h}]});a({method:OSF.DDA.AsyncMethodNames.GetSelectedTask,onSucceeded:function(a){return a[Microsoft.Office.WebExtension.Parameters.TaskId]}});a({method:OSF.DDA.AsyncMethodNames.GetTask,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.TaskId,types:[b]}]});a({method:OSF.DDA.AsyncMethodNames.GetTaskField,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.TaskId,types:[b]},{name:Microsoft.Office.WebExtension.Parameters.FieldId,types:[c]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.GetRawValue,value:{types:[d],defaultValue:i}}]});a({method:OSF.DDA.AsyncMethodNames.GetResourceField,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.ResourceId,types:[b]},{name:Microsoft.Office.WebExtension.Parameters.FieldId,types:[c]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.GetRawValue,value:{types:[d],defaultValue:i}}]});a({method:OSF.DDA.AsyncMethodNames.GetProjectField,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.FieldId,types:[c]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.GetRawValue,value:{types:[d],defaultValue:i}}]});a({method:OSF.DDA.AsyncMethodNames.GetSelectedResource,onSucceeded:function(a){return a[Microsoft.Office.WebExtension.Parameters.ResourceId]}});a({method:OSF.DDA.AsyncMethodNames.GetWSSUrl});a({method:OSF.DDA.AsyncMethodNames.GetSelectedView});a({method:OSF.DDA.AsyncMethodNames.DisplayDialogAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Url,types:[b]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Width,value:{types:[c],defaultValue:99}},{name:Microsoft.Office.WebExtension.Parameters.Height,value:{types:[c],defaultValue:99}},{name:Microsoft.Office.WebExtension.Parameters.RequireHTTPs,value:{types:[d],defaultValue:k}},{name:Microsoft.Office.WebExtension.Parameters.XFrameDenySafe,value:{types:[d],defaultValue:k}}],privateStateCallbacks:[],onSucceeded:function(c){var f=c[Microsoft.Office.WebExtension.Parameters.Id],b=c[Microsoft.Office.WebExtension.Parameters.Data],a=new OSF.DialogHandler,d=OSF.DDA.AsyncMethodNames.CloseAsync.displayName;OSF.OUtil.defineEnumerableProperty(a,d,{value:function(){var c=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.CloseDialog];c(arguments,f,b,a)}});var e=OSF.DDA.SyncMethodNames.AddMessageHandler.displayName;OSF.OUtil.defineEnumerableProperty(a,e,{value:function(){var d=OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.AddMessageHandler.id],c=d.verifyAndExtractCall(arguments,a,b),e=c[Microsoft.Office.WebExtension.Parameters.EventType],f=c[Microsoft.Office.WebExtension.Parameters.Handler];return b.addEventHandlerAndFireQueuedEvent(e,f)}});return a},checkCallArgs:function(a){if(a[Microsoft.Office.WebExtension.Parameters.Width]<=0)a[Microsoft.Office.WebExtension.Parameters.Width]=1;if(a[Microsoft.Office.WebExtension.Parameters.Width]>100)a[Microsoft.Office.WebExtension.Parameters.Width]=99;if(a[Microsoft.Office.WebExtension.Parameters.Height]<=0)a[Microsoft.Office.WebExtension.Parameters.Height]=1;if(a[Microsoft.Office.WebExtension.Parameters.Height]>100)a[Microsoft.Office.WebExtension.Parameters.Height]=99;return a}});a({method:OSF.DDA.AsyncMethodNames.CloseAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[]})})();OSF.DDA.SyncMethodCalls={};OSF.DDA.SyncMethodCalls.define=function(a){OSF.DDA.SyncMethodCalls[a.method.id]=OSF.DDA.SyncMethodCallFactory.manufacture(a)};(function(){OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.MessageParent,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageToParent,types:["string","number","boolean"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.TargetOrigin,value:{types:["string"],defaultValue:""}}]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.AddMessageHandler,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(b,c,a){return a.supportsEvent(b)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[]})})();OSF.DDA.HostParameterMap=function(a,b){var i="fromHost",c=this,j="toHost",h=i,e="self",g={};g[Microsoft.Office.WebExtension.Parameters.Data]={toHost:function(a){if(a.rows!==undefined){var b={};b[OSF.DDA.TableDataProperties.TableRows]=a.rows;b[OSF.DDA.TableDataProperties.TableHeaders]=a.headers;a=b}return a},fromHost:function(a){return a}};function d(j,i){var m=j?{}:undefined;for(var f in j){var e=j[f],c;if(OSF.DDA.ListType.isListType(f)){c=[];for(var n in e)c.push(d(e[n],i))}else if(OSF.OUtil.listContainsKey(g,f))c=g[f][i](e);else if(i==h&&a.preserveNesting(f))c=d(e,i);else{var k=b[f];if(k){var l=k[i];if(l){c=l[e];if(c===undefined)c=e}}else c=e}m[f]=c}return m}function k(i,h){var f;for(var c in h){var d;if(a.isComplexType(c))d=k(i,b[c][j]);else d=i[c];if(d!=undefined){if(!f)f={};var g=h[c];if(g==e)g=c;f[g]=a.pack(c,d)}}return f}function f(k,j,g){if(!g)g={};for(var d in j){var l=j[d],c;if(l==e)c=k;else c=k[l];if(c===null||c===undefined)g[d]=undefined;else{c=a.unpack(d,c);var i;if(a.isComplexType(d)){i=b[d][h];if(a.preserveNesting(d))g[d]=f(c,i);else f(c,i,g)}else{if(OSF.DDA.ListType.isListType(d)){i={};var n=OSF.DDA.ListType.getDescriptor(d);i[n]=e;for(var m in c)c[m]=f(c[m],i)}g[d]=c}}}return g}function l(l,g,a){var e=b[l][a],c;if(a=="toHost"){var j=d(g,a);c=k(j,e)}else if(a==i){var h=f(g,e);c=d(h,a)}return c}if(!b)b={};c.setMapping=function(k,c){var a,d;if(c.map){a=c.map;d={};for(var f in a){var g=a[f];if(g==e)g=f;d[g]=f}}else{a=c.toHost;d=c.fromHost}var i=b[k]={};i[j]=a;i[h]=d};c.toHost=function(b,a){return l(b,a,j)};c.fromHost=function(a,b){return l(a,b,h)};c.self=e;c.dynamicTypes=g;c.mapValues=d;c.specialProcessorDynamicTypes=a.dynamicTypes};OSF.DDA.SpecialProcessor=function(c,b){var a=this;a.sharedComplexType=[OSF.DDA.EventDispId.dispidDialogMessageReceivedEvent,OSF.DDA.EventDescriptors.DialogMessageReceivedEvent];a.isComplexType=function(a){return OSF.OUtil.listContainsValue(this.sharedComplexType,a)||OSF.OUtil.listContainsValue(c,a)};a.isDynamicType=function(a){return OSF.OUtil.listContainsKey(b,a)};a.preserveNesting=function(b){var a=[OSF.DDA.PropertyDescriptors.Subset,OSF.DDA.DataNodeEventProperties.OldNode,OSF.DDA.DataNodeEventProperties.NewNode,OSF.DDA.DataNodeEventProperties.NextSiblingNode];return OSF.OUtil.listContainsValue(a,b)};a.pack=function(c,d){var a;if(this.isDynamicType(c))a=b[c].toHost(d);else a=d;return a};a.unpack=function(c,d){var a;if(this.isDynamicType(c))a=b[c].fromHost(d);else a=d;return a}};OSF.DDA.DispIdHost.Facade=function(d,e){var f=this,a={},b=OSF.DDA.AsyncMethodNames,c=OSF.DDA.MethodDispId;a[b.GoToByIdAsync.id]=c.dispidNavigateToMethod;a[b.GetSelectedDataAsync.id]=c.dispidGetSelectedDataMethod;a[b.SetSelectedDataAsync.id]=c.dispidSetSelectedDataMethod;a[b.GetDocumentCopyChunkAsync.id]=c.dispidGetDocumentCopyChunkMethod;a[b.ReleaseDocumentCopyAsync.id]=c.dispidReleaseDocumentCopyMethod;a[b.GetDocumentCopyAsync.id]=c.dispidGetDocumentCopyMethod;a[b.AddFromSelectionAsync.id]=c.dispidAddBindingFromSelectionMethod;a[b.AddFromPromptAsync.id]=c.dispidAddBindingFromPromptMethod;a[b.AddFromNamedItemAsync.id]=c.dispidAddBindingFromNamedItemMethod;a[b.GetAllAsync.id]=c.dispidGetAllBindingsMethod;a[b.GetByIdAsync.id]=c.dispidGetBindingMethod;a[b.ReleaseByIdAsync.id]=c.dispidReleaseBindingMethod;a[b.GetDataAsync.id]=c.dispidGetBindingDataMethod;a[b.SetDataAsync.id]=c.dispidSetBindingDataMethod;a[b.GetFilePropertiesAsync.id]=c.dispidGetFilePropertiesMethod;a[b.AddRowsAsync.id]=c.dispidAddRowsMethod;a[b.AddColumnsAsync.id]=c.dispidAddColumnsMethod;a[b.DeleteAllDataValuesAsync.id]=c.dispidClearAllRowsMethod;a[b.ClearFormatsAsync.id]=c.dispidClearFormatsMethod;a[b.RefreshAsync.id]=c.dispidLoadSettingsMethod;a[b.SaveAsync.id]=c.dispidSaveSettingsMethod;a[b.SetTableOptionsAsync.id]=c.dispidSetTableOptionsMethod;a[b.SetFormatsAsync.id]=c.dispidSetFormatsMethod;a[b.GetActiveViewAsync.id]=c.dispidGetActiveViewMethod;a[b.AppCommandInvocationCompletedAsync.id]=c.dispidAppCommandInvocationCompletedMethod;a[b.AddDataPartAsync.id]=c.dispidAddDataPartMethod;a[b.GetDataPartByIdAsync.id]=c.dispidGetDataPartByIdMethod;a[b.GetDataPartsByNameSpaceAsync.id]=c.dispidGetDataPartsByNamespaceMethod;a[b.GetPartXmlAsync.id]=c.dispidGetDataPartXmlMethod;a[b.GetPartNodesAsync.id]=c.dispidGetDataPartNodesMethod;a[b.DeleteDataPartAsync.id]=c.dispidDeleteDataPartMethod;a[b.GetNodeValueAsync.id]=c.dispidGetDataNodeValueMethod;a[b.GetNodeXmlAsync.id]=c.dispidGetDataNodeXmlMethod;a[b.GetRelativeNodesAsync.id]=c.dispidGetDataNodesMethod;a[b.SetNodeValueAsync.id]=c.dispidSetDataNodeValueMethod;a[b.SetNodeXmlAsync.id]=c.dispidSetDataNodeXmlMethod;a[b.AddDataPartNamespaceAsync.id]=c.dispidAddDataNamespaceMethod;a[b.GetDataPartNamespaceAsync.id]=c.dispidGetDataUriByPrefixMethod;a[b.GetDataPartPrefixAsync.id]=c.dispidGetDataPrefixByUriMethod;a[b.GetNodeTextAsync.id]=c.dispidGetDataNodeTextMethod;a[b.SetNodeTextAsync.id]=c.dispidSetDataNodeTextMethod;a[b.GetDocumentThemeAsync.id]=c.dispidGetDocumentThemeMethod;a[b.GetOfficeThemeAsync.id]=c.dispidGetOfficeThemeMethod;a[b.GetSelectedTask.id]=c.dispidGetSelectedTaskMethod;a[b.GetTask.id]=c.dispidGetTaskMethod;a[b.GetWSSUrl.id]=c.dispidGetWSSUrlMethod;a[b.GetTaskField.id]=c.dispidGetTaskFieldMethod;a[b.GetSelectedResource.id]=c.dispidGetSelectedResourceMethod;a[b.GetResourceField.id]=c.dispidGetResourceFieldMethod;a[b.GetProjectField.id]=c.dispidGetProjectFieldMethod;a[b.GetSelectedView.id]=c.dispidGetSelectedViewMethod;b=Microsoft.Office.WebExtension.EventType;c=OSF.DDA.EventDispId;a[b.SettingsChanged]=c.dispidSettingsChangedEvent;a[b.DocumentSelectionChanged]=c.dispidDocumentSelectionChangedEvent;a[b.BindingSelectionChanged]=c.dispidBindingSelectionChangedEvent;a[b.BindingDataChanged]=c.dispidBindingDataChangedEvent;a[b.ActiveViewChanged]=c.dispidActiveViewChangedEvent;a[b.DocumentThemeChanged]=c.dispidDocumentThemeChangedEvent;a[b.OfficeThemeChanged]=c.dispidOfficeThemeChangedEvent;a[b.DialogMessageReceived]=c.dispidDialogMessageReceivedEvent,a[b.AppCommandInvoked]=c.dispidAppCommandInvokedEvent;a[b.TaskSelectionChanged]=c.dispidTaskSelectionChangedEvent;a[b.ResourceSelectionChanged]=c.dispidResourceSelectionChangedEvent;a[b.ViewSelectionChanged]=c.dispidViewSelectionChangedEvent;a[b.DataNodeInserted]=c.dispidDataNodeAddedEvent;a[b.DataNodeReplaced]=c.dispidDataNodeReplacedEvent;a[b.DataNodeDeleted]=c.dispidDataNodeDeletedEvent;function g(a,c,d,b){if(typeof a=="number"){if(!b)b=c.getCallArgs(d);OSF.DDA.issueAsyncResult(b,a,OSF.DDA.ErrorCodeManager.getErrorArgs(a))}else throw a}f[OSF.DDA.DispIdHost.Methods.InvokeMethod]=function(o,j,k,m){var b;try{var h=o.id,c=OSF.DDA.AsyncMethodCalls[h];b=c.verifyAndExtractCall(j,k,m);var i=a[h],n=d(h),f;if(e.toHost)f=e.toHost(i,b);else f=b;n[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]({dispId:i,hostCallArgs:f,onCalling:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall)},onReceiving:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse)},onComplete:function(f,d){var a;if(f==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)if(e.fromHost)a=e.fromHost(i,d);else a=d;else a=d;var g=c.processResponse(f,a,k,b);OSF.DDA.issueAsyncResult(b,f,g)}})}catch(l){g(l,c,j,b)}};f[OSF.DDA.DispIdHost.Methods.AddEventHandler]=function(j,f,h){var c,b,l;function i(a){if(a==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess){var e=f.addEventHandler(b,l);if(!e)a=OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerAdditionFailed}var d;if(a!=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)d=OSF.DDA.ErrorCodeManager.getErrorArgs(a);OSF.DDA.issueAsyncResult(c,a,d)}try{var k=OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.AddHandlerAsync.id];c=k.verifyAndExtractCall(j,h,f);b=c[Microsoft.Office.WebExtension.Parameters.EventType];l=c[Microsoft.Office.WebExtension.Parameters.Handler];if(f.getEventHandlerCount(b)==0){var m=a[b],o=d(b)[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync];o({eventType:b,dispId:m,targetId:h.id||"",onCalling:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall)},onReceiving:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse)},onComplete:i,onEvent:function(a){var c=e.fromHost(m,a);f.fireEvent(OSF.DDA.OMFactory.manufactureEventArgs(b,h,c))}})}else i(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)}catch(n){g(n,k,j,c)}};f[OSF.DDA.DispIdHost.Methods.RemoveEventHandler]=function(j,c,l){var e,b,f;function i(a){var b;if(a!=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)b=OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist);OSF.DDA.issueAsyncResult(e,a,b)}try{var k=OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.RemoveHandlerAsync.id];e=k.verifyAndExtractCall(j,l,c);b=e[Microsoft.Office.WebExtension.Parameters.EventType];f=e[Microsoft.Office.WebExtension.Parameters.Handler];var h;if(f==null){c.clearEventHandlers(b);h=true}else if(!c.hasEventHandler(b,f))h=false;else h=c.removeEventHandler(b,f);if(c.getEventHandlerCount(b)==0){var o=a[b],n=d(b)[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync];n({eventType:b,dispId:o,targetId:l.id||"",onCalling:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall)},onReceiving:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse)},onComplete:i})}else i(h?OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess:Strings.OfficeOM.L_EventRegistrationError)}catch(m){g(m,k,j,e)}};f[OSF.DDA.DispIdHost.Methods.OpenDialog]=function(m,c,l){var f,b,h,k;function i(a){var d;if(a!=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)d=OSF.DDA.ErrorCodeManager.getErrorArgs(a);else{var b={};b[Microsoft.Office.WebExtension.Parameters.Id]=k;b[Microsoft.Office.WebExtension.Parameters.Data]=c;var d=j.processResponse(a,b,l,f)}OSF.DDA.issueAsyncResult(f,a,d)}try{b=Microsoft.Office.WebExtension.EventType.DialogMessageReceived;h=Microsoft.Office.WebExtension.EventType.DialogEventReceived;(b==undefined||h==undefined)&&i(OSF.DDA.ErrorCodeManager.ooeOperationNotSupported);if(OSF.DDA.AsyncMethodNames.DisplayDialogAsync==null){i(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError);return}var j=OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.DisplayDialogAsync.id];f=j.verifyAndExtractCall(m,l,c);c.clearEventHandlers(b);c.clearEventHandlers(h);var n=a[b],p=d(b)[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync];k=f[Microsoft.Office.WebExtension.Parameters.Url]+">"+f[Microsoft.Office.WebExtension.Parameters.Width]+">"+f[Microsoft.Office.WebExtension.Parameters.Height];p({eventType:b,dispId:n,targetId:k,onCalling:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall)},onReceiving:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse)},onComplete:i,onEvent:function(i){var g=e.fromHost(n,i),f=OSF.DDA.OMFactory.manufactureEventArgs(b,l,g);if(f.type==h){var d=OSF.DDA.ErrorCodeManager.getErrorArgs(f.error),a={};a[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]=status||OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError;a[OSF.DDA.AsyncResultEnum.ErrorProperties.Name]=d.name||d;a[OSF.DDA.AsyncResultEnum.ErrorProperties.Message]=d.message||d;f.error=new OSF.DDA.Error(a[OSF.DDA.AsyncResultEnum.ErrorProperties.Name],a[OSF.DDA.AsyncResultEnum.ErrorProperties.Message],a[OSF.DDA.AsyncResultEnum.ErrorProperties.Code])}c.fireOrQueueEvent(f);if(g[OSF.DDA.PropertyDescriptors.MessageType]==OSF.DialogMessageType.DialogClosed){c.clearEventHandlers(b);c.clearEventHandlers(h)}}})}catch(o){g(o,j,m,f)}};f[OSF.DDA.DispIdHost.Methods.CloseDialog]=function(f,m,c,o){var j,b,h,e=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess;function l(a){e=a}try{var i=OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.CloseAsync.id];j=i.verifyAndExtractCall(f,o,c);b=Microsoft.Office.WebExtension.EventType.DialogMessageReceived;h=Microsoft.Office.WebExtension.EventType.DialogEventReceived;c.clearEventHandlers(b);c.clearEventHandlers(h);var p=a[b],n=d(b)[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync];n({eventType:b,dispId:p,targetId:m,onCalling:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall)},onReceiving:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse)},onComplete:l})}catch(k){g(k,i,f,j)}if(e!=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)throw OSF.OUtil.formatString(Strings.OfficeOM.L_FunctionCallFailed,OSF.DDA.AsyncMethodNames.CloseAsync.displayName,e)};f[OSF.DDA.DispIdHost.Methods.MessageParent]=function(b,i){var e={},c=OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.MessageParent.id],f=c.verifyAndExtractCall(b,i,e),g=d(OSF.DDA.SyncMethodNames.MessageParent.id),h=g[OSF.DDA.DispIdHost.Delegates.MessageParent],j=a[OSF.DDA.SyncMethodNames.MessageParent.id];return h({dispId:j,hostCallArgs:f,onCalling:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall)},onReceiving:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse)}})}};OSF.DDA.DispIdHost.addAsyncMethods=function(a,b,e){for(var f in b){var c=b[f],d=c.displayName;!a[d]&&OSF.OUtil.defineEnumerableProperty(a,d,{value:function(b){return function(){var c=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.InvokeMethod];c(b,arguments,a,e)}}(c)})}};OSF.DDA.DispIdHost.addEventSupport=function(a,b){var d=OSF.DDA.AsyncMethodNames.AddHandlerAsync.displayName,c=OSF.DDA.AsyncMethodNames.RemoveHandlerAsync.displayName;!a[d]&&OSF.OUtil.defineEnumerableProperty(a,d,{value:function(){var c=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.AddEventHandler];c(arguments,b,a)}});!a[c]&&OSF.OUtil.defineEnumerableProperty(a,c,{value:function(){var c=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.RemoveEventHandler];c(arguments,b,a)}})};OSF.DDA.Context=function(a,f,g,c){var e="requirements",b=this;OSF.OUtil.defineEnumerableProperties(b,{contentLanguage:{value:a.get_dataLocale()},displayLanguage:{value:a.get_appUILocale()},host:{value:OfficeExt.HostName.Host.getInstance().getHost(a.get_appName())},platform:{value:OfficeExt.HostName.Host.getInstance().getPlatform(a.get_appName())},diagnostics:{value:OfficeExt.HostName.Host.getInstance().getDiagnostics(a.get_appName())}});g&&OSF.OUtil.defineEnumerableProperty(b,"license",{value:g});a.ui&&OSF.OUtil.defineEnumerableProperty(b,"ui",{value:a.ui});if(a.get_isDialog()){var d=OfficeExt.Requirement.RequirementsMatrixFactory.getDialogDefaultRequirementMatrix(a);OSF.OUtil.defineEnumerableProperty(b,e,{value:d})}else{f&&OSF.OUtil.defineEnumerableProperty(b,"document",{value:f});if(c){var h=c.displayName||"appOM";delete c.displayName;OSF.OUtil.defineEnumerableProperty(b,h,{value:c})}var d=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultRequirementMatrix(a);OSF.OUtil.defineEnumerableProperty(b,e,{value:d})}};OSF.DDA.OutlookContext=function(b,a,c,d){OSF.DDA.OutlookContext.uber.constructor.call(this,b,null,c,d);a&&OSF.OUtil.defineEnumerableProperty(this,"roamingSettings",{value:a})};OSF.OUtil.extend(OSF.DDA.OutlookContext,OSF.DDA.Context);OSF.OUtil.defineEnumerableProperty(Microsoft.Office.WebExtension,"context",{"get":function(){var a;if(OSF&&OSF._OfficeAppFactory)a=OSF._OfficeAppFactory.getContext();return a}});Microsoft.Office.WebExtension.useShortNamespace=function(a){if(a)OSF.NamespaceManager.enableShortcut();else OSF.NamespaceManager.disableShortcut()};Microsoft.Office.WebExtension.select=function(a,b){var c;if(a&&typeof a=="string"){var d=a.indexOf("#");if(d!=-1){var h=a.substring(0,d),g=a.substring(d+1);switch(h){case "binding":case "bindings":if(g)c=new OSF.DDA.BindingPromise(g)}}}if(!c){if(b){var e=typeof b;if(e=="function"){var f={};f[Microsoft.Office.WebExtension.Parameters.Callback]=b;OSF.DDA.issueAsyncResult(f,OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext,OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext))}else throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,e)}}else{c.onFail=b;return c}};OSF.DDA.BindingPromise=function(b,a){this._id=b;OSF.OUtil.defineEnumerableProperty(this,"onFail",{"get":function(){return a},"set":function(c){var b=typeof c;if(b!="undefined"&&b!="function")throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,b);a=c}})};OSF.DDA.BindingPromise.prototype={_fetch:function(b){var a=this;if(a.binding)b&&b(a.binding);else if(!a._binding){var c=a;Microsoft.Office.WebExtension.context.document.bindings.getByIdAsync(a._id,function(a){if(a.status==Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded){OSF.OUtil.defineEnumerableProperty(c,"binding",{value:a.value});b&&b(c.binding)}else c.onFail&&c.onFail(a)})}return a},getDataAsync:function(){var a=arguments;this._fetch(function(b){b.getDataAsync.apply(b,a)});return this},setDataAsync:function(){var a=arguments;this._fetch(function(b){b.setDataAsync.apply(b,a)});return this},addHandlerAsync:function(){var a=arguments;this._fetch(function(b){b.addHandlerAsync.apply(b,a)});return this},removeHandlerAsync:function(){var a=arguments;this._fetch(function(b){b.removeHandlerAsync.apply(b,a)});return this},setTableOptionsAsync:function(){var a=arguments;this._fetch(function(b){b.setTableOptionsAsync.apply(b,a)});return this},setFormatsAsync:function(){var a=arguments;this._fetch(function(b){b.setFormatsAsync.apply(b,a)});return this},clearFormatsAsync:function(){var a=arguments;this._fetch(function(b){b.clearFormatsAsync.apply(b,a)});return this}};OSF.DDA.License=function(a){OSF.OUtil.defineEnumerableProperty(this,"value",{value:a})};OSF.DDA.Settings=function(b){var a="name";b=b||{};OSF.OUtil.defineEnumerableProperties(this,{"get":{value:function(e){var d=Function._validateParams(arguments,[{name:a,type:String,mayBeNull:false}]);if(d)throw d;var c=b[e];return typeof c==="undefined"?null:c}},"set":{value:function(e,d){var c=Function._validateParams(arguments,[{name:a,type:String,mayBeNull:false},{name:"value",mayBeNull:true}]);if(c)throw c;b[e]=d}},remove:{value:function(d){var c=Function._validateParams(arguments,[{name:a,type:String,mayBeNull:false}]);if(c)throw c;delete b[d]}}});OSF.DDA.DispIdHost.addAsyncMethods(this,[OSF.DDA.AsyncMethodNames.SaveAsync],b)};OSF.DDA.RefreshableSettings=function(a){OSF.DDA.RefreshableSettings.uber.constructor.call(this,a);OSF.DDA.DispIdHost.addAsyncMethods(this,[OSF.DDA.AsyncMethodNames.RefreshAsync],a);OSF.DDA.DispIdHost.addEventSupport(this,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.SettingsChanged]))};OSF.OUtil.extend(OSF.DDA.RefreshableSettings,OSF.DDA.Settings);OSF.DDA.OutlookAppOm=function(){};OSF.DDA.Document=function(b,c){var a;switch(b.get_clientMode()){case OSF.ClientMode.ReadOnly:a=Microsoft.Office.WebExtension.DocumentMode.ReadOnly;break;case OSF.ClientMode.ReadWrite:a=Microsoft.Office.WebExtension.DocumentMode.ReadWrite}c&&OSF.OUtil.defineEnumerableProperty(this,"settings",{value:c});OSF.OUtil.defineMutableProperties(this,{mode:{value:a},url:{value:b.get_docUrl()}})};OSF.DDA.JsomDocument=function(c,d,e){var a=this;OSF.DDA.JsomDocument.uber.constructor.call(a,c,e);OSF.OUtil.defineEnumerableProperty(a,"bindings",{"get":function(){return d}});var b=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(a,[b.GetSelectedDataAsync,b.SetSelectedDataAsync]);OSF.DDA.DispIdHost.addEventSupport(a,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged]))};OSF.OUtil.extend(OSF.DDA.JsomDocument,OSF.DDA.Document);OSF.DDA.BindingFacade=function(b){this._eventDispatches=[];OSF.OUtil.defineEnumerableProperty(this,"document",{value:b});var a=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[a.AddFromSelectionAsync,a.AddFromNamedItemAsync,a.GetAllAsync,a.GetByIdAsync,a.ReleaseByIdAsync])};OSF.DDA.UnknownBinding=function(b,a){OSF.OUtil.defineEnumerableProperties(this,{document:{value:a},id:{value:b}})};OSF.DDA.Binding=function(a,c){OSF.OUtil.defineEnumerableProperties(this,{document:{value:c},id:{value:a}});var d=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[d.GetDataAsync,d.SetDataAsync]);var e=Microsoft.Office.WebExtension.EventType,b=c.bindings._eventDispatches;if(!b[a])b[a]=new OSF.EventDispatch([e.BindingSelectionChanged,e.BindingDataChanged]);var f=b[a];OSF.DDA.DispIdHost.addEventSupport(this,f)};OSF.DDA.TextBinding=function(b,a){OSF.DDA.TextBinding.uber.constructor.call(this,b,a);OSF.OUtil.defineEnumerableProperty(this,"type",{value:Microsoft.Office.WebExtension.BindingType.Text})};OSF.OUtil.extend(OSF.DDA.TextBinding,OSF.DDA.Binding);OSF.DDA.MatrixBinding=function(d,c,b,a){OSF.DDA.MatrixBinding.uber.constructor.call(this,d,c);OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.BindingType.Matrix},rowCount:{value:b?b:0},columnCount:{value:a?a:0}})};OSF.OUtil.extend(OSF.DDA.MatrixBinding,OSF.DDA.Binding);OSF.DDA.TableBinding=function(f,e,d,c,b){OSF.DDA.TableBinding.uber.constructor.call(this,f,e);OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.BindingType.Table},rowCount:{value:d?d:0},columnCount:{value:c?c:0},hasHeaders:{value:b?b:false}});var a=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[a.AddRowsAsync,a.AddColumnsAsync,a.DeleteAllDataValuesAsync])};OSF.OUtil.extend(OSF.DDA.TableBinding,OSF.DDA.Binding);Microsoft.Office.WebExtension.TableData=function(b,a){function c(a){if(a==null||a==undefined)return null;try{for(var b=OSF.DDA.DataCoercion.findArrayDimensionality(a,2);b<2;b++)a=[a];return a}catch(c){}}OSF.OUtil.defineEnumerableProperties(this,{headers:{"get":function(){return a},"set":function(b){a=c(b)}},rows:{"get":function(){return b},"set":function(a){b=a==null||OSF.OUtil.isArray(a)&&a.length==0?[]:c(a)}}});this.headers=a;this.rows=b};Microsoft.Office.WebExtension.FileProperties=function(a){OSF.OUtil.defineEnumerableProperties(this,{url:{value:a[OSF.DDA.FilePropertiesDescriptor.Url]}})};OSF.DDA.Error=function(c,a,b){OSF.OUtil.defineEnumerableProperties(this,{name:{value:c},message:{value:a},code:{value:b}})};OSF.DDA.AsyncResult=function(b,a){OSF.OUtil.defineEnumerableProperties(this,{value:{value:b[OSF.DDA.AsyncResultEnum.Properties.Value]},status:{value:a?Microsoft.Office.WebExtension.AsyncResultStatus.Failed:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded}});b[OSF.DDA.AsyncResultEnum.Properties.Context]&&OSF.OUtil.defineEnumerableProperty(this,"asyncContext",{value:b[OSF.DDA.AsyncResultEnum.Properties.Context]});a&&OSF.OUtil.defineEnumerableProperty(this,"error",{value:new OSF.DDA.Error(a[OSF.DDA.AsyncResultEnum.ErrorProperties.Name],a[OSF.DDA.AsyncResultEnum.ErrorProperties.Message],a[OSF.DDA.AsyncResultEnum.ErrorProperties.Code])})};OSF.DDA.DocumentSelectionChangedEventArgs=function(a){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged},document:{value:a}})};OSF.DDA.BindingSelectionChangedEventArgs=function(c,a){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.BindingSelectionChanged},binding:{value:c}});for(var b in a)OSF.OUtil.defineEnumerableProperty(this,b,{value:a[b]})};OSF.DDA.BindingDataChangedEventArgs=function(a){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.BindingDataChanged},binding:{value:a}})};OSF.DDA.SettingsChangedEventArgs=function(a){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.SettingsChanged},settings:{value:a}})};OSF.DDA.OfficeThemeChangedEventArgs=function(a){var b=OSF.DDA.ConvertToOfficeTheme(a);OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.Internal.EventType.OfficeThemeChanged},officeTheme:{value:b}})};OSF.DDA.DocumentThemeChangedEventArgs=function(a){var b=OSF.DDA.ConvertToDocumentTheme(a);OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.Internal.EventType.DocumentThemeChanged},documentTheme:{value:b}})};OSF.DDA.ActiveViewChangedEventArgs=function(a){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.ActiveViewChanged},activeView:{value:a.activeView}})};OSF.O15HostSpecificFileVersion={GetFallbackVersion:function(e){var a="15.02",d="15.01",c={"1":a,"2":a,"4":a,"8":"15.04","16":a,"128":a},b=c[e];if(b)return b;else return d},GenerateVersion:function(d,c){var a=2;return b(d,a)+"."+b(c,a);function b(b,c){b=b||0;c=c||0;for(var a=b.toString(),e=c-a.length,d=0;d<e;d++)a="0"+a;return a}}};var OfficeExt;(function(b){var a=function(){var a=true;function b(){}b.prototype.isMsAjaxLoaded=function(){var b="function",c="undefined";if(typeof Sys!==c&&typeof Type!==c&&Sys.StringBuilder&&typeof Sys.StringBuilder===b&&Type.registerNamespace&&typeof Type.registerNamespace===b&&Type.registerClass&&typeof Type.registerClass===b&&typeof Function._validateParams===b&&Sys.Serialization&&Sys.Serialization.JavaScriptSerializer&&typeof Sys.Serialization.JavaScriptSerializer.serialize===b)return a;else return false};b.prototype.loadMsAjaxFull=function(b){var a=(window.location.protocol.toLowerCase()==="https:"?"https:":"http:")+"//ajax.aspnetcdn.com/ajax/3.5/MicrosoftAjax.js";OSF.OUtil.loadScript(a,b)};Object.defineProperty(b.prototype,"msAjaxError",{"get":function(){var a=this;if(a._msAjaxError==null&&a.isMsAjaxLoaded())a._msAjaxError=Error;return a._msAjaxError},"set":function(a){this._msAjaxError=a},enumerable:a,configurable:a});Object.defineProperty(b.prototype,"msAjaxString",{"get":function(){var a=this;if(a._msAjaxString==null&&a.isMsAjaxLoaded())a._msAjaxString=String;return a._msAjaxString},"set":function(a){this._msAjaxString=a},enumerable:a,configurable:a});Object.defineProperty(b.prototype,"msAjaxDebug",{"get":function(){var a=this;if(a._msAjaxDebug==null&&a.isMsAjaxLoaded())a._msAjaxDebug=Sys.Debug;return a._msAjaxDebug},"set":function(a){this._msAjaxDebug=a},enumerable:a,configurable:a});return b}();b.MicrosoftAjaxFactory=a})(OfficeExt||(OfficeExt={}));var OsfMsAjaxFactory=new OfficeExt.MicrosoftAjaxFactory,OfficeExt;(function(g){var c="\n",d=true,a=null,b="undefined",j=function(){function c(){}c.isInstanceOfType=function(f,e){if(typeof e===b||e===a)return false;if(e instanceof f)return d;var c=e.constructor;if(!c||typeof c!=="function"||!c.__typeName||c.__typeName==="Object")c=Object;return !!(c===f)||c.__typeName&&f.__typeName&&c.__typeName===f.__typeName};return c}();g.MsAjaxTypeHelper=j;var h=function(){var e="Parameter name: {0}";function d(){}d.create=function(c,b){var a=new Error(c);a.message=c;if(b)for(var d in b)a[d]=b[d];a.popStackFrame();return a};d.parameterCount=function(a){var c="Sys.ParameterCountException: "+(a?a:"Parameter count mismatch."),b=d.create(c,{name:"Sys.ParameterCountException"});b.popStackFrame();return b};d.argument=function(a,g){var b="Sys.ArgumentException: "+(g?g:"Value does not fall within the expected range.");if(a)b+=c+f.format(e,a);var h=d.create(b,{name:"Sys.ArgumentException",paramName:a});h.popStackFrame();return h};d.argumentNull=function(a,g){var b="Sys.ArgumentNullException: "+(g?g:"Value cannot be null.");if(a)b+=c+f.format(e,a);var h=d.create(b,{name:"Sys.ArgumentNullException",paramName:a});h.popStackFrame();return h};d.argumentOutOfRange=function(i,g,j){var h="Sys.ArgumentOutOfRangeException: "+(j?j:"Specified argument was out of the range of valid values.");if(i)h+=c+f.format(e,i);if(typeof g!==b&&g!==a)h+=c+f.format("Actual value was {0}.",g);var k=d.create(h,{name:"Sys.ArgumentOutOfRangeException",paramName:i,actualValue:g});k.popStackFrame();return k};d.argumentType=function(h,g,b,i){var a="Sys.ArgumentTypeException: ";if(i)a+=i;else if(g&&b)a+=f.format("Object of type '{0}' cannot be converted to type '{1}'.",g.getName?g.getName():g,b.getName?b.getName():b);else a+="Object cannot be converted to the required type.";if(h)a+=c+f.format(e,h);var j=d.create(a,{name:"Sys.ArgumentTypeException",paramName:h,actualType:g,expectedType:b});j.popStackFrame();return j};d.argumentUndefined=function(a,g){var b="Sys.ArgumentUndefinedException: "+(g?g:"Value cannot be undefined.");if(a)b+=c+f.format(e,a);var h=d.create(b,{name:"Sys.ArgumentUndefinedException",paramName:a});h.popStackFrame();return h};d.invalidOperation=function(a){var c="Sys.InvalidOperationException: "+(a?a:"Operation is not valid due to the current state of the object."),b=d.create(c,{name:"Sys.InvalidOperationException"});b.popStackFrame();return b};return d}();g.MsAjaxError=h;var f=function(){function a(){}a.format=function(c){for(var b=[],a=1;a<arguments.length;a++)b[a-1]=arguments[a];var d=c;return d.replace(/{(\d+)}/gm,function(d,a){var c=parseInt(a,10);return b[c]===undefined?"{"+a+"}":b[c]})};a.startsWith=function(b,a){return b.substr(0,a.length)===a};return a}();g.MsAjaxString=f;var i=function(){function a(){}a.trace=function(a){typeof Debug!==b&&Debug.writeln&&Debug.writeln(a);window.console&&window.console.log&&window.console.log(a);window.opera&&window.opera.postError&&window.opera.postError(a);window.debugService&&window.debugService.trace&&window.debugService.trace(a);var d=document.getElementById("TraceConsole");if(d&&d.tagName.toUpperCase()==="TEXTAREA")d.innerHTML+=a+c};return a}();g.MsAjaxDebug=i;if(!OsfMsAjaxFactory.isMsAjaxLoaded()){var e=function(b,d,c){if(b.__typeName===undefined||b.__typeName===a)b.__typeName=d;if(b.__class===undefined||b.__class===a)b.__class=c};e(Function,"Function",d);e(Error,"Error",d);e(Object,"Object",d);e(String,"String",d);e(Boolean,"Boolean",d);e(Date,"Date",d);e(Number,"Number",d);e(RegExp,"RegExp",d);e(Array,"Array",d);if(!Function.createCallback)Function.createCallback=function(b,a){var c=Function._validateParams(arguments,[{name:"method",type:Function},{name:"context",mayBeNull:d}]);if(c)throw c;return function(){var e=arguments.length;if(e>0){for(var d=[],c=0;c<e;c++)d[c]=arguments[c];d[e]=a;return b.apply(this,d)}return b.call(this,a)}};if(!Function.createDelegate)Function.createDelegate=function(b,c){var a=Function._validateParams(arguments,[{name:"instance",mayBeNull:d},{name:"method",type:Function}]);if(a)throw a;return function(){return c.apply(b,arguments)}};if(!Function._validateParams)Function._validateParams=function(i,g,e){var c,f=g.length;e=e||typeof e===b;c=Function._validateParameterCount(i,g,e);if(c){c.popStackFrame();return c}for(var d=0,k=i.length;d<k;d++){var h=g[Math.min(d,f-1)],j=h.name;if(h.parameterArray)j+="["+(d-f+1)+"]";else if(!e&&d>=f)break;c=Function._validateParameter(i[d],h,j);if(c){c.popStackFrame();return c}}return a};if(!Function._validateParameterCount)Function._validateParameterCount=function(m,f,l){var b,e,c=f.length,g=m.length;if(g<c){var i=c;for(b=0;b<c;b++){var j=f[b];if(j.optional||j.parameterArray)i--}if(g<i)e=d}else if(l&&g>c){e=d;for(b=0;b<c;b++)if(f[b].parameterArray){e=false;break}}if(e){var k=h.parameterCount();k.popStackFrame();return k}return a};if(!Function._validateParameter)Function._validateParameter=function(e,c,j){var d,i=c.type,n=!!c.integer,m=!!c.domElement,o=!!c.mayBeNull;d=Function._validateParameterType(e,i,n,m,o,j);if(d){d.popStackFrame();return d}var g=c.elementType,h=!!c.elementMayBeNull;if(i===Array&&typeof e!==b&&e!==a&&(g||!h))for(var l=!!c.elementInteger,k=!!c.elementDomElement,f=0;f<e.length;f++){var p=e[f];d=Function._validateParameterType(p,g,l,k,h,j+"["+f+"]");if(d){d.popStackFrame();return d}}return a};if(!Function._validateParameterType)Function._validateParameterType=function(d,e,j,i,h,f){var c,k;if(typeof d===b)if(h)return a;else{c=g.MsAjaxError.argumentUndefined(f);c.popStackFrame();return c}if(d===a)if(h)return a;else{c=g.MsAjaxError.argumentNull(f);c.popStackFrame();return c}if(e&&!g.MsAjaxTypeHelper.isInstanceOfType(e,d)){c=g.MsAjaxError.argumentType(f,typeof d,e);c.popStackFrame();return c}return a};if(!window.Type)window.Type=Function;if(!Type.registerNamespace)Type.registerNamespace=function(d){for(var c=d.split("."),b=window,a=0;a<c.length;a++){b[c[a]]=b[c[a]]||{};b=b[c[a]]}};if(!Type.prototype.registerClass)Type.prototype.registerClass=function(a){a={}};typeof Sys===b&&Type.registerNamespace("Sys");if(!Error.prototype.popStackFrame)Error.prototype.popStackFrame=function(){var d=this;if(arguments.length!==0)throw h.parameterCount();if(typeof d.stack===b||d.stack===a||typeof d.fileName===b||d.fileName===a||typeof d.lineNumber===b||d.lineNumber===a)return;var e=d.stack.split(c),g=e[0],j=d.fileName+":"+d.lineNumber;while(typeof g!==b&&g!==a&&g.indexOf(j)===-1){e.shift();g=e[0]}var i=e[1];if(typeof i===b||i===a)return;var f=i.match(/@(.*):(\d+)$/);if(typeof f===b||f===a)return;d.fileName=f[1];d.lineNumber=parseInt(f[2]);e.shift();d.stack=e.join(c)};OsfMsAjaxFactory.msAjaxError=h;OsfMsAjaxFactory.msAjaxString=f;OsfMsAjaxFactory.msAjaxDebug=i}})(OfficeExt||(OfficeExt={}));var OSF=OSF||{};OSF.OUtil=function(){var e="on",h="configurable",g="writable",d="enumerable",f="undefined",c=true,b=null,a=false,k=-1,n="&_xdm_Info=",m="_xdm_",i="#",j={},p=3e4,l=a;function o(){return Math.floor(100000001*Math.random()).toString()}return {extend:function(b,a){var c=function(){};c.prototype=a.prototype;b.prototype=new c;b.prototype.constructor=b;b.uber=a.prototype;if(a.prototype.constructor===Object.prototype.constructor)a.prototype.constructor=a},setNamespace:function(b,a){if(a&&b&&!a[b])a[b]={}},unsetNamespace:function(b,a){if(a&&b&&a[b])delete a[b]},loadScript:function(f,g,h){if(f&&g){var l=window.document,d=j[f];if(!d){var e=l.createElement("script");e.type="text/javascript";d={loaded:a,pendingCallbacks:[g],timer:b};j[f]=d;var i=function(){if(d.timer!=b){clearTimeout(d.timer);delete d.timer}d.loaded=c;for(var e=d.pendingCallbacks.length,a=0;a<e;a++){var f=d.pendingCallbacks.shift();f()}},k=function(){delete j[f];if(d.timer!=b){clearTimeout(d.timer);delete d.timer}for(var c=d.pendingCallbacks.length,a=0;a<c;a++){var e=d.pendingCallbacks.shift();e()}};if(e.readyState)e.onreadystatechange=function(){if(e.readyState=="loaded"||e.readyState=="complete"){e.onreadystatechange=b;i()}};else e.onload=i;e.onerror=k;h=h||p;d.timer=setTimeout(k,h);e.src=f;l.getElementsByTagName("head")[0].appendChild(e)}else if(d.loaded)g();else d.pendingCallbacks.push(g)}},loadCSS:function(c){if(c){var b=window.document,a=b.createElement("link");a.type="text/css";a.rel="stylesheet";a.href=c;b.getElementsByTagName("head")[0].appendChild(a)}},parseEnum:function(b,c){var a=c[b.trim()];if(typeof a==f){OsfMsAjaxFactory.msAjaxDebug.trace("invalid enumeration string:"+b);throw OsfMsAjaxFactory.msAjaxError.argument("str")}return a},delayExecutionAndCache:function(){var a={calc:arguments[0]};return function(){if(a.calc){a.val=a.calc.apply(this,arguments);delete a.calc}return a.val}},getUniqueId:function(){k=k+1;return k.toString()},formatString:function(){var a=arguments,b=a[0];return b.replace(/{(\d+)}/gm,function(d,b){var c=parseInt(b,10)+1;return a[c]===undefined?"{"+b+"}":a[c]})},generateConversationId:function(){return [o(),o(),(new Date).getTime().toString()].join("_")},getFrameNameAndConversationId:function(b,c){var a=m+b+this.generateConversationId();c.setAttribute("name",a);return this.generateConversationId()},addXdmInfoAsHash:function(a,d){a=a.trim()||"";var b=a.split(i),c=b.shift(),e=b.join(i);return [c,i,e,n,d].join("")},parseXdmInfo:function(){var g=window.location.hash,d=g.split(n),a=d.length>1?d[d.length-1]:b;if(window.sessionStorage){var c=window.name.indexOf(m);if(c>-1){var e=window.name.indexOf(";",c);if(e==-1)e=window.name.length;var f=window.name.substring(c,e);if(a)window.sessionStorage.setItem(f,a);else a=window.sessionStorage.getItem(f)}}return a},getConversationId:function(){var c=window.location.search,a=b;if(c){var d=c.indexOf("&");a=d>0?c.substring(1,d):c.substr(1);if(a&&a.charAt(a.length-1)==="="){a=a.substring(0,a.length-1);if(a)a=decodeURIComponent(a)}}return a},validateParamObject:function(f,e){var b=Function._validateParams(arguments,[{name:"params",type:Object,mayBeNull:a},{name:"expectedProperties",type:Object,mayBeNull:a},{name:"callback",type:Function,mayBeNull:c}]);if(b)throw b;for(var d in e){b=Function._validateParameter(f[d],e[d],d);if(b)throw b}},writeProfilerMark:function(a){if(window.msWriteProfilerMark){window.msWriteProfilerMark(a);OsfMsAjaxFactory.msAjaxDebug.trace(a)}},defineNondefaultProperty:function(e,f,a,b){a=a||{};for(var g in b){var d=b[g];if(a[d]==undefined)a[d]=c}Object.defineProperty(e,f,a);return e},defineNondefaultProperties:function(c,a,d){a=a||{};for(var b in a)OSF.OUtil.defineNondefaultProperty(c,b,a[b],d);return c},defineEnumerableProperty:function(c,b,a){return OSF.OUtil.defineNondefaultProperty(c,b,a,[d])},defineEnumerableProperties:function(b,a){return OSF.OUtil.defineNondefaultProperties(b,a,[d])},defineMutableProperty:function(c,b,a){return OSF.OUtil.defineNondefaultProperty(c,b,a,[g,d,h])},defineMutableProperties:function(b,a){return OSF.OUtil.defineNondefaultProperties(b,a,[g,d,h])},finalizeProperties:function(e,d){d=d||{};for(var g=Object.getOwnPropertyNames(e),i=g.length,f=0;f<i;f++){var h=g[f],b=Object.getOwnPropertyDescriptor(e,h);if(!b.get&&!b.set)b.writable=d.writable||a;b.configurable=d.configurable||a;b.enumerable=d.enumerable||c;Object.defineProperty(e,h,b)}return e},mapList:function(a,c){var b=[];if(a)for(var d in a)b.push(c(a[d]));return b},listContainsKey:function(d,e){for(var b in d)if(e==b)return c;return a},listContainsValue:function(b,d){for(var e in b)if(d==b[e])return c;return a},augmentList:function(a,b){var d=a.push?function(c,b){a.push(b)}:function(c,b){a[c]=b};for(var c in b)d(c,b[c])},redefineList:function(a,b){for(var d in a)delete a[d];for(var c in b)a[c]=b[c]},isArray:function(a){return Object.prototype.toString.apply(a)==="[object Array]"},isFunction:function(a){return Object.prototype.toString.apply(a)==="[object Function]"},isDate:function(a){return Object.prototype.toString.apply(a)==="[object Date]"},addEventListener:function(b,c,d){if(b.attachEvent)b.attachEvent(e+c,d);else if(b.addEventListener)b.addEventListener(c,d,a);else b[e+c]=d},removeEventListener:function(c,d,f){if(c.detachEvent)c.detachEvent(e+d,f);else if(c.removeEventListener)c.removeEventListener(d,f,a);else c[e+d]=b},encodeBase64:function(c){var j="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",h=[],a=[],b=0,f,d,e,i=c.length;do{f=c[b++];d=c[b++];e=c[b++];a[0]=f>>2;a[1]=(f&3)<<4|d>>4;a[2]=(d&15)<<2|e>>6;a[3]=e&63;if(isNaN(d))a[2]=a[3]=64;else if(isNaN(e))a[3]=64;for(var g=0;g<4;g++)h.push(j.charAt(a[g]))}while(b<i);return h.join("")},getLocalStorage:function(){var a=b;if(!l)try{if(window.localStorage)a=window.localStorage}catch(d){l=c}return a},isEdge:function(){return window.navigator.userAgent.indexOf("Edge")>0},isIE:function(){return window.navigator.userAgent.indexOf("Trident")>0},parseUrl:function(c,e){if(typeof c===f||!c)return undefined;e=typeof e!==f?e:a;var h="NotHttps",i=this.isIE(),m=this.isEdge(),d={protocol:undefined,hostname:undefined,port:undefined};try{if(i)throw"Browser doesn't support new URL library";else if(m)throw"Browser has inconsistent URL library";var g=new URL(c);if(g){d.protocol=g.protocol;d.hostname=g.hostname;d.port=g.port;if(e&&g.protocol!="https:")throw new Error(h)}}catch(j){if(j.message===h)throw j;var b=document.createElement("a");b.href=c;if((b.pathname==""||b.pathname=="/")&&!(c.substring(c.length-1,c.length)==="/"))c+="/";if(e&&b.protocol!="https:")throw new Error(h);var k=b.protocol+"//"+b.hostname+(i?"/":"")+b.pathname+b.search+b.hash,l=b.protocol+"//"+b.host+(i?"/":"")+b.pathname+b.search+b.hash;if(c==k||c==l){d.protocol=b.protocol;d.hostname=b.hostname;d.port=b.port}}return d},splitStringToList:function(j,h){for(var e=a,i=-1,g=[],f=a,d=h+j,b=0;b<d.length;b++)if(d[b]=="\\"&&!e)e=c;else{if(d[b]==h&&!f){g.push("");i++}else if(d[b]=='"'&&!e)f=!f;else g[i]+=d[b];e=a}return g},convertIntToHex:function(b){var a="#"+(Number(b)+16777216).toString(16).slice(-6);return a}}}();OSF.OUtil.Guid=function(){var a=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];return {generateNewGuid:function(){for(var c="",d=(new Date).getTime(),b=0;b<32&&d>0;b++){if(b==8||b==12||b==16||b==20)c+="-";c+=a[d%16];d=Math.floor(d/16)}for(;b<32;b++){if(b==8||b==12||b==16||b==20)c+="-";c+=a[Math.floor(Math.random()*16)]}return c}}}();window.OSF=OSF;AriaLogger=function(){var k="ResponseTime",e="double",c=false,b="int64",a="string",d=true,f=null,g,m={name:"AppActivated",enabled:d,basic:d,critical:d,points:[{name:"Browser",type:a},{name:"Message",type:a},{name:"AppURL",type:a},{name:"Host",type:a},{name:"AppSizeWidth",type:b},{name:"AppSizeHeight",type:b},{name:"IsFromWacAutomation",type:a}]},n={name:"ScriptLoad",enabled:d,basic:c,critical:c,points:[{name:"ScriptId",type:a},{name:"StartTime",type:e},{name:k,type:e}]},r={name:"APIUsage",enabled:c,basic:c,critical:c,points:[{name:"APIType",type:a},{name:"APIID",type:b},{name:"Parameters",type:a},{name:k,type:b},{name:"ErrorType",type:b}]},l={name:"AppInitialization",enabled:d,basic:c,critical:c,points:[{name:"SuccessCode",type:b},{name:"Message",type:a}]},o={name:"AppClosed",enabled:d,basic:c,critical:c,points:[{name:"FocusTime",type:b},{name:"AppSizeFinalWidth",type:b},{name:"AppSizeFinalHeight",type:b},{name:"OpenTime",type:b}]},j=[m,n,r,l,o];function t(c,f){var g=f.rename===undefined?f.name:f.rename,h=f.type,d=undefined;switch(h){case a:d=oteljs.makeStringDataField(g,c);break;case e:if(typeof c===a)c=parseFloat(c);d=oteljs.makeDoubleDataField(g,c);break;case b:if(typeof c===a)c=parseInt(c);d=oteljs.makeInt64DataField(g,c);break;case "boolean":if(typeof c===a)c=c==="true";d=oteljs.makeBooleanDataField(g,c)}return d}function i(c){for(var a=0;a<j.length;a++){var b=j[a];if(b.name===c)return b}return undefined}function w(b){var a=i(b);if(a===undefined)return c;return a.enabled}function p(e,l){var a=i(e);if(a===undefined)return undefined;for(var d=[],c=0,j=a.points;c<j.length;c++){var g=j[c],n=g.name,h=l[n];if(h===undefined)continue;var f=t(h,g);f!==undefined&&d.push(f)}var b={dataCategories:oteljs.DataCategories.ProductServiceUsage};if(a.critical)b.samplingPolicy=oteljs.SamplingPolicy.CriticalBusinessImpact;if(a.basic)b.diagnosticLevel=oteljs.DiagnosticLevel.BasicEvent;var k="Office.Extensibility.OfficeJs."+e+"X",m={eventName:k,dataFields:d,eventFlags:b};return m}function q(a,b){if(w(a))typeof OTel!=="undefined"&&OTel.OTelLogger.onTelemetryLoaded(function(){var c=p(a,b);if(c===undefined)return;Microsoft.Office.WebExtension.sendTelemetryEvent(c)})}function v(a){return a["Fields"]!==undefined}function u(b,c){var d,a;b=b.toLowerCase();c=c.toLowerCase();a=b.indexOf(c);if(a>=0&&a===b.length-c.length&&(a===0||b.charAt(a-1)==="/"||b.charAt(a-1)==="\\"))d=b.substring(0,a);return d}function x(){if(f)return f;else{for(var d=document.getElementsByTagName("script")||[],h=d.length,e=["office.js","office.debug.js"],g=e.length,c,a,b=0;!a&&b<h;b++)if(d[b].src)for(c=0;!a&&c<g;c++)a=u(d[b].src,e[c]);f=a;return f}}function s(){return x()+"ariatelemetry/aria-web-telemetry.js"}function h(b,a){var c=1e3;AriaLogger.EnableSendingTelemetryWithLegacyAria&&OSF.OUtil.loadScript(s(),function(){try{if(!g){var e="db334b301e7b474db5e0f02f07c51a47-a1b5bc36-1bbe-482f-a64a-c2d9cb606706-7439";g=AWTLogManager.initialize(e)}var c=new AWTEventProperties;c.setName("Office.Extensibility.OfficeJS."+b);for(var d in a)d.toLowerCase()!=="table"&&c.setProperty(d,a[d]);var f=new Date;c.setProperty("Date",f.toISOString());g.logEvent(c)}catch(h){}},c);AriaLogger.EnableSendingTelemetryWithOTel&&q(b,a)}return {logData:function(a){if(v(a))h(a["Table"],a["Fields"]);else h(a["Table"],a)},EnableSendingTelemetryWithLegacyAria:c,EnableSendingTelemetryWithOTel:d}}();var __extends=this.__extends||function(b,c){function a(){this.constructor=b}a.prototype=c.prototype;b.prototype=new a},OSFLog;(function(f){var d="ResponseTime",c="SessionId",b="CorrelationId",a=true,e=function(){function b(a){this._table=a;this._fields={}}Object.defineProperty(b.prototype,"Fields",{"get":function(){return this._fields},enumerable:a,configurable:a});Object.defineProperty(b.prototype,"Table",{"get":function(){return this._table},enumerable:a,configurable:a});b.prototype.SerializeFields=function(){};b.prototype.SetSerializedField=function(b,a){if(typeof a!=="undefined"&&a!==null)this._serializedFields[b]=a.toString()};b.prototype.SerializeRow=function(){var a=this;a._serializedFields={};a.SetSerializedField("Table",a._table);a.SerializeFields();return JSON.stringify(a._serializedFields)};return b}();f.BaseUsageData=e;var h=function(q){var p="DocUrl",o="AppSizeHeight",n="AppSizeWidth",m="ClientId",l="HostVersion",k="Host",j="UserId",i="Browser",h="AssetId",g="AppURL",f="AppInstanceId",e="AppId";__extends(d,q);function d(){q.call(this,"AppActivated")}Object.defineProperty(d.prototype,b,{"get":function(){return this.Fields[b]},"set":function(a){this.Fields[b]=a},enumerable:a,configurable:a});Object.defineProperty(d.prototype,c,{"get":function(){return this.Fields[c]},"set":function(a){this.Fields[c]=a},enumerable:a,configurable:a});Object.defineProperty(d.prototype,e,{"get":function(){return this.Fields[e]},"set":function(a){this.Fields[e]=a},enumerable:a,configurable:a});Object.defineProperty(d.prototype,f,{"get":function(){return this.Fields[f]},"set":function(a){this.Fields[f]=a},enumerable:a,configurable:a});Object.defineProperty(d.prototype,g,{"get":function(){return this.Fields[g]},"set":function(a){this.Fields[g]=a},enumerable:a,configurable:a});Object.defineProperty(d.prototype,h,{"get":function(){return this.Fields[h]},"set":function(a){this.Fields[h]=a},enumerable:a,configurable:a});Object.defineProperty(d.prototype,i,{"get":function(){return this.Fields[i]},"set":function(a){this.Fields[i]=a},enumerable:a,configurable:a});Object.defineProperty(d.prototype,j,{"get":function(){return this.Fields[j]},"set":function(a){this.Fields[j]=a},enumerable:a,configurable:a});Object.defineProperty(d.prototype,k,{"get":function(){return this.Fields[k]},"set":function(a){this.Fields[k]=a},enumerable:a,configurable:a});Object.defineProperty(d.prototype,l,{"get":function(){return this.Fields[l]},"set":function(a){this.Fields[l]=a},enumerable:a,configurable:a});Object.defineProperty(d.prototype,m,{"get":function(){return this.Fields[m]},"set":function(a){this.Fields[m]=a},enumerable:a,configurable:a});Object.defineProperty(d.prototype,n,{"get":function(){return this.Fields[n]},"set":function(a){this.Fields[n]=a},enumerable:a,configurable:a});Object.defineProperty(d.prototype,o,{"get":function(){return this.Fields[o]},"set":function(a){this.Fields[o]=a},enumerable:a,configurable:a});Object.defineProperty(d.prototype,p,{"get":function(){return this.Fields[p]},"set":function(a){this.Fields[p]=a},enumerable:a,configurable:a});d.prototype.SerializeFields=function(){var a=this;a.SetSerializedField(b,a.CorrelationId);a.SetSerializedField(c,a.SessionId);a.SetSerializedField(e,a.AppId);a.SetSerializedField(f,a.AppInstanceId);a.SetSerializedField(g,a.AppURL);a.SetSerializedField(h,a.AssetId);a.SetSerializedField(i,a.Browser);a.SetSerializedField(j,a.UserId);a.SetSerializedField(k,a.Host);a.SetSerializedField(l,a.HostVersion);a.SetSerializedField(m,a.ClientId);a.SetSerializedField(n,a.AppSizeWidth);a.SetSerializedField(o,a.AppSizeHeight);a.SetSerializedField(p,a.DocUrl)};return d}(e);f.AppActivatedUsageData=h;var i=function(h){var f="StartTime",e="ScriptId";__extends(g,h);function g(){h.call(this,"ScriptLoad")}Object.defineProperty(g.prototype,b,{"get":function(){return this.Fields[b]},"set":function(a){this.Fields[b]=a},enumerable:a,configurable:a});Object.defineProperty(g.prototype,c,{"get":function(){return this.Fields[c]},"set":function(a){this.Fields[c]=a},enumerable:a,configurable:a});Object.defineProperty(g.prototype,e,{"get":function(){return this.Fields[e]},"set":function(a){this.Fields[e]=a},enumerable:a,configurable:a});Object.defineProperty(g.prototype,f,{"get":function(){return this.Fields[f]},"set":function(a){this.Fields[f]=a},enumerable:a,configurable:a});Object.defineProperty(g.prototype,d,{"get":function(){return this.Fields[d]},"set":function(a){this.Fields[d]=a},enumerable:a,configurable:a});g.prototype.SerializeFields=function(){var a=this;a.SetSerializedField(b,a.CorrelationId);a.SetSerializedField(c,a.SessionId);a.SetSerializedField(e,a.ScriptId);a.SetSerializedField(f,a.StartTime);a.SetSerializedField(d,a.ResponseTime)};return g}(e);f.ScriptLoadUsageData=i;var j=function(j){var h="CloseMethod",g="OpenTime",f="AppSizeFinalHeight",e="AppSizeFinalWidth",d="FocusTime";__extends(i,j);function i(){j.call(this,"AppClosed")}Object.defineProperty(i.prototype,b,{"get":function(){return this.Fields[b]},"set":function(a){this.Fields[b]=a},enumerable:a,configurable:a});Object.defineProperty(i.prototype,c,{"get":function(){return this.Fields[c]},"set":function(a){this.Fields[c]=a},enumerable:a,configurable:a});Object.defineProperty(i.prototype,d,{"get":function(){return this.Fields[d]},"set":function(a){this.Fields[d]=a},enumerable:a,configurable:a});Object.defineProperty(i.prototype,e,{"get":function(){return this.Fields[e]},"set":function(a){this.Fields[e]=a},enumerable:a,configurable:a});Object.defineProperty(i.prototype,f,{"get":function(){return this.Fields[f]},"set":function(a){this.Fields[f]=a},enumerable:a,configurable:a});Object.defineProperty(i.prototype,g,{"get":function(){return this.Fields[g]},"set":function(a){this.Fields[g]=a},enumerable:a,configurable:a});Object.defineProperty(i.prototype,h,{"get":function(){return this.Fields[h]},"set":function(a){this.Fields[h]=a},enumerable:a,configurable:a});i.prototype.SerializeFields=function(){var a=this;a.SetSerializedField(b,a.CorrelationId);a.SetSerializedField(c,a.SessionId);a.SetSerializedField(d,a.FocusTime);a.SetSerializedField(e,a.AppSizeFinalWidth);a.SetSerializedField(f,a.AppSizeFinalHeight);a.SetSerializedField(g,a.OpenTime);a.SetSerializedField(h,a.CloseMethod)};return i}(e);f.AppClosedUsageData=j;var k=function(j){var h="ErrorType",g="Parameters",f="APIID",e="APIType";__extends(i,j);function i(){j.call(this,"APIUsage")}Object.defineProperty(i.prototype,b,{"get":function(){return this.Fields[b]},"set":function(a){this.Fields[b]=a},enumerable:a,configurable:a});Object.defineProperty(i.prototype,c,{"get":function(){return this.Fields[c]},"set":function(a){this.Fields[c]=a},enumerable:a,configurable:a});Object.defineProperty(i.prototype,e,{"get":function(){return this.Fields[e]},"set":function(a){this.Fields[e]=a},enumerable:a,configurable:a});Object.defineProperty(i.prototype,f,{"get":function(){return this.Fields[f]},"set":function(a){this.Fields[f]=a},enumerable:a,configurable:a});Object.defineProperty(i.prototype,g,{"get":function(){return this.Fields[g]},"set":function(a){this.Fields[g]=a},enumerable:a,configurable:a});Object.defineProperty(i.prototype,d,{"get":function(){return this.Fields[d]},"set":function(a){this.Fields[d]=a},enumerable:a,configurable:a});Object.defineProperty(i.prototype,h,{"get":function(){return this.Fields[h]},"set":function(a){this.Fields[h]=a},enumerable:a,configurable:a});i.prototype.SerializeFields=function(){var a=this;a.SetSerializedField(b,a.CorrelationId);a.SetSerializedField(c,a.SessionId);a.SetSerializedField(e,a.APIType);a.SetSerializedField(f,a.APIID);a.SetSerializedField(g,a.Parameters);a.SetSerializedField(d,a.ResponseTime);a.SetSerializedField(h,a.ErrorType)};return i}(e);f.APIUsageUsageData=k;var g=function(g){var e="Message",d="SuccessCode";__extends(f,g);function f(){g.call(this,"AppInitialization")}Object.defineProperty(f.prototype,b,{"get":function(){return this.Fields[b]},"set":function(a){this.Fields[b]=a},enumerable:a,configurable:a});Object.defineProperty(f.prototype,c,{"get":function(){return this.Fields[c]},"set":function(a){this.Fields[c]=a},enumerable:a,configurable:a});Object.defineProperty(f.prototype,d,{"get":function(){return this.Fields[d]},"set":function(a){this.Fields[d]=a},enumerable:a,configurable:a});Object.defineProperty(f.prototype,e,{"get":function(){return this.Fields[e]},"set":function(a){this.Fields[e]=a},enumerable:a,configurable:a});f.prototype.SerializeFields=function(){var a=this;a.SetSerializedField(b,a.CorrelationId);a.SetSerializedField(c,a.SessionId);a.SetSerializedField(d,a.SuccessCode);a.SetSerializedField(e,a.Message)};return f}(e);f.AppInitializationUsageData=g})(OSFLog||(OSFLog={}));var Logger;(function(a){"use strict";(function(a){a[a["info"]=0]="info";a[a["warning"]=1]="warning";a[a["error"]=2]="error"})(a.TraceLevel||(a.TraceLevel={}));var f=a.TraceLevel;(function(a){a[a["none"]=0]="none";a[a["flush"]=1]="flush"})(a.SendFlag||(a.SendFlag={}));var g=a.SendFlag;function b(){OSF.Logger&&OSF.Logger.ulsEndpoint&&OSF.Logger.ulsEndpoint.loadProxyFrame()}a.allowUploadingData=b;function e(a,c,d){if(OSF.Logger&&OSF.Logger.ulsEndpoint){var b={traceLevel:a,message:c,flag:d,internalLog:true},e=JSON.stringify(b);OSF.Logger.ulsEndpoint.writeLog(e)}}a.sendLog=e;function c(){try{return new d}catch(a){return null}}var d=function(){function a(){var a=this,b=a;a.proxyFrame=null;a.telemetryEndPoint="https://telemetryservice.firstpartyapps.oaspapps.com/telemetryservice/telemetryproxy.html";a.buffer=[];a.proxyFrameReady=false;OSF.OUtil.addEventListener(window,"message",function(a){return b.tellProxyFrameReady(a)});setTimeout(function(){b.loadProxyFrame()},3e3)}a.prototype.writeLog=function(b){var a=this;if(a.proxyFrameReady===true)a.proxyFrame.contentWindow.postMessage(b,"*");else a.buffer.length<128&&a.buffer.push(b)};a.prototype.loadProxyFrame=function(){var a=this;if(a.proxyFrame==null){a.proxyFrame=document.createElement("iframe");a.proxyFrame.setAttribute("style","display:none");a.proxyFrame.setAttribute("src",a.telemetryEndPoint);document.head.appendChild(a.proxyFrame)}};a.prototype.tellProxyFrameReady=function(c){var a=this,f=a;if(c.data==="ProxyFrameReadyToLog"){a.proxyFrameReady=true;for(var b=0;b<a.buffer.length;b++)a.writeLog(a.buffer[b]);a.buffer.length=0;OSF.OUtil.removeEventListener(window,"message",function(a){return f.tellProxyFrameReady(a)})}else if(c.data==="ProxyFrameReadyToInit"){var d={appName:"Office APPs",sessionId:OSF.OUtil.Guid.generateNewGuid()},e=JSON.stringify(d);a.proxyFrame.contentWindow.postMessage(e,"*")}};return a}();if(!OSF.Logger)OSF.Logger=a;a.ulsEndpoint=c()})(Logger||(Logger={}));var OSFAppTelemetry;(function(d){var b=null,e=true,c="";"use strict";var a,f=OSF.OUtil.Guid.generateNewGuid(),i=c;d.enableTelemetry=e;var y=function(){function a(){}return a}(),g=function(){function a(b,a){this.name=b;this.handler=a}return a}(),k=function(){function a(){this.clientIDKey="Office API client";this.logIdSetKey="Office App Log Id Set"}a.prototype.getClientId=function(){var b=this,a=b.getValue(b.clientIDKey);if(!a||a.length<=0||a.length>40){a=OSF.OUtil.Guid.generateNewGuid();b.setValue(b.clientIDKey,a)}return a};a.prototype.saveLog=function(d,e){var b=this,a=b.getValue(b.logIdSetKey);a=(a&&a.length>0?a+";":c)+d;b.setValue(b.logIdSetKey,a);b.setValue(d,e)};a.prototype.enumerateLog=function(c,e){var a=this,d=a.getValue(a.logIdSetKey);if(d){var f=d.split(";");for(var h in f){var b=f[h],g=a.getValue(b);if(g){c&&c(b,g);e&&a.remove(b)}}e&&a.remove(a.logIdSetKey)}};a.prototype.getValue=function(d){var a=OSF.OUtil.getLocalStorage(),b=c;if(a)b=a.getItem(d);return b};a.prototype.setValue=function(c,b){var a=OSF.OUtil.getLocalStorage();a&&a.setItem(c,b)};a.prototype.remove=function(b){var a=OSF.OUtil.getLocalStorage();if(a)try{a.removeItem(b)}catch(c){}};return a}(),h=function(){function a(){}a.prototype.LogData=function(a){if(!OSF.Logger)return;try{AriaLogger.logData(a)}catch(b){}};a.prototype.LogRawData=function(a){if(!OSF.Logger)return;try{AriaLogger.logData(JSON.parse(a))}catch(b){}};return a}(),x=function(){function a(){}a.hashString=function(c){var a=0;if(c.length===0)return a;for(var b=0;b<c.length;b++){var d=c.charCodeAt(b);a=(a<<5)-a+d;a|=0}return a};a.stringToHash=function(d){var c=a.hashString(d),b=c.toString();if(c<0)b="1"+b.substring(1);else b="0"+b;return b};a.startsWith=function(b,a){return b.indexOf(a)==0};a.isFileUrl=function(b){return a.startsWith(b.toLowerCase(),"file:")};a.removeHttpPrefix=function(d){var b=c;if(a.startsWith(d.toLowerCase(),a.httpsPrefix))b=a.httpsPrefix;else if(a.startsWith(d.toLowerCase(),a.httpPrefix))b=a.httpPrefix;var e=d.slice(b.length);return e};a.getUrlDomain=function(c){var b=a.removeHttpPrefix(c);b=b.split("/")[0];b=b.split(":")[0];return b};a.isIp4Address=function(b){var a=/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/;return a.test(b)};a.filter=function(d){if(a.isFileUrl(d)){var c=a.stringToHash(d);return "file://"+c}var b=a.getUrlDomain(d);if(a.isIp4Address(b)){var c=a.stringToHash(d);if(a.startsWith(b,"10."))return "IP10Range_"+c;else if(a.startsWith(b,"192."))return "IP192Range_"+c;else if(a.startsWith(b,"127."))return "IP127Range_"+c;return "IPOther_"+c}return b};a.httpPrefix="http://";a.httpsPrefix="https://";return a}();function v(h){if(!OSF.Logger)return;if(a)return;a=new y;a.sessionId=f;a.hostVersion=h.get_appVersion();a.appId=h.get_id();a.host=h.get_appName();a.browser=window.navigator.userAgent;a.correlationId=h.get_correlationId();if(a.correlationId)a.correlationId=a.correlationId.replace(/[{}]/g,c).toLowerCase();a.clientId=(new k).getClientId();a.appInstanceId=h.get_appInstanceId();if(a.appInstanceId)a.appInstanceId=a.appInstanceId.replace(/[{}]/g,c).toLowerCase();var m=new RegExp("^https?://store\\.office(ppe|-int)?\\.com/","i"),l=h.get_docUrl();a.docUrl=m.test(l)?l:c;var j=location.href;if(j)j=j.split("?")[0].split("#")[0];a.appURL=x.filter(j);(function(g,a){var e,f,d;a.assetId=c;a.userId=c;try{e=decodeURIComponent(g);f=new DOMParser;d=f.parseFromString(e,"text/xml");a.userId=d.getElementsByTagName("t")[0].attributes.getNamedItem("cid").nodeValue;a.assetId=d.getElementsByTagName("t")[0].attributes.getNamedItem("aid").nodeValue}catch(h){}finally{e=b;d=b;f=b}})(h.get_eToken(),a);if(typeof OTel!=="undefined"){var n=OfficeExt.HostName.Host.getInstance().getHost(a.host),i=OfficeExt.HostName.Host.getInstance().getPlatform(a.host);OTel.OTelLogger.getHost=function(){return n};OTel.OTelLogger.getFlavor=function(){if(i===Microsoft.Office.WebExtension.PlatformType.PC)i="Win32";else if(i===Microsoft.Office.WebExtension.PlatformType.OfficeOnline)i="Web";return i};OTel.OTelLogger.initialize(a)}(function(){var l=new Date,c=b,i=0,k=false,f=function(){if(document.hasFocus()){if(c==b)c=new Date}else if(c){i+=Math.abs((new Date).getTime()-c.getTime());c=b}},a=[];a.push(new g("focus",f));a.push(new g("blur",f));a.push(new g("focusout",f));a.push(new g("focusin",f));var j=function(){for(var f=0;f<a.length;f++)OSF.OUtil.removeEventListener(window,a[f].name,a[f].handler);a.length=0;if(!k){if(document.hasFocus()&&c){i+=Math.abs((new Date).getTime()-c.getTime());c=b}d.onAppClosed(Math.abs((new Date).getTime()-l.getTime()),i);k=e}};a.push(new g("beforeunload",j));a.push(new g("unload",j));for(var h=0;h<a.length;h++)OSF.OUtil.addEventListener(window,a[h].name,a[h].handler);f()})();d.onAppActivated()}d.initialize=v;function o(){if(!a)return;(new k).enumerateLog(function(b,a){return (new h).LogRawData(a)},e);var b=new OSFLog.AppActivatedUsageData;b.SessionId=f;b.AppId=a.appId;b.AssetId=a.assetId;b.AppURL=a.appURL;b.UserId=a.userId;b.ClientId=a.clientId;b.Browser=a.browser;b.Host=a.host;b.HostVersion=a.hostVersion;b.CorrelationId=a.correlationId;b.AppSizeWidth=window.innerWidth;b.AppSizeHeight=window.innerHeight;b.AppInstanceId=a.appInstanceId;b.DocUrl=a.docUrl;(new h).LogData(b);setTimeout(function(){if(!OSF.Logger)return;OSF.Logger.allowUploadingData()},100)}d.onAppActivated=o;function s(e,d,c,b){var a=new OSFLog.ScriptLoadUsageData;a.CorrelationId=b;a.SessionId=f;a.ScriptId=e;a.StartTime=d;a.ResponseTime=c;(new h).LogData(a)}d.onScriptDone=s;function w(g,j,d,c,e){if(!a)return;var b=new OSFLog.APIUsageUsageData;b.CorrelationId=i;b.SessionId=f;b.APIType=g;b.APIID=j;b.Parameters=d;b.ResponseTime=c;b.ErrorType=e;(new h).LogData(b)}d.onCallDone=w;function r(h,d,f,g){var a=b;if(d)if(typeof d=="number")a=String(d);else if(typeof d==="object")for(var e in d){if(a!==b)a+=",";else a=c;if(typeof d[e]=="number")a+=String(d[e])}else a=c;OSF.AppTelemetry.onCallDone("method",h,a,f,g)}d.onMethodDone=r;function p(b,a){OSF.AppTelemetry.onCallDone("property",-1,b,a)}d.onPropertyDone=p;function u(c,a){OSF.AppTelemetry.onCallDone("event",c,b,0,a)}d.onEventDone=u;function q(d,e,a,c){OSF.AppTelemetry.onCallDone(d?"registerevent":"unregisterevent",e,b,a,c)}d.onRegisterDone=q;function t(d,c){if(!a)return;var b=new OSFLog.AppClosedUsageData;b.CorrelationId=i;b.SessionId=f;b.FocusTime=c;b.OpenTime=d;b.AppSizeFinalWidth=window.innerWidth;b.AppSizeFinalHeight=window.innerHeight;(new k).saveLog(f,b.SerializeRow())}d.onAppClosed=t;function l(a){i=a}d.setOsfControlAppCorrelationId=l;function j(b,c){var a=new OSFLog.AppInitializationUsageData;a.CorrelationId=i;a.SessionId=f;a.SuccessCode=b?1:0;a.Message=c;(new h).LogData(a)}d.doAppInitializationLogging=j;function m(a){j(false,a)}d.logAppCommonMessage=m;function n(a){j(e,a)}d.logAppException=n;OSF.AppTelemetry=d})(OSFAppTelemetry||(OSFAppTelemetry={}));OSF.InitializationHelper=function(d,b,f,e,c){var a=this;a._hostInfo=d;a._webAppState=b;a._context=f;a._settings=e;a._hostFacade=c};OSF.InitializationHelper.prototype.getAppContext=function(F,n){var b="undefined",d=this;if(d._hostInfo.isRichClient){var e,a,u="Warning: Office.js is loaded outside of Office client",h=function(){OsfMsAjaxFactory.msAjaxDebug.trace(u);Microsoft.Office.WebExtension.browserInitialize&&Microsoft.Office.WebExtension.browserInitialize(Microsoft.Office.WebExtension.InitializationReason.Browser)};try{if(window.external&&typeof window.external.GetContext!==b)a=OSF.DDA._OsfControlContext=window.external.GetContext();else{h();return}}catch(o){h();return}var a=window.external.GetContext(),f=a.GetAppType(),j=false;for(var x in OSF.AppName)if(OSF.AppName[x]==f){j=true;break}if(!j)throw"Unsupported client type "+f;var E=a.GetSolutionRef(),k;if(typeof a.GetApiSetVersion!==b)k=a.GetApiSetVersion();var A=OSF.O15HostSpecificFileVersion.GenerateVersion(a.GetAppVersionMajor(),k),r=a.GetAppVersionMinor(),z=a.GetAppUILocale(),w=a.GetAppDataLocale(),B=a.GetDocUrl(),v=a.GetAppCapabilities(),C=a.GetActivationMode(),q=a.GetControlIntegrationLevel(),y=[],c;try{c=a.GetSolutionToken()}catch(D){}var m;if(typeof a.GetCorrelationId!==b)m=a.GetCorrelationId();var i;if(typeof a.GetSupportedMatrix!==b)i=a.GetSupportedMatrix();c=c?c.toString():"";var l;if(typeof a.GetInstanceId!==b)l=a.GetInstanceId();var g;if(typeof a.GetDialogRequirementMatrix!=b)g=a.GetDialogRequirementMatrix();e=new OSF.OfficeAppContext(E,f,A,z,w,B,v,y,C,q,c,m,l,0,0,r,i,g);try{var s=window.external.GetHostInfo(),t=s.indexOf("isDialog")!=-1;d._hostInfo.isDialog=t}catch(o){}n(e);OSF.AppTelemetry&&OSF.AppTelemetry.initialize(e)}else{var p=function(g,a){var b;if(a._appName===OSF.AppName.ExcelWebApp){var c=a._settings;b={};for(var i in c){var h=c[i];b[h[0]]=h[1]}}else b=a._settings;if(g===0&&a._id!=undefined&&a._appName!=undefined&&a._appVersion!=undefined&&a._appUILocale!=undefined&&a._dataLocale!=undefined&&a._docUrl!=undefined&&a._clientMode!=undefined&&a._settings!=undefined&&a._reason!=undefined){var f=0;if(a._appMinorVersion!=undefined)f=a._appMinorVersion;var d=undefined;if(a._requirementMatrix!=undefined)d=a._requirementMatrix;var e=new OSF.OfficeAppContext(a._id,a._appName,a._appVersion,a._appUILocale,a._dataLocale,a._docUrl,a._clientMode,b,a._reason,a._osfControlType,a._eToken,a._correlationId,0,0,0,f,d);n(e);OSF.AppTelemetry&&OSF.AppTelemetry.initialize(e)}else throw"Function ContextActivationManager_getAppContextAsync call failed. ErrorCode is "+g};d._webAppState.clientEndPoint.invoke("ContextActivationManager_getAppContextAsync",p,d._webAppState.id)}};OSF.InitializationHelper.prototype.checkReceiverOriginAndRun=function(g){var a=false,b=this,c=OSF.OUtil.parseUrl(b._webAppState.clientEndPoint._targetUrl,a),d=c.protocol=="https:",h="NotHttps";if(b._webAppState.clientEndPoint._hostTrustCheckStatus===Microsoft.Office.Common.HostTrustStatus.unknown){if(!d)b._webAppState.clientEndPoint._hostTrustCheckStatus=Microsoft.Office.Common.HostTrustStatus.nothttps;if(b._webAppState.clientEndPoint._hostTrustCheckStatus!=Microsoft.Office.Common.HostTrustStatus.nothttps)if(Microsoft.Office.Common.XdmCommunicationManager.isHostNameValidWacDomain(c.hostname))b._webAppState.clientEndPoint._hostTrustCheckStatus=Microsoft.Office.Common.HostTrustStatus.trusted}if(b._webAppState.clientEndPoint._hostTrustCheckStatus!=Microsoft.Office.Common.HostTrustStatus.trusted){var e=function(){var f=OSF._OfficeAppFactory.getLoadScriptHelper().getOfficeJsBasePath().match(/^https?:\/\/[^:/?#]*(?::([0-9]+))?/);if(f&&f[0]){var j=OSF._OfficeAppFactory.getLoadScriptHelper().getOfficeJsBasePath()+"AgaveErrorUX/index.html#",h={error:"NotTrustedWAC",locale:OSF.getSupportedLocale(b._hostInfo.hostLocale,OSF.ConstantNames.DefaultLocale),hostname:c.hostname,noHttps:!d,validate:a},e=document.createElement("iframe");e.style.visibility="hidden";e.style.height="0";e.style.width="0";function i(c){if(c.source==e.contentWindow&&c.origin==f[0])try{var d=JSON.parse(c.data),k=Function._validateParams(d,[{name:"hostUserTrusted",type:Boolean,mayBeNull:a}]);if(d.hostUserTrusted===true){b._webAppState.clientEndPoint._hostTrustCheckStatus=Microsoft.Office.Common.HostTrustStatus.trusted;OSF.OUtil.removeEventListener(window,"message",i);document.body.removeChild(e)}else{h.validate=a;window.location.replace(j+encodeURIComponent(JSON.stringify(h)))}g()}catch(k){document.body.innerHTML=Strings.OfficeOM.L_NotTrustedWAC}}OSF.OUtil.addEventListener(window,"message",i);h.validate=true;e.setAttribute("src",j+encodeURIComponent(JSON.stringify(h)));e.onload=function(){var a={hostname:c.hostname,noHttps:!d};e.contentWindow.postMessage(JSON.stringify(a),f[0])};document.body.appendChild(e)}else document.body.innerHTML=Strings.OfficeOM.L_NotTrustedWAC};if(document.body)e();else{var f=a;document.addEventListener("DOMContentLoaded",function(){if(!f){f=true;e()}})}}else g()};OSF.InitializationHelper.prototype.setAgaveHostCommunication=function(){var d="ContextActivationManager_notifyHost",c=false,a=this,e=OSF.OUtil.parseXdmInfo();if(e){a._hostInfo.isRichClient=c;var b=e.split("|");if(b==undefined||typeof b[1]=="undefined")b=e.split("%7C");if(b!=undefined&&b.length>=3){a._webAppState.conversationID=b[0];a._webAppState.id=b[1];a._webAppState.webAppUrl=b[2]}}else a._hostInfo.isRichClient=true;if(!a._hostInfo.isRichClient){a._webAppState.clientEndPoint=Microsoft.Office.Common.XdmCommunicationManager.connect(a._webAppState.conversationID,a._webAppState.wnd,a._webAppState.webAppUrl);a._webAppState.serviceEndPoint=Microsoft.Office.Common.XdmCommunicationManager.createServiceEndPoint(a._webAppState.id);a._webAppState.clientEndPoint._checkReceiverOriginAndRun=function(b){a.checkReceiverOriginAndRun(b)};var f=a._webAppState.conversationID+OSF.SharedConstants.NotificationConversationIdSuffix;a._webAppState.serviceEndPoint.registerConversation(f);var g=function(b){switch(b){case OSF.AgaveHostAction.Select:a._webAppState.focused=true;window.focus();break;case OSF.AgaveHostAction.UnSelect:a._webAppState.focused=c;break;default:OsfMsAjaxFactory.msAjaxDebug.trace("actionId "+b+" notifyAgave is wrong.")}};a._webAppState.serviceEndPoint.registerMethod("Office_notifyAgave",g,Microsoft.Office.Common.InvokeType.async,c);window.onfocus=function(){if(!a._webAppState.focused){a._webAppState.focused=true;a._webAppState.clientEndPoint.invoke(d,null,[a._webAppState.id,OSF.AgaveHostAction.Select])}};window.onblur=function(){if(a._webAppState.focused){a._webAppState.focused=c;a._webAppState.clientEndPoint.invoke(d,null,[a._webAppState.id,OSF.AgaveHostAction.UnSelect])}}}};OSF.InitializationHelper.prototype.prepareRightBeforeWebExtensionInitialize=function(a){var c="undefined",e=this,g=new OSF.DDA.License(a.get_eToken()),l=window.open;window.open=function(d,c,b){var a=null;try{a=l(d,c,b)}catch(f){}if(!a&&OSF._OfficeAppFactory.getClientEndPoint()&&OSF._OfficeAppFactory.getClientEndPoint().invoke){var e={strUrl:d,strWindowName:c,strWindowFeatures:b};OSF._OfficeAppFactory.getClientEndPoint().invoke("ContextActivationManager_openWindowInHost",null,e)}return a};if(e._hostInfo.isRichClient){var i=true;try{i=a.get_appName()==OSF.AppName.Outlook&&parseFloat(a.get_appVersion())<15.04}catch(m){}if(!i)if(a.get_isDialog()){if(OSF.DDA.UI.ChildUI)a.ui=new OSF.DDA.UI.ChildUI}else if(OSF.DDA.UI.ParentUI)a.ui=new OSF.DDA.UI.ParentUI;if(OSF.DDA.SafeArray!=undefined){var d=OSF.DDA.SafeArray.Delegate.ParameterMap,b={};b[OSF.DDA.EventDescriptors.DialogMessageReceivedEvent]=OSF.DDA.SafeArray.Delegate.ParameterMap.self;d.setMapping(OSF.DDA.EventDispId.dispidDialogMessageReceivedEvent,{fromHost:b});b={};b[OSF.DDA.PropertyDescriptors.MessageType]=0;b[OSF.DDA.PropertyDescriptors.MessageContent]=1;b[OSF.DDA.PropertyDescriptors.MessageOrigin]=2;d.setMapping(OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,{fromHost:b});OSF.DDA.SafeArray.Delegate.ParameterMap=d}}if(a.get_appName()==OSF.AppName.OutlookWebApp){OSF._OfficeAppFactory.setContext(new OSF.DDA.OutlookContext(a,e._settings,g,a.appOM));Microsoft.Office.WebExtension.initialize()}else if(a.get_appName()==OSF.AppName.Outlook){OSF._OfficeAppFactory.setContext(new OSF.DDA.OutlookContext(a,e._settings,g,a.appOM));if(typeof OfficeJsClient_OutlookWin32!==c)if(typeof OfficeJsClient_OutlookWin32.prepareRightAfterWebExtensionInitialize!==c){OfficeJsClient_OutlookWin32.prepareRightBeforeWebExtensionInitialize();Microsoft.Office.WebExtension.initialize();OfficeJsClient_OutlookWin32.prepareRightAfterWebExtensionInitialize()}else{Microsoft.Office.WebExtension.initialize();OfficeJsClient_OutlookWin32.prepareRightBeforeWebExtensionInitialize()}else Microsoft.Office.WebExtension.initialize()}else if(a.get_osfControlType()===OSF.OsfControlType.DocumentLevel||a.get_osfControlType()===OSF.OsfControlType.ContainerLevel){OSF._OfficeAppFactory.setContext(new OSF.DDA.Context(a,a.doc,g));var f,d,h=a.get_reason();if(e._hostInfo.isRichClient){function j(a){try{a.onCalling&&a.onCalling();var h=(new Date).getTime(),d=a.hostCallArgs[Microsoft.Office.WebExtension.Parameters.MessageToParent];if(typeof window.external.MessageParent2!=c&&typeof OsfOMToken!=c&&OsfOMToken){var g=a.hostCallArgs[Microsoft.Office.WebExtension.Parameters.TargetOrigin];window.external.MessageParent2(d,g,OsfOMToken)}else window.external.MessageParent(d);a.onReceiving&&a.onReceiving();OSF.AppTelemetry&&OSF.AppTelemetry.onMethodDone(a.dispId,a.hostCallArgs,Math.abs((new Date).getTime()-h),result);return result}catch(f){var b,e=f.number;if(e)switch(e){case -2146828218:b=OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability;break;case -2146827850:default:b=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError}return b||OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError}}function k(b){var a=OSF.DDA.DispIdHost.getRichClientDelegateMethods(b);if(a[OSF.DDA.DispIdHost.Delegates.MessageParent]==undefined)a[OSF.DDA.DispIdHost.Delegates.MessageParent]=j;return a}f=k;h=OSF.DDA.RichInitializationReason[h];d=OSF.DDA.SafeArray.Delegate.ParameterMap}else{f=OSF.DDA.DispIdHost.getXLSDelegateMethods;d=OSF.DDA.XLS.Delegate.ParameterMap}OSF._OfficeAppFactory.setHostFacade(new OSF.DDA.DispIdHost.Facade(f,d));Microsoft.Office.WebExtension.initialize(h)}else throw OSF.OUtil.formatString(Strings.OfficeOM.L_OsfControlTypeNotSupported)};OSF.InitializationHelper.prototype.loadAppSpecificScriptAndCreateOM=function(a,f,t){var c=false,b;b=".js";var q={"1-15.00":"excel-15"+b,"1-15.01":"excel-15.01"+b,"1-15.02":"excel-15.02"+b,"2-15.00":"word-15"+b,"2-15.01":"word-15.01"+b,"2-15.02":"word-15.02"+b,"4-15.00":"powerpoint-15"+b,"4-15.01":"powerpoint-15.01"+b,"4-15.02":"powerpoint-15.02"+b,"8-15.00":"outlook-15"+b,"8-15.01":"outlook-15.01"+b,"8-15.02":"outlook-15.02"+b,"8-15.03":"outlook-15.03"+b,"8-15.04":"outlook-15.04"+b,"16-15":"excelwebapp-15"+b,"16-15.01":"excelwebapp-15.01"+b,"16-15.02":"excelwebapp-15.02"+b,"64-15":"outlookwebapp-15"+b,"64-15.01":"outlookwebapp-15.01"+b,"128-15.00":"project-15"+b,"128-15.01":"project-15.01"+b,"128-15.02":"project-15.02"+b},n=function(){var b=function(a){a&&OSF.OUtil.loadScript(a,function(){OsfMsAjaxFactory.msAjaxDebug.trace("loaded customized script:"+a)})},c=OSF._OfficeAppFactory.getClientEndPoint(),a=null;if(!c){try{if(typeof window.external.getCustomizedScriptPath!=="undefined")a=window.external.getCustomizedScriptPath()}catch(d){OsfMsAjaxFactory.msAjaxDebug.trace("no script override through window.external.")}b(a)}};OSF.DDA.ErrorCodeManager.initializeErrorMessages(Strings.OfficeOM);var i=this;function g(e){var c,b;if(i._hostInfo.isRichClient)b=OSF.DDA.RichClientSettingsManager.read();else b=a.get_settings();var d=OSF.DDA.SettingsManager.deserializeSettings(b);if(e)c=new OSF.DDA.RefreshableSettings(d);else c=new OSF.DDA.Settings(d);return c}var h=a.get_appVersion(),k=OSF.O15HostSpecificFileVersion.GetFallbackVersion(a.get_appName());if(h>k)h=k;var e=t+q[a.get_appName()+"-"+h],d=function(a,c,b){if(OSF._OfficeAppFactory.getLoadScriptHelper)OSF._OfficeAppFactory.getLoadScriptHelper().loadScript(a,c,b);else OSF.OUtil.loadScript(a,b)};if(a.get_appName()==OSF.AppName.Excel){var p=function(){a.doc=new OSF.DDA.ExcelDocument(a,g(c));f()};d(e,OSF.ConstantNames.HostFileId,p)}else if(a.get_appName()==OSF.AppName.ExcelWebApp){var l=function(){a.doc=new OSF.DDA.ExcelWebAppDocument(a,g(true));f()};d(e,OSF.ConstantNames.HostFileId,l)}else if(a.get_appName()==OSF.AppName.Word){var s=function(){a.doc=new OSF.DDA.WordDocument(a,g(c));f()};d(e,OSF.ConstantNames.HostFileId,s)}else if(a.get_appName()==OSF.AppName.PowerPoint){var m=function(){a.doc=new OSF.DDA.PowerPointDocument(a,g(c));f()};d(e,OSF.ConstantNames.HostFileId,m)}else if(a.get_appName()==OSF.AppName.OutlookWebApp||a.get_appName()==OSF.AppName.Outlook){var o=function(){i._settings=g(c);a.appOM=new OSF.DDA.OutlookAppOm(a,i._webAppState.wnd,f)},j=function(){d(e,OSF.ConstantNames.HostFileId,o)};if(!OsfMsAjaxFactory.isMsAjaxLoaded())OsfMsAjaxFactory.loadMsAjaxFull(j);else j();n()}else if(a.get_appName()==OSF.AppName.Project){var r=function(){a.doc=new OSF.DDA.ProjectDocument(a);f()};d(e,OSF.ConstantNames.HostFileId,r)}else throw OSF.OUtil.formatString(stringNS.L_AppNotExistInitializeNotCalled,a.get_appName())}