@umijs/bundler-webpack 4.0.0-rc.2 → 4.0.0-rc.20

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 (112) hide show
  1. package/client/client/client.js +65 -37
  2. package/client/constants.js +9 -0
  3. package/compiled/autoprefixer/browserslist/index.d.ts +2 -0
  4. package/compiled/autoprefixer/index.js +3 -3
  5. package/compiled/autoprefixer/postcss/lib/declaration.d.ts +1 -1
  6. package/compiled/autoprefixer/postcss/lib/node.d.ts +2 -2
  7. package/compiled/babel-loader/index.js +2 -2
  8. package/compiled/copy-webpack-plugin/{576.index.js → 939.index.js} +11 -11
  9. package/compiled/copy-webpack-plugin/index.js +12 -12
  10. package/compiled/css-minimizer-webpack-plugin/index.js +7 -7
  11. package/compiled/cssnano/index.js +6 -6
  12. package/compiled/cssnano/package.json +1 -1
  13. package/compiled/express.d.ts +2 -0
  14. package/compiled/fork-ts-checker-webpack-plugin/index.js +7 -13
  15. package/compiled/http-proxy-middleware/index.js +10 -10
  16. package/compiled/mini-css-extract-plugin/index.js +440 -401
  17. package/compiled/mini-css-extract-plugin/loader.js +3 -1
  18. package/compiled/mini-css-extract-plugin/utils.js +2 -0
  19. package/compiled/{tapable → react-refresh}/LICENSE +6 -6
  20. package/compiled/react-refresh/index.js +9 -7
  21. package/compiled/react-refresh/package.json +1 -0
  22. package/compiled/terser/index.js +1 -1
  23. package/compiled/webpack/BasicEffectRulePlugin.js +1 -0
  24. package/compiled/webpack/BasicMatcherRulePlugin.js +1 -0
  25. package/compiled/webpack/HotModuleReplacement.runtime.js +29 -14
  26. package/compiled/webpack/JavascriptHotModuleReplacement.runtime.js +4 -3
  27. package/compiled/webpack/ObjectMatcherRulePlugin.js +1 -0
  28. package/compiled/webpack/RuleSetCompiler.js +1 -0
  29. package/compiled/webpack/UseEffectRulePlugin.js +1 -0
  30. package/compiled/webpack/deepImports.json +6 -1
  31. package/compiled/webpack/index.js +5760 -3275
  32. package/compiled/webpack/types.d.ts +606 -171
  33. package/compiled/webpack-manifest-plugin/index.js +1 -1
  34. package/dist/build.d.ts +1 -0
  35. package/dist/build.js +48 -57
  36. package/dist/cli.js +6 -15
  37. package/dist/client/client.js +57 -51
  38. package/dist/config/_sampleFeature.js +6 -17
  39. package/dist/config/assetRules.js +44 -55
  40. package/dist/config/bundleAnalyzerPlugin.js +12 -23
  41. package/dist/config/compressPlugin.js +89 -64
  42. package/dist/config/config.d.ts +2 -0
  43. package/dist/config/config.js +177 -179
  44. package/dist/config/copyPlugin.js +29 -40
  45. package/dist/config/cssRules.js +93 -83
  46. package/dist/config/definePlugin.js +11 -19
  47. package/dist/config/detectDeadCode.js +1 -1
  48. package/dist/config/detectDeadCodePlugin.js +21 -22
  49. package/dist/config/fastRefreshPlugin.js +11 -22
  50. package/dist/config/forkTSCheckerPlugin.js +11 -22
  51. package/dist/config/harmonyLinkingErrorPlugin.js +3 -14
  52. package/dist/config/ignorePlugin.js +10 -21
  53. package/dist/config/javaScriptRules.d.ts +1 -0
  54. package/dist/config/javaScriptRules.js +152 -138
  55. package/dist/config/manifestPlugin.js +10 -18
  56. package/dist/config/miniCSSExtractPlugin.js +12 -23
  57. package/dist/config/nodePolyfill.js +14 -20
  58. package/dist/config/nodePrefixPlugin.d.ts +11 -0
  59. package/dist/config/nodePrefixPlugin.js +14 -0
  60. package/dist/config/progressPlugin.js +7 -18
  61. package/dist/config/purgecssWebpackPlugin.js +15 -26
  62. package/dist/config/speedMeasureWebpackPlugin.js +12 -23
  63. package/dist/config/svgRules.js +44 -47
  64. package/dist/constants.d.ts +1 -0
  65. package/dist/constants.js +7 -1
  66. package/dist/dev.d.ts +4 -0
  67. package/dist/dev.js +115 -94
  68. package/dist/index.d.ts +4 -1
  69. package/dist/index.js +5 -1
  70. package/dist/loader/svgr.js +4 -13
  71. package/dist/loader/swc.js +9 -14
  72. package/dist/plugins/ProgressPlugin.js +2 -2
  73. package/dist/plugins/RuntimePublicPathPlugin.js +1 -1
  74. package/dist/schema.js +29 -13
  75. package/dist/server/server.d.ts +2 -1
  76. package/dist/server/server.js +164 -148
  77. package/dist/server/ws.d.ts +5 -2
  78. package/dist/swcPlugins/autoCSSModules.js +3 -1
  79. package/dist/swcPlugins/changeImportFromString.d.ts +2 -0
  80. package/dist/swcPlugins/changeImportFromString.js +10 -0
  81. package/dist/swcPlugins/lockCoreJS.d.ts +1 -1
  82. package/dist/swcPlugins/lockCoreJS.js +3 -2
  83. package/dist/types.d.ts +4 -0
  84. package/dist/types.js +1 -0
  85. package/dist/utils/getEsBuildTarget.d.ts +5 -0
  86. package/dist/utils/getEsBuildTarget.js +12 -0
  87. package/package.json +32 -34
  88. package/compiled/css-loader/LICENSE +0 -20
  89. package/compiled/css-loader/api.js +0 -102
  90. package/compiled/css-loader/getUrl.js +0 -29
  91. package/compiled/css-loader/index.js +0 -2
  92. package/compiled/css-loader/noSourceMaps.js +0 -5
  93. package/compiled/css-loader/package.json +0 -1
  94. package/compiled/css-loader/sourceMaps.js +0 -22
  95. package/compiled/express/LICENSE +0 -24
  96. package/compiled/express/body-parser/index.d.ts +0 -104
  97. package/compiled/express/connect/index.d.ts +0 -93
  98. package/compiled/express/express-serve-static-core/index.d.ts +0 -1252
  99. package/compiled/express/index.d.ts +0 -133
  100. package/compiled/express/index.js +0 -321
  101. package/compiled/express/mime/index.d.ts +0 -35
  102. package/compiled/express/package.json +0 -1
  103. package/compiled/express/qs/index.d.ts +0 -62
  104. package/compiled/express/range-parser/index.d.ts +0 -35
  105. package/compiled/express/serve-static/index.d.ts +0 -108
  106. package/compiled/less/index.js +0 -31
  107. package/compiled/less/package.json +0 -1
  108. package/compiled/tapable/index.js +0 -1
  109. package/compiled/tapable/package.json +0 -1
  110. package/compiled/tapable/tapable.d.ts +0 -116
  111. package/dist/plugins/ESBuildCSSMinifyPlugin.d.ts +0 -11
  112. package/dist/plugins/ESBuildCSSMinifyPlugin.js +0 -65
