/************************************************************************!
*
* 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 r={};function n(t){if(r[t])return r[t].exports;var i=r[t]={i:t,l:!1,exports:{}};return e[t].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=r,n.d=function(e,r,t){n.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},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,r){if(1&r&&(e=n(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(n.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var i in e)n.d(t,i,function(r){return e[r]}.bind(null,i));return t},n.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(r,"a",r),r},n.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},n.p="",n(n.s=152)}({10:function(e,r){var n={constructStringFromTemplate:function(e,r){var n=e;return Object.keys(r).forEach(e=>{n=n.replace("{{"+e+"}}",r[e])}),n},parseLocalisationFile:function(e){var r,n,t,i,o={},a=0,s=e.split(/\n/);for(a=0;a<s.length;a++)if(s[a]=s[a].replace(/^\s\s*/,"").replace(/\s\s*$/,""),s[a].length>0&&"#"!==s[a].match("^#")){for(n=(r=s[a].split("="))[0].replace(/^\s\s*/,"").replace(/\s\s*$/,""),t=1===r.length?"":r[1];t.match(/\\$/)&&"\\"===t.match(/\\$/).toString();)t=t.substring(0,t.length-1),t+=s[++a].replace(/\s\s*$/,"");for(i=2;i<r.length;i++)t+="="+r[i];t=t.replace(/^\s\s*/,"").replace(/\s\s*$/,""),o[n]=t}return o},compareVersions:function(e,r){if(e=(e||"0").toString().replace(/(\.0)*$/,"").replace(/[^.0-9]+/gim,"."),r=(r||"0").toString().replace(/(\.0)*$/,"").replace(/[^.0-9]+/gim,"."),(isNaN(parseInt(e,10))||parseInt(e,10)>250)&&(e="0"),(isNaN(parseInt(r,10))||parseInt(r,10)>250)&&(r="0"),e===r)return 0;var n,t,i=e.split("."),o=r.split(".");for(n=0;n<i.length&&n<o.length;n++){if(t=parseInt(i[n],10)-parseInt(o[n],10),isNaN(t))return isNaN(parseInt(i[n],10))?1:-1;if(t>0)return-1;if(t<0)return 1}return(t=i.length-o.length)>0?-1:t<0?1:0},promisify:e=>(...r)=>new Promise((n,t)=>{e(...r,(e,r)=>e?t(e):n(r))})};Object.seal(n),e.exports=n},12:function(e,r){e.exports=require("path")},152:function(e,r,n){var t=n(12),i=n(30),o=n(153),a=n(31),s=n(154),c=process.argv.slice(2),l={darwin:{installPath:"/Library/Application Support/Adobe/Vulcan/specifiers/",appName:"CCLibrary.app",appFolder:"../../.."},win32:{installPath:t.join(process.env["CommonProgramFiles(x86)"]||"","Adobe","Vulcan","specifiers"),appName:"CCLibrary.exe",appFolder:".."}},p=t.resolve(l[process.platform].installPath),u="/Library/Logs/CreativeCloud/Creative Cloud Libraries";"win32"===process.platform&&(u=t.join(process.env.TEMP,"CreativeCloud","Creative Cloud Libraries"));var d=t.resolve(u,"./CCLibraryProcessInstall.log");try{i.ensureDirSync(u)}catch(e){console.error("Error with log directory permissions ",e)}function f(){console.log.apply(console,arguments);try{var e=(new Date).toString()+":"+Array.prototype.slice.call(arguments).join(" ")+n(25).EOL;i.appendFileSync(d,e,"utf-8")}catch(e){console.error("Error writing to log file",e)}}s.setLoggerFunction(f);var g=(new Date).valueOf(),_=function(e,r){var n=(new Date).valueOf()-g,t=e?"Success ":"Failed ";f(t+="("+n+"ms)"),process.exit(e?0:r||1)},m=function(e){f("Killing CCLibrary process..."),"darwin"===process.platform?a.exec('pkill -f ".*CCLibrary.app/Contents/MacOS/../js/server.js$"',function(r){r?(f("Error while killing CCLibrary process : "+r),e(!1)):(f("CCLibrary process successfully killed."),e(!0))}):o.lookup({command:".*\\CCLibrary.exe"},function(r,n){if(r)f("Error while looking up CCLibrary process : "+r),e(!1);else if(n&&n.length>0){var t=n.length,i=null;f("Number of CCLibrary Instances: ",n.length),n.forEach(r=>{f("CCLibrary is running, trying to kill now: "+r.pid),o.kill(r.pid,function(n){f(n?"Error while killing CCLibrary("+r.pid+"): "+n:"Succesfully killed CCLibrary("+r.pid+")"),function(r){i=i||r,0==--t&&e(!i)}(n)})})}else f("CCLibrary is not running."),e(!1)})};if(process.on("unhandledRejection",function(e,r){f("Unhandled Rejection at:",r,"reason:",e)}),process.on("uncaughtException",function(e){f("Uncaught Exception:",e,e.stack)}),f("Version: ",global.version," Build: ","29"),process.chdir(__dirname),-1!==c.indexOf("install")){var b='<SpecifierManifest Version="1.0"><Name>cclibraries</Name><Version>1</Version><Locale></Locale><Group></Group><Path>{{path}}</Path></SpecifierManifest>'.replace("{{path}}",t.resolve(t.join(__dirname,l[process.platform].appFolder,l[process.platform].appName)));f("Installing..."),i.ensureDir(p,function(e){e&&(f("Unable to install: ",e),_(!1,101)),i.writeFile(t.join(p,"cclibraries.xml"),b,{encoding:"utf8"},function(e){e&&(f("Unable to install: ",e),_(!1,102));try{i.utimesSync(p,new Date,new Date)}catch(e){}m(function(){s.checkAndDeploy(function(e){f("CCLibrary process installed successfully."),_(!e,e?103:void 0)})})})})}else-1!==c.indexOf("uninstall")?m(function(){-1!==c.indexOf("--update=true")&&(f("Uninstalling as part of update: no action required"),_(!0)),f("Uninstalling..."),i.unlink(t.join(p,"cclibraries.xml"),function(e){e&&("ENOENT"===e.code?f("Vulcan specifier not installed. Nothing to remove."):(f("Unable to uninstall: ",e),_(!1,104))),s.checkAndUnDeploy(function(e){_(!e,e?105:void 0)})})}):-1!==c.indexOf("--test")?(f("Testing customhook OK"),_(!0)):(f("Expected to be invoked with argument: install or uninstall"),_(!1,100))},153:function(e,r){e.exports=require("ps-node")},154:function(e,r,n){var t=n(30),i=n(12),o=n(37);const a=n(10).promisify;var s=console.log,c={_getExtensionFolder:function(){var e="/Library/Application Support/Adobe/CEP/extensions";0===process.platform.indexOf("win")&&(e=(process.env["ProgramFiles(x86)"]||process.env.PROGRAMFILES).replace(/\\/g,"/")+"/Common Files/Adobe/CEP/extensions");return e},_getPanelsFolder:function(){var e="../Resources/panels";return e=i.join(__dirname,e)},_getOldPanels:function(){return o&&o.cepPanelsToRemove||[]},_getInstalledPanels:function(){var e=[];return o&&o.cepPanels&&o.cepPanels.forEach(r=>{r&&r.destination&&e.push(r.destination)}),e},_removePanels:function(e){return Promise.all(e.filter(e=>e).map(e=>{const r=c._getExtensionFolder(),n=r+"/"+e;return new Promise(i=>{t.remove(n,n=>{n&&"ENOENT"!==n.code?s(n):s("Removing Panel "+e+" from "+r),i()})})}))},setLoggerFunction:function(e){s=e||console.log},checkAndDeploy:function(e=(()=>void 0)){var r=c._getPanelsFolder(),n=c._getExtensionFolder(),i=function(e,i){var o=n+"/"+e,a=o+"/CSXS/manifest.xml";t.exists(a,function(n){if(n)return s("Panel already exists at: "+e),void i(null);var c=r+"/"+e+"/Contents",l=r+"/"+e+"/manifest.xml";t.remove(o,function(r){if(r)return s(r),i(r);s("Upgrading Panel "+e+" from "+c),t.copy(c,o,function(e){if(e)return s(e),i(e);var r=a+".temp";t.copy(l,r,function(e){if(e)return s(e),i(e);t.rename(r,a,function(e){if(e)return s(e),i(e);i(null)})})})})})};Promise.all([new Promise((e,o)=>{t.exists(r,c=>{if(!c)return s("Could not find panels bundle."),void e();t.ensureDir(n,n=>{if(n)return s(n),o(n);t.readdir(r,(r,n)=>{if(r)return s(r),o(r);const t=n.map(e=>a(i)(e));e(Promise.all(t))})})})}),c._removePanels(c._getOldPanels())]).then(()=>e(null),e)},checkAndUnDeploy:function(e=(()=>void 0)){Promise.all([c._removePanels(c._getOldPanels()),c._removePanels(c._getInstalledPanels())]).then(()=>e(null),e)}};e.exports=c},25:function(e,r){e.exports=require("os")},30:function(e,r){e.exports=require("fs-extra")},31:function(e,r){e.exports=require("child_process")},37:function(e){e.exports={name:"cc-libraries-api-js",version:"3.7.4",private:!0,description:"Adobe Creative Cloud Libraries API for JavaScript",dependencies:{"dcx-js":"git+ssh://git@git.corp.adobe.com:ProjectCentral/dcx-js.git#v1.7.27","fs-extra":"7.0.1",glob:"7.1.1",punycode:"2.1.1",uuid:"3.3.2","uuid-browser":"3.1.0",yauzl:"2.9.1",yazl:"2.4.3"},optionalDependencies:{"@ccx-public/ingest":"^3.5.0",bufferutil:"1.3.0",ffi:"2.2.0","font-manager":"git+ssh://git@git.corp.adobe.com:michsmit/font-manager.git#v0.3.7","fs-ext":"1.2.1","idle-gc":"1.0.1","image-size":"0.6.2","node-ProxyResolver":"git+ssh://git@git.corp.adobe.com:ProjectCentral/node-ProxyResolver.git#v2.0.0","node-imslib":"git+ssh://git@git.corp.adobe.com:ProjectCentral/node-imslib.git#v1.2.7","node-thumbnailgenerator":"git+ssh://git@git.corp.adobe.com:ProjectCentral/node-ThumbnailGenerator.git#v2.0.3","node-vulcanjs":"git+ssh://git@git.corp.adobe.com:slade/VulcanJS.git#v1.2.6",node_ssl:"git+ssh://git@git.corp.adobe.com:ProjectCentral/node_ssl.git#v1.3.0","ps-node":"^0.1.6",ref:"1.3.5",restify:"7.2.0",ws:"6.1.2",xml2js:"0.4.17"},devDependencies:{"7zip":"0.0.6","@adobe/tessa-npm-plugin":"^1.0.1","@babel/core":"^7.1.2","@babel/preset-env":"^7.1.0","@ccx/hyperdrive-builder":"git+ssh://git@git.corp.adobe.com:CCX/hyperdrive-builder.git#v3.0.45","babel-loader":"^8.0.4",fetch:"^1.1.0",grunt:"1.0.1","grunt-contrib-clean":"1.0.0","grunt-contrib-compress":"1.3.0","grunt-contrib-copy":"1.0.0","grunt-eslint":"21.0.0","grunt-jsdoc":"2.4.0","grunt-node-gyp":"3.1.0","ignore-loader":"^0.1.2","ink-docstrap":"1.3.2",istanbul:"0.4.5","jasmine-node":"1.14.5",jsftp:"2.1.3","markdown-toc":"^1.2.0",matchdep:"1.0.1",mkdirp:"0.5.1",mockery:"2.0.0",mustache:"2.3.0",nock:"9.0.14","node-fetch":"2.6.0","raw-loader":"^0.5.1",request:"2.87.0","request-promise-native":"^1.0.7",sugar:"1.4.1",webpack:"^4.20.2","webpack-node-externals":"^1.7.2",zock:"git+ssh://git@git.corp.adobe.com:DMA/zock.git#master"},engines:{node:">=8.11.0"},bin:{"cc-libraries":"./scripts/cli"},main:"src/main.js",scripts:{test:"grunt test",install:"node ./scripts/skip_native || node-gyp rebuild",tessa:"tessa-npm-plugin update","tessa-plugin-pr":"tessa-npm-plugin check --errorOnNewVulnerability",start:"node server",debug:"node server.js --debug","generate-rest-docs-toc":"markdown-toc -i --maxdepth=4 './technical_specs/Server REST API.md'"},cepPanels:[{source:"https://artifactory.corp.adobe.com/artifactory/generic-cc-libraries-release/2.6.64/CCLibraries.zxp",destination:"CC_LIBRARIES_PANEL_EXTENSION_2_6_64"},{source:"https://artifactory.corp.adobe.com/artifactory/generic-cc-libraries-release/2.10.86/CCLibraries.zxp",destination:"CC_LIBRARIES_PANEL_EXTENSION_2_10_86"},{source:"https://artifactory.corp.adobe.com/artifactory/generic-cc-libraries-release/2.11.27/CCLibraries.zxp",destination:"CC_LIBRARIES_PANEL_EXTENSION_2_11_27"},{source:"https://artifactory.corp.adobe.com/artifactory/generic-cc-libraries-release/2.13.141/CCLibraries.zxp",destination:"CC_LIBRARIES_PANEL_EXTENSION_2_13_141"},{source:"https://artifactory.corp.adobe.com/artifactory/generic-cc-libraries-release/3.4.23/CCLibraries.zxp",destination:"CC_LIBRARIES_PANEL_EXTENSION_3_4_23"},{source:"https://artifactory.corp.adobe.com/artifactory/generic-cc-libraries-release/3.7.76/CCLibraries.zxp",destination:"CC_LIBRARIES_PANEL_EXTENSION_3_7_76"}],cepPanelsToRemove:["CC_LIBRARIES_PANEL_EXTENSION_2_3_1012","CC_LIBRARIES_PANEL_EXTENSION_2_3_1026_DEV","CC_LIBRARIES_PANEL_EXTENSION_2_3_1038_DEV","CC_LIBRARIES_PANEL_EXTENSION_2_3_1044_DEV","CC_LIBRARIES_PANEL_EXTENSION_2_3_1046_DEV","CC_LIBRARIES_PANEL_EXTENSION_2_3_1047_DEV","CC_LIBRARIES_PANEL_EXTENSION_2_3_1048","CC_LIBRARIES_PANEL_EXTENSION_2_6_60_DEV","CC_LIBRARIES_PANEL_EXTENSION_2_10_56"],thor:[{product:"ACCC",subproduct:"Application",version:"5.0",certification:"Release Candidate",name:"ACCCx5_0_0_{{build}}",volume:"Creative Cloud",build:"^\\d+$"},{product:"ACCC",subproduct:"HDSetup",version:"4.9",certification:"Integration Ready",name:"HDSetup",volume:"Release"}]}}});