/*
    Your use of this file is governed by the Microsoft Services Agreement http://go.microsoft.com/fwlink/?LinkId=266419.

    This file also contains the following Promise implementation (with a few small modifications):
        * @overview es6-promise - a tiny implementation of Promises/A+.
        * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
        * @license   Licensed under MIT license
        *            See https://raw.githubusercontent.com/jakearchibald/es6-promise/master/LICENSE
        * @version   2.3.0
*/
var OfficeExt,__extends=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();!function(e){var t=function(){function e(){}return e.prototype.isMsAjaxLoaded=function(){return!!("undefined"!=typeof Sys&&"undefined"!=typeof Type&&Sys.StringBuilder&&"function"==typeof Sys.StringBuilder&&Type.registerNamespace&&"function"==typeof Type.registerNamespace&&Type.registerClass&&"function"==typeof Type.registerClass&&"function"==typeof Function._validateParams&&Sys.Serialization&&Sys.Serialization.JavaScriptSerializer&&"function"==typeof Sys.Serialization.JavaScriptSerializer.serialize)},e.prototype.loadMsAjaxFull=function(e){var t=("https:"===window.location.protocol.toLowerCase()?"https:":"http:")+"//ajax.aspnetcdn.com/ajax/3.5/MicrosoftAjax.js";OSF.OUtil.loadScript(t,e)},Object.defineProperty(e.prototype,"msAjaxError",{get:function(){return null==this._msAjaxError&&this.isMsAjaxLoaded()&&(this._msAjaxError=Error),this._msAjaxError},set:function(e){this._msAjaxError=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"msAjaxString",{get:function(){return null==this._msAjaxString&&this.isMsAjaxLoaded()&&(this._msAjaxString=String),this._msAjaxString},set:function(e){this._msAjaxString=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"msAjaxDebug",{get:function(){return null==this._msAjaxDebug&&this.isMsAjaxLoaded()&&(this._msAjaxDebug=Sys.Debug),this._msAjaxDebug},set:function(e){this._msAjaxDebug=e},enumerable:!0,configurable:!0}),e}();e.MicrosoftAjaxFactory=t}(OfficeExt||(OfficeExt={}));var OSFLog,Logger,OSFAriaLogger,OSFAppTelemetry,OsfMsAjaxFactory=new OfficeExt.MicrosoftAjaxFactory,OSF=OSF||{};!function(e){var t=function(){function e(e){this._internalStorage=e}return e.prototype.getItem=function(e){try{return this._internalStorage&&this._internalStorage.getItem(e)}catch(e){return null}},e.prototype.setItem=function(e,t){try{this._internalStorage&&this._internalStorage.setItem(e,t)}catch(e){}},e.prototype.clear=function(){try{this._internalStorage&&this._internalStorage.clear()}catch(e){}},e.prototype.removeItem=function(e){try{this._internalStorage&&this._internalStorage.removeItem(e)}catch(e){}},e.prototype.getKeysWithPrefix=function(e){var t=[];try{for(var n=this._internalStorage&&this._internalStorage.length||0,o=0;o<n;o++){var i=this._internalStorage.key(o);0===i.indexOf(e)&&t.push(i)}}catch(e){}return t},e.prototype.isLocalStorageAvailable=function(){return null!=this._internalStorage},e}();e.SafeStorage=t}(OfficeExt||(OfficeExt={})),OSF.XdmFieldName={ConversationUrl:"ConversationUrl",AppId:"AppId"},OSF.TestFlightStart=1e3,OSF.TestFlightEnd=1009,OSF.FlightNames={UseOriginNotUrl:0,AddinEnforceHttps:2,FirstPartyAnonymousProxyReadyCheckTimeout:6,AddinRibbonIdAllowUnknown:9,ManifestParserDevConsoleLog:15,AddinActionDefinitionHybridMode:18,UseActionIdForUILessCommand:20,RequirementSetRibbonApiOnePointTwo:21,SetFocusToTaskpaneIsEnabled:22,ShortcutInfoArrayInUserPreferenceData:23,OSFTestFlight1000:OSF.TestFlightStart,OSFTestFlight1001:OSF.TestFlightStart+1,OSFTestFlight1002:OSF.TestFlightStart+2,OSFTestFlight1003:OSF.TestFlightStart+3,OSFTestFlight1004:OSF.TestFlightStart+4,OSFTestFlight1005:OSF.TestFlightStart+5,OSFTestFlight1006:OSF.TestFlightStart+6,OSFTestFlight1007:OSF.TestFlightStart+7,OSFTestFlight1008:OSF.TestFlightStart+8,OSFTestFlight1009:OSF.TestFlightEnd},OSF.TrustUXFlightValues={TrustUXControlA:0,TrustUXExperimentB:1,TrustUXExperimentC:2},OSF.FlightTreatmentNames={AddinDialogIFrameContentWindowKillSwitch:"Microsoft.Office.SharedOnline.AddinDialogIFrameContentWindowKillSwitch",AddinTrustUXImprovement:"Microsoft.Office.SharedOnline.AddinTrustUXImprovement",AllowStorageAccessByUserActivationOnIFrameCheck:"Microsoft.Office.SharedOnline.AllowStorageAccessByUserActivationOnIFrameCheck",BlockAutoOpenAddInIfStoreDisabled:"Microsoft.Office.SharedOnline.BlockAutoOpenAddInIfStoreDisabled",CheckProxyIsReadyRetry:"Microsoft.Office.SharedOnline.OEP.CheckProxyIsReadyRetry",InsertionDialogFixesEnabled:"Microsoft.Office.SharedOnline.InsertionDialogFixesEnabled",TeachingUIForPrivateCatelogEnabled:"Microsoft.Office.SharedOnline.TeachingUIForPrivateCatelogEnabled",WopiPreinstalledAddInsEnabled:"Microsoft.Office.SharedOnline.WopiPreinstalledAddInsEnabled",WopiUseNewActivate:"Microsoft.Office.SharedOnline.WopiUseNewActivate",MosManifestEnabled:"Microsoft.Office.SharedOnline.OEP.MosManifest"},OSF.Flights=[],OSF.IntFlights={},OSF.Settings={},OSF.WindowNameItemKeys={BaseFrameName:"baseFrameName",HostInfo:"hostInfo",XdmInfo:"xdmInfo",SerializerVersion:"serializerVersion",AppContext:"appContext",Flights:"flights"},OSF.OUtil=function(){var e=-1,t="&_xdm_Info=",n="&_serializer_version=",o="&_flights=",i="_xdm_",r="#",a="class",s={},l=null,c=null,d=(new Date).getTime();function u(){var e=2147483647*Math.random();return(e^=d^(new Date).getMilliseconds()<<Math.floor(21*Math.random())).toString(16)}function f(){if(!l){try{var e=window.sessionStorage}catch(t){e=null}l=new OfficeExt.SafeStorage(e)}return l}function p(e){var t,n,o=[],i=[],r=e.length;for(t=0;t<r;t++)(n=e[t]).tabIndex?n.tabIndex>0?i.push(n):0===n.tabIndex&&o.push(n):o.push(n);return i=i.sort((function(e,t){var n=e.tabIndex-t.tabIndex;return 0===n&&(n=i.indexOf(e)-i.indexOf(t)),n})),[].concat(i,o)}return{set_entropy:function(e){if("string"==typeof e)for(var t=0;t<e.length;t+=4){for(var n=0,o=0;o<4&&t+o<e.length;o++)n=(n<<8)+e.charCodeAt(t+o);d^=n}else d^="number"==typeof e?e:2147483647*Math.random();d&=2147483647},extend:function(e,t){var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e,e.uber=t.prototype,t.prototype.constructor===Object.prototype.constructor&&(t.prototype.constructor=t)},setNamespace:function(e,t){t&&e&&!t[e]&&(t[e]={})},unsetNamespace:function(e,t){t&&e&&t[e]&&delete t[e]},serializeSettings:function(e){var t={};for(var n in e){var o=e[n];try{o=JSON?JSON.stringify(o,(function(e,t){return OSF.OUtil.isDate(this[e])?OSF.DDA.SettingsManager.DateJSONPrefix+this[e].getTime()+OSF.DDA.SettingsManager.DataJSONSuffix:t})):Sys.Serialization.JavaScriptSerializer.serialize(o),t[n]=o}catch(e){}}return t},deserializeSettings:function(e){var t={};for(var n in e=e||{}){var o=e[n];try{o=JSON?JSON.parse(o,(function(e,t){var n;return"string"==typeof t&&t&&t.length>6&&t.slice(0,5)===OSF.DDA.SettingsManager.DateJSONPrefix&&t.slice(-1)===OSF.DDA.SettingsManager.DataJSONSuffix&&(n=new Date(parseInt(t.slice(5,-1))))?n:t})):Sys.Serialization.JavaScriptSerializer.deserialize(o,!0),t[n]=o}catch(e){}}return t},loadScript:function(e,t,n){if(e&&t){var o=window.document,i=s[e];if(i)i.loaded?t():i.pendingCallbacks.push(t);else{var r=o.createElement("script");r.type="text/javascript",i={loaded:!1,pendingCallbacks:[t],timer:null},s[e]=i;var a=function(){null!=i.timer&&(clearTimeout(i.timer),delete i.timer),i.loaded=!0;for(var e=i.pendingCallbacks.length,t=0;t<e;t++){i.pendingCallbacks.shift()()}},l=function(t){delete s[e],null!=i.timer&&(clearTimeout(i.timer),delete i.timer);for(var n=i.pendingCallbacks.length,o=0;o<n;o++){i.pendingCallbacks.shift()(t)}};r.readyState?r.onreadystatechange=function(){"loaded"!=r.readyState&&"complete"!=r.readyState||(r.onreadystatechange=null,a())}:r.onload=a,r.onerror=l,n=n||3e4,i.timer=setTimeout((function(){window.navigator.userAgent.indexOf("Trident")>0?l(null):l(new Event("Script load timed out"))}),n),r.setAttribute("crossOrigin","anonymous"),r.src=e,o.getElementsByTagName("head")[0].appendChild(r)}}},loadCSS:function(e){if(e){var t=window.document,n=t.createElement("link");n.type="text/css",n.rel="stylesheet",n.href=e,t.getElementsByTagName("head")[0].appendChild(n)}},parseEnum:function(e,t){var n=t[e.trim()];if(void 0===n)throw OsfMsAjaxFactory.msAjaxDebug.trace("invalid enumeration string:"+e),OsfMsAjaxFactory.msAjaxError.argument("str");return n},delayExecutionAndCache:function(){var e={calc:arguments[0]};return function(){return e.calc&&(e.val=e.calc.apply(this,arguments),delete e.calc),e.val}},getUniqueId:function(){return(e+=1).toString()},formatString:function(){var e=arguments,t=e[0];return t.replace(/{(\d+)}/gm,(function(t,n){var o=parseInt(n,10)+1;return void 0===e[o]?"{"+n+"}":e[o]}))},generateConversationId:function(){return[u(),u(),(new Date).getTime().toString()].join("_")},getFrameName:function(e){return i+e+this.generateConversationId()},addXdmInfoAsHash:function(e,n){return OSF.OUtil.addInfoAsHash(e,t,n,!1)},addSerializerVersionAsHash:function(e,t){return OSF.OUtil.addInfoAsHash(e,n,t,!0)},addFlightsAsHash:function(e,t){return OSF.OUtil.addInfoAsHash(e,o,t,!0)},addInfoAsHash:function(e,t,n,o){var i,a=(e=e.trim()||"").split(r),s=a.shift(),l=a.join(r);return i=o?[t,encodeURIComponent(n),l].join(""):[l,t,n].join(""),[s,r,i].join("")},parseHostInfoFromWindowName:function(e,t){return OSF.OUtil.parseInfoFromWindowName(e,t,OSF.WindowNameItemKeys.HostInfo)},parseXdmInfo:function(e){var t=OSF.OUtil.parseXdmInfoWithGivenFragment(e,window.location.hash);return t||(t=OSF.OUtil.parseXdmInfoFromWindowName(e,window.name)),t},parseXdmInfoFromWindowName:function(e,t){return OSF.OUtil.parseInfoFromWindowName(e,t,OSF.WindowNameItemKeys.XdmInfo)},parseXdmInfoWithGivenFragment:function(e,n){return OSF.OUtil.parseInfoWithGivenFragment(t,i,!1,e,n)},parseSerializerVersion:function(e){var t=OSF.OUtil.parseSerializerVersionWithGivenFragment(e,window.location.hash);return isNaN(t)&&(t=OSF.OUtil.parseSerializerVersionFromWindowName(e,window.name)),t},parseSerializerVersionFromWindowName:function(e,t){return parseInt(OSF.OUtil.parseInfoFromWindowName(e,t,OSF.WindowNameItemKeys.SerializerVersion))},parseSerializerVersionWithGivenFragment:function(e,t){return parseInt(OSF.OUtil.parseInfoWithGivenFragment(n,"_serializer_version=",!0,e,t))},parseFlights:function(e){var t=OSF.OUtil.parseFlightsWithGivenFragment(e,window.location.hash);return 0==t.length&&(t=OSF.OUtil.parseFlightsFromWindowName(e,window.name)),t},checkFlight:function(e){return OSF.Flights&&OSF.Flights.indexOf(e)>=0},pushFlight:function(e){return OSF.Flights.indexOf(e)<0&&(OSF.Flights.push(e),!0)},getBooleanSetting:function(e){return OSF.OUtil.getBooleanFromDictionary(OSF.Settings,e)},getBooleanFromDictionary:function(e,t){var n=e&&t&&void 0!==e[t]&&e[t]&&("string"==typeof e[t]&&"TRUE"===e[t].toUpperCase()||"boolean"==typeof e[t]&&e[t]);return void 0!==n&&n},getIntFromDictionary:function(e,t){return e&&t&&void 0!==e[t]&&"string"==typeof e[t]?parseInt(e[t]):NaN},pushIntFlight:function(e,t){return!(e in OSF.IntFlights)&&(OSF.IntFlights[e]=t,!0)},getIntFlight:function(e){return OSF.IntFlights&&e in OSF.IntFlights?OSF.IntFlights[e]:NaN},parseFlightsFromWindowName:function(e,t){return OSF.OUtil.parseArrayWithDefault(OSF.OUtil.parseInfoFromWindowName(e,t,OSF.WindowNameItemKeys.Flights))},parseFlightsWithGivenFragment:function(e,t){return OSF.OUtil.parseArrayWithDefault(OSF.OUtil.parseInfoWithGivenFragment(o,"_flights=",!0,e,t))},parseArrayWithDefault:function(e){var t=[];try{t=JSON.parse(e)}catch(e){}return Array.isArray(t)||(t=[]),t},parseInfoFromWindowName:function(e,t,n){try{var o=JSON.parse(t),i=null!=o?o[n]:null,r=f();if(!e&&r&&null!=o){var a=o[OSF.WindowNameItemKeys.BaseFrameName]+n;i?r.setItem(a,i):i=r.getItem(a)}return i}catch(e){return null}},parseInfoWithGivenFragment:function(e,t,n,o,i){var r=i.split(e),a=r.length>1?r[r.length-1]:null;n&&null!=a&&(a.indexOf("&")>=0&&(a=a.split("&")[0]),a=decodeURIComponent(a));var s=f();if(!o&&s){var l=window.name.indexOf(t);if(l>-1){var c=window.name.indexOf(";",l);-1==c&&(c=window.name.length);var d=window.name.substring(l,c);a?s.setItem(d,a):a=s.getItem(d)}}return a},getConversationId:function(){var e=window.location.search,t=null;if(e){var n=e.indexOf("&");(t=n>0?e.substring(1,n):e.substr(1))&&"="===t.charAt(t.length-1)&&(t=t.substring(0,t.length-1))&&(t=decodeURIComponent(t))}return t},getInfoItems:function(e){var t=e.split("$");return void 0===t[1]&&(t=e.split("|")),void 0===t[1]&&(t=e.split("%7C")),t},getXdmFieldValue:function(e,t){var n="",o=OSF.OUtil.parseXdmInfo(t);if(o){var i=OSF.OUtil.getInfoItems(o);if(null!=i&&i.length>=3)switch(e){case OSF.XdmFieldName.ConversationUrl:n=i[2];break;case OSF.XdmFieldName.AppId:n=i[1]}}return n},validateParamObject:function(e,t,n){var o=Function._validateParams(arguments,[{name:"params",type:Object,mayBeNull:!1},{name:"expectedProperties",type:Object,mayBeNull:!1},{name:"callback",type:Function,mayBeNull:!0}]);if(o)throw o;for(var i in t)if(o=Function._validateParameter(e[i],t[i],i))throw o},writeProfilerMark:function(e){window.msWriteProfilerMark&&(window.msWriteProfilerMark(e),OsfMsAjaxFactory.msAjaxDebug.trace(e))},outputDebug:function(e){void 0!==OsfMsAjaxFactory&&OsfMsAjaxFactory.msAjaxDebug&&OsfMsAjaxFactory.msAjaxDebug.trace&&OsfMsAjaxFactory.msAjaxDebug.trace(e)},defineNondefaultProperty:function(e,t,n,o){for(var i in n=n||{},o){var r=o[i];null==n[r]&&(n[r]=!0)}return Object.defineProperty(e,t,n),e},defineNondefaultProperties:function(e,t,n){for(var o in t=t||{})OSF.OUtil.defineNondefaultProperty(e,o,t[o],n);return e},defineEnumerableProperty:function(e,t,n){return OSF.OUtil.defineNondefaultProperty(e,t,n,["enumerable"])},defineEnumerableProperties:function(e,t){return OSF.OUtil.defineNondefaultProperties(e,t,["enumerable"])},defineMutableProperty:function(e,t,n){return OSF.OUtil.defineNondefaultProperty(e,t,n,["writable","enumerable","configurable"])},defineMutableProperties:function(e,t){return OSF.OUtil.defineNondefaultProperties(e,t,["writable","enumerable","configurable"])},finalizeProperties:function(e,t){t=t||{};for(var n=Object.getOwnPropertyNames(e),o=n.length,i=0;i<o;i++){var r=n[i],a=Object.getOwnPropertyDescriptor(e,r);a.get||a.set||(a.writable=t.writable||!1),a.configurable=t.configurable||!1,a.enumerable=t.enumerable||!0,Object.defineProperty(e,r,a)}return e},mapList:function(e,t){var n=[];if(e)for(var o in e)n.push(t(e[o]));return n},listContainsKey:function(e,t){for(var n in e)if(t==n)return!0;return!1},listContainsValue:function(e,t){for(var n in e)if(t==e[n])return!0;return!1},augmentList:function(e,t){var n=e.push?function(t,n){e.push(n)}:function(t,n){e[t]=n};for(var o in t)n(o,t[o])},redefineList:function(e,t){for(var n in e)delete e[n];for(var o in t)e[o]=t[o]},isArray:function(e){return"[object Array]"===Object.prototype.toString.apply(e)},isFunction:function(e){return"[object Function]"===Object.prototype.toString.apply(e)},isDate:function(e){return"[object Date]"===Object.prototype.toString.apply(e)},addEventListener:function(e,t,n){e.addEventListener?e.addEventListener(t,n,!1):Sys.Browser.agent===Sys.Browser.InternetExplorer&&e.attachEvent?e.attachEvent("on"+t,n):e["on"+t]=n},removeEventListener:function(e,t,n){e.removeEventListener?e.removeEventListener(t,n,!1):Sys.Browser.agent===Sys.Browser.InternetExplorer&&e.detachEvent?e.detachEvent("on"+t,n):e["on"+t]=null},xhrGet:function(e,t,n){var o;try{(o=new XMLHttpRequest).onreadystatechange=function(){4==o.readyState&&(200==o.status?t(o.responseText):n(o.status))},o.open("GET",e,!0),o.send()}catch(e){n(e)}},encodeBase64:function(e){if(!e)return e;var t,n,o,i,r,a,s,l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",c=[],d=[],u=0,f=e.length;do{t=e.charCodeAt(u++),n=e.charCodeAt(u++),o=e.charCodeAt(u++),s=0,i=255&t,r=t>>8,a=255&n,d[s++]=i>>2,d[s++]=(3&i)<<4|r>>4,d[s++]=(15&r)<<2|a>>6,d[s++]=63&a,isNaN(n)||(i=n>>8,r=255&o,a=o>>8,d[s++]=i>>2,d[s++]=(3&i)<<4|r>>4,d[s++]=(15&r)<<2|a>>6,d[s++]=63&a),isNaN(n)?d[s-1]=64:isNaN(o)&&(d[s-2]=64,d[s-1]=64);for(var p=0;p<s;p++)c.push(l.charAt(d[p]))}while(u<f);return c.join("")},getSessionStorage:function(){return f()},getLocalStorage:function(){if(!c){try{var e=window.localStorage}catch(t){e=null}c=new OfficeExt.SafeStorage(e)}return c},convertIntToCssHexColor:function(e){return"#"+(Number(e)+16777216).toString(16).slice(-6)},attachClickHandler:function(e,t){e.onclick=function(e){t()},e.ontouchend=function(e){t(),e.preventDefault()}},getQueryStringParamValue:function(e,t){var n=Function._validateParams(arguments,[{name:"queryString",type:String,mayBeNull:!1},{name:"paramName",type:String,mayBeNull:!1}]);if(n)return OsfMsAjaxFactory.msAjaxDebug.trace("OSF_Outil_getQueryStringParamValue: Parameters cannot be null."),"";var o=new RegExp("[\\?&]"+t+"=([^&#]*)","i");return o.test(e)?o.exec(e)[1]:(OsfMsAjaxFactory.msAjaxDebug.trace("OSF_Outil_getQueryStringParamValue: The parameter is not found."),"")},getHostnamePortionForLogging:function(e){var t=Function._validateParams(arguments,[{name:"hostname",type:String,mayBeNull:!1}]);if(t)return"";var n=e.split("."),o=n.length;return o>=2?n[o-2]+"."+n[o-1]:1==o?n[0]:void 0},isiOS:function(){return!!window.navigator.userAgent.match(/(iPad|iPhone|iPod)/g)},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},startsWith:function(e,t,n){return n?e.substr(0,t.length)===t:e.startsWith(t)},containsPort:function(e,t,n,o){return this.startsWith(e,t+"//"+n+":"+o,!0)||this.startsWith(e,n+":"+o,!0)},getRedundandPortString:function(e,t){return e&&t?"https:"==t.protocol&&this.containsPort(e,"https:",t.hostname,"443")?":443":"http:"==t.protocol&&this.containsPort(e,"http:",t.hostname,"80")?":80":"":""},removeChar:function(e,t){return t<e.length-1?e.substring(0,t)+e.substring(t+1):t==e.length-1?e.substring(0,e.length-1):e},cleanUrlOfChar:function(e,t){var n;for(n=0;n<e.length;n++)if(e.charAt(n)===t){if(n+1>=e.length)return this.removeChar(e,n);if("/"===t){if("?"===e.charAt(n+1)||"#"===e.charAt(n+1))return this.removeChar(e,n)}else if("?"===t&&"#"===e.charAt(n+1))return this.removeChar(e,n)}return e},cleanUrl:function(e){if(e=this.cleanUrlOfChar(e,"/"),e=this.cleanUrlOfChar(e,"?"),"https://"==(e=this.cleanUrlOfChar(e,"#")).substr(0,8))-1!=(t=e.indexOf(":443"))&&(t!=e.length-4&&"/"!=e.charAt(t+4)&&"?"!=e.charAt(t+4)&&"#"!=e.charAt(t+4)||(e=e.substring(0,t)+e.substring(t+4)));else if("http://"==e.substr(0,7)){var t;-1!=(t=e.indexOf(":80"))&&(t!=e.length-3&&"/"!=e.charAt(t+3)&&"?"!=e.charAt(t+3)&&"#"!=e.charAt(t+3)||(e=e.substring(0,t)+e.substring(t+3)))}return e},parseUrl:function(e,t){if(void 0===t&&(t=!1),void 0!==e&&e){var n="NotHttps",o=this.isIE(),i={protocol:void 0,hostname:void 0,host:void 0,port:void 0,pathname:void 0,search:void 0,hash:void 0,isPortPartOfUrl:void 0};try{if(o){var r=document.createElement("a");if(r.href=e,!(r&&r.protocol&&r.host&&r.hostname&&r.href&&this.cleanUrl(r.href).toLowerCase()===this.cleanUrl(e).toLowerCase()))throw"InvalidUrl";if(OSF.OUtil.checkFlight(OSF.FlightNames.AddinEnforceHttps)&&t&&"https:"!=r.protocol)throw new Error(n);var a=this.getRedundandPortString(e,r);i.protocol=r.protocol,i.hostname=r.hostname,i.port=""==a?r.port:"",i.host=""!=a?r.hostname:r.host,i.pathname=(o?"/":"")+r.pathname,i.search=r.search,i.hash=r.hash,i.isPortPartOfUrl=this.containsPort(e,r.protocol,r.hostname,r.port)}else{var s=new URL(e);if(s&&s.protocol&&s.host&&s.hostname){if(OSF.OUtil.checkFlight(OSF.FlightNames.AddinEnforceHttps)&&t&&"https:"!=s.protocol)throw new Error(n);i.protocol=s.protocol,i.hostname=s.hostname,i.port=s.port,i.host=s.host,i.pathname=s.pathname,i.search=s.search,i.hash=s.hash,i.isPortPartOfUrl=s.host.lastIndexOf(":"+s.port)==s.host.length-s.port.length-1}}}catch(e){if(e.message===n)throw e}return i}},shallowCopy:function(e){if(null==e)return null;if(e instanceof Object){if(Array.isArray(e)){for(var t=[],n=0;n<e.length;n++)t.push(e[n]);return t}var o=e.constructor();for(var i in e)e.hasOwnProperty(i)&&(o[i]=e[i]);return o}return e},createObject:function(e){var t=null;if(e){t={};for(var n=e.length,o=0;o<n;o++)t[e[o].name]=e[o].value}return t},addClass:function(e,t){if(!OSF.OUtil.hasClass(e,t)){var n=e.getAttribute(a);n?e.setAttribute(a,n+" "+t):e.setAttribute(a,t)}},removeClass:function(e,t){if(OSF.OUtil.hasClass(e,t)){var n=e.getAttribute(a),o=new RegExp("(\\s|^)"+t+"(\\s|$)");n=n.replace(o,""),e.setAttribute(a,n)}},hasClass:function(e,t){var n=e.getAttribute(a);return n&&n.match(new RegExp("(\\s|^)"+t+"(\\s|$)"))},focusToFirstTabbable:function(e,t){var n,o,i=!1,r=function(e){i=!0},a=function(e,t,n){return t<0||t>e||0===t&&n?-1:t!==e-1||n?n?t-1:t+1:-1};if(e=p(e),n=t?e.length-1:0,0===e.length)return null;for(;!i&&n>=0&&n<e.length;)o=e[n],window.focus(),o.addEventListener("focus",r),o.focus(),o.removeEventListener("focus",r),n=a(e.length,n,t),i||o!==document.activeElement||(i=!0);return i?o:null},focusToNextTabbable:function(e,t,n){var o,i,r,a=!1,s=function(e){a=!0},l=function(e,t,n){return t<0||t>e||0===t&&n?-1:t!==e-1||n?n?t-1:t+1:-1};if(o=function(e,t){for(var n=0;n<e.length;n++)if(e[n]===t)return n;return-1}(e=p(e),t),(i=l(e.length,o,n))<0)return null;for(;!a&&i>=0&&i<e.length;)(r=e[i]).addEventListener("focus",s),r.focus(),r.removeEventListener("focus",s),i=l(e.length,i,n),a||r!==document.activeElement||(a=!0);return a?r:null},isNullOrUndefined:function(e){return void 0===e||null===e},stringEndsWith:function(e,t){if(!OSF.OUtil.isNullOrUndefined(e)&&!OSF.OUtil.isNullOrUndefined(t)){if(t.length>e.length)return!1;if(e.substr(e.length-t.length)===t)return!0}return!1},hashCode:function(e){var t=0;if(!OSF.OUtil.isNullOrUndefined(e))for(var n=0,o=e.length;n<o;)t=(t<<5)-t+e.charCodeAt(n++)|0;return t},getValue:function(e,t){return OSF.OUtil.isNullOrUndefined(e)?t:e},externalNativeFunctionExists:function(e){return"unknown"===e||"undefined"!==e}}}(),OSF.OUtil.Guid=function(){var e=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];return{generateNewGuid:function(){for(var t="",n=(new Date).getTime(),o=0;o<32&&n>0;o++)8!=o&&12!=o&&16!=o&&20!=o||(t+="-"),t+=e[n%16],n=Math.floor(n/16);for(;o<32;o++)8!=o&&12!=o&&16!=o&&20!=o||(t+="-"),t+=e[Math.floor(16*Math.random())];return t}}}();try{OSF.Flights=OSF.OUtil.parseFlights(!0)}catch(e){}window.OSF=OSF,OSF.OUtil.setNamespace("OSF",window),OSF.MessageIDs={FetchBundleUrl:0,LoadReactBundle:1,LoadBundleSuccess:2,LoadBundleError:3},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,OneNoteIOS:8388611,WordAndroid:8388613,PowerpointAndroid:8388614,Visio:8388615,OneNoteAndroid:4194305},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,MouseEnter:19,MouseLeave:20,UpdateTargetUrl:21,InstallCustomFunctions:22,SendTelemetryEvent:23,UninstallCustomFunctions:24,SendMessage:25,LaunchExtensionComponent:26,StopExtensionComponent:27,RestartExtensionComponent:28,EnableTaskPaneHeaderButton:29,DisableTaskPaneHeaderButton:30,TaskPaneHeaderButtonClicked:31,RemoveAppCommandsAddin:32,RefreshRibbonGallery:33,GetOriginalControlId:34,OfficeJsReady:35,InsertDevManifest:36,InsertDevManifestError:37,SendCustomerContent:38,KeyboardShortcuts:39},OSF.SharedConstants={NotificationConversationIdSuffix:"_ntf"},OSF.DialogMessageType={DialogMessageReceived:0,DialogParentMessageReceived:1,DialogClosed:12006},OSF.OfficeAppContext=function(e,t,n,o,i,r,a,s,l,c,d,u,f,p,g,m,O,S,h,D,v,A,y,F,C,M,E){this._id=e,this._appName=t,this._appVersion=n,this._appUILocale=o,this._dataLocale=i,this._docUrl=r,this._clientMode=a,this._settings=s,this._reason=l,this._osfControlType=c,this._eToken=d,this._correlationId=u,this._appInstanceId=f,this._touchEnabled=p,this._commerceAllowed=g,this._appMinorVersion=m,this._requirementMatrix=O,this._hostCustomMessage=S,this._hostFullVersion=h,this._isDialog=!1,this._clientWindowHeight=D,this._clientWindowWidth=v,this._addinName=A,this._appDomains=y,this._dialogRequirementMatrix=F,this._featureGates=C,this._officeTheme=M,this._initialDisplayMode=E,this.get_id=function(){return this._id},this.get_appName=function(){return this._appName},this.get_appVersion=function(){return this._appVersion},this.get_appUILocale=function(){return this._appUILocale},this.get_dataLocale=function(){return this._dataLocale},this.get_docUrl=function(){return this._docUrl},this.get_clientMode=function(){return this._clientMode},this.get_bindings=function(){return this._bindings},this.get_settings=function(){return this._settings},this.get_reason=function(){return this._reason},this.get_osfControlType=function(){return this._osfControlType},this.get_eToken=function(){return this._eToken},this.get_correlationId=function(){return this._correlationId},this.get_appInstanceId=function(){return this._appInstanceId},this.get_touchEnabled=function(){return this._touchEnabled},this.get_commerceAllowed=function(){return this._commerceAllowed},this.get_appMinorVersion=function(){return this._appMinorVersion},this.get_requirementMatrix=function(){return this._requirementMatrix},this.get_dialogRequirementMatrix=function(){return this._dialogRequirementMatrix},this.get_hostCustomMessage=function(){return this._hostCustomMessage},this.get_hostFullVersion=function(){return this._hostFullVersion},this.get_isDialog=function(){return this._isDialog},this.get_clientWindowHeight=function(){return this._clientWindowHeight},this.get_clientWindowWidth=function(){return this._clientWindowWidth},this.get_addinName=function(){return this._addinName},this.get_appDomains=function(){return this._appDomains},this.get_featureGates=function(){return this._featureGates},this.get_officeTheme=function(){return this._officeTheme},this.get_initialDisplayMode=function(){return this._initialDisplayMode?this._initialDisplayMode:0}},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",ControlActivation:"controlActivation"},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",PlatformType:"platformType",HostType:"hostType",ForceConsent:"forceConsent",ForceAddAccount:"forceAddAccount",AuthChallenge:"authChallenge",AllowConsentPrompt:"allowConsentPrompt",ForMSGraphAccess:"forMSGraphAccess",AllowSignInPrompt:"allowSignInPrompt",JsonPayload:"jsonPayload",EnableNewHosts:"enableNewHosts",AccountTypeFilter:"accountTypeFilter",AddinTrustId:"addinTrustId",Reserved:"reserved",Tcid:"tcid",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",HideTitle:"hideTitle",UseDeviceIndependentPixels:"useDeviceIndependentPixels",PromptBeforeOpen:"promptBeforeOpen",EnforceAppDomain:"enforceAppDomain",UrlNoHostInfo:"urlNoHostInfo",TargetOrigin:"targetOrigin",AppCommandInvocationCompletedData:"appCommandInvocationCompletedData",Base64:"base64",FormId:"formId"},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(e,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?e+"_"+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,dispidGetAccessTokenMethod:98,dispidGetAuthContextMethod:99,dispidOpenBrowserWindow:102,dispidCreateDocumentMethod:105,dispidInsertFormMethod:106,dispidDisplayRibbonCalloutAsyncMethod:109,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,dispidExecuteFeature:146,dispidQueryFeature:147,dispidMethodMax:147},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,dispidObjectDeletedEvent:13,dispidObjectSelectionChangedEvent:14,dispidObjectDataChangedEvent:15,dispidContentControlAddedEvent:16,dispidActivationStatusChangedEvent:32,dispidRichApiMessageEvent:33,dispidAppCommandInvokedEvent:39,dispidOlkItemSelectedChangedEvent:46,dispidOlkRecipientsChangedEvent:47,dispidOlkAppointmentTimeChangedEvent:48,dispidOlkRecurrenceChangedEvent:49,dispidOlkAttachmentsChangedEvent:50,dispidOlkEnhancedLocationsChangedEvent:51,dispidOlkInfobarClickedEvent:52,dispidTaskSelectionChangedEvent:56,dispidResourceSelectionChangedEvent:57,dispidViewSelectionChangedEvent:58,dispidDataNodeAddedEvent:60,dispidDataNodeReplacedEvent:61,dispidDataNodeDeletedEvent:62,dispidEventMax:63},OSF.DDA.ErrorCodeManager=function(){var e={};return{getErrorArgs:function(t){var n=e[t];return n?(n.name||(n.name=e[this.errorCodes.ooeInternalError].name),n.message||(n.message=e[this.errorCodes.ooeInternalError].message)):n=e[this.errorCodes.ooeInternalError],n},addErrorMessage:function(t,n){e[t]=n},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,ooeInvalidOrTimedOutSession:5012,ooeInvalidApiArguments:5013,ooeOperationCancelled:5014,ooeWorkbookHidden:5015,ooeWriteNotSupportedWhenModalDialogOpen:5016,ooeTooManyIncompleteRequests:5100,ooeRequestTokenUnavailable:5101,ooeActivityLimitReached:5102,ooeRequestPayloadSizeLimitExceeded:5103,ooeResponsePayloadSizeLimitExceeded:5104,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,ooeModalDialogOpen:12012,ooeDocumentIsInactive:12013,ooeDialogParentIsMinimized:12014,ooeNotSSOAgave:13e3,ooeSSOUserNotSignedIn:13001,ooeSSOUserAborted:13002,ooeSSOUnsupportedUserIdentity:13003,ooeSSOInvalidResourceUrl:13004,ooeSSOInvalidGrant:13005,ooeSSOClientError:13006,ooeSSOServerError:13007,ooeAddinIsAlreadyRequestingToken:13008,ooeSSOUserConsentNotSupportedByCurrentAddinCategory:13009,ooeSSOConnectionLost:13010,ooeResourceNotAllowed:13011,ooeSSOUnsupportedPlatform:13012,ooeSSOCallThrottled:13013,ooeAccessDenied:13990,ooeGeneralException:13991},initializeErrorMessages:function(t){e[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotSupported]={name:t.L_InvalidCoercion,message:t.L_CoercionTypeNotSupported},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetSelectionNotMatchDataType]={name:t.L_DataReadError,message:t.L_GetSelectionNotSupported},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeCoercionTypeNotMatchBinding]={name:t.L_InvalidCoercion,message:t.L_CoercionTypeNotMatchBinding},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRowColumnCounts]={name:t.L_DataReadError,message:t.L_InvalidGetRowColumnCounts},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionNotSupportCoercionType]={name:t.L_DataReadError,message:t.L_SelectionNotSupportCoercionType},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetStartRowColumn]={name:t.L_DataReadError,message:t.L_InvalidGetStartRowColumn},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialGetNotSupported]={name:t.L_DataReadError,message:t.L_NonUniformPartialGetNotSupported},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataIsTooLarge]={name:t.L_DataReadError,message:t.L_GetDataIsTooLarge},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeFileTypeNotSupported]={name:t.L_DataReadError,message:t.L_FileTypeNotSupported},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeGetDataParametersConflict]={name:t.L_DataReadError,message:t.L_GetDataParametersConflict},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetColumns]={name:t.L_DataReadError,message:t.L_InvalidGetColumns},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidGetRows]={name:t.L_DataReadError,message:t.L_InvalidGetRows},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidReadForBlankRow]={name:t.L_DataReadError,message:t.L_InvalidReadForBlankRow},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedDataObject]={name:t.L_DataWriteError,message:t.L_UnsupportedDataObject},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotWriteToSelection]={name:t.L_DataWriteError,message:t.L_CannotWriteToSelection},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchSelection]={name:t.L_DataWriteError,message:t.L_DataNotMatchSelection},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeOverwriteWorksheetData]={name:t.L_DataWriteError,message:t.L_OverwriteWorksheetData},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingSize]={name:t.L_DataWriteError,message:t.L_DataNotMatchBindingSize},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetStartRowColumn]={name:t.L_DataWriteError,message:t.L_InvalidSetStartRowColumn},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidDataFormat]={name:t.L_InvalidFormat,message:t.L_InvalidDataFormat},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchCoercionType]={name:t.L_InvalidDataObject,message:t.L_DataNotMatchCoercionType},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeDataNotMatchBindingType]={name:t.L_InvalidDataObject,message:t.L_DataNotMatchBindingType},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataIsTooLarge]={name:t.L_DataWriteError,message:t.L_SetDataIsTooLarge},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeNonUniformPartialSetNotSupported]={name:t.L_DataWriteError,message:t.L_NonUniformPartialSetNotSupported},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetColumns]={name:t.L_DataWriteError,message:t.L_InvalidSetColumns},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSetRows]={name:t.L_DataWriteError,message:t.L_InvalidSetRows},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSetDataParametersConflict]={name:t.L_DataWriteError,message:t.L_SetDataParametersConflict},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSelectionCannotBound]={name:t.L_BindingCreationError,message:t.L_SelectionCannotBound},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingNotExist]={name:t.L_InvalidBindingError,message:t.L_BindingNotExist},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeBindingToMultipleSelection]={name:t.L_BindingCreationError,message:t.L_BindingToMultipleSelection},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSelectionForBindingType]={name:t.L_BindingCreationError,message:t.L_InvalidSelectionForBindingType},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnThisBindingType]={name:t.L_InvalidBindingOperation,message:t.L_OperationNotSupportedOnThisBindingType},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeNamedItemNotFound]={name:t.L_BindingCreationError,message:t.L_NamedItemNotFound},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeMultipleNamedItemFound]={name:t.L_BindingCreationError,message:t.L_MultipleNamedItemFound},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidNamedItemForBindingType]={name:t.L_BindingCreationError,message:t.L_InvalidNamedItemForBindingType},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnknownBindingType]={name:t.L_InvalidBinding,message:t.L_UnknownBindingType},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupportedOnMatrixData]={name:t.L_InvalidBindingOperation,message:t.L_OperationNotSupportedOnMatrixData},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidColumnsForBinding]={name:t.L_InvalidBinding,message:t.L_InvalidColumnsForBinding},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingNameNotExist]={name:t.L_ReadSettingsError,message:t.L_SettingNameNotExist},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsCannotSave]={name:t.L_SaveSettingsError,message:t.L_SettingsCannotSave},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSettingsAreStale]={name:t.L_SettingsStaleError,message:t.L_SettingsAreStale},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationNotSupported]={name:t.L_HostError,message:t.L_OperationNotSupported},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError]={name:t.L_InternalError,message:t.L_InternalErrorDescription},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentReadOnly]={name:t.L_PermissionDenied,message:t.L_DocumentReadOnly},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist]={name:t.L_EventRegistrationError,message:t.L_EventHandlerNotExist},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext]={name:t.L_InvalidAPICall,message:t.L_InvalidApiCallInContext},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeShuttingDown]={name:t.L_ShuttingDown,message:t.L_ShuttingDown},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration]={name:t.L_UnsupportedEnumeration,message:t.L_UnsupportedEnumerationMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeIndexOutOfRange]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeBrowserAPINotSupported]={name:t.L_APINotSupported,message:t.L_BrowserAPINotSupported},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTimeout]={name:t.L_APICallFailed,message:t.L_RequestTimeout},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidOrTimedOutSession]={name:t.L_InvalidOrTimedOutSession,message:t.L_InvalidOrTimedOutSessionMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiArguments]={name:t.L_APICallFailed,message:t.L_InvalidApiArgumentsMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeWorkbookHidden]={name:t.L_APICallFailed,message:t.L_WorkbookHiddenMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeWriteNotSupportedWhenModalDialogOpen]={name:t.L_APICallFailed,message:t.L_WriteNotSupportedWhenModalDialogOpen},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeTooManyIncompleteRequests]={name:t.L_APICallFailed,message:t.L_TooManyIncompleteRequests},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestTokenUnavailable]={name:t.L_APICallFailed,message:t.L_RequestTokenUnavailable},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeActivityLimitReached]={name:t.L_APICallFailed,message:t.L_ActivityLimitReached},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequestPayloadSizeLimitExceeded]={name:t.L_APICallFailed,message:t.L_RequestPayloadSizeLimitExceededMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeResponsePayloadSizeLimitExceeded]={name:t.L_APICallFailed,message:t.L_ResponsePayloadSizeLimitExceededMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlNodeNotFound]={name:t.L_InvalidNode,message:t.L_CustomXmlNodeNotFound},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlError]={name:t.L_CustomXmlError,message:t.L_CustomXmlError},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlExceedQuota]={name:t.L_CustomXmlExceedQuotaName,message:t.L_CustomXmlExceedQuotaMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeCustomXmlOutOfDate]={name:t.L_CustomXmlOutOfDateName,message:t.L_CustomXmlOutOfDateMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability]={name:t.L_PermissionDenied,message:t.L_NoCapability},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeCannotNavTo]={name:t.L_CannotNavigateTo,message:t.L_CannotNavigateTo},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSpecifiedIdNotExist]={name:t.L_SpecifiedIdNotExist,message:t.L_SpecifiedIdNotExist},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavOutOfBound]={name:t.L_NavOutOfBound,message:t.L_NavOutOfBound},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellDataAmountBeyondLimits]={name:t.L_DataWriteReminder,message:t.L_CellDataAmountBeyondLimits},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeElementMissing]={name:t.L_MissingParameter,message:t.L_ElementMissing},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeProtectedError]={name:t.L_PermissionDenied,message:t.L_NoCapability},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidCellsValue]={name:t.L_InvalidValue,message:t.L_InvalidCellsValue},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidTableOptionValue]={name:t.L_InvalidValue,message:t.L_InvalidTableOptionValue},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidFormatValue]={name:t.L_InvalidValue,message:t.L_InvalidFormatValue},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeRowIndexOutOfRange]={name:t.L_OutOfRange,message:t.L_RowIndexOutOfRange},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeColIndexOutOfRange]={name:t.L_OutOfRange,message:t.L_ColIndexOutOfRange},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeFormatValueOutOfRange]={name:t.L_OutOfRange,message:t.L_FormatValueOutOfRange},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeCellFormatAmountBeyondLimits]={name:t.L_FormattingReminder,message:t.L_CellFormatAmountBeyondLimits},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeMemoryFileLimit]={name:t.L_MemoryLimit,message:t.L_CloseFileBeforeRetrieve},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeNetworkProblemRetrieveFile]={name:t.L_NetworkProblem,message:t.L_NetworkProblemRetrieveFile},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidSliceSize]={name:t.L_InvalidValue,message:t.L_SliceSizeNotSupported},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened]={name:t.L_DisplayDialogError,message:t.L_DialogAlreadyOpened},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidWidth]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidHeight]={name:t.L_IndexOutOfRange,message:t.L_IndexOutOfRange},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeNavigationError]={name:t.L_DisplayDialogError,message:t.L_NetworkProblem},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme]={name:t.L_DialogNavigateError,message:t.L_DialogInvalidScheme},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeAppDomains]={name:t.L_DisplayDialogError,message:t.L_DialogAddressNotTrusted},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS]={name:t.L_DisplayDialogError,message:t.L_DialogRequireHTTPS},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore]={name:t.L_DisplayDialogError,message:t.L_UserClickIgnore},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone]={name:t.L_DisplayDialogError,message:t.L_NewWindowCrossZoneErrorString},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeModalDialogOpen]={name:t.L_DisplayDialogError,message:t.L_ModalDialogOpen},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeDocumentIsInactive]={name:t.L_DisplayDialogError,message:t.L_DocumentIsInactive},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogParentIsMinimized]={name:t.L_DisplayDialogError,message:t.L_DialogParentIsMinimized},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeNotSSOAgave]={name:t.L_APINotSupported,message:t.L_InvalidSSOAddinMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserNotSignedIn]={name:t.L_UserNotSignedIn,message:t.L_UserNotSignedIn},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserAborted]={name:t.L_UserAborted,message:t.L_UserAbortedMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUnsupportedUserIdentity]={name:t.L_UnsupportedUserIdentity,message:t.L_UnsupportedUserIdentityMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidResourceUrl]={name:t.L_InvalidResourceUrl,message:t.L_InvalidResourceUrlMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOInvalidGrant]={name:t.L_InvalidGrant,message:t.L_InvalidGrantMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOClientError]={name:t.L_SSOClientError,message:t.L_SSOClientErrorMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOServerError]={name:t.L_SSOServerError,message:t.L_SSOServerErrorMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeAddinIsAlreadyRequestingToken]={name:t.L_AddinIsAlreadyRequestingToken,message:t.L_AddinIsAlreadyRequestingTokenMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUserConsentNotSupportedByCurrentAddinCategory]={name:t.L_SSOUserConsentNotSupportedByCurrentAddinCategory,message:t.L_SSOUserConsentNotSupportedByCurrentAddinCategoryMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOConnectionLost]={name:t.L_SSOConnectionLostError,message:t.L_SSOConnectionLostErrorMessage},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOUnsupportedPlatform]={name:t.L_APINotSupported,message:t.L_SSOUnsupportedPlatform},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeSSOCallThrottled]={name:t.L_APICallFailed,message:t.L_RequestTokenUnavailable},e[OSF.DDA.ErrorCodeManager.errorCodes.ooeOperationCancelled]={name:t.L_OperationCancelledError,message:t.L_OperationCancelledErrorMessage}}}}(),function(e){!function(e){var t=function(){};e.RequirementVersion=t;var n=function(e){this.isSetSupported=function(e,t){if(null==e)return!1;null==t&&(t=0);var n=this._setMap._sets;if(n.hasOwnProperty(e.toLowerCase())){var o=n[e.toLowerCase()];try{var i=this._getVersion(o);t+="";var r=this._getVersion(t);if(i.major>0&&i.major>r.major)return!0;if(i.major>0&&i.minor>=0&&i.major==r.major&&i.minor>=r.minor)return!0}catch(e){return!1}}return!1},this._getVersion=function(e){var t=(e+="").split("."),n=0,o=0;if(t.length<2&&isNaN(Number(e)))throw"version format incorrect";if(n=Number(t[0]),t.length>=2&&(o=Number(t[1])),isNaN(n)||isNaN(o))throw"version format incorrect";return{minor:o,major:n}},this._setMap=e,this.isSetSupported=this.isSetSupported.bind(this)};e.RequirementMatrix=n;var o=function(e){this._addSetMap=function(e){for(var t in e)this._sets[t]=e[t]},this._sets=e};e.DefaultSetRequirement=o;var i=function(e){function t(){return e.call(this,{dialogapi:1.1})||this}return __extends(t,e),t}(o);e.DefaultRequiredDialogSetRequirement=i;var r=function(e){function t(){return e.call(this,{dialogorigin:1.1})||this}return __extends(t,e),t}(o);e.DefaultOptionalDialogSetRequirement=r;var a=function(e){function t(){return e.call(this,{bindingevents:1.1,documentevents:1.1,excelapi:1.1,matrixbindings:1.1,matrixcoercion:1.1,selection:1.1,settings:1.1,tablebindings:1.1,tablecoercion:1.1,textbindings:1.1,textcoercion:1.1})||this}return __extends(t,e),t}(o);e.ExcelClientDefaultSetRequirement=a;var s=function(e){function t(){var t=e.call(this)||this;return t._addSetMap({imagecoercion:1.1}),t}return __extends(t,e),t}(a);e.ExcelClientV1DefaultSetRequirement=s;var l=function(e){function t(){return e.call(this,{mailbox:1.3})||this}return __extends(t,e),t}(o);e.OutlookClientDefaultSetRequirement=l;var c=function(e){function t(){return e.call(this,{bindingevents:1.1,compressedfile:1.1,customxmlparts:1.1,documentevents:1.1,file:1.1,htmlcoercion:1.1,matrixbindings:1.1,matrixcoercion:1.1,ooxmlcoercion:1.1,pdffile:1.1,selection:1.1,settings:1.1,tablebindings:1.1,tablecoercion:1.1,textbindings:1.1,textcoercion:1.1,textfile:1.1,wordapi:1.1})||this}return __extends(t,e),t}(o);e.WordClientDefaultSetRequirement=c;var d=function(e){function t(){var t=e.call(this)||this;return t._addSetMap({customxmlparts:1.2,wordapi:1.2,imagecoercion:1.1}),t}return __extends(t,e),t}(c);e.WordClientV1DefaultSetRequirement=d;var u=function(e){function t(){return e.call(this,{activeview:1.1,compressedfile:1.1,documentevents:1.1,file:1.1,pdffile:1.1,selection:1.1,settings:1.1,textcoercion:1.1})||this}return __extends(t,e),t}(o);e.PowerpointClientDefaultSetRequirement=u;var f=function(e){function t(){var t=e.call(this)||this;return t._addSetMap({imagecoercion:1.1}),t}return __extends(t,e),t}(u);e.PowerpointClientV1DefaultSetRequirement=f;var p=function(e){function t(){return e.call(this,{selection:1.1,textcoercion:1.1})||this}return __extends(t,e),t}(o);e.ProjectClientDefaultSetRequirement=p;var g=function(e){function t(){return e.call(this,{bindingevents:1.1,documentevents:1.1,matrixbindings:1.1,matrixcoercion:1.1,selection:1.1,settings:1.1,tablebindings:1.1,tablecoercion:1.1,textbindings:1.1,textcoercion:1.1,file:1.1})||this}return __extends(t,e),t}(o);e.ExcelWebDefaultSetRequirement=g;var m=function(e){function t(){return e.call(this,{compressedfile:1.1,documentevents:1.1,file:1.1,imagecoercion:1.1,matrixcoercion:1.1,ooxmlcoercion:1.1,pdffile:1.1,selection:1.1,settings:1.1,tablecoercion:1.1,textcoercion:1.1,textfile:1.1})||this}return __extends(t,e),t}(o);e.WordWebDefaultSetRequirement=m;var O=function(e){function t(){return e.call(this,{activeview:1.1,settings:1.1})||this}return __extends(t,e),t}(o);e.PowerpointWebDefaultSetRequirement=O;var S=function(e){function t(){return e.call(this,{mailbox:1.3})||this}return __extends(t,e),t}(o);e.OutlookWebDefaultSetRequirement=S;var h=function(e){function t(){return e.call(this,{activeview:1.1,documentevents:1.1,selection:1.1,settings:1.1,textcoercion:1.1})||this}return __extends(t,e),t}(o);e.SwayWebDefaultSetRequirement=h;var D=function(e){function t(){return e.call(this,{bindingevents:1.1,partialtablebindings:1.1,settings:1.1,tablebindings:1.1,tablecoercion:1.1})||this}return __extends(t,e),t}(o);e.AccessWebDefaultSetRequirement=D;var v=function(e){function t(){return e.call(this,{bindingevents:1.1,documentevents:1.1,matrixbindings:1.1,matrixcoercion:1.1,selection:1.1,settings:1.1,tablebindings:1.1,tablecoercion:1.1,textbindings:1.1,textcoercion:1.1})||this}return __extends(t,e),t}(o);e.ExcelIOSDefaultSetRequirement=v;var A=function(e){function t(){return e.call(this,{bindingevents:1.1,compressedfile:1.1,customxmlparts:1.1,documentevents:1.1,file:1.1,htmlcoercion:1.1,matrixbindings:1.1,matrixcoercion:1.1,ooxmlcoercion:1.1,pdffile:1.1,selection:1.1,settings:1.1,tablebindings:1.1,tablecoercion:1.1,textbindings:1.1,textcoercion:1.1,textfile:1.1})||this}return __extends(t,e),t}(o);e.WordIOSDefaultSetRequirement=A;var y=function(e){function t(){var t=e.call(this)||this;return t._addSetMap({customxmlparts:1.2,wordapi:1.2}),t}return __extends(t,e),t}(A);e.WordIOSV1DefaultSetRequirement=y;var F=function(e){function t(){return e.call(this,{activeview:1.1,compressedfile:1.1,documentevents:1.1,file:1.1,pdffile:1.1,selection:1.1,settings:1.1,textcoercion:1.1})||this}return __extends(t,e),t}(o);e.PowerpointIOSDefaultSetRequirement=F;var C=function(e){function t(){return e.call(this,{mailbox:1.1})||this}return __extends(t,e),t}(o);e.OutlookIOSDefaultSetRequirement=C;var M=function(){function e(){}return e.initializeOsfDda=function(){OSF.OUtil.setNamespace("Requirement",OSF.DDA)},e.getDefaultRequirementMatrix=function(t){this.initializeDefaultSetMatrix();var i=void 0,r=t.get_requirementMatrix();if(null!=r&&r.length>0&&"undefined"!=typeof JSON){var a=JSON.parse(t.get_requirementMatrix().toLowerCase());try{var s="dialogorigin";a.hasOwnProperty(s)||(a[s]=1.1)}catch(e){}i=new n(new o(a))}else{var l=e.getClientFullVersionString(t);i=null!=e.DefaultSetArrayMatrix&&null!=e.DefaultSetArrayMatrix[l]?new n(e.DefaultSetArrayMatrix[l]):new n(new o({}))}return i},e.getDefaultDialogRequirementMatrix=function(e){var t=void 0,a=e.get_dialogRequirementMatrix();if(null!=a&&a.length>0&&"undefined"!=typeof JSON){var s=JSON.parse(e.get_requirementMatrix().toLowerCase());t=new o(s)}else{t=new i;var l=e.get_requirementMatrix();if(null!=l&&l.length>0&&"undefined"!=typeof JSON){s=JSON.parse(l.toLowerCase());for(var c in t._sets)s.hasOwnProperty(c)&&(t._sets[c]=s[c]);var d=new r;for(var c in d._sets)s.hasOwnProperty(c)&&(t._sets[c]=s[c])}}try{var u="dialogorigin";!t._sets.hasOwnProperty(u)&&window.opener&&(t._sets[u]=1.1)}catch(e){}return new n(t)},e.getClientFullVersionString=function(e){var t=e.get_appMinorVersion(),n="",o="",i=e.get_appName();return(1024==i||4096==i||8192==i||65536==i)&&1==e.get_appVersion()?o=4096==i&&t>=15?"16.00.01":"16.00":64==e.get_appName()?o=e.get_appVersion():(n=t<10?"0"+t:""+t,o=e.get_appVersion()+"."+n),e.get_appName()+"-"+o},e.initializeDefaultSetMatrix=function(){e.DefaultSetArrayMatrix[e.Excel_RCLIENT_1600]=new a,e.DefaultSetArrayMatrix[e.Word_RCLIENT_1600]=new c,e.DefaultSetArrayMatrix[e.PowerPoint_RCLIENT_1600]=new u,e.DefaultSetArrayMatrix[e.Excel_RCLIENT_1601]=new s,e.DefaultSetArrayMatrix[e.Word_RCLIENT_1601]=new d,e.DefaultSetArrayMatrix[e.PowerPoint_RCLIENT_1601]=new f,e.DefaultSetArrayMatrix[e.Outlook_RCLIENT_1600]=new l,e.DefaultSetArrayMatrix[e.Excel_WAC_1600]=new g,e.DefaultSetArrayMatrix[e.Word_WAC_1600]=new m,e.DefaultSetArrayMatrix[e.Outlook_WAC_1600]=new S,e.DefaultSetArrayMatrix[e.Outlook_WAC_1601]=new S,e.DefaultSetArrayMatrix[e.Project_RCLIENT_1600]=new p,e.DefaultSetArrayMatrix[e.Access_WAC_1600]=new D,e.DefaultSetArrayMatrix[e.PowerPoint_WAC_1600]=new O,e.DefaultSetArrayMatrix[e.Excel_IOS_1600]=new v,e.DefaultSetArrayMatrix[e.SWAY_WAC_1600]=new h,e.DefaultSetArrayMatrix[e.Word_IOS_1600]=new A,e.DefaultSetArrayMatrix[e.Word_IOS_16001]=new y,e.DefaultSetArrayMatrix[e.PowerPoint_IOS_1600]=new F,e.DefaultSetArrayMatrix[e.Outlook_IOS_1600]=new C},e.Excel_RCLIENT_1600="1-16.00",e.Excel_RCLIENT_1601="1-16.01",e.Word_RCLIENT_1600="2-16.00",e.Word_RCLIENT_1601="2-16.01",e.PowerPoint_RCLIENT_1600="4-16.00",e.PowerPoint_RCLIENT_1601="4-16.01",e.Outlook_RCLIENT_1600="8-16.00",e.Excel_WAC_1600="16-16.00",e.Word_WAC_1600="32-16.00",e.Outlook_WAC_1600="64-16.00",e.Outlook_WAC_1601="64-16.01",e.Project_RCLIENT_1600="128-16.00",e.Access_WAC_1600="256-16.00",e.PowerPoint_WAC_1600="512-16.00",e.Excel_IOS_1600="1024-16.00",e.SWAY_WAC_1600="2048-16.00",e.Word_IOS_1600="4096-16.00",e.Word_IOS_16001="4096-16.00.01",e.PowerPoint_IOS_1600="8192-16.00",e.Outlook_IOS_1600="65536-16.00",e.DefaultSetArrayMatrix={},e}();e.RequirementsMatrixFactory=M}(e.Requirement||(e.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 e,t=!1;return{enableShortcut:function(){t||(window.Office?e=window.Office:OSF.OUtil.setNamespace("Office",window),window.Office=Microsoft.Office.WebExtension,t=!0)},disableShortcut:function(){t&&(e?window.Office=e:OSF.OUtil.unsetNamespace("Office",window),t=!1)}}}(),OSF.NamespaceManager.enableShortcut(),Microsoft.Office.WebExtension.useShortNamespace=function(e){e?OSF.NamespaceManager.enableShortcut():OSF.NamespaceManager.disableShortcut()},Microsoft.Office.WebExtension.select=function(e,t){var n;if(e&&"string"==typeof e){var o=e.indexOf("#");if(-1!=o){var i=e.substring(0,o),r=e.substring(o+1);switch(i){case"binding":case"bindings":r&&(n=new OSF.DDA.BindingPromise(r))}}}if(n)return n.onFail=t,n;if(t){var a=typeof t;if("function"!=a)throw OSF.OUtil.formatString(Strings.OfficeOM.L_CallbackNotAFunction,a);var s={};s[Microsoft.Office.WebExtension.Parameters.Callback]=t,OSF.DDA.issueAsyncResult(s,OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext,OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidApiCallInContext))}},OSF.DDA.Context=function(e,t,n,o,i){if(OSF.OUtil.defineEnumerableProperties(this,{contentLanguage:{value:e.get_dataLocale()},displayLanguage:{value:e.get_appUILocale()},touchEnabled:{value:e.get_touchEnabled()},commerceAllowed:{value:e.get_commerceAllowed()},host:{value:OfficeExt.HostName.Host.getInstance().getHost()},platform:{value:OfficeExt.HostName.Host.getInstance().getPlatform()},isDialog:{value:OSF._OfficeAppFactory.getHostInfo().isDialog},diagnostics:{value:OfficeExt.HostName.Host.getInstance().getDiagnostics(e.get_hostFullVersion())}}),n&&OSF.OUtil.defineEnumerableProperty(this,"license",{value:n}),e.ui&&OSF.OUtil.defineEnumerableProperty(this,"ui",{value:e.ui}),e.auth&&OSF.OUtil.defineEnumerableProperty(this,"auth",{value:e.auth}),e.webAuth&&OSF.OUtil.defineEnumerableProperty(this,"webAuth",{value:e.webAuth}),e.application&&OSF.OUtil.defineEnumerableProperty(this,"application",{value:e.application}),e.extensionLifeCycle&&OSF.OUtil.defineEnumerableProperty(this,"extensionLifeCycle",{value:e.extensionLifeCycle}),e.messaging&&OSF.OUtil.defineEnumerableProperty(this,"messaging",{value:e.messaging}),e.ui&&e.ui.taskPaneAction&&OSF.OUtil.defineEnumerableProperty(this,"taskPaneAction",{value:e.ui.taskPaneAction}),e.ui&&e.ui.ribbonGallery&&OSF.OUtil.defineEnumerableProperty(this,"ribbonGallery",{value:e.ui.ribbonGallery}),e.get_isDialog()){var r=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultDialogRequirementMatrix(e);OSF.OUtil.defineEnumerableProperty(this,"requirements",{value:r})}else{if(t&&OSF.OUtil.defineEnumerableProperty(this,"document",{value:t}),o){var a=o.displayName||"appOM";delete o.displayName,OSF.OUtil.defineEnumerableProperty(this,a,{value:o})}e.get_officeTheme()?OSF.OUtil.defineEnumerableProperty(this,"officeTheme",{get:function(){return e.get_officeTheme()}}):i&&OSF.OUtil.defineEnumerableProperty(this,"officeTheme",{get:function(){return i()}});r=OfficeExt.Requirement.RequirementsMatrixFactory.getDefaultRequirementMatrix(e);OSF.OUtil.defineEnumerableProperty(this,"requirements",{value:r})}},OSF.DDA.OutlookContext=function(e,t,n,o,i){OSF.DDA.OutlookContext.uber.constructor.call(this,e,null,n,o,i),t&&OSF.OUtil.defineEnumerableProperty(this,"roamingSettings",{value:t})},OSF.OUtil.extend(OSF.DDA.OutlookContext,OSF.DDA.Context),OSF.DDA.OutlookAppOm=function(e,t,n){},OSF.DDA.Application=function(e){},OSF.DDA.Document=function(e,t){var n;switch(e.get_clientMode()){case OSF.ClientMode.ReadOnly:n=Microsoft.Office.WebExtension.DocumentMode.ReadOnly;break;case OSF.ClientMode.ReadWrite:n=Microsoft.Office.WebExtension.DocumentMode.ReadWrite}t&&OSF.OUtil.defineEnumerableProperty(this,"settings",{value:t}),OSF.OUtil.defineMutableProperties(this,{mode:{value:n},url:{value:e.get_docUrl()}})},OSF.DDA.JsomDocument=function(e,t,n){OSF.DDA.JsomDocument.uber.constructor.call(this,e,n),t&&OSF.OUtil.defineEnumerableProperty(this,"bindings",{get:function(){return t}});var o=OSF.DDA.AsyncMethodNames;OSF.DDA.DispIdHost.addAsyncMethods(this,[o.GetSelectedDataAsync,o.SetSelectedDataAsync]),OSF.DDA.DispIdHost.addEventSupport(this,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 e;return OSF&&OSF._OfficeAppFactory&&(e=OSF._OfficeAppFactory.getContext()),e}}),OSF.DDA.License=function(e){OSF.OUtil.defineEnumerableProperty(this,"value",{value:e})},OSF.DDA.ApiMethodCall=function(e,t,n,o,i){var r=e.length,a=OSF.OUtil.delayExecutionAndCache((function(){return OSF.OUtil.formatString(Strings.OfficeOM.L_InvalidParameters,i)}));this.verifyArguments=function(e,t){for(var n in e){var o=e[n],i=t[n];if(o.enum)switch(typeof i){case"string":if(OSF.OUtil.listContainsValue(o.enum,i))break;case"undefined":throw OSF.DDA.ErrorCodeManager.errorCodes.ooeUnsupportedEnumeration;default:throw a()}if(o.types&&!OSF.OUtil.listContainsValue(o.types,typeof i))throw a()}},this.extractRequiredArguments=function(t,n,o){if(t.length<r)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_MissingRequiredArguments);var i,s=[];for(i=0;i<r;i++)s.push(t[i]);this.verifyArguments(e,s);var l={};for(i=0;i<r;i++){var c=e[i],d=s[i];if(c.verify)if(!c.verify(d,n,o))throw a();l[c.name]=d}return l},this.fillOptions=function(e,n,o,i){for(var r in e=e||{},t)if(!OSF.OUtil.listContainsKey(e,r)){var a=void 0,s=t[r];s.calculate&&n&&(a=s.calculate(n,o,i)),a||void 0===s.defaultValue||(a=s.defaultValue),e[r]=a}return e},this.constructCallArgs=function(e,t,i,r){var a={};for(var s in e)a[s]=e[s];for(var l in t)a[l]=t[l];for(var c in n)a[c]=n[c](i,r);return o&&(a=o(a,i,r)),a}},OSF.OUtil.setNamespace("AsyncResultEnum",OSF.DDA),OSF.DDA.AsyncResultEnum.Properties={Context:"Context",Value:"Value",Status:"Status",Error:"Error"},Microsoft.Office.WebExtension.AsyncResultStatus={Succeeded:"succeeded",Failed:"failed"},OSF.DDA.AsyncResultEnum.ErrorCode={Success:0,Failed:1},OSF.DDA.AsyncResultEnum.ErrorProperties={Name:"Name",Message:"Message",Code:"Code"},OSF.DDA.AsyncMethodNames={},OSF.DDA.AsyncMethodNames.addNames=function(e){for(var t in e){var n={};OSF.OUtil.defineEnumerableProperties(n,{id:{value:t},displayName:{value:e[t]}}),OSF.DDA.AsyncMethodNames[t]=n}},OSF.DDA.AsyncMethodCall=function(e,t,n,o,i,r,a){var s=e.length,l=new OSF.DDA.ApiMethodCall(e,t,n,r,a);this.verifyAndExtractCall=function(e,n,o){var i=l.extractRequiredArguments(e,n,o),r=function(e,n,o,i){if(e.length>s+2)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(var r,a,c=e.length-1;c>=s;c--){var d=e[c];switch(typeof d){case"object":if(r)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);r=d;break;case"function":if(a)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalFunction);a=d;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument)}}if(r=l.fillOptions(r,n,o,i),a){if(r[Microsoft.Office.WebExtension.Parameters.Callback])throw Strings.OfficeOM.L_RedundantCallbackSpecification;r[Microsoft.Office.WebExtension.Parameters.Callback]=a}return l.verifyArguments(t,r),r}(e,i,n,o);return l.constructCallArgs(i,r,n,o)},this.processResponse=function(e,t,n,r){return e==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess?o?o(t,n,r):t:i?i(e,t):OSF.DDA.ErrorCodeManager.getErrorArgs(e)},this.getCallArgs=function(e){for(var t,n,o=e.length-1;o>=s;o--){var i=e[o];switch(typeof i){case"object":t=i;break;case"function":n=i}}return t=t||{},n&&(t[Microsoft.Office.WebExtension.Parameters.Callback]=n),t}},OSF.DDA.AsyncMethodCallFactory={manufacture:function(e){var t=e.supportedOptions?OSF.OUtil.createObject(e.supportedOptions):[],n=e.privateStateCallbacks?OSF.OUtil.createObject(e.privateStateCallbacks):[];return new OSF.DDA.AsyncMethodCall(e.requiredArguments||[],t,n,e.onSucceeded,e.onFailed,e.checkCallArgs,e.method.displayName)}},OSF.DDA.AsyncMethodCalls={},OSF.DDA.AsyncMethodCalls.define=function(e){OSF.DDA.AsyncMethodCalls[e.method.id]=OSF.DDA.AsyncMethodCallFactory.manufacture(e)},OSF.DDA.Error=function(e,t,n){OSF.OUtil.defineEnumerableProperties(this,{name:{value:e},message:{value:t},code:{value:n}})},OSF.DDA.AsyncResult=function(e,t){OSF.OUtil.defineEnumerableProperties(this,{value:{value:e[OSF.DDA.AsyncResultEnum.Properties.Value]},status:{value:t?Microsoft.Office.WebExtension.AsyncResultStatus.Failed:Microsoft.Office.WebExtension.AsyncResultStatus.Succeeded}}),e[OSF.DDA.AsyncResultEnum.Properties.Context]&&OSF.OUtil.defineEnumerableProperty(this,"asyncContext",{value:e[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(e,t,n){var o=e[Microsoft.Office.WebExtension.Parameters.Callback];if(o){var i,r={};r[OSF.DDA.AsyncResultEnum.Properties.Context]=e[Microsoft.Office.WebExtension.Parameters.AsyncContext],t==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess?r[OSF.DDA.AsyncResultEnum.Properties.Value]=n:(i={},n=n||OSF.DDA.ErrorCodeManager.getErrorArgs(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError),i[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]=t||OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError,i[OSF.DDA.AsyncResultEnum.ErrorProperties.Name]=n.name||n,i[OSF.DDA.AsyncResultEnum.ErrorProperties.Message]=n.message||n),o(new OSF.DDA.AsyncResult(r,i))}},OSF.DDA.SyncMethodNames={},OSF.DDA.SyncMethodNames.addNames=function(e){for(var t in e){var n={};OSF.OUtil.defineEnumerableProperties(n,{id:{value:t},displayName:{value:e[t]}}),OSF.DDA.SyncMethodNames[t]=n}},OSF.DDA.SyncMethodCall=function(e,t,n,o,i){var r=e.length,a=new OSF.DDA.ApiMethodCall(e,t,n,o,i);this.verifyAndExtractCall=function(e,n,o){var i=a.extractRequiredArguments(e,n,o),s=function(e,n,o,i){if(e.length>r+1)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyArguments);for(var s,l=e.length-1;l>=r;l--){var c=e[l];switch(typeof c){case"object":if(s)throw OsfMsAjaxFactory.msAjaxError.parameterCount(Strings.OfficeOM.L_TooManyOptionalObjects);s=c;break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Strings.OfficeOM.L_InValidOptionalArgument)}}return s=a.fillOptions(s,n,o,i),a.verifyArguments(t,s),s}(e,i,n,o);return a.constructCallArgs(i,s,n,o)}},OSF.DDA.SyncMethodCallFactory={manufacture:function(e){var t=e.supportedOptions?OSF.OUtil.createObject(e.supportedOptions):[];return new OSF.DDA.SyncMethodCall(e.requiredArguments||[],t,e.privateStateCallbacks,e.checkCallArgs,e.method.displayName)}},OSF.DDA.SyncMethodCalls={},OSF.DDA.SyncMethodCalls.define=function(e){OSF.DDA.SyncMethodCalls[e.method.id]=OSF.DDA.SyncMethodCallFactory.manufacture(e)},OSF.DDA.ListType=function(){var e={};return{setListType:function(t,n){e[t]=n},isListType:function(t){return OSF.OUtil.listContainsKey(e,t)},getDescriptor:function(t){return e[t]}}}(),OSF.DDA.HostParameterMap=function(e,t){var n="toHost",o="fromHost",i="sourceData",r="self",a={};function s(n,i){var r=n?{}:void 0;for(var l in n){var c,d=n[l];if(OSF.DDA.ListType.isListType(l))for(var u in c=[],d)c.push(s(d[u],i));else if(OSF.OUtil.listContainsKey(a,l))c=a[l][i](d);else if(i==o&&e.preserveNesting(l))c=s(d,i);else{var f=t[l];if(f){var p=f[i];p&&void 0===(c=p[d])&&(c=d)}else c=d}r[l]=c}return r}function l(n,o,a){var l,c=t[n][a];if("toHost"==a)l=function n(o,i){var a;for(var s in i){var l;if(null!=(l=e.isComplexType(s)?n(o,t[s].toHost):o[s])){a||(a={});var c=i[s];c==r&&(c=s),a[c]=e.pack(s,l)}}return a}(s(o,a),c);else if("fromHost"==a){l=s(function n(o,a,s){for(var l in s||(s={}),a){var c,d,u=a[l];if(u==r)c=o;else{if(u==i){s[l]=o.toArray();continue}c=o[u]}if(null==c)s[l]=void 0;else if(c=e.unpack(l,c),e.isComplexType(l))d=t[l].fromHost,e.preserveNesting(l)?s[l]=n(c,d):n(c,d,s);else if(OSF.DDA.ListType.isListType(l)){(d={})[OSF.DDA.ListType.getDescriptor(l)]=r;var f=new Array(c.length);for(var p in c)f[p]=n(c[p],d);s[l]=f}else s[l]=c}return s}(o,c),a)}return l}a[Microsoft.Office.WebExtension.Parameters.Data]={toHost:function(e){if(null!=e&&void 0!==e.rows){var t={};t[OSF.DDA.TableDataProperties.TableRows]=e.rows,t[OSF.DDA.TableDataProperties.TableHeaders]=e.headers,e=t}return e},fromHost:function(e){return e}},a[Microsoft.Office.WebExtension.Parameters.SampleData]=a[Microsoft.Office.WebExtension.Parameters.Data],t||(t={}),this.addMapping=function(e,n){var o,i;if(n.map)for(var a in i={},o=n.map){var s=o[a];s==r&&(s=a),i[s]=a}else o=n.toHost,i=n.fromHost;var l=t[e];if(l){var c=l.toHost;for(var d in c)o[d]=c[d];for(var u in c=l.fromHost)i[u]=c[u]}else l=t[e]={};l.toHost=o,l.fromHost=i},this.toHost=function(e,t){return l(e,t,n)},this.fromHost=function(e,t){return l(e,t,o)},this.self=r,this.sourceData=i,this.addComplexType=function(t){e.addComplexType(t)},this.getDynamicType=function(t){return e.getDynamicType(t)},this.setDynamicType=function(t,n){e.setDynamicType(t,n)},this.dynamicTypes=a,this.doMapValues=function(e,t){return s(e,t)}},OSF.DDA.SpecialProcessor=function(e,t){this.addComplexType=function(t){e.push(t)},this.getDynamicType=function(e){return t[e]},this.setDynamicType=function(e,n){t[e]=n},this.isComplexType=function(t){return OSF.OUtil.listContainsValue(e,t)},this.isDynamicType=function(e){return OSF.OUtil.listContainsKey(t,e)},this.preserveNesting=function(e){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,e)},this.pack=function(e,n){return this.isDynamicType(e)?t[e].toHost(n):n},this.unpack=function(e,n){return this.isDynamicType(e)?t[e].fromHost(n):n}},OSF.DDA.getDecoratedParameterMap=function(e,t){var n=new OSF.DDA.HostParameterMap(e);n.self;function o(e){var t=null;if(e){t={};for(var n=e.length,o=0;o<n;o++)t[e[o].name]=e[o].value}return t}for(var i in n.define=function(e){var t={},i=o(e.toHost);e.invertible?t.map=i:e.canonical?t.toHost=t.fromHost=i:(t.toHost=i,t.fromHost=o(e.fromHost)),n.addMapping(e.type,t),e.isComplexType&&n.addComplexType(e.type)},t)n.define(t[i]);return n},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(e,t){var n={},o=OSF.DDA.AsyncMethodNames,i=OSF.DDA.MethodDispId,r={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,GetAccessTokenAsync:i.dispidGetAccessTokenMethod,GetAuthContextAsync:i.dispidGetAuthContextMethod,ExecuteRichApiRequestAsync:i.dispidExecuteRichApiRequestMethod,AppCommandInvocationCompletedAsync:i.dispidAppCommandInvocationCompletedMethod,CloseContainerAsync:i.dispidCloseContainerMethod,OpenBrowserWindow:i.dispidOpenBrowserWindow,CreateDocumentAsync:i.dispidCreateDocumentMethod,InsertFormAsync:i.dispidInsertFormMethod,ExecuteFeature:i.dispidExecuteFeature,QueryFeature:i.dispidQueryFeature,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};for(var a in r)o[a]&&(n[o[a].id]=r[a]);o=OSF.DDA.SyncMethodNames;var s={MessageParent:(i=OSF.DDA.MethodDispId).dispidMessageParentMethod,SendMessage:i.dispidSendMessageMethod};for(var a in s)o[a]&&(n[o[a].id]=s[a]);o=Microsoft.Office.WebExtension.EventType;var l={SettingsChanged:(i=OSF.DDA.EventDispId).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,ObjectDeleted:i.dispidObjectDeletedEvent,ObjectSelectionChanged:i.dispidObjectSelectionChangedEvent,ObjectDataChanged:i.dispidObjectDataChangedEvent,ContentControlAdded:i.dispidContentControlAddedEvent,RichApiMessage:i.dispidRichApiMessageEvent,ItemChanged:i.dispidOlkItemSelectedChangedEvent,RecipientsChanged:i.dispidOlkRecipientsChangedEvent,AppointmentTimeChanged:i.dispidOlkAppointmentTimeChangedEvent,RecurrenceChanged:i.dispidOlkRecurrenceChangedEvent,AttachmentsChanged:i.dispidOlkAttachmentsChangedEvent,EnhancedLocationsChanged:i.dispidOlkEnhancedLocationsChangedEvent,InfobarClicked:i.dispidOlkInfobarClickedEvent,TaskSelectionChanged:i.dispidTaskSelectionChangedEvent,ResourceSelectionChanged:i.dispidResourceSelectionChangedEvent,ViewSelectionChanged:i.dispidViewSelectionChangedEvent,DataNodeInserted:i.dispidDataNodeAddedEvent,DataNodeReplaced:i.dispidDataNodeReplacedEvent,DataNodeDeleted:i.dispidDataNodeDeletedEvent};for(var c in l)o[c]&&(n[o[c]]=l[c]);function d(e){return e==OSF.DDA.EventDispId.dispidObjectDeletedEvent||e==OSF.DDA.EventDispId.dispidObjectSelectionChangedEvent||e==OSF.DDA.EventDispId.dispidObjectDataChangedEvent||e==OSF.DDA.EventDispId.dispidContentControlAddedEvent}function u(e,t,n,o){if("number"!=typeof e)throw e;o||(o=t.getCallArgs(n)),OSF.DDA.issueAsyncResult(o,e,OSF.DDA.ErrorCodeManager.getErrorArgs(e))}this[OSF.DDA.DispIdHost.Methods.InvokeMethod]=function(o,i,r,a){var s;try{var l=o.id,c=OSF.DDA.AsyncMethodCalls[l];s=c.verifyAndExtractCall(i,r,a);var d=n[l],f=e(l),p=null;if(window.Excel&&window.Office.context.requirements.isSetSupported("RedirectV1Api")&&(window.Excel._RedirectV1APIs=!0),window.Excel&&window.Excel._RedirectV1APIs&&(p=window.Excel._V1APIMap[l])){var g=OSF.OUtil.shallowCopy(s);delete g[Microsoft.Office.WebExtension.Parameters.AsyncContext],p.preprocess&&(g=p.preprocess(g));var m=new window.Excel.RequestContext,O=p.call(m,g);m.sync().then((function(){var e=O.value,t=e.status;delete e.status,delete e["@odata.type"],p.postprocess&&(e=p.postprocess(e,g)),0!=t&&(e=OSF.DDA.ErrorCodeManager.getErrorArgs(t)),OSF.DDA.issueAsyncResult(s,t,e)})).catch((function(e){OSF.DDA.issueAsyncResult(s,OSF.DDA.ErrorCodeManager.errorCodes.ooeFailure,null)}))}else{var S;S=t.toHost?t.toHost(d,s):s;var h=(new Date).getTime();f[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]({dispId:d,hostCallArgs:S,onCalling:function(){},onReceiving:function(){},onComplete:function(e,n){var o;o=e==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess&&t.fromHost?t.fromHost(d,n):n;var i=c.processResponse(e,o,r,s);OSF.DDA.issueAsyncResult(s,e,i),!OSF.AppTelemetry||OSF.ConstantNames&&OSF.ConstantNames.IsCustomFunctionsRuntime||OSF.AppTelemetry.onMethodDone(d,S,Math.abs((new Date).getTime()-h),e)}})}}catch(e){u(e,c,i,s)}},this[OSF.DDA.DispIdHost.Methods.AddEventHandler]=function(o,i,r,a){var s,l,c,f=!1;function p(e){var t;e==OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess&&((f?i.addObjectEventHandler(l,s[Microsoft.Office.WebExtension.Parameters.Id],c):i.addEventHandler(l,c))||(e=OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerAdditionFailed));e!=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess&&(t=OSF.DDA.ErrorCodeManager.getErrorArgs(e)),OSF.DDA.issueAsyncResult(s,e,t)}try{var g=OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.AddHandlerAsync.id];if(s=g.verifyAndExtractCall(o,r,i),l=s[Microsoft.Office.WebExtension.Parameters.EventType],c=s[Microsoft.Office.WebExtension.Parameters.Handler],a)return void p(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess);var m=n[l],O=(f=d(m))?s[Microsoft.Office.WebExtension.Parameters.Id]:r.id||"";if(0==(f?i.getObjectEventHandlerCount(l,O):i.getEventHandlerCount(l)))(0,e(l)[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync])({eventType:l,dispId:m,targetId:O,onCalling:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall)},onReceiving:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse)},onComplete:p,onEvent:function(e){var n=t.fromHost(m,e);f?i.fireObjectEvent(O,OSF.DDA.OMFactory.manufactureEventArgs(l,O,n)):i.fireEvent(OSF.DDA.OMFactory.manufactureEventArgs(l,r,n))}});else p(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)}catch(e){u(e,g,o,s)}},this[OSF.DDA.DispIdHost.Methods.RemoveEventHandler]=function(t,o,i){var r,a,s,l=!1;function c(e){var t;e!=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess&&(t=OSF.DDA.ErrorCodeManager.getErrorArgs(e)),OSF.DDA.issueAsyncResult(r,e,t)}try{var f=OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.RemoveHandlerAsync.id];a=(r=f.verifyAndExtractCall(t,i,o))[Microsoft.Office.WebExtension.Parameters.EventType],s=r[Microsoft.Office.WebExtension.Parameters.Handler];var p,g,m=n[a],O=(l=d(m))?r[Microsoft.Office.WebExtension.Parameters.Id]:i.id||"";null===s?(g=l?o.clearObjectEventHandlers(a,O):o.clearEventHandlers(a),p=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess):p=(g=l?o.removeObjectEventHandler(a,O,s):o.removeEventHandler(a,s))?OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess:OSF.DDA.ErrorCodeManager.errorCodes.ooeEventHandlerNotExist;var S=l?o.getObjectEventHandlerCount(a,O):o.getEventHandlerCount(a);if(g&&0==S)(0,e(a)[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync])({eventType:a,dispId:m,targetId:O,onCalling:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall)},onReceiving:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse)},onComplete:c});else c(p)}catch(e){u(e,f,t,r)}},this[OSF.DDA.DispIdHost.Methods.OpenDialog]=function(o,i,r,a){var s,l,c=null,d=Microsoft.Office.WebExtension.EventType.DialogMessageReceived,f=Microsoft.Office.WebExtension.EventType.DialogEventReceived;function p(e){if(e!=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)n=OSF.DDA.ErrorCodeManager.getErrorArgs(e);else{var t={};t[Microsoft.Office.WebExtension.Parameters.Id]=l,t[Microsoft.Office.WebExtension.Parameters.Data]=i;var n=c.processResponse(e,t,r,s);OSF.DialogShownStatus.hasDialogShown=!0,i.clearEventHandlers(d),i.clearEventHandlers(f)}OSF.DDA.issueAsyncResult(s,e,n)}try{if(null!=d&&null!=f||p(OSF.DDA.ErrorCodeManager.ooeOperationNotSupported),a){if(null==OSF.DDA.AsyncMethodNames.DisplayModalDialogAsync)return void p(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError);c=OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.DisplayModalDialogAsync.id]}else{if(null==OSF.DDA.AsyncMethodNames.DisplayDialogAsync)return void p(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError);c=OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.DisplayDialogAsync.id]}s=c.verifyAndExtractCall(o,r,i);var g=n[d],m=e(d),O=null!=m[OSF.DDA.DispIdHost.Delegates.OpenDialog]?m[OSF.DDA.DispIdHost.Delegates.OpenDialog]:m[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync];s.isModal=a,l=JSON.stringify(s),OSF.DialogShownStatus.hasDialogShown||(i.clearQueuedEvent(d),i.clearQueuedEvent(f),i.clearQueuedEvent(Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived)),O({eventType:d,dispId:g,targetId:l,onCalling:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall)},onReceiving:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse)},onComplete:p,onEvent:function(e){var n=t.fromHost(g,e),o=OSF.DDA.OMFactory.manufactureEventArgs(d,r,n);if(o.type==f){var a=OSF.DDA.ErrorCodeManager.getErrorArgs(o.error),s={};s[OSF.DDA.AsyncResultEnum.ErrorProperties.Code]=status||OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError,s[OSF.DDA.AsyncResultEnum.ErrorProperties.Name]=a.name||a,s[OSF.DDA.AsyncResultEnum.ErrorProperties.Message]=a.message||a,o.error=new OSF.DDA.Error(s[OSF.DDA.AsyncResultEnum.ErrorProperties.Name],s[OSF.DDA.AsyncResultEnum.ErrorProperties.Message],s[OSF.DDA.AsyncResultEnum.ErrorProperties.Code])}i.fireOrQueueEvent(o),n[OSF.DDA.PropertyDescriptors.MessageType]==OSF.DialogMessageType.DialogClosed&&(i.clearEventHandlers(d),i.clearEventHandlers(f),i.clearEventHandlers(Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived),OSF.DialogShownStatus.hasDialogShown=!1)}})}catch(e){u(e,c,o,s)}},this[OSF.DDA.DispIdHost.Methods.CloseDialog]=function(t,o,i,r){var a,s,l,c=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess;try{var d=OSF.DDA.AsyncMethodCalls[OSF.DDA.AsyncMethodNames.CloseAsync.id];a=d.verifyAndExtractCall(t,r,i),s=Microsoft.Office.WebExtension.EventType.DialogMessageReceived,l=Microsoft.Office.WebExtension.EventType.DialogEventReceived,i.clearEventHandlers(s),i.clearEventHandlers(l);var f=n[s],p=e(s);(null!=p[OSF.DDA.DispIdHost.Delegates.CloseDialog]?p[OSF.DDA.DispIdHost.Delegates.CloseDialog]:p[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync])({eventType:s,dispId:f,targetId:o,onCalling:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall)},onReceiving:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse)},onComplete:function(e){c=e,OSF.DialogShownStatus.hasDialogShown=!1}})}catch(e){u(e,d,t,a)}if(c!=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)throw OSF.OUtil.formatString(Strings.OfficeOM.L_FunctionCallFailed,OSF.DDA.AsyncMethodNames.CloseAsync.displayName,c)},this[OSF.DDA.DispIdHost.Methods.MessageParent]=function(t,o){var i=OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.MessageParent.id].verifyAndExtractCall(t,o,{});return(0,e(OSF.DDA.SyncMethodNames.MessageParent.id)[OSF.DDA.DispIdHost.Delegates.MessageParent])({dispId:n[OSF.DDA.SyncMethodNames.MessageParent.id],hostCallArgs:i,onCalling:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall)},onReceiving:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse)}})},this[OSF.DDA.DispIdHost.Methods.SendMessage]=function(t,o,i){var r=OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.SendMessage.id].verifyAndExtractCall(t,i,{});return(0,e(OSF.DDA.SyncMethodNames.SendMessage.id)[OSF.DDA.DispIdHost.Delegates.SendMessage])({dispId:n[OSF.DDA.SyncMethodNames.SendMessage.id],hostCallArgs:r,onCalling:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.IssueCall)},onReceiving:function(){OSF.OUtil.writeProfilerMark(OSF.HostCallPerfMarker.ReceiveResponse)}})}},OSF.DDA.DispIdHost.addAsyncMethods=function(e,t,n){for(var o in t){var i=t[o],r=i.displayName;e[r]||OSF.OUtil.defineEnumerableProperty(e,r,{value:function(t){return function(){var o=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.InvokeMethod];o(t,arguments,e,n)}}(i)})}},OSF.DDA.DispIdHost.addEventSupport=function(e,t,n){var o=OSF.DDA.AsyncMethodNames.AddHandlerAsync.displayName,i=OSF.DDA.AsyncMethodNames.RemoveHandlerAsync.displayName;e[o]||OSF.OUtil.defineEnumerableProperty(e,o,{value:function(){var o=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.AddEventHandler];o(arguments,t,e,n)}}),e[i]||OSF.OUtil.defineEnumerableProperty(e,i,{value:function(){var n=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.RemoveEventHandler];n(arguments,t,e)}})},OSF.ShowWindowDialogParameterKeys={Url:"url",Width:"width",Height:"height",DisplayInIframe:"displayInIframe",HideTitle:"hideTitle",UseDeviceIndependentPixels:"useDeviceIndependentPixels",PromptBeforeOpen:"promptBeforeOpen",EnforceAppDomain:"enforceAppDomain",UrlNoHostInfo:"urlNoHostInfo"},OSF.HostThemeButtonStyleKeys={ButtonBorderColor:"buttonBorderColor",ButtonBackgroundColor:"buttonBackgroundColor"},OSF.OmexPageParameterKeys={AppName:"client",AppVersion:"cv",AppUILocale:"ui",AppDomain:"appDomain",StoreLocator:"rs",AssetId:"assetid",NotificationType:"notificationType",AppCorrelationId:"corr",AuthType:"authType",AppId:"appid",Scopes:"scopes"},OSF.AuthType={Anonymous:0,MSA:1,OrgId:2,ADAL:3},OSF.OmexMessageKeys={MessageType:"messageType",MessageValue:"messageValue"},OSF.OmexRemoveAddinMessageKeys={RemoveAddinResultCode:"resultCode",RemoveAddinResultValue:"resultValue"},OSF.OmexRemoveAddinResultCode={Success:0,ClientError:400,ServerError:500,UnknownError:600},function(e){!function(e){function t(e){if("undefined"!=typeof JSON)try{return JSON.stringify(e)}catch(e){}return""}function n(){try{var e=window.navigator.userAgent;return e.indexOf("MSIE ")>-1||e.indexOf("Trident/")>-1||e.indexOf("Edge/")>-1}catch(e){return o("Error happens in isInternetExplorer.",e),!1}}function o(e,n){OsfMsAjaxFactory.msAjaxDebug.trace(e+" Exception details: "+t(n))}e.parseAppContextFromWindowName=function(e,t){return OSF.OUtil.parseInfoFromWindowName(e,t,OSF.WindowNameItemKeys.AppContext)},e.serializeObjectToString=t,e.isHostTrusted=function(){return new RegExp("^https://[a-z0-9-]+.(officeapps.live|officeapps-df.live|partner.officewebapps).com/").test(OSF.getClientEndPoint()._targetUrl.toLowerCase())},e.addHostInfoAsQueryParam=function(e,t){if(!e)return null;var n,o="#",i=(e=e.trim()||"").split(o),r=i.shift(),a=i.join(o),s=r.split("?");return s.length>1?n=r+"&_host_Info="+t:s.length>0&&(n=r+"?_host_Info="+t),a?[n,o,a].join(""):n},e.getDomainForUrl=function(e){if(!e)return null;var t=document.createElement("a");return t.href=e,t.protocol+"//"+t.host},e.shouldUseLocalStorageToPassMessage=function(){try{for(var e=["Windows NT 6.1","Windows NT 6.2","Windows NT 6.3","Windows NT 10.0"],t=window.navigator.userAgent,i=0,r=e.length;i<r;i++)if(t.indexOf(e[i])>-1)return n();return!1}catch(e){return o("Error happens in shouldUseLocalStorageToPassMessage.",e),!1}},e.isInternetExplorer=n,e.removeMatchesFromLocalStorage=function(e){for(var t=OSF.OUtil.getLocalStorage(),n=t.getKeysWithPrefix(""),o=0,i=n.length;o<i;o++)for(var r=n[o],a=0,s=e.length;a<s;a++)if(e[a].test(r)){t.removeItem(r);break}},e.logExceptionToBrowserConsole=o,e.isTeamsWebView=function(){var e=navigator.userAgent;return/Teams\/((?:(\d+)\.)?(?:(\d+)\.)?(?:(\d+)\.\d+)).* Electron\/((?:(\d+)\.)?(?:(\d+)\.)?(?:(\d+)\.\d+))/.test(e)},e.getHostSecure=function(e){if(void 0!==e&&e){var t=void 0,n="https:";try{var o=new URL(e);if(o&&(t=o.host),!o.protocol)throw"fallback";if(o.protocol!==n)return}catch(o){try{var i=document.createElement("a");if(i.href=e,i.protocol!==n)return;var r=e.match(new RegExp("^https://[^/?#]+","i")),a=r&&1==r.length?r[0].toLowerCase():"",s=(i.protocol+"//"+i.hostname).toLowerCase();(i.protocol+"//"+i.host).toLowerCase()!==a&&s!=a||(t="443"==i.port?i.hostname:i.host)}catch(e){return}}return t?t.toLowerCase():void 0}};var i=function(){function e(){}return e.GatedCacheKeyPrefix="__OSF_GATED_OMEX.",e.AnonymousCacheKeyPrefix="__OSF_ANONYMOUS_OMEX.",e.UngatedCacheKeyPrefix="__OSF_OMEX.",e.ActivatedCacheKeyPrefix="__OSF_RUNTIME_.Activated.",e.AppinstallAuthenticated="appinstall_authenticated.",e.Entitlement="entitle.",e.AppState="appState.",e.AppDetails="appDetails.",e.AppInstallInfo="appInstallInfo.",e.AuthenticatedAppInstallInfoCacheKey=e.GatedCacheKeyPrefix+e.AppinstallAuthenticated+"{0}.{1}.{2}.{3}",e.EntitlementsKey=e.Entitlement+"{0}.{1}",e.AppStateCacheKey="{0}"+e.AppState+"{1}.{2}",e.AppDetailKey="{0}"+e.AppDetails+"{1}",e.AppInstallInfoKey="{0}"+e.AppInstallInfo+"{1}.{2}",e.ActivatedCacheKey=e.ActivatedCacheKeyPrefix+"{0}.{1}.{2}",e}();e.CacheConstants=i}(e.WACUtils||(e.WACUtils={}))}(OfficeExt||(OfficeExt={})),function(e){var t=function(){function e(){}return e.isInstanceOfType=function(e,t){if(null==t)return!1;if(t instanceof e)return!0;var n=t.constructor;return n&&"function"==typeof n&&n.__typeName&&"Object"!==n.__typeName||(n=Object),!(n!==e)||n.__typeName&&e.__typeName&&n.__typeName===e.__typeName},e}();e.MsAjaxTypeHelper=t;var n=function(){function e(){}return e.create=function(e,t){var n=new Error(e);if(n.message=e,t)for(var o in t)n[o]=t[o];return n.popStackFrame(),n},e.parameterCount=function(t){var n="Sys.ParameterCountException: "+(t||"Parameter count mismatch."),o=e.create(n,{name:"Sys.ParameterCountException"});return o.popStackFrame(),o},e.argument=function(t,n){var i="Sys.ArgumentException: "+(n||"Value does not fall within the expected range.");t&&(i+="\n"+o.format("Parameter name: {0}",t));var r=e.create(i,{name:"Sys.ArgumentException",paramName:t});return r.popStackFrame(),r},e.argumentNull=function(t,n){var i="Sys.ArgumentNullException: "+(n||"Value cannot be null.");t&&(i+="\n"+o.format("Parameter name: {0}",t));var r=e.create(i,{name:"Sys.ArgumentNullException",paramName:t});return r.popStackFrame(),r},e.argumentOutOfRange=function(t,n,i){var r="Sys.ArgumentOutOfRangeException: "+(i||"Specified argument was out of the range of valid values.");t&&(r+="\n"+o.format("Parameter name: {0}",t)),null!=n&&(r+="\n"+o.format("Actual value was {0}.",n));var a=e.create(r,{name:"Sys.ArgumentOutOfRangeException",paramName:t,actualValue:n});return a.popStackFrame(),a},e.argumentType=function(t,n,i,r){var a="Sys.ArgumentTypeException: ";a+=r||(n&&i?o.format("Object of type '{0}' cannot be converted to type '{1}'.",n.getName?n.getName():n,i.getName?i.getName():i):"Object cannot be converted to the required type."),t&&(a+="\n"+o.format("Parameter name: {0}",t));var s=e.create(a,{name:"Sys.ArgumentTypeException",paramName:t,actualType:n,expectedType:i});return s.popStackFrame(),s},e.argumentUndefined=function(t,n){var i="Sys.ArgumentUndefinedException: "+(n||"Value cannot be undefined.");t&&(i+="\n"+o.format("Parameter name: {0}",t));var r=e.create(i,{name:"Sys.ArgumentUndefinedException",paramName:t});return r.popStackFrame(),r},e.invalidOperation=function(t){var n="Sys.InvalidOperationException: "+(t||"Operation is not valid due to the current state of the object."),o=e.create(n,{name:"Sys.InvalidOperationException"});return o.popStackFrame(),o},e}();e.MsAjaxError=n;var o=function(){function e(){}return e.format=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var o=e;return o.replace(/{(\d+)}/gm,(function(e,n){var o=parseInt(n,10);return void 0===t[o]?"{"+n+"}":t[o]}))},e.startsWith=function(e,t){return e.substr(0,t.length)===t},e}();e.MsAjaxString=o;var i=function(){function e(){}return e.trace=function(e){"undefined"!=typeof Debug&&Debug.writeln&&Debug.writeln(e),window.console&&window.console.log&&window.console.log(e),window.opera&&window.opera.postError&&window.opera.postError(e),window.debugService&&window.debugService.trace&&window.debugService.trace(e);var t=document.getElementById("TraceConsole");t&&"TEXTAREA"===t.tagName.toUpperCase()&&(t.innerHTML+=e+"\n")},e}();if(e.MsAjaxDebug=i,!OsfMsAjaxFactory.isMsAjaxLoaded()){var r=function(e,t,n){void 0!==e.__typeName&&null!==e.__typeName||(e.__typeName=t),void 0!==e.__class&&null!==e.__class||(e.__class=n)};r(Function,"Function",!0),r(Error,"Error",!0),r(Object,"Object",!0),r(String,"String",!0),r(Boolean,"Boolean",!0),r(Date,"Date",!0),r(Number,"Number",!0),r(RegExp,"RegExp",!0),r(Array,"Array",!0),Function.createCallback||(Function.createCallback=function(e,t){var n=Function._validateParams(arguments,[{name:"method",type:Function},{name:"context",mayBeNull:!0}]);if(n)throw n;return function(){var n=arguments.length;if(n>0){for(var o=[],i=0;i<n;i++)o[i]=arguments[i];return o[n]=t,e.apply(this,o)}return e.call(this,t)}}),Function.createDelegate||(Function.createDelegate=function(e,t){var n=Function._validateParams(arguments,[{name:"instance",mayBeNull:!0},{name:"method",type:Function}]);if(n)throw n;return function(){return t.apply(e,arguments)}}),Function._validateParams||(Function._validateParams=function(e,t,n){var o,i=t.length;if(n=n||void 0===n,o=Function._validateParameterCount(e,t,n))return o.popStackFrame(),o;for(var r=0,a=e.length;r<a;r++){var s=t[Math.min(r,i-1)],l=s.name;if(s.parameterArray)l+="["+(r-i+1)+"]";else if(!n&&r>=i)break;if(o=Function._validateParameter(e[r],s,l))return o.popStackFrame(),o}return null}),Function._validateParameterCount||(Function._validateParameterCount=function(e,t,o){var i,r,a=t.length,s=e.length;if(s<a){var l=a;for(i=0;i<a;i++){var c=t[i];(c.optional||c.parameterArray)&&l--}s<l&&(r=!0)}else if(o&&s>a)for(r=!0,i=0;i<a;i++)if(t[i].parameterArray){r=!1;break}if(r){var d=n.parameterCount();return d.popStackFrame(),d}return null}),Function._validateParameter||(Function._validateParameter=function(e,t,n){var o,i=t.type,r=!!t.integer,a=!!t.domElement,s=!!t.mayBeNull;if(o=Function._validateParameterType(e,i,r,a,s,n))return o.popStackFrame(),o;var l=t.elementType,c=!!t.elementMayBeNull;if(i===Array&&null!=e&&(l||!c))for(var d=!!t.elementInteger,u=!!t.elementDomElement,f=0;f<e.length;f++){var p=e[f];if(o=Function._validateParameterType(p,l,d,u,c,n+"["+f+"]"))return o.popStackFrame(),o}return null}),Function._validateParameterType||(Function._validateParameterType=function(t,n,o,i,r,a){var s;return void 0===t?r?null:((s=e.MsAjaxError.argumentUndefined(a)).popStackFrame(),s):null===t?r?null:((s=e.MsAjaxError.argumentNull(a)).popStackFrame(),s):n&&!e.MsAjaxTypeHelper.isInstanceOfType(n,t)?((s=e.MsAjaxError.argumentType(a,typeof t,n)).popStackFrame(),s):null}),window.Type||(window.Type=Function),Type.registerNamespace||(Type.registerNamespace=function(e){for(var t=e.split("."),n=window,o=0;o<t.length;o++)n[t[o]]=n[t[o]]||{},n=n[t[o]]}),Type.prototype.registerClass||(Type.prototype.registerClass=function(e){({})}),"undefined"==typeof Sys&&Type.registerNamespace("Sys"),Error.prototype.popStackFrame||(Error.prototype.popStackFrame=function(){if(0!==arguments.length)throw n.parameterCount();if(void 0!==this.stack&&null!==this.stack&&void 0!==this.fileName&&null!==this.fileName&&void 0!==this.lineNumber&&null!==this.lineNumber){for(var e=this.stack.split("\n"),t=e[0],o=this.fileName+":"+this.lineNumber;null!=t&&-1===t.indexOf(o);)e.shift(),t=e[0];var i=e[1];if(null!=i){var r=i.match(/@(.*):(\d+)$/);null!=r&&(this.fileName=r[1],this.lineNumber=parseInt(r[2]),e.shift(),this.stack=e.join("\n"))}}}),OsfMsAjaxFactory.msAjaxError=n,OsfMsAjaxFactory.msAjaxString=o,OsfMsAjaxFactory.msAjaxDebug=i}}(OfficeExt||(OfficeExt={})),OSF.OUtil.setNamespace("Microsoft",window),OSF.OUtil.setNamespace("Office",Microsoft),OSF.OUtil.setNamespace("Common",Microsoft.Office),Microsoft.Office.Common.InvokeType={async:0,sync:1,asyncRegisterEvent:2,asyncUnregisterEvent:3,syncRegisterEvent:4,syncUnregisterEvent:5},OSF.SerializerVersion={MsAjax:0,Browser:1},function(e){e.appSpecificCheckOrigin=function(e,t,n,o){return!1}}(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.HostTrustStatus={unknown:0,untrusted:1,nothttps:2,trusted:3},Microsoft.Office.Common.MethodObject=function(e,t,n){this._method=e,this._invokeType=t,this._blockingOthers=n},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(e,t){this._registerMethodObject=e,this._unregisterMethodObject=t},Microsoft.Office.Common.EventMethodObject.prototype={getRegisterMethodObject:function(){return this._registerMethodObject},getUnregisterMethodObject:function(){return this._unregisterMethodObject}},Microsoft.Office.Common.ServiceEndPoint=function(e){var t=Function._validateParams(arguments,[{name:"serviceEndPointId",type:String,mayBeNull:!1}]);if(t)throw t;this._methodObjectList={},this._eventHandlerProxyList={},this._Id=e,this._conversations={},this._policyManager=null,this._appDomains={},this._onHandleRequestError=null},Microsoft.Office.Common.ServiceEndPoint.prototype={registerMethod:function(e,t,n,o){var i=Function._validateParams(arguments,[{name:"methodName",type:String,mayBeNull:!1},{name:"method",type:Function,mayBeNull:!1},{name:"invokeType",type:Number,mayBeNull:!1},{name:"blockingOthers",type:Boolean,mayBeNull:!1}]);if(i)throw i;if(n!==Microsoft.Office.Common.InvokeType.async&&n!==Microsoft.Office.Common.InvokeType.sync)throw OsfMsAjaxFactory.msAjaxError.argument("invokeType");var r=new Microsoft.Office.Common.MethodObject(t,n,o);this._methodObjectList[e]=r},unregisterMethod:function(e){var t=Function._validateParams(arguments,[{name:"methodName",type:String,mayBeNull:!1}]);if(t)throw t;delete this._methodObjectList[e]},registerEvent:function(e,t,n){var o=Function._validateParams(arguments,[{name:"eventName",type:String,mayBeNull:!1},{name:"registerMethod",type:Function,mayBeNull:!1},{name:"unregisterMethod",type:Function,mayBeNull:!1}]);if(o)throw o;var i=new Microsoft.Office.Common.EventMethodObject(new Microsoft.Office.Common.MethodObject(t,Microsoft.Office.Common.InvokeType.syncRegisterEvent,!1),new Microsoft.Office.Common.MethodObject(n,Microsoft.Office.Common.InvokeType.syncUnregisterEvent,!1));this._methodObjectList[e]=i},registerEventEx:function(e,t,n,o,i){var r=Function._validateParams(arguments,[{name:"eventName",type:String,mayBeNull:!1},{name:"registerMethod",type:Function,mayBeNull:!1},{name:"registerMethodInvokeType",type:Number,mayBeNull:!1},{name:"unregisterMethod",type:Function,mayBeNull:!1},{name:"unregisterMethodInvokeType",type:Number,mayBeNull:!1}]);if(r)throw r;var a=new Microsoft.Office.Common.EventMethodObject(new Microsoft.Office.Common.MethodObject(t,n,!1),new Microsoft.Office.Common.MethodObject(o,i,!1));this._methodObjectList[e]=a},unregisterEvent:function(e){var t=Function._validateParams(arguments,[{name:"eventName",type:String,mayBeNull:!1}]);if(t)throw t;this.unregisterMethod(e)},registerConversation:function(e,t,n,o){var i=Function._validateParams(arguments,[{name:"conversationId",type:String,mayBeNull:!1},{name:"conversationUrl",type:String,mayBeNull:!1,optional:!0},{name:"appDomains",type:Object,mayBeNull:!0,optional:!0},{name:"serializerVersion",type:Number,mayBeNull:!0,optional:!0}]);if(i)throw i;if(n){if(!(n instanceof Array))throw OsfMsAjaxFactory.msAjaxError.argument("appDomains");this._appDomains[e]=n}this._conversations[e]={url:t,serializerVersion:o}},unregisterConversation:function(e){var t=Function._validateParams(arguments,[{name:"conversationId",type:String,mayBeNull:!1}]);if(t)throw t;delete this._conversations[e]},setPolicyManager:function(e){var t=Function._validateParams(arguments,[{name:"policyManager",type:Object,mayBeNull:!1}]);if(t)throw t;if(!e.checkPermission)throw OsfMsAjaxFactory.msAjaxError.argument("policyManager");this._policyManager=e},getPolicyManager:function(){return this._policyManager},dispose:function(){this._methodObjectList=null,this._eventHandlerProxyList=null,this._Id=null,this._conversations=null,this._policyManager=null,this._appDomains=null,this._onHandleRequestError=null}},Microsoft.Office.Common.ClientEndPoint=function(e,t,n,o){var i=Function._validateParams(arguments,[{name:"conversationId",type:String,mayBeNull:!1},{name:"targetWindow",mayBeNull:!1},{name:"targetUrl",type:String,mayBeNull:!1},{name:"serializerVersion",type:Number,mayBeNull:!0,optional:!0}]);if(i)throw i;try{if(!t.postMessage)throw OsfMsAjaxFactory.msAjaxError.argument("targetWindow")}catch(e){if(!Object.prototype.hasOwnProperty.call(t,"postMessage"))throw OsfMsAjaxFactory.msAjaxError.argument("targetWindow")}this._conversationId=e,this._targetWindow=t,this._targetUrl=n,this._callingIndex=0,this._callbackList={},this._eventHandlerList={},this._serializerVersion=null!=o?o:OSF.SerializerVersion.Browser,this._checkReceiverOriginAndRun=null,this._hostTrustCheckStatus=Microsoft.Office.Common.HostTrustStatus.unknown,this._checkStatusLogged=!1},Microsoft.Office.Common.ClientEndPoint.prototype={invoke:function(e,t,n){var o=Function._validateParams(arguments,[{name:"targetMethodName",type:String,mayBeNull:!1},{name:"callback",type:Function,mayBeNull:!0},{name:"param",mayBeNull:!0}]);if(o)throw o;var i=this,r=function(){var o=i._callingIndex++,r=new Date,a={callback:t,createdOn:r.getTime()};n&&"object"==typeof n&&"number"==typeof n.__timeout__&&(a.timeout=n.__timeout__,delete n.__timeout__),i._callbackList[o]=a;try{if(i._hostTrustCheckStatus!==Microsoft.Office.Common.HostTrustStatus.trusted&&"ContextActivationManager_getAppContextAsync"!==e)throw"Access Denied";var s=new Microsoft.Office.Common.Request(e,Microsoft.Office.Common.ActionType.invoke,i._conversationId,o,n),l=Microsoft.Office.Common.MessagePackager.envelope(s,i._serializerVersion);i._targetWindow.postMessage(l,i._targetUrl),Microsoft.Office.Common.XdmCommunicationManager._startMethodTimeoutTimer()}catch(e){try{null!==t&&t(Microsoft.Office.Common.InvokeResultCode.errorInRequest,e)}finally{delete i._callbackList[o]}}};i._checkReceiverOriginAndRun?i._checkReceiverOriginAndRun(r):(i._hostTrustCheckStatus=Microsoft.Office.Common.HostTrustStatus.trusted,r())},registerForEvent:function(e,t,n,o){var i=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}]);if(i)throw i;var r=this._callingIndex++,a=new Date;this._callbackList[r]={callback:n,createdOn:a.getTime()};try{var s=new Microsoft.Office.Common.Request(e,Microsoft.Office.Common.ActionType.registerEvent,this._conversationId,r,o),l=Microsoft.Office.Common.MessagePackager.envelope(s,this._serializerVersion);this._targetWindow.postMessage(l,this._targetUrl),Microsoft.Office.Common.XdmCommunicationManager._startMethodTimeoutTimer(),this._eventHandlerList[e]=t}catch(e){try{null!==n&&n(Microsoft.Office.Common.InvokeResultCode.errorInRequest,e)}finally{delete this._callbackList[r]}}},unregisterForEvent:function(e,t,n){var o=Function._validateParams(arguments,[{name:"targetEventName",type:String,mayBeNull:!1},{name:"callback",type:Function,mayBeNull:!0},{name:"data",mayBeNull:!0,optional:!0}]);if(o)throw o;var i=this._callingIndex++,r=new Date;this._callbackList[i]={callback:t,createdOn:r.getTime()};try{var a=new Microsoft.Office.Common.Request(e,Microsoft.Office.Common.ActionType.unregisterEvent,this._conversationId,i,n),s=Microsoft.Office.Common.MessagePackager.envelope(a,this._serializerVersion);this._targetWindow.postMessage(s,this._targetUrl),Microsoft.Office.Common.XdmCommunicationManager._startMethodTimeoutTimer()}catch(e){try{null!==t&&t(Microsoft.Office.Common.InvokeResultCode.errorInRequest,e)}finally{delete this._callbackList[i]}}finally{delete this._eventHandlerList[e]}}},Microsoft.Office.Common.XdmCommunicationManager=function(){var e=[],t=null,n=null,o=!1,i=null,r=65e3,a=r,s={},l={},c=!1;function d(){null!==n?o||(e.length>0?u(e.shift()):(clearInterval(n),n=null)):OsfMsAjaxFactory.msAjaxDebug.trace("channel is not ready.")}function u(e){o=e.getInvokeBlockingFlag(),e.invoke(),t=(new Date).getTime()}function f(){if(i){var e,t,n=0,o=new Date;for(var r in l)for(var s in(e=l[r])._callbackList){var c=e._callbackList[s];if((t=c.timeout?c.timeout:a)>=0&&Math.abs(o.getTime()-c.createdOn)>=t)try{c.callback&&c.callback(Microsoft.Office.Common.InvokeResultCode.errorHandlingMethodCallTimedout,null)}finally{delete e._callbackList[s]}else n++}0===n&&(clearInterval(i),i=null)}else OsfMsAjaxFactory.msAjaxDebug.trace("channel is not ready.")}function p(){o=!1}function g(e,t){var n=!1;if(!(t&&"null"!==t&&t.length&&e&&e instanceof Array&&e.length))return n;var o=document.createElement("a"),i=document.createElement("a");o.href=t;for(var r=0;r<e.length&&!n;r++)-1!==e[r].indexOf("://")&&(OSF.OUtil.checkFlight(OSF.FlightNames.AddinEnforceHttps)?n=S(t,e[r]):(i.href=e[r],n=h(o,i)));return n}function m(e){if(!e||"null"===e)return!1;var t=new Array("^office-int\\.com$","^officeapps\\.live-int\\.com$","^.*\\.dod\\.online\\.office365\\.us$","^.*\\.gov\\.online\\.office365\\.us$","^.*\\.officeapps\\.live\\.com$","^.*\\.officeapps\\.live-int\\.com$","^.*\\.officeapps-df\\.live\\.com$","^.*\\.online\\.office\\.de$","^.*\\.partner\\.officewebapps\\.cn$","^.*\\.office\\.net$","^"+document.domain.replace(new RegExp("\\.","g"),"\\.")+"$");return new RegExp(t.join("|")).test(e)}function O(e,t){if(!e||!t||"null"===e||"null"===t)return!1;var n,o;OSF.OUtil.checkFlight(OSF.FlightNames.AddinEnforceHttps)?(n=OSF.OUtil.parseUrl(e,!0),o=OSF.OUtil.parseUrl(t,!0)):((n=document.createElement("a")).href=e,(o=document.createElement("a")).href=t);var i=n.protocol===o.protocol,r=n.port===o.port,a=o.hostname,s=n.hostname,l=a===s,c=!1;return!l&&a.length>s.length+1&&(c=a.slice(-(s.length+1))==="."+s),r&&i&&(l||c)}function S(e,t){return h(OSF.OUtil.parseUrl(e,!0),OSF.OUtil.parseUrl(t,!0))}function h(e,t){return e.hostname==t.hostname&&e.protocol==t.protocol&&D(e,t)}function D(e,t){return e.port==t.port||""==e.port&&"http:"==e.protocol&&"80"==t.port||""==e.port&&"https:"==e.protocol&&"443"==t.port||""==t.port&&"http:"==t.protocol&&"80"==e.port||""==t.port&&"https:"==t.protocol&&"443"==e.port}function v(i){var r,a,c,f,D;if(OSF&&""!=i.data){var v,A=OSF.SerializerVersion.Browser,y=i.data;try{A=null!=(v=Microsoft.Office.Common.MessagePackager.unenvelope(y,OSF.SerializerVersion.Browser))._serializerVersion?v._serializerVersion:A}catch(e){return}if(v._messageType===Microsoft.Office.Common.MessageType.request){var F=null==i.origin||"null"===i.origin?v._origin:i.origin;try{var C=function(e){for(var t in s)if(s[t]._conversations[e])return s[t];throw OsfMsAjaxFactory.msAjaxDebug.trace("Unknown conversation Id."),OsfMsAjaxFactory.msAjaxError.argument("conversationId")}(v._conversationId),M=C._conversations[v._conversationId];A=null!=M.serializerVersion?M.serializerVersion:A;var E=[M.url].concat(C._appDomains[v._conversationId]);if(!g(E,i.origin))if(!OfficeExt.appSpecificCheckOrigin(E,i,v._origin,g))if(!O(M.url,i.origin))throw"Failed origin check";var _=null!=v._data?v._data:{};_.SecurityOrigin=i.origin;var b=C.getPolicyManager();if(b&&!b.checkPermission(v._conversationId,v._actionName,_))throw"Access Denied";var w=function(e,t){var n=e._methodObjectList[t._actionName];if(!n)throw OsfMsAjaxFactory.msAjaxDebug.trace("The specified method is not registered on service endpoint:"+t._actionName),OsfMsAjaxFactory.msAjaxError.argument("messageObject");return t._actionType===Microsoft.Office.Common.ActionType.invoke?n:t._actionType===Microsoft.Office.Common.ActionType.registerEvent?n.getRegisterMethodObject():n.getUnregisterMethodObject()}(C,v),I=new Microsoft.Office.Common.InvokeCompleteCallback(i.source,F,v._actionName,v._conversationId,v._correlationId,p,A),x=new Microsoft.Office.Common.Invoker(w,_,I,C._eventHandlerProxyList,v._conversationId,v._actionName,A),P=!0;null==n&&((null==t||(new Date).getTime()-t>10)&&!o?(u(x),P=!1):n=setInterval(d,10)),P&&function(t){e.push(t)}(x)}catch(e){C&&C._onHandleRequestError&&C._onHandleRequestError(v,e);var T=Microsoft.Office.Common.InvokeResultCode.errorHandlingRequest;"Access Denied"==e&&(T=Microsoft.Office.Common.InvokeResultCode.errorHandlingRequestAccessDenied);var N=new Microsoft.Office.Common.Response(v._actionName,v._conversationId,v._correlationId,T,Microsoft.Office.Common.ResponseType.forCalling,e),R=Microsoft.Office.Common.MessagePackager.envelope(N,A),W=!1;try{W=!(!i.source||!i.source.postMessage)}catch(e){}var k=!1;if(window.location.href&&i.origin&&"null"!==i.origin&&O(window.location.href,i.origin))k=!0;else if(i.origin&&"null"!==i.origin)if(OSF.OUtil.checkFlight(OSF.FlightNames.AddinEnforceHttps)){k=m(OSF.OUtil.parseUrl(i.origin,!0).hostname)}else{var H=document.createElement("a");H.href=i.origin,k=m(H.hostname)}W&&k&&i.source.postMessage(R,F)}}else{if(v._messageType!==Microsoft.Office.Common.MessageType.response)return;var L=function(e){var t=l[e];return t||OsfMsAjaxFactory.msAjaxDebug.trace("Unknown conversation Id."),t}(v._conversationId);if(!L)return;if(L._serializerVersion=A,r=L._targetUrl,a=i.origin,D=!1,!(r&&a&&"null"!==r&&"null"!==a&&r.length&&a.length?(OSF.OUtil.checkFlight(OSF.FlightNames.AddinEnforceHttps)?D=S(r,a):(c=document.createElement("a"),f=document.createElement("a"),c.href=r,f.href=a,D=h(c,f)),D):D))throw"Failed orgin check";if(v._responseType===Microsoft.Office.Common.ResponseType.forCalling){var U=L._callbackList[v._correlationId];if(U)try{U.callback&&U.callback(v._errorCode,v._data)}finally{delete L._callbackList[v._correlationId]}}else{var j=L._eventHandlerList[v._actionName];null!=j&&j(v._data)}}}}function A(){c||(!function(e){if(window.addEventListener)window.addEventListener("message",e,!1);else{if(!(navigator.userAgent.indexOf("MSIE")>-1&&window.attachEvent))throw OsfMsAjaxFactory.msAjaxDebug.trace("Browser doesn't support the required API."),OsfMsAjaxFactory.msAjaxError.argument("Browser");window.attachEvent("onmessage",e)}}(v),c=!0)}return{connect:function(e,t,n,o){var i=l[e];return i||(A(),i=new Microsoft.Office.Common.ClientEndPoint(e,t,n,o),l[e]=i),i},getClientEndPoint:function(e){var t=Function._validateParams(arguments,[{name:"conversationId",type:String,mayBeNull:!1}]);if(t)throw t;return l[e]},createServiceEndPoint:function(e){A();var t=new Microsoft.Office.Common.ServiceEndPoint(e);return s[e]=t,t},getServiceEndPoint:function(e){var t=Function._validateParams(arguments,[{name:"serviceEndPointId",type:String,mayBeNull:!1}]);if(t)throw t;return s[e]},deleteClientEndPoint:function(e){var t=Function._validateParams(arguments,[{name:"conversationId",type:String,mayBeNull:!1}]);if(t)throw t;delete l[e]},deleteServiceEndPoint:function(e){var t=Function._validateParams(arguments,[{name:"serviceEndPointId",type:String,mayBeNull:!1}]);if(t)throw t;delete s[e]},urlCompare:function(e,t){return h(e,t)},checkUrlWithAppDomains:function(e,t){return g(e,t)},isTargetSubdomainOfSourceLocation:function(e,t){return O(e,t)},_setMethodTimeout:function(e){var t=Function._validateParams(arguments,[{name:"methodTimeout",type:Number,mayBeNull:!1}]);if(t)throw t;a=e<=0?r:e},_startMethodTimeoutTimer:function(){i||(i=setInterval(f,2e3))},isHostNameValidWacDomain:function(e){return m(e)},_hasSamePort:function(e,t){return D(e,t)}}}(),Microsoft.Office.Common.Message=function(e,t,n,o,i){var r=Function._validateParams(arguments,[{name:"messageType",type:Number,mayBeNull:!1},{name:"actionName",type:String,mayBeNull:!1},{name:"conversationId",type:String,mayBeNull:!1},{name:"correlationId",mayBeNull:!1},{name:"data",mayBeNull:!0,optional:!0}]);if(r)throw r;this._messageType=e,this._actionName=t,this._conversationId=n,this._correlationId=o,this._origin=window.location.origin,this._data=void 0===i?null:i},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(e,t,n,o,i){Microsoft.Office.Common.Request.uber.constructor.call(this,Microsoft.Office.Common.MessageType.request,e,n,o,i),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(e,t,n,o,i,r){Microsoft.Office.Common.Response.uber.constructor.call(this,Microsoft.Office.Common.MessageType.response,e,t,n,r),this._errorCode=o,this._responseType=i},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(e,t){return"object"==typeof e&&(e._serializerVersion=OSF.SerializerVersion.Browser),JSON.stringify(e)},unenvelope:function(e,t){return JSON.parse(e)}},Microsoft.Office.Common.ResponseSender=function(e,t,n,o,i,r,a){var s=Function._validateParams(arguments,[{name:"requesterWindow",mayBeNull:!1},{name:"requesterUrl",type:String,mayBeNull:!1},{name:"actionName",type:String,mayBeNull:!1},{name:"conversationId",type:String,mayBeNull:!1},{name:"correlationId",mayBeNull:!1},{name:"responsetype",type:Number,maybeNull:!1},{name:"serializerVersion",type:Number,maybeNull:!0,optional:!0}]);if(s)throw s;this._requesterWindow=e,this._requesterUrl=t,this._actionName=n,this._conversationId=o,this._correlationId=i,this._invokeResultCode=Microsoft.Office.Common.InvokeResultCode.noError,this._responseType=r;var l=this;this._send=function(e){try{var t=l._requesterUrl;"dialogMessageReceived"!==l._actionName&&"dialogParentMessageReceived"!==l._actionName||e.targetOrigin&&(t=e.targetOrigin);var n=new Microsoft.Office.Common.Response(l._actionName,l._conversationId,l._correlationId,l._invokeResultCode,l._responseType,e),o=Microsoft.Office.Common.MessagePackager.envelope(n,a);l._requesterWindow.postMessage(o,t)}catch(e){OsfMsAjaxFactory.msAjaxDebug.trace("ResponseSender._send error:"+e.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(e){this._invokeResultCode=e}},Microsoft.Office.Common.InvokeCompleteCallback=function(e,t,n,o,i,r,a){Microsoft.Office.Common.InvokeCompleteCallback.uber.constructor.call(this,e,t,n,o,i,Microsoft.Office.Common.ResponseType.forCalling,a),this._postCallbackHandler=r;var s=this;this._send=function(e,t){null!=t&&(s._invokeResultCode=t);try{var n=new Microsoft.Office.Common.Response(s._actionName,s._conversationId,s._correlationId,s._invokeResultCode,s._responseType,e),o=Microsoft.Office.Common.MessagePackager.envelope(n,a);s._requesterWindow.postMessage(o,s._requesterUrl),s._postCallbackHandler()}catch(e){OsfMsAjaxFactory.msAjaxDebug.trace("InvokeCompleteCallback._send error:"+e.message)}}},OSF.OUtil.extend(Microsoft.Office.Common.InvokeCompleteCallback,Microsoft.Office.Common.ResponseSender),Microsoft.Office.Common.Invoker=function(e,t,n,o,i,r,a){var s=Function._validateParams(arguments,[{name:"methodObject",mayBeNull:!1},{name:"paramValue",mayBeNull:!0},{name:"invokeCompleteCallback",mayBeNull:!1},{name:"eventHandlerProxyList",mayBeNull:!0},{name:"conversationId",type:String,mayBeNull:!1},{name:"eventName",type:String,mayBeNull:!1},{name:"serializerVersion",type:Number,mayBeNull:!0,optional:!0}]);if(s)throw s;this._methodObject=e,this._param=t,this._invokeCompleteCallback=n,this._eventHandlerProxyList=o,this._conversationId=i,this._eventName=r,this._serializerVersion=a},Microsoft.Office.Common.Invoker.prototype={invoke:function(){try{var e;switch(this._methodObject.getInvokeType()){case Microsoft.Office.Common.InvokeType.async:this._methodObject.getMethod()(this._param,this._invokeCompleteCallback.getSend());break;case Microsoft.Office.Common.InvokeType.sync:e=this._methodObject.getMethod()(this._param),this._invokeCompleteCallback.getSend()(e);break;case Microsoft.Office.Common.InvokeType.syncRegisterEvent:var t=this._createEventHandlerProxyObject(this._invokeCompleteCallback);e=this._methodObject.getMethod()(t.getSend(),this._param),this._eventHandlerProxyList[this._conversationId+this._eventName]=t.getSend(),this._invokeCompleteCallback.getSend()(e);break;case Microsoft.Office.Common.InvokeType.syncUnregisterEvent:var n=this._eventHandlerProxyList[this._conversationId+this._eventName];e=this._methodObject.getMethod()(n,this._param),delete this._eventHandlerProxyList[this._conversationId+this._eventName],this._invokeCompleteCallback.getSend()(e);break;case Microsoft.Office.Common.InvokeType.asyncRegisterEvent:var o=this._createEventHandlerProxyObject(this._invokeCompleteCallback);this._methodObject.getMethod()(o.getSend(),this._invokeCompleteCallback.getSend(),this._param),this._eventHandlerProxyList[this._callerId+this._eventName]=o.getSend();break;case Microsoft.Office.Common.InvokeType.asyncUnregisterEvent:var i=this._eventHandlerProxyList[this._callerId+this._eventName];this._methodObject.getMethod()(i,this._invokeCompleteCallback.getSend(),this._param),delete this._eventHandlerProxyList[this._callerId+this._eventName]}}catch(e){this._invokeCompleteCallback.setResultCode(Microsoft.Office.Common.InvokeResultCode.errorInResponse),this._invokeCompleteCallback.getSend()(e)}},getInvokeBlockingFlag:function(){return this._methodObject.getBlockingFlag()},_createEventHandlerProxyObject:function(e){return new Microsoft.Office.Common.ResponseSender(e.getRequesterWindow(),e.getRequesterUrl(),e.getActionName(),e.getConversationId(),e.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 e=[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];OSF.DDA.WAC.Delegate.SpecialProcessor.uber.constructor.call(this,e,{})},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 e={};return e[OSF.DDA.DispIdHost.Delegates.ExecuteAsync]=OSF.DDA.WAC.Delegate.executeAsync,e[OSF.DDA.DispIdHost.Delegates.RegisterEventAsync]=OSF.DDA.WAC.Delegate.registerEventAsync,e[OSF.DDA.DispIdHost.Delegates.UnregisterEventAsync]=OSF.DDA.WAC.Delegate.unregisterEventAsync,e[OSF.DDA.DispIdHost.Delegates.OpenDialog]=OSF.DDA.WAC.Delegate.openDialog,e[OSF.DDA.DispIdHost.Delegates.MessageParent]=OSF.DDA.WAC.Delegate.messageParent,e[OSF.DDA.DispIdHost.Delegates.SendMessage]=OSF.DDA.WAC.Delegate.sendMessage,e[OSF.DDA.DispIdHost.Delegates.CloseDialog]=OSF.DDA.WAC.Delegate.closeDialog,e},OSF.DDA.WAC.Delegate.version=1,OSF.DDA.WAC.Delegate.executeAsync=function(e){e.hostCallArgs||(e.hostCallArgs={}),e.hostCallArgs.DdaMethod={ControlId:OSF._OfficeAppFactory.getId(),Version:OSF.DDA.WAC.Delegate.version,DispatchId:e.dispId},e.hostCallArgs.__timeout__=-1,e.onCalling&&e.onCalling(),OSF.getClientEndPoint()&&OSF.getClientEndPoint().invoke("executeMethod",(function(t,n){var o;if(e.onReceiving&&e.onReceiving(),t==Microsoft.Office.Common.InvokeResultCode.noError)OSF.DDA.WAC.Delegate.version=n.Version,o=n.Error;else switch(t){case Microsoft.Office.Common.InvokeResultCode.errorHandlingRequestAccessDenied:o=OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability;break;default:o=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError}e.onComplete&&e.onComplete(o,n)}),e.hostCallArgs)},OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent=function(e,t){var n=(new Date).getTime();return function(o,i){var r;if(t.onReceiving&&t.onReceiving(),o!=Microsoft.Office.Common.InvokeResultCode.noError)switch(o){case Microsoft.Office.Common.InvokeResultCode.errorHandlingRequestAccessDenied:r=OSF.DDA.ErrorCodeManager.errorCodes.ooeNoCapability;break;default:r=OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError}else r=i?i.Error?i.Error:OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess:OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError;t.onComplete&&t.onComplete(r),OSF.AppTelemetry&&OSF.AppTelemetry.onRegisterDone(e,t.dispId,Math.abs((new Date).getTime()-n),r)}},OSF.DDA.WAC.Delegate.registerEventAsync=function(e){e.onCalling&&e.onCalling(),OSF.getClientEndPoint()&&OSF.getClientEndPoint().registerForEvent(OSF.DDA.getXdmEventName(e.targetId,e.eventType),(function(t){e.onEvent&&e.onEvent(t),OSF.AppTelemetry&&OSF.AppTelemetry.onEventDone(e.dispId)}),OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent(!0,e),{controlId:OSF._OfficeAppFactory.getId(),eventDispId:e.dispId,targetId:e.targetId})},OSF.DDA.WAC.Delegate.unregisterEventAsync=function(e){e.onCalling&&e.onCalling(),OSF.getClientEndPoint()&&OSF.getClientEndPoint().unregisterForEvent(OSF.DDA.getXdmEventName(e.targetId,e.eventType),OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent(!1,e),{controlId:OSF._OfficeAppFactory.getId(),eventDispId:e.dispId,targetId:e.targetId})},OSF.OUtil.setNamespace("WebApp",OSF),OSF.OUtil.setNamespace("Messaging",OSF),OSF.OUtil.setNamespace("ExtensionLifeCycle",OSF),OSF.OUtil.setNamespace("TaskPaneAction",OSF),OSF.OUtil.setNamespace("RibbonGallery",OSF),OSF.WebApp.AddHostInfoAndXdmInfo=function(e){return OSF._OfficeAppFactory.getWindowLocationSearch&&OSF._OfficeAppFactory.getWindowLocationHash?e+OSF._OfficeAppFactory.getWindowLocationSearch()+OSF._OfficeAppFactory.getWindowLocationHash():e},OSF.WebApp._UpdateLinksForHostAndXdmInfo=function(){for(var e=document.querySelectorAll("a[data-officejs-navigate]"),t=0;t<e.length;t++)OSF.WebApp._isGoodUrl(e[t].href)&&(e[t].href=OSF.WebApp.AddHostInfoAndXdmInfo(e[t].href));var n=document.querySelectorAll("form[data-officejs-navigate]");for(t=0;t<n.length;t++){var o=n[t];OSF.WebApp._isGoodUrl(o.action)&&(o.action=OSF.WebApp.AddHostInfoAndXdmInfo(o.action))}},OSF.WebApp._isGoodUrl=function(e){if(void 0===e)return!1;var t=(e=e.trim()).indexOf(":"),n=t>0?e.substr(0,t):null,o=null===n||("http"===n.toLowerCase()||"https"===n.toLowerCase());return o=o&&"#"!=e&&"/"!=e&&""!=e&&e!=OSF._OfficeAppFactory.getWebAppState().webAppUrl},OSF.InitializationHelper=function(e,t,n,o,i){this._hostInfo=e,this._webAppState=t,this._context=n,this._settings=o,this._hostFacade=i,this._appContext={},this._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'])",this._initializeSettings=function(e,t){var n=e.get_settings(),o=OSF.OUtil.getSessionStorage();if(o){var i=o.getItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey());i?n=JSON.parse(i):(i=JSON.stringify(n),o.setItem(OSF._OfficeAppFactory.getCachedSessionSettingsKey(),i))}var r=OSF.DDA.SettingsManager.deserializeSettings(n);return t?new OSF.DDA.RefreshableSettings(r):new OSF.DDA.Settings(r)};var r,a;r=window,a=window.open,r.open=function(e,t,n){var o=null;try{o=a(e,t,n)}catch(e){OSF.AppTelemetry&&OSF.AppTelemetry.logAppCommonMessage("Exception happens at windowOpen."+e)}if(!o){var i={strUrl:e,strWindowName:t,strWindowFeatures:n};OSF._OfficeAppFactory.getClientEndPoint()&&OSF._OfficeAppFactory.getClientEndPoint().invoke("ContextActivationManager_openWindowInHost",null,i)}return o}},OSF.InitializationHelper.prototype.saveAndSetDialogInfo=function(e){var t,n=OSF.OUtil.getSessionStorage();if(n){if(e||(e=OSF.OUtil.parseHostInfoFromWindowName(!0,OSF._OfficeAppFactory.getWindowName())),e&&e.indexOf("isDialog")>-1){var o=(t=OSF.OUtil.parseXdmInfo(!0))?t.split("|")[1]:null;return null!=o&&n.setItem(o+"IsDialog","true"),void(this._hostInfo.isDialog=!0)}this._hostInfo.isDialog=null!=n.getItem(OSF.OUtil.getXdmFieldValue(OSF.XdmFieldName.AppId,!1)+"IsDialog")}},OSF.InitializationHelper.prototype.getAppContext=function(e,t){OSF.AppTelemetry&&OSF.AppTelemetry.logAppCommonMessage("OsfControl activation lifecycle: getAppContext got called.");var n=this,o=function(e,o){var i;if(o._appName===OSF.AppName.ExcelWebApp){var r=o._settings;for(var a in i={},r){var s=r[a];i[s[0]]=s[1]}}else i=o._settings;if(o._appName===OSF.AppName.OutlookWebApp&&o._requirementMatrix&&-1==o._requirementMatrix.indexOf("react")&&(OSF.AgaveHostAction.SendTelemetryEvent=void 0),!n._hostInfo.isDialog||null==window.opener){var l=window.location.origin;n._webAppState.clientEndPoint.invoke("ContextActivationManager_notifyHost",null,[n._webAppState.id,OSF.AgaveHostAction.UpdateTargetUrl,l])}if(0!==e||null==o._id||null==o._appName||null==o._appVersion||null==o._appUILocale||null==o._dataLocale||null==o._docUrl||null==o._clientMode||null==o._settings||null==o._reason){var c="Function ContextActivationManager_getAppContextAsync call failed. ErrorCode is "+e+", exception: "+o;throw OSF.AppTelemetry&&OSF.AppTelemetry.logAppException(c),c}n._appContext=o;var d=o._appInstanceId?o._appInstanceId:o._id,u=0;null!=o._appMinorVersion&&(u=o._appMinorVersion);var f=void 0;null!=o._requirementMatrix&&(f=o._requirementMatrix),o.eToken=o.eToken?o.eToken:"";var p=new OSF.OfficeAppContext(o._id,o._appName,o._appVersion,o._appUILocale,o._dataLocale,o._docUrl,o._clientMode,i,o._reason,o._osfControlType,o._eToken,o._correlationId,d,!1,!0,u,f,o._hostCustomMessage,o._hostFullVersion,o._clientWindowHeight,o._clientWindowWidth,o._addinName,o._appDomains,o._dialogRequirementMatrix,o._featureGates,void 0,o._initialDisplayMode);p._wacHostEnvironment=o._wacHostEnvironment||"0",p._isFromWacAutomation=!!o._isFromWacAutomation,p._marketplaceType=o._marketplaceType,OSF.AppTelemetry&&OSF.AppTelemetry.initialize(p),t(p)};try{if(this._hostInfo.isDialog&&null!=window.opener)o(0,OfficeExt.WACUtils.parseAppContextFromWindowName(!1,OSF._OfficeAppFactory.getWindowName()));else this._webAppState.clientEndPoint.invoke("ContextActivationManager_getAppContextAsync",o,this._webAppState.id)}catch(e){throw OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Exception thrown when trying to invoke getAppContextAsync. Exception:["+e+"]"),e}},OSF.InitializationHelper.prototype.isHostOriginTrusted=function(e){},OSF.InitializationHelper.prototype.checkReceiverOriginAndRun=function(e){var t=this,n=OSF.OUtil.parseUrl(t._webAppState.clientEndPoint._targetUrl,!1),o="https:"==n.protocol;if(t._webAppState.clientEndPoint._hostTrustCheckStatus===Microsoft.Office.Common.HostTrustStatus.unknown&&(o||(t._webAppState.clientEndPoint._hostTrustCheckStatus=Microsoft.Office.Common.HostTrustStatus.nothttps),t._webAppState.clientEndPoint._hostTrustCheckStatus!=Microsoft.Office.Common.HostTrustStatus.nothttps)){var i=Microsoft.Office.Common.XdmCommunicationManager.isHostNameValidWacDomain(n.hostname);t.isHostOriginTrusted&&(i=i||t.isHostOriginTrusted(n.hostname)),i&&(t._webAppState.clientEndPoint._hostTrustCheckStatus=Microsoft.Office.Common.HostTrustStatus.trusted)}if(t._webAppState.clientEndPoint._checkStatusLogged||null==t._hostInfo||void 0===t._hostInfo||(OSF.AppTelemetry.onCheckWACHost(t._webAppState.clientEndPoint._hostTrustCheckStatus,t._webAppState.id,t._hostInfo.hostType,t._hostInfo.hostPlatform,t._webAppState.clientEndPoint._targetUrl),t._webAppState.clientEndPoint._checkStatusLogged=!0),t._webAppState.clientEndPoint._hostTrustCheckStatus!=Microsoft.Office.Common.HostTrustStatus.trusted){var r=function(){var i=OSF._OfficeAppFactory.getLoadScriptHelper().getOfficeJsBasePath().match(/^https?:\/\/[^:/?#]*(?::([0-9]+))?/);if(i&&i[0]){var r=OSF._OfficeAppFactory.getLoadScriptHelper().getOfficeJsBasePath()+"AgaveErrorUX/index.html#",a={error:"NotTrustedWAC",locale:OSF.getSupportedLocale(t._hostInfo.hostLocale,OSF.ConstantNames.DefaultLocale),hostname:n.hostname,noHttps:!o,validate:!1},s=document.createElement("iframe");s.style.visibility="hidden",s.style.height="0",s.style.width="0",OSF.OUtil.addEventListener(window,"message",(function n(o){if(o.source==s.contentWindow&&o.origin==i[0])try{var l=JSON.parse(o.data);Function._validateParams(l,[{name:"hostUserTrusted",type:Boolean,mayBeNull:!1}]);!0===l.hostUserTrusted?(t._webAppState.clientEndPoint._hostTrustCheckStatus=Microsoft.Office.Common.HostTrustStatus.trusted,OSF.OUtil.removeEventListener(window,"message",n),document.body.removeChild(s)):(a.validate=!1,window.location.replace(r+encodeURIComponent(JSON.stringify(a)))),e()}catch(e){document.body.innerHTML=Strings.OfficeOM.L_NotTrustedWAC}})),a.validate=!0,s.setAttribute("src",r+encodeURIComponent(JSON.stringify(a))),s.onload=function(){var e={hostname:n.hostname,noHttps:!o};s.contentWindow.postMessage(JSON.stringify(e),i[0])},document.body.appendChild(s)}else document.body.innerHTML=Strings.OfficeOM.L_NotTrustedWAC;if(OSF.OUtil.checkFlight(OSF.FlightNames.AddinEnforceHttps)&&!o)throw new Error("NotHttps")};if(document.body)r();else{var a=!1;document.addEventListener("DOMContentLoaded",(function(){a||(a=!0,r())}))}}else e()},OSF.InitializationHelper.prototype.setAgaveHostCommunication=function(){try{var e=this,t=OSF.OUtil.parseXdmInfoWithGivenFragment(!1,OSF._OfficeAppFactory.getWindowLocationHash());if(!t&&OSF._OfficeAppFactory.getWindowName&&(t=OSF.OUtil.parseXdmInfoFromWindowName(!1,OSF._OfficeAppFactory.getWindowName())),t){var n=OSF.OUtil.getInfoItems(t);null!=n&&n.length>=3&&(e._webAppState.conversationID=n[0],e._webAppState.id=n[1],e._webAppState.webAppUrl=n[2].indexOf(":")>=0?n[2]:decodeURIComponent(n[2]))}e._webAppState.wnd=null!=window.opener?window.opener:window.parent;var o=OSF.OUtil.parseSerializerVersionWithGivenFragment(!1,OSF._OfficeAppFactory.getWindowLocationHash());if(isNaN(o)&&OSF._OfficeAppFactory.getWindowName&&(o=OSF.OUtil.parseSerializerVersionFromWindowName(!1,OSF._OfficeAppFactory.getWindowName())),e._webAppState.serializerVersion=o,this._hostInfo.isDialog&&null!=window.opener)return;e._webAppState.clientEndPoint=Microsoft.Office.Common.XdmCommunicationManager.connect(e._webAppState.conversationID,e._webAppState.wnd,e._webAppState.webAppUrl,e._webAppState.serializerVersion),e._webAppState.serviceEndPoint=Microsoft.Office.Common.XdmCommunicationManager.createServiceEndPoint(e._webAppState.id),e._webAppState.clientEndPoint._checkReceiverOriginAndRun=function(t){e.checkReceiverOriginAndRun(t)};var i=e._webAppState.conversationID+OSF.SharedConstants.NotificationConversationIdSuffix;e._webAppState.serviceEndPoint.registerConversation(i,e._webAppState.webAppUrl);e._webAppState.serviceEndPoint.registerMethod("Office_notifyAgave",(function(t){var n;switch(n="string"==typeof t?t:t[0]){case OSF.AgaveHostAction.Select:e._webAppState.focused=!0;break;case OSF.AgaveHostAction.UnSelect:e._webAppState.focused=!1;break;case OSF.AgaveHostAction.TabIn:case OSF.AgaveHostAction.CtrlF6In:window.focus();var o=document.querySelectorAll(e._tabbableElements);OSF.OUtil.focusToFirstTabbable(o,!1)||(window.blur(),e._webAppState.focused=!1,e._webAppState.clientEndPoint.invoke("ContextActivationManager_notifyHost",null,[e._webAppState.id,OSF.AgaveHostAction.ExitNoFocusable]));break;case OSF.AgaveHostAction.TabInShift:window.focus();o=document.querySelectorAll(e._tabbableElements);OSF.OUtil.focusToFirstTabbable(o,!0)||(window.blur(),e._webAppState.focused=!1,e._webAppState.clientEndPoint.invoke("ContextActivationManager_notifyHost",null,[e._webAppState.id,OSF.AgaveHostAction.ExitNoFocusableShift]));break;case OSF.AgaveHostAction.SendMessage:if(window.Office.context.messaging.onMessage){var i=t[1];window.Office.context.messaging.onMessage(i)}break;case OSF.AgaveHostAction.TaskPaneHeaderButtonClicked:window.Office.context.ui.taskPaneAction.onHeaderButtonClick&&window.Office.context.ui.taskPaneAction.onHeaderButtonClick();break;default:OsfMsAjaxFactory.msAjaxDebug.trace("actionId "+n+" notifyAgave is wrong.")}}),Microsoft.Office.Common.InvokeType.async,!1),e.addOrRemoveEventListenersForWindow(!0)}catch(e){throw OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Exception thrown in setAgaveHostCommunication. Exception:["+e+"]"),e}},OSF.InitializationHelper.prototype.addOrRemoveEventListenersForWindow=function(e){var t=this,n=function(){t._webAppState.focused||(t._webAppState.focused=!0),t._webAppState.clientEndPoint.invoke("ContextActivationManager_notifyHost",null,[t._webAppState.id,OSF.AgaveHostAction.Select])},o=function(){OSF&&(t._webAppState.focused&&(t._webAppState.focused=!1),t._webAppState.clientEndPoint.invoke("ContextActivationManager_notifyHost",null,[t._webAppState.id,OSF.AgaveHostAction.UnSelect]))},i=function(e){if(e.preventDefault=e.preventDefault||function(){e.returnValue=!1},117==e.keyCode&&(e.ctrlKey||e.metaKey)){e.preventDefault();var n=OSF.AgaveHostAction.CtrlF6Exit;e.shiftKey&&(n=OSF.AgaveHostAction.CtrlF6ExitShift),t._webAppState.clientEndPoint.invoke("ContextActivationManager_notifyHost",null,[t._webAppState.id,n])}else if(9==e.keyCode){var o=t._appContext._isPowerPointModernSlideShowEnabled&&t._appContext._appName==OSF.AppName.PowerpointWebApp&&t._appContext._clientMode==OSF.ClientMode.ReadOnly&&t._appContext._osfControlType==OSF.OsfControlType.DocumentLevel;o||e.preventDefault();var i=document.querySelectorAll(t._tabbableElements);OSF.OUtil.focusToNextTabbable(i,e.target||e.srcElement,e.shiftKey)?o&&e.preventDefault():t._hostInfo.isDialog?OSF.OUtil.focusToFirstTabbable(i,e.shiftKey):e.shiftKey?o||t._webAppState.clientEndPoint.invoke("ContextActivationManager_notifyHost",null,[t._webAppState.id,OSF.AgaveHostAction.TabExitShift]):OSF.OUtil.checkFlight(OSF.FlightNames.SetFocusToTaskpaneIsEnabled)&&e.target&&"BODY"===e.target.tagName.toUpperCase()?OSF.OUtil.focusToFirstTabbable(i,e.shiftKey):o||t._webAppState.clientEndPoint.invoke("ContextActivationManager_notifyHost",null,[t._webAppState.id,OSF.AgaveHostAction.TabExit])}else if(27==e.keyCode)e.preventDefault(),t.dismissDialogNotification&&t.dismissDialogNotification(),t._webAppState.clientEndPoint.invoke("ContextActivationManager_notifyHost",null,[t._webAppState.id,OSF.AgaveHostAction.EscExit]);else if(113==e.keyCode)e.preventDefault(),t._webAppState.clientEndPoint.invoke("ContextActivationManager_notifyHost",null,[t._webAppState.id,OSF.AgaveHostAction.F2Exit]);else if((e.ctrlKey||e.metaKey||e.shiftKey||e.altKey)&&e.keyCode>=1&&e.keyCode<=255){var r={keyCode:e.keyCode,shiftKey:e.shiftKey,altKey:e.altKey,ctrlKey:e.ctrlKey,metaKey:e.metaKey};t._webAppState.clientEndPoint.invoke("ContextActivationManager_notifyHost",null,[t._webAppState.id,OSF.AgaveHostAction.KeyboardShortcuts,r])}},r=function(e){117==e.keyCode&&e.ctrlKey&&(e.preventDefault?e.preventDefault():e.returnValue=!1)};e?(OSF.OUtil.addEventListener(window,"focus",n),OSF.OUtil.addEventListener(window,"blur",o),OSF.OUtil.addEventListener(window,"keydown",i),OSF.OUtil.addEventListener(window,"keypress",r)):(OSF.OUtil.removeEventListener(window,"focus",n),OSF.OUtil.removeEventListener(window,"blur",o),OSF.OUtil.removeEventListener(window,"keydown",i),OSF.OUtil.removeEventListener(window,"keypress",r))},OSF.InitializationHelper.prototype.initWebDialog=function(e){if(e.get_isDialog()){if(OSF.DDA.UI.ChildUI){var t=null!=window.opener;e.ui=new OSF.DDA.UI.ChildUI(t),t&&this.registerMessageReceivedEventForWindowDialog&&this.registerMessageReceivedEventForWindowDialog()}}else OSF.DDA.UI.ParentUI&&(e.ui=new OSF.DDA.UI.ParentUI,OfficeExt.Container&&OSF.DDA.DispIdHost.addAsyncMethods(e.ui,[OSF.DDA.AsyncMethodNames.CloseContainerAsync]))},OSF.InitializationHelper.prototype.initWebAuth=function(e){OSF.DDA.Auth&&(e.auth=new OSF.DDA.Auth,OSF.DDA.DispIdHost.addAsyncMethods(e.auth,[OSF.DDA.AsyncMethodNames.GetAccessTokenAsync]))},OSF.InitializationHelper.prototype.initWebAuthImplicit=function(e){OSF.DDA.WebAuth&&(e.webAuth=new OSF.DDA.WebAuth,OSF.DDA.DispIdHost.addAsyncMethods(e.webAuth,[OSF.DDA.AsyncMethodNames.GetAuthContextAsync]))},OSF.getClientEndPoint=function(){return OSF._OfficeAppFactory.getInitializationHelper()._webAppState.clientEndPoint},OSF.InitializationHelper.prototype.prepareRightAfterWebExtensionInitialize=function(){if(this._hostInfo.isDialog){window.focus();var e=document.querySelectorAll(this._tabbableElements);OSF.OUtil.focusToFirstTabbable(e,!1)||(window.blur(),this._webAppState.focused=!1,this._webAppState.clientEndPoint&&this._webAppState.clientEndPoint.invoke("ContextActivationManager_notifyHost",null,[this._webAppState.id,OSF.AgaveHostAction.ExitNoFocusable]))}},OSF.Messaging.sendMessage=function(e){OSF.getClientEndPoint().invoke("ContextActivationManager_notifyHost",null,[OSF._OfficeAppFactory.getWebAppState().id,OSF.AgaveHostAction.SendMessage,e])},OSF.ExtensionLifeCycle.launchExtensionComponent=function(e){OSF.getClientEndPoint().invoke("ContextActivationManager_notifyHost",null,[OSF._OfficeAppFactory.getWebAppState().id,OSF.AgaveHostAction.LaunchExtensionComponent,e])},OSF.ExtensionLifeCycle.stopExtensionComponent=function(e){OSF.getClientEndPoint().invoke("ContextActivationManager_notifyHost",null,[OSF._OfficeAppFactory.getWebAppState().id,OSF.AgaveHostAction.StopExtensionComponent,e])},OSF.ExtensionLifeCycle.restartExtensionComponent=function(e){OSF.getClientEndPoint().invoke("ContextActivationManager_notifyHost",null,[OSF._OfficeAppFactory.getWebAppState().id,OSF.AgaveHostAction.RestartExtensionComponent,e])},OSF.TaskPaneAction.enableHeaderButton=function(e){OSF.getClientEndPoint().invoke("ContextActivationManager_notifyHost",null,[OSF._OfficeAppFactory.getWebAppState().id,OSF.AgaveHostAction.EnableTaskPaneHeaderButton,e])},OSF.TaskPaneAction.disableHeaderButton=function(){OSF.getClientEndPoint().invoke("ContextActivationManager_notifyHost",null,[OSF._OfficeAppFactory.getWebAppState().id,OSF.AgaveHostAction.DisableTaskPaneHeaderButton])},OSF.RibbonGallery.refreshRibbon=function(e){OSF.getClientEndPoint().invoke("ContextActivationManager_notifyHost",null,[OSF._OfficeAppFactory.getWebAppState().id,OSF.AgaveHostAction.RefreshRibbonGallery,e])},function(e){var t=function(){function e(e){this._table=e,this._fields={}}return Object.defineProperty(e.prototype,"Fields",{get:function(){return this._fields},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"Table",{get:function(){return this._table},enumerable:!0,configurable:!0}),e.prototype.SerializeFields=function(){},e.prototype.SetSerializedField=function(e,t){null!=t&&(this._serializedFields[e]=t.toString())},e.prototype.SerializeRow=function(){return this._serializedFields={},this.SetSerializedField("Table",this._table),this.SerializeFields(),JSON.stringify(this._serializedFields)},e}();e.BaseUsageData=t;var n=function(e){function t(){return e.call(this,"AppActivated")||this}return __extends(t,e),Object.defineProperty(t.prototype,"CorrelationId",{get:function(){return this.Fields.CorrelationId},set:function(e){this.Fields.CorrelationId=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"SessionId",{get:function(){return this.Fields.SessionId},set:function(e){this.Fields.SessionId=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"AppId",{get:function(){return this.Fields.AppId},set:function(e){this.Fields.AppId=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"AppInstanceId",{get:function(){return this.Fields.AppInstanceId},set:function(e){this.Fields.AppInstanceId=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"AppURL",{get:function(){return this.Fields.AppURL},set:function(e){this.Fields.AppURL=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"AssetId",{get:function(){return this.Fields.AssetId},set:function(e){this.Fields.AssetId=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"Browser",{get:function(){return this.Fields.Browser},set:function(e){this.Fields.Browser=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"UserId",{get:function(){return this.Fields.UserId},set:function(e){this.Fields.UserId=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"Host",{get:function(){return this.Fields.Host},set:function(e){this.Fields.Host=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"HostVersion",{get:function(){return this.Fields.HostVersion},set:function(e){this.Fields.HostVersion=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ClientId",{get:function(){return this.Fields.ClientId},set:function(e){this.Fields.ClientId=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"AppSizeWidth",{get:function(){return this.Fields.AppSizeWidth},set:function(e){this.Fields.AppSizeWidth=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"AppSizeHeight",{get:function(){return this.Fields.AppSizeHeight},set:function(e){this.Fields.AppSizeHeight=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"Message",{get:function(){return this.Fields.Message},set:function(e){this.Fields.Message=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"DocUrl",{get:function(){return this.Fields.DocUrl},set:function(e){this.Fields.DocUrl=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"OfficeJSVersion",{get:function(){return this.Fields.OfficeJSVersion},set:function(e){this.Fields.OfficeJSVersion=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"HostJSVersion",{get:function(){return this.Fields.HostJSVersion},set:function(e){this.Fields.HostJSVersion=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"WacHostEnvironment",{get:function(){return this.Fields.WacHostEnvironment},set:function(e){this.Fields.WacHostEnvironment=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"IsFromWacAutomation",{get:function(){return this.Fields.IsFromWacAutomation},set:function(e){this.Fields.IsFromWacAutomation=e},enumerable:!0,configurable:!0}),t.prototype.SerializeFields=function(){this.SetSerializedField("CorrelationId",this.CorrelationId),this.SetSerializedField("SessionId",this.SessionId),this.SetSerializedField("AppId",this.AppId),this.SetSerializedField("AppInstanceId",this.AppInstanceId),this.SetSerializedField("AppURL",this.AppURL),this.SetSerializedField("AssetId",this.AssetId),this.SetSerializedField("Browser",this.Browser),this.SetSerializedField("UserId",this.UserId),this.SetSerializedField("Host",this.Host),this.SetSerializedField("HostVersion",this.HostVersion),this.SetSerializedField("ClientId",this.ClientId),this.SetSerializedField("AppSizeWidth",this.AppSizeWidth),this.SetSerializedField("AppSizeHeight",this.AppSizeHeight),this.SetSerializedField("Message",this.Message),this.SetSerializedField("DocUrl",this.DocUrl),this.SetSerializedField("OfficeJSVersion",this.OfficeJSVersion),this.SetSerializedField("HostJSVersion",this.HostJSVersion),this.SetSerializedField("WacHostEnvironment",this.WacHostEnvironment),this.SetSerializedField("IsFromWacAutomation",this.IsFromWacAutomation)},t}(t);e.AppActivatedUsageData=n;var o=function(e){function t(){return e.call(this,"ScriptLoad")||this}return __extends(t,e),Object.defineProperty(t.prototype,"CorrelationId",{get:function(){return this.Fields.CorrelationId},set:function(e){this.Fields.CorrelationId=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"SessionId",{get:function(){return this.Fields.SessionId},set:function(e){this.Fields.SessionId=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ScriptId",{get:function(){return this.Fields.ScriptId},set:function(e){this.Fields.ScriptId=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"StartTime",{get:function(){return this.Fields.StartTime},set:function(e){this.Fields.StartTime=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ResponseTime",{get:function(){return this.Fields.ResponseTime},set:function(e){this.Fields.ResponseTime=e},enumerable:!0,configurable:!0}),t.prototype.SerializeFields=function(){this.SetSerializedField("CorrelationId",this.CorrelationId),this.SetSerializedField("SessionId",this.SessionId),this.SetSerializedField("ScriptId",this.ScriptId),this.SetSerializedField("StartTime",this.StartTime),this.SetSerializedField("ResponseTime",this.ResponseTime)},t}(t);e.ScriptLoadUsageData=o;var i=function(e){function t(){return e.call(this,"AppClosed")||this}return __extends(t,e),Object.defineProperty(t.prototype,"CorrelationId",{get:function(){return this.Fields.CorrelationId},set:function(e){this.Fields.CorrelationId=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"SessionId",{get:function(){return this.Fields.SessionId},set:function(e){this.Fields.SessionId=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"FocusTime",{get:function(){return this.Fields.FocusTime},set:function(e){this.Fields.FocusTime=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"AppSizeFinalWidth",{get:function(){return this.Fields.AppSizeFinalWidth},set:function(e){this.Fields.AppSizeFinalWidth=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"AppSizeFinalHeight",{get:function(){return this.Fields.AppSizeFinalHeight},set:function(e){this.Fields.AppSizeFinalHeight=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"OpenTime",{get:function(){return this.Fields.OpenTime},set:function(e){this.Fields.OpenTime=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"CloseMethod",{get:function(){return this.Fields.CloseMethod},set:function(e){this.Fields.CloseMethod=e},enumerable:!0,configurable:!0}),t.prototype.SerializeFields=function(){this.SetSerializedField("CorrelationId",this.CorrelationId),this.SetSerializedField("SessionId",this.SessionId),this.SetSerializedField("FocusTime",this.FocusTime),this.SetSerializedField("AppSizeFinalWidth",this.AppSizeFinalWidth),this.SetSerializedField("AppSizeFinalHeight",this.AppSizeFinalHeight),this.SetSerializedField("OpenTime",this.OpenTime),this.SetSerializedField("CloseMethod",this.CloseMethod)},t}(t);e.AppClosedUsageData=i;var r=function(e){function t(){return e.call(this,"APIUsage")||this}return __extends(t,e),Object.defineProperty(t.prototype,"CorrelationId",{get:function(){return this.Fields.CorrelationId},set:function(e){this.Fields.CorrelationId=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"SessionId",{get:function(){return this.Fields.SessionId},set:function(e){this.Fields.SessionId=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"APIType",{get:function(){return this.Fields.APIType},set:function(e){this.Fields.APIType=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"APIID",{get:function(){return this.Fields.APIID},set:function(e){this.Fields.APIID=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"Parameters",{get:function(){return this.Fields.Parameters},set:function(e){this.Fields.Parameters=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ResponseTime",{get:function(){return this.Fields.ResponseTime},set:function(e){this.Fields.ResponseTime=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ErrorType",{get:function(){return this.Fields.ErrorType},set:function(e){this.Fields.ErrorType=e},enumerable:!0,configurable:!0}),t.prototype.SerializeFields=function(){this.SetSerializedField("CorrelationId",this.CorrelationId),this.SetSerializedField("SessionId",this.SessionId),this.SetSerializedField("APIType",this.APIType),this.SetSerializedField("APIID",this.APIID),this.SetSerializedField("Parameters",this.Parameters),this.SetSerializedField("ResponseTime",this.ResponseTime),this.SetSerializedField("ErrorType",this.ErrorType)},t}(t);e.APIUsageUsageData=r;var a=function(e){function t(){return e.call(this,"AppInitialization")||this}return __extends(t,e),Object.defineProperty(t.prototype,"CorrelationId",{get:function(){return this.Fields.CorrelationId},set:function(e){this.Fields.CorrelationId=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"SessionId",{get:function(){return this.Fields.SessionId},set:function(e){this.Fields.SessionId=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"SuccessCode",{get:function(){return this.Fields.SuccessCode},set:function(e){this.Fields.SuccessCode=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"Message",{get:function(){return this.Fields.Message},set:function(e){this.Fields.Message=e},enumerable:!0,configurable:!0}),t.prototype.SerializeFields=function(){this.SetSerializedField("CorrelationId",this.CorrelationId),this.SetSerializedField("SessionId",this.SessionId),this.SetSerializedField("SuccessCode",this.SuccessCode),this.SetSerializedField("Message",this.Message)},t}(t);e.AppInitializationUsageData=a;var s=function(e){function t(){return e.call(this,"CheckWACHost")||this}return __extends(t,e),Object.defineProperty(t.prototype,"isWacKnownHost",{get:function(){return this.Fields.isWacKnownHost},set:function(e){this.Fields.isWacKnownHost=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"instanceId",{get:function(){return this.Fields.instanceId},set:function(e){this.Fields.instanceId=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hostType",{get:function(){return this.Fields.hostType},set:function(e){this.Fields.hostType=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hostPlatform",{get:function(){return this.Fields.hostPlatform},set:function(e){this.Fields.hostPlatform=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"wacDomain",{get:function(){return this.Fields.wacDomain},set:function(e){this.Fields.wacDomain=e},enumerable:!0,configurable:!0}),t.prototype.SerializeFields=function(){this.SetSerializedField("isWacKnownHost",this.isWacKnownHost),this.SetSerializedField("instanceId",this.instanceId),this.SetSerializedField("hostType",this.hostType),this.SetSerializedField("hostPlatform",this.hostPlatform),this.SetSerializedField("wacDomain",this.wacDomain)},t}(t);e.CheckWACHostUsageData=s}(OSFLog||(OSFLog={})),function(e){"use strict";!function(e){e[e.info=0]="info",e[e.warning=1]="warning",e[e.error=2]="error"}(e.TraceLevel||(e.TraceLevel={})),function(e){e[e.none=0]="none",e[e.flush=1]="flush"}(e.SendFlag||(e.SendFlag={})),e.allowUploadingData=function(){},e.sendLog=function(e,t,n){};var t=function(){function e(){}return e.prototype.writeLog=function(e){},e.prototype.loadProxyFrame=function(){},e}();OSF.Logger||(OSF.Logger=e),e.ulsEndpoint=function(){try{return new t}catch(e){return null}}()}(Logger||(Logger={})),function(e){var t=[{name:"AppActivated",enabled:!0,critical:!0,points:[{name:"Browser",type:"string"},{name:"Message",type:"string"},{name:"Host",type:"string"},{name:"AppSizeWidth",type:"int64"},{name:"AppSizeHeight",type:"int64"},{name:"IsFromWacAutomation",type:"string"}]},{name:"ScriptLoad",enabled:!0,critical:!1,points:[{name:"ScriptId",type:"string"},{name:"StartTime",type:"double"},{name:"ResponseTime",type:"double"}]},{name:"APIUsage",enabled:function(){if(!OSF._OfficeAppFactory||!OSF._OfficeAppFactory.getHostInfo)return!1;var e=OSF._OfficeAppFactory.getHostInfo();if(!e)return!1;switch(e.hostType){case"outlook":switch(e.hostPlatform){case"mac":case"web":return!0;default:return!1}default:return!1}}(),critical:!1,points:[{name:"APIType",type:"string"},{name:"APIID",type:"int64"},{name:"Parameters",type:"string"},{name:"ResponseTime",type:"int64"},{name:"ErrorType",type:"int64"}]},{name:"AppInitialization",enabled:!0,critical:!1,points:[{name:"SuccessCode",type:"int64"},{name:"Message",type:"string"}]},{name:"AppClosed",enabled:!0,critical:!1,points:[{name:"FocusTime",type:"int64"},{name:"AppSizeFinalWidth",type:"int64"},{name:"AppSizeFinalHeight",type:"int64"},{name:"OpenTime",type:"int64"}]},{name:"CheckWACHost",enabled:!0,critical:!1,points:[{name:"isWacKnownHost",type:"int64"},{name:"solutionId",type:"string"},{name:"hostType",type:"string"},{name:"hostPlatform",type:"string"},{name:"correlationId",type:"string"}]}];function n(e,t){var n=void 0===t.rename?t.name:t.rename,o=void 0;switch(t.type){case"string":o=oteljs.makeStringDataField(n,e);break;case"double":"string"==typeof e&&(e=parseFloat(e)),o=oteljs.makeDoubleDataField(n,e);break;case"int64":"string"==typeof e&&(e=parseInt(e)),o=oteljs.makeInt64DataField(n,e);break;case"boolean":"string"==typeof e&&(e="true"===e),o=oteljs.makeBooleanDataField(n,e)}return o}function o(e){for(var n=0,o=t;n<o.length;n++){var i=o[n];if(i.name===e)return i}}function i(e,t){(function(e){var t=o(e);return void 0!==t&&t.enabled})(e)&&"undefined"!=typeof OTel&&OTel.OTelLogger.onTelemetryLoaded((function(){var i=function(e,t){var i=o(e);if(void 0!==i){for(var r=[],a=0,s=i.points;a<s.length;a++){var l=s[a],c=t[l.name];if(void 0!==c){var d=n(c,l);void 0!==d&&r.push(d)}}var u={dataCategories:oteljs.DataCategories.ProductServiceUsage};return i.critical&&(u.samplingPolicy=oteljs.SamplingPolicy.CriticalBusinessImpact),u.diagnosticLevel=oteljs.DiagnosticLevel.NecessaryServiceDataEvent,{eventName:"Office.Extensibility.OfficeJs."+e+"X",dataFields:r,eventFlags:u}}}(e,t);void 0!==i&&Microsoft.Office.WebExtension.sendTelemetryEvent(i)}))}var r=function(){function e(){}return e.prototype.getAriaCDNLocation=function(){return OSF._OfficeAppFactory.getLoadScriptHelper().getOfficeJsBasePath()+"ariatelemetry/aria-web-telemetry.js"},e.getInstance=function(){return void 0===e.AriaLoggerObj&&(e.AriaLoggerObj=new e),e.AriaLoggerObj},e.prototype.isIUsageData=function(e){return void 0!==e.Fields},e.prototype.shouldSendDirectToAria=function(e,t){var n;if(!e)return!1;if("win32"===e.toLowerCase())n=[16,0,11601];else{if("mac"!==e.toLowerCase())return!0;n=[16,28]}if(!t)return!1;for(var o=t.split("."),i=0;i<n.length&&i<o.length;i++){var r=parseInt(o[i],10);if(isNaN(r))return!1;if(r<n[i])return!0;if(r>n[i])return!1}return!1},e.prototype.isDirectToAriaEnabled=function(){if(void 0===this.EnableDirectToAria||null===this.EnableDirectToAria){var e=void 0,t=void 0;OSF._OfficeAppFactory&&OSF._OfficeAppFactory.getHostInfo&&(e=OSF._OfficeAppFactory.getHostInfo().hostPlatform),window.external&&void 0!==window.external.GetContext&&void 0!==window.external.GetContext().GetHostFullVersion&&(t=window.external.GetContext().GetHostFullVersion()),this.EnableDirectToAria=this.shouldSendDirectToAria(e,t)}return this.EnableDirectToAria},e.prototype.sendTelemetry=function(t,n){e.EnableSendingTelemetryWithLegacyAria&&this.isDirectToAriaEnabled()&&OSF.OUtil.loadScript(this.getAriaCDNLocation(),(function(){try{if(!this.ALogger){this.ALogger=AWTLogManager.initialize("db334b301e7b474db5e0f02f07c51a47-a1b5bc36-1bbe-482f-a64a-c2d9cb606706-7439")}var e=new AWTEventProperties;for(var o in e.setName("Office.Extensibility.OfficeJS."+t),n)"table"!==o.toLowerCase()&&e.setProperty(o,n[o]);var i=new Date;e.setProperty("Date",i.toISOString()),this.ALogger.logEvent(e)}catch(e){}}),1e3),e.EnableSendingTelemetryWithOTel&&i(t,n)},e.prototype.logData=function(e){this.isIUsageData(e)?this.sendTelemetry(e.Table,e.Fields):this.sendTelemetry(e.Table,e)},e.EnableSendingTelemetryWithOTel=!0,e.EnableSendingTelemetryWithLegacyAria=!1,e}();e.AriaLogger=r}(OSFAriaLogger||(OSFAriaLogger={})),function(e){"use strict";var t,n=OSF.OUtil.Guid.generateNewGuid(),o="",i=new RegExp("^https?://store\\.office(ppe|-int)?\\.com/","i"),r="PRIVATE";e.enableTelemetry=!0;var a=function(){};e.AppInfo=a;var s=function(e,t){this.name=e,this.handler=t},l=function(){function e(){this.clientIDKey="Office API client",this.logIdSetKey="Office App Log Id Set"}return e.prototype.getClientId=function(){var e=this.getValue(this.clientIDKey);return(!e||e.length<=0||e.length>40)&&(e=OSF.OUtil.Guid.generateNewGuid(),this.setValue(this.clientIDKey,e)),e},e.prototype.saveLog=function(e,t){var n=this.getValue(this.logIdSetKey);n=(n&&n.length>0?n+";":"")+e,this.setValue(this.logIdSetKey,n),this.setValue(e,t)},e.prototype.enumerateLog=function(e,t){var n=this.getValue(this.logIdSetKey);if(n){var o=n.split(";");for(var i in o){var r=o[i],a=this.getValue(r);a&&(e&&e(r,a),t&&this.remove(r))}t&&this.remove(this.logIdSetKey)}},e.prototype.getValue=function(e){var t=OSF.OUtil.getLocalStorage(),n="";return t&&(n=t.getItem(e)),n},e.prototype.setValue=function(e,t){var n=OSF.OUtil.getLocalStorage();n&&n.setItem(e,t)},e.prototype.remove=function(e){var t=OSF.OUtil.getLocalStorage();if(t)try{t.removeItem(e)}catch(e){}},e}(),c=function(){function t(){}return t.prototype.LogData=function(t){if(e.enableTelemetry)try{OSFAriaLogger.AriaLogger.getInstance().logData(t)}catch(e){}},t.prototype.LogRawData=function(t){if(e.enableTelemetry)try{OSFAriaLogger.AriaLogger.getInstance().logData(JSON.parse(t))}catch(e){}},t}();function d(e){return e&&(e=e.replace(/[{}]/g,"").toLowerCase()),e||""}function u(e,t){var i=new OSFLog.AppInitializationUsageData;i.CorrelationId=d(o),i.SessionId=n,i.SuccessCode=e?1:0,i.Message=t,(new c).LogData(i)}function f(){var e=0!=(OSF._OfficeAppFactory.getHostInfo().flags&OSF.HostInfoFlags.PublicAddin);return e||!!t&&g(OSF._OfficeAppFactory.getHostInfo().hostPlatform,t.hostVersion)}function p(e,t){return f()||t!==e?t:r}function g(e,t){var n=!1,o=/^(\d+)\.(\d+)\.(\d+)\.(\d+)$/.exec(t);if(o){var i=parseInt(o[1]),r=parseInt(o[2]),a=parseInt(o[3]);"win32"==e?(i<16||16==i&&a<14225)&&(n=!0):"mac"==e&&(i<16||16==i&&(r<52||52==r&&a<808))&&(n=!0)}return n}e.initialize=function(o){if(e.enableTelemetry&&!t){t=new a,o.get_hostFullVersion()?t.hostVersion=o.get_hostFullVersion():t.hostVersion=o.get_appVersion(),t.appId=f()?o.get_id():r,t.marketplaceType=o._marketplaceType,t.browser=window.navigator.userAgent,t.correlationId=d(o.get_correlationId()),t.clientId=(new l).getClientId(),t.appInstanceId=o.get_appInstanceId(),t.appInstanceId&&(t.appInstanceId=d(t.appInstanceId),t.appInstanceId=p(o.get_id(),t.appInstanceId)),t.message=o.get_hostCustomMessage(),t.officeJSVersion=OSF.ConstantNames.FileVersion,t.hostJSVersion="16.0.15407.10000",o._wacHostEnvironment&&(t.wacHostEnvironment=o._wacHostEnvironment),void 0!==o._isFromWacAutomation&&null!==o._isFromWacAutomation&&(t.isFromWacAutomation=o._isFromWacAutomation.toString().toLowerCase());var c=o.get_docUrl();t.docUrl=i.test(c)?c:"";var u=location.href;u&&(u=u.split("?")[0].split("#")[0]),t.appURL="",function(e,t){var n,o;t.assetId="",t.userId="";try{n=decodeURIComponent(e);var i=(o=(new DOMParser).parseFromString(n,"text/xml")).getElementsByTagName("t")[0].attributes.getNamedItem("cid"),r=o.getElementsByTagName("t")[0].attributes.getNamedItem("oid");i&&i.nodeValue?t.userId=i.nodeValue:r&&r.nodeValue&&(t.userId=r.nodeValue),t.assetId=o.getElementsByTagName("t")[0].attributes.getNamedItem("aid").nodeValue}catch(e){}finally{n=null,o=null,null}}(o.get_eToken(),t),t.sessionId=n,"undefined"!=typeof OTel&&OTel.OTelLogger.initialize(t),function(){var t=new Date,n=null,o=0,i=!1,r=function(){document.hasFocus()?null==n&&(n=new Date):n&&(o+=Math.abs((new Date).getTime()-n.getTime()),n=null)},a=[];a.push(new s("focus",r)),a.push(new s("blur",r)),a.push(new s("focusout",r)),a.push(new s("focusin",r));var l=function(){for(var r=0;r<a.length;r++)OSF.OUtil.removeEventListener(window,a[r].name,a[r].handler);a.length=0,i||(document.hasFocus()&&n&&(o+=Math.abs((new Date).getTime()-n.getTime()),n=null),e.onAppClosed(Math.abs((new Date).getTime()-t.getTime()),o),i=!0)};a.push(new s("beforeunload",l)),a.push(new s("unload",l));for(var c=0;c<a.length;c++)OSF.OUtil.addEventListener(window,a[c].name,a[c].handler);r()}(),e.onAppActivated()}},e.onAppActivated=function(){if(t){(new l).enumerateLog((function(e,t){return(new c).LogRawData(t)}),!0);var e=new OSFLog.AppActivatedUsageData;e.SessionId=n,e.AppId=t.appId,e.AssetId=t.assetId,e.AppURL="",e.UserId="",e.ClientId=t.clientId,e.Browser=t.browser,e.HostVersion=t.hostVersion,e.CorrelationId=d(t.correlationId),e.AppSizeWidth=window.innerWidth,e.AppSizeHeight=window.innerHeight,e.AppInstanceId=t.appInstanceId,e.Message=t.message,e.DocUrl=t.docUrl,e.OfficeJSVersion=t.officeJSVersion,e.HostJSVersion=t.hostJSVersion,t.wacHostEnvironment&&(e.WacHostEnvironment=t.wacHostEnvironment),void 0!==t.isFromWacAutomation&&null!==t.isFromWacAutomation&&(e.IsFromWacAutomation=t.isFromWacAutomation),(new c).LogData(e)}},e.onScriptDone=function(e,t,o,i){var r=new OSFLog.ScriptLoadUsageData;r.CorrelationId=d(i),r.SessionId=n,r.ScriptId=e,r.StartTime=t,r.ResponseTime=o,(new c).LogData(r)},e.onCallDone=function(e,i,r,a,s){if(t&&function(){if(!OSF._OfficeAppFactory||!OSF._OfficeAppFactory.getHostInfo)return!1;var e=OSF._OfficeAppFactory.getHostInfo();if(!e)return!1;switch(e.hostType){case"outlook":switch(e.hostPlatform){case"mac":case"web":return!0;default:return!1}default:return!1}}()&&function(e,t){if("method"===t)switch(e){case 3:case 4:case 38:case 37:case 10:case 12:return!0;default:return!1}return!1}(i,e)){var l=new OSFLog.APIUsageUsageData;l.CorrelationId=d(o),l.SessionId=n,l.APIType=e,l.APIID=i,l.Parameters=r,l.ResponseTime=a,l.ErrorType=s,(new c).LogData(l)}},e.onMethodDone=function(e,t,n,o){var i=null;if(t)if("number"==typeof t)i=String(t);else if("object"==typeof t)for(var r in t)null!==i?i+=",":i="","number"==typeof t[r]&&(i+=String(t[r]));else i="";OSF.AppTelemetry.onCallDone("method",e,i,n,o)},e.onPropertyDone=function(e,t){OSF.AppTelemetry.onCallDone("property",-1,e,t)},e.onCheckWACHost=function(e,t,n,o,i){var r=new OSFLog.CheckWACHostUsageData;r.isWacKnownHost=e,r.instanceId=t,r.hostType=n,r.hostPlatform=o,r.wacDomain="",(new c).LogData(r)},e.onEventDone=function(e,t){OSF.AppTelemetry.onCallDone("event",e,null,0,t)},e.onRegisterDone=function(e,t,n,o){OSF.AppTelemetry.onCallDone(e?"registerevent":"unregisterevent",t,null,n,o)},e.onAppClosed=function(e,i){if(t){var r=new OSFLog.AppClosedUsageData;r.CorrelationId=d(o),r.SessionId=n,r.FocusTime=i,r.OpenTime=e,r.AppSizeFinalWidth=window.innerWidth,r.AppSizeFinalHeight=window.innerHeight,(new l).saveLog(n,r.SerializeRow())}},e.setOsfControlAppCorrelationId=function(e){o=d(e)},e.doAppInitializationLogging=u,e.logAppCommonMessage=function(e){u(!1,e)},e.logAppException=function(e){u(!0,e)},e.canSendAddinId=f,e.getCompliantAppInstanceId=p,e._isComplianceExceptedHost=g,OSF.AppTelemetry=e}(OSFAppTelemetry||(OSFAppTelemetry={})),OSF.InitializationHelper.prototype.loadAppSpecificScriptAndCreateOM=function(e,t,n){OSF.DDA.ErrorCodeManager.initializeErrorMessages(Strings.OfficeOM),OSF.DDA.DispIdHost.addAsyncMethods(OSF.DDA.RichApi,[OSF.DDA.AsyncMethodNames.ExecuteRichApiRequestAsync]),OSF.DDA.RichApi.richApiMessageManager=new OfficeExt.RichApiMessageManager,t()},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}]}),Microsoft.Office.WebExtension.EventType={},OSF.EventDispatch=function(e){if(this._eventHandlers={},this._objectEventHandlers={},this._queuedEventsArgs={},null!=e)for(var t=0;t<e.length;t++){var n=e[t];"objectDeleted"==n||"objectSelectionChanged"==n||"objectDataChanged"==n||"contentControlAdded"==n?this._objectEventHandlers[n]={}:this._eventHandlers[n]=[],this._queuedEventsArgs[n]=[]}},OSF.EventDispatch.prototype={getSupportedEvents:function(){var e=[];for(var t in this._eventHandlers)e.push(t);for(var t in this._objectEventHandlers)e.push(t);return e},supportsEvent:function(e){for(var t in this._eventHandlers)if(e==t)return!0;for(var t in this._objectEventHandlers)if(e==t)return!0;return!1},hasEventHandler:function(e,t){var n=this._eventHandlers[e];if(n&&n.length>0)for(var o=0;o<n.length;o++)if(n[o]===t)return!0;return!1},hasObjectEventHandler:function(e,t,n){var o=this._objectEventHandlers[e];if(null!=o)for(var i=o[t],r=0;null!=i&&r<i.length;r++)if(i[r]===n)return!0;return!1},addEventHandler:function(e,t){if("function"!=typeof t)return!1;var n=this._eventHandlers[e];return!(!n||this.hasEventHandler(e,t))&&(n.push(t),!0)},addObjectEventHandler:function(e,t,n){if("function"!=typeof n)return!1;var o=this._objectEventHandlers[e];return!(!o||this.hasObjectEventHandler(e,t,n))&&(null==o[t]&&(o[t]=[]),o[t].push(n),!0)},addEventHandlerAndFireQueuedEvent:function(e,t){var n=0==this._eventHandlers[e].length,o=this.addEventHandler(e,t);return n&&o&&this.fireQueuedEvent(e),o},removeEventHandler:function(e,t){var n=this._eventHandlers[e];if(n&&n.length>0)for(var o=0;o<n.length;o++)if(n[o]===t)return n.splice(o,1),!0;return!1},removeObjectEventHandler:function(e,t,n){var o=this._objectEventHandlers[e];if(null!=o)for(var i=o[t],r=0;null!=i&&r<i.length;r++)if(i[r]===n)return i.splice(r,1),!0;return!1},clearEventHandlers:function(e){return void 0!==this._eventHandlers[e]&&this._eventHandlers[e].length>0&&(this._eventHandlers[e]=[],!0)},clearObjectEventHandlers:function(e,t){return null!=this._objectEventHandlers[e]&&null!=this._objectEventHandlers[e][t]&&(this._objectEventHandlers[e][t]=[],!0)},getEventHandlerCount:function(e){return null!=this._eventHandlers[e]?this._eventHandlers[e].length:-1},getObjectEventHandlerCount:function(e,t){return null==this._objectEventHandlers[e]||null==this._objectEventHandlers[e][t]?0:this._objectEventHandlers[e][t].length},fireEvent:function(e){if(null==e.type)return!1;var t=e.type;if(t&&this._eventHandlers[t]){for(var n=this._eventHandlers[t],o=0;o<n.length;o++)n[o](e);return!0}return!1},fireObjectEvent:function(e,t){if(null==t.type)return!1;var n=t.type;if(n&&this._objectEventHandlers[n]){var o=this._objectEventHandlers[n][e];if(null!=o){for(var i=0;i<o.length;i++)o[i](t);return!0}}return!1},fireOrQueueEvent:function(e){var t=e.type;if(t&&this._eventHandlers[t]){var n=this._eventHandlers[t],o=this._queuedEventsArgs[t];return 0==n.length?o.push(e):this.fireEvent(e),!0}return!1},fireQueuedEvent:function(e){if(e&&this._eventHandlers[e]){var t=this._eventHandlers[e],n=this._queuedEventsArgs[e];if(t.length>0){for(var o=t[0];n.length>0;){o(n.shift())}return!0}}return!1},clearQueuedEvent:function(e){e&&this._eventHandlers[e]&&(this._queuedEventsArgs[e]&&(this._queuedEventsArgs[e]=[]))}},OSF.DDA.OMFactory=OSF.DDA.OMFactory||{},OSF.DDA.OMFactory.manufactureEventArgs=function(e,t,n){var o;switch(e){case Microsoft.Office.WebExtension.EventType.DocumentSelectionChanged:o=new OSF.DDA.DocumentSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.BindingSelectionChanged:o=new OSF.DDA.BindingSelectionChangedEventArgs(this.manufactureBinding(n,t.document),n[OSF.DDA.PropertyDescriptors.Subset]);break;case Microsoft.Office.WebExtension.EventType.BindingDataChanged:o=new OSF.DDA.BindingDataChangedEventArgs(this.manufactureBinding(n,t.document));break;case Microsoft.Office.WebExtension.EventType.SettingsChanged:o=new OSF.DDA.SettingsChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ActiveViewChanged:o=new OSF.DDA.ActiveViewChangedEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.OfficeThemeChanged:o=new OSF.DDA.Theming.OfficeThemeChangedEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.DocumentThemeChanged:o=new OSF.DDA.Theming.DocumentThemeChangedEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.AppCommandInvoked:o=OSF.DDA.AppCommand.AppCommandInvokedEventArgs.create(n),"outlook"==OSF._OfficeAppFactory.getHostInfo().hostType&&"mac"==OSF._OfficeAppFactory.getHostInfo().hostPlatform&&OSF.DDA.convertOlkAppointmentTimeToDateFormat(o);break;case Microsoft.Office.WebExtension.EventType.ObjectDeleted:case Microsoft.Office.WebExtension.EventType.ObjectSelectionChanged:case Microsoft.Office.WebExtension.EventType.ObjectDataChanged:case Microsoft.Office.WebExtension.EventType.ContentControlAdded:o=new OSF.DDA.ObjectEventArgs(e,n[Microsoft.Office.WebExtension.Parameters.Id]);break;case Microsoft.Office.WebExtension.EventType.RichApiMessage:o=new OSF.DDA.RichApiMessageEventArgs(e,n);break;case Microsoft.Office.WebExtension.EventType.DataNodeInserted:o=new OSF.DDA.NodeInsertedEventArgs(this.manufactureDataNode(n[OSF.DDA.DataNodeEventProperties.NewNode]),n[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeReplaced:o=new OSF.DDA.NodeReplacedEventArgs(this.manufactureDataNode(n[OSF.DDA.DataNodeEventProperties.OldNode]),this.manufactureDataNode(n[OSF.DDA.DataNodeEventProperties.NewNode]),n[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.DataNodeDeleted:o=new OSF.DDA.NodeDeletedEventArgs(this.manufactureDataNode(n[OSF.DDA.DataNodeEventProperties.OldNode]),this.manufactureDataNode(n[OSF.DDA.DataNodeEventProperties.NextSiblingNode]),n[OSF.DDA.DataNodeEventProperties.InUndoRedo]);break;case Microsoft.Office.WebExtension.EventType.TaskSelectionChanged:o=new OSF.DDA.TaskSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ResourceSelectionChanged:o=new OSF.DDA.ResourceSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.ViewSelectionChanged:o=new OSF.DDA.ViewSelectionChangedEventArgs(t);break;case Microsoft.Office.WebExtension.EventType.DialogMessageReceived:o=new OSF.DDA.DialogEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived:o=new OSF.DDA.DialogParentEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.ItemChanged:if("outlook"!=OSF._OfficeAppFactory.getHostInfo().hostType)throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,e));o=new OSF.DDA.OlkItemSelectedChangedEventArgs(n),t.initialize(o.initialData),"win32"!=OSF._OfficeAppFactory.getHostInfo().hostPlatform&&"mac"!=OSF._OfficeAppFactory.getHostInfo().hostPlatform||t.setCurrentItemNumber(o.itemNumber.itemNumber);break;case Microsoft.Office.WebExtension.EventType.RecipientsChanged:if("outlook"!=OSF._OfficeAppFactory.getHostInfo().hostType)throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,e));o=new OSF.DDA.OlkRecipientsChangedEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.AppointmentTimeChanged:if("outlook"!=OSF._OfficeAppFactory.getHostInfo().hostType)throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,e));o=new OSF.DDA.OlkAppointmentTimeChangedEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.RecurrenceChanged:if("outlook"!=OSF._OfficeAppFactory.getHostInfo().hostType)throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,e));o=new OSF.DDA.OlkRecurrenceChangedEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.AttachmentsChanged:if("outlook"!=OSF._OfficeAppFactory.getHostInfo().hostType)throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,e));o=new OSF.DDA.OlkAttachmentsChangedEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.EnhancedLocationsChanged:if("outlook"!=OSF._OfficeAppFactory.getHostInfo().hostType)throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,e));o=new OSF.DDA.OlkEnhancedLocationsChangedEventArgs(n);break;case Microsoft.Office.WebExtension.EventType.InfobarClicked:if("outlook"!=OSF._OfficeAppFactory.getHostInfo().hostType)throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,e));o=new OSF.DDA.OlkInfobarClickedEventArgs(n);break;default:throw OsfMsAjaxFactory.msAjaxError.argument(Microsoft.Office.WebExtension.Parameters.EventType,OSF.OUtil.formatString(Strings.OfficeOM.L_NotSupportedEventType,e))}return o},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(e,t,n){return n.supportsEvent(e)}},{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(e,t,n){return n.supportsEvent(e)}}],supportedOptions:[{name:Microsoft.Office.WebExtension.Parameters.Handler,value:{types:["function","object"],defaultValue:null}}],privateStateCallbacks:[]}),OSF.OUtil.augmentList(Microsoft.Office.WebExtension.EventType,{RichApiMessage:"richApiMessage"}),OSF.DDA.RichApiMessageEventArgs=function(e,t){var n=t[Microsoft.Office.WebExtension.Parameters.Data],o=[];if(n)for(var i=0;i<n.length;i++){var r=n[i];r.toArray&&(r=r.toArray()),o.push({messageCategory:r[0],messageType:r[1],targetId:r[2],message:r[3],id:r[4],isRemoteOverride:r[5]})}OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.RichApiMessage},entries:{value:o}})},function(e){var t=function(){function e(){this._eventDispatch=null,this._registerHandlers=[],this._eventDispatch=new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.RichApiMessage]),OSF.DDA.DispIdHost.addEventSupport(this,this._eventDispatch)}return e.prototype.register=function(e){var t=this;return this._registerWithHostPromise||(this._registerWithHostPromise=new Office.Promise((function(e,n){t.addHandlerAsync(Microsoft.Office.WebExtension.EventType.RichApiMessage,(function(e){t._registerHandlers.forEach((function(t){t&&t(e)}))}),(function(t){"failed"==t.status?n(t.error):e()}))}))),this._registerWithHostPromise.then((function(){t._registerHandlers.push(e)}))},e}();e.RichApiMessageManager=t}(OfficeExt||(OfficeExt={})),OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.EventDispId.dispidRichApiMessageEvent,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.ArrayData}]}),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",MessageOrigin:"messageOrigin"}),OSF.DDA.DialogEventType={},OSF.OUtil.augmentList(OSF.DDA.DialogEventType,{DialogClosed:"dialogClosed",NavigationFailed:"naviationFailed"}),OSF.DDA.AsyncMethodNames.addNames({DisplayDialogAsync:"displayDialogAsync",DisplayModalDialogAsync:"displayModalDialogAsync",CloseAsync:"close"}),OSF.DDA.SyncMethodNames.addNames({MessageParent:"messageParent",MessageChild:"messageChild",SendMessage:"sendMessage",AddMessageHandler:"addEventHandler"}),OSF.DDA.UI.ParentUI=function(){var e;if(e=null!=Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived?new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DialogMessageReceived,Microsoft.Office.WebExtension.EventType.DialogEventReceived,Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived]):new OSF.EventDispatch([Microsoft.Office.WebExtension.EventType.DialogMessageReceived,Microsoft.Office.WebExtension.EventType.DialogEventReceived]),Microsoft.Office.WebExtension.FeatureGates&&Microsoft.Office.WebExtension.FeatureGates.OfficeJsDialogRefactor){var t=this,n=function(n,o){t[n]||OSF.OUtil.defineEnumerableProperty(t,n,{value:function(){var n=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.OpenDialog];n(arguments,e,t,o)}})};n(OSF.DDA.AsyncMethodNames.DisplayDialogAsync.displayName,!1),Microsoft.Office.WebExtension.FeatureGates.ModalWebDialogAPI&&n(OSF.DDA.AsyncMethodNames.DisplayModalDialogAsync.displayName,!0)}else{var o=OSF.DDA.AsyncMethodNames.DisplayDialogAsync.displayName,i=this;i[o]||OSF.OUtil.defineEnumerableProperty(i,o,{value:function(){var t=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.OpenDialog];t(arguments,e,i,!1)}})}OSF.OUtil.finalizeProperties(this)},OSF.DDA.UI.ChildUI=function(e){var t=OSF.DDA.SyncMethodNames.MessageParent.displayName,n=this;n[t]||OSF.OUtil.defineEnumerableProperty(n,t,{value:function(){var e=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.MessageParent];return e(arguments,n)}});var o=OSF.DDA.SyncMethodNames.AddMessageHandler.displayName;n[o]||void 0===OSF.DialogParentMessageEventDispatch||OSF.DDA.DispIdHost.addEventSupport(n,OSF.DialogParentMessageEventDispatch,e),OSF.OUtil.finalizeProperties(this)},OSF.DialogHandler=function(){},OSF.DDA.DialogEventArgs=function(e){e[OSF.DDA.PropertyDescriptors.MessageType]==OSF.DialogMessageType.DialogMessageReceived?OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogMessageReceived},message:{value:e[OSF.DDA.PropertyDescriptors.MessageContent]},origin:{value:e[OSF.DDA.PropertyDescriptors.MessageOrigin]}}):OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogEventReceived},error:{value:e[OSF.DDA.PropertyDescriptors.MessageType]}})},OSF.DDA.DialogParentEventArgs=function(e){OSF.OUtil.defineEnumerableProperties(this,{type:{value:Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived},message:{value:e[OSF.DDA.PropertyDescriptors.MessageContent]},origin:{value:e[OSF.DDA.PropertyDescriptors.MessageOrigin]}})};var DialogApiManager=function(){function e(){}return e.defineApi=function(e,t){OSF.DDA.AsyncMethodCalls.define({method:e,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.Url,types:["string"]}],supportedOptions:t,privateStateCallbacks:[],onSucceeded:function(e,t,n){var o=e[Microsoft.Office.WebExtension.Parameters.Id],i=e[Microsoft.Office.WebExtension.Parameters.Data],r=new OSF.DialogHandler,a=OSF.DDA.AsyncMethodNames.CloseAsync.displayName;OSF.OUtil.defineEnumerableProperty(r,a,{value:function(){var e=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.CloseDialog];e(arguments,o,i,r)}});var s=OSF.DDA.SyncMethodNames.AddMessageHandler.displayName;if(OSF.OUtil.defineEnumerableProperty(r,s,{value:function(){var e=OSF.DDA.SyncMethodCalls[OSF.DDA.SyncMethodNames.AddMessageHandler.id],t=e.verifyAndExtractCall(arguments,r,i),n=t[Microsoft.Office.WebExtension.Parameters.EventType],o=t[Microsoft.Office.WebExtension.Parameters.Handler];return i.addEventHandlerAndFireQueuedEvent(n,o)}}),!0===OSF.DDA.UI.EnableSendMessageDialogAPI){var l=OSF.DDA.SyncMethodNames.SendMessage.displayName;OSF.OUtil.defineEnumerableProperty(r,l,{value:function(){var e=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.SendMessage];return e(arguments,i,r)}})}if(!0===OSF.DDA.UI.EnableMessageChildDialogAPI){var c=OSF.DDA.SyncMethodNames.MessageChild.displayName;OSF.OUtil.defineEnumerableProperty(r,c,{value:function(){var e=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.SendMessage];return e(arguments,i,r)}})}return r},checkCallArgs:function(e,t,n){return e[Microsoft.Office.WebExtension.Parameters.Width]<=0&&(e[Microsoft.Office.WebExtension.Parameters.Width]=1),!e[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels]&&e[Microsoft.Office.WebExtension.Parameters.Width]>100&&(e[Microsoft.Office.WebExtension.Parameters.Width]=99),e[Microsoft.Office.WebExtension.Parameters.Height]<=0&&(e[Microsoft.Office.WebExtension.Parameters.Height]=1),!e[Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels]&&e[Microsoft.Office.WebExtension.Parameters.Height]>100&&(e[Microsoft.Office.WebExtension.Parameters.Height]=99),e[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]||(e[Microsoft.Office.WebExtension.Parameters.RequireHTTPs]=!0),e}})},e.messageChildRichApiBridge=function(){if(!0===OSF.DDA.UI.EnableMessageChildDialogAPI){var e=OSF._OfficeAppFactory.getHostFacade()[OSF.DDA.DispIdHost.Methods.SendMessage];return e(arguments,null,null)}},e.initOnce=function(){e.defineApi(OSF.DDA.AsyncMethodNames.DisplayDialogAsync,e.displayDialogAsyncApiSupportedOptions),e.defineApi(OSF.DDA.AsyncMethodNames.DisplayModalDialogAsync,e.displayModalDialogAsyncApiSupportedOptions)},e.displayDialogAsyncApiSupportedOptions=[{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}},{name:Microsoft.Office.WebExtension.Parameters.HideTitle,value:{types:["boolean"],defaultValue:!1}},{name:Microsoft.Office.WebExtension.Parameters.UseDeviceIndependentPixels,value:{types:["boolean"],defaultValue:!1}},{name:Microsoft.Office.WebExtension.Parameters.PromptBeforeOpen,value:{types:["boolean"],defaultValue:!0}},{name:Microsoft.Office.WebExtension.Parameters.EnforceAppDomain,value:{types:["boolean"],defaultValue:!0}},{name:Microsoft.Office.WebExtension.Parameters.UrlNoHostInfo,value:{types:["boolean"],defaultValue:!1}}],e.displayModalDialogAsyncApiSupportedOptions=e.displayDialogAsyncApiSupportedOptions.concat([{name:"abortWhenParentIsMinimized",value:{types:["boolean"],defaultValue:!1}},{name:"abortWhenDocIsInactive",value:{types:["boolean"],defaultValue:!1}}]),e}();DialogApiManager.initOnce(),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:[{name:Microsoft.Office.WebExtension.Parameters.TargetOrigin,value:{types:["string"],defaultValue:""}}]}),OSF.DDA.SyncMethodCalls.define({method:OSF.DDA.SyncMethodNames.AddMessageHandler,requiredArguments:[{name:Microsoft.Office.WebExtension.Parameters.EventType,enum:Microsoft.Office.WebExtension.EventType,verify:function(e,t,n){return n.supportsEvent(e)}},{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:[{name:Microsoft.Office.WebExtension.Parameters.TargetOrigin,value:{types:["string"],defaultValue:""}}],privateStateCallbacks:[]}),OSF.OUtil.setNamespace("Marshaling",OSF.DDA),OSF.OUtil.setNamespace("Dialog",OSF.DDA.Marshaling),OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys={MessageType:"messageType",MessageContent:"messageContent",MessageOrigin:"messageOrigin",TargetOrigin:"targetOrigin"},OSF.DDA.Marshaling.Dialog.DialogParentMessageReceivedEventKeys={MessageType:"messageType",MessageContent:"messageContent",MessageOrigin:"messageOrigin",TargetOrigin:"targetOrigin"},OSF.DDA.Marshaling.MessageParentKeys={MessageToParent:"messageToParent",TargetOrigin:"targetOrigin"},OSF.DDA.Marshaling.DialogNotificationShownEventType={DialogNotificationShown:"dialogNotificationShown"},OSF.DDA.Marshaling.SendMessageKeys={MessageContent:"messageContent",TargetOrigin:"targetOrigin"},function(e){!function(e){var t="excel",n="word",o="powerpoint",i="outlook",r="visio";e.getDialogCssManager=function(e){switch(e){case t:case n:case o:case i:case r:default:return new a}return null};var a=function(){function e(){this.overlayElementCSS=["position: absolute","top: 0","left: 0","width: 100%","height: 100%","background-color: rgba(198, 198, 198, 0.5)","z-index: 99998"],this.dialogNotificationPanelCSS=["width: 100%","height: 190px","position: absolute","z-index: 99999","background-color: rgba(255, 255, 255, 1)","left: 0px","top: 50%","margin-top: -95px"],this.newWindowNotificationTextPanelCSS=["margin: 20px 14px","font-family: Segoe UI,Arial,Verdana,sans-serif","font-size: 14px","height: 100px","line-height: 100px"],this.newWindowNotificationTextSpanCSS=["display: inline-block","line-height: normal","vertical-align: middle"],this.crossZoneNotificationTextPanelCSS=["margin: 20px 14px","font-family: Segoe UI,Arial,Verdana,sans-serif","font-size: 14px","height: 100px"],this.dialogNotificationButtonPanelCSS="margin:0px 9px",this.buttonStyleCSS=["text-align: center","width: 70px","height: 25px","font-size: 14px","font-family: Segoe UI,Arial,Verdana,sans-serif","margin: 0px 5px","border-width: 1px","border-style: solid"]}return e.prototype.getOverlayElementCSS=function(){return this.overlayElementCSS.join(";")},e.prototype.getDialogNotificationPanelCSS=function(){return this.dialogNotificationPanelCSS.join(";")},e.prototype.getNewWindowNotificationTextPanelCSS=function(){return this.newWindowNotificationTextPanelCSS.join(";")},e.prototype.getNewWindowNotificationTextSpanCSS=function(){return this.newWindowNotificationTextSpanCSS.join(";")},e.prototype.getCrossZoneNotificationTextPanelCSS=function(){return this.crossZoneNotificationTextPanelCSS.join(";")},e.prototype.getDialogNotificationButtonPanelCSS=function(){return this.dialogNotificationButtonPanelCSS},e.prototype.getDialogButtonCSS=function(){return this.buttonStyleCSS.join(";")},e}();e.DefaultDialogCSSManager=a}(e.WacCommonUICssManager||(e.WacCommonUICssManager={}))}(OfficeExt||(OfficeExt={})),function(e){!function(t){!function(t){var n=null,o=null,i=null,r=null,a="osfDialogInternal:action=closeDialog",s=null,l=!1,c=-1,d="messageParentKey",u=null,f="#ababab",p="#ffffff",g="newWindowNotificaiton",m="configureBrowserLink",O="dialogNotificationTextPanel",S=e.WACUtils.shouldUseLocalStorageToPassMessage(),h={dispId:OSF.DDA.EventDispId.dispidDialogNotificationShownInAddinEvent,eventType:OSF.DDA.Marshaling.DialogNotificationShownEventType.DialogNotificationShown,onComplete:null,onCalling:null};function D(t,n){var o=!1,a=e.WacCommonUICssManager.getDialogCssManager(n);i=b(a),document.body.insertBefore(i,document.body.firstChild),(r=function(t,n){var o=document.createElement("div");o.style.cssText=t.getDialogNotificationPanelCSS(),x(o);var i=document.createElement("div");i.style.cssText=t.getCrossZoneNotificationTextPanelCSS(),i.id=O;var r=document.createElement("a");r.id=m,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')");var a=document.createElement("span");Strings.OfficeOM.L_NewWindowCrossZone&&(a.innerHTML=OSF.OUtil.formatString(Strings.OfficeOM.L_NewWindowCrossZone,r.outerHTML,e.WACUtils.getDomainForUrl(n)));return i.appendChild(a),o.appendChild(i),o}(a,t)).id="crossZoneNotification";var s=w(a),c=F(a,Strings.OfficeOM.L_DialogOK?Strings.OfficeOM.L_DialogOK:"OK");s.appendChild(c),r.appendChild(s),document.body.insertBefore(r,document.body.firstChild),l=!0,c.onclick=function(){E()},c.addEventListener("keydown",(function(e){9==e.keyCode?(document.getElementById(m).focus(),e.preventDefault(),e.stopPropagation()):13==e.keyCode&&(o=!0,e.preventDefault(),e.stopPropagation())}),!1),c.addEventListener("keyup",(function(e){13==e.keyCode&&o&&(o=!1,E(),e.preventDefault(),e.stopPropagation())}),!1),document.getElementById(m).addEventListener("keydown",(function(e){9==e.keyCode&&(c.focus(),e.preventDefault(),e.stopPropagation())}),!1),window.focus(),c.focus()}function v(e){if(e.source==n)try{var t=e.origin,i=OSF._OfficeAppFactory.getInitializationHelper()._appContext._addInSourceUrl;if(i||(i=window.location.origin)||(i=window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:"")),!function(e,t,n){if(void 0===n&&(n=!0),!e||!t)return!1;var o=OSF.OUtil.parseUrl(e),i=OSF.OUtil.parseUrl(t),r=OSF._OfficeAppFactory.getInitializationHelper()._appContext._appDomains;if("https:"!==o.protocol)return!1;var a=o.protocol===i.protocol&&o.hostname===i.hostname&&o.port===i.port,s=Microsoft.Office.Common.XdmCommunicationManager.checkUrlWithAppDomains(r,e),l=a||s;return!l&&n&&(l=Microsoft.Office.Common.XdmCommunicationManager.isTargetSubdomainOfSourceLocation(t,e)),l}(t,i,!0))throw new Error("Received a message from a dialog with an untrusted domain.");var r={};r[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageType]=OSF.DialogMessageType.DialogMessageReceived,r[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageContent]=e.data,r[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageOrigin]=t,o(r)}catch(e){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Error happened during receive message handler."+e)}}function A(e){var t=OSF._OfficeAppFactory.getInitializationHelper()._webAppState.id+d;if(e.key==t)try{var n={};n[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageType]=OSF.DialogMessageType.DialogMessageReceived,n[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageContent]=e.newValue,n[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageOrigin]=e.origin,o(n)}catch(e){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Error happened during storage changed handler."+e)}}function y(t){var i=OSF._OfficeAppFactory.getInitializationHelper()._hostInfo,r=[i.hostType,i.hostPlatform,i.hostSpecificFileVersion,i.hostLocale,i.osfControlAppCorrelationId,"isDialog",i.disableLogging?"disableLogging":"",i.flags&OSF.HostInfoFlags.PublicAddin].join("$"),a=OSF._OfficeAppFactory.getInitializationHelper()._appContext;a._taskpaneUrl=window.location.origin,a._taskpaneUrl||(a._taskpaneUrl=window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:""));var l=t[OSF.ShowWindowDialogParameterKeys.Url];t[OSF.ShowWindowDialogParameterKeys.UrlNoHostInfo]||(l=e.WACUtils.addHostInfoAsQueryParam(l,r));var d=JSON.parse(window.name);d[OSF.WindowNameItemKeys.HostInfo]=r,d[OSF.WindowNameItemKeys.AppContext]=a;var u=t[OSF.ShowWindowDialogParameterKeys.Width]*screen.width/100,f=t[OSF.ShowWindowDialogParameterKeys.Height]*screen.height/100,p="width="+u+", height="+f+", left="+(a._clientWindowWidth/2-u/2)+", top="+(a._clientWindowHeight/2-f/2)+",channelmode=no,directories=no,fullscreen=no,location=no,menubar=no,resizable=yes,scrollbars=yes,status=no,titlebar=yes,toolbar=no";if(null==(n=window.open(l,e.WACUtils.serializeObjectToString(d),p)))return OSF.AppTelemetry.logAppCommonMessage("Encountered cross zone issue in displayDialogAsync api."),_(),D(l,i.hostType),void s(OSF.DDA.ErrorCodeManager.errorCodes.ooeCrossZone);S?window.addEventListener("storage",A):window.addEventListener("message",v),c=window.setInterval((function(){try{if(null==n||n.closed){window.clearInterval(c),S?window.removeEventListener("storage",A):window.removeEventListener("message",v);var e={};e[OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageType]=OSF.DialogMessageType.DialogClosed,o(e)}}catch(e){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Error happened during check or handle window close."+e)}}),1e3),null!=s?s(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess):OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("showDialogCallback can not be null.")}function F(e,t){var n=document.createElement("input");n.setAttribute("type","button"),n.style.cssText=e.getDialogButtonCSS(),n.style.borderColor=f,n.style.backgroundColor=p,n.setAttribute("value",t);var o=function(){C(n)},i=function(){M(n)};return n.addEventListener("mouseover",o),n.addEventListener("focus",o),n.addEventListener("mouseout",i),n.addEventListener("focusout",i),n}function C(e){null!=u?(e.style.borderColor=u.HostButtonBorderColor,e.style.backgroundColor=u.HostButtonBackgroundColor):OSF.CommonUI&&OSF.CommonUI.HostButtonBorderColor&&OSF.CommonUI.HostButtonBackgroundColor?(e.style.borderColor=OSF.CommonUI.HostButtonBorderColor,e.style.backgroundColor=OSF.CommonUI.HostButtonBackgroundColor):e.style.backgroundColor="#ccc"}function M(e){e.style.borderColor=f,e.style.backgroundColor=p}function E(){h.onCalling=function(e){_(),I(e)},OSF.DDA.WAC.Delegate.unregisterEventAsync(h)}function _(){null!=r&&(document.body.removeChild(r),r=null),null!=i&&(document.body.removeChild(i),i=null)}function b(e){var t=document.createElement("div");return t.style.cssText=e.getOverlayElementCSS(),t}function w(e){var t=document.createElement("div");return t.style.cssText=e.getDialogNotificationButtonPanelCSS(),"rtl"==document.documentElement.getAttribute("dir")?t.style.cssFloat="left":t.style.cssFloat="right",t}function I(e){if(e!=OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess){var t=document.querySelectorAll(OSF._OfficeAppFactory.getInitializationHelper()._tabbableElements);OSF.OUtil.focusToFirstTabbable(t,!1)}}function x(e){e.setAttribute("role","dialog"),e.setAttribute("aria-describedby",O)}t.setHostThemeButtonStyle=function(e){var t=e.input;null!=t&&(u={HostButtonBorderColor:t[OSF.HostThemeButtonStyleKeys.ButtonBorderColor],HostButtonBackgroundColor:t[OSF.HostThemeButtonStyleKeys.ButtonBackgroundColor]}),e.completed()},t.removeEventListenersForDialog=function(e){OSF._OfficeAppFactory.getInitializationHelper().addOrRemoveEventListenersForWindow(!1),e.completed()},t.handleNewWindowDialog=function(t){try{if(!function(e){var t=OSF._OfficeAppFactory.getInitializationHelper()._appContext._appDomains,n=e[OSF.ShowWindowDialogParameterKeys.Url],o=Microsoft.Office.Common.XdmCommunicationManager.checkUrlWithAppDomains(t,n);if(!o){var i=OSF._OfficeAppFactory.getInitializationHelper()._appContext._addInSourceUrl;return i||(i=window.location.origin)||(i=window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:"")),i&&Microsoft.Office.Common.XdmCommunicationManager.isTargetSubdomainOfSourceLocation(i,n)}return o}(t))return void s(OSF.DDA.ErrorCodeManager.errorCodes.ooeAppDomains);if(!t[OSF.ShowWindowDialogParameterKeys.PromptBeforeOpen])return void y(t);l=!1;var n=!1,o=OSF._OfficeAppFactory.getInitializationHelper()._hostInfo,a=e.WacCommonUICssManager.getDialogCssManager(o.hostType),c=OSF.OUtil.formatString(Strings.OfficeOM.L_ShowWindowDialogNotification,OSF._OfficeAppFactory.getInitializationHelper()._appContext._addinName);i=b(a);var d=function(e){var t=[];try{for(;e.firstChild&&null!=e.firstChild;)t.push(e.firstChild),e.removeChild(e.firstChild)}catch(e){}return t}(document.body);document.body.appendChild(i),(r=function(e,t){var n=document.createElement("div");n.style.cssText=e.getDialogNotificationPanelCSS(),x(n);var o=document.createElement("div");o.style.cssText=e.getNewWindowNotificationTextPanelCSS(),o.id=O,"rtl"==document.documentElement.getAttribute("dir")?o.style.paddingRight="30px":o.style.paddingLeft="30px";var i=document.createElement("span");return i.style.cssText=e.getNewWindowNotificationTextSpanCSS(),i.innerText=t,o.appendChild(i),n.appendChild(o),n}(a,c)).id=g;var u=w(a),f=F(a,Strings.OfficeOM.L_ShowWindowDialogNotificationAllow),p=F(a,Strings.OfficeOM.L_ShowWindowDialogNotificationIgnore);function m(e,t){try{for(var n=0;n<t.length;n++)e.appendChild(t[n])}catch(e){}}function S(e){h.onCalling=function(e){_(),I(e),s(OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore)},OSF.DDA.WAC.Delegate.unregisterEventAsync(h),m(document.body,d),d=[],e.preventDefault(),e.stopPropagation()}u.appendChild(f),u.appendChild(p),r.appendChild(u),document.body.insertBefore(r,document.body.firstChild),f.onclick=function(e){y(t),l||E(),m(document.body,d),d=[],e.preventDefault(),e.stopPropagation()},p.onclick=S,f.addEventListener("keydown",(function(e){e.shiftKey&&9==e.keyCode&&(M(f),C(p),p.focus(),e.preventDefault(),e.stopPropagation())}),!1),p.addEventListener("keydown",(function(e){e.shiftKey||9!=e.keyCode?13==e.keyCode&&(n=!0,e.preventDefault(),e.stopPropagation()):(M(p),C(f),f.focus(),e.preventDefault(),e.stopPropagation())}),!1),p.addEventListener("keyup",(function(e){13==e.keyCode&&n&&(n=!1,S(e))}),!1),window.focus(),h.onCalling=function(e){f.focus()},OSF.DDA.WAC.Delegate.registerEventAsync(h)}catch(e){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Exception happens at new window dialog."+e),s(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError)}},t.closeDialog=function(e){try{if(null!=n){var t=OSF._OfficeAppFactory.getInitializationHelper()._appContext._appDomains;if(t)for(var o=0;o<t.length&&-1!==t[o].indexOf("://");o++)n.postMessage(a,t[o]);null==n||n.closed||n.close(),S?window.removeEventListener("storage",A):window.removeEventListener("message",v),window.clearInterval(c),n=null,e(OSF.DDA.ErrorCodeManager.errorCodes.ooeSuccess)}else e(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError)}catch(t){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Exception happens at close window dialog."+t),e(OSF.DDA.ErrorCodeManager.errorCodes.ooeInternalError)}},t.messageParent=function(e){var t=e.hostCallArgs[Microsoft.Office.WebExtension.Parameters.MessageToParent],n=e.hostCallArgs[Microsoft.Office.WebExtension.Parameters.TargetOrigin]||null;if(!n){var o=window.location.origin;o||(o=window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:"")),n=o}if(S)try{var i=OSF._OfficeAppFactory.getInitializationHelper()._webAppState.id+d;window.localStorage.setItem(i,t)}catch(e){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Error happened during messageParent method:"+e)}else window.opener.postMessage(t,n)},t.sendMessage=function(e){if(null!=n){var t=e.hostCallArgs,o=t[Microsoft.Office.WebExtension.Parameters.TargetOrigin]||null;if(delete t[Microsoft.Office.WebExtension.Parameters.TargetOrigin],!o){var i=window.location.origin;i||(i=window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:"")),o=i}"string"!=typeof t&&(t=JSON.stringify(t)),n.postMessage(t,o)}},t.registerMessageReceivedEvent=function(){window.addEventListener("message",(function(e){if(e.source==window.opener)if("string"==typeof e.data&&e.data.indexOf(a)>-1)window.close();else{var t=e.data,n=typeof t;if(t&&("object"==n||"string"==n)){var o="string"==n?JSON.parse(t):t,i={};i[OSF.DDA.PropertyDescriptors.MessageContent]=o.messageContent,i[OSF.DDA.PropertyDescriptors.MessageOrigin]=e.origin;var r=OSF.DDA.OMFactory.manufactureEventArgs(Microsoft.Office.WebExtension.EventType.DialogParentMessageReceived,null,i);OSF.DialogParentMessageEventDispatch.fireEvent(r)}}}))},t.setHandlerAndShowDialogCallback=function(e,t){o=e,s=t},t.escDismissDialogNotification=function(){try{r&&r.id==g&&s&&s(OSF.DDA.ErrorCodeManager.errorCodes.ooeEndUserIgnore)}catch(e){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Error happened during executing displayDialogAsync callback."+e)}E()},t.showCrossZoneNotification=D}(t.Dialog||(t.Dialog={}))}(e.AddinNativeAction||(e.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},{name:OSF.DDA.PropertyDescriptors.MessageOrigin,value:OSF.DDA.Marshaling.Dialog.DialogMessageReceivedEventKeys.MessageOrigin}]}),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},{name:OSF.DDA.PropertyDescriptors.MessageOrigin,value:OSF.DDA.Marshaling.Dialog.DialogParentMessageReceivedEventKeys.MessageOrigin}]}),OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidMessageParentMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.MessageToParent,value:OSF.DDA.Marshaling.MessageParentKeys.MessageToParent},{name:Microsoft.Office.WebExtension.Parameters.TargetOrigin,value:OSF.DDA.Marshaling.MessageParentKeys.TargetOrigin}]}),OSF.DDA.WAC.Delegate.ParameterMap.define({type:OSF.DDA.MethodDispId.dispidSendMessageMethod,toHost:[{name:Microsoft.Office.WebExtension.Parameters.MessageContent,value:OSF.DDA.Marshaling.SendMessageKeys.MessageContent},{name:Microsoft.Office.WebExtension.Parameters.TargetOrigin,value:OSF.DDA.Marshaling.MessageParentKeys.TargetOrigin}]}),OSF.DDA.WAC.Delegate.openDialog=function(e){var t="https://",n="http://",o=JSON.parse(e.targetId),i=OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent(!0,e);function r(e){var t={Error:e};try{i(Microsoft.Office.Common.InvokeResultCode.noError,t)}catch(e){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Exception happens at showDialogCallback."+e)}}if(OSF.DialogShownStatus.hasDialogShown)r(OSF.DDA.ErrorCodeManager.errorCodes.ooeDialogAlreadyOpened);else{var a=o[OSF.ShowWindowDialogParameterKeys.Url].toLowerCase(),s=window.location.href.toLowerCase();if(OSF.AppTelemetry){var l=!1,c=!1,d=!1,u=!1,f="",p="";if(OSF.OUtil){var g=OSF.OUtil.parseUrl(a),m=OSF.OUtil.parseUrl(s);l=g.protocol===m.protocol&&g.hostname===m.hostname&&g.port===m.port,f=OSF.OUtil.getHostnamePortionForLogging(g.hostname),l?p=f:(p=OSF.OUtil.getHostnamePortionForLogging(m.hostname),c=Microsoft.Office.Common.XdmCommunicationManager.isTargetSubdomainOfSourceLocation(a,s),d=Microsoft.Office.Common.XdmCommunicationManager.isTargetSubdomainOfSourceLocation(s,a));var O=OSF._OfficeAppFactory.getInitializationHelper()._appContext._appDomains;u=Microsoft.Office.Common.XdmCommunicationManager.checkUrlWithAppDomains(O,a)}var S="openDialog isInline: "+o[OSF.ShowWindowDialogParameterKeys.DisplayInIframe].toString()+", taskpaneHostname: "+p+", dialogHostName: "+f+", isSameDomain: "+l.toString()+", parentIsSubdomain: "+c.toString()+", childIsSubdomain: "+d.toString()+", isAppDomain: "+u.toString();OSF.AppTelemetry.logAppCommonMessage(S)}null!=a&&a.substr(0,t.length)===t?o[OSF.ShowWindowDialogParameterKeys.DisplayInIframe]?(OSF.DialogShownStatus.isWindowDialog=!1,OSF.DDA.WAC.Delegate.registerEventAsync(e)):(OSF.DialogShownStatus.isWindowDialog=!0,OfficeExt.AddinNativeAction.Dialog.setHandlerAndShowDialogCallback((function(t){e.onEvent&&e.onEvent(t),OSF.AppTelemetry&&OSF.AppTelemetry.onEventDone(e.dispId)}),r),OfficeExt.AddinNativeAction.Dialog.handleNewWindowDialog(o)):a.substr(0,n.length)===n?r(OSF.DDA.ErrorCodeManager.errorCodes.ooeRequireHTTPS):r(OSF.DDA.ErrorCodeManager.errorCodes.ooeInvalidScheme)}},OSF.DDA.WAC.Delegate.messageParent=function(e){null!=window.opener?OfficeExt.AddinNativeAction.Dialog.messageParent(e):OSF.DDA.WAC.Delegate.executeAsync(e)},OSF.DDA.WAC.Delegate.sendMessage=function(e){OSF.DialogShownStatus.hasDialogShown&&(OSF.DialogShownStatus.isWindowDialog?OfficeExt.AddinNativeAction.Dialog.sendMessage(e):OSF.DDA.WAC.Delegate.executeAsync(e))},OSF.DDA.WAC.Delegate.closeDialog=function(e){var t=OSF.DDA.WAC.Delegate._getOnAfterRegisterEvent(!1,e);function n(e){var n={Error:e};try{t(Microsoft.Office.Common.InvokeResultCode.noError,n)}catch(e){OSF.AppTelemetry&&OSF.AppTelemetry.logAppException("Exception happens at closeDialogCallback."+e)}}OSF.DialogShownStatus.hasDialogShown?OSF.DialogShownStatus.isWindowDialog?(e.onCalling&&e.onCalling(),OfficeExt.AddinNativeAction.Dialog.closeDialog(n)):OSF.DDA.WAC.Delegate.unregisterEventAsync(e):n(OSF.DDA.ErrorCodeManager.errorCodes.ooeWebDialogClosed)},OSF.InitializationHelper.prototype.dismissDialogNotification=function(){OfficeExt.AddinNativeAction.Dialog.escDismissDialogNotification()},OSF.InitializationHelper.prototype.registerMessageReceivedEventForWindowDialog=function(){OfficeExt.AddinNativeAction.Dialog.registerMessageReceivedEvent()},OSF.InitializationHelper.prototype.prepareApiSurface=function(e){OSF.WebApp._UpdateLinksForHostAndXdmInfo();var t=new OSF.DDA.License(e.get_eToken());this.initWebDialog(e),OSF._OfficeAppFactory.setContext(new OSF.DDA.Context(e,e.doc,t));var n=OSF.DDA.WAC.getDelegateMethods,o=OSF.DDA.WAC.Delegate.ParameterMap;OSF._OfficeAppFactory.setHostFacade(new OSF.DDA.DispIdHost.Facade(n,o))},function(e){var t={};function n(o){if(t[o])return t[o].exports;var i=t[o]={i:o,l:!1,exports:{}};return e[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(o,i,function(t){return e[t]}.bind(null,i));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1)}([function(e,t){e.exports=OfficeExtensionBatch},function(e,t,n){"use strict";var o=this&&this.__assign||function(){return(o=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),r=n(3),a=n(4),s=n(5),l=n(6),c=n(7),d=n(10),u=n(11);window._OfficeRuntimeWeb=o(o({},window.OfficeRuntime),{displayWebDialog:a.displayWebDialog,AsyncStorage:r,storage:s.storage,experimentation:l.experimentation,apiInformation:i.apiInformation,message:c.Message.instance,ui:u.ui,auth:d.Auth.instance}),Object.freeze(window._OfficeRuntimeWeb)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.apiInformation=void 0,t.apiInformation={isSetSupported:function(e,t){try{return!!(Office&&Office.context&&Office.context.requirements)&&Office.context.requirements.isSetSupported(e,t)}catch(e){return!1}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.multiGet=t.multiRemove=t.multiSet=t.getAllKeys=t.clear=t.removeItem=t.setItem=t.getItem=void 0;var o="_Office_AsyncStorage_";function i(){window.localStorage.setItem("_Office_AsyncStorage_|_unusedKey_",null),window.localStorage.removeItem("_Office_AsyncStorage_|_unusedKey_")}function r(e,t){return void 0===t&&(t=function(){}),new Promise((function(n,o){try{i(),e(),t(null),n()}catch(e){t(e),o(e)}}))}function a(e,t){return void 0===t&&(t=function(){}),new Promise((function(n,o){try{i();var r=e();t(null,r),n(r)}catch(e){t(e,null),o(e)}}))}function s(e,t,n){return void 0===n&&(n=function(){}),new Promise((function(o,r){var a=[];try{i()}catch(e){a.push(e)}e.forEach((function(e){try{t(e)}catch(e){a.push(e)}})),n(a),a.length>0?r(a):o()}))}t.getItem=function(e,t){return a((function(){return window.localStorage.getItem(o+e)}),t)},t.setItem=function(e,t,n){return r((function(){return window.localStorage.setItem(o+e,t)}),n)},t.removeItem=function(e,t){return r((function(){return window.localStorage.removeItem(o+e)}),t)},t.clear=function(e){return r((function(){Object.keys(window.localStorage).filter((function(e){return 0===e.indexOf(o)})).forEach((function(e){return window.localStorage.removeItem(e)}))}),e)},t.getAllKeys=function(e){return a((function(){return Object.keys(window.localStorage).filter((function(e){return 0===e.indexOf(o)})).map((function(e){return e.substr(o.length)}))}),e)},t.multiSet=function(e,t){return s(e,(function(e){var t=e[0],n=e[1];return window.localStorage.setItem(o+t,n)}),t)},t.multiRemove=function(e,t){return s(e,(function(e){return window.localStorage.removeItem(o+e)}),t)},t.multiGet=function(e,t){return new Promise((function(n,i){t||(t=function(){});var r=[],a=e.map((function(e){try{return[e,window.localStorage.getItem(o+e)]}catch(e){r.push(e)}})).filter((function(e){return e}));r.length>0?(t(r,a),i(r)):(t(null,a),n(a))}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.displayWebDialog=t.Dialog=void 0;var o=n(0),i=function(){function e(e){this._dialog=e}return e.prototype.close=function(){return this._dialog.close(),o.CoreUtility.Promise.resolve()},e}();t.Dialog=i,t.displayWebDialog=function(e,t){return new o.CoreUtility.Promise((function(n,r){if(t.width&&t.height&&(!d(t.width)||!d(t.height)))throw new o.Error({code:"InvalidArgument",message:'Dimensions must be "number%" or number.'});var a,s={width:t.width?parseInt(t.width,10):50,height:t.height?parseInt(t.height,10):50,displayInIframe:t.displayInIFrame||!1};function l(e){t.onMessage&&t.onMessage(e.message,a,e.origin)}function c(e){12006===e.error?t.onClose&&t.onClose():t.onRuntimeError&&t.onRuntimeError(new o.Error(u(e.error)),a)}function d(e){return/^(\-|\+)?([0-9]+)%?$/.test(e)}function u(e){var t,n=((t={})[12002]={code:"InvalidUrl",message:"Cannot load URL, no such page or bad URL syntax."},t[12003]={code:"InvalidUrl",message:"HTTPS is required."},t[12004]={code:"Untrusted",message:"Domain is not trusted."},t[12005]={code:"InvalidUrl",message:"HTTPS is required."},t[12007]={code:"FailedToOpen",message:"Another dialog is already opened."},t);return n[e]?n[e]:{code:"Unknown",message:"An unknown error has occured"}}Office.context.ui.displayDialogAsync(e,s,(function(e){"failed"===e.status?r(new o.Error(u(e.error.code))):((a=e.value).addEventHandler(Office.EventType.DialogMessageReceived,l),a.addEventHandler(Office.EventType.DialogEventReceived,c),n(new i(a)))}))}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.storage=void 0;var o="_OfficeRuntime_Storage_";function i(){window.localStorage.setItem("_OfficeRuntime_Storage_|_unusedKey_",null),window.localStorage.removeItem("_OfficeRuntime_Storage_|_unusedKey_")}function r(e){return new Promise((function(t,n){try{i(),e(),t()}catch(e){n(e)}}))}function a(e){return new Promise((function(t,n){try{i(),t(e())}catch(e){n(e)}}))}function s(e,t){return new Promise((function(n,o){var r=[];try{i()}catch(e){r.push(e)}for(var a in e)if(e.hasOwnProperty(a)||Array.isArray(e))try{Array.isArray(e)?t(e[a]):t(a)}catch(e){r.push(e)}r.length>0?o(new Error("Unknown error.")):n()}))}t.storage={getItem:function(e){return a((function(){return window.localStorage.getItem(o+e)}))},setItem:function(e,t){return r((function(){return window.localStorage.setItem(o+e,t)}))},removeItem:function(e){return r((function(){return window.localStorage.removeItem(o+e)}))},getItems:function(e){return new Promise((function(t,n){var r={},a=[];try{i()}catch(e){n(e)}e.forEach((function(e){try{var t=window.localStorage.getItem(o+e);r[e]=t||null}catch(e){a.push(e)}})),a.length>0?n(new Error("Unknown error.")):t(r)}))},setItems:function(e){return s(e,(function(t){return window.localStorage.setItem(o+t,e[t])}))},removeItems:function(e){return s(e,(function(e){window.localStorage.removeItem(o+e)}))},getKeys:function(){return a((function(){return Object.keys(window.localStorage).filter((function(e){return 0===e.indexOf(o)})).map((function(e){return e.substr(o.length)}))}))}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.experimentation=void 0;var o=function(){function e(){}return e.prototype.getBooleanFeatureGate=function(e,t){try{var n=Microsoft.Office.WebExtension.FeatureGates[e];return null==n?t:"true"===n.toString().toLowerCase()}catch(e){return t}},e.prototype.getIntFeatureGate=function(e,t){try{var n=parseInt(Microsoft.Office.WebExtension.FeatureGates[e]);return isNaN(n)?t:n}catch(e){return t}},e.prototype.getStringFeatureGate=function(e,t){try{var n=Microsoft.Office.WebExtension.FeatureGates[e];return null==n?t:n}catch(e){return t}},e.prototype.getChangeGate=function(e){return this.getBooleanFeatureGate(e,!0)},e.prototype.getBooleanFeatureGateAsync=function(e,t){return Promise.resolve(this.getBooleanFeatureGate(e,t))},e.prototype.getIntFeatureGateAsync=function(e,t){return Promise.resolve(this.getIntFeatureGate(e,t))},e.prototype.getStringFeatureGateAsync=function(e,t){return Promise.resolve(this.getStringFeatureGate(e,t))},e}();t.experimentation=new o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Message=void 0;var o=n(8);Object.defineProperty(t,"Message",{enumerable:!0,get:function(){return o.Message}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Message=void 0;var o=n(9),i=function(){function e(){this.listeners={}}return e.prototype.on=function(e,t){return this.add(e,t),new Promise((function(e){e()}))},e.prototype.off=function(e,t){return this.remove(e,t),new Promise((function(e){e()}))},e.prototype.emit=function(e,t){return this.send(e,t),new Promise((function(e){e()}))},Object.defineProperty(e,"instance",{get:function(){return e.singleton||(e.singleton=new e),this.singleton},enumerable:!1,configurable:!0}),e.prototype.setupReceive=function(){Office&&Office.context&&Office.context.messaging&&!Office.context.messaging.onMessage&&(Office.context.messaging.onMessage=this.receiveMessage.bind(this))},e.prototype.add=function(e,t){this.listeners.hasOwnProperty(e)||(this.listeners[e]=new o.ListenerManager,this.setupReceive()),this.listeners[e].add(t)},e.prototype.remove=function(e,t){this.listeners.hasOwnProperty(e)&&(t?this.listeners[e].remove(t):delete this.listeners[e])},e.prototype.send=function(e,t){var n={eventName:e,message:t};Office&&Office.context&&Office.context.messaging&&Office.context.messaging.sendMessage&&Office.context.messaging.sendMessage(n)},e.prototype.receiveMessage=function(e){var t=e.eventName,n=e.message;this.listeners.hasOwnProperty(t)&&this.listeners[t].call(n)},e}();t.Message=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ListenerManager=void 0;var o=function(){function e(){this.listeners=[]}return e.prototype.add=function(e){this.listeners.push(e)},e.prototype.remove=function(e){var t=this.listeners.lastIndexOf(e);-1!==t&&this.listeners.splice(t,1)},e.prototype.call=function(e){this.listeners.forEach((function(t){return t(e)}))},e}();t.ListenerManager=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Auth=void 0;var o=n(0),i=function(){function e(){}return e.prototype.getAccessToken=function(e){return new o.CoreUtility.Promise((function(t,n){try{Office.context.auth.getAccessTokenAsync(e||{},(function(e){"succeeded"===e.status?t(e.value):n(e.error)}))}catch(e){n(e)}}))},Object.defineProperty(e,"instance",{get:function(){return e.singleton||(e.singleton=new e),e.singleton},enumerable:!1,configurable:!0}),e}();t.Auth=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Ribbon=t.ui=void 0,t.ui={getRibbon:function(){return new Promise((function(e,t){e(new o)}))}};var o=function(){function e(){this.requestContext=new OfficeCore.RequestContext,OSF.WebAuth&&"web"==OSF._OfficeAppFactory.getHostInfo().hostPlatform&&(this.requestContext._customData="WacPartition")}return e.prototype.requestUpdate=function(e){var t=this.requestContext.ribbon;return e.tabs.filter((function(e){return!!e.id})).forEach((function(e){var n=t.getTab(e.id);void 0!==e.visible&&null!==e.visible&&n.setVisibility(e.visible),e.controls.filter((function(e){return!!e.id})).forEach((function(e){var n=t.getButton(e.id);void 0!==e.enabled&&null!==e.enabled&&(n.enabled=e.enabled)}))})),this.requestContext.sync()},e}();t.Ribbon=o}]);