text: /* PowerPoint specific API library */
  /* Version: 16.0.4011.1000 */
  /*
  	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 __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},OSF=OSF||{},OfficeExt;(function(b){var a=function(){function a(a){this._internalStorage=a}a.prototype.getItem=function(a){try{return this._internalStorage&&this._internalStorage.getItem(a)}catch(b){return null}};a.prototype.setItem=function(b,a){try{this._internalStorage&&this._internalStorage.setItem(b,a)}catch(c){}};a.prototype.clear=function(){try{this._internalStorage&&this._internalStorage.clear()}catch(a){}};a.prototype.removeItem=function(a){try{this._internalStorage&&this._internalStorage.removeItem(a)}catch(b){}};a.prototype.getKeysWithPrefix=function(d){var b=[];try{for(var e=this._internalStorage&&this._internalStorage.length||0,a=0;a<e;a++){var c=this._internalStorage.key(a);c.indexOf(d)===0&&b.push(c)}}catch(f){}return b};return a}();b.SafeStorage=a})(OfficeExt||(OfficeExt={}));OSF.OUtil=function(){var f="on",j="configurable",i="writable",e="enumerable",d="undefined",c=true,a=false,g=2147483647,b=null,o=-1,r="&_xdm_Info=",p="_xdm_",l="#",n={},t=3e4,k=b,m=b,h=(new Date).getTime();function s(){var a=g*Math.random();a^=h^(new Date).getMilliseconds()<<Math.floor(Math.random()*(31-10));return a.toString(16)}function q(){if(!k){try{var a=window.sessionStorage}catch(c){a=b}k=new OfficeExt.SafeStorage(a)}return k}return {set_entropy:function(a){if(typeof a=="string")for(var b=0;b<a.length;b+=4){for(var d=0,c=0;c<4&&b+c<a.length;c++)d=(d<<8)+a.charCodeAt(b+c);h^=d}else if(typeof a=="number")h^=a;else h^=g*Math.random();h&=g},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 k=window.document,d=n[f];if(!d){var e=k.createElement("script");e.type="text/javascript";d={loaded:a,pendingCallbacks:[g],timer:b};n[f]=d;var i=function(){if(d.timer!=b){clearTimeout(d.timer);delete d.timer}d.loaded=c;for(var e=d.pendingCallbacks.length,a=0;a<e;a++){var f=d.pendingCallbacks.shift();f()}},j=function(){delete n[f];if(d.timer!=b){clearTimeout(d.timer);delete d.timer}for(var c=d.pendingCallbacks.length,a=0;a<c;a++){var e=d.pendingCallbacks.shift();e()}};if(e.readyState)e.onreadystatechange=function(){if(e.readyState=="loaded"||e.readyState=="complete"){e.onreadystatechange=b;i()}};else e.onload=i;e.onerror=j;h=h||t;d.timer=setTimeout(j,h);e.src=f;k.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==d){Sys.Debug.trace("invalid enumeration string:"+b);throw Error.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(){o=o+1;return o.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 [s(),s(),(new Date).getTime().toString()].join("_")},getFrameNameAndConversationId:function(b,c){var a=p+b+this.generateConversationId();c.setAttribute("name",a);return this.generateConversationId()},addXdmInfoAsHash:function(a,d){a=a.trim()||"";var b=a.split(l),c=b.shift(),e=b.join(l);return [c,l,e,r,d].join("")},parseXdmInfo:function(a){return OSF.OUtil.parseXdmInfoWithGivenFragment(a,window.location.hash)},parseXdmInfoWithGivenFragment:function(h,i){var e=i.split(r),a=e.length>1?e[e.length-1]:b,c=q();if(!h&&c){var d=window.name.indexOf(p);if(d>-1){var f=window.name.indexOf(";",d);if(f==-1)f=window.name.length;var g=window.name.substring(d,f);if(a)c.setItem(g,a);else a=c.getItem(g)}}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},getInfoItems:function(b){var a=b.split("$");if(typeof a[1]==d)a=b.split("|");return a},getConversationUrl:function(){var b="",d=OSF.OUtil.parseXdmInfo(c);if(d){var a=OSF.OUtil.getInfoItems(d);if(a!=undefined&&a.length>=3)b=a[2]}return b},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);typeof Sys!==d&&Sys&&Sys.Debug&&Sys.Debug.trace(a)}},outputDebug:function(a){typeof Sys!==d&&Sys&&Sys.Debug&&Sys.Debug.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,[e])},defineEnumerableProperties:function(b,a){return OSF.OUtil.defineNondefaultProperties(b,a,[e])},defineMutableProperty:function(c,b,a){return OSF.OUtil.defineNondefaultProperty(c,b,a,[i,e,j])},defineMutableProperties:function(b,a){return OSF.OUtil.defineNondefaultProperties(b,a,[i,e,j])},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.addEventListener)b.addEventListener(c,d,a);else if(Sys.Browser.agent===Sys.Browser.InternetExplorer&&b.attachEvent)b.attachEvent(f+c,d);else b[f+c]=d},removeEventListener:function(c,d,e){if(c.removeEventListener)c.removeEventListener(d,e,a);else if(Sys.Browser.agent===Sys.Browser.InternetExplorer&&c.detachEvent)c.detachEvent(f+d,e);else c[f+d]=b},encodeBase64:function(c){if(!c)return c;var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",l=[],b=[],h=0,j,g,i,d,e,f,a,m=c.length;do{j=c.charCodeAt(h++);g=c.charCodeAt(h++);i=c.charCodeAt(h++);a=0;d=j&255;e=j>>8;f=g&255;b[a++]=d>>2;b[a++]=(d&3)<<4|e>>4;b[a++]=(e&15)<<2|f>>6;b[a++]=f&63;if(!isNaN(g)){d=g>>8;e=i&255;f=i>>8;b[a++]=d>>2;b[a++]=(d&3)<<4|e>>4;b[a++]=(e&15)<<2|f>>6;b[a++]=f&63}if(isNaN(g))b[a-1]=64;else if(isNaN(i)){b[a-2]=64;b[a-1]=64}for(var k=0;k<a;k++)l.push(n.charAt(b[k]))}while(h<m);return l.join("")},getSessionStorage:function(){return q()},getLocalStorage:function(){if(!m){try{var a=window.localStorage}catch(c){a=b}m=new OfficeExt.SafeStorage(a)}return m},convertIntToCssHexColor:function(b){var a="#"+(Number(b)+16777216).toString(16).slice(-6);return a},attachClickHandler:function(a,b){a.onclick=function(){b()};a.ontouchend=function(a){b();a.preventDefault()}},getQueryStringParamValue:function(b,d){var e=Function._validateParams(arguments,[{name:"queryString",type:String,mayBeNull:a},{name:"paramName",type:String,mayBeNull:a}]);if(e){Sys.Debug.trace("OSF_Outil_getQueryStringParamValue: Parameters cannot be null.");return ""}var c=new RegExp("[\\?&]"+d+"=([^&#]*)","i");if(!c.test(b)){Sys.Debug.trace("OSF_Outil_getQueryStringParamValue: The parameter is not found.");return ""}return c.exec(b)[1]},isiOS:function(){return window.navigator.userAgent.match(/(iPad|iPhone|iPod)/g)?c:a},shallowCopy:function(a){var c=a.constructor();for(var b in a)if(a.hasOwnProperty(b))c[b]=a[b];return c}}}();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,CancelDialog:2,InsertAgave:3,CtrlF6In:4,CtrlF6Exit:5,CtrlF6ExitShift:6,SelectWithError:7};OSF.SharedConstants={NotificationConversationIdSuffix:"_ntf"};OSF.OfficeAppContext=function(n,j,f,e,h,k,g,i,m,b,l,d,c){var a=this;a._id=n;a._appName=j;a._appVersion=f;a._appUILocale=e;a._dataLocale=h;a._docUrl=k;a._clientMode=g;a._settings=i;a._reason=m;a._osfControlType=b;a._eToken=l;a._correlationId=d;a._appInstanceId=c;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}};OSF.AppName={Unsupported:0,Excel:1,Word:2,PowerPoint:4,Outlook:8,ExcelWebApp:16,WordWebApp:32,OutlookWebApp:64,Project:128,AccessWebApp:256,PowerpointWebApp:512,ExcelIOS:1024,Sway:2048,WordIOS:4096,PowerPointIOS:8192,Access:16384,Lync:32768};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);Microsoft.Office.WebExtension.InitializationReason={Inserted:"inserted",DocumentOpened:"documentOpened"};Microsoft.Office.WebExtension.ValueFormat={Unformatted:"unformatted",Formatted:"formatted"};Microsoft.Office.WebExtension.FilterType={All:"all"};Microsoft.Office.WebExtension.Parameters={BindingType:"bindingType",CoercionType:"coercionType",ValueFormat:"valueFormat",FilterType:"filterType",Columns:"columns",SampleData:"sampleData",GoToType:"goToType",SelectionMode:"selectionMode",Id:"id",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",Status:"status",Xml:"xml",Namespace:"namespace",Prefix:"prefix",XPath:"xPath",TaskId:"taskId",FieldId:"fieldId",FieldValue:"fieldValue",ServerUrl:"serverUrl",ListName:"listName",ResourceId:"resourceId",ViewType:"viewType",ViewName:"viewName",GetRawValue:"getRawValue",CellFormat:"cellFormat",TableOptions:"tableOptions",TaskIndex:"taskIndex",ResourceIndex:"resourceIndex"};OSF.OUtil.setNamespace("DDA",OSF);OSF.DDA.DocumentMode={ReadOnly:1,ReadWrite:0};OSF.DDA.PropertyDescriptors={AsyncResultStatus:"AsyncResultStatus"};OSF.DDA.EventDescriptors={};OSF.DDA.ListDescriptors={};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};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,dispidMethodMax:141,dispidGetSelectedTaskMethod:110,dispidGetSelectedResourceMethod:111,dispidGetTaskMethod:112,dispidGetResourceFieldMethod:113,dispidGetWSSUrlMethod:114,dispidGetTaskFieldMethod:115,dispidGetProjectFieldMethod:116,dispidGetSelectedViewMethod:117,dispidGetTaskByIndexMethod:118,dispidGetResourceByIndexMethod:119,dispidSetTaskFieldMethod:120,dispidSetResourceFieldMethod:121,dispidGetMaxTaskIndexMethod:122,dispidGetMaxResourceIndexMethod:123};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,dispidActivationStatusChangedEvent:32,dispidAppCommandInvokedEvent:39,dispidTaskSelectionChangedEvent:56,dispidResourceSelectionChangedEvent:57,dispidViewSelectionChangedEvent:58,dispidDataNodeAddedEvent:60,dispidDataNodeReplacedEvent:61,dispidDataNodeDeletedEvent:62,dispidEventMax:63};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,ooeGetDataParametersConflict:1010,ooeInvalidGetColumns:1011,ooeInvalidGetRows:1012,ooeInvalidReadForBlankRow:1013,ooeUnsupportedDataObject:2e3,ooeCannotWriteToSelection:2001,ooeDataNotMatchSelection:2002,ooeOverwriteWorksheetData:2003,ooeDataNotMatchBindingSize:2004,ooeInvalidSetStartRowColumn:2005,ooeInvalidDataFormat:2006,ooeDataNotMatchCoercionType:2007,ooeDataNotMatchBindingType:2008,ooeSetDataIsTooLarge:2009,ooeNonUniformPartialSetNotSupported:2010,ooeInvalidSetColumns:2011,ooeInvalidSetRows:2012,ooeSetDataParametersConflict:2013,ooeCellDataAmountBeyondLimits:2014,ooeSelectionCannotBound:3e3,ooeBindingNotExist:3002,ooeBindingToMultipleSelection:3003,ooeInvalidSelectionForBindingType:3004,ooeOperationNotSupportedOnThisBindingType:3005,ooeNamedItemNotFound:3006,ooeMultipleNamedItemFound:3007,ooeInvalidNamedItemForBindingType:3008,ooeUnknownBindingType:3009,ooeOperationNotSupportedOnMatrixData:3010,ooeInvalidColumnsForBinding:3011,ooeSettingNameNotExist:4e3,ooeSettingsCannotSave:4001,ooeSettingsAreStale:4002,ooeOperationNotSupported:5e3,ooeInternalError:5001,ooeDocumentReadOnly:5002,ooeEventHandlerNotExist:5003,ooeInvalidApiCallInContext:5004,ooeShuttingDown:5005,ooeUnsupportedEnumeration:5007,ooeIndexOutOfRange:5008,ooeBrowserAPINotSupported:5009,ooeInvalidParam:5010,ooeRequestTimeout:5011,ooeTooManyIncompleteRequests:5100,ooeRequestTokenUnavailable:5101,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,ooeCellFormatAmountBeyondLimits:8023,ooeMemoryFileLimit:11000,ooeNetworkProblemRetrieveFile:11001,ooeInvalidSliceSize:11002,ooeInvalidCallback:11101},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.ooeGetDataParametersConflict]={name:b.L_DataReadError,message:b.L_GetDataParametersConflict};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetColumns]={name:b.L_DataReadError,message:b.L_InvalidGetColumns};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRows]={name:b.L_DataReadError,message:b.L_InvalidGetRows};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidReadForBlankRow]={name:b.L_DataReadError,message:b.L_InvalidReadForBlankRow};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.ooeInvalidSetColumns]={name:b.L_DataWriteError,message:b.L_InvalidSetColumns};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetRows]={name:b.L_DataWriteError,message:b.L_InvalidSetRows};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataParametersConflict]={name:b.L_DataWriteError,message:b.L_SetDataParametersConflict};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.ooeInvalidColumnsForBinding]={name:b.L_InvalidBinding,message:b.L_InvalidColumnsForBinding};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.ooeBrowserAPINotSupported]={name:b.L_APINotSupported,message:b.L_BrowserAPINotSupported};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTimeout]={name:b.L_APICallFailed,message:b.L_RequestTimeout};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeTooManyIncompleteRequests]={name:b.L_APICallFailed,message:b.L_TooManyIncompleteRequests};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTokenUnavailable]={name:b.L_APICallFailed,message:b.L_RequestTokenUnavailable};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.ooeCellDataAmountBeyondLimits]={name:b.L_DataWriteReminder,message:b.L_CellDataAmountBeyondLimits};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};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellFormatAmountBeyondLimits]={name:b.L_FormattingReminder,message:b.L_CellFormatAmountBeyondLimits};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeMemoryFileLimit]={name:b.L_MemoryLimit,message:b.L_CloseFileBeforeRetrieve};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeNetworkProblemRetrieveFile]={name:b.L_NetworkProblem,message:b.L_NetworkProblemRetrieveFile};a[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize]={name:b.L_InvalidValue,message:b.L_SliceSizeNotSupported}}}}();Microsoft.Office.WebExtension.ApplicationMode={WebEditor:"webEditor",WebViewer:"webViewer",Client:"client"};Microsoft.Office.WebExtension.DocumentMode={ReadOnly:"readOnly",ReadWrite:"readWrite"};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.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.Context=function(c,e,f,b,d){var a=this;OSF.OUtil.defineEnumerableProperties(a,{contentLanguage:{value:c.get_dataLocale()},displayLanguage:{value:c.get_appUILocale()}});e&&OSF.OUtil.defineEnumerableProperty(a,"document",{value:e});f&&OSF.OUtil.defineEnumerableProperty(a,"license",{value:f});if(b){var g=b.displayName||"appOM";delete b.displayName;OSF.OUtil.defineEnumerableProperty(a,g,{value:b})}d&&OSF.OUtil.defineEnumerableProperty(a,"officeTheme",{"get":function(){return d()}})};OSF.DDA.OutlookContext=function(c,a,d,e,b){OSF.DDA.OutlookContext.uber.constructor.call(this,c,null,d,e,b);a&&OSF.OUtil.defineEnumerableProperty(this,"roamingSettings",{value:a})};OSF.OUtil.extend(OSF.DDA.OutlookContext,OSF.DDA.Context);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(d,b,e){var a=this;OSF.DDA.JsomDocument.uber.constructor.call(a,d,e);b&&OSF.OUtil.defineEnumerableProperty(a,"bindings",{"get":function(){return b}});var c=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(a,[c.GetSelectedDataAsync,c.SetSelectedDataAsync]);OSF.DDA.DispIdHost.addEventSupport(a,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged]))};OSF.OUtil.extend(OSF.DDA.JsomDocument,OSF.DDA.Document);OSF.OUtil.defineEnumerableProperty(Microsoft.Office.WebExtension,"context",{"get":function(){var a;if(OSF&&OSF._OfficeAppFactory)a=OSF._OfficeAppFactory.getContext();return a}});OSF.DDA.License=function(a){OSF.OUtil.defineEnumerableProperty(this,"value",{value:a})};OSF.OUtil.setNamespace("AsyncResultEnum",OSF.DDA);OSF.DDA.AsyncResultEnum.Properties={Context:"Context",Value:"Value",Status:"Status",Error:"Error"};Microsoft.Office.WebExtension.AsyncResultStatus={Succeeded:"succeeded",Failed:"failed"};OSF.DDA.AsyncResultEnum.ErrorCode={Success:0,Failed:1};OSF.DDA.AsyncResultEnum.ErrorProperties={Name:"Name",Message:"Message",Code:"Code"};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.AsyncMethodCall=function(d,e,g,i,j,h,m){var b="function",a=d.length,c=OSF.OUtil.delayExecutionAndCache(function(){return OSF.OUtil.formatString(Strings.OfficeOM.L_InvalidParameters,m)});function f(d,f){for(var e in d){var a=d[e],b=f[e];if(a["enum"])switch(typeof b){case "string":if(OSF.OUtil.listContainsValue(a["enum"],b))break;case "undefined":throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration;break;default:throw c()}if(a["types"])if(!OSF.OUtil.listContainsValue(a["types"],typeof b))throw c()}}function k(h,m,k){if(h.length<a)throw Error.parameterCount(Strings.OfficeOM.L_MissingRequiredArguments);for(var e=[],b=0;b<a;b++)e.push(h[b]);f(d,e);var j={};for(b=0;b<a;b++){var g=d[b],i=e[b];if(g.verify){var l=g.verify(i,m,k);if(!l)throw c()}j[g.name]=i}return j}function l(k,m,o,n){if(k.length>a+2)throw Error.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(var c,d,l=k.length-1;l>=a;l--){var j=k[l];switch(typeof j){case "object":if(c)throw Error.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else c=j;break;case b:if(d)throw Error.parameterCount(Strings.OfficeOM.L_TooManyOptionalFunction);else d=j;break;default:throw Error.argument(Strings.OfficeOM.L_InValidOptionalArgument)}}c=c||{};for(var i in e)if(!OSF.OUtil.listContainsKey(c,i)){var h=undefined,g=e[i];if(g.calculate&&m)h=g.calculate(m,o,n);if(!h&&g.defaultValue!==undefined)h=g.defaultValue;c[i]=h}if(d)if(c[Microsoft.Office.WebExtension.Parameters.Callback])throw Strings.OfficeOM.L_RedundantCallbackSpecification;else c[Microsoft.Office.WebExtension.Parameters.Callback]=d;f(e,c);return c}this.verifyAndExtractCall=function(e,c,b){var d=k(e,c,b),f=l(e,d,c,b),a={};for(var j in d)a[j]=d[j];for(var i in f)a[i]=f[i];for(var m in g)a[m]=g[m](c,b);if(h)a=h(a,c,b);return a};this.processResponse=function(c,b,e,d){var a;if(c==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)if(i)a=i(b,e,d);else a=b;else if(j)a=j(c,b);else a=OSF.DDA.ErrorCodeManager.getErrorArgs(c);return a};this.getCallArgs=function(g){for(var c,d,f=g.length-1;f>=a;f--){var e=g[f];switch(typeof e){case "object":c=e;break;case b:d=e}}c=c||{};if(d)c[Microsoft.Office.WebExtension.Parameters.Callback]=d;return c}};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.AsyncMethodCalls={};OSF.DDA.AsyncMethodCalls.define=function(a){OSF.DDA.AsyncMethodCalls[a.method.id]=OSF.DDA.AsyncMethodCallFactory.manufacture(a)};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.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.ListType=function(){var a={};return {setListType:function(c,b){a[c]=b},isListType:function(b){return OSF.OUtil.listContainsKey(a,b)},getDescriptor:function(b){return a[b]}}}();OSF.DDA.HostParameterMap=function(a,c){var j="fromHost",b=this,i="toHost",e=j,g="self",d={};d[Microsoft.Office.WebExtension.Parameters.Data]={toHost:function(a){if(a!=null&&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}};d[Microsoft.Office.WebExtension.Parameters.SampleData]=d[Microsoft.Office.WebExtension.Parameters.Data];function f(j,i){var m=j?{}:undefined;for(var h in j){var g=j[h],b;if(OSF.DDA.ListType.isListType(h)){b=[];for(var n in g)b.push(f(g[n],i))}else if(OSF.OUtil.listContainsKey(d,h))b=d[h][i](g);else if(i==e&&a.preserveNesting(h))b=f(g,i);else{var k=c[h];if(k){var l=k[i];if(l){b=l[g];if(b===undefined)b=g}}else b=g}m[h]=b}return m}function k(j,h){var e;for(var b in h){var d;if(a.isComplexType(b))d=k(j,c[b][i]);else d=j[b];if(d!=undefined){if(!e)e={};var f=h[b];if(f==g)f=b;e[f]=a.pack(b,d)}}return e}function h(k,j,f){if(!f)f={};for(var d in j){var l=j[d],b;if(l==g)b=k;else b=k[l];if(b===null||b===undefined)f[d]=undefined;else{b=a.unpack(d,b);var i;if(a.isComplexType(d)){i=c[d][e];if(a.preserveNesting(d))f[d]=h(b,i);else h(b,i,f)}else{if(OSF.DDA.ListType.isListType(d)){i={};var n=OSF.DDA.ListType.getDescriptor(d);i[n]=g;for(var m in b)b[m]=h(b[m],i)}f[d]=b}}}return f}function l(l,e,a){var d=c[l][a],b;if(a=="toHost"){var i=f(e,a);b=k(i,d)}else if(a==j){var g=h(e,d);b=f(g,a)}return b}if(!c)c={};b.addMapping=function(l,h){var a,d;if(h.map){a=h.map;d={};for(var j in a){var k=a[j];if(k==g)k=j;d[k]=j}}else{a=h.toHost;d=h.fromHost}var b=c[l];if(b){var f=b[i];for(var n in f)a[n]=f[n];f=b[e];for(var m in f)d[m]=f[m]}else b=c[l]={};b[i]=a;b[e]=d};b.toHost=function(b,a){return l(b,a,i)};b.fromHost=function(a,b){return l(a,b,e)};b.self=g;b.addComplexType=function(b){a.addComplexType(b)};b.getDynamicType=function(b){return a.getDynamicType(b)};b.setDynamicType=function(c,b){a.setDynamicType(c,b)};b.dynamicTypes=d;b.doMapValues=function(a,b){return f(a,b)}};OSF.DDA.SpecialProcessor=function(c,b){var a=this;a.addComplexType=function(a){c.push(a)};a.getDynamicType=function(a){return b[a]};a.setDynamicType=function(c,a){b[c]=a};a.isComplexType=function(a){return OSF.OUtil.listContainsValue(c,a)};a.isDynamicType=function(a){return OSF.OUtil.listContainsKey(b,a)};a.preserveNesting=function(b){var a=[];OSF.DDA.PropertyDescriptors&&a.push(OSF.DDA.PropertyDescriptors.Subset);if(OSF.DDA.DataNodeEventProperties)a=a.concat([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.getDecoratedParameterMap=function(d,c){var a=new OSF.DDA.HostParameterMap(d),f=a.self;function b(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}a.define=function(c){var d={},e=b(c.toHost);if(c.invertible)d.map=e;else if(c.canonical)d.toHost=d.fromHost=e;else{d.toHost=e;d.fromHost=b(c.fromHost)}a.addMapping(c.type,d);c.isComplexType&&a.addComplexType(c.type)};for(var e in c)a.define(c[e]);return a};OSF.OUtil.setNamespace("DispIdHost",OSF.DDA);OSF.DDA.DispIdHost.Methods={InvokeMethod:"invokeMethod",AddEventHandler:"addEventHandler",RemoveEventHandler:"removeEventHandler"};OSF.DDA.DispIdHost.Delegates={ExecuteAsync:"executeAsync",RegisterEventAsync:"registerEventAsync",UnregisterEventAsync:"unregisterEventAsync",ParameterMap:"parameterMap"};OSF.DDA.DispIdHost.Facade=function(e,b){var c={},d=OSF.DDA.AsyncMethodNames,a=OSF.DDA.MethodDispId,i={GoToByIdAsync:a.dispidNavigateToMethod,GetSelectedDataAsync:a.dispidGetSelectedDataMethod,SetSelectedDataAsync:a.dispidSetSelectedDataMethod,GetDocumentCopyChunkAsync:a.dispidGetDocumentCopyChunkMethod,ReleaseDocumentCopyAsync:a.dispidReleaseDocumentCopyMethod,GetDocumentCopyAsync:a.dispidGetDocumentCopyMethod,AddFromSelectionAsync:a.dispidAddBindingFromSelectionMethod,AddFromPromptAsync:a.dispidAddBindingFromPromptMethod,AddFromNamedItemAsync:a.dispidAddBindingFromNamedItemMethod,GetAllAsync:a.dispidGetAllBindingsMethod,GetByIdAsync:a.dispidGetBindingMethod,ReleaseByIdAsync:a.dispidReleaseBindingMethod,GetDataAsync:a.dispidGetBindingDataMethod,SetDataAsync:a.dispidSetBindingDataMethod,AddRowsAsync:a.dispidAddRowsMethod,AddColumnsAsync:a.dispidAddColumnsMethod,DeleteAllDataValuesAsync:a.dispidClearAllRowsMethod,RefreshAsync:a.dispidLoadSettingsMethod,SaveAsync:a.dispidSaveSettingsMethod,GetActiveViewAsync:a.dispidGetActiveViewMethod,GetFilePropertiesAsync:a.dispidGetFilePropertiesMethod,GetOfficeThemeAsync:a.dispidGetOfficeThemeMethod,GetDocumentThemeAsync:a.dispidGetDocumentThemeMethod,ClearFormatsAsync:a.dispidClearFormatsMethod,SetTableOptionsAsync:a.dispidSetTableOptionsMethod,SetFormatsAsync:a.dispidSetFormatsMethod,ExecuteRichApiRequestAsync:a.dispidExecuteRichApiRequestMethod,AppCommandInvocationCompletedAsync:a.dispidAppCommandInvocationCompletedMethod,AddDataPartAsync:a.dispidAddDataPartMethod,GetDataPartByIdAsync:a.dispidGetDataPartByIdMethod,GetDataPartsByNameSpaceAsync:a.dispidGetDataPartsByNamespaceMethod,GetPartXmlAsync:a.dispidGetDataPartXmlMethod,GetPartNodesAsync:a.dispidGetDataPartNodesMethod,DeleteDataPartAsync:a.dispidDeleteDataPartMethod,GetNodeValueAsync:a.dispidGetDataNodeValueMethod,GetNodeXmlAsync:a.dispidGetDataNodeXmlMethod,GetRelativeNodesAsync:a.dispidGetDataNodesMethod,SetNodeValueAsync:a.dispidSetDataNodeValueMethod,SetNodeXmlAsync:a.dispidSetDataNodeXmlMethod,AddDataPartNamespaceAsync:a.dispidAddDataNamespaceMethod,GetDataPartNamespaceAsync:a.dispidGetDataUriByPrefixMethod,GetDataPartPrefixAsync:a.dispidGetDataPrefixByUriMethod,GetSelectedTask:a.dispidGetSelectedTaskMethod,GetTask:a.dispidGetTaskMethod,GetWSSUrl:a.dispidGetWSSUrlMethod,GetTaskField:a.dispidGetTaskFieldMethod,GetSelectedResource:a.dispidGetSelectedResourceMethod,GetResourceField:a.dispidGetResourceFieldMethod,GetProjectField:a.dispidGetProjectFieldMethod,GetSelectedView:a.dispidGetSelectedViewMethod,GetTaskByIndex:a.dispidGetTaskByIndexMethod,GetResourceByIndex:a.dispidGetResourceByIndexMethod,SetTaskField:a.dispidSetTaskFieldMethod,SetResourceField:a.dispidSetResourceFieldMethod,GetMaxTaskIndex:a.dispidGetMaxTaskIndexMethod,GetMaxResourceIndex:a.dispidGetMaxResourceIndexMethod};for(var g in i)if(d[g])c[d[g].id]=i[g];d=Microsoft.Office.WebExtension.EventType;a=OSF.DDA.EventDispId;var j={SettingsChanged:a.dispidSettingsChangedEvent,DocumentSelectionChanged:a.dispidDocumentSelectionChangedEvent,BindingSelectionChanged:a.dispidBindingSelectionChangedEvent,BindingDataChanged:a.dispidBindingDataChangedEvent,ActiveViewChanged:a.dispidActiveViewChangedEvent,OfficeThemeChanged:a.dispidOfficeThemeChangedEvent,DocumentThemeChanged:a.dispidDocumentThemeChangedEvent,AppCommandInvoked:a.dispidAppCommandInvokedEvent,TaskSelectionChanged:a.dispidTaskSelectionChangedEvent,ResourceSelectionChanged:a.dispidResourceSelectionChangedEvent,ViewSelectionChanged:a.dispidViewSelectionChangedEvent,DataNodeInserted:a.dispidDataNodeAddedEvent,DataNodeReplaced:a.dispidDataNodeReplacedEvent,DataNodeDeleted:a.dispidDataNodeDeletedEvent};for(var h in j)if(d[h])c[d[h]]=j[h];function f(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}this[OSF.DDA.DispIdHost.Methods.InvokeMethod]=function(o,j,k,m){var a;try{var h=o.id,d=OSF.DDA.AsyncMethodCalls[h];a=d.verifyAndExtractCall(j,k,m);var i=c[h],n=e(h),g;if(b.toHost)g=b.toHost(i,a);else g=a;n[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]({dispId:i,hostCallArgs:g,onCalling:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall)},onReceiving:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse)},onComplete:function(f,e){var c;if(f==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)if(b.fromHost)c=b.fromHost(i,e);else c=e;else c=e;var g=d.processResponse(f,c,k,a);OSF.DDA.issueAsyncResult(a,f,g)}})}catch(l){f(l,d,j,a)}};this[OSF.DDA.DispIdHost.Methods.AddEventHandler]=function(j,g,h){var d,a,l;function i(b){if(b==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess){var e=g.addEventHandler(a,l);if(!e)b=OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerAdditionFailed}var c;if(b!=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)c=OSF.DDA.ErrorCodeManager.getErrorArgs(b);OSF.DDA.issueAsyncResult(d,b,c)}try{var k=OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.AddHandlerAsync.id];d=k.verifyAndExtractCall(j,h,g);a=d[Microsoft.Office.WebExtension.Parameters.EventType];l=d[Microsoft.Office.WebExtension.Parameters.Handler];if(g.getEventHandlerCount(a)==0){var m=c[a],o=e(a)[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync];o({eventType:a,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(c){var d=b.fromHost(m,c);g.fireEvent(OSF.DDA.OMFactory.manufactureEventArgs(a,h,d))}})}else i(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)}catch(n){f(n,k,j,d)}};this[OSF.DDA.DispIdHost.Methods.RemoveEventHandler]=function(k,d,m){var b,a,h;function j(a){var c;if(a!=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)c=OSF.DDA.ErrorCodeManager.getErrorArgs(a);OSF.DDA.issueAsyncResult(b,a,c)}try{var l=OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.RemoveHandlerAsync.id];b=l.verifyAndExtractCall(k,m,d);a=b[Microsoft.Office.WebExtension.Parameters.EventType];h=b[Microsoft.Office.WebExtension.Parameters.Handler];var i,g;if(h===null){g=d.clearEventHandlers(a);i=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess}else{g=d.removeEventHandler(a,h);i=g?OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess:OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist}if(g&&d.getEventHandlerCount(a)==0){var p=c[a],o=e(a)[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync];o({eventType:a,dispId:p,targetId:m.id||"",onCalling:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall)},onReceiving:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse)},onComplete:j})}else j(i)}catch(n){f(n,l,k,b)}}};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.OUtil.setNamespace("SafeArray",OSF.DDA);OSF.DDA.SafeArray.Response={Status:0,Payload:1};OSF.DDA.SafeArray.UniqueArguments={Offset:"offset",Run:"run",BindingSpecificData:"bindingSpecificData",MergedCellGuid:"{66e7831f-81b2-42e2-823c-89e872d541b3}"};OSF.OUtil.setNamespace("Delegate",OSF.DDA.SafeArray);OSF.DDA.SafeArray.Delegate._onException=function(d,c){var a,b=d.number;if(b)switch(b){case -2146828218:a=OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability;break;case -2146827850:default:a=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError}c.onComplete&&c.onComplete(a||OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError)};OSF.DDA.SafeArray.Delegate.SpecialProcessor=function(){function a(a){var b;try{var h=a.ubound(1),d=a.ubound(2);a=a.toArray();if(h==1&&d==1)b=[a];else{b=[];for(var f=0;f<h;f++){for(var c=[],e=0;e<d;e++){var g=a[f*d+e];g!=OSF.DDA.SafeArray.UniqueArguments.MergedCellGuid&&c.push(g)}c.length>0&&b.push(c)}}}catch(i){}return b}var c=[],b={};b[Microsoft.Office.WebExtension.Parameters.Data]=function(){var c=0,b=1;return {toHost:function(a){if(typeof a!="string"&&a[OSF.DDA.TableDataProperties.TableRows]!==undefined){var d=[];d[c]=a[OSF.DDA.TableDataProperties.TableRows];d[b]=a[OSF.DDA.TableDataProperties.TableHeaders];a=d}return a},fromHost:function(f){var e;if(f.toArray){var g=f.dimensions();if(g===2)e=a(f);else{var d=f.toArray();if(d.length===2&&(d[0]!=null&&d[0].toArray||d[1]!=null&&d[1].toArray)){e={};e[OSF.DDA.TableDataProperties.TableRows]=a(d[c]);e[OSF.DDA.TableDataProperties.TableHeaders]=a(d[b])}else e=d}}else e=f;return e}}}();OSF.DDA.SafeArray.Delegate.SpecialProcessor.uber.constructor.call(this,c,b);this.unpack=function(c,a){var d;if(this.isComplexType(c)||OSF.DDA.ListType.isListType(c)){var e=(a||typeof a==="unknown")&&a.toArray;d=e?a.toArray():a||{}}else if(this.isDynamicType(c))d=b[c].fromHost(a);else d=a;return d}};OSF.OUtil.extend(OSF.DDA.SafeArray.Delegate.SpecialProcessor,OSF.DDA.SpecialProcessor);OSF.DDA.SafeArray.Delegate.ParameterMap=OSF.DDA.getDecoratedParameterMap(new OSF.DDA.SafeArray.Delegate.SpecialProcessor,[{type:Microsoft.Office.WebExtension.Parameters.ValueFormat,toHost:[{name:Microsoft.Office.WebExtension.ValueFormat.Unformatted,value:0},{name:Microsoft.Office.WebExtension.ValueFormat.Formatted,value:1}]},{type:Microsoft.Office.WebExtension.Parameters.FilterType,toHost:[{name:Microsoft.Office.WebExtension.FilterType.All,value:0}]}]);OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.AsyncResultStatus,fromHost:[{name:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded,value:0},{name:Microsoft.Office.WebExtension.AsyncResultStatus.Failed,value:1}]});OSF.DDA.SafeArray.Delegate.executeAsync=function(a){function b(a){var c=a;if(OSF.OUtil.isArray(a))for(var f=c.length,d=0;d<f;d++)c[d]=b(c[d]);else if(OSF.OUtil.isDate(a))c=a.getVarDate();else if(typeof a==="object"&&!OSF.OUtil.isArray(a)){c=[];for(var e in a)if(!OSF.OUtil.isFunction(a[e]))c[e]=b(a[e])}return c}try{a.onCalling&&a.onCalling();var d=(new Date).getTime();OSF.ClientHostController.execute(a.dispId,b(a.hostCallArgs),function(g){a.onReceiving&&a.onReceiving();var b=g.toArray(),f=b[OSF.DDA.SafeArray.Response.Status];if(a.onComplete){var c;if(f==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)if(b.length>2){c=[];for(var e=1;e<b.length;e++)c[e-1]=b[e]}else c=b[OSF.DDA.SafeArray.Response.Payload];else c=b[OSF.DDA.SafeArray.Response.Payload];a.onComplete(f,c)}OSF.AppTelemetry&&OSF.AppTelemetry.onMethodDone(a.dispId,a.hostCallArgs,Math.abs((new Date).getTime()-d),f)})}catch(c){OSF.DDA.SafeArray.Delegate._onException(c,a)}};OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent=function(c,a){var b=(new Date).getTime();return function(d){a.onReceiving&&a.onReceiving();var e=d.toArray?d.toArray()[OSF.DDA.SafeArray.Response.Status]:d;a.onComplete&&a.onComplete(e);OSF.AppTelemetry&&OSF.AppTelemetry.onRegisterDone(c,a.dispId,Math.abs((new Date).getTime()-b),e)}};OSF.DDA.SafeArray.Delegate.registerEventAsync=function(a){a.onCalling&&a.onCalling();var c=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(true,a);try{OSF.ClientHostController.registerEvent(a.dispId,a.targetId,function(c,b){a.onEvent&&a.onEvent(b);OSF.AppTelemetry&&OSF.AppTelemetry.onEventDone(a.dispId)},c)}catch(b){OSF.DDA.SafeArray.Delegate._onException(b,a)}};OSF.DDA.SafeArray.Delegate.unregisterEventAsync=function(a){a.onCalling&&a.onCalling();var c=OSF.DDA.SafeArray.Delegate._getOnAfterRegisterEvent(false,a);try{OSF.ClientHostController.unregisterEvent(a.dispId,a.targetId,c)}catch(b){OSF.DDA.SafeArray.Delegate._onException(b,a)}};(function(){var a="undefined",c=function(){var d=function(a){a&&OSF.OUtil.loadScript(a,function(){Sys.Debug.trace("loaded customized script:"+a)})},f,h,b,c=null,g=OSF.OUtil.parseXdmInfo();if(g){b=OSF.OUtil.getInfoItems(g);if(b&&b.length>=3){f=b[0];h=b[2];c=Microsoft.Office.Common.XdmCommunicationManager.connect(f,window.parent,h)}}var e=null;if(!c){try{if(typeof window.external.getCustomizedScriptPath!==a)e=window.external.getCustomizedScriptPath()}catch(i){Sys.Debug.trace("no script override through window.external.")}d(e)}else try{c.invoke("getCustomizedScriptPathAsync",function(b,a){d(b===0?a:null)},{__timeout__:1e3})}catch(i){Sys.Debug.trace("no script override through cross frame communication.")}},b=function(){var b="function";if(typeof Sys!==a&&typeof Type!==a&&Sys.StringBuilder&&typeof Sys.StringBuilder===b&&Type.registerNamespace&&typeof Type.registerNamespace===b&&Type.registerClass&&typeof Type.registerClass===b)return true;else return false};if(b())c();else if(typeof Function!==a){var d=(window.location.protocol.toLowerCase()==="https:"?"https:":"http:")+"//ajax.aspnetcdn.com/ajax/3.5/MicrosoftAjax.js";OSF.OUtil.loadScript(d,function(){if(b())c();else if(typeof Function!==a)throw"Not able to load MicrosoftAjax.js."})}})();OSF.ClientMode={ReadWrite:0,ReadOnly:1};OSF.DDA.RichInitializationReason={1:Microsoft.Office.WebExtension.InitializationReason.Inserted,2:Microsoft.Office.WebExtension.InitializationReason.DocumentOpened};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;a._initializeSettings=a.initializeSettings};OSF.InitializationHelper.prototype.deserializeSettings=function(b,f){var d,c=OSF.OUtil.getSessionStorage();if(c){var a=c.getItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey());if(a)b=JSON?JSON.parse(a):Sys.Serialization.JavaScriptSerializer.deserialize(a,true);else{a=JSON?JSON.stringify(b):Sys.Serialization.JavaScriptSerializer.serialize(b);c.setItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey(),a)}}var e=OSF.DDA.SettingsManager.deserializeSettings(b);if(f)d=new OSF.DDA.RefreshableSettings(e);else d=new OSF.DDA.Settings(e);return d};OSF.InitializationHelper.prototype.setAgaveHostCommunication=function(){};OSF.InitializationHelper.prototype.prepareRightBeforeWebExtensionInitialize=function(a){var f=new OSF.DDA.License(a.get_eToken()),e=OSF.DDA.OfficeTheme&&OSF.DDA.OfficeTheme.getOfficeTheme?OSF.DDA.OfficeTheme.getOfficeTheme:null;OSF._OfficeAppFactory.setContext(new OSF.DDA.Context(a,a.doc,f,null,e));var c,d,b=a.get_reason();c=OSF.DDA.DispIdHost.getClientDelegateMethods;d=OSF.DDA.SafeArray.Delegate.ParameterMap;b=OSF.DDA.RichInitializationReason[b];OSF._OfficeAppFactory.setHostFacade(new OSF.DDA.DispIdHost.Facade(c,d));Microsoft.Office.WebExtension.initialize(b)};OSF.DDA.DispIdHost.getClientDelegateMethods=function(b){var a={};a[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]=OSF.DDA.SafeArray.Delegate.executeAsync;a[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync]=OSF.DDA.SafeArray.Delegate.registerEventAsync;a[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync]=OSF.DDA.SafeArray.Delegate.unregisterEventAsync;if(OSF.DDA.AsyncMethodNames.RefreshAsync&&b==OSF.DDA.AsyncMethodNames.RefreshAsync.id){var d=function(c,b,a){return OSF.DDA.ClientSettingsManager.read(b,a)};a[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]=OSF.DDA.ClientSettingsManager.getSettingsExecuteMethod(d)}if(OSF.DDA.AsyncMethodNames.SaveAsync&&b==OSF.DDA.AsyncMethodNames.SaveAsync.id){var c=function(a,c,b){return OSF.DDA.ClientSettingsManager.write(a[OSF.DDA.SettingsManager.SerializedSettings],a[Microsoft.Office.WebExtension.Parameters.OverwriteIfStale],c,b)};a[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]=OSF.DDA.ClientSettingsManager.getSettingsExecuteMethod(c)}return a};var OSFRichclient;(function(b){var a=function(){function a(){}a.prototype.execute=function(c,b,a){window.external.Execute(c,b,a)};a.prototype.registerEvent=function(d,b,c,a){window.external.RegisterEvent(d,b,c,a)};a.prototype.unregisterEvent=function(c,b,a){window.external.UnregisterEvent(c,b,a)};return a}();b.RichClientHostController=a})(OSFRichclient||(OSFRichclient={}));OSF.ClientHostController=new OSFRichclient.RichClientHostController;var OfficeExt;(function(a){(function(c){var b=function(){var a=null;function b(){this._osfOfficeTheme=a;this._osfOfficeThemeTimeStamp=a}b.prototype.getOfficeTheme=function(){var c="GetOfficeThemeInfo",a=this;if(OSF.DDA._OsfControlContext){if(a._osfOfficeTheme&&a._osfOfficeThemeTimeStamp&&(new Date).getTime()-a._osfOfficeThemeTimeStamp<b._osfOfficeThemeCacheValidPeriod)OSF.AppTelemetry&&OSF.AppTelemetry.onPropertyDone(c,0);else{var g=(new Date).getTime(),f=OSF.DDA._OsfControlContext.GetOfficeThemeInfo(),d=(new Date).getTime();OSF.AppTelemetry&&OSF.AppTelemetry.onPropertyDone(c,Math.abs(d-g));a._osfOfficeTheme=JSON.parse(f);for(var e in a._osfOfficeTheme)a._osfOfficeTheme[e]=OSF.OUtil.convertIntToCssHexColor(a._osfOfficeTheme[e]);a._osfOfficeThemeTimeStamp=d}return a._osfOfficeTheme}};b.instance=function(){if(b._instance==a)b._instance=new b;return b._instance};b._osfOfficeThemeCacheValidPeriod=5e3;b._instance=a;return b}();c.OfficeThemeManager=b;OSF.OUtil.setNamespace("OfficeTheme",OSF.DDA);OSF.DDA.OfficeTheme.getOfficeTheme=a.OfficeTheme.OfficeThemeManager.instance().getOfficeTheme})(a.OfficeTheme||(a.OfficeTheme={}));var b=a.OfficeTheme})(OfficeExt||(OfficeExt={}));OSF.DDA.ClientSettingsManager={getSettingsExecuteMethod:function(a){return function(b){var d,c;try{c=a(b.hostCallArgs,b.onCalling,b.onReceiving);d=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess}catch(e){d=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError;c={name:Strings.OfficeOM.L_InternalError,message:e}}b.onComplete&&b.onComplete(d,c)}},read:function(e,d){var b=[],f=[];e&&e();window.external.GetContext().GetSettings().Read(b,f);d&&d();for(var c={},a=0;a<b.length;a++)c[b[a]]=f[a];return c},write:function(a,g,c,b){var e=[],d=[];for(var f in a){e.push(f);d.push(a[f])}c&&c();window.external.GetContext().GetSettings().Write(e,d);b&&b()}};OSF.InitializationHelper.prototype.initializeSettings=function(b){var a=OSF.DDA.ClientSettingsManager.read(),c=this.deserializeSettings(a,b);return c};OSF.InitializationHelper.prototype.getAppContext=function(u,j){var h="undefined",c,a=OSF.DDA._OsfControlContext=window.external.GetContext(),d=a.GetAppType(),e=false;for(var m in OSF.AppName)if(OSF.AppName[m]==d){e=true;break}if(!e)throw"Unsupported client type "+d;var t=a.GetSolutionRef(),p=a.GetAppVersionMajor(),o=a.GetAppUILocale(),l=a.GetAppDataLocale(),q=a.GetDocUrl(),k=a.GetAppCapabilities(),r=a.GetActivationMode(),i=a.GetControlIntegrationLevel(),n=[],b;try{b=a.GetSolutionToken()}catch(s){}var g;if(typeof a.GetCorrelationId!==h)g=a.GetCorrelationId();var f;if(typeof a.GetInstanceId!==h)f=a.GetInstanceId();b=b?b.toString():"";c=new OSF.OfficeAppContext(t,d,p,o,l,q,k,n,r,i,b,g,f);OSF.AppTelemetry&&OSF.AppTelemetry.initialize(c);j(c)};var OSFLog;(function(g){var e="SessionId",d="ErrorResult",b="AssetId",c="CorrelationId",a=true,f=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}();g.BaseUsageData=f;var l=function(t){var s="Stage11Time",r="Stage10Time",q="Stage9Time",p="Stage8Time",o="Stage7Time",n="Stage6Time",m="Stage5Time",l="Stage4Time",k="Stage3Time",j="Stage2Time",i="Stage1Time",h="InstanceId",g="ActivationInfo",f="AppInfo";__extends(e,t);function e(){t.call(this,"AppLoadTime")}Object.defineProperty(e.prototype,c,{"get":function(){return this.Fields[c]},"set":function(a){this.Fields[c]=a},enumerable:a,configurable:a});Object.defineProperty(e.prototype,f,{"get":function(){return this.Fields[f]},"set":function(a){this.Fields[f]=a},enumerable:a,configurable:a});Object.defineProperty(e.prototype,g,{"get":function(){return this.Fields[g]},"set":function(a){this.Fields[g]=a},enumerable:a,configurable:a});Object.defineProperty(e.prototype,h,{"get":function(){return this.Fields[h]},"set":function(a){this.Fields[h]=a},enumerable:a,configurable:a});Object.defineProperty(e.prototype,b,{"get":function(){return this.Fields[b]},"set":function(a){this.Fields[b]=a},enumerable:a,configurable:a});Object.defineProperty(e.prototype,i,{"get":function(){return this.Fields[i]},"set":function(a){this.Fields[i]=a},enumerable:a,configurable:a});Object.defineProperty(e.prototype,j,{"get":function(){return this.Fields[j]},"set":function(a){this.Fields[j]=a},enumerable:a,configurable:a});Object.defineProperty(e.prototype,k,{"get":function(){return this.Fields[k]},"set":function(a){this.Fields[k]=a},enumerable:a,configurable:a});Object.defineProperty(e.prototype,l,{"get":function(){return this.Fields[l]},"set":function(a){this.Fields[l]=a},enumerable:a,configurable:a});Object.defineProperty(e.prototype,m,{"get":function(){return this.Fields[m]},"set":function(a){this.Fields[m]=a},enumerable:a,configurable:a});Object.defineProperty(e.prototype,n,{"get":function(){return this.Fields[n]},"set":function(a){this.Fields[n]=a},enumerable:a,configurable:a});Object.defineProperty(e.prototype,o,{"get":function(){return this.Fields[o]},"set":function(a){this.Fields[o]=a},enumerable:a,configurable:a});Object.defineProperty(e.prototype,p,{"get":function(){return this.Fields[p]},"set":function(a){this.Fields[p]=a},enumerable:a,configurable:a});Object.defineProperty(e.prototype,q,{"get":function(){return this.Fields[q]},"set":function(a){this.Fields[q]=a},enumerable:a,configurable:a});Object.defineProperty(e.prototype,r,{"get":function(){return this.Fields[r]},"set":function(a){this.Fields[r]=a},enumerable:a,configurable:a});Object.defineProperty(e.prototype,s,{"get":function(){return this.Fields[s]},"set":function(a){this.Fields[s]=a},enumerable:a,configurable:a});Object.defineProperty(e.prototype,d,{"get":function(){return this.Fields[d]},"set":function(a){this.Fields[d]=a},enumerable:a,configurable:a});e.prototype.SerializeFields=function(){var a=this;a.SetSerializedField(c,a.CorrelationId);a.SetSerializedField(f,a.AppInfo);a.SetSerializedField(g,a.ActivationInfo);a.SetSerializedField(h,a.InstanceId);a.SetSerializedField(b,a.AssetId);a.SetSerializedField(i,a.Stage1Time);a.SetSerializedField(j,a.Stage2Time);a.SetSerializedField(k,a.Stage3Time);a.SetSerializedField(l,a.Stage4Time);a.SetSerializedField(m,a.Stage5Time);a.SetSerializedField(n,a.Stage6Time);a.SetSerializedField(o,a.Stage7Time);a.SetSerializedField(p,a.Stage8Time);a.SetSerializedField(q,a.Stage9Time);a.SetSerializedField(r,a.Stage10Time);a.SetSerializedField(s,a.Stage11Time);a.SetSerializedField(d,a.ErrorResult)};return e}(f);g.AppLoadTimeUsageData=l;var j=function(f){var b="NotificationClickInfo";__extends(e,f);function e(){f.call(this,"AppNotification")}Object.defineProperty(e.prototype,c,{"get":function(){return this.Fields[c]},"set":function(a){this.Fields[c]=a},enumerable:a,configurable:a});Object.defineProperty(e.prototype,d,{"get":function(){return this.Fields[d]},"set":function(a){this.Fields[d]=a},enumerable:a,configurable:a});Object.defineProperty(e.prototype,b,{"get":function(){return this.Fields[b]},"set":function(a){this.Fields[b]=a},enumerable:a,configurable:a});e.prototype.SerializeFields=function(){var a=this;a.SetSerializedField(c,a.CorrelationId);a.SetSerializedField(d,a.ErrorResult);a.SetSerializedField(b,a.NotificationClickInfo)};return e}(f);g.AppNotificationUsageData=j;var k=function(o){var n="AppSizeHeight",m="AppSizeWidth",l="ClientId",k="HostVersion",j="Host",i="UserId",h="Browser",g="AppURL",f="AppId";__extends(d,o);function d(){o.call(this,"AppActivated")}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,b,{"get":function(){return this.Fields[b]},"set":function(a){this.Fields[b]=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});d.prototype.SerializeFields=function(){var a=this;a.SetSerializedField(c,a.CorrelationId);a.SetSerializedField(e,a.SessionId);a.SetSerializedField(f,a.AppId);a.SetSerializedField(g,a.AppURL);a.SetSerializedField(b,a.AssetId);a.SetSerializedField(h,a.Browser);a.SetSerializedField(i,a.UserId);a.SetSerializedField(j,a.Host);a.SetSerializedField(k,a.HostVersion);a.SetSerializedField(l,a.ClientId);a.SetSerializedField(m,a.AppSizeWidth);a.SetSerializedField(n,a.AppSizeHeight)};return d}(f);g.AppActivatedUsageData=k;var m=function(i){var g="CloseMethod",f="OpenTime",d="AppSizeFinalHeight",c="AppSizeFinalWidth",b="FocusTime";__extends(h,i);function h(){i.call(this,"AppClosed")}Object.defineProperty(h.prototype,e,{"get":function(){return this.Fields[e]},"set":function(a){this.Fields[e]=a},enumerable:a,configurable:a});Object.defineProperty(h.prototype,b,{"get":function(){return this.Fields[b]},"set":function(a){this.Fields[b]=a},enumerable:a,configurable:a});Object.defineProperty(h.prototype,c,{"get":function(){return this.Fields[c]},"set":function(a){this.Fields[c]=a},enumerable:a,configurable:a});Object.defineProperty(h.prototype,d,{"get":function(){return this.Fields[d]},"set":function(a){this.Fields[d]=a},enumerable:a,configurable:a});Object.defineProperty(h.prototype,f,{"get":function(){return this.Fields[f]},"set":function(a){this.Fields[f]=a},enumerable:a,configurable:a});Object.defineProperty(h.prototype,g,{"get":function(){return this.Fields[g]},"set":function(a){this.Fields[g]=a},enumerable:a,configurable:a});h.prototype.SerializeFields=function(){var a=this;a.SetSerializedField(e,a.SessionId);a.SetSerializedField(b,a.FocusTime);a.SetSerializedField(c,a.AppSizeFinalWidth);a.SetSerializedField(d,a.AppSizeFinalHeight);a.SetSerializedField(f,a.OpenTime);a.SetSerializedField(g,a.CloseMethod)};return h}(f);g.AppClosedUsageData=m;var n=function(i){var g="ErrorType",f="ResponseTime",d="Parameters",c="APIID",b="APIType";__extends(h,i);function h(){i.call(this,"APIUsage")}Object.defineProperty(h.prototype,e,{"get":function(){return this.Fields[e]},"set":function(a){this.Fields[e]=a},enumerable:a,configurable:a});Object.defineProperty(h.prototype,b,{"get":function(){return this.Fields[b]},"set":function(a){this.Fields[b]=a},enumerable:a,configurable:a});Object.defineProperty(h.prototype,c,{"get":function(){return this.Fields[c]},"set":function(a){this.Fields[c]=a},enumerable:a,configurable:a});Object.defineProperty(h.prototype,d,{"get":function(){return this.Fields[d]},"set":function(a){this.Fields[d]=a},enumerable:a,configurable:a});Object.defineProperty(h.prototype,f,{"get":function(){return this.Fields[f]},"set":function(a){this.Fields[f]=a},enumerable:a,configurable:a});Object.defineProperty(h.prototype,g,{"get":function(){return this.Fields[g]},"set":function(a){this.Fields[g]=a},enumerable:a,configurable:a});h.prototype.SerializeFields=function(){var a=this;a.SetSerializedField(e,a.SessionId);a.SetSerializedField(b,a.APIType);a.SetSerializedField(c,a.APIID);a.SetSerializedField(d,a.Parameters);a.SetSerializedField(f,a.ResponseTime);a.SetSerializedField(g,a.ErrorType)};return h}(f);g.APIUsageUsageData=n;var i=function(f){var c="OperationMetadata";__extends(e,f);function e(){f.call(this,"AppManagementMenu")}Object.defineProperty(e.prototype,b,{"get":function(){return this.Fields[b]},"set":function(a){this.Fields[b]=a},enumerable:a,configurable:a});Object.defineProperty(e.prototype,c,{"get":function(){return this.Fields[c]},"set":function(a){this.Fields[c]=a},enumerable:a,configurable:a});Object.defineProperty(e.prototype,d,{"get":function(){return this.Fields[d]},"set":function(a){this.Fields[d]=a},enumerable:a,configurable:a});e.prototype.SerializeFields=function(){var a=this;a.SetSerializedField(b,a.AssetId);a.SetSerializedField(c,a.OperationMetadata);a.SetSerializedField(d,a.ErrorResult)};return e}(f);g.AppManagementMenuUsageData=i;var h=function(i){var g="LastActiveTabCount",f="LastActiveTab",e="DialogState",d="TrustPageSessionTime",c="TotalSessionTime";__extends(h,i);function h(){i.call(this,"InsertionDialogSession")}Object.defineProperty(h.prototype,b,{"get":function(){return this.Fields[b]},"set":function(a){this.Fields[b]=a},enumerable:a,configurable:a});Object.defineProperty(h.prototype,c,{"get":function(){return this.Fields[c]},"set":function(a){this.Fields[c]=a},enumerable:a,configurable:a});Object.defineProperty(h.prototype,d,{"get":function(){return this.Fields[d]},"set":function(a){this.Fields[d]=a},enumerable:a,configurable:a});Object.defineProperty(h.prototype,e,{"get":function(){return this.Fields[e]},"set":function(a){this.Fields[e]=a},enumerable:a,configurable:a});Object.defineProperty(h.prototype,f,{"get":function(){return this.Fields[f]},"set":function(a){this.Fields[f]=a},enumerable:a,configurable:a});Object.defineProperty(h.prototype,g,{"get":function(){return this.Fields[g]},"set":function(a){this.Fields[g]=a},enumerable:a,configurable:a});h.prototype.SerializeFields=function(){var a=this;a.SetSerializedField(b,a.AssetId);a.SetSerializedField(c,a.TotalSessionTime);a.SetSerializedField(d,a.TrustPageSessionTime);a.SetSerializedField(e,a.DialogState);a.SetSerializedField(f,a.LastActiveTab);a.SetSerializedField(g,a.LastActiveTabCount)};return h}(f);g.InsertionDialogSessionUsageData=h})(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 e=a.TraceLevel;(function(a){a[a["none"]=0]="none";a[a["flush"]=1]="flush"})(a.SendFlag||(a.SendFlag={}));var f=a.SendFlag;function d(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=d;function b(){try{return new c}catch(a){return null}}var c=function(){function a(){var a=this,b=a;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)});a.loadProxyFrame()}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.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,"*")}};a.prototype.loadProxyFrame=function(){var a=this;a.proxyFrame=document.createElement("iframe");a.proxyFrame.setAttribute("style","display:none");a.proxyFrame.setAttribute("src",a.telemetryEndPoint);document.head.appendChild(a.proxyFrame)};return a}();if(!OSF.Logger)OSF.Logger=a;a.ulsEndpoint=b()})(Logger||(Logger={}));var OSFAppTelemetry;(function(c){var a=null;"use strict";var b,o=function(){function a(){}return a}(),d=function(){function a(b,a){this.name=b;this.handler=a}return a}(),e=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;OSF.Logger.sendLog(OSF.Logger.TraceLevel.info,a.SerializeRow(),OSF.Logger.SendFlag.none)};a.prototype.LogRawData=function(a){if(!OSF.Logger)return;OSF.Logger.sendLog(OSF.Logger.TraceLevel.info,a,OSF.Logger.SendFlag.none)};return a}();function m(f){if(!OSF.Logger)return;if(b)return;b=new o;b.sessionId=OSF.OUtil.Guid.generateNewGuid();b.hostVersion=f.get_appVersion();b.appId=f.get_id();b.host=f.get_appName();b.browser=window.navigator.userAgent;b.correlationId=f.get_correlationId();b.clientId=(new e).getClientId();var g=location.href.indexOf("?");b.appURL=g==-1?location.href:location.href.substring(0,g);(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}})(f.get_eToken(),b);(function(){var k=new Date,e=a,h=0,j=false,f=function(){if(document.hasFocus()){if(e==a)e=new Date}else if(e){h+=Math.abs((new Date).getTime()-e.getTime());e=a}},b=[];b.push(new d("focus",f));b.push(new d("blur",f));b.push(new d("focusout",f));b.push(new d("focusin",f));var i=function(){for(var d=0;d<b.length;d++)OSF.OUtil.removeEventListener(window,b[d].name,b[d].handler);b.length=0;if(!j){if(document.hasFocus()&&e){h+=Math.abs((new Date).getTime()-e.getTime());e=a}c.onAppClosed(Math.abs((new Date).getTime()-k.getTime()),h);j=true}};b.push(new d("beforeunload",i));b.push(new d("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=m;function g(){if(!b)return;(new e).enumerateLog(function(b,a){return (new f).LogRawData(a)},true);var a=new OSFLog.AppActivatedUsageData;a.SessionId=b.sessionId;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;(new f).LogData(a)}c.onAppActivated=g;function n(g,h,d,c,e){if(!b)return;var a=new OSFLog.APIUsageUsageData;a.SessionId=b.sessionId;a.APIType=g;a.APIID=h;a.Parameters=d;a.ResponseTime=c;a.ErrorType=e;(new f).LogData(a)}c.onCallDone=n;function j(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=j;function h(b,a){OSF.AppTelemetry.onCallDone("property",-1,b,a)}c.onPropertyDone=h;function l(c,b){OSF.AppTelemetry.onCallDone("event",c,a,0,b)}c.onEventDone=l;function i(d,e,b,c){OSF.AppTelemetry.onCallDone(d?"registerevent":"unregisterevent",e,a,b,c)}c.onRegisterDone=i;function k(d,c){if(!b)return;var a=new OSFLog.AppClosedUsageData;a.SessionId=b.sessionId;a.FocusTime=c;a.OpenTime=d;a.AppSizeFinalWidth=window.innerWidth;a.AppSizeFinalHeight=window.innerHeight;(new e).saveLog(b.sessionId,a.SerializeRow())}c.onAppClosed=k;OSF.AppTelemetry=c})(OSFAppTelemetry||(OSFAppTelemetry={}));Microsoft.Office.WebExtension.BindingType={Table:"table",Text:"text",Matrix:"matrix"};OSF.DDA.BindingProperties={Id:"BindingId",Type:Microsoft.Office.WebExtension.Parameters.BindingType};OSF.OUtil.augmentList(OSF.DDA.ListDescriptors,{BindingList:"BindingList"});OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{Subset:"subset",BindingProperties:"BindingProperties"});OSF.DDA.ListType.setListType(OSF.DDA.ListDescriptors.BindingList,OSF.DDA.PropertyDescriptors.BindingProperties);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}};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.generateBindingId=function(){return "UnnamedBinding_"+OSF.OUtil.getUniqueId()+"_"+(new Date).getTime()};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};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};OSF.DDA.AsyncMethodNames.addNames({AddFromSelectionAsync:"addFromSelectionAsync",AddFromNamedItemAsync:"addFromNamedItemAsync",GetAllAsync:"getAllAsync",GetByIdAsync:"getByIdAsync",ReleaseByIdAsync:"releaseByIdAsync",GetDataAsync:"getDataAsync",SetDataAsync:"setDataAsync"});(function(){var d="number",c="object",b="string",a=null;function e(a){return OSF.DDA.OMFactory.manufactureBinding(a,Microsoft.Office.WebExtension.context.document)}function f(a){return a.id}function g(c,e,d){var b=c[Microsoft.Office.WebExtension.Parameters.Data];if(OSF.DDA.TableDataProperties&&b&&(b[OSF.DDA.TableDataProperties.TableRows]!=undefined||b[OSF.DDA.TableDataProperties.TableHeaders]!=undefined))b=OSF.DDA.OMFactory.manufactureTableData(b);b=OSF.DDA.DataCoercion.coerceData(b,d[Microsoft.Office.WebExtension.Parameters.CoercionType]);return b==undefined?a:b}OSF.DDA.AsyncMethodCalls.define({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}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[c],defaultValue:a}}],privateStateCallbacks:[],onSucceeded:e});OSF.DDA.AsyncMethodCalls.define({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}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[c],defaultValue:a}}],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.FailOnCollision,value:function(){return true}}],onSucceeded:e});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetAllAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[],onSucceeded:function(a){return OSF.OUtil.mapList(a[OSF.DDA.ListDescriptors.BindingList],e)}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:[b]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:e});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.ReleaseByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:[b]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:function(d,b,a){var c=a[Microsoft.Office.WebExtension.Parameters.Id];delete b._eventDispatches[c]}});OSF.DDA.AsyncMethodCalls.define({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.Rows,value:{types:[c,b],defaultValue:a}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[c],defaultValue:a}},{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:{types:[d],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:{types:[d],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.RowCount,value:{types:[d],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.ColumnCount,value:{types:[d],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:f}],onSucceeded:g});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:[b,c,d,"boolean"]}],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.Rows,value:{types:[c,b],defaultValue:a}},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:{types:[c],defaultValue:a}},{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:{types:[d],defaultValue:0}},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:{types:[d],defaultValue:0}}],checkCallArgs:function(a,b){if(a[Microsoft.Office.WebExtension.Parameters.StartRow]==0&&a[Microsoft.Office.WebExtension.Parameters.StartColumn]==0){delete a[Microsoft.Office.WebExtension.Parameters.StartRow];delete a[Microsoft.Office.WebExtension.Parameters.StartColumn]}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]))throw OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding;return a},privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:f}]})})();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};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureTableData=function(a){return new Microsoft.Office.WebExtension.TableData(a[OSF.DDA.TableDataProperties.TableRows],a[OSF.DDA.TableDataProperties.TableHeaders])};OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{TableDataProperties:"TableDataProperties"});OSF.OUtil.augmentList(OSF.DDA.BindingProperties,{RowCount:"BindingRowCount",ColumnCount:"BindingColumnCount",HasHeaders:"HasHeaders"});OSF.DDA.TableDataProperties={TableRows:"TableRows",TableHeaders:"TableHeaders"};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);OSF.DDA.AsyncMethodNames.addNames({AddRowsAsync:"addRowsAsync",AddColumnsAsync:"addColumnsAsync",DeleteAllDataValuesAsync:"deleteAllDataValuesAsync"});(function(){function a(a){return a.id}OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddRowsAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["object"]}],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:a}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddColumnsAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["object"]}],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:a}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.DeleteAllDataValuesAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:a}]})})();Microsoft.Office.WebExtension.CoercionType={Text:"text",Matrix:"matrix",Table:"table"};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(d,c){var b;switch(d){case Microsoft.Office.WebExtension.CoercionType.Table:b=c;break;case Microsoft.Office.WebExtension.CoercionType.Matrix:b=OSF.DDA.DataCoercion._tableToMatrix(c);break;case Microsoft.Office.WebExtension.CoercionType.SlideRange:b=a;if(OSF.DDA.OMFactory.manufactureSlideRange)b=OSF.DDA.OMFactory.manufactureSlideRange(OSF.DDA.DataCoercion._tableToText(c));if(b==a)b=OSF.DDA.DataCoercion._tableToText(c);break;case Microsoft.Office.WebExtension.CoercionType.Text:case Microsoft.Office.WebExtension.CoercionType.Html:case Microsoft.Office.WebExtension.CoercionType.Ooxml:default:b=OSF.DDA.DataCoercion._tableToText(c)}return b},_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.FilePropertiesDescriptor={Url:"Url"};OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{FilePropertiesDescriptor:"FilePropertiesDescriptor"});Microsoft.Office.WebExtension.FileProperties=function(a){OSF.OUtil.defineEnumerableProperties(this,{url:{value:a[OSF.DDA.FilePropertiesDescriptor.Url]}})};OSF.DDA.AsyncMethodNames.addNames({GetFilePropertiesAsync:"getFilePropertiesAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetFilePropertiesAsync,fromHost:[{name:OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor,value:0}],requiredArguments:[],supportedOptions:[],onSucceeded:function(a){return new Microsoft.Office.WebExtension.FileProperties(a)}});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.Index={First:"first",Last:"last",Next:"next",Previous:"previous"};OSF.DDA.AsyncMethodNames.addNames({GoToByIdAsync:"goToByIdAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GoToByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:["string","number"]},{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}}]});OSF.OUtil.redefineList(Microsoft.Office.WebExtension.CoercionType,{Text:"text"});OSF.OUtil.redefineList(Microsoft.Office.WebExtension.ValueFormat,{Unformatted:"unformatted"});OSF.OUtil.redefineList(Microsoft.Office.WebExtension.FilterType,{All:"all"});OSF.OUtil.redefineList(Microsoft.Office.WebExtension.GoToType,{Slide:"slide",Index:"index"});delete Microsoft.Office.WebExtension.BindingType;delete Microsoft.Office.WebExtension.select;OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.CoercionType,toHost:[{name:Microsoft.Office.WebExtension.CoercionType.Text,value:0},{name:Microsoft.Office.WebExtension.CoercionType.Matrix,value:1},{name:Microsoft.Office.WebExtension.CoercionType.Table,value:2}]});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.CoercionType,{SlideRange:"slideRange"});OSF.DDA.SlideProperties={Id:0,Title:1,Index:2};OSF.DDA.Slide=function(c,b,a){OSF.OUtil.defineEnumerableProperties(this,{id:{value:c},title:{value:b},index:{value:a}})};OSF.DDA.SlideRange=function(a){OSF.OUtil.defineEnumerableProperties(this,{slides:{value:a}})};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureSlideRange=function(h){var c=null,a=c;if(JSON)a=JSON.parse(h);else a=Sys.Serialization.JavaScriptSerializer.deserialize(h);if(a==c)return c;var e=0;for(var k in OSF.DDA.SlideProperties)if(OSF.DDA.SlideProperties.hasOwnProperty(k))e++;for(var f=[],d=true,b=0;b<a.length&&d;b++){d=false;if(a[b].length==e){var i=parseInt(a[b][OSF.DDA.SlideProperties.Id]),j=a[b][OSF.DDA.SlideProperties.Title],g=parseInt(a[b][OSF.DDA.SlideProperties.Index]);if(!isNaN(i)&&!isNaN(g)){d=true;f.push(new OSF.DDA.Slide(i,j,g))}}}if(!d)return c;return new OSF.DDA.SlideRange(f)};OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.CoercionType,toHost:[{name:Microsoft.Office.WebExtension.CoercionType.SlideRange,value:7}]});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.CoercionType,{Html:"html"});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.CoercionType,toHost:[{name:Microsoft.Office.WebExtension.CoercionType.Html,value:3}]});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.CoercionType,{Ooxml:"ooxml"});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.CoercionType,toHost:[{name:Microsoft.Office.WebExtension.CoercionType.Ooxml,value:4}]});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.CoercionType,{OoxmlPackage:"ooxmlPackage"});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.CoercionType,toHost:[{name:Microsoft.Office.WebExtension.CoercionType.OoxmlPackage,value:5}]});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.CoercionType,{PdfFile:"pdf"});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.CoercionType,toHost:[{name:Microsoft.Office.WebExtension.CoercionType.PdfFile,value:6}]});Microsoft.Office.WebExtension.FileType={Compressed:"compressed"};OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{FileProperties:"FileProperties",FileSliceProperties:"FileSliceProperties"});OSF.DDA.FileProperties={Handle:"FileHandle",FileSize:"FileSize",SliceSize:Microsoft.Office.WebExtension.Parameters.SliceSize};OSF.DDA.File=function(e,c,b){OSF.OUtil.defineEnumerableProperties(this,{size:{value:c},sliceCount:{value:Math.ceil(c/b)}});var a={};a[OSF.DDA.FileProperties.Handle]=e;a[OSF.DDA.FileProperties.SliceSize]=b;var d=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[d.GetDocumentCopyChunkAsync,d.ReleaseDocumentCopyAsync],a)};OSF.DDA.FileSliceOffset="fileSliceoffset";OSF.DDA.AsyncMethodNames.addNames({GetDocumentCopyAsync:"getFileAsync",GetDocumentCopyChunkAsync:"getSliceAsync",ReleaseDocumentCopyAsync:"closeAsync"});OSF.DDA.AsyncMethodCalls.define({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:["number"],defaultValue:4*1024*1024}}],checkCallArgs:function(a){var b=a[Microsoft.Office.WebExtension.Parameters.SliceSize];if(b<=0)throw OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize;return a},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])}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDocumentCopyChunkAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.SliceIndex,types:["number"]}],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]).toString());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}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.ReleaseDocumentCopyAsync,privateStateCallbacks:[{name:OSF.DDA.FileProperties.Handle,value:function(b,a){return a[OSF.DDA.FileProperties.Handle]}}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.FileProperties,fromHost:[{name:OSF.DDA.FileProperties.Handle,value:0},{name:OSF.DDA.FileProperties.FileSize,value:1}],isComplexType:true});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.FileSliceProperties,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:0},{name:OSF.DDA.FileProperties.SliceSize,value:1}],isComplexType:true});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.FileType,toHost:[{name:Microsoft.Office.WebExtension.FileType.Text,value:0},{name:Microsoft.Office.WebExtension.FileType.Compressed,value:5},{name:Microsoft.Office.WebExtension.FileType.Pdf,value:6}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDocumentCopyMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.FileType,value:0}],fromHost:[{name:OSF.DDA.PropertyDescriptors.FileProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDocumentCopyChunkMethod,toHost:[{name:OSF.DDA.FileProperties.Handle,value:0},{name:OSF.DDA.FileSliceOffset,value:1},{name:OSF.DDA.FileProperties.SliceSize,value:2}],fromHost:[{name:OSF.DDA.PropertyDescriptors.FileSliceProperties,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidReleaseDocumentCopyMethod,toHost:[{name:OSF.DDA.FileProperties.Handle,value:0}]});OSF.DDA.AsyncMethodNames.addNames({GetSelectedDataAsync:"getSelectedDataAsync",SetSelectedDataAsync:"setSelectedDataAsync"});(function(){function a(b,d,c){var a=b[Microsoft.Office.WebExtension.Parameters.Data];if(OSF.DDA.TableDataProperties&&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}OSF.DDA.AsyncMethodCalls.define({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:a});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetSelectedDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["string","object","number","boolean"]}],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])}}}],privateStateCallbacks:[]})})();OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetSelectedDataMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:0},{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:1},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:2}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetSelectedDataMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:0},{name:Microsoft.Office.WebExtension.Parameters.Data,value:1}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.GoToType,toHost:[{name:Microsoft.Office.WebExtension.GoToType.Binding,value:0},{name:Microsoft.Office.WebExtension.GoToType.NamedItem,value:1},{name:Microsoft.Office.WebExtension.GoToType.Slide,value:2},{name:Microsoft.Office.WebExtension.GoToType.Index,value:3}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.SelectionMode,toHost:[{name:Microsoft.Office.WebExtension.SelectionMode.Default,value:0},{name:Microsoft.Office.WebExtension.SelectionMode.Selected,value:1},{name:Microsoft.Office.WebExtension.SelectionMode.None,value:2}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidNavigateToMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:0},{name:Microsoft.Office.WebExtension.Parameters.GoToType,value:1},{name:Microsoft.Office.WebExtension.Parameters.SelectionMode,value:2}]});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.Settings=function(a){var b="name";a=a||{};var c=function(d){var b=OSF.OUtil.getSessionStorage();if(b){var a=OSF.DDA.SettingsManager.serializeSettings(d),c=JSON?JSON.stringify(a):Sys.Serialization.JavaScriptSerializer.serialize(a);b.setItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey(),c)}};OSF.OUtil.defineEnumerableProperties(this,{"get":{value:function(e){var d=Function._validateParams(arguments,[{name:b,type:String,mayBeNull:false}]);if(d)throw d;var c=a[e];return typeof c==="undefined"?null:c}},"set":{value:function(f,e){var d=Function._validateParams(arguments,[{name:b,type:String,mayBeNull:false},{name:"value",mayBeNull:true}]);if(d)throw d;a[f]=e;c(a)}},remove:{value:function(e){var d=Function._validateParams(arguments,[{name:b,type:String,mayBeNull:false}]);if(d)throw d;delete a[e];c(a)}}});OSF.DDA.DispIdHost.addAsyncMethods(this,[OSF.DDA.AsyncMethodNames.SaveAsync],a)};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);Microsoft.Office.WebExtension.EventType={};OSF.EventDispatch=function(a){this._eventHandlers={};for(var c in a){var b=a[c];this._eventHandlers[b]=[]}};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},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){if(typeof this._eventHandlers[a]!="undefined"&&this._eventHandlers[a].length>0){this._eventHandlers[a]=[];return true}return false},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}};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.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.WebExtension.EventType.ActiveViewChanged:b=new OSF.DDA.ActiveViewChangedEventArgs(a);break;case Microsoft.Office.WebExtension.EventType.OfficeThemeChanged:b=new OSF.DDA.Theming.OfficeThemeChangedEventArgs(a);break;case Microsoft.Office.WebExtension.EventType.DocumentThemeChanged:b=new OSF.DDA.Theming.DocumentThemeChangedEventArgs(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;default:throw Error.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,e))}return b};OSF.DDA.AsyncMethodNames.addNames({AddHandlerAsync:"addHandlerAsync",RemoveHandlerAsync:"removeHandlerAsync"});OSF.DDA.AsyncMethodCalls.define({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:["function"]}],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.AsyncMethodCalls.define({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:["function","object"],defaultValue:null}}],privateStateCallbacks:[]});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{SettingsChanged:"settingsChanged"});OSF.DDA.SettingsChangedEventArgs=function(a){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.SettingsChanged},settings:{value:a}})};OSF.DDA.AsyncMethodNames.addNames({RefreshAsync:"refreshAsync",SaveAsync:"saveAsync"});OSF.DDA.AsyncMethodCalls.define({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}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SaveAsync,requiredArguments:[],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale,value:{types:["boolean"],defaultValue:true}}],privateStateCallbacks:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:function(b,a){return OSF.DDA.SettingsManager.serializeSettings(a)}}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidLoadSettingsMethod,fromHost:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSaveSettingsMethod,toHost:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:OSF.DDA.SettingsManager.SerializedSettings},{name:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale,value:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidSettingsChangedEvent});OSF.DDA.AsyncMethodNames.addNames({GetOfficeThemeAsync:"getOfficeThemeAsync",GetDocumentThemeAsync:"getDocumentThemeAsync"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{OfficeThemeChanged:"officeThemeChanged",DocumentThemeChanged:"documentThemeChanged"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.Parameters,{DocumentTheme:"documentTheme",OfficeTheme:"officeTheme"});OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{DocumentThemeChangedEvent:"DocumentThemeChangedEvent",OfficeThemeChangedEvent:"OfficeThemeChangedEvent"});OSF.OUtil.setNamespace("Theming",OSF.DDA);OSF.DDA.Theming.OfficeThemeEnum={PrimaryFontColor:"primaryFontColor",PrimaryBackgroundColor:"primaryBackgroundColor",SecondaryFontColor:"secondaryFontColor",SecondaryBackgroundColor:"secondaryBackgroundColor"};OSF.DDA.Theming.DocumentThemeEnum={PrimaryFontColor:"primaryFontColor",PrimaryBackgroundColor:"primaryBackgroundColor",SecondaryFontColor:"secondaryFontColor",SecondaryBackgroundColor:"secondaryBackgroundColor",Accent1:"accent1",Accent2:"accent2",Accent3:"accent3",Accent4:"accent4",Accent5:"accent5",Accent6:"accent6",Hyperlink:"hyperlink",FollowedHyperlink:"followedHyperlink",HeaderLatinFont:"headerLatinFont",HeaderEastAsianFont:"headerEastAsianFont",HeaderScriptFont:"headerScriptFont",HeaderLocalizedFont:"headerLocalizedFont",BodyLatinFont:"bodyLatinFont",BodyEastAsianFont:"bodyEastAsianFont",BodyScriptFont:"bodyScriptFont",BodyLocalizedFont:"bodyLocalizedFont"};OSF.DDA.Theming.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.convertIntToCssHexColor(f[d[c].name]);else e[d[c].name]=f[d[c].name];return e};OSF.DDA.Theming.ConvertToOfficeTheme=function(a){var b={};for(var c in a)b[c]=OSF.OUtil.convertIntToCssHexColor(a[c]);return b};OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDocumentThemeAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[],onSucceeded:OSF.DDA.Theming.ConvertToDocumentTheme});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetOfficeThemeAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[],onSucceeded:OSF.DDA.Theming.ConvertToOfficeTheme});OSF.DDA.Theming.OfficeThemeChangedEventArgs=function(a){var b=OSF.DDA.Theming.ConvertToOfficeTheme(a);OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.OfficeThemeChanged},officeTheme:{value:b}})};OSF.DDA.Theming.DocumentThemeChangedEventArgs=function(a){var b=OSF.DDA.Theming.ConvertToDocumentTheme(a);OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DocumentThemeChanged},documentTheme:{value:b}})};var OSF_DDA_Theming_InternalThemeHandler=function(){var h="secondaryBackgroundColor",g="secondaryFontColor",c="background-color",f="primaryBackgroundColor",b="color",e="primaryFontColor",a=null;function d(){var b=this;b._pseudoDocumentObject=a;b._previousDocumentThemeData=a;b._previousOfficeThemeData=a;b._officeCss=a;b._asyncCallsCompleted=a;b._onAsyncCallsCompleted=a}d.prototype.InitializeAndChangeOnce=function(c){var a=this;a._officeCss=a._getOfficeThemesCss();if(!a._officeCss){c&&c();return}a._onAsyncCallsCompleted=c;a._pseudoDocumentObject={};var b=a._pseudoDocumentObject;OSF.DDA.DispIdHost.addAsyncMethods(b,[OSF.DDA.AsyncMethodNames.GetOfficeThemeAsync,OSF.DDA.AsyncMethodNames.GetDocumentThemeAsync]);OSF.DDA.DispIdHost.addEventSupport(b,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.OfficeThemeChanged,Microsoft.Office.WebExtension.EventType.DocumentThemeChanged]));a._asyncCallsCompleted={};a._asyncCallsCompleted[OSF.DDA.AsyncMethodNames.GetOfficeThemeAsync]=false;a._asyncCallsCompleted[OSF.DDA.AsyncMethodNames.GetDocumentThemeAsync]=false;a._getAndProcessThemeData(b.getDocumentThemeAsync,Function.createDelegate(a,a._processDocumentThemeData),OSF.DDA.AsyncMethodNames.GetDocumentThemeAsync);a._getAndProcessThemeData(b.getOfficeThemeAsync,Function.createDelegate(a,a._processOfficeThemeData),OSF.DDA.AsyncMethodNames.GetOfficeThemeAsync)};d.prototype._getOfficeThemesCss=function(){function b(){for(var d="officethemes.css",c=0;c<document.styleSheets.length;c++){var b=document.styleSheets[c];if(!b.disabled&&b.href&&d==b.href.substring(b.href.length-d.length,b.href.length).toLowerCase())if(!b.cssRules&&!b.rules)return a;else return b}}try{return b()}catch(c){return a}};d.prototype._changeCss=function(a,f,e){for(var g=a.cssRules?a.cssRules.length:a.rules.length,b=0;b<g;b++){var d;if(a.cssRules)d=a.cssRules[b];else d=a.rules[b];var c=d.selectorText;if(c!==""&&c.toLowerCase()==f.toLowerCase())if(a.cssRules){a.deleteRule(b);a.insertRule(c+e,b)}else{a.removeRule(b);a.addRule(c,e,b)}}};d.prototype._changeDocumentThemeData=function(u){var d="font-family",i="border-color",r="accent6",q="accent5",p="accent4",o="accent3",n="accent2",m="accent1",l=this;for(var k=[{name:e,cssSelector:".office-docTheme-primary-fontColor",cssProperty:b},{name:f,cssSelector:".office-docTheme-primary-bgColor",cssProperty:c},{name:g,cssSelector:".office-docTheme-secondary-fontColor",cssProperty:b},{name:h,cssSelector:".office-docTheme-secondary-bgColor",cssProperty:c},{name:m,cssSelector:".office-contentAccent1-color",cssProperty:b},{name:n,cssSelector:".office-contentAccent2-color",cssProperty:b},{name:o,cssSelector:".office-contentAccent3-color",cssProperty:b},{name:p,cssSelector:".office-contentAccent4-color",cssProperty:b},{name:q,cssSelector:".office-contentAccent5-color",cssProperty:b},{name:r,cssSelector:".office-contentAccent6-color",cssProperty:b},{name:m,cssSelector:".office-contentAccent1-bgColor",cssProperty:c},{name:n,cssSelector:".office-contentAccent2-bgColor",cssProperty:c},{name:o,cssSelector:".office-contentAccent3-bgColor",cssProperty:c},{name:p,cssSelector:".office-contentAccent4-bgColor",cssProperty:c},{name:q,cssSelector:".office-contentAccent5-bgColor",cssProperty:c},{name:r,cssSelector:".office-contentAccent6-bgColor",cssProperty:c},{name:m,cssSelector:".office-contentAccent1-borderColor",cssProperty:i},{name:n,cssSelector:".office-contentAccent2-borderColor",cssProperty:i},{name:o,cssSelector:".office-contentAccent3-borderColor",cssProperty:i},{name:p,cssSelector:".office-contentAccent4-borderColor",cssProperty:i},{name:q,cssSelector:".office-contentAccent5-borderColor",cssProperty:i},{name:r,cssSelector:".office-contentAccent6-borderColor",cssProperty:i},{name:"hyperlink",cssSelector:".office-a",cssProperty:b},{name:"followedHyperlink",cssSelector:".office-a:visited",cssProperty:b},{name:"headerLatinFont",cssSelector:".office-headerFont-latin",cssProperty:d},{name:"headerEastAsianFont",cssSelector:".office-headerFont-eastAsian",cssProperty:d},{name:"headerScriptFont",cssSelector:".office-headerFont-script",cssProperty:d},{name:"headerLocalizedFont",cssSelector:".office-headerFont-localized",cssProperty:d},{name:"bodyLatinFont",cssSelector:".office-bodyFont-latin",cssProperty:d},{name:"bodyEastAsianFont",cssSelector:".office-bodyFont-eastAsian",cssProperty:d},{name:"bodyScriptFont",cssSelector:".office-bodyFont-script",cssProperty:d},{name:"bodyLocalizedFont",cssSelector:".office-bodyFont-localized",cssProperty:d}],s=u.type=="documentThemeChanged"?u.documentTheme:u,j=0;j<k.length;j++)if(l._previousDocumentThemeData===a||l._previousDocumentThemeData[k[j].name]!=s[k[j].name])if(s[k[j].name]!=a&&s[k[j].name]!=""){var t=s[k[j].name];if(k[j].cssProperty===d)t='"'+t.replace(/"/g,'\\"')+'"';l._changeCss(l._officeCss,k[j].cssSelector,"{"+k[j].cssProperty+":"+t+";}")}else l._changeCss(l._officeCss,k[j].cssSelector,"{}");l._previousDocumentThemeData=s};d.prototype._changeOfficeThemeData=function(l){var j=this;for(var i=[{name:e,cssSelector:".office-officeTheme-primary-fontColor",cssProperty:b},{name:f,cssSelector:".office-officeTheme-primary-bgColor",cssProperty:c},{name:g,cssSelector:".office-officeTheme-secondary-fontColor",cssProperty:b},{name:h,cssSelector:".office-officeTheme-secondary-bgColor",cssProperty:c}],k=l.type=="officeThemeChanged"?l.officeTheme:l,d=0;d<i.length;d++)if(j._previousOfficeThemeData===a||j._previousOfficeThemeData[i[d].name]!=k[i[d].name])k[i[d].name]!==undefined&&j._changeCss(j._officeCss,i[d].cssSelector,"{"+i[d].cssProperty+":"+k[i[d].name]+";}");j._previousOfficeThemeData=k};d.prototype._getAndProcessThemeData=function(d,c,b){d(Function.createDelegate(this,function(e){var d=this;if(e.status=="succeeded"){var f=e.value;c(f)}if(d._areAllCallsCompleted(b)&&d._onAsyncCallsCompleted){d._onAsyncCallsCompleted();d._onAsyncCallsCompleted=a}}))};d.prototype._processOfficeThemeData=function(c){var b=this;b._changeOfficeThemeData(c);b._pseudoDocumentObject.addHandlerAsync(Microsoft.Office.WebExtension.EventType.OfficeThemeChanged,Function.createDelegate(b,b._changeOfficeThemeData),a)};d.prototype._processDocumentThemeData=function(c){var b=this;b._changeDocumentThemeData(c);b._pseudoDocumentObject.addHandlerAsync(Microsoft.Office.WebExtension.EventType.DocumentThemeChanged,Function.createDelegate(b,b._changeDocumentThemeData),a)};d.prototype._areAllCallsCompleted=function(b){var a;if(!(a=this._asyncCallsCompleted))return true;if(b&&a.hasOwnProperty(b))a[b]=true;for(var c in a){if(a.hasOwnProperty(c)&&a[c])continue;return false}return true};return d}();OSF.DDA.Theming.InternalThemeHandler=OSF_DDA_Theming_InternalThemeHandler;var parameterMap=OSF.DDA.SafeArray.Delegate.ParameterMap;parameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDocumentThemeMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.DocumentTheme,value:parameterMap.self}]});parameterMap.define({type:OSF.DDA.MethodDispId.dispidGetOfficeThemeMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.OfficeTheme,value:parameterMap.self}]});parameterMap.define({type:OSF.DDA.EventDispId.dispidDocumentThemeChangedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DocumentThemeChangedEvent,value:parameterMap.self}],isComplexType:true});parameterMap.define({type:OSF.DDA.EventDispId.dispidOfficeThemeChangedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.OfficeThemeChangedEvent,value:parameterMap.self}],isComplexType:true});var destKeys=OSF.DDA.Theming.DocumentThemeEnum;parameterMap.define({type:Microsoft.Office.WebExtension.Parameters.DocumentTheme,fromHost:[{name:destKeys.PrimaryBackgroundColor,value:0},{name:destKeys.PrimaryFontColor,value:1},{name:destKeys.SecondaryBackgroundColor,value:2},{name:destKeys.SecondaryFontColor,value:3},{name:destKeys.Accent1,value:4},{name:destKeys.Accent2,value:5},{name:destKeys.Accent3,value:6},{name:destKeys.Accent4,value:7},{name:destKeys.Accent5,value:8},{name:destKeys.Accent6,value:9},{name:destKeys.Hyperlink,value:10},{name:destKeys.FollowedHyperlink,value:11},{name:destKeys.HeaderLatinFont,value:12},{name:destKeys.HeaderEastAsianFont,value:13},{name:destKeys.HeaderScriptFont,value:14},{name:destKeys.HeaderLocalizedFont,value:15},{name:destKeys.BodyLatinFont,value:16},{name:destKeys.BodyEastAsianFont,value:17},{name:destKeys.BodyScriptFont,value:18},{name:destKeys.BodyLocalizedFont,value:19}],isComplexType:true});destKeys=OSF.DDA.Theming.OfficeThemeEnum;parameterMap.define({type:Microsoft.Office.WebExtension.Parameters.OfficeTheme,fromHost:[{name:destKeys.PrimaryFontColor,value:0},{name:destKeys.PrimaryBackgroundColor,value:1},{name:destKeys.SecondaryFontColor,value:2},{name:destKeys.SecondaryBackgroundColor,value:3}],isComplexType:true});parameterMap.define({type:OSF.DDA.EventDescriptors.DocumentThemeChangedEvent,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.DocumentTheme,value:parameterMap.self}],isComplexType:true});parameterMap.define({type:OSF.DDA.EventDescriptors.OfficeThemeChangedEvent,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.OfficeTheme,value:parameterMap.self}],isComplexType:true});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{DocumentSelectionChanged:"documentSelectionChanged"});OSF.DDA.DocumentSelectionChangedEventArgs=function(a){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged},document:{value:a}})};OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDocumentSelectionChangedEvent});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor,fromHost:[{name:OSF.DDA.FilePropertiesDescriptor.Url,value:0}],isComplexType:true});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetFilePropertiesMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{ActiveViewChangedEvent:"ActiveViewChangedEvent"});Microsoft.Office.WebExtension.ActiveView={Read:"read",Edit:"edit"};OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{ActiveViewChanged:"activeViewChanged"});OSF.DDA.AsyncMethodNames.addNames({GetActiveViewAsync:"getActiveViewAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetActiveViewAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[],onSucceeded:function(b){var a=b[Microsoft.Office.WebExtension.Parameters.ActiveView];return a==undefined?null:a}});OSF.DDA.ActiveViewChangedEventArgs=function(a){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.ActiveViewChanged},activeView:{value:a.activeView}})};OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.ActiveView,fromHost:[{name:0,value:Microsoft.Office.WebExtension.ActiveView.Read},{name:1,value:Microsoft.Office.WebExtension.ActiveView.Edit}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetActiveViewMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.ActiveView,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.ActiveViewChangedEvent,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.ActiveView,value:0}],isComplexType:true});OSF.DDA.SafeArray.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidActiveViewChangedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.ActiveViewChangedEvent,value:OSF.DDA.SafeArray.Delegate.ParameterMap.self}]});OSF.DDA.PowerPointDocument=function(b,c){var a=this;OSF.DDA.PowerPointDocument.uber.constructor.call(a,b,c);OSF.DDA.DispIdHost.addAsyncMethods(a,[OSF.DDA.AsyncMethodNames.GetSelectedDataAsync,OSF.DDA.AsyncMethodNames.SetSelectedDataAsync,OSF.DDA.AsyncMethodNames.GetDocumentCopyAsync,OSF.DDA.AsyncMethodNames.GetActiveViewAsync,OSF.DDA.AsyncMethodNames.GetFilePropertiesAsync,OSF.DDA.AsyncMethodNames.GoToByIdAsync]);OSF.DDA.DispIdHost.addEventSupport(a,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged,Microsoft.Office.WebExtension.EventType.ActiveViewChanged]));OSF.OUtil.finalizeProperties(a)};OSF.OUtil.extend(OSF.DDA.PowerPointDocument,OSF.DDA.Document);OSF.InitializationHelper.prototype.loadAppSpecificScriptAndCreateOM=function(a,b){OSF.DDA.ErrorCodeManager.initializeErrorMessages(Strings.OfficeOM);a.doc=new OSF.DDA.PowerPointDocument(a,this._initializeSettings(false));b()};OSF.InitializationHelper.prototype.prepareRightBeforeWebExtensionInitialize=function(a){var d=new OSF.DDA.License(a.get_eToken());OSF._OfficeAppFactory.setContext(new OSF.DDA.Context(a,a.doc,d,null,OSF.DDA.OfficeTheme.getOfficeTheme));var b=a.get_reason();b=OSF.DDA.RichInitializationReason[b];OSF._OfficeAppFactory.setHostFacade(new OSF.DDA.DispIdHost.Facade(OSF.DDA.DispIdHost.getClientDelegateMethods,OSF.DDA.SafeArray.Delegate.ParameterMap));var c=new OSF.DDA.Theming.InternalThemeHandler;c.InitializeAndChangeOnce();Microsoft.Office.WebExtension.initialize(b)}