function Vulcan(){}Vulcan.prototype.getTargetSpecifiers=function(){return JSON.parse(window.__adobe_cep__.invokeSync("vulcanGetTargetSpecifiers",JSON.stringify({})))},Vulcan.prototype.launchApp=function(e,a,t){if(!requiredParamsValid(e))return!1;var n={};return n.targetSpecifier=e,n.focus=a?"true":"false",n.cmdLine=null==t?"":t,JSON.parse(window.__adobe_cep__.invokeSync("vulcanLaunchApp",JSON.stringify(n))).result},Vulcan.prototype.isAppRunning=function(e){if(!requiredParamsValid(e))return!1;var a={};return a.targetSpecifier=e,JSON.parse(window.__adobe_cep__.invokeSync("vulcanIsAppRunning",JSON.stringify(a))).result},Vulcan.prototype.isAppInstalled=function(e){if(!requiredParamsValid(e))return!1;var a={};return a.targetSpecifier=e,JSON.parse(window.__adobe_cep__.invokeSync("vulcanIsAppInstalled",JSON.stringify(a))).result},Vulcan.prototype.getAppPath=function(e){if(!requiredParamsValid(e))return"";var a={};return a.targetSpecifier=e,JSON.parse(window.__adobe_cep__.invokeSync("vulcanGetAppPath",JSON.stringify(a))).result},Vulcan.prototype.addMessageListener=function(e,a,t){if(requiredParamsValid(e,a)&&strStartsWith(e,VulcanMessage.TYPE_PREFIX)){var n={};n.type=e,window.__adobe_cep__.invokeAsync("vulcanAddMessageListener",JSON.stringify(n),a,t)}},Vulcan.prototype.removeMessageListener=function(e,a,t){if(requiredParamsValid(e,a)&&strStartsWith(e,VulcanMessage.TYPE_PREFIX)){var n={};n.type=e,window.__adobe_cep__.invokeAsync("vulcanRemoveMessageListener",JSON.stringify(n),a,t)}},Vulcan.prototype.dispatchMessage=function(e){if(requiredParamsValid(e)&&strStartsWith(e.type,VulcanMessage.TYPE_PREFIX)){var a={},t=new VulcanMessage(e.type);t.initialize(e),a.vulcanMessage=t,window.__adobe_cep__.invokeSync("vulcanDispatchMessage",JSON.stringify(a))}},Vulcan.prototype.getPayload=function(e){if(!requiredParamsValid(e)||!strStartsWith(e.type,VulcanMessage.TYPE_PREFIX))return null;var a=new VulcanMessage(e.type);return a.initialize(e),a.getPayload()};var VulcanInterface=new Vulcan;function VulcanMessage(e){this.type=e,this.scope=VulcanMessage.SCOPE_SUITE,this.appId=VulcanMessage.DEFAULT_APP_ID,this.appVersion=VulcanMessage.DEFAULT_APP_VERSION,this.data=VulcanMessage.DEFAULT_DATA}function GetValueByKey(e,a){if(window.DOMParser){var t=new window.DOMParser;try{var n=t.parseFromString(e,"text/xml").getElementsByTagName(a)[0];if(n&&n.childNodes[0])return n.childNodes[0].nodeValue}catch(e){}}return""}function requiredParamsValid(){for(var e=0;e<arguments.length;e++){var a=arguments[e];if(null==a)return!1}return!0}function strStartsWith(e,a){return"string"==typeof e&&0===e.indexOf(a)}VulcanMessage.TYPE_PREFIX="vulcan.SuiteMessage.",VulcanMessage.SCOPE_SUITE="GLOBAL",VulcanMessage.DEFAULT_APP_ID="UNKNOWN",VulcanMessage.DEFAULT_APP_VERSION="UNKNOWN",VulcanMessage.DEFAULT_DATA="<data><payload></payload></data>",VulcanMessage.dataTemplate="<data>{0}</data>",VulcanMessage.payloadTemplate="<payload>{0}</payload>",VulcanMessage.prototype.initialize=function(e){this.type=e.type,this.scope=e.scope,this.appId=e.appId,this.appVersion=e.appVersion,this.data=e.data},VulcanMessage.prototype.xmlData=function(){if(void 0===this.data){var e="";e=String.format(VulcanMessage.payloadTemplate,e),this.data=String.format(VulcanMessage.dataTemplate,e)}return this.data},VulcanMessage.prototype.setPayload=function(e){var a=cep.encoding.convertion.utf8_to_b64(e);a=String.format(VulcanMessage.payloadTemplate,a),this.data=String.format(VulcanMessage.dataTemplate,a)},VulcanMessage.prototype.getPayload=function(){var e=GetValueByKey(this.data,"payload");return null!==e?cep.encoding.convertion.b64_to_utf8(e):null},VulcanMessage.prototype.toString=function(){var e="type="+this.type;return e+=", scope="+this.scope,e+=", appId="+this.appId,e+=", appVersion="+this.appVersion,e+=", data="+this.xmlData()},String.format=function(e){if(0===arguments.length)return null;var t=Array.prototype.slice.call(arguments,1);return e.replace(/\{(\d+)\}/g,function(e,a){return t[a]})};