text: /* Excel specific API library */
  /* Version: 15.0.4980.3004 */
  /*
  	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",g="configurable",f="writable",d="enumerable",c=true,b=null,a=false,j=-1,m="&_xdm_Info=",l="_xdm_",h="#",i={},o=3e4,k=a;function n(){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=i[f];if(!d){var e=l.createElement("script");e.type="text/javascript";d={loaded:a,pendingCallbacks:[g],timer:b};i[f]=d;var j=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 i[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;j()}};else e.onload=j;e.onerror=k;h=h||o;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=="undefined"){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(){j=j+1;return j.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 [n(),n(),(new Date).getTime().toString()].join("_")},getFrameNameAndConversationId:function(b,c){var a=l+b+this.generateConversationId();c.setAttribute("name",a);return this.generateConversationId()},addXdmInfoAsHash:function(a,d){a=a.trim()||"";var b=a.split(h),c=b.shift(),e=b.join(h);return [c,h,e,m,d].join("")},parseXdmInfo:function(){var g=window.location.hash,d=g.split(m),a=d.length>1?d[d.length-1]:b;if(window.sessionStorage){var c=window.name.indexOf(l);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,[f,d,g])},defineMutableProperties:function(b,a){return OSF.OUtil.defineNondefaultProperties(b,a,[f,d,g])},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(!k)try{if(window.localStorage)a=window.localStorage}catch(d){k=c}return a},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"};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"};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 t=function(c){__extends(b,c);function b(){c.call(this,{dialogapi:a})}return b}(c);b.DefaultDialogSetRequirement=t;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 n=function(c){__extends(b,c);function b(){c.call(this);this._addSetMap({imagecoercion:a})}return b}(f);b.ExcelClientV2DefaultSetRequirement=n;var o=function(c){__extends(b,c);function b(){c.call(this,{mailbox:a})}return b}(c);b.OutlookClientDefaultSetRequirement=o;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 q=function(c){__extends(b,c);function b(){c.call(this);this._addSetMap({imagecoercion:a,pdffile:a})}return b}(g);b.WordClientV2DefaultSetRequirement=q;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 r=function(c){__extends(b,c);function b(){c.call(this);this._addSetMap({activeview:a})}return b}(i);b.ExcelWebV2DefaultSetRequirement=r;var s=function(c){__extends(b,c);function b(){c.call(this,{mailbox:a})}return b}(c);b.OutlookWebDefaultSetRequirement=s;var p=function(b){__extends(a,b);function a(){b.call(this,{mailbox:1.3})}return a}(c);b.OutlookWebV1DefaultSetRequirement=p;var u=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(f){var a=undefined,e=f.get_dialogRequirementMatrix();if(e!=undefined&&e.length>0&&typeof JSON!==b){var g=JSON.parse(f.get_requirementMatrix().toLowerCase());a=new d(new c(g))}else a=new d(new t);return a};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 n;a.DefaultSetArrayMatrix[a.Word_RCLIENT_1500]=new g;a.DefaultSetArrayMatrix[a.Word_RCLIENT_1501]=new g;a.DefaultSetArrayMatrix[a.Word_RCLIENT_1502]=new q;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 o;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 r;a.DefaultSetArrayMatrix[a.Outlook_WAC_1500]=new s;a.DefaultSetArrayMatrix[a.Outlook_WAC_1501]=new p;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=u})(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.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]=true},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={}};Microsoft.Office.Common.ClientEndPoint.prototype={invoke:function(h,d,b){var a=this,g=Function._validateParams(arguments,[{name:"targetMethodName",type:String,mayBeNull:false},{name:"callback",type:Function,mayBeNull:true},{name:"param",mayBeNull:true}]);if(g)throw g;var c=a._callingIndex++,k=new Date,e={callback:d,createdOn:k.getTime()};if(b&&typeof b==="object"&&typeof b.__timeout__==="number"){e.timeout=b.__timeout__;delete b.__timeout__}a._callbackList[c]=e;try{var i=new Microsoft.Office.Common.Request(h,Microsoft.Office.Common.ActionType.invoke,a._conversationId,c,b),j=Microsoft.Office.Common.MessagePackager.envelope(i);a._targetWindow.postMessage(j,a._targetUrl);Microsoft.Office.Common.XdmCommunicationManager._startMethodTimeoutTimer()}catch(f){try{d!==null&&d(Microsoft.Office.Common.InvokeResultCode.errorInRequest,f)}finally{delete a._callbackList[c]}}},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,v=10,j=b,f=a,o=2e3,l=6e4,g={},d={},m=b;function p(b){for(var a in g)if(g[a]._conversations[b])return g[a];OsfMsAjaxFactory.msAjaxDebug.trace(h);throw OsfMsAjaxFactory.msAjaxError.argument(c)}function q(b){var a=d[b];if(!a){OsfMsAjaxFactory.msAjaxDebug.trace(h);throw OsfMsAjaxFactory.msAjaxError.argument(c)}return a}function t(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 x(a){k.push(a)}function w(){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 s(){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 r(){j=b}function u(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 y(c){var d="Access Denied";if(c.data!=""){var b;try{b=Microsoft.Office.Common.MessagePackager.unenvelope(c.data)}catch(f){return}if(typeof b._messageType=="undefined")return;if(b._messageType===Microsoft.Office.Common.MessageType.request){var l=c.origin==a||c.origin=="null"?b._origin:c.origin;try{var g=p(b._conversationId),k=g.getPolicyManager();if(k&&!k.checkPermission(b._conversationId,b._actionName,b._data))throw d;var u=t(g,b),n=new Microsoft.Office.Common.InvokeCompleteCallback(c.source,l,b._actionName,b._conversationId,b._correlationId,r),y=new Microsoft.Office.Common.Invoker(u,b._data,n,g._eventHandlerProxyList,b._conversationId,b._actionName);if(e==a)e=setInterval(w,v);x(y)}catch(f){var m=Microsoft.Office.Common.InvokeResultCode.errorHandlingRequest;if(f==d)m=Microsoft.Office.Common.InvokeResultCode.errorHandlingRequestAccessDenied;var s=new Microsoft.Office.Common.Response(b._actionName,b._conversationId,b._correlationId,m,Microsoft.Office.Common.ResponseType.forCalling,f),o=Microsoft.Office.Common.MessagePackager.envelope(s);c.source&&c.source.postMessage&&c.source.postMessage(o,l)}}else if(b._messageType===Microsoft.Office.Common.MessageType.response){var h=q(b._conversationId);if(b._responseType===Microsoft.Office.Common.ResponseType.forCalling){var i=h._callbackList[b._correlationId];if(i)try{i.callback&&i.callback(b._errorCode,b._data)}finally{delete h._callbackList[b._correlationId]}}else{var j=h._eventHandlerList[b._actionName];j!==undefined&&j!==a&&j(b._data)}}else return}}function n(){if(!m){u(y);m=true}}return {connect:function(b,c,e){var a=d[b];if(!a){n();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){n();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(s,o)}}}();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.href;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 OsfMsAjaxFactory.msAjaxSerializer.serialize(a)},unenvelope:function(a){return OsfMsAjaxFactory.msAjaxSerializer.deserialize(a,true)}};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]}});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:[]});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 b=null,a=true;function c(){}c.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};c.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(c.prototype,"msAjaxError",{"get":function(){var a=this;if(a._msAjaxError==b&&a.isMsAjaxLoaded())a._msAjaxError=Error;return a._msAjaxError},"set":function(a){this._msAjaxError=a},enumerable:a,configurable:a});Object.defineProperty(c.prototype,"msAjaxSerializer",{"get":function(){var a=this;if(a._msAjaxSerializer==b&&a.isMsAjaxLoaded())a._msAjaxSerializer=Sys.Serialization.JavaScriptSerializer;return a._msAjaxSerializer},"set":function(a){this._msAjaxSerializer=a},enumerable:a,configurable:a});Object.defineProperty(c.prototype,"msAjaxString",{"get":function(){var a=this;if(a._msAjaxString==b&&a.isMsAjaxLoaded())a._msAjaxSerializer=String;return a._msAjaxString},"set":function(a){this._msAjaxString=a},enumerable:a,configurable:a});Object.defineProperty(c.prototype,"msAjaxDebug",{"get":function(){var a=this;if(a._msAjaxDebug==b&&a.isMsAjaxLoaded())a._msAjaxDebug=Sys.Debug;return a._msAjaxDebug},"set":function(a){this._msAjaxDebug=a},enumerable:a,configurable:a});return c}();b.MicrosoftAjaxFactory=a})(OfficeExt||(OfficeExt={}));var OsfMsAjaxFactory=new OfficeExt.MicrosoftAjaxFactory;(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(a,c,b){if(a.__typeName===undefined)a.__typeName=c;if(a.__class===undefined)a.__class=b};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 OfficeExt;(function(b){var a="undefined",c=null,d=function(){var h='["\\\\\\x00-\\x1F]',f='"',g="g";function d(){}d._init=function(){var c=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000b","\\f","\\r","\\u000e","\\u000f","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001a","\\u001b","\\u001c","\\u001d","\\u001e","\\u001f"];d._charsToEscape[0]="\\";d._charsToEscapeRegExs["\\"]=new RegExp("\\\\",g);d._escapeChars["\\"]="\\\\";d._charsToEscape[1]=f;d._charsToEscapeRegExs[f]=new RegExp(f,g);d._escapeChars[f]='\\"';for(var a=0;a<32;a++){var b=String.fromCharCode(a);d._charsToEscape[a+2]=b;d._charsToEscapeRegExs[b]=new RegExp(b,g);d._escapeChars[b]=c[a]}};d.serialize=function(b){var a=new e;d.serializeWithBuilder(b,a,false);return a.toString()};d.deserialize=function(a,f){if(a.length===0)throw b.MsAjaxError.argument("data","Cannot deserialize empty string.");try{var e=a.replace(d._dateRegEx,"$1new Date($2)");if(f&&d._jsonRegEx.test(e.replace(d._jsonStringRegEx,"")))throw c;return eval("("+e+")")}catch(g){throw b.MsAjaxError.argument("data","Cannot deserialize. The data does not correspond to valid JSON.")}};d.serializeBooleanWithBuilder=function(b,a){a.append(b.toString())};d.serializeNumberWithBuilder=function(a,c){if(isFinite(a))c.append(String(a));else throw b.MsAjaxError.invalidOperation("Cannot serialize non finite numbers.")};d.serializeStringWithBuilder=function(a,c){c.append(f);if(d._escapeRegEx.test(a)){d._charsToEscape.length===0&&d._init();if(a.length<128)a=a.replace(d._escapeRegExGlobal,function(a){return d._escapeChars[a]});else for(var e=0;e<34;e++){var b=d._charsToEscape[e];if(a.indexOf(b)!==-1)if(navigator.userAgent.indexOf("OPR/")>-1||navigator.userAgent.indexOf("Firefox")>-1)a=a.split(b).join(d._escapeChars[b]);else a=a.replace(d._charsToEscapeRegExs[b],d._escapeChars[b])}}c.append(a);c.append(f)};d.serializeWithBuilder=function(e,c,l,f){var g;switch(typeof e){case "object":if(e){if(f){for(var m=0;m<f.length;m++)if(f[m]===e)throw b.MsAjaxError.invalidOperation("Cannot serialize object with cyclic reference within child properties.")}else f=[];try{b.MsAjaxArray.add(f,e);if(b.MsAjaxTypeHelper.isInstanceOfType(Number,e))d.serializeNumberWithBuilder(e,c);else if(b.MsAjaxTypeHelper.isInstanceOfType(Boolean,e))d.serializeBooleanWithBuilder(e,c);else if(b.MsAjaxTypeHelper.isInstanceOfType(String,e))d.serializeStringWithBuilder(e,c);else if(b.MsAjaxTypeHelper.isInstanceOfType(Array,e)){c.append("[");for(g=0;g<e.length;++g){g>0&&c.append(",");d.serializeWithBuilder(e[g],c,false,f)}c.append("]")}else{if(b.MsAjaxTypeHelper.isInstanceOfType(Date,e)){c.append('"\\/Date(');c.append(e.getTime());c.append(')\\/"');break}var h=[],i=0;for(var j in e){if(b.MsAjaxString.startsWith(j,"$"))continue;if(j===d._serverTypeFieldName&&i!==0){h[i++]=h[0];h[0]=j}else h[i++]=j}l&&h.sort();c.append("{");var n=false;for(g=0;g<i;g++){var k=e[h[g]];if(typeof k!==a&&typeof k!=="function"){if(n)c.append(",");else n=true;d.serializeWithBuilder(h[g],c,l,f);c.append(":");d.serializeWithBuilder(k,c,l,f)}}c.append("}")}}finally{b.MsAjaxArray.removeAt(f,f.length-1)}}else c.append("null");break;case "number":d.serializeNumberWithBuilder(e,c);break;case "string":d.serializeStringWithBuilder(e,c);break;case "boolean":d.serializeBooleanWithBuilder(e,c);break;default:c.append("null")}};d.__patchVersion=0;d._charsToEscapeRegExs=[];d._charsToEscape=[];d._dateRegEx=new RegExp('(^|[^\\\\])\\"\\\\/Date\\((-?[0-9]+)(?:[a-zA-Z]|(?:\\+|-)[0-9]{4})?\\)\\\\/\\"',g);d._escapeChars={};d._escapeRegEx=new RegExp(h,"i");d._escapeRegExGlobal=new RegExp(h,g);d._jsonRegEx=new RegExp("[^,:{}\\[\\]0-9.\\-+Eaeflnr-u \\n\\r\\t]",g);d._jsonStringRegEx=new RegExp('"(\\\\.|[^"\\\\])*"',g);d._serverTypeFieldName="__type";return d}();b.MsAjaxJavaScriptSerializer=d;var f=function(){function b(){}b.add=function(a,b){a[a.length]=b};b.removeAt=function(a,b){a.splice(b,1)};b.clone=function(a){if(a.length===1)return [a[0]];else return Array.apply(c,a)};b.remove=function(c,d){var a=b.indexOf(c,d);a>=0&&c.splice(a,1);return a>=0};b.indexOf=function(e,f,b){if(typeof f===a)return -1;var d=e.length;if(d!==0){b=b-0;if(isNaN(b))b=0;else{if(isFinite(b))b=b-b%1;if(b<0)b=Math.max(0,d+b)}for(var c=b;c<d;c++)if(typeof e[c]!==a&&e[c]===f)return c}return -1};return b}();b.MsAjaxArray=f;var e=function(){function b(b){this._parts=typeof b!==a&&b!==c&&b!==""?[b.toString()]:[];this._value={};this._len=0}b.prototype.append=function(a){this._parts[this._parts.length]=a};b.prototype.toString=function(b){var e=this;b=b||"";var d=e._parts;if(e._len!==d.length){e._value={};e._len=d.length}var g=e._value;if(typeof g[b]===a){if(b!=="")for(var f=0;f<d.length;)if(typeof d[f]===a||d[f]===""||d[f]===c)d.splice(f,1);else f++;g[b]=e._parts.join(b)}return g[b]};return b}();b.MsAjaxStringBuilder=e;if(!OsfMsAjaxFactory.isMsAjaxLoaded())OsfMsAjaxFactory.msAjaxSerializer=d})(OfficeExt||(OfficeExt={}));var OSF=OSF||{};OSF.OUtil=function(){var e="on",g="configurable",f="writable",d="enumerable",c=true,b=null,a=false,j=-1,m="&_xdm_Info=",l="_xdm_",h="#",i={},o=3e4,k=a;function n(){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=i[f];if(!d){var e=l.createElement("script");e.type="text/javascript";d={loaded:a,pendingCallbacks:[g],timer:b};i[f]=d;var j=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 i[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;j()}};else e.onload=j;e.onerror=k;h=h||o;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=="undefined"){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(){j=j+1;return j.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 [n(),n(),(new Date).getTime().toString()].join("_")},getFrameNameAndConversationId:function(b,c){var a=l+b+this.generateConversationId();c.setAttribute("name",a);return this.generateConversationId()},addXdmInfoAsHash:function(a,d){a=a.trim()||"";var b=a.split(h),c=b.shift(),e=b.join(h);return [c,h,e,m,d].join("")},parseXdmInfo:function(){var g=window.location.hash,d=g.split(m),a=d.length>1?d[d.length-1]:b;if(window.sessionStorage){var c=window.name.indexOf(l);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,[f,d,g])},defineMutableProperties:function(b,a){return OSF.OUtil.defineNondefaultProperties(b,a,[f,d,g])},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(!k)try{if(window.localStorage)a=window.localStorage}catch(d){k=c}return a},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 a=null,b;function f(a){return a["Fields"]!==undefined}function e(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 g(){if(a)return a;else{for(var f=document.getElementsByTagName("script")||[],i=f.length,g=["office.js","office.debug.js"],h=g.length,d,b,c=0;!b&&c<i;c++)if(f[c].src)for(d=0;!b&&d<h;d++)b=e(f[c].src,g[d]);a=b;return a}}function d(){return g()+"ariatelemetry/aria-web-telemetry.js"}function c(e,a){var c=1e3;OSF.OUtil.loadScript(d(),function(){try{if(!b){var f="db334b301e7b474db5e0f02f07c51a47-a1b5bc36-1bbe-482f-a64a-c2d9cb606706-7439";b=AWTLogManager.initialize(f)}var c=new AWTEventProperties;c.setName("Office.Extensibility.OfficeJS."+e);for(var d in a)d.toLowerCase()!=="table"&&c.setProperty(d,a[d]);var g=new Date;c.setProperty("Date",g.toISOString());b.logEvent(c)}catch(h){}},c)}return {logData:function(a){if(f(a))c(a["Table"],a["Fields"]);else c(a["Table"],a)}}}();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(c){var a=null;"use strict";var b,d=OSF.OUtil.Guid.generateNewGuid(),g="",v=function(){function a(){}return a}(),e=function(){function a(b,a){this.name=b;this.handler=a}return a}(),i=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(c,d){var b=this,a=b.getValue(b.logIdSetKey);a=(a&&a.length>0?a+";":"")+c;b.setValue(b.logIdSetKey,a);b.setValue(c,d)};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(c){var a=OSF.OUtil.getLocalStorage(),b="";if(a)b=a.getItem(c);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}(),f=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}();function t(d){if(!OSF.Logger)return;if(b)return;b=new v;b.hostVersion=d.get_appVersion();b.appId=d.get_id();b.host=d.get_appName();b.browser=window.navigator.userAgent;b.correlationId=d.get_correlationId();b.clientId=(new i).getClientId();b.appInstanceId=d.get_appInstanceId();if(b.appInstanceId)b.appInstanceId=b.appInstanceId.replace(/[{}]/g,"").toLowerCase();var h=new RegExp("^https?://store\\.office(ppe|-int)?\\.com/","i"),g=d.get_docUrl();b.docUrl=h.test(g)?g:"";var f=location.href;if(f)f=f.split("?")[0].split("#")[0];b.appURL=f;(function(f,b){var d,e,c;b.assetId="";b.userId="";try{d=decodeURIComponent(f);e=new DOMParser;c=e.parseFromString(d,"text/xml");b.userId=c.getElementsByTagName("t")[0].attributes.getNamedItem("cid").nodeValue;b.assetId=c.getElementsByTagName("t")[0].attributes.getNamedItem("aid").nodeValue}catch(g){}finally{d=a;c=a;e=a}})(d.get_eToken(),b);(function(){var k=new Date,d=a,h=0,j=false,f=function(){if(document.hasFocus()){if(d==a)d=new Date}else if(d){h+=Math.abs((new Date).getTime()-d.getTime());d=a}},b=[];b.push(new e("focus",f));b.push(new e("blur",f));b.push(new e("focusout",f));b.push(new e("focusin",f));var i=function(){for(var e=0;e<b.length;e++)OSF.OUtil.removeEventListener(window,b[e].name,b[e].handler);b.length=0;if(!j){if(document.hasFocus()&&d){h+=Math.abs((new Date).getTime()-d.getTime());d=a}c.onAppClosed(Math.abs((new Date).getTime()-k.getTime()),h);j=true}};b.push(new e("beforeunload",i));b.push(new e("unload",i));for(var g=0;g<b.length;g++)OSF.OUtil.addEventListener(window,b[g].name,b[g].handler);f()})();c.onAppActivated()}c.initialize=t;function m(){if(!b)return;(new i).enumerateLog(function(b,a){return (new f).LogRawData(a)},true);var a=new OSFLog.AppActivatedUsageData;a.SessionId=d;a.AppId=b.appId;a.AssetId=b.assetId;a.AppURL=b.appURL;a.UserId=b.userId;a.ClientId=b.clientId;a.Browser=b.browser;a.Host=b.host;a.HostVersion=b.hostVersion;a.CorrelationId=b.correlationId;a.AppSizeWidth=window.innerWidth;a.AppSizeHeight=window.innerHeight;a.AppInstanceId=b.appInstanceId;a.DocUrl=b.docUrl;(new f).LogData(a);setTimeout(function(){if(!OSF.Logger)return;OSF.Logger.allowUploadingData()},100)}c.onAppActivated=m;function q(g,e,c,b){var a=new OSFLog.ScriptLoadUsageData;a.CorrelationId=b;a.SessionId=d;a.ScriptId=g;a.StartTime=e;a.ResponseTime=c;(new f).LogData(a)}c.onScriptDone=q;function u(i,j,e,c,h){if(!b)return;var a=new OSFLog.APIUsageUsageData;a.CorrelationId=g;a.SessionId=d;a.APIType=i;a.APIID=j;a.Parameters=e;a.ResponseTime=c;a.ErrorType=h;(new f).LogData(a)}c.onCallDone=u;function p(g,c,e,f){var b=a;if(c)if(typeof c=="number")b=String(c);else if(typeof c==="object")for(var d in c){if(b!==a)b+=",";else b="";if(typeof c[d]=="number")b+=String(c[d])}else b="";OSF.AppTelemetry.onCallDone("method",g,b,e,f)}c.onMethodDone=p;function n(b,a){OSF.AppTelemetry.onCallDone("property",-1,b,a)}c.onPropertyDone=n;function s(c,b){OSF.AppTelemetry.onCallDone("event",c,a,0,b)}c.onEventDone=s;function o(d,e,b,c){OSF.AppTelemetry.onCallDone(d?"registerevent":"unregisterevent",e,a,b,c)}c.onRegisterDone=o;function r(e,c){if(!b)return;var a=new OSFLog.AppClosedUsageData;a.CorrelationId=g;a.SessionId=d;a.FocusTime=c;a.OpenTime=e;a.AppSizeFinalWidth=window.innerWidth;a.AppSizeFinalHeight=window.innerHeight;(new i).saveLog(d,a.SerializeRow())}c.onAppClosed=r;function j(a){g=a}c.setOsfControlAppCorrelationId=j;function h(b,c){var a=new OSFLog.AppInitializationUsageData;a.CorrelationId=g;a.SessionId=d;a.SuccessCode=b?1:0;a.Message=c;(new f).LogData(a)}c.doAppInitializationLogging=h;function k(a){h(false,a)}c.logAppCommonMessage=k;function l(a){h(true,a)}c.logAppException=l;OSF.AppTelemetry=c})(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.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);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 i="undefined",d=this,f=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(d._hostInfo.isRichClient){var h=true;try{h=a.get_appName()==OSF.AppName.Outlook&&parseFloat(a.get_appVersion())<15.04}catch(m){}if(!h)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 b=OSF.DDA.SafeArray.Delegate.ParameterMap,c={};c[OSF.DDA.EventDescriptors.DialogMessageReceivedEvent]=OSF.DDA.SafeArray.Delegate.ParameterMap.self;b.setMapping(OSF.DDA.EventDispId.dispidDialogMessageReceivedEvent,{fromHost:c});c={};c[OSF.DDA.PropertyDescriptors.MessageType]=0;c[OSF.DDA.PropertyDescriptors.MessageContent]=1;b.setMapping(OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,{fromHost:c});OSF.DDA.SafeArray.Delegate.ParameterMap=b}}if(a.get_appName()==OSF.AppName.OutlookWebApp){OSF._OfficeAppFactory.setContext(new OSF.DDA.OutlookContext(a,d._settings,f,a.appOM));Microsoft.Office.WebExtension.initialize()}else if(a.get_appName()==OSF.AppName.Outlook){OSF._OfficeAppFactory.setContext(new OSF.DDA.OutlookContext(a,d._settings,f,a.appOM));if(typeof OfficeJsClient_OutlookWin32!==i)if(typeof OfficeJsClient_OutlookWin32.prepareRightAfterWebExtensionInitialize!==i){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,f));var e,b,g=a.get_reason();if(d._hostInfo.isRichClient){function j(a){try{a.onCalling&&a.onCalling();var e=(new Date).getTime(),f=a.hostCallArgs[Microsoft.Office.WebExtension.Parameters.MessageToParent];window.external.MessageParent(f);a.onReceiving&&a.onReceiving();OSF.AppTelemetry&&OSF.AppTelemetry.onMethodDone(a.dispId,a.hostCallArgs,Math.abs((new Date).getTime()-e),result);return result}catch(d){var b,c=d.number;if(c)switch(c){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}e=k;g=OSF.DDA.RichInitializationReason[g];b=OSF.DDA.SafeArray.Delegate.ParameterMap}else{e=OSF.DDA.DispIdHost.getXLSDelegateMethods;b=OSF.DDA.XLS.Delegate.ParameterMap}OSF._OfficeAppFactory.setHostFacade(new OSF.DDA.DispIdHost.Facade(e,b));Microsoft.Office.WebExtension.initialize(g)}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 a=function(a){a&&OSF.OUtil.loadScript(a,function(){OsfMsAjaxFactory.msAjaxDebug.trace("loaded customized script:"+a)})},c=OSF._OfficeAppFactory.getClientEndPoint(),b=null;if(!c){try{if(typeof window.external.getCustomizedScriptPath!=="undefined")b=window.external.getCustomizedScriptPath()}catch(d){OsfMsAjaxFactory.msAjaxDebug.trace("no script override through window.external.")}a(b)}else try{c.invoke("getCustomizedScriptPathAsync",function(c,b){a(c===0?b:null)},{__timeout__:1e3})}catch(d){OsfMsAjaxFactory.msAjaxDebug.trace("no script override through cross frame communication.")}};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())}