@atomicservice/ascf-toolkit 1.0.9 → 1.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (108) hide show
  1. package/lib/ascf-common/index.js +1 -1
  2. package/lib/ascf-compiler/appjson-loader.js +1 -1
  3. package/lib/ascf-compiler/common/appjson-validator.js +1 -1
  4. package/lib/ascf-compiler/common/ascf-define.js +1 -1
  5. package/lib/ascf-compiler/common/ascf-file-cache.js +1 -0
  6. package/lib/ascf-compiler/common/beforeLoaderProcess.js +1 -1
  7. package/lib/ascf-compiler/common/css-runtime-api.js +1 -1
  8. package/lib/ascf-compiler/common/eventHappenHjs.js +1 -1
  9. package/lib/ascf-compiler/common/exp-utils.js +1 -1
  10. package/lib/ascf-compiler/common/hash-sum.js +1 -1
  11. package/lib/ascf-compiler/common/hdc-executor.js +1 -1
  12. package/lib/ascf-compiler/common/hjs-utils.js +1 -1
  13. package/lib/ascf-compiler/common/hxml-validator.js +1 -1
  14. package/lib/ascf-compiler/common/logUndefined.js +1 -1
  15. package/lib/ascf-compiler/common/manifest-handler.js +1 -1
  16. package/lib/ascf-compiler/common/manifest-manager.js +1 -1
  17. package/lib/ascf-compiler/common/merge-tpl-cmps.js +1 -1
  18. package/lib/ascf-compiler/common/packoptions-utils.js +1 -1
  19. package/lib/ascf-compiler/common/quick-generate-subpackage.js +1 -1
  20. package/lib/ascf-compiler/common/utils.js +1 -1
  21. package/lib/ascf-compiler/css-process-loader.js +1 -1
  22. package/lib/ascf-compiler/extract-loader.js +1 -1
  23. package/lib/ascf-compiler/hcss-loader.js +1 -1
  24. package/lib/ascf-compiler/hjs-loader.js +1 -1
  25. package/lib/ascf-compiler/hxml-loader.js +1 -1
  26. package/lib/ascf-compiler/js-parser/parser-babel.js +1 -1
  27. package/lib/ascf-compiler/js-parser/parser-swc.js +1 -1
  28. package/lib/ascf-compiler/js-parser/parser.js +1 -1
  29. package/lib/ascf-compiler/loader-utils.js +1 -1
  30. package/lib/ascf-compiler/path-process-loader.js +1 -1
  31. package/lib/ascf-compiler/plugin/before-loader-plugin.js +1 -1
  32. package/lib/ascf-compiler/plugin/copy-bundle-plugin.js +1 -1
  33. package/lib/ascf-compiler/plugin/dynamic-entry-plugin.js +1 -1
  34. package/lib/ascf-compiler/plugin/extConfig-plugin.js +1 -1
  35. package/lib/ascf-compiler/plugin/html-generator-plugin.js +1 -1
  36. package/lib/ascf-compiler/plugin/i18n-transform-plugin.js +1 -1
  37. package/lib/ascf-compiler/plugin/manifest-generator-plugin.js +1 -1
  38. package/lib/ascf-compiler/plugin/quick-service-build-plugin.js +1 -1
  39. package/lib/ascf-compiler/plugin/replace-module-id-plugin.js +1 -1
  40. package/lib/ascf-compiler/plugin/resource-plugin.js +1 -1
  41. package/lib/ascf-compiler/plugin/webpack-target/index.js +1 -1
  42. package/lib/ascf-compiler/plugin/webpack-target/jsonpChunkLoadingRuntimeModule.js +1 -1
  43. package/lib/ascf-compiler/plugin/webpack-target/jsonpHelpers.js +1 -1
  44. package/lib/ascf-compiler/plugin/webpack-target/jsonpTemplatePlugin.js +1 -1
  45. package/lib/ascf-compiler/require-loader.js +1 -1
  46. package/lib/ascf-compiler/server/dev-server.js +1 -1
  47. package/lib/ascf-compiler/server/port-manager.js +1 -1
  48. package/lib/ascf-compiler/swc-loader.js +1 -1
  49. package/lib/ascf-compiler/template/attr-utils.js +1 -1
  50. package/lib/ascf-compiler/template/implicit-model-config.js +1 -1
  51. package/lib/ascf-compiler/template/node-name-utils.js +1 -1
  52. package/lib/ascf-compiler/template-compiler/index.js +1 -1
  53. package/lib/ascf-compiler/trustlist-hxml-verify-loader.js +1 -1
  54. package/lib/ascf-compiler/trustlist-js-verify-loader.js +1 -1
  55. package/lib/ascf-compiler/trustlist-verify/config.js +1 -1
  56. package/lib/ascf-compiler/trustlist-verify/utils.js +1 -1
  57. package/lib/ascf-compiler/trustlist-verify/verify-ignore-files.js +1 -1
  58. package/lib/ascf-compiler/vue-compiler/vue-compiler.js +1 -1
  59. package/lib/ascf-compiler/vue-compiler/vue.bundle.js +1 -1
  60. package/lib/ascf-compiler/web.webpack.config.js +1 -1
  61. package/lib/ascf-converter/common/commonConfig.js +1 -1
  62. package/lib/ascf-converter/common/commonUtils.js +1 -1
  63. package/lib/ascf-converter/common/path-validator.js +1 -1
  64. package/lib/ascf-converter/common/textDocument.js +1 -1
  65. package/lib/ascf-converter/compiler-utils/parse5.bundle.js +1 -1
  66. package/lib/ascf-converter/convertManager.js +1 -1
  67. package/lib/ascf-converter/features/converter.js +1 -1
  68. package/lib/ascf-converter/features/fileHandle.js +1 -1
  69. package/lib/ascf-converter/features/transformReport.js +1 -1
  70. package/lib/ascf-converter/lib/apiadapter4alipay.js +1 -1
  71. package/lib/ascf-converter/parse/babelParser.js +1 -1
  72. package/lib/ascf-converter/parse/importVisitor.js +1 -1
  73. package/lib/ascf-converter/parse/wxssParser.js +1 -1
  74. package/lib/ascf-converter/report/js/index.js +1 -1
  75. package/lib/ascf-sign-tools/cli.js +1 -1
  76. package/lib/ascf-sign-tools/index.js +1 -1
  77. package/lib/bin/ascf.js +1 -1
  78. package/lib/commands/ascfbuild/index.js +1 -1
  79. package/lib/commands/build-npm/index.js +1 -1
  80. package/lib/commands/compile.js +1 -1
  81. package/lib/commands/convert.js +1 -1
  82. package/lib/commands/debugger/index.js +1 -1
  83. package/lib/commands/quickservice/index.js +1 -1
  84. package/lib/common/config.js +1 -1
  85. package/lib/common/constants.js +1 -1
  86. package/lib/common/log4js.js +1 -1
  87. package/lib/common/logger-plugin.js +1 -1
  88. package/lib/common/remove-strict-mode-plugin.js +1 -1
  89. package/lib/common/string-utils.js +1 -1
  90. package/lib/common/utils.js +1 -1
  91. package/lib/common/version-check.js +1 -1
  92. package/lib/index.js +1 -1
  93. package/package.json +8 -8
  94. package/lib/ascf-base/index.js +0 -1
  95. package/lib/tools/platform-tools-darwin/adb +0 -0
  96. package/lib/tools/platform-tools-windows/AdbWinApi.dll +0 -0
  97. package/lib/tools/platform-tools-windows/AdbWinUsbApi.dll +0 -0
  98. package/lib/tools/platform-tools-windows/adb.exe +0 -0
  99. package/lib/tools/release_64/SSL/ct_log_list.cnf +0 -9
  100. package/lib/tools/release_64/SSL/ct_log_list.cnf.dist +0 -9
  101. package/lib/tools/release_64/SSL/misc/CA.pl +0 -215
  102. package/lib/tools/release_64/SSL/misc/tsget.pl +0 -200
  103. package/lib/tools/release_64/SSL/openssl.cnf +0 -350
  104. package/lib/tools/release_64/SSL/openssl.cnf.dist +0 -350
  105. package/lib/tools/release_64/bin/c_rehash.pl +0 -251
  106. package/lib/tools/release_64/bin/libcrypto-1_1-x64.dll +0 -0
  107. package/lib/tools/release_64/bin/libssl-1_1-x64.dll +0 -0
  108. package/lib/tools/release_64/bin/openssl.exe +0 -0