@@ -7,6 +7,7 @@ const {
7
7
  evalModuleCode,
8
8
  AUTO_PUBLIC_PATH,
9
9
  ABSOLUTE_PUBLIC_PATH,
10
+ BASE_URI,
10
11
  SINGLE_DOT_PATH_SEGMENT,
11
12
  stringifyRequest
12
13
  } = require("./utils");
@@ -261,7 +262,8 @@ function pitch(request) {
261
262
  layer: options.layer,
262
263
  publicPath:
263
264
  /** @type {string} */
264
- publicPathForExtract
265
+ publicPathForExtract,
266
+ baseUri: `${BASE_URI}/`
265
267
  },
266
268
  /**
267
269
  * @param {Error | null | undefined} error
@@ -97,6 +97,7 @@ function compareModulesByIdentifier(a, b) {
97
97
  const MODULE_TYPE = "css/mini-extract";
98
98
  const AUTO_PUBLIC_PATH = "__mini_css_extract_plugin_public_path_auto__";
99
99
  const ABSOLUTE_PUBLIC_PATH = "webpack:///mini-css-extract-plugin/";
100
+ const BASE_URI = "webpack://";
100
101
  const SINGLE_DOT_PATH_SEGMENT = "__mini_css_extract_plugin_single_dot_path_segment__";
101
102
  /**
102
103
  * @param {string} str
@@ -207,6 +208,7 @@ module.exports = {
207
208
  MODULE_TYPE,
208
209
  AUTO_PUBLIC_PATH,
209
210
  ABSOLUTE_PUBLIC_PATH,
211
+ BASE_URI,
210
212
  SINGLE_DOT_PATH_SEGMENT,
211
213
  stringifyRequest,
212
214
  getUndoPath
@@ -1,6 +1,6 @@
1
- The MIT License
1
+ MIT License
2
2
 
3
- Copyright JS Foundation and other contributors
3
+ Copyright (c) Facebook, Inc. and its affiliates.
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -9,13 +9,13 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
9
  copies of the Software, and to permit persons to whom the Software is
10
10
  furnished to do so, subject to the following conditions:
11
11
 
12
- The above copyright notice and this permission notice shall be included in
13
- all copies or substantial portions of the Software.
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
14
 
15
15
  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
16
  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
17
  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
18
  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
19
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- THE SOFTWARE.
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -1,19 +1,21 @@
1
- (function(){"use strict";var e={83:function(e,r,n){if(process.env.NODE_ENV==="production"){e.exports=n(487)}else{e.exports=n(938)}},938:function(e,r,n){
2
- /** @license React vundefined
3
- * react-refresh-babel.development.js
1
+ (function(){"use strict";var e={653:function(e,t){
2
+ /**
3
+ * @license React
4
+ * react-refresh-runtime.development.js
4
5
  *
5
6
  * Copyright (c) Facebook, Inc. and its affiliates.
6
7
  *
7
8
  * This source code is licensed under the MIT license found in the
8
9
  * LICENSE file in the root directory of this source tree.
9
10
  */
