Нет описания
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

onenote-web-16.00.js 330KB

12345678910111213141516171819
  1. /* OneNote specific JavaScript API library */
  2. /* Version: 16.0.7607.3000 */
  3. /*
  4. Copyright (c) Microsoft Corporation. All rights reserved.
  5. */
  6. /*
  7. Your use of this file is governed by the Microsoft Services Agreement http://go.microsoft.com/fwlink/?LinkId=266419.
  8. */
  9. /*
  10. * @overview es6-promise - a tiny implementation of Promises/A+.
  11. * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
  12. * @license Licensed under MIT license
  13. * See https://raw.githubusercontent.com/jakearchibald/es6-promise/master/LICENSE
  14. * @version 2.3.0
  15. */
  16. function IsEdgeLessThan14(){var n=window.navigator.userAgent,t=n.indexOf("Edge/");return t>=0?(n=n.substring(t+5,n.length),n<"14.14393"?!0:!1):!1}var __extends=this&&this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);n.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)},OsfMsAjaxFactory,OSF,OSFLog,Logger,OSFAppTelemetry,OSF_DDA_Marshaling_FilePropertiesKeys,OSF_DDA_Marshaling_File_FilePropertiesKeys,OSF_DDA_Marshaling_File_SlicePropertiesKeys,OSF_DDA_Marshaling_File_FileType,OSF_DDA_Marshaling_File_ParameterKeys,OSF_DDA_Marshaling_AppCommand_AppCommandInvokedEventKeys,OSF_DDA_Marshaling_AppCommand_AppCommandCompletedMethodParameterKeys,OfficeExt,OSFOneNoteWAC,OfficeExtension,OneNote;(function(n){var t=function(){function t(){}var n=!0;return t.prototype.isMsAjaxLoaded=function(){var t="function",i="undefined";return typeof Sys!==i&&typeof Type!==i&&Sys.StringBuilder&&typeof Sys.StringBuilder===t&&Type.registerNamespace&&typeof Type.registerNamespace===t&&Type.registerClass&&typeof Type.registerClass===t&&typeof Function._validateParams===t&&Sys.Serialization&&Sys.Serialization.JavaScriptSerializer&&typeof Sys.Serialization.JavaScriptSerializer.serialize===t?n:!1},t.prototype.loadMsAjaxFull=function(n){var t=(window.location.protocol.toLowerCase()==="https:"?"https:":"http:")+"//ajax.aspnetcdn.com/ajax/3.5/MicrosoftAjax.js";OSF.OUtil.loadScript(t,n)},Object.defineProperty(t.prototype,"msAjaxError",{get:function(){var n=this;return n._msAjaxError==null&&n.isMsAjaxLoaded()&&(n._msAjaxError=Error),n._msAjaxError},set:function(n){this._msAjaxError=n},enumerable:n,configurable:n}),Object.defineProperty(t.prototype,"msAjaxString",{get:function(){var n=this;return n._msAjaxString==null&&n.isMsAjaxLoaded()&&(n._msAjaxString=String),n._msAjaxString},set:function(n){this._msAjaxString=n},enumerable:n,configurable:n}),Object.defineProperty(t.prototype,"msAjaxDebug",{get:function(){var n=this;return n._msAjaxDebug==null&&n.isMsAjaxLoaded()&&(n._msAjaxDebug=Sys.Debug),n._msAjaxDebug},set:function(n){this._msAjaxDebug=n},enumerable:n,configurable:n}),t}();n.MicrosoftAjaxFactory=t})(OfficeExt||(OfficeExt={}));OsfMsAjaxFactory=new OfficeExt.MicrosoftAjaxFactory;OSF=OSF||{},function(n){var t=function(){function n(n){this._internalStorage=n}return n.prototype.getItem=function(n){try{return this._internalStorage&&this._internalStorage.getItem(n)}catch(t){return null}},n.prototype.setItem=function(n,t){try{this._internalStorage&&this._internalStorage.setItem(n,t)}catch(i){}},n.prototype.clear=function(){try{this._internalStorage&&this._internalStorage.clear()}catch(n){}},n.prototype.removeItem=function(n){try{this._internalStorage&&this._internalStorage.removeItem(n)}catch(t){}},n.prototype.getKeysWithPrefix=function(n){var r=[],u,t,i;try{for(u=this._internalStorage&&this._internalStorage.length||0,t=0;t<u;t++)i=this._internalStorage.key(t),i.indexOf(n)===0&&r.push(i)}catch(f){}return r},n}();n.SafeStorage=t}(OfficeExt||(OfficeExt={}));OSF.XdmFieldName={ConversationUrl:"ConversationUrl",AppId:"AppId"};OSF.WindowNameItemKeys={BaseFrameName:"baseFrameName",HostInfo:"hostInfo",XdmInfo:"xdmInfo",SerializerVersion:"serializerVersion",AppContext:"appContext"};OSF.OUtil=function(){function it(){var n=c*Math.random();return n^=u^(new Date).getMilliseconds()<<Math.floor(Math.random()*21),n.toString(16)}function w(){if(!y){try{var t=window.sessionStorage}catch(i){t=n}y=new OfficeExt.SafeStorage(t)}return y}function rt(n){for(var r=[],i=[],f=n.length,t,u=0;u<f;u++)t=n[u],t.tabIndex?t.tabIndex>0?i.push(t):t.tabIndex===0&&r.push(t):r.push(t);return i=i.sort(function(n,t){var r=n.tabIndex-t.tabIndex;return r===0&&(r=i.indexOf(n)-i.indexOf(t)),r}),[].concat(i,r)}var f="focus",e="on",b="configurable",k="writable",o="enumerable",s="undefined",i=!0,t=!1,c=2147483647,n=null,r=-1,l=r,d="&_xdm_Info=",g="&_serializer_version=",nt="_xdm_",ut="_serializer_version=",a="#",tt="&",h="class",v={},ft=3e4,y=n,p=n,u=(new Date).getTime();return{set_entropy:function(n){var t,r,i;if(typeof n=="string")for(t=0;t<n.length;t+=4){for(r=0,i=0;i<4&&t+i<n.length;i++)r=(r<<8)+n.charCodeAt(t+i);u^=r}else u^=typeof n=="number"?n:c*Math.random();u&=c},extend:function(n,t){var i=function(){};i.prototype=t.prototype;n.prototype=new i;n.prototype.constructor=n;n.uber=t.prototype;t.prototype.constructor===Object.prototype.constructor&&(t.prototype.constructor=t)},setNamespace:function(n,t){t&&n&&!t[n]&&(t[n]={})},unsetNamespace:function(n,t){t&&n&&t[n]&&delete t[n]},loadScript:function(r,u,f){var s,e,o,h,c;r&&u&&(s=window.document,e=v[r],e?e.loaded?u():e.pendingCallbacks.push(u):(o=s.createElement("script"),o.type="text/javascript",e={loaded:t,pendingCallbacks:[u],timer:n},v[r]=e,h=function(){var r,t,u;for(e.timer!=n&&(clearTimeout(e.timer),delete e.timer),e.loaded=i,r=e.pendingCallbacks.length,t=0;t<r;t++)u=e.pendingCallbacks.shift(),u()},c=function(){var i,t,u;for(delete v[r],e.timer!=n&&(clearTimeout(e.timer),delete e.timer),i=e.pendingCallbacks.length,t=0;t<i;t++)u=e.pendingCallbacks.shift(),u()},o.readyState?o.onreadystatechange=function(){(o.readyState=="loaded"||o.readyState=="complete")&&(o.onreadystatechange=n,h())}:o.onload=h,o.onerror=c,f=f||ft,e.timer=setTimeout(c,f),o.src=r,s.getElementsByTagName("head")[0].appendChild(o)))},loadCSS:function(n){if(n){var i=window.document,t=i.createElement("link");t.type="text/css";t.rel="stylesheet";t.href=n;i.getElementsByTagName("head")[0].appendChild(t)}},parseEnum:function(n,t){var i=t[n.trim()];if(typeof i==s){OsfMsAjaxFactory.msAjaxDebug.trace("invalid enumeration string:"+n);throw OsfMsAjaxFactory.msAjaxError.argument("str");}return i},delayExecutionAndCache:function(){var n={calc:arguments[0]};return function(){return n.calc&&(n.val=n.calc.apply(this,arguments),delete n.calc),n.val}},getUniqueId:function(){return l=l+1,l.toString()},formatString:function(){var n=arguments,t=n[0];return t.replace(/{(\d+)}/gm,function(t,i){var r=parseInt(i,10)+1;return n[r]===undefined?"{"+i+"}":n[r]})},generateConversationId:function(){return[it(),it(),(new Date).getTime().toString()].join("_")},getFrameName:function(n){return nt+n+this.generateConversationId()},addXdmInfoAsHash:function(n,i){return OSF.OUtil.addInfoAsHash(n,d,i,t)},addSerializerVersionAsHash:function(n,t){return OSF.OUtil.addInfoAsHash(n,g,t,i)},addInfoAsHash:function(n,t,i,r){n=n.trim()||"";var u=n.split(a),o=u.shift(),f=u.join(a),e;return e=r?[t,encodeURIComponent(i),f].join(""):[f,t,i].join(""),[o,a,e].join("")},parseHostInfoFromWindowName:function(n,t){return OSF.OUtil.parseInfoFromWindowName(n,t,OSF.WindowNameItemKeys.HostInfo)},parseXdmInfo:function(n){var t=OSF.OUtil.parseXdmInfoWithGivenFragment(n,window.location.hash);return t||(t=OSF.OUtil.parseXdmInfoFromWindowName(n,window.name)),t},parseXdmInfoFromWindowName:function(n,t){return OSF.OUtil.parseInfoFromWindowName(n,t,OSF.WindowNameItemKeys.XdmInfo)},parseXdmInfoWithGivenFragment:function(n,i){return OSF.OUtil.parseInfoWithGivenFragment(d,nt,t,n,i)},parseSerializerVersion:function(n){var t=OSF.OUtil.parseSerializerVersionWithGivenFragment(n,window.location.hash);return isNaN(t)&&(t=OSF.OUtil.parseSerializerVersionFromWindowName(n,window.name)),t},parseSerializerVersionFromWindowName:function(n,t){return parseInt(OSF.OUtil.parseInfoFromWindowName(n,t,OSF.WindowNameItemKeys.SerializerVersion))},parseSerializerVersionWithGivenFragment:function(n,t){return parseInt(OSF.OUtil.parseInfoWithGivenFragment(g,ut,i,n,t))},parseInfoFromWindowName:function(t,i,r){var o;try{var u=JSON.parse(i),f=u!=n?u[r]:n,e=w();return!t&&e&&u!=n&&(o=u[OSF.WindowNameItemKeys.BaseFrameName]+r,f?e.setItem(o,f):f=e.getItem(o)),f}catch(s){return n}},parseInfoWithGivenFragment:function(t,i,u,f,e){var l=e.split(t),o=l.length>1?l[l.length-1]:n,s,h,c,a;return u&&o!=n&&(o.indexOf(tt)>=0&&(o=o.split(tt)[0]),o=decodeURIComponent(o)),s=w(),!f&&s&&(h=window.name.indexOf(i),h>r&&(c=window.name.indexOf(";",h),c==r&&(c=window.name.length),a=window.name.substring(h,c),o?s.setItem(a,o):o=s.getItem(a))),o},getConversationId:function(){var i=window.location.search,t=n,r;return i&&(r=i.indexOf("&"),t=r>0?i.substring(1,r):i.substr(1),t&&t.charAt(t.length-1)==="="&&(t=t.substring(0,t.length-1),t&&(t=decodeURIComponent(t)))),t},getInfoItems:function(n){var t=n.split("$");return typeof t[1]==s&&(t=n.split("|")),typeof t[1]==s&&(t=n.split("%7C")),t},getXdmFieldValue:function(n,t){var r="",u=OSF.OUtil.parseXdmInfo(t),i;if(u&&(i=OSF.OUtil.getInfoItems(u),i!=undefined&&i.length>=3))switch(n){case OSF.XdmFieldName.ConversationUrl:r=i[2];break;case OSF.XdmFieldName.AppId:r=i[1]}return r},validateParamObject:function(n,r){var u=Function._validateParams(arguments,[{name:"params",type:Object,mayBeNull:t},{name:"expectedProperties",type:Object,mayBeNull:t},{name:"callback",type:Function,mayBeNull:i}]),f;if(u)throw u;for(f in r)if(u=Function._validateParameter(n[f],r[f],f),u)throw u;},writeProfilerMark:function(n){window.msWriteProfilerMark&&(window.msWriteProfilerMark(n),OsfMsAjaxFactory.msAjaxDebug.trace(n))},outputDebug:function(n){typeof OsfMsAjaxFactory!==s&&OsfMsAjaxFactory.msAjaxDebug&&OsfMsAjaxFactory.msAjaxDebug.trace&&OsfMsAjaxFactory.msAjaxDebug.trace(n)},defineNondefaultProperty:function(n,t,r,u){var e,f;r=r||{};for(e in u)f=u[e],r[f]==undefined&&(r[f]=i);return Object.defineProperty(n,t,r),n},defineNondefaultProperties:function(n,t,i){t=t||{};for(var r in t)OSF.OUtil.defineNondefaultProperty(n,r,t[r],i);return n},defineEnumerableProperty:function(n,t,i){return OSF.OUtil.defineNondefaultProperty(n,t,i,[o])},defineEnumerableProperties:function(n,t){return OSF.OUtil.defineNondefaultProperties(n,t,[o])},defineMutableProperty:function(n,t,i){return OSF.OUtil.defineNondefaultProperty(n,t,i,[k,o,b])},defineMutableProperties:function(n,t){return OSF.OUtil.defineNondefaultProperties(n,t,[k,o,b])},finalizeProperties:function(n,r){var e,u;r=r||{};for(var o=Object.getOwnPropertyNames(n),s=o.length,f=0;f<s;f++)e=o[f],u=Object.getOwnPropertyDescriptor(n,e),u.get||u.set||(u.writable=r.writable||t),u.configurable=r.configurable||t,u.enumerable=r.enumerable||i,Object.defineProperty(n,e,u);return n},mapList:function(n,t){var i=[],r;if(n)for(r in n)i.push(t(n[r]));return i},listContainsKey:function(n,r){for(var u in n)if(r==u)return i;return t},listContainsValue:function(n,r){for(var u in n)if(r==n[u])return i;return t},augmentList:function(n,t){var r=n.push?function(t,i){n.push(i)}:function(t,i){n[t]=i};for(var i in t)r(i,t[i])},redefineList:function(n,t){var r,i;for(r in n)delete n[r];for(i in t)n[i]=t[i]},isArray:function(n){return Object.prototype.toString.apply(n)==="[object Array]"},isFunction:function(n){return Object.prototype.toString.apply(n)==="[object Function]"},isDate:function(n){return Object.prototype.toString.apply(n)==="[object Date]"},addEventListener:function(n,i,r){n.addEventListener?n.addEventListener(i,r,t):Sys.Browser.agent===Sys.Browser.InternetExplorer&&n.attachEvent?n.attachEvent(e+i,r):n[e+i]=r},removeEventListener:function(i,r,u){i.removeEventListener?i.removeEventListener(r,u,t):Sys.Browser.agent===Sys.Browser.InternetExplorer&&i.detachEvent?i.detachEvent(e+r,u):i[e+r]=n},getCookieValue:function(n){var t=RegExp(n+"[^;]+").exec(document.cookie);return t.toString().replace(/^[^=]+./,"")},xhrGet:function(n,t,r){var u;try{u=new XMLHttpRequest;u.onreadystatechange=function(){u.readyState==4&&(u.status==200?t(u.responseText):r(u.status))};u.open("GET",n,i);u.send()}catch(f){r(f)}},xhrGetFull:function(n,t,r,u){var f,e=t;try{f=new XMLHttpRequest;f.onreadystatechange=function(){f.readyState==4&&(f.status==200?r(f,e):u(f.status))};f.open("GET",n,i);f.send()}catch(o){u(o)}},encodeBase64:function(n){var h;if(!n)return n;var a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",l=[],i=[],o=0,c,e,s,r,u,f,t,v=n.length;do for(c=n.charCodeAt(o++),e=n.charCodeAt(o++),s=n.charCodeAt(o++),t=0,r=c&255,u=c>>8,f=e&255,i[t++]=r>>2,i[t++]=(r&3)<<4|u>>4,i[t++]=(u&15)<<2|f>>6,i[t++]=f&63,isNaN(e)||(r=e>>8,u=s&255,f=s>>8,i[t++]=r>>2,i[t++]=(r&3)<<4|u>>4,i[t++]=(u&15)<<2|f>>6,i[t++]=f&63),isNaN(e)?i[t-1]=64:isNaN(s)&&(i[t-2]=64,i[t-1]=64),h=0;h<t;h++)l.push(a.charAt(i[h]));while(o<v);return l.join("")},getSessionStorage:function(){return w()},getLocalStorage:function(){if(!p){try{var t=window.localStorage}catch(i){t=n}p=new OfficeExt.SafeStorage(t)}return p},convertIntToCssHexColor:function(n){return"#"+(Number(n)+16777216).toString(16).slice(-6)},attachClickHandler:function(n,t){n.onclick=function(){t()};n.ontouchend=function(n){t();n.preventDefault()}},getQueryStringParamValue:function(n,i){var u=Function._validateParams(arguments,[{name:"queryString",type:String,mayBeNull:t},{name:"paramName",type:String,mayBeNull:t}]),r;return u?(OsfMsAjaxFactory.msAjaxDebug.trace("OSF_Outil_getQueryStringParamValue: Parameters cannot be null."),""):(r=new RegExp("[\\?&]"+i+"=([^&#]*)","i"),!r.test(n))?(OsfMsAjaxFactory.msAjaxDebug.trace("OSF_Outil_getQueryStringParamValue: The parameter is not found."),""):r.exec(n)[1]},isiOS:function(){return window.navigator.userAgent.match(/(iPad|iPhone|iPod)/g)?i:t},isChrome:function(){return window.navigator.userAgent.indexOf("Chrome")>0&&!OSF.OUtil.isEdge()},isEdge:function(){return window.navigator.userAgent.indexOf("Edge")>0},isIE:function(){return window.navigator.userAgent.indexOf("Trident")>0},isFirefox:function(){return window.navigator.userAgent.indexOf("Firefox")>0},shallowCopy:function(t){var u,i,f,r;if(t==n)return n;else if(Array.isArray(t)){for(u=[],i=0;i<t.length;i++)u.push(t[i]);return u}else{f=t.constructor();for(r in t)t.hasOwnProperty(r)&&(f[r]=t[r]);return f}},createObject:function(t){var r=n,u,i;if(t)for(r={},u=t.length,i=0;i<u;i++)r[t[i].name]=t[i].value;return r},addClass:function(n,t){if(!OSF.OUtil.hasClass(n,t)){var i=n.getAttribute(h);i?n.setAttribute(h,i+" "+t):n.setAttribute(h,t)}},hasClass:function(n,t){var i=n.getAttribute(h);return i&&i.match(new RegExp("(\\s|^)"+t+"(\\s|$)"))},focusToFirstTabbable:function(u,e){var o,h=t,s,c=function(){h=i},l=function(n,t,i){if(t<0||t>n)return r;else if(t===0&&i)return r;else if(t===n-1&&!i)return r;return i?t-1:t+1};if(u=rt(u),o=e?u.length-1:0,u.length===0)return n;while(!h&&o>=0&&o<u.length)s=u[o],window.focus(),s.addEventListener(f,c),s.focus(),s.removeEventListener(f,c),o=l(u.length,o,e),h||s!==document.activeElement||(h=i);return h?s:n},focusToNextTabbable:function(u,e,o){var l,s,c=t,h,a=function(){c=i},y=function(n,t){for(var i=0;i<n.length;i++)if(n[i]===t)return i;return r},v=function(n,t,i){if(t<0||t>n)return r;else if(t===0&&i)return r;else if(t===n-1&&!i)return r;return i?t-1:t+1};if(u=rt(u),l=y(u,e),s=v(u.length,l,o),s<0)return n;while(!c&&s>=0&&s<u.length)h=u[s],h.addEventListener(f,a),h.focus(),h.removeEventListener(f,a),s=v(u.length,s,o),c||h!==document.activeElement||(c=i);return c?h:n}}}();OSF.OUtil.Guid=function(){var n=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];return{generateNewGuid:function(){for(var i="",r=(new Date).getTime(),t=0;t<32&&r>0;t++)(t==8||t==12||t==16||t==20)&&(i+="-"),i+=n[r%16],r=Math.floor(r/16);for(;t<32;t++)(t==8||t==12||t==16||t==20)&&(i+="-"),i+=n[Math.floor(Math.random()*16)];return i}}}();window.OSF=OSF;OSF.OUtil.setNamespace("OSF",window);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,OutlookIOS:65536,OneNoteWebApp:131072,OneNote:262144,ExcelWinRT:524288,WordWinRT:1048576,PowerpointWinRT:2097152,OutlookAndroid:4194304,OneNoteWinRT:8388608,ExcelAndroid:8388609,VisioWebApp:8388610};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,NotifyHostError:8,RefreshAddinCommands:9,PageIsReady:10,TabIn:11,TabInShift:12,TabExit:13,TabExitShift:14,EscExit:15,F2Exit:16,ExitNoFocusable:17,ExitNoFocusableShift:18};OSF.SharedConstants={NotificationConversationIdSuffix:"_ntf"};OSF.DialogMessageType={DialogMessageReceived:0,DialogParentMessageReceived:1,DialogClosed:12006};OSF.OfficeAppContext=function(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y,p,w,b,k,d,g,nt,tt,it){var rt=this;rt._id=n;rt._appName=t;rt._appVersion=i;rt._appUILocale=r;rt._dataLocale=u;rt._docUrl=f;rt._clientMode=e;rt._settings=o;rt._reason=s;rt._osfControlType=h;rt._eToken=c;rt._correlationId=l;rt._appInstanceId=a;rt._touchEnabled=v;rt._commerceAllowed=y;rt._appMinorVersion=p;rt._requirementMatrix=w;rt._hostCustomMessage=b;rt._hostFullVersion=k;rt._isDialog=!1;rt._clientWindowHeight=d;rt._clientWindowWidth=g;rt._addinName=nt;rt._appDomains=tt;rt._dialogRequirementMatrix=it;rt.get_id=function(){return this._id};rt.get_appName=function(){return this._appName};rt.get_appVersion=function(){return this._appVersion};rt.get_appUILocale=function(){return this._appUILocale};rt.get_dataLocale=function(){return this._dataLocale};rt.get_docUrl=function(){return this._docUrl};rt.get_clientMode=function(){return this._clientMode};rt.get_bindings=function(){return this._bindings};rt.get_settings=function(){return this._settings};rt.get_reason=function(){return this._reason};rt.get_osfControlType=function(){return this._osfControlType};rt.get_eToken=function(){return this._eToken};rt.get_correlationId=function(){return this._correlationId};rt.get_appInstanceId=function(){return this._appInstanceId};rt.get_touchEnabled=function(){return this._touchEnabled};rt.get_commerceAllowed=function(){return this._commerceAllowed};rt.get_appMinorVersion=function(){return this._appMinorVersion};rt.get_requirementMatrix=function(){return this._requirementMatrix};rt.get_dialogRequirementMatrix=function(){return this._dialogRequirementMatrix};rt.get_hostCustomMessage=function(){return this._hostCustomMessage};rt.get_hostFullVersion=function(){return this._hostFullVersion};rt.get_isDialog=function(){return this._isDialog};rt.get_clientWindowHeight=function(){return this._clientWindowHeight};rt.get_clientWindowWidth=function(){return this._clientWindowWidth};rt.get_addinName=function(){return this._addinName};rt.get_appDomains=function(){return this._appDomains}};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",Text:"text",ImageLeft:"imageLeft",ImageTop:"imageTop",ImageWidth:"imageWidth",ImageHeight:"imageHeight",TaskId:"taskId",FieldId:"fieldId",FieldValue:"fieldValue",ServerUrl:"serverUrl",ListName:"listName",ResourceId:"resourceId",ViewType:"viewType",ViewName:"viewName",GetRawValue:"getRawValue",CellFormat:"cellFormat",TableOptions:"tableOptions",TaskIndex:"taskIndex",ResourceIndex:"resourceIndex",CustomFieldId:"customFieldId",Url:"url",MessageHandler:"messageHandler",Width:"width",Height:"height",RequireHTTPs:"requireHTTPS",MessageToParent:"messageToParent",DisplayInIframe:"displayInIframe",MessageContent:"messageContent"};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.UI={};OSF.DDA.getXdmEventName=function(n,t){return t==Microsoft.Office.WebExtension.EventType.BindingSelectionChanged||t==Microsoft.Office.WebExtension.EventType.BindingDataChanged||t==Microsoft.Office.WebExtension.EventType.DataNodeDeleted||t==Microsoft.Office.WebExtension.EventType.DataNodeInserted||t==Microsoft.Office.WebExtension.EventType.DataNodeReplaced?n+"_"+t:t};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,dispidCloseContainerMethod:97,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,dispidCreateTaskMethod:124,dispidAddDataPartMethod:128,dispidGetDataPartByIdMethod:129,dispidGetDataPartsByNamespaceMethod:130,dispidGetDataPartXmlMethod:131,dispidGetDataPartNodesMethod:132,dispidDeleteDataPartMethod:133,dispidGetDataNodeValueMethod:134,dispidGetDataNodeXmlMethod:135,dispidGetDataNodesMethod:136,dispidSetDataNodeValueMethod:137,dispidSetDataNodeXmlMethod:138,dispidAddDataNamespaceMethod:139,dispidGetDataUriByPrefixMethod:140,dispidGetDataPrefixByUriMethod:141,dispidGetDataNodeTextMethod:142,dispidSetDataNodeTextMethod:143,dispidMessageParentMethod:144,dispidSendMessageMethod:145,dispidMethodMax:145};OSF.DDA.EventDispId={dispidEventMin:0,dispidInitializeEvent:0,dispidSettingsChangedEvent:1,dispidDocumentSelectionChangedEvent:2,dispidBindingSelectionChangedEvent:3,dispidBindingDataChangedEvent:4,dispidDocumentOpenEvent:5,dispidDocumentCloseEvent:6,dispidActiveViewChangedEvent:7,dispidDocumentThemeChangedEvent:8,dispidOfficeThemeChangedEvent:9,dispidDialogMessageReceivedEvent:10,dispidDialogNotificationShownInAddinEvent:11,dispidDialogParentMessageReceivedEvent:12,dispidActivationStatusChangedEvent:32,dispidAppCommandInvokedEvent:39,dispidOlkItemSelectedChangedEvent:46,dispidTaskSelectionChangedEvent:56,dispidResourceSelectionChangedEvent:57,dispidViewSelectionChangedEvent:58,dispidDataNodeAddedEvent:60,dispidDataNodeReplacedEvent:61,dispidDataNodeDeletedEvent:62,dispidEventMax:63};OSF.DDA.ErrorCodeManager=function(){var n={};return{getErrorArgs:function(t){var i=n[t];return i?(i.name||(i.name=n[this.errorCodes.ooeInternalError].name),i.message||(i.message=n[this.errorCodes.ooeInternalError].message)):i=n[this.errorCodes.ooeInternalError],i},addErrorMessage:function(t,i){n[t]=i},errorCodes:{ooeSuccess:0,ooeChunkResult:1,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,ooeActivityLimitReached:5102,ooeCustomXmlNodeNotFound:6e3,ooeCustomXmlError:6100,ooeCustomXmlExceedQuota:6101,ooeCustomXmlOutOfDate:6102,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:11e3,ooeNetworkProblemRetrieveFile:11001,ooeInvalidSliceSize:11002,ooeInvalidCallback:11101,ooeInvalidWidth:12e3,ooeInvalidHeight:12001,ooeNavigationError:12002,ooeInvalidScheme:12003,ooeAppDomains:12004,ooeRequireHTTPS:12005,ooeWebDialogClosed:12006,ooeDialogAlreadyOpened:12007,ooeEndUserAllow:12008,ooeEndUserIgnore:12009,ooeNotUILessDialog:12010,ooeCrossZone:12011},initializeErrorMessages:function(t){n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported]={name:t.L_InvalidCoercion,message:t.L_CoercionTypeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetSelectionNotMatchDataType]={name:t.L_DataReadError,message:t.L_GetSelectionNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding]={name:t.L_InvalidCoercion,message:t.L_CoercionTypeNotMatchBinding};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRowColumnCounts]={name:t.L_DataReadError,message:t.L_InvalidGetRowColumnCounts};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionNotSupportCoercionType]={name:t.L_DataReadError,message:t.L_SelectionNotSupportCoercionType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetStartRowColumn]={name:t.L_DataReadError,message:t.L_InvalidGetStartRowColumn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialGetNotSupported]={name:t.L_DataReadError,message:t.L_NonUniformPartialGetNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataIsTooLarge]={name:t.L_DataReadError,message:t.L_GetDataIsTooLarge};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeFileTypeNotSupported]={name:t.L_DataReadError,message:t.L_FileTypeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataParametersConflict]={name:t.L_DataReadError,message:t.L_GetDataParametersConflict};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetColumns]={name:t.L_DataReadError,message:t.L_InvalidGetColumns};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRows]={name:t.L_DataReadError,message:t.L_InvalidGetRows};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidReadForBlankRow]={name:t.L_DataReadError,message:t.L_InvalidReadForBlankRow};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject]={name:t.L_DataWriteError,message:t.L_UnsupportedDataObject};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotWriteToSelection]={name:t.L_DataWriteError,message:t.L_CannotWriteToSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchSelection]={name:t.L_DataWriteError,message:t.L_DataNotMatchSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOverwriteWorksheetData]={name:t.L_DataWriteError,message:t.L_OverwriteWorksheetData};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingSize]={name:t.L_DataWriteError,message:t.L_DataNotMatchBindingSize};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetStartRowColumn]={name:t.L_DataWriteError,message:t.L_InvalidSetStartRowColumn};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidDataFormat]={name:t.L_InvalidFormat,message:t.L_InvalidDataFormat};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchCoercionType]={name:t.L_InvalidDataObject,message:t.L_DataNotMatchCoercionType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingType]={name:t.L_InvalidDataObject,message:t.L_DataNotMatchBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataIsTooLarge]={name:t.L_DataWriteError,message:t.L_SetDataIsTooLarge};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialSetNotSupported]={name:t.L_DataWriteError,message:t.L_NonUniformPartialSetNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetColumns]={name:t.L_DataWriteError,message:t.L_InvalidSetColumns};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetRows]={name:t.L_DataWriteError,message:t.L_InvalidSetRows};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataParametersConflict]={name:t.L_DataWriteError,message:t.L_SetDataParametersConflict};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionCannotBound]={name:t.L_BindingCreationError,message:t.L_SelectionCannotBound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingNotExist]={name:t.L_InvalidBindingError,message:t.L_BindingNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingToMultipleSelection]={name:t.L_BindingCreationError,message:t.L_BindingToMultipleSelection};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSelectionForBindingType]={name:t.L_BindingCreationError,message:t.L_InvalidSelectionForBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnThisBindingType]={name:t.L_InvalidBindingOperation,message:t.L_OperationNotSupportedOnThisBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNamedItemNotFound]={name:t.L_BindingCreationError,message:t.L_NamedItemNotFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeMultipleNamedItemFound]={name:t.L_BindingCreationError,message:t.L_MultipleNamedItemFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidNamedItemForBindingType]={name:t.L_BindingCreationError,message:t.L_InvalidNamedItemForBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnknownBindingType]={name:t.L_InvalidBinding,message:t.L_UnknownBindingType};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnMatrixData]={name:t.L_InvalidBindingOperation,message:t.L_OperationNotSupportedOnMatrixData};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidColumnsForBinding]={name:t.L_InvalidBinding,message:t.L_InvalidColumnsForBinding};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingNameNotExist]={name:t.L_ReadSettingsError,message:t.L_SettingNameNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsCannotSave]={name:t.L_SaveSettingsError,message:t.L_SettingsCannotSave};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsAreStale]={name:t.L_SettingsStaleError,message:t.L_SettingsAreStale};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupported]={name:t.L_HostError,message:t.L_OperationNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError]={name:t.L_InternalError,message:t.L_InternalErrorDescription};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentReadOnly]={name:t.L_PermissionDenied,message:t.L_DocumentReadOnly};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist]={name:t.L_EventRegistrationError,message:t.L_EventHandlerNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext]={name:t.L_InvalidAPICall,message:t.L_InvalidApiCallInContext};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeShuttingDown]={name:t.L_ShuttingDown,message:t.L_ShuttingDown};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration]={name:t.L_UnsupportedEnumeration,message:t.L_UnsupportedEnumerationMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeBrowserAPINotSupported]={name:t.L_APINotSupported,message:t.L_BrowserAPINotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTimeout]={name:t.L_APICallFailed,message:t.L_RequestTimeout};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeTooManyIncompleteRequests]={name:t.L_APICallFailed,message:t.L_TooManyIncompleteRequests};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTokenUnavailable]={name:t.L_APICallFailed,message:t.L_RequestTokenUnavailable};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeActivityLimitReached]={name:t.L_APICallFailed,message:t.L_ActivityLimitReached};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlNodeNotFound]={name:t.L_InvalidNode,message:t.L_CustomXmlNodeNotFound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlError]={name:t.L_CustomXmlError,message:t.L_CustomXmlError};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlExceedQuota]={name:t.L_CustomXmlExceedQuotaName,message:t.L_CustomXmlExceedQuotaMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlOutOfDate]={name:t.L_CustomXmlOutOfDateName,message:t.L_CustomXmlOutOfDateMessage};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability]={name:t.L_PermissionDenied,message:t.L_NoCapability};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotNavTo]={name:t.L_CannotNavigateTo,message:t.L_CannotNavigateTo};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeSpecifiedIdNotExist]={name:t.L_SpecifiedIdNotExist,message:t.L_SpecifiedIdNotExist};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavOutOfBound]={name:t.L_NavOutOfBound,message:t.L_NavOutOfBound};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellDataAmountBeyondLimits]={name:t.L_DataWriteReminder,message:t.L_CellDataAmountBeyondLimits};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeElementMissing]={name:t.L_MissingParameter,message:t.L_ElementMissing};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeProtectedError]={name:t.L_PermissionDenied,message:t.L_NoCapability};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCellsValue]={name:t.L_InvalidValue,message:t.L_InvalidCellsValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidTableOptionValue]={name:t.L_InvalidValue,message:t.L_InvalidTableOptionValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidFormatValue]={name:t.L_InvalidValue,message:t.L_InvalidFormatValue};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRowIndexOutOfRange]={name:t.L_OutOfRange,message:t.L_RowIndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeColIndexOutOfRange]={name:t.L_OutOfRange,message:t.L_ColIndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeFormatValueOutOfRange]={name:t.L_OutOfRange,message:t.L_FormatValueOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellFormatAmountBeyondLimits]={name:t.L_FormattingReminder,message:t.L_CellFormatAmountBeyondLimits};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeMemoryFileLimit]={name:t.L_MemoryLimit,message:t.L_CloseFileBeforeRetrieve};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNetworkProblemRetrieveFile]={name:t.L_NetworkProblem,message:t.L_NetworkProblemRetrieveFile};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize]={name:t.L_InvalidValue,message:t.L_SliceSizeNotSupported};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened]={name:t.L_DisplayDialogError,message:t.L_DialogAlreadyOpened};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidWidth]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidHeight]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavigationError]={name:t.L_DisplayDialogError,message:t.L_NetworkProblem};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme]={name:t.L_DialogNavigateError,message:t.L_DialogAddressNotTrusted};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeAppDomains]={name:t.L_DisplayDialogError,message:t.L_DialogAddressNotTrusted};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS]={name:t.L_DisplayDialogError,message:t.L_DialogAddressNotTrusted};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore]={name:t.L_DisplayDialogError,message:t.L_UserClickIgnore};n[OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone]={name:t.L_DisplayDialogError,message:t.L_NewWindowCrossZoneErrorString}}}}(),function(n){var t;(function(n){var t=1.1,r=function(){function n(n){var t=this;t.isSetSupported=function(n,t){var u,i,r;return n==undefined?!1:(t==undefined&&(t=0),u=this._setMap,i=u._sets,i.hasOwnProperty(n.toLowerCase())?(r=i[n.toLowerCase()],r>0&&r>=t):!1)};t._setMap=n;t.isSetSupported=t.isSetSupported.bind(t)}return n}(),i,h,u,c,l,f,a,e,v,y,p,w,b,o,k,d,g,s,nt,tt,it,rt;n.RequirementMatrix=r;i=function(){function n(n){this._addSetMap=function(n){for(var t in n)this._sets[t]=n[t]};this._sets=n}return n}();n.DefaultSetRequirement=i;h=function(n){function i(){n.call(this,{dialogapi:t})}return __extends(i,n),i}(i);n.DefaultDialogSetRequirement=h;u=function(n){function i(){n.call(this,{bindingevents:t,documentevents:t,excelapi:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t})}return __extends(i,n),i}(i);n.ExcelClientDefaultSetRequirement=u;c=function(n){function i(){n.call(this);this._addSetMap({imagecoercion:t})}return __extends(i,n),i}(u);n.ExcelClientV1DefaultSetRequirement=c;l=function(n){function t(){n.call(this,{mailbox:1.3})}return __extends(t,n),t}(i);n.OutlookClientDefaultSetRequirement=l;f=function(n){function i(){n.call(this,{bindingevents:t,compressedfile:t,customxmlparts:t,documentevents:t,file:t,htmlcoercion:t,matrixbindings:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,textfile:t,wordapi:t})}return __extends(i,n),i}(i);n.WordClientDefaultSetRequirement=f;a=function(n){function i(){n.call(this);this._addSetMap({customxmlparts:1.2,wordapi:1.2,imagecoercion:t})}return __extends(i,n),i}(f);n.WordClientV1DefaultSetRequirement=a;e=function(n){function i(){n.call(this,{activeview:t,compressedfile:t,documentevents:t,file:t,pdffile:t,selection:t,settings:t,textcoercion:t})}return __extends(i,n),i}(i);n.PowerpointClientDefaultSetRequirement=e;v=function(n){function i(){n.call(this);this._addSetMap({imagecoercion:t})}return __extends(i,n),i}(e);n.PowerpointClientV1DefaultSetRequirement=v;y=function(n){function i(){n.call(this,{selection:t,textcoercion:t})}return __extends(i,n),i}(i);n.ProjectClientDefaultSetRequirement=y;p=function(n){function i(){n.call(this,{bindingevents:t,documentevents:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,file:t})}return __extends(i,n),i}(i);n.ExcelWebDefaultSetRequirement=p;w=function(n){function i(){n.call(this,{compressedfile:t,documentevents:t,file:t,imagecoercion:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablecoercion:t,textcoercion:t,textfile:t})}return __extends(i,n),i}(i);n.WordWebDefaultSetRequirement=w;b=function(n){function i(){n.call(this,{activeview:t,settings:t})}return __extends(i,n),i}(i);n.PowerpointWebDefaultSetRequirement=b;o=function(n){function t(){n.call(this,{mailbox:1.3})}return __extends(t,n),t}(i);n.OutlookWebDefaultSetRequirement=o;k=function(n){function i(){n.call(this,{activeview:t,documentevents:t,selection:t,settings:t,textcoercion:t})}return __extends(i,n),i}(i);n.SwayWebDefaultSetRequirement=k;d=function(n){function i(){n.call(this,{bindingevents:t,partialtablebindings:t,settings:t,tablebindings:t,tablecoercion:t})}return __extends(i,n),i}(i);n.AccessWebDefaultSetRequirement=d;g=function(n){function i(){n.call(this,{bindingevents:t,documentevents:t,matrixbindings:t,matrixcoercion:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t})}return __extends(i,n),i}(i);n.ExcelIOSDefaultSetRequirement=g;s=function(n){function i(){n.call(this,{bindingevents:t,compressedfile:t,customxmlparts:t,documentevents:t,file:t,htmlcoercion:t,matrixbindings:t,matrixcoercion:t,ooxmlcoercion:t,pdffile:t,selection:t,settings:t,tablebindings:t,tablecoercion:t,textbindings:t,textcoercion:t,textfile:t})}return __extends(i,n),i}(i);n.WordIOSDefaultSetRequirement=s;nt=function(n){function t(){n.call(this);this._addSetMap({customxmlparts:1.2,wordapi:1.2})}return __extends(t,n),t}(s);n.WordIOSV1DefaultSetRequirement=nt;tt=function(n){function i(){n.call(this,{activeview:t,compressedfile:t,documentevents:t,file:t,pdffile:t,selection:t,settings:t,textcoercion:t})}return __extends(i,n),i}(i);n.PowerpointIOSDefaultSetRequirement=tt;it=function(n){function i(){n.call(this,{mailbox:t})}return __extends(i,n),i}(i);n.OutlookIOSDefaultSetRequirement=it;rt=function(){function n(){}var t="undefined";return n.initializeOsfDda=function(){OSF.OUtil.setNamespace("Requirement",OSF.DDA)},n.getDefaultRequirementMatrix=function(u){var f,e,s,o;return this.initializeDefaultSetMatrix(),f=undefined,e=u.get_requirementMatrix(),e!=undefined&&e.length>0&&typeof JSON!==t?(s=JSON.parse(u.get_requirementMatrix().toLowerCase()),f=new r(new i(s))):(o=n.getClientFullVersionString(u),f=n.DefaultSetArrayMatrix!=undefined&&n.DefaultSetArrayMatrix[o]!=undefined?new r(n.DefaultSetArrayMatrix[o]):new r(new i({}))),f},n.getDefaultDialogRequirementMatrix=function(n){var u=undefined,f=n.get_dialogRequirementMatrix(),e;return f!=undefined&&f.length>0&&typeof JSON!==t?(e=JSON.parse(n.get_requirementMatrix().toLowerCase()),u=new r(new i(e))):u=new r(new h),u},n.getClientFullVersionString=function(n){var i=n.get_appMinorVersion(),u="",r="",t=n.get_appName(),f=t==1024||t==4096||t==8192||t==65536;return f&&n.get_appVersion()==1?r=t==4096&&i>=15?"16.00.01":"16.00":n.get_appName()==64?r=n.get_appVersion():(u=i<10?"0"+i:""+i,r=n.get_appVersion()+"."+u),n.get_appName()+"-"+r},n.initializeDefaultSetMatrix=function(){n.DefaultSetArrayMatrix[n.Excel_RCLIENT_1600]=new u;n.DefaultSetArrayMatrix[n.Word_RCLIENT_1600]=new f;n.DefaultSetArrayMatrix[n.PowerPoint_RCLIENT_1600]=new e;n.DefaultSetArrayMatrix[n.Excel_RCLIENT_1601]=new c;n.DefaultSetArrayMatrix[n.Word_RCLIENT_1601]=new a;n.DefaultSetArrayMatrix[n.PowerPoint_RCLIENT_1601]=new v;n.DefaultSetArrayMatrix[n.Outlook_RCLIENT_1600]=new l;n.DefaultSetArrayMatrix[n.Excel_WAC_1600]=new p;n.DefaultSetArrayMatrix[n.Word_WAC_1600]=new w;n.DefaultSetArrayMatrix[n.Outlook_WAC_1600]=new o;n.DefaultSetArrayMatrix[n.Outlook_WAC_1601]=new o;n.DefaultSetArrayMatrix[n.Project_RCLIENT_1600]=new y;n.DefaultSetArrayMatrix[n.Access_WAC_1600]=new d;n.DefaultSetArrayMatrix[n.PowerPoint_WAC_1600]=new b;n.DefaultSetArrayMatrix[n.Excel_IOS_1600]=new g;n.DefaultSetArrayMatrix[n.SWAY_WAC_1600]=new k;n.DefaultSetArrayMatrix[n.Word_IOS_1600]=new s;n.DefaultSetArrayMatrix[n.Word_IOS_16001]=new nt;n.DefaultSetArrayMatrix[n.PowerPoint_IOS_1600]=new tt;n.DefaultSetArrayMatrix[n.Outlook_IOS_1600]=new it},n.Excel_RCLIENT_1600="1-16.00",n.Excel_RCLIENT_1601="1-16.01",n.Word_RCLIENT_1600="2-16.00",n.Word_RCLIENT_1601="2-16.01",n.PowerPoint_RCLIENT_1600="4-16.00",n.PowerPoint_RCLIENT_1601="4-16.01",n.Outlook_RCLIENT_1600="8-16.00",n.Excel_WAC_1600="16-16.00",n.Word_WAC_1600="32-16.00",n.Outlook_WAC_1600="64-16.00",n.Outlook_WAC_1601="64-16.01",n.Project_RCLIENT_1600="128-16.00",n.Access_WAC_1600="256-16.00",n.PowerPoint_WAC_1600="512-16.00",n.Excel_IOS_1600="1024-16.00",n.SWAY_WAC_1600="2048-16.00",n.Word_IOS_1600="4096-16.00",n.Word_IOS_16001="4096-16.00.01",n.PowerPoint_IOS_1600="8192-16.00",n.Outlook_IOS_1600="65536-16.00",n.DefaultSetArrayMatrix={},n}();n.RequirementsMatrixFactory=rt})(t=n.Requirement||(n.Requirement={}))}(OfficeExt||(OfficeExt={}));OfficeExt.Requirement.RequirementsMatrixFactory.initializeOsfDda();Microsoft.Office.WebExtension.ApplicationMode={WebEditor:"webEditor",WebViewer:"webViewer",Client:"client"};Microsoft.Office.WebExtension.DocumentMode={ReadOnly:"readOnly",ReadWrite:"readWrite"};OSF.NamespaceManager=function(){var t,n=!1;return{enableShortcut:function(){n||(window.Office?t=window.Office:OSF.OUtil.setNamespace("Office",window),window.Office=Microsoft.Office.WebExtension,n=!0)},disableShortcut:function(){n&&(t?window.Office=t:OSF.OUtil.unsetNamespace("Office",window),n=!1)}}}();OSF.NamespaceManager.enableShortcut();Microsoft.Office.WebExtension.useShortNamespace=function(n){n?OSF.NamespaceManager.enableShortcut():OSF.NamespaceManager.disableShortcut()};Microsoft.Office.WebExtension.select=function(n,t){var i,r,o,u,f,e;if(n&&typeof n=="string"&&(r=n.indexOf("#"),r!=-1)){o=n.substring(0,r);u=n.substring(r+1);switch(o){case"binding":case"bindings":u&&(i=new OSF.DDA.BindingPromise(u))}}if(i)return i.onFail=t,i;else if(t)if(f=typeof t,f=="function")e={},e[Microsoft.Office.WebExtension.Parameters.Callback]=t,OSF.DDA.issueAsyncResult(e,OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext,OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext));else throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,f);};OSF.DDA.Context=function(n,t,i,r,u){var o="requirements",f=this,s,e;OSF.OUtil.defineEnumerableProperties(f,{contentLanguage:{value:n.get_dataLocale()},displayLanguage:{value:n.get_appUILocale()},touchEnabled:{value:n.get_touchEnabled()},commerceAllowed:{value:n.get_commerceAllowed()}});i&&OSF.OUtil.defineEnumerableProperty(f,"license",{value:i});n.ui&&OSF.OUtil.defineEnumerableProperty(f,"ui",{value:n.ui});n.get_isDialog()?(e=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultDialogRequirementMatrix(n),OSF.OUtil.defineEnumerableProperty(f,o,{value:e})):(t&&OSF.OUtil.defineEnumerableProperty(f,"document",{value:t}),r&&(s=r.displayName||"appOM",delete r.displayName,OSF.OUtil.defineEnumerableProperty(f,s,{value:r})),u&&OSF.OUtil.defineEnumerableProperty(f,"officeTheme",{get:function(){return u()}}),e=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultRequirementMatrix(n),OSF.OUtil.defineEnumerableProperty(f,o,{value:e}))};OSF.DDA.OutlookContext=function(n,t,i,r,u){OSF.DDA.OutlookContext.uber.constructor.call(this,n,null,i,r,u);t&&OSF.OUtil.defineEnumerableProperty(this,"roamingSettings",{value:t})};OSF.OUtil.extend(OSF.DDA.OutlookContext,OSF.DDA.Context);OSF.DDA.OutlookAppOm=function(){};OSF.DDA.Document=function(n,t){var i;switch(n.get_clientMode()){case OSF.ClientMode.ReadOnly:i=Microsoft.Office.WebExtension.DocumentMode.ReadOnly;break;case OSF.ClientMode.ReadWrite:i=Microsoft.Office.WebExtension.DocumentMode.ReadWrite}t&&OSF.OUtil.defineEnumerableProperty(this,"settings",{value:t});OSF.OUtil.defineMutableProperties(this,{mode:{value:i},url:{value:n.get_docUrl()}})};OSF.DDA.JsomDocument=function(n,t,i){var r=this,u;OSF.DDA.JsomDocument.uber.constructor.call(r,n,i);t&&OSF.OUtil.defineEnumerableProperty(r,"bindings",{get:function(){return t}});u=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(r,[u.GetSelectedDataAsync,u.SetSelectedDataAsync]);OSF.DDA.DispIdHost.addEventSupport(r,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 n;return OSF&&OSF._OfficeAppFactory&&(n=OSF._OfficeAppFactory.getContext()),n}});OSF.DDA.License=function(n){OSF.OUtil.defineEnumerableProperty(this,"value",{value:n})};OSF.DDA.ApiMethodCall=function(n,t,i,r,u){var f=this,e=n.length,o=OSF.OUtil.delayExecutionAndCache(function(){return OSF.OUtil.formatString(Strings.OfficeOM.L_InvalidParameters,u)});f.verifyArguments=function(n,t){var u,i,r;for(u in n){if(i=n[u],r=t[u],i["enum"])switch(typeof r){case"string":if(OSF.OUtil.listContainsValue(i["enum"],r))break;case"undefined":throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration;default:throw o();}if(i.types&&!OSF.OUtil.listContainsValue(i.types,typeof r))throw o();}};f.extractRequiredArguments=function(t,i,r){var f,u,h,s,c,l;if(t.length<e)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_MissingRequiredArguments);for(f=[],u=0;u<e;u++)f.push(t[u]);for(this.verifyArguments(n,f),h={},u=0;u<e;u++){if(s=n[u],c=f[u],s.verify&&(l=s.verify(c,i,r),!l))throw o();h[s.name]=c}return h};f.fillOptions=function(n,i,r,u){var o,f,e;n=n||{};for(o in t)OSF.OUtil.listContainsKey(n,o)||(f=undefined,e=t[o],e.calculate&&i&&(f=e.calculate(i,r,u)),f||e.defaultValue===undefined||(f=e.defaultValue),n[o]=f);return n};f.constructCallArgs=function(n,t,u,f){var e={},o,s,h;for(o in n)e[o]=n[o];for(s in t)e[s]=t[s];for(h in i)e[h]=i[h](u,f);return r&&(e=r(e,u,f)),e}};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(n){var t,i;for(t in n)i={},OSF.OUtil.defineEnumerableProperties(i,{id:{value:t},displayName:{value:n[t]}}),OSF.DDA.AsyncMethodNames[t]=i};OSF.DDA.AsyncMethodCall=function(n,t,i,r,u,f,e){function c(n,i,r,u){var f,e,c,l;if(n.length>s+2)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(c=n.length-1;c>=s;c--){l=n[c];switch(typeof l){case"object":if(f)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else f=l;break;case h:if(e)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalFunction);else e=l;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument);}}if(f=o.fillOptions(f,i,r,u),e)if(f[Microsoft.Office.WebExtension.Parameters.Callback])throw Strings.OfficeOM.L_RedundantCallbackSpecification;else f[Microsoft.Office.WebExtension.Parameters.Callback]=e;return o.verifyArguments(t,f),f}var h="function",s=n.length,o=new OSF.DDA.ApiMethodCall(n,t,i,f,e);this.verifyAndExtractCall=function(n,t,i){var r=o.extractRequiredArguments(n,t,i),u=c(n,r,t,i);return o.constructCallArgs(r,u,t,i)};this.processResponse=function(n,t,i,f){return n==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess?r?r(t,i,f):t:u?u(n,t):OSF.DDA.ErrorCodeManager.getErrorArgs(n)};this.getCallArgs=function(n){for(var t,u,r,i=n.length-1;i>=s;i--){r=n[i];switch(typeof r){case"object":t=r;break;case h:u=r}}return t=t||{},u&&(t[Microsoft.Office.WebExtension.Parameters.Callback]=u),t}};OSF.DDA.AsyncMethodCallFactory=function(){return{manufacture:function(n){var t=n.supportedOptions?OSF.OUtil.createObject(n.supportedOptions):[],i=n.privateStateCallbacks?OSF.OUtil.createObject(n.privateStateCallbacks):[];return new OSF.DDA.AsyncMethodCall(n.requiredArguments||[],t,i,n.onSucceeded,n.onFailed,n.checkCallArgs,n.method.displayName)}}}();OSF.DDA.AsyncMethodCalls={};OSF.DDA.AsyncMethodCalls.define=function(n){OSF.DDA.AsyncMethodCalls[n.method.id]=OSF.DDA.AsyncMethodCallFactory.manufacture(n)};OSF.DDA.Error=function(n,t,i){OSF.OUtil.defineEnumerableProperties(this,{name:{value:n},message:{value:t},code:{value:i}})};OSF.DDA.AsyncResult=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{value:{value:n[OSF.DDA.AsyncResultEnum.Properties.Value]},status:{value:t?Microsoft.Office.WebExtension.AsyncResultStatus.Failed:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded}});n[OSF.DDA.AsyncResultEnum.Properties.Context]&&OSF.OUtil.defineEnumerableProperty(this,"asyncContext",{value:n[OSF.DDA.AsyncResultEnum.Properties.Context]});t&&OSF.OUtil.defineEnumerableProperty(this,"error",{value:new OSF.DDA.Error(t[OSF.DDA.AsyncResultEnum.ErrorProperties.Name],t[OSF.DDA.AsyncResultEnum.ErrorProperties.Message],t[OSF.DDA.AsyncResultEnum.ErrorProperties.Code])})};OSF.DDA.issueAsyncResult=function(n,t,i){var f=n[Microsoft.Office.WebExtension.Parameters.Callback],u,r;f&&(u={},u[OSF.DDA.AsyncResultEnum.Properties.Context]=n[Microsoft.Office.WebExtension.Parameters.AsyncContext],t==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess?u[OSF.DDA.AsyncResultEnum.Properties.Value]=i:(r={},i=i||OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError),r[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]=t||OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError,r[OSF.DDA.AsyncResultEnum.ErrorProperties.Name]=i.name||i,r[OSF.DDA.AsyncResultEnum.ErrorProperties.Message]=i.message||i),f(new OSF.DDA.AsyncResult(u,r)))};OSF.DDA.SyncMethodNames={};OSF.DDA.SyncMethodNames.addNames=function(n){var t,i;for(t in n)i={},OSF.OUtil.defineEnumerableProperties(i,{id:{value:t},displayName:{value:n[t]}}),OSF.DDA.SyncMethodNames[t]=i};OSF.DDA.SyncMethodCall=function(n,t,i,r,u){function o(n,i,r,u){var o,c,s,h;if(n.length>e+1)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(s=n.length-1;s>=e;s--){h=n[s];switch(typeof h){case"object":if(o)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);else o=h;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument);}}return o=f.fillOptions(o,i,r,u),f.verifyArguments(t,o),o}var e=n.length,f=new OSF.DDA.ApiMethodCall(n,t,i,r,u);this.verifyAndExtractCall=function(n,t,i){var r=f.extractRequiredArguments(n,t,i),u=o(n,r,t,i);return f.constructCallArgs(r,u,t,i)}};OSF.DDA.SyncMethodCallFactory=function(){return{manufacture:function(n){var t=n.supportedOptions?OSF.OUtil.createObject(n.supportedOptions):[];return new OSF.DDA.SyncMethodCall(n.requiredArguments||[],t,n.privateStateCallbacks,n.checkCallArgs,n.method.displayName)}}}();OSF.DDA.SyncMethodCalls={};OSF.DDA.SyncMethodCalls.define=function(n){OSF.DDA.SyncMethodCalls[n.method.id]=OSF.DDA.SyncMethodCallFactory.manufacture(n)};OSF.DDA.ListType=function(){var n={};return{setListType:function(t,i){n[t]=i},isListType:function(t){return OSF.OUtil.listContainsKey(n,t)},getDescriptor:function(t){return n[t]}}}();OSF.DDA.HostParameterMap=function(n,t){function e(i,f){var a=i?{}:undefined,s,h,o,v,c,l;for(s in i){if(h=i[s],OSF.DDA.ListType.isListType(s)){o=[];for(v in h)o.push(e(h[v],f))}else OSF.OUtil.listContainsKey(r,s)?o=r[s][f](h):f==u&&n.preserveNesting(s)?o=e(h,f):(c=t[s],c?(l=c[f],l&&(o=l[h],o===undefined&&(o=h))):o=h);a[s]=o}return a}function l(i,r){var e,u,h,s;for(u in r)h=n.isComplexType(u)?l(i,t[u][o]):i[u],h!=undefined&&(e||(e={}),s=r[u],s==f&&(s=u),e[s]=n.pack(u,h));return e}function s(i,r,e){var o,a,h,l,p,v,y;e||(e={});for(o in r){if(a=r[o],a==f)h=i;else if(a==c){e[o]=i.toArray();continue}else h=i[a];if(h===null||h===undefined)e[o]=undefined;else if(h=n.unpack(o,h),n.isComplexType(o))l=t[o][u],n.preserveNesting(o)?e[o]=s(h,l):s(h,l,e);else if(OSF.DDA.ListType.isListType(o)){l={};p=OSF.DDA.ListType.getDescriptor(o);l[p]=f;v=new Array(h.length);for(y in h)v[y]=s(h[y],l);e[o]=v}else e[o]=h}return e}function a(n,i,r){var f=t[n][r],u,o,c;return r=="toHost"?(o=e(i,r),u=l(o,f)):r==h&&(c=s(i,f),u=e(c,r)),u}var h="fromHost",i=this,o="toHost",u=h,c="sourceData",f="self",r={};r[Microsoft.Office.WebExtension.Parameters.Data]={toHost:function(n){if(n!=null&&n.rows!==undefined){var t={};t[OSF.DDA.TableDataProperties.TableRows]=n.rows;t[OSF.DDA.TableDataProperties.TableHeaders]=n.headers;n=t}return n},fromHost:function(n){return n}};r[Microsoft.Office.WebExtension.Parameters.SampleData]=r[Microsoft.Office.WebExtension.Parameters.Data];t||(t={});i.addMapping=function(n,i){var e,h,c,l,r,s,a,v;if(i.map){e=i.map;h={};for(c in e)l=e[c],l==f&&(l=c),h[l]=c}else e=i.toHost,h=i.fromHost;if(r=t[n],r){s=r[o];for(a in s)e[a]=s[a];s=r[u];for(v in s)h[v]=s[v]}else r=t[n]={};r[o]=e;r[u]=h};i.toHost=function(n,t){return a(n,t,o)};i.fromHost=function(n,t){return a(n,t,u)};i.self=f;i.sourceData=c;i.addComplexType=function(t){n.addComplexType(t)};i.getDynamicType=function(t){return n.getDynamicType(t)};i.setDynamicType=function(t,i){n.setDynamicType(t,i)};i.dynamicTypes=r;i.doMapValues=function(n,t){return e(n,t)}};OSF.DDA.SpecialProcessor=function(n,t){var i=this;i.addComplexType=function(t){n.push(t)};i.getDynamicType=function(n){return t[n]};i.setDynamicType=function(n,i){t[n]=i};i.isComplexType=function(t){return OSF.OUtil.listContainsValue(n,t)};i.isDynamicType=function(n){return OSF.OUtil.listContainsKey(t,n)};i.preserveNesting=function(n){var t=[];return OSF.DDA.PropertyDescriptors&&t.push(OSF.DDA.PropertyDescriptors.Subset),OSF.DDA.DataNodeEventProperties&&(t=t.concat([OSF.DDA.DataNodeEventProperties.OldNode,OSF.DDA.DataNodeEventProperties.NewNode,OSF.DDA.DataNodeEventProperties.NextSiblingNode])),OSF.OUtil.listContainsValue(t,n)};i.pack=function(n,i){return this.isDynamicType(n)?t[n].toHost(i):i};i.unpack=function(n,i){return this.isDynamicType(n)?t[n].fromHost(i):i}};OSF.DDA.getDecoratedParameterMap=function(n,t){function r(n){var i=null,r,t;if(n)for(i={},r=n.length,t=0;t<r;t++)i[n[t].name]=n[t].value;return i}var i=new OSF.DDA.HostParameterMap(n),f=i.self,u;i.define=function(n){var t={},u=r(n.toHost);n.invertible?t.map=u:n.canonical?t.toHost=t.fromHost=u:(t.toHost=u,t.fromHost=r(n.fromHost));i.addMapping(n.type,t);n.isComplexType&&i.addComplexType(n.type)};for(u in t)i.define(t[u]);return i};OSF.OUtil.setNamespace("DispIdHost",OSF.DDA);OSF.DDA.DispIdHost.Methods={InvokeMethod:"invokeMethod",AddEventHandler:"addEventHandler",RemoveEventHandler:"removeEventHandler",OpenDialog:"openDialog",CloseDialog:"closeDialog",MessageParent:"messageParent",SendMessage:"sendMessage"};OSF.DDA.DispIdHost.Delegates={ExecuteAsync:"executeAsync",RegisterEventAsync:"registerEventAsync",UnregisterEventAsync:"unregisterEventAsync",ParameterMap:"parameterMap",OpenDialog:"openDialog",CloseDialog:"closeDialog",MessageParent:"messageParent",SendMessage:"sendMessage"};OSF.DDA.DispIdHost.Facade=function(n,t){function o(n,t,i,r){if(typeof n=="number")r||(r=t.getCallArgs(i)),OSF.DDA.issueAsyncResult(r,n,OSF.DDA.ErrorCodeManager.getErrorArgs(n));else throw n;}var s=null,e=this,r={},u=OSF.DDA.AsyncMethodNames,i=OSF.DDA.MethodDispId,a={GoToByIdAsync:i.dispidNavigateToMethod,GetSelectedDataAsync:i.dispidGetSelectedDataMethod,SetSelectedDataAsync:i.dispidSetSelectedDataMethod,GetDocumentCopyChunkAsync:i.dispidGetDocumentCopyChunkMethod,ReleaseDocumentCopyAsync:i.dispidReleaseDocumentCopyMethod,GetDocumentCopyAsync:i.dispidGetDocumentCopyMethod,AddFromSelectionAsync:i.dispidAddBindingFromSelectionMethod,AddFromPromptAsync:i.dispidAddBindingFromPromptMethod,AddFromNamedItemAsync:i.dispidAddBindingFromNamedItemMethod,GetAllAsync:i.dispidGetAllBindingsMethod,GetByIdAsync:i.dispidGetBindingMethod,ReleaseByIdAsync:i.dispidReleaseBindingMethod,GetDataAsync:i.dispidGetBindingDataMethod,SetDataAsync:i.dispidSetBindingDataMethod,AddRowsAsync:i.dispidAddRowsMethod,AddColumnsAsync:i.dispidAddColumnsMethod,DeleteAllDataValuesAsync:i.dispidClearAllRowsMethod,RefreshAsync:i.dispidLoadSettingsMethod,SaveAsync:i.dispidSaveSettingsMethod,GetActiveViewAsync:i.dispidGetActiveViewMethod,GetFilePropertiesAsync:i.dispidGetFilePropertiesMethod,GetOfficeThemeAsync:i.dispidGetOfficeThemeMethod,GetDocumentThemeAsync:i.dispidGetDocumentThemeMethod,ClearFormatsAsync:i.dispidClearFormatsMethod,SetTableOptionsAsync:i.dispidSetTableOptionsMethod,SetFormatsAsync:i.dispidSetFormatsMethod,ExecuteRichApiRequestAsync:i.dispidExecuteRichApiRequestMethod,AppCommandInvocationCompletedAsync:i.dispidAppCommandInvocationCompletedMethod,CloseContainerAsync:i.dispidCloseContainerMethod,AddDataPartAsync:i.dispidAddDataPartMethod,GetDataPartByIdAsync:i.dispidGetDataPartByIdMethod,GetDataPartsByNameSpaceAsync:i.dispidGetDataPartsByNamespaceMethod,GetPartXmlAsync:i.dispidGetDataPartXmlMethod,GetPartNodesAsync:i.dispidGetDataPartNodesMethod,DeleteDataPartAsync:i.dispidDeleteDataPartMethod,GetNodeValueAsync:i.dispidGetDataNodeValueMethod,GetNodeXmlAsync:i.dispidGetDataNodeXmlMethod,GetRelativeNodesAsync:i.dispidGetDataNodesMethod,SetNodeValueAsync:i.dispidSetDataNodeValueMethod,SetNodeXmlAsync:i.dispidSetDataNodeXmlMethod,AddDataPartNamespaceAsync:i.dispidAddDataNamespaceMethod,GetDataPartNamespaceAsync:i.dispidGetDataUriByPrefixMethod,GetDataPartPrefixAsync:i.dispidGetDataPrefixByUriMethod,GetNodeTextAsync:i.dispidGetDataNodeTextMethod,SetNodeTextAsync:i.dispidSetDataNodeTextMethod,GetSelectedTask:i.dispidGetSelectedTaskMethod,GetTask:i.dispidGetTaskMethod,GetWSSUrl:i.dispidGetWSSUrlMethod,GetTaskField:i.dispidGetTaskFieldMethod,GetSelectedResource:i.dispidGetSelectedResourceMethod,GetResourceField:i.dispidGetResourceFieldMethod,GetProjectField:i.dispidGetProjectFieldMethod,GetSelectedView:i.dispidGetSelectedViewMethod,GetTaskByIndex:i.dispidGetTaskByIndexMethod,GetResourceByIndex:i.dispidGetResourceByIndexMethod,SetTaskField:i.dispidSetTaskFieldMethod,SetResourceField:i.dispidSetResourceFieldMethod,GetMaxTaskIndex:i.dispidGetMaxTaskIndexMethod,GetMaxResourceIndex:i.dispidGetMaxResourceIndexMethod,CreateTask:i.dispidCreateTaskMethod},c,f,l,h;for(f in a)u[f]&&(r[u[f].id]=a[f]);u=OSF.DDA.SyncMethodNames;i=OSF.DDA.MethodDispId;c={MessageParent:i.dispidMessageParentMethod,SendMessage:i.dispidSendMessageMethod};for(f in c)u[f]&&(r[u[f].id]=c[f]);u=Microsoft.Office.WebExtension.EventType;i=OSF.DDA.EventDispId;l={SettingsChanged:i.dispidSettingsChangedEvent,DocumentSelectionChanged:i.dispidDocumentSelectionChangedEvent,BindingSelectionChanged:i.dispidBindingSelectionChangedEvent,BindingDataChanged:i.dispidBindingDataChangedEvent,ActiveViewChanged:i.dispidActiveViewChangedEvent,OfficeThemeChanged:i.dispidOfficeThemeChangedEvent,DocumentThemeChanged:i.dispidDocumentThemeChangedEvent,AppCommandInvoked:i.dispidAppCommandInvokedEvent,DialogMessageReceived:i.dispidDialogMessageReceivedEvent,DialogParentMessageReceived:i.dispidDialogParentMessageReceivedEvent,ItemChanged:i.dispidOlkItemSelectedChangedEvent,TaskSelectionChanged:i.dispidTaskSelectionChangedEvent,ResourceSelectionChanged:i.dispidResourceSelectionChangedEvent,ViewSelectionChanged:i.dispidViewSelectionChangedEvent,DataNodeInserted:i.dispidDataNodeAddedEvent,DataNodeReplaced:i.dispidDataNodeReplacedEvent,DataNodeDeleted:i.dispidDataNodeDeletedEvent};for(h in l)u[h]&&(r[u[h]]=l[h]);e[OSF.DDA.DispIdHost.Methods.InvokeMethod]=function(i,u,f,e){var h,l,a,y,p,w;try{l=i.id;a=OSF.DDA.AsyncMethodCalls[l];h=a.verifyAndExtractCall(u,f,e);var v=r[l],b=n(l),c=s;window.Excel&&window.Office.context.requirements.isSetSupported("RedirectV1Api")&&(window.Excel._RedirectV1APIs=!0);window.Excel&&window.Excel._RedirectV1APIs&&(c=window.Excel._V1APIMap[l])?(c.preprocess&&(h=c.preprocess(h)),y=new window.Excel.RequestContext,p=c.call(y,h),y.sync().then(function(){var n=p.value,t=n.status;delete n.status;delete n["@odata.type"];c.postprocess&&(n=c.postprocess(n,h));t!=0&&(n=OSF.DDA.ErrorCodeManager.getErrorArgs(t));OSF.DDA.issueAsyncResult(h,t,n)})["catch"](function(){OSF.DDA.issueAsyncResult(h,OSF.DDA.ErrorCodeManager.errorCodes.ooeFailure,s)})):(w=t.toHost?t.toHost(v,h):h,b[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]({dispId:v,hostCallArgs:w,onCalling:function(){},onReceiving:function(){},onComplete:function(n,i){var r,u;r=n==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess?t.fromHost?t.fromHost(v,i):i:i;u=a.processResponse(n,r,f,h);OSF.DDA.issueAsyncResult(h,n,u)}}))}catch(k){o(k,a,u,h)}};e[OSF.DDA.DispIdHost.Methods.AddEventHandler]=function(i,u,f,e){function c(n){var t,i;n==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess&&(t=u.addEventHandler(s,v),t||(n=OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerAdditionFailed));n!=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess&&(i=OSF.DDA.ErrorCodeManager.getErrorArgs(n));OSF.DDA.issueAsyncResult(h,n,i)}var h,s,v,l,a,y;try{if(l=OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.AddHandlerAsync.id],h=l.verifyAndExtractCall(i,f,u),s=h[Microsoft.Office.WebExtension.Parameters.EventType],v=h[Microsoft.Office.WebExtension.Parameters.Handler],e){c(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess);return}u.getEventHandlerCount(s)==0?(a=r[s],y=n(s)[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync],y({eventType:s,dispId:a,targetId:f.id||"",onCalling:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall)},onReceiving:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse)},onComplete:c,onEvent:function(n){var i=t.fromHost(a,n);u.fireEvent(OSF.DDA.OMFactory.manufactureEventArgs(s,f,i))}})):c(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)}catch(p){o(p,l,i,h)}};e[OSF.DDA.DispIdHost.Methods.RemoveEventHandler]=function(t,i,u){function v(n){var t;n!=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess&&(t=OSF.DDA.ErrorCodeManager.getErrorArgs(n));OSF.DDA.issueAsyncResult(e,n,t)}var e,f,c,l,a,h,y,p;try{l=OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.RemoveHandlerAsync.id];e=l.verifyAndExtractCall(t,u,i);f=e[Microsoft.Office.WebExtension.Parameters.EventType];c=e[Microsoft.Office.WebExtension.Parameters.Handler];c===s?(h=i.clearEventHandlers(f),a=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess):(h=i.removeEventHandler(f,c),a=h?OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess:OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist);h&&i.getEventHandlerCount(f)==0?(y=r[f],p=n(f)[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync],p({eventType:f,dispId:y,targetId:u.id||"",onCalling:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall)},onReceiving:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse)},onComplete:v})):v(a)}catch(w){o(w,l,t,e)}};e[OSF.DDA.DispIdHost.Methods.OpenDialog]=function(i,u,f){function v(n){var t,i;n!=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess?i=OSF.DDA.ErrorCodeManager.getErrorArgs(n):(t={},t[Microsoft.Office.WebExtension.Parameters.Id]=a,t[Microsoft.Office.WebExtension.Parameters.Data]=u,i=l.processResponse(n,t,f,h),OSF.DialogShownStatus.hasDialogShown=!0,u.clearEventHandlers(e),u.clearEventHandlers(c));OSF.DDA.issueAsyncResult(h,n,i)}var h,a,e=Microsoft.Office.WebExtension.EventType.DialogMessageReceived,c=Microsoft.Office.WebExtension.EventType.DialogEventReceived,l;try{if((e==undefined||c==undefined)&&v(OSF.DDA.ErrorCodeManager.ooeOperationNotSupported),OSF.DDA.AsyncMethodNames.DisplayDialogAsync==s){v(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError);return}l=OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.DisplayDialogAsync.id];h=l.verifyAndExtractCall(i,f,u);var p=r[e],y=n(e),w=y[OSF.DDA.DispIdHost.Delegates.OpenDialog]!=undefined?y[OSF.DDA.DispIdHost.Delegates.OpenDialog]:y[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync];a=JSON.stringify(h);w({eventType:e,dispId:p,targetId:a,onCalling:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall)},onReceiving:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse)},onComplete:v,onEvent:function(n){var s=t.fromHost(p,n),o=OSF.DDA.OMFactory.manufactureEventArgs(e,f,s),r,i;o.type==c&&(r=OSF.DDA.ErrorCodeManager.getErrorArgs(o.error),i={},i[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]=status||OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError,i[OSF.DDA.AsyncResultEnum.ErrorProperties.Name]=r.name||r,i[OSF.DDA.AsyncResultEnum.ErrorProperties.Message]=r.message||r,o.error=new OSF.DDA.Error(i[OSF.DDA.AsyncResultEnum.ErrorProperties.Name],i[OSF.DDA.AsyncResultEnum.ErrorProperties.Message],i[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]));u.fireOrQueueEvent(o);s[OSF.DDA.PropertyDescriptors.MessageType]==OSF.DialogMessageType.DialogClosed&&(u.clearEventHandlers(e),u.clearEventHandlers(c),u.clearEventHandlers(Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived),OSF.DialogShownStatus.hasDialogShown=!1)}})}catch(b){o(b,l,i,h)}};e[OSF.DDA.DispIdHost.Methods.CloseDialog]=function(t,i,u,f){function v(n){s=n;OSF.DialogShownStatus.hasDialogShown=!1}var l,e,a,s=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess,h;try{h=OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.CloseAsync.id];l=h.verifyAndExtractCall(t,f,u);e=Microsoft.Office.WebExtension.EventType.DialogMessageReceived;a=Microsoft.Office.WebExtension.EventType.DialogEventReceived;u.clearEventHandlers(e);u.clearEventHandlers(a);var y=r[e],c=n(e),p=c[OSF.DDA.DispIdHost.Delegates.CloseDialog]!=undefined?c[OSF.DDA.DispIdHost.Delegates.CloseDialog]:c[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync];p({eventType:e,dispId:y,targetId:i,onCalling:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall)},onReceiving:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse)},onComplete:v})}catch(w){o(w,h,t,l)}if(s!=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)throw OSF.OUtil.formatString(Strings.OfficeOM.L_FunctionCallFailed,OSF.DDA.AsyncMethodNames.CloseAsync.displayName,s);};e[OSF.DDA.DispIdHost.Methods.MessageParent]=function(t,i){var u={},f=OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.MessageParent.id],e=f.verifyAndExtractCall(t,i,u),o=n(OSF.DDA.SyncMethodNames.MessageParent.id),s=o[OSF.DDA.DispIdHost.Delegates.MessageParent],h=r[OSF.DDA.SyncMethodNames.MessageParent.id];return s({dispId:h,hostCallArgs:e,onCalling:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall)},onReceiving:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse)}})};e[OSF.DDA.DispIdHost.Methods.SendMessage]=function(t,i,u){var f={},e=OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.SendMessage.id],o=e.verifyAndExtractCall(t,u,f),s=n(OSF.DDA.SyncMethodNames.SendMessage.id),h=s[OSF.DDA.DispIdHost.Delegates.SendMessage],c=r[OSF.DDA.SyncMethodNames.SendMessage.id];return h({dispId:c,hostCallArgs:o,onCalling:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall)},onReceiving:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse)}})}};OSF.DDA.DispIdHost.addAsyncMethods=function(n,t,i){var f,r,u;for(f in t)r=t[f],u=r.displayName,n[u]||OSF.OUtil.defineEnumerableProperty(n,u,{value:function(t){return function(){var r=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.InvokeMethod];r(t,arguments,n,i)}}(r)})};OSF.DDA.DispIdHost.addEventSupport=function(n,t,i){var r=OSF.DDA.AsyncMethodNames.AddHandlerAsync.displayName,u=OSF.DDA.AsyncMethodNames.RemoveHandlerAsync.displayName;n[r]||OSF.OUtil.defineEnumerableProperty(n,r,{value:function(){var r=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.AddEventHandler];r(arguments,t,n,i)}});n[u]||OSF.OUtil.defineEnumerableProperty(n,u,{value:function(){var i=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.RemoveEventHandler];i(arguments,t,n)}})};OSF.ShowWindowDialogParameterKeys={Url:"url",Width:"width",Height:"height",DisplayInIframe:"displayInIframe"};OSF.HostThemeButtonStyleKeys={ButtonBorderColor:"buttonBorderColor",ButtonBackgroundColor:"buttonBackgroundColor"},function(n){var t;(function(n){function i(n,t){return OSF.OUtil.parseInfoFromWindowName(n,t,OSF.WindowNameItemKeys.AppContext)}function r(n){if(typeof JSON!="undefined")try{return JSON.stringify(n)}catch(t){}return""}function u(){return new RegExp(t).test(OSF.getClientEndPoint()._targetUrl)}function f(n,t){if(!n)return null;n=n.trim()||"";var f="?",s="_host_Info=",h="&_host_Info=",i="#",e=n.split(i),r=e.shift(),c=e.join(i),o=r.split(f),u;return o.length>1?u=r+h+t:o.length>0&&(u=r+f+s+t),[u,i,c].join("")}function e(n){if(!n)return null;var t=document.createElement("a");return t.href=n,t.protocol+"//"+t.host}var t="^https://[a-zA-Z0-9]+.(officeapps.live|officeapps-df.live|partner.officewebapps).com/";n.parseAppContextFromWindowName=i;n.serializeObjectToString=r;n.isHostTrusted=u;n.addHostInfoAsQueryParam=f;n.getDomainForUrl=e})(t=n.WACUtils||(n.WACUtils={}))}(OfficeExt||(OfficeExt={})),function(n){var e="\n",i=!0,t=null,r="undefined",h=function(){function n(){}return n.isInstanceOfType=function(n,u){if(typeof u===r||u===t)return!1;if(u instanceof n)return i;var f=u.constructor;return f&&typeof f=="function"&&f.__typeName&&f.__typeName!=="Object"||(f=Object),!!(f===n)||f.__typeName&&n.__typeName&&f.__typeName===n.__typeName},n}(),o,u,s,f;n.MsAjaxTypeHelper=h;o=function(){function n(){}var i="Parameter name: {0}";return n.create=function(n,t){var i=new Error(n),r;if(i.message=n,t)for(r in t)i[r]=t[r];return i.popStackFrame(),i},n.parameterCount=function(t){var r="Sys.ParameterCountException: "+(t?t:"Parameter count mismatch."),i=n.create(r,{name:"Sys.ParameterCountException"});return i.popStackFrame(),i},n.argument=function(t,r){var o="Sys.ArgumentException: "+(r?r:"Value does not fall within the expected range."),f;return t&&(o+=e+u.format(i,t)),f=n.create(o,{name:"Sys.ArgumentException",paramName:t}),f.popStackFrame(),f},n.argumentNull=function(t,r){var o="Sys.ArgumentNullException: "+(r?r:"Value cannot be null."),f;return t&&(o+=e+u.format(i,t)),f=n.create(o,{name:"Sys.ArgumentNullException",paramName:t}),f.popStackFrame(),f},n.argumentOutOfRange=function(f,o,s){var h="Sys.ArgumentOutOfRangeException: "+(s?s:"Specified argument was out of the range of valid values."),c;return f&&(h+=e+u.format(i,f)),typeof o!==r&&o!==t&&(h+=e+u.format("Actual value was {0}.",o)),c=n.create(h,{name:"Sys.ArgumentOutOfRangeException",paramName:f,actualValue:o}),c.popStackFrame(),c},n.argumentType=function(t,r,f,o){var s="Sys.ArgumentTypeException: ",h;return s+=o?o:r&&f?u.format("Object of type '{0}' cannot be converted to type '{1}'.",r.getName?r.getName():r,f.getName?f.getName():f):"Object cannot be converted to the required type.",t&&(s+=e+u.format(i,t)),h=n.create(s,{name:"Sys.ArgumentTypeException",paramName:t,actualType:r,expectedType:f}),h.popStackFrame(),h},n.argumentUndefined=function(t,r){var o="Sys.ArgumentUndefinedException: "+(r?r:"Value cannot be undefined."),f;return t&&(o+=e+u.format(i,t)),f=n.create(o,{name:"Sys.ArgumentUndefinedException",paramName:t}),f.popStackFrame(),f},n.invalidOperation=function(t){var r="Sys.InvalidOperationException: "+(t?t:"Operation is not valid due to the current state of the object."),i=n.create(r,{name:"Sys.InvalidOperationException"});return i.popStackFrame(),i},n}();n.MsAjaxError=o;u=function(){function n(){}return n.format=function(n){for(var r,i=[],t=1;t<arguments.length;t++)i[t-1]=arguments[t];return r=n,r.replace(/{(\d+)}/gm,function(n,t){var r=parseInt(t,10);return i[r]===undefined?"{"+t+"}":i[r]})},n.startsWith=function(n,t){return n.substr(0,t.length)===t},n}();n.MsAjaxString=u;s=function(){function n(){}return n.trace=function(){},n}();n.MsAjaxDebug=s;OsfMsAjaxFactory.isMsAjaxLoaded()||(f=function(n,t,i){n.__typeName===undefined&&(n.__typeName=t);n.__class===undefined&&(n.__class=i)},f(Function,"Function",i),f(Error,"Error",i),f(Object,"Object",i),f(String,"String",i),f(Boolean,"Boolean",i),f(Date,"Date",i),f(Number,"Number",i),f(RegExp,"RegExp",i),f(Array,"Array",i),Function.createCallback||(Function.createCallback=function(n,t){var r=Function._validateParams(arguments,[{name:"method",type:Function},{name:"context",mayBeNull:i}]);if(r)throw r;return function(){var u=arguments.length,r,i;if(u>0){for(r=[],i=0;i<u;i++)r[i]=arguments[i];return r[u]=t,n.apply(this,r)}return n.call(this,t)}}),Function.createDelegate||(Function.createDelegate=function(n,t){var r=Function._validateParams(arguments,[{name:"instance",mayBeNull:i},{name:"method",type:Function}]);if(r)throw r;return function(){return t.apply(n,arguments)}}),Function._validateParams||(Function._validateParams=function(n,i,u){var f,s=i.length,e,c,o,h;if(u=u||typeof u===r,f=Function._validateParameterCount(n,i,u),f)return f.popStackFrame(),f;for(e=0,c=n.length;e<c;e++){if(o=i[Math.min(e,s-1)],h=o.name,o.parameterArray)h+="["+(e-s+1)+"]";else if(!u&&e>=s)break;if(f=Function._validateParameter(n[e],o,h),f)return f.popStackFrame(),f}return t}),Function._validateParameterCount||(Function._validateParameterCount=function(n,r,u){var f,s,e=r.length,h=n.length,c,l,a;if(h<e){for(c=e,f=0;f<e;f++)l=r[f],(l.optional||l.parameterArray)&&c--;h<c&&(s=i)}else if(u&&h>e)for(s=i,f=0;f<e;f++)if(r[f].parameterArray){s=!1;break}return s?(a=o.parameterCount(),a.popStackFrame(),a):t}),Function._validateParameter||(Function._validateParameter=function(n,i,u){var f,h=i.type,l=!!i.integer,a=!!i.domElement,v=!!i.mayBeNull,o,s,c;if(f=Function._validateParameterType(n,h,l,a,v,u),f)return f.popStackFrame(),f;if(o=i.elementType,s=!!i.elementMayBeNull,h===Array&&typeof n!==r&&n!==t&&(o||!s))for(var y=!!i.elementInteger,p=!!i.elementDomElement,e=0;e<n.length;e++)if(c=n[e],f=Function._validateParameterType(c,o,y,p,s,u+"["+e+"]"),f)return f.popStackFrame(),f;return t}),Function._validateParameterType||(Function._validateParameterType=function(i,u,f,e,o,s){var h,c;return typeof i===r?o?t:(h=n.MsAjaxError.argumentUndefined(s),h.popStackFrame(),h):i===t?o?t:(h=n.MsAjaxError.argumentNull(s),h.popStackFrame(),h):u&&!n.MsAjaxTypeHelper.isInstanceOfType(u,i)?(h=n.MsAjaxError.argumentType(s,typeof i,u),h.popStackFrame(),h):t}),window.Type||(window.Type=Function),Type.registerNamespace||(Type.registerNamespace=function(n){for(var i=n.split("."),r=window,t=0;t<i.length;t++)r[i[t]]=r[i[t]]||{},r=r[i[t]]}),Type.prototype.registerClass||(Type.prototype.registerClass=function(n){n={}}),typeof Sys===r&&Type.registerNamespace("Sys"),Error.prototype.popStackFrame||(Error.prototype.popStackFrame=function(){var n=this,s,u;if(arguments.length!==0)throw o.parameterCount();if(typeof n.stack!==r&&n.stack!==t&&typeof n.fileName!==r&&n.fileName!==t&&typeof n.lineNumber!==r&&n.lineNumber!==t){for(var i=n.stack.split(e),f=i[0],h=n.fileName+":"+n.lineNumber;typeof f!==r&&f!==t&&f.indexOf(h)===-1;)i.shift(),f=i[0];(s=i[1],typeof s!==r&&s!==t)&&(u=s.match(/@(.*):(\d+)$/),typeof u!==r&&u!==t)&&(n.fileName=u[1],n.lineNumber=parseInt(u[2]),i.shift(),n.stack=i.join(e))}}),OsfMsAjaxFactory.msAjaxError=o,OsfMsAjaxFactory.msAjaxString=u,OsfMsAjaxFactory.msAjaxDebug=s)}(OfficeExt||(OfficeExt={}));OSF.OUtil.setNamespace("Microsoft",window);OSF.OUtil.setNamespace("Office",Microsoft);OSF.OUtil.setNamespace("Common",Microsoft.Office);OSF.SerializerVersion={MsAjax:0,Browser:1},function(n){function t(){return!0}n.appSpecificCheckOrigin=t}(OfficeExt||(OfficeExt={}));Microsoft.Office.Common.InvokeType={async:0,sync:1,asyncRegisterEvent:2,asyncUnregisterEvent:3,syncRegisterEvent:4,syncUnregisterEvent:5};Microsoft.Office.Common.InvokeResultCode={noError:0,errorInRequest:-1,errorHandlingRequest:-2,errorInResponse:-3,errorHandlingResponse:-4,errorHandlingRequestAccessDenied:-5,errorHandlingMethodCallTimedout:-6};Microsoft.Office.Common.MessageType={request:0,response:1};Microsoft.Office.Common.ActionType={invoke:0,registerEvent:1,unregisterEvent:2};Microsoft.Office.Common.ResponseType={forCalling:0,forEventing:1};Microsoft.Office.Common.MethodObject=function(n,t,i){this._method=n;this._invokeType=t;this._blockingOthers=i};Microsoft.Office.Common.MethodObject.prototype={getMethod:function(){return this._method},getInvokeType:function(){return this._invokeType},getBlockingFlag:function(){return this._blockingOthers}};Microsoft.Office.Common.EventMethodObject=function(n,t){this._registerMethodObject=n;this._unregisterMethodObject=t};Microsoft.Office.Common.EventMethodObject.prototype={getRegisterMethodObject:function(){return this._registerMethodObject},getUnregisterMethodObject:function(){return this._unregisterMethodObject}};Microsoft.Office.Common.ServiceEndPoint=function(n){var t=this,i=Function._validateParams(arguments,[{name:"serviceEndPointId",type:String,mayBeNull:!1}]);if(i)throw i;t._methodObjectList={};t._eventHandlerProxyList={};t._Id=n;t._conversations={};t._policyManager=null;t._appDomains={};t._onHandleRequestError=null};Microsoft.Office.Common.ServiceEndPoint.prototype={registerMethod:function(n,t,i,r){var f="invokeType",u=!1,e=Function._validateParams(arguments,[{name:"methodName",type:String,mayBeNull:u},{name:"method",type:Function,mayBeNull:u},{name:f,type:Number,mayBeNull:u},{name:"blockingOthers",type:Boolean,mayBeNull:u}]),o;if(e)throw e;if(i!==Microsoft.Office.Common.InvokeType.async&&i!==Microsoft.Office.Common.InvokeType.sync)throw OsfMsAjaxFactory.msAjaxError.argument(f);o=new Microsoft.Office.Common.MethodObject(t,i,r);this._methodObjectList[n]=o},unregisterMethod:function(n){var t=Function._validateParams(arguments,[{name:"methodName",type:String,mayBeNull:!1}]);if(t)throw t;delete this._methodObjectList[n]},registerEvent:function(n,t,i){var r=!1,u=Function._validateParams(arguments,[{name:"eventName",type:String,mayBeNull:r},{name:"registerMethod",type:Function,mayBeNull:r},{name:"unregisterMethod",type:Function,mayBeNull:r}]),f;if(u)throw u;f=new Microsoft.Office.Common.EventMethodObject(new Microsoft.Office.Common.MethodObject(t,Microsoft.Office.Common.InvokeType.syncRegisterEvent,r),new Microsoft.Office.Common.MethodObject(i,Microsoft.Office.Common.InvokeType.syncUnregisterEvent,r));this._methodObjectList[n]=f},registerEventEx:function(n,t,i,r,u){var f=!1,e=Function._validateParams(arguments,[{name:"eventName",type:String,mayBeNull:f},{name:"registerMethod",type:Function,mayBeNull:f},{name:"registerMethodInvokeType",type:Number,mayBeNull:f},{name:"unregisterMethod",type:Function,mayBeNull:f},{name:"unregisterMethodInvokeType",type:Number,mayBeNull:f}]),o;if(e)throw e;o=new Microsoft.Office.Common.EventMethodObject(new Microsoft.Office.Common.MethodObject(t,i,f),new Microsoft.Office.Common.MethodObject(r,u,f));this._methodObjectList[n]=o},unregisterEvent:function(n){var t=Function._validateParams(arguments,[{name:"eventName",type:String,mayBeNull:!1}]);if(t)throw t;this.unregisterMethod(n)},registerConversation:function(n,t,i,r){var f="appDomains",u=!0,e=Function._validateParams(arguments,[{name:"conversationId",type:String,mayBeNull:!1},{name:"conversationUrl",type:String,mayBeNull:!1,optional:u},{name:f,type:Object,mayBeNull:u,optional:u},{name:"serializerVersion",type:Number,mayBeNull:u,optional:u}]);if(e)throw e;if(i){if(!(i instanceof Array))throw OsfMsAjaxFactory.msAjaxError.argument(f);this._appDomains[n]=i}this._conversations[n]={url:t,serializerVersion:r}},unregisterConversation:function(n){var t=Function._validateParams(arguments,[{name:"conversationId",type:String,mayBeNull:!1}]);if(t)throw t;delete this._conversations[n]},setPolicyManager:function(n){var t="policyManager",i=Function._validateParams(arguments,[{name:t,type:Object,mayBeNull:!1}]);if(i)throw i;if(!n.checkPermission)throw OsfMsAjaxFactory.msAjaxError.argument(t);this._policyManager=n},getPolicyManager:function(){return this._policyManager},dispose:function(){var n=null,t=this;t._methodObjectList=n;t._eventHandlerProxyList=n;t._Id=n;t._conversations=n;t._policyManager=n;t._appDomains=n;t._onHandleRequestError=n}};Microsoft.Office.Common.ClientEndPoint=function(n,t,i,r){var f="targetWindow",u=this,e=Function._validateParams(arguments,[{name:"conversationId",type:String,mayBeNull:!1},{name:f,mayBeNull:!1},{name:"targetUrl",type:String,mayBeNull:!1},{name:"serializerVersion",type:Number,mayBeNull:!0,optional:!0}]);if(e)throw e;try{if(!t.postMessage)throw OsfMsAjaxFactory.msAjaxError.argument(f);}catch(o){if(!Object.prototype.hasOwnProperty.call(t,"postMessage"))throw OsfMsAjaxFactory.msAjaxError.argument(f);}u._conversationId=n;u._targetWindow=t;u._targetUrl=i;u._callingIndex=0;u._callbackList={};u._eventHandlerList={};u._serializerVersion=r!=null?r:OSF.SerializerVersion.Browser};Microsoft.Office.Common.ClientEndPoint.prototype={invoke:function(n,t,i){var r=this,f=Function._validateParams(arguments,[{name:"targetMethodName",type:String,mayBeNull:!1},{name:"callback",type:Function,mayBeNull:!0},{name:"param",mayBeNull:!0}]),o,s;if(f)throw f;var u=r._callingIndex++,h=new Date,e={callback:t,createdOn:h.getTime()};i&&typeof i=="object"&&typeof i.__timeout__=="number"&&(e.timeout=i.__timeout__,delete i.__timeout__);r._callbackList[u]=e;try{o=new Microsoft.Office.Common.Request(n,Microsoft.Office.Common.ActionType.invoke,r._conversationId,u,i);s=Microsoft.Office.Common.MessagePackager.envelope(o,r._serializerVersion);r._targetWindow.postMessage(s,r._targetUrl);Microsoft.Office.Common.XdmCommunicationManager._startMethodTimeoutTimer()}catch(c){try{t!==null&&t(Microsoft.Office.Common.InvokeResultCode.errorInRequest,c)}finally{delete r._callbackList[u]}}},registerForEvent:function(n,t,i,r){var u=this,e=Function._validateParams(arguments,[{name:"targetEventName",type:String,mayBeNull:!1},{name:"eventHandler",type:Function,mayBeNull:!1},{name:"callback",type:Function,mayBeNull:!0},{name:"data",mayBeNull:!0,optional:!0}]),f,o,s,h;if(e)throw e;f=u._callingIndex++;o=new Date;u._callbackList[f]={callback:i,createdOn:o.getTime()};try{s=new Microsoft.Office.Common.Request(n,Microsoft.Office.Common.ActionType.registerEvent,u._conversationId,f,r);h=Microsoft.Office.Common.MessagePackager.envelope(s,u._serializerVersion);u._targetWindow.postMessage(h,u._targetUrl);Microsoft.Office.Common.XdmCommunicationManager._startMethodTimeoutTimer();u._eventHandlerList[n]=t}catch(c){try{i!==null&&i(Microsoft.Office.Common.InvokeResultCode.errorInRequest,c)}finally{delete u._callbackList[f]}}},unregisterForEvent:function(n,t,i){var r=this,f=Function._validateParams(arguments,[{name:"targetEventName",type:String,mayBeNull:!1},{name:"callback",type:Function,mayBeNull:!0},{name:"data",mayBeNull:!0,optional:!0}]),u,e,o,s;if(f)throw f;u=r._callingIndex++;e=new Date;r._callbackList[u]={callback:t,createdOn:e.getTime()};try{o=new Microsoft.Office.Common.Request(n,Microsoft.Office.Common.ActionType.unregisterEvent,r._conversationId,u,i);s=Microsoft.Office.Common.MessagePackager.envelope(o,r._serializerVersion);r._targetWindow.postMessage(s,r._targetUrl);Microsoft.Office.Common.XdmCommunicationManager._startMethodTimeoutTimer()}catch(h){try{t!==null&&t(Microsoft.Office.Common.InvokeResultCode.errorInRequest,h)}finally{delete r._callbackList[u]}}finally{delete r._eventHandlerList[n]}}};Microsoft.Office.Common.XdmCommunicationManager=function(){function rt(n){for(var t in r)if(r[t]._conversations[n])return r[t];OsfMsAjaxFactory.msAjaxDebug.trace(v);throw OsfMsAjaxFactory.msAjaxError.argument(s);}function ut(n){var t=i[n];return t||OsfMsAjaxFactory.msAjaxDebug.trace(v),t}function ft(t,i){var r=t._methodObjectList[i._actionName],u;if(!r){OsfMsAjaxFactory.msAjaxDebug.trace("The specified method is not registered on service endpoint:"+i._actionName);throw OsfMsAjaxFactory.msAjaxError.argument("messageObject");}return u=n,i._actionType===Microsoft.Office.Common.ActionType.invoke?r:i._actionType===Microsoft.Office.Common.ActionType.registerEvent?r.getRegisterMethodObject():r.getUnregisterMethodObject()}function et(n){h.push(n)}function ot(){if(u!==n){if(!o)if(h.length>0){var t=h.shift();k(t)}else clearInterval(u),u=n}else OsfMsAjaxFactory.msAjaxDebug.trace(a)}function k(n){o=n.getInvokeBlockingFlag();n.invoke();c=(new Date).getTime()}function st(){var r,u,s,e,h,o,t;if(f){u=0;s=new Date;for(h in i){r=i[h];for(o in r._callbackList)if(t=r._callbackList[o],e=t.timeout?t.timeout:w,e>=0&&Math.abs(s.getTime()-t.createdOn)>=e)try{t.callback&&t.callback(Microsoft.Office.Common.InvokeResultCode.errorHandlingMethodCallTimedout,n)}finally{delete r._callbackList[o]}else u++}u===0&&(clearInterval(f),f=n)}else OsfMsAjaxFactory.msAjaxDebug.trace(a)}function ht(){o=t}function ct(n){if(window.addEventListener)window.addEventListener("message",n,t);else if(navigator.userAgent.indexOf("MSIE")>-1&&window.attachEvent)window.attachEvent("onmessage",n);else{OsfMsAjaxFactory.msAjaxDebug.trace("Browser doesn't support the required API.");throw OsfMsAjaxFactory.msAjaxError.argument("Browser");}}function d(n,i){var f=t,r,u;return n===e?e:!n||!i||!n.length||!i.length?f:(r=document.createElement("a"),u=document.createElement("a"),r.href=n,u.href=i,f=nt(r,u),delete r,u,f)}function g(n,i){var u=t,f,e,r;if(!i||!i.length||!n||!(n instanceof Array)||!n.length)return u;for(f=document.createElement("a"),e=document.createElement("a"),f.href=i,r=0;r<n.length&&!u;r++)n[r].indexOf("://")!==-1&&(e.href=n[r],u=nt(f,e));return delete f,e,u}function nt(n,t){return n.hostname==t.hostname&&n.protocol==t.protocol&&n.port==t.port}function lt(i){var tt="Access Denied",r,f,it,w,s,l,b,nt,lt,at,h,a,v;if(OSF&&i.data!=""){f=OSF.SerializerVersion.Browser;it=i.data;try{r=Microsoft.Office.Common.MessagePackager.unenvelope(it,OSF.SerializerVersion.Browser);f=r._serializerVersion!=n?r._serializerVersion:f}catch(p){return}if(r._messageType===Microsoft.Office.Common.MessageType.request){w=i.origin==n||i.origin=="null"?r._origin:i.origin;try{if(s=rt(r._conversationId),l=s._conversations[r._conversationId],f=l.serializerVersion!=n?l.serializerVersion:f,!d(l.url,i.origin)&&!g(s._appDomains[r._conversationId],i.origin))throw"Failed origin check";if(b=s.getPolicyManager(),b&&!b.checkPermission(r._conversationId,r._actionName,r._data))throw tt;var vt=ft(s,r),yt=new Microsoft.Office.Common.InvokeCompleteCallback(i.source,w,r._actionName,r._conversationId,r._correlationId,ht,f),st=new Microsoft.Office.Common.Invoker(vt,r._data,yt,s._eventHandlerProxyList,r._conversationId,r._actionName,f),ct=e;u==n&&((c==n||(new Date).getTime()-c>y)&&!o?(k(st),ct=t):u=setInterval(ot,y));ct&&et(st)}catch(p){s&&s._onHandleRequestError&&s._onHandleRequestError(r,p);nt=Microsoft.Office.Common.InvokeResultCode.errorHandlingRequest;p==tt&&(nt=Microsoft.Office.Common.InvokeResultCode.errorHandlingRequestAccessDenied);lt=new Microsoft.Office.Common.Response(r._actionName,r._conversationId,r._correlationId,nt,Microsoft.Office.Common.ResponseType.forCalling,p);at=Microsoft.Office.Common.MessagePackager.envelope(lt,f);i.source&&i.source.postMessage&&i.source.postMessage(at,w)}}else if(r._messageType===Microsoft.Office.Common.MessageType.response){if(h=ut(r._conversationId),!h)return;if(h._serializerVersion=f,!d(h._targetUrl,i.origin))throw"Failed orgin check";if(r._responseType===Microsoft.Office.Common.ResponseType.forCalling){if(a=h._callbackList[r._correlationId],a)try{a.callback&&a.callback(r._errorCode,r._data)}finally{delete h._callbackList[r._correlationId]}}else v=h._eventHandlerList[r._actionName],v!==undefined&&v!==n&&v(r._data)}else return}}function tt(){b||(ct(lt),b=e)}var l="serviceEndPointId",e=!0,a="channel is not ready.",s="conversationId",v="Unknown conversation Id.",t=!1,n=null,h=[],c=n,u=n,y=10,o=t,f=n,it=2e3,p=65e3,w=p,r={},i={},b=t;return{connect:function(n,t,r,u){var f=i[n];return f||(tt(),f=new Microsoft.Office.Common.ClientEndPoint(n,t,r,u),i[n]=f),f},getClientEndPoint:function(n){var r=Function._validateParams(arguments,[{name:s,type:String,mayBeNull:t}]);if(r)throw r;return i[n]},createServiceEndPoint:function(n){tt();var t=new Microsoft.Office.Common.ServiceEndPoint(n);return r[n]=t,t},getServiceEndPoint:function(n){var i=Function._validateParams(arguments,[{name:l,type:String,mayBeNull:t}]);if(i)throw i;return r[n]},deleteClientEndPoint:function(n){var r=Function._validateParams(arguments,[{name:s,type:String,mayBeNull:t}]);if(r)throw r;delete i[n]},deleteServiceEndPoint:function(n){var i=Function._validateParams(arguments,[{name:l,type:String,mayBeNull:t}]);if(i)throw i;delete r[n]},checkUrlWithAppDomains:function(n,t){return g(n,t)},_setMethodTimeout:function(n){var i=Function._validateParams(arguments,[{name:"methodTimeout",type:Number,mayBeNull:t}]);if(i)throw i;w=n<=0?p:n},_startMethodTimeoutTimer:function(){f||(f=setInterval(st,it))}}}();Microsoft.Office.Common.Message=function(n,t,i,r,u){var e=!1,f=this,o=Function._validateParams(arguments,[{name:"messageType",type:Number,mayBeNull:e},{name:"actionName",type:String,mayBeNull:e},{name:"conversationId",type:String,mayBeNull:e},{name:"correlationId",mayBeNull:e},{name:"data",mayBeNull:!0,optional:!0}]);if(o)throw o;f._messageType=n;f._actionName=t;f._conversationId=i;f._correlationId=r;f._origin=window.location.href;f._data=typeof u=="undefined"?null:u};Microsoft.Office.Common.Message.prototype={getActionName:function(){return this._actionName},getConversationId:function(){return this._conversationId},getCorrelationId:function(){return this._correlationId},getOrigin:function(){return this._origin},getData:function(){return this._data},getMessageType:function(){return this._messageType}};Microsoft.Office.Common.Request=function(n,t,i,r,u){Microsoft.Office.Common.Request.uber.constructor.call(this,Microsoft.Office.Common.MessageType.request,n,i,r,u);this._actionType=t};OSF.OUtil.extend(Microsoft.Office.Common.Request,Microsoft.Office.Common.Message);Microsoft.Office.Common.Request.prototype.getActionType=function(){return this._actionType};Microsoft.Office.Common.Response=function(n,t,i,r,u,f){Microsoft.Office.Common.Response.uber.constructor.call(this,Microsoft.Office.Common.MessageType.response,n,t,i,f);this._errorCode=r;this._responseType=u};OSF.OUtil.extend(Microsoft.Office.Common.Response,Microsoft.Office.Common.Message);Microsoft.Office.Common.Response.prototype.getErrorCode=function(){return this._errorCode};Microsoft.Office.Common.Response.prototype.getResponseType=function(){return this._responseType};Microsoft.Office.Common.MessagePackager={envelope:function(n){return typeof n=="object"&&(n._serializerVersion=OSF.SerializerVersion.Browser),JSON.stringify(n)},unenvelope:function(n){return JSON.parse(n)}};Microsoft.Office.Common.ResponseSender=function(n,t,i,r,u,f,e){var h=!1,o=this,c=Function._validateParams(arguments,[{name:"requesterWindow",mayBeNull:h},{name:"requesterUrl",type:String,mayBeNull:h},{name:"actionName",type:String,mayBeNull:h},{name:"conversationId",type:String,mayBeNull:h},{name:"correlationId",mayBeNull:h},{name:"responsetype",type:Number,maybeNull:h},{name:"serializerVersion",type:Number,maybeNull:!0,optional:!0}]),s;if(c)throw c;o._requesterWindow=n;o._requesterUrl=t;o._actionName=i;o._conversationId=r;o._correlationId=u;o._invokeResultCode=Microsoft.Office.Common.InvokeResultCode.noError;o._responseType=f;s=o;o._send=function(n){try{var t=new Microsoft.Office.Common.Response(s._actionName,s._conversationId,s._correlationId,s._invokeResultCode,s._responseType,n),i=Microsoft.Office.Common.MessagePackager.envelope(t,e);s._requesterWindow.postMessage(i,s._requesterUrl)}catch(r){OsfMsAjaxFactory.msAjaxDebug.trace("ResponseSender._send error:"+r.message)}}};Microsoft.Office.Common.ResponseSender.prototype={getRequesterWindow:function(){return this._requesterWindow},getRequesterUrl:function(){return this._requesterUrl},getActionName:function(){return this._actionName},getConversationId:function(){return this._conversationId},getCorrelationId:function(){return this._correlationId},getSend:function(){return this._send},setResultCode:function(n){this._invokeResultCode=n}};Microsoft.Office.Common.InvokeCompleteCallback=function(n,t,i,r,u,f,e){var s=this,o;Microsoft.Office.Common.InvokeCompleteCallback.uber.constructor.call(s,n,t,i,r,u,Microsoft.Office.Common.ResponseType.forCalling,e);s._postCallbackHandler=f;o=s;s._send=function(n,t){t!=undefined&&(o._invokeResultCode=t);try{var i=new Microsoft.Office.Common.Response(o._actionName,o._conversationId,o._correlationId,o._invokeResultCode,o._responseType,n),r=Microsoft.Office.Common.MessagePackager.envelope(i,e);o._requesterWindow.postMessage(r,o._requesterUrl);o._postCallbackHandler()}catch(u){OsfMsAjaxFactory.msAjaxDebug.trace("InvokeCompleteCallback._send error:"+u.message)}}};OSF.OUtil.extend(Microsoft.Office.Common.InvokeCompleteCallback,Microsoft.Office.Common.ResponseSender);Microsoft.Office.Common.Invoker=function(n,t,i,r,u,f,e){var s=!0,h=!1,o=this,c=Function._validateParams(arguments,[{name:"methodObject",mayBeNull:h},{name:"paramValue",mayBeNull:s},{name:"invokeCompleteCallback",mayBeNull:h},{name:"eventHandlerProxyList",mayBeNull:s},{name:"conversationId",type:String,mayBeNull:h},{name:"eventName",type:String,mayBeNull:h},{name:"serializerVersion",type:Number,mayBeNull:s,optional:s}]);if(c)throw c;o._methodObject=n;o._param=t;o._invokeCompleteCallback=i;o._eventHandlerProxyList=r;o._conversationId=u;o._eventName=f;o._serializerVersion=e};Microsoft.Office.Common.Invoker.prototype={invoke:function(){var n=this,t,i,u,r,f;try{switch(n._methodObject.getInvokeType()){case Microsoft.Office.Common.InvokeType.async:n._methodObject.getMethod()(n._param,n._invokeCompleteCallback.getSend());break;case Microsoft.Office.Common.InvokeType.sync:t=n._methodObject.getMethod()(n._param);n._invokeCompleteCallback.getSend()(t);break;case Microsoft.Office.Common.InvokeType.syncRegisterEvent:i=n._createEventHandlerProxyObject(n._invokeCompleteCallback);t=n._methodObject.getMethod()(i.getSend(),n._param);n._eventHandlerProxyList[n._conversationId+n._eventName]=i.getSend();n._invokeCompleteCallback.getSend()(t);break;case Microsoft.Office.Common.InvokeType.syncUnregisterEvent:u=n._eventHandlerProxyList[n._conversationId+n._eventName];t=n._methodObject.getMethod()(u,n._param);delete n._eventHandlerProxyList[n._conversationId+n._eventName];n._invokeCompleteCallback.getSend()(t);break;case Microsoft.Office.Common.InvokeType.asyncRegisterEvent:r=n._createEventHandlerProxyObject(n._invokeCompleteCallback);n._methodObject.getMethod()(r.getSend(),n._invokeCompleteCallback.getSend(),n._param);n._eventHandlerProxyList[n._callerId+n._eventName]=r.getSend();break;case Microsoft.Office.Common.InvokeType.asyncUnregisterEvent:f=n._eventHandlerProxyList[n._callerId+n._eventName];n._methodObject.getMethod()(f,n._invokeCompleteCallback.getSend(),n._param);delete n._eventHandlerProxyList[n._callerId+n._eventName]}}catch(e){n._invokeCompleteCallback.setResultCode(Microsoft.Office.Common.InvokeResultCode.errorInResponse);n._invokeCompleteCallback.getSend()(e)}},getInvokeBlockingFlag:function(){return this._methodObject.getBlockingFlag()},_createEventHandlerProxyObject:function(n){return new Microsoft.Office.Common.ResponseSender(n.getRequesterWindow(),n.getRequesterUrl(),n.getActionName(),n.getConversationId(),n.getCorrelationId(),Microsoft.Office.Common.ResponseType.forEventing,this._serializerVersion)}};OSF.OUtil.setNamespace("WAC",OSF.DDA);OSF.DDA.WAC.UniqueArguments={Data:"Data",Properties:"Properties",BindingRequest:"DdaBindingsMethod",BindingResponse:"Bindings",SingleBindingResponse:"singleBindingResponse",GetData:"DdaGetBindingData",AddRowsColumns:"DdaAddRowsColumns",SetData:"DdaSetBindingData",ClearFormats:"DdaClearBindingFormats",SetFormats:"DdaSetBindingFormats",SettingsRequest:"DdaSettingsMethod",BindingEventSource:"ddaBinding",ArrayData:"ArrayData"};OSF.OUtil.setNamespace("Delegate",OSF.DDA.WAC);OSF.DDA.WAC.Delegate.SpecialProcessor=function(){var n=[OSF.DDA.WAC.UniqueArguments.SingleBindingResponse,OSF.DDA.WAC.UniqueArguments.BindingRequest,OSF.DDA.WAC.UniqueArguments.BindingResponse,OSF.DDA.WAC.UniqueArguments.GetData,OSF.DDA.WAC.UniqueArguments.AddRowsColumns,OSF.DDA.WAC.UniqueArguments.SetData,OSF.DDA.WAC.UniqueArguments.ClearFormats,OSF.DDA.WAC.UniqueArguments.SetFormats,OSF.DDA.WAC.UniqueArguments.SettingsRequest,OSF.DDA.WAC.UniqueArguments.BindingEventSource],t={};OSF.DDA.WAC.Delegate.SpecialProcessor.uber.constructor.call(this,n,t)};OSF.OUtil.extend(OSF.DDA.WAC.Delegate.SpecialProcessor,OSF.DDA.SpecialProcessor);OSF.DDA.WAC.Delegate.ParameterMap=OSF.DDA.getDecoratedParameterMap(new OSF.DDA.WAC.Delegate.SpecialProcessor,[]);OSF.OUtil.setNamespace("WAC",OSF.DDA);OSF.OUtil.setNamespace("Delegate",OSF.DDA.WAC);OSF.DDA.WAC.getDelegateMethods=function(){var n={};return n[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]=OSF.DDA.WAC.Delegate.executeAsync,n[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync]=OSF.DDA.WAC.Delegate.registerEventAsync,n[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync]=OSF.DDA.WAC.Delegate.unregisterEventAsync,n[OSF.DDA.DispIdHost.Delegates.OpenDialog]=OSF.DDA.WAC.Delegate.openDialog,n[OSF.DDA.DispIdHost.Delegates.MessageParent]=OSF.DDA.WAC.Delegate.messageParent,n[OSF.DDA.DispIdHost.Delegates.SendMessage]=OSF.DDA.WAC.Delegate.sendMessage,n[OSF.DDA.DispIdHost.Delegates.CloseDialog]=OSF.DDA.WAC.Delegate.closeDialog,n};OSF.DDA.WAC.Delegate.version=1;OSF.DDA.WAC.Delegate.executeAsync=function(n){n.hostCallArgs||(n.hostCallArgs={});n.hostCallArgs.DdaMethod={ControlId:OSF._OfficeAppFactory.getId(),Version:OSF.DDA.WAC.Delegate.version,DispatchId:n.dispId};n.hostCallArgs.__timeout__=-1;n.onCalling&&n.onCalling();var t=(new Date).getTime();OSF.getClientEndPoint().invoke("executeMethod",function(i,r){n.onReceiving&&n.onReceiving();var u;if(i==Microsoft.Office.Common.InvokeResultCode.noError)OSF.DDA.WAC.Delegate.version=r.Version,u=r.Error;else switch(i){case Microsoft.Office.Common.InvokeResultCode.errorHandlingRequestAccessDenied:u=OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability;break;default:u=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError}n.onComplete&&n.onComplete(u,r);OSF.AppTelemetry&&OSF.AppTelemetry.onMethodDone(n.dispId,n.hostCallArgs,Math.abs((new Date).getTime()-t),u)},n.hostCallArgs)};OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent=function(n,t){var i=(new Date).getTime();return function(r,u){t.onReceiving&&t.onReceiving();var f;if(r!=Microsoft.Office.Common.InvokeResultCode.noError)switch(r){case Microsoft.Office.Common.InvokeResultCode.errorHandlingRequestAccessDenied:f=OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability;break;default:f=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError}else f=u?u.Error?u.Error:OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess:OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError;t.onComplete&&t.onComplete(f);OSF.AppTelemetry&&OSF.AppTelemetry.onRegisterDone(n,t.dispId,Math.abs((new Date).getTime()-i),f)}};OSF.DDA.WAC.Delegate.registerEventAsync=function(n){n.onCalling&&n.onCalling();OSF.getClientEndPoint().registerForEvent(OSF.DDA.getXdmEventName(n.targetId,n.eventType),function(t){n.onEvent&&n.onEvent(t);OSF.AppTelemetry&&OSF.AppTelemetry.onEventDone(n.dispId)},OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent(!0,n),{controlId:OSF._OfficeAppFactory.getId(),eventDispId:n.dispId,targetId:n.targetId})};OSF.DDA.WAC.Delegate.unregisterEventAsync=function(n){n.onCalling&&n.onCalling();OSF.getClientEndPoint().unregisterForEvent(OSF.DDA.getXdmEventName(n.targetId,n.eventType),OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent(!1,n),{controlId:OSF._OfficeAppFactory.getId(),eventDispId:n.dispId,targetId:n.targetId})};OSF.OUtil.setNamespace("WebApp",OSF);OSF.WebApp.AddHostInfoAndXdmInfo=function(n){return OSF._OfficeAppFactory.getWindowLocationSearch&&OSF._OfficeAppFactory.getWindowLocationHash?n+OSF._OfficeAppFactory.getWindowLocationSearch()+OSF._OfficeAppFactory.getWindowLocationHash():n};OSF.WebApp._UpdateLinksForHostAndXdmInfo=function(){for(var r,i,t=document.querySelectorAll("a[data-officejs-navigate]"),n=0;n<t.length;n++)OSF.WebApp._isGoodUrl(t[n].href)&&(t[n].href=OSF.WebApp.AddHostInfoAndXdmInfo(t[n].href));for(r=document.querySelectorAll("form[data-officejs-navigate]"),n=0;n<r.length;n++)i=r[n],OSF.WebApp._isGoodUrl(i.action)&&(i.action=OSF.WebApp.AddHostInfoAndXdmInfo(i.action))};OSF.WebApp._isGoodUrl=function(n){if(typeof n=="undefined")return!1;n=n.trim();var i=n.indexOf(":"),t=i>0?n.substr(0,i):null,r=t!==null?t.toLowerCase()==="http"||t.toLowerCase()==="https":!0;return r&&n!="#"&&n!="/"&&n!=""&&n!=OSF._OfficeAppFactory.getWebAppState().webAppUrl};OSF.InitializationHelper=function(n,t,i,r,u){var f=this,e;f._hostInfo=n;f._webAppState=t;f._context=i;f._settings=r;f._hostFacade=u;f._appContext={};f._tabbableElements="a[href]:not([tabindex='-1']),area[href]:not([tabindex='-1']),button:not([disabled]):not([tabindex='-1']),input:not([disabled]):not([tabindex='-1']),select:not([disabled]):not([tabindex='-1']),textarea:not([disabled]):not([tabindex='-1']),*[tabindex]:not([tabindex='-1']),*[contenteditable]:not([disabled]):not([tabindex='-1'])";f._initializeSettings=function(n,t){var r=n.get_settings(),u=OSF.OUtil.getSessionStorage(),i,f;return u&&(i=u.getItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey()),i?r=JSON.parse(i):(i=JSON.stringify(r),u.setItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey(),i))),f=OSF.DDA.SettingsManager.deserializeSettings(r),t?new OSF.DDA.RefreshableSettings(f):new OSF.DDA.Settings(f)};e=function(n){var t=window.open;n.open=function(n,i,r){var u=null,f;try{u=t(n,i,r)}catch(e){OSF.AppTelemetry&&OSF.AppTelemetry.logAppCommonMessage("Exception happens at windowOpen."+e)}return u||(f={strUrl:n,strWindowName:i,strWindowFeatures:r},OSF._OfficeAppFactory.getClientEndPoint().invoke("ContextActivationManager_openWindowInHost",null,f)),u}};e(window)};OSF.InitializationHelper.prototype.saveAndSetDialogInfo=function(n){var r="IsDialog",u=function(){var n=OSF.OUtil.parseXdmInfo(!0),t;return n?(t=n.split("|"),t[1]):null},t=OSF.OUtil.getSessionStorage(),i;t&&(n||(n=OSF.OUtil.parseHostInfoFromWindowName(!0,OSF._OfficeAppFactory.getWindowName())),n&&n.indexOf("isDialog")>-1&&(i=u(),i!=null&&t.setItem(i+r,"true")),this._hostInfo.isDialog=t.getItem(OSF.OUtil.getXdmFieldValue(OSF.XdmFieldName.AppId,!1)+r)!=null?!0:!1)};OSF.InitializationHelper.prototype.getAppContext=function(n,t){var i=this,e=i,r=function(n,i){var r,u,c,f,o,s,h;if(i._appName===OSF.AppName.ExcelWebApp){u=i._settings;r={};for(c in u)f=u[c],r[f[0]]=f[1]}else r=i._settings;if(n===0&&i._id!=undefined&&i._appName!=undefined&&i._appVersion!=undefined&&i._appUILocale!=undefined&&i._dataLocale!=undefined&&i._docUrl!=undefined&&i._clientMode!=undefined&&i._settings!=undefined&&i._reason!=undefined){e._appContext=i;var a=i._appInstanceId?i._appInstanceId:i._id,v=!1,y=!0,l=0;i._appMinorVersion!=undefined&&(l=i._appMinorVersion);o=undefined;i._requirementMatrix!=undefined&&(o=i._requirementMatrix);s=new OSF.OfficeAppContext(i._id,i._appName,i._appVersion,i._appUILocale,i._dataLocale,i._docUrl,i._clientMode,r,i._reason,i._osfControlType,i._eToken,i._correlationId,a,v,y,l,o,i._hostCustomMessage,i._hostFullVersion,i._clientWindowHeight,i._clientWindowWidth,i._addinName);OSF.AppTelemetry&&OSF.AppTelemetry.initialize(s);t(s)}else{h="Function ContextActivationManager_getAppContextAsync call failed. ErrorCode is "+n+", exception: "+i;OSF.AppTelemetry&&OSF.AppTelemetry.logAppException(h);throw h;}},u;try{i._hostInfo.isDialog&&window.opener!=null?(u=OfficeExt.WACUtils.parseAppContextFromWindowName(!1,OSF._OfficeAppFactory.getWindowName()),r(0,u)):i._webAppState.clientEndPoint.invoke("ContextActivationManager_getAppContextAsync",r,i._webAppState.id)}catch(f){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Exception thrown when trying to invoke getAppContextAsync. Exception:["+f+"]");throw f;}};OSF.InitializationHelper.prototype.setAgaveHostCommunication=function(){var r="ContextActivationManager_notifyHost",i=null,t=!1,n,f,u,e,o,s;try{if(n=this,f=OSF.OUtil.parseXdmInfoWithGivenFragment(t,OSF._OfficeAppFactory.getWindowLocationHash()),!f&&OSF._OfficeAppFactory.getWindowName&&(f=OSF.OUtil.parseXdmInfoFromWindowName(t,OSF._OfficeAppFactory.getWindowName())),f&&(u=OSF.OUtil.getInfoItems(f),u!=undefined&&u.length>=3&&(n._webAppState.conversationID=u[0],n._webAppState.id=u[1],n._webAppState.webAppUrl=u[2].indexOf(":")>=0?u[2]:decodeURIComponent(u[2]))),n._webAppState.wnd=window.opener!=i?window.opener:window.parent,e=OSF.OUtil.parseSerializerVersionWithGivenFragment(t,OSF._OfficeAppFactory.getWindowLocationHash()),isNaN(e)&&OSF._OfficeAppFactory.getWindowName&&(e=OSF.OUtil.parseSerializerVersionFromWindowName(t,OSF._OfficeAppFactory.getWindowName())),n._webAppState.serializerVersion=e,n._webAppState.clientEndPoint=Microsoft.Office.Common.XdmCommunicationManager.connect(n._webAppState.conversationID,n._webAppState.wnd,n._webAppState.webAppUrl,n._webAppState.serializerVersion),n._webAppState.serviceEndPoint=Microsoft.Office.Common.XdmCommunicationManager.createServiceEndPoint(n._webAppState.id),o=n._webAppState.conversationID+OSF.SharedConstants.NotificationConversationIdSuffix,n._webAppState.serviceEndPoint.registerConversation(o,n._webAppState.webAppUrl),this._hostInfo.isDialog&&window.opener!=i)return;s=function(u){var f,e;switch(u){case OSF.AgaveHostAction.Select:n._webAppState.focused=!0;break;case OSF.AgaveHostAction.UnSelect:n._webAppState.focused=t;break;case OSF.AgaveHostAction.TabIn:case OSF.AgaveHostAction.CtrlF6In:window.focus();f=document.querySelectorAll(n._tabbableElements);e=OSF.OUtil.focusToFirstTabbable(f,t);e||(window.blur(),n._webAppState.focused=t,n._webAppState.clientEndPoint.invoke(r,i,[n._webAppState.id,OSF.AgaveHostAction.ExitNoFocusable]));break;case OSF.AgaveHostAction.TabInShift:window.focus();f=document.querySelectorAll(n._tabbableElements);e=OSF.OUtil.focusToFirstTabbable(f,!0);e||(window.blur(),n._webAppState.focused=t,n._webAppState.clientEndPoint.invoke(r,i,[n._webAppState.id,OSF.AgaveHostAction.ExitNoFocusableShift]));break;default:OsfMsAjaxFactory.msAjaxDebug.trace("actionId "+u+" notifyAgave is wrong.")}};n._webAppState.serviceEndPoint.registerMethod("Office_notifyAgave",s,Microsoft.Office.Common.InvokeType.async,t);OSF.OUtil.addEventListener(window,"focus",function(){n._webAppState.focused||(n._webAppState.focused=!0);n._webAppState.clientEndPoint.invoke(r,i,[n._webAppState.id,OSF.AgaveHostAction.Select])});OSF.OUtil.addEventListener(window,"blur",function(){OSF&&(n._webAppState.focused&&(n._webAppState.focused=t),n._webAppState.clientEndPoint.invoke(r,i,[n._webAppState.id,OSF.AgaveHostAction.UnSelect]))});OSF.OUtil.addEventListener(window,"keydown",function(u){var f,e,o;u.preventDefault=u.preventDefault||function(){u.returnValue=t};u.keyCode==117&&(u.ctrlKey||u.metaKey)?(f=OSF.AgaveHostAction.CtrlF6Exit,u.shiftKey&&(f=OSF.AgaveHostAction.CtrlF6ExitShift),n._webAppState.clientEndPoint.invoke(r,i,[n._webAppState.id,f])):u.keyCode==9?(u.preventDefault(),e=document.querySelectorAll(n._tabbableElements),o=OSF.OUtil.focusToNextTabbable(e,u.target||u.srcElement,u.shiftKey),o||(n._hostInfo.isDialog?OSF.OUtil.focusToFirstTabbable(e,u.shiftKey):u.shiftKey?n._webAppState.clientEndPoint.invoke(r,i,[n._webAppState.id,OSF.AgaveHostAction.TabExitShift]):n._webAppState.clientEndPoint.invoke(r,i,[n._webAppState.id,OSF.AgaveHostAction.TabExit]))):u.keyCode==27?(u.preventDefault(),n.dismissDialogNotification&&n.dismissDialogNotification(),n._webAppState.clientEndPoint.invoke(r,i,[n._webAppState.id,OSF.AgaveHostAction.EscExit])):u.keyCode==113&&(u.preventDefault(),n._webAppState.clientEndPoint.invoke(r,i,[n._webAppState.id,OSF.AgaveHostAction.F2Exit]))});OSF.OUtil.addEventListener(window,"keypress",function(n){n.keyCode==117&&n.ctrlKey&&(n.preventDefault?n.preventDefault():n.returnValue=t)})}catch(h){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Exception thrown in setAgaveHostCommunication. Exception:["+h+"]");throw h;}};OSF.InitializationHelper.prototype.initWebDialog=function(n){if(n.get_isDialog()){if(OSF.DDA.UI.ChildUI){var t=window.opener!=null;n.ui=new OSF.DDA.UI.ChildUI(t);t&&this.registerMessageReceivedEventForWindowDialog&&this.registerMessageReceivedEventForWindowDialog()}}else OSF.DDA.UI.ParentUI&&(n.ui=new OSF.DDA.UI.ParentUI,OfficeExt.Container&&OSF.DDA.DispIdHost.addAsyncMethods(n.ui,[OSF.DDA.AsyncMethodNames.CloseContainerAsync]))};OSF.getClientEndPoint=function(){var n=OSF._OfficeAppFactory.getInitializationHelper();return n._webAppState.clientEndPoint};OSF.InitializationHelper.prototype.prepareRightAfterWebExtensionInitialize=function(){var n=this,t,i;n._hostInfo.isDialog&&(window.focus(),t=document.querySelectorAll(n._tabbableElements),i=OSF.OUtil.focusToFirstTabbable(t,!1),i||(window.blur(),n._webAppState.focused=!1,n._webAppState.clientEndPoint.invoke("ContextActivationManager_notifyHost",null,[n._webAppState.id,OSF.AgaveHostAction.ExitNoFocusable])))},function(n){var u="ResponseTime",f="Message",i="SessionId",r="CorrelationId",t=!0,e=function(){function n(n){this._table=n;this._fields={}}return Object.defineProperty(n.prototype,"Fields",{get:function(){return this._fields},enumerable:t,configurable:t}),Object.defineProperty(n.prototype,"Table",{get:function(){return this._table},enumerable:t,configurable:t}),n.prototype.SerializeFields=function(){},n.prototype.SetSerializedField=function(n,t){typeof t!="undefined"&&t!==null&&(this._serializedFields[n]=t.toString())},n.prototype.SerializeRow=function(){var n=this;return n._serializedFields={},n.SetSerializedField("Table",n._table),n.SerializeFields(),JSON.stringify(n._serializedFields)},n}(),o,s,h,c,l;n.BaseUsageData=e;o=function(n){function u(){n.call(this,"AppActivated")}var e="HostJSVersion",o="OfficeJSVersion",s="DocUrl",h="AppSizeHeight",c="AppSizeWidth",l="ClientId",a="HostVersion",v="Host",y="UserId",p="Browser",w="AssetId",b="AppURL",k="AppInstanceId",d="AppId";return __extends(u,n),Object.defineProperty(u.prototype,r,{get:function(){return this.Fields[r]},set:function(n){this.Fields[r]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,i,{get:function(){return this.Fields[i]},set:function(n){this.Fields[i]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,d,{get:function(){return this.Fields[d]},set:function(n){this.Fields[d]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,k,{get:function(){return this.Fields[k]},set:function(n){this.Fields[k]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,b,{get:function(){return this.Fields[b]},set:function(n){this.Fields[b]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,w,{get:function(){return this.Fields[w]},set:function(n){this.Fields[w]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,p,{get:function(){return this.Fields[p]},set:function(n){this.Fields[p]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,y,{get:function(){return this.Fields[y]},set:function(n){this.Fields[y]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,v,{get:function(){return this.Fields[v]},set:function(n){this.Fields[v]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,a,{get:function(){return this.Fields[a]},set:function(n){this.Fields[a]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,l,{get:function(){return this.Fields[l]},set:function(n){this.Fields[l]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,c,{get:function(){return this.Fields[c]},set:function(n){this.Fields[c]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,h,{get:function(){return this.Fields[h]},set:function(n){this.Fields[h]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,f,{get:function(){return this.Fields[f]},set:function(n){this.Fields[f]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,s,{get:function(){return this.Fields[s]},set:function(n){this.Fields[s]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,o,{get:function(){return this.Fields[o]},set:function(n){this.Fields[o]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,e,{get:function(){return this.Fields[e]},set:function(n){this.Fields[e]=n},enumerable:t,configurable:t}),u.prototype.SerializeFields=function(){var n=this;n.SetSerializedField(r,n.CorrelationId);n.SetSerializedField(i,n.SessionId);n.SetSerializedField(d,n.AppId);n.SetSerializedField(k,n.AppInstanceId);n.SetSerializedField(b,n.AppURL);n.SetSerializedField(w,n.AssetId);n.SetSerializedField(p,n.Browser);n.SetSerializedField(y,n.UserId);n.SetSerializedField(v,n.Host);n.SetSerializedField(a,n.HostVersion);n.SetSerializedField(l,n.ClientId);n.SetSerializedField(c,n.AppSizeWidth);n.SetSerializedField(h,n.AppSizeHeight);n.SetSerializedField(f,n.Message);n.SetSerializedField(s,n.DocUrl);n.SetSerializedField(o,n.OfficeJSVersion);n.SetSerializedField(e,n.HostJSVersion)},u}(e);n.AppActivatedUsageData=o;s=function(n){function f(){n.call(this,"ScriptLoad")}var e="StartTime",o="ScriptId";return __extends(f,n),Object.defineProperty(f.prototype,r,{get:function(){return this.Fields[r]},set:function(n){this.Fields[r]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,i,{get:function(){return this.Fields[i]},set:function(n){this.Fields[i]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,o,{get:function(){return this.Fields[o]},set:function(n){this.Fields[o]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,e,{get:function(){return this.Fields[e]},set:function(n){this.Fields[e]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,u,{get:function(){return this.Fields[u]},set:function(n){this.Fields[u]=n},enumerable:t,configurable:t}),f.prototype.SerializeFields=function(){var n=this;n.SetSerializedField(r,n.CorrelationId);n.SetSerializedField(i,n.SessionId);n.SetSerializedField(o,n.ScriptId);n.SetSerializedField(e,n.StartTime);n.SetSerializedField(u,n.ResponseTime)},f}(e);n.ScriptLoadUsageData=s;h=function(n){function u(){n.call(this,"AppClosed")}var f="CloseMethod",e="OpenTime",o="AppSizeFinalHeight",s="AppSizeFinalWidth",h="FocusTime";return __extends(u,n),Object.defineProperty(u.prototype,r,{get:function(){return this.Fields[r]},set:function(n){this.Fields[r]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,i,{get:function(){return this.Fields[i]},set:function(n){this.Fields[i]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,h,{get:function(){return this.Fields[h]},set:function(n){this.Fields[h]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,s,{get:function(){return this.Fields[s]},set:function(n){this.Fields[s]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,o,{get:function(){return this.Fields[o]},set:function(n){this.Fields[o]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,e,{get:function(){return this.Fields[e]},set:function(n){this.Fields[e]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,f,{get:function(){return this.Fields[f]},set:function(n){this.Fields[f]=n},enumerable:t,configurable:t}),u.prototype.SerializeFields=function(){var n=this;n.SetSerializedField(r,n.CorrelationId);n.SetSerializedField(i,n.SessionId);n.SetSerializedField(h,n.FocusTime);n.SetSerializedField(s,n.AppSizeFinalWidth);n.SetSerializedField(o,n.AppSizeFinalHeight);n.SetSerializedField(e,n.OpenTime);n.SetSerializedField(f,n.CloseMethod)},u}(e);n.AppClosedUsageData=h;c=function(n){function f(){n.call(this,"APIUsage")}var e="ErrorType",o="Parameters",s="APIID",h="APIType";return __extends(f,n),Object.defineProperty(f.prototype,r,{get:function(){return this.Fields[r]},set:function(n){this.Fields[r]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,i,{get:function(){return this.Fields[i]},set:function(n){this.Fields[i]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,h,{get:function(){return this.Fields[h]},set:function(n){this.Fields[h]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,s,{get:function(){return this.Fields[s]},set:function(n){this.Fields[s]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,o,{get:function(){return this.Fields[o]},set:function(n){this.Fields[o]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,u,{get:function(){return this.Fields[u]},set:function(n){this.Fields[u]=n},enumerable:t,configurable:t}),Object.defineProperty(f.prototype,e,{get:function(){return this.Fields[e]},set:function(n){this.Fields[e]=n},enumerable:t,configurable:t}),f.prototype.SerializeFields=function(){var n=this;n.SetSerializedField(r,n.CorrelationId);n.SetSerializedField(i,n.SessionId);n.SetSerializedField(h,n.APIType);n.SetSerializedField(s,n.APIID);n.SetSerializedField(o,n.Parameters);n.SetSerializedField(u,n.ResponseTime);n.SetSerializedField(e,n.ErrorType)},f}(e);n.APIUsageUsageData=c;l=function(n){function u(){n.call(this,"AppInitialization")}var e="SuccessCode";return __extends(u,n),Object.defineProperty(u.prototype,r,{get:function(){return this.Fields[r]},set:function(n){this.Fields[r]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,i,{get:function(){return this.Fields[i]},set:function(n){this.Fields[i]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,e,{get:function(){return this.Fields[e]},set:function(n){this.Fields[e]=n},enumerable:t,configurable:t}),Object.defineProperty(u.prototype,f,{get:function(){return this.Fields[f]},set:function(n){this.Fields[f]=n},enumerable:t,configurable:t}),u.prototype.SerializeFields=function(){var n=this;n.SetSerializedField(r,n.CorrelationId);n.SetSerializedField(i,n.SessionId);n.SetSerializedField(e,n.SuccessCode);n.SetSerializedField(f,n.Message)},u}(e);n.AppInitializationUsageData=l}(OSFLog||(OSFLog={})),function(n){"use strict";function u(){OSF.Logger&&OSF.Logger.ulsEndpoint&&OSF.Logger.ulsEndpoint.loadProxyFrame()}function f(n,t,i){if(OSF.Logger&&OSF.Logger.ulsEndpoint){var r={traceLevel:n,message:t,flag:i,internalLog:!0},u=JSON.stringify(r);OSF.Logger.ulsEndpoint.writeLog(u)}}function e(){try{return new t}catch(n){return null}}var i,r,t;(function(n){n[n.info=0]="info";n[n.warning=1]="warning";n[n.error=2]="error"})(n.TraceLevel||(n.TraceLevel={}));i=n.TraceLevel,function(n){n[n.none=0]="none";n[n.flush=1]="flush"}(n.SendFlag||(n.SendFlag={}));r=n.SendFlag;n.allowUploadingData=u;n.sendLog=f;t=function(){function n(){var n=this,t=n;n.proxyFrame=null;n.telemetryEndPoint="https://telemetryservice.firstpartyapps.oaspapps.com/telemetryservice/telemetryproxy.html";n.buffer=[];n.proxyFrameReady=!1;OSF.OUtil.addEventListener(window,"message",function(n){return t.tellProxyFrameReady(n)});setTimeout(function(){t.loadProxyFrame()},3e3)}return n.prototype.writeLog=function(t){var i=this;i.proxyFrameReady===!0?i.proxyFrame.contentWindow.postMessage(t,n.telemetryOrigin):i.buffer.length<128&&i.buffer.push(t)},n.prototype.loadProxyFrame=function(){var n=this;n.proxyFrame==null&&(n.proxyFrame=document.createElement("iframe"),n.proxyFrame.setAttribute("style","display:none"),n.proxyFrame.setAttribute("src",n.telemetryEndPoint),document.head.appendChild(n.proxyFrame))},n.prototype.tellProxyFrameReady=function(t){var i=this,e=i,r,u,f;if(t.data==="ProxyFrameReadyToLog"){for(i.proxyFrameReady=!0,r=0;r<i.buffer.length;r++)i.writeLog(i.buffer[r]);i.buffer.length=0;OSF.OUtil.removeEventListener(window,"message",function(n){return e.tellProxyFrameReady(n)})}else t.data==="ProxyFrameReadyToInit"&&(u={appName:"Office APPs",sessionId:OSF.OUtil.Guid.generateNewGuid()},f=JSON.stringify(u),i.proxyFrame.contentWindow.postMessage(f,n.telemetryOrigin))},n.telemetryOrigin="https://telemetryservice.firstpartyapps.oaspapps.com",n}();OSF.Logger||(OSF.Logger=n);n.ulsEndpoint=e()}(Logger||(Logger={})),function(n){function l(r){var e,f;OSF.Logger&&(t||(t=new c,t.hostVersion=r.get_hostFullVersion()?r.get_hostFullVersion():r.get_appVersion(),t.appId=r.get_id(),t.host=r.get_appName(),t.browser=window.navigator.userAgent,t.correlationId=r.get_correlationId(),t.clientId=(new o).getClientId(),t.appInstanceId=r.get_appInstanceId(),t.appInstanceId&&(t.appInstanceId=t.appInstanceId.replace(/[{}]/g,"").toLowerCase()),t.message=r.get_hostCustomMessage(),t.officeJSVersion=OSF.ConstantNames.FileVersion,t.hostJSVersion="16.0.7607.3000",e=r.get_docUrl(),t.docUrl=h.test(e)?e:"",f=location.href,f&&(f=f.split("?")[0].split("#")[0]),t.appURL=f,function(n,t){var e,o,r,u,f;t.assetId="";t.userId="";try{e=decodeURIComponent(n);o=new DOMParser;r=o.parseFromString(e,"text/xml");u=r.getElementsByTagName("t")[0].attributes.getNamedItem("cid");f=r.getElementsByTagName("t")[0].attributes.getNamedItem("oid");u&&u.nodeValue?t.userId=u.nodeValue:f&&f.nodeValue&&(t.userId=f.nodeValue);t.assetId=r.getElementsByTagName("t")[0].attributes.getNamedItem("aid").nodeValue}catch(s){}finally{e=i;r=i;o=i}}(r.get_eToken(),t),function(){var c=new Date,r=i,o=0,h=!1,f=function(){document.hasFocus()?r==i&&(r=new Date):r&&(o+=Math.abs((new Date).getTime()-r.getTime()),r=i)},t=[],s,e;for(t.push(new u("focus",f)),t.push(new u("blur",f)),t.push(new u("focusout",f)),t.push(new u("focusin",f)),s=function(){for(var u=0;u<t.length;u++)OSF.OUtil.removeEventListener(window,t[u].name,t[u].handler);if(t.length=0,!h){document.hasFocus()&&r&&(o+=Math.abs((new Date).getTime()-r.getTime()),r=i);n.onAppClosed(Math.abs((new Date).getTime()-c.getTime()),o);h=!0}},t.push(new u("beforeunload",s)),t.push(new u("unload",s)),e=0;e<t.length;e++)OSF.OUtil.addEventListener(window,t[e].name,t[e].handler);f()}(),n.onAppActivated()))}function a(){if(t){(new o).enumerateLog(function(n,t){return(new f).LogRawData(t)},!0);var n=new OSFLog.AppActivatedUsageData;n.SessionId=r;n.AppId=t.appId;n.AssetId=t.assetId;n.AppURL=t.appURL;n.UserId=t.userId;n.ClientId=t.clientId;n.Browser=t.browser;n.Host=t.host;n.HostVersion=t.hostVersion;n.CorrelationId=t.correlationId;n.AppSizeWidth=window.innerWidth;n.AppSizeHeight=window.innerHeight;n.AppInstanceId=t.appInstanceId;n.Message=t.message;n.DocUrl=t.docUrl;n.OfficeJSVersion=t.officeJSVersion;n.HostJSVersion=t.hostJSVersion;(new f).LogData(n);setTimeout(function(){OSF.Logger&&OSF.Logger.allowUploadingData()},100)}}function v(n,t,i,u){var e=new OSFLog.ScriptLoadUsageData;e.CorrelationId=u;e.SessionId=r;e.ScriptId=n;e.StartTime=t;e.ResponseTime=i;(new f).LogData(e)}function y(n,i,u,o,s){if(t){var h=new OSFLog.APIUsageUsageData;h.CorrelationId=e;h.SessionId=r;h.APIType=n;h.APIID=i;h.Parameters=u;h.ResponseTime=o;h.ErrorType=s;(new f).LogData(h)}}function p(n,t,r,u){var f=i,e;if(t)if(typeof t=="number")f=String(t);else if(typeof t=="object")for(e in t)f!==i?f+=",":f="",typeof t[e]=="number"&&(f+=String(t[e]));else f="";OSF.AppTelemetry.onCallDone("method",n,f,r,u)}function w(n,t){OSF.AppTelemetry.onCallDone("property",-1,n,t)}function b(n,t){OSF.AppTelemetry.onCallDone("event",n,i,0,t)}function k(n,t,r,u){OSF.AppTelemetry.onCallDone(n?"registerevent":"unregisterevent",t,i,r,u)}function d(n,i){if(t){var u=new OSFLog.AppClosedUsageData;u.CorrelationId=e;u.SessionId=r;u.FocusTime=i;u.OpenTime=n;u.AppSizeFinalWidth=window.innerWidth;u.AppSizeFinalHeight=window.innerHeight;(new o).saveLog(r,u.SerializeRow())}}function g(n){e=n}function s(n,t){var i=new OSFLog.AppInitializationUsageData;i.CorrelationId=e;i.SessionId=r;i.SuccessCode=n?1:0;i.Message=t;(new f).LogData(i)}function nt(n){s(!1,n)}function tt(n){s(!0,n)}var i=null;"use strict";var t,r=OSF.OUtil.Guid.generateNewGuid(),e="",h=new RegExp("^https?://store\\.office(ppe|-int)?\\.com/","i"),c=function(){function n(){}return n}(),u=function(){function n(n,t){this.name=n;this.handler=t}return n}(),o=function(){function n(){this.clientIDKey="Office API client";this.logIdSetKey="Office App Log Id Set"}return n.prototype.getClientId=function(){var t=this,n=t.getValue(t.clientIDKey);return(!n||n.length<=0||n.length>40)&&(n=OSF.OUtil.Guid.generateNewGuid(),t.setValue(t.clientIDKey,n)),n},n.prototype.saveLog=function(n,t){var i=this,r=i.getValue(i.logIdSetKey);r=(r&&r.length>0?r+";":"")+n;i.setValue(i.logIdSetKey,r);i.setValue(n,t)},n.prototype.enumerateLog=function(n,t){var i=this,e=i.getValue(i.logIdSetKey),u,o,r,f;if(e){u=e.split(";");for(o in u)r=u[o],f=i.getValue(r),f&&(n&&n(r,f),t&&i.remove(r));t&&i.remove(i.logIdSetKey)}},n.prototype.getValue=function(n){var t=OSF.OUtil.getLocalStorage(),i="";return t&&(i=t.getItem(n)),i},n.prototype.setValue=function(n,t){var i=OSF.OUtil.getLocalStorage();i&&i.setItem(n,t)},n.prototype.remove=function(n){var t=OSF.OUtil.getLocalStorage();if(t)try{t.removeItem(n)}catch(i){}},n}(),f=function(){function n(){}return n.prototype.LogData=function(n){OSF.Logger&&OSF.Logger.sendLog(OSF.Logger.TraceLevel.info,n.SerializeRow(),OSF.Logger.SendFlag.none)},n.prototype.LogRawData=function(n){OSF.Logger&&OSF.Logger.sendLog(OSF.Logger.TraceLevel.info,n,OSF.Logger.SendFlag.none)},n}();n.initialize=l;n.onAppActivated=a;n.onScriptDone=v;n.onCallDone=y;n.onMethodDone=p;n.onPropertyDone=w;n.onEventDone=b;n.onRegisterDone=k;n.onAppClosed=d;n.setOsfControlAppCorrelationId=g;n.doAppInitializationLogging=s;n.logAppCommonMessage=nt;n.logAppException=tt;OSF.AppTelemetry=n}(OSFAppTelemetry||(OSFAppTelemetry={}));Microsoft.Office.WebExtension.TableData=function(n,t){function i(n){if(n==null||n==undefined)return null;try{for(var t=OSF.DDA.DataCoercion.findArrayDimensionality(n,2);t<2;t++)n=[n];return n}catch(i){}}OSF.OUtil.defineEnumerableProperties(this,{headers:{get:function(){return t},set:function(n){t=i(n)}},rows:{get:function(){return n},set:function(t){n=t==null||OSF.OUtil.isArray(t)&&t.length==0?[]:i(t)}}});this.headers=t;this.rows=n};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureTableData=function(n){return new Microsoft.Office.WebExtension.TableData(n[OSF.DDA.TableDataProperties.TableRows],n[OSF.DDA.TableDataProperties.TableHeaders])};Microsoft.Office.WebExtension.CoercionType={Text:"text",Matrix:"matrix",Table:"table"};OSF.DDA.DataCoercion=function(){var n=null;return{findArrayDimensionality:function(n){if(OSF.OUtil.isArray(n)){for(var t=0,i=0;i<n.length;i++)t=Math.max(t,OSF.DDA.DataCoercion.findArrayDimensionality(n[i]));return t+1}else return 0},getCoercionDefaultForBinding:function(n){switch(n){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(n){switch(n){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(t){if(t==n||t==undefined)return n;var i=n,r=typeof t;if(t.rows!==undefined)i=Microsoft.Office.WebExtension.CoercionType.Table;else if(OSF.OUtil.isArray(t))i=Microsoft.Office.WebExtension.CoercionType.Matrix;else if(r=="string"||r=="number"||r=="boolean"||OSF.OUtil.isDate(t))i=Microsoft.Office.WebExtension.CoercionType.Text;else throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject;return i},coerceData:function(n,t,i){return i=i||OSF.DDA.DataCoercion.determineCoercionType(n),i&&i!=t&&(OSF.OUtil.writeProfilerMark(OSF.InternalPerfMarker.DataCoercionBegin),n=OSF.DDA.DataCoercion._coerceDataFromTable(t,OSF.DDA.DataCoercion._coerceDataToTable(n,i)),OSF.OUtil.writeProfilerMark(OSF.InternalPerfMarker.DataCoercionEnd)),n},_matrixToText:function(n){if(n.length==1&&n[0].length==1)return""+n[0][0];for(var t="",i=0;i<n.length;i++)t+=n[i].join("\t")+"\n";return t.substring(0,t.length-1)},_textToMatrix:function(n){for(var t=n.split("\n"),i=0;i<t.length;i++)t[i]=t[i].split("\t");return t},_tableToText:function(t){var i="",r;return t.headers!=n&&(i=OSF.DDA.DataCoercion._matrixToText([t.headers])+"\n"),r=OSF.DDA.DataCoercion._matrixToText(t.rows),r==""&&(i=i.substring(0,i.length-1)),i+r},_tableToMatrix:function(t){var i=t.rows;return t.headers!=n&&i.unshift(t.headers),i},_coerceDataFromTable:function(t,i){var r;switch(t){case Microsoft.Office.WebExtension.CoercionType.Table:r=i;break;case Microsoft.Office.WebExtension.CoercionType.Matrix:r=OSF.DDA.DataCoercion._tableToMatrix(i);break;case Microsoft.Office.WebExtension.CoercionType.SlideRange:r=n;OSF.DDA.OMFactory.manufactureSlideRange&&(r=OSF.DDA.OMFactory.manufactureSlideRange(OSF.DDA.DataCoercion._tableToText(i)));r==n&&(r=OSF.DDA.DataCoercion._tableToText(i));break;case Microsoft.Office.WebExtension.CoercionType.Text:case Microsoft.Office.WebExtension.CoercionType.Html:case Microsoft.Office.WebExtension.CoercionType.Ooxml:default:r=OSF.DDA.DataCoercion._tableToText(i)}return r},_coerceDataToTable:function(n,t){t==undefined&&(t=OSF.DDA.DataCoercion.determineCoercionType(n));var i;switch(t){case Microsoft.Office.WebExtension.CoercionType.Table:i=n;break;case Microsoft.Office.WebExtension.CoercionType.Matrix:i=new Microsoft.Office.WebExtension.TableData(n);break;case Microsoft.Office.WebExtension.CoercionType.Text:case Microsoft.Office.WebExtension.CoercionType.Html:case Microsoft.Office.WebExtension.CoercionType.Ooxml:default:i=new Microsoft.Office.WebExtension.TableData(OSF.DDA.DataCoercion._textToMatrix(n))}return i}}}();Microsoft.Office.WebExtension.EventType={};OSF.EventDispatch=function(n){var t=this,r,i;t._eventHandlers={};t._queuedEventsArgs={};for(r in n)i=n[r],t._eventHandlers[i]=[],t._queuedEventsArgs[i]=[]};OSF.EventDispatch.prototype={getSupportedEvents:function(){var n=[];for(var t in this._eventHandlers)n.push(t);return n},supportsEvent:function(n){var t=!1;for(var i in this._eventHandlers)if(n==i){t=!0;break}return t},hasEventHandler:function(n,t){var i=this._eventHandlers[n],r;if(i&&i.length>0)for(r in i)if(i[r]===t)return!0;return!1},addEventHandler:function(n,t){if(typeof t!="function")return!1;var i=this._eventHandlers[n];return i&&!this.hasEventHandler(n,t)?(i.push(t),!0):!1},addEventHandlerAndFireQueuedEvent:function(n,t){var r=this._eventHandlers[n],u=r.length==0,i=this.addEventHandler(n,t);return u&&i&&this.fireQueuedEvent(n),i},removeEventHandler:function(n,t){var i=this._eventHandlers[n],r;if(i&&i.length>0)for(r=0;r<i.length;r++)if(i[r]===t)return i.splice(r,1),!0;return!1},clearEventHandlers:function(n){return typeof this._eventHandlers[n]!="undefined"&&this._eventHandlers[n].length>0?(this._eventHandlers[n]=[],!0):!1},getEventHandlerCount:function(n){return this._eventHandlers[n]!=undefined?this._eventHandlers[n].length:-1},fireEvent:function(n){var t,i,r;if(n.type==undefined)return!1;if(t=n.type,t&&this._eventHandlers[t]){i=this._eventHandlers[t];for(r in i)i[r](n);return!0}else return!1},fireOrQueueEvent:function(n){var t=this,i=n.type,r,u;return i&&t._eventHandlers[i]?(r=t._eventHandlers[i],u=t._queuedEventsArgs[i],r.length==0?u.push(n):t.fireEvent(n),!0):!1},fireQueuedEvent:function(n){var t,i,r,u;if(n&&this._eventHandlers[n]&&(t=this._eventHandlers[n],i=this._queuedEventsArgs[n],t.length>0)){for(r=t[0];i.length>0;)u=i.shift(),r(u);return!0}return!1}};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureEventArgs=function(n,t,i){var f="hostType",u=this,r;switch(n){case Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged:r=new OSF.DDA.DocumentSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.BindingSelectionChanged:r=new OSF.DDA.BindingSelectionChangedEventArgs(u.manufactureBinding(i,t.document),i[OSF.DDA.PropertyDescriptors.Subset]);break;case Microsoft.Office.WebExtension.EventType.BindingDataChanged:r=new OSF.DDA.BindingDataChangedEventArgs(u.manufactureBinding(i,t.document));break;case Microsoft.Office.WebExtension.EventType.SettingsChanged:r=new OSF.DDA.SettingsChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ActiveViewChanged:r=new OSF.DDA.ActiveViewChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.OfficeThemeChanged:r=new OSF.DDA.Theming.OfficeThemeChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.DocumentThemeChanged:r=new OSF.DDA.Theming.DocumentThemeChangedEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.AppCommandInvoked:r=OSF.DDA.AppCommand.AppCommandInvokedEventArgs.create(i);break;case Microsoft.Office.WebExtension.EventType.DataNodeInserted:r=new OSF.DDA.NodeInsertedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NewNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeReplaced:r=new OSF.DDA.NodeReplacedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.OldNode]),u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NewNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeDeleted:r=new OSF.DDA.NodeDeletedEventArgs(u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.OldNode]),u.manufactureDataNode(i[OSF.DDA.DataNodeEventProperties.NextSiblingNode]),i[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.TaskSelectionChanged:r=new OSF.DDA.TaskSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ResourceSelectionChanged:r=new OSF.DDA.ResourceSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ViewSelectionChanged:r=new OSF.DDA.ViewSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.DialogMessageReceived:r=new OSF.DDA.DialogEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived:r=new OSF.DDA.DialogParentEventArgs(i);break;case Microsoft.Office.WebExtension.EventType.ItemChanged:if(OSF._OfficeAppFactory.getHostInfo()[f]=="outlook"||OSF._OfficeAppFactory.getHostInfo()[f]=="outlookwebapp")r=new OSF.DDA.OlkItemSelectedChangedEventArgs(i),t.initialize(r.initialData),t.setCurrentItemNumber(r.itemNumber.itemNumber);else throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,n));}return r};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(n,t,i){return i.supportsEvent(n)}},{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(n,t,i){return i.supportsEvent(n)}}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Handler,value:{types:["function","object"],defaultValue:null}}],privateStateCallbacks:[]});OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{DialogParentMessageReceivedEvent:"DialogParentMessageReceivedEvent"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{DialogParentMessageReceived:"dialogParentMessageReceived",DialogParentEventReceived:"dialogParentEventReceived"});OSF.DialogParentMessageEventDispatch=new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived,Microsoft.Office.WebExtension.EventType.DialogParentEventReceived]);OSF.OUtil.augmentList(Microsoft.Office.WebExtension.CoercionType,{Image:"image"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.CoercionType,{Ooxml:"ooxml"});OSF.DDA.DataPartProperties={Id:Microsoft.Office.WebExtension.Parameters.Id,BuiltIn:"DataPartBuiltIn"};OSF.DDA.DataNodeProperties={Handle:"DataNodeHandle",BaseName:"DataNodeBaseName",NamespaceUri:"DataNodeNamespaceUri",NodeType:"DataNodeType"};OSF.DDA.DataNodeEventProperties={OldNode:"OldNode",NewNode:"NewNode",NextSiblingNode:"NextSiblingNode",InUndoRedo:"InUndoRedo"};OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{DataPartProperties:"DataPartProperties",DataNodeProperties:"DataNodeProperties"});OSF.OUtil.augmentList(OSF.DDA.ListDescriptors,{DataPartList:"DataPartList",DataNodeList:"DataNodeList"});OSF.DDA.ListType.setListType(OSF.DDA.ListDescriptors.DataPartList,OSF.DDA.PropertyDescriptors.DataPartProperties);OSF.DDA.ListType.setListType(OSF.DDA.ListDescriptors.DataNodeList,OSF.DDA.PropertyDescriptors.DataNodeProperties);OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{DataNodeInsertedEvent:"DataNodeInsertedEvent",DataNodeReplacedEvent:"DataNodeReplacedEvent",DataNodeDeletedEvent:"DataNodeDeletedEvent"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{DataNodeDeleted:"nodeDeleted",DataNodeInserted:"nodeInserted",DataNodeReplaced:"nodeReplaced"});OSF.DDA.CustomXmlParts=function(){this._eventDispatches=[];var n=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[n.AddDataPartAsync,n.GetDataPartByIdAsync,n.GetDataPartsByNameSpaceAsync])};OSF.DDA.CustomXmlPart=function(n,t,i){var u,e,r,f;OSF.OUtil.defineEnumerableProperties(this,{builtIn:{value:i},id:{value:t},namespaceManager:{value:new OSF.DDA.CustomXmlPrefixMappings(t)}});u=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[u.DeleteDataPartAsync,u.GetPartNodesAsync,u.GetPartXmlAsync]);e=n._eventDispatches;r=e[t];r||(f=Microsoft.Office.WebExtension.EventType,r=new OSF.EventDispatch([f.DataNodeDeleted,f.DataNodeInserted,f.DataNodeReplaced]),e[t]=r);OSF.DDA.DispIdHost.addEventSupport(this,r)};OSF.DDA.CustomXmlPrefixMappings=function(n){var t=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[t.AddDataPartNamespaceAsync,t.GetDataPartNamespaceAsync,t.GetDataPartPrefixAsync],n)};OSF.DDA.CustomXmlNode=function(n,t,i,r){OSF.OUtil.defineEnumerableProperties(this,{baseName:{value:r},namespaceUri:{value:i},nodeType:{value:t}});var u=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[u.GetRelativeNodesAsync,u.GetNodeValueAsync,u.GetNodeXmlAsync,u.SetNodeValueAsync,u.SetNodeXmlAsync,u.GetNodeTextAsync,u.SetNodeTextAsync],n)};OSF.DDA.NodeInsertedEventArgs=function(n,t){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DataNodeInserted},newNode:{value:n},inUndoRedo:{value:t}})};OSF.DDA.NodeReplacedEventArgs=function(n,t,i){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DataNodeReplaced},oldNode:{value:n},newNode:{value:t},inUndoRedo:{value:i}})};OSF.DDA.NodeDeletedEventArgs=function(n,t,i){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DataNodeDeleted},oldNode:{value:n},oldNextSibling:{value:t},inUndoRedo:{value:i}})};OSF.DDA.OMFactory=OSF.DDA.OMFactory||{};OSF.DDA.OMFactory.manufactureDataNode=function(n){if(n)return new OSF.DDA.CustomXmlNode(n[OSF.DDA.DataNodeProperties.Handle],n[OSF.DDA.DataNodeProperties.NodeType],n[OSF.DDA.DataNodeProperties.NamespaceUri],n[OSF.DDA.DataNodeProperties.BaseName])};OSF.DDA.OMFactory.manufactureDataPart=function(n,t){return new OSF.DDA.CustomXmlPart(t,n[OSF.DDA.DataPartProperties.Id],n[OSF.DDA.DataPartProperties.BuiltIn])};OSF.DDA.AsyncMethodNames.addNames({AddDataPartAsync:"addAsync",GetDataPartByIdAsync:"getByIdAsync",GetDataPartsByNameSpaceAsync:"getByNamespaceAsync",DeleteDataPartAsync:"deleteAsync",GetPartNodesAsync:"getNodesAsync",GetPartXmlAsync:"getXmlAsync",AddDataPartNamespaceAsync:"addNamespaceAsync",GetDataPartNamespaceAsync:"getNamespaceAsync",GetDataPartPrefixAsync:"getPrefixAsync",GetRelativeNodesAsync:"getNodesAsync",GetNodeValueAsync:"getNodeValueAsync",GetNodeXmlAsync:"getXmlAsync",SetNodeValueAsync:"setNodeValueAsync",SetNodeXmlAsync:"setXmlAsync",GetNodeTextAsync:"getTextAsync",SetNodeTextAsync:"setTextAsync"}),function(){function r(n){return OSF.DDA.OMFactory.manufactureDataPart(n,Microsoft.Office.WebExtension.context.document.customXmlParts)}function e(n){return OSF.DDA.OMFactory.manufactureDataNode(n)}function i(n){var t=n[Microsoft.Office.WebExtension.Parameters.Data];return t==undefined?null:t}function u(n){return n.id}function f(n,t){return t}function t(n,t){return t}var n="string";OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddDataPartAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Xml,types:[n]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:r});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDataPartByIdAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:[n]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:r});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDataPartsByNameSpaceAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Namespace,types:[n]}],supportedOptions:[],privateStateCallbacks:[],onSucceeded:function(n){return OSF.OUtil.mapList(n[OSF.DDA.ListDescriptors.DataPartList],r)}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.DeleteDataPartAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataPartProperties.Id,value:u}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetPartNodesAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.XPath,types:[n]}],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataPartProperties.Id,value:u}],onSucceeded:function(n){return OSF.OUtil.mapList(n[OSF.DDA.ListDescriptors.DataNodeList],e)}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetPartXmlAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataPartProperties.Id,value:u}],onSucceeded:i});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AddDataPartNamespaceAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Prefix,types:[n]},{name:Microsoft.Office.WebExtension.Parameters.Namespace,types:[n]}],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataPartProperties.Id,value:f}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDataPartNamespaceAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Prefix,types:[n]}],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataPartProperties.Id,value:f}],onSucceeded:i});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetDataPartPrefixAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Namespace,types:[n]}],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataPartProperties.Id,value:f}],onSucceeded:i});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetRelativeNodesAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.XPath,types:[n]}],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataNodeProperties.Handle,value:t}],onSucceeded:function(n){return OSF.OUtil.mapList(n[OSF.DDA.ListDescriptors.DataNodeList],e)}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetNodeValueAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataNodeProperties.Handle,value:t}],onSucceeded:i});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetNodeXmlAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataNodeProperties.Handle,value:t}],onSucceeded:i});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetNodeValueAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:[n]}],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataNodeProperties.Handle,value:t}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetNodeXmlAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Xml,types:[n]}],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataNodeProperties.Handle,value:t}]});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.GetNodeTextAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataNodeProperties.Handle,value:t}],onSucceeded:i});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetNodeTextAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Text,types:[n]}],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.DataNodeProperties.Handle,value:t}]})}();OSF.OUtil.setNamespace("Marshaling",OSF.DDA);OSF.DDA.Marshaling.CustomXmlPartsKeys={Id:"id",Namespace:"namespace",Xml:"xml",XPath:"xpath",Prefix:"prefix"};OSF.DDA.Marshaling.DataPartProperties={Id:"id",BuiltIn:"DataPartBuiltIn"};OSF.DDA.Marshaling.PropertyDescriptors={DataPartProperties:"DataPartProperties",DataNodeProperties:"DataNodeProperties"};OSF.DDA.Marshaling.DataNodeProperties={Handle:"DataNodeHandle",BaseName:"DataNodeBaseName",NamespaceUri:"DataNodeNamespaceUri",NodeType:"DataNodeType"};OSF.DDA.Marshaling.ListDescriptors={DataPartList:"DataPartList",DataNodeList:"DataNodeList"};OSF.DDA.Marshaling.DataNodeEventProperties={OldNode:"OldNode",NewNode:"NewNode",NextSiblingNode:"NextSiblingNode",InUndoRedo:"InUndoRedo"};OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.DataPartProperties,fromHost:[{name:OSF.DDA.DataPartProperties.Id,value:OSF.DDA.Marshaling.DataPartProperties.Id},{name:OSF.DDA.DataPartProperties.BuiltIn,value:OSF.DDA.Marshaling.DataPartProperties.BuiltIn}],isComplexType:!0});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.DataNodeProperties,fromHost:[{name:OSF.DDA.DataNodeProperties.Handle,value:OSF.DDA.Marshaling.DataNodeProperties.Handle},{name:OSF.DDA.DataNodeProperties.BaseName,value:OSF.DDA.Marshaling.DataNodeProperties.BaseName},{name:OSF.DDA.DataNodeProperties.NamespaceUri,value:OSF.DDA.Marshaling.DataNodeProperties.NamespaceUri},{name:OSF.DDA.DataNodeProperties.NodeType,value:OSF.DDA.Marshaling.DataNodeProperties.NodeType}],isComplexType:!0});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DataNodeInsertedEvent,fromHost:[{name:OSF.DDA.DataNodeEventProperties.InUndoRedo,value:OSF.DDA.Marshaling.DataNodeEventProperties.InUndoRedo},{name:OSF.DDA.DataNodeEventProperties.NewNode,value:OSF.DDA.Marshaling.DataNodeEventProperties.NewNode}],isComplexType:!0});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DataNodeReplacedEvent,fromHost:[{name:OSF.DDA.DataNodeEventProperties.InUndoRedo,value:OSF.DDA.Marshaling.DataNodeEventProperties.InUndoRedo},{name:OSF.DDA.DataNodeEventProperties.OldNode,value:OSF.DDA.Marshaling.DataNodeEventProperties.OldNode},{name:OSF.DDA.DataNodeEventProperties.NewNode,value:OSF.DDA.Marshaling.DataNodeEventProperties.NewNode}],isComplexType:!0});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DataNodeDeletedEvent,fromHost:[{name:OSF.DDA.DataNodeEventProperties.InUndoRedo,value:OSF.DDA.Marshaling.DataNodeEventProperties.InUndoRedo},{name:OSF.DDA.DataNodeEventProperties.OldNode,value:OSF.DDA.Marshaling.DataNodeEventProperties.OldNode},{name:OSF.DDA.DataNodeEventProperties.NextSiblingNode,value:OSF.DDA.Marshaling.DataNodeEventProperties.NextSiblingNode}],isComplexType:!0});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.DataNodeEventProperties.OldNode,fromHost:[{name:OSF.DDA.PropertyDescriptors.DataNodeProperties,value:OSF.DDA.WAC.Delegate.ParameterMap.self}],isComplexType:!0});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.DataNodeEventProperties.NewNode,fromHost:[{name:OSF.DDA.PropertyDescriptors.DataNodeProperties,value:OSF.DDA.WAC.Delegate.ParameterMap.self}],isComplexType:!0});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.DataNodeEventProperties.NextSiblingNode,fromHost:[{name:OSF.DDA.PropertyDescriptors.DataNodeProperties,value:OSF.DDA.WAC.Delegate.ParameterMap.self}],isComplexType:!0});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddDataPartMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.DataPartProperties,value:OSF.DDA.Marshaling.PropertyDescriptors.DataPartProperties}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Xml,value:OSF.DDA.Marshaling.CustomXmlPartsKeys.Xml}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDataPartByIdMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.DataPartProperties,value:OSF.DDA.Marshaling.PropertyDescriptors.DataPartProperties}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.Marshaling.CustomXmlPartsKeys.Id}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDataPartsByNamespaceMethod,fromHost:[{name:OSF.DDA.ListDescriptors.DataPartList,value:OSF.DDA.Marshaling.ListDescriptors.DataPartList}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Namespace,value:OSF.DDA.Marshaling.CustomXmlPartsKeys.Namespace}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDataPartXmlMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.WAC.UniqueArguments.Data}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.Marshaling.CustomXmlPartsKeys.Id}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDataPartNodesMethod,fromHost:[{name:OSF.DDA.ListDescriptors.DataNodeList,value:OSF.DDA.Marshaling.ListDescriptors.DataNodeList}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.Marshaling.CustomXmlPartsKeys.Id},{name:Microsoft.Office.WebExtension.Parameters.XPath,value:OSF.DDA.Marshaling.CustomXmlPartsKeys.XPath}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidDeleteDataPartMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.Marshaling.CustomXmlPartsKeys.Id}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDataNodeValueMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.WAC.UniqueArguments.Data}],toHost:[{name:OSF.DDA.DataNodeProperties.Handle,value:OSF.DDA.Marshaling.DataNodeProperties.Handle}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDataNodeXmlMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.WAC.UniqueArguments.Data}],toHost:[{name:OSF.DDA.DataNodeProperties.Handle,value:OSF.DDA.Marshaling.DataNodeProperties.Handle}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDataNodeTextMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.WAC.UniqueArguments.Data}],toHost:[{name:OSF.DDA.DataNodeProperties.Handle,value:OSF.DDA.Marshaling.DataNodeProperties.Handle}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDataNodesMethod,fromHost:[{name:OSF.DDA.ListDescriptors.DataNodeList,value:OSF.DDA.Marshaling.ListDescriptors.DataNodeList}],toHost:[{name:OSF.DDA.DataNodeProperties.Handle,value:OSF.DDA.Marshaling.DataNodeProperties.Handle},{name:Microsoft.Office.WebExtension.Parameters.XPath,value:OSF.DDA.Marshaling.CustomXmlPartsKeys.XPath}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetDataNodeValueMethod,toHost:[{name:OSF.DDA.DataNodeProperties.Handle,value:OSF.DDA.Marshaling.DataNodeProperties.Handle},{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.WAC.UniqueArguments.Data}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetDataNodeXmlMethod,toHost:[{name:OSF.DDA.DataNodeProperties.Handle,value:OSF.DDA.Marshaling.DataNodeProperties.Handle},{name:Microsoft.Office.WebExtension.Parameters.Xml,value:OSF.DDA.Marshaling.CustomXmlPartsKeys.Xml}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetDataNodeTextMethod,toHost:[{name:OSF.DDA.DataNodeProperties.Handle,value:OSF.DDA.Marshaling.DataNodeProperties.Handle},{name:Microsoft.Office.WebExtension.Parameters.Text,value:OSF.DDA.Marshaling.CustomXmlPartsKeys.Text}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidAddDataNamespaceMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.Marshaling.DataPartProperties.Id},{name:Microsoft.Office.WebExtension.Parameters.Prefix,value:OSF.DDA.Marshaling.CustomXmlPartsKeys.Prefix},{name:Microsoft.Office.WebExtension.Parameters.Namespace,value:OSF.DDA.Marshaling.CustomXmlPartsKeys.Namespace}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDataUriByPrefixMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.WAC.UniqueArguments.Data}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.Marshaling.DataPartProperties.Id},{name:Microsoft.Office.WebExtension.Parameters.Prefix,value:OSF.DDA.Marshaling.CustomXmlPartsKeys.Prefix}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDataPrefixByUriMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.WAC.UniqueArguments.Data}],toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.Marshaling.DataPartProperties.Id},{name:Microsoft.Office.WebExtension.Parameters.Namespace,value:OSF.DDA.Marshaling.CustomXmlPartsKeys.Namespace}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDataNodeAddedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DataNodeInsertedEvent,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDataNodeReplacedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DataNodeReplacedEvent,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDataNodeDeletedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DataNodeDeletedEvent,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.AsyncMethodNames.addNames({GetSelectedDataAsync:"getSelectedDataAsync",SetSelectedDataAsync:"setSelectedDataAsync"}),function(){function r(n,t,i){var r=n[Microsoft.Office.WebExtension.Parameters.Data];return OSF.DDA.TableDataProperties&&r&&(r[OSF.DDA.TableDataProperties.TableRows]!=undefined||r[OSF.DDA.TableDataProperties.TableHeaders]!=undefined)&&(r=OSF.DDA.OMFactory.manufactureTableData(r)),r=OSF.DDA.DataCoercion.coerceData(r,i[Microsoft.Office.WebExtension.Parameters.CoercionType]),r==undefined?null:r}var i=!1,n="boolean",t="number";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:r});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SetSelectedDataAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["string","object",t,n]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:{"enum":Microsoft.Office.WebExtension.CoercionType,calculate:function(n){return OSF.DDA.DataCoercion.determineCoercionType(n[Microsoft.Office.WebExtension.Parameters.Data])}}},{name:Microsoft.Office.WebExtension.Parameters.ImageLeft,value:{types:[t,n],defaultValue:i}},{name:Microsoft.Office.WebExtension.Parameters.ImageTop,value:{types:[t,n],defaultValue:i}},{name:Microsoft.Office.WebExtension.Parameters.ImageWidth,value:{types:[t,n],defaultValue:i}},{name:Microsoft.Office.WebExtension.Parameters.ImageHeight,value:{types:[t,n],defaultValue:i}}],privateStateCallbacks:[]})}();OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.WAC.UniqueArguments.GetData,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:"BindingId"},{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:"CoerceType"},{name:Microsoft.Office.WebExtension.Parameters.ValueFormat,value:"ValueFormat"},{name:Microsoft.Office.WebExtension.Parameters.FilterType,value:"FilterType"},{name:Microsoft.Office.WebExtension.Parameters.Rows,value:"Rows"},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:"Columns"},{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:"StartRow"},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:"StartCol"},{name:Microsoft.Office.WebExtension.Parameters.RowCount,value:"RowCount"},{name:Microsoft.Office.WebExtension.Parameters.ColumnCount,value:"ColCount"}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.WAC.UniqueArguments.SetData,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:"BindingId"},{name:Microsoft.Office.WebExtension.Parameters.CoercionType,value:"CoerceType"},{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.WAC.UniqueArguments.Data},{name:Microsoft.Office.WebExtension.Parameters.Rows,value:"Rows"},{name:Microsoft.Office.WebExtension.Parameters.Columns,value:"Columns"},{name:Microsoft.Office.WebExtension.Parameters.StartRow,value:"StartRow"},{name:Microsoft.Office.WebExtension.Parameters.StartColumn,value:"StartCol"},{name:Microsoft.Office.WebExtension.Parameters.ImageLeft,value:"ImageLeft"},{name:Microsoft.Office.WebExtension.Parameters.ImageTop,value:"ImageTop"},{name:Microsoft.Office.WebExtension.Parameters.ImageWidth,value:"ImageWidth"},{name:Microsoft.Office.WebExtension.Parameters.ImageHeight,value:"ImageHeight"}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetSelectedDataMethod,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.WAC.UniqueArguments.Data}],toHost:[{name:OSF.DDA.WAC.UniqueArguments.GetData,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSetSelectedDataMethod,toHost:[{name:OSF.DDA.WAC.UniqueArguments.SetData,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.SettingsManager={SerializedSettings:"serializedSettings",RefreshingSettings:"refreshingSettings",DateJSONPrefix:"Date(",DataJSONSuffix:")",serializeSettings:function(n){var r={},i,t;for(i in n){t=n[i];try{t=JSON?JSON.stringify(t,function(n,t){return OSF.OUtil.isDate(this[n])?OSF.DDA.SettingsManager.DateJSONPrefix+this[n].getTime()+OSF.DDA.SettingsManager.DataJSONSuffix:t}):Sys.Serialization.JavaScriptSerializer.serialize(t);r[i]=t}catch(u){}}return r},deserializeSettings:function(n){var r={},i,t;n=n||{};for(i in n){t=n[i];try{t=JSON?JSON.parse(t,function(n,t){var i;return typeof t=="string"&&t&&t.length>6&&t.slice(0,5)===OSF.DDA.SettingsManager.DateJSONPrefix&&t.slice(-1)===OSF.DDA.SettingsManager.DataJSONSuffix&&(i=new Date(parseInt(t.slice(5,-1))),i)?i:t}):Sys.Serialization.JavaScriptSerializer.deserialize(t,!0);r[i]=t}catch(u){}}return r}};OSF.DDA.Settings=function(n){var t="name",i;n=n||{};i=function(n){var i=OSF.OUtil.getSessionStorage(),t,r;i&&(t=OSF.DDA.SettingsManager.serializeSettings(n),r=JSON?JSON.stringify(t):Sys.Serialization.JavaScriptSerializer.serialize(t),i.setItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey(),r))};OSF.OUtil.defineEnumerableProperties(this,{get:{value:function(i){var u=Function._validateParams(arguments,[{name:t,type:String,mayBeNull:!1}]),r;if(u)throw u;return r=n[i],typeof r=="undefined"?null:r}},set:{value:function(r,u){var f=Function._validateParams(arguments,[{name:t,type:String,mayBeNull:!1},{name:"value",mayBeNull:!0}]);if(f)throw f;n[r]=u;i(n)}},remove:{value:function(r){var u=Function._validateParams(arguments,[{name:t,type:String,mayBeNull:!1}]);if(u)throw u;delete n[r];i(n)}}});OSF.DDA.DispIdHost.addAsyncMethods(this,[OSF.DDA.AsyncMethodNames.SaveAsync],n)};OSF.DDA.RefreshableSettings=function(n){OSF.DDA.RefreshableSettings.uber.constructor.call(this,n);OSF.DDA.DispIdHost.addAsyncMethods(this,[OSF.DDA.AsyncMethodNames.RefreshAsync],n);OSF.DDA.DispIdHost.addEventSupport(this,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.SettingsChanged]))};OSF.OUtil.extend(OSF.DDA.RefreshableSettings,OSF.DDA.Settings);OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{SettingsChanged:"settingsChanged"});OSF.DDA.SettingsChangedEventArgs=function(n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.SettingsChanged},settings:{value:n}})};OSF.DDA.AsyncMethodNames.addNames({RefreshAsync:"refreshAsync",SaveAsync:"saveAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.RefreshAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[{name:OSF.DDA.SettingsManager.RefreshingSettings,value:function(n,t){return t}}],onSucceeded:function(n,t,i){var f=n[OSF.DDA.SettingsManager.SerializedSettings],u=OSF.DDA.SettingsManager.deserializeSettings(f),e=i[OSF.DDA.SettingsManager.RefreshingSettings];for(var r in e)t.remove(r);for(r in u)t.set(r,u[r]);return t}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.SaveAsync,requiredArguments:[],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale,value:{types:["boolean"],defaultValue:!0}}],privateStateCallbacks:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:function(n,t){return OSF.DDA.SettingsManager.serializeSettings(t)}}]});OSF.DDA.WAC.SettingsTranslator=function(){var n=0,t=1;return{read:function(i){var u={},f=i.Settings,e,r;for(e in f)r=f[e],u[r[n]]=r[t];return u},write:function(i){var f=[],u,r;for(u in i)r=[],r[n]=u,r[t]=i[u],f.push(r);return f}}}();OSF.DDA.WAC.Delegate.ParameterMap.setDynamicType(OSF.DDA.SettingsManager.SerializedSettings,{toHost:OSF.DDA.WAC.SettingsTranslator.write,fromHost:OSF.DDA.WAC.SettingsTranslator.read});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.WAC.UniqueArguments.SettingsRequest,toHost:[{name:Microsoft.Office.WebExtension.Parameters.OverwriteIfStale,value:"OverwriteIfStale"},{name:OSF.DDA.SettingsManager.SerializedSettings,value:OSF.DDA.WAC.UniqueArguments.Properties}],invertible:!0});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidLoadSettingsMethod,fromHost:[{name:OSF.DDA.SettingsManager.SerializedSettings,value:OSF.DDA.WAC.UniqueArguments.Properties}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSaveSettingsMethod,toHost:[{name:OSF.DDA.WAC.UniqueArguments.SettingsRequest,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidSettingsChangedEvent});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{DocumentSelectionChanged:"documentSelectionChanged"});OSF.DDA.DocumentSelectionChangedEventArgs=function(n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged},document:{value:n}})};OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDocumentSelectionChangedEvent});OSF.DDA.FilePropertiesDescriptor={Url:"Url"};OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{FilePropertiesDescriptor:"FilePropertiesDescriptor"});Microsoft.Office.WebExtension.FileProperties=function(n){OSF.OUtil.defineEnumerableProperties(this,{url:{value:n[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(n){return new Microsoft.Office.WebExtension.FileProperties(n)}});OSF.OUtil.setNamespace("Marshaling",OSF.DDA),function(n){var t="Properties";n[n[t]=0]=t;n[n.Url=1]="Url"}(OSF_DDA_Marshaling_FilePropertiesKeys||(OSF_DDA_Marshaling_FilePropertiesKeys={}));OSF.DDA.Marshaling.FilePropertiesKeys=OSF_DDA_Marshaling_FilePropertiesKeys;OSF.DDA.WAC.Delegate.ParameterMap.addComplexType(OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor);OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor,fromHost:[{name:OSF.DDA.FilePropertiesDescriptor.Url,value:OSF.DDA.Marshaling.FilePropertiesKeys.Url}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetFilePropertiesMethod,fromHost:[{name:OSF.DDA.PropertyDescriptors.FilePropertiesDescriptor,value:OSF.DDA.Marshaling.FilePropertiesKeys.Properties}]});Microsoft.Office.WebExtension.FileType={Text:"text",Compressed:"compressed",Pdf:"pdf"};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(n,t,i){var r,u;OSF.OUtil.defineEnumerableProperties(this,{size:{value:t},sliceCount:{value:Math.ceil(t/i)}});r={};r[OSF.DDA.FileProperties.Handle]=n;r[OSF.DDA.FileProperties.SliceSize]=i;u=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[u.GetDocumentCopyChunkAsync,u.ReleaseDocumentCopyAsync],r)};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:4194304}}],checkCallArgs:function(n){var t=n[Microsoft.Office.WebExtension.Parameters.SliceSize];if(t<=0||t>4194304)throw OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize;return n},onSucceeded:function(n,t,i){return new OSF.DDA.File(n[OSF.DDA.FileProperties.Handle],n[OSF.DDA.FileProperties.FileSize],i[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(n,t){return t[OSF.DDA.FileProperties.Handle]}},{name:OSF.DDA.FileProperties.SliceSize,value:function(n,t){return t[OSF.DDA.FileProperties.SliceSize]}}],checkCallArgs:function(n,t,i){var r=n[Microsoft.Office.WebExtension.Parameters.SliceIndex];if(r<0||r>=t.sliceCount)throw OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange;return n[OSF.DDA.FileSliceOffset]=parseInt((r*i[OSF.DDA.FileProperties.SliceSize]).toString()),n},onSucceeded:function(n,t,i){var r={};return OSF.OUtil.defineEnumerableProperties(r,{data:{value:n[Microsoft.Office.WebExtension.Parameters.Data]},index:{value:i[Microsoft.Office.WebExtension.Parameters.SliceIndex]},size:{value:n[OSF.DDA.FileProperties.SliceSize]}}),r}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.ReleaseDocumentCopyAsync,privateStateCallbacks:[{name:OSF.DDA.FileProperties.Handle,value:function(n,t){return t[OSF.DDA.FileProperties.Handle]}}]});OSF.OUtil.setNamespace("Marshaling",OSF.DDA);OSF.OUtil.setNamespace("File",OSF.DDA.Marshaling),function(n){var t="FileSize";n[n.Handle=0]="Handle";n[n[t]=1]=t}(OSF_DDA_Marshaling_File_FilePropertiesKeys||(OSF_DDA_Marshaling_File_FilePropertiesKeys={}));OSF.DDA.Marshaling.File.FilePropertiesKeys=OSF_DDA_Marshaling_File_FilePropertiesKeys,function(n){var t="SliceSize";n[n.Data=0]="Data";n[n[t]=1]=t}(OSF_DDA_Marshaling_File_SlicePropertiesKeys||(OSF_DDA_Marshaling_File_SlicePropertiesKeys={}));OSF.DDA.Marshaling.File.SlicePropertiesKeys=OSF_DDA_Marshaling_File_SlicePropertiesKeys,function(n){var t="Compressed";n[n.Text=0]="Text";n[n[t]=1]=t;n[n.Pdf=2]="Pdf"}(OSF_DDA_Marshaling_File_FileType||(OSF_DDA_Marshaling_File_FileType={}));OSF.DDA.Marshaling.File.FileType=OSF_DDA_Marshaling_File_FileType,function(n){var t="SliceIndex",i="SliceSize",r="FileType";n[n[r]=0]=r;n[n[i]=1]=i;n[n.Handle=2]="Handle";n[n[t]=3]=t}(OSF_DDA_Marshaling_File_ParameterKeys||(OSF_DDA_Marshaling_File_ParameterKeys={}));OSF.DDA.Marshaling.File.ParameterKeys=OSF_DDA_Marshaling_File_ParameterKeys;OSF.DDA.WAC.Delegate.ParameterMap.addComplexType(OSF.DDA.PropertyDescriptors.FileProperties);OSF.DDA.WAC.Delegate.ParameterMap.addComplexType(OSF.DDA.PropertyDescriptors.FileSliceProperties);OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.FileProperties,fromHost:[{name:OSF.DDA.FileProperties.Handle,value:OSF.DDA.Marshaling.File.FilePropertiesKeys.Handle},{name:OSF.DDA.FileProperties.FileSize,value:OSF.DDA.Marshaling.File.FilePropertiesKeys.FileSize}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.PropertyDescriptors.FileSliceProperties,fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.Marshaling.File.SlicePropertiesKeys.Data},{name:OSF.DDA.FileProperties.SliceSize,value:OSF.DDA.Marshaling.File.SlicePropertiesKeys.SliceSize}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:Microsoft.Office.WebExtension.Parameters.FileType,toHost:[{name:Microsoft.Office.WebExtension.FileType.Text,value:OSF.DDA.Marshaling.File.FileType.Text},{name:Microsoft.Office.WebExtension.FileType.Compressed,value:OSF.DDA.Marshaling.File.FileType.Compressed},{name:Microsoft.Office.WebExtension.FileType.Pdf,value:OSF.DDA.Marshaling.File.FileType.Pdf}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDocumentCopyMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.FileType,value:OSF.DDA.Marshaling.File.ParameterKeys.FileType},{name:Microsoft.Office.WebExtension.Parameters.SliceSize,value:OSF.DDA.Marshaling.File.ParameterKeys.SliceSize}],fromHost:[{name:OSF.DDA.PropertyDescriptors.FileProperties,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidGetDocumentCopyChunkMethod,toHost:[{name:OSF.DDA.FileProperties.Handle,value:OSF.DDA.Marshaling.File.ParameterKeys.Handle},{name:Microsoft.Office.WebExtension.Parameters.SliceIndex,value:OSF.DDA.Marshaling.File.ParameterKeys.SliceIndex}],fromHost:[{name:OSF.DDA.PropertyDescriptors.FileSliceProperties,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidReleaseDocumentCopyMethod,toHost:[{name:OSF.DDA.FileProperties.Handle,value:OSF.DDA.Marshaling.File.ParameterKeys.Handle}]});OSF.DDA.AsyncMethodNames.addNames({ExecuteRichApiRequestAsync:"executeRichApiRequestAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.ExecuteRichApiRequestAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Data,types:["object"]}],supportedOptions:[]});OSF.OUtil.setNamespace("RichApi",OSF.DDA);OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidExecuteRichApiRequestMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.WAC.UniqueArguments.ArrayData}],fromHost:[{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.WAC.UniqueArguments.Data}]}),function(n){var t;(function(t){var u=function(){function r(){var n=this,t=n;n._pseudoDocument=u;n._eventDispatch=u;n._processAppCommandInvocation=function(n){var i=t._verifyManifestCallback(n.callbackName),r;if(i.errorCode!=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess){t._invokeAppCommandCompletedMethod(n.appCommandId,i.errorCode,"");return}r=t._constructEventObjectForCallback(n);r?window.setTimeout(function(){i.callback(r)},0):t._invokeAppCommandCompletedMethod(n.appCommandId,OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError,"")}}var f="object",e="string",u=null;return r.initializeOsfDda=function(){OSF.DDA.AsyncMethodNames.addNames({AppCommandInvocationCompletedAsync:"appCommandInvocationCompletedAsync"});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.AppCommandInvocationCompletedAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Id,types:[e]},{name:Microsoft.Office.WebExtension.Parameters.Status,types:["number"]},{name:Microsoft.Office.WebExtension.Parameters.Data,types:[e]}]});OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{AppCommandInvokedEvent:"AppCommandInvokedEvent"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{AppCommandInvoked:"appCommandInvoked"});OSF.OUtil.setNamespace("AppCommand",OSF.DDA);OSF.DDA.AppCommand.AppCommandInvokedEventArgs=n.AppCommand.AppCommandInvokedEventArgs},r.prototype.initializeAndChangeOnce=function(n){var i=this,r;t.registerDdaFacade();i._pseudoDocument={};OSF.DDA.DispIdHost.addAsyncMethods(i._pseudoDocument,[OSF.DDA.AsyncMethodNames.AppCommandInvocationCompletedAsync]);i._eventDispatch=new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.AppCommandInvoked]);r=function(t){n&&(t.status=="succeeded"?n(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess):n(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError))};OSF.DDA.DispIdHost.addEventSupport(i._pseudoDocument,i._eventDispatch);i._pseudoDocument.addHandlerAsync(Microsoft.Office.WebExtension.EventType.AppCommandInvoked,i._processAppCommandInvocation,r)},r.prototype._verifyManifestCallback=function(n){var s="function",e={callback:u,errorCode:OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCallback},o;n=n.trim();try{for(var t=n.split("."),i=window,r=0;r<t.length-1;r++)if(i[t[r]]&&(typeof i[t[r]]==f||typeof i[t[r]]==s))i=i[t[r]];else return e;if(o=i[t[t.length-1]],typeof o!=s)return e}catch(h){return e}return{callback:o,errorCode:OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess}},r.prototype._invokeAppCommandCompletedMethod=function(n,t,i){this._pseudoDocument.appCommandInvocationCompletedAsync(n,t,i)},r.prototype._constructEventObjectForCallback=function(n){var f=this,t=new i,r;try{r=JSON.parse(n.eventObjStr);this._translateEventObjectInternal(r,t);Object.defineProperty(t,"completed",{value:function(i){t.completedContext=i;var r=JSON.stringify(t);f._invokeAppCommandCompletedMethod(n.appCommandId,OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess,r)},enumerable:!0})}catch(e){t=u}return t},r.prototype._translateEventObjectInternal=function(n,t){var i,r;for(i in n)n.hasOwnProperty(i)&&(r=n[i],typeof r==f&&r!=u?(OSF.OUtil.defineEnumerableProperty(t,i,{value:{}}),this._translateEventObjectInternal(r,t[i])):Object.defineProperty(t,i,{value:r,enumerable:!0,writable:!0}))},r.prototype._constructObjectByTemplate=function(n,t){var r={},i;if(!n||!t)return r;for(i in n)if(n.hasOwnProperty(i)&&(r[i]=u,t[i]!=u)){var o=n[i],s=t[i],h=typeof s;typeof o==f&&o!=u?r[i]=this._constructObjectByTemplate(o,s):(h=="number"||h==e||h=="boolean")&&(r[i]=s)}return r},r.instance=function(){return r._instance==u&&(r._instance=new r),r._instance},r._instance=u,r}(),r,i;t.AppCommandManager=u;r=function(){function n(n,t,i){var r=this;r.type=Microsoft.Office.WebExtension.EventType.AppCommandInvoked;r.appCommandId=n;r.callbackName=t;r.eventObjStr=i}return n.create=function(i){return new n(i[t.AppCommandInvokedEventEnums.AppCommandId],i[t.AppCommandInvokedEventEnums.CallbackName],i[t.AppCommandInvokedEventEnums.EventObjStr])},n}();t.AppCommandInvokedEventArgs=r;i=function(){function n(){}return n}();t.AppCommandCallbackEventArgs=i;t.AppCommandInvokedEventEnums={AppCommandId:"appCommandId",CallbackName:"callbackName",EventObjStr:"eventObjStr"}})(t=n.AppCommand||(n.AppCommand={}))}(OfficeExt||(OfficeExt={}));OfficeExt.AppCommand.AppCommandManager.initializeOsfDda();OSF.OUtil.setNamespace("Marshaling",OSF.DDA);OSF.OUtil.setNamespace("AppCommand",OSF.DDA.Marshaling),function(n){var t="EventObjStr",i="CallbackName",r="AppCommandId";n[n[r]=0]=r;n[n[i]=1]=i;n[n[t]=2]=t}(OSF_DDA_Marshaling_AppCommand_AppCommandInvokedEventKeys||(OSF_DDA_Marshaling_AppCommand_AppCommandInvokedEventKeys={}));OSF.DDA.Marshaling.AppCommand.AppCommandInvokedEventKeys=OSF_DDA_Marshaling_AppCommand_AppCommandInvokedEventKeys,function(n){n[n.Id=0]="Id";n[n.Status=1]="Status";n[n.Data=2]="Data"}(OSF_DDA_Marshaling_AppCommand_AppCommandCompletedMethodParameterKeys||(OSF_DDA_Marshaling_AppCommand_AppCommandCompletedMethodParameterKeys={}));OSF.DDA.Marshaling.AppCommand.AppCommandCompletedMethodParameterKeys=OSF_DDA_Marshaling_AppCommand_AppCommandCompletedMethodParameterKeys,function(n){var t;(function(t){function i(){if(OSF.DDA.WAC){var t=OSF.DDA.WAC.Delegate.ParameterMap;t.define({type:OSF.DDA.MethodDispId.dispidAppCommandInvocationCompletedMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.Id,value:OSF.DDA.Marshaling.AppCommand.AppCommandCompletedMethodParameterKeys.Id},{name:Microsoft.Office.WebExtension.Parameters.Status,value:OSF.DDA.Marshaling.AppCommand.AppCommandCompletedMethodParameterKeys.Status},{name:Microsoft.Office.WebExtension.Parameters.Data,value:OSF.DDA.Marshaling.AppCommand.AppCommandCompletedMethodParameterKeys.Data}]});t.define({type:OSF.DDA.EventDispId.dispidAppCommandInvokedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.AppCommandInvokedEvent,value:t.self}]});t.addComplexType(OSF.DDA.EventDescriptors.AppCommandInvokedEvent);t.define({type:OSF.DDA.EventDescriptors.AppCommandInvokedEvent,fromHost:[{name:n.AppCommand.AppCommandInvokedEventEnums.AppCommandId,value:OSF.DDA.Marshaling.AppCommand.AppCommandInvokedEventKeys.AppCommandId},{name:n.AppCommand.AppCommandInvokedEventEnums.CallbackName,value:OSF.DDA.Marshaling.AppCommand.AppCommandInvokedEventKeys.CallbackName},{name:n.AppCommand.AppCommandInvokedEventEnums.EventObjStr,value:OSF.DDA.Marshaling.AppCommand.AppCommandInvokedEventKeys.EventObjStr}]})}}t.registerDdaFacade=i})(t=n.AppCommand||(n.AppCommand={}))}(OfficeExt||(OfficeExt={}));OSF.DialogShownStatus={hasDialogShown:!1,isWindowDialog:!1};OSF.OUtil.augmentList(OSF.DDA.EventDescriptors,{DialogMessageReceivedEvent:"DialogMessageReceivedEvent"});OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{DialogMessageReceived:"dialogMessageReceived",DialogEventReceived:"dialogEventReceived"});OSF.OUtil.augmentList(OSF.DDA.PropertyDescriptors,{MessageType:"messageType",MessageContent:"messageContent"});OSF.DDA.DialogEventType={};OSF.OUtil.augmentList(OSF.DDA.DialogEventType,{DialogClosed:"dialogClosed",NavigationFailed:"naviationFailed"});OSF.DDA.AsyncMethodNames.addNames({DisplayDialogAsync:"displayDialogAsync",CloseAsync:"close"});OSF.DDA.SyncMethodNames.addNames({MessageParent:"messageParent",AddMessageHandler:"addEventHandler",SendMessage:"sendMessage"});OSF.DDA.UI.ParentUI=function(){var i=new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DialogMessageReceived,Microsoft.Office.WebExtension.EventType.DialogEventReceived,Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived]),t=OSF.DDA.AsyncMethodNames.DisplayDialogAsync.displayName,n=this;n[t]||OSF.OUtil.defineEnumerableProperty(n,t,{value:function(){var t=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.OpenDialog];t(arguments,i,n)}});OSF.OUtil.finalizeProperties(this)};OSF.DDA.UI.ChildUI=function(n){var i=OSF.DDA.SyncMethodNames.MessageParent.displayName,t=this,r;t[i]||OSF.OUtil.defineEnumerableProperty(t,i,{value:function(){var n=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.MessageParent];return n(arguments,t)}});r=OSF.DDA.SyncMethodNames.AddMessageHandler.displayName;t[r]||typeof OSF.DialogParentMessageEventDispatch=="undefined"||OSF.DDA.DispIdHost.addEventSupport(t,OSF.DialogParentMessageEventDispatch,n);OSF.OUtil.finalizeProperties(this)};OSF.DialogHandler=function(){};OSF.DDA.DialogEventArgs=function(n){n[OSF.DDA.PropertyDescriptors.MessageType]==OSF.DialogMessageType.DialogMessageReceived?OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogMessageReceived},message:{value:n[OSF.DDA.PropertyDescriptors.MessageContent]}}):OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogEventReceived},error:{value:n[OSF.DDA.PropertyDescriptors.MessageType]}})};OSF.DDA.DialogParentEventArgs=function(n){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived},message:{value:n[OSF.DDA.PropertyDescriptors.MessageContent]}})};OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.DisplayDialogAsync,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Url,types:["string"]}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Width,value:{types:["number"],defaultValue:99}},{name:Microsoft.Office.WebExtension.Parameters.Height,value:{types:["number"],defaultValue:99}},{name:Microsoft.Office.WebExtension.Parameters.RequireHTTPs,value:{types:["boolean"],defaultValue:!0}},{name:Microsoft.Office.WebExtension.Parameters.DisplayInIframe,value:{types:["boolean"],defaultValue:!1}}],privateStateCallbacks:[],onSucceeded:function(n){var f=n[Microsoft.Office.WebExtension.Parameters.Id],i=n[Microsoft.Office.WebExtension.Parameters.Data],t=new OSF.DialogHandler,e=OSF.DDA.AsyncMethodNames.CloseAsync.displayName,r,u;return OSF.OUtil.defineEnumerableProperty(t,e,{value:function(){var n=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.CloseDialog];n(arguments,f,i,t)}}),r=OSF.DDA.SyncMethodNames.AddMessageHandler.displayName,OSF.OUtil.defineEnumerableProperty(t,r,{value:function(){var r=OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.AddMessageHandler.id],n=r.verifyAndExtractCall(arguments,t,i),u=n[Microsoft.Office.WebExtension.Parameters.EventType],f=n[Microsoft.Office.WebExtension.Parameters.Handler];return i.addEventHandlerAndFireQueuedEvent(u,f)}}),u=OSF.DDA.SyncMethodNames.SendMessage.displayName,OSF.OUtil.defineEnumerableProperty(t,u,{value:function(){var n=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.SendMessage];return n(arguments,i,t)}}),t},checkCallArgs:function(n){return n[Microsoft.Office.WebExtension.Parameters.Width]<=0&&(n[Microsoft.Office.WebExtension.Parameters.Width]=1),n[Microsoft.Office.WebExtension.Parameters.Width]>100&&(n[Microsoft.Office.WebExtension.Parameters.Width]=99),n[Microsoft.Office.WebExtension.Parameters.Height]<=0&&(n[Microsoft.Office.WebExtension.Parameters.Height]=1),n[Microsoft.Office.WebExtension.Parameters.Height]>100&&(n[Microsoft.Office.WebExtension.Parameters.Height]=99),n[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]||(n[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]=!0),n}});OSF.DDA.AsyncMethodCalls.define({method:OSF.DDA.AsyncMethodNames.CloseAsync,requiredArguments:[],supportedOptions:[],privateStateCallbacks:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.MessageParent,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageToParent,types:["string","number","boolean"]}],supportedOptions:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.AddMessageHandler,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,"enum":Microsoft.Office.WebExtension.EventType,verify:function(n,t,i){return i.supportsEvent(n)}},{name:Microsoft.Office.WebExtension.Parameters.Handler,types:["function"]}],supportedOptions:[]});OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.SendMessage,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.MessageContent,types:["string"]}],supportedOptions:[],privateStateCallbacks:[]});OSF.OUtil.setNamespace("Marshaling",OSF.DDA);OSF.OUtil.setNamespace("Dialog",OSF.DDA.Marshaling);OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys={MessageType:"messageType",MessageContent:"messageContent"};OSF.DDA.Marshaling.Dialog.DialogParentMessageReceivedEventKeys={MessageType:"messageType",MessageContent:"messageContent"};OSF.DDA.Marshaling.MessageParentKeys={MessageToParent:"messageToParent"};OSF.DDA.Marshaling.DialogNotificationShownEventType={DialogNotificationShown:"dialogNotificationShown"};OSF.DDA.Marshaling.SendMessageKeys={MessageContent:"messageContent"},function(n){var t;(function(n){function r(n){switch(n){case t.Excel:case t.Word:case t.PowerPoint:case t.Outlook:return new i;default:return new i}return null}var t={Excel:"excel",Word:"word",PowerPoint:"powerpoint",Outlook:"outlook"},i;n.getDialogCssManager=r;i=function(){function n(){var r="height: 100px",t="font-size: 14px",i="font-family: Segoe UI,Arial,Verdana,sans-serif",u="margin: 20px 14px",f="width: 100%",e="position: absolute",n=this;n.overlayElementCSS=[e,"top: 0","left: 0",f,"height: 100%","background-color: rgba(198, 198, 198, 0.5)","z-index: 99998"];n.dialogNotificationPanelCSS=[f,"height: 190px",e,"z-index: 99999","background-color: rgba(255, 255, 255, 1)","left: 0px","top: 50%","margin-top: -95px"];n.newWindowNotificationTextPanelCSS=[u,i,t,r,"line-height: 100px"];n.newWindowNotificationTextSpanCSS=["display: inline-block","line-height: normal","vertical-align: middle"];n.crossZoneNotificationTextPanelCSS=[u,i,t,r];n.dialogNotificationButtonPanelCSS="margin:0px 9px";n.buttonStyleCSS=["text-align: center","width: 70px","height: 25px",t,i,"margin: 0px 5px","border-width: 1px","border-style: solid"]}var t=";";return n.prototype.getOverlayElementCSS=function(){return this.overlayElementCSS.join(t)},n.prototype.getDialogNotificationPanelCSS=function(){return this.dialogNotificationPanelCSS.join(t)},n.prototype.getNewWindowNotificationTextPanelCSS=function(){return this.newWindowNotificationTextPanelCSS.join(t)},n.prototype.getNewWindowNotificationTextSpanCSS=function(){return this.newWindowNotificationTextSpanCSS.join(t)},n.prototype.getCrossZoneNotificationTextPanelCSS=function(){return this.crossZoneNotificationTextPanelCSS.join(t)},n.prototype.getDialogNotificationButtonPanelCSS=function(){return this.dialogNotificationButtonPanelCSS},n.prototype.getDialogButtonCSS=function(){return this.buttonStyleCSS.join(t)},n}();n.DefaultDialogCSSManager=i})(t=n.WacCommonUICssManager||(n.WacCommonUICssManager={}))}(OfficeExt||(OfficeExt={})),function(n){var t;(function(t){var i;(function(t){function vt(n){var t=n.input;t!=i&&(v={HostButtonBorderColor:t[OSF.HostThemeButtonStyleKeys.ButtonBorderColor],HostButtonBackgroundColor:t[OSF.HostThemeButtonStyleKeys.ButtonBackgroundColor]});n.completed()}function yt(t){try{w=r;var c=r,p=OSF._OfficeAppFactory.getInitializationHelper()._hostInfo,s=n.WacCommonUICssManager.getDialogCssManager(p.hostType),b=OSF.OUtil.formatString(Strings.OfficeOM.L_ShowWindowDialogNotification,OSF._OfficeAppFactory.getInitializationHelper()._appContext._addinName);o=st(s);document.body.insertBefore(o,document.body.firstChild);f=ti(s,b);f.id=et;var l=ht(s),i=g(s,Strings.OfficeOM.L_ShowWindowDialogNotificationAllow),u=g(s,Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore);l.appendChild(i);l.appendChild(u);f.appendChild(l);document.body.insertBefore(f,document.body.firstChild);i.onclick=function(){ni(t);w||y()};function v(){function n(n){it();ct(n);e(OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore)}h.onComplete=n;OSF.DDA.WAC.Delegate.unregisterEventAsync(h)}u.onclick=v;i.addEventListener(a,function(n){n.shiftKey&&n.keyCode==9&&(tt(i),nt(u),u.focus(),n.preventDefault(),n.stopPropagation())},r);u.addEventListener(a,function(n){n.shiftKey||n.keyCode!=9?n.keyCode==13&&(c=!0,n.preventDefault(),n.stopPropagation()):(tt(u),nt(i),i.focus(),n.preventDefault(),n.stopPropagation())},r);u.addEventListener("keyup",function(n){n.keyCode==13&&c&&(c=r,v(),n.preventDefault(),n.stopPropagation())},r);window.focus();function k(){i.focus()}h.onComplete=k;OSF.DDA.WAC.Delegate.registerEventAsync(h)}catch(d){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Exception happens at new window dialog."+d);e(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError)}}function pt(n){var t,r;try{if(u!=i){if(t=OSF._OfficeAppFactory.getInitializationHelper()._appContext._appDomains,t)for(r=0;r<t.length&&t[r].indexOf("://")!==-1;r++)u.postMessage(rt,t[r]);u==i||u.closed||u.close();window.removeEventListener(l,d);window.clearInterval(b);u=i;n(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)}else n(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError)}catch(f){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Exception happens at close window dialog."+f);n(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError)}}function wt(n){var r=n.hostCallArgs[Microsoft.Office.WebExtension.Parameters.MessageToParent],i=OSF._OfficeAppFactory.getInitializationHelper()._appContext._appDomains,t;if(i)for(t=0;t<i.length&&i[t].indexOf("://")!==-1;t++)window.opener.postMessage(r,i[t])}function bt(n){var t,r,f;if(u!=i&&(t=n.hostCallArgs,r=OSF._OfficeAppFactory.getInitializationHelper()._appContext._appDomains,r))for(f=0;f<r.length&&r[f].indexOf("://")!==-1;f++)typeof t!=c&&(t=JSON.stringify(t)),u.postMessage(t,r[f])}function kt(){function n(n){var t,r,u;n.source==window.opener&&(typeof n.data===c&&n.data.indexOf(rt)>-1?window.close():(t=n.data,r=typeof t,t&&(r=="object"||r==c)&&(r==c&&(t=JSON.parse(t)),u=OSF.DDA.OMFactory.manufactureEventArgs(Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived,i,t),OSF.DialogParentMessageEventDispatch.fireEvent(u))))}window.addEventListener(l,n)}function dt(n,t){p=n;e=t}function gt(){try{f&&f.id==et&&e&&e(OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore)}catch(n){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Error happened during executing displayDialogAsync callback."+n)}y()}function ot(t,i){var s=r,e=n.WacCommonUICssManager.getDialogCssManager(i),h,u;o=st(e);document.body.insertBefore(o,document.body.firstChild);f=ii(e,t);f.id=at;h=ht(e);u=g(e,"OK");h.appendChild(u);f.appendChild(h);document.body.insertBefore(f,document.body.firstChild);w=!0;u.onclick=function(){y()};u.addEventListener(a,function(n){n.keyCode==9?(document.getElementById(k).focus(),n.preventDefault(),n.stopPropagation()):n.keyCode==13&&(s=!0,n.preventDefault(),n.stopPropagation())},r);u.addEventListener("keyup",function(n){n.keyCode==13&&s&&(s=r,y(),n.preventDefault(),n.stopPropagation())},r);document.getElementById(k).addEventListener(a,function(n){n.keyCode==9&&(u.focus(),n.preventDefault(),n.stopPropagation())},r);window.focus();u.focus()}function d(n){if(n.source==u)try{var t={};t[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageType]=OSF.DialogMessageType.DialogMessageReceived;t[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageContent]=n.data;p(t)}catch(i){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Error happened during receive message handler."+i)}}function ni(t){function g(){try{if(u==i||u.closed){window.clearInterval(b);window.removeEventListener(l,d);var n={};n[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageType]=OSF.DialogMessageType.DialogClosed;p(n)}}catch(t){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Error happened during check or handle window close."+t)}}var r=OSF._OfficeAppFactory.getInitializationHelper()._hostInfo,v=[r.hostType,r.hostPlatform,r.hostSpecificFileVersion,r.hostLocale,r.osfControlAppCorrelationId,"isDialog"],h=v.join("|"),f=OSF._OfficeAppFactory.getInitializationHelper()._appContext,o=t[OSF.ShowWindowDialogParameterKeys.Url],s;o=n.WACUtils.addHostInfoAsQueryParam(o,h);s=JSON.parse(window.name);s[OSF.WindowNameItemKeys.HostInfo]=h;s[OSF.WindowNameItemKeys.AppContext]=f;var c=t[OSF.ShowWindowDialogParameterKeys.Width]*f._clientWindowWidth/100,a=t[OSF.ShowWindowDialogParameterKeys.Height]*f._clientWindowHeight/100,y=f._clientWindowWidth/2-c/2,w=f._clientWindowHeight/2-a/2,k="width="+c+", height="+a+", left="+y+", top="+w+",channelmode=no,directories=no,fullscreen=no,location=no,menubar=no,resizable=yes,scrollbars=yes,status=no,titlebar=yes,toolbar=no";if(u=window.open(o,n.WACUtils.serializeObjectToString(s),k),u==i){OSF.AppTelemetry.logAppCommonMessage("Encountered cross zone issue in displayDialogAsync api.");it();ot(o,r.hostType);e(OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone);return}window.addEventListener(l,d);b=window.setInterval(g,1e3);e!=i?e(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess):OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("showDialogCallback can not be null.")}function g(n,t){var i=document.createElement("input"),r,u;return i.setAttribute("type","button"),i.style.cssText=n.getDialogButtonCSS(),i.style.borderColor=ut,i.style.backgroundColor=ft,i.setAttribute("value",t),r=function(){nt(i)},u=function(){tt(i)},i.addEventListener("mouseover",r),i.addEventListener("focus",r),i.addEventListener("mouseout",u),i.addEventListener("focusout",u),i}function nt(n){v!=i?(n.style.borderColor=v.HostButtonBorderColor,n.style.backgroundColor=v.HostButtonBackgroundColor):OSF.CommonUI&&OSF.CommonUI.HostButtonBorderColor&&OSF.CommonUI.HostButtonBackgroundColor?(n.style.borderColor=OSF.CommonUI.HostButtonBorderColor,n.style.backgroundColor=OSF.CommonUI.HostButtonBackgroundColor):n.style.backgroundColor=lt}function tt(n){n.style.borderColor=ut;n.style.backgroundColor=ft}function y(){function n(n){it();ct(n)}h.onComplete=n;OSF.DDA.WAC.Delegate.unregisterEventAsync(h)}function it(){f!=i&&(document.body.removeChild(f),f=i);o!=i&&(document.body.removeChild(o),o=i)}function st(n){var t=document.createElement(s);return t.style.cssText=n.getOverlayElementCSS(),t}function ti(n,t){var u=document.createElement(s),i,r;return u.style.cssText=n.getDialogNotificationPanelCSS(),i=document.createElement(s),i.style.cssText=n.getNewWindowNotificationTextPanelCSS(),document.documentElement.getAttribute("dir")=="rtl"?i.style.paddingRight="30px":i.style.paddingLeft="30px",r=document.createElement("span"),r.style.cssText=n.getNewWindowNotificationTextSpanCSS(),r.innerText=t,i.appendChild(r),u.appendChild(i),u}function ht(n){var t=document.createElement(s);return t.style.cssText=n.getDialogNotificationButtonPanelCSS(),t.style.cssFloat=document.documentElement.getAttribute("dir")=="rtl"?"left":"right",t}function ct(n){if(n!=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess){var t=document.querySelectorAll(OSF._OfficeAppFactory.getInitializationHelper()._tabbableElements);OSF.OUtil.focusToFirstTabbable(t,r)}}function ii(t,i){var f=document.createElement(s),u,r,e;return f.style.cssText=t.getDialogNotificationPanelCSS(),u=document.createElement(s),u.style.cssText=t.getCrossZoneNotificationTextPanelCSS(),r=document.createElement("a"),r.id=k,r.href="#",r.innerText=Strings.OfficeOM.L_NewWindowCrossZoneConfigureBrowserLink,r.setAttribute("onclick","window.open('https://support.microsoft.com/en-us/help/17479/windows-internet-explorer-11-change-security-privacy-settings', '_blank', 'fullscreen=1')"),e=document.createElement("span"),Strings.OfficeOM.L_NewWindowCrossZone&&(e.innerHTML=OSF.OUtil.formatString(Strings.OfficeOM.L_NewWindowCrossZone,r.outerHTML,n.WACUtils.getDomainForUrl(i))),u.appendChild(e),f.appendChild(u),f}var s="div",c="string",l="message",a="keydown",r=!1,i=null,u=i,p=i,o=i,f=i,rt="osfDialogInternal:action=closeDialog",e=i,w=r,b=-1,v=i,ut="#ababab",ft="#ffffff",lt="#ccc",et="newWindowNotificaiton",at="crossZoneNotification",k="configureBrowserLink",h={dispId:OSF.DDA.EventDispId.dispidDialogNotificationShownInAddinEvent,eventType:OSF.DDA.Marshaling.DialogNotificationShownEventType.DialogNotificationShown,onComplete:i};t.setHostThemeButtonStyle=vt;t.handleNewWindowDialog=yt;t.closeDialog=pt;t.messageParent=wt;t.sendMessage=bt;t.registerMessageReceivedEvent=kt;t.setHandlerAndShowDialogCallback=dt;t.escDismissDialogNotification=gt;t.showCrossZoneNotification=ot})(i=t.Dialog||(t.Dialog={}))})(t=n.AddinNativeAction||(n.AddinNativeAction={}))}(OfficeExt||(OfficeExt={}));OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.addComplexType(OSF.DDA.EventDescriptors.DialogMessageReceivedEvent);OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DialogMessageReceivedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.MessageType,value:OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageType},{name:OSF.DDA.PropertyDescriptors.MessageContent,value:OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageContent}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidDialogParentMessageReceivedEvent,fromHost:[{name:OSF.DDA.EventDescriptors.DialogParentMessageReceivedEvent,value:OSF.DDA.WAC.Delegate.ParameterMap.self}]});OSF.DDA.WAC.Delegate.ParameterMap.addComplexType(OSF.DDA.EventDescriptors.DialogParentMessageReceivedEvent);OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDescriptors.DialogParentMessageReceivedEvent,fromHost:[{name:OSF.DDA.PropertyDescriptors.MessageType,value:OSF.DDA.Marshaling.Dialog.DialogParentMessageReceivedEventKeys.MessageType},{name:OSF.DDA.PropertyDescriptors.MessageContent,value:OSF.DDA.Marshaling.Dialog.DialogParentMessageReceivedEventKeys.MessageContent}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidMessageParentMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.MessageToParent,value:OSF.DDA.Marshaling.MessageParentKeys.MessageToParent}]});OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSendMessageMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.MessageContent,value:OSF.DDA.Marshaling.SendMessageKeys.MessageContent}]});OSF.DDA.WAC.Delegate.openDialog=function(n){function t(n){var t={Error:n};e(Microsoft.Office.Common.InvokeResultCode.noError,t)}var u="https://",f="http://",r=JSON.parse(n.targetId),e=OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent(!0,n),i;if(OSF.DialogShownStatus.hasDialogShown){t(OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened);return}if(i=r[OSF.ShowWindowDialogParameterKeys.Url].toLowerCase(),i==null||!(i.substr(0,u.length)===u)){i.substr(0,f.length)===f?t(OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS):t(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme);return}r[OSF.ShowWindowDialogParameterKeys.DisplayInIframe]?(OSF.DialogShownStatus.isWindowDialog=!1,OSF.DDA.WAC.Delegate.registerEventAsync(n)):(OSF.DialogShownStatus.isWindowDialog=!0,OfficeExt.AddinNativeAction.Dialog.setHandlerAndShowDialogCallback(function(t){n.onEvent&&n.onEvent(t);OSF.AppTelemetry&&OSF.AppTelemetry.onEventDone(n.dispId)},t),OfficeExt.AddinNativeAction.Dialog.handleNewWindowDialog(r))};OSF.DDA.WAC.Delegate.messageParent=function(n){window.opener!=null?OfficeExt.AddinNativeAction.Dialog.messageParent(n):OSF.DDA.WAC.Delegate.executeAsync(n)};OSF.DDA.WAC.Delegate.sendMessage=function(n){OSF.DialogShownStatus.hasDialogShown&&(OSF.DialogShownStatus.isWindowDialog?OfficeExt.AddinNativeAction.Dialog.sendMessage(n):OSF.DDA.WAC.Delegate.executeAsync(n))};OSF.DDA.WAC.Delegate.closeDialog=function(n){function t(n){var t={Error:n};i(Microsoft.Office.Common.InvokeResultCode.noError,t)}var i=OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent(!1,n);OSF.DialogShownStatus.hasDialogShown?OSF.DialogShownStatus.isWindowDialog?(n.onCalling&&n.onCalling(),OfficeExt.AddinNativeAction.Dialog.closeDialog(t)):OSF.DDA.WAC.Delegate.unregisterEventAsync(n):t(OSF.DDA.ErrorCodeManager.errorCodes.ooeWebDialogClosed)};OSF.InitializationHelper.prototype.dismissDialogNotification=function(){OfficeExt.AddinNativeAction.Dialog.escDismissDialogNotification()};OSF.InitializationHelper.prototype.registerMessageReceivedEventForWindowDialog=function(){OfficeExt.AddinNativeAction.Dialog.registerMessageReceivedEvent()},function(n){var t=function(){function n(n,t){var i=this;OSF.DDA.OneNoteDocument.uber.constructor.call(i,n,t);OSF.DDA.DispIdHost.addAsyncMethods(i,[OSF.DDA.AsyncMethodNames.GetSelectedDataAsync,OSF.DDA.AsyncMethodNames.SetSelectedDataAsync,OSF.DDA.SyncMethodNames.MessageParent]);OSF.DDA.DispIdHost.addEventSupport(i,new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged,Microsoft.Office.WebExtension.EventType.DialogMessageReceived]));OSF.OUtil.finalizeProperties(i)}return n}();n.OneNoteDocument=t}(OSFOneNoteWAC||(OSFOneNoteWAC={}));OSF.DDA.OneNoteDocument=OSFOneNoteWAC.OneNoteDocument;OSF.OUtil.extend(OSF.DDA.OneNoteDocument,OSF.DDA.Document);OSF.OUtil.redefineList(Microsoft.Office.WebExtension.CoercionType,{Html:"html",Image:"image",Matrix:"matrix",Text:"text"});OSF.InitializationHelper.prototype.loadAppSpecificScriptAndCreateOM=function(n,t){OSF.DDA.ErrorCodeManager.initializeErrorMessages(Strings.OfficeOM);n.doc=new OSF.DDA.OneNoteDocument(n,this._initializeSettings(n,!0));OSF.DDA.DispIdHost.addAsyncMethods(OSF.DDA.RichApi,[OSF.DDA.AsyncMethodNames.ExecuteRichApiRequestAsync]);t()};OSF.InitializationHelper.prototype.prepareRightBeforeWebExtensionInitialize=function(n){var t,i,r;OSF.WebApp._UpdateLinksForHostAndXdmInfo();t=new OSF.DDA.License(n.get_eToken());this.initWebDialog(n);OSF._OfficeAppFactory.setContext(new OSF.DDA.Context(n,n.doc,t));OSF._OfficeAppFactory.setHostFacade(new OSF.DDA.DispIdHost.Facade(OSF.DDA.WAC.getDelegateMethods,OSF.DDA.WAC.Delegate.ParameterMap));i=n.get_reason();Microsoft.Office.WebExtension.initialize(i);r=OfficeExt.AppCommand.AppCommandManager.instance();r.initializeAndChangeOnce()},function(n){var t=function(){function n(n,t){this.m_actionInfo=n;this.m_isWriteOperation=t}return Object.defineProperty(n.prototype,"actionInfo",{get:function(){return this.m_actionInfo},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isWriteOperation",{get:function(){return this.m_isWriteOperation},enumerable:!0,configurable:!0}),n}();n.Action=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.createSetPropertyAction=function(t,i,r,u){var f;n.Utility.validateObjectPath(i);var e={Id:t._nextId(),ActionType:4,Name:r,ObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},s=[u],o=n.Utility.setMethodArguments(t,e.ArgumentInfo,s);return n.Utility.validateReferencedObjectPaths(o),f=new n.Action(e,!0),t._pendingRequest.addAction(f),t._pendingRequest.addReferencedObjectPath(i._objectPath),t._pendingRequest.addReferencedObjectPaths(o),f},t.createMethodAction=function(t,i,r,u,f){var e,o,h,s;return n.Utility.validateObjectPath(i),e={Id:t._nextId(),ActionType:3,Name:r,ObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},o=n.Utility.setMethodArguments(t,e.ArgumentInfo,f),n.Utility.validateReferencedObjectPaths(o),h=u!=1,s=new n.Action(e,h),t._pendingRequest.addAction(s),t._pendingRequest.addReferencedObjectPath(i._objectPath),t._pendingRequest.addReferencedObjectPaths(o),s},t.createQueryAction=function(t,i,r){var u,f;return n.Utility.validateObjectPath(i),u={Id:t._nextId(),ActionType:2,Name:"",ObjectPathId:i._objectPath.objectPathInfo.Id},u.QueryInfo=r,f=new n.Action(u,!1),t._pendingRequest.addAction(f),t._pendingRequest.addReferencedObjectPath(i._objectPath),f},t.createRecursiveQueryAction=function(t,i,r){n.Utility.validateObjectPath(i);var f={Id:t._nextId(),ActionType:6,Name:"",ObjectPathId:i._objectPath.objectPathInfo.Id,RecursiveQueryInfo:r},u=new n.Action(f,!1);return t._pendingRequest.addAction(u),t._pendingRequest.addReferencedObjectPath(i._objectPath),u},t.createInstantiateAction=function(t,i){n.Utility.validateObjectPath(i);var u={Id:t._nextId(),ActionType:1,Name:"",ObjectPathId:i._objectPath.objectPathInfo.Id},r=new n.Action(u,!1);return t._pendingRequest.addAction(r),t._pendingRequest.addReferencedObjectPath(i._objectPath),t._pendingRequest.addActionResultHandler(r,new n.InstantiateActionResultHandler(i)),r},t.createTraceAction=function(t,i,r){var u={Id:t._nextId(),ActionType:5,Name:"Trace",ObjectPathId:0},f=new n.Action(u,!1);return t._pendingRequest.addAction(f),r&&t._pendingRequest.addTrace(u.Id,i),f},t}();n.ActionFactory=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(t,i){n.Utility.checkArgumentNull(t,"context");this.m_context=t;this.m_objectPath=i;this.m_objectPath&&(t._processingResult||(n.ActionFactory.createInstantiateAction(t,this),t._autoCleanup&&this._KeepReference&&t.trackedObjects._autoAdd(this)))}return Object.defineProperty(t.prototype,"context",{get:function(){return this.m_context},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_objectPath",{get:function(){return this.m_objectPath},set:function(n){this.m_objectPath=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isNull",{get:function(){return n.Utility.throwIfNotLoaded("isNull",this._isNull,null,this._isNull),this._isNull},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isNullObject",{get:function(){return n.Utility.throwIfNotLoaded("isNullObject",this._isNull,null,this._isNull),this._isNull},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_isNull",{get:function(){return this.m_isNull},set:function(n){this.m_isNull=n;n&&this.m_objectPath&&this.m_objectPath._updateAsNullObject()},enumerable:!0,configurable:!0}),t.prototype._handleResult=function(t){this._isNull=n.Utility.isNullOrUndefined(t)},t.prototype._handleIdResult=function(t){this._isNull=n.Utility.isNullOrUndefined(t);n.Utility.fixObjectPathIfNecessary(this,t);t&&!n.Utility.isNullOrUndefined(t[n.Constants.referenceId])&&this._initReferenceId&&this._initReferenceId(t[n.Constants.referenceId])},t}();n.ClientObject=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n){this.m_context=n;this.m_actions=[];this.m_actionResultHandler={};this.m_referencedObjectPaths={};this.m_flags=0;this.m_traceInfos={};this.m_pendingProcessEventHandlers=[];this.m_pendingEventHandlerActions={};this.m_responseTraceIds={};this.m_responseTraceMessages=[]}return Object.defineProperty(t.prototype,"flags",{get:function(){return this.m_flags},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"traceInfos",{get:function(){return this.m_traceInfos},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_responseTraceMessages",{get:function(){return this.m_responseTraceMessages},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_responseTraceIds",{get:function(){return this.m_responseTraceIds},enumerable:!0,configurable:!0}),t.prototype._setResponseTraceIds=function(t){var i,r,u;if(t)for(i=0;i<t.length;i++)r=t[i],this.m_responseTraceIds[r]=r,u=this.m_traceInfos[r],n.Utility.isNullOrUndefined(u)||this.m_responseTraceMessages.push(u)},t.prototype.addAction=function(n){n.isWriteOperation&&(this.m_flags=this.m_flags|1);this.m_actions.push(n)},Object.defineProperty(t.prototype,"hasActions",{get:function(){return this.m_actions.length>0},enumerable:!0,configurable:!0}),t.prototype.addTrace=function(n,t){this.m_traceInfos[n]=t},t.prototype.addReferencedObjectPath=function(t){if(!this.m_referencedObjectPaths[t.objectPathInfo.Id])for(t.isValid||n.Utility.throwError(n.ResourceStrings.invalidObjectPath,n.Utility.getObjectPathExpression(t));t;)t.isWriteOperation&&(this.m_flags=this.m_flags|1),this.m_referencedObjectPaths[t.objectPathInfo.Id]=t,t.objectPathInfo.ObjectPathType==3&&this.addReferencedObjectPaths(t.argumentObjectPaths),t=t.parentObjectPath},t.prototype.addReferencedObjectPaths=function(n){if(n)for(var t=0;t<n.length;t++)this.addReferencedObjectPath(n[t])},t.prototype.addActionResultHandler=function(n,t){this.m_actionResultHandler[n.actionInfo.Id]=t},t.prototype.buildRequestMessageBody=function(){var r={},t,i,n;for(t in this.m_referencedObjectPaths)r[t]=this.m_referencedObjectPaths[t].objectPathInfo;for(i=[],n=0;n<this.m_actions.length;n++)i.push(this.m_actions[n].actionInfo);return{Actions:i,ObjectPaths:r}},t.prototype.processResponse=function(n){var t,i,r;if(n)for(t=0;t<n.length;t++)i=n[t],r=this.m_actionResultHandler[i.ActionId],r&&r._handleResult(i.Value)},t.prototype.invalidatePendingInvalidObjectPaths=function(){for(var n in this.m_referencedObjectPaths)this.m_referencedObjectPaths[n].isInvalidAfterRequest&&(this.m_referencedObjectPaths[n].isValid=!1)},t.prototype._addPendingEventHandlerAction=function(n,t){this.m_pendingEventHandlerActions[n._id]||(this.m_pendingEventHandlerActions[n._id]=[],this.m_pendingProcessEventHandlers.push(n));this.m_pendingEventHandlerActions[n._id].push(t)},Object.defineProperty(t.prototype,"_pendingProcessEventHandlers",{get:function(){return this.m_pendingProcessEventHandlers},enumerable:!0,configurable:!0}),t.prototype._getPendingEventHandlerActions=function(n){return this.m_pendingEventHandlerActions[n._id]},t}();n.ClientRequest=t}(OfficeExtension||(OfficeExtension={})),function(n){function r(n){t=n}var t,i;n._setRequestExecutorFactory=r;i=function(){function i(r){var u,e,f;if(this.m_requestHeaders={},this._onRunFinishedNotifiers=[],this.m_nextId=0,n.Utility.isNullOrUndefined(r)||typeof r=="string"&&r.length===0)if(u=i.defaultRequestUrlAndHeaders,u&&!n.Utility.isNullOrEmptyString(u.url)){if(this.m_url=u.url,u.headers)for(f in u.headers)this.m_requestHeaders[f]=u.headers[f]}else this.m_url=n.Constants.localDocument;else if(typeof r=="string")this.m_url=r;else{if(e=r,n.Utility.isNullOrEmptyString(e.url))throw n.Utility.createInvalidArgumentException("url");if(this.m_url=e.url,e.headers)for(f in e.headers)this.m_requestHeaders[f]=e.headers[f]}this._processingResult=!1;this._customData=n.Constants.iterativeExecutor;this._requestExecutor=t?t():n.Utility._isLocalDocumentUrl(this.m_url)?new n.OfficeJsRequestExecutor:new n.HttpRequestExecutor;this.sync=this.sync.bind(this)}return Object.defineProperty(i.prototype,"_url",{get:function(){return this.m_url},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"_pendingRequest",{get:function(){return this.m_pendingRequest==null&&(this.m_pendingRequest=new n.ClientRequest(this)),this.m_pendingRequest},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"trackedObjects",{get:function(){return this.m_trackedObjects||(this.m_trackedObjects=new n.TrackedObjects(this)),this.m_trackedObjects},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"requestHeaders",{get:function(){return this.m_requestHeaders},enumerable:!0,configurable:!0}),i.prototype.load=function(t,r){n.Utility.validateContext(this,t);var u=i.parseQueryOption(r),f=n.ActionFactory.createQueryAction(this,t,u);this._pendingRequest.addActionResultHandler(f,t)},i.parseQueryOption=function(t){var r={},u,i;return typeof t=="string"?(u=t,r.Select=n.Utility._parseSelectExpand(u)):Array.isArray(t)?r.Select=t:typeof t=="object"?(i=t,typeof i.select=="string"?r.Select=n.Utility._parseSelectExpand(i.select):Array.isArray(i.select)?r.Select=i.select:n.Utility.isNullOrUndefined(i.select)||n.Utility.throwError(n.ResourceStrings.invalidArgument,"option.select"),typeof i.expand=="string"?r.Expand=n.Utility._parseSelectExpand(i.expand):Array.isArray(i.expand)?r.Expand=i.expand:n.Utility.isNullOrUndefined(i.expand)||n.Utility.throwError(n.ResourceStrings.invalidArgument,"option.expand"),typeof i.top=="number"?r.Top=i.top:n.Utility.isNullOrUndefined(i.top)||n.Utility.throwError(n.ResourceStrings.invalidArgument,"option.top"),typeof i.skip=="number"?r.Skip=i.skip:n.Utility.isNullOrUndefined(i.skip)||n.Utility.throwError(n.ResourceStrings.invalidArgument,"option.skip")):n.Utility.isNullOrUndefined(t)||n.Utility.throwError(n.ResourceStrings.invalidArgument,"option"),r},i.prototype.loadRecursive=function(t,r,u){var f,e,o;if(!n.Utility.isPlainJsonObject(r))throw n.Utility.createInvalidArgumentException("options");f={};for(e in r)f[e]=i.parseQueryOption(r[e]);o=n.ActionFactory.createRecursiveQueryAction(this,t,{Queries:f,MaxDepth:u});this._pendingRequest.addActionResultHandler(o,t)},i.prototype.trace=function(t){n.ActionFactory.createTraceAction(this,t,!0)},i.prototype.syncPrivate=function(){var f=this,t=this._pendingRequest,e,r,i;if(this.m_pendingRequest=null,!t.hasActions)return this.processPendingEventHandlers(t);var o=t.buildRequestMessageBody(),s=t.flags,u=this._requestExecutor;return u||(u=new n.OfficeJsRequestExecutor),e={Url:this.m_url,Headers:this.m_requestHeaders,Body:o},t.invalidatePendingInvalidObjectPaths(),r=null,i=null,u.executeAsync(this._customData,s,e).then(function(u){return r=f.processRequestExecutorResponseMessage(t,u),f.processPendingEventHandlers(t).catch(function(t){n.Utility.log("Error in processPendingEventHandlers");n.Utility.log(JSON.stringify(t));i=t})}).then(function(){var u,f;if(r){n.Utility.log("Throw error from response: "+JSON.stringify(r));throw r;}if(i){n.Utility.log("Throw error from ProcessEventHandler: "+JSON.stringify(i));u=null;i instanceof n.Error?(u=i,u.traceMessages=t._responseTraceMessages):(f=null,f=typeof i=="string"?i:i.message,n.Utility.isNullOrEmptyString(f)&&(f=n.Utility._getResourceString(n.ResourceStrings.cannotRegisterEvent)),u=new n._Internal.RuntimeError(n.ErrorCodes.cannotRegisterEvent,f,t._responseTraceMessages,{}));throw u;}})},i.prototype.processRequestExecutorResponseMessage=function(t,i){var u,r;if(i.Body&&i.Body.TraceIds&&t._setResponseTraceIds(i.Body.TraceIds),u=t._responseTraceMessages,i.Body&&(r=null,i.Body.Results?r=i.Body.Results:i.Body.ProcessedResults&&i.Body.ProcessedResults.Results&&(r=i.Body.ProcessedResults.Results),r)){this._processingResult=!0;try{t.processResponse(r)}finally{this._processingResult=!1}}if(n.Utility.isNullOrEmptyString(i.ErrorCode)){if(i.Body&&i.Body.Error)return new n._Internal.RuntimeError(i.Body.Error.Code,i.Body.Error.Message,u,{errorLocation:i.Body.Error.Location})}else return new n._Internal.RuntimeError(i.ErrorCode,i.ErrorMessage,u,{});return null},i.prototype.processPendingEventHandlers=function(t){for(var u,i=n.Utility._createPromiseFromResult(null),r=0;r<t._pendingProcessEventHandlers.length;r++)u=t._pendingProcessEventHandlers[r],i=i.then(this.createProcessOneEventHandlersFunc(u,t));return i},i.prototype.createProcessOneEventHandlersFunc=function(n,t){return function(){return n._processRegistration(t)}},i.prototype.sync=function(n){return this.syncPrivate().then(function(){return n})},i._run=function(n,t,r,u,f,e){return r===void 0&&(r=3),u===void 0&&(u=5e3),i._runCommon("run",null,n,t,r,u,f,e)},i._runBatch=function(t,r,u,f,e,o,s){var a,v,y,h,c,l;if(f===void 0&&(f=3),e===void 0&&(e=5e3),y=null,h=0,r.length>0&&typeof r[0]=="object"&&r[0]!==null&&Object.getPrototypeOf(r[0])===Object.getPrototypeOf({})&&!n.Utility.isNullOrUndefined(r[0].url)&&(y=r[0],h=1),r.length==h+1)a=u,v=r[h+0];else if(r.length==h+2){if(r[h+0]instanceof n.ClientObject)a=function(){return r[h+0].context};else if(Array.isArray(r[h+0])){if(c=r[h+0],c.length==0)return i.createErrorPromise(t);for(l=0;l<c.length;l++){if(!(c[l]instanceof n.ClientObject))return i.createErrorPromise(t);if(c[l].context!=c[0].context)return i.createErrorPromise(t,n.ResourceStrings.invalidRequestContext)}a=function(){return c[0].context}}else return i.createErrorPromise(t);v=r[h+1]}else return i.createErrorPromise(t);return i._runCommon(t,y,a,v,f,e,o,s)},i.createErrorPromise=function(t,i){return i===void 0&&(i=n.ResourceStrings.invalidArgument),n.Promise.reject(n.Utility.createRuntimeError(i,n.Utility._getResourceString(i),t))},i._runCommon=function(t,r,u,f,e,o,s,h){var v=new n.Promise(function(n,t){n()}),c,a=!1,l;return v.then(function(){if(c=u(r),r&&!n.Utility.isNullOrEmptyString(r.url)&&r.url!==c.m_url)return i.createErrorPromise(t,n.ErrorCodes.invalidRequestContext);if(c._autoCleanup)return new n.Promise(function(n,t){c._onRunFinishedNotifiers.push(function(){c._autoCleanup=!0;n()})});else c._autoCleanup=!0}).then(function(){if(typeof f!="function")return i.createErrorPromise(t);var r=f(c);return(n.Utility.isNullOrUndefined(r)||typeof r.then!="function")&&n.Utility.throwError(n.ResourceStrings.runMustReturnPromise),r}).then(function(n){return c.sync(n)}).then(function(n){a=!0;l=n}).catch(function(n){l=n}).then(function(){function r(){t++;for(var n in i)c.trackedObjects.remove(i[n]);return c.sync().then(function(){s&&s(t)}).catch(function(){h&&h(t);t<e&&setTimeout(function(){r()},o)})}var i=c.trackedObjects._retrieveAndClearAutoCleanupList(),u,t;c._autoCleanup=!1;for(u in i)i[u]._objectPath.isValid=!1;if(t=0,n.Utility._synchronousCleanup)return r();else r()}).then(function(){if(c._onRunFinishedNotifiers&&c._onRunFinishedNotifiers.length>0){var n=c._onRunFinishedNotifiers.shift();n()}if(a)return l;else throw l;})},i.prototype._nextId=function(){return++this.m_nextId},i}();n.ClientRequestContext=i}(OfficeExtension||(OfficeExtension={})),function(n){(function(n){n[n.None=0]="None";n[n.WriteOperation=1]="WriteOperation"})(n.ClientRequestFlags||(n.ClientRequestFlags={}));var t=n.ClientRequestFlags}(OfficeExtension||(OfficeExtension={})),function(n){(function(n){n[n.none=0]="none";n[n.date=1]="date"})(n.ClientResultProcessingType||(n.ClientResultProcessingType={}));var i=n.ClientResultProcessingType,t=function(){function t(n){this.m_type=n}return Object.defineProperty(t.prototype,"value",{get:function(){return this.m_isLoaded||n.Utility.throwError(n.ResourceStrings.valueNotLoaded),this.m_value},enumerable:!0,configurable:!0}),t.prototype._handleResult=function(t){(this.m_isLoaded=!0,typeof t=="object"&&t&&t._IsNull)||(this.m_value=this.m_type===1?n.Utility.adjustToDateTime(t):t)},t}();n.ClientResult=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(){}return n.getItemAt="GetItemAt",n.id="Id",n.idPrivate="_Id",n.index="_Index",n.items="_Items",n.iterativeExecutor="IterativeExecutor",n.localDocument="http://document.localhost/",n.localDocumentApiPrefix="http://document.localhost/_api/",n.referenceId="_ReferenceId",n.isTracked="_IsTracked",n.sourceLibHeader="SdkVersion",n.requestInfoHeader="Office-RequestInfo",n}();n.Constants=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.prototype.executeAsync=function(i,r,u){var f=n.RichApiMessageUtility.buildMessageArrayForIRequestExecutor(i,r,u,t.SourceLibHeaderValue);return new n.Promise(function(i,r){var u=n.Embedded&&n.Embedded._getEndpoint();if(!u){i(n.RichApiMessageUtility.buildResponseOnError(n.Embedded.EmbeddedApiStatus.InternalError,""));return}u.invoke("executeMethod",function(t,r){n.Utility.log("Response:");n.Utility.log(JSON.stringify(r));var u;u=t==n.Embedded.EmbeddedApiStatus.Success?n.RichApiMessageUtility.buildResponseOnSuccess(n.RichApiMessageUtility.getResponseBodyFromSafeArray(r.Data),n.RichApiMessageUtility.getResponseHeadersFromSafeArray(r.Data)):n.RichApiMessageUtility.buildResponseOnError(r.error.Code,r.error.Message);i(u)},t._transformMessageArrayIntoParams(f))})},t._transformMessageArrayIntoParams=function(n){return{ArrayData:n,DdaMethod:{DispatchId:t.DispidExecuteRichApiRequestMethod}}},t.DispidExecuteRichApiRequestMethod=93,t.SourceLibHeaderValue="Embedded",t}();n.EmbedRequestExecutor=t}(OfficeExtension||(OfficeExtension={}));__extends=this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);r.prototype=t.prototype;n.prototype=new r},function(n){var t;(function(n){var t=function(n){function t(t,i,r,u){n.call(this,i);this.name="OfficeExtension.Error";this.code=t;this.message=i;this.traceMessages=r;this.debugInfo=u}return __extends(t,n),t.prototype.toString=function(){return this.code+": "+this.message},t}(Error);n.RuntimeError=t})(t=n._Internal||(n._Internal={}));n.Error=n._Internal.RuntimeError}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(){}return n.accessDenied="AccessDenied",n.generalException="GeneralException",n.activityLimitReached="ActivityLimitReached",n.invalidObjectPath="InvalidObjectPath",n.propertyNotLoaded="PropertyNotLoaded",n.valueNotLoaded="ValueNotLoaded",n.invalidRequestContext="InvalidRequestContext",n.invalidArgument="InvalidArgument",n.runMustReturnPromise="RunMustReturnPromise",n.cannotRegisterEvent="CannotRegisterEvent",n.apiNotFound="ApiNotFound",n.connectionFailure="ConnectionFailure",n}();n.ErrorCodes=t}(OfficeExtension||(OfficeExtension={})),function(n){var t;(function(n){(function(n){n[n.add=0]="add";n[n.remove=1]="remove";n[n.removeAll=2]="removeAll"})(n.EventHandlerActionType||(n.EventHandlerActionType={}));var t=n.EventHandlerActionType})(t=n._Internal||(n._Internal={}))}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n,t,i,r){var u=this;this.m_id=n._nextId();this.m_context=n;this.m_name=i;this.m_handlers=[];this.m_registered=!1;this.m_eventInfo=r;this.m_callback=function(n){u.m_eventInfo.eventArgsTransformFunc(n).then(function(n){return u.fireEvent(n)})}}return Object.defineProperty(t.prototype,"_registered",{get:function(){return this.m_registered},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_id",{get:function(){return this.m_id},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_handlers",{get:function(){return this.m_handlers},enumerable:!0,configurable:!0}),t.prototype.add=function(t){var i=n.ActionFactory.createTraceAction(this.m_context,null,!1);return this.m_context._pendingRequest._addPendingEventHandlerAction(this,{id:i.actionInfo.Id,handler:t,operation:0}),new n.EventHandlerResult(this.m_context,this,t)},t.prototype.remove=function(t){var i=n.ActionFactory.createTraceAction(this.m_context,null,!1);this.m_context._pendingRequest._addPendingEventHandlerAction(this,{id:i.actionInfo.Id,handler:t,operation:1})},t.prototype.removeAll=function(){var t=n.ActionFactory.createTraceAction(this.m_context,null,!1);this.m_context._pendingRequest._addPendingEventHandlerAction(this,{id:t.actionInfo.Id,handler:null,operation:2})},t.prototype._processRegistration=function(t){var f=this,u=n.Utility._createPromiseFromResult(null),e=t._getPendingEventHandlerActions(this),r,s,i,o;if(!e)return u;for(r=[],i=0;i<this.m_handlers.length;i++)r.push(this.m_handlers[i]);for(s=!1,i=0;i<e.length;i++)if(t._responseTraceIds[e[i].id]){s=!0;switch(e[i].operation){case 0:r.push(e[i].handler);break;case 1:for(o=r.length-1;o>=0;o--)if(r[o]===e[i].handler){r.splice(o,1);break}break;case 2:r=[];break}}return s&&(!this.m_registered&&r.length>0?u=u.then(function(){return f.m_eventInfo.registerFunc(f.m_callback)}).then(function(){return f.m_registered=!0}):this.m_registered&&r.length==0&&(u=u.then(function(){return f.m_eventInfo.unregisterFunc(f.m_callback)}).catch(function(t){n.Utility.log("Error when unregister event: "+JSON.stringify(t))}).then(function(){return f.m_registered=!1})),u=u.then(function(){return f.m_handlers=r})),u},t.prototype.fireEvent=function(t){for(var u,f,r=[],i=0;i<this.m_handlers.length;i++)u=this.m_handlers[i],f=n.Utility._createPromiseFromResult(null).then(this.createFireOneEventHandlerFunc(u,t)).catch(function(t){n.Utility.log("Error when invoke handler: "+JSON.stringify(t))}),r.push(f);n.Promise.all(r)},t.prototype.createFireOneEventHandlerFunc=function(n,t){return function(){return n(t)}},t}();n.EventHandlers=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(n,t,i){this.m_context=n;this.m_allHandlers=t;this.m_handler=i}return n.prototype.remove=function(){this.m_allHandlers&&this.m_handler&&(this.m_allHandlers.remove(this.m_handler),this.m_allHandlers=null,this.m_handler=null)},n}();n.EventHandlerResult=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.prototype.executeAsync=function(i,r,u){var s=JSON.stringify(u.Body),f,e,o;if(n.Utility.log("Request:"),n.Utility.log(s),f=u.Url,f.charAt(f.length-1)!="/"&&(f=f+"/"),f=f+"ProcessQuery",e={method:"POST",url:f,headers:{},body:s},e.headers[n.Constants.sourceLibHeader]=t.SourceLibHeaderValue,e.headers[n.Constants.requestInfoHeader]="flags="+r.toString(),e.headers["CONTENT-TYPE"]="application/json",u.Headers)for(o in u.Headers)e.headers[o]=u.Headers[o];return n.HttpUtility.sendRequest(e).then(function(t){var u,i,f,e,r;if(t.statusCode===200)u={ErrorCode:null,ErrorMessage:null,Headers:t.headers,Body:JSON.parse(t.body)};else{if(i=null,n.Utility.log("Error Response:"+t.body),!n.Utility.isNullOrEmptyString(t.body)){f=n.Utility.trim(t.body);try{i=JSON.parse(f)}catch(o){n.Utility.log("Error when parse "+f)}}!n.Utility.isNullOrUndefined(i)&&typeof i=="object"&&i.error?(r=i.error.code,e=n.Utility._getResourceString(n.ResourceStrings.connectionFailureWithDetails,[t.statusCode.toString(),i.error.code,i.error.message])):e=n.Utility._getResourceString(n.ResourceStrings.connectionFailureWithStatus,t.statusCode.toString());n.Utility.isNullOrEmptyString(r)&&(r=n.ErrorCodes.connectionFailure);u={ErrorCode:r,ErrorMessage:e,Headers:t.headers,Body:null}}return u})},t.SourceLibHeaderValue="officejs-rest",t}();n.HttpRequestExecutor=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.setCustomSendRequestFunc=function(n){t.s_customSendRequestFunc=n},t.xhrSendRequestFunc=function(t){return new n.Promise(function(i,r){var u=new XMLHttpRequest,f;if(u.open(t.method,t.url),u.onload=function(){var t={statusCode:u.status,headers:n.Utility._parseHttpResponseHeaders(u.getAllResponseHeaders()),body:u.responseText};i(t)},u.onerror=function(){r(n.Utility.createRuntimeError(n.ErrorCodes.connectionFailure,n.Utility._getResourceString(n.ResourceStrings.connectionFailureWithStatus,u.statusText),null))},t.headers)for(f in t.headers)u.setRequestHeader(f,t.headers[f]);u.send(t.body)})},t.sendRequest=function(n){t.validateAndNormalizeRequest(n);var i;return i=t.s_customSendRequestFunc||t.xhrSendRequestFunc,i(n)},t.setCustomSendLocalDocumentRequestFunc=function(n){t.s_customSendLocalDocumentRequestFunc=n},t.sendLocalDocumentRequest=function(n){t.validateAndNormalizeRequest(n);var i;return i=t.s_customSendLocalDocumentRequestFunc||t.officeJsSendLocalDocumentRequestFunc,i(n)},t.officeJsSendLocalDocumentRequestFunc=function(t){t=n.Utility._validateLocalDocumentRequest(t);var i=n.Utility._buildRequestMessageSafeArray(t);return new n.Promise(function(t,r){OSF.DDA.RichApi.executeRichApiRequestAsync(i,function(i){var r;r=i.status=="succeeded"?{statusCode:n.RichApiMessageUtility.getResponseStatusCode(i),headers:n.RichApiMessageUtility.getResponseHeaders(i),body:n.RichApiMessageUtility.getResponseBody(i)}:n.RichApiMessageUtility.buildHttpResponseFromOfficeJsError(i.error.code,i.error.message);n.Utility.log(JSON.stringify(r));t(r)})})},t.validateAndNormalizeRequest=function(t){if(n.Utility.isNullOrUndefined(t))throw n.Utility.createInvalidArgumentException("request");n.Utility.isNullOrEmptyString(t.method)&&(t.method="GET");t.method=t.method.toUpperCase()},t}();n.HttpUtility=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(n){this.m_clientObject=n}return n.prototype._handleResult=function(n){this.m_clientObject._handleIdResult(n)},n}();n.InstantiateActionResultHandler=t}(OfficeExtension||(OfficeExtension={})),function(n){}(OfficeExtension||(OfficeExtension={})),function(n){var t,i,r,u;(function(n){n[n.CustomData=0]="CustomData";n[n.Method=1]="Method";n[n.PathAndQuery=2]="PathAndQuery";n[n.Headers=3]="Headers";n[n.Body=4]="Body";n[n.AppPermission=5]="AppPermission";n[n.RequestFlags=6]="RequestFlags"})(n.RichApiRequestMessageIndex||(n.RichApiRequestMessageIndex={}));t=n.RichApiRequestMessageIndex,function(n){n[n.StatusCode=0]="StatusCode";n[n.Headers=1]="Headers";n[n.Body=2]="Body"}(n.RichApiResponseMessageIndex||(n.RichApiResponseMessageIndex={}));i=n.RichApiResponseMessageIndex,function(n){n[n.Instantiate=1]="Instantiate";n[n.Query=2]="Query";n[n.Method=3]="Method";n[n.SetProperty=4]="SetProperty";n[n.Trace=5]="Trace";n[n.RecursiveQuery=6]="RecursiveQuery"}(n.ActionType||(n.ActionType={}));r=n.ActionType,function(n){n[n.GlobalObject=1]="GlobalObject";n[n.NewObject=2]="NewObject";n[n.Method=3]="Method";n[n.Property=4]="Property";n[n.Indexer=5]="Indexer";n[n.ReferenceId=6]="ReferenceId";n[n.NullObject=7]="NullObject"}(n.ObjectPathType||(n.ObjectPathType={}));u=n.ObjectPathType}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n,t,i,r){this.m_objectPathInfo=n;this.m_parentObjectPath=t;this.m_isWriteOperation=!1;this.m_isCollection=i;this.m_isInvalidAfterRequest=r;this.m_isValid=!0}return Object.defineProperty(t.prototype,"objectPathInfo",{get:function(){return this.m_objectPathInfo},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isWriteOperation",{get:function(){return this.m_isWriteOperation},set:function(n){this.m_isWriteOperation=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isCollection",{get:function(){return this.m_isCollection},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isInvalidAfterRequest",{get:function(){return this.m_isInvalidAfterRequest},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parentObjectPath",{get:function(){return this.m_parentObjectPath},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"argumentObjectPaths",{get:function(){return this.m_argumentObjectPaths},set:function(n){this.m_argumentObjectPaths=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isValid",{get:function(){return this.m_isValid},set:function(n){this.m_isValid=n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"getByIdMethodName",{get:function(){return this.m_getByIdMethodName},set:function(n){this.m_getByIdMethodName=n},enumerable:!0,configurable:!0}),t.prototype._updateAsNullObject=function(){this.m_isInvalidAfterRequest=!1;this.m_isValid=!0;this.m_objectPathInfo.ObjectPathType=7;this.m_objectPathInfo.Name="";this.m_objectPathInfo.ArgumentInfo={};this.m_parentObjectPath=null;this.m_argumentObjectPaths=null},t.prototype.updateUsingObjectData=function(t){var f=t[n.Constants.referenceId],r,u,i;if(!n.Utility.isNullOrEmptyString(f)){this.m_isInvalidAfterRequest=!1;this.m_isValid=!0;this.m_objectPathInfo.ObjectPathType=6;this.m_objectPathInfo.Name=f;this.m_objectPathInfo.ArgumentInfo={};this.m_parentObjectPath=null;this.m_argumentObjectPaths=null;return}if(r=this.parentObjectPath&&this.parentObjectPath.isCollection,u=this.getByIdMethodName,(r||!n.Utility.isNullOrEmptyString(u))&&(i=t[n.Constants.id],n.Utility.isNullOrUndefined(i)&&(i=t[n.Constants.idPrivate]),!n.Utility.isNullOrUndefined(i))){this.m_isInvalidAfterRequest=!1;this.m_isValid=!0;r?(this.m_objectPathInfo.ObjectPathType=5,this.m_objectPathInfo.Name=""):(this.m_objectPathInfo.ObjectPathType=3,this.m_objectPathInfo.Name=u,this.m_getByIdMethodName=null);this.isWriteOperation=!1;this.m_objectPathInfo.ArgumentInfo={};this.m_objectPathInfo.ArgumentInfo.Arguments=[i];this.m_argumentObjectPaths=null;return}},t}();n.ObjectPath=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.createGlobalObjectObjectPath=function(t){var i={Id:t._nextId(),ObjectPathType:1,Name:""};return new n.ObjectPath(i,null,!1,!1)},t.createNewObjectObjectPath=function(t,i,r){var u={Id:t._nextId(),ObjectPathType:2,Name:i};return new n.ObjectPath(u,null,r,!1)},t.createPropertyObjectPath=function(t,i,r,u,f){var e={Id:t._nextId(),ObjectPathType:4,Name:r,ParentObjectPathId:i._objectPath.objectPathInfo.Id};return new n.ObjectPath(e,i._objectPath,u,f)},t.createIndexerObjectPath=function(t,i,r){var u={Id:t._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}};return u.ArgumentInfo.Arguments=r,new n.ObjectPath(u,i._objectPath,!1,!1)},t.createIndexerObjectPathUsingParentPath=function(t,i,r){var u={Id:t._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:i.objectPathInfo.Id,ArgumentInfo:{}};return u.ArgumentInfo.Arguments=r,new n.ObjectPath(u,i,!1,!1)},t.createMethodObjectPath=function(t,i,r,u,f,e,o,s){var c={Id:t._nextId(),ObjectPathType:3,Name:r,ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},l=n.Utility.setMethodArguments(t,c.ArgumentInfo,f),h=new n.ObjectPath(c,i._objectPath,e,o);return h.argumentObjectPaths=l,h.isWriteOperation=u!=1,h.getByIdMethodName=s,h},t.createChildItemObjectPathUsingIndexerOrGetItemAt=function(i,r,u,f,e){var o=f[n.Constants.id];return n.Utility.isNullOrUndefined(o)&&(o=f[n.Constants.idPrivate]),i&&!n.Utility.isNullOrUndefined(o)?t.createChildItemObjectPathUsingIndexer(r,u,f):t.createChildItemObjectPathUsingGetItemAt(r,u,f,e)},t.createChildItemObjectPathUsingIndexer=function(t,i,r){var f=r[n.Constants.id],u;return n.Utility.isNullOrUndefined(f)&&(f=r[n.Constants.idPrivate]),u=u={Id:t._nextId(),ObjectPathType:5,Name:"",ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},u.ArgumentInfo.Arguments=[f],new n.ObjectPath(u,i._objectPath,!1,!1)},t.createChildItemObjectPathUsingGetItemAt=function(t,i,r,u){var e=r[n.Constants.index],f;return e&&(u=e),f={Id:t._nextId(),ObjectPathType:3,Name:n.Constants.getItemAt,ParentObjectPathId:i._objectPath.objectPathInfo.Id,ArgumentInfo:{}},f.ArgumentInfo.Arguments=[u],new n.ObjectPath(f,i._objectPath,!1,!1)},t}();n.ObjectPathFactory=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.prototype.executeAsync=function(i,r,u){var f=n.RichApiMessageUtility.buildMessageArrayForIRequestExecutor(i,r,u,t.SourceLibHeaderValue);return new n.Promise(function(t,i){OSF.DDA.RichApi.executeRichApiRequestAsync(f,function(i){n.Utility.log("Response:");n.Utility.log(JSON.stringify(i));var r;r=i.status=="succeeded"?n.RichApiMessageUtility.buildResponseOnSuccess(n.RichApiMessageUtility.getResponseBody(i),n.RichApiMessageUtility.getResponseHeaders(i)):n.RichApiMessageUtility.buildResponseOnError(i.error.code,i.error.message);t(r)})})},t.SourceLibHeaderValue="officejs",t}();n.OfficeJsRequestExecutor=t}(OfficeExtension||(OfficeExtension={})),function(n){var t;(function(t){var i;(function(i){function r(){(function(){"use strict";function bt(n){return typeof n=="function"||typeof n=="object"&&n!==null}function k(n){return typeof n=="function"}function kt(n){return typeof n=="object"&&n!==null}function dt(n){d=n}function gt(n){e=n}function ii(){var t=process.nextTick,n=process.versions.node.match(/^(?:(\d+)\.)?(?:(\d+)\.)?(\*|\d+)$/);return Array.isArray(n)&&n[1]==="0"&&n[2]==="10"&&(t=setImmediate),function(){t(l)}}function ri(){return function(){it(l)}}function ui(){var n=0,i=new ft(l),t=document.createTextNode("");return i.observe(t,{characterData:!0}),function(){t.data=n=++n%2}}function fi(){var n=new MessageChannel;return n.port1.onmessage=l,function(){n.port2.postMessage(0)}}function et(){return function(){setTimeout(l,1)}}function l(){for(var t,i,n=0;n<c;n+=2)t=o[n],i=o[n+1],t(i),o[n]=undefined,o[n+1]=undefined;c=0}function ei(){try{var t=require,n=t("vertx");return it=n.runOnLoop||n.runOnContext,ri()}catch(i){return et()}}function a(){}function oi(){return new TypeError("You cannot resolve a promise with itself")}function si(){return new TypeError("A promises callback cannot return that same promise.")}function hi(n){try{return n.then}catch(t){return p.error=t,p}}function ci(n,t,i,r){try{n.call(t,i,r)}catch(u){return u}}function li(n,t,r){e(function(n){var f=!1,e=ci(r,t,function(i){f||(f=!0,t!==i?y(n,i):u(n,i))},function(t){f||(f=!0,i(n,t))},"Settle: "+(n._label||" unknown promise"));!f&&e&&(f=!0,i(n,e))},n)}function ai(n,t){t._state===v?u(n,t._result):t._state===h?i(n,t._result):w(t,undefined,function(t){y(n,t)},function(t){i(n,t)})}function vi(n,t){if(t.constructor===n.constructor)ai(n,t);else{var r=hi(t);r===p?i(n,p.error):r===undefined?u(n,t):k(r)?li(n,t,r):u(n,t)}}function y(n,t){n===t?i(n,oi()):bt(t)?vi(n,t):u(n,t)}function yi(n){n._onerror&&n._onerror(n._result);g(n)}function u(n,t){n._state===s&&(n._result=t,n._state=v,n._subscribers.length!==0&&e(g,n))}function i(n,t){n._state===s&&(n._state=h,n._result=t,e(yi,n))}function w(n,t,i,r){var u=n._subscribers,f=u.length;n._onerror=null;u[f]=t;u[f+v]=i;u[f+h]=r;f===0&&n._state&&e(g,n)}function g(n){var i=n._subscribers,e=n._state,r,u,f,t;if(i.length!==0){for(f=n._result,t=0;t<i.length;t+=3)r=i[t],u=i[t+e],r?ht(e,r,u,f):u(f);n._subscribers.length=0}}function st(){this.error=null}function pi(n,t){try{return n(t)}catch(i){return b.error=i,b}}function ht(n,t,r,f){var c=k(r),e,l,o,a;if(c){if(e=pi(r,f),e===b?(a=!0,l=e.error,e=null):o=!0,t===e){i(t,si());return}}else e=f,o=!0;t._state!==s||(c&&o?y(t,e):a?i(t,l):n===v?u(t,e):n===h&&i(t,e))}function wi(n,t){try{t(function(t){y(n,t)},function(t){i(n,t)})}catch(r){i(n,r)}}function f(n,t){var r=this;r._instanceConstructor=n;r.promise=new n(a);r._validateInput(t)?(r._input=t,r.length=t.length,r._remaining=t.length,r._init(),r.length===0?u(r.promise,r._result):(r.length=r.length||0,r._enumerate(),r._remaining===0&&u(r.promise,r._result))):i(r.promise,r._validationError())}function bi(n){return new ct(this,n).promise}function ki(n){function e(n){y(t,n)}function o(n){i(t,n)}var u=this,t=new u(a),f,r;if(!tt(n))return i(t,new TypeError("You must pass an array to race.")),t;for(f=n.length,r=0;t._state===s&&r<f;r++)w(u.resolve(n[r]),undefined,e,o);return t}function di(n){var i=this,t;return n&&typeof n=="object"&&n.constructor===i?n:(t=new i(a),y(t,n),t)}function gi(n){var r=this,t=new r(a);return i(t,n),t}function nr(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor");}function tr(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");}function r(n){this._id=pt++;this._state=undefined;this._result=undefined;this._subscribers=[];a!==n&&(k(n)||nr(),this instanceof r||tr(),wi(this,n))}var nt,o,ot,b,ct,lt,at,vt,yt,pt,wt;nt=Array.isArray?Array.isArray:function(n){return Object.prototype.toString.call(n)==="[object Array]"};var tt=nt,c=0,ir={}.toString,it,d,e=function(n,t){o[c]=n;o[c+1]=t;c+=2;c===2&&(d?d(l):ot())};var rt=typeof window!="undefined"?window:undefined,ut=rt||{},ft=ut.MutationObserver||ut.WebKitMutationObserver,ni=typeof process!="undefined"&&{}.toString.call(process)==="[object process]",ti=typeof Uint8ClampedArray!="undefined"&&typeof importScripts!="undefined"&&typeof MessageChannel!="undefined";o=new Array(1e3);ot=ni?ii():ft?ui():ti?fi():rt===undefined&&typeof require=="function"?ei():et();var s=void 0,v=1,h=2,p=new st;b=new st;f.prototype._validateInput=function(n){return tt(n)};f.prototype._validationError=function(){return new t.Error("Array Methods must be provided an Array")};f.prototype._init=function(){this._result=new Array(this.length)};ct=f;f.prototype._enumerate=function(){for(var n=this,i=n.length,r=n.promise,u=n._input,t=0;r._state===s&&t<i;t++)n._eachEntry(u[t],t)};f.prototype._eachEntry=function(n,t){var i=this,r=i._instanceConstructor;kt(n)?n.constructor===r&&n._state!==s?(n._onerror=null,i._settledAt(n._state,t,n._result)):i._willSettleAt(r.resolve(n),t):(i._remaining--,i._result[t]=n)};f.prototype._settledAt=function(n,t,r){var f=this,e=f.promise;e._state===s&&(f._remaining--,n===h?i(e,r):f._result[t]=r);f._remaining===0&&u(e,f._result)};f.prototype._willSettleAt=function(n,t){var i=this;w(n,undefined,function(n){i._settledAt(v,t,n)},function(n){i._settledAt(h,t,n)})};lt=bi;at=ki;vt=di;yt=gi;pt=0;wt=r;r.all=lt;r.race=at;r.resolve=vt;r.reject=yt;r._setScheduler=dt;r._setAsap=gt;r._asap=e;r.prototype={constructor:r,then:function(n,t){var u=this,i=u._state,r,f,o;return i===v&&!n||i===h&&!t?this:(r=new this.constructor(a),f=u._result,i?(o=arguments[i-1],e(function(){ht(i,r,o,f)})):w(u,r,n,t),r)},"catch":function(n){return this.then(null,n)}};n.Promise=wt}).call(this)}i.Init=r})(i=t.PromiseImpl||(t.PromiseImpl={}))})(t=n._Internal||(n._Internal={}));n.Promise||(typeof window!="undefined"&&window.Promise?IsEdgeLessThan14()?t.PromiseImpl.Init():n.Promise=window.Promise:t.PromiseImpl.Init())}(OfficeExtension||(OfficeExtension={})),function(n){(function(n){n[n.Default=0]="Default";n[n.Read=1]="Read"})(n.OperationType||(n.OperationType={}));var t=n.OperationType}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(n){this._autoCleanupList={};this.m_context=n}return t.prototype.add=function(n){var t=this;Array.isArray(n)?n.forEach(function(n){return t._addCommon(n,!0)}):this._addCommon(n,!0)},t.prototype._autoAdd=function(n){this._addCommon(n,!1);this._autoCleanupList[n._objectPath.objectPathInfo.Id]=n},t.prototype._addCommon=function(t,i){if(t[n.Constants.isTracked]){i&&this.m_context._autoCleanup&&delete this._autoCleanupList[t._objectPath.objectPathInfo.Id];return}var r=t[n.Constants.referenceId];n.Utility.isNullOrEmptyString(r)&&t._KeepReference&&(t._KeepReference(),n.ActionFactory.createInstantiateAction(this.m_context,t),i&&this.m_context._autoCleanup&&delete this._autoCleanupList[t._objectPath.objectPathInfo.Id],t[n.Constants.isTracked]=!0)},t.prototype.remove=function(n){var t=this;Array.isArray(n)?n.forEach(function(n){return t._removeCommon(n)}):this._removeCommon(n)},t.prototype._removeCommon=function(t){var r=t[n.Constants.referenceId],i;n.Utility.isNullOrEmptyString(r)||(i=this.m_context._rootObject,i._RemoveReference&&i._RemoveReference(r),delete t[n.Constants.isTracked])},t.prototype._retrieveAndClearAutoCleanupList=function(){var n=this._autoCleanupList;return this._autoCleanupList={},n},t}();n.TrackedObjects=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function n(){}return n.invalidObjectPath="InvalidObjectPath",n.propertyNotLoaded="PropertyNotLoaded",n.valueNotLoaded="ValueNotLoaded",n.invalidRequestContext="InvalidRequestContext",n.invalidArgument="InvalidArgument",n.runMustReturnPromise="RunMustReturnPromise",n.cannotRegisterEvent="CannotRegisterEvent",n.connectionFailureWithStatus="ConnectionFailureWithStatus",n.connectionFailureWithDetails="ConnectionFailureWithDetails",n}();n.ResourceStrings=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.buildMessageArrayForIRequestExecutor=function(i,r,u,f){var o=JSON.stringify(u.Body),e;return n.Utility.log("Request:"),n.Utility.log(o),e={},e[n.Constants.sourceLibHeader]=f,t.buildRequestMessageSafeArray(i,r,"POST","ProcessQuery",e,o)},t.buildResponseOnSuccess=function(n,t){var i={ErrorCode:"",ErrorMessage:"",Headers:null,Body:null};return i.Body=JSON.parse(n),i.Headers=t,i},t.buildResponseOnError=function(i,r){var u={ErrorCode:"",ErrorMessage:"",Headers:null,Body:null};return u.ErrorCode=n.ErrorCodes.generalException,i==t.OfficeJsErrorCode_ooeNoCapability?u.ErrorCode=n.ErrorCodes.accessDenied:i==t.OfficeJsErrorCode_ooeActivityLimitReached&&(u.ErrorCode=n.ErrorCodes.activityLimitReached),u.ErrorMessage=r,u},t.buildHttpResponseFromOfficeJsError=function(i,r){var f=500,u={};return u.error={},u.error.code=n.ErrorCodes.generalException,u.error.message=r,i===t.OfficeJsErrorCode_ooeNoCapability?(f=403,u.error.code=n.ErrorCodes.accessDenied):i===t.OfficeJsErrorCode_ooeActivityLimitReached&&(f=429,u.error.code=n.ErrorCodes.activityLimitReached),{statusCode:f,headers:{},body:JSON.stringify(u)}},t.buildRequestMessageSafeArray=function(n,t,i,r,u,f){var e=[],o;if(u)for(o in u)e.push(o),e.push(u[o]);var s=0,h="",c="",l="";return[n,i,r,e,f,s,t,h,c,l]},t.getResponseBody=function(n){return t.getResponseBodyFromSafeArray(n.value.data)},t.getResponseHeaders=function(n){return t.getResponseHeadersFromSafeArray(n.value.data)},t.getResponseBodyFromSafeArray=function(n){var t=n[2],i;return typeof t=="string"?t:(i=t,i.join(""))},t.getResponseHeadersFromSafeArray=function(n){var i=n[1],r,t;if(!i)return null;for(r={},t=0;t<i.length-1;t+=2)r[i[t]]=i[t+1];return r},t.getResponseStatusCode=function(n){return t.getResponseStatusCodeFromSafeArray(n.value.data)},t.getResponseStatusCodeFromSafeArray=function(n){return n[0]},t.OfficeJsErrorCode_ooeNoCapability=7e3,t.OfficeJsErrorCode_ooeActivityLimitReached=5102,t}();n.RichApiMessageUtility=t}(OfficeExtension||(OfficeExtension={})),function(n){var t=function(){function t(){}return t.checkArgumentNull=function(i,r){t.isNullOrUndefined(i)&&t.throwError(n.ResourceStrings.invalidArgument,r)},t.isNullOrUndefined=function(n){return n===null?!0:typeof n=="undefined"?!0:!1},t.isUndefined=function(n){return typeof n=="undefined"?!0:!1},t.isNullOrEmptyString=function(n){return n===null?!0:typeof n=="undefined"?!0:n.length==0?!0:!1},t.isPlainJsonObject=function(n){return t.isNullOrUndefined(n)?!1:typeof n!="object"?!1:Object.getPrototypeOf(n)===Object.getPrototypeOf({})},t.trim=function(n){return n.replace(new RegExp("^\\s+|\\s+$","g"),"")},t.caseInsensitiveCompareString=function(n,i){return t.isNullOrUndefined(n)?t.isNullOrUndefined(i):t.isNullOrUndefined(i)?!1:n.toUpperCase()==i.toUpperCase()},t.adjustToDateTime=function(i){var r,u;if(t.isNullOrUndefined(i))return null;if(typeof i=="string")return new Date(i);if(Array.isArray(i)){for(r=i,u=0;u<r.length;u++)r[u]=t.adjustToDateTime(r[u]);return r}throw t.createRuntimeError(n.ErrorCodes.invalidArgument,t._getResourceString(n.ResourceStrings.invalidArgument,"date"),null);},t.isReadonlyRestRequest=function(n){return t.caseInsensitiveCompareString(n,"GET")},t.setMethodArguments=function(n,i,r){if(t.isNullOrUndefined(r))return null;var u=[],f=[],e=t.collectObjectPathInfos(n,r,u,f);return(i.Arguments=r,e)?(i.ReferencedObjectPathIds=f,u):null},t.collectObjectPathInfos=function(i,r,u,f){for(var o,h,c,s=!1,e=0;e<r.length;e++)r[e]instanceof n.ClientObject?(o=r[e],t.validateContext(i,o),r[e]=o._objectPath.objectPathInfo.Id,f.push(o._objectPath.objectPathInfo.Id),u.push(o._objectPath),s=!0):Array.isArray(r[e])?(h=[],c=t.collectObjectPathInfos(i,r[e],u,h),c?(f.push(h),s=!0):f.push(0)):f.push(0);return s},t.fixObjectPathIfNecessary=function(n,t){n&&n._objectPath&&t&&n._objectPath.updateUsingObjectData(t)},t.validateObjectPath=function(i){for(var r=i._objectPath,u;r;)r.isValid||(u=t.getObjectPathExpression(r),t.throwError(n.ResourceStrings.invalidObjectPath,u)),r=r.parentObjectPath},t.validateReferencedObjectPaths=function(i){var u,r,f;if(i)for(u=0;u<i.length;u++)for(r=i[u];r;)r.isValid||(f=t.getObjectPathExpression(r),t.throwError(n.ResourceStrings.invalidObjectPath,f)),r=r.parentObjectPath},t.validateContext=function(i,r){r&&r.context!==i&&t.throwError(n.ResourceStrings.invalidRequestContext)},t.log=function(n){t._logEnabled&&typeof console!="undefined"&&console.log&&console.log(n)},t.load=function(n,t){n.context.load(n,t)},t._parseSelectExpand=function(n){function e(n){var t=n.toLowerCase(),i;return t==="items"||t==="items/"?"*":(i=6,t.substr(0,i)==="items/"&&(n=n.substr(i)),n.replace(new RegExp("/items/","gi"),"/"))}var f=[],u,r,i;if(!t.isNullOrEmptyString(n))for(u=n.split(","),r=0;r<u.length;r++)i=u[r],i=e(i.trim()),i.length>0&&f.push(i);return f},t.throwError=function(i,r,u){throw new n._Internal.RuntimeError(i,t._getResourceString(i,r),[],u?{errorLocation:u}:{});},t.createRuntimeError=function(t,i,r){return new n._Internal.RuntimeError(t,i,[],{errorLocation:r})},t.createInvalidArgumentException=function(i,r){return t.createRuntimeError(n.ErrorCodes.invalidArgument,t._getResourceString(n.ResourceStrings.invalidArgument,i),r)},t._getResourceString=function(n,i){var r=n,f,u,e;return typeof window!="undefined"&&window.Strings&&window.Strings.OfficeOM&&(f="L_"+n,u=window.Strings.OfficeOM[f],u&&(r=u)),t.isNullOrUndefined(i)||(Array.isArray(i)?(e=i,r=t._formatString(r,e)):r=r.replace("{0}",i)),r},t._formatString=function(i,r){return i.replace(/\{\d\}/g,function(i){var u=parseInt(i.substr(1,i.length-2));if(u<r.length)return r[u];else throw t.createRuntimeError(n.ErrorCodes.invalidArgument,t._getResourceString(n.ResourceStrings.invalidArgument,"format"),null);return""})},t.throwIfNotLoaded=function(i,r,u,f){!f&&t.isUndefined(r)&&i.charCodeAt(0)!=t.s_underscoreCharCode&&t.throwError(n.ResourceStrings.propertyNotLoaded,i,u?u+"."+i:null)},t.getObjectPathExpression=function(n){for(var i="";n;){switch(n.objectPathInfo.ObjectPathType){case 1:i=i;break;case 2:i="new()"+(i.length>0?".":"")+i;break;case 3:i=t.normalizeName(n.objectPathInfo.Name)+"()"+(i.length>0?".":"")+i;break;case 4:i=t.normalizeName(n.objectPathInfo.Name)+(i.length>0?".":"")+i;break;case 5:i="getItem()"+(i.length>0?".":"")+i;break;case 6:i="_reference()"+(i.length>0?".":"")+i;break}n=n.parentObjectPath}return i},t._createPromiseFromResult=function(t){return new n.Promise(function(n,i){n(t)})},t._createTimeoutPromise=function(t){return new n.Promise(function(n,i){setTimeout(function(){n(null)},t)})},t.promisify=function(t){return new n.Promise(function(n,i){var r=function(t){t.status=="failed"?i(t.error):n(t.value)};t(r)})},t._addActionResultHandler=function(n,t,i){n.context._pendingRequest.addActionResultHandler(t,i)},t._handleNavigationPropertyResults=function(n,i,r){for(var u=0;u<r.length-1;u+=2)t.isUndefined(i[r[u+1]])||n[r[u]]._handleResult(i[r[u+1]])},t.normalizeName=function(n){return n.substr(0,1).toLowerCase()+n.substr(1)},t._isLocalDocumentUrl=function(n){return t._getLocalDocumentUrlPrefixLength(n)>0},t._getLocalDocumentUrlPrefixLength=function(n){for(var i=["http://document.localhost","https://document.localhost","//document.localhost"],r=n.toLowerCase().trim(),t=0;t<i.length;t++)if(r===i[t])return i[t].length;else if(r.substr(0,i[t].length+1)===i[t]+"/")return i[t].length+1;return 0},t._validateLocalDocumentRequest=function(n){var u=t._getLocalDocumentUrlPrefixLength(n.url),i,r;if(u<=0)throw t.createInvalidArgumentException("request");return i=n.url.substr(u),r=i.toLowerCase(),r==="_api"?i="":r.substr(0,5)==="_api/"&&(i=i.substr(5)),{method:n.method,url:i,headers:n.headers,body:n.body}},t._buildRequestMessageSafeArray=function(i){var f=0,r,e,u,o,s;if(t.isReadonlyRestRequest(i.method)||(f=1),r="",i.headers&&(r=i.headers[n.Constants.requestInfoHeader],!t.isNullOrEmptyString(r)))for(e=r.split("&"),u=0;u<e.length;u++)if(o=e[u].split("="),o[0]=="flags"){s=parseInt(o[1]);f=s;break}return n.RichApiMessageUtility.buildRequestMessageSafeArray("",f,i.method,i.url,i.headers,i.body)},t._parseHttpResponseHeaders=function(n){var s={},h,o,r,i,u,f,e;if(!t.isNullOrEmptyString(n))for(h=new RegExp("\r?\n"),o=n.split(h),r=0;r<o.length;r++)i=o[r],i!=null&&(u=i.indexOf(":"),u>0&&(f=i.substr(0,u),e=i.substr(u+1),f=t.trim(f),e=t.trim(e),s[f.toUpperCase()]=e));return s},t._logEnabled=!1,t._synchronousCleanup=!1,t.s_underscoreCharCode="_".charCodeAt(0),t}();n.Utility=t}(OfficeExtension||(OfficeExtension={}));__extends=this&&this.__extends||function(n,t){function r(){this.constructor=n}for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);n.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)},function(n){var e=OfficeExtension.ObjectPathFactory.createPropertyObjectPath,f=OfficeExtension.ObjectPathFactory.createMethodObjectPath,c=OfficeExtension.ObjectPathFactory.createIndexerObjectPath,li=OfficeExtension.ObjectPathFactory.createNewObjectObjectPath,ai=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexer,vi=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingGetItemAt,l=OfficeExtension.ObjectPathFactory.createChildItemObjectPathUsingIndexerOrGetItemAt,u=OfficeExtension.ActionFactory.createMethodAction,a=OfficeExtension.ActionFactory.createSetPropertyAction,r=OfficeExtension.Utility.isNullOrUndefined,t=OfficeExtension.Utility.isUndefined,i=OfficeExtension.Utility.throwIfNotLoaded,o=OfficeExtension.Utility.load,s=OfficeExtension.Utility.fixObjectPathIfNecessary,v=OfficeExtension.Utility._addActionResultHandler,h=OfficeExtension.Utility._handleNavigationPropertyResults,yi=OfficeExtension.Utility.adjustToDateTime,ui=function(c){function l(){c.apply(this,arguments)}return __extends(l,c),Object.defineProperty(l.prototype,"notebooks",{get:function(){return this.m_notebooks||(this.m_notebooks=new n.NotebookCollection(this.context,e(this.context,this,"Notebooks",!0,!1))),this.m_notebooks},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"_fastHieararchyEnabled",{get:function(){return i("_fastHieararchyEnabled",this.m__fastHieararchyEnabled,"Application",this._isNull),this.m__fastHieararchyEnabled},enumerable:!0,configurable:!0}),l.prototype.getActiveNotebook=function(){return new n.Notebook(this.context,f(this.context,this,"GetActiveNotebook",OfficeExtension.OperationType.Read,[],!1,!1,null))},l.prototype.getActiveNotebookOrNull=function(){return new n.Notebook(this.context,f(this.context,this,"GetActiveNotebookOrNull",OfficeExtension.OperationType.Read,[],!1,!1,null))},l.prototype.getActiveOutline=function(){return new n.Outline(this.context,f(this.context,this,"GetActiveOutline",OfficeExtension.OperationType.Read,[],!1,!1,null))},l.prototype.getActiveOutlineOrNull=function(){return new n.Outline(this.context,f(this.context,this,"GetActiveOutlineOrNull",OfficeExtension.OperationType.Read,[],!1,!1,null))},l.prototype.getActivePage=function(){return new n.Page(this.context,f(this.context,this,"GetActivePage",OfficeExtension.OperationType.Read,[],!1,!1,null))},l.prototype.getActivePageOrNull=function(){return new n.Page(this.context,f(this.context,this,"GetActivePageOrNull",OfficeExtension.OperationType.Read,[],!1,!1,null))},l.prototype.getActiveParagraph=function(){return new n.Paragraph(this.context,f(this.context,this,"GetActiveParagraph",OfficeExtension.OperationType.Read,[],!1,!1,null))},l.prototype.getActiveParagraphOrNull=function(){return new n.Paragraph(this.context,f(this.context,this,"GetActiveParagraphOrNull",OfficeExtension.OperationType.Read,[],!1,!1,null))},l.prototype.getActiveSection=function(){return new n.Section(this.context,f(this.context,this,"GetActiveSection",OfficeExtension.OperationType.Read,[],!1,!1,null))},l.prototype.getActiveSectionOrNull=function(){return new n.Section(this.context,f(this.context,this,"GetActiveSectionOrNull",OfficeExtension.OperationType.Read,[],!1,!1,null))},l.prototype.navigateToPage=function(n){u(this.context,this,"NavigateToPage",OfficeExtension.OperationType.Read,[n])},l.prototype.navigateToPageWithClientUrl=function(t){return new n.Page(this.context,f(this.context,this,"NavigateToPageWithClientUrl",OfficeExtension.OperationType.Read,[t],!1,!1,null))},l.prototype._GetObjectByReferenceId=function(n){var i=u(this.context,this,"_GetObjectByReferenceId",OfficeExtension.OperationType.Read,[n]),t=new OfficeExtension.ClientResult;return v(this,i,t),t},l.prototype._GetObjectTypeNameByReferenceId=function(n){var i=u(this.context,this,"_GetObjectTypeNameByReferenceId",OfficeExtension.OperationType.Read,[n]),t=new OfficeExtension.ClientResult;return v(this,i,t),t},l.prototype._RemoveAllReferences=function(){u(this.context,this,"_RemoveAllReferences",OfficeExtension.OperationType.Read,[])},l.prototype._RemoveReference=function(n){u(this.context,this,"_RemoveReference",OfficeExtension.OperationType.Read,[n])},l.prototype._SendDataToLearningTools=function(n){var i=u(this.context,this,"_SendDataToLearningTools",OfficeExtension.OperationType.Default,[n]),t=new OfficeExtension.ClientResult;return v(this,i,t),t},l.prototype._handleResult=function(n){if(c.prototype._handleResult.call(this,n),!r(n)){var i=n;s(this,i);t(i._fastHieararchyEnabled)||(this.m__fastHieararchyEnabled=i._fastHieararchyEnabled);h(this,i,["notebooks","Notebooks"])}},l.prototype.load=function(n){return o(this,n),this},l.prototype.toJSON=function(){return{}},l}(OfficeExtension.ClientObject),y,p,w,b,k,d,g,nt,tt,it,rt,ut,ft,et,ot,st,ht,ct,lt,at,vt,yt,pt,wt,bt,kt,dt,gt,ni,ti,ii,ri,fi,ei,oi,si,hi,ci;n.Application=ui;y=function(f){function c(){f.apply(this,arguments)}return __extends(c,f),Object.defineProperty(c.prototype,"page",{get:function(){return this.m_page||(this.m_page=new n.Page(this.context,e(this.context,this,"Page",!1,!1))),this.m_page},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"paragraphs",{get:function(){return this.m_paragraphs||(this.m_paragraphs=new n.InkAnalysisParagraphCollection(this.context,e(this.context,this,"Paragraphs",!0,!1))),this.m_paragraphs},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"id",{get:function(){return i("id",this.m_id,"InkAnalysis",this._isNull),this.m_id},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.m__ReferenceId,"InkAnalysis",this._isNull),this.m__ReferenceId},enumerable:!0,configurable:!0}),c.prototype._KeepReference=function(){u(this.context,this,"_KeepReference",OfficeExtension.OperationType.Read,[])},c.prototype._handleResult=function(n){if(f.prototype._handleResult.call(this,n),!r(n)){var i=n;s(this,i);t(i.Id)||(this.m_id=i.Id);t(i._ReferenceId)||(this.m__ReferenceId=i._ReferenceId);h(this,i,["page","Page","paragraphs","Paragraphs"])}},c.prototype.load=function(n){return o(this,n),this},c.prototype._handleIdResult=function(n){(f.prototype._handleIdResult.call(this,n),r(n))||(t(n._ReferenceId)||(this.m__ReferenceId=n._ReferenceId),t(n.Id)||(this.m_id=n.Id))},c.prototype.track=function(){return this.context.trackedObjects.add(this),this},c.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},c.prototype.toJSON=function(){return{id:this.m_id}},c}(OfficeExtension.ClientObject);n.InkAnalysis=y;p=function(f){function c(){f.apply(this,arguments)}return __extends(c,f),Object.defineProperty(c.prototype,"inkAnalysis",{get:function(){return this.m_inkAnalysis||(this.m_inkAnalysis=new n.InkAnalysis(this.context,e(this.context,this,"InkAnalysis",!1,!1))),this.m_inkAnalysis},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"lines",{get:function(){return this.m_lines||(this.m_lines=new n.InkAnalysisLineCollection(this.context,e(this.context,this,"Lines",!0,!1))),this.m_lines},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"id",{get:function(){return i("id",this.m_id,"InkAnalysisParagraph",this._isNull),this.m_id},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.m__ReferenceId,"InkAnalysisParagraph",this._isNull),this.m__ReferenceId},enumerable:!0,configurable:!0}),c.prototype._KeepReference=function(){u(this.context,this,"_KeepReference",OfficeExtension.OperationType.Read,[])},c.prototype._handleResult=function(n){if(f.prototype._handleResult.call(this,n),!r(n)){var i=n;s(this,i);t(i.Id)||(this.m_id=i.Id);t(i._ReferenceId)||(this.m__ReferenceId=i._ReferenceId);h(this,i,["inkAnalysis","InkAnalysis","lines","Lines"])}},c.prototype.load=function(n){return o(this,n),this},c.prototype._handleIdResult=function(n){(f.prototype._handleIdResult.call(this,n),r(n))||(t(n._ReferenceId)||(this.m__ReferenceId=n._ReferenceId),t(n.Id)||(this.m_id=n.Id))},c.prototype.track=function(){return this.context.trackedObjects.add(this),this},c.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},c.prototype.toJSON=function(){return{id:this.m_id}},c}(OfficeExtension.ClientObject);n.InkAnalysisParagraph=p;w=function(e){function h(){e.apply(this,arguments)}return __extends(h,e),Object.defineProperty(h.prototype,"items",{get:function(){return i("items",this.m__items,"InkAnalysisParagraphCollection",this._isNull),this.m__items},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"count",{get:function(){return i("count",this.m_count,"InkAnalysisParagraphCollection",this._isNull),this.m_count},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.m__ReferenceId,"InkAnalysisParagraphCollection",this._isNull),this.m__ReferenceId},enumerable:!0,configurable:!0}),h.prototype.getItem=function(t){return new n.InkAnalysisParagraph(this.context,c(this.context,this,[t]))},h.prototype.getItemAt=function(t){return new n.InkAnalysisParagraph(this.context,f(this.context,this,"GetItemAt",OfficeExtension.OperationType.Read,[t],!1,!1,null))},h.prototype._KeepReference=function(){u(this.context,this,"_KeepReference",OfficeExtension.OperationType.Read,[])},h.prototype._handleResult=function(i){var u,o,f,h;if((e.prototype._handleResult.call(this,i),!r(i))&&(u=i,s(this,u),t(u.Count)||(this.m_count=u.Count),t(u._ReferenceId)||(this.m__ReferenceId=u._ReferenceId),!r(u[OfficeExtension.Constants.items])))for(this.m__items=[],o=u[OfficeExtension.Constants.items],f=0;f<o.length;f++)h=new n.InkAnalysisParagraph(this.context,l(!0,this.context,this,o[f],f)),h._handleResult(o[f]),this.m__items.push(h)},h.prototype.load=function(n){return o(this,n),this},h.prototype._handleIdResult=function(n){(e.prototype._handleIdResult.call(this,n),r(n))||t(n._ReferenceId)||(this.m__ReferenceId=n._ReferenceId)},h.prototype.track=function(){return this.context.trackedObjects.add(this),this},h.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},h.prototype.toJSON=function(){return{count:this.m_count}},h}(OfficeExtension.ClientObject);n.InkAnalysisParagraphCollection=w;b=function(f){function c(){f.apply(this,arguments)}return __extends(c,f),Object.defineProperty(c.prototype,"paragraph",{get:function(){return this.m_paragraph||(this.m_paragraph=new n.InkAnalysisParagraph(this.context,e(this.context,this,"Paragraph",!1,!1))),this.m_paragraph},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"words",{get:function(){return this.m_words||(this.m_words=new n.InkAnalysisWordCollection(this.context,e(this.context,this,"Words",!0,!1))),this.m_words},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"id",{get:function(){return i("id",this.m_id,"InkAnalysisLine",this._isNull),this.m_id},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.m__ReferenceId,"InkAnalysisLine",this._isNull),this.m__ReferenceId},enumerable:!0,configurable:!0}),c.prototype._KeepReference=function(){u(this.context,this,"_KeepReference",OfficeExtension.OperationType.Read,[])},c.prototype._handleResult=function(n){if(f.prototype._handleResult.call(this,n),!r(n)){var i=n;s(this,i);t(i.Id)||(this.m_id=i.Id);t(i._ReferenceId)||(this.m__ReferenceId=i._ReferenceId);h(this,i,["paragraph","Paragraph","words","Words"])}},c.prototype.load=function(n){return o(this,n),this},c.prototype._handleIdResult=function(n){(f.prototype._handleIdResult.call(this,n),r(n))||(t(n._ReferenceId)||(this.m__ReferenceId=n._ReferenceId),t(n.Id)||(this.m_id=n.Id))},c.prototype.track=function(){return this.context.trackedObjects.add(this),this},c.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},c.prototype.toJSON=function(){return{id:this.m_id}},c}(OfficeExtension.ClientObject);n.InkAnalysisLine=b;k=function(e){function h(){e.apply(this,arguments)}return __extends(h,e),Object.defineProperty(h.prototype,"items",{get:function(){return i("items",this.m__items,"InkAnalysisLineCollection",this._isNull),this.m__items},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"count",{get:function(){return i("count",this.m_count,"InkAnalysisLineCollection",this._isNull),this.m_count},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.m__ReferenceId,"InkAnalysisLineCollection",this._isNull),this.m__ReferenceId},enumerable:!0,configurable:!0}),h.prototype.getItem=function(t){return new n.InkAnalysisLine(this.context,c(this.context,this,[t]))},h.prototype.getItemAt=function(t){return new n.InkAnalysisLine(this.context,f(this.context,this,"GetItemAt",OfficeExtension.OperationType.Read,[t],!1,!1,null))},h.prototype._KeepReference=function(){u(this.context,this,"_KeepReference",OfficeExtension.OperationType.Read,[])},h.prototype._handleResult=function(i){var u,o,f,h;if((e.prototype._handleResult.call(this,i),!r(i))&&(u=i,s(this,u),t(u.Count)||(this.m_count=u.Count),t(u._ReferenceId)||(this.m__ReferenceId=u._ReferenceId),!r(u[OfficeExtension.Constants.items])))for(this.m__items=[],o=u[OfficeExtension.Constants.items],f=0;f<o.length;f++)h=new n.InkAnalysisLine(this.context,l(!0,this.context,this,o[f],f)),h._handleResult(o[f]),this.m__items.push(h)},h.prototype.load=function(n){return o(this,n),this},h.prototype._handleIdResult=function(n){(e.prototype._handleIdResult.call(this,n),r(n))||t(n._ReferenceId)||(this.m__ReferenceId=n._ReferenceId)},h.prototype.track=function(){return this.context.trackedObjects.add(this),this},h.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},h.prototype.toJSON=function(){return{count:this.m_count}},h}(OfficeExtension.ClientObject);n.InkAnalysisLineCollection=k;d=function(f){function c(){f.apply(this,arguments)}return __extends(c,f),Object.defineProperty(c.prototype,"line",{get:function(){return this.m_line||(this.m_line=new n.InkAnalysisLine(this.context,e(this.context,this,"Line",!1,!1))),this.m_line},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"id",{get:function(){return i("id",this.m_id,"InkAnalysisWord",this._isNull),this.m_id},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"languageId",{get:function(){return i("languageId",this.m_languageId,"InkAnalysisWord",this._isNull),this.m_languageId},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"strokePointers",{get:function(){return i("strokePointers",this.m_strokePointers,"InkAnalysisWord",this._isNull),this.m_strokePointers},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"wordAlternates",{get:function(){return i("wordAlternates",this.m_wordAlternates,"InkAnalysisWord",this._isNull),this.m_wordAlternates},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.m__ReferenceId,"InkAnalysisWord",this._isNull),this.m__ReferenceId},enumerable:!0,configurable:!0}),c.prototype._KeepReference=function(){u(this.context,this,"_KeepReference",OfficeExtension.OperationType.Read,[])},c.prototype._handleResult=function(n){if(f.prototype._handleResult.call(this,n),!r(n)){var i=n;s(this,i);t(i.Id)||(this.m_id=i.Id);t(i.LanguageId)||(this.m_languageId=i.LanguageId);t(i.StrokePointers)||(this.m_strokePointers=i.StrokePointers);t(i.WordAlternates)||(this.m_wordAlternates=i.WordAlternates);t(i._ReferenceId)||(this.m__ReferenceId=i._ReferenceId);h(this,i,["line","Line"])}},c.prototype.load=function(n){return o(this,n),this},c.prototype._handleIdResult=function(n){(f.prototype._handleIdResult.call(this,n),r(n))||(t(n._ReferenceId)||(this.m__ReferenceId=n._ReferenceId),t(n.Id)||(this.m_id=n.Id))},c.prototype.track=function(){return this.context.trackedObjects.add(this),this},c.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},c.prototype.toJSON=function(){return{id:this.m_id,languageId:this.m_languageId,strokePointers:this.m_strokePointers,wordAlternates:this.m_wordAlternates}},c}(OfficeExtension.ClientObject);n.InkAnalysisWord=d;g=function(e){function h(){e.apply(this,arguments)}return __extends(h,e),Object.defineProperty(h.prototype,"items",{get:function(){return i("items",this.m__items,"InkAnalysisWordCollection",this._isNull),this.m__items},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"count",{get:function(){return i("count",this.m_count,"InkAnalysisWordCollection",this._isNull),this.m_count},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.m__ReferenceId,"InkAnalysisWordCollection",this._isNull),this.m__ReferenceId},enumerable:!0,configurable:!0}),h.prototype.getItem=function(t){return new n.InkAnalysisWord(this.context,c(this.context,this,[t]))},h.prototype.getItemAt=function(t){return new n.InkAnalysisWord(this.context,f(this.context,this,"GetItemAt",OfficeExtension.OperationType.Read,[t],!1,!1,null))},h.prototype._KeepReference=function(){u(this.context,this,"_KeepReference",OfficeExtension.OperationType.Read,[])},h.prototype._handleResult=function(i){var u,o,f,h;if((e.prototype._handleResult.call(this,i),!r(i))&&(u=i,s(this,u),t(u.Count)||(this.m_count=u.Count),t(u._ReferenceId)||(this.m__ReferenceId=u._ReferenceId),!r(u[OfficeExtension.Constants.items])))for(this.m__items=[],o=u[OfficeExtension.Constants.items],f=0;f<o.length;f++)h=new n.InkAnalysisWord(this.context,l(!0,this.context,this,o[f],f)),h._handleResult(o[f]),this.m__items.push(h)},h.prototype.load=function(n){return o(this,n),this},h.prototype._handleIdResult=function(n){(e.prototype._handleIdResult.call(this,n),r(n))||t(n._ReferenceId)||(this.m__ReferenceId=n._ReferenceId)},h.prototype.track=function(){return this.context.trackedObjects.add(this),this},h.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},h.prototype.toJSON=function(){return{count:this.m_count}},h}(OfficeExtension.ClientObject);n.InkAnalysisWordCollection=g;nt=function(f){function c(){f.apply(this,arguments)}return __extends(c,f),Object.defineProperty(c.prototype,"inkStrokes",{get:function(){return this.m_inkStrokes||(this.m_inkStrokes=new n.InkStrokeCollection(this.context,e(this.context,this,"InkStrokes",!0,!1))),this.m_inkStrokes},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"pageContent",{get:function(){return this.m_pageContent||(this.m_pageContent=new n.PageContent(this.context,e(this.context,this,"PageContent",!1,!1))),this.m_pageContent},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"id",{get:function(){return i("id",this.m_id,"FloatingInk",this._isNull),this.m_id},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.m__ReferenceId,"FloatingInk",this._isNull),this.m__ReferenceId},enumerable:!0,configurable:!0}),c.prototype._KeepReference=function(){u(this.context,this,"_KeepReference",OfficeExtension.OperationType.Read,[])},c.prototype._handleResult=function(n){if(f.prototype._handleResult.call(this,n),!r(n)){var i=n;s(this,i);t(i.Id)||(this.m_id=i.Id);t(i._ReferenceId)||(this.m__ReferenceId=i._ReferenceId);h(this,i,["inkStrokes","InkStrokes","pageContent","PageContent"])}},c.prototype.load=function(n){return o(this,n),this},c.prototype._handleIdResult=function(n){(f.prototype._handleIdResult.call(this,n),r(n))||(t(n._ReferenceId)||(this.m__ReferenceId=n._ReferenceId),t(n.Id)||(this.m_id=n.Id))},c.prototype.track=function(){return this.context.trackedObjects.add(this),this},c.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},c.prototype.toJSON=function(){return{id:this.m_id}},c}(OfficeExtension.ClientObject);n.FloatingInk=nt;tt=function(f){function c(){f.apply(this,arguments)}return __extends(c,f),Object.defineProperty(c.prototype,"floatingInk",{get:function(){return this.m_floatingInk||(this.m_floatingInk=new n.FloatingInk(this.context,e(this.context,this,"FloatingInk",!1,!1))),this.m_floatingInk},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"id",{get:function(){return i("id",this.m_id,"InkStroke",this._isNull),this.m_id},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.m__ReferenceId,"InkStroke",this._isNull),this.m__ReferenceId},enumerable:!0,configurable:!0}),c.prototype._KeepReference=function(){u(this.context,this,"_KeepReference",OfficeExtension.OperationType.Read,[])},c.prototype._handleResult=function(n){if(f.prototype._handleResult.call(this,n),!r(n)){var i=n;s(this,i);t(i.Id)||(this.m_id=i.Id);t(i._ReferenceId)||(this.m__ReferenceId=i._ReferenceId);h(this,i,["floatingInk","FloatingInk"])}},c.prototype.load=function(n){return o(this,n),this},c.prototype._handleIdResult=function(n){(f.prototype._handleIdResult.call(this,n),r(n))||(t(n._ReferenceId)||(this.m__ReferenceId=n._ReferenceId),t(n.Id)||(this.m_id=n.Id))},c.prototype.track=function(){return this.context.trackedObjects.add(this),this},c.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},c.prototype.toJSON=function(){return{id:this.m_id}},c}(OfficeExtension.ClientObject);n.InkStroke=tt;it=function(e){function h(){e.apply(this,arguments)}return __extends(h,e),Object.defineProperty(h.prototype,"items",{get:function(){return i("items",this.m__items,"InkStrokeCollection",this._isNull),this.m__items},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"count",{get:function(){return i("count",this.m_count,"InkStrokeCollection",this._isNull),this.m_count},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.m__ReferenceId,"InkStrokeCollection",this._isNull),this.m__ReferenceId},enumerable:!0,configurable:!0}),h.prototype.getItem=function(t){return new n.InkStroke(this.context,c(this.context,this,[t]))},h.prototype.getItemAt=function(t){return new n.InkStroke(this.context,f(this.context,this,"GetItemAt",OfficeExtension.OperationType.Read,[t],!1,!1,null))},h.prototype._KeepReference=function(){u(this.context,this,"_KeepReference",OfficeExtension.OperationType.Read,[])},h.prototype._handleResult=function(i){var u,o,f,h;if((e.prototype._handleResult.call(this,i),!r(i))&&(u=i,s(this,u),t(u.Count)||(this.m_count=u.Count),t(u._ReferenceId)||(this.m__ReferenceId=u._ReferenceId),!r(u[OfficeExtension.Constants.items])))for(this.m__items=[],o=u[OfficeExtension.Constants.items],f=0;f<o.length;f++)h=new n.InkStroke(this.context,l(!0,this.context,this,o[f],f)),h._handleResult(o[f]),this.m__items.push(h)},h.prototype.load=function(n){return o(this,n),this},h.prototype._handleIdResult=function(n){(e.prototype._handleIdResult.call(this,n),r(n))||t(n._ReferenceId)||(this.m__ReferenceId=n._ReferenceId)},h.prototype.track=function(){return this.context.trackedObjects.add(this),this},h.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},h.prototype.toJSON=function(){return{count:this.m_count}},h}(OfficeExtension.ClientObject);n.InkStrokeCollection=it;rt=function(f){function c(){f.apply(this,arguments)}return __extends(c,f),Object.defineProperty(c.prototype,"paragraph",{get:function(){return this.m_paragraph||(this.m_paragraph=new n.Paragraph(this.context,e(this.context,this,"Paragraph",!1,!1))),this.m_paragraph},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"id",{get:function(){return i("id",this.m_id,"InkWord",this._isNull),this.m_id},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"languageId",{get:function(){return i("languageId",this.m_languageId,"InkWord",this._isNull),this.m_languageId},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"wordAlternates",{get:function(){return i("wordAlternates",this.m_wordAlternates,"InkWord",this._isNull),this.m_wordAlternates},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.m__ReferenceId,"InkWord",this._isNull),this.m__ReferenceId},enumerable:!0,configurable:!0}),c.prototype._KeepReference=function(){u(this.context,this,"_KeepReference",OfficeExtension.OperationType.Read,[])},c.prototype._handleResult=function(n){if(f.prototype._handleResult.call(this,n),!r(n)){var i=n;s(this,i);t(i.Id)||(this.m_id=i.Id);t(i.LanguageId)||(this.m_languageId=i.LanguageId);t(i.WordAlternates)||(this.m_wordAlternates=i.WordAlternates);t(i._ReferenceId)||(this.m__ReferenceId=i._ReferenceId);h(this,i,["paragraph","Paragraph"])}},c.prototype.load=function(n){return o(this,n),this},c.prototype._handleIdResult=function(n){(f.prototype._handleIdResult.call(this,n),r(n))||(t(n._ReferenceId)||(this.m__ReferenceId=n._ReferenceId),t(n.Id)||(this.m_id=n.Id))},c.prototype.track=function(){return this.context.trackedObjects.add(this),this},c.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},c.prototype.toJSON=function(){return{id:this.m_id,languageId:this.m_languageId,wordAlternates:this.m_wordAlternates}},c}(OfficeExtension.ClientObject);n.InkWord=rt;ut=function(e){function h(){e.apply(this,arguments)}return __extends(h,e),Object.defineProperty(h.prototype,"items",{get:function(){return i("items",this.m__items,"InkWordCollection",this._isNull),this.m__items},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"count",{get:function(){return i("count",this.m_count,"InkWordCollection",this._isNull),this.m_count},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.m__ReferenceId,"InkWordCollection",this._isNull),this.m__ReferenceId},enumerable:!0,configurable:!0}),h.prototype.getItem=function(t){return new n.InkWord(this.context,c(this.context,this,[t]))},h.prototype.getItemAt=function(t){return new n.InkWord(this.context,f(this.context,this,"GetItemAt",OfficeExtension.OperationType.Read,[t],!1,!1,null))},h.prototype._KeepReference=function(){u(this.context,this,"_KeepReference",OfficeExtension.OperationType.Read,[])},h.prototype._handleResult=function(i){var u,o,f,h;if((e.prototype._handleResult.call(this,i),!r(i))&&(u=i,s(this,u),t(u.Count)||(this.m_count=u.Count),t(u._ReferenceId)||(this.m__ReferenceId=u._ReferenceId),!r(u[OfficeExtension.Constants.items])))for(this.m__items=[],o=u[OfficeExtension.Constants.items],f=0;f<o.length;f++)h=new n.InkWord(this.context,l(!0,this.context,this,o[f],f)),h._handleResult(o[f]),this.m__items.push(h)},h.prototype.load=function(n){return o(this,n),this},h.prototype._handleIdResult=function(n){(e.prototype._handleIdResult.call(this,n),r(n))||t(n._ReferenceId)||(this.m__ReferenceId=n._ReferenceId)},h.prototype.track=function(){return this.context.trackedObjects.add(this),this},h.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},h.prototype.toJSON=function(){return{count:this.m_count}},h}(OfficeExtension.ClientObject);n.InkWordCollection=ut;ft=function(c){function l(){c.apply(this,arguments)}return __extends(l,c),Object.defineProperty(l.prototype,"sectionGroups",{get:function(){return this.m_sectionGroups||(this.m_sectionGroups=new n.SectionGroupCollection(this.context,e(this.context,this,"SectionGroups",!0,!1))),this.m_sectionGroups},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"sections",{get:function(){return this.m_sections||(this.m_sections=new n.SectionCollection(this.context,e(this.context,this,"Sections",!0,!1))),this.m_sections},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"clientUrl",{get:function(){return i("clientUrl",this.m_clientUrl,"Notebook",this._isNull),this.m_clientUrl},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"id",{get:function(){return i("id",this.m_id,"Notebook",this._isNull),this.m_id},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"name",{get:function(){return i("name",this.m_name,"Notebook",this._isNull),this.m_name},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.m__ReferenceId,"Notebook",this._isNull),this.m__ReferenceId},enumerable:!0,configurable:!0}),l.prototype.addSection=function(t){return new n.Section(this.context,f(this.context,this,"AddSection",OfficeExtension.OperationType.Default,[t],!1,!0,null))},l.prototype.addSectionGroup=function(t){return new n.SectionGroup(this.context,f(this.context,this,"AddSectionGroup",OfficeExtension.OperationType.Default,[t],!1,!0,null))},l.prototype._KeepReference=function(){u(this.context,this,"_KeepReference",OfficeExtension.OperationType.Read,[])},l.prototype._Sync=function(){u(this.context,this,"_Sync",OfficeExtension.OperationType.Default,[])},l.prototype._handleResult=function(n){if(c.prototype._handleResult.call(this,n),!r(n)){var i=n;s(this,i);t(i.ClientUrl)||(this.m_clientUrl=i.ClientUrl);t(i.Id)||(this.m_id=i.Id);t(i.Name)||(this.m_name=i.Name);t(i._ReferenceId)||(this.m__ReferenceId=i._ReferenceId);h(this,i,["sectionGroups","SectionGroups","sections","Sections"])}},l.prototype.load=function(n){return o(this,n),this},l.prototype._handleIdResult=function(n){(c.prototype._handleIdResult.call(this,n),r(n))||(t(n._ReferenceId)||(this.m__ReferenceId=n._ReferenceId),t(n.Id)||(this.m_id=n.Id))},l.prototype.track=function(){return this.context.trackedObjects.add(this),this},l.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},l.prototype.toJSON=function(){return{clientUrl:this.m_clientUrl,id:this.m_id,name:this.m_name}},l}(OfficeExtension.ClientObject);n.Notebook=ft;et=function(e){function h(){e.apply(this,arguments)}return __extends(h,e),Object.defineProperty(h.prototype,"items",{get:function(){return i("items",this.m__items,"NotebookCollection",this._isNull),this.m__items},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"count",{get:function(){return i("count",this.m_count,"NotebookCollection",this._isNull),this.m_count},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.m__ReferenceId,"NotebookCollection",this._isNull),this.m__ReferenceId},enumerable:!0,configurable:!0}),h.prototype.getByName=function(t){return new n.NotebookCollection(this.context,f(this.context,this,"GetByName",OfficeExtension.OperationType.Read,[t],!0,!1,null))},h.prototype.getItem=function(t){return new n.Notebook(this.context,c(this.context,this,[t]))},h.prototype.getItemAt=function(t){return new n.Notebook(this.context,f(this.context,this,"GetItemAt",OfficeExtension.OperationType.Read,[t],!1,!1,null))},h.prototype._KeepReference=function(){u(this.context,this,"_KeepReference",OfficeExtension.OperationType.Read,[])},h.prototype._handleResult=function(i){var u,o,f,h;if((e.prototype._handleResult.call(this,i),!r(i))&&(u=i,s(this,u),t(u.Count)||(this.m_count=u.Count),t(u._ReferenceId)||(this.m__ReferenceId=u._ReferenceId),!r(u[OfficeExtension.Constants.items])))for(this.m__items=[],o=u[OfficeExtension.Constants.items],f=0;f<o.length;f++)h=new n.Notebook(this.context,l(!0,this.context,this,o[f],f)),h._handleResult(o[f]),this.m__items.push(h)},h.prototype.load=function(n){return o(this,n),this},h.prototype._handleIdResult=function(n){(e.prototype._handleIdResult.call(this,n),r(n))||t(n._ReferenceId)||(this.m__ReferenceId=n._ReferenceId)},h.prototype.track=function(){return this.context.trackedObjects.add(this),this},h.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},h.prototype.toJSON=function(){return{count:this.m_count}},h}(OfficeExtension.ClientObject);n.NotebookCollection=et;ot=function(c){function l(){c.apply(this,arguments)}return __extends(l,c),Object.defineProperty(l.prototype,"notebook",{get:function(){return this.m_notebook||(this.m_notebook=new n.Notebook(this.context,e(this.context,this,"Notebook",!1,!1))),this.m_notebook},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"parentSectionGroup",{get:function(){return this.m_parentSectionGroup||(this.m_parentSectionGroup=new n.SectionGroup(this.context,e(this.context,this,"ParentSectionGroup",!1,!1))),this.m_parentSectionGroup},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"parentSectionGroupOrNull",{get:function(){return this.m_parentSectionGroupOrNull||(this.m_parentSectionGroupOrNull=new n.SectionGroup(this.context,e(this.context,this,"ParentSectionGroupOrNull",!1,!1))),this.m_parentSectionGroupOrNull},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"sectionGroups",{get:function(){return this.m_sectionGroups||(this.m_sectionGroups=new n.SectionGroupCollection(this.context,e(this.context,this,"SectionGroups",!0,!1))),this.m_sectionGroups},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"sections",{get:function(){return this.m_sections||(this.m_sections=new n.SectionCollection(this.context,e(this.context,this,"Sections",!0,!1))),this.m_sections},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"clientUrl",{get:function(){return i("clientUrl",this.m_clientUrl,"SectionGroup",this._isNull),this.m_clientUrl},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"id",{get:function(){return i("id",this.m_id,"SectionGroup",this._isNull),this.m_id},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"name",{get:function(){return i("name",this.m_name,"SectionGroup",this._isNull),this.m_name},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.m__ReferenceId,"SectionGroup",this._isNull),this.m__ReferenceId},enumerable:!0,configurable:!0}),l.prototype.addSection=function(t){return new n.Section(this.context,f(this.context,this,"AddSection",OfficeExtension.OperationType.Default,[t],!1,!0,null))},l.prototype.addSectionGroup=function(t){return new n.SectionGroup(this.context,f(this.context,this,"AddSectionGroup",OfficeExtension.OperationType.Default,[t],!1,!0,null))},l.prototype._KeepReference=function(){u(this.context,this,"_KeepReference",OfficeExtension.OperationType.Read,[])},l.prototype._handleResult=function(n){if(c.prototype._handleResult.call(this,n),!r(n)){var i=n;s(this,i);t(i.ClientUrl)||(this.m_clientUrl=i.ClientUrl);t(i.Id)||(this.m_id=i.Id);t(i.Name)||(this.m_name=i.Name);t(i._ReferenceId)||(this.m__ReferenceId=i._ReferenceId);h(this,i,["notebook","Notebook","parentSectionGroup","ParentSectionGroup","parentSectionGroupOrNull","ParentSectionGroupOrNull","sectionGroups","SectionGroups","sections","Sections"])}},l.prototype.load=function(n){return o(this,n),this},l.prototype._handleIdResult=function(n){(c.prototype._handleIdResult.call(this,n),r(n))||(t(n._ReferenceId)||(this.m__ReferenceId=n._ReferenceId),t(n.Id)||(this.m_id=n.Id))},l.prototype.track=function(){return this.context.trackedObjects.add(this),this},l.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},l.prototype.toJSON=function(){return{clientUrl:this.m_clientUrl,id:this.m_id,name:this.m_name}},l}(OfficeExtension.ClientObject);n.SectionGroup=ot;st=function(e){function h(){e.apply(this,arguments)}return __extends(h,e),Object.defineProperty(h.prototype,"items",{get:function(){return i("items",this.m__items,"SectionGroupCollection",this._isNull),this.m__items},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"count",{get:function(){return i("count",this.m_count,"SectionGroupCollection",this._isNull),this.m_count},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.m__ReferenceId,"SectionGroupCollection",this._isNull),this.m__ReferenceId},enumerable:!0,configurable:!0}),h.prototype.getByName=function(t){return new n.SectionGroupCollection(this.context,f(this.context,this,"GetByName",OfficeExtension.OperationType.Read,[t],!0,!1,null))},h.prototype.getItem=function(t){return new n.SectionGroup(this.context,c(this.context,this,[t]))},h.prototype.getItemAt=function(t){return new n.SectionGroup(this.context,f(this.context,this,"GetItemAt",OfficeExtension.OperationType.Read,[t],!1,!1,null))},h.prototype._KeepReference=function(){u(this.context,this,"_KeepReference",OfficeExtension.OperationType.Read,[])},h.prototype._handleResult=function(i){var u,o,f,h;if((e.prototype._handleResult.call(this,i),!r(i))&&(u=i,s(this,u),t(u.Count)||(this.m_count=u.Count),t(u._ReferenceId)||(this.m__ReferenceId=u._ReferenceId),!r(u[OfficeExtension.Constants.items])))for(this.m__items=[],o=u[OfficeExtension.Constants.items],f=0;f<o.length;f++)h=new n.SectionGroup(this.context,l(!0,this.context,this,o[f],f)),h._handleResult(o[f]),this.m__items.push(h)},h.prototype.load=function(n){return o(this,n),this},h.prototype._handleIdResult=function(n){(e.prototype._handleIdResult.call(this,n),r(n))||t(n._ReferenceId)||(this.m__ReferenceId=n._ReferenceId)},h.prototype.track=function(){return this.context.trackedObjects.add(this),this},h.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},h.prototype.toJSON=function(){return{count:this.m_count}},h}(OfficeExtension.ClientObject);n.SectionGroupCollection=st;ht=function(c){function l(){c.apply(this,arguments)}return __extends(l,c),Object.defineProperty(l.prototype,"notebook",{get:function(){return this.m_notebook||(this.m_notebook=new n.Notebook(this.context,e(this.context,this,"Notebook",!1,!1))),this.m_notebook},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"pages",{get:function(){return this.m_pages||(this.m_pages=new n.PageCollection(this.context,e(this.context,this,"Pages",!0,!1))),this.m_pages},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"parentSectionGroup",{get:function(){return this.m_parentSectionGroup||(this.m_parentSectionGroup=new n.SectionGroup(this.context,e(this.context,this,"ParentSectionGroup",!1,!1))),this.m_parentSectionGroup},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"parentSectionGroupOrNull",{get:function(){return this.m_parentSectionGroupOrNull||(this.m_parentSectionGroupOrNull=new n.SectionGroup(this.context,e(this.context,this,"ParentSectionGroupOrNull",!1,!1))),this.m_parentSectionGroupOrNull},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"clientUrl",{get:function(){return i("clientUrl",this.m_clientUrl,"Section",this._isNull),this.m_clientUrl},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"id",{get:function(){return i("id",this.m_id,"Section",this._isNull),this.m_id},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"name",{get:function(){return i("name",this.m_name,"Section",this._isNull),this.m_name},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.m__ReferenceId,"Section",this._isNull),this.m__ReferenceId},enumerable:!0,configurable:!0}),l.prototype.addPage=function(t){return new n.Page(this.context,f(this.context,this,"AddPage",OfficeExtension.OperationType.Default,[t],!1,!0,null))},l.prototype.copyToNotebook=function(t){return new n.Section(this.context,f(this.context,this,"CopyToNotebook",OfficeExtension.OperationType.Default,[t],!1,!0,null))},l.prototype.copyToSectionGroup=function(t){return new n.Section(this.context,f(this.context,this,"CopyToSectionGroup",OfficeExtension.OperationType.Default,[t],!1,!0,null))},l.prototype.insertSectionAsSibling=function(t,i){return new n.Section(this.context,f(this.context,this,"InsertSectionAsSibling",OfficeExtension.OperationType.Default,[t,i],!1,!0,null))},l.prototype._KeepReference=function(){u(this.context,this,"_KeepReference",OfficeExtension.OperationType.Read,[])},l.prototype._handleResult=function(n){if(c.prototype._handleResult.call(this,n),!r(n)){var i=n;s(this,i);t(i.ClientUrl)||(this.m_clientUrl=i.ClientUrl);t(i.Id)||(this.m_id=i.Id);t(i.Name)||(this.m_name=i.Name);t(i._ReferenceId)||(this.m__ReferenceId=i._ReferenceId);h(this,i,["notebook","Notebook","pages","Pages","parentSectionGroup","ParentSectionGroup","parentSectionGroupOrNull","ParentSectionGroupOrNull"])}},l.prototype.load=function(n){return o(this,n),this},l.prototype._handleIdResult=function(n){(c.prototype._handleIdResult.call(this,n),r(n))||(t(n._ReferenceId)||(this.m__ReferenceId=n._ReferenceId),t(n.Id)||(this.m_id=n.Id))},l.prototype.track=function(){return this.context.trackedObjects.add(this),this},l.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},l.prototype.toJSON=function(){return{clientUrl:this.m_clientUrl,id:this.m_id,name:this.m_name}},l}(OfficeExtension.ClientObject);n.Section=ht;ct=function(e){function h(){e.apply(this,arguments)}return __extends(h,e),Object.defineProperty(h.prototype,"items",{get:function(){return i("items",this.m__items,"SectionCollection",this._isNull),this.m__items},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"count",{get:function(){return i("count",this.m_count,"SectionCollection",this._isNull),this.m_count},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.m__ReferenceId,"SectionCollection",this._isNull),this.m__ReferenceId},enumerable:!0,configurable:!0}),h.prototype.getByName=function(t){return new n.SectionCollection(this.context,f(this.context,this,"GetByName",OfficeExtension.OperationType.Read,[t],!0,!1,null))},h.prototype.getItem=function(t){return new n.Section(this.context,c(this.context,this,[t]))},h.prototype.getItemAt=function(t){return new n.Section(this.context,f(this.context,this,"GetItemAt",OfficeExtension.OperationType.Read,[t],!1,!1,null))},h.prototype._KeepReference=function(){u(this.context,this,"_KeepReference",OfficeExtension.OperationType.Read,[])},h.prototype._handleResult=function(i){var u,o,f,h;if((e.prototype._handleResult.call(this,i),!r(i))&&(u=i,s(this,u),t(u.Count)||(this.m_count=u.Count),t(u._ReferenceId)||(this.m__ReferenceId=u._ReferenceId),!r(u[OfficeExtension.Constants.items])))for(this.m__items=[],o=u[OfficeExtension.Constants.items],f=0;f<o.length;f++)h=new n.Section(this.context,l(!0,this.context,this,o[f],f)),h._handleResult(o[f]),this.m__items.push(h)},h.prototype.load=function(n){return o(this,n),this},h.prototype._handleIdResult=function(n){(e.prototype._handleIdResult.call(this,n),r(n))||t(n._ReferenceId)||(this.m__ReferenceId=n._ReferenceId)},h.prototype.track=function(){return this.context.trackedObjects.add(this),this},h.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},h.prototype.toJSON=function(){return{count:this.m_count}},h}(OfficeExtension.ClientObject);n.SectionCollection=ct;lt=function(c){function l(){c.apply(this,arguments)}return __extends(l,c),Object.defineProperty(l.prototype,"contents",{get:function(){return this.m_contents||(this.m_contents=new n.PageContentCollection(this.context,e(this.context,this,"Contents",!0,!1))),this.m_contents},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"inkAnalysisOrNull",{get:function(){return this.m_inkAnalysisOrNull||(this.m_inkAnalysisOrNull=new n.InkAnalysis(this.context,e(this.context,this,"InkAnalysisOrNull",!1,!1))),this.m_inkAnalysisOrNull},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"parentSection",{get:function(){return this.m_parentSection||(this.m_parentSection=new n.Section(this.context,e(this.context,this,"ParentSection",!1,!1))),this.m_parentSection},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"classNotebookPageSource",{get:function(){return i("classNotebookPageSource",this.m_classNotebookPageSource,"Page",this._isNull),this.m_classNotebookPageSource},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"clientUrl",{get:function(){return i("clientUrl",this.m_clientUrl,"Page",this._isNull),this.m_clientUrl},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"id",{get:function(){return i("id",this.m_id,"Page",this._isNull),this.m_id},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"pageLevel",{get:function(){return i("pageLevel",this.m_pageLevel,"Page",this._isNull),this.m_pageLevel},set:function(n){this.m_pageLevel=n;a(this.context,this,"PageLevel",n)},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"title",{get:function(){return i("title",this.m_title,"Page",this._isNull),this.m_title},set:function(n){this.m_title=n;a(this.context,this,"Title",n)},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"webUrl",{get:function(){return i("webUrl",this.m_webUrl,"Page",this._isNull),this.m_webUrl},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.m__ReferenceId,"Page",this._isNull),this.m__ReferenceId},enumerable:!0,configurable:!0}),l.prototype.addOutline=function(t,i,r){return new n.Outline(this.context,f(this.context,this,"AddOutline",OfficeExtension.OperationType.Default,[t,i,r],!1,!0,null))},l.prototype.copyToSection=function(t){return new n.Page(this.context,f(this.context,this,"CopyToSection",OfficeExtension.OperationType.Default,[t],!1,!0,null))},l.prototype.copyToSectionAndSetClassNotebookPageSource=function(t){return new n.Page(this.context,f(this.context,this,"CopyToSectionAndSetClassNotebookPageSource",OfficeExtension.OperationType.Default,[t],!1,!0,null))},l.prototype.insertPageAsSibling=function(t,i){return new n.Page(this.context,f(this.context,this,"InsertPageAsSibling",OfficeExtension.OperationType.Default,[t,i],!1,!0,null))},l.prototype._KeepReference=function(){u(this.context,this,"_KeepReference",OfficeExtension.OperationType.Read,[])},l.prototype._Sync=function(){u(this.context,this,"_Sync",OfficeExtension.OperationType.Default,[])},l.prototype._handleResult=function(n){if(c.prototype._handleResult.call(this,n),!r(n)){var i=n;s(this,i);t(i.ClassNotebookPageSource)||(this.m_classNotebookPageSource=i.ClassNotebookPageSource);t(i.ClientUrl)||(this.m_clientUrl=i.ClientUrl);t(i.Id)||(this.m_id=i.Id);t(i.PageLevel)||(this.m_pageLevel=i.PageLevel);t(i.Title)||(this.m_title=i.Title);t(i.WebUrl)||(this.m_webUrl=i.WebUrl);t(i._ReferenceId)||(this.m__ReferenceId=i._ReferenceId);h(this,i,["contents","Contents","inkAnalysisOrNull","InkAnalysisOrNull","parentSection","ParentSection"])}},l.prototype.load=function(n){return o(this,n),this},l.prototype._handleIdResult=function(n){(c.prototype._handleIdResult.call(this,n),r(n))||(t(n._ReferenceId)||(this.m__ReferenceId=n._ReferenceId),t(n.Id)||(this.m_id=n.Id))},l.prototype.track=function(){return this.context.trackedObjects.add(this),this},l.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},l.prototype.toJSON=function(){return{classNotebookPageSource:this.m_classNotebookPageSource,clientUrl:this.m_clientUrl,id:this.m_id,pageLevel:this.m_pageLevel,title:this.m_title,webUrl:this.m_webUrl}},l}(OfficeExtension.ClientObject);n.Page=lt;at=function(e){function h(){e.apply(this,arguments)}return __extends(h,e),Object.defineProperty(h.prototype,"items",{get:function(){return i("items",this.m__items,"PageCollection",this._isNull),this.m__items},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"count",{get:function(){return i("count",this.m_count,"PageCollection",this._isNull),this.m_count},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.m__ReferenceId,"PageCollection",this._isNull),this.m__ReferenceId},enumerable:!0,configurable:!0}),h.prototype.getByTitle=function(t){return new n.PageCollection(this.context,f(this.context,this,"GetByTitle",OfficeExtension.OperationType.Read,[t],!0,!1,null))},h.prototype.getItem=function(t){return new n.Page(this.context,c(this.context,this,[t]))},h.prototype.getItemAt=function(t){return new n.Page(this.context,f(this.context,this,"GetItemAt",OfficeExtension.OperationType.Read,[t],!1,!1,null))},h.prototype._KeepReference=function(){u(this.context,this,"_KeepReference",OfficeExtension.OperationType.Read,[])},h.prototype._handleResult=function(i){var u,o,f,h;if((e.prototype._handleResult.call(this,i),!r(i))&&(u=i,s(this,u),t(u.Count)||(this.m_count=u.Count),t(u._ReferenceId)||(this.m__ReferenceId=u._ReferenceId),!r(u[OfficeExtension.Constants.items])))for(this.m__items=[],o=u[OfficeExtension.Constants.items],f=0;f<o.length;f++)h=new n.Page(this.context,l(!0,this.context,this,o[f],f)),h._handleResult(o[f]),this.m__items.push(h)},h.prototype.load=function(n){return o(this,n),this},h.prototype._handleIdResult=function(n){(e.prototype._handleIdResult.call(this,n),r(n))||t(n._ReferenceId)||(this.m__ReferenceId=n._ReferenceId)},h.prototype.track=function(){return this.context.trackedObjects.add(this),this},h.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},h.prototype.toJSON=function(){return{count:this.m_count}},h}(OfficeExtension.ClientObject);n.PageCollection=at;vt=function(f){function c(){f.apply(this,arguments)}return __extends(c,f),Object.defineProperty(c.prototype,"image",{get:function(){return this.m_image||(this.m_image=new n.Image(this.context,e(this.context,this,"Image",!1,!1))),this.m_image},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"ink",{get:function(){return this.m_ink||(this.m_ink=new n.FloatingInk(this.context,e(this.context,this,"Ink",!1,!1))),this.m_ink},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"outline",{get:function(){return this.m_outline||(this.m_outline=new n.Outline(this.context,e(this.context,this,"Outline",!1,!1))),this.m_outline},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"parentPage",{get:function(){return this.m_parentPage||(this.m_parentPage=new n.Page(this.context,e(this.context,this,"ParentPage",!1,!1))),this.m_parentPage},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"id",{get:function(){return i("id",this.m_id,"PageContent",this._isNull),this.m_id},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"left",{get:function(){return i("left",this.m_left,"PageContent",this._isNull),this.m_left},set:function(n){this.m_left=n;a(this.context,this,"Left",n)},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"top",{get:function(){return i("top",this.m_top,"PageContent",this._isNull),this.m_top},set:function(n){this.m_top=n;a(this.context,this,"Top",n)},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"type",{get:function(){return i("type",this.m_type,"PageContent",this._isNull),this.m_type},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.m__ReferenceId,"PageContent",this._isNull),this.m__ReferenceId},enumerable:!0,configurable:!0}),c.prototype.delete=function(){u(this.context,this,"Delete",OfficeExtension.OperationType.Default,[])},c.prototype._KeepReference=function(){u(this.context,this,"_KeepReference",OfficeExtension.OperationType.Read,[])},c.prototype._handleResult=function(n){if(f.prototype._handleResult.call(this,n),!r(n)){var i=n;s(this,i);t(i.Id)||(this.m_id=i.Id);t(i.Left)||(this.m_left=i.Left);t(i.Top)||(this.m_top=i.Top);t(i.Type)||(this.m_type=i.Type);t(i._ReferenceId)||(this.m__ReferenceId=i._ReferenceId);h(this,i,["image","Image","ink","Ink","outline","Outline","parentPage","ParentPage"])}},c.prototype.load=function(n){return o(this,n),this},c.prototype._handleIdResult=function(n){(f.prototype._handleIdResult.call(this,n),r(n))||(t(n._ReferenceId)||(this.m__ReferenceId=n._ReferenceId),t(n.Id)||(this.m_id=n.Id))},c.prototype.track=function(){return this.context.trackedObjects.add(this),this},c.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},c.prototype.toJSON=function(){return{id:this.m_id,left:this.m_left,top:this.m_top,type:this.m_type}},c}(OfficeExtension.ClientObject);n.PageContent=vt;yt=function(e){function h(){e.apply(this,arguments)}return __extends(h,e),Object.defineProperty(h.prototype,"items",{get:function(){return i("items",this.m__items,"PageContentCollection",this._isNull),this.m__items},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"count",{get:function(){return i("count",this.m_count,"PageContentCollection",this._isNull),this.m_count},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.m__ReferenceId,"PageContentCollection",this._isNull),this.m__ReferenceId},enumerable:!0,configurable:!0}),h.prototype.getItem=function(t){return new n.PageContent(this.context,c(this.context,this,[t]))},h.prototype.getItemAt=function(t){return new n.PageContent(this.context,f(this.context,this,"GetItemAt",OfficeExtension.OperationType.Read,[t],!1,!1,null))},h.prototype._KeepReference=function(){u(this.context,this,"_KeepReference",OfficeExtension.OperationType.Read,[])},h.prototype._handleResult=function(i){var u,o,f,h;if((e.prototype._handleResult.call(this,i),!r(i))&&(u=i,s(this,u),t(u.Count)||(this.m_count=u.Count),t(u._ReferenceId)||(this.m__ReferenceId=u._ReferenceId),!r(u[OfficeExtension.Constants.items])))for(this.m__items=[],o=u[OfficeExtension.Constants.items],f=0;f<o.length;f++)h=new n.PageContent(this.context,l(!0,this.context,this,o[f],f)),h._handleResult(o[f]),this.m__items.push(h)},h.prototype.load=function(n){return o(this,n),this},h.prototype._handleIdResult=function(n){(e.prototype._handleIdResult.call(this,n),r(n))||t(n._ReferenceId)||(this.m__ReferenceId=n._ReferenceId)},h.prototype.track=function(){return this.context.trackedObjects.add(this),this},h.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},h.prototype.toJSON=function(){return{count:this.m_count}},h}(OfficeExtension.ClientObject);n.PageContentCollection=yt;pt=function(c){function l(){c.apply(this,arguments)}return __extends(l,c),Object.defineProperty(l.prototype,"pageContent",{get:function(){return this.m_pageContent||(this.m_pageContent=new n.PageContent(this.context,e(this.context,this,"PageContent",!1,!1))),this.m_pageContent},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"paragraphs",{get:function(){return this.m_paragraphs||(this.m_paragraphs=new n.ParagraphCollection(this.context,e(this.context,this,"Paragraphs",!0,!1))),this.m_paragraphs},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"id",{get:function(){return i("id",this.m_id,"Outline",this._isNull),this.m_id},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.m__ReferenceId,"Outline",this._isNull),this.m__ReferenceId},enumerable:!0,configurable:!0}),l.prototype.appendHtml=function(n){u(this.context,this,"AppendHtml",OfficeExtension.OperationType.Default,[n])},l.prototype.appendImage=function(t,i,r){return new n.Image(this.context,f(this.context,this,"AppendImage",OfficeExtension.OperationType.Default,[t,i,r],!1,!0,null))},l.prototype.appendRichText=function(t){return new n.RichText(this.context,f(this.context,this,"AppendRichText",OfficeExtension.OperationType.Default,[t],!1,!0,null))},l.prototype.appendTable=function(t,i,r){return new n.Table(this.context,f(this.context,this,"AppendTable",OfficeExtension.OperationType.Default,[t,i,r],!1,!0,null))},l.prototype._KeepReference=function(){u(this.context,this,"_KeepReference",OfficeExtension.OperationType.Read,[])},l.prototype._handleResult=function(n){if(c.prototype._handleResult.call(this,n),!r(n)){var i=n;s(this,i);t(i.Id)||(this.m_id=i.Id);t(i._ReferenceId)||(this.m__ReferenceId=i._ReferenceId);h(this,i,["pageContent","PageContent","paragraphs","Paragraphs"])}},l.prototype.load=function(n){return o(this,n),this},l.prototype._handleIdResult=function(n){(c.prototype._handleIdResult.call(this,n),r(n))||(t(n._ReferenceId)||(this.m__ReferenceId=n._ReferenceId),t(n.Id)||(this.m_id=n.Id))},l.prototype.track=function(){return this.context.trackedObjects.add(this),this},l.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},l.prototype.toJSON=function(){return{id:this.m_id}},l}(OfficeExtension.ClientObject);n.Outline=pt;wt=function(c){function l(){c.apply(this,arguments)}return __extends(l,c),Object.defineProperty(l.prototype,"image",{get:function(){return this.m_image||(this.m_image=new n.Image(this.context,e(this.context,this,"Image",!1,!1))),this.m_image},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"inkWords",{get:function(){return this.m_inkWords||(this.m_inkWords=new n.InkWordCollection(this.context,e(this.context,this,"InkWords",!0,!1))),this.m_inkWords},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"outline",{get:function(){return this.m_outline||(this.m_outline=new n.Outline(this.context,e(this.context,this,"Outline",!1,!1))),this.m_outline},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"paragraphs",{get:function(){return this.m_paragraphs||(this.m_paragraphs=new n.ParagraphCollection(this.context,e(this.context,this,"Paragraphs",!0,!1))),this.m_paragraphs},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"parentParagraph",{get:function(){return this.m_parentParagraph||(this.m_parentParagraph=new n.Paragraph(this.context,e(this.context,this,"ParentParagraph",!1,!1))),this.m_parentParagraph},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"parentParagraphOrNull",{get:function(){return this.m_parentParagraphOrNull||(this.m_parentParagraphOrNull=new n.Paragraph(this.context,e(this.context,this,"ParentParagraphOrNull",!1,!1))),this.m_parentParagraphOrNull},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"parentTableCell",{get:function(){return this.m_parentTableCell||(this.m_parentTableCell=new n.TableCell(this.context,e(this.context,this,"ParentTableCell",!1,!1))),this.m_parentTableCell},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"parentTableCellOrNull",{get:function(){return this.m_parentTableCellOrNull||(this.m_parentTableCellOrNull=new n.TableCell(this.context,e(this.context,this,"ParentTableCellOrNull",!1,!1))),this.m_parentTableCellOrNull},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"richText",{get:function(){return this.m_richText||(this.m_richText=new n.RichText(this.context,e(this.context,this,"RichText",!1,!1))),this.m_richText},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"table",{get:function(){return this.m_table||(this.m_table=new n.Table(this.context,e(this.context,this,"Table",!1,!1))),this.m_table},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"id",{get:function(){return i("id",this.m_id,"Paragraph",this._isNull),this.m_id},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"type",{get:function(){return i("type",this.m_type,"Paragraph",this._isNull),this.m_type},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.m__ReferenceId,"Paragraph",this._isNull),this.m__ReferenceId},enumerable:!0,configurable:!0}),l.prototype.delete=function(){u(this.context,this,"Delete",OfficeExtension.OperationType.Default,[])},l.prototype.insertHtmlAsSibling=function(n,t){u(this.context,this,"InsertHtmlAsSibling",OfficeExtension.OperationType.Default,[n,t])},l.prototype.insertImageAsSibling=function(t,i,r,u){return new n.Image(this.context,f(this.context,this,"InsertImageAsSibling",OfficeExtension.OperationType.Default,[t,i,r,u],!1,!0,null))},l.prototype.insertRichTextAsSibling=function(t,i){return new n.RichText(this.context,f(this.context,this,"InsertRichTextAsSibling",OfficeExtension.OperationType.Default,[t,i],!1,!0,null))},l.prototype.insertTableAsSibling=function(t,i,r,u){return new n.Table(this.context,f(this.context,this,"InsertTableAsSibling",OfficeExtension.OperationType.Default,[t,i,r,u],!1,!0,null))},l.prototype._KeepReference=function(){u(this.context,this,"_KeepReference",OfficeExtension.OperationType.Read,[])},l.prototype._handleResult=function(n){if(c.prototype._handleResult.call(this,n),!r(n)){var i=n;s(this,i);t(i.Id)||(this.m_id=i.Id);t(i.Type)||(this.m_type=i.Type);t(i._ReferenceId)||(this.m__ReferenceId=i._ReferenceId);h(this,i,["image","Image","inkWords","InkWords","outline","Outline","paragraphs","Paragraphs","parentParagraph","ParentParagraph","parentParagraphOrNull","ParentParagraphOrNull","parentTableCell","ParentTableCell","parentTableCellOrNull","ParentTableCellOrNull","richText","RichText","table","Table"])}},l.prototype.load=function(n){return o(this,n),this},l.prototype._handleIdResult=function(n){(c.prototype._handleIdResult.call(this,n),r(n))||(t(n._ReferenceId)||(this.m__ReferenceId=n._ReferenceId),t(n.Id)||(this.m_id=n.Id))},l.prototype.track=function(){return this.context.trackedObjects.add(this),this},l.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},l.prototype.toJSON=function(){return{id:this.m_id,type:this.m_type}},l}(OfficeExtension.ClientObject);n.Paragraph=wt;bt=function(e){function h(){e.apply(this,arguments)}return __extends(h,e),Object.defineProperty(h.prototype,"items",{get:function(){return i("items",this.m__items,"ParagraphCollection",this._isNull),this.m__items},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"count",{get:function(){return i("count",this.m_count,"ParagraphCollection",this._isNull),this.m_count},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.m__ReferenceId,"ParagraphCollection",this._isNull),this.m__ReferenceId},enumerable:!0,configurable:!0}),h.prototype.getItem=function(t){return new n.Paragraph(this.context,c(this.context,this,[t]))},h.prototype.getItemAt=function(t){return new n.Paragraph(this.context,f(this.context,this,"GetItemAt",OfficeExtension.OperationType.Read,[t],!1,!1,null))},h.prototype._KeepReference=function(){u(this.context,this,"_KeepReference",OfficeExtension.OperationType.Read,[])},h.prototype._handleResult=function(i){var u,o,f,h;if((e.prototype._handleResult.call(this,i),!r(i))&&(u=i,s(this,u),t(u.Count)||(this.m_count=u.Count),t(u._ReferenceId)||(this.m__ReferenceId=u._ReferenceId),!r(u[OfficeExtension.Constants.items])))for(this.m__items=[],o=u[OfficeExtension.Constants.items],f=0;f<o.length;f++)h=new n.Paragraph(this.context,l(!0,this.context,this,o[f],f)),h._handleResult(o[f]),this.m__items.push(h)},h.prototype.load=function(n){return o(this,n),this},h.prototype._handleIdResult=function(n){(e.prototype._handleIdResult.call(this,n),r(n))||t(n._ReferenceId)||(this.m__ReferenceId=n._ReferenceId)},h.prototype.track=function(){return this.context.trackedObjects.add(this),this},h.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},h.prototype.toJSON=function(){return{count:this.m_count}},h}(OfficeExtension.ClientObject);n.ParagraphCollection=bt;kt=function(f){function c(){f.apply(this,arguments)}return __extends(c,f),Object.defineProperty(c.prototype,"paragraph",{get:function(){return this.m_paragraph||(this.m_paragraph=new n.Paragraph(this.context,e(this.context,this,"Paragraph",!1,!1))),this.m_paragraph},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"id",{get:function(){return i("id",this.m_id,"RichText",this._isNull),this.m_id},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"languageId",{get:function(){return i("languageId",this.m_languageId,"RichText",this._isNull),this.m_languageId},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"text",{get:function(){return i("text",this.m_text,"RichText",this._isNull),this.m_text},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.m__ReferenceId,"RichText",this._isNull),this.m__ReferenceId},enumerable:!0,configurable:!0}),c.prototype.getHtml=function(){var t=u(this.context,this,"GetHtml",OfficeExtension.OperationType.Read,[]),n=new OfficeExtension.ClientResult;return v(this,t,n),n},c.prototype._KeepReference=function(){u(this.context,this,"_KeepReference",OfficeExtension.OperationType.Read,[])},c.prototype._handleResult=function(n){if(f.prototype._handleResult.call(this,n),!r(n)){var i=n;s(this,i);t(i.Id)||(this.m_id=i.Id);t(i.LanguageId)||(this.m_languageId=i.LanguageId);t(i.Text)||(this.m_text=i.Text);t(i._ReferenceId)||(this.m__ReferenceId=i._ReferenceId);h(this,i,["paragraph","Paragraph"])}},c.prototype.load=function(n){return o(this,n),this},c.prototype._handleIdResult=function(n){(f.prototype._handleIdResult.call(this,n),r(n))||(t(n._ReferenceId)||(this.m__ReferenceId=n._ReferenceId),t(n.Id)||(this.m_id=n.Id))},c.prototype.track=function(){return this.context.trackedObjects.add(this),this},c.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},c.prototype.toJSON=function(){return{id:this.m_id,languageId:this.m_languageId,text:this.m_text}},c}(OfficeExtension.ClientObject);n.RichText=kt;dt=function(f){function c(){f.apply(this,arguments)}return __extends(c,f),Object.defineProperty(c.prototype,"pageContent",{get:function(){return this.m_pageContent||(this.m_pageContent=new n.PageContent(this.context,e(this.context,this,"PageContent",!1,!1))),this.m_pageContent},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"paragraph",{get:function(){return this.m_paragraph||(this.m_paragraph=new n.Paragraph(this.context,e(this.context,this,"Paragraph",!1,!1))),this.m_paragraph},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"description",{get:function(){return i("description",this.m_description,"Image",this._isNull),this.m_description},set:function(n){this.m_description=n;a(this.context,this,"Description",n)},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"height",{get:function(){return i("height",this.m_height,"Image",this._isNull),this.m_height},set:function(n){this.m_height=n;a(this.context,this,"Height",n)},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"hyperlink",{get:function(){return i("hyperlink",this.m_hyperlink,"Image",this._isNull),this.m_hyperlink},set:function(n){this.m_hyperlink=n;a(this.context,this,"Hyperlink",n)},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"id",{get:function(){return i("id",this.m_id,"Image",this._isNull),this.m_id},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"ocrData",{get:function(){return i("ocrData",this.m_ocrData,"Image",this._isNull),this.m_ocrData},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"width",{get:function(){return i("width",this.m_width,"Image",this._isNull),this.m_width},set:function(n){this.m_width=n;a(this.context,this,"Width",n)},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.m__ReferenceId,"Image",this._isNull),this.m__ReferenceId},enumerable:!0,configurable:!0}),c.prototype.getBase64Image=function(){var t=u(this.context,this,"GetBase64Image",OfficeExtension.OperationType.Read,[]),n=new OfficeExtension.ClientResult;return v(this,t,n),n},c.prototype._KeepReference=function(){u(this.context,this,"_KeepReference",OfficeExtension.OperationType.Read,[])},c.prototype._handleResult=function(n){if(f.prototype._handleResult.call(this,n),!r(n)){var i=n;s(this,i);t(i.Description)||(this.m_description=i.Description);t(i.Height)||(this.m_height=i.Height);t(i.Hyperlink)||(this.m_hyperlink=i.Hyperlink);t(i.Id)||(this.m_id=i.Id);t(i.OcrData)||(this.m_ocrData=i.OcrData);t(i.Width)||(this.m_width=i.Width);t(i._ReferenceId)||(this.m__ReferenceId=i._ReferenceId);h(this,i,["pageContent","PageContent","paragraph","Paragraph"])}},c.prototype.load=function(n){return o(this,n),this},c.prototype._handleIdResult=function(n){(f.prototype._handleIdResult.call(this,n),r(n))||(t(n._ReferenceId)||(this.m__ReferenceId=n._ReferenceId),t(n.Id)||(this.m_id=n.Id))},c.prototype.track=function(){return this.context.trackedObjects.add(this),this},c.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},c.prototype.toJSON=function(){return{description:this.m_description,height:this.m_height,hyperlink:this.m_hyperlink,id:this.m_id,ocrData:this.m_ocrData,width:this.m_width}},c}(OfficeExtension.ClientObject);n.Image=dt;gt=function(c){function l(){c.apply(this,arguments)}return __extends(l,c),Object.defineProperty(l.prototype,"paragraph",{get:function(){return this.m_paragraph||(this.m_paragraph=new n.Paragraph(this.context,e(this.context,this,"Paragraph",!1,!1))),this.m_paragraph},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"rows",{get:function(){return this.m_rows||(this.m_rows=new n.TableRowCollection(this.context,e(this.context,this,"Rows",!0,!1))),this.m_rows},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"borderVisible",{get:function(){return i("borderVisible",this.m_borderVisible,"Table",this._isNull),this.m_borderVisible},set:function(n){this.m_borderVisible=n;a(this.context,this,"BorderVisible",n)},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"columnCount",{get:function(){return i("columnCount",this.m_columnCount,"Table",this._isNull),this.m_columnCount},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"id",{get:function(){return i("id",this.m_id,"Table",this._isNull),this.m_id},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"rowCount",{get:function(){return i("rowCount",this.m_rowCount,"Table",this._isNull),this.m_rowCount},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.m__ReferenceId,"Table",this._isNull),this.m__ReferenceId},enumerable:!0,configurable:!0}),l.prototype.appendColumn=function(n){u(this.context,this,"AppendColumn",OfficeExtension.OperationType.Default,[n])},l.prototype.appendRow=function(t){return new n.TableRow(this.context,f(this.context,this,"AppendRow",OfficeExtension.OperationType.Default,[t],!1,!0,null))},l.prototype.clear=function(){u(this.context,this,"Clear",OfficeExtension.OperationType.Default,[])},l.prototype.getCell=function(t,i){return new n.TableCell(this.context,f(this.context,this,"GetCell",OfficeExtension.OperationType.Read,[t,i],!1,!1,null))},l.prototype.insertColumn=function(n,t){u(this.context,this,"InsertColumn",OfficeExtension.OperationType.Default,[n,t])},l.prototype.insertRow=function(t,i){return new n.TableRow(this.context,f(this.context,this,"InsertRow",OfficeExtension.OperationType.Default,[t,i],!1,!0,null))},l.prototype.setShadingColor=function(n){u(this.context,this,"SetShadingColor",OfficeExtension.OperationType.Default,[n])},l.prototype._KeepReference=function(){u(this.context,this,"_KeepReference",OfficeExtension.OperationType.Read,[])},l.prototype._handleResult=function(n){if(c.prototype._handleResult.call(this,n),!r(n)){var i=n;s(this,i);t(i.BorderVisible)||(this.m_borderVisible=i.BorderVisible);t(i.ColumnCount)||(this.m_columnCount=i.ColumnCount);t(i.Id)||(this.m_id=i.Id);t(i.RowCount)||(this.m_rowCount=i.RowCount);t(i._ReferenceId)||(this.m__ReferenceId=i._ReferenceId);h(this,i,["paragraph","Paragraph","rows","Rows"])}},l.prototype.load=function(n){return o(this,n),this},l.prototype._handleIdResult=function(n){(c.prototype._handleIdResult.call(this,n),r(n))||(t(n._ReferenceId)||(this.m__ReferenceId=n._ReferenceId),t(n.Id)||(this.m_id=n.Id))},l.prototype.track=function(){return this.context.trackedObjects.add(this),this},l.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},l.prototype.toJSON=function(){return{borderVisible:this.m_borderVisible,columnCount:this.m_columnCount,id:this.m_id,rowCount:this.m_rowCount}},l}(OfficeExtension.ClientObject);n.Table=gt;ni=function(c){function l(){c.apply(this,arguments)}return __extends(l,c),Object.defineProperty(l.prototype,"cells",{get:function(){return this.m_cells||(this.m_cells=new n.TableCellCollection(this.context,e(this.context,this,"Cells",!0,!1))),this.m_cells},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"parentTable",{get:function(){return this.m_parentTable||(this.m_parentTable=new n.Table(this.context,e(this.context,this,"ParentTable",!1,!1))),this.m_parentTable},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"cellCount",{get:function(){return i("cellCount",this.m_cellCount,"TableRow",this._isNull),this.m_cellCount},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"id",{get:function(){return i("id",this.m_id,"TableRow",this._isNull),this.m_id},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"rowIndex",{get:function(){return i("rowIndex",this.m_rowIndex,"TableRow",this._isNull),this.m_rowIndex},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.m__ReferenceId,"TableRow",this._isNull),this.m__ReferenceId},enumerable:!0,configurable:!0}),l.prototype.clear=function(){u(this.context,this,"Clear",OfficeExtension.OperationType.Default,[])},l.prototype.insertRowAsSibling=function(t,i){return new n.TableRow(this.context,f(this.context,this,"InsertRowAsSibling",OfficeExtension.OperationType.Default,[t,i],!1,!0,null))},l.prototype.setShadingColor=function(n){u(this.context,this,"SetShadingColor",OfficeExtension.OperationType.Default,[n])},l.prototype._KeepReference=function(){u(this.context,this,"_KeepReference",OfficeExtension.OperationType.Read,[])},l.prototype._handleResult=function(n){if(c.prototype._handleResult.call(this,n),!r(n)){var i=n;s(this,i);t(i.CellCount)||(this.m_cellCount=i.CellCount);t(i.Id)||(this.m_id=i.Id);t(i.RowIndex)||(this.m_rowIndex=i.RowIndex);t(i._ReferenceId)||(this.m__ReferenceId=i._ReferenceId);h(this,i,["cells","Cells","parentTable","ParentTable"])}},l.prototype.load=function(n){return o(this,n),this},l.prototype._handleIdResult=function(n){(c.prototype._handleIdResult.call(this,n),r(n))||(t(n._ReferenceId)||(this.m__ReferenceId=n._ReferenceId),t(n.Id)||(this.m_id=n.Id))},l.prototype.track=function(){return this.context.trackedObjects.add(this),this},l.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},l.prototype.toJSON=function(){return{cellCount:this.m_cellCount,id:this.m_id,rowIndex:this.m_rowIndex}},l}(OfficeExtension.ClientObject);n.TableRow=ni;ti=function(e){function h(){e.apply(this,arguments)}return __extends(h,e),Object.defineProperty(h.prototype,"items",{get:function(){return i("items",this.m__items,"TableRowCollection",this._isNull),this.m__items},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"count",{get:function(){return i("count",this.m_count,"TableRowCollection",this._isNull),this.m_count},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.m__ReferenceId,"TableRowCollection",this._isNull),this.m__ReferenceId},enumerable:!0,configurable:!0}),h.prototype.getItem=function(t){return new n.TableRow(this.context,c(this.context,this,[t]))},h.prototype.getItemAt=function(t){return new n.TableRow(this.context,f(this.context,this,"GetItemAt",OfficeExtension.OperationType.Read,[t],!1,!1,null))},h.prototype._KeepReference=function(){u(this.context,this,"_KeepReference",OfficeExtension.OperationType.Read,[])},h.prototype._handleResult=function(i){var u,o,f,h;if((e.prototype._handleResult.call(this,i),!r(i))&&(u=i,s(this,u),t(u.Count)||(this.m_count=u.Count),t(u._ReferenceId)||(this.m__ReferenceId=u._ReferenceId),!r(u[OfficeExtension.Constants.items])))for(this.m__items=[],o=u[OfficeExtension.Constants.items],f=0;f<o.length;f++)h=new n.TableRow(this.context,l(!0,this.context,this,o[f],f)),h._handleResult(o[f]),this.m__items.push(h)},h.prototype.load=function(n){return o(this,n),this},h.prototype._handleIdResult=function(n){(e.prototype._handleIdResult.call(this,n),r(n))||t(n._ReferenceId)||(this.m__ReferenceId=n._ReferenceId)},h.prototype.track=function(){return this.context.trackedObjects.add(this),this},h.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},h.prototype.toJSON=function(){return{count:this.m_count}},h}(OfficeExtension.ClientObject);n.TableRowCollection=ti;ii=function(c){function l(){c.apply(this,arguments)}return __extends(l,c),Object.defineProperty(l.prototype,"paragraphs",{get:function(){return this.m_paragraphs||(this.m_paragraphs=new n.ParagraphCollection(this.context,e(this.context,this,"Paragraphs",!0,!1))),this.m_paragraphs},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"parentRow",{get:function(){return this.m_parentRow||(this.m_parentRow=new n.TableRow(this.context,e(this.context,this,"ParentRow",!1,!1))),this.m_parentRow},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"cellIndex",{get:function(){return i("cellIndex",this.m_cellIndex,"TableCell",this._isNull),this.m_cellIndex},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"id",{get:function(){return i("id",this.m_id,"TableCell",this._isNull),this.m_id},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"rowIndex",{get:function(){return i("rowIndex",this.m_rowIndex,"TableCell",this._isNull),this.m_rowIndex},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"shadingColor",{get:function(){return i("shadingColor",this.m_shadingColor,"TableCell",this._isNull),this.m_shadingColor},set:function(n){this.m_shadingColor=n;a(this.context,this,"ShadingColor",n)},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.m__ReferenceId,"TableCell",this._isNull),this.m__ReferenceId},enumerable:!0,configurable:!0}),l.prototype.appendHtml=function(n){u(this.context,this,"AppendHtml",OfficeExtension.OperationType.Default,[n])},l.prototype.appendImage=function(t,i,r){return new n.Image(this.context,f(this.context,this,"AppendImage",OfficeExtension.OperationType.Default,[t,i,r],!1,!0,null))},l.prototype.appendRichText=function(t){return new n.RichText(this.context,f(this.context,this,"AppendRichText",OfficeExtension.OperationType.Default,[t],!1,!0,null))},l.prototype.appendTable=function(t,i,r){return new n.Table(this.context,f(this.context,this,"AppendTable",OfficeExtension.OperationType.Default,[t,i,r],!1,!0,null))},l.prototype.clear=function(){u(this.context,this,"Clear",OfficeExtension.OperationType.Default,[])},l.prototype._KeepReference=function(){u(this.context,this,"_KeepReference",OfficeExtension.OperationType.Read,[])},l.prototype._handleResult=function(n){if(c.prototype._handleResult.call(this,n),!r(n)){var i=n;s(this,i);t(i.CellIndex)||(this.m_cellIndex=i.CellIndex);t(i.Id)||(this.m_id=i.Id);t(i.RowIndex)||(this.m_rowIndex=i.RowIndex);t(i.ShadingColor)||(this.m_shadingColor=i.ShadingColor);t(i._ReferenceId)||(this.m__ReferenceId=i._ReferenceId);h(this,i,["paragraphs","Paragraphs","parentRow","ParentRow"])}},l.prototype.load=function(n){return o(this,n),this},l.prototype._handleIdResult=function(n){(c.prototype._handleIdResult.call(this,n),r(n))||(t(n._ReferenceId)||(this.m__ReferenceId=n._ReferenceId),t(n.Id)||(this.m_id=n.Id))},l.prototype.track=function(){return this.context.trackedObjects.add(this),this},l.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},l.prototype.toJSON=function(){return{cellIndex:this.m_cellIndex,id:this.m_id,rowIndex:this.m_rowIndex,shadingColor:this.m_shadingColor}},l}(OfficeExtension.ClientObject);n.TableCell=ii;ri=function(e){function h(){e.apply(this,arguments)}return __extends(h,e),Object.defineProperty(h.prototype,"items",{get:function(){return i("items",this.m__items,"TableCellCollection",this._isNull),this.m__items},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"count",{get:function(){return i("count",this.m_count,"TableCellCollection",this._isNull),this.m_count},enumerable:!0,configurable:!0}),Object.defineProperty(h.prototype,"_ReferenceId",{get:function(){return i("_ReferenceId",this.m__ReferenceId,"TableCellCollection",this._isNull),this.m__ReferenceId},enumerable:!0,configurable:!0}),h.prototype.getItem=function(t){return new n.TableCell(this.context,c(this.context,this,[t]))},h.prototype.getItemAt=function(t){return new n.TableCell(this.context,f(this.context,this,"GetItemAt",OfficeExtension.OperationType.Read,[t],!1,!1,null))},h.prototype._KeepReference=function(){u(this.context,this,"_KeepReference",OfficeExtension.OperationType.Read,[])},h.prototype._handleResult=function(i){var u,o,f,h;if((e.prototype._handleResult.call(this,i),!r(i))&&(u=i,s(this,u),t(u.Count)||(this.m_count=u.Count),t(u._ReferenceId)||(this.m__ReferenceId=u._ReferenceId),!r(u[OfficeExtension.Constants.items])))for(this.m__items=[],o=u[OfficeExtension.Constants.items],f=0;f<o.length;f++)h=new n.TableCell(this.context,l(!0,this.context,this,o[f],f)),h._handleResult(o[f]),this.m__items.push(h)},h.prototype.load=function(n){return o(this,n),this},h.prototype._handleIdResult=function(n){(e.prototype._handleIdResult.call(this,n),r(n))||t(n._ReferenceId)||(this.m__ReferenceId=n._ReferenceId)},h.prototype.track=function(){return this.context.trackedObjects.add(this),this},h.prototype.untrack=function(){return this.context.trackedObjects.remove(this),this},h.prototype.toJSON=function(){return{count:this.m_count}},h}(OfficeExtension.ClientObject);n.TableCellCollection=ri,function(n){n.before="Before";n.after="After"}(fi=n.InsertLocation||(n.InsertLocation={})),function(n){n.left="Left";n.centered="Centered";n.right="Right";n.justified="Justified"}(ei=n.Alignment||(n.Alignment={})),function(n){n.notSelected="NotSelected";n.partialSelected="PartialSelected";n.selected="Selected"}(oi=n.Selected||(n.Selected={})),function(n){n.outline="Outline";n.image="Image";n.ink="Ink";n.other="Other"}(si=n.PageContentType||(n.PageContentType={})),function(n){n.richText="RichText";n.image="Image";n.table="Table";n.ink="Ink";n.other="Other"}(hi=n.ParagraphType||(n.ParagraphType={})),function(n){n.generalException="GeneralException"}(ci=n.ErrorCodes||(n.ErrorCodes={}))}(OneNote||(OneNote={})),function(n){function i(t,i){return OfficeExtension.ClientRequestContext._runBatch("OneNote.run",arguments,function(){return new n.RequestContext})}var t=function(t){function i(i){t.call(this,i);this.m_onenote=new n.Application(this,OfficeExtension.ObjectPathFactory.createGlobalObjectObjectPath(this));this._rootObject=this.m_onenote}return __extends(i,t),Object.defineProperty(i.prototype,"application",{get:function(){return this.m_onenote},enumerable:!0,configurable:!0}),i}(OfficeExtension.ClientRequestContext);n.RequestContext=t;n.run=i}(OneNote||(OneNote={}))