UNPKG

fa-toolkit

Version:

a devtool for fast app

1 lines 24.6 kB
"use strict";var _0x1b454c=_0x56ec;function _regeneratorRuntime(){var p=_0x56ec;_regeneratorRuntime=function(){return s};var s={},e=Object[p(418)],u=e[p(411)],l=Object[p(431)]||function(e,t,r){e[t]=r[p(383)]},t=p(476)==typeof Symbol?Symbol:{},o=t[p(553)]||p(457),r=t[p(509)]||p(456),n=t[p(419)]||p(479);function a(e,t,r){return Object[p(431)](e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{a({},"")}catch(e){a=function(e,t,r){return e[t]=r}}function c(e,t,r,n){var a,i,s,c,u,o=p,t=t&&t[o(418)]instanceof g?t:g,t=Object[o(363)](t.prototype),n=new x(n||[]);return l(t,o(545),{value:(a=e,i=r,s=n,u=(c=p)(518),function(e,t){var r=c;if(r(435)===u)throw new Error(r(401));if(r(477)===u){if(r(475)===e)throw t;return R()}for(s[r(514)]=e,s.arg=t;;){var n=s.delegate;if(n){var o=function e(t,r){var n=p,o=r.method,a=t[n(553)][o];if(void 0===a)return r.delegate=null,n(475)===o&&t[n(553)][n(478)]&&(r[n(514)]=n(478),r[n(534)]=void 0,e(t,r),n(475)===r[n(514)])||n(478)!==o&&(r[n(514)]=n(475),r[n(534)]=new TypeError(n(469)+o+n(532))),h;a=f(a,t[n(553)],r[n(534)]);if(n(475)===a[n(503)])return r[n(514)]=n(475),r.arg=a.arg,r.delegate=null,h;var a=a[n(534)];return a?a[n(541)]?(r[t[n(535)]]=a[n(383)],r[n(389)]=t[n(422)],n(478)!==r[n(514)]&&(r[n(514)]=n(389),r.arg=void 0),r[n(482)]=null,h):a:(r.method=n(475),r[n(534)]=new TypeError("iterator result is not an object"),r[n(482)]=null,h)}(n,s);if(o){if(o===h)continue;return o}}if(r(389)===s.method)s[r(554)]=s[r(353)]=s[r(534)];else if(r(475)===s[r(514)]){if(r(518)===u)throw u=r(477),s[r(534)];s.dispatchException(s[r(534)])}else r(478)===s[r(514)]&&s[r(500)](r(478),s[r(534)]);u=r(435);o=f(a,i,s);if(r(483)===o[r(503)]){if(u=s.done?"completed":r(491),o[r(534)]===h)continue;return{value:o[r(534)],done:s[r(541)]}}"throw"===o[r(503)]&&(u=r(477),s[r(514)]=r(475),s.arg=o[r(534)])}})}),t}function f(e,t,r){var n=p;try{return{type:n(483),arg:e[n(375)](t,r)}}catch(e){return{type:n(475),arg:e}}}s[p(386)]=c;var h={};function g(){}function i(){}function m(){}var _={};a(_,o,function(){return this});t=Object[p(384)],t=t&&t(t(T([])));t&&t!==e&&u.call(t,o)&&(_=t);var d=m[p(418)]=g[p(418)]=Object.create(_);function b(e){var t=p;["next","throw",t(478)][t(471)](function(t){a(e,t,function(e){return this[_0x56ec(545)](t,e)})})}function v(s,c){var t,o=p;l(this,o(545),{value:function(r,n){function e(){return new c(function(e,t){!function t(e,r,n,o){var a=_0x56ec,e=f(s[e],s,r);if(a(475)!==e[a(503)]){var i=e[a(534)],r=i[a(383)];return r&&a(379)==_typeof(r)&&u[a(375)](r,a(463))?c[a(358)](r.__await)[a(473)](function(e){t(a(389),e,n,o)},function(e){t(a(475),e,n,o)}):c.resolve(r)[a(473)](function(e){i.value=e,n(i)},function(e){return t(a(475),e,n,o)})}o(e[a(534)])}(r,n,e,t)})}return t=t?t[o(473)](e,e):e()}})}function y(e){var t=p,r={tryLoc:e[0]};1 in e&&(r[t(374)]=e[1]),2 in e&&(r[t(426)]=e[2],r[t(373)]=e[3]),this.tryEntries.push(r)}function P(e){var t=p,r=e[t(445)]||{};r.type=t(483),delete r[t(534)],e[t(445)]=r}function x(e){var t=p;this.tryEntries=[{tryLoc:t(513)}],e[t(471)](y,this),this.reset(!0)}function T(r){if(r){var e=r[o];if(e)return e.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var n=-1,e=function e(){for(var t=_0x56ec;++n<r[t(399)];)if(u[t(375)](r,n))return e[t(383)]=r[n],e[t(541)]=!1,e;return e[t(383)]=void 0,e.done=!0,e};return e.next=e}}return{next:R}}function R(){return{value:void 0,done:!0}}return i.prototype=m,l(d,p(548),{value:m,configurable:!0}),l(m,"constructor",{value:i,configurable:!0}),i.displayName=a(m,n,p(444)),s[p(528)]=function(e){var t=p,e=t(476)==typeof e&&e.constructor;return!!e&&(e===i||t(444)===(e[t(439)]||e[t(521)]))},s[p(462)]=function(e){var t=p;return Object[t(502)]?Object[t(502)](e,m):(e.__proto__=m,a(e,n,t(444))),e[t(418)]=Object.create(d),e},s[p(517)]=function(e){return{__await:e}},b(v.prototype),a(v[p(418)],r,function(){return this}),s[p(378)]=v,s[p(397)]=function(e,t,r,n,o){var a=p;void 0===o&&(o=Promise);var i=new v(c(e,t,r,n),o);return s[a(528)](t)?i:i.next().then(function(e){var t=a;return e[t(541)]?e[t(383)]:i[t(389)]()})},b(d),a(d,n,"Generator"),a(d,o,function(){return this}),a(d,"toString",function(){return"[object Generator]"}),s[p(376)]=function(e){var t,n=Object(e),o=[];for(t in n)o.push(t);return o.reverse(),function e(){for(var t=_0x56ec;o[t(399)];){var r=o[t(510)]();if(r in n)return e[t(383)]=r,e[t(541)]=!1,e}return e.done=!0,e}},s[p(400)]=T,x[p(418)]={constructor:x,reset:function(e){var t=p;if(this[t(414)]=0,this.next=0,this[t(554)]=this[t(353)]=void 0,this[t(541)]=!1,this[t(482)]=null,this.method=t(389),this[t(534)]=void 0,this[t(505)][t(471)](P),!e)for(var r in this)"t"===r[t(540)](0)&&u[t(375)](this,r)&&!isNaN(+r[t(465)](1))&&(this[r]=void 0)},stop:function(){var e=p;this[e(541)]=!0;var t=this[e(505)][0][e(445)];if(e(475)===t[e(503)])throw t[e(534)];return this[e(472)]},dispatchException:function(n){var e=p;if(this.done)throw n;var o=this;function t(e,t){var r=_0x56ec;return i[r(503)]=r(475),i[r(534)]=n,o[r(389)]=e,t&&(o[r(514)]="next",o[r(534)]=void 0),!!t}for(var r=this[e(505)][e(399)]-1;0<=r;--r){var a=this[e(505)][r],i=a[e(445)];if("root"===a.tryLoc)return t(e(453));if(a[e(474)]<=this[e(414)]){var s=u[e(375)](a,"catchLoc"),c=u[e(375)](a,e(426));if(s&&c){if(this[e(414)]<a[e(374)])return t(a.catchLoc,!0);if(this[e(414)]<a[e(426)])return t(a.finallyLoc)}else if(s){if(this[e(414)]<a[e(374)])return t(a[e(374)],!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this[e(414)]<a[e(426)])return t(a[e(426)])}}}},abrupt:function(e,t){for(var r=p,n=this[r(505)][r(399)]-1;0<=n;--n){var o=this[r(505)][n];if(o[r(474)]<=this[r(414)]&&u[r(375)](o,r(426))&&this[r(414)]<o[r(426)]){var a=o;break}}var i=(a=a&&("break"===e||r(526)===e)&&a[r(474)]<=t&&t<=a.finallyLoc?null:a)?a[r(445)]:{};return i[r(503)]=e,i.arg=t,a?(this[r(514)]="next",this[r(389)]=a[r(426)],h):this.complete(i)},complete:function(e,t){var r=p;if(r(475)===e[r(503)])throw e[r(534)];return r(467)===e[r(503)]||r(526)===e.type?this.next=e[r(534)]:r(478)===e[r(503)]?(this[r(472)]=this.arg=e[r(534)],this.method="return",this[r(389)]="end"):r(483)===e[r(503)]&&t&&(this[r(389)]=t),h},finish:function(e){for(var t=p,r=this.tryEntries[t(399)]-1;0<=r;--r){var n=this[t(505)][r];if(n[t(426)]===e)return this.complete(n[t(445)],n[t(373)]),P(n),h}},catch:function(e){for(var t=p,r=this[t(505)][t(399)]-1;0<=r;--r){var n=this[t(505)][r];if(n[t(474)]===e){var o,a=n[t(445)];return t(475)===a[t(503)]&&(o=a[t(534)],P(n)),o}}throw new Error(t(382))},delegateYield:function(e,t,r){var n=p;return this.delegate={iterator:T(e),resultName:t,nextLoc:r},n(389)===this[n(514)]&&(this[n(534)]=void 0),h}},s}function _typeof(e){var r=_0x56ec;return(_typeof=r(476)==typeof Symbol&&r(459)==typeof Symbol.iterator?function(e){return typeof e}:function(e){var t=r;return e&&t(476)==typeof Symbol&&e[t(548)]===Symbol&&e!==Symbol[t(418)]?t(459):typeof e})(e)}function asyncGeneratorStep(e,t,r,n,o,a,i){var s=_0x56ec;try{var c=e[a](i),u=c.value}catch(e){return void r(e)}c.done?t(u):Promise[s(358)](u)[s(473)](n,o)}function _asyncToGenerator(c){return function(){var e=this,s=arguments;return new Promise(function(t,r){var n=_0x56ec,o=c[n(451)](e,s);function a(e){asyncGeneratorStep(o,t,r,a,i,n(389),e)}function i(e){asyncGeneratorStep(o,t,r,a,i,"throw",e)}a(void 0)})}}function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError(_0x56ec(449))}function _iterableToArray(e){var t=_0x56ec;if(typeof Symbol!==t(402)&&null!=e[Symbol[t(553)]]||null!=e["@@iterator"])return Array[t(413)](e)}function _arrayWithoutHoles(e){if(Array[_0x56ec(352)](e))return _arrayLikeToArray(e)}function _createForOfIteratorHelper(e,t){var r=_0x56ec,n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e[r(457)];if(!n){if(Array[r(352)](e)||(n=_unsupportedIterableToArray(e))||t&&e&&typeof e[r(399)]===r(536)){n&&(e=n);var o=0,t=function(){};return{s:t,n:function(){return o>=e[r(399)]?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:t}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,s=!1;return{s:function(){n=n[r(375)](e)},n:function(){var e=r,t=n.next();return i=t[e(541)],t},e:function(e){s=!0,a=e},f:function(){var e=r;try{i||null==n.return||n[e(478)]()}finally{if(s)throw a}}}}function _unsupportedIterableToArray(e,t){var r=_0x56ec;if(e){if(typeof e===r(537))return _arrayLikeToArray(e,t);var n=Object[r(418)][r(524)][r(375)](e)[r(465)](8,-1);return"Map"===(n=n===r(443)&&e[r(548)]?e[r(548)][r(521)]:n)||n===r(551)?Array.from(e):n===r(493)||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/[r(480)](n)?_arrayLikeToArray(e,t):void 0}}function _arrayLikeToArray(e,t){(null==t||t>e[_0x56ec(399)])&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _defineProperty(e,t,r){var n=_0x56ec;return(t=_toPropertyKey(t))in e?Object[n(431)](e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _toPropertyKey(e){e=_toPrimitive(e,_0x56ec(537));return"symbol"===_typeof(e)?e:String(e)}function _toPrimitive(e,t){var r=_0x56ec;if("object"!==_typeof(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return(t===r(537)?String:Number)(e);t=n[r(375)](e,t||r(417));if("object"!==_typeof(t))return t;throw new TypeError(r(392))}!function(){for(var e=_0x56ec,t=_0x518c();;)try{if(958653==-parseInt(e(427))*(parseInt(e(516))/2)+-parseInt(e(349))/3+-parseInt(e(351))/4+parseInt(e(529))/5+parseInt(e(369))/6+parseInt(e(547))/7+-parseInt(e(468))/8)break;t.push(t.shift())}catch(e){t.push(t.shift())}}();var path=require(_0x1b454c(409)),fs=require("fs"),webpack=require(_0x1b454c(347)),ResourcePlugin=require("./web-compiler/plugin/resource-plugin"),HtmlGeneratorPlugin=require("./web-compiler/plugin/html-generator-plugin"),ManifestGeneratorPlugin=require(_0x1b454c(511)),RpkSignPlugin=require(_0x1b454c(391)),I18NPlugin=require(_0x1b454c(368)),_packOptions=require(_0x1b454c(498)),_require=require(_0x1b454c(371)),clearResource=_require[_0x1b454c(506)],norpk=_require.norpk,IS_PRD=_require[_0x1b454c(481)],PROJECT_PATH=_require[_0x1b454c(523)],signFlag=_require[_0x1b454c(421)],isPrivatePkg=_require[_0x1b454c(440)],WebpackTargetPlugin=require(_0x1b454c(403)),LoggerPlguin=require(_0x1b454c(499)),utils=require(_0x1b454c(447)),removeStrictModePlugin=require(_0x1b454c(501));process[_0x1b454c(361)]=!0;var PROJECT_CONFIG=readProjectCfgJson()||{},ignoreRules=generateIgnoreRule(PROJECT_CONFIG),SRC_PATH=PROJECT_CONFIG[_0x1b454c(395)]?path[_0x1b454c(416)](PROJECT_PATH,PROJECT_CONFIG.quickappRoot):PROJECT_PATH,ZIP_PATH=path[_0x1b454c(416)](PROJECT_PATH,_0x1b454c(549),"dist"),BUILD_PATH=path[_0x1b454c(416)](PROJECT_PATH,".quickapp",_0x1b454c(412)),I18N_ENTRY=[],I18N="i18n",APP="app",APP_TYPE=_0x1b454c(408);function handleUsingComponents(e,t){var r,n=_0x1b454c;if(e)for(var o in e)Object[n(418)][n(411)].call(e,o)&&(r=e[o][n(539)](),e[o]=utils[n(350)](r,t,SRC_PATH))}function readExtJson(){var e,t=_0x1b454c,r=path[t(416)](SRC_PATH,"ext.json");return fs[t(484)](r)&&((r=(e=JSON[t(454)](fs[t(494)](r).toString()))[t(372)])[t(405)]={},r[t(525)]=[],handingCustomTabBar(r),e[t(372)]=r),e}function readAppJson(){var t,r=_0x1b454c,e=_defineProperty({},APP,new Map),n=path[r(416)](SRC_PATH,r(432));if(!fs[r(484)](n))throw r(552);handleAppType(t=JSON.parse(fs.readFileSync(n)[r(524)]())),handleUsingComponents(t[r(425)],n),t[r(405)]={},t[r(525)]=[];var o,a=[],i=path[r(416)](SRC_PATH,r(543));if(fs[r(484)](i)&&(o=JSON[r(454)](fs.readFileSync(i)[r(524)]()))[r(519)]&&o[r(372)][r(448)]&&Object[r(376)](o[r(372)][r(448)])[r(399)]&&(t[r(448)]=o[r(372)].pages),!(t[r(448)]&&0<t[r(448)][r(399)]))throw r(533);putPageInfoToEntryList(t[r(448)],"",!1,t,e[APP]);n=[r(450),"subPackages"][r(356)](function(e){return Object[r(418)].hasOwnProperty.call(t,e)});if(fs.existsSync(i)&&(o=JSON[r(454)](fs[r(494)](i)[r(524)]()),i=[r(450),"subPackages"][r(356)](function(e){var t=r;return Object[t(418)][t(411)][t(375)](o.appConfig,e)}),o[r(519)]&&i&&o[r(372)][i]&&(a=o[r(372)][i])),a.length){n&&delete t[n];var s,c=_createForOfIteratorHelper(t.subpackages=a);try{for(c.s();!(s=c.n())[r(541)];){var u=s[r(383)],p=new Map;e[u[r(513)]]=p,putPageInfoToEntryList(u[r(448)],u[r(513)],u[r(438)],t,p)}}catch(e){c.e(e)}finally{c.f()}}else if(n){a=t[n],delete t[n];var l,f=_createForOfIteratorHelper(t[r(450)]=a);try{for(f.s();!(l=f.n())[r(541)];){var h=l[r(383)],g=new Map;e[h[r(513)]]=g,putPageInfoToEntryList(h[r(448)],h[r(513)],h[r(438)],t,g)}}catch(e){f.e(e)}finally{f.f()}}return handingCustomTabBar(t),{manifest:t,projectComponentsMap:e}}function handleAppType(e){var t=_0x1b454c;e.type=e[t(503)]||(e[t(436)]?e[t(436)]:APP_TYPE),delete e[t(436)]}function hasCustomTabBar(e){var t=_0x1b454c;return(e[t(404)]||{}).custom&&fs[t(484)](path.resolve(SRC_PATH,"custom-tab-bar/index.qxml"))}function handingCustomTabBar(e){var t=_0x1b454c;if(hasCustomTabBar(e)){var r,n=_createForOfIteratorHelper(e[t(404)].list);try{for(n.s();!(r=n.n())[t(541)];){var o=r.value;if(!e[t(405)][o[t(542)]])throw"ERROR: Can not resolve tabBar list item : "+"'".concat(o.pagePath,t(370));e[t(405)][o.pagePath].useCustomTabBar=!0}}catch(e){n.e(e)}finally{n.f()}}}function getGlobalComponentsInfo(){var t=_0x1b454c,r=0<arguments[t(399)]&&void 0!==arguments[0]?arguments[0]:{},n=[];return Object[t(376)](r)[t(471)](function(e){n[t(489)]({key:e,path:r[e]})}),n}function _0x518c(){var e=["ERROR: Can not use cyclic dependened component with component path : ","find","widgets","resolve","readdir","route-mapping.json","noDeprecation","loadBabelModule","create","web-compiler/appjson-loader","@babel/preset-env","projectComponentsMap","concat","./web-compiler/plugin/i18n-transform-plugin","7488246RWMTtJ","', please check tabBar configuration.","./common/utils","appConfig","afterLoc","catchLoc","call","keys","fa-compiler/fa-module-loader.js","AsyncIterator","object","none",".json","illegal catch attempt","value","getPrototypeOf","custom-tab-bar/index","wrap","filePath","LoaderOptionsPlugin","next","app.css.js","./web-compiler/plugin/rpk-sign-plugin","@@toPrimitive must return a primitive value.","package","production","quickappRoot",".ux","async","router","length","values","Generator is already running","undefined","./web-compiler/plugin/webpack-target/index","tabBar","page","app.json?package=app",".js","webapp","path","development","hasOwnProperty","build","from","prev","replace","join","default","prototype","toStringTag","get","signFlag","nextLoc","widgetPathsList","component","usingComponents","finallyLoc","197PxVzjV","web-compiler/qjs-loader","manifest","miniprogram_npm","defineProperty","app.json","components","ERROR: Failed to find the file: ","executing","appType","[name]","independent","displayName","isPrivatePkg",".qxml","set","Object","GeneratorFunction","completion","inline-cheap-source-map","./web-compiler/common/utils","pages","Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.","subpackages","apply","compJsonPath","end","parse","stop","@@asyncIterator","@@iterator","@babel/plugin-transform-modules-commonjs","symbol","babel-loader"," contains error, please check it.","mark","__await","custom-tab-bar/index.qxml","slice","defFreezeProperty","break","9225088tjyUSM","The iterator does not provide a '","javascript/auto","forEach","rval","then","tryLoc","throw","function","completed","return","@@toStringTag","test","IS_PRD","delegate","normal","existsSync","log","custom-tab-bar/index.pack.js","app.js","WARNING:Route information in the manifest.json file is incomplete: \n Page '","push","splice","suspendedYield","plugins","Arguments","readFileSync","app","lstatSync","componentList","./web-compiler/common/packoptions-utils","./common/logger-plugin","abrupt","./common/remove-strict-mode-plugin","setPrototypeOf","type","versionNum","tryEntries","clearResource","optimization","customTabBar","asyncIterator","pop","./web-compiler/plugin/manifest-generator-plugin","routeMapping","root","method","exports","13258ibUnBQ","awrap","suspendedStart","extEnable","node_modules","name","web-compiler/path-process-loader.js","PROJECT_PATH","toString","independentList","continue","?type=component","isGeneratorFunction","4541300hRYqGM","toLowerCase","list","' method","ERROR: app.json doesn't contain any page.","arg","resultName","number","string","app.css","trim","charAt","done","pagePath","ext.json","mergeMap","_invoke",".pack.js","13108683fZOGeU","constructor",".quickapp","relative","Set","ERROR: Can not resolve file : app.json","iterator","sent","webpack","reverse","537723rhySuh","getProjectAbsPath","1728108kTjeqg","isArray","_sent","' is used."];return(_0x518c=function(){return e})()}function putPageInfoToEntryList(e,t,r,n,o){var a=_0x1b454c;if(e)for(var i in e)if(Object[a(418)][a(411)][a(375)](e,i)){var s=path[a(416)](SRC_PATH,t,e[i]),c=path[a(550)](SRC_PATH,s);if(!ignoreRules||!_packOptions.isIgnoreFile(c,ignoreRules)){i=c[a(415)](/\\/g,"/"),c=""[a(367)](s,a(381)),s=void 0;try{var u=fs[a(494)](c)[a(524)](),s=fs[a(484)](c)?JSON[a(454)](u):{}}catch(e){throw"ERROR: "[a(367)](c,a(461))}handleUsingComponents(s[a(425)],c),r&&n[a(525)][a(489)](i),n.page[i]=s,t||getUsingComponents(n,"","",o,a(405)),getUsingComponents(s,c,i,o,"page")}}}function getUsingComponents(a,i,e,s,t){var c=_0x1b454c,u=5<arguments[c(399)]&&void 0!==arguments[5]?arguments[5]:[],p=[],l=a[c(521)];if(a.usingComponents)for(var f in a[c(425)]){(function(){var e=c;if(Object[e(418)][e(411)][e(375)](a[e(425)],f)){var t=a[e(425)][f],r=utils.getAbsPath(t,i,SRC_PATH,".json"),n=r[e(387)],o=r.fixEntryPath,r=path[e(550)](SRC_PATH,n)[e(415)](/\\/g,"/")[e(415)](/\.json/,""),t=o||r;if(a[e(425)][f]=t,!l&&i===n)return l=f;if(u.find(function(e){return e===n}))throw e(355)[e(367)](n);p.some(function(e){return e.path===path})||p[e(489)]({path:t,key:f,compJsonPath:n});r=JSON[e(454)](fs[e(494)](n)[e(524)]());handleUsingComponents(r[e(425)],n),getUsingComponents(r,n,t,s,"component",u[e(367)]([n]))}})();c(526)}e&&!s.get(e)&&(t={componentList:p,type:t,componentName:l,compJsonPath:i,path:e},s[c(442)](e,t))}function getI18NEntry(c){var u=_0x1b454c;fs[u(359)](c,function(e,t){var r=u;if(e)throw e;var n,o=_createForOfIteratorHelper(t);try{for(o.s();!(n=o.n()).done;){var a,i=n[r(383)],s=path.join(c,i)[r(415)](/\\/g,"/");fs[r(496)](s).isDirectory()&&(/(node_modules)|(\.quickapp)/[r(480)](i)||((a=s.split("/"))[a[r(399)]-1][r(530)]()===I18N&&I18N_ENTRY.push(s),getI18NEntry(s)))}}catch(e){o.e(e)}finally{o.f()}})}function generateEntry(e){var n=_0x1b454c,o={},t=e[n(366)],r=[];Object.keys(t)[n(348)]()[n(471)](function(e){r[n(489)](t[e])}),o[n(487)]=path[n(358)](SRC_PATH,n(406))[n(415)](/\\/g,"/");var a=utils[n(544)](r),i=path.resolve(SRC_PATH,n(538));if(fs.existsSync(i)&&(o[n(390)]=path[n(358)](SRC_PATH,n(538))),hasCustomTabBar(e.manifest)){var i=path[n(358)](SRC_PATH,n(464)),s=i.replace(/\.qxml$/,".json");o[n(486)]="".concat(i,n(527));var c,u=_createForOfIteratorHelper(e[n(429)].tabBar[n(531)]);try{for(u.s();!(c=u.n())[n(541)];){var p=c[n(383)];a[n(420)](p[n(542)])&&a[n(420)](p[n(542)])[n(497)][n(489)]({path:"custom-tab-bar/index",key:n(508),compJsonPath:s})}}catch(e){u.e(e)}finally{u.f()}i={componentList:[],type:n(424),compJsonPath:s};t[n(495)][n(442)](n(385),i)}return a.forEach(function(e,t){var r=n;return o["".concat(t,r(546))]=e[r(452)][r(415)](/\.json$/,r(441))}),utils[n(466)](e,"components",a),generateWidgetsEntry(o,e),o}function _0x56ec(e,t){var r=_0x518c();return(_0x56ec=function(e,t){return r[e-=347]})(e,t)}function generateWidgetsEntry(o,r){var a,n,i=_0x1b454c,e=r[i(429)];r.manifest&&e[i(398)]&&((a=e[i(398)][i(448)])&&Object[i(376)](a).forEach(function(e){var t=i,r=a[e],n=r[t(424)];r||console[t(485)](t(488)[t(367)](e,"' does not have the component attribute configured. ")+"By default, '"[t(367)](n,t(354)));r=path[t(416)](SRC_PATH,e,n),n=""[t(367)](path[t(416)](e,n),t(407));if(fs[t(484)](""[t(367)](r,t(396))))o[n]="".concat(r,t(396));else if(!fs[t(484)](""[t(367)](r,t(441))))throw t(434)[t(367)](r,t(396))}),(e=e[i(357)])&&0<e[i(399)]&&(r.widgetPathsList=[],n="",e.forEach(function(e){var t=i;n=e.path,r[t(423)][t(489)](path.join(SRC_PATH,n))})))}function generateModules(){var e=_0x1b454c,t={targets:{node:8}};return{rules:[][e(367)](_toConsumableArray(utils.createCSSRule()),[{test:/\.js$/,use:[{loader:utils.loadBabelModule(e(460)),options:{presets:[[utils[e(362)]("@babel/preset-env"),t]],plugins:[utils[e(362)](e(458)),utils[e(362)]("@babel/plugin-proposal-class-properties"),utils[e(362)]("@babel/plugin-transform-runtime")]}},{loader:path[e(358)](__dirname,e(377))},{loader:path[e(358)](__dirname,e(522))}],exclude:/node_modules/},{test:/\.(qjs)|(wxs)$/,use:[{loader:path[e(358)](__dirname,e(428))},{loader:utils.loadBabelModule(e(460)),options:{presets:[[utils[e(362)](e(365)),t]],plugins:[utils[e(362)](e(458)),removeStrictModePlugin]}},{loader:path[e(358)](__dirname,"web-compiler/path-process-loader.js")}],exclude:/node_modules/},{test:/\.qxml$/,type:"javascript/auto",use:[{loader:utils[e(362)]("babel-loader"),options:{presets:[[utils[e(362)](e(365)),t]],compact:!1}},{loader:path[e(358)](__dirname,"web-compiler/qxml-loader")}]},{test:/app\.json$/,type:e(470),use:[{loader:path[e(358)](__dirname,e(364))}]},{test:/\.(ux)(\?[^?]+)?$/,use:[{loader:path[e(358)](__dirname,"fa-compiler/loader.js")}]}])}}function generateIgnoreRule(e){var t;return(t=e?_packOptions.parseIgnoreRules(e):t)||{}}function readProjectCfgJson(){var e,t=_0x1b454c,r=path[t(416)](PROJECT_PATH,"quickapp.config.json");return e=fs[t(484)](r)?JSON.parse(fs[t(494)](r)[t(524)]()):e}function generateRouteMapping(e){var t=_0x1b454c,r=e[t(429)][t(512)]||{},n=path[t(416)](SRC_PATH,t(360));if(fs[t(484)](n)){var o=JSON[t(454)](fs.readFileSync(n)[t(524)]());if(o)for(var a in o)Object[t(418)][t(411)][t(375)](o,a)&&(r[a]=o[a])}0<Object.keys(r)[t(399)]&&(e[t(429)][t(512)]=r)}function generatePlugins(e,t){var r=_0x1b454c;return[new LoggerPlguin,new ResourcePlugin({src:SRC_PATH,build:BUILD_PATH,ignoreRules:ignoreRules,manifest:e.manifest}),new ManifestGeneratorPlugin({manifest:e.manifest,build:BUILD_PATH}),new HtmlGeneratorPlugin({manifestData:e[r(429)],pagesInfo:e[r(429)][r(405)],srcPath:SRC_PATH,buildPath:BUILD_PATH,componentSet:e[r(433)]}),new webpack[r(388)]({options:{srcPath:SRC_PATH,manifest:e.manifest,extData:t,components:e.components,projectComponentsMap:e.projectComponentsMap,versionNum:e[r(504)],widgetPathsList:e[r(423)],widgetsDependList:e.widgetPathsList,projectCfgData:PROJECT_CONFIG,globalComponents:getGlobalComponentsInfo(e[r(429)][r(425)])}}),new I18NPlugin({srcPath:SRC_PATH,buildPath:BUILD_PATH,entries:I18N_ENTRY}),new WebpackTargetPlugin]}function getResolve(){var e=_0x1b454c,t=[path[e(416)](SRC_PATH,e(430)),path[e(416)](__dirname,"..","node_modules"),path[e(416)](__dirname,"..","..","..",e(520))];return isPrivatePkg()&&t[e(490)](2,1,path[e(416)](__dirname,"..","..","..","..",e(520))),{modules:t}}function getExtConfig(e,t){var r=_0x1b454c,n=!1,t=t[r(429)].package;return e&&!0===e[r(519)]&&(n=!0,e[r(372)]&&e.appConfig[r(393)]&&(t=e[r(372)][r(393)])),{extEnable:n,packageName:t}}function generateConfig(){return _generateConfig[_0x1b454c(451)](this,arguments)}function _generateConfig(){var t=_0x1b454c;return(_generateConfig=_asyncToGenerator(_regeneratorRuntime()[t(462)](function e(){var r,n,o,a,i=t;return _regeneratorRuntime()[i(386)](function(e){for(var t=i;;)switch(e[t(414)]=e[t(389)]){case 0:return e[t(389)]=2,clearResource([ZIP_PATH,BUILD_PATH]);case 2:return getI18NEntry(SRC_PATH),r=readAppJson(),o=readExtJson(),generateRouteMapping(r),a=generateEntry(r),n={mode:t(IS_PRD?394:410),devtool:!IS_PRD&&t(446),context:SRC_PATH,entry:a,output:{path:BUILD_PATH,filename:t(437),publicPath:"/",globalObject:"global",enabledChunkLoadingTypes:["import-scripts"]},target:"web",resolve:getResolve(),module:generateModules(),plugins:generatePlugins(r,o),node:{global:!1},stats:t(380),optimization:{noEmitOnErrors:!1,splitChunks:{chunks:t(397),cacheGroups:{default:!1}}}},IS_PRD||(n[t(507)].moduleIds="named"),norpk||(a=getExtConfig(o,r),o=a[t(519)],a=a.packageName,n[t(492)][t(489)](new RpkSignPlugin({name:a,output:ZIP_PATH,src:BUILD_PATH,buildPath:BUILD_PATH,sign:signFlag,subpackages:r[t(429)][t(450)],IS_PRD:IS_PRD,isWeb:!0,extEnable:o}))),e.abrupt(t(478),n);case 11:case t(453):return e[t(455)]()}},e)})))[t(451)](this,arguments)}module[_0x1b454c(515)]=generateConfig;