@@ -1 +1 @@
1
- function _0x1265(t,e){var r=_0x39e5();return(_0x1265=function(t,e){return r[t-=369]})(t,e)}var _0x85bbe9=_0x1265;function _typeof(t){var r=_0x1265;return(_typeof=r(369)==typeof Symbol&&"symbol"==typeof Symbol[r(443)]?function(t){return typeof t}:function(t){var e=r;return t&&e(369)==typeof Symbol&&t[e(411)]===Symbol&&t!==Symbol[e(419)]?e(441):typeof t})(t)}function _classCallCheck(t,e){var r=_0x1265;if(!(t instanceof e))throw new TypeError(r(431))}function _defineProperties(t,e){for(var r=_0x1265,n=0;n<e[r(438)];n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o[r(373)]=!0),Object.defineProperty(t,_toPropertyKey(o[r(399)]),o)}}function _createClass(t,e,r){var n=_0x1265;return e&&_defineProperties(t[n(419)],e),r&&_defineProperties(t,r),Object[n(371)](t,n(419),{writable:!1}),t}function _toPropertyKey(t){t=_toPrimitive(t,_0x1265(413));return"symbol"==_typeof(t)?t:t+""}function _toPrimitive(t,e){var r=_0x1265;if(r(446)!=_typeof(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0===n)return(r(413)===e?String:Number)(t);n=n[r(407)](t,e||"default");if(r(446)!=_typeof(n))return n;throw new TypeError(r(440))}(()=>{for(var t=_0x1265,e=_0x39e5();;)try{if(461909==+parseInt(t(412))+-parseInt(t(409))/2+parseInt(t(404))/3*(parseInt(t(408))/4)+parseInt(t(396))/5*(parseInt(t(376))/6)+-parseInt(t(444))/7*(-parseInt(t(424))/8)+parseInt(t(398))/9+-parseInt(t(420))/10)break;e.push(e.shift())}catch(t){e.push(e.shift())}})();var fs=require("fs"),path=require(_0x85bbe9(445)),commonUtils=require(_0x85bbe9(378)),HAS_APIS=require("./ascfApisDiff.json"),log4js=require(_0x85bbe9(415)),logger=log4js.getLogger(_0x85bbe9(383));function isExists(t,e){for(var r=_0x85bbe9,n=0;n<t[r(438)];n++)if(t[n][r(391)]===e)return!0;return!1}var ConvertManager=(()=>{var s=_0x85bbe9;return _createClass(function t(){_classCallCheck(this,t)},[{key:s(384),value:function(t){var e=s,t=(this.options=Object[e(410)]({},t),this[e(430)]={transforms:{},configs:{},plugins:[],surroundings:{pcSystem:{name:e(434),val:process.platform},nodeVersion:{name:e(403),val:process[e(387)]},version:{name:"ASCF",val:require(e(397)).version}},tableInfo:{"文件总数":0},opening:{},concept:{modelAll:0,completely:0,partial:0,notsupport:0}},this[e(430)][e(406)]);t[e(379)]=this[e(405)][e(400)],t["目标输出路径"]=this[e(405)].outputPath,this[e(380)]=(new Date)[e(395)]()}},{key:s(374),value:function(t,e){var r=s,n={status:1};e&&(n=HAS_APIS.component[e]?Object.assign({name:e},HAS_APIS.component[e]):{name:e,attrs:[r(370)],doc:r(402),status:3}),this[r(382)]("templete",t,n)}},{key:s(418),value:function(t,e){var r=s,e=HAS_APIS[r(432)][e]?Object.assign({name:e},HAS_APIS[r(432)][e]):{name:e,attrs:[r(427)],doc:"https://developer.huawei.com/consumer/cn/doc/atomic-ascf/faqs-others-running-abnormally",status:3};this[r(382)](r(372),t,e)}},{key:s(385),value:function(t){var e=s,r=(e(438),{".css":e(390),".json":e(388)}),n=t[e(386)](t[e(442)](".")),r=null!=(r=r[n])?r:e(426);n!==e(433)&&n!==e(393)&&r!==e(426)||this[e(382)](r,t,{status:1})}},{key:s(382),value:function(t,e,r){var n=s,e=path[n(416)](this.options[n(439)],e);this[n(430)].transforms[e]=this[n(430)][n(375)][e]||{status:r[n(421)],components:[],type:t},r[n(421)]>this[n(430)][n(375)][e][n(421)]&&(this[n(430)][n(375)][e].status=r[n(421)]),null!=r&&r.attrs&&!isExists(this[n(430)][n(375)][e].components,r[n(391)])&&this.pageData[n(375)][e][n(423)][n(429)](r)}},{key:s(381),value:function(){var n=s,o=this,t=((new Date)[n(395)]()-this[n(380)])/1e3+"s",e=this[n(430)].tableInfo,a=(e[n(417)]=t,e[n(377)]=Object[n(428)](this.pageData[n(375)])[n(438)],{1:"completely",2:n(436),3:"notsupport"}),t=(Object[n(425)](this[n(430)][n(375)]).forEach(function(t){var e,r=n;null!=(e=t[r(423)])&&e[r(438)]||(t.status=1),o[r(430)][r(422)][a[t[r(421)]]]+=1}),this[n(430)][n(422)][n(447)]=e[n(377)],n(435)+JSON[n(389)](this[n(430)],null," ")),e=path.resolve(this[n(405)][n(439)],"__ascfConvertReport"),t=(commonUtils[n(437)](path[n(394)](__dirname,n(381)),e),fs.writeFileSync(path[n(394)](e,n(414)),t,"utf8"),path[n(394)](e,"index.html"));logger[n(392)]("report result: "[n(401)](t))}}])})(),convertManager=new ConvertManager;function _0x39e5(){var t=["path","object","modelAll","function","此组件在ASCF框架中不支持,请先参考链接屏蔽,后续手动检查并实现等效功能","defineProperty","jsModular","writable","transformTemplate","transforms","22884AEAbrx","文件总数","./common/commonUtils","源项目路径","beginTime","report","transform","ConvertManager","init","transformOther","substring","version","jsonModular","stringify","wxssModular","name","info",".json","resolve","getTime","280niqlrr","../../package.json","135288aMeuAj","key","inputPath","concat","https://developer.huawei.com/consumer/cn/doc/atomic-ascf/faqs-others-running-abnormally","Node.js版本","34563roCSkc","options","tableInfo","call","268oetGpK","1443576kgSSpF","assign","constructor","351514taXBmw","string","js/data.js","../common/log4js.js","relative","转换耗时","transformJs","prototype","2629850mDpAgk","status","concept","components","151432gQlDCQ","values","otherModular","此API在ASCF框架中不支持,请先参考链接屏蔽,后续手动检查并实现等效功能","keys","push","pageData","Cannot call a class as a function","api",".css","系统环境","let pageData = ","partial","copyDir","length","outputPath","@@toPrimitive must return a primitive value.","symbol","lastIndexOf","iterator","35JqRBkY"];return(_0x39e5=function(){return t})()}module.exports=convertManager;
1
+ function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,e){for(var o=0;o<e.length;o++){var a=e[o];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,_toPropertyKey(a.key),a)}}function _createClass(t,e,o){return e&&_defineProperties(t.prototype,e),o&&_defineProperties(t,o),Object.defineProperty(t,"prototype",{writable:!1}),t}function _toPropertyKey(t){t=_toPrimitive(t,"string");return"symbol"==_typeof(t)?t:t+""}function _toPrimitive(t,e){if("object"!=_typeof(t)||!t)return t;var o=t[Symbol.toPrimitive];if(void 0===o)return("string"===e?String:Number)(t);o=o.call(t,e||"default");if("object"!=_typeof(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}var fs=require("fs"),path=require("path"),commonUtils=require("./common/commonUtils"),HAS_APIS=require("./ascfApisDiff.json"),log4js=require("../common/log4js.js"),logger=log4js.getLogger("ConvertManager");function isExists(t,e){for(var o=0;o<t.length;o++)if(t[o].name===e)return!0;return!1}var ConvertManager=_createClass(function t(){_classCallCheck(this,t)},[{key:"init",value:function(t){this.options=Object.assign({},t),this.pageData={transforms:{},configs:{},plugins:[],surroundings:{pcSystem:{name:"系统环境",val:process.platform},nodeVersion:{name:"Node.js版本",val:process.version},version:{name:"ASCF",val:require("../../package.json").version}},tableInfo:{"文件总数":0},opening:{},concept:{modelAll:0,completely:0,partial:0,notsupport:0}};t=this.pageData.tableInfo;t["源项目路径"]=this.options.inputPath,t["目标输出路径"]=this.options.outputPath,this.beginTime=(new Date).getTime()}},{key:"transformTemplate",value:function(t,e){var o={status:1};e&&(o=HAS_APIS.component[e]?Object.assign({name:e},HAS_APIS.component[e]):{name:e,attrs:["此组件在ASCF框架中不支持,请先参考链接屏蔽,后续手动检查并实现等效功能"],doc:"https://developer.huawei.com/consumer/cn/doc/atomic-ascf/faqs-others-running-abnormally",status:3}),this.transform("templete",t,o)}},{key:"transformJs",value:function(t,e){e=HAS_APIS.api[e]?Object.assign({name:e},HAS_APIS.api[e]):{name:e,attrs:["此API在ASCF框架中不支持,请先参考链接屏蔽,后续手动检查并实现等效功能"],doc:"https://developer.huawei.com/consumer/cn/doc/atomic-ascf/faqs-others-running-abnormally",status:3};this.transform("jsModular",t,e)}},{key:"transformOther",value:function(t){var e=t.substring(t.lastIndexOf(".")),o=null!=(o={".css":"wxssModular",".json":"jsonModular"}[e])?o:"otherModular";".css"!==e&&".json"!==e&&"otherModular"!==o||this.transform(o,t,{status:1})}},{key:"transform",value:function(t,e,o){e=path.relative(this.options.outputPath,e);this.pageData.transforms[e]=this.pageData.transforms[e]||{status:o.status,components:[],type:t},o.status>this.pageData.transforms[e].status&&(this.pageData.transforms[e].status=o.status),null!=o&&o.attrs&&!isExists(this.pageData.transforms[e].components,o.name)&&this.pageData.transforms[e].components.push(o)}},{key:"report",value:function(){var o=this,t=((new Date).getTime()-this.beginTime)/1e3+"s",e=this.pageData.tableInfo,a=(e["转换耗时"]=t,e["文件总数"]=Object.keys(this.pageData.transforms).length,{1:"completely",2:"partial",3:"notsupport"}),t=(Object.values(this.pageData.transforms).forEach(function(t){var e;null!=(e=t.components)&&e.length||(t.status=1),o.pageData.concept[a[t.status]]+=1}),this.pageData.concept.modelAll=e["文件总数"],"let pageData = "+JSON.stringify(this.pageData,null," ")),e=path.resolve(this.options.outputPath,"__ascfConvertReport"),t=(commonUtils.copyDir(path.resolve(__dirname,"report"),e),fs.writeFileSync(path.resolve(e,"js/data.js"),t,"utf8"),path.resolve(e,"index.html"));logger.info("report result: ".concat(t))}}]),convertManager=new ConvertManager;module.exports=convertManager;
@@ -1 +1 @@
1
- var _0x1069b2=_0xfbe0;function _regenerator(){var h,v=_0xfbe0,r=v(449)==typeof Symbol?Symbol:{},e=r[v(501)]||v(453),n=r[v(499)]||v(438);function t(r,e,n,t){var o,a,i,c,f,s,u,m,p,_,l=v,e=e&&e.prototype instanceof x?e:x,e=Object.create(e[l(450)]);return _regeneratorDefine2(e,l(510),(o=r,a=n,m=t||[],p=!1,_={p:u=0,n:0,v:h,a:g,f:g[(s=l)(494)](h,4),d:function(r,e){return i=r,c=0,f=h,_.n=e,b}},function(r,e,n){var t=s;if(1<u)throw TypeError(t(496));for(p&&1===e&&g(e,n),c=e,f=n;(d=c<2?h:f)||!p;){i||(c?c<3?(1<c&&(_.n=-1),g(c,f)):_.n=f:_.v=f);try{if(u=2,i){if(c||(r=t(428)),d=i[r]){if(!(d=d[t(483)](i,f)))throw TypeError(t(418));if(!d.done)return d;f=d[t(464)],c<2&&(c=0)}else 1===c&&(d=i.return)&&d.call(i),c<2&&(f=TypeError("The iterator does not provide a '"+r+t(429)),c=1);i=h}else if((d=(p=_.n<0)?f:o[t(483)](a,_))!==b)break}catch(r){i=h,c=1,f=r}finally{u=1}}return{value:d,done:p}}),!0),e;function g(r,e){var n=s;for(c=r,f=e,d=0;!p&&u&&!t&&d<m[n(471)];d++){var t,o=m[d],a=_.p,i=o[2];3<r?(t=i===e)&&(f=o[(c=o[4])?5:c=3],o[4]=o[5]=h):o[0]<=a&&((t=r<2&&a<o[1])?(c=0,_.v=e,_.n=o[1]):a<i&&(t=r<3||o[0]>e||i<e)&&(o[4]=r,o[5]=e,_.n=i,c=0))}if(t||1<r)return b;throw p=!0,e}}var b={};function x(){}function o(){}function a(){}var d=Object[v(467)],r=[][e]?d(d([][e]())):(_regeneratorDefine2(d={},e,function(){return this}),d),i=a[v(450)]=x[v(450)]=Object[v(487)](r);function c(r){var e=v;return Object[e(439)]?Object[e(439)](r,a):(r[e(444)]=a,_regeneratorDefine2(r,n,"GeneratorFunction")),r.prototype=Object[e(487)](i),r}return o[v(450)]=a,_regeneratorDefine2(i,v(435),a),_regeneratorDefine2(a,"constructor",o),o[v(472)]=v(490),_regeneratorDefine2(a,n,"GeneratorFunction"),_regeneratorDefine2(i),_regeneratorDefine2(i,n,"Generator"),_regeneratorDefine2(i,e,function(){return this}),_regeneratorDefine2(i,v(470),function(){return"[object Generator]"}),(_regenerator=function(){return{w:t,m:c}})()}function _regeneratorDefine2(r,e,n,t){var i=_0xfbe0,c=Object[i(482)];try{c({},"",{})}catch(r){c=0}(_regeneratorDefine2=function(r,e,n,t){var o=i;function a(e,n){_regeneratorDefine2(r,e,function(r){return this[_0xfbe0(510)](e,n,r)})}e?c?c(r,e,{value:n,enumerable:!t,configurable:!t,writable:!t}):r[e]=n:(a(o(428),0),a(o(508),1),a(o(412),2))})(r,e,n,t)}function asyncGeneratorStep(r,e,n,t,o,a,i){var c=_0xfbe0;try{var f=r[a](i),s=f[c(464)]}catch(r){return void n(r)}f[c(484)]?e(s):Promise[c(423)](s)[c(507)](t,o)}function _asyncToGenerator(c){return function(){var r=this,i=arguments;return new Promise(function(e,n){var t=c.apply(r,i);function o(r){asyncGeneratorStep(t,e,n,o,a,_0xfbe0(428),r)}function a(r){asyncGeneratorStep(t,e,n,o,a,_0xfbe0(508),r)}o(void 0)})}}(()=>{for(var r=_0xfbe0,e=_0x4036();;)try{if(555864==-parseInt(r(422))*(parseInt(r(491))/2)+parseInt(r(411))/3+parseInt(r(463))/4*(parseInt(r(458))/5)+-parseInt(r(481))/6*(parseInt(r(509))/7)+-parseInt(r(421))/8+parseInt(r(456))/9+-parseInt(r(468))/10*(parseInt(r(416))/11))break;e.push(e.shift())}catch(r){e.push(e.shift())}})(),Object[_0x1069b2(482)](exports,_0x1069b2(462),{value:!0}),exports[_0x1069b2(436)]=exports.confirmConverterH5Fun=exports[_0x1069b2(486)]=void 0;var commonConfig_1=require(_0x1069b2(512)),path=require(_0x1069b2(459)),fs=require("fs"),commonUtils_1=require(_0x1069b2(432)),_require=require(_0x1069b2(474)),clearResource=_require[_0x1069b2(504)],log4js=require(_0x1069b2(465)),logger=log4js[_0x1069b2(480)](_0x1069b2(424)),_require2=require(_0x1069b2(451)),addTransformUrl=_require2[_0x1069b2(466)],convertManager=require(_0x1069b2(425));function confirmConverterFun(r,e){return _confirmConverterFun[_0x1069b2(426)](this,arguments)}function _confirmConverterFun(){var r=_0x1069b2;return(_confirmConverterFun=_asyncToGenerator(_regenerator().m(function r(n,t){var o,a;return _regenerator().w(function(r){for(var e=_0xfbe0;;)switch(r.p=r.n){case 0:if(r.p=0,o=path.resolve(n[e(431)],"app.json"),a=path[e(423)](n.inputPath,e(500)),fs.existsSync(a)||!fs.existsSync(o)||n.confirmAddConfig){r.n=1;break}return r.a(2,{command:"notifyConfig"});case 1:return r.n=2,doConvert(n,t);case 2:return r.a(2,r.v);case 3:r.n=5;break;case 4:return r.p=4,a=r.v,logger[e(414)](a),r.a(2,{command:e(448),errorMessage:a[e(492)]});case 5:return r.a(2)}},r,null,[[0,4]])})))[r(426)](this,arguments)}function confirmConverterH5Fun(r,e){var n=_0x1069b2,t=path[n(410)](r.outPath,r[n(511)]);try{return commonUtils_1.createDirs(t,n(441),!0),commonUtils_1[n(460)](path[n(410)](__filename,n(419),n(441)),path[n(410)](t,n(441)),!1,!0),commonUtils_1.handleConfigInfo(r,path[n(410)](t,n(441))),{command:n(433)}}catch(r){return logger[n(414)](r),{command:n(448),errorMessage:r[n(492)]}}}function _0xfbe0(r,e){var n=_0x4036();return(_0xfbe0=function(r,e){return n[r-=409]})(r,e)}function checkConvertOutput(r,e){var n=_0x1069b2,r=path.resolve(r),e=path[n(423)](e);if(fs[n(475)](e))throw new Error(n(452)[n(506)](e,n(417)));if(e[n(476)](r+path[n(473)]))throw new Error(n(413))}function doConvert(r,e){return _doConvert[_0x1069b2(426)](this,arguments)}function _doConvert(){var r=_0x1069b2;return(_doConvert=_asyncToGenerator(_regenerator().m(function r(n,e){var t,o,a;return _regenerator().w(function(r){for(var e=_0xfbe0;;)switch(r.p=r.n){case 0:if(t=path[e(423)](n[e(430)],e(455)),process[e(503)][e(504)]===e(485))return r.n=1,clearResource([t]);r.n=1;break;case 1:return checkConvertOutput(n[e(431)],t),o=commonConfig_1[e(457)][e(454)],convertManager[e(505)]({appletType:commonConfig_1.Applets[e(437)],inputPath:n[e(431)],outputPath:t}),r.p=2,commonUtils_1[e(479)](t,o),commonUtils_1.createTransformReportFile(t,n[e(431)]),a=path.join(t,o),"./"===o||""===o?(commonUtils_1.setOriginPtahObject(n[e(431)],a),commonUtils_1[e(460)](n[e(431)],a)):(commonUtils_1[e(498)](path[e(410)](n[e(431)],o),a),commonUtils_1[e(460)](path[e(410)](n[e(431)],o),a),commonUtils_1[e(493)](path[e(410)](n[e(431)]),t)),commonUtils_1[e(497)](),commonUtils_1[e(488)](path[e(410)](t,o),n),commonUtils_1.projectConfigFile(path.join(t)),"my"===commonConfig_1.Applets[e(437)]&&commonUtils_1[e(469)](t,path[e(410)](__filename,e(461))),addTransformUrl(),convertManager.report(),r.a(2,{command:"completeTransform",folderUrl:t});case 3:return r.p=3,a=r.v,logger[e(414)](a),removePromise(t)[e(502)](),r.a(2,{command:e(448),errorMessage:a[e(492)]})}},r,null,[[2,3]])})))[r(426)](this,arguments)}function removePromise(a){return new Promise(function(o,r){var n=_0xfbe0;fs[n(513)](a,function(r,e){var t=n;e[t(409)]()?fs[t(445)](a,function(r,e){var n=t,e=(e=e[n(478)](function(r){return path[n(410)](a,r)})).map(function(r){return removePromise(r)});Promise.all(e)[n(507)](function(){fs[n(495)](a,o)})}):fs[t(427)](a,o)})})}function checkInputPathFun(r){r=path.resolve(r);return{command:"postInputPath",data:{returnCode:checkMiniProgram(r),outPath:path.dirname(r)}}}function checkMiniProgram(r){var e=_0x1069b2,n=!0,t=path.join(r,e(477));return n=fs[e(475)](t)&&identifyProgram(r)?n:!1}function identifyProgram(r){var e=_0x1069b2;try{var n=path[e(410)](r,e(477)),t=JSON[e(415)](fs[e(434)](n)[e(470)]());if(t&&t[e(420)]&&Array[e(447)](t.pages)&&0<t.pages[e(471)])for(var o=getSrcRootPath(r),a=0,i=Object.keys(commonConfig_1[e(443)]);a<i[e(471)];a++){var c=i[a],f=path[e(410)](r,o,t.pages[0]+commonConfig_1.projectFileSuffix[c][e(440)]);if(fs[e(475)](f))return commonConfig_1[e(457)][e(437)]="wx"===c?"tt":c,!0}return!1}catch(r){return!1}}function _0x4036(){var r=["project.config.json","iterator","finally","env","clearResource","init","concat","then","throw","14riSioF","_invoke","packageName","../common/commonConfig","stat","isDirectory","join","1188309cRWcuQ","return","Output directory cannot be a subdirectory of the input directory.","error","parse","451vWZgug"," is exists. Use the -c parameter to clear.","iterator result is not an object","../lib","pages","2614248MfIYsl","40624WgAmUO","resolve","converter","../convertManager.js","apply","unlink","next","' method","outPath","inputPath","../common/commonUtils","completeTransform","readFileSync","constructor","checkInputPathFun","appletType","@@toStringTag","setPrototypeOf","hxml","src","miniprogramRoot","projectFileSuffix","__proto__","readdir","smartProgramRoot","isArray","failedTransform","function","prototype","../features/transformReport","Output path ","@@iterator","srcRootPath","ascf/ascf_src","6058926xAOked","Applets","71135eBslAV","path","copyDir","../../","__esModule","212TxnLXu","value","../../common/log4js.js","addTransformUrl","getPrototypeOf","89870wRtgyx","adaptApiFile","toString","length","displayName","sep","../../common/utils","existsSync","startsWith","app.json","map","createDirs","getLogger","1472964wRRhiO","defineProperty","call","done","yes","confirmConverterFun","create","appJsonFile","configBasenameArray","GeneratorFunction","4mPlnbq","message","copyConfigFiles","bind","rmdir","Generator is already running","transformNodeModuleComponent","setOriginPtahObject","toStringTag"];return(_0x4036=function(){return r})()}function getSrcRootPath(r){var e=_0x1069b2;commonConfig_1[e(457)][e(454)]="./";for(var n=0;n<commonConfig_1[e(489)].length;n++){var t=commonConfig_1[e(489)][n],t=path.join(r,t);fs[e(475)](t)&&((t=JSON[e(415)](fs.readFileSync(t).toString()))[e(442)]?commonConfig_1.Applets[e(454)]=t[e(442)]:t[e(446)]?commonConfig_1[e(457)][e(454)]=t[e(446)]:commonConfig_1[e(457)][e(454)]="./")}return commonConfig_1.Applets[e(454)]}exports[_0x1069b2(486)]=confirmConverterFun,exports.confirmConverterH5Fun=confirmConverterH5Fun,exports[_0x1069b2(436)]=checkInputPathFun;
1
+ function _regenerator(){var h,r="function"==typeof Symbol?Symbol:{},e=r.iterator||"@@iterator",n=r.toStringTag||"@@toStringTag";function t(r,e,n,t){var o,a,i,c,s,u,p,f,m,e=e&&e.prototype instanceof _?e:_,e=Object.create(e.prototype);return _regeneratorDefine2(e,"_invoke",(o=r,a=n,p=t||[],f=!1,m={p:u=0,n:0,v:h,a:l,f:l.bind(h,4),d:function(r,e){return i=r,c=0,s=h,m.n=e,g}},function(r,e,n){if(1<u)throw TypeError("Generator is already running");for(f&&1===e&&l(e,n),c=e,s=n;(v=c<2?h:s)||!f;){i||(c?c<3?(1<c&&(m.n=-1),l(c,s)):m.n=s:m.v=s);try{if(u=2,i){if(v=i[r=c?r:"next"]){if(!(v=v.call(i,s)))throw TypeError("iterator result is not an object");if(!v.done)return v;s=v.value,c<2&&(c=0)}else 1===c&&(v=i.return)&&v.call(i),c<2&&(s=TypeError("The iterator does not provide a '"+r+"' method"),c=1);i=h}else if((v=(f=m.n<0)?s:o.call(a,m))!==g)break}catch(r){i=h,c=1,s=r}finally{u=1}}return{value:v,done:f}}),!0),e;function l(r,e){for(c=r,s=e,v=0;!f&&u&&!n&&v<p.length;v++){var n,t=p[v],o=m.p,a=t[2];3<r?(n=a===e)&&(s=t[(c=t[4])?5:c=3],t[4]=t[5]=h):t[0]<=o&&((n=r<2&&o<t[1])?(c=0,m.v=e,m.n=t[1]):o<a&&(n=r<3||t[0]>e||a<e)&&(t[4]=r,t[5]=e,m.n=a,c=0))}if(n||1<r)return g;throw f=!0,e}}var g={};function _(){}function o(){}function a(){}var v=Object.getPrototypeOf,r=[][e]?v(v([][e]())):(_regeneratorDefine2(v={},e,function(){return this}),v),i=a.prototype=_.prototype=Object.create(r);function c(r){return Object.setPrototypeOf?Object.setPrototypeOf(r,a):(r.__proto__=a,_regeneratorDefine2(r,n,"GeneratorFunction")),r.prototype=Object.create(i),r}return _regeneratorDefine2(i,"constructor",o.prototype=a),_regeneratorDefine2(a,"constructor",o),_regeneratorDefine2(a,n,o.displayName="GeneratorFunction"),_regeneratorDefine2(i),_regeneratorDefine2(i,n,"Generator"),_regeneratorDefine2(i,e,function(){return this}),_regeneratorDefine2(i,"toString",function(){return"[object Generator]"}),(_regenerator=function(){return{w:t,m:c}})()}function _regeneratorDefine2(r,e,n,t){var a=Object.defineProperty;try{a({},"",{})}catch(r){a=0}(_regeneratorDefine2=function(r,e,n,t){function o(e,n){_regeneratorDefine2(r,e,function(r){return this._invoke(e,n,r)})}e?a?a(r,e,{value:n,enumerable:!t,configurable:!t,writable:!t}):r[e]=n:(o("next",0),o("throw",1),o("return",2))})(r,e,n,t)}function asyncGeneratorStep(r,e,n,t,o,a,i){try{var c=r[a](i),s=c.value}catch(r){return void n(r)}c.done?e(s):Promise.resolve(s).then(t,o)}function _asyncToGenerator(c){return function(){var r=this,i=arguments;return new Promise(function(e,n){var t=c.apply(r,i);function o(r){asyncGeneratorStep(t,e,n,o,a,"next",r)}function a(r){asyncGeneratorStep(t,e,n,o,a,"throw",r)}o(void 0)})}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.checkInputPathFun=exports.confirmConverterH5Fun=exports.confirmConverterFun=void 0;var commonConfig_1=require("../common/commonConfig"),path=require("path"),fs=require("fs"),commonUtils_1=require("../common/commonUtils"),_require=require("../../common/utils"),clearResource=_require.clearResource,log4js=require("../../common/log4js.js"),logger=log4js.getLogger("converter"),_require2=require("../features/transformReport"),addTransformUrl=_require2.addTransformUrl,convertManager=require("../convertManager.js");function confirmConverterFun(r,e){return _confirmConverterFun.apply(this,arguments)}function _confirmConverterFun(){return(_confirmConverterFun=_asyncToGenerator(_regenerator().m(function r(e,n){var t,o;return _regenerator().w(function(r){for(;;)switch(r.p=r.n){case 0:if(r.p=0,t=path.resolve(e.inputPath,"app.json"),o=path.resolve(e.inputPath,"project.config.json"),fs.existsSync(o)||!fs.existsSync(t)||e.confirmAddConfig){r.n=1;break}return r.a(2,{command:"notifyConfig"});case 1:return r.n=2,doConvert(e,n);case 2:return r.a(2,r.v);case 3:r.n=5;break;case 4:return r.p=4,o=r.v,logger.error(o),r.a(2,{command:"failedTransform",errorMessage:o.message});case 5:return r.a(2)}},r,null,[[0,4]])}))).apply(this,arguments)}function confirmConverterH5Fun(r,e){var n=path.join(r.outPath,r.packageName);try{return commonUtils_1.createDirs(n,"src",!0),commonUtils_1.copyDir(path.join(__filename,"../lib","src"),path.join(n,"src"),!1,!0),commonUtils_1.handleConfigInfo(r,path.join(n,"src")),{command:"completeTransform"}}catch(r){return logger.error(r),{command:"failedTransform",errorMessage:r.message}}}function checkConvertOutput(r,e){r=path.resolve(r),e=path.resolve(e);if(fs.existsSync(e))throw new Error("Output path ".concat(e," is exists. Use the -c parameter to clear."));if(e.startsWith(r+path.sep))throw new Error("Output directory cannot be a subdirectory of the input directory.")}function doConvert(r,e){return _doConvert.apply(this,arguments)}function _doConvert(){return(_doConvert=_asyncToGenerator(_regenerator().m(function r(e,n){var t,o,a;return _regenerator().w(function(r){for(;;)switch(r.p=r.n){case 0:if(t=path.resolve(e.outPath,"ascf/ascf_src"),"yes"===process.env.clearResource)return r.n=1,clearResource([t]);r.n=1;break;case 1:return checkConvertOutput(e.inputPath,t),o=commonConfig_1.Applets.srcRootPath,convertManager.init({appletType:commonConfig_1.Applets.appletType,inputPath:e.inputPath,outputPath:t}),r.p=2,commonUtils_1.createDirs(t,o),commonUtils_1.createTransformReportFile(t,e.inputPath),a=path.join(t,o),"./"===o||""===o?(commonUtils_1.setOriginPtahObject(e.inputPath,a),commonUtils_1.copyDir(e.inputPath,a)):(commonUtils_1.setOriginPtahObject(path.join(e.inputPath,o),a),commonUtils_1.copyDir(path.join(e.inputPath,o),a),commonUtils_1.copyConfigFiles(path.join(e.inputPath),t)),commonUtils_1.transformNodeModuleComponent(),commonUtils_1.appJsonFile(path.join(t,o),e),commonUtils_1.projectConfigFile(path.join(t)),"my"===commonConfig_1.Applets.appletType&&commonUtils_1.adaptApiFile(t,path.join(__filename,"../../")),addTransformUrl(),convertManager.report(),r.a(2,{command:"completeTransform",folderUrl:t});case 3:return r.p=3,a=r.v,logger.error(a),removePromise(t).finally(),r.a(2,{command:"failedTransform",errorMessage:a.message})}},r,null,[[2,3]])}))).apply(this,arguments)}function removePromise(t){return new Promise(function(n,r){fs.stat(t,function(r,e){e.isDirectory()?fs.readdir(t,function(r,e){e=(e=e.map(function(r){return path.join(t,r)})).map(function(r){return removePromise(r)});Promise.all(e).then(function(){fs.rmdir(t,n)})}):fs.unlink(t,n)})})}function checkInputPathFun(r){r=path.resolve(r);return{command:"postInputPath",data:{returnCode:checkMiniProgram(r),outPath:path.dirname(r)}}}function checkMiniProgram(r){var e=!0,n=path.join(r,"app.json");return e=fs.existsSync(n)&&identifyProgram(r)?e:!1}function identifyProgram(r){try{var e=path.join(r,"app.json"),n=JSON.parse(fs.readFileSync(e).toString());if(n&&n.pages&&Array.isArray(n.pages)&&0<n.pages.length)for(var t=getSrcRootPath(r),o=0,a=Object.keys(commonConfig_1.projectFileSuffix);o<a.length;o++){var i=a[o],c=path.join(r,t,n.pages[0]+commonConfig_1.projectFileSuffix[i].hxml);if(fs.existsSync(c))return commonConfig_1.Applets.appletType="wx"===i?"tt":i,!0}return!1}catch(r){return!1}}function getSrcRootPath(r){commonConfig_1.Applets.srcRootPath="./";for(var e=0;e<commonConfig_1.configBasenameArray.length;e++){var n=commonConfig_1.configBasenameArray[e],n=path.join(r,n);fs.existsSync(n)&&((n=JSON.parse(fs.readFileSync(n).toString())).miniprogramRoot?commonConfig_1.Applets.srcRootPath=n.miniprogramRoot:n.smartProgramRoot?commonConfig_1.Applets.srcRootPath=n.smartProgramRoot:commonConfig_1.Applets.srcRootPath="./")}return commonConfig_1.Applets.srcRootPath}exports.confirmConverterFun=confirmConverterFun,exports.confirmConverterH5Fun=confirmConverterH5Fun,exports.checkInputPathFun=checkInputPathFun;
@@ -1 +1 @@
1
- var _0x264390=_0x4f80;function _0x4f80(e,t){var r=_0x4658();return(_0x4f80=function(e,t){return r[e-=133]})(e,t)}(()=>{for(var e=_0x4f80,t=_0x4658();;)try{if(283325==-parseInt(e(208))*(-parseInt(e(181))/2)+parseInt(e(169))/3+-parseInt(e(196))/4*(-parseInt(e(199))/5)+-parseInt(e(155))/6+parseInt(e(163))/7*(parseInt(e(193))/8)+parseInt(e(175))/9*(-parseInt(e(190))/10)+parseInt(e(159))/11*(-parseInt(e(186))/12))break;t.push(t.shift())}catch(e){t.push(t.shift())}})(),Object[_0x264390(178)](exports,"__esModule",{value:!0}),exports.transformJsPath=exports[_0x264390(164)]=exports[_0x264390(154)]=exports[_0x264390(174)]=exports.handleWxssImport=void 0;var globalDistanceCount,globalJsLine,path=require(_0x264390(195)),fs=require("fs"),_require=require("../common/textDocument"),create=_require[_0x264390(171)],fileHandle_1=require("../features/fileHandle"),commonConfig_1=require(_0x264390(187)),commonUtils_1=require(_0x264390(188)),importVisitor_1=require("../parse/importVisitor"),wxssParser_1=require(_0x264390(179)),commonConfig_2=require(_0x264390(187)),TransformReport=require(_0x264390(148)),parse5=require(_0x264390(201)),_require2=require("../../common/config"),configs=_require2[_0x264390(170)],convertManager=require(_0x264390(173)),insertedApiObj={},insertedApiCountObj={},excessOffsets={},DEST_API_NAME=_0x264390(168),DEST_API_LEN=DEST_API_NAME[_0x264390(144)];function handleWxssImport(e,r,n){var o=_0x264390,s=commonConfig_1[o(166)][n],e=create(e,r),e=(r=e[o(172)](),wxssParser_1[o(157)](r,e,s[o(145)],n)),a=0;return e.forEach(function(e){var t=o;e[t(197)]===t(137)?(";"!==r[e.endOffset+1-a]&&(e.endOffset=e[t(138)]+1),r=commonUtils_1[t(158)](r,e[t(138)]-s[t(145)][t(144)]-a,e.endOffset-a,t(156)),a+=s.css[t(144)]-4):(r=commonUtils_1[t(158)](r,e[t(152)]-a,e[t(152)]+n[t(144)]+1-a,""),a+=n.length+1)}),r}function handleWxmlFile(e,t,r,n){var o=_0x264390,t=create(e,t),t=parse5.parseFragment(t.getText(),{}),e={filePath:e,srcPath:r,appType:n,utils:{commonConfig:commonConfig_1,importVisitor:importVisitor_1,textDocument:{create:create},fileHandle:fileHandle_1}};return parse5[o(191)](t,{convertOptions:e})}function transformWxSchemas(e,t,r){var n=_0x264390,o=e[n(149)].start,t=t[n(180)]({line:o[n(185)]-1,character:o[n(167)]+1});return r=commonUtils_1.replacepos(r,t+globalDistanceCount,t+e[n(184)][n(144)]+globalDistanceCount,n(202)),globalDistanceCount-=e[n(184)].length-4,r}function transformWxmlWxsFilePath(e,t,r){var n=_0x264390,o=e[n(149)][n(139)],t=t[n(180)]({line:o[n(185)]-1,character:o[n(167)]});return r=commonUtils_1[n(158)](r,t+globalDistanceCount,t+globalDistanceCount+e.module[n(144)]-1,4===e.module[n(144)]?n(205):n(146))}function transformWxsFilePath(e,a,i,c,t){var l=_0x264390,m=0,f=commonConfig_1[l(166)][t];return e[l(183)](function(e){var t=l;if(path[t(207)](e[t(184)])===f[t(205)]){var r=e.module,n=e[t(149)][t(139)],n=a[t(180)]({line:n[t(185)]-1,character:n[t(167)]-1})+m,o=e[t(184)][t(198)](0,e[t(184)][t(144)]-(f[t(205)][t(144)]-1))+"hjs";if(r&&!r[t(134)]("./")&&!r[t(134)](t(192))){var s=path[t(161)](c,"..",r);if(!path[t(207)](s))return;fs.existsSync(s)&&(s=".",r[t(134)]("/")?m+=1:(s="./",m+=2),o=s+o)}i=commonUtils_1[t(158)](i,n,n+e[t(184)].length,o)}}),i}function calProcessedApis(e,t){e[t]?e[t]++:e[t]=1}function notDealtWith(e,t){var r=_0x264390;return-1!==commonConfig_2[r(150)][r(135)](e[r(136)])&&!(-1!==Object[r(162)](insertedApiObj).indexOf(t)&&insertedApiObj[t]===e[r(136)])}function insertTodoInline(e,t,r,n){var o=_0x264390,s=1,n="// "[o(160)](commonUtils_1[o(153)](o(142)),o(133)).concat(DEST_API_NAME,".")[o(160)](n[o(136)],o(143)),r=(1===insertedApiCountObj[t]&&(s=0,n+="\n",globalJsLine++),r+globalDistanceCount-excessOffsets[t]-s);return e=commonUtils_1[o(141)](e,r,n),globalDistanceCount+=n[o(144)],e}function transformWxInterface(e,t,r,n){var o=_0x264390,s=e.moduleRange[o(139)],a=t[o(151)]()+"-"+s[o(185)],i=t[o(180)]({line:s[o(185)]-1,character:s[o(167)]}),c=i+globalDistanceCount;return r=commonUtils_1.replacepos(r,c,c+n[o(144)],DEST_API_NAME),globalDistanceCount+=DEST_API_LEN-n[o(144)],calProcessedApis(excessOffsets,a),commonConfig_2[o(204)][e[o(136)]]?(c=i+globalDistanceCount+n[o(144)]+1,r=commonUtils_1.replacepos(r,c,c+e[o(136)][o(144)],commonConfig_2[o(204)][e[o(136)]]),i=e[o(136)].length-commonConfig_2[o(204)][e.property][o(144)],globalDistanceCount-=i,excessOffsets[a]-=i):notDealtWith(e,a)&&(calProcessedApis(insertedApiCountObj,a),n=t[o(180)]({line:s.line-1,character:0}),c=s.line,configs.notaddtodo||(r=insertTodoInline(r,a,n,e)),i=t[o(151)]()+' {"line":'+(c+globalJsLine)+o(182)+s[o(167)]+"}",TransformReport[o(147)](""[o(160)](commonUtils_1[o(153)](o(142)),"api ")[o(160)](DEST_API_NAME,".")[o(160)](e[o(136)]),i),insertedApiObj[a]=e[o(136)]),r}function transformJsFile(r,n,o,s){var a=_0x264390,i=create(r,o),e=(o=i[a(172)](),importVisitor_1[a(206)](o,null,null,s));return globalJsLine=globalDistanceCount=0,e[a(183)](function(e){var t=a;switch(e[t(197)]){case t(176):o=transformJsPath(e,n,o,i);break;case t(194):o=transformWxInterface(e,i,o,s),convertManager.transformJs(r,"".concat(DEST_API_NAME,".")[t(160)](e.property));break;case t(177):o=transformWxmlWxsFilePath(e,i,o);break;case"wxSchema":o=transformWxSchemas(e,i,o);break;case t(200):o=transformComponentMixins(e,i,o)}}),o}function _0x4658(){var e=["12WfARMF","../common/commonConfig","../common/commonUtils","transformJsPath","3209960wLwUvn","serialize","../","929344VYMZjF","wxInterface","path","44nXbKon","type","substring","51445ExRtCx","mixins","../compiler-utils/parse5.bundle","has:",".js","interfacesForTransform","hjs","getImportRules","extname","2369CHjFmz","api ","startsWith","indexOf","property","import","endOffset","start","existsSync","insertStr","notSupport"," TODO","length","css","hxml","writeInfo","./transformReport","moduleRange","invalidApis","uri","startOffset","setLanguage","transformWxsFilePath","2964708PjdQdX",".css","wxssParser","replacepos","2431451WRAGrB","concat","join","keys","7zWjIQL","transformJsFile","handleWxssImport","projectFileSuffix","character","has","1664217ixZQoD","configs","create","getText","../convertManager","handleWxmlFile","9yQtTjA","fileImport","filePath","defineProperty","../parse/wxssParser","offsetAt","452WXTjer",',"column":',"forEach","module","line"];return(_0x4658=function(){return e})()}function transformComponentMixins(e,t,r){var n=_0x264390,o=e.moduleRange[n(139)],t=t.offsetAt({line:o.line-1,character:o.character});return r=commonUtils_1.replacepos(r,t+globalDistanceCount,t+e[n(184)][n(144)]+globalDistanceCount,"behaviors"),globalDistanceCount-=e.module[n(144)]-9,r}function transformJsPath(e,t,r,n){var o=_0x264390,s=e.module;return!s||s.startsWith("./")||s[o(134)]("../")||(t=path[o(161)](t,"..",s),path[o(207)](t)||(t+=o(203)),fs[o(140)](t)&&(t=e[o(149)][o(139)],e=n[o(180)]({line:t[o(185)]-1,character:t[o(167)]-1})+globalDistanceCount,n=".",s[o(134)]("/")?globalDistanceCount+=1:(n="./",globalDistanceCount+=2),r=commonUtils_1[o(141)](r,e,n))),r}exports[_0x264390(165)]=handleWxssImport,exports[_0x264390(174)]=handleWxmlFile,exports[_0x264390(154)]=transformWxsFilePath,exports[_0x264390(164)]=transformJsFile,exports[_0x264390(189)]=transformJsPath;
1
+ Object.defineProperty(exports,"__esModule",{value:!0}),exports.transformJsPath=exports.transformJsFile=exports.transformWxsFilePath=exports.handleWxmlFile=exports.handleWxssImport=void 0;var globalDistanceCount,globalJsLine,path=require("path"),fs=require("fs"),_require=require("../common/textDocument"),create=_require.create,fileHandle_1=require("../features/fileHandle"),commonConfig_1=require("../common/commonConfig"),commonUtils_1=require("../common/commonUtils"),importVisitor_1=require("../parse/importVisitor"),wxssParser_1=require("../parse/wxssParser"),commonConfig_2=require("../common/commonConfig"),TransformReport=require("./transformReport"),parse5=require("../compiler-utils/parse5.bundle"),_require2=require("../../common/config"),configs=_require2.configs,convertManager=require("../convertManager"),insertedApiObj={},insertedApiCountObj={},excessOffsets={},DEST_API_NAME="has",DEST_API_LEN=DEST_API_NAME.length;function handleWxssImport(e,t,r){var n=commonConfig_1.projectFileSuffix[r],e=create(e,t),e=(t=e.getText(),wxssParser_1.wxssParser(t,e,n.css,r)),o=0;return e.forEach(function(e){"import"===e.type?(";"!==t[e.endOffset+1-o]&&(e.endOffset=e.endOffset+1),t=commonUtils_1.replacepos(t,e.endOffset-n.css.length-o,e.endOffset-o,".css"),o+=n.css.length-4):(t=commonUtils_1.replacepos(t,e.startOffset-o,e.startOffset+r.length+1-o,""),o+=r.length+1)}),t}function handleWxmlFile(e,t,r,n){t=create(e,t),t=parse5.parseFragment(t.getText(),{});return parse5.serialize(t,{convertOptions:{filePath:e,srcPath:r,appType:n,utils:{commonConfig:commonConfig_1,importVisitor:importVisitor_1,textDocument:{create:create},fileHandle:fileHandle_1}}})}function transformWxSchemas(e,t,r){var n=e.moduleRange.start,t=t.offsetAt({line:n.line-1,character:n.character+1});return r=commonUtils_1.replacepos(r,t+globalDistanceCount,t+e.module.length+globalDistanceCount,"has:"),globalDistanceCount-=e.module.length-4,r}function transformWxmlWxsFilePath(e,t,r){var n=e.moduleRange.start,t=t.offsetAt({line:n.line-1,character:n.character});return r=commonUtils_1.replacepos(r,t+globalDistanceCount,t+globalDistanceCount+e.module.length-1,4===e.module.length?"hjs":"hxml")}function transformWxsFilePath(e,s,a,i,t){var l=0,c=commonConfig_1.projectFileSuffix[t];return e.forEach(function(e){if(path.extname(e.module)===c.hjs){var t=e.module,r=e.moduleRange.start,r=s.offsetAt({line:r.line-1,character:r.character-1})+l,n=e.module.substring(0,e.module.length-(c.hjs.length-1))+"hjs";if(t&&!t.startsWith("./")&&!t.startsWith("../")){var o=path.join(i,"..",t);if(!path.extname(o))return;fs.existsSync(o)&&(o=".",t.startsWith("/")?l+=1:(o="./",l+=2),n=o+n)}a=commonUtils_1.replacepos(a,r,r+e.module.length,n)}}),a}function calProcessedApis(e,t){e[t]?e[t]++:e[t]=1}function notDealtWith(e,t){return-1!==commonConfig_2.invalidApis.indexOf(e.property)&&!(-1!==Object.keys(insertedApiObj).indexOf(t)&&insertedApiObj[t]===e.property)}function insertTodoInline(e,t,r,n){var o=1,n="// ".concat(commonUtils_1.setLanguage("notSupport"),"api ").concat(DEST_API_NAME,".").concat(n.property," TODO"),r=(1===insertedApiCountObj[t]&&(o=0,n+="\n",globalJsLine++),r+globalDistanceCount-excessOffsets[t]-o);return e=commonUtils_1.insertStr(e,r,n),globalDistanceCount+=n.length,e}function transformWxInterface(e,t,r,n){var o=e.moduleRange.start,s=t.uri()+"-"+o.line,a=t.offsetAt({line:o.line-1,character:o.character}),i=a+globalDistanceCount;return r=commonUtils_1.replacepos(r,i,i+n.length,DEST_API_NAME),globalDistanceCount+=DEST_API_LEN-n.length,calProcessedApis(excessOffsets,s),commonConfig_2.interfacesForTransform[e.property]?(i=a+globalDistanceCount+n.length+1,r=commonUtils_1.replacepos(r,i,i+e.property.length,commonConfig_2.interfacesForTransform[e.property]),a=e.property.length-commonConfig_2.interfacesForTransform[e.property].length,globalDistanceCount-=a,excessOffsets[s]-=a):notDealtWith(e,s)&&(calProcessedApis(insertedApiCountObj,s),n=t.offsetAt({line:o.line-1,character:0}),i=o.line,configs.notaddtodo||(r=insertTodoInline(r,s,n,e)),a=t.uri()+' {"line":'+(i+globalJsLine)+',"column":'+o.character+"}",TransformReport.writeInfo("".concat(commonUtils_1.setLanguage("notSupport"),"api ").concat(DEST_API_NAME,".").concat(e.property),a),insertedApiObj[s]=e.property),r}function transformJsFile(t,r,n,o){var s=create(t,n),e=(n=s.getText(),importVisitor_1.getImportRules(n,null,null,o));return globalJsLine=globalDistanceCount=0,e.forEach(function(e){switch(e.type){case"fileImport":n=transformJsPath(e,r,n,s);break;case"wxInterface":n=transformWxInterface(e,s,n,o),convertManager.transformJs(t,"".concat(DEST_API_NAME,".").concat(e.property));break;case"filePath":n=transformWxmlWxsFilePath(e,s,n);break;case"wxSchema":n=transformWxSchemas(e,s,n);break;case"mixins":n=transformComponentMixins(e,s,n)}}),n}function transformComponentMixins(e,t,r){var n=e.moduleRange.start,t=t.offsetAt({line:n.line-1,character:n.character});return r=commonUtils_1.replacepos(r,t+globalDistanceCount,t+e.module.length+globalDistanceCount,"behaviors"),globalDistanceCount-=e.module.length-9,r}function transformJsPath(e,t,r,n){var o=e.module;return!o||o.startsWith("./")||o.startsWith("../")||(t=path.join(t,"..",o),path.extname(t)||(t+=".js"),fs.existsSync(t)&&(t=e.moduleRange.start,e=n.offsetAt({line:t.line-1,character:t.character-1})+globalDistanceCount,n=".",o.startsWith("/")?globalDistanceCount+=1:(n="./",globalDistanceCount+=2),r=commonUtils_1.insertStr(r,e,n))),r}exports.handleWxssImport=handleWxssImport,exports.handleWxmlFile=handleWxmlFile,exports.transformWxsFilePath=transformWxsFilePath,exports.transformJsFile=transformJsFile,exports.transformJsPath=transformJsPath;
@@ -1 +1 @@
1
- var _0x2ebaef=_0x20e4,commonUtils_1=((()=>{for(var e=_0x20e4,r=_0x7682();;)try{if(936699==-parseInt(e(141))+-parseInt(e(151))/2*(parseInt(e(147))/3)+parseInt(e(146))/4+parseInt(e(155))/5*(parseInt(e(143))/6)+parseInt(e(144))/7*(parseInt(e(160))/8)+parseInt(e(161))/9+parseInt(e(140))/10*(-parseInt(e(135))/11))break;r.push(r.shift())}catch(e){r.push(r.shift())}})(),Object[_0x2ebaef(149)](exports,_0x2ebaef(129),{value:!0}),exports[_0x2ebaef(158)]=exports[_0x2ebaef(145)]=void 0,require("../common/commonUtils")),fs=require("fs"),path=require(_0x2ebaef(153)),unsupportedApis=[];function _0x7682(){var e=["defineProperty","toString","1372874PBKmsl","../../common/url.json","path","readFileSync","5QgKhxy","appendFile","write","insertInfo","getGlobleOutPutPath","217624wAWAWu","12811527yRRrGS","__esModule","length","join","以上接口当前版本暂不支持,请期待后续更新。\n如有需要使用请参考官方文档获取暂不支持的接口处理方式:","resolve","transformLogUrl","6689617BZpJxc","setLanguage","\n\n\n","parse","writeFileSync","30ajCUfK","1263522LPRaos","push","6689700ViBEXz","462pmXueO","writeInfo","4254740QHcBzE","6SEONNh","position"];return(_0x7682=function(){return e})()}function _0x20e4(e,r){var n=_0x7682();return(_0x20e4=function(e,r){return n[e-=129]})(e,r)}function addTransformUrl(){var e=_0x2ebaef,r=path[e(133)](__dirname,e(152)),r=JSON[e(138)](fs[e(154)](r).toString());0<unsupportedApis[e(130)]&&(unsupportedApis[e(142)](e(132)+r[e(134)]),write(unsupportedApis.join("")))}function writeInfo(e,r){var n=_0x2ebaef,e=["Error: ",e,"\n",commonUtils_1[n(136)](n(148)),r,n(137)][n(131)]("");unsupportedApis[n(142)](e)}function insertInfo(e){var r=_0x2ebaef,n=fs.readFileSync(commonUtils_1[r(159)]())[r(150)]();fs[r(139)](commonUtils_1[r(159)](),e),write(n)}function write(e){var r=_0x2ebaef;e&&fs[r(156)](commonUtils_1[r(159)](),e,function(e){if(e)throw e})}exports.addTransformUrl=addTransformUrl,exports[_0x2ebaef(145)]=writeInfo,exports[_0x2ebaef(158)]=insertInfo,exports[_0x2ebaef(157)]=write;
1
+ Object.defineProperty(exports,"__esModule",{value:!0}),exports.insertInfo=exports.writeInfo=void 0;var commonUtils_1=require("../common/commonUtils"),fs=require("fs"),path=require("path"),unsupportedApis=[];function addTransformUrl(){var t=path.resolve(__dirname,"../../common/url.json"),t=JSON.parse(fs.readFileSync(t).toString());0<unsupportedApis.length&&(unsupportedApis.push("以上接口当前版本暂不支持,请期待后续更新。\n如有需要使用请参考官方文档获取暂不支持的接口处理方式:"+t.transformLogUrl),write(unsupportedApis.join("")))}function writeInfo(t,o){t=["Error: ",t,"\n",commonUtils_1.setLanguage("position"),o,"\n\n\n"].join("");unsupportedApis.push(t)}function insertInfo(t){var o=fs.readFileSync(commonUtils_1.getGlobleOutPutPath()).toString();fs.writeFileSync(commonUtils_1.getGlobleOutPutPath(),t),write(o)}function write(t){t&&fs.appendFile(commonUtils_1.getGlobleOutPutPath(),t,function(t){if(t)throw t})}exports.addTransformUrl=addTransformUrl,exports.writeInfo=writeInfo,exports.insertInfo=insertInfo,exports.write=write;
@@ -1 +1 @@
1
- function _0x521a(){var a=["tempFilePath","removeStorageSync","showActionSheet","onlyFromCamera","200444JnPtlj","7424963jQktEn","1059231rDAjEL","prototype","constructor","removeSavedFile","itemList","apFilePath","36yqPZCg","success","eventName","concat","phoneNumber","scanCode","chooseImage","getFileInfo","length","params","value","keys","apFilePaths","level","isArray","downloadFile","object","forEach","string","clearStorageSync","returnVal","110DykwxH","apiName","title","apply","8142080cXBpyf","quality","defineProperty","setStorageSync","code","defaultImgVuality","src","5730568ybRRzm","symbol","callBack","toPrimitive","text","call","setScreenBrightness","data","6RLkVqs","sort","saveImageToPhotosAlbum","saveFile","showLoading","name","510366eSLmht","filePath","compressImage","setClipboardData","644373fcQAmC","brightness"];return(_0x521a=function(){return a})()}function _typeof(a){var t=_0x1175;return(_typeof="function"==typeof Symbol&&t(364)==typeof Symbol.iterator?function(a){return typeof a}:function(a){var e=t;return a&&"function"==typeof Symbol&&a[e(327)]===Symbol&&a!==Symbol[e(326)]?"symbol":typeof a})(a)}function _0x1175(a,e){var t=_0x521a();return(_0x1175=function(a,e){return t[a-=309]})(a,e)}function _defineProperty(a,e,t){var r=_0x1175;return(e=_toPropertyKey(e))in a?Object[r(358)](a,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):a[e]=t,a}function _toPropertyKey(a){var e=_0x1175,a=_toPrimitive(a,"string");return e(364)==_typeof(a)?a:a+""}function _toPrimitive(a,e){var t=_0x1175;if("object"!=_typeof(a)||!a)return a;var r=a[Symbol[t(366)]];if(void 0===r)return(t(349)===e?String:Number)(a);r=r[t(368)](a,e||"default");if(t(347)!=_typeof(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}(()=>{for(var a=_0x1175,e=_0x521a();;)try{if(557369==-parseInt(a(317))+-parseInt(a(313))/2+-parseInt(a(325))/3+-parseInt(a(323))/4*(parseInt(a(352))/5)+parseInt(a(371))/6*(-parseInt(a(324))/7)+parseInt(a(363))/8+-parseInt(a(331))/9*(-parseInt(a(356))/10))break;e.push(e.shift())}catch(a){e.push(e.shift())}})(),(()=>{var a,e,m,n=_0x1175;function i(e,t){e&&Object[n(342)](e).forEach(function(a){t[a]&&(t[e[a]]=t[a],delete t[a])})}has.__apiAdapterConverted||(has.__apiAdapterConverted=!0,a=[{apiName:n(337),callBack:[{eventName:n(332),params:{tempFilePaths:n(343)}}]},{apiName:n(310),params:{apFilePath:n(319)},callBack:[{eventName:n(332),params:{savedFilePath:n(330)}}]},{apiName:n(338),params:{apFilePath:"filePath"}},{apiName:"getSavedFileInfo",params:{apFilePath:n(314)}},{apiName:n(328),params:{apFilePath:n(314)}},{apiName:n(316),params:{text:"data"}},{apiName:"getClipboardData",callBack:[{eventName:n(332),params:{data:n(367)}}]},{apiName:n(309),params:{url:"filePath"}},{apiName:n(311),params:{content:n(354)}},{apiName:n(321),params:{items:n(329)},callBack:[{eventName:n(332),params:{tapIndex:"index"}}]},{apiName:"uploadFile",params:{fileName:n(312)}},{apiName:n(369),params:{brightness:n(341)}},{apiName:"getScreenBrightness",callBack:[{eventName:n(332),params:{value:n(318)}}]},{apiName:n(336),params:{hideAlbum:n(322)},callBack:[{eventName:n(332),params:{result:n(360)}}]},{apiName:"makePhoneCall",params:{number:n(335)}},{apiName:"showToast",params:{content:"title"}},{apiName:n(346),callBack:[{eventName:n(332),params:{tempFilePath:n(330)}}]}],e=[{apiName:"getStorageSync",params:{key:1},returnVal:n(370)},{apiName:n(359),params:{key:1,data:2}},{apiName:n(320),params:{key:1}},{apiName:n(350)}],m={},a[n(334)](e)[n(348)](function(a){a=a[n(353)];m[a]=has[a]}),a[n(348)](function(a){var e=n,t=a[e(353)];has[t]=function(){var r=e,n=0<arguments[r(339)]&&void 0!==arguments[0]?arguments[0]:{};return i(a[r(340)],n),a[r(365)]&&a[r(365)].forEach(function(e){var a=r,t=n[e[a(333)]];n[e[a(333)]]=function(a){i(e.params,a),t(a)}}),m[t](n)}}),e[n(348)](function(i){var o=n,p=i[o(353)];has[p]=function(){var a=o,e=0<arguments[a(339)]&&void 0!==arguments[0]?arguments[0]:{},t=[],r=i[a(340)]&&Object.keys(i[a(340)])||[],n=(r[a(372)](function(a,e){return r[a]-r[e]}),r.forEach(function(a){e[a]&&t.push(e[a])}),m[p][a(355)](m,t));return i[a(351)]?_defineProperty({},i.returnVal,n):{}}}),m[n(315)]=has[n(315)],has[n(315)]=function(){var t=n,a=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=(a[t(362)]=Array[t(345)](a[t(343)])?a[t(343)][0]:"",Number(a[t(344)])),r=(e<=3?a.quality=(100/3*e).toFixed(0):a[t(361)]=80,a[t(357)]=Number(a[t(357)]),a[t(332)]);return a.success=function(a){var e=t;a.apFilePaths=[a[e(319)]],r(a)},m[t(315)](a)})})();
1
+ function _typeof(a){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a})(a)}function _defineProperty(a,e,t){return(e=_toPropertyKey(e))in a?Object.defineProperty(a,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):a[e]=t,a}function _toPropertyKey(a){a=_toPrimitive(a,"string");return"symbol"==_typeof(a)?a:a+""}function _toPrimitive(a,e){if("object"!=_typeof(a)||!a)return a;var t=a[Symbol.toPrimitive];if(void 0===t)return("string"===e?String:Number)(a);t=t.call(a,e||"default");if("object"!=_typeof(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}(()=>{var a,e,n;function r(e,t){e&&Object.keys(e).forEach(function(a){t[a]&&(t[e[a]]=t[a],delete t[a])})}has.__apiAdapterConverted||(has.__apiAdapterConverted=!0,n={},(a=[{apiName:"chooseImage",callBack:[{eventName:"success",params:{tempFilePaths:"apFilePaths"}}]},{apiName:"saveFile",params:{apFilePath:"tempFilePath"},callBack:[{eventName:"success",params:{savedFilePath:"apFilePath"}}]},{apiName:"getFileInfo",params:{apFilePath:"filePath"}},{apiName:"getSavedFileInfo",params:{apFilePath:"filePath"}},{apiName:"removeSavedFile",params:{apFilePath:"filePath"}},{apiName:"setClipboardData",params:{text:"data"}},{apiName:"getClipboardData",callBack:[{eventName:"success",params:{data:"text"}}]},{apiName:"saveImageToPhotosAlbum",params:{url:"filePath"}},{apiName:"showLoading",params:{content:"title"}},{apiName:"showActionSheet",params:{items:"itemList"},callBack:[{eventName:"success",params:{tapIndex:"index"}}]},{apiName:"uploadFile",params:{fileName:"name"}},{apiName:"setScreenBrightness",params:{brightness:"value"}},{apiName:"getScreenBrightness",callBack:[{eventName:"success",params:{value:"brightness"}}]},{apiName:"scanCode",params:{hideAlbum:"onlyFromCamera"},callBack:[{eventName:"success",params:{result:"code"}}]},{apiName:"makePhoneCall",params:{number:"phoneNumber"}},{apiName:"showToast",params:{content:"title"}},{apiName:"downloadFile",callBack:[{eventName:"success",params:{tempFilePath:"apFilePath"}}]}]).concat(e=[{apiName:"getStorageSync",params:{key:1},returnVal:"data"},{apiName:"setStorageSync",params:{key:1,data:2}},{apiName:"removeStorageSync",params:{key:1}},{apiName:"clearStorageSync"}]).forEach(function(a){a=a.apiName;n[a]=has[a]}),a.forEach(function(e){var t=e.apiName;has[t]=function(){var a=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return r(e.params,a),e.callBack&&e.callBack.forEach(function(e){var t=a[e.eventName];a[e.eventName]=function(a){r(e.params,a),t(a)}}),n[t](a)}}),e.forEach(function(i){var o=i.apiName;has[o]=function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},t=[],r=i.params&&Object.keys(i.params)||[],a=(r.sort(function(a,e){return r[a]-r[e]}),r.forEach(function(a){e[a]&&t.push(e[a])}),n[o].apply(n,t));return i.returnVal?_defineProperty({},i.returnVal,a):{}}}),n.compressImage=has.compressImage,has.compressImage=function(){var a=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=(a.src=Array.isArray(a.apFilePaths)?a.apFilePaths[0]:"",Number(a.level)),t=(e<=3?a.quality=(100/3*e).toFixed(0):a.defaultImgVuality=80,a.quality=Number(a.quality),a.success);return a.success=function(a){a.apFilePaths=[a.tempFilePath],t(a)},n.compressImage(a)})})();
@@ -1 +1 @@
1
- var _0x3b6241=_0x5f0b;function _0x3e04(){var r=["236fsEUXS","defineProperty","18470zVysYO","14429304xZSTED","319DNHgqG","35634252BXTnuX","classProperties","parse","30698FXLtlc","1378223rBpErU","babelTransform","8097324drIPbp","99CCWIma","unambiguous","substring","7yMwPvo","8zdWYhz","1070ObKqbD","length"];return(_0x3e04=function(){return r})()}function _0x5f0b(r,e){var n=_0x3e04();return(_0x5f0b=function(r,e){return n[r-=319]})(r,e)}(()=>{for(var r=_0x5f0b,e=_0x3e04();;)try{if(895932==+parseInt(r(325))+parseInt(r(324))/2*(-parseInt(r(328))/3)+parseInt(r(335))/4*(-parseInt(r(333))/5)+-parseInt(r(327))/6*(-parseInt(r(331))/7)+parseInt(r(332))/8*(parseInt(r(319))/9)+parseInt(r(337))/10*(parseInt(r(320))/11)+-parseInt(r(321))/12)break;e.push(e.shift())}catch(r){e.push(e.shift())}})(),Object[_0x3b6241(336)](exports,"__esModule",{value:!0}),exports[_0x3b6241(326)]=void 0;var babelParser=require("@babel/parser"),parseTryCount=0;function babelTransform(e,n){var s=_0x3b6241;try{var a=babelParser[s(323)](e,{sourceType:s(329),allowReturnOutsideFunction:!0,plugins:[s(322)]});return parseTryCount=0,a}catch(r){if(n){if(0===parseTryCount)return a=e.substring(0,n-1)+e.substring(n,e[s(334)]),parseTryCount++,babelTransform(a,n);if(parseTryCount<3)return a=e[s(330)](0,n)+","+e.substring(n,e[s(334)]),parseTryCount++,babelTransform(a,n);parseTryCount=0}return null}}exports.babelTransform=babelTransform;
1
+ Object.defineProperty(exports,"__esModule",{value:!0}),exports.babelTransform=void 0;var babelParser=require("@babel/parser"),parseTryCount=0;function babelTransform(e,s){try{var a=babelParser.parse(e,{sourceType:"unambiguous",allowReturnOutsideFunction:!0,plugins:["classProperties"]});return parseTryCount=0,a}catch(r){if(s){if(0===parseTryCount)return a=e.substring(0,s-1)+e.substring(s,e.length),parseTryCount++,babelTransform(a,s);if(parseTryCount<3)return a=e.substring(0,s)+","+e.substring(s,e.length),parseTryCount++,babelTransform(a,s);parseTryCount=0}return null}}exports.babelTransform=babelTransform;
@@ -1 +1 @@
1
- var _0xda7367=_0x1a15;function _0x57fc(){var e=["wxInterface","findParent","5741235KumTPz","55374QmJtOd","getOwnBinding","ImportDeclaration","property","fileImport","test","isObjectExpression","key","loc","mixins","3771600VFOLLs","types","length","./babelParser","node","hxml","projectFileSuffix","162yGPnnW","arguments","name","wxSchema","CallExpression","isIdentifier","push","path","splice","end","default","Identifier","scope","getImportRules","://","StringLiteral","1297261UIFBDN","7839875tTpxch","concat","getStatementParent","isObjectProperty","properties","column","value","defineProperty","../common/commonConfig","100lHpguO","object","1316783ZwgAfJ","start","filePath","6handnN","16gCPArR","Component","callee","source","64536fqWsCp","require","extname","babelTransform","line"];return(_0x57fc=function(){return e})()}(()=>{for(var e=_0x1a15,r=_0x57fc();;)try{if(944339==+parseInt(e(326))+-parseInt(e(273))/2*(parseInt(e(298))/3)+parseInt(e(291))/4+parseInt(e(315))/5+parseInt(e(268))/6*(parseInt(e(314))/7)+parseInt(e(269))/8*(-parseInt(e(280))/9)+parseInt(e(324))/10*(-parseInt(e(281))/11))break;r.push(r.shift())}catch(e){r.push(r.shift())}})(),Object[_0xda7367(322)](exports,"__esModule",{value:!0}),exports.getImportRules=void 0;var babelParser_1=require(_0xda7367(294)),babel_traverse_1=require("@babel/traverse"),pathTool=require(_0xda7367(305)),commonConfig_1=require(_0xda7367(323)),babelTypes=require("@babel/core")[_0xda7367(292)];function _0x1a15(e,r){var t=_0x57fc();return(_0x1a15=function(e,r){return t[e-=266]})(e,r)}function getQaSchemasReg(e){var r=_0xda7367;return new RegExp("^"[r(316)](e,r(312)))}var currentType,suffixs,importRules=[],visitor={ImportDeclaration:function(e){var r=_0xda7367;importRules[r(304)]({type:r(285),module:e[r(295)][r(272)][r(321)],moduleRange:{start:{line:e[r(295)][r(272)][r(289)][r(266)].line,character:e[r(295)][r(272)][r(289)][r(266)][r(320)]+2},end:{line:e[r(295)][r(272)][r(289)].end.line,character:e[r(295)].source.loc[r(307)][r(320)]+2}}})},CallExpression:function(e){var t=_0xda7367;e[t(295)][t(271)]&&e[t(295)][t(299)]&&e[t(295)].callee.name===t(274)&&1===e.node[t(299)].length&&importRules[t(304)]({type:"fileImport",module:e[t(295)][t(299)][0].value,moduleRange:{start:{line:e[t(295)][t(299)][0].loc[t(266)][t(277)],character:e.node[t(299)][0][t(289)].start[t(320)]+2},end:{line:e[t(295)].arguments[0].loc[t(307)][t(277)],character:e[t(295)].arguments[0][t(289)][t(307)][t(320)]+2}}}),e[t(295)].callee&&e[t(295)].arguments&&e[t(295)][t(271)][t(300)]===t(270)&&1===e[t(295)].arguments[t(293)]&&babelTypes[t(287)](e[t(295)][t(299)][0])&&e[t(295)].arguments[0].properties&&0<e[t(295)].arguments[0][t(319)][t(293)]&&e[t(295)][t(299)][0][t(319)].forEach(function(e){var r=t;babelTypes[r(318)](e)&&babelTypes[r(303)](e.key)&&e[r(288)].name===r(290)&&importRules[r(304)]({type:r(290),module:e[r(288)][r(300)],moduleRange:{start:{line:e[r(289)].start[r(277)],character:e[r(289)][r(266)].column},end:{line:e[r(288)].loc[r(307)].line,character:e[r(288)].loc[r(307)][r(320)]}}})})},MemberExpression:function(e){var r=_0xda7367;e[r(295)][r(325)]&&e[r(295)].property&&e[r(295)][r(325)][r(300)]===currentType&&!hasParent(e,e.node[r(325)][r(300)])&&importRules[r(304)]({type:r(278),module:e[r(295)].object[r(300)],moduleRange:{start:{line:e.node[r(325)][r(289)][r(266)].line,character:e.node[r(325)][r(289)][r(266)][r(320)]},end:{line:e[r(295)].object[r(289)][r(307)][r(277)],character:e.node[r(325)][r(289)][r(307)][r(320)]}},property:e[r(295)][r(284)][r(300)]})},Identifier:function(e){var r=_0xda7367;e[r(295)][r(300)]!==currentType||0!==e[r(288)]||hasParent(e,e[r(295)][r(300)])||importRules[r(304)]({type:"wxInterface",module:e[r(295)][r(300)],moduleRange:{start:{line:e[r(295)].loc[r(266)][r(277)],character:e[r(295)][r(289)][r(266)].column},end:{line:e[r(295)][r(289)][r(307)].line,character:e[r(295)][r(289)].end[r(320)]}},property:null})},StringLiteral:function(e){var r,t=_0xda7367;!e[t(295)][t(321)]||pathTool[t(275)](e[t(295)].value)!==suffixs[t(296)]&&pathTool[t(275)](e[t(295)][t(321)])!==suffixs.hjs||(r=pathTool[t(275)](e[t(295)][t(321)]),importRules[t(304)]({type:t(267),module:r,moduleRange:{start:{line:e[t(295)][t(289)][t(307)][t(277)],character:e[t(295)].loc.end[t(320)]-r[t(293)]},end:{line:e[t(295)][t(289)][t(307)][t(277)],character:e[t(295)].loc[t(307)][t(320)]}}})),e[t(295)][t(321)]&&getQaSchemasReg(currentType)[t(286)](e[t(295)][t(321)])&&importRules[t(304)]({type:t(301),module:"".concat(currentType,":"),moduleRange:{start:{line:e[t(295)][t(289)].start[t(277)],character:e[t(295)][t(289)][t(266)][t(320)]},end:{line:e[t(295)][t(289)][t(266)][t(277)],character:e.node[t(289)].start.column+5}}})}};function hasParent(e,t){var a=_0xda7367,n=!1;return e[a(317)]()[a(279)](function(e){var r=a;n||e[r(310)][r(282)](t)&&(n=!0)}),n}function clear(){importRules[_0xda7367(306)](0,importRules.length)}function getImportRules(e,r){var t=_0xda7367,a=2<arguments[t(293)]&&void 0!==arguments[2]&&arguments[2],n=3<arguments[t(293)]?arguments[3]:void 0,a=(currentType=n,suffixs=commonConfig_1[t(297)][n],n=a?{CallExpression:visitor.CallExpression,ImportDeclaration:visitor[t(283)]}:{MemberExpression:visitor.MemberExpression,StringLiteral:visitor[t(313)],Identifier:visitor[t(309)],CallExpression:visitor[t(302)]},babelParser_1[t(276)](e,r));return clear(),babel_traverse_1[t(308)](a,n),importRules}exports[_0xda7367(311)]=getImportRules;
1
+ Object.defineProperty(exports,"__esModule",{value:!0}),exports.getImportRules=void 0;var babelParser_1=require("./babelParser"),babel_traverse_1=require("@babel/traverse"),pathTool=require("path"),commonConfig_1=require("../common/commonConfig"),babelTypes=require("@babel/core").types;function getQaSchemasReg(e){return new RegExp("^".concat(e,"://"))}var currentType,suffixs,importRules=[],visitor={ImportDeclaration:function(e){importRules.push({type:"fileImport",module:e.node.source.value,moduleRange:{start:{line:e.node.source.loc.start.line,character:e.node.source.loc.start.column+2},end:{line:e.node.source.loc.end.line,character:e.node.source.loc.end.column+2}}})},CallExpression:function(e){e.node.callee&&e.node.arguments&&"require"===e.node.callee.name&&1===e.node.arguments.length&&importRules.push({type:"fileImport",module:e.node.arguments[0].value,moduleRange:{start:{line:e.node.arguments[0].loc.start.line,character:e.node.arguments[0].loc.start.column+2},end:{line:e.node.arguments[0].loc.end.line,character:e.node.arguments[0].loc.end.column+2}}}),e.node.callee&&e.node.arguments&&"Component"===e.node.callee.name&&1===e.node.arguments.length&&babelTypes.isObjectExpression(e.node.arguments[0])&&e.node.arguments[0].properties&&0<e.node.arguments[0].properties.length&&e.node.arguments[0].properties.forEach(function(e){babelTypes.isObjectProperty(e)&&babelTypes.isIdentifier(e.key)&&"mixins"===e.key.name&&importRules.push({type:"mixins",module:e.key.name,moduleRange:{start:{line:e.loc.start.line,character:e.loc.start.column},end:{line:e.key.loc.end.line,character:e.key.loc.end.column}}})})},MemberExpression:function(e){e.node.object&&e.node.property&&e.node.object.name===currentType&&!hasParent(e,e.node.object.name)&&importRules.push({type:"wxInterface",module:e.node.object.name,moduleRange:{start:{line:e.node.object.loc.start.line,character:e.node.object.loc.start.column},end:{line:e.node.object.loc.end.line,character:e.node.object.loc.end.column}},property:e.node.property.name})},Identifier:function(e){e.node.name!==currentType||0!==e.key||hasParent(e,e.node.name)||importRules.push({type:"wxInterface",module:e.node.name,moduleRange:{start:{line:e.node.loc.start.line,character:e.node.loc.start.column},end:{line:e.node.loc.end.line,character:e.node.loc.end.column}},property:null})},StringLiteral:function(e){var n;!e.node.value||pathTool.extname(e.node.value)!==suffixs.hxml&&pathTool.extname(e.node.value)!==suffixs.hjs||(n=pathTool.extname(e.node.value),importRules.push({type:"filePath",module:n,moduleRange:{start:{line:e.node.loc.end.line,character:e.node.loc.end.column-n.length},end:{line:e.node.loc.end.line,character:e.node.loc.end.column}}})),e.node.value&&getQaSchemasReg(currentType).test(e.node.value)&&importRules.push({type:"wxSchema",module:"".concat(currentType,":"),moduleRange:{start:{line:e.node.loc.start.line,character:e.node.loc.start.column},end:{line:e.node.loc.start.line,character:e.node.loc.start.column+5}}})}};function hasParent(e,n){var o=!1;return e.getStatementParent().findParent(function(e){o||e.scope.getOwnBinding(n)&&(o=!0)}),o}function clear(){importRules.splice(0,importRules.length)}function getImportRules(e,n){var o=2<arguments.length&&void 0!==arguments[2]&&arguments[2],t=3<arguments.length?arguments[3]:void 0,o=(currentType=t,suffixs=commonConfig_1.projectFileSuffix[t],t=o?{CallExpression:visitor.CallExpression,ImportDeclaration:visitor.ImportDeclaration}:{MemberExpression:visitor.MemberExpression,StringLiteral:visitor.StringLiteral,Identifier:visitor.Identifier,CallExpression:visitor.CallExpression},babelParser_1.babelTransform(e,n));return clear(),babel_traverse_1.default(o,t),importRules}exports.getImportRules=getImportRules;
@@ -1 +1 @@
1
- var _0x16692c=_0x3a79,postcss=((()=>{for(var e=_0x3a79,t=_0x5a50();;)try{if(248291==-parseInt(e(507))+parseInt(e(476))/2*(parseInt(e(498))/3)+parseInt(e(517))/4+parseInt(e(514))/5*(-parseInt(e(490))/6)+parseInt(e(495))/7*(parseInt(e(520))/8)+parseInt(e(513))/9+parseInt(e(511))/10*(-parseInt(e(480))/11))break;t.push(t.shift())}catch(e){t.push(t.shift())}})(),Object[_0x16692c(519)](exports,_0x16692c(485),{value:!0}),exports[_0x16692c(486)]=exports.importFileReg=exports[_0x16692c(473)]=void 0,require(_0x16692c(499))),path=require("path");function wxssParser(t,r,i,c){var p=_0x16692c,n=[];try{n=postcss[p(483)](t)[p(478)][p(491)](function(e){var t=p;return e[t(509)]===t(502)&&e[t(497)]===t(487)})[p(471)](function(e){var t=p;return{type:t(487),import:e.params,position:{start:e.source.start,end:e.source[t(521)]}}})}catch(e){for(var s=t[p(516)](exports[p(473)]),o=0,a=0;s=exports[p(473)].exec(t);){var u,a=t[p(522)](s[0],a),x=checkIsInComment(s[0],t,o,s.index);x[p(474)]?(o=s[p(506)]+x[p(496)],a+=x.restLength):(o=s[p(506)]+s[0][p(518)],(x=s[0][p(516)](exports.importFileReg))&&(u=r.positionAt(a+x[p(506)]),n[p(488)]({type:p(487),uri:r[p(492)],position:{start:{line:u[p(479)]+1,column:u[p(484)]},end:{line:u[p(479)]+1,column:u[p(484)]+x[0][p(518)]+2}},value:x?x[1]:"",import:x[0]})),a+=s[0][p(518)])}}var l=[];return n[p(477)](function(n){var s,e,o,a=p;n[a(509)]===a(487)?(e={line:n.position[a(521)][a(479)]-1,character:n.position[a(521)].column-2},s=r[a(523)](e),e=n[a(487)][a(512)](/[\r\n]/gi," ").split(" "),o=0,e[a(477)](function(e){var t,r=a,e=e[r(493)](1,e[r(518)]-1);path.extname(e)===i&&(t=n[r(487)][r(522)](e,o),o=t,l[r(488)]({type:r(487),import:e,endOffset:s-(n[r(487)][r(518)]-t-e[r(518)])+1}))})):"swan"===c&&getSelectorRule(n,r,c,l)}),l}function handleSelectors(e,n,s,o,a){var t=_0x16692c;e[t(477)](function(e){var r=t;e[r(489)](/\s+/)[r(477)](function(e){var t=r;n=s.indexOf(e,n),o[t(510)](e)&&a[t(488)]({type:t(503),selector:e,startOffset:n}),n+=e.length})})}function getSelectorRule(e,t,r,n){var s,o,a,i,c=_0x16692c;e.type===c(475)?(s=t.getText(),o=new RegExp("^"[c(481)](r,"-")),a=e[c(515)],i={line:e[c(470)][c(500)][c(479)]-1,character:e[c(470)][c(500)][c(505)]-1},i=t.offsetAt(i),a&&handleSelectors(a,i,s,o,n)):e[c(509)]===c(508)&&e[c(494)].forEach(function(e){getSelectorRule(e,t,r,n)})}function checkIsInComment(e,t,r,n){for(var s,o=_0x16692c,a=new RegExp(o(501)[o(481)](e,"[\\s\\S]*?\\*\\/\\s*(?:\\r|\\n|$)|((?:^|\\n|\\r)\\s*\\/\\/.*")[o(481)](e,o(472)),"g");s=a[o(482)](t[o(493)](r));){if(s[o(506)]+r<n&&s[o(506)]+r+s[0].length>n)return{isInComment:!0,restLength:s[o(506)]+r+s[0].length-n};if(s.index+r>n)break}return{isInComment:!1,restLength:0}}function _0x3a79(e,t){var r=_0x5a50();return(_0x3a79=function(e,t){return r[e-=470]})(e,t)}function _0x5a50(){var e=["815200wAPbWt","end","indexOf","offsetAt","position","map",".*(?:\\r|\\n|$)))","importReg","isInComment","rule","802LPyisE","forEach","nodes","line","583yIvLec","concat","exec","parse","character","__esModule","wxssParser","import","push","split","327450rqGHfP","filter","uri","substring","rules","28QoJavr","restLength","name","2613ARZHZO","postcss","start","((?:^|\\n|\\r)\\s*\\/\\*[\\s\\S]*?","atrule","selector","importFileReg","column","index","166036VajGCR","media","type","test","99140OBOaaB","replace","3484953paOvih","35rITWeY","selectors","match","710824zYwvdJ","length","defineProperty"];return(_0x5a50=function(){return e})()}exports[_0x16692c(473)]=/\@import\s+[\'\"].*[\'\"](\s+.*(\s*[and|not|only|or|\,]\s*\(.*\))*)?\s*\;?/g,exports[_0x16692c(504)]=/['"]\s*([^()]+?)\s*['"]/,exports.wxssParser=wxssParser;
1
+ Object.defineProperty(exports,"__esModule",{value:!0}),exports.wxssParser=exports.importFileReg=exports.importReg=void 0;var postcss=require("postcss"),path=require("path");function wxssParser(t,s,i,p){var r=[];try{r=postcss.parse(t).nodes.filter(function(e){return"atrule"===e.type&&"import"===e.name}).map(function(e){return{type:"import",import:e.params,position:{start:e.source.start,end:e.source.end}}})}catch(e){for(var n=t.match(exports.importReg),o=0,c=0;n=exports.importReg.exec(t);){var a,c=t.indexOf(n[0],c),l=checkIsInComment(n[0],t,o,n.index);l.isInComment?(o=n.index+l.restLength,c+=l.restLength):(o=n.index+n[0].length,(l=n[0].match(exports.importFileReg))&&(a=s.positionAt(c+l.index),r.push({type:"import",uri:s.uri,position:{start:{line:a.line+1,column:a.character},end:{line:a.line+1,column:a.character+l[0].length+2}},value:l?l[1]:"",import:l[0]})),c+=n[0].length)}}var m=[];return r.forEach(function(r){var n,e,o;"import"===r.type?(e={line:r.position.end.line-1,character:r.position.end.column-2},n=s.offsetAt(e),e=r.import.replace(/[\r\n]/gi," ").split(" "),o=0,e.forEach(function(e){var t,e=e.substring(1,e.length-1);path.extname(e)===i&&(t=r.import.indexOf(e,o),o=t,m.push({type:"import",import:e,endOffset:n-(r.import.length-t-e.length)+1}))})):"swan"===p&&getSelectorRule(r,s,p,m)}),m}function handleSelectors(e,t,r,n,o){e.forEach(function(e){e.split(/\s+/).forEach(function(e){t=r.indexOf(e,t),n.test(e)&&o.push({type:"selector",selector:e,startOffset:t}),t+=e.length})})}function getSelectorRule(e,t,r,n){var o,s,i,p;"rule"===e.type?(o=t.getText(),s=new RegExp("^".concat(r,"-")),i=e.selectors,p={line:e.position.start.line-1,character:e.position.start.column-1},p=t.offsetAt(p),i&&handleSelectors(i,p,o,s,n)):"media"===e.type&&e.rules.forEach(function(e){getSelectorRule(e,t,r,n)})}function checkIsInComment(e,t,r,n){for(var o,s=new RegExp("((?:^|\\n|\\r)\\s*\\/\\*[\\s\\S]*?".concat(e,"[\\s\\S]*?\\*\\/\\s*(?:\\r|\\n|$)|((?:^|\\n|\\r)\\s*\\/\\/.*").concat(e,".*(?:\\r|\\n|$)))"),"g");o=s.exec(t.substring(r));){if(o.index+r<n&&o.index+r+o[0].length>n)return{isInComment:!0,restLength:o.index+r+o[0].length-n};if(n<o.index+r)break}return{isInComment:!1,restLength:0}}exports.importReg=/\@import\s+[\'\"].*[\'\"](\s+.*(\s*[and|not|only|or|\,]\s*\(.*\))*)?\s*\;?/g,exports.importFileReg=/['"]\s*([^()]+?)\s*['"]/,exports.wxssParser=wxssParser;
@@ -1 +1 @@
1
- var _0x4b264e=_0xa89b;function _typeof(t){var r=_0xa89b;return(_typeof=r(330)==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){var e=r;return t&&e(330)==typeof Symbol&&t[e(354)]===Symbol&&t!==Symbol[e(190)]?e(274):typeof t})(t)}function _slicedToArray(t,e){return _arrayWithHoles(t)||_iterableToArrayLimit(t,e)||_unsupportedIterableToArray(t,e)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError(_0xa89b(288))}function _0xa89b(t,e){var r=_0x3f85();return(_0xa89b=function(t,e){return r[t-=164]})(t,e)}function _0x3f85(){var t=["keys","concat","Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.","components","open","path","wxssModular",'<span class="status-icon warning-icon">⚠</span>',"err",'\n </td>\n <td class="file-path">\n ',"模板文件","data-type","iterator","table-head","opening","querySelectorAll","statusClass","symbol","addEventListener","length","table","forEach",'</div>\n <div class="topname">无法转换</div>\n </div>',"doc","onload","string","values","tab-item actived","\n <thead>\n <tr>\n ","modelAll","属性名称","Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.","getTransformData","surroundings","6ZzztJD","api/生命周期",".table-info","toPrimitive","不支持子属性",".ul","assign","createElement","table-info","tab-item","</th>","自定义脚本","li:first-child",'<th class="',"</td>\n <td>","endsWith","tbody","不支持","unsupported","#project tbody",'<tr class="pages">\n <th>文件路径</th>\n <th>转换结果</th>\n </tr>',"getOwnPropertyDescriptors",".card-box",".tab-box","val","map","display","opations","warn",".file-path",".mask .title",'</div>\n <div class="topname">文件总数</div>\n </div>\n <div class="itembox itembox_completely">\n <div class="botval">',"hide","2633340cFGGjy","不支持文件","不支持的部分(参数/返回值)","supportType","textContent","其他文件","function","CORRECT",".rep-allbox","isArray","transforms","attrs","num ",'">\n 查看相关能力\n </div>\n </td>\n <td class="apges">',"mask","next","closest",'\n <tr>\n <td class="name">',"type","appendChild","44JZtZfa","435337UwRSNZ","maskTitle","querySelector","projectTable",'\n <thead class="table-head">\n <tr>\n <th>能力名称</th>\n <th>页面路径</th>\n <th>如何解决</th>\n <th>转换结果</th>\n </tr>\n </thead>\n <tbody>',"classList","status","value","join","constructor",'<div class="opation-item">',"done","icon-warning","setAttribute","组件名","json文件","push","filter","location",".result",'\n <tr>\n <td class="text-left">',"remove","style",".mask .close","4228777QdGZwY","getAttribute","className","8469490ZbzqHE","Object","2cepisr","table-info openability actived","click","from","defineProperty","@@iterator","11GKKRem",'</div>\n <div class="topname">部分转换</div>\n </div>\n <div class="itembox itembox_failed">\n <div class="botval">',"</td>\n </tr>\n ",'">帮助文档</td>',"concept",'</td>\n <td>\n <div class="show-instruct" data-path="',"pathArr","prototype",'</div>\n <div class="topname">完全转换</div>\n </div>\n <div class="itembox itembox_portion">\n <div class="botval">',"slice","tableInfo","add","return","icon-zhengque","dataset","tableBox","undefined","innerHTML",".mask .table-box","Map",'<tr><td colspan="3">完整支持</td></tr>',"getOwnPropertySymbols",'</td>\n <td class="text-right">',".mask .table-box table",'<span class="status-icon danger-icon">✕</span>',"WARNING","entries",'<div class="itembox itembox_completely">\n <div class="botval">',"supportPart","object","脚本文件",'<tr>\n <td class="apges">\n ',"Arguments","target",".mask",".show-instruct","reduce","test","actived","partial","toString","开放能力","none","tabBox","span",'<td class="unsupported">暂不支持,请尝试其他实现方式</td>',"dataSources","title","getOwnPropertyDescriptor","defineProperties","completely","8mHquOB","#col1","ulBox","如何解决","支持程度","ERROR","</td>\n ","jsonModular","pagePaths","1793499vIISSA","innerText","apply","result","2227761wmYSHY","cardBox","Set","default","样式文件","386335MJFgNs","div","app.json","openability","call"];return(_0x3f85=function(){return t})()}function _iterableToArrayLimit(t,e){var r=_0xa89b,n=null==t?null:r(199)!=typeof Symbol&&t[Symbol[r(269)]]||t[r(182)];if(null!=n){var a,o,i,s,c=[],l=!0,u=!1;try{if(i=(n=n[r(256)](t))[r(339)],0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(a=i.call(n))[r(356)])&&(c[r(164)](a[r(352)]),c[r(276)]!==e);l=!0);}catch(t){u=!0,o=t}finally{try{if(!l&&null!=n.return&&(s=n[r(195)](),Object(s)!==s))return}finally{if(u)throw o}}return c}}function _arrayWithHoles(t){if(Array.isArray(t))return t}function ownKeys(e,t){var r,n=_0xa89b,a=Object.keys(e);return Object[n(204)]&&(r=Object[n(204)](e),t&&(r=r[n(165)](function(t){return Object[n(231)](e,t).enumerable})),a.push[n(245)](a,r)),a}function _objectSpread(r){for(var n=_0xa89b,t=1;t<arguments[n(276)];t++){var a=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(a),!0)[n(278)](function(t){_defineProperty(r,t,a[t])}):Object[n(312)]?Object[n(232)](r,Object[n(312)](a)):ownKeys(Object(a)).forEach(function(t){var e=n;Object[e(181)](r,t,Object[e(231)](a,t))})}return r}function _toConsumableArray(t){return _arrayWithoutHoles(t)||_iterableToArray(t)||_unsupportedIterableToArray(t)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError(_0xa89b(259))}function _unsupportedIterableToArray(t,e){var r,n=_0xa89b;if(t)return n(282)==typeof t?_arrayLikeToArray(t,e):(r={}[n(223)][n(256)](t)[n(192)](8,-1),n(176)===r&&t[n(354)]&&(r=t[n(354)].name),n(202)===r||n(249)===r?Array[n(180)](t):n(215)===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/[n(220)](r)?_arrayLikeToArray(t,e):void 0)}function _iterableToArray(t){var e=_0xa89b;if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t[e(182)])return Array[e(180)](t)}function _arrayWithoutHoles(t){if(Array[_0xa89b(333)](t))return _arrayLikeToArray(t)}function _arrayLikeToArray(t,e){var r=_0xa89b;(null==e||e>t.length)&&(e=t[r(276)]);for(var n=0,a=Array(e);n<e;n++)a[n]=t[n];return a}function _defineProperty(t,e,r){return(e=_toPropertyKey(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function _toPropertyKey(t){var e=_0xa89b,t=_toPrimitive(t,e(282));return e(274)==_typeof(t)?t:t+""}function _toPrimitive(t,e){var r=_0xa89b;if(r(212)!=_typeof(t)||!t)return t;var n=t[Symbol[r(294)]];if(void 0===n)return("string"===e?String:Number)(t);n=n[r(256)](t,e||r(250));if(r(212)!=_typeof(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}function concepteleMade(){var t=_0x4b264e,e=t(210)[t(258)](pageData[t(187)][t(286)],t(322))[t(258)](pageData[t(187)][t(233)],t(191)).concat(pageData[t(187)][t(222)],t(184))[t(258)](pageData[t(187)].notsupport,t(279));document[t(347)](t(332))[t(200)]=e}function fileDetails(n,t){var a=_0x4b264e,e={templete:a(267),jsonModular:a(360),otherModular:a(329),jsModular:a(213),wxssModular:a(251),modularWxs:a(302),unsupported:a(325),supportPart:"部分支持"};if(0===(v=Object[a(257)](n)).length)return!1;function r(e){var r=[];return v[a(278)](function(t){n[t].status===e&&r.push(t)}),r}var o,i,s=document[a(347)](".tab-box"),c=s[a(347)](a(296)),l=c[a(272)]("li")[0],u=(l&&l.classList[a(194)](a(221)),document[a(298)]("li")),d=(u[a(350)].add(a(300)),u[a(358)](a(268),t),u[a(200)]=e[t],c.appendChild(u),s[a(347)](a(313))),l=d.querySelectorAll(".table-info")[0],e=(l&&l[a(350)][a(194)](a(221)),document[a(298)](a(253))),s=(e[a(350)][a(194)](a(299)),e.classList[a(194)](t),document[a(298)]("table")),l=(s.classList[a(194)](a(277)),document.createElement("thead")),t=(l[a(350)].add(a(270)),l[a(200)]=a(311),document[a(298)](a(307))),p="",b=0,f=r(1),y=r(2),v=r(3)[a(258)](y)[a(258)](f),m=a(319);v[a(278)](function(t){var e=a,r="";1===n[t][e(351)]?r='<span class="status-icon success-icon">✓</span>':2===n[t][e(351)]?r=e(264):3===n[t][e(351)]&&(r=e(207)),p="".concat(p,e(214))[e(258)](r,e(266))[e(258)](t,"\n </td>\n </tr>"),n[t][e(327)]&&1!==n[t][e(327)]&&b++,3===n[t].supportType&&(m=e(265))}),t[a(200)]=p;u[a(343)]((y=b||"",f=b?m:a(225),o=a,(i=document.createElement("span")).classList.add("num"),i[o(200)]=y,i[o(350)][o(194)](f),i)),s[a(343)](l),s[a(343)](t),e[a(343)](s),d.appendChild(e),u[a(275)]("click",function(){var r=a,t=(c[r(272)]("li")[r(278)](function(t){var e=r;t[e(350)][e(169)]("actived")}),d.querySelectorAll(".table-info")[r(278)](function(t){var e=r;t[e(350)][e(169)]("actived")}),u[r(173)](r(268)));d[r(347)](".".concat(t))[r(350)][r(194)](r(221)),u[r(350)][r(194)](r(221))})}function openingMade(){var o=_0x4b264e,i=pageData[o(271)];if(0===Object[o(257)](i).length)return!1;var t,e,r,n,a,s,c,l,u={tabBox:document[o(347)](o(314)),get ulBox(){var t=o;return this[t(226)].querySelector(t(296))},get cardBox(){var t=o;return this[t(226)].querySelector(t(313))}},d={CORRECT:1,WARNING:2,ERROR:3};t=u[(e=o)(236)][e(347)](e(303)),l=u.cardBox.querySelector(".table-info:first-child"),null!=t&&t[e(350)].add("actived"),null!=l&&l[e(350)][e(194)](e(221)),t=o,l=(()=>{var r=o,n=0,a=r(225);return Object[r(283)](i)[r(278)](function(t){var e=r;t[e(351)]!==d[e(331)]&&n++,t.status===d[e(239)]?a=e(265):n&&a!==e(265)&&(a=e(319))}),{unsupportedNum:n,statusClass:a}})(),e=l.unsupportedNum,l=l[t(273)],(r=document[t(298)]("li")).className=t(284),r[t(197)][t(342)]=t(255),(n=document[t(298)](t(227))).className=t(336).concat(l),n[t(328)]=e||"",r.innerHTML=t(224),r.prepend(n),u.ulBox[t(343)](r),l=r,e=o,(n=document[e(298)](e(253)))[e(174)]=e(178),(t=document[e(298)](e(277)))[e(174)]=e(277),t[e(200)]=e(349)[e(258)]((()=>{var n=o;return(()=>{var r=o,n=_defineProperty(_defineProperty(_defineProperty({},d[r(239)],[]),d[r(208)],[]),d[r(331)],[]);return Object[r(257)](i)[r(278)](function(t){var e=r;return n[i[t][e(351)]].push(t)}),[][r(258)](_toConsumableArray(n[d[r(239)]]),_toConsumableArray(n[d[r(208)]]),_toConsumableArray(n[d[r(331)]]))})()[n(316)](function(t){var e=n,r=i[t];return"\n <tr>\n <td>"[e(258)](t,e(305))[e(258)](r[e(189)][e(353)]("、"),e(188))[e(258)](r.docpath,e(337))[e(258)]((t=r[e(351)],r=o,r=_defineProperty(_defineProperty(_defineProperty({},d.CORRECT,r(196)),d[r(208)],r(357)),d[r(239)],"icon-cuowu"),'<i class="iconfont '.concat(r[t],'"></i>')),e(185))})[n(353)]("")})(),"</tbody>\n "),n.appendChild(t),u[e(248)][e(343)](n),s=n,(a=l)[(c=o)(275)](c(179),function(){var r=c;u.ulBox[r(272)]("li").forEach(function(t){var e=r;return t[e(350)][e(169)](e(221))}),u[r(248)][r(272)](r(293))[r(278)](function(t){var e=r;return t[e(350)].remove(e(221))}),a[r(350)][r(194)]("actived"),s[r(350)][r(194)](r(221))}),u[c(248)].addEventListener(c(179),function(t){var e=c,t=t[e(216)][e(340)](e(218));t&&(window[e(166)].href=t[e(197)][e(262)])})}(()=>{for(var t=_0xa89b,e=_0x3f85();;)try{if(526579==-parseInt(t(345))+-parseInt(t(177))/2*(parseInt(t(243))/3)+parseInt(t(344))/4*(parseInt(t(252))/5)+-parseInt(t(291))/6*(parseInt(t(172))/7)+-parseInt(t(234))/8*(-parseInt(t(247))/9)+-parseInt(t(175))/10*(-parseInt(t(183))/11)+parseInt(t(324))/12)break;e.push(e.shift())}catch(t){e.push(e.shift())}})(),window[_0x4b264e(281)]=function(){projectResult(),concepteleMade(),temelatetable(),openingMade(),supportiveness(),fileInfo(),maskClose()};var byStatus=function(r){var n=_0x4b264e,a={};return Object[n(257)](pageData[n(334)])[n(278)](function(t){var e=n;pageData[e(334)][t][e(351)]===r&&(a[t]=pageData[e(334)][t])}),a};function supportiveness(){var t=_0x4b264e;fileDetails(byStatus(2),t(211)),fileDetails(byStatus(3),t(309))}var byType=function(t){var e,r=_0x4b264e,n={};for(e in pageData[r(334)])pageData.transforms[e].type===t&&(n[e]=Object[r(297)]({},pageData[r(334)][e]),n[e][r(327)]=n[e][r(351)]);fileDetails(n,t)};function temelatetable(){var t=_0x4b264e;byType("templete"),byType("jsModular"),byType(t(263)),byType(t(241)),byType("otherModular"),byType("modularWxs")}function fileInfo(){var e,u=_0x4b264e,d={mask:document[u(347)](u(217)),maskTitle:document.querySelector(u(321)),tableBox:document[u(347)](u(201)),pagePaths:document[u(272)](u(320))},p={getTransformData:function(t){return pageData[u(334)][t]}};function b(t){var e=u;d[e(198)][e(347)](e(235))[e(244)]=t}function f(t){var r=u,e=t[r(335)].map(function(t){var e=r;return e(355)[e(258)](t,"</div>")})[r(353)]("");return r(341)[r(258)](t.name,'</td>\n <td class="opations">')[r(258)](e,r(240))[r(258)](!(e=t)[(t=u)(280)]||"无"===e[t(280)]?t(228):'<td class="result" path="'[t(258)](e[t(280)],t(186)),"\n </tr>\n ")}d[(e=u)(242)][e(278)](function(l){var t=e;l.addEventListener(t(179),function(){var t,e,n,a,r,o,i,s,c;t=(t=l)[(s=u)(244)],(c=p[s(289)](t))&&(o=c[s(342)],e=t,n=u,(a=d.tableBox[n(272)]("th"))[n(278)](function(t){var e=n;return t.style[e(317)]=""}),null!=(o=(r={templete:function(){return b("组件名",n(308))},jsModular:function(){return b("api/生命周期",n(326))},otherModular:function(){var r=n;return e[r(306)](".js")?b(r(292),r(326)):a[r(278)](function(t){var e=r;return t[e(170)][e(317)]=e(225)})},jsonModular:function(){var t=n;return b(t(287),e===t(254)?t(295):t(238))}})[o])&&o[n(256)](r),o=t,d[(r=u)(346)][r(244)]=o,t=c[s(260)],d[(r=u)(198)].querySelector(r(307))[r(200)]=0<t[r(276)]?t[r(316)](f).join(""):r(203),d[(o=u)(338)][o(350)].remove(o(323)),i=u,d.mask.querySelectorAll(i(167)).forEach(function(e){var r=i;e[r(275)]("click",function(){var t=r;window[t(261)](e[t(173)](t(262)))})}))})})}var createTable=function(t){var r=_0x4b264e;return[r(285),t.map(function(t){var e=r;return e(304)[e(258)](t.cls,' header" id="col1">')[e(258)](t[e(230)],e(301))}),"\n </tr>\n </thead>\n <tbody></tbody>\n "].join("\n")};function maskClose(){var e=_0x4b264e,r={mask:document[e(347)](e(217)),closeBtn:document[e(347)](e(171)),table:document.querySelector(e(206))},n=createTable([{cls:"name",title:e(359)},{cls:e(318),title:e(308)},{cls:e(246),title:e(237)}]);function t(){var t;r[(t=e)(277)][t(200)]=n,r[(t=e)(338)].classList[t(194)](t(323))}r.closeBtn[e(275)]("click",t)}function projectResult(){var a,t,e=_0x4b264e,r={projectTable:document[e(347)](e(310)),dataSources:{surroundings:pageData[e(290)],tableInfo:pageData[e(193)]}};a=e,t=Object[a(283)](r[a(229)][a(290)])[a(219)](function(t,e){var r=a,n=e.name,e=e[r(315)];return _objectSpread(_objectSpread({},t),{},_defineProperty({},n,e))},{}),t=t=_objectSpread(_objectSpread({},r[a(229)][a(193)]),t),r[e(348)].innerHTML=(t=>{var n=e;return Object[n(209)](t)[n(316)](function(t){var e=n,t=_slicedToArray(t,2),r=t[0],t=t[1];return e(168)[e(258)](r,e(205)).concat(t,e(185))})[n(353)]("")})(t)}
1
+ function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function _slicedToArray(t,e){return _arrayWithHoles(t)||_iterableToArrayLimit(t,e)||_unsupportedIterableToArray(t,e)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _iterableToArrayLimit(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,a,o,c,i=[],s=!0,l=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=o.call(n)).done)&&(i.push(r.value),i.length!==e);s=!0);}catch(t){l=!0,a=t}finally{try{if(!s&&null!=n.return&&(c=n.return(),Object(c)!==c))return}finally{if(l)throw a}}return i}}function _arrayWithHoles(t){if(Array.isArray(t))return t}function ownKeys(e,t){var n,r=Object.keys(e);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(e),t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)),r}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(n),!0).forEach(function(t){_defineProperty(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function _toConsumableArray(t){return _arrayWithoutHoles(t)||_iterableToArray(t)||_unsupportedIterableToArray(t)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(t,e){var n;if(t)return"string"==typeof t?_arrayLikeToArray(t,e):"Map"===(n="Object"===(n={}.toString.call(t).slice(8,-1))&&t.constructor?t.constructor.name:n)||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(t,e):void 0}function _iterableToArray(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function _arrayWithoutHoles(t){if(Array.isArray(t))return _arrayLikeToArray(t)}function _arrayLikeToArray(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function _defineProperty(t,e,n){return(e=_toPropertyKey(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function _toPropertyKey(t){t=_toPrimitive(t,"string");return"symbol"==_typeof(t)?t:t+""}function _toPrimitive(t,e){if("object"!=_typeof(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0===n)return("string"===e?String:Number)(t);n=n.call(t,e||"default");if("object"!=_typeof(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}function concepteleMade(){var t='<div class="itembox itembox_completely">\n <div class="botval">'.concat(pageData.concept.modelAll,'</div>\n <div class="topname">文件总数</div>\n </div>\n <div class="itembox itembox_completely">\n <div class="botval">').concat(pageData.concept.completely,'</div>\n <div class="topname">完全转换</div>\n </div>\n <div class="itembox itembox_portion">\n <div class="botval">').concat(pageData.concept.partial,'</div>\n <div class="topname">部分转换</div>\n </div>\n <div class="itembox itembox_failed">\n <div class="botval">').concat(pageData.concept.notsupport,'</div>\n <div class="topname">无法转换</div>\n </div>');document.querySelector(".rep-allbox").innerHTML=t}function fileDetails(r,t){if(0===(f=Object.keys(r)).length)return!1;function e(e){var n=[];return f.forEach(function(t){r[t].status===e&&n.push(t)}),n}var n,a=document.querySelector(".tab-box"),o=a.querySelector(".ul"),c=o.querySelectorAll("li")[0],i=(c&&c.classList.add("actived"),document.createElement("li")),s=(i.classList.add("tab-item"),i.setAttribute("data-type",t),i.innerHTML={templete:"模板文件",jsonModular:"json文件",otherModular:"其他文件",jsModular:"脚本文件",wxssModular:"样式文件",modularWxs:"自定义脚本",unsupported:"不支持文件",supportPart:"部分支持"}[t],o.appendChild(i),a.querySelector(".card-box")),c=s.querySelectorAll(".table-info")[0],a=(c&&c.classList.add("actived"),document.createElement("div")),c=(a.classList.add("table-info"),a.classList.add(t),document.createElement("table")),t=(c.classList.add("table"),document.createElement("thead")),l=(t.classList.add("table-head"),t.innerHTML='<tr class="pages">\n <th>文件路径</th>\n <th>转换结果</th>\n </tr>',document.createElement("tbody")),u="",d=0,p=e(1),y=e(2),f=e(3).concat(y).concat(p),b="warn";f.forEach(function(t){var e="";1===r[t].status?e='<span class="status-icon success-icon">✓</span>':2===r[t].status?e='<span class="status-icon warning-icon">⚠</span>':3===r[t].status&&(e='<span class="status-icon danger-icon">✕</span>'),u="".concat(u,'<tr>\n <td class="apges">\n ').concat(e,'\n </td>\n <td class="file-path">\n ').concat(t,"\n </td>\n </tr>"),r[t].supportType&&1!==r[t].supportType&&d++,3===r[t].supportType&&(b="err")}),l.innerHTML=u;i.appendChild((y=d||"",p=d?b:"none",(n=document.createElement("span")).classList.add("num"),n.innerHTML=y,n.classList.add(p),n)),c.appendChild(t),c.appendChild(l),a.appendChild(c),s.appendChild(a),i.addEventListener("click",function(){o.querySelectorAll("li").forEach(function(t){t.classList.remove("actived")}),s.querySelectorAll(".table-info").forEach(function(t){t.classList.remove("actived")});var t=i.getAttribute("data-type");s.querySelector(".".concat(t)).classList.add("actived"),i.classList.add("actived")})}function openingMade(){var r=pageData.opening;if(0===Object.keys(r).length)return!1;var t,e,n,a,o,c,i={tabBox:document.querySelector(".tab-box"),get ulBox(){return this.tabBox.querySelector(".ul")},get cardBox(){return this.tabBox.querySelector(".card-box")}},s={CORRECT:1,WARNING:2,ERROR:3};c=i.ulBox.querySelector("li:first-child"),t=i.cardBox.querySelector(".table-info:first-child"),null!=c&&c.classList.add("actived"),null!=t&&t.classList.add("actived"),c=(()=>{var e=0,n="none";return Object.values(r).forEach(function(t){t.status!==s.CORRECT&&e++,t.status===s.ERROR?n="err":e&&"err"!==n&&(n="warn")}),{unsupportedNum:e,statusClass:n}})(),t=c.unsupportedNum,c=c.statusClass,(e=document.createElement("li")).className="tab-item actived",e.dataset.type="openability",(n=document.createElement("span")).className="num ".concat(c),n.textContent=t||"",e.innerHTML="开放能力",e.prepend(n),i.ulBox.appendChild(e),c=e,(t=document.createElement("div")).className="table-info openability actived",(n=document.createElement("table")).className="table",n.innerHTML='\n <thead class="table-head">\n <tr>\n <th>能力名称</th>\n <th>页面路径</th>\n <th>如何解决</th>\n <th>转换结果</th>\n </tr>\n </thead>\n <tbody>'.concat((()=>{var e=_defineProperty(_defineProperty(_defineProperty({},s.ERROR,[]),s.WARNING,[]),s.CORRECT,[]);return Object.keys(r).forEach(function(t){return e[r[t].status].push(t)}),[].concat(_toConsumableArray(e[s.ERROR]),_toConsumableArray(e[s.WARNING]),_toConsumableArray(e[s.CORRECT]))})().map(function(t){var e=r[t];return"\n <tr>\n <td>".concat(t,"</td>\n <td>").concat(e.pathArr.join("、"),'</td>\n <td>\n <div class="show-instruct" data-path="').concat(e.docpath,'">\n 查看相关能力\n </div>\n </td>\n <td class="apges">').concat((t=e.status,e=_defineProperty(_defineProperty(_defineProperty({},s.CORRECT,"icon-zhengque"),s.WARNING,"icon-warning"),s.ERROR,"icon-cuowu"),'<i class="iconfont '.concat(e[t],'"></i>')),"</td>\n </tr>\n ")}).join(""),"</tbody>\n "),t.appendChild(n),i.cardBox.appendChild(t),o=t,(a=c).addEventListener("click",function(){i.ulBox.querySelectorAll("li").forEach(function(t){return t.classList.remove("actived")}),i.cardBox.querySelectorAll(".table-info").forEach(function(t){return t.classList.remove("actived")}),a.classList.add("actived"),o.classList.add("actived")}),i.cardBox.addEventListener("click",function(t){t=t.target.closest(".show-instruct");t&&(window.location.href=t.dataset.path)})}window.onload=function(){projectResult(),concepteleMade(),temelatetable(),openingMade(),supportiveness(),fileInfo(),maskClose()};var byStatus=function(e){var n={};return Object.keys(pageData.transforms).forEach(function(t){pageData.transforms[t].status===e&&(n[t]=pageData.transforms[t])}),n};function supportiveness(){fileDetails(byStatus(2),"supportPart"),fileDetails(byStatus(3),"unsupported")}var byType=function(t){var e,n={};for(e in pageData.transforms)pageData.transforms[e].type===t&&(n[e]=Object.assign({},pageData.transforms[e]),n[e].supportType=n[e].status);fileDetails(n,t)};function temelatetable(){byType("templete"),byType("jsModular"),byType("wxssModular"),byType("jsonModular"),byType("otherModular"),byType("modularWxs")}function fileInfo(){var i={mask:document.querySelector(".mask"),maskTitle:document.querySelector(".mask .title"),tableBox:document.querySelector(".mask .table-box"),pagePaths:document.querySelectorAll(".file-path")},s={getTransformData:function(t){return pageData.transforms[t]}};function l(t){i.tableBox.querySelector("#col1").innerText=t}function u(t){var e=t.attrs.map(function(t){return'<div class="opation-item">'.concat(t,"</div>")}).join("");return'\n <tr>\n <td class="name">'.concat(t.name,'</td>\n <td class="opations">').concat(e,"</td>\n ").concat(!(e=t).doc||"无"===e.doc?'<td class="unsupported">暂不支持,请尝试其他实现方式</td>':'<td class="result" path="'.concat(e.doc,'">帮助文档</td>'),"\n </tr>\n ")}i.pagePaths.forEach(function(c){c.addEventListener("click",function(){var t,e,n,r,a,o;t=(t=c).innerText,(o=s.getTransformData(t))&&(a=o.type,e=t,(n=i.tableBox.querySelectorAll("th")).forEach(function(t){return t.style.display=""}),null!=(a=(r={templete:function(){return l("组件名")},jsModular:function(){return l("api/生命周期")},otherModular:function(){return e.endsWith(".js")?l("api/生命周期"):n.forEach(function(t){return t.style.display="none"})},jsonModular:function(){return l("属性名称")}})[a])&&a.call(r),i.maskTitle.innerText=t,a=o.components,i.tableBox.querySelector("tbody").innerHTML=0<a.length?a.map(u).join(""):'<tr><td colspan="3">完整支持</td></tr>',i.mask.classList.remove("hide"),i.mask.querySelectorAll(".result").forEach(function(t){t.addEventListener("click",function(){window.open(t.getAttribute("path"))})}))})})}var createTable=function(t){return["\n <thead>\n <tr>\n ",t.map(function(t){return'<th class="'.concat(t.cls,' header" id="col1">').concat(t.title,"</th>")}),"\n </tr>\n </thead>\n <tbody></tbody>\n "].join("\n")};function maskClose(){var t={mask:document.querySelector(".mask"),closeBtn:document.querySelector(".mask .close"),table:document.querySelector(".mask .table-box table")},e=createTable([{cls:"name",title:"组件名"},{cls:"opations",title:"不支持"},{cls:"result",title:"如何解决"}]);function n(){t.table.innerHTML=e,t.mask.classList.add("hide")}t.closeBtn.addEventListener("click",n)}function projectResult(){var t,e={projectTable:document.querySelector("#project tbody"),dataSources:{surroundings:pageData.surroundings,tableInfo:pageData.tableInfo}};t=Object.values(e.dataSources.surroundings).reduce(function(t,e){var n=e.name,e=e.val;return _objectSpread(_objectSpread({},t),{},_defineProperty({},n,e))},{}),t=_objectSpread(_objectSpread({},e.dataSources.tableInfo),t),e.projectTable.innerHTML=(t=>Object.entries(t).map(function(t){var t=_slicedToArray(t,2),e=t[0],t=t[1];return'\n <tr>\n <td class="text-left">'.concat(e,'</td>\n <td class="text-right">').concat(t,"</td>\n </tr>\n ")}).join(""))(t)}