/**********************************\*\*\*\*********************************** \*

-   ADOBE CONFIDENTIAL
-   ***
-
-   Copyright 2015-2020 Adobe Systems Incorporated
-   All Rights Reserved.
-
-   NOTICE: All information contained herein is, and remains
-   the property of Adobe Systems Incorporated and its suppliers,
-   if any. The intellectual and technical concepts contained
-   herein are proprietary to Adobe Systems Incorporated and its
-   suppliers and are protected by trade secret or copyright law.
-   Dissemination of this information or reproduction of this material
-   is strictly forbidden unless prior written permission is obtained
-   from Adobe Systems Incorporated.
    ************************************\*\*************************************/

!function(e){var o={};function t(r){if(o[r])return o[r].exports;var s=o[r]={i:r,l:!1,exports:{}};return e[r].call(s.exports,s,s.exports,t),s.l=!0,s.exports}t.m=e,t.c=o,t.d=function(e,o,r){t.o(e,o)||Object.defineProperty(e,o,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,o){if(1&o&&(e=t(e)),8&o)return e;if(4&o&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&o&&"string"!=typeof e)for(var s in e)t.d(r,s,function(o){return e[o]}.bind(null,s));return r},t.n=function(e){var o=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(o,"a",o),o},t.o=function(e,o){return Object.prototype.hasOwnProperty.call(e,o)},t.p="",t(t.s=60)}({10:function(e,o){e.exports=require("path")},27:function(e,o){e.exports=require("child_process")},32:function(e,o){e.exports=require("ps-node")},5:function(e,o){e.exports=require("fs-extra")},60:function(e,o,t){e.exports=t(61)},61:function(e,o,t){"use strict";t.r(o);var r=t(10),s=t(5),i=t(9),l=t(32),n=t.n(l),c=t(27);function u(e,o,t){return o in e?Object.defineProperty(e,o,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[o]=t,e}const a=process.argv.slice(2);let g=console.log;const p=new class{setLoggerFunction(e){g=e||console.log}constructor(){u(this,"ERROR_PARAMETER_ERROR",100),u(this,"ERROR_CANT_CREATE_INSTALL_FOLDER",101),u(this,"ERROR_CANT_WRITE_SPECIFIER",102),u(this,"ERROR_INSTALLING_PANELS",103),u(this,"ERROR_REMOVING_SPECIFIER",104),u(this,"logFolder","/Library/Logs/CreativeCloud"),u(this,"logFile",r.resolve(this.logFolder,"./CCXProcessInstall.log")),this.setLoggerFunction(this.log.bind(this)),"win32"===process.platform&&(this.logFolder=r.join(process.env.TEMP,"CreativeCloud","CCX Welcome"),this.logFile=r.resolve(this.logFolder,"./CCXProcessInstall.log"));try{s.ensureDirSync(this.logFolder)}catch(e){console.log("Error with log directory permissions ",e)}const e=(new Date).valueOf(),o=(o,t)=>{let r=o?"Success ":"Failed ";r+=`(${(new Date).valueOf()-e}ms)`,r+=o?null:`with code: ${t}`,this.log(r),process.exit(o?0:1)};if(process.on("unhandledRejection",(e,o)=>{this.log("Unhandled Rejection at:",o,"reason:",e)}),process.on("uncaughtException",e=>{this.log("Uncaught Exception:",e,e.stack)}),this.log("Version: ","3.8.1"," Build: ","1"),process.chdir(__dirname),a.includes("kill"))return this.log=(()=>{}),void this.killCCXProcess(()=>o(!0));this.log("Expected to be invoked with argument: kill"),o(!0,this.ERROR_PARAMETER_ERROR)}log(...e){console.log.apply(console,arguments);try{const e=`${(new Date).toString()}:${Array.prototype.slice.call(arguments).join(" ")}${i.EOL}`;s.appendFileSync(this.logFile,e,"utf-8")}catch(e){console.log("Error writing to log file",e)}}killCCXProcess(e){"darwin"===process.platform?c.exec('pkill -f ".*CCXProcess.app/Contents/MacOS/../js/main.js$"',o=>{o?(this.log(`Error while killing CCXProcess process : ${o}`),e(!1)):(this.log("CCXProcess process successfully killed."),e(!0))}):(this.log("Killing CCXProcess..."),n.a.lookup({command:".*\\CCXProcess.exe"},(o,t)=>{if(o)this.log(`Error while looking up for CCXProcess : ${o}`),e(!1);else if(t&&t.length>0){let o,r=t.length;const s=t=>{o=o||t,0==--r&&e(!o)};this.log("Number of CCXProcess Instances: ",t.length),t.forEach(e=>{this.log(`CCXProcess is running, trying to kill now: ${e.pid}`),n.a.kill(e.pid,o=>{o?this.log(`Error while killing CCXProcess(${e.pid}): ${o}`):this.log(`Succesfully killed CCXProcess(${e.pid})`),s(o)})})}else this.log("CCXProcess is not running."),e(!1)}))}};o.default=p},9:function(e,o){e.exports=require("os")}});