forked from malulleybovo/PSO2AffixingAssistant
-
Notifications
You must be signed in to change notification settings - Fork 0
/
updateManager.min.js
27 lines (27 loc) · 65.2 KB
/
updateManager.min.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/**
*
* @licstart The following is the entire license notice for the
* JavaScript code in this page.
*
* Copyright (C) 2018 Arthur Malulley B. de O.
*
*
* The JavaScript code in this page is free software: you can
* redistribute it and/or modify it under the terms of the GNU
* General Public License (GNU GPL) as published by the Free Software
* Foundation, either version 3 of the License, or (at your option)
* any later version. The code is distributed WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU GPL for more details.
*
* As additional permission under GNU GPL version 3 section 7, you
* may distribute non-source (e.g., minimized or compacted) forms of
* that code without the copy of the GNU GPL normally required by
* section 4, provided you include this license notice and a URL
* through which recipients can access the Corresponding Source.
*
* @licend The above is the entire license notice
* for the JavaScript code in this page.
*
*/
console.log("###########################################"),console.log("# PSO2 Affixing Assistant's Build Manager #"),console.log("###########################################"),console.log("Starting the build process..."),console.log("Setting up the build environment...");var e=require("fs");const{exec:t}=require("child_process"),i=require("readline").createInterface({input:process.stdin,output:process.stdout});let n=null,o=null,l=require("./js/affixData"),s=require("./js/lang");const a=require("./js/affixDataParser");var r="./intermediate";!function(e){let n=["node-fetch","cheerio","uglify-es","uglifycss"];var o=0,l=t=>{t?++o<n.length?s(n[o],l):e(!0):e(!1)};function s(e,n){try{require.resolve(e),n(!0)}catch(o){console.log("Linking package: "+e),t("npm link "+e,(o,l,s)=>{if(o)i.question("Could not create local link to package "+e,function(e){n(!1)});else try{require.resolve(e),n(!0)}catch(o){i.question(`The Build Manager requires the NodeJS package '${e}' to operate.\nTo install it, run the following command on a NodeJS command prompt:\n npm install ${e}\nPress 'Y' to install it now on the application folder, 'G' to install it now globally, or any key to quit...`,function(i){"Y"===i||"y"===i?(console.log("Running 'npm install "+e+"'..."),t("npm install "+e,(t,i,o)=>{if(t)return console.log("NodeJS package '"+e+"' could not be installed."),console.log(t),void n(!1);console.log(i),console.log("NodeJS packed installed successfully."),n(!0)})):"G"===i||"g"===i?(console.log("Running 'npm install "+e+" -g'..."),t("npm install "+e+" -g",(t,i,o)=>{if(t)return console.log("NodeJS package '"+e+"' could not be installed."),console.log(t),void n(!1);console.log(i),console.log("NodeJS packed installed successfully."),n(!0)})):n(!1)})}})}}s(n[0],l)}(t=>{if(!t)return console.log("Some required NodeJS packages are missing, please install them and try again."),void process.exit();n=require("node-fetch"),o=require("cheerio");var a=()=>{if(console.log("Validating files..."),function(e,t){if(void 0===e||null===e||"object"!=typeof e)return console.log("Assistant's Affix Database must be an object"),!1;if(void 0===e.optionList||null===e.optionList||"object"!=typeof e.optionList)return console.log("Assistant's Affix Database must contain an object property called 'optionList'"),!1;if(void 0===e.optionList.support||null===e.optionList.support||"object"!=typeof e.optionList.support||void 0===e.optionList.support.length)return console.log("Assistant's Affix Database must contain an list property called 'support' inside 'optionList'"),!1;if(e.optionList.support.filter(e=>void 0===e.id||null===e.id||"string"!=typeof e.id).length>0)return console.log("Assistant's Affix Database must contain a string property called 'id' for every item inside 'optionList.support'"),console.log(e.optionList.support.filter(e=>void 0===e.id||null===e.id||"string"!=typeof e.id)),!1;if(e.optionList.support.filter(e=>void 0===e.name||null===e.name||"string"!=typeof e.name).length>0)return console.log("Assistant's Affix Database must contain a string property called 'name' for every item inside 'optionList.support'"),console.log(e.optionList.support.filter(e=>void 0===e.name||null===e.name||"string"!=typeof e.name)),!1;if(e.optionList.support.filter(e=>void 0===e.value||null===e.value||"string"!=typeof e.value).length>0)return console.log("Assistant's Affix Database must contain a string property called 'value' for every item inside 'optionList.support'"),console.log(e.optionList.support.filter(e=>void 0===e.value||null===e.value||"string"!=typeof e.value)),!1;if(e.optionList.support.filter(e=>void 0===e.fn||null===e.fn||"function"!=typeof e.fn).length>0)return console.log("Assistant's Affix Database must contain a function property called 'fn' for every item inside 'optionList.support'"),console.log(e.optionList.support.filter(e=>void 0===e.fn||null===e.fn||"function"!=typeof e.fn)),!1;if(void 0===e.optionList.additional||null===e.optionList.additional||"object"!=typeof e.optionList.additional||void 0===e.optionList.additional.length)return console.log("Assistant's Affix Database must contain an list property called 'additional' inside 'optionList'"),!1;if(e.optionList.additional.filter(e=>void 0===e.id||null===e.id||"string"!=typeof e.id).length>0)return console.log("Assistant's Affix Database must contain a string property called 'id' for every item inside 'optionList.additional'"),console.log(e.optionList.additional.filter(e=>void 0===e.id||null===e.id||"string"!=typeof e.id)),!1;if(e.optionList.additional.filter(e=>"Nothing"!==e.id&&(void 0===e.name||null===e.name||"string"!=typeof e.name)).length>0)return console.log("Assistant's Affix Database must contain a string property called 'name' for every item inside 'optionList.additional'"),console.log(e.optionList.additional.filter(e=>"Nothing"!==e.id&&(void 0===e.name||null===e.name||"string"!=typeof e.name))),!1;if(e.optionList.additional.filter(e=>void 0===e.value||null===e.value||"string"!=typeof e.value).length>0)return console.log("Assistant's Affix Database must contain a string property called 'value' for every item inside 'optionList.additional'"),console.log(e.optionList.additional.filter(e=>void 0===e.value||null===e.value||"string"!=typeof e.value)),!1;if(e.optionList.additional.filter(e=>"Nothing"!==e.id&&(void 0===e.extend||null===e.extend||"number"!=typeof e.extend||e.extend<0||e.extend>100||!Number.isInteger(e.extend))).length>0)return console.log("Assistant's Affix Database must contain a integer property ranging from 0 to 100 called 'extend' for every item inside 'optionList.additional'"),console.log(e.optionList.additional.filter(e=>"Nothing"!==e.id&&(void 0===e.extend||null===e.extend||"number"!=typeof e.extend||e.extend<0||e.extend>100||!Number.isInteger(e.extend)))),!1;if(e.optionList.additional.filter(e=>"Nothing"!==e.id&&(void 0===e.effect||null===e.effect||"string"!=typeof e.effect)).length>0)return console.log("Assistant's Affix Database must contain a string property called 'effect' for every item inside 'optionList.additional'"),console.log(e.optionList.additional.filter(e=>"Nothing"!==e.id&&(void 0===e.effect||null===e.effect||"string"!=typeof e.effect))),!1;if(void 0===e.optionList.potential||null===e.optionList.potential||"object"!=typeof e.optionList.potential||void 0===e.optionList.potential.length)return console.log("Assistant's Affix Database must contain an list property called 'potential' inside 'optionList'"),!1;if(e.optionList.potential.filter(e=>void 0===e.id||null===e.id||"string"!=typeof e.id).length>0)return console.log("Assistant's Affix Database must contain a string property called 'id' for every item inside 'optionList.potential'"),console.log(e.optionList.potential.filter(e=>void 0===e.id||null===e.id||"string"!=typeof e.id)),!1;if(e.optionList.potential.filter(e=>void 0===e.name||null===e.name||"string"!=typeof e.name).length>0)return console.log("Assistant's Affix Database must contain a string property called 'name' for every item inside 'optionList.potential'"),console.log(e.optionList.potential.filter(e=>void 0===e.name||null===e.name||"string"!=typeof e.name)),!1;if(e.optionList.potential.filter(e=>void 0===e.value||null===e.value||"string"!=typeof e.value).length>0)return console.log("Assistant's Affix Database must contain a string property called 'value' for every item inside 'optionList.potential'"),console.log(e.optionList.potential.filter(e=>void 0===e.value||null===e.value||"string"!=typeof e.value)),!1;if(e.optionList.potential.filter(e=>void 0===e.fn||null===e.fn||"function"!=typeof e.fn).length>0)return console.log("Assistant's Affix Database must contain a function property called 'fn' for every item inside 'optionList.potential'"),console.log(e.optionList.potential.filter(e=>void 0===e.fn||null===e.fn||"function"!=typeof e.fn)),!1;if(void 0===e.optionList.boostWeek||null===e.optionList.boostWeek||"object"!=typeof e.optionList.boostWeek||void 0===e.optionList.boostWeek.length)return console.log("Assistant's Affix Database must contain an list property called 'boostWeek' inside 'optionList'"),!1;if(e.optionList.boostWeek.filter(e=>void 0===e||null===e||"number"!=typeof e||e<0||e>100||!Number.isInteger(e)).length>0)return console.log("Assistant's Affix Database must only contain integer numbers ranging from 0 to 100 inside 'optionList.boostWeek'"),console.log(e.optionList.boostWeek.filter(e=>void 0===e||null===e||"number"!=typeof e||e<0||e>100||!Number.isInteger(e))),!1;if(void 0===e.excludePattern||null===e.excludePattern||"object"!=typeof e.excludePattern)return console.log("Assistant's Affix Database must contain an object property called 'excludePattern'"),!1;if(void 0===e.excludePattern.addition||null===e.excludePattern.addition||"object"!=typeof e.excludePattern.addition)return console.log("Assistant's Affix Database must contain an object property called 'addition' inside 'excludePattern'"),!1;if(e.excludePattern.addition.filter(e=>void 0===e||null===e||!("string"==typeof e||"object"==typeof e&&void 0!==e.length&&0==e.filter(e=>void 0===e||null===e||"string"!=typeof e).length)).length>0)return console.log("Assistant's Affix Database must only contain strings and/or list of strings inside 'excludePattern.addition'"),console.log(e.excludePattern.addition.filter(e=>void 0===e||null===e||!("string"==typeof e||"object"==typeof e&&void 0!==e.length&&0==e.filter(e=>void 0===e||null===e||"string"!=typeof e).length))),!1;if(void 0===e.excludePattern.select||null===e.excludePattern.select||"object"!=typeof e.excludePattern.select)return console.log("Assistant's Affix Database must contain an object property called 'select' inside 'excludePattern'"),!1;if(e.excludePattern.select.filter(e=>void 0===e||null===e||!("string"==typeof e||"object"==typeof e&&0==e.filter(e=>void 0===e||null===e||"string"!=typeof e).length)).length>0)return console.log("Assistant's Affix Database must only contain strings and/or list of strings inside 'excludePattern.select'"),console.log(e.excludePattern.select.filter(e=>void 0===e||null===e||!("string"==typeof e||"object"==typeof e&&0==e.filter(e=>void 0===e||null===e||"string"!=typeof e).length))),!1;if(void 0===e.extendAbility||null===e.extendAbility||"object"!=typeof e.extendAbility||void 0===e.extendAbility.length)return console.log("Assistant's Affix Database must contain a list property called 'extendAbility'"),!1;if(e.extendAbility.filter(e=>void 0===e||null===e||"object"!=typeof e).length>0)return console.log("Assistant's Affix Database must only contain objects inside 'extendAbility'"),console.log(e.extendAbility.filter(e=>void 0===e||null===e||"object"!=typeof e)),!1;if(e.extendAbility.filter(e=>void 0===e.base||null===e.base||"object"!=typeof e.base||void 0===e.base.length||e.base.filter(e=>void 0===e||null===e||"string"!=typeof e).length>0).length>0)return console.log("Assistant's Affix Database must contain a list of strings called 'base' for every item inside 'extendAbility'"),console.log(e.extendAbility.filter(e=>void 0===e.base||null===e.base||"object"!=typeof e.base||void 0===e.base.length||e.base.filter(e=>void 0===e||null===e||"string"!=typeof e))),!1;if(e.extendAbility.filter(e=>void 0===e.ref||null===e.ref||!("string"==typeof e.ref||"object"==typeof e.ref&&void 0!==e.ref.length&&0==e.ref.filter(e=>void 0===e||null===e||"string"!=typeof e).length)).length>0)return console.log("Assistant's Affix Database must contain a list of strings called 'base' or a string property called 'base' for every item inside 'extendAbility'"),console.log(e.extendAbility.filter(e=>void 0===e.ref||null===e.ref||!("string"==typeof e.ref||"object"==typeof e.ref&&void 0!==e.ref.length&&0==e.ref.filter(e=>void 0===e||null===e||"string"!=typeof e).length))),!1;if(e.extendAbility.filter(e=>void 0===e.success||null===e.success||"number"!=typeof e.success||e.success<0||e.success>100||!Number.isInteger(e.success)).length>0)return console.log("Assistant's Affix Database must contain an integer property ranging from 0 to 100 called 'success' for every item inside 'extendAbility'"),console.log(e.extendAbility.filter(e=>void 0===e.success||null===e.success||"number"!=typeof e.success||e.success<0||e.success>100||!Number.isInteger(e.success))),!1;if(void 0===e.extraSlot||null===e.extraSlot||"object"!=typeof e.extraSlot||void 0===e.extraSlot.length)return console.log("Assistant's Affix Database must contain a list property called 'extraSlot'"),!1;if(e.extraSlot.filter(e=>void 0===e||null===e||"object"!=typeof e).length>0)return console.log("Assistant's Affix Database must only contain objects inside 'extraSlot'"),console.log(e.extraSlot.filter(e=>void 0===e||null===e||"object"!=typeof e)),!1;if(e.extraSlot.filter(e=>void 0===e.true||null===e.true||"number"!=typeof e.true||e.true<0||e.true>100||!Number.isInteger(e.true)).length>0)return console.log("Assistant's Affix Database must contain an integer property called 'true' ranging from 0 to 100 for every item inside 'extraSlot'"),console.log(e.extraSlot.filter(e=>void 0===e.true||null===e.true||"number"!=typeof e.true||e.true<0||e.true>100||!Number.isInteger(e.true))),!1;if(e.extraSlot.filter(e=>void 0===e.false||null===e.false||"number"!=typeof e.false||e.false<0||e.false>100||!Number.isInteger(e.false)).length>0)return console.log("Assistant's Affix Database must contain an integer property called 'false' ranging from 0 to 100 for every item inside 'extraSlot'"),console.log(e.extraSlot.filter(e=>void 0===e.false||null===e.false||"number"!=typeof e.false||e.false<0||e.false>100||!Number.isInteger(e.false))),!1;if(void 0===e.boostPoint||null===e.boostPoint||"object"!=typeof e.boostPoint)return console.log("Assistant's Affix Database must contain an object property called 'boostPoint'"),!1;if(void 0===e.sameBonusBoost||null===e.sameBonusBoost||"object"!=typeof e.sameBonusBoost||void 0===e.sameBonusBoost.length)return console.log("Assistant's Affix Database must contain a list property called 'sameBonusBoost'"),!1;if(e.sameBonusBoost.filter(e=>void 0===e||null===e||"number"!=typeof e).length>0)return console.log("Assistant's Affix Database must only contain float numbers inside 'sameBonusBoost'"),console.log(e.sameBonusBoost.filter(e=>void 0===e||null===e||"number"!=typeof e)),!1;if(void 0===e.pairingExceptions||null===e.pairingExceptions||"object"!=typeof e.pairingExceptions)return console.log("Assistant's Affix Database must contain an object property called 'pairingExceptions'"),!1;if(void 0===e.pairingExceptions.strict||null===e.pairingExceptions.strict||"object"!=typeof e.pairingExceptions.strict)return console.log("Assistant's Affix Database must contain an object property called 'strict' inside 'pairingExceptions'"),!1;if(e.pairingExceptions.strict.filter(e=>void 0===e||null===e||"object"!=typeof e||void 0===e.length||e.filter(e=>void 0===e||null===e||"string"!=typeof e).length>0).length>0)return console.log("Assistant's Affix Database must only contain lists of strings inside 'pairingExceptions.strict'"),console.log(e.pairingExceptions.strict.filter(e=>void 0===e||"object"!=typeof e||null===e||void 0===e.length||e.filter(e=>void 0===e||null===e||"string"!=typeof e).length>0)),!1;if(void 0===e.pairingExceptions.lenient||null===e.pairingExceptions.lenient||"object"!=typeof e.pairingExceptions.lenient)return console.log("Assistant's Affix Database must contain an object property called 'lenient' inside 'pairingExceptions'"),!1;if(e.pairingExceptions.lenient.filter(e=>void 0===e||null===e||"object"!=typeof e||void 0===e.length||e.filter(e=>void 0===e||null===e||"string"!=typeof e).length>0).length>0)return console.log("Assistant's Affix Database must only contain lists of strings inside 'pairingExceptions.lenient'"),console.log(e.pairingExceptions.lenient.filter(e=>void 0===e||null===e||"object"!=typeof e||void 0===e.length||e.filter(e=>void 0===e||null===e||"string"!=typeof e).length>0)),!1;if(void 0===e.abilityList||null===e.abilityList||"object"!=typeof e.abilityList||void 0===e.abilityList.length)return console.log("Assistant's Affix Database must contain a list property called 'abilityList'"),!1;if(e.abilityList.filter(e=>void 0===e||null===e||"object"!=typeof e).length>0)return console.log("Assistant's Affix Database must only contain objects inside 'abilityList'"),console.log(e.abilityList.filter(e=>void 0===e||null===e||"object"!=typeof e)),!1;if(e.abilityList.filter(e=>void 0===e.code||null===e.code||"string"!=typeof e.code).length>0)return console.log("Assistant's Affix Database must contain a string property called 'code' for every item inside 'abilityList'"),console.log(e.abilityList.filter(e=>void 0===e.code||null===e.code||"string"!=typeof e.code)),!1;if(e.abilityList.filter(e=>void 0===e.name||null===e.name||"string"!=typeof e.name).length>0)return console.log("Assistant's Affix Database must contain a string property called 'name' for every item inside 'abilityList'"),console.log(e.abilityList.filter(e=>void 0===e.name||null===e.name||"string"!=typeof e.name)),!1;if(e.abilityList.filter(e=>void 0===e.effect||null===e.effect||"string"!=typeof e.effect).length>0)return console.log("Assistant's Affix Database must contain a string property called 'effect' for every item inside 'abilityList'"),console.log(e.abilityList.filter(e=>void 0===e.effect||null===e.effect||"string"!=typeof e.effect)),!1;if(void 0===e.abilityFactor||"object"!=typeof e.abilityFactor)return console.log("Assistant's Affix Database must contain an object property called 'abilityFactor'"),!1;if(e.abilityFactor.filter(e=>void 0===e.name||null===e.name||"string"!=typeof e.name).length>0)return console.log("Assistant's Affix Database must contain a string property called 'name' for every item inside 'abilityFactor'"),console.log(e.abilityFactor.filter(e=>void 0===e.name||null===e.name||"string"!=typeof e.name)),!1;var i=g(e.optionList.support,1);if((l=i.map(e=>e.ref).sort((e,t)=>e-t)).filter(e=>"number"!=typeof e).length>0)return console.log("Assistant's Affix Database must contain a numeric property called 'ref' for every item in 'optionList.support'"),console.log(i.filter(e=>void 0===e.ref||null===e.ref||"number"!=typeof e.ref)),!1;if(l.length>0&&0!=l[0])return console.log("Assistant's Affix Database must contain a starting item with a ref value of 0 in 'optionList.support'"),console.log(i.filter(e=>e.ref===l[0])),!1;if(l.length!==new Set(l).size){console.log("Assistant's Affix Database must not contain duplicate refs in 'optionList.support', but contained duplicate refs.");let e=[];for(var n=1;n<l.length;n++){let t=l[n-1],i=l[n];t!=i||e.includes(i)||e.push(i)}return console.log(e),console.log(i.filter(t=>e.includes(t.ref))),!1}for(var n=1;n<l.length;n++){let e=l[n-1],t=l[n];if(t-e!=1)return console.log("Assistant's Affix Database must not skip refs in 'optionList.support', but skipped ref "+(e+1)),console.log("... "+e+" .. ("+(e+1)+"?) .. "+t+" ..."),!1}var o=g(e.optionList.potential,1);if((l=o.map(e=>e.ref).sort((e,t)=>e-t)).filter(e=>"number"!=typeof e).length>0)return console.log("Assistant's Affix Database must contain a numeric property called 'ref' for every item in 'optionList.potential'"),console.log(o.filter(e=>void 0===e.ref||"number"!=typeof e.ref)),!1;if(l.length>0&&0!=l[0])return console.log("Assistant's Affix Database must contain a starting item with a ref value of 0 in 'optionList.potential'"),console.log(o.filter(e=>e.ref===l[0])),!1;if(l.length!==new Set(l).size){console.log("Assistant's Affix Database must not contain duplicate refs in 'optionList.potential', but contained duplicate refs.");let e=[];for(var n=1;n<l.length;n++){let t=l[n-1],i=l[n];t!=i||e.includes(i)||e.push(i)}return console.log(e),console.log(o.filter(t=>e.includes(t.ref))),!1}for(var n=1;n<l.length;n++){let e=l[n-1],t=l[n];if(t-e!=1)return console.log("Assistant's Affix Database must not skip refs in 'optionList.potential', but skipped ref "+(e+1)),console.log("... "+e+" .. ("+(e+1)+"?) .. "+t+" ..."),!1}var l,s=g(e.abilityList,1);if((l=s.map(e=>e.ref).sort((e,t)=>e-t)).filter(e=>"number"!=typeof e).length>0)return console.log("Assistant's Affix Database must contain a numeric property called 'ref' for every item in 'abilityList'"),console.log(s.filter(e=>void 0===e.ref||null===e.ref||"number"!=typeof e.ref)),!1;if(l.length>0&&0!=l[0])return console.log("Assistant's Affix Database must contain a starting item with a ref value of 0 in 'abilityList'"),console.log(s.filter(e=>e.ref===l[0])),!1;if(l.length!==new Set(l).size){console.log("Assistant's Affix Database must not contain duplicate refs in 'abilityList', but contained duplicate refs.");let e=[];for(var n=1;n<l.length;n++){let t=l[n-1],i=l[n];t!=i||e.includes(i)||e.push(i)}return console.log(e),console.log(s.filter(t=>e.includes(t.ref))),!1}let a=s.map(e=>e.simCode?e.simCode:e.code).sort();if(a.length!==new Set(a).size){console.log("Assistant's Affix Database must not contain duplicate codes/simCodes in 'abilityList', but contained duplicate codes.");let e=[];for(var n=1;n<a.length;n++){let t=a[n-1],i=a[n];t!=i||e.includes(i)||e.push(i)}return console.log(e),console.log(s.filter(t=>t.simCode?e.includes(t.simCode):e.includes(t.code))),!1}for(var n=1;n<l.length;n++){let e=l[n-1],t=l[n];if(t-e!=1)return console.log("Assistant's Affix Database must not skip refs in 'abilityList', but skipped ref "+(e+1)),console.log("... "+e+" .. ("+(e+1)+"?) .. "+t+" ..."),!1}var r=g(e.optionList.additional,1),d=r.filter(e=>"Nothing"!==e.id).map(e=>e.ref).sort((e,t)=>e-t);if(d.filter(e=>"number"!=typeof e).length>0)return console.log("Assistant's Affix Database must contain a numeric property called 'ref' for every item (except for the item with id 'Nothing') in 'optionList.additional'"),console.log(r.filter(e=>void 0===e.ref||null===e.ref||"number"!=typeof e.ref)),!1;if(d.length!==new Set(d).size){console.log("Assistant's Affix Database must not contain duplicate refs in 'optionList.additional', but contained duplicate refs.");let e=[];for(var n=1;n<d.length;n++){let t=d[n-1],i=d[n];t!=i||e.includes(i)||e.push(i)}return console.log(e),console.log(r.filter(t=>e.includes(t.ref))),!1}for(var n in d){if(!l.includes(d[n]))return console.log("Assistant's Affix Database must not contain a ref in 'optionList.additional' that does not match any ref in 'abilityList', but contains ref "+d[n]),!1;let e=s.filter(e=>e.ref==d[n])[0],t=r.filter(e=>e.ref==d[n])[0];if(e.name!==t.name)return console.log("Assistant's Affix Database must not contain a ref in 'optionList.additional' that does not match the name of the item with the matching ref in 'abilityList'"),console.log("ref: "+d[n]+"; "+e.name+" != "+t.name),!1}if(void 0===e.abilityFactor||null===e.abilityFactor||"object"!=typeof e.abilityFactor||void 0===e.abilityFactor.length||null===e.abilityFactor.length||"number"!=typeof e.abilityFactor.length)return console.log("Assistant's Affix Database must contain a list property called 'abilityFactor'"),!1;if(e.abilityFactor.filter(e=>void 0===e||null===e||"object"!=typeof e||void 0===e.name||null===e.name||"string"!=typeof e.name||0==e.name.length).length>0)return console.log("Assistant's Affix Database must contain only contain objects with string property 'name' in 'abilityFactor',but contained:"),console.log(e.abilityFactor.filter(e=>void 0===e||null===e||"object"!=typeof e||void 0===e.name||null===e.name||"string"!=typeof e.name||0==e.name.length)),!1;for(var n in e.abilityFactor){let t=e.abilityFactor[n].name;if(0==s.filter(e=>e.name==t).length)return console.log("Assistant's Affix Database must contain an ability in 'abilityList' with matching name for every item name in 'abilityFactor', but did not contain: "+t),!1}if(void 0===t||null===t||"object"!=typeof t)return console.log("Assistant's Affix Database must contain a localizable language data structure named 'lang'"),!1;if(void 0===t.support||null===t.support||"object"!=typeof t.support)return console.log("Assistant's Affix Database must contain an object property called 'support' in the localizable language data structure 'lang'"),!1;if(void 0===t.additional||null===t.additional||"object"!=typeof t.additional)return console.log("Assistant's Affix Database must contain an object property called 'additional' in the localizable language data structure 'lang'"),!1;if(void 0===t.potential||null===t.potential||"object"!=typeof t.potential)return console.log("Assistant's Affix Database must contain an object property called 'potential' in the localizable language data structure 'lang'"),!1;let c=["app","filters","statsDisplayOrder","synonyms"],f=["support","additional","potential"];if(Object.keys(t).filter(e=>!(c.includes(e)||f.includes(e)||void 0!==t[e]&&null!==t[e]&&"object"==typeof t[e]&&void 0!==t[e].name_en&&null!==t[e].name_en&&"string"==typeof t[e].name_en&&void 0!==t[e].name_jp&&null!==t[e].name_jp&&"string"==typeof t[e].name_jp&&void 0!==t[e].effect_en&&null!==t[e].effect_en&&"string"==typeof t[e].effect_en&&void 0!==t[e].effect_jp&&null!==t[e].effect_jp&&"string"==typeof t[e].effect_jp)).length>0)return console.log("Assistant's Affix Database must only contain object properties in 'lang' named 'app', 'filters', 'statsDisplayOrder', 'synonyms', 'support', 'additional', 'potential', and any other property must follow the format:\n \"{{ability_code}}\": {\n name_en: \"{{ability_name_as_in_affixData_abilityList_code}}\",\n name_jp: \"{{ability_name_in_japanese}}\",\n effect_en: \"{{ability_effect_in_english}}\",\n effect_jp: \"{{ability_effect_in_japanese}}\"\n }\nBut contained the following items:"),console.log(Object.keys(t).filter(e=>!(c.includes(e)||f.includes(e)||void 0!==t[e]&&null!==t[e]&&"object"==typeof t[e]&&void 0!==t[e].name_en&&null!==t[e].name_en&&"object"==typeof t[e].name_en&&void 0!==t[e].name_jp&&null!==t[e].name_jp&&"object"==typeof t[e].name_jp&&void 0!==t[e].effect_en&&null!==t[e].effect_en&&"object"==typeof t[e].effect_en&&void 0!==t[e].effect_jp&&null!==t[e].effect_jp&&"object"==typeof t[e].effect_jp))),!1;if(Object.keys(t.support).filter(e=>void 0===t.support[e]||null===t.support[e]||"object"!=typeof t.support[e]||void 0===t.support[e].en||null===t.support[e].en||"string"!=typeof t.support[e].en||void 0===t.support[e].jp||null===t.support[e].jp||"string"!=typeof t.support[e].jp).length>0)return console.log('Assistant\'s Affix Database must only contain object properties in \'lang.support\' in the following format:\n "{{support_item_id_as_in_affixData_optionList_support_id}}": {\n en: "{{support_item_id_in_english}}",\n jp: "{{support_item_id_in_japanese}}"\n },\nBut contained the following items:'),console.log(Object.keys(t.support).filter(e=>void 0===t.support[e]||null===t.support[e]||"object"!=typeof t.support[e]||void 0===t.support[e].en||null===t.support[e].en||"string"!=typeof t.support[e].en||void 0===t.support[e].jp||null===t.support[e].jp||"string"!=typeof t.support[e].jp)),!1;if(Object.keys(t.additional).filter(e=>void 0===t.additional[e]||null===t.additional[e]||"object"!=typeof t.additional[e]||void 0===t.additional[e].en||null===t.additional[e].en||"string"!=typeof t.additional[e].en||void 0===t.additional[e].jp||null===t.additional[e].jp||"string"!=typeof t.additional[e].jp).length>0)return console.log('Assistant\'s Affix Database must only contain object properties in \'lang.additional\' in the following format:\n "{{add_ability_id_as_in_affixData_optionList_additional_id}}": {\n en: "{{add_ability_id_in_english}}",\n jp: "{{add_ability_id_in_japanese}}"\n },\nBut contained the following items:'),console.log(Object.keys(t.additional).filter(e=>void 0===t.additional[e]||null===t.additional[e]||"object"!=typeof t.additional[e]||void 0===t.additional[e].en||null===t.additional[e].en||"string"!=typeof t.additional[e].en||void 0===t.additional[e].jp||null===t.additional[e].jp||"string"!=typeof t.additional[e].jp)),!1;if(Object.keys(t.potential).filter(e=>void 0===t.potential[e]||null===t.potential[e]||"object"!=typeof t.potential[e]||void 0===t.potential[e].en||null===t.potential[e].en||"string"!=typeof t.potential[e].en||void 0===t.potential[e].jp||null===t.potential[e].jp||"string"!=typeof t.potential[e].jp).length>0)return console.log('Assistant\'s Affix Database must only contain object properties in \'lang.potential\' in the following format:\n "{{potential_id_as_in_affixData_optionList_potential_id}}": {\n en: "{{potential_id_in_english}}",\n jp: "{{potential_id_in_japanese}}"\n },\nBut contained the following items:'),console.log(Object.keys(t.potential).filter(e=>void 0===t.potential[e]||null===t.potential[e]||"object"!=typeof t.potential[e]||void 0===t.potential[e].en||null===t.potential[e].en||"string"!=typeof t.potential[e].en||void 0===t.potential[e].jp||null===t.potential[e].jp||"string"!=typeof t.potential[e].jp)),!1;var u;if((u=s.filter(e=>{let i=t[e.code];return void 0===i||null===i||"object"!=typeof i||void 0===i.name_en||null===i.name_en||"string"!=typeof i.name_en||0==i.name_en.length||i.name_en!=e.name||void 0===i.name_jp||null===i.name_jp||"string"!=typeof i.name_jp||0==i.name_jp.length||void 0===i.effect_en||null===i.effect_en||"string"!=typeof i.effect_en||0==i.effect_en.length||void 0===i.effect_jp||null===i.effect_jp||"string"!=typeof i.effect_jp||0==i.effect_jp.length})).length>0)return console.log('Assistant\'s Affix Database must contain a localizable object in \'lang\' for every ability code in \'abilityList\' in the following format:\n "{{ability_code}}": {\n name_en: "{{ability_name_as_in_affixData_abilityList_code}}",\n name_jp: "{{ability_name_in_japanese}}",\n effect_en: "{{ability_effect_in_english}}",\n effect_jp: "{{ability_effect_in_japanese}}"\n }\nBut did not contain one for the following items:'),console.log(u),!1;if((u=i.filter(e=>{let i=t.support[e.id];return void 0===i||null===i||"object"!=typeof i||void 0===i.en||null===i.en||"string"!=typeof i.en||0==i.en.length||i.en!=e.id||void 0===i.jp||null===i.jp||"string"!=typeof i.jp||0==i.jp.length})).length>0)return console.log('Assistant\'s Affix Database must contain a localizable object in \'lang.support\' for every Support Item id in \'optionList.support\' in the following format:\n "{{support_item_id_as_in_affixData_optionList_support_id}}": {\n en: "{{support_item_id_in_english}}",\n jp: "{{support_item_id_in_japanese}}"\n },\nBut did not contain one for the following items:'),console.log(u),!1;if((u=r.filter(e=>{let i=t.additional[e.id];return void 0===i||null===i||"object"!=typeof i||void 0===i.en||null===i.en||"string"!=typeof i.en||0==i.en.length||i.en!=e.id||void 0===i.jp||null===i.jp||"string"!=typeof i.jp||0==i.jp.length})).length>0)return console.log('Assistant\'s Affix Database must contain a localizable object in \'lang.additional\' for every Add Ability Item id in \'optionList.additional\' in the following format:\n "{{add_ability_id_as_in_affixData_optionList_additional_id}}": {\n en: "{{add_ability_id_in_english}}",\n jp: "{{add_ability_id_in_japanese}}"\n },\nBut did not contain one for the following items:'),console.log(u),!1;if((u=o.filter(e=>{let i=t.potential[e.id];return void 0===i||null===i||"object"!=typeof i||void 0===i.en||null===i.en||"string"!=typeof i.en||0==i.en.length||i.en!=e.id||void 0===i.jp||null===i.jp||"string"!=typeof i.jp||0==i.jp.length})).length>0)return console.log('Assistant\'s Affix Database must contain a localizable object in \'lang.potential\' for every Potential id in \'optionList.potential\' in the following format:\n "{{potential_id_as_in_affixData_optionList_potential_id}}": {\n en: "{{potential_id_in_english}}",\n jp: "{{pontential_id_in_japanese}}"\n },\nBut did not contain one for the following items:'),console.log(u),!1;let p=[],m=[],y=[],h=[];for(var b in t)if(!c.includes(b))if("support"!==b)if("additional"!==b)if("potential"!==b)0==s.filter(e=>e.code==b).length&&h.push(b);else for(var v in t[b])0==o.filter(e=>e.id==v).length&&y.push(v);else for(var v in t[b])0==r.filter(e=>e.id==v).length&&m.push(v);else for(var v in t[b])0==i.filter(e=>e.id==v).length&&p.push(v);if(p.length>0)return console.log("Assistant's Affix Database must not contain a localizable language object in 'lang.support' for a Support Item id not listed in 'optionList.support', but contained the following:"),console.log(p),!1;if(m.length>0)return console.log("Assistant's Affix Database must not contain a localizable language object in 'lang.additional' for an Add Ability Item id not listed in 'optionList.additional', but contained the following:"),console.log(m),!1;if(y.length>0)return console.log("Assistant's Affix Database must not contain a localizable language object in 'lang.potential' for a Potential id not listed in 'optionList.potential', but contained the following:"),console.log(y),!1;if(h.length>0)return console.log("Assistant's Affix Database must not contain a localizable language object in 'lang' for an ability code not listed in 'abilityList', but contained the following:"),console.log(h),!1;return!0}(l.data,s.lang)){console.log("Fetching updates...");var t=(n,o)=>{if(null===n)return void i.question("Could not fetch data from PSO2 Affixing Simulator. Press 'Y' to try again or any key to quit...",function(e){"Y"===e||"y"===e?u(t):process.exit()});if(null===o)return void i.question("Could not fetch data from PSO2 Swiki. Press 'Y' to try again or any key to quit...",function(e){"Y"===e||"y"===e?u(t):process.exit()});console.log("Checking updates...");let a=function(e,t,i){if(!(e&&t&&e.abilityList&&t.abilityList&&e.abilityList.length&&t.abilityList.length))return console.warn("WARN Illegal Argument passed to checkUpdates"),console.warn(" - Usage: checkUpdates(ast, sim, $swiki)"),console.warn(" - ast: The affix assistant database"),console.warn(" - sim: The affix simulator database to compare to"),console.warn(" - $swiki: The jQuery object representing the PSO2 Swiki website"),null;let n={support:{outdatedInSim:[],outdatedInAst:[],inconclusiveInAst:[],inconclusiveInSim:[],codeChanges:[]},additional:{outdatedInSim:[],outdatedInAst:[],inconclusiveInAst:[],inconclusiveInSim:[],codeChanges:[]},potential:{outdatedInSim:[],outdatedInAst:[],inconclusiveInAst:[],inconclusiveInSim:[],codeChanges:[]},extendAbility:{outdatedInSim:[],outdatedInAst:[],inconclusiveInAst:[],inconclusiveInSim:[]},excludePattern:{addition:{outdatedInSim:[],outdatedInAst:[],inconclusiveInAst:[],inconclusiveInSim:[]},select:{outdatedInSim:[],outdatedInAst:[],inconclusiveInAst:[],inconclusiveInSim:[]}},extraSlot:{outdatedInSim:[],outdatedInAst:[],inconclusiveInAst:[],inconclusiveInSim:[]},sameBonusBoost:{outdatedInSim:[],outdatedInAst:[],inconclusiveInAst:[],inconclusiveInSim:[]},boostPoint:{},ability:{outdatedInSim:[],outdatedInAst:[],inconclusiveInAst:[],inconclusiveInSim:[],codeChanges:[]},abilityFactorsMissingInAst:[],addAbilitiesMissingInAst:[]};for(var o=0;o<t.abilityList.length;o++){let i=t.abilityList[o];if(c.filter(e=>e.simName==i.name).length>0)continue;if(!i||!i.name){n.ability.inconclusiveInSim.push(i);continue}let s=!1;for(var l=0;l<e.abilityList.length;l++){let t=e.abilityList[l];t&&t.name?i.name==t.name&&(s=!0):n.ability.inconclusiveInAst.push(t)}s||n.ability.outdatedInAst.push(i)}for(var o=0;o<e.abilityList.length;o++){let i=e.abilityList[o];if(!i||!i.name)continue;let s=c.filter(e=>e.astName==i.name);if(s.length>0&&(s[0].ignoreType!==d.pendingInSim||!t.abilityList.map(e=>e.name).includes(i.name)))continue;let a=!1,r=null;for(var l=0;l<t.abilityList.length;l++){let e=t.abilityList[l];e&&e.name&&(e.name==i.name&&(a=!0),e.name==i.name&&e.code!=i.code&&e.code!=i.simCode&&0==c.filter(t=>t.ignoreType===d.dupCodeInSim&&t.simCode==e.code&&t.astCode==(i.simCode?i.simCode:i.code)).length&&(r=i.name+":"+(i.simCode?i.simCode:i.code)+" -> "+e.name+":"+e.code))}a?r&&n.ability.codeChanges.push(r):n.ability.outdatedInSim.push(i)}for(var o=0;t.optionList&&t.optionList.support&&o<t.optionList.support.length;o++){let i=t.optionList.support[o];if(!i||!i.id||!i.value){n.support.inconclusiveInSim.push(i);continue}let s=c.filter(e=>e.simSupId==i.id);if(s.length>0&&(void 0===s[0].astSupId||e.optionList.support.map(e=>e.id).includes(s[0].astSupId)))continue;let a=!1;for(var l=0;e.optionList&&e.optionList.support&&l<e.optionList.support.length;l++){let t=e.optionList.support[l];t&&t.id?(i.id==t.id||i.id.includes(t.id)||t.id.includes(i.id))&&(a=!0):n.support.inconclusiveInAst.push(t)}a||n.support.outdatedInAst.push(i)}for(var o=0;e.optionList&&e.optionList.support&&o<e.optionList.support.length;o++){let i=e.optionList.support[o];if(!i||!i.id)continue;let s=c.filter(e=>e.astSupId==i.id);if(s.length>0&&(void 0===s[0].simSupId||t.optionList.support.map(e=>e.id).includes(s[0].simSupId)))continue;let a=!1,r=null;for(var l=0;t.optionList&&t.optionList.support&&l<t.optionList.support.length;l++){let e=t.optionList.support[l];e&&e.id&&e.value&&((e.id==i.id||e.id.includes(i.id)||i.id.includes(e.id))&&(a=!0),e.id==i.id&&e.value!=i.value&&e.value!=i.simValue&&(r=i.id+":"+i.value+" -> "+e.id+":"+e.value))}a?r&&n.support.codeChanges.push(r):n.support.outdatedInSim.push(i)}for(var o=0;t.optionList&&t.optionList.additional&&o<t.optionList.additional.length;o++){let i=t.optionList.additional[o];if(!i||!i.id||!i.value){n.additional.inconclusiveInSim.push(i);continue}let s=c.filter(e=>e.simAddId instanceof RegExp?e.simAddId.test(i.id):e.simAddId==i.id);if(s.length>0&&(void 0===s[0].astAddId||e.optionList.additional.map(e=>e.id).filter(e=>s[0].astAddId instanceof RegExp?s[0].astAddId.test(e):e===s[0].astAddId).length>0))continue;let a=!1;for(var l=0;e.optionList&&e.optionList.additional&&l<e.optionList.additional.length;l++){let t=e.optionList.additional[l];t&&t.id?(i.id==t.id||i.id.includes(t.id)||t.id.includes(i.id))&&(a=!0):n.additional.inconclusiveInAst.push(t)}a||n.additional.outdatedInAst.push(i)}for(var o=0;e.optionList&&e.optionList.additional&&o<e.optionList.additional.length;o++){let i=e.optionList.additional[o];if(!i||!i.id)continue;let s=c.filter(e=>e.astAddId instanceof RegExp?e.astAddId.test(i.id):e.astAddId==i.id);if(s.length>0&&(void 0===s[0].simAddId||t.optionList.additional.map(e=>e.id).filter(e=>s[0].simAddId instanceof RegExp?s[0].simAddId.test(e):e===s[0].simAddId).length>0))continue;let a=!1,r=null;for(var l=0;t.optionList&&t.optionList.additional&&l<t.optionList.additional.length;l++){let e=t.optionList.additional[l];e&&e.id&&e.value&&((e.id==i.id||e.id.includes(i.id)||i.id.includes(e.id))&&(a=!0),e.id==i.id&&e.value!=i.value&&e.value!=i.simValue&&(r=i.id+":"+i.value+" -> "+e.id+":"+e.value))}a?r&&n.additional.codeChanges.push(r):n.additional.outdatedInSim.push(i)}for(var o=0;t.optionList&&t.optionList.potential&&o<t.optionList.potential.length;o++){let i=t.optionList.potential[o];if(!i||!i.id||!i.value){n.potential.inconclusiveInSim.push(i);continue}let s=c.filter(e=>e.simPotId==i.id);if(s.length>0&&(void 0===s[0].astPotId||e.optionList.potential.map(e=>e.id).includes(s[0].astPotId)))continue;let a=!1;for(var l=0;e.optionList&&e.optionList.potential&&l<e.optionList.potential.length;l++){let t=e.optionList.potential[l];t&&t.id?(i.id==t.id||i.id.includes(t.id)||t.id.includes(i.id))&&(a=!0):n.potential.inconclusiveInAst.push(t)}a||n.potential.outdatedInAst.push(i)}for(var o=0;e.optionList&&e.optionList.potential&&o<e.optionList.potential.length;o++){let i=e.optionList.potential[o];if(!i||!i.id)continue;let s=c.filter(e=>e.astPotId==i.id);if(s.length>0&&(void 0===s[0].simPotId||t.optionList.potential.map(e=>e.id).includes(s[0].simPotId)))continue;let a=!1,r=null;for(var l=0;t.optionList&&t.optionList.potential&&l<t.optionList.potential.length;l++){let e=t.optionList.potential[l];e&&e.id&&e.value&&((e.id==i.id||e.id.includes(i.id)||i.id.includes(e.id))&&(a=!0),e.id==i.id&&e.value!=i.value&&e.value!=i.simValue&&(r=i.id+":"+i.value+" -> "+e.id+":"+e.value))}a?r&&n.potential.codeChanges.push(r):n.potential.outdatedInSim.push(i)}for(var o=0;t.extendAbility&&o<t.extendAbility.length;o++){let i=t.extendAbility[o];if(!(i&&i.base&&i.ref&&i.success)){n.extendAbility.inconclusiveInSim.push(i);continue}let l=c.filter(e=>void 0!==e.simExtBase&&e.simExtBase.filter(e=>i.base.includes(e)).length===i.base.length);if(l.length>0&&(void 0===l[0].astExtBase||e.extendAbility.map(e=>e.base).filter(e=>void 0!==l[0].astExtBase&&l[0].astExtBase.includes(e)).length===l[0].astExtBase.length))continue;let s=e.extendAbility.filter(e=>e.success===i.success).filter(e=>"object"==typeof i.ref?0===i.ref.filter(t=>i.ref.filter(e=>e===t).length!==("object"==typeof e.ref?e.ref.filter(e=>e===t).length:e.ref===t?1:0)).length:"object"==typeof e.ref?1===e.ref.filter(e=>e===i.ref).length:e.ref===i.ref).filter(e=>"object"==typeof i.base?0===i.base.filter(t=>i.base.filter(e=>e===t).length!==("object"==typeof e.base?e.base.filter(e=>e===t).length:e.base===t?1:0)).length:"object"==typeof e.base?1===e.base.filter(e=>e===i.base).length:e.base===i.base);1!==s.length&&n.extendAbility.outdatedInAst.push(i)}for(var o=0;e.extendAbility&&o<e.extendAbility.length;o++){let i=e.extendAbility[o];if(!(i&&i.base&&i.ref&&i.success))continue;let l=c.filter(e=>void 0!==e.astExtBase&&e.astExtBase.filter(e=>i.base.includes(e)).length===i.base.length);if(l.length>0&&(void 0===l[0].simExtBase||t.extendAbility.map(e=>e.base).filter(e=>void 0!==l[0].simExtBase&&l[0].simExtBase.includes(e)).length===l[0].simExtBase.length))continue;let s=t.extendAbility.filter(e=>e.success===i.success).filter(e=>"object"==typeof i.ref?0===i.ref.filter(t=>i.ref.filter(e=>e===t).length!==("object"==typeof e.ref?e.ref.filter(e=>e===t).length:e.ref===t?1:0)).length:"object"==typeof e.ref?1===e.ref.filter(e=>e===i.ref).length:e.ref===i.ref).filter(e=>"object"==typeof i.base?0===i.base.filter(t=>i.base.filter(e=>e===t).length!==("object"==typeof e.base?e.base.filter(e=>e===t).length:e.base===t?1:0)).length:"object"==typeof e.base?1===e.base.filter(e=>e===i.base).length:e.base===i.base);1!==s.length&&n.extendAbility.outdatedInSim.push(i)}for(var o=0;t.excludePattern.addition&&o<t.excludePattern.addition.length;o++){let i=t.excludePattern.addition[o];if(!i){n.excludePattern.addition.inconclusiveInSim.push(i);continue}let l=e.excludePattern.addition.filter(e=>typeof e==typeof i&&("object"==typeof i?0===i.filter(t=>i.filter(e=>e===t).length!==("object"==typeof e?e.filter(e=>e===t).length:e===t?1:0)).length:"object"==typeof e?1===e.filter(e=>e===i).length:e===i));1!==l.length&&0===c.filter(e=>typeof e==typeof i&&e.simExcludePatternAdd&&("object"==typeof i?0===i.filter(t=>i.filter(e=>e===t).length!==("object"==typeof e.simExcludePatternAdd?e.simExcludePatternAdd.filter(e=>e===t).length:e.simExcludePatternAdd===t?1:0)).length:"object"==typeof e.simExcludePatternAdd?1===e.simExcludePatternAdd.filter(e=>e===i).length:e.simExcludePatternAdd===i)).length&&n.excludePattern.addition.outdatedInAst.push(i)}for(var o=0;e.excludePattern.addition&&o<e.excludePattern.addition.length;o++){let i=e.excludePattern.addition[o];if(!i){n.excludePattern.addition.inconclusiveInAst.push(i);continue}let l=t.excludePattern.addition.filter(e=>typeof e==typeof i&&("object"==typeof i?0===i.filter(t=>i.filter(e=>e===t).length!==("object"==typeof e?e.filter(e=>e===t).length:e===t?1:0)).length:"object"==typeof e?1===e.filter(e=>e===i).length:e===i));1!==l.length&&0===c.filter(e=>typeof e==typeof i&&e.astExcludePatternAdd&&("object"==typeof i?0===i.filter(t=>i.filter(e=>e===t).length!==("object"==typeof e.astExcludePatternAdd?e.astExcludePatternAdd.filter(e=>e===t).length:e.astExcludePatternAdd===t?1:0)).length:"object"==typeof e.astExcludePatternAdd?1===e.astExcludePatternAdd.filter(e=>e===i).length:e.astExcludePatternAdd===i)).length&&n.excludePattern.addition.outdatedInSim.push(i)}for(var o=0;t.excludePattern.select&&o<t.excludePattern.select.length;o++){let i=t.excludePattern.select[o];if(!i){n.excludePattern.select.inconclusiveInSim.push(i);continue}let l=e.excludePattern.select.filter(e=>typeof e==typeof i&&("object"==typeof i?0===i.filter(t=>i.filter(e=>e===t).length!==("object"==typeof e?e.filter(e=>e===t).length:e===t?1:0)).length:"object"==typeof e?1===e.filter(e=>e===i).length:e===i));1!==l.length&&0===c.filter(e=>typeof e==typeof i&&e.simExcludePatternSel&&("object"==typeof i?0===i.filter(t=>i.filter(e=>e===t).length!==("object"==typeof e.simExcludePatternSel?e.simExcludePatternSel.filter(e=>e===t).length:e.simExcludePatternSel===t?1:0)).length:"object"==typeof e.simExcludePatternSel?1===e.simExcludePatternSel.filter(e=>e===i).length:e.simExcludePatternSel===i)).length&&n.excludePattern.select.outdatedInAst.push(i)}for(var o=0;e.excludePattern.select&&o<e.excludePattern.select.length;o++){let i=e.excludePattern.select[o];if(!i){n.excludePattern.select.inconclusiveInAst.push(i);continue}let l=t.excludePattern.select.filter(e=>typeof e==typeof i&&("object"==typeof i?0===i.filter(t=>i.filter(e=>e===t).length!==("object"==typeof e?e.filter(e=>e===t).length:e===t?1:0)).length:"object"==typeof e?1===e.filter(e=>e===i).length:e===i));1!==l.length&&0===c.filter(e=>typeof e==typeof i&&e.astExcludePatternSel&&("object"==typeof i?0===i.filter(t=>i.filter(e=>e===t).length!==("object"==typeof e.astExcludePatternSel?e.astExcludePatternSel.filter(e=>e===t).length:e.astExcludePatternSel===t?1:0)).length:"object"==typeof e.astExcludePatternSel?1===e.astExcludePatternSel.filter(e=>e===i).length:e.astExcludePatternSel===i)).length&&n.excludePattern.select.outdatedInSim.push(i)}let a=e=>void 0!==e&&null!==e&&"object"==typeof e&&void 0!==e.true&&null!==e.true&&"number"==typeof e.true&&void 0!==e.false&&null!==e.false&&"number"==typeof e.false,r=t.extraSlot.filter(e=>a(e));r.length!==t.extraSlot.length&&(n.extraSlot.inconclusiveInSim=t.extraSlot.filter(e=>!a(e)));let u=e.extraSlot.filter(e=>a(e));u.length!==e.extraSlot.length&&(n.extraSlot.inconclusiveInAst=e.extraSlot.filter(e=>!a(e)));n.extraSlot.outdatedInAst=r.filter(e=>0===u.filter(t=>e.true===t.true&&e.false===t.false).length),n.extraSlot.outdatedInSim=u.filter(e=>0===r.filter(t=>e.true===t.true&&e.false===t.false).length);let p=e=>void 0!==e&&null!==e&&"number"==typeof e,g=t.sameBonusBoost.filter(e=>p(e));g.length!==t.sameBonusBoost.length&&(n.sameBonusBoost.inconclusiveInSim=t.sameBonusBoost.filter(e=>!p(e)));let m=e.sameBonusBoost.filter(e=>p(e));m.length!==e.sameBonusBoost.length&&(n.sameBonusBoost.inconclusiveInAst=e.sameBonusBoost.filter(e=>!p(e)));n.sameBonusBoost.outdatedInAst=g.filter(e=>0===m.filter(t=>e===t).length),n.sameBonusBoost.outdatedInSim=m.filter(e=>0===g.filter(t=>e===t).length);let y=function(e,t){var i,n;return i=[],n=[],function e(t,o,l){var s;if(isNaN(t)&&isNaN(o)&&"number"==typeof t&&"number"==typeof o)return{valueInSim:t,valueInAst:o};if(t===o)return{valueInSim:t,valueInAst:o};if("function"==typeof t&&"function"==typeof o||t instanceof Date&&o instanceof Date||t instanceof RegExp&&o instanceof RegExp||t instanceof String&&o instanceof String||t instanceof Number&&o instanceof Number)return t.toString(),o.toString(),{valueInSim:t,valueInAst:o};if(!(t instanceof Object&&o instanceof Object))return{valueInSim:t,valueInAst:o};if(t.isPrototypeOf(o)||o.isPrototypeOf(t))return{valueInSim:t,valueInAst:o};if(t.constructor!==o.constructor)return{valueInSim:t,valueInAst:o};if(t.prototype!==o.prototype)return{valueInSim:t,valueInAst:o};if(i.indexOf(t)>-1||n.indexOf(o)>-1)return{valueInSim:t,valueInAst:o};let a={};for(s in o)o.hasOwnProperty(s)!==t.hasOwnProperty(s)?a[s]={valueInSim:t[s],valueInAst:o[s]}:typeof o[s]!=typeof t[s]&&(a[s]={valueInSim:t[s],valueInAst:o[s]});for(s in t)switch(o.hasOwnProperty(s)!==t.hasOwnProperty(s)?a[s]={valueInSim:t[s],valueInAst:o[s]}:typeof o[s]!=typeof t[s]&&(a[s]={valueInSim:t[s],valueInAst:o[s]}),typeof t[s]){case"object":case"function":i.push(t),n.push(o);let l=e(t[s],o[s]);0!=Object.keys(l).length&&(a[s]=l),i.pop(),n.pop();break;default:t[s]!==o[s]&&(a[s]={valueInSim:t[s],valueInAst:o[s]})}return a}(e,t)}(t.boostPoint,e.boostPoint);Object.keys(y).length>0&&(n.boostPoint=y);let h=[],b=[],v=[],A=null,x=i("div.ie5 > table.style_table > tbody");for(var o=0;o<x.length;o++){let e=x.get(o),t=null;for(var l=0;l<e.children.length;l++){let n=e.children[l];if(n.children.length>0&&"特殊能力因子"===i(n.children[0]).text())A="saf";else if(n.children.length>0&&"能力追加アイテム"===i(n.children[0]).text())A="add";else if(n.children.length>0&&"ドロップ付与"===i(n.children[0]).text())A="ability";else if("saf"===A){let e=i(n).find("td.style_td:first-child > a:first-child:not(:empty)");e&&e.length>0&&h.push(e.text())}else if("add"===A){let e=i(n).find("td.style_td:first-child > a:first-child:not(:empty)");if(e&&e.length>0){let t=e.text();b.push(t)}}else if("ability"===A){let e=i(n).find("td.style_td:first-child > a:first-child:not(:empty)");if(e&&e.length>0){if(v.push(e.text()),n.children.length>3){let e=i(n.children[3]).text();t=e&&""!==e&&"-"!==e&&!b.includes(e)}else if(3===n.children.length&&"220px"===i(n.children[2]).css("width")){let e=i(n.children[2]).text();t=e&&""!==e&&"-"!==e&&!b.includes(e)}if(t){let t=e.text();b.push(t)}}}}}let I=e.abilityFactor.map(e=>e.jpName);n.abilityFactorsMissingInAst=h.filter(e=>!I.includes(e));let j=Object.values(s.lang);if(s.lang)for(var o in n.abilityFactorsMissingInAst){let e=j.filter(e=>e.name_jp===n.abilityFactorsMissingInAst[o]);e.length>0&&(n.abilityFactorsMissingInAst[o]={name:e[0].name_en,jpName:n.abilityFactorsMissingInAst[o]})}let S=Object.values(s.lang.additional).map(e=>e.jp);if(b=b.map(e=>{let t=j.filter(t=>t.name_jp===e),i=e;if(/^S[1-8]:/.test(e)&&(i=e.substr(0,2)+"追加"+e.substr(2,e.length)),t.length>0){let e=t[0].name_en;if(/^S[1-8]:/.test(t[0].name_en))return{en:e=t[0].name_en.substr(0,2)+" Add: "+t[0].name_en.substr(3,t[0].name_en.length),jp:i}}return i}),n.addAbilitiesMissingInAst=b.filter(e=>!S.includes(e.jp?e.jp:e)),s.lang){let e=Object.values(s.lang.additional);for(var o in n.addAbilitiesMissingInAst){let t=e.filter(e=>e.jp===n.addAbilitiesMissingInAst[o]);t.length>0&&(n.addAbilitiesMissingInAst[o]={en:t[0].en,jp:n.addAbilitiesMissingInAst[o]})}}let L=0;n.addAbilitiesMissingInAst=n.addAbilitiesMissingInAst.reduce((e,t)=>(e[t.en?t.en:L]=t,L++,e),{}),console.warn("WARNING: Checks for boostdaySystem are not supported yet."),console.log(f),0==n.support.outdatedInSim.length&&delete n.support.outdatedInSim;0==n.support.outdatedInAst.length&&delete n.support.outdatedInAst;0==n.support.inconclusiveInSim.length&&delete n.support.inconclusiveInSim;0==n.support.inconclusiveInAst.length&&delete n.support.inconclusiveInAst;0==n.support.codeChanges.length&&delete n.support.codeChanges;0==n.additional.outdatedInSim.length&&delete n.additional.outdatedInSim;0==n.additional.outdatedInAst.length&&delete n.additional.outdatedInAst;0==n.additional.inconclusiveInSim.length&&delete n.additional.inconclusiveInSim;0==n.additional.inconclusiveInAst.length&&delete n.additional.inconclusiveInAst;0==n.additional.codeChanges.length&&delete n.additional.codeChanges;0==n.potential.outdatedInSim.length&&delete n.potential.outdatedInSim;0==n.potential.outdatedInAst.length&&delete n.potential.outdatedInAst;0==n.potential.inconclusiveInSim.length&&delete n.potential.inconclusiveInSim;0==n.potential.inconclusiveInAst.length&&delete n.potential.inconclusiveInAst;0==n.potential.codeChanges.length&&delete n.potential.codeChanges;0==n.extendAbility.outdatedInSim.length&&delete n.extendAbility.outdatedInSim;0==n.extendAbility.outdatedInAst.length&&delete n.extendAbility.outdatedInAst;0==n.extendAbility.inconclusiveInSim.length&&delete n.extendAbility.inconclusiveInSim;0==n.extendAbility.inconclusiveInAst.length&&delete n.extendAbility.inconclusiveInAst;0==n.ability.outdatedInSim.length&&delete n.ability.outdatedInSim;0==n.ability.outdatedInAst.length&&delete n.ability.outdatedInAst;0==n.ability.inconclusiveInSim.length&&delete n.ability.inconclusiveInSim;0==n.ability.inconclusiveInAst.length&&delete n.ability.inconclusiveInAst;0==n.ability.codeChanges.length&&delete n.ability.codeChanges;0==n.excludePattern.addition.outdatedInSim.length&&delete n.excludePattern.addition.outdatedInSim;0==n.excludePattern.addition.outdatedInAst.length&&delete n.excludePattern.addition.outdatedInAst;0==n.excludePattern.addition.inconclusiveInSim.length&&delete n.excludePattern.addition.inconclusiveInSim;0==n.excludePattern.addition.inconclusiveInAst.length&&delete n.excludePattern.addition.inconclusiveInAst;0==n.excludePattern.select.outdatedInSim.length&&delete n.excludePattern.select.outdatedInSim;0==n.excludePattern.select.outdatedInAst.length&&delete n.excludePattern.select.outdatedInAst;0==n.excludePattern.select.inconclusiveInSim.length&&delete n.excludePattern.select.inconclusiveInSim;0==n.excludePattern.select.inconclusiveInAst.length&&delete n.excludePattern.select.inconclusiveInAst;0==n.extraSlot.outdatedInSim.length&&delete n.extraSlot.outdatedInSim;0==n.extraSlot.outdatedInAst.length&&delete n.extraSlot.outdatedInAst;0==n.extraSlot.inconclusiveInSim.length&&delete n.extraSlot.inconclusiveInSim;0==n.extraSlot.inconclusiveInAst.length&&delete n.extraSlot.inconclusiveInAst;0==n.sameBonusBoost.outdatedInSim.length&&delete n.sameBonusBoost.outdatedInSim;0==n.sameBonusBoost.outdatedInAst.length&&delete n.sameBonusBoost.outdatedInAst;0==n.sameBonusBoost.inconclusiveInSim.length&&delete n.sameBonusBoost.inconclusiveInSim;0==n.sameBonusBoost.inconclusiveInAst.length&&delete n.sameBonusBoost.inconclusiveInAst;0===Object.keys(n.support).length&&delete n.support;0===Object.keys(n.additional).length&&delete n.additional;0===Object.keys(n.potential).length&&delete n.potential;0===Object.keys(n.extendAbility).length&&delete n.extendAbility;0===Object.keys(n.ability).length&&delete n.ability;0===Object.keys(n.excludePattern.addition).length&&delete n.excludePattern.addition;0===Object.keys(n.excludePattern.select).length&&delete n.excludePattern.select;0===Object.keys(n.excludePattern).length&&delete n.excludePattern;0===Object.keys(n.extraSlot).length&&delete n.extraSlot;0===Object.keys(n.sameBonusBoost).length&&delete n.sameBonusBoost;0===Object.keys(n.boostPoint).length&&delete n.boostPoint;0==n.abilityFactorsMissingInAst.length&&delete n.abilityFactorsMissingInAst;0!=n.addAbilitiesMissingInAst.length&&0!==Object.keys(n.addAbilitiesMissingInAst).length||delete n.addAbilitiesMissingInAst;if(0===Object.keys(n).length)return"No pending updates from PSO2 Affixing Simulator at the moment!";return n}(l.data,n,o),g=JSON.stringify(n,null,2),m=JSON.stringify(a,null,2);e.existsSync(r)||e.mkdirSync(r),e.writeFile(r+"/simulatorDb.txt",g,function(e){});var y=()=>{console.log("Building project...");var e=(t,n,o)=>{if(t)return console.log(t),void i.question("Build failed. Press 'Y' to try again or any key to quit...",function(t){"Y"===t||"y"===t?p(e):process.exit()});console.log(n),i.question("Build complete! Press enter to quit...",function(e){process.exit()})};p(e)};null===a?i.question("Could not complete the checking phase. Press 'Y' to try again or any key to quit...",function(e){"Y"===e||"y"===e?u(t):process.exit()}):"string"==typeof a?(console.log(a),y()):(console.log("There seems to be some pending updates for the Affixing Assistant:"),console.log(m),e.writeFile(r+"/changes.txt",m,function(e){e||console.log("A copy of the pending updates has been saved to "+r+"/changes.txt"),i.question("Please review all pending updates above and restart the build process. Press 'Y' to continue building regardless or any key to quit...",function(e){"Y"===e||"y"===e?y():process.exit()})}))};u(t)}else i.question("Please review the impacted files and restart the build process. Press 'Y' to try again or any key to quit...",function(e){"Y"===e||"y"===e?(delete require.cache[require.resolve("./js/affixData")],delete require.cache[require.resolve("./js/lang")],l=require("./js/affixData"),s=require("./js/lang"),a()):process.exit()})};a()});const d={temp:0,pendingInSim:1,nameMismatch:2,astOnly:4,dupCodeInSim:5};var c=[{ignoreType:d.temp,simName:"S2:Lethal Intent"},{ignoreType:d.temp,simName:"S3:Lethal Intent"},{ignoreType:d.temp,simName:"S2:Umbrageous Melody 2"},{ignoreType:d.temp,simName:"S3:Double-Edged Sword"},{ignoreType:d.temp,simName:"S3:Rupturing Excess"},{ignoreType:d.temp,simSupId:"Ability Success Rate +55%"},{ignoreType:d.temp,simSupId:"Ability Success Rate +60%"},{ignoreType:d.pendingInSim,astName:"Ability V"},{ignoreType:d.pendingInSim,astName:"S3:Powering Intent"},{ignoreType:d.pendingInSim,astName:"S2:Skilled Brilliance"},{ignoreType:d.pendingInSim,astName:"S5:Angelic Respite"},{ignoreType:d.nameMismatch,astName:"Shoot Resist I",simName:"Shot Resist I"},{ignoreType:d.nameMismatch,astName:"Shoot Resist II",simName:"Shot Resist II"},{ignoreType:d.nameMismatch,astName:"Shoot Resist III",simName:"Shot Resist III"},{ignoreType:d.nameMismatch,astName:"Shoot Resist IV",simName:"Shot Resist IV"},{ignoreType:d.nameMismatch,astName:"Shoot Resist V",simName:"Shot Resist V"},{ignoreType:d.nameMismatch,astName:"S1:Vigor Enhancement",simName:"S1:Vigor Enhancment"},{ignoreType:d.nameMismatch,astName:"Doom Break",simName:"Doom Break I"},{ignoreType:d.nameMismatch,astName:"Doom Break 2",simName:"Doom Break II"},{ignoreType:d.nameMismatch,astName:"Doom Break 3",simName:"Doom Break III"},{ignoreType:d.nameMismatch,astName:"Ceremo Fever",simName:"Ceramo Fever"},{ignoreType:d.nameMismatch,astName:"Extreceptor",simName:"Extreme Receptor"},{ignoreType:d.nameMismatch,astName:"Apprezina Reverie",simName:"Appregina Reverie"},{ignoreType:d.nameMismatch,astExcludePatternAdd:["VA","VC"]},{ignoreType:d.nameMismatch,astExcludePatternAdd:["VA","VB"]},{ignoreType:d.nameMismatch,astExcludePatternAdd:["VB","VC"]},{ignoreType:d.nameMismatch,astExcludePatternAdd:["TA","UA","UB"],simExcludePatternAdd:["TA","U"]},{ignoreType:d.nameMismatch,astExcludePatternAdd:["XG","XJ","XH","XI"]},{ignoreType:d.nameMismatch,astExcludePatternSel:["VA*","VB*"],simExcludePatternSel:["VB01","VA*"]},{ignoreType:d.nameMismatch,astExcludePatternSel:["VB*","VC*"],simExcludePatternSel:["VB03","VA*"]},{ignoreType:d.nameMismatch,astExcludePatternSel:["VA*","VB*"],simExcludePatternSel:["VB01","VC*"]},{ignoreType:d.nameMismatch,astExcludePatternSel:["VB*","VC*"],simExcludePatternSel:["VB03","VC*"]},{ignoreType:d.nameMismatch,astExcludePatternSel:["XG","XJ","XH","XI"]},{ignoreType:d.nameMismatch,astExtBase:["XG01","UC*"]},{ignoreType:d.nameMismatch,astExtBase:["XJ01","ID*"]},{ignoreType:d.astOnly,astName:"Stamina Boost"},{ignoreType:d.astOnly,astName:"Spirita Boost"},{ignoreType:d.astOnly,astName:"Power Boost"},{ignoreType:d.astOnly,astName:"Shoot Boost"},{ignoreType:d.astOnly,astName:"Technique Boost"},{ignoreType:d.astOnly,astName:"Tenora Boost"},{ignoreType:d.astOnly,astName:"GRM Boost"},{ignoreType:d.astOnly,astName:"Yohmei Boost"},{ignoreType:d.astOnly,astName:"Noble Stamina"},{ignoreType:d.astOnly,astName:"Elegant Stamina"},{ignoreType:d.astOnly,astName:"Grace Stamina"},{ignoreType:d.astOnly,astName:"Grand Stamina"},{ignoreType:d.astOnly,astName:"Noble Power"},{ignoreType:d.astOnly,astName:"Elegant Power"},{ignoreType:d.astOnly,astName:"Grace Power"},{ignoreType:d.astOnly,astName:"Grand Power"},{ignoreType:d.astOnly,astName:"Noble Shoot"},{ignoreType:d.astOnly,astName:"Elegant Shoot"},{ignoreType:d.astOnly,astName:"Grace Shoot"},{ignoreType:d.astOnly,astName:"Grand Shoot"},{ignoreType:d.astOnly,astName:"Noble Technique"},{ignoreType:d.astOnly,astName:"Elegant Technique"},{ignoreType:d.astOnly,astName:"Grace Technique"},{ignoreType:d.astOnly,astName:"Grand Technique"},{ignoreType:d.astOnly,astName:"Grace Spirita"},{ignoreType:d.astOnly,astName:"Offense Boost"},{ignoreType:d.astOnly,astName:"Attack Boost"},{ignoreType:d.astOnly,astName:"Defense Boost"},{ignoreType:d.astOnly,astName:"Guard Boost"},{ignoreType:d.astOnly,astName:"S1:Junk"},{ignoreType:d.astOnly,astName:"S2:Junk"},{ignoreType:d.astOnly,astName:"S3:Junk"},{ignoreType:d.astOnly,astName:"S4:Junk"},{ignoreType:d.astOnly,astName:"S5:Junk"},{ignoreType:d.astOnly,astName:"S6:Junk"},{ignoreType:d.astOnly,astName:"S7:Junk"},{ignoreType:d.astOnly,astName:"S8:Junk"},{ignoreType:d.astOnly,astAddId:/^S[1-8]{1} Add: .+$/},{ignoreType:d.dupCodeInSim,astCode:"LB91",simCode:"LB1V"},{ignoreType:d.dupCodeInSim,astCode:"LC88",simCode:"LC1I"},{ignoreType:d.dupCodeInSim,astCode:"LC89",simCode:"LC1H"},{ignoreType:d.dupCodeInSim,astCode:"LC90",simCode:"LC1J"},{ignoreType:d.dupCodeInSim,astCode:"LC91",simCode:"LC1K"}],f='Thank you for updating the Affixing Assistant Database!\nThe Update Manager will guide you through any update that needs to be made based on the latest version of the Affixing Simulator.\nNote that the Update Manager does NOT check for latest common Add Abilities nor common Ability Factors (only checks for SSAs). If any update was performed recently, please take some time to perform the following actions:\n - Make sure that code changes were NOT performed on the "code" property of ANY item in the Assistant. Doing so will break backwards compatibility for the changed item. If the code for any item used in the Affixing Simulator has changed, please include or change the "simCode" property of the respective item instead.\n - Make sure to ONLY propose changes to Update Manager\'s ignoreList for cases the manager outputs a correction that you are absolutely certain has been resolved. In such cases where you cannot build because of a false-negative in the validation process, describe the scenario and the reason for the change in the ignoreList in a new Issue on GitHub.\n - Check out the latest information at pso2.swiki.jp to make sure the update matches the information there (such as new Add Abilities, new Ability Factors, new Potentials, new Support Items, etc.).\n - Finally, make sure to test the updated Affixing Assistant in debug mode and production mode. Try to focus on the new abilities, but test other parts as well according to your discretion.';function u(e){if(void 0===e||null===e||"function"!=typeof e)return console.warn("WARN Illegal Argument passed to fetchUpdates"),console.warn(" - Usage: fetchUpdates(completion)"),void console.warn(" - completion: the completion handler function containing one parameter for the data retrieved");let t=null;console.log("Obtaining latest PSO2 Affixing Assistant data..."),n("https://arks-layer.com/abilitysim/jp/params.json").then(e=>e.json()).then(i=>{t=i,httpsAgent=new https.Agent({rejectUnauthorized:!1}),console.log("Obtaining latest PSO2 Swiki data..."),n("https://pso2.swiki.jp/index.php?S%E7%B4%9A%E7%89%B9%E6%AE%8A%E8%83%BD%E5%8A%9B",{method:"GET",agent:httpsAgent}).then(e=>e.text()).then(i=>{const n=o.load(i);n?e(t,n):e(null,null)}).catch(t=>{console.log("Failed to obtain the latest PSO2 Swiki data..."),console.error(t),e(null,null)})}).catch(t=>{console.log("Failed to obtain the latest PSO2 Affixing Assistant data..."),console.error(t),e(null,null)})}function p(i){a.parser.parse(l.data);e.existsSync(r)||e.mkdirSync(r),e.writeFile("intermediate/affixingassistant.min.temp.txt","/** PSO2 Affixing Assistant\n * @author malulleybovo (since 2018)\n * @license GNU General Public License v3.0\n *\n * @licstart The following is the entire license notice for the \n * JavaScript code in this page.\n *\n * Copyright (C) 2018 Arthur Malulley B. de O.\n *\n *\n * The JavaScript code in this page is free software: you can\n * redistribute it and/or modify it under the terms of the GNU\n * General Public License (GNU GPL) as published by the Free Software\n * Foundation, either version 3 of the License, or (at your option)\n * any later version. The code is distributed WITHOUT ANY WARRANTY;\n * without even the implied warranty of MERCHANTABILITY or FITNESS\n * FOR A PARTICULAR PURPOSE. See the GNU GPL for more details.\n *\n * As additional permission under GNU GPL version 3 section 7, you\n * may distribute non-source (e.g., minimized or compacted) forms of\n * that code without the copy of the GNU GPL normally required by\n * section 4, provided you include this license notice and a URL\n * through which recipients can access the Corresponding Source.\n *\n * @licend The above is the entire license notice\n * for the JavaScript code in this page.\n *\n */\n",function(e){if(e)return console.log(stderr),void i("Could not include license.",stdout,stderr);let n="uglifyjs --compress --mangle --toplevel -o %outfolder%/affixingassistant.min.js -- %jssrc% & uglifycss %csssrc% > %outfolder%/stylesheet.min.css & type intermediate\\affixingassistant.min.temp.txt > intermediate\\stylesheet.min.temp.txt & type dist\\affixingassistant.min.js >> intermediate\\affixingassistant.min.temp.txt & type intermediate\\affixingassistant.min.temp.txt > dist\\affixingassistant.min.js & del intermediate\\affixingassistant.min.temp.txt & type dist\\stylesheet.min.css >> intermediate\\stylesheet.min.temp.txt & type intermediate\\stylesheet.min.temp.txt > dist\\stylesheet.min.css & del intermediate\\stylesheet.min.temp.txt";n=(n=(n=n.replace(/%outfolder%/g,"dist")).replace(/%jssrc%/g,"js/gaData.js js/lang.js js/templates.js js/viewcontroller.js js/affixData.js js/affixDataParser.js js/affixingassistant.js js/formulaEncoder.js js/app.js")).replace(/%csssrc%/g,"css/themes.css css/stylesheet.css css/checkbox.css css/radiobutton.css css/dropdown.css css/filtersearch.css"),t(n,(e,t,n)=>{console.log(t),console.log(n),i(e,t,n)})})}function g(e,t,i,n){let o=!0;if(void 0!==n&&(o=!1),n=n||[],(i=i||0)<=t&&void 0!==e&&"object"==typeof e)for(var l in o||n.push(e),i++,e)e.hasOwnProperty(l)&&g(e[l],t,i,n);return n}