vite 2.7.1 → 2.7.5

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.

Potentially problematic release.


This version of vite might be problematic. Click here for more details.

Files changed (91) hide show
  1. package/CHANGELOG.md +49 -0
  2. package/LICENSE.md +41 -11
  3. package/dist/client/client.mjs +1 -1
  4. package/dist/client/client.mjs.map +1 -1
  5. package/dist/node/build.d.ts +200 -0
  6. package/dist/node/chunks/{dep-76c973d0.js → dep-05f535a1.js} +2 -2
  7. package/dist/node/chunks/dep-05f535a1.js.map +1 -0
  8. package/dist/node/chunks/{dep-58399509.js → dep-2d8e2cb1.js} +1 -1
  9. package/dist/node/chunks/dep-2d8e2cb1.js.map +1 -0
  10. package/dist/node/chunks/{dep-8ff556de.js → dep-4b67bc15.js} +79 -61
  11. package/dist/node/chunks/dep-4b67bc15.js.map +1 -0
  12. package/dist/node/chunks/{dep-51488e9f.js → dep-bab9c4d6.js} +2 -2
  13. package/dist/node/chunks/{dep-51488e9f.js.map → dep-bab9c4d6.js.map} +1 -1
  14. package/dist/node/chunks/{dep-3daf770c.js → dep-bc5f477e.js} +665 -209
  15. package/dist/node/chunks/dep-bc5f477e.js.map +1 -0
  16. package/dist/node/cli.d.ts +1 -0
  17. package/dist/node/cli.js +4 -4
  18. package/dist/node/cli.js.map +1 -1
  19. package/dist/node/config.d.ts +202 -0
  20. package/dist/node/constants.d.ts +33 -0
  21. package/dist/node/http.d.ts +84 -0
  22. package/dist/node/importGlob.d.ts +9 -0
  23. package/dist/node/index.d.ts +317 -322
  24. package/dist/node/index.js +1 -1
  25. package/dist/node/logger.d.ts +35 -0
  26. package/dist/node/optimizer/esbuildDepPlugin.d.ts +4 -0
  27. package/dist/node/optimizer/index.d.ts +66 -0
  28. package/dist/node/optimizer/registerMissing.d.ts +2 -0
  29. package/dist/node/optimizer/scan.d.ts +9 -0
  30. package/dist/node/packages.d.ts +25 -0
  31. package/dist/node/plugin.d.ts +115 -0
  32. package/dist/node/plugins/asset.d.ts +40 -0
  33. package/dist/node/plugins/assetImportMetaUrl.d.ts +13 -0
  34. package/dist/node/plugins/clientInjections.d.ts +7 -0
  35. package/dist/node/plugins/css.d.ts +70 -0
  36. package/dist/node/plugins/dataUri.d.ts +5 -0
  37. package/dist/node/plugins/define.d.ts +3 -0
  38. package/dist/node/plugins/esbuild.d.ts +15 -0
  39. package/dist/node/plugins/html.d.ts +102 -0
  40. package/dist/node/plugins/importAnalysis.d.ts +46 -0
  41. package/dist/node/plugins/importAnalysisBuild.d.ts +15 -0
  42. package/dist/node/plugins/index.d.ts +3 -0
  43. package/dist/node/plugins/json.d.ts +22 -0
  44. package/dist/node/plugins/loadFallback.d.ts +5 -0
  45. package/dist/node/plugins/manifest.d.ts +14 -0
  46. package/dist/node/plugins/modulePreloadPolyfill.d.ts +4 -0
  47. package/dist/node/plugins/preAlias.d.ts +5 -0
  48. package/dist/node/plugins/reporter.d.ts +3 -0
  49. package/dist/node/plugins/resolve.d.ts +38 -0
  50. package/dist/node/plugins/ssrRequireHook.d.ts +12 -0
  51. package/dist/node/plugins/terser.d.ts +3 -0
  52. package/dist/node/plugins/wasm.d.ts +3 -0
  53. package/dist/node/plugins/worker.d.ts +3 -0
  54. package/dist/node/preview.d.ts +31 -0
  55. package/dist/node/server/hmr.d.ts +37 -0
  56. package/dist/node/server/index.d.ts +215 -0
  57. package/dist/node/server/middlewares/base.d.ts +3 -0
  58. package/dist/node/server/middlewares/error.d.ts +8 -0
  59. package/dist/node/server/middlewares/indexHtml.d.ts +4 -0
  60. package/dist/node/server/middlewares/proxy.d.ts +20 -0
  61. package/dist/node/server/middlewares/spaFallback.d.ts +2 -0
  62. package/dist/node/server/middlewares/static.d.ts +6 -0
  63. package/dist/node/server/middlewares/time.d.ts +2 -0
  64. package/dist/node/server/middlewares/transform.d.ts +3 -0
  65. package/dist/node/server/moduleGraph.d.ts +53 -0
  66. package/dist/node/server/openBrowser.d.ts +15 -0
  67. package/dist/node/server/pluginContainer.d.ts +37 -0
  68. package/dist/node/server/searchRoot.d.ts +8 -0
  69. package/dist/node/server/send.d.ts +4 -0
  70. package/dist/node/server/sourcemap.d.ts +8 -0
  71. package/dist/node/server/transformRequest.d.ts +14 -0
  72. package/dist/node/server/ws.d.ts +14 -0
  73. package/dist/node/ssr/ssrExternal.d.ts +7 -0
  74. package/dist/node/ssr/ssrManifestPlugin.d.ts +3 -0
  75. package/dist/node/ssr/ssrModuleLoader.d.ts +7 -0
  76. package/dist/node/ssr/ssrStacktrace.d.ts +3 -0
  77. package/dist/node/ssr/ssrTransform.d.ts +8 -0
  78. package/dist/node/utils.d.ts +114 -0
  79. package/package.json +15 -15
  80. package/src/client/client.ts +3 -3
  81. package/src/client/overlay.ts +1 -1
  82. package/types/alias.d.ts +1 -1
  83. package/types/chokidar.d.ts +2 -2
  84. package/types/http-proxy.d.ts +4 -4
  85. package/types/importMeta.d.ts +6 -0
  86. package/types/shims.d.ts +5 -5
  87. package/types/ws.d.ts +284 -288
  88. package/dist/node/chunks/dep-3daf770c.js.map +0 -1
  89. package/dist/node/chunks/dep-58399509.js.map +0 -1
  90. package/dist/node/chunks/dep-76c973d0.js.map +0 -1
  91. package/dist/node/chunks/dep-8ff556de.js.map +0 -1