10
- if(process.env.NODE_ENV!=="production"){(function(){"use strict";function ReactFreshBabelPlugin(e){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};if(typeof e.env==="function"){var a=e.env();if(a!=="development"&&!r.skipEnvCheck){throw new Error("React Refresh Babel transform should only be enabled in development environment. "+'Instead, the environment is: "'+a+'". If you want to override this check, pass {skipEnvCheck: true} as plugin options.')}}var i=e.types;var s=i.identifier(r.refreshReg||"$RefreshReg$");var o=i.identifier(r.refreshSig||"$RefreshSig$");var c=new Map;function createRegistration(e,r){var n=e.scope.generateUidIdentifier("c");if(!c.has(e)){c.set(e,[])}var a=c.get(e);a.push({handle:n,persistentID:r});return n}function isComponentishName(e){return typeof e==="string"&&e[0]>="A"&&e[0]<="Z"}function findInnerComponents(e,r,n){var a=r.node;switch(a.type){case"Identifier":{if(!isComponentishName(a.name)){return false}n(e,a,null);return true}case"FunctionDeclaration":{n(e,a.id,null);return true}case"ArrowFunctionExpression":{if(a.body.type==="ArrowFunctionExpression"){return false}n(e,a,r);return true}case"FunctionExpression":{n(e,a,r);return true}case"CallExpression":{var i=r.get("arguments");if(i===undefined||i.length===0){return false}var s=r.get("callee");switch(s.node.type){case"MemberExpression":case"Identifier":{var o=s.getSource();var c=i[0];var l=e+"$"+o;var p=findInnerComponents(l,c,n);if(!p){return false}n(e,a,r);return true}default:{return false}}}case"VariableDeclarator":{var f=a.init;if(f===null){return false}var d=a.id.name;if(!isComponentishName(d)){return false}switch(f.type){case"ArrowFunctionExpression":case"FunctionExpression":break;case"CallExpression":{var h=f.callee;var v=h.type;if(v==="Import"){return false}else if(v==="Identifier"){if(h.name.indexOf("require")===0){return false}else if(h.name.indexOf("import")===0){return false}}break}case"TaggedTemplateExpression":break;default:return false}var g=r.get("init");var b=findInnerComponents(e,g,n);if(b){return true}var y=r.scope.getBinding(d);if(y===undefined){return}var E=false;var k=y.referencePaths;for(var _=0;_<k.length;_++){var S=k[_];if(S.node&&S.node.type!=="JSXIdentifier"&&S.node.type!=="Identifier"){continue}var P=S.parent;if(P.type==="JSXOpeningElement"){E=true}else if(P.type==="CallExpression"){var R=P.callee;var I=void 0;switch(R.type){case"Identifier":I=R.name;break;case"MemberExpression":I=R.property.name;break}switch(I){case"createElement":case"jsx":case"jsxDEV":case"jsxs":E=true;break}}if(E){n(e,f,g);return true}}}}return false}function isBuiltinHook(e){switch(e){case"useState":case"React.useState":case"useReducer":case"React.useReducer":case"useEffect":case"React.useEffect":case"useLayoutEffect":case"React.useLayoutEffect":case"useMemo":case"React.useMemo":case"useCallback":case"React.useCallback":case"useRef":case"React.useRef":case"useContext":case"React.useContext":case"useImperativeHandle":case"React.useImperativeHandle":case"useDebugValue":case"React.useDebugValue":return true;default:return false}}function getHookCallsSignature(e){var r=h.get(e);if(r===undefined){return null}return{key:r.map((function(e){return e.name+"{"+e.key+"}"})).join("\n"),customHooks:r.filter((function(e){return!isBuiltinHook(e.name)})).map((function(e){return i.cloneDeep(e.callee)}))}}var l=new WeakMap;function hasForceResetComment(e){var r=e.hub.file;var n=l.get(r);if(n!==undefined){return n}n=false;var a=r.ast.comments;for(var i=0;i<a.length;i++){var s=a[i];if(s.value.indexOf("@refresh reset")!==-1){n=true;break}}l.set(r,n);return n}function createArgumentsForSignature(e,a,s){var o=a.key,c=a.customHooks;var l=hasForceResetComment(s.path);var p=[];c.forEach((function(e){var r;switch(e.type){case"MemberExpression":if(e.object.type==="Identifier"){r=e.object.name}break;case"Identifier":r=e.name;break}if(s.hasBinding(r)){p.push(e)}else{l=true}}));var f=o;if(true&&!r.emitFullSignatures){f=n(113).createHash("sha1").update(o).digest("base64")}var d=[e,i.stringLiteral(f)];if(l||p.length>0){d.push(i.booleanLiteral(l))}if(p.length>0){d.push(i.functionExpression(null,[],i.blockStatement([i.returnStatement(i.arrayExpression(p))])))}return d}function findHOCCallPathsAbove(e){var r=[];while(true){if(!e){return r}var n=e.parentPath;if(!n){return r}if(n.node.type==="AssignmentExpression"&&e.node===n.node.right){e=n;continue}if(n.node.type==="CallExpression"&&e.node!==n.node.callee){r.push(n);e=n;continue}return r}}var p=new WeakSet;var f=new WeakSet;var d=new WeakSet;var h=new WeakMap;var v={CallExpression:function(e){var r=e.node;var n=r.callee;var a=null;switch(n.type){case"Identifier":a=n.name;break;case"MemberExpression":a=n.property.name;break}if(a===null||!/^use[A-Z]/.test(a)){return}var i=e.scope.getFunctionParent();if(i===null){return}var s=i.block;if(!h.has(s)){h.set(s,[])}var o=h.get(s);var c="";if(e.parent.type==="VariableDeclarator"){c=e.parentPath.get("id").getSource()}var l=e.get("arguments");if(a==="useState"&&l.length>0){c+="("+l[0].getSource()+")"}else if(a==="useReducer"&&l.length>1){c+="("+l[1].getSource()+")"}o.push({callee:e.node.callee,name:a,key:c})}};return{visitor:{ExportDefaultDeclaration:function(e){var r=e.node;var n=r.declaration;var a=e.get("declaration");if(n.type!=="CallExpression"){return}if(p.has(r)){return}p.add(r);var s="%default%";var o=e.parentPath;findInnerComponents(s,a,(function(e,r,n){if(n===null){return}var a=createRegistration(o,e);n.replaceWith(i.assignmentExpression("=",a,r))}))},FunctionDeclaration:{enter:function(e){var r=e.node;var n;var a;var s="";switch(e.parent.type){case"Program":a=e;n=e.parentPath;break;case"TSModuleBlock":a=e;n=a.parentPath.parentPath;break;case"ExportNamedDeclaration":a=e.parentPath;n=a.parentPath;break;case"ExportDefaultDeclaration":a=e.parentPath;n=a.parentPath;break;default:return}if(e.parent.type==="TSModuleBlock"||e.parent.type==="ExportNamedDeclaration"){while(n.type!=="Program"){if(n.type==="TSModuleDeclaration"){if(n.parentPath.type!=="Program"&&n.parentPath.type!=="ExportNamedDeclaration"){return}s=n.node.id.name+"$"+s}n=n.parentPath}}var o=r.id;if(o===null){return}var c=o.name;if(!isComponentishName(c)){return}if(p.has(r)){return}p.add(r);var l=s+c;findInnerComponents(l,e,(function(e,r){var s=createRegistration(n,e);a.insertAfter(i.expressionStatement(i.assignmentExpression("=",s,r)))}))},exit:function(e){var r=e.node;var n=r.id;if(n===null){return}var a=getHookCallsSignature(r);if(a===null){return}if(f.has(r)){return}f.add(r);var s=e.scope.generateUidIdentifier("_s");e.scope.parent.push({id:s,init:i.callExpression(o,[])});e.get("body").unshiftContainer("body",i.expressionStatement(i.callExpression(s,[])));var c=null;e.find((function(e){if(e.parentPath.isBlock()){c=e;return true}}));if(c===null){return}c.insertAfter(i.expressionStatement(i.callExpression(s,createArgumentsForSignature(n,a,c.scope))))}},"ArrowFunctionExpression|FunctionExpression":{exit:function(e){var r=e.node;var n=getHookCallsSignature(r);if(n===null){return}if(f.has(r)){return}f.add(r);var a=e.scope.generateUidIdentifier("_s");e.scope.parent.push({id:a,init:i.callExpression(o,[])});if(e.node.body.type!=="BlockStatement"){e.node.body=i.blockStatement([i.returnStatement(e.node.body)])}e.get("body").unshiftContainer("body",i.expressionStatement(i.callExpression(a,[])));if(e.parent.type==="VariableDeclarator"){var s=null;e.find((function(e){if(e.parentPath.isBlock()){s=e;return true}}));if(s===null){return}s.insertAfter(i.expressionStatement(i.callExpression(a,createArgumentsForSignature(e.parent.id,n,s.scope))))}else{var c=[e].concat(findHOCCallPathsAbove(e));c.forEach((function(e){e.replaceWith(i.callExpression(a,createArgumentsForSignature(e.node,n,e.scope)))}))}}},VariableDeclaration:function(e){var r=e.node;var n;var a;var s="";switch(e.parent.type){case"Program":a=e;n=e.parentPath;break;case"TSModuleBlock":a=e;n=a.parentPath.parentPath;break;case"ExportNamedDeclaration":a=e.parentPath;n=a.parentPath;break;case"ExportDefaultDeclaration":a=e.parentPath;n=a.parentPath;break;default:return}if(e.parent.type==="TSModuleBlock"||e.parent.type==="ExportNamedDeclaration"){while(n.type!=="Program"){if(n.type==="TSModuleDeclaration"){if(n.parentPath.type!=="Program"&&n.parentPath.type!=="ExportNamedDeclaration"){return}s=n.node.id.name+"$"+s}n=n.parentPath}}if(p.has(r)){return}p.add(r);var o=e.get("declarations");if(o.length!==1){return}var c=o[0];var l=c.node.id.name;var f=s+l;findInnerComponents(f,c,(function(e,r,s){if(s===null){return}var o=createRegistration(n,e);if(s.parent.type==="VariableDeclarator"){a.insertAfter(i.expressionStatement(i.assignmentExpression("=",o,c.node.id)))}else{s.replaceWith(i.assignmentExpression("=",o,r))}}))},Program:{enter:function(e){e.traverse(v)},exit:function(e){var r=c.get(e);if(r===undefined){return}var n=e.node;if(d.has(n)){return}d.add(n);c.delete(e);var a=[];e.pushContainer("body",i.variableDeclaration("var",a));r.forEach((function(r){var n=r.handle,o=r.persistentID;e.pushContainer("body",i.expressionStatement(i.callExpression(s,[n,i.stringLiteral(o)])));a.push(i.variableDeclarator(n))}))}}}}}e.exports=ReactFreshBabelPlugin})()}},487:function(e,r,n){
11
- /** @license React vundefined
12
- * react-refresh-babel.production.min.js
11
+ if(process.env.NODE_ENV!=="production"){(function(){"use strict";var e=Symbol.for("react.forward_ref");var r=Symbol.for("react.memo");var n=typeof WeakMap==="function"?WeakMap:Map;var o=new Map;var i=new n;var a=new n;var u=new n;var f=[];var s=new Map;var c=new Map;var l=new Set;var d=new Set;var p=typeof WeakMap==="function"?new WeakMap:null;var y=false;function computeFullKey(e){if(e.fullKey!==null){return e.fullKey}var t=e.ownKey;var r;try{r=e.getCustomHooks()}catch(r){e.forceReset=true;e.fullKey=t;return t}for(var n=0;n<r.length;n++){var o=r[n];if(typeof o!=="function"){e.forceReset=true;e.fullKey=t;return t}var i=a.get(o);if(i===undefined){continue}var u=computeFullKey(i);if(i.forceReset){e.forceReset=true}t+="\n---\n"+u}e.fullKey=t;return t}function haveEqualSignatures(e,t){var r=a.get(e);var n=a.get(t);if(r===undefined&&n===undefined){return true}if(r===undefined||n===undefined){return false}if(computeFullKey(r)!==computeFullKey(n)){return false}if(n.forceReset){return false}return true}function isReactClass(e){return e.prototype&&e.prototype.isReactComponent}function canPreserveStateBetween(e,t){if(isReactClass(e)||isReactClass(t)){return false}if(haveEqualSignatures(e,t)){return true}return false}function resolveFamily(e){return u.get(e)}function cloneMap(e){var t=new Map;e.forEach((function(e,r){t.set(r,e)}));return t}function cloneSet(e){var t=new Set;e.forEach((function(e){t.add(e)}));return t}function getProperty(e,t){try{return e[t]}catch(e){return undefined}}function performReactRefresh(){if(f.length===0){return null}if(y){return null}y=true;try{var e=new Set;var t=new Set;var r=f;f=[];r.forEach((function(r){var n=r[0],o=r[1];var i=n.current;u.set(i,n);u.set(o,n);n.current=o;if(canPreserveStateBetween(i,o)){t.add(n)}else{e.add(n)}}));var n={updatedFamilies:t,staleFamilies:e};s.forEach((function(e){e.setRefreshHandler(resolveFamily)}));var o=false;var i=null;var a=cloneSet(d);var h=cloneSet(l);var v=cloneMap(c);a.forEach((function(e){var t=v.get(e);if(t===undefined){throw new Error("Could not find helpers for a root. This is a bug in React Refresh.")}if(!d.has(e)){}if(p===null){return}if(!p.has(e)){return}var r=p.get(e);try{t.scheduleRoot(e,r)}catch(e){if(!o){o=true;i=e}}}));h.forEach((function(e){var t=v.get(e);if(t===undefined){throw new Error("Could not find helpers for a root. This is a bug in React Refresh.")}if(!l.has(e)){}try{t.scheduleRefresh(e,n)}catch(e){if(!o){o=true;i=e}}}));if(o){throw i}return n}finally{y=false}}function register(t,n){{if(t===null){return}if(typeof t!=="function"&&typeof t!=="object"){return}if(i.has(t)){return}var a=o.get(n);if(a===undefined){a={current:t};o.set(n,a)}else{f.push([a,t])}i.set(t,a);if(typeof t==="object"&&t!==null){switch(getProperty(t,"$$typeof")){case e:register(t.render,n+"$render");break;case r:register(t.type,n+"$type");break}}}}function setSignature(t,n){var o=arguments.length>2&&arguments[2]!==undefined?arguments[2]:false;var i=arguments.length>3?arguments[3]:undefined;{if(!a.has(t)){a.set(t,{forceReset:o,ownKey:n,fullKey:null,getCustomHooks:i||function(){return[]}})}if(typeof t==="object"&&t!==null){switch(getProperty(t,"$$typeof")){case e:setSignature(t.render,n,o,i);break;case r:setSignature(t.type,n,o,i);break}}}}function collectCustomHooksForSignature(e){{var t=a.get(e);if(t!==undefined){computeFullKey(t)}}}function getFamilyByID(e){{return o.get(e)}}function getFamilyByType(e){{return i.get(e)}}function findAffectedHostInstances(e){{var t=new Set;l.forEach((function(r){var n=c.get(r);if(n===undefined){throw new Error("Could not find helpers for a root. This is a bug in React Refresh.")}var o=n.findHostInstancesForRefresh(r,e);o.forEach((function(e){t.add(e)}))}));return t}}function injectIntoGlobalHook(e){{var t=e.__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t===undefined){var r=0;e.__REACT_DEVTOOLS_GLOBAL_HOOK__=t={renderers:new Map,supportsFiber:true,inject:function(e){return r++},onScheduleFiberRoot:function(e,t,r){},onCommitFiberRoot:function(e,t,r,n){},onCommitFiberUnmount:function(){}}}if(t.isDisabled){console["warn"]("Something has shimmed the React DevTools global hook (__REACT_DEVTOOLS_GLOBAL_HOOK__). "+"Fast Refresh is not compatible with this shim and will be disabled.");return}var n=t.inject;t.inject=function(e){var t=n.apply(this,arguments);if(typeof e.scheduleRefresh==="function"&&typeof e.setRefreshHandler==="function"){s.set(t,e)}return t};t.renderers.forEach((function(e,t){if(typeof e.scheduleRefresh==="function"&&typeof e.setRefreshHandler==="function"){s.set(t,e)}}));var o=t.onCommitFiberRoot;var i=t.onScheduleFiberRoot||function(){};t.onScheduleFiberRoot=function(e,t,r){if(!y){d.delete(t);if(p!==null){p.set(t,r)}}return i.apply(this,arguments)};t.onCommitFiberRoot=function(e,t,r,n){var i=s.get(e);if(i!==undefined){c.set(t,i);var a=t.current;var u=a.alternate;if(u!==null){var f=u.memoizedState!=null&&u.memoizedState.element!=null&&l.has(t);var p=a.memoizedState!=null&&a.memoizedState.element!=null;if(!f&&p){l.add(t);d.delete(t)}else if(f&&p);else if(f&&!p){l.delete(t);if(n){d.add(t)}else{c.delete(t)}}else if(!f&&!p){if(n){d.add(t)}}}else{l.add(t)}}return o.apply(this,arguments)}}}function hasUnrecoverableErrors(){return false}function _getMountedRootCount(){{return l.size}}function createSignatureFunctionForTransform(){{var e;var t;var r=false;return function(n,o,i,a){if(typeof o==="string"){if(!e){e=n;t=typeof a==="function"}if(n!=null&&(typeof n==="function"||typeof n==="object")){setSignature(n,o,i,a)}return n}else{if(!r&&t){r=true;collectCustomHooksForSignature(e)}}}}}function isLikelyComponentType(t){{switch(typeof t){case"function":{if(t.prototype!=null){if(t.prototype.isReactComponent){return true}var n=Object.getOwnPropertyNames(t.prototype);if(n.length>1||n[0]!=="constructor"){return false}if(t.prototype.__proto__!==Object.prototype){return false}}var o=t.name||t.displayName;return typeof o==="string"&&/^[A-Z]/.test(o)}case"object":{if(t!=null){switch(getProperty(t,"$$typeof")){case e:case r:return true;default:return false}}return false}default:{return false}}}}t._getMountedRootCount=_getMountedRootCount;t.collectCustomHooksForSignature=collectCustomHooksForSignature;t.createSignatureFunctionForTransform=createSignatureFunctionForTransform;t.findAffectedHostInstances=findAffectedHostInstances;t.getFamilyByID=getFamilyByID;t.getFamilyByType=getFamilyByType;t.hasUnrecoverableErrors=hasUnrecoverableErrors;t.injectIntoGlobalHook=injectIntoGlobalHook;t.isLikelyComponentType=isLikelyComponentType;t.performReactRefresh=performReactRefresh;t.register=register;t.setSignature=setSignature})()}},665:function(){
12
+ /**
13
+ * @license React
14
+ * react-refresh-runtime.production.min.js
13
15
  *
14
16
  * Copyright (c) Facebook, Inc. and its affiliates.
15
17
  *
16
18
  * This source code is licensed under the MIT license found in the
17
19
  * LICENSE file in the root directory of this source tree.
18
20
  */
19
- e.exports=function(e){function t(e,r){var n=e.scope.generateUidIdentifier("c");c.has(e)||c.set(e,[]);c.get(e).push({handle:n,persistentID:r});return n}function u(e){return"string"===typeof e&&"A"<=e[0]&&"Z">=e[0]}function m(e,r,n){var a=r.node;switch(a.type){case"Identifier":if(!u(a.name))break;n(e,a,null);return!0;case"FunctionDeclaration":return n(e,a.id,null),!0;case"ArrowFunctionExpression":if("ArrowFunctionExpression"===a.body.type)break;n(e,a,r);return!0;case"FunctionExpression":return n(e,a,r),!0;case"CallExpression":var i=r.get("arguments");if(void 0===i||0===i.length)break;var s=r.get("callee");switch(s.node.type){case"MemberExpression":case"Identifier":s=s.getSource();if(!m(e+"$"+s,i[0],n))return!1;n(e,a,r);return!0;default:return!1}case"VariableDeclarator":if(i=a.init,null!==i&&(s=a.id.name,u(s))){switch(i.type){case"ArrowFunctionExpression":case"FunctionExpression":break;case"CallExpression":a=i.callee;var o=a.type;if("Import"===o||"Identifier"===o&&(0===a.name.indexOf("require")||0===a.name.indexOf("import")))return!1;break;case"TaggedTemplateExpression":break;default:return!1}a=r.get("init");if(m(e,a,n))return!0;s=r.scope.getBinding(s);if(void 0===s)return;r=!1;s=s.referencePaths;for(o=0;o<s.length;o++){var c=s[o];if(!c.node||"JSXIdentifier"===c.node.type||"Identifier"===c.node.type){c=c.parent;if("JSXOpeningElement"===c.type)r=!0;else if("CallExpression"===c.type){c=c.callee;var l=void 0;switch(c.type){case"Identifier":l=c.name;break;case"MemberExpression":l=c.property.name}switch(l){case"createElement":case"jsx":case"jsxDEV":case"jsxs":r=!0}}if(r)return n(e,i,a),!0}}}}return!1}function x(e){e=h.get(e);return void 0===e?null:{key:e.map((function(e){return e.name+"{"+e.key+"}"})).join("\n"),customHooks:e.filter((function(e){e:switch(e.name){case"useState":case"React.useState":case"useReducer":case"React.useReducer":case"useEffect":case"React.useEffect":case"useLayoutEffect":case"React.useLayoutEffect":case"useMemo":case"React.useMemo":case"useCallback":case"React.useCallback":case"useRef":case"React.useRef":case"useContext":case"React.useContext":case"useImperativeHandle":case"React.useImperativeHandle":case"useDebugValue":case"React.useDebugValue":e=!0;break e;default:e=!1}return!e})).map((function(e){return i.cloneDeep(e.callee)}))}}function C(e){e=e.hub.file;var r=l.get(e);if(void 0!==r)return r;r=!1;for(var n=e.ast.comments,a=0;a<n.length;a++)if(-1!==n[a].value.indexOf("@refresh reset")){r=!0;break}l.set(e,r);return r}function w(e,a,s){var o=a.key;a=a.customHooks;var c=C(s.path),l=[];a.forEach((function(e){switch(e.type){case"MemberExpression":if("Identifier"===e.object.type)var r=e.object.name;break;case"Identifier":r=e.name}s.hasBinding(r)?l.push(e):c=!0}));a=o;false||r.emitFullSignatures||(a=n(113).createHash("sha1").update(o).digest("base64"));e=[e,i.stringLiteral(a)];(c||0<l.length)&&e.push(i.booleanLiteral(c));0<l.length&&e.push(i.functionExpression(null,[],i.blockStatement([i.returnStatement(i.arrayExpression(l))])));return e}function D(e){for(var r=[];;){if(!e)return r;var n=e.parentPath;if(!n)return r;if("AssignmentExpression"===n.node.type&&e.node===n.node.right)e=n;else if("CallExpression"===n.node.type&&e.node!==n.node.callee)r.push(n),e=n;else return r}}var r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};if("function"===typeof e.env){var a=e.env();if("development"!==a&&!r.skipEnvCheck)throw Error('React Refresh Babel transform should only be enabled in development environment. Instead, the environment is: "'+a+'". If you want to override this check, pass {skipEnvCheck: true} as plugin options.')}var i=e.types,s=i.identifier(r.refreshReg||"$RefreshReg$"),o=i.identifier(r.refreshSig||"$RefreshSig$"),c=new Map,l=new WeakMap,p=new WeakSet,f=new WeakSet,d=new WeakSet,h=new WeakMap,v={CallExpression:function(e){var r=e.node.callee,n=null;switch(r.type){case"Identifier":n=r.name;break;case"MemberExpression":n=r.property.name}if(null!==n&&/^use[A-Z]/.test(n)&&(r=e.scope.getFunctionParent(),null!==r)){r=r.block;h.has(r)||h.set(r,[]);r=h.get(r);var a="";"VariableDeclarator"===e.parent.type&&(a=e.parentPath.get("id").getSource());var i=e.get("arguments");"useState"===n&&0<i.length?a+="("+i[0].getSource()+")":"useReducer"===n&&1<i.length&&(a+="("+i[1].getSource()+")");r.push({callee:e.node.callee,name:n,key:a})}}};return{visitor:{ExportDefaultDeclaration:function(e){var r=e.node,n=r.declaration,a=e.get("declaration");if("CallExpression"===n.type&&!p.has(r)){p.add(r);var s=e.parentPath;m("%default%",a,(function(e,r,n){null!==n&&(e=t(s,e),n.replaceWith(i.assignmentExpression("=",e,r)))}))}},FunctionDeclaration:{enter:function(e){var r=e.node,n="";switch(e.parent.type){case"Program":var a=e;var s=e.parentPath;break;case"TSModuleBlock":a=e;s=a.parentPath.parentPath;break;case"ExportNamedDeclaration":a=e.parentPath;s=a.parentPath;break;case"ExportDefaultDeclaration":a=e.parentPath;s=a.parentPath;break;default:return}if("TSModuleBlock"===e.parent.type||"ExportNamedDeclaration"===e.parent.type)for(;"Program"!==s.type;){if("TSModuleDeclaration"===s.type){if("Program"!==s.parentPath.type&&"ExportNamedDeclaration"!==s.parentPath.type)return;n=s.node.id.name+"$"+n}s=s.parentPath}var o=r.id;null!==o&&(o=o.name,u(o)&&!p.has(r)&&(p.add(r),m(n+o,e,(function(e,r){e=t(s,e);a.insertAfter(i.expressionStatement(i.assignmentExpression("=",e,r)))}))))},exit:function(e){var r=e.node,n=r.id;if(null!==n){var a=x(r);if(null!==a&&!f.has(r)){f.add(r);r=e.scope.generateUidIdentifier("_s");e.scope.parent.push({id:r,init:i.callExpression(o,[])});e.get("body").unshiftContainer("body",i.expressionStatement(i.callExpression(r,[])));var s=null;e.find((function(e){if(e.parentPath.isBlock())return s=e,!0}));null!==s&&s.insertAfter(i.expressionStatement(i.callExpression(r,w(n,a,s.scope))))}}}},"ArrowFunctionExpression|FunctionExpression":{exit:function(e){var r=e.node,n=x(r);if(null!==n&&!f.has(r)){f.add(r);var a=e.scope.generateUidIdentifier("_s");e.scope.parent.push({id:a,init:i.callExpression(o,[])});"BlockStatement"!==e.node.body.type&&(e.node.body=i.blockStatement([i.returnStatement(e.node.body)]));e.get("body").unshiftContainer("body",i.expressionStatement(i.callExpression(a,[])));if("VariableDeclarator"===e.parent.type){var s=null;e.find((function(e){if(e.parentPath.isBlock())return s=e,!0}));null!==s&&s.insertAfter(i.expressionStatement(i.callExpression(a,w(e.parent.id,n,s.scope))))}else[e].concat(D(e)).forEach((function(e){e.replaceWith(i.callExpression(a,w(e.node,n,e.scope)))}))}}},VariableDeclaration:function(e){var r=e.node,n="";switch(e.parent.type){case"Program":var a=e;var s=e.parentPath;break;case"TSModuleBlock":a=e;s=a.parentPath.parentPath;break;case"ExportNamedDeclaration":a=e.parentPath;s=a.parentPath;break;case"ExportDefaultDeclaration":a=e.parentPath;s=a.parentPath;break;default:return}if("TSModuleBlock"===e.parent.type||"ExportNamedDeclaration"===e.parent.type)for(;"Program"!==s.type;){if("TSModuleDeclaration"===s.type){if("Program"!==s.parentPath.type&&"ExportNamedDeclaration"!==s.parentPath.type)return;n=s.node.id.name+"$"+n}s=s.parentPath}if(!p.has(r)&&(p.add(r),e=e.get("declarations"),1===e.length)){var o=e[0];m(n+o.node.id.name,o,(function(e,r,n){null!==n&&(e=t(s,e),"VariableDeclarator"===n.parent.type?a.insertAfter(i.expressionStatement(i.assignmentExpression("=",e,o.node.id))):n.replaceWith(i.assignmentExpression("=",e,r)))}))}},Program:{enter:function(e){e.traverse(v)},exit:function(e){var r=c.get(e);if(void 0!==r){var n=e.node;if(!d.has(n)){d.add(n);c.delete(e);var a=[];e.pushContainer("body",i.variableDeclaration("var",a));r.forEach((function(r){var n=r.handle;e.pushContainer("body",i.expressionStatement(i.callExpression(s,[n,i.stringLiteral(r.persistentID)])));a.push(i.variableDeclarator(n))}))}}}}}}}},113:function(e){e.exports=require("crypto")}};var r={};function __nccwpck_require__(n){var a=r[n];if(a!==undefined){return a.exports}var i=r[n]={exports:{}};var s=true;try{e[n](i,i.exports,__nccwpck_require__);s=false}finally{if(s)delete r[n]}return i.exports}!function(){__nccwpck_require__.n=function(e){var r=e&&e.__esModule?function(){return e["default"]}:function(){return e};__nccwpck_require__.d(r,{a:r});return r}}();!function(){__nccwpck_require__.d=function(e,r){for(var n in r){if(__nccwpck_require__.o(r,n)&&!__nccwpck_require__.o(e,n)){Object.defineProperty(e,n,{enumerable:true,get:r[n]})}}}}();!function(){__nccwpck_require__.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)}}();!function(){__nccwpck_require__.r=function(e){if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(e,"__esModule",{value:true})}}();if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var n={};!function(){__nccwpck_require__.r(n);var e=__nccwpck_require__(83);var r=__nccwpck_require__.n(e);n["default"]=r()}();module.exports=n})();
21
+ throw Error("React Refresh runtime should not be included in the production bundle.")},999:function(e,t,r){if(process.env.NODE_ENV==="production"){e.exports=r(665)}else{e.exports=r(653)}}};var t={};function __nccwpck_require__(r){var n=t[r];if(n!==undefined){return n.exports}var o=t[r]={exports:{}};var i=true;try{e[r](o,o.exports,__nccwpck_require__);i=false}finally{if(i)delete t[r]}return o.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var r=__nccwpck_require__(999);module.exports=r})();
@@ -0,0 +1 @@
1
+ {"name":"react-refresh","license":"MIT"}