@@ -2171,7 +2171,7 @@ function setup(env) {
2171
2171
 
2172
2172
  /**
2173
2173
  * Selects a color for a debug namespace
2174
- * @param {String} namespace The namespace string for the for the debug instance to be colored
2174
+ * @param {String} namespace The namespace string for the debug instance to be colored
2175
2175
  * @return {Number|String} An ANSI color code for the given namespace
2176
2176
  * @api private
2177
2177
  */
@@ -3760,7 +3760,7 @@ function buildSourceMapTree(input, loader, relativeRoot) {
3760
3760
  const maps = asArray(input).map(decodeSourceMap);
3761
3761
  const map = maps.pop();
3762
3762
  for (let i = 0; i < maps.length; i++) {
3763
- if (maps[i].sources.length !== 1) {
3763
+ if (maps[i].sources.length > 1) {
3764
3764
  throw new Error(`Transformation map ${i} must have exactly one source file.\n` +
3765
3765
  'Did you specify these with the most recent transformation maps first?');
3766
3766
  }
@@ -4316,8 +4316,8 @@ function arraify(target) {
4316
4316
  function toUpperCaseDriveLetter(pathName) {
4317
4317
  return pathName.replace(/^\w:/, (letter) => letter.toUpperCase());
4318
4318
  }
4319
- const multilineCommentsRE = /\/\*(.|[\r\n])*?\*\//gm;
4320
- const singlelineCommentsRE = /\/\/.*/g;
4319
+ const multilineCommentsRE$1 = /\/\*(.|[\r\n])*?\*\//gm;
4320
+ const singlelineCommentsRE$1 = /\/\/.*/g;
4321
4321
  const usingDynamicImport = typeof jest === 'undefined';
4322
4322
  /**
4323
4323
  * Dynamically import files. It will make sure it's not being compiled away by TS/Rollup.
@@ -5712,7 +5712,7 @@ MagicString.prototype.trimStart = function trimStart (charType) {
5712
5712
  * @param typeMap [Object] Map of MIME type -> Array[extensions]
5713
5713
  * @param ...
5714
5714
  */
5715
- function Mime$3() {
5715
+ function Mime$1() {
5716
5716
  this._types = Object.create(null);
5717
5717
  this._extensions = Object.create(null);
5718
5718
 
@@ -5744,7 +5744,7 @@ function Mime$3() {
5744
5744
  * @param map (Object) type definitions
5745
5745
  * @param force (Boolean) if true, force overriding of existing definitions
5746
5746
  */
5747
- Mime$3.prototype.define = function(typeMap, force) {
5747
+ Mime$1.prototype.define = function(typeMap, force) {
5748
5748
  for (let type in typeMap) {
5749
5749
  let extensions = typeMap[type].map(function(t) {
5750
5750
  return t.toLowerCase();
@@ -5783,7 +5783,7 @@ Mime$3.prototype.define = function(typeMap, force) {
5783
5783
  /**
5784
5784
  * Lookup a mime type based on extension
5785
5785
  */
5786
- Mime$3.prototype.getType = function(path) {
5786
+ Mime$1.prototype.getType = function(path) {
5787
5787
  path = String(path);
5788
5788
  let last = path.replace(/^.*[/\\]/, '').toLowerCase();
5789
5789
  let ext = last.replace(/^.*\./, '').toLowerCase();
@@ -5797,17 +5797,17 @@ Mime$3.prototype.getType = function(path) {
5797
5797
  /**
5798
5798
  * Return file extension associated with a mime type
5799
5799
  */
5800
- Mime$3.prototype.getExtension = function(type) {
5800
+ Mime$1.prototype.getExtension = function(type) {
5801
5801
  type = /^\s*([^;\s]*)/.test(type) && RegExp.$1;
5802
5802
  return type && this._extensions[type.toLowerCase()] || null;
5803
5803
  };
5804
5804
 
5805
- var Mime_1$1 = Mime$3;
5805
+ var Mime_1 = Mime$1;
5806
5806
 
5807
- var standard$1 = {"application/andrew-inset":["ez"],"application/applixware":["aw"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomdeleted+xml":["atomdeleted"],"application/atomsvc+xml":["atomsvc"],"application/atsc-dwd+xml":["dwd"],"application/atsc-held+xml":["held"],"application/atsc-rsat+xml":["rsat"],"application/bdoc":["bdoc"],"application/calendar+xml":["xcs"],"application/ccxml+xml":["ccxml"],"application/cdfx+xml":["cdfx"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cu-seeme":["cu"],"application/dash+xml":["mpd"],"application/davmount+xml":["davmount"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["es","ecma"],"application/emma+xml":["emma"],"application/emotionml+xml":["emotionml"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/express":["exp"],"application/fdt+xml":["fdt"],"application/font-tdpfr":["pfr"],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hjson":["hjson"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/its+xml":["its"],"application/java-archive":["jar","war","ear"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["js","mjs"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/ld+json":["jsonld"],"application/lgr+xml":["lgr"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/manifest+json":["webmanifest"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mmt-aei+xml":["maei"],"application/mmt-usd+xml":["musd"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["mp4s","m4p"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/n-quads":["nq"],"application/n-triples":["nt"],"application/node":["cjs"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg"],"application/oxps":["oxps"],"application/p2p-overlay+xml":["relo"],"application/patch-ops-error+xml":["xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-signature":["asc","sig"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/provenance+xml":["provx"],"application/pskc+xml":["pskcxml"],"application/raml+yaml":["raml"],"application/rdf+xml":["rdf","owl"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/route-apd+xml":["rapd"],"application/route-s-tsid+xml":["sls"],"application/route-usd+xml":["rusd"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/senml+xml":["senmlx"],"application/sensml+xml":["sensmlx"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/sieve":["siv","sieve"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/swid+xml":["swidtag"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/toml":["toml"],"application/trig":["trig"],"application/ttml+xml":["ttml"],"application/ubjson":["ubj"],"application/urc-ressheet+xml":["rsheet"],"application/urc-targetdesc+xml":["td"],"application/voicexml+xml":["vxml"],"application/wasm":["wasm"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/xaml+xml":["xaml"],"application/xcap-att+xml":["xav"],"application/xcap-caps+xml":["xca"],"application/xcap-diff+xml":["xdf"],"application/xcap-el+xml":["xel"],"application/xcap-ns+xml":["xns"],"application/xenc+xml":["xenc"],"application/xhtml+xml":["xhtml","xht"],"application/xliff+xml":["xlf"],"application/xml":["xml","xsl","xsd","rng"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["*xsl","xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"audio/3gpp":["*3gpp"],"audio/adpcm":["adp"],"audio/amr":["amr"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mobile-xmf":["mxmf"],"audio/mp3":["*mp3"],"audio/mp4":["m4a","mp4a"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx","opus"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/wav":["wav"],"audio/wave":["*wav"],"audio/webm":["weba"],"audio/xm":["xm"],"font/collection":["ttc"],"font/otf":["otf"],"font/ttf":["ttf"],"font/woff":["woff"],"font/woff2":["woff2"],"image/aces":["exr"],"image/apng":["apng"],"image/avif":["avif"],"image/bmp":["bmp"],"image/cgm":["cgm"],"image/dicom-rle":["drle"],"image/emf":["emf"],"image/fits":["fits"],"image/g3fax":["g3"],"image/gif":["gif"],"image/heic":["heic"],"image/heic-sequence":["heics"],"image/heif":["heif"],"image/heif-sequence":["heifs"],"image/hej2k":["hej2"],"image/hsj2":["hsj2"],"image/ief":["ief"],"image/jls":["jls"],"image/jp2":["jp2","jpg2"],"image/jpeg":["jpeg","jpg","jpe"],"image/jph":["jph"],"image/jphc":["jhc"],"image/jpm":["jpm"],"image/jpx":["jpx","jpf"],"image/jxr":["jxr"],"image/jxra":["jxra"],"image/jxrs":["jxrs"],"image/jxs":["jxs"],"image/jxsc":["jxsc"],"image/jxsi":["jxsi"],"image/jxss":["jxss"],"image/ktx":["ktx"],"image/ktx2":["ktx2"],"image/png":["png"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/t38":["t38"],"image/tiff":["tif","tiff"],"image/tiff-fx":["tfx"],"image/webp":["webp"],"image/wmf":["wmf"],"message/disposition-notification":["disposition-notification"],"message/global":["u8msg"],"message/global-delivery-status":["u8dsn"],"message/global-disposition-notification":["u8mdn"],"message/global-headers":["u8hdr"],"message/rfc822":["eml","mime"],"model/3mf":["3mf"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/mesh":["msh","mesh","silo"],"model/mtl":["mtl"],"model/obj":["obj"],"model/step+xml":["stpx"],"model/step+zip":["stpz"],"model/step-xml+zip":["stpxz"],"model/stl":["stl"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["*x3db","x3dbz"],"model/x3d+fastinfoset":["x3db"],"model/x3d+vrml":["*x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"model/x3d-vrml":["x3dv"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["markdown","md"],"text/mathml":["mml"],"text/mdx":["mdx"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/richtext":["rtx"],"text/rtf":["*rtf"],"text/sgml":["sgml","sgm"],"text/shex":["shex"],"text/slim":["slim","slm"],"text/spdx":["spdx"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vtt":["vtt"],"text/xml":["*xml"],"text/yaml":["yaml","yml"],"video/3gpp":["3gp","3gpp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/iso.segment":["m4s"],"video/jpeg":["jpgv"],"video/jpm":["*jpm","jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/webm":["webm"]};
5807
+ var standard = {"application/andrew-inset":["ez"],"application/applixware":["aw"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomdeleted+xml":["atomdeleted"],"application/atomsvc+xml":["atomsvc"],"application/atsc-dwd+xml":["dwd"],"application/atsc-held+xml":["held"],"application/atsc-rsat+xml":["rsat"],"application/bdoc":["bdoc"],"application/calendar+xml":["xcs"],"application/ccxml+xml":["ccxml"],"application/cdfx+xml":["cdfx"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cu-seeme":["cu"],"application/dash+xml":["mpd"],"application/davmount+xml":["davmount"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["es","ecma"],"application/emma+xml":["emma"],"application/emotionml+xml":["emotionml"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/express":["exp"],"application/fdt+xml":["fdt"],"application/font-tdpfr":["pfr"],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hjson":["hjson"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/its+xml":["its"],"application/java-archive":["jar","war","ear"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["js","mjs"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/ld+json":["jsonld"],"application/lgr+xml":["lgr"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/manifest+json":["webmanifest"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mmt-aei+xml":["maei"],"application/mmt-usd+xml":["musd"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["mp4s","m4p"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/n-quads":["nq"],"application/n-triples":["nt"],"application/node":["cjs"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg"],"application/oxps":["oxps"],"application/p2p-overlay+xml":["relo"],"application/patch-ops-error+xml":["xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-signature":["asc","sig"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/provenance+xml":["provx"],"application/pskc+xml":["pskcxml"],"application/raml+yaml":["raml"],"application/rdf+xml":["rdf","owl"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/route-apd+xml":["rapd"],"application/route-s-tsid+xml":["sls"],"application/route-usd+xml":["rusd"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/senml+xml":["senmlx"],"application/sensml+xml":["sensmlx"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/sieve":["siv","sieve"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/swid+xml":["swidtag"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/toml":["toml"],"application/trig":["trig"],"application/ttml+xml":["ttml"],"application/ubjson":["ubj"],"application/urc-ressheet+xml":["rsheet"],"application/urc-targetdesc+xml":["td"],"application/voicexml+xml":["vxml"],"application/wasm":["wasm"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/xaml+xml":["xaml"],"application/xcap-att+xml":["xav"],"application/xcap-caps+xml":["xca"],"application/xcap-diff+xml":["xdf"],"application/xcap-el+xml":["xel"],"application/xcap-ns+xml":["xns"],"application/xenc+xml":["xenc"],"application/xhtml+xml":["xhtml","xht"],"application/xliff+xml":["xlf"],"application/xml":["xml","xsl","xsd","rng"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["*xsl","xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"audio/3gpp":["*3gpp"],"audio/adpcm":["adp"],"audio/amr":["amr"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mobile-xmf":["mxmf"],"audio/mp3":["*mp3"],"audio/mp4":["m4a","mp4a"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx","opus"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/wav":["wav"],"audio/wave":["*wav"],"audio/webm":["weba"],"audio/xm":["xm"],"font/collection":["ttc"],"font/otf":["otf"],"font/ttf":["ttf"],"font/woff":["woff"],"font/woff2":["woff2"],"image/aces":["exr"],"image/apng":["apng"],"image/avif":["avif"],"image/bmp":["bmp"],"image/cgm":["cgm"],"image/dicom-rle":["drle"],"image/emf":["emf"],"image/fits":["fits"],"image/g3fax":["g3"],"image/gif":["gif"],"image/heic":["heic"],"image/heic-sequence":["heics"],"image/heif":["heif"],"image/heif-sequence":["heifs"],"image/hej2k":["hej2"],"image/hsj2":["hsj2"],"image/ief":["ief"],"image/jls":["jls"],"image/jp2":["jp2","jpg2"],"image/jpeg":["jpeg","jpg","jpe"],"image/jph":["jph"],"image/jphc":["jhc"],"image/jpm":["jpm"],"image/jpx":["jpx","jpf"],"image/jxr":["jxr"],"image/jxra":["jxra"],"image/jxrs":["jxrs"],"image/jxs":["jxs"],"image/jxsc":["jxsc"],"image/jxsi":["jxsi"],"image/jxss":["jxss"],"image/ktx":["ktx"],"image/ktx2":["ktx2"],"image/png":["png"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/t38":["t38"],"image/tiff":["tif","tiff"],"image/tiff-fx":["tfx"],"image/webp":["webp"],"image/wmf":["wmf"],"message/disposition-notification":["disposition-notification"],"message/global":["u8msg"],"message/global-delivery-status":["u8dsn"],"message/global-disposition-notification":["u8mdn"],"message/global-headers":["u8hdr"],"message/rfc822":["eml","mime"],"model/3mf":["3mf"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/mesh":["msh","mesh","silo"],"model/mtl":["mtl"],"model/obj":["obj"],"model/step+xml":["stpx"],"model/step+zip":["stpz"],"model/step-xml+zip":["stpxz"],"model/stl":["stl"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["*x3db","x3dbz"],"model/x3d+fastinfoset":["x3db"],"model/x3d+vrml":["*x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"model/x3d-vrml":["x3dv"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["markdown","md"],"text/mathml":["mml"],"text/mdx":["mdx"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/richtext":["rtx"],"text/rtf":["*rtf"],"text/sgml":["sgml","sgm"],"text/shex":["shex"],"text/slim":["slim","slm"],"text/spdx":["spdx"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vtt":["vtt"],"text/xml":["*xml"],"text/yaml":["yaml","yml"],"video/3gpp":["3gp","3gpp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/iso.segment":["m4s"],"video/jpeg":["jpgv"],"video/jpm":["*jpm","jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/webm":["webm"]};
5808
5808
 
5809
- let Mime$2 = Mime_1$1;
5810
- var lite$1 = new Mime$2(standard$1);
5809
+ let Mime = Mime_1;
5810
+ var lite = new Mime(standard);
5811
5811
 
5812
5812
  const assetUrlRE = /__VITE_ASSET__([a-z\d]{8})__(?:\$_(.*?)__)?/g;
5813
5813
  const rawRE = /(\?|&)raw(?:&|$)/;
@@ -6033,7 +6033,7 @@ async function fileToBuiltUrl(id, config, pluginContext, skipPublicCheck = false
6033
6033
  (!file.endsWith('.svg') &&
6034
6034
  content.length < Number(config.build.assetsInlineLimit))) {
6035
6035
  // base64 inlined as a string
6036
- url = `data:${lite$1.getType(file)};base64,${content.toString('base64')}`;
6036
+ url = `data:${lite.getType(file)};base64,${content.toString('base64')}`;
6037
6037
  }
6038
6038
  else {
6039
6039
  // emit as asset
@@ -20099,13 +20099,14 @@ function cssPostPlugin(config) {
20099
20099
  return `export default ${JSON.stringify(css)}`;
20100
20100
  }
20101
20101
  return [
20102
- `import { updateStyle, removeStyle } from ${JSON.stringify(path__default.posix.join(config.base, CLIENT_PUBLIC_PATH))}`,
20103
- `const id = ${JSON.stringify(id)}`,
20104
- `const css = ${JSON.stringify(css)}`,
20105
- `updateStyle(id, css)`,
20102
+ `import { updateStyle as __vite__updateStyle, removeStyle as __vite__removeStyle } from ${JSON.stringify(path__default.posix.join(config.base, CLIENT_PUBLIC_PATH))}`,
20103
+ `const __vite__id = ${JSON.stringify(id)}`,
20104
+ `const __vite__css = ${JSON.stringify(css)}`,
20105
+ `__vite__updateStyle(__vite__id, __vite__css)`,
20106
20106
  // css modules exports change on edit so it can't self accept
20107
- `${modulesCode || `import.meta.hot.accept()\nexport default css`}`,
20108
- `import.meta.hot.prune(() => removeStyle(id))`
20107
+ `${modulesCode ||
20108
+ `import.meta.hot.accept()\nexport default __vite__css`}`,
20109
+ `import.meta.hot.prune(() => __vite__removeStyle(__vite__id))`
20109
20110
  ].join('\n');
20110
20111
  }
20111
20112
  }
@@ -20382,7 +20383,7 @@ async function compileCSS(id, code, config, urlReplacer, atImportResolvers, serv
20382
20383
  const postcssOptions = (postcssConfig && postcssConfig.options) || {};
20383
20384
  const postcssPlugins = postcssConfig && postcssConfig.plugins ? postcssConfig.plugins.slice() : [];
20384
20385
  if (needInlineImport) {
20385
- postcssPlugins.unshift((await Promise.resolve().then(function () { return require('./dep-58399509.js'); }).then(function (n) { return n.index; })).default({
20386
+ postcssPlugins.unshift((await Promise.resolve().then(function () { return require('./dep-2d8e2cb1.js'); }).then(function (n) { return n.index; })).default({
20386
20387
  async resolve(id, basedir) {
20387
20388
  const resolved = await atImportResolvers.css(id, path__default.join(basedir, '*'));
20388
20389
  if (resolved) {
@@ -20396,7 +20397,7 @@ async function compileCSS(id, code, config, urlReplacer, atImportResolvers, serv
20396
20397
  replacer: urlReplacer
20397
20398
  }));
20398
20399
  if (isModule) {
20399
- postcssPlugins.unshift((await Promise.resolve().then(function () { return require('./dep-76c973d0.js'); }).then(function (n) { return n.index; })).default({
20400
+ postcssPlugins.unshift((await Promise.resolve().then(function () { return require('./dep-05f535a1.js'); }).then(function (n) { return n.index; })).default({
20400
20401
  ...modulesOptions,
20401
20402
  getJSON(cssFileName, _modules, outputFileName) {
20402
20403
  modules = _modules;
@@ -20976,7 +20977,34 @@ function lexGlobPattern(code, pos) {
20976
20977
  throw new Error('unknown import.meta.glob lexer state');
20977
20978
  }
20978
20979
  }
20979
- return [pattern, code.indexOf(`)`, i) + 1];
20980
+ const endIndex = getEndIndex(code, i);
20981
+ return [pattern, endIndex + 1];
20982
+ }
20983
+ // reg without the 'g' option, only matches the first match
20984
+ const multilineCommentsRE = /\/\*(.|[\r\n])*?\*\//m;
20985
+ const singlelineCommentsRE = /\/\/.*/;
20986
+ function getEndIndex(code, i) {
20987
+ var _a;
20988
+ const findStart = i;
20989
+ const endIndex = code.indexOf(`)`, findStart);
20990
+ const subCode = code.substring(findStart);
20991
+ const matched = (_a = subCode.match(singlelineCommentsRE)) !== null && _a !== void 0 ? _a : subCode.match(multilineCommentsRE);
20992
+ if (!matched) {
20993
+ return endIndex;
20994
+ }
20995
+ const str = matched[0];
20996
+ const index = matched.index;
20997
+ if (!index) {
20998
+ return endIndex;
20999
+ }
21000
+ const commentStart = findStart + index;
21001
+ const commentEnd = commentStart + str.length;
21002
+ if (endIndex > commentStart && endIndex < commentEnd) {
21003
+ return getEndIndex(code, commentEnd);
21004
+ }
21005
+ else {
21006
+ return endIndex;
21007
+ }
20980
21008
  }
20981
21009
  function error$3(pos) {
20982
21010
  const err = new Error(`import.meta.glob() can only accept string literals.`);
@@ -21342,7 +21370,7 @@ function htmlInlineScriptProxyPlugin(config) {
21342
21370
  const file = cleanUrl(id);
21343
21371
  const url = file.replace(normalizePath$4(config.root), '');
21344
21372
  const result = htmlProxyMap.get(config).get(url)[index];
21345
- if (result) {
21373
+ if (typeof result === 'string') {
21346
21374
  return result;
21347
21375
  }
21348
21376
  else {
@@ -21374,7 +21402,7 @@ const assetAttrsConfig = {
21374
21402
  const isAsyncScriptMap = new WeakMap();
21375
21403
  async function traverseHtml(html, filePath, visitor) {
21376
21404
  // lazy load compiler
21377
- const { parse, transform } = await Promise.resolve().then(function () { return require('./dep-8ff556de.js'); }).then(function (n) { return n.compilerDom_cjs; });
21405
+ const { parse, transform } = await Promise.resolve().then(function () { return require('./dep-4b67bc15.js'); }).then(function (n) { return n.compilerDom_cjs; });
21378
21406
  // @vue/compiler-core doesn't like lowercase doctypes
21379
21407
  html = html.replace(/<!doctype\s/i, '<!DOCTYPE ');
21380
21408
  try {
@@ -21384,12 +21412,7 @@ async function traverseHtml(html, filePath, visitor) {
21384
21412
  });
21385
21413
  }
21386
21414
  catch (e) {
21387
- const parseError = {
21388
- loc: filePath,
21389
- frame: '',
21390
- ...formatParseError(e, filePath, html)
21391
- };
21392
- throw new Error(`Unable to parse ${JSON.stringify(parseError.loc)}\n${parseError.frame}`);
21415
+ handleParseError(e, html, filePath);
21393
21416
  }
21394
21417
  }
21395
21418
  function getScriptInfo(node) {
@@ -21412,17 +21435,28 @@ function getScriptInfo(node) {
21412
21435
  }
21413
21436
  return { src, isModule, isAsync };
21414
21437
  }
21415
- function formatParseError(e, id, html) {
21416
- // normalize the error to rollup format
21417
- if (e.loc) {
21418
- e.frame = generateCodeFrame(html, e.loc.start.offset);
21419
- e.loc = {
21438
+ /**
21439
+ * Format Vue @type {CompilerError} to @type {RollupError}
21440
+ */
21441
+ function formatParseError(compilerError, id, html) {
21442
+ const formattedError = { ...compilerError };
21443
+ if (compilerError.loc) {
21444
+ formattedError.frame = generateCodeFrame(html, compilerError.loc.start.offset);
21445
+ formattedError.loc = {
21420
21446
  file: id,
21421
- line: e.loc.start.line,
21422
- column: e.loc.start.column
21447
+ line: compilerError.loc.start.line,
21448
+ column: compilerError.loc.start.column
21423
21449
  };
21424
21450
  }
21425
- return e;
21451
+ return formattedError;
21452
+ }
21453
+ function handleParseError(compilerError, html, filePath) {
21454
+ const parseError = {
21455
+ loc: filePath,
21456
+ frame: '',
21457
+ ...formatParseError(compilerError, filePath, html)
21458
+ };
21459
+ throw new Error(`Unable to parse HTML; ${compilerError.message}\n at ${JSON.stringify(parseError.loc)}\n${parseError.frame}`);
21426
21460
  }
21427
21461
  /**
21428
21462
  * Compiles index.html into an entry js module
@@ -21440,6 +21474,7 @@ function buildHtmlPlugin(config) {
21440
21474
  isAsyncScriptMap.set(config, new Map());
21441
21475
  },
21442
21476
  async transform(html, id) {
21477
+ var _a, _b;
21443
21478
  if (id.endsWith('.html')) {
21444
21479
  const publicPath = `/${slash$3(path__default.relative(config.root, id))}`;
21445
21480
  // pre-transform
@@ -21502,7 +21537,8 @@ function buildHtmlPlugin(config) {
21502
21537
  if (p.type === 6 /* ATTRIBUTE */ &&
21503
21538
  p.value &&
21504
21539
  assetAttrs.includes(p.name)) {
21505
- const url = p.value.content;
21540
+ // assetsUrl may be encodeURI
21541
+ const url = decodeURI(p.value.content);
21506
21542
  if (!isExcludedUrl(url)) {
21507
21543
  if (node.tag === 'link' && isCSSRequest(url)) {
21508
21544
  // CSS references, convert to import
@@ -21530,20 +21566,27 @@ function buildHtmlPlugin(config) {
21530
21566
  config.logger.warn(`\nMixed async and defer script modules in ${id}, output script will fallback to defer. Every script, including inline ones, need to be marked as async for your output script to be async.`);
21531
21567
  }
21532
21568
  // for each encountered asset url, rewrite original html so that it
21533
- // references the post-build location.
21569
+ // references the post-build location, ignoring empty attributes and
21570
+ // attributes that directly reference named output.
21571
+ const namedOutput = Object.keys(((_b = (_a = config === null || config === void 0 ? void 0 : config.build) === null || _a === void 0 ? void 0 : _a.rollupOptions) === null || _b === void 0 ? void 0 : _b.input) || {});
21534
21572
  for (const attr of assetUrls) {
21535
21573
  const value = attr.value;
21536
- try {
21537
- const url = attr.name === 'srcset'
21538
- ? await processSrcSet(value.content, ({ url }) => urlToBuiltUrl(url, id, config, this))
21539
- : await urlToBuiltUrl(value.content, id, config, this);
21540
- s.overwrite(value.loc.start.offset, value.loc.end.offset, `"${url}"`);
21541
- }
21542
- catch (e) {
21543
- // #1885 preload may be pointing to urls that do not exist
21544
- // locally on disk
21545
- if (e.code !== 'ENOENT') {
21546
- throw e;
21574
+ // assetsUrl may be encodeURI
21575
+ const content = decodeURI(value.content);
21576
+ if (content !== '' && // Empty attribute
21577
+ !namedOutput.includes(content) && // Direct reference to named output
21578
+ !namedOutput.includes(content.replace(/^\//, '')) // Allow for absolute references as named output can't be an absolute path
21579
+ ) {
21580
+ try {
21581
+ const url = attr.name === 'srcset'
21582
+ ? await processSrcSet(content, ({ url }) => urlToBuiltUrl(url, id, config, this))
21583
+ : await urlToBuiltUrl(content, id, config, this);
21584
+ s.overwrite(value.loc.start.offset, value.loc.end.offset, `"${url}"`);
21585
+ }
21586
+ catch (e) {
21587
+ if (e.code !== 'ENOENT') {
21588
+ throw e;
21589
+ }
21547
21590
  }
21548
21591
  }
21549
21592
  }
@@ -30731,6 +30774,7 @@ function resolveSSRExternal(config, knownImports) {
30731
30774
  }
30732
30775
  return externals;
30733
30776
  }
30777
+ const CJS_CONTENT_RE = /\bmodule\.exports\b|\bexports[.\[]|\brequire\s*\(|\bObject\.(defineProperty|defineProperties|assign)\s*\(\s*exports\b/;
30734
30778
  // do we need to do this ahead of time or could we do it lazily?
30735
30779
  function collectExternals(root, preserveSymlinks, ssrExternals, seen, logger) {
30736
30780
  var _a;
@@ -30809,11 +30853,11 @@ function collectExternals(root, preserveSymlinks, ssrExternals, seen, logger) {
30809
30853
  }
30810
30854
  // check if the entry is cjs
30811
30855
  const content = fs__default.readFileSync(esmEntry, 'utf-8');
30812
- if (/\bmodule\.exports\b|\bexports[.\[]|\brequire\s*\(/.test(content)) {
30856
+ if (CJS_CONTENT_RE.test(content)) {
30813
30857
  ssrExternals.add(id);
30814
30858
  continue;
30815
30859
  }
30816
- logger.warn(`${id} is incorrectly packaged. Please contact the package author to fix.`);
30860
+ logger.warn(`${id} doesn't appear to be written in CJS, but also doesn't appear to be a valid ES module (i.e. it doesn't have "type": "module" or an .mjs extension for the entry point). Please contact the package author to fix.`);
30817
30861
  }
30818
30862
  }
30819
30863
  for (const depRoot of depsToTrace) {
@@ -43198,8 +43242,8 @@ async function transformGlob(source, importer, root, loader) {
43198
43242
  function extractImportPaths(code) {
43199
43243
  // empty singleline & multiline comments to avoid matching comments
43200
43244
  code = code
43201
- .replace(multilineCommentsRE, '/* */')
43202
- .replace(singlelineCommentsRE, '');
43245
+ .replace(multilineCommentsRE$1, '/* */')
43246
+ .replace(singlelineCommentsRE$1, '');
43203
43247
  let js = '';
43204
43248
  let m;
43205
43249
  while ((m = importsRE.exec(code)) != null) {
@@ -43244,8 +43288,8 @@ function assetImportMetaUrlPlugin(config) {
43244
43288
  if (code.includes('new URL') && code.includes(`import.meta.url`)) {
43245
43289
  const importMetaUrlRE = /\bnew\s+URL\s*\(\s*('[^']+'|"[^"]+"|`[^`]+`)\s*,\s*import\.meta\.url\s*\)/g;
43246
43290
  const noCommentsCode = code
43247
- .replace(multilineCommentsRE, (m) => ' '.repeat(m.length))
43248
- .replace(singlelineCommentsRE, (m) => ' '.repeat(m.length));
43291
+ .replace(multilineCommentsRE$1, (m) => ' '.repeat(m.length))
43292
+ .replace(singlelineCommentsRE$1, (m) => ' '.repeat(m.length));
43249
43293
  let s = null;
43250
43294
  let match;
43251
43295
  while ((match = importMetaUrlRE.exec(noCommentsCode))) {
@@ -43322,7 +43366,7 @@ function loadFallbackPlugin() {
43322
43366
  };
43323
43367
  }
43324
43368
 
43325
- function resolveBuildOptions(root, raw) {
43369
+ function resolveBuildOptions(root, raw, isBuild) {
43326
43370
  var _a;
43327
43371
  const resolved = {
43328
43372
  target: 'modules',
@@ -43371,18 +43415,22 @@ function resolveBuildOptions(root, raw) {
43371
43415
  ]))
43372
43416
  : resolve(raw.rollupOptions.input);
43373
43417
  }
43374
- else {
43375
- input = resolve((raw === null || raw === void 0 ? void 0 : raw.lib)
43376
- ? raw.lib.entry
43377
- : typeof (raw === null || raw === void 0 ? void 0 : raw.ssr) === 'string'
43378
- ? raw.ssr
43379
- : 'index.html');
43418
+ else if ((raw === null || raw === void 0 ? void 0 : raw.lib) && isBuild) {
43419
+ input = resolve(raw.lib.entry);
43420
+ }
43421
+ else if (typeof (raw === null || raw === void 0 ? void 0 : raw.ssr) === 'string') {
43422
+ input = resolve(raw.ssr);
43423
+ }
43424
+ else if (isBuild) {
43425
+ input = resolve('index.html');
43380
43426
  }
43381
43427
  if (!!(raw === null || raw === void 0 ? void 0 : raw.ssr) && typeof input === 'string' && input.endsWith('.html')) {
43382
43428
  throw new Error(`rollupOptions.input should not be an html file when building for SSR. ` +
43383
43429
  `Please specify a dedicated SSR entry.`);
43384
43430
  }
43385
- resolved.rollupOptions.input = input;
43431
+ if (input) {
43432
+ resolved.rollupOptions.input = input;
43433
+ }
43386
43434
  // handle special build targets
43387
43435
  if (resolved.target === 'modules') {
43388
43436
  // Support browserslist
@@ -43422,7 +43470,7 @@ function resolveBuildPlugins(config) {
43422
43470
  dynamicImportVariables(options.dynamicImportVarsOptions),
43423
43471
  assetImportMetaUrlPlugin(config),
43424
43472
  ...(options.rollupOptions.plugins
43425
- ? options.rollupOptions.plugins.filter((p) => !!p)
43473
+ ? options.rollupOptions.plugins.filter(Boolean)
43426
43474
  : [])
43427
43475
  ],
43428
43476
  post: [
@@ -49533,7 +49581,7 @@ function readFileIfExists(value) {
49533
49581
  * https://github.com/webpack/webpack-dev-server/blob/master/LICENSE
49534
49582
  */
49535
49583
  async function createCertificate() {
49536
- const { generate } = await Promise.resolve().then(function () { return require('./dep-51488e9f.js'); }).then(function (n) { return n.index; });
49584
+ const { generate } = await Promise.resolve().then(function () { return require('./dep-bab9c4d6.js'); }).then(function (n) { return n.index; });
49537
49585
  const pems = generate(null, {
49538
49586
  algorithm: 'sha256',
49539
49587
  days: 30,
@@ -51157,8 +51205,8 @@ class Sender$1 {
51157
51205
  if (payloadLength === 126) {
51158
51206
  target.writeUInt16BE(data.length, 2);
51159
51207
  } else if (payloadLength === 127) {
51160
- target.writeUInt32BE(0, 2);
51161
- target.writeUInt32BE(data.length, 6);
51208
+ target[2] = target[3] = 0;
51209
+ target.writeUIntBE(data.length, 4, 6);
51162
51210
  }
51163
51211
 
51164
51212
  if (!options.mask) return [target, data];
@@ -52027,6 +52075,7 @@ class WebSocket$1 extends EventEmitter$1 {
52027
52075
  this._closeMessage = EMPTY_BUFFER;
52028
52076
  this._closeTimer = null;
52029
52077
  this._extensions = {};
52078
+ this._paused = false;
52030
52079
  this._protocol = '';
52031
52080
  this._readyState = WebSocket$1.CONNECTING;
52032
52081
  this._receiver = null;
@@ -52093,6 +52142,13 @@ class WebSocket$1 extends EventEmitter$1 {
52093
52142
  return Object.keys(this._extensions).join();
52094
52143
  }
52095
52144
 
52145
+ /**
52146
+ * @type {Boolean}
52147
+ */
52148
+ get isPaused() {
52149
+ return this._paused;
52150
+ }
52151
+
52096
52152
  /**
52097
52153
  * @type {Function}
52098
52154
  */
@@ -52281,6 +52337,23 @@ class WebSocket$1 extends EventEmitter$1 {
52281
52337
  );
52282
52338
  }
52283
52339
 
52340
+ /**
52341
+ * Pause the socket.
52342
+ *
52343
+ * @public
52344
+ */
52345
+ pause() {
52346
+ if (
52347
+ this.readyState === WebSocket$1.CONNECTING ||
52348
+ this.readyState === WebSocket$1.CLOSED
52349
+ ) {
52350
+ return;
52351
+ }
52352
+
52353
+ this._paused = true;
52354
+ this._socket.pause();
52355
+ }
52356
+
52284
52357
  /**
52285
52358
  * Send a ping.
52286
52359
  *
@@ -52345,6 +52418,23 @@ class WebSocket$1 extends EventEmitter$1 {
52345
52418
  this._sender.pong(data || EMPTY_BUFFER, mask, cb);
52346
52419
  }
52347
52420
 
52421
+ /**
52422
+ * Resume the socket.
52423
+ *
52424
+ * @public
52425
+ */
52426
+ resume() {
52427
+ if (
52428
+ this.readyState === WebSocket$1.CONNECTING ||
52429
+ this.readyState === WebSocket$1.CLOSED
52430
+ ) {
52431
+ return;
52432
+ }
52433
+
52434
+ this._paused = false;
52435
+ if (!this._receiver._writableState.needDrain) this._socket.resume();
52436
+ }
52437
+
52348
52438
  /**
52349
52439
  * Send a data message.
52350
52440
  *
@@ -52487,6 +52577,7 @@ Object.defineProperty(WebSocket$1.prototype, 'CLOSED', {
52487
52577
  'binaryType',
52488
52578
  'bufferedAmount',
52489
52579
  'extensions',
52580
+ 'isPaused',
52490
52581
  'protocol',
52491
52582
  'readyState',
52492
52583
  'url'
@@ -52599,19 +52690,26 @@ function initAsClient(websocket, address, protocols, options) {
52599
52690
 
52600
52691
  const isSecure = parsedUrl.protocol === 'wss:';
52601
52692
  const isUnixSocket = parsedUrl.protocol === 'ws+unix:';
52693
+ let invalidURLMessage;
52602
52694
 
52603
52695
  if (parsedUrl.protocol !== 'ws:' && !isSecure && !isUnixSocket) {
52604
- throw new SyntaxError(
52605
- 'The URL\'s protocol must be one of "ws:", "wss:", or "ws+unix:"'
52606
- );
52696
+ invalidURLMessage =
52697
+ 'The URL\'s protocol must be one of "ws:", "wss:", or "ws+unix:"';
52698
+ } else if (isUnixSocket && !parsedUrl.pathname) {
52699
+ invalidURLMessage = "The URL's pathname is empty";
52700
+ } else if (parsedUrl.hash) {
52701
+ invalidURLMessage = 'The URL contains a fragment identifier';
52607
52702
  }
52608
52703
 
52609
- if (isUnixSocket && !parsedUrl.pathname) {
52610
- throw new SyntaxError("The URL's pathname is empty");
52611
- }
52704
+ if (invalidURLMessage) {
52705
+ const err = new SyntaxError(invalidURLMessage);
52612
52706
 
52613
- if (parsedUrl.hash) {
52614
- throw new SyntaxError('The URL contains a fragment identifier');
52707
+ if (websocket._redirects === 0) {
52708
+ throw err;
52709
+ } else {
52710
+ emitErrorAndClose(websocket, err);
52711
+ return;
52712
+ }
52615
52713
  }
52616
52714
 
52617
52715
  const defaultPort = isSecure ? 443 : 80;
@@ -52693,9 +52791,7 @@ function initAsClient(websocket, address, protocols, options) {
52693
52791
  if (req === null || req.aborted) return;
52694
52792
 
52695
52793
  req = websocket._req = null;
52696
- websocket._readyState = WebSocket$1.CLOSING;
52697
- websocket.emit('error', err);
52698
- websocket.emitClose();
52794
+ emitErrorAndClose(websocket, err);
52699
52795
  });
52700
52796
 
52701
52797
  req.on('response', (res) => {
@@ -52715,7 +52811,15 @@ function initAsClient(websocket, address, protocols, options) {
52715
52811
 
52716
52812
  req.abort();
52717
52813
 
52718
- const addr = new URL$2(location, address);
52814
+ let addr;
52815
+
52816
+ try {
52817
+ addr = new URL$2(location, address);
52818
+ } catch (e) {
52819
+ const err = new SyntaxError(`Invalid URL: ${location}`);
52820
+ emitErrorAndClose(websocket, err);
52821
+ return;
52822
+ }
52719
52823
 
52720
52824
  initAsClient(websocket, addr, protocols, options);
52721
52825
  } else if (!websocket.emit('unexpected-response', req, res)) {
@@ -52818,6 +52922,19 @@ function initAsClient(websocket, address, protocols, options) {
52818
52922
  });
52819
52923
  }
52820
52924
 
52925
+ /**
52926
+ * Emit the `'error'` and `'close'` event.
52927
+ *
52928
+ * @param {WebSocket} websocket The WebSocket instance
52929
+ * @param {Error} The error to emit
52930
+ * @private
52931
+ */
52932
+ function emitErrorAndClose(websocket, err) {
52933
+ websocket._readyState = WebSocket$1.CLOSING;
52934
+ websocket.emit('error', err);
52935
+ websocket.emitClose();
52936
+ }
52937
+
52821
52938
  /**
52822
52939
  * Create a `net.Socket` and initiate a connection.
52823
52940
  *
@@ -52944,7 +53061,9 @@ function receiverOnConclude(code, reason) {
52944
53061
  * @private
52945
53062
  */
52946
53063
  function receiverOnDrain() {
52947
- this[kWebSocket$1]._socket.resume();
53064
+ const websocket = this[kWebSocket$1];
53065
+
53066
+ if (!websocket.isPaused) websocket._socket.resume();
52948
53067
  }
52949
53068
 
52950
53069
  /**
@@ -53737,6 +53856,9 @@ function createWebSocketServer(server, config, httpsOptions) {
53737
53856
  },
53738
53857
  close() {
53739
53858
  return new Promise((resolve, reject) => {
53859
+ wss.clients.forEach((client) => {
53860
+ client.terminate();
53861
+ });
53740
53862
  wss.close((err) => {
53741
53863
  if (err) {
53742
53864
  reject(err);
@@ -56724,7 +56846,8 @@ function walk(root, { onIdentifier, onImportMeta, onDynamicImport }) {
56724
56846
  if (((parent === null || parent === void 0 ? void 0 : parent.type) === 'AssignmentPattern' &&
56725
56847
  (parent === null || parent === void 0 ? void 0 : parent.right) === child) ||
56726
56848
  ((parent === null || parent === void 0 ? void 0 : parent.type) === 'TemplateLiteral' &&
56727
- (parent === null || parent === void 0 ? void 0 : parent.expressions.includes(child)))) {
56849
+ (parent === null || parent === void 0 ? void 0 : parent.expressions.includes(child))) ||
56850
+ ((parent === null || parent === void 0 ? void 0 : parent.type) === 'CallExpression' && (parent === null || parent === void 0 ? void 0 : parent.callee) === child)) {
56728
56851
  return;
56729
56852
  }
56730
56853
  setScope(node, child.name);
@@ -56742,6 +56865,9 @@ function walk(root, { onIdentifier, onImportMeta, onDynamicImport }) {
56742
56865
  if (property.type === 'RestElement') {
56743
56866
  setScope(parentFunction, property.argument.name);
56744
56867
  }
56868
+ else if (property.value.type === 'AssignmentPattern') {
56869
+ setScope(parentFunction, property.value.left.name);
56870
+ }
56745
56871
  else {
56746
56872
  setScope(parentFunction, property.value.name);
56747
56873
  }
@@ -56939,107 +57065,421 @@ function list(dir, callback, pre='') {
56939
57065
  }
56940
57066
  }
56941
57067
 
56942
- /**
56943
- * @param typeMap [Object] Map of MIME type -> Array[extensions]
56944
- * @param ...
56945
- */
56946
- function Mime$1() {
56947
- this._types = Object.create(null);
56948
- this._extensions = Object.create(null);
56949
-
56950
- for (let i = 0; i < arguments.length; i++) {
56951
- this.define(arguments[i]);
56952
- }
56953
-
56954
- this.define = this.define.bind(this);
56955
- this.getType = this.getType.bind(this);
56956
- this.getExtension = this.getExtension.bind(this);
57068
+ const mimes = {
57069
+ "ez": "application/andrew-inset",
57070
+ "aw": "application/applixware",
57071
+ "atom": "application/atom+xml",
57072
+ "atomcat": "application/atomcat+xml",
57073
+ "atomdeleted": "application/atomdeleted+xml",
57074
+ "atomsvc": "application/atomsvc+xml",
57075
+ "dwd": "application/atsc-dwd+xml",
57076
+ "held": "application/atsc-held+xml",
57077
+ "rsat": "application/atsc-rsat+xml",
57078
+ "bdoc": "application/bdoc",
57079
+ "xcs": "application/calendar+xml",
57080
+ "ccxml": "application/ccxml+xml",
57081
+ "cdfx": "application/cdfx+xml",
57082
+ "cdmia": "application/cdmi-capability",
57083
+ "cdmic": "application/cdmi-container",
57084
+ "cdmid": "application/cdmi-domain",
57085
+ "cdmio": "application/cdmi-object",
57086
+ "cdmiq": "application/cdmi-queue",
57087
+ "cu": "application/cu-seeme",
57088
+ "mpd": "application/dash+xml",
57089
+ "davmount": "application/davmount+xml",
57090
+ "dbk": "application/docbook+xml",
57091
+ "dssc": "application/dssc+der",
57092
+ "xdssc": "application/dssc+xml",
57093
+ "es": "application/ecmascript",
57094
+ "ecma": "application/ecmascript",
57095
+ "emma": "application/emma+xml",
57096
+ "emotionml": "application/emotionml+xml",
57097
+ "epub": "application/epub+zip",
57098
+ "exi": "application/exi",
57099
+ "fdt": "application/fdt+xml",
57100
+ "pfr": "application/font-tdpfr",
57101
+ "geojson": "application/geo+json",
57102
+ "gml": "application/gml+xml",
57103
+ "gpx": "application/gpx+xml",
57104
+ "gxf": "application/gxf",
57105
+ "gz": "application/gzip",
57106
+ "hjson": "application/hjson",
57107
+ "stk": "application/hyperstudio",
57108
+ "ink": "application/inkml+xml",
57109
+ "inkml": "application/inkml+xml",
57110
+ "ipfix": "application/ipfix",
57111
+ "its": "application/its+xml",
57112
+ "jar": "application/java-archive",
57113
+ "war": "application/java-archive",
57114
+ "ear": "application/java-archive",
57115
+ "ser": "application/java-serialized-object",
57116
+ "class": "application/java-vm",
57117
+ "js": "application/javascript",
57118
+ "mjs": "application/javascript",
57119
+ "json": "application/json",
57120
+ "map": "application/json",
57121
+ "json5": "application/json5",
57122
+ "jsonml": "application/jsonml+json",
57123
+ "jsonld": "application/ld+json",
57124
+ "lgr": "application/lgr+xml",
57125
+ "lostxml": "application/lost+xml",
57126
+ "hqx": "application/mac-binhex40",
57127
+ "cpt": "application/mac-compactpro",
57128
+ "mads": "application/mads+xml",
57129
+ "webmanifest": "application/manifest+json",
57130
+ "mrc": "application/marc",
57131
+ "mrcx": "application/marcxml+xml",
57132
+ "ma": "application/mathematica",
57133
+ "nb": "application/mathematica",
57134
+ "mb": "application/mathematica",
57135
+ "mathml": "application/mathml+xml",
57136
+ "mbox": "application/mbox",
57137
+ "mscml": "application/mediaservercontrol+xml",
57138
+ "metalink": "application/metalink+xml",
57139
+ "meta4": "application/metalink4+xml",
57140
+ "mets": "application/mets+xml",
57141
+ "maei": "application/mmt-aei+xml",
57142
+ "musd": "application/mmt-usd+xml",
57143
+ "mods": "application/mods+xml",
57144
+ "m21": "application/mp21",
57145
+ "mp21": "application/mp21",
57146
+ "mp4s": "application/mp4",
57147
+ "m4p": "application/mp4",
57148
+ "doc": "application/msword",
57149
+ "dot": "application/msword",
57150
+ "mxf": "application/mxf",
57151
+ "nq": "application/n-quads",
57152
+ "nt": "application/n-triples",
57153
+ "cjs": "application/node",
57154
+ "bin": "application/octet-stream",
57155
+ "dms": "application/octet-stream",
57156
+ "lrf": "application/octet-stream",
57157
+ "mar": "application/octet-stream",
57158
+ "so": "application/octet-stream",
57159
+ "dist": "application/octet-stream",
57160
+ "distz": "application/octet-stream",
57161
+ "pkg": "application/octet-stream",
57162
+ "bpk": "application/octet-stream",
57163
+ "dump": "application/octet-stream",
57164
+ "elc": "application/octet-stream",
57165
+ "deploy": "application/octet-stream",
57166
+ "exe": "application/octet-stream",
57167
+ "dll": "application/octet-stream",
57168
+ "deb": "application/octet-stream",
57169
+ "dmg": "application/octet-stream",
57170
+ "iso": "application/octet-stream",
57171
+ "img": "application/octet-stream",
57172
+ "msi": "application/octet-stream",
57173
+ "msp": "application/octet-stream",
57174
+ "msm": "application/octet-stream",
57175
+ "buffer": "application/octet-stream",
57176
+ "oda": "application/oda",
57177
+ "opf": "application/oebps-package+xml",
57178
+ "ogx": "application/ogg",
57179
+ "omdoc": "application/omdoc+xml",
57180
+ "onetoc": "application/onenote",
57181
+ "onetoc2": "application/onenote",
57182
+ "onetmp": "application/onenote",
57183
+ "onepkg": "application/onenote",
57184
+ "oxps": "application/oxps",
57185
+ "relo": "application/p2p-overlay+xml",
57186
+ "xer": "application/patch-ops-error+xml",
57187
+ "pdf": "application/pdf",
57188
+ "pgp": "application/pgp-encrypted",
57189
+ "asc": "application/pgp-signature",
57190
+ "sig": "application/pgp-signature",
57191
+ "prf": "application/pics-rules",
57192
+ "p10": "application/pkcs10",
57193
+ "p7m": "application/pkcs7-mime",
57194
+ "p7c": "application/pkcs7-mime",
57195
+ "p7s": "application/pkcs7-signature",
57196
+ "p8": "application/pkcs8",
57197
+ "ac": "application/pkix-attr-cert",
57198
+ "cer": "application/pkix-cert",
57199
+ "crl": "application/pkix-crl",
57200
+ "pkipath": "application/pkix-pkipath",
57201
+ "pki": "application/pkixcmp",
57202
+ "pls": "application/pls+xml",
57203
+ "ai": "application/postscript",
57204
+ "eps": "application/postscript",
57205
+ "ps": "application/postscript",
57206
+ "provx": "application/provenance+xml",
57207
+ "cww": "application/prs.cww",
57208
+ "pskcxml": "application/pskc+xml",
57209
+ "raml": "application/raml+yaml",
57210
+ "rdf": "application/rdf+xml",
57211
+ "owl": "application/rdf+xml",
57212
+ "rif": "application/reginfo+xml",
57213
+ "rnc": "application/relax-ng-compact-syntax",
57214
+ "rl": "application/resource-lists+xml",
57215
+ "rld": "application/resource-lists-diff+xml",
57216
+ "rs": "application/rls-services+xml",
57217
+ "rapd": "application/route-apd+xml",
57218
+ "sls": "application/route-s-tsid+xml",
57219
+ "rusd": "application/route-usd+xml",
57220
+ "gbr": "application/rpki-ghostbusters",
57221
+ "mft": "application/rpki-manifest",
57222
+ "roa": "application/rpki-roa",
57223
+ "rsd": "application/rsd+xml",
57224
+ "rss": "application/rss+xml",
57225
+ "rtf": "application/rtf",
57226
+ "sbml": "application/sbml+xml",
57227
+ "scq": "application/scvp-cv-request",
57228
+ "scs": "application/scvp-cv-response",
57229
+ "spq": "application/scvp-vp-request",
57230
+ "spp": "application/scvp-vp-response",
57231
+ "sdp": "application/sdp",
57232
+ "senmlx": "application/senml+xml",
57233
+ "sensmlx": "application/sensml+xml",
57234
+ "setpay": "application/set-payment-initiation",
57235
+ "setreg": "application/set-registration-initiation",
57236
+ "shf": "application/shf+xml",
57237
+ "siv": "application/sieve",
57238
+ "sieve": "application/sieve",
57239
+ "smi": "application/smil+xml",
57240
+ "smil": "application/smil+xml",
57241
+ "rq": "application/sparql-query",
57242
+ "srx": "application/sparql-results+xml",
57243
+ "gram": "application/srgs",
57244
+ "grxml": "application/srgs+xml",
57245
+ "sru": "application/sru+xml",
57246
+ "ssdl": "application/ssdl+xml",
57247
+ "ssml": "application/ssml+xml",
57248
+ "swidtag": "application/swid+xml",
57249
+ "tei": "application/tei+xml",
57250
+ "teicorpus": "application/tei+xml",
57251
+ "tfi": "application/thraud+xml",
57252
+ "tsd": "application/timestamped-data",
57253
+ "toml": "application/toml",
57254
+ "trig": "application/trig",
57255
+ "ttml": "application/ttml+xml",
57256
+ "ubj": "application/ubjson",
57257
+ "rsheet": "application/urc-ressheet+xml",
57258
+ "td": "application/urc-targetdesc+xml",
57259
+ "vxml": "application/voicexml+xml",
57260
+ "wasm": "application/wasm",
57261
+ "wgt": "application/widget",
57262
+ "hlp": "application/winhlp",
57263
+ "wsdl": "application/wsdl+xml",
57264
+ "wspolicy": "application/wspolicy+xml",
57265
+ "xaml": "application/xaml+xml",
57266
+ "xav": "application/xcap-att+xml",
57267
+ "xca": "application/xcap-caps+xml",
57268
+ "xdf": "application/xcap-diff+xml",
57269
+ "xel": "application/xcap-el+xml",
57270
+ "xns": "application/xcap-ns+xml",
57271
+ "xenc": "application/xenc+xml",
57272
+ "xhtml": "application/xhtml+xml",
57273
+ "xht": "application/xhtml+xml",
57274
+ "xlf": "application/xliff+xml",
57275
+ "xml": "application/xml",
57276
+ "xsl": "application/xml",
57277
+ "xsd": "application/xml",
57278
+ "rng": "application/xml",
57279
+ "dtd": "application/xml-dtd",
57280
+ "xop": "application/xop+xml",
57281
+ "xpl": "application/xproc+xml",
57282
+ "xslt": "application/xml",
57283
+ "xspf": "application/xspf+xml",
57284
+ "mxml": "application/xv+xml",
57285
+ "xhvml": "application/xv+xml",
57286
+ "xvml": "application/xv+xml",
57287
+ "xvm": "application/xv+xml",
57288
+ "yang": "application/yang",
57289
+ "yin": "application/yin+xml",
57290
+ "zip": "application/zip",
57291
+ "3gpp": "video/3gpp",
57292
+ "adp": "audio/adpcm",
57293
+ "amr": "audio/amr",
57294
+ "au": "audio/basic",
57295
+ "snd": "audio/basic",
57296
+ "mid": "audio/midi",
57297
+ "midi": "audio/midi",
57298
+ "kar": "audio/midi",
57299
+ "rmi": "audio/midi",
57300
+ "mxmf": "audio/mobile-xmf",
57301
+ "mp3": "audio/mpeg",
57302
+ "m4a": "audio/mp4",
57303
+ "mp4a": "audio/mp4",
57304
+ "mpga": "audio/mpeg",
57305
+ "mp2": "audio/mpeg",
57306
+ "mp2a": "audio/mpeg",
57307
+ "m2a": "audio/mpeg",
57308
+ "m3a": "audio/mpeg",
57309
+ "oga": "audio/ogg",
57310
+ "ogg": "audio/ogg",
57311
+ "spx": "audio/ogg",
57312
+ "opus": "audio/ogg",
57313
+ "s3m": "audio/s3m",
57314
+ "sil": "audio/silk",
57315
+ "wav": "audio/wav",
57316
+ "weba": "audio/webm",
57317
+ "xm": "audio/xm",
57318
+ "ttc": "font/collection",
57319
+ "otf": "font/otf",
57320
+ "ttf": "font/ttf",
57321
+ "woff": "font/woff",
57322
+ "woff2": "font/woff2",
57323
+ "exr": "image/aces",
57324
+ "apng": "image/apng",
57325
+ "avif": "image/avif",
57326
+ "bmp": "image/bmp",
57327
+ "cgm": "image/cgm",
57328
+ "drle": "image/dicom-rle",
57329
+ "emf": "image/emf",
57330
+ "fits": "image/fits",
57331
+ "g3": "image/g3fax",
57332
+ "gif": "image/gif",
57333
+ "heic": "image/heic",
57334
+ "heics": "image/heic-sequence",
57335
+ "heif": "image/heif",
57336
+ "heifs": "image/heif-sequence",
57337
+ "hej2": "image/hej2k",
57338
+ "hsj2": "image/hsj2",
57339
+ "ief": "image/ief",
57340
+ "jls": "image/jls",
57341
+ "jp2": "image/jp2",
57342
+ "jpg2": "image/jp2",
57343
+ "jpeg": "image/jpeg",
57344
+ "jpg": "image/jpeg",
57345
+ "jpe": "image/jpeg",
57346
+ "jph": "image/jph",
57347
+ "jhc": "image/jphc",
57348
+ "jpm": "image/jpm",
57349
+ "jpx": "image/jpx",
57350
+ "jpf": "image/jpx",
57351
+ "jxr": "image/jxr",
57352
+ "jxra": "image/jxra",
57353
+ "jxrs": "image/jxrs",
57354
+ "jxs": "image/jxs",
57355
+ "jxsc": "image/jxsc",
57356
+ "jxsi": "image/jxsi",
57357
+ "jxss": "image/jxss",
57358
+ "ktx": "image/ktx",
57359
+ "ktx2": "image/ktx2",
57360
+ "png": "image/png",
57361
+ "btif": "image/prs.btif",
57362
+ "pti": "image/prs.pti",
57363
+ "sgi": "image/sgi",
57364
+ "svg": "image/svg+xml",
57365
+ "svgz": "image/svg+xml",
57366
+ "t38": "image/t38",
57367
+ "tif": "image/tiff",
57368
+ "tiff": "image/tiff",
57369
+ "tfx": "image/tiff-fx",
57370
+ "webp": "image/webp",
57371
+ "wmf": "image/wmf",
57372
+ "disposition-notification": "message/disposition-notification",
57373
+ "u8msg": "message/global",
57374
+ "u8dsn": "message/global-delivery-status",
57375
+ "u8mdn": "message/global-disposition-notification",
57376
+ "u8hdr": "message/global-headers",
57377
+ "eml": "message/rfc822",
57378
+ "mime": "message/rfc822",
57379
+ "3mf": "model/3mf",
57380
+ "gltf": "model/gltf+json",
57381
+ "glb": "model/gltf-binary",
57382
+ "igs": "model/iges",
57383
+ "iges": "model/iges",
57384
+ "msh": "model/mesh",
57385
+ "mesh": "model/mesh",
57386
+ "silo": "model/mesh",
57387
+ "mtl": "model/mtl",
57388
+ "obj": "model/obj",
57389
+ "stpz": "model/step+zip",
57390
+ "stpxz": "model/step-xml+zip",
57391
+ "stl": "model/stl",
57392
+ "wrl": "model/vrml",
57393
+ "vrml": "model/vrml",
57394
+ "x3db": "model/x3d+fastinfoset",
57395
+ "x3dbz": "model/x3d+binary",
57396
+ "x3dv": "model/x3d-vrml",
57397
+ "x3dvz": "model/x3d+vrml",
57398
+ "x3d": "model/x3d+xml",
57399
+ "x3dz": "model/x3d+xml",
57400
+ "appcache": "text/cache-manifest",
57401
+ "manifest": "text/cache-manifest",
57402
+ "ics": "text/calendar",
57403
+ "ifb": "text/calendar",
57404
+ "coffee": "text/coffeescript",
57405
+ "litcoffee": "text/coffeescript",
57406
+ "css": "text/css",
57407
+ "csv": "text/csv",
57408
+ "html": "text/html",
57409
+ "htm": "text/html",
57410
+ "shtml": "text/html",
57411
+ "jade": "text/jade",
57412
+ "jsx": "text/jsx",
57413
+ "less": "text/less",
57414
+ "markdown": "text/markdown",
57415
+ "md": "text/markdown",
57416
+ "mml": "text/mathml",
57417
+ "mdx": "text/mdx",
57418
+ "n3": "text/n3",
57419
+ "txt": "text/plain",
57420
+ "text": "text/plain",
57421
+ "conf": "text/plain",
57422
+ "def": "text/plain",
57423
+ "list": "text/plain",
57424
+ "log": "text/plain",
57425
+ "in": "text/plain",
57426
+ "ini": "text/plain",
57427
+ "dsc": "text/prs.lines.tag",
57428
+ "rtx": "text/richtext",
57429
+ "sgml": "text/sgml",
57430
+ "sgm": "text/sgml",
57431
+ "shex": "text/shex",
57432
+ "slim": "text/slim",
57433
+ "slm": "text/slim",
57434
+ "spdx": "text/spdx",
57435
+ "stylus": "text/stylus",
57436
+ "styl": "text/stylus",
57437
+ "tsv": "text/tab-separated-values",
57438
+ "t": "text/troff",
57439
+ "tr": "text/troff",
57440
+ "roff": "text/troff",
57441
+ "man": "text/troff",
57442
+ "me": "text/troff",
57443
+ "ms": "text/troff",
57444
+ "ttl": "text/turtle",
57445
+ "uri": "text/uri-list",
57446
+ "uris": "text/uri-list",
57447
+ "urls": "text/uri-list",
57448
+ "vcard": "text/vcard",
57449
+ "vtt": "text/vtt",
57450
+ "yaml": "text/yaml",
57451
+ "yml": "text/yaml",
57452
+ "3gp": "video/3gpp",
57453
+ "3g2": "video/3gpp2",
57454
+ "h261": "video/h261",
57455
+ "h263": "video/h263",
57456
+ "h264": "video/h264",
57457
+ "m4s": "video/iso.segment",
57458
+ "jpgv": "video/jpeg",
57459
+ "jpgm": "image/jpm",
57460
+ "mj2": "video/mj2",
57461
+ "mjp2": "video/mj2",
57462
+ "ts": "video/mp2t",
57463
+ "mp4": "video/mp4",
57464
+ "mp4v": "video/mp4",
57465
+ "mpg4": "video/mp4",
57466
+ "mpeg": "video/mpeg",
57467
+ "mpg": "video/mpeg",
57468
+ "mpe": "video/mpeg",
57469
+ "m1v": "video/mpeg",
57470
+ "m2v": "video/mpeg",
57471
+ "ogv": "video/ogg",
57472
+ "qt": "video/quicktime",
57473
+ "mov": "video/quicktime",
57474
+ "webm": "video/webm"
57475
+ };
57476
+
57477
+ function lookup(extn) {
57478
+ let tmp = ('' + extn).trim().toLowerCase();
57479
+ let idx = tmp.lastIndexOf('.');
57480
+ return mimes[!~idx ? tmp : tmp.substring(++idx)];
56957
57481
  }
56958
57482
 
56959
- /**
56960
- * Define mimetype -> extension mappings. Each key is a mime-type that maps
56961
- * to an array of extensions associated with the type. The first extension is
56962
- * used as the default extension for the type.
56963
- *
56964
- * e.g. mime.define({'audio/ogg', ['oga', 'ogg', 'spx']});
56965
- *
56966
- * If a type declares an extension that has already been defined, an error will
56967
- * be thrown. To suppress this error and force the extension to be associated
56968
- * with the new type, pass `force`=true. Alternatively, you may prefix the
56969
- * extension with "*" to map the type to extension, without mapping the
56970
- * extension to the type.
56971
- *
56972
- * e.g. mime.define({'audio/wav', ['wav']}, {'audio/x-wav', ['*wav']});
56973
- *
56974
- *
56975
- * @param map (Object) type definitions
56976
- * @param force (Boolean) if true, force overriding of existing definitions
56977
- */
56978
- Mime$1.prototype.define = function(typeMap, force) {
56979
- for (let type in typeMap) {
56980
- let extensions = typeMap[type].map(function(t) {
56981
- return t.toLowerCase();
56982
- });
56983
- type = type.toLowerCase();
56984
-
56985
- for (let i = 0; i < extensions.length; i++) {
56986
- const ext = extensions[i];
56987
-
56988
- // '*' prefix = not the preferred type for this extension. So fixup the
56989
- // extension, and skip it.
56990
- if (ext[0] === '*') {
56991
- continue;
56992
- }
56993
-
56994
- if (!force && (ext in this._types)) {
56995
- throw new Error(
56996
- 'Attempt to change mapping for "' + ext +
56997
- '" extension from "' + this._types[ext] + '" to "' + type +
56998
- '". Pass `force=true` to allow this, otherwise remove "' + ext +
56999
- '" from the list of extensions for "' + type + '".'
57000
- );
57001
- }
57002
-
57003
- this._types[ext] = type;
57004
- }
57005
-
57006
- // Use first extension as default
57007
- if (force || !this._extensions[type]) {
57008
- const ext = extensions[0];
57009
- this._extensions[type] = (ext[0] !== '*') ? ext : ext.substr(1);
57010
- }
57011
- }
57012
- };
57013
-
57014
- /**
57015
- * Lookup a mime type based on extension
57016
- */
57017
- Mime$1.prototype.getType = function(path) {
57018
- path = String(path);
57019
- let last = path.replace(/^.*[/\\]/, '').toLowerCase();
57020
- let ext = last.replace(/^.*\./, '').toLowerCase();
57021
-
57022
- let hasPath = last.length < path.length;
57023
- let hasDot = ext.length < last.length - 1;
57024
-
57025
- return (hasDot || !hasPath) && this._types[ext] || null;
57026
- };
57027
-
57028
- /**
57029
- * Return file extension associated with a mime type
57030
- */
57031
- Mime$1.prototype.getExtension = function(type) {
57032
- type = /^\s*([^;\s]*)/.test(type) && RegExp.$1;
57033
- return type && this._extensions[type.toLowerCase()] || null;
57034
- };
57035
-
57036
- var Mime_1 = Mime$1;
57037
-
57038
- var standard = {"application/andrew-inset":["ez"],"application/applixware":["aw"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomdeleted+xml":["atomdeleted"],"application/atomsvc+xml":["atomsvc"],"application/atsc-dwd+xml":["dwd"],"application/atsc-held+xml":["held"],"application/atsc-rsat+xml":["rsat"],"application/bdoc":["bdoc"],"application/calendar+xml":["xcs"],"application/ccxml+xml":["ccxml"],"application/cdfx+xml":["cdfx"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cu-seeme":["cu"],"application/dash+xml":["mpd"],"application/davmount+xml":["davmount"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["es","ecma"],"application/emma+xml":["emma"],"application/emotionml+xml":["emotionml"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/express":["exp"],"application/fdt+xml":["fdt"],"application/font-tdpfr":["pfr"],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hjson":["hjson"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/its+xml":["its"],"application/java-archive":["jar","war","ear"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["js","mjs"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/ld+json":["jsonld"],"application/lgr+xml":["lgr"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/manifest+json":["webmanifest"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mmt-aei+xml":["maei"],"application/mmt-usd+xml":["musd"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["mp4s","m4p"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/n-quads":["nq"],"application/n-triples":["nt"],"application/node":["cjs"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg"],"application/oxps":["oxps"],"application/p2p-overlay+xml":["relo"],"application/patch-ops-error+xml":["xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-signature":["asc","sig"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/provenance+xml":["provx"],"application/pskc+xml":["pskcxml"],"application/raml+yaml":["raml"],"application/rdf+xml":["rdf","owl"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/route-apd+xml":["rapd"],"application/route-s-tsid+xml":["sls"],"application/route-usd+xml":["rusd"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/senml+xml":["senmlx"],"application/sensml+xml":["sensmlx"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/sieve":["siv","sieve"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/swid+xml":["swidtag"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/toml":["toml"],"application/trig":["trig"],"application/ttml+xml":["ttml"],"application/ubjson":["ubj"],"application/urc-ressheet+xml":["rsheet"],"application/urc-targetdesc+xml":["td"],"application/voicexml+xml":["vxml"],"application/wasm":["wasm"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/xaml+xml":["xaml"],"application/xcap-att+xml":["xav"],"application/xcap-caps+xml":["xca"],"application/xcap-diff+xml":["xdf"],"application/xcap-el+xml":["xel"],"application/xcap-ns+xml":["xns"],"application/xenc+xml":["xenc"],"application/xhtml+xml":["xhtml","xht"],"application/xliff+xml":["xlf"],"application/xml":["xml","xsl","xsd","rng"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["*xsl","xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"audio/3gpp":["*3gpp"],"audio/adpcm":["adp"],"audio/amr":["amr"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mobile-xmf":["mxmf"],"audio/mp3":["*mp3"],"audio/mp4":["m4a","mp4a"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx","opus"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/wav":["wav"],"audio/wave":["*wav"],"audio/webm":["weba"],"audio/xm":["xm"],"font/collection":["ttc"],"font/otf":["otf"],"font/ttf":["ttf"],"font/woff":["woff"],"font/woff2":["woff2"],"image/aces":["exr"],"image/apng":["apng"],"image/avif":["avif"],"image/bmp":["bmp"],"image/cgm":["cgm"],"image/dicom-rle":["drle"],"image/emf":["emf"],"image/fits":["fits"],"image/g3fax":["g3"],"image/gif":["gif"],"image/heic":["heic"],"image/heic-sequence":["heics"],"image/heif":["heif"],"image/heif-sequence":["heifs"],"image/hej2k":["hej2"],"image/hsj2":["hsj2"],"image/ief":["ief"],"image/jls":["jls"],"image/jp2":["jp2","jpg2"],"image/jpeg":["jpeg","jpg","jpe"],"image/jph":["jph"],"image/jphc":["jhc"],"image/jpm":["jpm"],"image/jpx":["jpx","jpf"],"image/jxr":["jxr"],"image/jxra":["jxra"],"image/jxrs":["jxrs"],"image/jxs":["jxs"],"image/jxsc":["jxsc"],"image/jxsi":["jxsi"],"image/jxss":["jxss"],"image/ktx":["ktx"],"image/ktx2":["ktx2"],"image/png":["png"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/t38":["t38"],"image/tiff":["tif","tiff"],"image/tiff-fx":["tfx"],"image/webp":["webp"],"image/wmf":["wmf"],"message/disposition-notification":["disposition-notification"],"message/global":["u8msg"],"message/global-delivery-status":["u8dsn"],"message/global-disposition-notification":["u8mdn"],"message/global-headers":["u8hdr"],"message/rfc822":["eml","mime"],"model/3mf":["3mf"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/mesh":["msh","mesh","silo"],"model/mtl":["mtl"],"model/obj":["obj"],"model/step+xml":["stpx"],"model/step+zip":["stpz"],"model/step-xml+zip":["stpxz"],"model/stl":["stl"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["*x3db","x3dbz"],"model/x3d+fastinfoset":["x3db"],"model/x3d+vrml":["*x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"model/x3d-vrml":["x3dv"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["markdown","md"],"text/mathml":["mml"],"text/mdx":["mdx"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/richtext":["rtx"],"text/rtf":["*rtf"],"text/sgml":["sgml","sgm"],"text/shex":["shex"],"text/slim":["slim","slm"],"text/spdx":["spdx"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vtt":["vtt"],"text/xml":["*xml"],"text/yaml":["yaml","yml"],"video/3gpp":["3gp","3gpp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/iso.segment":["m4s"],"video/jpeg":["jpgv"],"video/jpm":["*jpm","jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/webm":["webm"]};
57039
-
57040
- let Mime = Mime_1;
57041
- var lite = new Mime(standard);
57042
-
57043
57483
  const noop$1 = () => {};
57044
57484
 
57045
57485
  function isMatch(uri, arr) {
@@ -57132,7 +57572,7 @@ const ENCODING = {
57132
57572
  function toHeaders(name, stats, isEtag) {
57133
57573
  let enc = ENCODING[name.slice(-3)];
57134
57574
 
57135
- let ctype = lite.getType(name.slice(0, enc && -3)) || '';
57575
+ let ctype = lookup(name.slice(0, enc && -3)) || '';
57136
57576
  if (ctype === 'text/html') ctype += ';charset=utf-8';
57137
57577
 
57138
57578
  let headers = {
@@ -57543,21 +57983,26 @@ function transformMiddleware(server) {
57543
57983
  // always allow vite client requests so that it can trigger page reload
57544
57984
  !((_a = req.url) === null || _a === void 0 ? void 0 : _a.startsWith(CLIENT_PUBLIC_PATH)) &&
57545
57985
  !((_b = req.url) === null || _b === void 0 ? void 0 : _b.includes('vite/dist/client'))) {
57546
- // missing dep pending reload, hold request until reload happens
57547
- server._pendingReload.then(() =>
57548
- // If the refresh has not happened after timeout, Vite considers
57549
- // something unexpected has happened. In this case, Vite
57550
- // returns an empty response that will error.
57551
- setTimeout(() => {
57986
+ try {
57987
+ // missing dep pending reload, hold request until reload happens
57988
+ await Promise.race([
57989
+ server._pendingReload,
57990
+ // If the refresh has not happened after timeout, Vite considers
57991
+ // something unexpected has happened. In this case, Vite
57992
+ // returns an empty response that will error.
57993
+ new Promise((_, reject) => setTimeout(reject, NEW_DEPENDENCY_BUILD_TIMEOUT))
57994
+ ]);
57995
+ }
57996
+ catch {
57552
57997
  // Don't do anything if response has already been sent
57553
- if (res.writableEnded)
57554
- return;
57555
- // status code request timeout
57556
- res.statusCode = 408;
57557
- res.end(`<h1>[vite] Something unexpected happened while optimizing "${req.url}"<h1>` +
57558
- `<p>The current page should have reloaded by now</p>`);
57559
- }, NEW_DEPENDENCY_BUILD_TIMEOUT));
57560
- return;
57998
+ if (!res.writableEnded) {
57999
+ // status code request timeout
58000
+ res.statusCode = 408;
58001
+ res.end(`<h1>[vite] Something unexpected happened while optimizing "${req.url}"<h1>` +
58002
+ `<p>The current page should have reloaded by now</p>`);
58003
+ }
58004
+ return;
58005
+ }
57561
58006
  }
57562
58007
  let url = decodeURI(removeTimestampQuery(req.url)).replace(NULL_BYTE_PLACEHOLDER, '\0');
57563
58008
  const withoutQuery = cleanUrl(url);
@@ -57957,7 +58402,12 @@ async function handleHMRUpdate(file, server) {
57957
58402
  // auto restart server
57958
58403
  debugHmr(`[config change] ${source.dim(shortFile)}`);
57959
58404
  config.logger.info(source.green(`${path__default.relative(process.cwd(), file)} changed, restarting server...`), { clear: true, timestamp: true });
57960
- await server.restart();
58405
+ try {
58406
+ await server.restart();
58407
+ }
58408
+ catch (e) {
58409
+ config.logger.error(source.red(e));
58410
+ }
57961
58411
  return;
57962
58412
  }
57963
58413
  debugHmr(`[file change] ${source.dim(shortFile)}`);
@@ -67893,7 +68343,7 @@ function resolveServerOptions(root, raw) {
67893
68343
  async function restartServer(server) {
67894
68344
  // @ts-ignore
67895
68345
  global.__vite_start_time = perf_hooks.performance.now();
67896
- const { port } = server.config.server;
68346
+ const { port: prevPort, host: prevHost } = server.config.server;
67897
68347
  await server.close();
67898
68348
  let newServer = null;
67899
68349
  try {
@@ -67911,11 +68361,17 @@ async function restartServer(server) {
67911
68361
  server[key] = newServer[key];
67912
68362
  }
67913
68363
  }
67914
- if (!server.config.server.middlewareMode) {
68364
+ const { logger, server: { port, host, middlewareMode } } = server.config;
68365
+ if (!middlewareMode) {
67915
68366
  await server.listen(port, true);
68367
+ logger.info('server restarted.', { timestamp: true });
68368
+ if (port !== prevPort || host !== prevHost) {
68369
+ logger.info('');
68370
+ server.printUrls();
68371
+ }
67916
68372
  }
67917
68373
  else {
67918
- server.config.logger.info('server restarted.', { timestamp: true });
68374
+ logger.info('server restarted.', { timestamp: true });
67919
68375
  }
67920
68376
  }
67921
68377
 
@@ -81932,7 +82388,7 @@ async function resolveConfig(inlineConfig, command, defaultMode = 'development')
81932
82388
  }
81933
82389
  // resolve public base url
81934
82390
  const BASE_URL = resolveBaseUrl(config.base, command === 'build', logger);
81935
- const resolvedBuildOptions = resolveBuildOptions(resolvedRoot, config.build);
82391
+ const resolvedBuildOptions = resolveBuildOptions(resolvedRoot, config.build, command === 'build');
81936
82392
  // resolve cache directory
81937
82393
  const pkgPath = lookupFile(resolvedRoot, [`package.json`], true /* pathOnly */);
81938
82394
  const cacheDir = config.cacheDir
@@ -82136,10 +82592,10 @@ function resolveBaseUrl(base = '/', isBuild, logger) {
82136
82592
  }
82137
82593
  return base;
82138
82594
  }
82139
- function mergeConfigRecursively(a, b, rootPath) {
82140
- const merged = { ...a };
82141
- for (const key in b) {
82142
- const value = b[key];
82595
+ function mergeConfigRecursively(defaults, overrides, rootPath) {
82596
+ const merged = { ...defaults };
82597
+ for (const key in overrides) {
82598
+ const value = overrides[key];
82143
82599
  if (value == null) {
82144
82600
  continue;
82145
82601
  }
@@ -82170,8 +82626,8 @@ function mergeConfigRecursively(a, b, rootPath) {
82170
82626
  }
82171
82627
  return merged;
82172
82628
  }
82173
- function mergeConfig(a, b, isRoot = true) {
82174
- return mergeConfigRecursively(a, b, isRoot ? '' : '.');
82629
+ function mergeConfig(defaults, overrides, isRoot = true) {
82630
+ return mergeConfigRecursively(defaults, overrides, isRoot ? '' : '.');
82175
82631
  }
82176
82632
  function mergeAlias(a = [], b = []) {
82177
82633
  return [...normalizeAlias(a), ...normalizeAlias(b)];
@@ -82457,4 +82913,4 @@ exports.send = send$1;
82457
82913
  exports.sortUserPlugins = sortUserPlugins;
82458
82914
  exports.source = source;
82459
82915
  exports.transformWithEsbuild = transformWithEsbuild;
82460
- //# sourceMappingURL=dep-3daf770c.js.map
82916
+ //# sourceMappingURL=dep-bc5f477e.js.map