Parcourir la source

编写账户设置页面,配置多语言依赖

mabaoyi il y a 10 mois
Parent
commit
e7fd89213c
100 fichiers modifiés avec 79426 ajouts et 1 suppressions
  1. 14 0
      commont/messages.js
  2. 12 1
      main.js
  3. 16 0
      node_modules/.bin/nanoid
  4. 17 0
      node_modules/.bin/nanoid.cmd
  5. 28 0
      node_modules/.bin/nanoid.ps1
  6. 16 0
      node_modules/.bin/parser
  7. 17 0
      node_modules/.bin/parser.cmd
  8. 28 0
      node_modules/.bin/parser.ps1
  9. 304 0
      node_modules/.package-lock.json
  10. 1073 0
      node_modules/@babel/parser/CHANGELOG.md
  11. 19 0
      node_modules/@babel/parser/LICENSE
  12. 19 0
      node_modules/@babel/parser/README.md
  13. 15 0
      node_modules/@babel/parser/bin/babel-parser.js
  14. 5 0
      node_modules/@babel/parser/index.cjs
  15. 1318 0
      node_modules/@babel/parser/lib/index.js
  16. 0 0
      node_modules/@babel/parser/lib/index.js.map
  17. 46 0
      node_modules/@babel/parser/package.json
  18. 251 0
      node_modules/@babel/parser/typings/babel-parser.d.ts
  19. 20 0
      node_modules/@intlify/core-base/LICENSE
  20. 7 0
      node_modules/@intlify/core-base/README.md
  21. 1857 0
      node_modules/@intlify/core-base/dist/core-base.cjs
  22. 1 0
      node_modules/@intlify/core-base/dist/core-base.cjs.js
  23. 1 0
      node_modules/@intlify/core-base/dist/core-base.cjs.prod.js
  24. 1263 0
      node_modules/@intlify/core-base/dist/core-base.d.ts
  25. 3538 0
      node_modules/@intlify/core-base/dist/core-base.esm-browser.js
  26. 5 0
      node_modules/@intlify/core-base/dist/core-base.esm-browser.prod.js
  27. 1 0
      node_modules/@intlify/core-base/dist/core-base.esm-bundler.js
  28. 3586 0
      node_modules/@intlify/core-base/dist/core-base.global.js
  29. 5 0
      node_modules/@intlify/core-base/dist/core-base.global.prod.js
  30. 1835 0
      node_modules/@intlify/core-base/dist/core-base.mjs
  31. 1578 0
      node_modules/@intlify/core-base/dist/core-base.prod.cjs
  32. 7 0
      node_modules/@intlify/core-base/index.js
  33. 81 0
      node_modules/@intlify/core-base/package.json
  34. 20 0
      node_modules/@intlify/message-compiler/LICENSE
  35. 7 0
      node_modules/@intlify/message-compiler/README.md
  36. 1674 0
      node_modules/@intlify/message-compiler/dist/message-compiler.cjs
  37. 1 0
      node_modules/@intlify/message-compiler/dist/message-compiler.cjs.js
  38. 1 0
      node_modules/@intlify/message-compiler/dist/message-compiler.cjs.prod.js
  39. 249 0
      node_modules/@intlify/message-compiler/dist/message-compiler.d.ts
  40. 1625 0
      node_modules/@intlify/message-compiler/dist/message-compiler.esm-browser.js
  41. 5 0
      node_modules/@intlify/message-compiler/dist/message-compiler.esm-browser.prod.js
  42. 1 0
      node_modules/@intlify/message-compiler/dist/message-compiler.esm-bundler.js
  43. 1645 0
      node_modules/@intlify/message-compiler/dist/message-compiler.global.js
  44. 5 0
      node_modules/@intlify/message-compiler/dist/message-compiler.global.prod.js
  45. 1603 0
      node_modules/@intlify/message-compiler/dist/message-compiler.mjs
  46. 1660 0
      node_modules/@intlify/message-compiler/dist/message-compiler.node.mjs
  47. 1657 0
      node_modules/@intlify/message-compiler/dist/message-compiler.prod.cjs
  48. 7 0
      node_modules/@intlify/message-compiler/index.js
  49. 79 0
      node_modules/@intlify/message-compiler/package.json
  50. 20 0
      node_modules/@intlify/shared/LICENSE
  51. 18 0
      node_modules/@intlify/shared/README.md
  52. 272 0
      node_modules/@intlify/shared/dist/shared.cjs
  53. 1 0
      node_modules/@intlify/shared/dist/shared.cjs.js
  54. 1 0
      node_modules/@intlify/shared/dist/shared.cjs.prod.js
  55. 157 0
      node_modules/@intlify/shared/dist/shared.d.ts
  56. 240 0
      node_modules/@intlify/shared/dist/shared.esm-browser.js
  57. 5 0
      node_modules/@intlify/shared/dist/shared.esm-browser.prod.js
  58. 1 0
      node_modules/@intlify/shared/dist/shared.esm-bundler.js
  59. 240 0
      node_modules/@intlify/shared/dist/shared.mjs
  60. 256 0
      node_modules/@intlify/shared/dist/shared.prod.cjs
  61. 7 0
      node_modules/@intlify/shared/index.js
  62. 69 0
      node_modules/@intlify/shared/package.json
  63. 21 0
      node_modules/@jridgewell/sourcemap-codec/LICENSE
  64. 200 0
      node_modules/@jridgewell/sourcemap-codec/README.md
  65. 164 0
      node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs
  66. 0 0
      node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs.map
  67. 175 0
      node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js
  68. 0 0
      node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js.map
  69. 6 0
      node_modules/@jridgewell/sourcemap-codec/dist/types/sourcemap-codec.d.ts
  70. 74 0
      node_modules/@jridgewell/sourcemap-codec/package.json
  71. 21 0
      node_modules/@vue/compiler-core/LICENSE
  72. 1 0
      node_modules/@vue/compiler-core/README.md
  73. 6644 0
      node_modules/@vue/compiler-core/dist/compiler-core.cjs.js
  74. 6520 0
      node_modules/@vue/compiler-core/dist/compiler-core.cjs.prod.js
  75. 1073 0
      node_modules/@vue/compiler-core/dist/compiler-core.d.ts
  76. 5692 0
      node_modules/@vue/compiler-core/dist/compiler-core.esm-bundler.js
  77. 7 0
      node_modules/@vue/compiler-core/index.js
  78. 58 0
      node_modules/@vue/compiler-core/package.json
  79. 21 0
      node_modules/@vue/compiler-dom/LICENSE
  80. 1 0
      node_modules/@vue/compiler-dom/README.md
  81. 731 0
      node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.js
  82. 661 0
      node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.prod.js
  83. 45 0
      node_modules/@vue/compiler-dom/dist/compiler-dom.d.ts
  84. 6311 0
      node_modules/@vue/compiler-dom/dist/compiler-dom.esm-browser.js
  85. 6 0
      node_modules/@vue/compiler-dom/dist/compiler-dom.esm-browser.prod.js
  86. 506 0
      node_modules/@vue/compiler-dom/dist/compiler-dom.esm-bundler.js
  87. 6473 0
      node_modules/@vue/compiler-dom/dist/compiler-dom.global.js
  88. 6 0
      node_modules/@vue/compiler-dom/dist/compiler-dom.global.prod.js
  89. 7 0
      node_modules/@vue/compiler-dom/index.js
  90. 57 0
      node_modules/@vue/compiler-dom/package.json
  91. 21 0
      node_modules/@vue/compiler-sfc/LICENSE
  92. 80 0
      node_modules/@vue/compiler-sfc/README.md
  93. 13093 0
      node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js
  94. 542 0
      node_modules/@vue/compiler-sfc/dist/compiler-sfc.d.ts
  95. 231 0
      node_modules/@vue/compiler-sfc/dist/compiler-sfc.esm-browser.js
  96. 67 0
      node_modules/@vue/compiler-sfc/package.json
  97. 21 0
      node_modules/@vue/compiler-ssr/LICENSE
  98. 1 0
      node_modules/@vue/compiler-ssr/README.md
  99. 1376 0
      node_modules/@vue/compiler-ssr/dist/compiler-ssr.cjs.js
  100. 4 0
      node_modules/@vue/compiler-ssr/dist/compiler-ssr.d.ts

+ 14 - 0
commont/messages.js

@@ -0,0 +1,14 @@
+export default {
+	"zh-CN":{
+		index:{
+			more:"更多",
+			homepage:'主页'
+		}
+	},
+	"en-US":{
+		index:{
+			more:'more',
+			homepage:'homepage'
+		}
+	}
+}

+ 12 - 1
main.js

@@ -4,11 +4,22 @@ import App from './App'
 import Vue from 'vue'
 import './uni.promisify.adaptor'
 import uView from '@/uview-ui'
+import  VueI18n  from 'vue-i18n'
+import messages from "./commont/messages.js"
+Vue.use(VueI18n)
+Vue.config.productionTip = false
+// 多国语言包配置
+const i18n = new VueI18n ({
+	locale:"en-US",
+	messages
+})
+
+Vue.prototype._i18n = i18n
 
 Vue.use(uView)
-Vue.config.productionTip = false
 App.mpType = 'app'
 const app = new Vue({
+	i18n,
   ...App
 })
 app.$mount()

+ 16 - 0
node_modules/.bin/nanoid

@@ -0,0 +1,16 @@
+#!/bin/sh
+basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
+
+case `uname` in
+    *CYGWIN*|*MINGW*|*MSYS*)
+        if command -v cygpath > /dev/null 2>&1; then
+            basedir=`cygpath -w "$basedir"`
+        fi
+    ;;
+esac
+
+if [ -x "$basedir/node" ]; then
+  exec "$basedir/node"  "$basedir/../nanoid/bin/nanoid.cjs" "$@"
+else 
+  exec node  "$basedir/../nanoid/bin/nanoid.cjs" "$@"
+fi

+ 17 - 0
node_modules/.bin/nanoid.cmd

@@ -0,0 +1,17 @@
+@ECHO off
+GOTO start
+:find_dp0
+SET dp0=%~dp0
+EXIT /b
+:start
+SETLOCAL
+CALL :find_dp0
+
+IF EXIST "%dp0%\node.exe" (
+  SET "_prog=%dp0%\node.exe"
+) ELSE (
+  SET "_prog=node"
+  SET PATHEXT=%PATHEXT:;.JS;=;%
+)
+
+endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%"  "%dp0%\..\nanoid\bin\nanoid.cjs" %*

+ 28 - 0
node_modules/.bin/nanoid.ps1

@@ -0,0 +1,28 @@
+#!/usr/bin/env pwsh
+$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
+
+$exe=""
+if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
+  # Fix case when both the Windows and Linux builds of Node
+  # are installed in the same directory
+  $exe=".exe"
+}
+$ret=0
+if (Test-Path "$basedir/node$exe") {
+  # Support pipeline input
+  if ($MyInvocation.ExpectingInput) {
+    $input | & "$basedir/node$exe"  "$basedir/../nanoid/bin/nanoid.cjs" $args
+  } else {
+    & "$basedir/node$exe"  "$basedir/../nanoid/bin/nanoid.cjs" $args
+  }
+  $ret=$LASTEXITCODE
+} else {
+  # Support pipeline input
+  if ($MyInvocation.ExpectingInput) {
+    $input | & "node$exe"  "$basedir/../nanoid/bin/nanoid.cjs" $args
+  } else {
+    & "node$exe"  "$basedir/../nanoid/bin/nanoid.cjs" $args
+  }
+  $ret=$LASTEXITCODE
+}
+exit $ret

+ 16 - 0
node_modules/.bin/parser

@@ -0,0 +1,16 @@
+#!/bin/sh
+basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
+
+case `uname` in
+    *CYGWIN*|*MINGW*|*MSYS*)
+        if command -v cygpath > /dev/null 2>&1; then
+            basedir=`cygpath -w "$basedir"`
+        fi
+    ;;
+esac
+
+if [ -x "$basedir/node" ]; then
+  exec "$basedir/node"  "$basedir/../@babel/parser/bin/babel-parser.js" "$@"
+else 
+  exec node  "$basedir/../@babel/parser/bin/babel-parser.js" "$@"
+fi

+ 17 - 0
node_modules/.bin/parser.cmd

@@ -0,0 +1,17 @@
+@ECHO off
+GOTO start
+:find_dp0
+SET dp0=%~dp0
+EXIT /b
+:start
+SETLOCAL
+CALL :find_dp0
+
+IF EXIST "%dp0%\node.exe" (
+  SET "_prog=%dp0%\node.exe"
+) ELSE (
+  SET "_prog=node"
+  SET PATHEXT=%PATHEXT:;.JS;=;%
+)
+
+endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%"  "%dp0%\..\@babel\parser\bin\babel-parser.js" %*

+ 28 - 0
node_modules/.bin/parser.ps1

@@ -0,0 +1,28 @@
+#!/usr/bin/env pwsh
+$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
+
+$exe=""
+if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
+  # Fix case when both the Windows and Linux builds of Node
+  # are installed in the same directory
+  $exe=".exe"
+}
+$ret=0
+if (Test-Path "$basedir/node$exe") {
+  # Support pipeline input
+  if ($MyInvocation.ExpectingInput) {
+    $input | & "$basedir/node$exe"  "$basedir/../@babel/parser/bin/babel-parser.js" $args
+  } else {
+    & "$basedir/node$exe"  "$basedir/../@babel/parser/bin/babel-parser.js" $args
+  }
+  $ret=$LASTEXITCODE
+} else {
+  # Support pipeline input
+  if ($MyInvocation.ExpectingInput) {
+    $input | & "node$exe"  "$basedir/../@babel/parser/bin/babel-parser.js" $args
+  } else {
+    & "node$exe"  "$basedir/../@babel/parser/bin/babel-parser.js" $args
+  }
+  $ret=$LASTEXITCODE
+}
+exit $ret

+ 304 - 0
node_modules/.package-lock.json

@@ -0,0 +1,304 @@
+{
+	"name": "uview-ui",
+	"version": "2.0.37",
+	"lockfileVersion": 3,
+	"requires": true,
+	"packages": {
+		"node_modules/@babel/parser": {
+			"version": "7.24.5",
+			"resolved": "https://repo.huaweicloud.com/repository/npm/@babel/parser/-/parser-7.24.5.tgz",
+			"integrity": "sha512-EOv5IK8arwh3LI47dz1b0tKUb/1uhHAnHJOrjgtQMIpu1uXd9mlFrJg9IUgGUgZ41Ch0K8REPTYpO7B76b4vJg==",
+			"peer": true,
+			"bin": {
+				"parser": "bin/babel-parser.js"
+			},
+			"engines": {
+				"node": ">=6.0.0"
+			}
+		},
+		"node_modules/@intlify/core-base": {
+			"version": "9.13.1",
+			"resolved": "https://repo.huaweicloud.com/repository/npm/@intlify/core-base/-/core-base-9.13.1.tgz",
+			"integrity": "sha512-+bcQRkJO9pcX8d0gel9ZNfrzU22sZFSA0WVhfXrf5jdJOS24a+Bp8pozuS9sBI9Hk/tGz83pgKfmqcn/Ci7/8w==",
+			"dependencies": {
+				"@intlify/message-compiler": "9.13.1",
+				"@intlify/shared": "9.13.1"
+			},
+			"engines": {
+				"node": ">= 16"
+			},
+			"funding": {
+				"url": "https://github.com/sponsors/kazupon"
+			}
+		},
+		"node_modules/@intlify/message-compiler": {
+			"version": "9.13.1",
+			"resolved": "https://repo.huaweicloud.com/repository/npm/@intlify/message-compiler/-/message-compiler-9.13.1.tgz",
+			"integrity": "sha512-SKsVa4ajYGBVm7sHMXd5qX70O2XXjm55zdZB3VeMFCvQyvLew/dLvq3MqnaIsTMF1VkkOb9Ttr6tHcMlyPDL9w==",
+			"dependencies": {
+				"@intlify/shared": "9.13.1",
+				"source-map-js": "^1.0.2"
+			},
+			"engines": {
+				"node": ">= 16"
+			},
+			"funding": {
+				"url": "https://github.com/sponsors/kazupon"
+			}
+		},
+		"node_modules/@intlify/shared": {
+			"version": "9.13.1",
+			"resolved": "https://repo.huaweicloud.com/repository/npm/@intlify/shared/-/shared-9.13.1.tgz",
+			"integrity": "sha512-u3b6BKGhE6j/JeRU6C/RL2FgyJfy6LakbtfeVF8fJXURpZZTzfh3e05J0bu0XPw447Q6/WUp3C4ajv4TMS4YsQ==",
+			"engines": {
+				"node": ">= 16"
+			},
+			"funding": {
+				"url": "https://github.com/sponsors/kazupon"
+			}
+		},
+		"node_modules/@jridgewell/sourcemap-codec": {
+			"version": "1.4.15",
+			"resolved": "https://repo.huaweicloud.com/repository/npm/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz",
+			"integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==",
+			"peer": true
+		},
+		"node_modules/@vue/compiler-core": {
+			"version": "3.4.27",
+			"resolved": "https://repo.huaweicloud.com/repository/npm/@vue/compiler-core/-/compiler-core-3.4.27.tgz",
+			"integrity": "sha512-E+RyqY24KnyDXsCuQrI+mlcdW3ALND6U7Gqa/+bVwbcpcR3BRRIckFoz7Qyd4TTlnugtwuI7YgjbvsLmxb+yvg==",
+			"peer": true,
+			"dependencies": {
+				"@babel/parser": "^7.24.4",
+				"@vue/shared": "3.4.27",
+				"entities": "^4.5.0",
+				"estree-walker": "^2.0.2",
+				"source-map-js": "^1.2.0"
+			}
+		},
+		"node_modules/@vue/compiler-dom": {
+			"version": "3.4.27",
+			"resolved": "https://repo.huaweicloud.com/repository/npm/@vue/compiler-dom/-/compiler-dom-3.4.27.tgz",
+			"integrity": "sha512-kUTvochG/oVgE1w5ViSr3KUBh9X7CWirebA3bezTbB5ZKBQZwR2Mwj9uoSKRMFcz4gSMzzLXBPD6KpCLb9nvWw==",
+			"peer": true,
+			"dependencies": {
+				"@vue/compiler-core": "3.4.27",
+				"@vue/shared": "3.4.27"
+			}
+		},
+		"node_modules/@vue/compiler-sfc": {
+			"version": "3.4.27",
+			"resolved": "https://repo.huaweicloud.com/repository/npm/@vue/compiler-sfc/-/compiler-sfc-3.4.27.tgz",
+			"integrity": "sha512-nDwntUEADssW8e0rrmE0+OrONwmRlegDA1pD6QhVeXxjIytV03yDqTey9SBDiALsvAd5U4ZrEKbMyVXhX6mCGA==",
+			"peer": true,
+			"dependencies": {
+				"@babel/parser": "^7.24.4",
+				"@vue/compiler-core": "3.4.27",
+				"@vue/compiler-dom": "3.4.27",
+				"@vue/compiler-ssr": "3.4.27",
+				"@vue/shared": "3.4.27",
+				"estree-walker": "^2.0.2",
+				"magic-string": "^0.30.10",
+				"postcss": "^8.4.38",
+				"source-map-js": "^1.2.0"
+			}
+		},
+		"node_modules/@vue/compiler-ssr": {
+			"version": "3.4.27",
+			"resolved": "https://repo.huaweicloud.com/repository/npm/@vue/compiler-ssr/-/compiler-ssr-3.4.27.tgz",
+			"integrity": "sha512-CVRzSJIltzMG5FcidsW0jKNQnNRYC8bT21VegyMMtHmhW3UOI7knmUehzswXLrExDLE6lQCZdrhD4ogI7c+vuw==",
+			"peer": true,
+			"dependencies": {
+				"@vue/compiler-dom": "3.4.27",
+				"@vue/shared": "3.4.27"
+			}
+		},
+		"node_modules/@vue/devtools-api": {
+			"version": "6.6.1",
+			"resolved": "https://repo.huaweicloud.com/repository/npm/@vue/devtools-api/-/devtools-api-6.6.1.tgz",
+			"integrity": "sha512-LgPscpE3Vs0x96PzSSB4IGVSZXZBZHpfxs+ZA1d+VEPwHdOXowy/Y2CsvCAIFrf+ssVU1pD1jidj505EpUnfbA=="
+		},
+		"node_modules/@vue/reactivity": {
+			"version": "3.4.27",
+			"resolved": "https://repo.huaweicloud.com/repository/npm/@vue/reactivity/-/reactivity-3.4.27.tgz",
+			"integrity": "sha512-kK0g4NknW6JX2yySLpsm2jlunZJl2/RJGZ0H9ddHdfBVHcNzxmQ0sS0b09ipmBoQpY8JM2KmUw+a6sO8Zo+zIA==",
+			"peer": true,
+			"dependencies": {
+				"@vue/shared": "3.4.27"
+			}
+		},
+		"node_modules/@vue/runtime-core": {
+			"version": "3.4.27",
+			"resolved": "https://repo.huaweicloud.com/repository/npm/@vue/runtime-core/-/runtime-core-3.4.27.tgz",
+			"integrity": "sha512-7aYA9GEbOOdviqVvcuweTLe5Za4qBZkUY7SvET6vE8kyypxVgaT1ixHLg4urtOlrApdgcdgHoTZCUuTGap/5WA==",
+			"peer": true,
+			"dependencies": {
+				"@vue/reactivity": "3.4.27",
+				"@vue/shared": "3.4.27"
+			}
+		},
+		"node_modules/@vue/runtime-dom": {
+			"version": "3.4.27",
+			"resolved": "https://repo.huaweicloud.com/repository/npm/@vue/runtime-dom/-/runtime-dom-3.4.27.tgz",
+			"integrity": "sha512-ScOmP70/3NPM+TW9hvVAz6VWWtZJqkbdf7w6ySsws+EsqtHvkhxaWLecrTorFxsawelM5Ys9FnDEMt6BPBDS0Q==",
+			"peer": true,
+			"dependencies": {
+				"@vue/runtime-core": "3.4.27",
+				"@vue/shared": "3.4.27",
+				"csstype": "^3.1.3"
+			}
+		},
+		"node_modules/@vue/server-renderer": {
+			"version": "3.4.27",
+			"resolved": "https://repo.huaweicloud.com/repository/npm/@vue/server-renderer/-/server-renderer-3.4.27.tgz",
+			"integrity": "sha512-dlAMEuvmeA3rJsOMJ2J1kXU7o7pOxgsNHVr9K8hB3ImIkSuBrIdy0vF66h8gf8Tuinf1TK3mPAz2+2sqyf3KzA==",
+			"peer": true,
+			"dependencies": {
+				"@vue/compiler-ssr": "3.4.27",
+				"@vue/shared": "3.4.27"
+			},
+			"peerDependencies": {
+				"vue": "3.4.27"
+			}
+		},
+		"node_modules/@vue/shared": {
+			"version": "3.4.27",
+			"resolved": "https://repo.huaweicloud.com/repository/npm/@vue/shared/-/shared-3.4.27.tgz",
+			"integrity": "sha512-DL3NmY2OFlqmYYrzp39yi3LDkKxa5vZVwxWdQ3rG0ekuWscHraeIbnI8t+aZK7qhYqEqWKTUdijadunb9pnrgA==",
+			"peer": true
+		},
+		"node_modules/csstype": {
+			"version": "3.1.3",
+			"resolved": "https://repo.huaweicloud.com/repository/npm/csstype/-/csstype-3.1.3.tgz",
+			"integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==",
+			"peer": true
+		},
+		"node_modules/entities": {
+			"version": "4.5.0",
+			"resolved": "https://repo.huaweicloud.com/repository/npm/entities/-/entities-4.5.0.tgz",
+			"integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==",
+			"peer": true,
+			"engines": {
+				"node": ">=0.12"
+			},
+			"funding": {
+				"url": "https://github.com/fb55/entities?sponsor=1"
+			}
+		},
+		"node_modules/estree-walker": {
+			"version": "2.0.2",
+			"resolved": "https://repo.huaweicloud.com/repository/npm/estree-walker/-/estree-walker-2.0.2.tgz",
+			"integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==",
+			"peer": true
+		},
+		"node_modules/magic-string": {
+			"version": "0.30.10",
+			"resolved": "https://repo.huaweicloud.com/repository/npm/magic-string/-/magic-string-0.30.10.tgz",
+			"integrity": "sha512-iIRwTIf0QKV3UAnYK4PU8uiEc4SRh5jX0mwpIwETPpHdhVM4f53RSwS/vXvN1JhGX+Cs7B8qIq3d6AH49O5fAQ==",
+			"peer": true,
+			"dependencies": {
+				"@jridgewell/sourcemap-codec": "^1.4.15"
+			}
+		},
+		"node_modules/nanoid": {
+			"version": "3.3.7",
+			"resolved": "https://repo.huaweicloud.com/repository/npm/nanoid/-/nanoid-3.3.7.tgz",
+			"integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==",
+			"funding": [
+				{
+					"type": "github",
+					"url": "https://github.com/sponsors/ai"
+				}
+			],
+			"peer": true,
+			"bin": {
+				"nanoid": "bin/nanoid.cjs"
+			},
+			"engines": {
+				"node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
+			}
+		},
+		"node_modules/picocolors": {
+			"version": "1.0.1",
+			"resolved": "https://repo.huaweicloud.com/repository/npm/picocolors/-/picocolors-1.0.1.tgz",
+			"integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==",
+			"peer": true
+		},
+		"node_modules/postcss": {
+			"version": "8.4.38",
+			"resolved": "https://repo.huaweicloud.com/repository/npm/postcss/-/postcss-8.4.38.tgz",
+			"integrity": "sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A==",
+			"funding": [
+				{
+					"type": "opencollective",
+					"url": "https://opencollective.com/postcss/"
+				},
+				{
+					"type": "tidelift",
+					"url": "https://tidelift.com/funding/github/npm/postcss"
+				},
+				{
+					"type": "github",
+					"url": "https://github.com/sponsors/ai"
+				}
+			],
+			"peer": true,
+			"dependencies": {
+				"nanoid": "^3.3.7",
+				"picocolors": "^1.0.0",
+				"source-map-js": "^1.2.0"
+			},
+			"engines": {
+				"node": "^10 || ^12 || >=14"
+			}
+		},
+		"node_modules/source-map-js": {
+			"version": "1.2.0",
+			"resolved": "https://repo.huaweicloud.com/repository/npm/source-map-js/-/source-map-js-1.2.0.tgz",
+			"integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==",
+			"engines": {
+				"node": ">=0.10.0"
+			}
+		},
+		"node_modules/vue": {
+			"version": "3.4.27",
+			"resolved": "https://repo.huaweicloud.com/repository/npm/vue/-/vue-3.4.27.tgz",
+			"integrity": "sha512-8s/56uK6r01r1icG/aEOHqyMVxd1bkYcSe9j8HcKtr/xTOFWvnzIVTehNW+5Yt89f+DLBe4A569pnZLS5HzAMA==",
+			"peer": true,
+			"dependencies": {
+				"@vue/compiler-dom": "3.4.27",
+				"@vue/compiler-sfc": "3.4.27",
+				"@vue/runtime-dom": "3.4.27",
+				"@vue/server-renderer": "3.4.27",
+				"@vue/shared": "3.4.27"
+			},
+			"peerDependencies": {
+				"typescript": "*"
+			},
+			"peerDependenciesMeta": {
+				"typescript": {
+					"optional": true
+				}
+			}
+		},
+		"node_modules/vue-i18n": {
+			"version": "9.13.1",
+			"resolved": "https://repo.huaweicloud.com/repository/npm/vue-i18n/-/vue-i18n-9.13.1.tgz",
+			"integrity": "sha512-mh0GIxx0wPtPlcB1q4k277y0iKgo25xmDPWioVVYanjPufDBpvu5ySTjP5wOrSvlYQ2m1xI+CFhGdauv/61uQg==",
+			"dependencies": {
+				"@intlify/core-base": "9.13.1",
+				"@intlify/shared": "9.13.1",
+				"@vue/devtools-api": "^6.5.0"
+			},
+			"engines": {
+				"node": ">= 16"
+			},
+			"funding": {
+				"url": "https://github.com/sponsors/kazupon"
+			},
+			"peerDependencies": {
+				"vue": "^3.0.0"
+			}
+		}
+	}
+}

+ 1073 - 0
node_modules/@babel/parser/CHANGELOG.md

@@ -0,0 +1,1073 @@
+# Changelog
+
+> **Tags:**
+> - :boom:       [Breaking Change]
+> - :eyeglasses: [Spec Compliance]
+> - :rocket:     [New Feature]
+> - :bug:        [Bug Fix]
+> - :memo:       [Documentation]
+> - :house:      [Internal]
+> - :nail_care:  [Polish]
+
+> Semver Policy: https://github.com/babel/babel/tree/main/packages/babel-parser#semver
+
+_Note: Gaps between patch versions are faulty, broken or test releases._
+
+See the [Babel Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) for the pre-6.8.0 version Changelog.
+
+## 6.17.1 (2017-05-10)
+
+### :bug: Bug Fix
+ * Fix typo in flow spread operator error (Brian Ng)
+ * Fixed invalid number literal parsing ([#473](https://github.com/babel/babylon/pull/473)) (Alex Kuzmenko)
+ * Fix number parser ([#433](https://github.com/babel/babylon/pull/433)) (Alex Kuzmenko)
+ * Ensure non pattern shorthand props are checked for reserved words ([#479](https://github.com/babel/babylon/pull/479)) (Brian Ng)
+ * Remove jsx context when parsing arrow functions ([#475](https://github.com/babel/babylon/pull/475)) (Brian Ng)
+ * Allow super in class properties ([#499](https://github.com/babel/babylon/pull/499)) (Brian Ng)
+ * Allow flow class field to be named constructor ([#510](https://github.com/babel/babylon/pull/510)) (Brian Ng)
+
+## 6.17.0 (2017-04-20)
+
+### :bug: Bug Fix
+ * Cherry-pick #418 to 6.x ([#476](https://github.com/babel/babylon/pull/476)) (Sebastian McKenzie)
+ * Add support for invalid escapes in tagged templates ([#274](https://github.com/babel/babylon/pull/274)) (Kevin Gibbons)
+ * Throw error if new.target is used outside of a function ([#402](https://github.com/babel/babylon/pull/402)) (Brian Ng)
+ * Fix parsing of class properties ([#351](https://github.com/babel/babylon/pull/351)) (Kevin Gibbons)
+ * Fix parsing yield with dynamicImport ([#383](https://github.com/babel/babylon/pull/383)) (Brian Ng)
+ * Ensure consistent start args for parseParenItem ([#386](https://github.com/babel/babylon/pull/386)) (Brian Ng)
+
+## 7.0.0-beta.8 (2017-04-04)
+
+### New Feature
+* Add support for flow type spread (#418) (Conrad Buck)
+* Allow statics in flow interfaces (#427) (Brian Ng)
+
+### Bug Fix
+* Fix predicate attachment to match flow parser (#428) (Brian Ng)
+* Add extra.raw back to JSXText and JSXAttribute (#344) (Alex Rattray)
+* Fix rest parameters with array and objects (#424) (Brian Ng)
+* Fix number parser (#433) (Alex Kuzmenko)
+
+### Docs
+* Fix CONTRIBUTING.md [skip ci] (#432) (Alex Kuzmenko)
+
+### Internal
+* Use babel-register script when running babel smoke tests (#442) (Brian Ng)
+
+## 7.0.0-beta.7 (2017-03-22)
+
+### Spec Compliance
+* Remove babylon plugin for template revision since it's stage-4 (#426) (Henry Zhu)
+
+### Bug Fix
+
+* Fix push-pop logic in flow (#405) (Daniel Tschinder)
+
+## 7.0.0-beta.6 (2017-03-21)
+
+### New Feature
+* Add support for invalid escapes in tagged templates (#274) (Kevin Gibbons)
+
+### Polish
+* Improves error message when super is called outside of constructor (#408) (Arshabh Kumar Agarwal)
+
+### Docs
+
+* [7.0] Moved value field in spec from ObjectMember to ObjectProperty as ObjectMethod's don't have it (#415) [skip ci] (James Browning)
+
+## 7.0.0-beta.5 (2017-03-21)
+
+### Bug Fix
+* Throw error if new.target is used outside of a function (#402) (Brian Ng)
+* Fix parsing of class properties (#351) (Kevin Gibbons)
+
+### Other
+ * Test runner: Detect extra property in 'actual' but not in 'expected'. (#407) (Andy)
+ * Optimize travis builds (#419) (Daniel Tschinder)
+ * Update codecov to 2.0 (#412) (Daniel Tschinder)
+ * Fix spec for ClassMethod: It doesn't have a function, it *is* a function. (#406) [skip ci] (Andy)
+ * Changed Non-existent RestPattern to RestElement which is what is actually parsed (#409) [skip ci] (James Browning)
+ * Upgrade flow to 0.41 (Daniel Tschinder)
+ * Fix watch command (#403) (Brian Ng)
+ * Update yarn lock (Daniel Tschinder)
+ * Fix watch command (#403) (Brian Ng)
+ * chore(package): update flow-bin to version 0.41.0 (#395) (greenkeeper[bot])
+ * Add estree test for correct order of directives (Daniel Tschinder)
+ * Add DoExpression to spec (#364) (Alex Kuzmenko)
+ * Mention cloning of repository in CONTRIBUTING.md (#391) [skip ci] (Sumedh Nimkarde)
+ * Explain how to run only one test (#389) [skip ci] (Aaron Ang)
+
+ ## 7.0.0-beta.4 (2017-03-01)
+
+* Don't consume async when checking for async func decl (#377) (Brian Ng)
+* add `ranges` option [skip ci] (Henry Zhu)
+* Don't parse class properties without initializers when classProperties is disabled and Flow is enabled (#300) (Andrew Levine)
+
+## 7.0.0-beta.3 (2017-02-28)
+
+- [7.0] Change RestProperty/SpreadProperty to RestElement/SpreadElement (#384)
+- Merge changes from 6.x
+
+## 7.0.0-beta.2 (2017-02-20)
+
+- estree: correctly change literals in all cases (#368) (Daniel Tschinder)
+
+## 7.0.0-beta.1 (2017-02-20)
+
+- Fix negative number literal typeannotations (#366) (Daniel Tschinder)
+- Update contributing with more test info [skip ci] (#355) (Brian Ng)
+
+## 7.0.0-beta.0 (2017-02-15)
+
+- Reintroduce Variance node (#333) (Daniel Tschinder)
+- Rename NumericLiteralTypeAnnotation to NumberLiteralTypeAnnotation (#332) (Charles Pick)
+- [7.0] Remove ForAwaitStatement, add await flag to ForOfStatement (#349) (Brandon Dail)
+- chore(package): update ava to version 0.18.0 (#345) (greenkeeper[bot])
+- chore(package): update babel-plugin-istanbul to version 4.0.0 (#350) (greenkeeper[bot])
+- Change location of ObjectTypeIndexer to match flow (#228) (Daniel Tschinder)
+- Rename flow AST Type ExistentialTypeParam to ExistsTypeAnnotation (#322) (Toru Kobayashi)
+- Revert "Temporary rollback for erroring on trailing comma with spread (#154)" (#290) (Daniel Tschinder)
+- Remove classConstructorCall plugin (#291) (Brian Ng)
+- Update yarn.lock (Daniel Tschinder)
+- Update cross-env to 3.x (Daniel Tschinder)
+- [7.0] Remove node 0.10, 0.12 and 5 from Travis (#284) (Sergey Rubanov)
+- Remove `String.fromCodePoint` shim (#279) (Mathias Bynens)
+
+## 6.16.1 (2017-02-23)
+
+### :bug: Regression
+
+- Revert "Fix export default async function to be FunctionDeclaration" ([#375](https://github.com/babel/babylon/pull/375))
+
+Need to modify Babel for this AST node change, so moving to 7.0.
+
+- Revert "Don't parse class properties without initializers when classProperties plugin is disabled, and Flow is enabled" ([#376](https://github.com/babel/babylon/pull/376))
+
+[react-native](https://github.com/facebook/react-native/issues/12542) broke with this so we reverted.
+
+## 6.16.0 (2017-02-23)
+
+### :rocket: New Feature
+
+***ESTree*** compatibility as plugin ([#277](https://github.com/babel/babylon/pull/277)) (Daniel Tschinder)
+
+We finally introduce a new compatibility layer for ESTree. To put babylon into ESTree-compatible mode the new plugin `estree` can be enabled. In this mode the parser will output an AST that is compliant to the specs of [ESTree](https://github.com/estree/estree/)
+
+We highly recommend everyone who uses babylon outside of babel to use this plugin. This will make it much easier for users to switch between different ESTree-compatible parsers. We so far tested several projects with different parsers and exchanged their parser to babylon and in nearly all cases it worked out of the box. Some other estree-compatible parsers include `acorn`, `esprima`, `espree`, `flow-parser`, etc.
+
+To enable `estree` mode simply add the plugin in the config:
+```json
+{
+  "plugins": [ "estree" ]
+}
+```
+
+If you want to migrate your project from non-ESTree mode to ESTree, have a look at our [Readme](https://github.com/babel/babylon/#output), where all deviations are mentioned.
+
+Add a parseExpression public method ([#213](https://github.com/babel/babylon/pull/213)) (jeromew)
+
+Babylon exports a new function to parse a single expression
+
+```js
+import { parseExpression } from 'babylon';
+
+const ast = parseExpression('x || y && z', options);
+```
+
+The returned AST will only consist of the expression. The options are the same as for `parse()`
+
+Add startLine option ([#346](https://github.com/babel/babylon/pull/346)) (Raphael Mu)
+
+A new option was added to babylon allowing to change the initial linenumber for the first line which is usually `1`.
+Changing this for example to `100` will make line `1` of the input source to be marked as line `100`, line `2` as `101`, line `3` as `102`, ...
+
+Function predicate declaration ([#103](https://github.com/babel/babylon/pull/103)) (Panagiotis Vekris)
+
+Added support for function predicates which flow introduced in version 0.33.0
+
+```js
+declare function is_number(x: mixed): boolean %checks(typeof x === "number");
+```
+
+Allow imports in declare module ([#315](https://github.com/babel/babylon/pull/315)) (Daniel Tschinder)
+
+Added support for imports within module declarations which flow introduced in version 0.37.0
+
+```js
+declare module "C" {
+  import type { DT } from "D";
+  declare export type CT = { D: DT };
+}
+```
+
+### :eyeglasses: Spec Compliance
+
+Forbid semicolons after decorators in classes ([#352](https://github.com/babel/babylon/pull/352)) (Kevin Gibbons)
+
+This example now correctly throws an error when there is a semicolon after the decorator:
+
+```js
+class A {
+@a;
+foo(){}
+}
+```
+
+Keywords are not allowed as local specifier ([#307](https://github.com/babel/babylon/pull/307)) (Daniel Tschinder)
+
+Using keywords in imports is not allowed anymore:
+
+```js
+import { default } from "foo";
+import { a as debugger } from "foo";
+```
+
+Do not allow overwritting of primitive types ([#314](https://github.com/babel/babylon/pull/314)) (Daniel Tschinder)
+
+In flow it is now forbidden to overwrite the primitive types `"any"`, `"mixed"`, `"empty"`, `"bool"`, `"boolean"`, `"number"`, `"string"`, `"void"` and `"null"` with your own type declaration.
+
+Disallow import type { type a } from … ([#305](https://github.com/babel/babylon/pull/305)) (Daniel Tschinder)
+
+The following code now correctly throws an error
+
+```js
+import type { type a } from "foo";
+```
+
+Don't parse class properties without initializers when classProperties is disabled and Flow is enabled ([#300](https://github.com/babel/babylon/pull/300)) (Andrew Levine)
+
+Ensure that you enable the `classProperties` plugin in order to enable correct parsing of class properties. Prior to this version it was possible to parse them by enabling the `flow` plugin but this was not intended the behaviour.
+
+If you enable the flow plugin you can only define the type of the class properties, but not initialize them.
+
+Fix export default async function to be FunctionDeclaration ([#324](https://github.com/babel/babylon/pull/324)) (Daniel Tschinder)
+
+Parsing the following code now returns a `FunctionDeclaration` AST node instead of `FunctionExpression`.
+
+```js
+export default async function bar() {};
+```
+
+### :nail_care: Polish
+
+Improve error message on attempt to destructure named import ([#288](https://github.com/babel/babylon/pull/288)) (Brian Ng)
+
+### :bug: Bug Fix
+
+Fix negative number literal typeannotations ([#366](https://github.com/babel/babylon/pull/366)) (Daniel Tschinder)
+
+Ensure takeDecorators is called on exported class ([#358](https://github.com/babel/babylon/pull/358)) (Brian Ng)
+
+ESTree: correctly change literals in all cases ([#368](https://github.com/babel/babylon/pull/368)) (Daniel Tschinder)
+
+Correctly convert RestProperty to Assignable ([#339](https://github.com/babel/babylon/pull/339)) (Daniel Tschinder)
+
+Fix #321 by allowing question marks in type params ([#338](https://github.com/babel/babylon/pull/338)) (Daniel Tschinder)
+
+Fix #336 by correctly setting arrow-param ([#337](https://github.com/babel/babylon/pull/337)) (Daniel Tschinder)
+
+Fix parse error when destructuring `set` with default value ([#317](https://github.com/babel/babylon/pull/317)) (Brian Ng)
+
+Fix ObjectTypeCallProperty static ([#298](https://github.com/babel/babylon/pull/298)) (Dan Harper)
+
+
+### :house: Internal
+
+Fix generator-method-with-computed-name spec ([#360](https://github.com/babel/babylon/pull/360)) (Alex Rattray)
+
+Fix flow type-parameter-declaration test with unintended semantic ([#361](https://github.com/babel/babylon/pull/361)) (Alex Rattray)
+
+Cleanup and splitup parser functions ([#295](https://github.com/babel/babylon/pull/295)) (Daniel Tschinder)
+
+chore(package): update flow-bin to version 0.38.0 ([#313](https://github.com/babel/babylon/pull/313)) (greenkeeper[bot])
+
+Call inner function instead of 1:1 copy to plugin ([#294](https://github.com/babel/babylon/pull/294)) (Daniel Tschinder)
+
+Update eslint-config-babel to the latest version 🚀 ([#299](https://github.com/babel/babylon/pull/299)) (greenkeeper[bot])
+
+Update eslint-config-babel to the latest version 🚀 ([#293](https://github.com/babel/babylon/pull/293)) (greenkeeper[bot])
+
+devDeps: remove eslint-plugin-babel ([#292](https://github.com/babel/babylon/pull/292)) (Kai Cataldo)
+
+Correct indent eslint rule config ([#276](https://github.com/babel/babylon/pull/276)) (Daniel Tschinder)
+
+Fail tests that have expected.json and throws-option ([#285](https://github.com/babel/babylon/pull/285)) (Daniel Tschinder)
+
+### :memo: Documentation
+
+Update contributing with more test info [skip ci] ([#355](https://github.com/babel/babylon/pull/355)) (Brian Ng)
+
+Update API documentation ([#330](https://github.com/babel/babylon/pull/330)) (Timothy Gu)
+
+Added keywords to package.json ([#323](https://github.com/babel/babylon/pull/323)) (Dmytro)
+
+AST spec: fix casing of `RegExpLiteral` ([#318](https://github.com/babel/babylon/pull/318)) (Mathias Bynens)
+
+## 6.15.0 (2017-01-10)
+
+### :eyeglasses: Spec Compliance
+
+Add support for Flow shorthand import type ([#267](https://github.com/babel/babylon/pull/267)) (Jeff Morrison)
+
+This change implements flows new shorthand import syntax
+and where previously you had to write this code:
+
+```js
+import {someValue} from "blah";
+import type {someType} from "blah";
+import typeof {someOtherValue} from "blah";
+```
+
+you can now write it like this:
+
+```js
+import {
+  someValue,
+  type someType,
+  typeof someOtherValue,
+} from "blah";
+```
+
+For more information look at [this](https://github.com/facebook/flow/pull/2890) pull request.
+
+flow: allow leading pipes in all positions ([#256](https://github.com/babel/babylon/pull/256)) (Vladimir Kurchatkin)
+
+This change now allows a leading pipe everywhere types can be used:
+```js
+var f = (x): | 1 | 2 => 1;
+```
+
+Throw error when exporting non-declaration ([#241](https://github.com/babel/babylon/pull/241)) (Kai Cataldo)
+
+Previously babylon parsed the following exports, although they are not valid:
+```js
+export typeof foo;
+export new Foo();
+export function() {};
+export for (;;);
+export while(foo);
+```
+
+### :bug: Bug Fix
+
+Don't set inType flag when parsing property names ([#266](https://github.com/babel/babylon/pull/266)) (Vladimir Kurchatkin)
+
+This fixes parsing of this case:
+
+```js
+const map = {
+  [age <= 17] : 'Too young'
+};
+```
+
+Fix source location for JSXEmptyExpression nodes (fixes #248) ([#249](https://github.com/babel/babylon/pull/249)) (James Long)
+
+The following case produced an invalid AST
+```js
+<div>{/* foo */}</div>
+```
+
+Use fromCodePoint to convert high value unicode entities ([#243](https://github.com/babel/babylon/pull/243)) (Ryan Duffy)
+
+When high value unicode entities (e.g. 💩) were used in the input source code they are now correctly encoded in the resulting AST.
+
+Rename folder to avoid Windows-illegal characters ([#281](https://github.com/babel/babylon/pull/281)) (Ryan Plant)
+
+Allow this.state.clone() when parsing decorators ([#262](https://github.com/babel/babylon/pull/262)) (Alex Rattray)
+
+### :house: Internal
+
+User external-helpers ([#254](https://github.com/babel/babylon/pull/254)) (Daniel Tschinder)
+
+Add watch script for dev ([#234](https://github.com/babel/babylon/pull/234)) (Kai Cataldo)
+
+Freeze current plugins list for "*" option, and remove from README.md ([#245](https://github.com/babel/babylon/pull/245)) (Andrew Levine)
+
+Prepare tests for multiple fixture runners. ([#240](https://github.com/babel/babylon/pull/240)) (Daniel Tschinder)
+
+Add some test coverage for decorators stage-0 plugin ([#250](https://github.com/babel/babylon/pull/250)) (Andrew Levine)
+
+Refactor tokenizer types file ([#263](https://github.com/babel/babylon/pull/263)) (Sven SAULEAU)
+
+Update eslint-config-babel to the latest version 🚀 ([#273](https://github.com/babel/babylon/pull/273)) (greenkeeper[bot])
+
+chore(package): update rollup to version 0.41.0 ([#272](https://github.com/babel/babylon/pull/272)) (greenkeeper[bot])
+
+chore(package): update flow-bin to version 0.37.0 ([#255](https://github.com/babel/babylon/pull/255)) (greenkeeper[bot])
+
+## 6.14.1 (2016-11-17)
+
+### :bug: Bug Fix
+
+Allow `"plugins": ["*"]` ([#229](https://github.com/babel/babylon/pull/229)) (Daniel Tschinder)
+
+```js
+{
+  "plugins": ["*"]
+}
+```
+
+Will include all parser plugins instead of specifying each one individually. Useful for tools like babel-eslint, jscodeshift, and ast-explorer.
+
+## 6.14.0 (2016-11-16)
+
+### :eyeglasses: Spec Compliance
+
+Throw error for reserved words `enum` and `await` ([#195](https://github.com/babel/babylon/pull/195)) (Kai Cataldo)
+
+[11.6.2.2 Future Reserved Words](http://www.ecma-international.org/ecma-262/6.0/#sec-future-reserved-words)
+
+Babylon will throw for more reserved words such as `enum` or `await` (in strict mode).
+
+```
+class enum {} // throws
+class await {} // throws in strict mode (module)
+```
+
+Optional names for function types and object type indexers ([#197](https://github.com/babel/babylon/pull/197)) (Gabe Levi)
+
+So where you used to have to write
+
+```js
+type A = (x: string, y: boolean) => number;
+type B = (z: string) => number;
+type C = { [key: string]: number };
+```
+
+you can now write (with flow 0.34.0)
+
+```js
+type A = (string, boolean) => number;
+type B = string => number;
+type C = { [string]: number };
+```
+
+Parse flow nested array type annotations like `number[][]` ([#219](https://github.com/babel/babylon/pull/219)) (Bernhard Häussner)
+
+Supports these form now of specifying array types:
+
+```js
+var a: number[][][][];
+var b: string[][];
+```
+
+### :bug: Bug Fix
+
+Correctly eat semicolon at the end of `DelcareModuleExports` ([#223](https://github.com/babel/babylon/pull/223))  (Daniel Tschinder)
+
+```
+declare module "foo" { declare module.exports: number }
+declare module "foo" { declare module.exports: number; }  // also allowed now
+```
+
+### :house: Internal
+
+ * Count Babel tests towards Babylon code coverage ([#182](https://github.com/babel/babylon/pull/182)) (Moti Zilberman)
+ * Fix strange line endings ([#214](https://github.com/babel/babylon/pull/214)) (Thomas Grainger)
+ * Add node 7 (Daniel Tschinder)
+ * chore(package): update flow-bin to version 0.34.0 ([#204](https://github.com/babel/babylon/pull/204)) (Greenkeeper)
+
+## v6.13.1 (2016-10-26)
+
+### :nail_care: Polish
+
+- Use rollup for bundling to speed up startup time ([#190](https://github.com/babel/babylon/pull/190)) ([@drewml](https://github.com/DrewML))
+
+```js
+const babylon = require('babylon');
+const ast = babylon.parse('var foo = "lol";');
+```
+
+With that test case, there was a ~95ms savings by removing the need for node to build/traverse the dependency graph.
+
+**Without bundling**
+![image](https://cloud.githubusercontent.com/assets/5233399/19420264/3133497e-93ad-11e6-9a6a-2da59c4f5c13.png)
+
+**With bundling**
+![image](https://cloud.githubusercontent.com/assets/5233399/19420267/388f556e-93ad-11e6-813e-7c5c396be322.png)
+
+- add clean command [skip ci] ([#201](https://github.com/babel/babylon/pull/201)) (Henry Zhu)
+- add ForAwaitStatement (async generator already added) [skip ci] ([#196](https://github.com/babel/babylon/pull/196)) (Henry Zhu)
+
+## v6.13.0 (2016-10-21)
+
+### :eyeglasses: Spec Compliance
+
+Property variance type annotations for Flow plugin ([#161](https://github.com/babel/babylon/pull/161)) (Sam Goldman)
+
+> See https://flowtype.org/docs/variance.html for more information
+
+```js
+type T = { +p: T };
+interface T { -p: T };
+declare class T { +[k:K]: V };
+class T { -[k:K]: V };
+class C2 { +p: T = e };
+```
+
+Raise error on duplicate definition of __proto__ ([#183](https://github.com/babel/babylon/pull/183)) (Moti Zilberman)
+
+```js
+({ __proto__: 1, __proto__: 2 }) // Throws an error now
+```
+
+### :bug: Bug Fix
+
+Flow: Allow class properties to be named `static` ([#184](https://github.com/babel/babylon/pull/184)) (Moti Zilberman)
+
+```js
+declare class A {
+  static: T;
+}
+```
+
+Allow "async" as identifier for object literal property shorthand ([#187](https://github.com/babel/babylon/pull/187)) (Andrew Levine)
+
+```js
+var foo = { async, bar };
+```
+
+### :nail_care: Polish
+
+Fix flowtype and add inType to state ([#189](https://github.com/babel/babylon/pull/189)) (Daniel Tschinder)
+
+> This improves the performance slightly (because of hidden classes)
+
+### :house: Internal
+
+Fix .gitattributes line ending setting ([#191](https://github.com/babel/babylon/pull/191)) (Moti Zilberman)
+
+Increase test coverage ([#175](https://github.com/babel/babylon/pull/175) (Moti Zilberman)
+
+Readd missin .eslinignore for IDEs (Daniel Tschinder)
+
+Error on missing expected.json fixture in CI ([#188](https://github.com/babel/babylon/pull/188)) (Moti Zilberman)
+
+Add .gitattributes and .editorconfig for LF line endings ([#179](https://github.com/babel/babylon/pull/179)) (Moti Zilberman)
+
+Fixes two tests that are failing after the merge of #172 ([#177](https://github.com/babel/babylon/pull/177)) (Moti Zilberman)
+
+## v6.12.0 (2016-10-14)
+
+### :eyeglasses: Spec Compliance
+
+Implement import() syntax ([#163](https://github.com/babel/babylon/pull/163)) (Jordan Gensler)
+
+#### Dynamic Import
+
+- Proposal Repo: https://github.com/domenic/proposal-dynamic-import
+- Championed by [@domenic](https://github.com/domenic)
+- stage-2
+- [sept-28 tc39 notes](https://github.com/rwaldron/tc39-notes/blob/master/es7/2016-09/sept-28.md#113a-import)
+
+> This repository contains a proposal for adding a "function-like" import() module loading syntactic form to JavaScript
+
+```js
+import(`./section-modules/${link.dataset.entryModule}.js`)
+.then(module => {
+  module.loadPageInto(main);
+})
+```
+
+Add EmptyTypeAnnotation ([#171](https://github.com/babel/babylon/pull/171)) (Sam Goldman)
+
+#### EmptyTypeAnnotation
+
+Just wasn't covered before.
+
+```js
+type T = empty;
+```
+
+### :bug: Bug Fix
+
+Fix crash when exporting with destructuring and sparse array ([#170](https://github.com/babel/babylon/pull/170)) (Jeroen Engels)
+
+```js
+// was failing due to sparse array
+export const { foo: [ ,, qux7 ] } = bar;
+```
+
+Allow keyword in Flow object declaration property names with type parameters ([#146](https://github.com/babel/babylon/pull/146)) (Dan Harper)
+
+```js
+declare class X {
+  foobar<T>(): void;
+  static foobar<T>(): void;
+}
+```
+
+Allow keyword in object/class property names with Flow type parameters ([#145](https://github.com/babel/babylon/pull/145)) (Dan Harper)
+
+```js
+class Foo {
+  delete<T>(item: T): T {
+    return item;
+  }
+}
+```
+
+Allow typeAnnotations for yield expressions ([#174](https://github.com/babel/babylon/pull/174))) (Daniel Tschinder)
+
+```js
+function *foo() {
+  const x = (yield 5: any);
+}
+```
+
+### :nail_care: Polish
+
+Annotate more errors with expected token ([#172](https://github.com/babel/babylon/pull/172))) (Moti Zilberman)
+
+```js
+// Unexpected token, expected ; (1:6)
+{ set 1 }
+```
+
+### :house: Internal
+
+Remove kcheck ([#173](https://github.com/babel/babylon/pull/173)))  (Daniel Tschinder)
+
+Also run flow, linting, babel tests on separate instances (add back node 0.10)
+
+## v6.11.6 (2016-10-12)
+
+### :bug: Bug Fix/Regression
+
+Fix crash when exporting with destructuring and sparse array ([#170](https://github.com/babel/babylon/pull/170)) (Jeroen Engels)
+
+```js
+// was failing with `Cannot read property 'type' of null` because of null identifiers
+export const { foo: [ ,, qux7 ] } = bar;
+```
+
+## v6.11.5 (2016-10-12)
+
+### :eyeglasses: Spec Compliance
+
+Fix: Check for duplicate named exports in exported destructuring assignments ([#144](https://github.com/babel/babylon/pull/144)) (Kai Cataldo)
+
+```js
+// `foo` has already been exported. Exported identifiers must be unique. (2:20)
+export function foo() {};
+export const { a: [{foo}] } = bar;
+```
+
+Fix: Check for duplicate named exports in exported rest elements/properties ([#164](https://github.com/babel/babylon/pull/164)) (Kai Cataldo)
+
+```js
+// `foo` has already been exported. Exported identifiers must be unique. (2:22)
+export const foo = 1;
+export const [bar, ...foo] = baz;
+```
+
+### :bug: Bug Fix
+
+Fix: Allow identifier `async` for default param in arrow expression ([#165](https://github.com/babel/babylon/pull/165)) (Kai Cataldo)
+
+```js
+// this is ok now
+const test = ({async = true}) => {};
+```
+
+### :nail_care: Polish
+
+Babylon will now print out the token it's expecting if there's a `SyntaxError` ([#150](https://github.com/babel/babylon/pull/150)) (Daniel Tschinder)
+
+```bash
+# So in the case of a missing ending curly (`}`)
+Module build failed: SyntaxError: Unexpected token, expected } (30:0)
+  28 |   }
+  29 |
+> 30 |
+     | ^
+```
+
+## v6.11.4 (2016-10-03)
+
+Temporary rollback for erroring on trailing comma with spread (#154) (Henry Zhu)
+
+## v6.11.3 (2016-10-01)
+
+### :eyeglasses: Spec Compliance
+
+Add static errors for object rest (#149) ([@danez](https://github.com/danez))
+
+> https://github.com/sebmarkbage/ecmascript-rest-spread
+
+Object rest copies the *rest* of properties from the right hand side `obj` starting from the left to right.
+
+```js
+let { x, y, ...z } =  { x: 1, y: 2, z: 3 };
+// x = 1
+// y = 2
+// z = { z: 3 }
+```
+
+#### New Syntax Errors:
+
+**SyntaxError**: The rest element has to be the last element when destructuring (1:10)
+```bash
+> 1 | let { ...x, y, z } = { x: 1, y: 2, z: 3};
+    |           ^
+# Previous behavior:
+# x = { x: 1, y: 2, z: 3 }
+# y = 2
+# z = 3
+```
+
+Before, this was just a more verbose way of shallow copying `obj` since it doesn't actually do what you think.
+
+**SyntaxError**: Cannot have multiple rest elements when destructuring (1:13)
+
+```bash
+> 1 | let { x, ...y, ...z } = { x: 1, y: 2, z: 3};
+    |              ^
+# Previous behavior:
+# x = 1
+# y = { y: 2, z: 3 }
+# z = { y: 2, z: 3 }
+```
+
+Before y and z would just be the same value anyway so there is no reason to need to have both.
+
+**SyntaxError**: A trailing comma is not permitted after the rest element (1:16)
+
+```js
+let { x, y, ...z, } = obj;
+```
+
+The rationale for this is that the use case for trailing comma is that you can add something at the end without affecting the line above. Since a RestProperty always has to be the last property it doesn't make sense.
+
+---
+
+get / set are valid property names in default assignment (#142) ([@jezell](https://github.com/jezell))
+
+```js
+// valid
+function something({ set = null, get = null }) {}
+```
+
+## v6.11.2 (2016-09-23)
+
+### Bug Fix
+
+- [#139](https://github.com/babel/babylon/issues/139) Don't do the duplicate check if not an identifier (#140) @hzoo
+
+```js
+// regression with duplicate export check
+SyntaxError: ./typography.js: `undefined` has already been exported. Exported identifiers must be unique. (22:13)
+  20 |
+  21 | export const { rhythm } = typography;
+> 22 | export const { TypographyStyle } = typography
+```
+
+Bail out for now, and make a change to account for destructuring in the next release.
+
+## 6.11.1 (2016-09-22)
+
+### Bug Fix
+- [#137](https://github.com/babel/babylon/pull/137) - Fix a regression with duplicate exports - it was erroring on all keys in `Object.prototype`. @danez
+
+```javascript
+export toString from './toString';
+```
+
+```bash
+`toString` has already been exported. Exported identifiers must be unique. (1:7)
+> 1 | export toString from './toString';
+    |        ^
+  2 |
+```
+
+## 6.11.0 (2016-09-22)
+
+### Spec Compliance (will break CI)
+
+- Disallow duplicate named exports ([#107](https://github.com/babel/babylon/pull/107)) @kaicataldo
+
+```js
+// Only one default export allowed per module. (2:9)
+export default function() {};
+export { foo as default };
+
+// Only one default export allowed per module. (2:0)
+export default {};
+export default function() {};
+
+// `Foo` has already been exported. Exported identifiers must be unique. (2:0)
+export { Foo };
+export class Foo {};
+```
+
+### New Feature (Syntax)
+
+- Add support for computed class property names ([#121](https://github.com/babel/babylon/pull/121)) @motiz88
+
+```js
+// AST
+interface ClassProperty <: Node {
+  type: "ClassProperty";
+  key: Identifier;
+  value: Expression;
+  computed: boolean; // added
+}
+```
+
+```js
+// with "plugins": ["classProperties"]
+class Foo {
+  [x]
+  ['y']
+}
+
+class Bar {
+  [p]
+  [m] () {}
+}
+ ```
+
+### Bug Fix
+
+- Fix `static` property falling through in the declare class Flow AST ([#135](https://github.com/babel/babylon/pull/135)) @danharper
+
+```js
+declare class X {
+    a: number;
+    static b: number; // static
+    c: number; // this was being marked as static in the AST as well
+}
+```
+
+### Polish
+
+- Rephrase "assigning/binding to rvalue" errors to include context ([#119](https://github.com/babel/babylon/pull/119)) @motiz88
+
+```js
+// Used to error with:
+// SyntaxError: Assigning to rvalue (1:0)
+
+// Now:
+// Invalid left-hand side in assignment expression (1:0)
+3 = 4
+
+// Invalid left-hand side in for-in statement (1:5)
+for (+i in {});
+```
+
+### Internal
+
+- Fix call to `this.parseMaybeAssign` with correct arguments ([#133](https://github.com/babel/babylon/pull/133)) @danez
+- Add semver note to changelog ([#131](https://github.com/babel/babylon/pull/131)) @hzoo
+
+## 6.10.0 (2016-09-19)
+
+> We plan to include some spec compliance bugs in patch versions. An example was the multiple default exports issue.
+
+### Spec Compliance
+
+* Implement ES2016 check for simple parameter list in strict mode ([#106](https://github.com/babel/babylon/pull/106)) (Timothy Gu)
+
+> It is a Syntax Error if ContainsUseStrict of FunctionBody is true and IsSimpleParameterList of FormalParameters is false. https://tc39.github.io/ecma262/2016/#sec-function-definitions-static-semantics-early-errors
+
+More Context: [tc39-notes](https://github.com/rwaldron/tc39-notes/blob/master/es7/2015-07/july-29.md#611-the-scope-of-use-strict-with-respect-to-destructuring-in-parameter-lists)
+
+For example:
+
+```js
+// this errors because it uses destructuring and default parameters
+// in a function with a "use strict" directive
+function a([ option1, option2 ] = []) {
+  "use strict";
+}
+ ```
+
+The solution would be to use a top level "use strict" or to remove the destructuring or default parameters when using a function + "use strict" or to.
+
+### New Feature
+
+* Exact object type annotations for Flow plugin ([#104](https://github.com/babel/babylon/pull/104)) (Basil Hosmer)
+
+Added to flow in https://github.com/facebook/flow/commit/c710c40aa2a115435098d6c0dfeaadb023cd39b8
+
+Looks like:
+
+```js
+var a : {| x: number, y: string |} = { x: 0, y: 'foo' };
+```
+
+### Bug Fixes
+
+* Include `typeParameter` location in `ArrowFunctionExpression` ([#126](https://github.com/babel/babylon/pull/126)) (Daniel Tschinder)
+* Error on invalid flow type annotation with default assignment ([#122](https://github.com/babel/babylon/pull/122)) (Dan Harper)
+* Fix Flow return types on arrow functions ([#124](https://github.com/babel/babylon/pull/124)) (Dan Harper)
+
+### Misc
+
+* Add tests for export extensions ([#127](https://github.com/babel/babylon/pull/127)) (Daniel Tschinder)
+* Fix Contributing guidelines [skip ci] (Daniel Tschinder)
+
+## 6.9.2 (2016-09-09)
+
+The only change is to remove the `babel-runtime` dependency by compiling with Babel's ES2015 loose mode. So using babylon standalone should be smaller.
+
+## 6.9.1 (2016-08-23)
+
+This release contains mainly small bugfixes but also updates babylons default mode to es2017. The features for `exponentiationOperator`, `asyncFunctions` and `trailingFunctionCommas` which previously needed to be activated via plugin are now enabled by default and the plugins are now no-ops.
+
+### Bug Fixes
+
+- Fix issues with default object params in async functions ([#96](https://github.com/babel/babylon/pull/96)) @danez
+- Fix issues with flow-types and async function ([#95](https://github.com/babel/babylon/pull/95)) @danez
+- Fix arrow functions with destructuring, types & default value ([#94](https://github.com/babel/babylon/pull/94)) @danharper
+- Fix declare class with qualified type identifier ([#97](https://github.com/babel/babylon/pull/97)) @danez
+- Remove exponentiationOperator, asyncFunctions, trailingFunctionCommas plugins and enable them by default ([#98](https://github.com/babel/babylon/pull/98)) @danez
+
+## 6.9.0 (2016-08-16)
+
+### New syntax support
+
+- Add JSX spread children ([#42](https://github.com/babel/babylon/pull/42)) @calebmer
+
+(Be aware that React is not going to support this syntax)
+
+```js
+<div>
+  {...todos.map(todo => <Todo key={todo.id} todo={todo}/>)}
+</div>
+```
+
+- Add support for declare module.exports ([#72](https://github.com/babel/babylon/pull/72)) @danez
+
+```js
+declare module "foo" {
+  declare module.exports: {}
+}
+```
+
+### New Features
+
+- If supplied, attach filename property to comment node loc. ([#80](https://github.com/babel/babylon/pull/80)) @divmain
+- Add identifier name to node loc field ([#90](https://github.com/babel/babylon/pull/90)) @kittens
+
+### Bug Fixes
+
+- Fix exponential operator to behave according to spec ([#75](https://github.com/babel/babylon/pull/75)) @danez
+- Fix lookahead to not add comments to arrays which are not cloned ([#76](https://github.com/babel/babylon/pull/76)) @danez
+- Fix accidental fall-through in Flow type parsing. ([#82](https://github.com/babel/babylon/pull/82)) @xiemaisi
+- Only allow declares inside declare module ([#73](https://github.com/babel/babylon/pull/73)) @danez
+- Small fix for parsing type parameter declarations ([#83](https://github.com/babel/babylon/pull/83)) @gabelevi
+- Fix arrow param locations with flow types ([#57](https://github.com/babel/babylon/pull/57)) @danez
+- Fixes SyntaxError position with flow optional type ([#65](https://github.com/babel/babylon/pull/65)) @danez
+
+### Internal
+
+- Add codecoverage to tests @danez
+- Fix tests to not save expected output if we expect the test to fail @danez
+- Make a shallow clone of babel for testing @danez
+- chore(package): update cross-env to version 2.0.0 ([#77](https://github.com/babel/babylon/pull/77)) @greenkeeperio-bot
+- chore(package): update ava to version 0.16.0 ([#86](https://github.com/babel/babylon/pull/86)) @greenkeeperio-bot
+- chore(package): update babel-plugin-istanbul to version 2.0.0 ([#89](https://github.com/babel/babylon/pull/89)) @greenkeeperio-bot
+- chore(package): update nyc to version 8.0.0 ([#88](https://github.com/babel/babylon/pull/88)) @greenkeeperio-bot
+
+## 6.8.4 (2016-07-06)
+
+### Bug Fixes
+
+- Fix the location of params, when flow and default value used ([#68](https://github.com/babel/babylon/pull/68)) @danez
+
+## 6.8.3 (2016-07-02)
+
+### Bug Fixes
+
+- Fix performance regression introduced in 6.8.2 with conditionals ([#63](https://github.com/babel/babylon/pull/63)) @danez
+
+## 6.8.2 (2016-06-24)
+
+### Bug Fixes
+
+- Fix parse error with yielding jsx elements in generators `function* it() { yield <a></a>; }` ([#31](https://github.com/babel/babylon/pull/31)) @eldereal
+- When cloning nodes do not clone its comments ([#24](https://github.com/babel/babylon/pull/24)) @danez
+- Fix parse errors when using arrow functions with an spread element and return type `(...props): void => {}` ([#10](https://github.com/babel/babylon/pull/10)) @danez
+- Fix leading comments added from previous node ([#23](https://github.com/babel/babylon/pull/23)) @danez
+- Fix parse errors with flow's optional arguments `(arg?) => {}` ([#19](https://github.com/babel/babylon/pull/19)) @danez
+- Support negative numeric type literals @kittens
+- Remove line terminator restriction after await keyword @kittens
+- Remove grouped type arrow restriction as it seems flow no longer has it @kittens
+- Fix parse error with generic methods that have the name `get` or `set` `class foo { get() {} }` ([#55](https://github.com/babel/babylon/pull/55)) @vkurchatkin
+- Fix parse error with arrow functions that have flow type parameter declarations `<T>(x: T): T => x;` ([#54](https://github.com/babel/babylon/pull/54)) @gabelevi
+
+### Documentation
+
+- Document AST differences from ESTree ([#41](https://github.com/babel/babylon/pull/41)) @nene
+- Move ast spec from babel/babel ([#46](https://github.com/babel/babylon/pull/46)) @hzoo
+
+### Internal
+
+- Enable skipped tests ([#16](https://github.com/babel/babylon/pull/16)) @danez
+- Add script to test latest version of babylon with babel ([#21](https://github.com/babel/babylon/pull/21)) @danez
+- Upgrade test runner ava @kittens
+- Add missing generate-identifier-regex script @kittens
+- Rename parser context types @kittens
+- Add node v6 to travis testing @hzoo
+- Update to Unicode v9 ([#45](https://github.com/babel/babylon/pull/45)) @mathiasbynens
+
+## 6.8.1 (2016-06-06)
+
+### New Feature
+
+- Parse type parameter declarations with defaults like `type Foo<T = string> = T`
+
+### Bug Fixes
+- Type parameter declarations need 1 or more type parameters.
+- The existential type `*` is not a valid type parameter.
+- The existential type `*` is a primary type
+
+### Spec Compliance
+- The param list for type parameter declarations now consists of `TypeParameter` nodes
+- New `TypeParameter` AST Node (replaces using the `Identifier` node before)
+
+```
+interface TypeParameter <: Node {
+  bound: TypeAnnotation;
+  default: TypeAnnotation;
+  name: string;
+  variance: "plus" | "minus";
+}
+```
+
+## 6.8.0 (2016-05-02)
+
+#### New Feature
+
+##### Parse Method Parameter Decorators ([#12](https://github.com/babel/babylon/pull/12))
+
+> [Method Parameter Decorators](https://goo.gl/8MmCMG) is now a TC39 [stage 0 proposal](https://github.com/tc39/ecma262/blob/master/stage0.md).
+
+Examples:
+
+```js
+class Foo {
+  constructor(@foo() x, @bar({ a: 123 }) @baz() y) {}
+}
+
+export default function func(@foo() x, @bar({ a: 123 }) @baz() y) {}
+
+var obj = {
+  method(@foo() x, @bar({ a: 123 }) @baz() y) {}
+};
+```
+
+##### Parse for-await statements (w/ `asyncGenerators` plugin) ([#17](https://github.com/babel/babylon/pull/17))
+
+There is also a new node type, `ForAwaitStatement`.
+
+> [Async generators and for-await](https://github.com/tc39/proposal-async-iteration) are now a [stage 2 proposal](https://github.com/tc39/ecma262#current-proposals).
+
+Example:
+
+```js
+async function f() {
+  for await (let x of y);
+}
+```

+ 19 - 0
node_modules/@babel/parser/LICENSE

@@ -0,0 +1,19 @@
+Copyright (C) 2012-2014 by various contributors (see AUTHORS)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.

+ 19 - 0
node_modules/@babel/parser/README.md

@@ -0,0 +1,19 @@
+# @babel/parser
+
+> A JavaScript parser
+
+See our website [@babel/parser](https://babeljs.io/docs/babel-parser) for more information or the [issues](https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22pkg%3A%20parser%22+is%3Aopen) associated with this package.
+
+## Install
+
+Using npm:
+
+```sh
+npm install --save-dev @babel/parser
+```
+
+or using yarn:
+
+```sh
+yarn add @babel/parser --dev
+```

+ 15 - 0
node_modules/@babel/parser/bin/babel-parser.js

@@ -0,0 +1,15 @@
+#!/usr/bin/env node
+/* eslint no-var: 0 */
+
+var parser = require("..");
+var fs = require("fs");
+
+var filename = process.argv[2];
+if (!filename) {
+  console.error("no filename specified");
+} else {
+  var file = fs.readFileSync(filename, "utf8");
+  var ast = parser.parse(file);
+
+  console.log(JSON.stringify(ast, null, "  "));
+}

+ 5 - 0
node_modules/@babel/parser/index.cjs

@@ -0,0 +1,5 @@
+try {
+  module.exports = require("./lib/index.cjs");
+} catch {
+  module.exports = require("./lib/index.js");
+}

Fichier diff supprimé car celui-ci est trop grand
+ 1318 - 0
node_modules/@babel/parser/lib/index.js


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
node_modules/@babel/parser/lib/index.js.map


+ 46 - 0
node_modules/@babel/parser/package.json

@@ -0,0 +1,46 @@
+{
+  "name": "@babel/parser",
+  "version": "7.24.5",
+  "description": "A JavaScript parser",
+  "author": "The Babel Team (https://babel.dev/team)",
+  "homepage": "https://babel.dev/docs/en/next/babel-parser",
+  "bugs": "https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22pkg%3A+parser+%28babylon%29%22+is%3Aopen",
+  "license": "MIT",
+  "publishConfig": {
+    "access": "public"
+  },
+  "keywords": [
+    "babel",
+    "javascript",
+    "parser",
+    "tc39",
+    "ecmascript",
+    "@babel/parser"
+  ],
+  "repository": {
+    "type": "git",
+    "url": "https://github.com/babel/babel.git",
+    "directory": "packages/babel-parser"
+  },
+  "main": "./lib/index.js",
+  "types": "./typings/babel-parser.d.ts",
+  "files": [
+    "bin",
+    "lib",
+    "typings/babel-parser.d.ts",
+    "index.cjs"
+  ],
+  "engines": {
+    "node": ">=6.0.0"
+  },
+  "devDependencies": {
+    "@babel/code-frame": "^7.24.2",
+    "@babel/helper-check-duplicate-nodes": "^7.22.5",
+    "@babel/helper-fixtures": "^7.24.4",
+    "@babel/helper-string-parser": "^7.24.1",
+    "@babel/helper-validator-identifier": "^7.24.5",
+    "charcodes": "^0.2.0"
+  },
+  "bin": "./bin/babel-parser.js",
+  "type": "commonjs"
+}

+ 251 - 0
node_modules/@babel/parser/typings/babel-parser.d.ts

@@ -0,0 +1,251 @@
+// This file is auto-generated! Do not modify it directly.
+/* eslint-disable import/no-extraneous-dependencies, @typescript-eslint/consistent-type-imports, prettier/prettier */
+import * as _babel_types from '@babel/types';
+
+type Plugin =
+  | "asyncDoExpressions"
+  | "asyncGenerators"
+  | "bigInt"
+  | "classPrivateMethods"
+  | "classPrivateProperties"
+  | "classProperties"
+  | "classStaticBlock" // Enabled by default
+  | "decimal"
+  | "decorators-legacy"
+  | "deferredImportEvaluation"
+  | "decoratorAutoAccessors"
+  | "destructuringPrivate"
+  | "doExpressions"
+  | "dynamicImport"
+  | "explicitResourceManagement"
+  | "exportDefaultFrom"
+  | "exportNamespaceFrom" // deprecated
+  | "flow"
+  | "flowComments"
+  | "functionBind"
+  | "functionSent"
+  | "importMeta"
+  | "jsx"
+  | "logicalAssignment"
+  | "importAssertions" // deprecated
+  | "importAttributes"
+  | "importReflection"
+  | "moduleBlocks"
+  | "moduleStringNames"
+  | "nullishCoalescingOperator"
+  | "numericSeparator"
+  | "objectRestSpread"
+  | "optionalCatchBinding"
+  | "optionalChaining"
+  | "partialApplication"
+  | "placeholders"
+  | "privateIn" // Enabled by default
+  | "regexpUnicodeSets" // Enabled by default
+  | "sourcePhaseImports"
+  | "throwExpressions"
+  | "topLevelAwait"
+  | "v8intrinsic"
+  | ParserPluginWithOptions[0];
+
+type ParserPluginWithOptions =
+  | ["decorators", DecoratorsPluginOptions]
+  | ["estree", { classFeatures?: boolean }]
+  | ["importAttributes", { deprecatedAssertSyntax: boolean }]
+  // @deprecated
+  | ["moduleAttributes", { version: "may-2020" }]
+  | ["optionalChainingAssign", { version: "2023-07" }]
+  | ["pipelineOperator", PipelineOperatorPluginOptions]
+  | ["recordAndTuple", RecordAndTuplePluginOptions]
+  | ["flow", FlowPluginOptions]
+  | ["typescript", TypeScriptPluginOptions];
+
+type PluginConfig = Plugin | ParserPluginWithOptions;
+
+interface DecoratorsPluginOptions {
+  decoratorsBeforeExport?: boolean;
+  allowCallParenthesized?: boolean;
+}
+
+interface PipelineOperatorPluginOptions {
+  proposal: "minimal" | "fsharp" | "hack" | "smart";
+  topicToken?: "%" | "#" | "@@" | "^^" | "^";
+}
+
+interface RecordAndTuplePluginOptions {
+  syntaxType: "bar" | "hash";
+}
+
+interface FlowPluginOptions {
+  all?: boolean;
+  enums?: boolean;
+}
+
+interface TypeScriptPluginOptions {
+  dts?: boolean;
+  disallowAmbiguousJSXLike?: boolean;
+}
+
+// Type definitions for @babel/parser
+// Project: https://github.com/babel/babel/tree/main/packages/babel-parser
+// Definitions by: Troy Gerwien <https://github.com/yortus>
+//                 Marvin Hagemeister <https://github.com/marvinhagemeister>
+//                 Avi Vahl <https://github.com/AviVahl>
+// TypeScript Version: 2.9
+
+/**
+ * Parse the provided code as an entire ECMAScript program.
+ */
+declare function parse(
+  input: string,
+  options?: ParserOptions
+): ParseResult<_babel_types.File>;
+
+/**
+ * Parse the provided code as a single expression.
+ */
+declare function parseExpression(
+  input: string,
+  options?: ParserOptions
+): ParseResult<_babel_types.Expression>;
+
+interface ParserOptions {
+  /**
+   * By default, import and export declarations can only appear at a program's top level.
+   * Setting this option to true allows them anywhere where a statement is allowed.
+   */
+  allowImportExportEverywhere?: boolean;
+
+  /**
+   * By default, await use is not allowed outside of an async function.
+   * Set this to true to accept such code.
+   */
+  allowAwaitOutsideFunction?: boolean;
+
+  /**
+   * By default, a return statement at the top level raises an error.
+   * Set this to true to accept such code.
+   */
+  allowReturnOutsideFunction?: boolean;
+
+  /**
+   * By default, new.target use is not allowed outside of a function or class.
+   * Set this to true to accept such code.
+   */
+  allowNewTargetOutsideFunction?: boolean;
+
+  allowSuperOutsideMethod?: boolean;
+
+  /**
+   * By default, exported identifiers must refer to a declared variable.
+   * Set this to true to allow export statements to reference undeclared variables.
+   */
+  allowUndeclaredExports?: boolean;
+
+  /**
+   * By default, Babel parser JavaScript code according to Annex B syntax.
+   * Set this to `false` to disable such behavior.
+   */
+  annexB?: boolean;
+
+  /**
+   * By default, Babel attaches comments to adjacent AST nodes.
+   * When this option is set to false, comments are not attached.
+   * It can provide up to 30% performance improvement when the input code has many comments.
+   * @babel/eslint-parser will set it for you.
+   * It is not recommended to use attachComment: false with Babel transform,
+   * as doing so removes all the comments in output code, and renders annotations such as
+   * /* istanbul ignore next *\/ nonfunctional.
+   */
+  attachComment?: boolean;
+
+  /**
+   * By default, Babel always throws an error when it finds some invalid code.
+   * When this option is set to true, it will store the parsing error and
+   * try to continue parsing the invalid input file.
+   */
+  errorRecovery?: boolean;
+
+  /**
+   * Indicate the mode the code should be parsed in.
+   * Can be one of "script", "module", or "unambiguous". Defaults to "script".
+   * "unambiguous" will make @babel/parser attempt to guess, based on the presence
+   * of ES6 import or export statements.
+   * Files with ES6 imports and exports are considered "module" and are otherwise "script".
+   */
+  sourceType?: "script" | "module" | "unambiguous";
+
+  /**
+   * Correlate output AST nodes with their source filename.
+   * Useful when generating code and source maps from the ASTs of multiple input files.
+   */
+  sourceFilename?: string;
+
+  /**
+   * By default, the first line of code parsed is treated as line 1.
+   * You can provide a line number to alternatively start with.
+   * Useful for integration with other source tools.
+   */
+  startLine?: number;
+
+  /**
+   * By default, the parsed code is treated as if it starts from line 1, column 0.
+   * You can provide a column number to alternatively start with.
+   * Useful for integration with other source tools.
+   */
+  startColumn?: number;
+
+  /**
+   * Array containing the plugins that you want to enable.
+   */
+  plugins?: ParserPlugin[];
+
+  /**
+   * Should the parser work in strict mode.
+   * Defaults to true if sourceType === 'module'. Otherwise, false.
+   */
+  strictMode?: boolean;
+
+  /**
+   * Adds a ranges property to each node: [node.start, node.end]
+   */
+  ranges?: boolean;
+
+  /**
+   * Adds all parsed tokens to a tokens property on the File node.
+   */
+  tokens?: boolean;
+
+  /**
+   * By default, the parser adds information about parentheses by setting
+   * `extra.parenthesized` to `true` as needed.
+   * When this option is `true` the parser creates `ParenthesizedExpression`
+   * AST nodes instead of using the `extra` property.
+   */
+  createParenthesizedExpressions?: boolean;
+
+  /**
+   * The default is false in Babel 7 and true in Babel 8
+   * Set this to true to parse it as an `ImportExpression` node.
+   * Otherwise `import(foo)` is parsed as `CallExpression(Import, [Identifier(foo)])`.
+   */
+  createImportExpressions?: boolean;
+}
+
+type ParserPlugin = PluginConfig;
+
+
+declare const tokTypes: {
+  // todo(flow->ts) real token type
+  [name: string]: any;
+};
+
+interface ParseError {
+  code: string;
+  reasonCode: string;
+}
+
+type ParseResult<Result> = Result & {
+  errors: ParseError[];
+};
+
+export { DecoratorsPluginOptions, FlowPluginOptions, ParseError, ParseResult, ParserOptions, ParserPlugin, ParserPluginWithOptions, PipelineOperatorPluginOptions, RecordAndTuplePluginOptions, TypeScriptPluginOptions, parse, parseExpression, tokTypes };

+ 20 - 0
node_modules/@intlify/core-base/LICENSE

@@ -0,0 +1,20 @@
+The MIT License (MIT)
+
+Copyright (c) 2020 kazuya kawaguchi
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ 7 - 0
node_modules/@intlify/core-base/README.md

@@ -0,0 +1,7 @@
+# @intlify/core-base
+
+The intlify core base module
+
+## :copyright: License
+
+[MIT](http://opensource.org/licenses/MIT)

+ 1857 - 0
node_modules/@intlify/core-base/dist/core-base.cjs

@@ -0,0 +1,1857 @@
+/*!
+  * core-base v9.13.1
+  * (c) 2024 kazuya kawaguchi
+  * Released under the MIT License.
+  */
+'use strict';
+
+var messageCompiler = require('@intlify/message-compiler');
+var shared = require('@intlify/shared');
+
+const pathStateMachine =  [];
+pathStateMachine[0 /* States.BEFORE_PATH */] = {
+    ["w" /* PathCharTypes.WORKSPACE */]: [0 /* States.BEFORE_PATH */],
+    ["i" /* PathCharTypes.IDENT */]: [3 /* States.IN_IDENT */, 0 /* Actions.APPEND */],
+    ["[" /* PathCharTypes.LEFT_BRACKET */]: [4 /* States.IN_SUB_PATH */],
+    ["o" /* PathCharTypes.END_OF_FAIL */]: [7 /* States.AFTER_PATH */]
+};
+pathStateMachine[1 /* States.IN_PATH */] = {
+    ["w" /* PathCharTypes.WORKSPACE */]: [1 /* States.IN_PATH */],
+    ["." /* PathCharTypes.DOT */]: [2 /* States.BEFORE_IDENT */],
+    ["[" /* PathCharTypes.LEFT_BRACKET */]: [4 /* States.IN_SUB_PATH */],
+    ["o" /* PathCharTypes.END_OF_FAIL */]: [7 /* States.AFTER_PATH */]
+};
+pathStateMachine[2 /* States.BEFORE_IDENT */] = {
+    ["w" /* PathCharTypes.WORKSPACE */]: [2 /* States.BEFORE_IDENT */],
+    ["i" /* PathCharTypes.IDENT */]: [3 /* States.IN_IDENT */, 0 /* Actions.APPEND */],
+    ["0" /* PathCharTypes.ZERO */]: [3 /* States.IN_IDENT */, 0 /* Actions.APPEND */]
+};
+pathStateMachine[3 /* States.IN_IDENT */] = {
+    ["i" /* PathCharTypes.IDENT */]: [3 /* States.IN_IDENT */, 0 /* Actions.APPEND */],
+    ["0" /* PathCharTypes.ZERO */]: [3 /* States.IN_IDENT */, 0 /* Actions.APPEND */],
+    ["w" /* PathCharTypes.WORKSPACE */]: [1 /* States.IN_PATH */, 1 /* Actions.PUSH */],
+    ["." /* PathCharTypes.DOT */]: [2 /* States.BEFORE_IDENT */, 1 /* Actions.PUSH */],
+    ["[" /* PathCharTypes.LEFT_BRACKET */]: [4 /* States.IN_SUB_PATH */, 1 /* Actions.PUSH */],
+    ["o" /* PathCharTypes.END_OF_FAIL */]: [7 /* States.AFTER_PATH */, 1 /* Actions.PUSH */]
+};
+pathStateMachine[4 /* States.IN_SUB_PATH */] = {
+    ["'" /* PathCharTypes.SINGLE_QUOTE */]: [5 /* States.IN_SINGLE_QUOTE */, 0 /* Actions.APPEND */],
+    ["\"" /* PathCharTypes.DOUBLE_QUOTE */]: [6 /* States.IN_DOUBLE_QUOTE */, 0 /* Actions.APPEND */],
+    ["[" /* PathCharTypes.LEFT_BRACKET */]: [
+        4 /* States.IN_SUB_PATH */,
+        2 /* Actions.INC_SUB_PATH_DEPTH */
+    ],
+    ["]" /* PathCharTypes.RIGHT_BRACKET */]: [1 /* States.IN_PATH */, 3 /* Actions.PUSH_SUB_PATH */],
+    ["o" /* PathCharTypes.END_OF_FAIL */]: 8 /* States.ERROR */,
+    ["l" /* PathCharTypes.ELSE */]: [4 /* States.IN_SUB_PATH */, 0 /* Actions.APPEND */]
+};
+pathStateMachine[5 /* States.IN_SINGLE_QUOTE */] = {
+    ["'" /* PathCharTypes.SINGLE_QUOTE */]: [4 /* States.IN_SUB_PATH */, 0 /* Actions.APPEND */],
+    ["o" /* PathCharTypes.END_OF_FAIL */]: 8 /* States.ERROR */,
+    ["l" /* PathCharTypes.ELSE */]: [5 /* States.IN_SINGLE_QUOTE */, 0 /* Actions.APPEND */]
+};
+pathStateMachine[6 /* States.IN_DOUBLE_QUOTE */] = {
+    ["\"" /* PathCharTypes.DOUBLE_QUOTE */]: [4 /* States.IN_SUB_PATH */, 0 /* Actions.APPEND */],
+    ["o" /* PathCharTypes.END_OF_FAIL */]: 8 /* States.ERROR */,
+    ["l" /* PathCharTypes.ELSE */]: [6 /* States.IN_DOUBLE_QUOTE */, 0 /* Actions.APPEND */]
+};
+/**
+ * Check if an expression is a literal value.
+ */
+const literalValueRE = /^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;
+function isLiteral(exp) {
+    return literalValueRE.test(exp);
+}
+/**
+ * Strip quotes from a string
+ */
+function stripQuotes(str) {
+    const a = str.charCodeAt(0);
+    const b = str.charCodeAt(str.length - 1);
+    return a === b && (a === 0x22 || a === 0x27) ? str.slice(1, -1) : str;
+}
+/**
+ * Determine the type of a character in a keypath.
+ */
+function getPathCharType(ch) {
+    if (ch === undefined || ch === null) {
+        return "o" /* PathCharTypes.END_OF_FAIL */;
+    }
+    const code = ch.charCodeAt(0);
+    switch (code) {
+        case 0x5b: // [
+        case 0x5d: // ]
+        case 0x2e: // .
+        case 0x22: // "
+        case 0x27: // '
+            return ch;
+        case 0x5f: // _
+        case 0x24: // $
+        case 0x2d: // -
+            return "i" /* PathCharTypes.IDENT */;
+        case 0x09: // Tab (HT)
+        case 0x0a: // Newline (LF)
+        case 0x0d: // Return (CR)
+        case 0xa0: // No-break space (NBSP)
+        case 0xfeff: // Byte Order Mark (BOM)
+        case 0x2028: // Line Separator (LS)
+        case 0x2029: // Paragraph Separator (PS)
+            return "w" /* PathCharTypes.WORKSPACE */;
+    }
+    return "i" /* PathCharTypes.IDENT */;
+}
+/**
+ * Format a subPath, return its plain form if it is
+ * a literal string or number. Otherwise prepend the
+ * dynamic indicator (*).
+ */
+function formatSubPath(path) {
+    const trimmed = path.trim();
+    // invalid leading 0
+    if (path.charAt(0) === '0' && isNaN(parseInt(path))) {
+        return false;
+    }
+    return isLiteral(trimmed)
+        ? stripQuotes(trimmed)
+        : "*" /* PathCharTypes.ASTARISK */ + trimmed;
+}
+/**
+ * Parse a string path into an array of segments
+ */
+function parse(path) {
+    const keys = [];
+    let index = -1;
+    let mode = 0 /* States.BEFORE_PATH */;
+    let subPathDepth = 0;
+    let c;
+    let key; // eslint-disable-line
+    let newChar;
+    let type;
+    let transition;
+    let action;
+    let typeMap;
+    const actions = [];
+    actions[0 /* Actions.APPEND */] = () => {
+        if (key === undefined) {
+            key = newChar;
+        }
+        else {
+            key += newChar;
+        }
+    };
+    actions[1 /* Actions.PUSH */] = () => {
+        if (key !== undefined) {
+            keys.push(key);
+            key = undefined;
+        }
+    };
+    actions[2 /* Actions.INC_SUB_PATH_DEPTH */] = () => {
+        actions[0 /* Actions.APPEND */]();
+        subPathDepth++;
+    };
+    actions[3 /* Actions.PUSH_SUB_PATH */] = () => {
+        if (subPathDepth > 0) {
+            subPathDepth--;
+            mode = 4 /* States.IN_SUB_PATH */;
+            actions[0 /* Actions.APPEND */]();
+        }
+        else {
+            subPathDepth = 0;
+            if (key === undefined) {
+                return false;
+            }
+            key = formatSubPath(key);
+            if (key === false) {
+                return false;
+            }
+            else {
+                actions[1 /* Actions.PUSH */]();
+            }
+        }
+    };
+    function maybeUnescapeQuote() {
+        const nextChar = path[index + 1];
+        if ((mode === 5 /* States.IN_SINGLE_QUOTE */ &&
+            nextChar === "'" /* PathCharTypes.SINGLE_QUOTE */) ||
+            (mode === 6 /* States.IN_DOUBLE_QUOTE */ &&
+                nextChar === "\"" /* PathCharTypes.DOUBLE_QUOTE */)) {
+            index++;
+            newChar = '\\' + nextChar;
+            actions[0 /* Actions.APPEND */]();
+            return true;
+        }
+    }
+    while (mode !== null) {
+        index++;
+        c = path[index];
+        if (c === '\\' && maybeUnescapeQuote()) {
+            continue;
+        }
+        type = getPathCharType(c);
+        typeMap = pathStateMachine[mode];
+        transition = typeMap[type] || typeMap["l" /* PathCharTypes.ELSE */] || 8 /* States.ERROR */;
+        // check parse error
+        if (transition === 8 /* States.ERROR */) {
+            return;
+        }
+        mode = transition[0];
+        if (transition[1] !== undefined) {
+            action = actions[transition[1]];
+            if (action) {
+                newChar = c;
+                if (action() === false) {
+                    return;
+                }
+            }
+        }
+        // check parse finish
+        if (mode === 7 /* States.AFTER_PATH */) {
+            return keys;
+        }
+    }
+}
+// path token cache
+const cache = new Map();
+/**
+ * key-value message resolver
+ *
+ * @remarks
+ * Resolves messages with the key-value structure. Note that messages with a hierarchical structure such as objects cannot be resolved
+ *
+ * @param obj - A target object to be resolved with path
+ * @param path - A {@link Path | path} to resolve the value of message
+ *
+ * @returns A resolved {@link PathValue | path value}
+ *
+ * @VueI18nGeneral
+ */
+function resolveWithKeyValue(obj, path) {
+    return shared.isObject(obj) ? obj[path] : null;
+}
+/**
+ * message resolver
+ *
+ * @remarks
+ * Resolves messages. messages with a hierarchical structure such as objects can be resolved. This resolver is used in VueI18n as default.
+ *
+ * @param obj - A target object to be resolved with path
+ * @param path - A {@link Path | path} to resolve the value of message
+ *
+ * @returns A resolved {@link PathValue | path value}
+ *
+ * @VueI18nGeneral
+ */
+function resolveValue(obj, path) {
+    // check object
+    if (!shared.isObject(obj)) {
+        return null;
+    }
+    // parse path
+    let hit = cache.get(path);
+    if (!hit) {
+        hit = parse(path);
+        if (hit) {
+            cache.set(path, hit);
+        }
+    }
+    // check hit
+    if (!hit) {
+        return null;
+    }
+    // resolve path value
+    const len = hit.length;
+    let last = obj;
+    let i = 0;
+    while (i < len) {
+        const val = last[hit[i]];
+        if (val === undefined) {
+            return null;
+        }
+        if (shared.isFunction(last)) {
+            return null;
+        }
+        last = val;
+        i++;
+    }
+    return last;
+}
+
+const DEFAULT_MODIFIER = (str) => str;
+const DEFAULT_MESSAGE = (ctx) => ''; // eslint-disable-line
+const DEFAULT_MESSAGE_DATA_TYPE = 'text';
+const DEFAULT_NORMALIZE = (values) => values.length === 0 ? '' : shared.join(values);
+const DEFAULT_INTERPOLATE = shared.toDisplayString;
+function pluralDefault(choice, choicesLength) {
+    choice = Math.abs(choice);
+    if (choicesLength === 2) {
+        // prettier-ignore
+        return choice
+            ? choice > 1
+                ? 1
+                : 0
+            : 1;
+    }
+    return choice ? Math.min(choice, 2) : 0;
+}
+function getPluralIndex(options) {
+    // prettier-ignore
+    const index = shared.isNumber(options.pluralIndex)
+        ? options.pluralIndex
+        : -1;
+    // prettier-ignore
+    return options.named && (shared.isNumber(options.named.count) || shared.isNumber(options.named.n))
+        ? shared.isNumber(options.named.count)
+            ? options.named.count
+            : shared.isNumber(options.named.n)
+                ? options.named.n
+                : index
+        : index;
+}
+function normalizeNamed(pluralIndex, props) {
+    if (!props.count) {
+        props.count = pluralIndex;
+    }
+    if (!props.n) {
+        props.n = pluralIndex;
+    }
+}
+function createMessageContext(options = {}) {
+    const locale = options.locale;
+    const pluralIndex = getPluralIndex(options);
+    const pluralRule = shared.isObject(options.pluralRules) &&
+        shared.isString(locale) &&
+        shared.isFunction(options.pluralRules[locale])
+        ? options.pluralRules[locale]
+        : pluralDefault;
+    const orgPluralRule = shared.isObject(options.pluralRules) &&
+        shared.isString(locale) &&
+        shared.isFunction(options.pluralRules[locale])
+        ? pluralDefault
+        : undefined;
+    const plural = (messages) => {
+        return messages[pluralRule(pluralIndex, messages.length, orgPluralRule)];
+    };
+    const _list = options.list || [];
+    const list = (index) => _list[index];
+    // eslint-disable-next-line @typescript-eslint/no-explicit-any
+    const _named = options.named || {};
+    shared.isNumber(options.pluralIndex) && normalizeNamed(pluralIndex, _named);
+    const named = (key) => _named[key];
+    function message(key) {
+        // prettier-ignore
+        const msg = shared.isFunction(options.messages)
+            ? options.messages(key)
+            : shared.isObject(options.messages)
+                ? options.messages[key]
+                : false;
+        return !msg
+            ? options.parent
+                ? options.parent.message(key) // resolve from parent messages
+                : DEFAULT_MESSAGE
+            : msg;
+    }
+    const _modifier = (name) => options.modifiers
+        ? options.modifiers[name]
+        : DEFAULT_MODIFIER;
+    const normalize = shared.isPlainObject(options.processor) && shared.isFunction(options.processor.normalize)
+        ? options.processor.normalize
+        : DEFAULT_NORMALIZE;
+    const interpolate = shared.isPlainObject(options.processor) &&
+        shared.isFunction(options.processor.interpolate)
+        ? options.processor.interpolate
+        : DEFAULT_INTERPOLATE;
+    const type = shared.isPlainObject(options.processor) && shared.isString(options.processor.type)
+        ? options.processor.type
+        : DEFAULT_MESSAGE_DATA_TYPE;
+    const linked = (key, ...args) => {
+        const [arg1, arg2] = args;
+        let type = 'text';
+        let modifier = '';
+        if (args.length === 1) {
+            if (shared.isObject(arg1)) {
+                modifier = arg1.modifier || modifier;
+                type = arg1.type || type;
+            }
+            else if (shared.isString(arg1)) {
+                modifier = arg1 || modifier;
+            }
+        }
+        else if (args.length === 2) {
+            if (shared.isString(arg1)) {
+                modifier = arg1 || modifier;
+            }
+            if (shared.isString(arg2)) {
+                type = arg2 || type;
+            }
+        }
+        const ret = message(key)(ctx);
+        const msg = 
+        // The message in vnode resolved with linked are returned as an array by processor.nomalize
+        type === 'vnode' && shared.isArray(ret) && modifier
+            ? ret[0]
+            : ret;
+        return modifier ? _modifier(modifier)(msg, type) : msg;
+    };
+    const ctx = {
+        ["list" /* HelperNameMap.LIST */]: list,
+        ["named" /* HelperNameMap.NAMED */]: named,
+        ["plural" /* HelperNameMap.PLURAL */]: plural,
+        ["linked" /* HelperNameMap.LINKED */]: linked,
+        ["message" /* HelperNameMap.MESSAGE */]: message,
+        ["type" /* HelperNameMap.TYPE */]: type,
+        ["interpolate" /* HelperNameMap.INTERPOLATE */]: interpolate,
+        ["normalize" /* HelperNameMap.NORMALIZE */]: normalize,
+        ["values" /* HelperNameMap.VALUES */]: shared.assign({}, _list, _named)
+    };
+    return ctx;
+}
+
+let devtools = null;
+function setDevToolsHook(hook) {
+    devtools = hook;
+}
+function getDevToolsHook() {
+    return devtools;
+}
+function initI18nDevTools(i18n, version, meta) {
+    // TODO: queue if devtools is undefined
+    devtools &&
+        devtools.emit("i18n:init" /* IntlifyDevToolsHooks.I18nInit */, {
+            timestamp: Date.now(),
+            i18n,
+            version,
+            meta
+        });
+}
+const translateDevTools = /* #__PURE__*/ createDevToolsHook("function:translate" /* IntlifyDevToolsHooks.FunctionTranslate */);
+function createDevToolsHook(hook) {
+    return (payloads) => devtools && devtools.emit(hook, payloads);
+}
+
+const code$1 = messageCompiler.CompileWarnCodes.__EXTEND_POINT__;
+const inc$1 = shared.incrementer(code$1);
+const CoreWarnCodes = {
+    NOT_FOUND_KEY: code$1, // 2
+    FALLBACK_TO_TRANSLATE: inc$1(), // 3
+    CANNOT_FORMAT_NUMBER: inc$1(), // 4
+    FALLBACK_TO_NUMBER_FORMAT: inc$1(), // 5
+    CANNOT_FORMAT_DATE: inc$1(), // 6
+    FALLBACK_TO_DATE_FORMAT: inc$1(), // 7
+    EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER: inc$1(), // 8
+    __EXTEND_POINT__: inc$1() // 9
+};
+/** @internal */
+const warnMessages = {
+    [CoreWarnCodes.NOT_FOUND_KEY]: `Not found '{key}' key in '{locale}' locale messages.`,
+    [CoreWarnCodes.FALLBACK_TO_TRANSLATE]: `Fall back to translate '{key}' key with '{target}' locale.`,
+    [CoreWarnCodes.CANNOT_FORMAT_NUMBER]: `Cannot format a number value due to not supported Intl.NumberFormat.`,
+    [CoreWarnCodes.FALLBACK_TO_NUMBER_FORMAT]: `Fall back to number format '{key}' key with '{target}' locale.`,
+    [CoreWarnCodes.CANNOT_FORMAT_DATE]: `Cannot format a date value due to not supported Intl.DateTimeFormat.`,
+    [CoreWarnCodes.FALLBACK_TO_DATE_FORMAT]: `Fall back to datetime format '{key}' key with '{target}' locale.`,
+    [CoreWarnCodes.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER]: `This project is using Custom Message Compiler, which is an experimental feature. It may receive breaking changes or be removed in the future.`
+};
+function getWarnMessage(code, ...args) {
+    return shared.format(warnMessages[code], ...args);
+}
+
+const code = messageCompiler.CompileErrorCodes.__EXTEND_POINT__;
+const inc = shared.incrementer(code);
+const CoreErrorCodes = {
+    INVALID_ARGUMENT: code, // 17
+    INVALID_DATE_ARGUMENT: inc(), // 18
+    INVALID_ISO_DATE_ARGUMENT: inc(), // 19
+    NOT_SUPPORT_NON_STRING_MESSAGE: inc(), // 20
+    NOT_SUPPORT_LOCALE_PROMISE_VALUE: inc(), // 21
+    NOT_SUPPORT_LOCALE_ASYNC_FUNCTION: inc(), // 22
+    NOT_SUPPORT_LOCALE_TYPE: inc(), // 23
+    __EXTEND_POINT__: inc() // 24
+};
+function createCoreError(code) {
+    return messageCompiler.createCompileError(code, null, { messages: errorMessages } );
+}
+/** @internal */
+const errorMessages = {
+    [CoreErrorCodes.INVALID_ARGUMENT]: 'Invalid arguments',
+    [CoreErrorCodes.INVALID_DATE_ARGUMENT]: 'The date provided is an invalid Date object.' +
+        'Make sure your Date represents a valid date.',
+    [CoreErrorCodes.INVALID_ISO_DATE_ARGUMENT]: 'The argument provided is not a valid ISO date string',
+    [CoreErrorCodes.NOT_SUPPORT_NON_STRING_MESSAGE]: 'Not support non-string message',
+    [CoreErrorCodes.NOT_SUPPORT_LOCALE_PROMISE_VALUE]: 'cannot support promise value',
+    [CoreErrorCodes.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION]: 'cannot support async function',
+    [CoreErrorCodes.NOT_SUPPORT_LOCALE_TYPE]: 'cannot support locale type'
+};
+
+/** @internal */
+function getLocale(context, options) {
+    return options.locale != null
+        ? resolveLocale(options.locale)
+        : resolveLocale(context.locale);
+}
+let _resolveLocale;
+/** @internal */
+function resolveLocale(locale) {
+    if (shared.isString(locale)) {
+        return locale;
+    }
+    else {
+        if (shared.isFunction(locale)) {
+            if (locale.resolvedOnce && _resolveLocale != null) {
+                return _resolveLocale;
+            }
+            else if (locale.constructor.name === 'Function') {
+                const resolve = locale();
+                if (shared.isPromise(resolve)) {
+                    throw createCoreError(CoreErrorCodes.NOT_SUPPORT_LOCALE_PROMISE_VALUE);
+                }
+                return (_resolveLocale = resolve);
+            }
+            else {
+                throw createCoreError(CoreErrorCodes.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION);
+            }
+        }
+        else {
+            throw createCoreError(CoreErrorCodes.NOT_SUPPORT_LOCALE_TYPE);
+        }
+    }
+}
+/**
+ * Fallback with simple implemenation
+ *
+ * @remarks
+ * A fallback locale function implemented with a simple fallback algorithm.
+ *
+ * Basically, it returns the value as specified in the `fallbackLocale` props, and is processed with the fallback inside intlify.
+ *
+ * @param ctx - A {@link CoreContext | context}
+ * @param fallback - A {@link FallbackLocale | fallback locale}
+ * @param start - A starting {@link Locale | locale}
+ *
+ * @returns Fallback locales
+ *
+ * @VueI18nGeneral
+ */
+function fallbackWithSimple(ctx, fallback, start // eslint-disable-line @typescript-eslint/no-unused-vars
+) {
+    // prettier-ignore
+    return [...new Set([
+            start,
+            ...(shared.isArray(fallback)
+                ? fallback
+                : shared.isObject(fallback)
+                    ? Object.keys(fallback)
+                    : shared.isString(fallback)
+                        ? [fallback]
+                        : [start])
+        ])];
+}
+/**
+ * Fallback with locale chain
+ *
+ * @remarks
+ * A fallback locale function implemented with a fallback chain algorithm. It's used in VueI18n as default.
+ *
+ * @param ctx - A {@link CoreContext | context}
+ * @param fallback - A {@link FallbackLocale | fallback locale}
+ * @param start - A starting {@link Locale | locale}
+ *
+ * @returns Fallback locales
+ *
+ * @VueI18nSee [Fallbacking](../guide/essentials/fallback)
+ *
+ * @VueI18nGeneral
+ */
+function fallbackWithLocaleChain(ctx, fallback, start) {
+    const startLocale = shared.isString(start) ? start : DEFAULT_LOCALE;
+    const context = ctx;
+    if (!context.__localeChainCache) {
+        context.__localeChainCache = new Map();
+    }
+    let chain = context.__localeChainCache.get(startLocale);
+    if (!chain) {
+        chain = [];
+        // first block defined by start
+        let block = [start];
+        // while any intervening block found
+        while (shared.isArray(block)) {
+            block = appendBlockToChain(chain, block, fallback);
+        }
+        // prettier-ignore
+        // last block defined by default
+        const defaults = shared.isArray(fallback) || !shared.isPlainObject(fallback)
+            ? fallback
+            : fallback['default']
+                ? fallback['default']
+                : null;
+        // convert defaults to array
+        block = shared.isString(defaults) ? [defaults] : defaults;
+        if (shared.isArray(block)) {
+            appendBlockToChain(chain, block, false);
+        }
+        context.__localeChainCache.set(startLocale, chain);
+    }
+    return chain;
+}
+function appendBlockToChain(chain, block, blocks) {
+    let follow = true;
+    for (let i = 0; i < block.length && shared.isBoolean(follow); i++) {
+        const locale = block[i];
+        if (shared.isString(locale)) {
+            follow = appendLocaleToChain(chain, block[i], blocks);
+        }
+    }
+    return follow;
+}
+function appendLocaleToChain(chain, locale, blocks) {
+    let follow;
+    const tokens = locale.split('-');
+    do {
+        const target = tokens.join('-');
+        follow = appendItemToChain(chain, target, blocks);
+        tokens.splice(-1, 1);
+    } while (tokens.length && follow === true);
+    return follow;
+}
+function appendItemToChain(chain, target, blocks) {
+    let follow = false;
+    if (!chain.includes(target)) {
+        follow = true;
+        if (target) {
+            follow = target[target.length - 1] !== '!';
+            const locale = target.replace(/!/g, '');
+            chain.push(locale);
+            if ((shared.isArray(blocks) || shared.isPlainObject(blocks)) &&
+                blocks[locale] // eslint-disable-line @typescript-eslint/no-explicit-any
+            ) {
+                // eslint-disable-next-line @typescript-eslint/no-explicit-any
+                follow = blocks[locale];
+            }
+        }
+    }
+    return follow;
+}
+
+/* eslint-disable @typescript-eslint/no-explicit-any */
+/**
+ * Intlify core-base version
+ * @internal
+ */
+const VERSION = '9.13.1';
+const NOT_REOSLVED = -1;
+const DEFAULT_LOCALE = 'en-US';
+const MISSING_RESOLVE_VALUE = '';
+const capitalize = (str) => `${str.charAt(0).toLocaleUpperCase()}${str.substr(1)}`;
+function getDefaultLinkedModifiers() {
+    return {
+        upper: (val, type) => {
+            // prettier-ignore
+            return type === 'text' && shared.isString(val)
+                ? val.toUpperCase()
+                : type === 'vnode' && shared.isObject(val) && '__v_isVNode' in val
+                    ? val.children.toUpperCase()
+                    : val;
+        },
+        lower: (val, type) => {
+            // prettier-ignore
+            return type === 'text' && shared.isString(val)
+                ? val.toLowerCase()
+                : type === 'vnode' && shared.isObject(val) && '__v_isVNode' in val
+                    ? val.children.toLowerCase()
+                    : val;
+        },
+        capitalize: (val, type) => {
+            // prettier-ignore
+            return (type === 'text' && shared.isString(val)
+                ? capitalize(val)
+                : type === 'vnode' && shared.isObject(val) && '__v_isVNode' in val
+                    ? capitalize(val.children)
+                    : val);
+        }
+    };
+}
+let _compiler;
+function registerMessageCompiler(compiler) {
+    _compiler = compiler;
+}
+let _resolver;
+/**
+ * Register the message resolver
+ *
+ * @param resolver - A {@link MessageResolver} function
+ *
+ * @VueI18nGeneral
+ */
+function registerMessageResolver(resolver) {
+    _resolver = resolver;
+}
+let _fallbacker;
+/**
+ * Register the locale fallbacker
+ *
+ * @param fallbacker - A {@link LocaleFallbacker} function
+ *
+ * @VueI18nGeneral
+ */
+function registerLocaleFallbacker(fallbacker) {
+    _fallbacker = fallbacker;
+}
+// Additional Meta for Intlify DevTools
+let _additionalMeta =  null;
+/* #__NO_SIDE_EFFECTS__ */
+const setAdditionalMeta = (meta) => {
+    _additionalMeta = meta;
+};
+/* #__NO_SIDE_EFFECTS__ */
+const getAdditionalMeta = () => _additionalMeta;
+let _fallbackContext = null;
+const setFallbackContext = (context) => {
+    _fallbackContext = context;
+};
+const getFallbackContext = () => _fallbackContext;
+// ID for CoreContext
+let _cid = 0;
+function createCoreContext(options = {}) {
+    // setup options
+    const onWarn = shared.isFunction(options.onWarn) ? options.onWarn : shared.warn;
+    const version = shared.isString(options.version) ? options.version : VERSION;
+    const locale = shared.isString(options.locale) || shared.isFunction(options.locale)
+        ? options.locale
+        : DEFAULT_LOCALE;
+    const _locale = shared.isFunction(locale) ? DEFAULT_LOCALE : locale;
+    const fallbackLocale = shared.isArray(options.fallbackLocale) ||
+        shared.isPlainObject(options.fallbackLocale) ||
+        shared.isString(options.fallbackLocale) ||
+        options.fallbackLocale === false
+        ? options.fallbackLocale
+        : _locale;
+    const messages = shared.isPlainObject(options.messages)
+        ? options.messages
+        : { [_locale]: {} };
+    const datetimeFormats = shared.isPlainObject(options.datetimeFormats)
+            ? options.datetimeFormats
+            : { [_locale]: {} }
+        ;
+    const numberFormats = shared.isPlainObject(options.numberFormats)
+            ? options.numberFormats
+            : { [_locale]: {} }
+        ;
+    const modifiers = shared.assign({}, options.modifiers || {}, getDefaultLinkedModifiers());
+    const pluralRules = options.pluralRules || {};
+    const missing = shared.isFunction(options.missing) ? options.missing : null;
+    const missingWarn = shared.isBoolean(options.missingWarn) || shared.isRegExp(options.missingWarn)
+        ? options.missingWarn
+        : true;
+    const fallbackWarn = shared.isBoolean(options.fallbackWarn) || shared.isRegExp(options.fallbackWarn)
+        ? options.fallbackWarn
+        : true;
+    const fallbackFormat = !!options.fallbackFormat;
+    const unresolving = !!options.unresolving;
+    const postTranslation = shared.isFunction(options.postTranslation)
+        ? options.postTranslation
+        : null;
+    const processor = shared.isPlainObject(options.processor) ? options.processor : null;
+    const warnHtmlMessage = shared.isBoolean(options.warnHtmlMessage)
+        ? options.warnHtmlMessage
+        : true;
+    const escapeParameter = !!options.escapeParameter;
+    const messageCompiler = shared.isFunction(options.messageCompiler)
+        ? options.messageCompiler
+        : _compiler;
+    if (shared.isFunction(options.messageCompiler)) {
+        shared.warnOnce(getWarnMessage(CoreWarnCodes.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER));
+    }
+    const messageResolver = shared.isFunction(options.messageResolver)
+        ? options.messageResolver
+        : _resolver || resolveWithKeyValue;
+    const localeFallbacker = shared.isFunction(options.localeFallbacker)
+        ? options.localeFallbacker
+        : _fallbacker || fallbackWithSimple;
+    const fallbackContext = shared.isObject(options.fallbackContext)
+        ? options.fallbackContext
+        : undefined;
+    // setup internal options
+    const internalOptions = options;
+    const __datetimeFormatters = shared.isObject(internalOptions.__datetimeFormatters)
+            ? internalOptions.__datetimeFormatters
+            : new Map()
+        ;
+    const __numberFormatters = shared.isObject(internalOptions.__numberFormatters)
+            ? internalOptions.__numberFormatters
+            : new Map()
+        ;
+    const __meta = shared.isObject(internalOptions.__meta) ? internalOptions.__meta : {};
+    _cid++;
+    const context = {
+        version,
+        cid: _cid,
+        locale,
+        fallbackLocale,
+        messages,
+        modifiers,
+        pluralRules,
+        missing,
+        missingWarn,
+        fallbackWarn,
+        fallbackFormat,
+        unresolving,
+        postTranslation,
+        processor,
+        warnHtmlMessage,
+        escapeParameter,
+        messageCompiler,
+        messageResolver,
+        localeFallbacker,
+        fallbackContext,
+        onWarn,
+        __meta
+    };
+    {
+        context.datetimeFormats = datetimeFormats;
+        context.numberFormats = numberFormats;
+        context.__datetimeFormatters = __datetimeFormatters;
+        context.__numberFormatters = __numberFormatters;
+    }
+    // for vue-devtools timeline event
+    {
+        context.__v_emitter =
+            internalOptions.__v_emitter != null
+                ? internalOptions.__v_emitter
+                : undefined;
+    }
+    // NOTE: experimental !!
+    {
+        initI18nDevTools(context, version, __meta);
+    }
+    return context;
+}
+/** @internal */
+function isTranslateFallbackWarn(fallback, key) {
+    return fallback instanceof RegExp ? fallback.test(key) : fallback;
+}
+/** @internal */
+function isTranslateMissingWarn(missing, key) {
+    return missing instanceof RegExp ? missing.test(key) : missing;
+}
+/** @internal */
+function handleMissing(context, key, locale, missingWarn, type) {
+    const { missing, onWarn } = context;
+    // for vue-devtools timeline event
+    {
+        const emitter = context.__v_emitter;
+        if (emitter) {
+            emitter.emit("missing" /* VueDevToolsTimelineEvents.MISSING */, {
+                locale,
+                key,
+                type,
+                groupId: `${type}:${key}`
+            });
+        }
+    }
+    if (missing !== null) {
+        const ret = missing(context, locale, key, type);
+        return shared.isString(ret) ? ret : key;
+    }
+    else {
+        if (isTranslateMissingWarn(missingWarn, key)) {
+            onWarn(getWarnMessage(CoreWarnCodes.NOT_FOUND_KEY, { key, locale }));
+        }
+        return key;
+    }
+}
+/** @internal */
+function updateFallbackLocale(ctx, locale, fallback) {
+    const context = ctx;
+    context.__localeChainCache = new Map();
+    ctx.localeFallbacker(ctx, fallback, locale);
+}
+/** @internal */
+function isAlmostSameLocale(locale, compareLocale) {
+    if (locale === compareLocale)
+        return false;
+    return locale.split('-')[0] === compareLocale.split('-')[0];
+}
+/** @internal */
+function isImplicitFallback(targetLocale, locales) {
+    const index = locales.indexOf(targetLocale);
+    if (index === -1) {
+        return false;
+    }
+    for (let i = index + 1; i < locales.length; i++) {
+        if (isAlmostSameLocale(targetLocale, locales[i])) {
+            return true;
+        }
+    }
+    return false;
+}
+/* eslint-enable @typescript-eslint/no-explicit-any */
+
+function format(ast) {
+    const msg = (ctx) => formatParts(ctx, ast);
+    return msg;
+}
+function formatParts(ctx, ast) {
+    const body = ast.b || ast.body;
+    if ((body.t || body.type) === 1 /* NodeTypes.Plural */) {
+        const plural = body;
+        const cases = plural.c || plural.cases;
+        return ctx.plural(cases.reduce((messages, c) => [
+            ...messages,
+            formatMessageParts(ctx, c)
+        ], []));
+    }
+    else {
+        return formatMessageParts(ctx, body);
+    }
+}
+function formatMessageParts(ctx, node) {
+    const _static = node.s || node.static;
+    if (_static) {
+        return ctx.type === 'text'
+            ? _static
+            : ctx.normalize([_static]);
+    }
+    else {
+        const messages = (node.i || node.items).reduce((acm, c) => [...acm, formatMessagePart(ctx, c)], []);
+        return ctx.normalize(messages);
+    }
+}
+function formatMessagePart(ctx, node) {
+    const type = node.t || node.type;
+    switch (type) {
+        case 3 /* NodeTypes.Text */: {
+            const text = node;
+            return (text.v || text.value);
+        }
+        case 9 /* NodeTypes.Literal */: {
+            const literal = node;
+            return (literal.v || literal.value);
+        }
+        case 4 /* NodeTypes.Named */: {
+            const named = node;
+            return ctx.interpolate(ctx.named(named.k || named.key));
+        }
+        case 5 /* NodeTypes.List */: {
+            const list = node;
+            return ctx.interpolate(ctx.list(list.i != null ? list.i : list.index));
+        }
+        case 6 /* NodeTypes.Linked */: {
+            const linked = node;
+            const modifier = linked.m || linked.modifier;
+            return ctx.linked(formatMessagePart(ctx, linked.k || linked.key), modifier ? formatMessagePart(ctx, modifier) : undefined, ctx.type);
+        }
+        case 7 /* NodeTypes.LinkedKey */: {
+            const linkedKey = node;
+            return (linkedKey.v || linkedKey.value);
+        }
+        case 8 /* NodeTypes.LinkedModifier */: {
+            const linkedModifier = node;
+            return (linkedModifier.v || linkedModifier.value);
+        }
+        default:
+            throw new Error(`unhandled node type on format message part: ${type}`);
+    }
+}
+
+const WARN_MESSAGE = `Detected HTML in '{source}' message. Recommend not using HTML messages to avoid XSS.`;
+function checkHtmlMessage(source, warnHtmlMessage) {
+    if (warnHtmlMessage && messageCompiler.detectHtmlTag(source)) {
+        shared.warn(shared.format(WARN_MESSAGE, { source }));
+    }
+}
+const defaultOnCacheKey = (message) => message;
+let compileCache = Object.create(null);
+function onCompileWarn(_warn) {
+    if (_warn.code === messageCompiler.CompileWarnCodes.USE_MODULO_SYNTAX) {
+        shared.warn(`The use of named interpolation with modulo syntax is deprecated. ` +
+            `It will be removed in v10.\n` +
+            `reference: https://vue-i18n.intlify.dev/guide/essentials/syntax#rails-i18n-format \n` +
+            `(message compiler warning message: ${_warn.message})`);
+    }
+}
+function clearCompileCache() {
+    compileCache = Object.create(null);
+}
+const isMessageAST = (val) => shared.isObject(val) &&
+    (val.t === 0 || val.type === 0) &&
+    ('b' in val || 'body' in val);
+function baseCompile(message, options = {}) {
+    // error detecting on compile
+    let detectError = false;
+    const onError = options.onError || messageCompiler.defaultOnError;
+    options.onError = (err) => {
+        detectError = true;
+        onError(err);
+    };
+    // compile with mesasge-compiler
+    return { ...messageCompiler.baseCompile(message, options), detectError };
+}
+/* #__NO_SIDE_EFFECTS__ */
+const compileToFunction = (message, context) => {
+    if (!shared.isString(message)) {
+        throw createCoreError(CoreErrorCodes.NOT_SUPPORT_NON_STRING_MESSAGE);
+    }
+    // set onWarn
+    {
+        context.onWarn = onCompileWarn;
+    }
+    {
+        // check HTML message
+        const warnHtmlMessage = shared.isBoolean(context.warnHtmlMessage)
+            ? context.warnHtmlMessage
+            : true;
+        checkHtmlMessage(message, warnHtmlMessage);
+        // check caches
+        const onCacheKey = context.onCacheKey || defaultOnCacheKey;
+        const cacheKey = onCacheKey(message);
+        const cached = compileCache[cacheKey];
+        if (cached) {
+            return cached;
+        }
+        // compile
+        const { code, detectError } = baseCompile(message, context);
+        // evaluate function
+        const msg = new Function(`return ${code}`)();
+        // if occurred compile error, don't cache
+        return !detectError
+            ? (compileCache[cacheKey] = msg)
+            : msg;
+    }
+};
+function compile(message, context) {
+    // set onWarn
+    {
+        context.onWarn = onCompileWarn;
+    }
+    if (shared.isString(message)) {
+        // check HTML message
+        const warnHtmlMessage = shared.isBoolean(context.warnHtmlMessage)
+            ? context.warnHtmlMessage
+            : true;
+        checkHtmlMessage(message, warnHtmlMessage);
+        // check caches
+        const onCacheKey = context.onCacheKey || defaultOnCacheKey;
+        const cacheKey = onCacheKey(message);
+        const cached = compileCache[cacheKey];
+        if (cached) {
+            return cached;
+        }
+        // compile with JIT mode
+        const { ast, detectError } = baseCompile(message, {
+            ...context,
+            location: true,
+            jit: true
+        });
+        // compose message function from AST
+        const msg = format(ast);
+        // if occurred compile error, don't cache
+        return !detectError
+            ? (compileCache[cacheKey] = msg)
+            : msg;
+    }
+    else {
+        if (!isMessageAST(message)) {
+            shared.warn(`the message that is resolve with key '${context.key}' is not supported for jit compilation`);
+            return (() => message);
+        }
+        // AST case (passed from bundler)
+        const cacheKey = message.cacheKey;
+        if (cacheKey) {
+            const cached = compileCache[cacheKey];
+            if (cached) {
+                return cached;
+            }
+            // compose message function from message (AST)
+            return (compileCache[cacheKey] =
+                format(message));
+        }
+        else {
+            return format(message);
+        }
+    }
+}
+
+const NOOP_MESSAGE_FUNCTION = () => '';
+const isMessageFunction = (val) => shared.isFunction(val);
+// implementation of `translate` function
+function translate(context, ...args) {
+    const { fallbackFormat, postTranslation, unresolving, messageCompiler, fallbackLocale, messages } = context;
+    const [key, options] = parseTranslateArgs(...args);
+    const missingWarn = shared.isBoolean(options.missingWarn)
+        ? options.missingWarn
+        : context.missingWarn;
+    const fallbackWarn = shared.isBoolean(options.fallbackWarn)
+        ? options.fallbackWarn
+        : context.fallbackWarn;
+    const escapeParameter = shared.isBoolean(options.escapeParameter)
+        ? options.escapeParameter
+        : context.escapeParameter;
+    const resolvedMessage = !!options.resolvedMessage;
+    // prettier-ignore
+    const defaultMsgOrKey = shared.isString(options.default) || shared.isBoolean(options.default) // default by function option
+        ? !shared.isBoolean(options.default)
+            ? options.default
+            : (!messageCompiler ? () => key : key)
+        : fallbackFormat // default by `fallbackFormat` option
+            ? (!messageCompiler ? () => key : key)
+            : '';
+    const enableDefaultMsg = fallbackFormat || defaultMsgOrKey !== '';
+    const locale = getLocale(context, options);
+    // escape params
+    escapeParameter && escapeParams(options);
+    // resolve message format
+    // eslint-disable-next-line prefer-const
+    let [formatScope, targetLocale, message] = !resolvedMessage
+        ? resolveMessageFormat(context, key, locale, fallbackLocale, fallbackWarn, missingWarn)
+        : [
+            key,
+            locale,
+            messages[locale] || {}
+        ];
+    // NOTE:
+    //  Fix to work around `ssrTransfrom` bug in Vite.
+    //  https://github.com/vitejs/vite/issues/4306
+    //  To get around this, use temporary variables.
+    //  https://github.com/nuxt/framework/issues/1461#issuecomment-954606243
+    let format = formatScope;
+    // if you use default message, set it as message format!
+    let cacheBaseKey = key;
+    if (!resolvedMessage &&
+        !(shared.isString(format) ||
+            isMessageAST(format) ||
+            isMessageFunction(format))) {
+        if (enableDefaultMsg) {
+            format = defaultMsgOrKey;
+            cacheBaseKey = format;
+        }
+    }
+    // checking message format and target locale
+    if (!resolvedMessage &&
+        (!(shared.isString(format) ||
+            isMessageAST(format) ||
+            isMessageFunction(format)) ||
+            !shared.isString(targetLocale))) {
+        return unresolving ? NOT_REOSLVED : key;
+    }
+    // TODO: refactor
+    if (shared.isString(format) && context.messageCompiler == null) {
+        shared.warn(`The message format compilation is not supported in this build. ` +
+            `Because message compiler isn't included. ` +
+            `You need to pre-compilation all message format. ` +
+            `So translate function return '${key}'.`);
+        return key;
+    }
+    // setup compile error detecting
+    let occurred = false;
+    const onError = () => {
+        occurred = true;
+    };
+    // compile message format
+    const msg = !isMessageFunction(format)
+        ? compileMessageFormat(context, key, targetLocale, format, cacheBaseKey, onError)
+        : format;
+    // if occurred compile error, return the message format
+    if (occurred) {
+        return format;
+    }
+    // evaluate message with context
+    const ctxOptions = getMessageContextOptions(context, targetLocale, message, options);
+    const msgContext = createMessageContext(ctxOptions);
+    const messaged = evaluateMessage(context, msg, msgContext);
+    // if use post translation option, proceed it with handler
+    const ret = postTranslation
+        ? postTranslation(messaged, key)
+        : messaged;
+    // NOTE: experimental !!
+    {
+        // prettier-ignore
+        const payloads = {
+            timestamp: Date.now(),
+            key: shared.isString(key)
+                ? key
+                : isMessageFunction(format)
+                    ? format.key
+                    : '',
+            locale: targetLocale || (isMessageFunction(format)
+                ? format.locale
+                : ''),
+            format: shared.isString(format)
+                ? format
+                : isMessageFunction(format)
+                    ? format.source
+                    : '',
+            message: ret
+        };
+        payloads.meta = shared.assign({}, context.__meta, getAdditionalMeta() || {});
+        translateDevTools(payloads);
+    }
+    return ret;
+}
+function escapeParams(options) {
+    if (shared.isArray(options.list)) {
+        options.list = options.list.map(item => shared.isString(item) ? shared.escapeHtml(item) : item);
+    }
+    else if (shared.isObject(options.named)) {
+        Object.keys(options.named).forEach(key => {
+            if (shared.isString(options.named[key])) {
+                options.named[key] = shared.escapeHtml(options.named[key]);
+            }
+        });
+    }
+}
+function resolveMessageFormat(context, key, locale, fallbackLocale, fallbackWarn, missingWarn) {
+    const { messages, onWarn, messageResolver: resolveValue, localeFallbacker } = context;
+    const locales = localeFallbacker(context, fallbackLocale, locale); // eslint-disable-line @typescript-eslint/no-explicit-any
+    let message = {};
+    let targetLocale;
+    let format = null;
+    let from = locale;
+    let to = null;
+    const type = 'translate';
+    for (let i = 0; i < locales.length; i++) {
+        targetLocale = to = locales[i];
+        if (locale !== targetLocale &&
+            !isAlmostSameLocale(locale, targetLocale) &&
+            isTranslateFallbackWarn(fallbackWarn, key)) {
+            onWarn(getWarnMessage(CoreWarnCodes.FALLBACK_TO_TRANSLATE, {
+                key,
+                target: targetLocale
+            }));
+        }
+        // for vue-devtools timeline event
+        if (locale !== targetLocale) {
+            const emitter = context.__v_emitter;
+            if (emitter) {
+                emitter.emit("fallback" /* VueDevToolsTimelineEvents.FALBACK */, {
+                    type,
+                    key,
+                    from,
+                    to,
+                    groupId: `${type}:${key}`
+                });
+            }
+        }
+        message =
+            messages[targetLocale] || {};
+        // for vue-devtools timeline event
+        let start = null;
+        let startTag;
+        let endTag;
+        if (shared.inBrowser) {
+            start = window.performance.now();
+            startTag = 'intlify-message-resolve-start';
+            endTag = 'intlify-message-resolve-end';
+            shared.mark && shared.mark(startTag);
+        }
+        if ((format = resolveValue(message, key)) === null) {
+            // if null, resolve with object key path
+            format = message[key]; // eslint-disable-line @typescript-eslint/no-explicit-any
+        }
+        // for vue-devtools timeline event
+        if (shared.inBrowser) {
+            const end = window.performance.now();
+            const emitter = context.__v_emitter;
+            if (emitter && start && format) {
+                emitter.emit("message-resolve" /* VueDevToolsTimelineEvents.MESSAGE_RESOLVE */, {
+                    type: "message-resolve" /* VueDevToolsTimelineEvents.MESSAGE_RESOLVE */,
+                    key,
+                    message: format,
+                    time: end - start,
+                    groupId: `${type}:${key}`
+                });
+            }
+            if (startTag && endTag && shared.mark && shared.measure) {
+                shared.mark(endTag);
+                shared.measure('intlify message resolve', startTag, endTag);
+            }
+        }
+        if (shared.isString(format) || isMessageAST(format) || isMessageFunction(format)) {
+            break;
+        }
+        if (!isImplicitFallback(targetLocale, locales)) {
+            const missingRet = handleMissing(context, // eslint-disable-line @typescript-eslint/no-explicit-any
+            key, targetLocale, missingWarn, type);
+            if (missingRet !== key) {
+                format = missingRet;
+            }
+        }
+        from = to;
+    }
+    return [format, targetLocale, message];
+}
+function compileMessageFormat(context, key, targetLocale, format, cacheBaseKey, onError) {
+    const { messageCompiler, warnHtmlMessage } = context;
+    if (isMessageFunction(format)) {
+        const msg = format;
+        msg.locale = msg.locale || targetLocale;
+        msg.key = msg.key || key;
+        return msg;
+    }
+    if (messageCompiler == null) {
+        const msg = (() => format);
+        msg.locale = targetLocale;
+        msg.key = key;
+        return msg;
+    }
+    // for vue-devtools timeline event
+    let start = null;
+    let startTag;
+    let endTag;
+    if (shared.inBrowser) {
+        start = window.performance.now();
+        startTag = 'intlify-message-compilation-start';
+        endTag = 'intlify-message-compilation-end';
+        shared.mark && shared.mark(startTag);
+    }
+    const msg = messageCompiler(format, getCompileContext(context, targetLocale, cacheBaseKey, format, warnHtmlMessage, onError));
+    // for vue-devtools timeline event
+    if (shared.inBrowser) {
+        const end = window.performance.now();
+        const emitter = context.__v_emitter;
+        if (emitter && start) {
+            emitter.emit("message-compilation" /* VueDevToolsTimelineEvents.MESSAGE_COMPILATION */, {
+                type: "message-compilation" /* VueDevToolsTimelineEvents.MESSAGE_COMPILATION */,
+                message: format,
+                time: end - start,
+                groupId: `${'translate'}:${key}`
+            });
+        }
+        if (startTag && endTag && shared.mark && shared.measure) {
+            shared.mark(endTag);
+            shared.measure('intlify message compilation', startTag, endTag);
+        }
+    }
+    msg.locale = targetLocale;
+    msg.key = key;
+    msg.source = format;
+    return msg;
+}
+function evaluateMessage(context, msg, msgCtx) {
+    // for vue-devtools timeline event
+    let start = null;
+    let startTag;
+    let endTag;
+    if (shared.inBrowser) {
+        start = window.performance.now();
+        startTag = 'intlify-message-evaluation-start';
+        endTag = 'intlify-message-evaluation-end';
+        shared.mark && shared.mark(startTag);
+    }
+    const messaged = msg(msgCtx);
+    // for vue-devtools timeline event
+    if (shared.inBrowser) {
+        const end = window.performance.now();
+        const emitter = context.__v_emitter;
+        if (emitter && start) {
+            emitter.emit("message-evaluation" /* VueDevToolsTimelineEvents.MESSAGE_EVALUATION */, {
+                type: "message-evaluation" /* VueDevToolsTimelineEvents.MESSAGE_EVALUATION */,
+                value: messaged,
+                time: end - start,
+                groupId: `${'translate'}:${msg.key}`
+            });
+        }
+        if (startTag && endTag && shared.mark && shared.measure) {
+            shared.mark(endTag);
+            shared.measure('intlify message evaluation', startTag, endTag);
+        }
+    }
+    return messaged;
+}
+/** @internal */
+function parseTranslateArgs(...args) {
+    const [arg1, arg2, arg3] = args;
+    const options = {};
+    if (!shared.isString(arg1) &&
+        !shared.isNumber(arg1) &&
+        !isMessageFunction(arg1) &&
+        !isMessageAST(arg1)) {
+        throw createCoreError(CoreErrorCodes.INVALID_ARGUMENT);
+    }
+    // prettier-ignore
+    const key = shared.isNumber(arg1)
+        ? String(arg1)
+        : isMessageFunction(arg1)
+            ? arg1
+            : arg1;
+    if (shared.isNumber(arg2)) {
+        options.plural = arg2;
+    }
+    else if (shared.isString(arg2)) {
+        options.default = arg2;
+    }
+    else if (shared.isPlainObject(arg2) && !shared.isEmptyObject(arg2)) {
+        options.named = arg2;
+    }
+    else if (shared.isArray(arg2)) {
+        options.list = arg2;
+    }
+    if (shared.isNumber(arg3)) {
+        options.plural = arg3;
+    }
+    else if (shared.isString(arg3)) {
+        options.default = arg3;
+    }
+    else if (shared.isPlainObject(arg3)) {
+        shared.assign(options, arg3);
+    }
+    return [key, options];
+}
+function getCompileContext(context, locale, key, source, warnHtmlMessage, onError) {
+    return {
+        locale,
+        key,
+        warnHtmlMessage,
+        onError: (err) => {
+            onError && onError(err);
+            {
+                const _source = getSourceForCodeFrame(source);
+                const message = `Message compilation error: ${err.message}`;
+                const codeFrame = err.location &&
+                    _source &&
+                    shared.generateCodeFrame(_source, err.location.start.offset, err.location.end.offset);
+                const emitter = context.__v_emitter;
+                if (emitter && _source) {
+                    emitter.emit("compile-error" /* VueDevToolsTimelineEvents.COMPILE_ERROR */, {
+                        message: _source,
+                        error: err.message,
+                        start: err.location && err.location.start.offset,
+                        end: err.location && err.location.end.offset,
+                        groupId: `${'translate'}:${key}`
+                    });
+                }
+                console.error(codeFrame ? `${message}\n${codeFrame}` : message);
+            }
+        },
+        onCacheKey: (source) => shared.generateFormatCacheKey(locale, key, source)
+    };
+}
+function getSourceForCodeFrame(source) {
+    if (shared.isString(source)) {
+        return source;
+    }
+    else {
+        if (source.loc && source.loc.source) {
+            return source.loc.source;
+        }
+    }
+}
+function getMessageContextOptions(context, locale, message, options) {
+    const { modifiers, pluralRules, messageResolver: resolveValue, fallbackLocale, fallbackWarn, missingWarn, fallbackContext } = context;
+    const resolveMessage = (key) => {
+        let val = resolveValue(message, key);
+        // fallback to root context
+        if (val == null && fallbackContext) {
+            const [, , message] = resolveMessageFormat(fallbackContext, key, locale, fallbackLocale, fallbackWarn, missingWarn);
+            val = resolveValue(message, key);
+        }
+        if (shared.isString(val) || isMessageAST(val)) {
+            let occurred = false;
+            const onError = () => {
+                occurred = true;
+            };
+            const msg = compileMessageFormat(context, key, locale, val, key, onError);
+            return !occurred
+                ? msg
+                : NOOP_MESSAGE_FUNCTION;
+        }
+        else if (isMessageFunction(val)) {
+            return val;
+        }
+        else {
+            // TODO: should be implemented warning message
+            return NOOP_MESSAGE_FUNCTION;
+        }
+    };
+    const ctxOptions = {
+        locale,
+        modifiers,
+        pluralRules,
+        messages: resolveMessage
+    };
+    if (context.processor) {
+        ctxOptions.processor = context.processor;
+    }
+    if (options.list) {
+        ctxOptions.list = options.list;
+    }
+    if (options.named) {
+        ctxOptions.named = options.named;
+    }
+    if (shared.isNumber(options.plural)) {
+        ctxOptions.pluralIndex = options.plural;
+    }
+    return ctxOptions;
+}
+
+const intlDefined = typeof Intl !== 'undefined';
+const Availabilities = {
+    dateTimeFormat: intlDefined && typeof Intl.DateTimeFormat !== 'undefined',
+    numberFormat: intlDefined && typeof Intl.NumberFormat !== 'undefined'
+};
+
+// implementation of `datetime` function
+function datetime(context, ...args) {
+    const { datetimeFormats, unresolving, fallbackLocale, onWarn, localeFallbacker } = context;
+    const { __datetimeFormatters } = context;
+    if (!Availabilities.dateTimeFormat) {
+        onWarn(getWarnMessage(CoreWarnCodes.CANNOT_FORMAT_DATE));
+        return MISSING_RESOLVE_VALUE;
+    }
+    const [key, value, options, overrides] = parseDateTimeArgs(...args);
+    const missingWarn = shared.isBoolean(options.missingWarn)
+        ? options.missingWarn
+        : context.missingWarn;
+    const fallbackWarn = shared.isBoolean(options.fallbackWarn)
+        ? options.fallbackWarn
+        : context.fallbackWarn;
+    const part = !!options.part;
+    const locale = getLocale(context, options);
+    const locales = localeFallbacker(context, // eslint-disable-line @typescript-eslint/no-explicit-any
+    fallbackLocale, locale);
+    if (!shared.isString(key) || key === '') {
+        return new Intl.DateTimeFormat(locale, overrides).format(value);
+    }
+    // resolve format
+    let datetimeFormat = {};
+    let targetLocale;
+    let format = null;
+    let from = locale;
+    let to = null;
+    const type = 'datetime format';
+    for (let i = 0; i < locales.length; i++) {
+        targetLocale = to = locales[i];
+        if (locale !== targetLocale &&
+            isTranslateFallbackWarn(fallbackWarn, key)) {
+            onWarn(getWarnMessage(CoreWarnCodes.FALLBACK_TO_DATE_FORMAT, {
+                key,
+                target: targetLocale
+            }));
+        }
+        // for vue-devtools timeline event
+        if (locale !== targetLocale) {
+            const emitter = context.__v_emitter;
+            if (emitter) {
+                emitter.emit("fallback" /* VueDevToolsTimelineEvents.FALBACK */, {
+                    type,
+                    key,
+                    from,
+                    to,
+                    groupId: `${type}:${key}`
+                });
+            }
+        }
+        datetimeFormat =
+            datetimeFormats[targetLocale] || {};
+        format = datetimeFormat[key];
+        if (shared.isPlainObject(format))
+            break;
+        handleMissing(context, key, targetLocale, missingWarn, type); // eslint-disable-line @typescript-eslint/no-explicit-any
+        from = to;
+    }
+    // checking format and target locale
+    if (!shared.isPlainObject(format) || !shared.isString(targetLocale)) {
+        return unresolving ? NOT_REOSLVED : key;
+    }
+    let id = `${targetLocale}__${key}`;
+    if (!shared.isEmptyObject(overrides)) {
+        id = `${id}__${JSON.stringify(overrides)}`;
+    }
+    let formatter = __datetimeFormatters.get(id);
+    if (!formatter) {
+        formatter = new Intl.DateTimeFormat(targetLocale, shared.assign({}, format, overrides));
+        __datetimeFormatters.set(id, formatter);
+    }
+    return !part ? formatter.format(value) : formatter.formatToParts(value);
+}
+/** @internal */
+const DATETIME_FORMAT_OPTIONS_KEYS = [
+    'localeMatcher',
+    'weekday',
+    'era',
+    'year',
+    'month',
+    'day',
+    'hour',
+    'minute',
+    'second',
+    'timeZoneName',
+    'formatMatcher',
+    'hour12',
+    'timeZone',
+    'dateStyle',
+    'timeStyle',
+    'calendar',
+    'dayPeriod',
+    'numberingSystem',
+    'hourCycle',
+    'fractionalSecondDigits'
+];
+/** @internal */
+function parseDateTimeArgs(...args) {
+    const [arg1, arg2, arg3, arg4] = args;
+    const options = {};
+    let overrides = {};
+    let value;
+    if (shared.isString(arg1)) {
+        // Only allow ISO strings - other date formats are often supported,
+        // but may cause different results in different browsers.
+        const matches = arg1.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);
+        if (!matches) {
+            throw createCoreError(CoreErrorCodes.INVALID_ISO_DATE_ARGUMENT);
+        }
+        // Some browsers can not parse the iso datetime separated by space,
+        // this is a compromise solution by replace the 'T'/' ' with 'T'
+        const dateTime = matches[3]
+            ? matches[3].trim().startsWith('T')
+                ? `${matches[1].trim()}${matches[3].trim()}`
+                : `${matches[1].trim()}T${matches[3].trim()}`
+            : matches[1].trim();
+        value = new Date(dateTime);
+        try {
+            // This will fail if the date is not valid
+            value.toISOString();
+        }
+        catch (e) {
+            throw createCoreError(CoreErrorCodes.INVALID_ISO_DATE_ARGUMENT);
+        }
+    }
+    else if (shared.isDate(arg1)) {
+        if (isNaN(arg1.getTime())) {
+            throw createCoreError(CoreErrorCodes.INVALID_DATE_ARGUMENT);
+        }
+        value = arg1;
+    }
+    else if (shared.isNumber(arg1)) {
+        value = arg1;
+    }
+    else {
+        throw createCoreError(CoreErrorCodes.INVALID_ARGUMENT);
+    }
+    if (shared.isString(arg2)) {
+        options.key = arg2;
+    }
+    else if (shared.isPlainObject(arg2)) {
+        Object.keys(arg2).forEach(key => {
+            if (DATETIME_FORMAT_OPTIONS_KEYS.includes(key)) {
+                overrides[key] = arg2[key];
+            }
+            else {
+                options[key] = arg2[key];
+            }
+        });
+    }
+    if (shared.isString(arg3)) {
+        options.locale = arg3;
+    }
+    else if (shared.isPlainObject(arg3)) {
+        overrides = arg3;
+    }
+    if (shared.isPlainObject(arg4)) {
+        overrides = arg4;
+    }
+    return [options.key || '', value, options, overrides];
+}
+/** @internal */
+function clearDateTimeFormat(ctx, locale, format) {
+    const context = ctx;
+    for (const key in format) {
+        const id = `${locale}__${key}`;
+        if (!context.__datetimeFormatters.has(id)) {
+            continue;
+        }
+        context.__datetimeFormatters.delete(id);
+    }
+}
+
+// implementation of `number` function
+function number(context, ...args) {
+    const { numberFormats, unresolving, fallbackLocale, onWarn, localeFallbacker } = context;
+    const { __numberFormatters } = context;
+    if (!Availabilities.numberFormat) {
+        onWarn(getWarnMessage(CoreWarnCodes.CANNOT_FORMAT_NUMBER));
+        return MISSING_RESOLVE_VALUE;
+    }
+    const [key, value, options, overrides] = parseNumberArgs(...args);
+    const missingWarn = shared.isBoolean(options.missingWarn)
+        ? options.missingWarn
+        : context.missingWarn;
+    const fallbackWarn = shared.isBoolean(options.fallbackWarn)
+        ? options.fallbackWarn
+        : context.fallbackWarn;
+    const part = !!options.part;
+    const locale = getLocale(context, options);
+    const locales = localeFallbacker(context, // eslint-disable-line @typescript-eslint/no-explicit-any
+    fallbackLocale, locale);
+    if (!shared.isString(key) || key === '') {
+        return new Intl.NumberFormat(locale, overrides).format(value);
+    }
+    // resolve format
+    let numberFormat = {};
+    let targetLocale;
+    let format = null;
+    let from = locale;
+    let to = null;
+    const type = 'number format';
+    for (let i = 0; i < locales.length; i++) {
+        targetLocale = to = locales[i];
+        if (locale !== targetLocale &&
+            isTranslateFallbackWarn(fallbackWarn, key)) {
+            onWarn(getWarnMessage(CoreWarnCodes.FALLBACK_TO_NUMBER_FORMAT, {
+                key,
+                target: targetLocale
+            }));
+        }
+        // for vue-devtools timeline event
+        if (locale !== targetLocale) {
+            const emitter = context.__v_emitter;
+            if (emitter) {
+                emitter.emit("fallback" /* VueDevToolsTimelineEvents.FALBACK */, {
+                    type,
+                    key,
+                    from,
+                    to,
+                    groupId: `${type}:${key}`
+                });
+            }
+        }
+        numberFormat =
+            numberFormats[targetLocale] || {};
+        format = numberFormat[key];
+        if (shared.isPlainObject(format))
+            break;
+        handleMissing(context, key, targetLocale, missingWarn, type); // eslint-disable-line @typescript-eslint/no-explicit-any
+        from = to;
+    }
+    // checking format and target locale
+    if (!shared.isPlainObject(format) || !shared.isString(targetLocale)) {
+        return unresolving ? NOT_REOSLVED : key;
+    }
+    let id = `${targetLocale}__${key}`;
+    if (!shared.isEmptyObject(overrides)) {
+        id = `${id}__${JSON.stringify(overrides)}`;
+    }
+    let formatter = __numberFormatters.get(id);
+    if (!formatter) {
+        formatter = new Intl.NumberFormat(targetLocale, shared.assign({}, format, overrides));
+        __numberFormatters.set(id, formatter);
+    }
+    return !part ? formatter.format(value) : formatter.formatToParts(value);
+}
+/** @internal */
+const NUMBER_FORMAT_OPTIONS_KEYS = [
+    'localeMatcher',
+    'style',
+    'currency',
+    'currencyDisplay',
+    'currencySign',
+    'useGrouping',
+    'minimumIntegerDigits',
+    'minimumFractionDigits',
+    'maximumFractionDigits',
+    'minimumSignificantDigits',
+    'maximumSignificantDigits',
+    'compactDisplay',
+    'notation',
+    'signDisplay',
+    'unit',
+    'unitDisplay',
+    'roundingMode',
+    'roundingPriority',
+    'roundingIncrement',
+    'trailingZeroDisplay'
+];
+/** @internal */
+function parseNumberArgs(...args) {
+    const [arg1, arg2, arg3, arg4] = args;
+    const options = {};
+    let overrides = {};
+    if (!shared.isNumber(arg1)) {
+        throw createCoreError(CoreErrorCodes.INVALID_ARGUMENT);
+    }
+    const value = arg1;
+    if (shared.isString(arg2)) {
+        options.key = arg2;
+    }
+    else if (shared.isPlainObject(arg2)) {
+        Object.keys(arg2).forEach(key => {
+            if (NUMBER_FORMAT_OPTIONS_KEYS.includes(key)) {
+                overrides[key] = arg2[key];
+            }
+            else {
+                options[key] = arg2[key];
+            }
+        });
+    }
+    if (shared.isString(arg3)) {
+        options.locale = arg3;
+    }
+    else if (shared.isPlainObject(arg3)) {
+        overrides = arg3;
+    }
+    if (shared.isPlainObject(arg4)) {
+        overrides = arg4;
+    }
+    return [options.key || '', value, options, overrides];
+}
+/** @internal */
+function clearNumberFormat(ctx, locale, format) {
+    const context = ctx;
+    for (const key in format) {
+        const id = `${locale}__${key}`;
+        if (!context.__numberFormatters.has(id)) {
+            continue;
+        }
+        context.__numberFormatters.delete(id);
+    }
+}
+
+exports.CompileErrorCodes = messageCompiler.CompileErrorCodes;
+exports.createCompileError = messageCompiler.createCompileError;
+exports.CoreErrorCodes = CoreErrorCodes;
+exports.CoreWarnCodes = CoreWarnCodes;
+exports.DATETIME_FORMAT_OPTIONS_KEYS = DATETIME_FORMAT_OPTIONS_KEYS;
+exports.DEFAULT_LOCALE = DEFAULT_LOCALE;
+exports.DEFAULT_MESSAGE_DATA_TYPE = DEFAULT_MESSAGE_DATA_TYPE;
+exports.MISSING_RESOLVE_VALUE = MISSING_RESOLVE_VALUE;
+exports.NOT_REOSLVED = NOT_REOSLVED;
+exports.NUMBER_FORMAT_OPTIONS_KEYS = NUMBER_FORMAT_OPTIONS_KEYS;
+exports.VERSION = VERSION;
+exports.clearCompileCache = clearCompileCache;
+exports.clearDateTimeFormat = clearDateTimeFormat;
+exports.clearNumberFormat = clearNumberFormat;
+exports.compile = compile;
+exports.compileToFunction = compileToFunction;
+exports.createCoreContext = createCoreContext;
+exports.createCoreError = createCoreError;
+exports.createMessageContext = createMessageContext;
+exports.datetime = datetime;
+exports.fallbackWithLocaleChain = fallbackWithLocaleChain;
+exports.fallbackWithSimple = fallbackWithSimple;
+exports.getAdditionalMeta = getAdditionalMeta;
+exports.getDevToolsHook = getDevToolsHook;
+exports.getFallbackContext = getFallbackContext;
+exports.getLocale = getLocale;
+exports.getWarnMessage = getWarnMessage;
+exports.handleMissing = handleMissing;
+exports.initI18nDevTools = initI18nDevTools;
+exports.isAlmostSameLocale = isAlmostSameLocale;
+exports.isImplicitFallback = isImplicitFallback;
+exports.isMessageAST = isMessageAST;
+exports.isMessageFunction = isMessageFunction;
+exports.isTranslateFallbackWarn = isTranslateFallbackWarn;
+exports.isTranslateMissingWarn = isTranslateMissingWarn;
+exports.number = number;
+exports.parse = parse;
+exports.parseDateTimeArgs = parseDateTimeArgs;
+exports.parseNumberArgs = parseNumberArgs;
+exports.parseTranslateArgs = parseTranslateArgs;
+exports.registerLocaleFallbacker = registerLocaleFallbacker;
+exports.registerMessageCompiler = registerMessageCompiler;
+exports.registerMessageResolver = registerMessageResolver;
+exports.resolveLocale = resolveLocale;
+exports.resolveValue = resolveValue;
+exports.resolveWithKeyValue = resolveWithKeyValue;
+exports.setAdditionalMeta = setAdditionalMeta;
+exports.setDevToolsHook = setDevToolsHook;
+exports.setFallbackContext = setFallbackContext;
+exports.translate = translate;
+exports.translateDevTools = translateDevTools;
+exports.updateFallbackLocale = updateFallbackLocale;

+ 1 - 0
node_modules/@intlify/core-base/dist/core-base.cjs.js

@@ -0,0 +1 @@
+module.exports = require('../dist/core-base.cjs')

+ 1 - 0
node_modules/@intlify/core-base/dist/core-base.cjs.prod.js

@@ -0,0 +1 @@
+module.exports = require('../dist/core-base.prod.cjs')

+ 1263 - 0
node_modules/@intlify/core-base/dist/core-base.d.ts

@@ -0,0 +1,1263 @@
+import type { BaseError } from '@intlify/shared';
+import { CompileError } from '@intlify/message-compiler';
+import { CompileErrorCodes } from '@intlify/message-compiler';
+import type { CompileOptions } from '@intlify/message-compiler';
+import type { CoreMissingType as CoreMissingType_2 } from '@intlify/core-base';
+import { createCompileError } from '@intlify/message-compiler';
+import type { Emittable } from '@intlify/shared';
+import type { Locale as Locale_2 } from '@intlify/core-base';
+import type { MessageFunction as MessageFunction_2 } from '@intlify/core-base';
+import type { Path as Path_2 } from '@intlify/core-base';
+import type { PathValue as PathValue_2 } from '@intlify/core-base';
+import { ResourceNode } from '@intlify/message-compiler';
+import type { ResourceNode as ResourceNode_2 } from '@intlify/core-base';
+
+declare type __ResourceFormatPath<T, Key extends keyof T> = Key extends string ? T[Key] extends Record<string, any> ? `${Key}` : never : never;
+
+export declare type __ResourcePath<T, Key extends keyof T> = Key extends string ? T[Key] extends Record<string, any> ? `${Key}.${__ResourcePath<T[Key], Exclude<keyof T[Key], keyof any[]>> & string}` | `${Key}.${Exclude<keyof T[Key], keyof any[]> & string}` : never : never;
+
+declare type AdditionalPayloads = {
+    meta?: Record<string, unknown>;
+};
+
+export declare function clearCompileCache(): void;
+
+/* Excluded from this release type: clearDateTimeFormat */
+
+/* Excluded from this release type: clearNumberFormat */
+
+export declare function compile<Message = string, MessageSource = string | ResourceNode>(message: MessageSource, context: MessageCompilerContext): MessageFunction<Message>;
+export { CompileError }
+export { CompileErrorCodes }
+
+export declare const compileToFunction: <Message = string, MessageSource = string | ResourceNode>(message: MessageSource, context: MessageCompilerContext) => MessageFunction<Message>;
+
+export declare interface CoreCommonContext<Message = string, Locales = 'en-US'> {
+    cid: number;
+    version: string;
+    locale: Locales;
+    fallbackLocale: FallbackLocales<Exclude<Locales, LocaleDetector>>;
+    missing: CoreMissingHandler<Message> | null;
+    missingWarn: boolean | RegExp;
+    fallbackWarn: boolean | RegExp;
+    fallbackFormat: boolean;
+    unresolving: boolean;
+    localeFallbacker: LocaleFallbacker;
+    onWarn(msg: string, err?: Error): void;
+}
+
+export declare type CoreContext<Message = string, Messages = {}, DateTimeFormats = {}, NumberFormats = {}, LocaleType = Locale, ResourceLocales = PickupLocales<NonNullable<Messages>> | PickupLocales<NonNullable<DateTimeFormats>> | PickupLocales<NonNullable<NumberFormats>>, Locales = IsNever<ResourceLocales> extends true ? LocaleType extends LocaleDetector | Locale ? LocaleType : Locale : ResourceLocales> = CoreCommonContext<Message, Locales> & CoreTranslationContext<NonNullable<Messages>, Message> & CoreDateTimeContext<NonNullable<DateTimeFormats>> & CoreNumberContext<NonNullable<NumberFormats>> & {
+    fallbackContext?: CoreContext<Message, Messages, DateTimeFormats, NumberFormats, LocaleType, ResourceLocales, Locales>;
+};
+
+export declare interface CoreDateTimeContext<DateTimeFormats = {}> {
+    datetimeFormats: {
+        [K in keyof DateTimeFormats]: DateTimeFormats[K];
+    };
+}
+
+export declare interface CoreError extends BaseError {
+}
+
+export declare const CoreErrorCodes: {
+    readonly INVALID_ARGUMENT: 17;
+    readonly INVALID_DATE_ARGUMENT: number;
+    readonly INVALID_ISO_DATE_ARGUMENT: number;
+    readonly NOT_SUPPORT_NON_STRING_MESSAGE: number;
+    readonly NOT_SUPPORT_LOCALE_PROMISE_VALUE: number;
+    readonly NOT_SUPPORT_LOCALE_ASYNC_FUNCTION: number;
+    readonly NOT_SUPPORT_LOCALE_TYPE: number;
+    readonly __EXTEND_POINT__: number;
+};
+
+export declare type CoreErrorCodes = (typeof CoreErrorCodes)[keyof typeof CoreErrorCodes];
+
+export declare interface CoreInternalContext {
+    __datetimeFormatters: Map<string, Intl.DateTimeFormat>;
+    __numberFormatters: Map<string, Intl.NumberFormat>;
+    __localeChainCache?: Map<Locale, Locale[]>;
+    __v_emitter?: VueDevToolsEmitter;
+    __meta: MetaInfo;
+}
+
+export declare interface CoreInternalOptions {
+    __datetimeFormatters?: Map<string, Intl.DateTimeFormat>;
+    __numberFormatters?: Map<string, Intl.NumberFormat>;
+    __v_emitter?: VueDevToolsEmitter;
+    __meta?: MetaInfo;
+}
+
+export declare type CoreMissingHandler<Message = string> = (context: CoreContext<Message>, locale: Locale, key: Path, type: CoreMissingType, ...values: unknown[]) => string | void;
+
+export declare type CoreMissingType = 'translate' | 'datetime format' | 'number format' | 'translate exists';
+
+export declare interface CoreNumberContext<NumberFormats = {}> {
+    numberFormats: {
+        [K in keyof NumberFormats]: NumberFormats[K];
+    };
+}
+
+export declare interface CoreOptions<Message = string, Schema extends {
+    message?: unknown;
+    datetime?: unknown;
+    number?: unknown;
+} = {
+    message: DefaultCoreLocaleMessageSchema;
+    datetime: DateTimeFormat;
+    number: NumberFormat;
+}, Locales extends {
+    messages: unknown;
+    datetimeFormats: unknown;
+    numberFormats: unknown;
+} | string = Locale, MessagesLocales = Locales extends {
+    messages: infer M;
+} ? M : Locales extends string ? Locales : Locale, DateTimeFormatsLocales = Locales extends {
+    datetimeFormats: infer D;
+} ? D : Locales extends string ? Locales : Locale, NumberFormatsLocales = Locales extends {
+    numberFormats: infer N;
+} ? N : Locales extends string ? Locales : Locale, MessageSchema = Schema extends {
+    message: infer M;
+} ? M : DefaultCoreLocaleMessageSchema, DateTimeSchema = Schema extends {
+    datetime: infer D;
+} ? D : DateTimeFormat, NumberSchema = Schema extends {
+    number: infer N;
+} ? N : NumberFormat, _Messages extends LocaleMessages<MessageSchema, MessagesLocales, Message> = LocaleMessages<MessageSchema, MessagesLocales, Message>, _DateTimeFormats extends DateTimeFormats<DateTimeSchema, DateTimeFormatsLocales> = DateTimeFormats<DateTimeSchema, DateTimeFormatsLocales>, _NumberFormats extends NumberFormats<NumberSchema, NumberFormatsLocales> = NumberFormats<NumberSchema, NumberFormatsLocales>> {
+    version?: string;
+    locale?: Locale | LocaleDetector;
+    fallbackLocale?: FallbackLocale;
+    messages?: {
+        [K in keyof _Messages]: MessageSchema;
+    };
+    datetimeFormats?: {
+        [K in keyof _DateTimeFormats]: DateTimeSchema;
+    };
+    numberFormats?: {
+        [K in keyof _NumberFormats]: NumberSchema;
+    };
+    modifiers?: LinkedModifiers<Message>;
+    pluralRules?: PluralizationRules;
+    missing?: CoreMissingHandler<Message>;
+    missingWarn?: boolean | RegExp;
+    fallbackWarn?: boolean | RegExp;
+    fallbackFormat?: boolean;
+    unresolving?: boolean;
+    postTranslation?: PostTranslationHandler<Message>;
+    processor?: MessageProcessor<Message>;
+    warnHtmlMessage?: boolean;
+    escapeParameter?: boolean;
+    messageCompiler?: MessageCompiler<Message, string | ResourceNode>;
+    messageResolver?: MessageResolver;
+    localeFallbacker?: LocaleFallbacker;
+    fallbackContext?: CoreContext<Message, MessagesLocales, DateTimeFormatsLocales, NumberFormatsLocales>;
+    onWarn?: (msg: string, err?: Error) => void;
+}
+
+export declare interface CoreTranslationContext<Messages = {}, Message = string> {
+    messages: {
+        [K in keyof Messages]: Messages[K];
+    };
+    modifiers: LinkedModifiers<Message>;
+    pluralRules?: PluralizationRules;
+    postTranslation: PostTranslationHandler<Message> | null;
+    processor: MessageProcessor<Message> | null;
+    warnHtmlMessage: boolean;
+    escapeParameter: boolean;
+    messageCompiler: MessageCompiler<Message, string | ResourceNode> | null;
+    messageResolver: MessageResolver;
+}
+
+export declare const CoreWarnCodes: {
+    readonly NOT_FOUND_KEY: 2;
+    readonly FALLBACK_TO_TRANSLATE: number;
+    readonly CANNOT_FORMAT_NUMBER: number;
+    readonly FALLBACK_TO_NUMBER_FORMAT: number;
+    readonly CANNOT_FORMAT_DATE: number;
+    readonly FALLBACK_TO_DATE_FORMAT: number;
+    readonly EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER: number;
+    readonly __EXTEND_POINT__: number;
+};
+
+export declare type CoreWarnCodes = (typeof CoreWarnCodes)[keyof typeof CoreWarnCodes];
+export { createCompileError }
+
+export declare function createCoreContext<Message = string, Options extends CoreOptions<Message> = CoreOptions<Message>, Messages extends Record<string, any> = Options['messages'] extends Record<string, any> ? Options['messages'] : {}, DateTimeFormats extends Record<string, any> = Options['datetimeFormats'] extends Record<string, any> ? Options['datetimeFormats'] : {}, NumberFormats extends Record<string, any> = Options['numberFormats'] extends Record<string, any> ? Options['numberFormats'] : {}, LocaleType = Locale | LocaleDetector>(options: Options): CoreContext<Message, Messages, DateTimeFormats, NumberFormats, LocaleType>;
+
+export declare function createCoreContext<Schema = LocaleMessage, Locales = 'en-US', Message = string, Options extends CoreOptions<Message, SchemaParams<Schema, Message>, LocaleParams<Locales>> = CoreOptions<Message, SchemaParams<Schema, Message>, LocaleParams<Locales>>, Messages extends Record<string, any> = NonNullable<Options['messages']> extends Record<string, any> ? NonNullable<Options['messages']> : {}, DateTimeFormats extends Record<string, any> = NonNullable<Options['datetimeFormats']> extends Record<string, any> ? NonNullable<Options['datetimeFormats']> : {}, NumberFormats extends Record<string, any> = NonNullable<Options['numberFormats']> extends Record<string, any> ? NonNullable<Options['numberFormats']> : {}, LocaleType = Locale | LocaleDetector>(options: Options): CoreContext<Message, Messages, DateTimeFormats, NumberFormats, LocaleType>;
+
+export declare function createCoreError(code: CoreErrorCodes): CoreError;
+
+export declare function createMessageContext<T = string, N = {}>(options?: MessageContextOptions<T, N>): MessageContext<T>;
+
+/**
+ *  number
+ */
+export declare type CurrencyDisplay = 'symbol' | 'code' | 'name';
+
+export declare interface CurrencyNumberFormatOptions extends Intl.NumberFormatOptions {
+    style: 'currency';
+    currency: string;
+    currencyDisplay?: CurrencyDisplay;
+    localeMatcher?: LocaleMatcher;
+    formatMatcher?: FormatMatcher;
+}
+
+/**
+ * `datetime` function overloads
+ */
+export declare function datetime<Context extends CoreContext<Message, {}, {}, {}>, Message = string>(context: Context, value: number | string | Date): string | number | Intl.DateTimeFormatPart[];
+
+export declare function datetime<Context extends CoreContext<Message, {}, {}, {}>, Value extends number | string | Date = number, Key extends string = string, ResourceKeys extends PickupFormatKeys<Context['datetimeFormats']> = PickupFormatKeys<Context['datetimeFormats']>, Message = string>(context: Context, value: Value, keyOrOptions: Key | ResourceKeys | DateTimeOptions<Key | ResourceKeys, Context['locale']>): string | number | Intl.DateTimeFormatPart[];
+
+export declare function datetime<Context extends CoreContext<Message, {}, {}, {}>, Value extends number | string | Date = number, Key extends string = string, ResourceKeys extends PickupFormatKeys<Context['datetimeFormats']> = PickupFormatKeys<Context['datetimeFormats']>, Message = string>(context: Context, value: Value, keyOrOptions: Key | ResourceKeys | DateTimeOptions<Key | ResourceKeys, Context['locale']>, locale: Context['locale']): string | number | Intl.DateTimeFormatPart[];
+
+export declare function datetime<Context extends CoreContext<Message, {}, {}, {}>, Value extends number | string | Date = number, Key extends string = string, ResourceKeys extends PickupFormatKeys<Context['datetimeFormats']> = PickupFormatKeys<Context['datetimeFormats']>, Message = string>(context: Context, value: Value, keyOrOptions: Key | ResourceKeys | DateTimeOptions<Key | ResourceKeys, Context['locale']>, override: Intl.DateTimeFormatOptions): string | number | Intl.DateTimeFormatPart[];
+
+export declare function datetime<Context extends CoreContext<Message, {}, {}, {}>, Value extends number | string | Date = number, Key extends string = string, ResourceKeys extends PickupFormatKeys<Context['datetimeFormats']> = PickupFormatKeys<Context['datetimeFormats']>, Message = string>(context: Context, value: Value, keyOrOptions: Key | ResourceKeys | DateTimeOptions<Key | ResourceKeys, Context['locale']>, locale: Context['locale'], override: Intl.DateTimeFormatOptions): string | number | Intl.DateTimeFormatPart[];
+
+/* Excluded from this release type: DATETIME_FORMAT_OPTIONS_KEYS */
+
+export declare type DateTimeDigital = 'numeric' | '2-digit';
+
+export declare type DateTimeFormat = {
+    [key: string]: DateTimeFormatOptions;
+};
+
+export declare type DateTimeFormatOptions = Intl.DateTimeFormatOptions | SpecificDateTimeFormatOptions;
+
+export declare type DateTimeFormats<Schema = DateTimeFormat, Locales = Locale> = LocaleRecord<UnionToTuple<Locales>, Schema>;
+
+/**
+ *  datetime
+ */
+export declare type DateTimeHumanReadable = 'long' | 'short' | 'narrow';
+
+/**
+ *  # datetime
+ *
+ *  ## usages:
+ *    // for example `context.datetimeFormats` below
+ *    'en-US': {
+ *      short: {
+ *        year: 'numeric', month: '2-digit', day: '2-digit',
+ *        hour: '2-digit', minute: '2-digit'
+ *      }
+ *    },
+ *    'ja-JP': { ... }
+ *
+ *    // datetimeable value only
+ *    datetime(context, value)
+ *
+ *    // key argument
+ *    datetime(context, value, 'short')
+ *
+ *    // key & locale argument
+ *    datetime(context, value, 'short', 'ja-JP')
+ *
+ *    // object sytle argument
+ *    datetime(context, value, { key: 'short', locale: 'ja-JP' })
+ *
+ *    // suppress localize miss warning option, override context.missingWarn
+ *    datetime(context, value, { key: 'short', locale: 'ja-JP', missingWarn: false })
+ *
+ *    // suppress localize fallback warning option, override context.fallbackWarn
+ *    datetime(context, value, { key: 'short', locale: 'ja-JP', fallbackWarn: false })
+ *
+ *    // if you specify `part` options, you can get an array of objects containing the formatted datetime in parts
+ *    datetime(context, value, { key: 'short', part: true })
+ *
+ *    // orverride context.datetimeFormats[locale] options with functino options
+ *    datetime(cnotext, value, 'short', { year: '2-digit' })
+ *    datetime(cnotext, value, 'short', 'ja-JP', { year: '2-digit' })
+ *    datetime(context, value, { key: 'short', part: true, year: '2-digit' })
+ */
+/**
+ * DateTime options
+ *
+ * @remarks
+ * Options for Datetime formatting API
+ *
+ * @VueI18nGeneral
+ */
+export declare interface DateTimeOptions<Key = string, Locales = Locale> extends Intl.DateTimeFormatOptions, LocaleOptions<Locales> {
+    /**
+     * @remarks
+     * The target format key
+     */
+    key?: Key;
+    /**
+     * @remarks
+     * Whether suppress warnings outputted when localization fails
+     */
+    missingWarn?: boolean;
+    /**
+     * @remarks
+     * Whether do resolve on format keys when your language lacks a formatting for a key
+     */
+    fallbackWarn?: boolean;
+    /**
+     * @remarks
+     * Whether to use [Intel.DateTimeFormat#formatToParts](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/formatToParts)
+     */
+    part?: boolean;
+}
+
+export declare const DEFAULT_LOCALE = "en-US";
+
+export declare const DEFAULT_MESSAGE_DATA_TYPE = "text";
+
+export declare type DefaultCoreLocaleMessageSchema<Schema = RemoveIndexSignature<{
+    [K in keyof DefineCoreLocaleMessage]: DefineCoreLocaleMessage[K];
+}>> = IsEmptyObject<Schema> extends true ? LocaleMessage<string> : Schema;
+
+/**
+ * The type definition of Locale Message for `@intlify/core-base` package
+ *
+ * @remarks
+ * The typealias is used to strictly define the type of the Locale message.
+ *
+ * @example
+ * ```ts
+ * // type.d.ts (`.d.ts` file at your app)
+ * import { DefineCoreLocaleMessage } from '@intlify/core-base'
+ *
+ * declare module '@intlify/core-base' {
+ *   export interface DefineCoreLocaleMessage {
+ *     title: string
+ *     menu: {
+ *       login: string
+ *     }
+ *   }
+ * }
+ * ```
+ *
+ * @VueI18nGeneral
+ */
+export declare interface DefineCoreLocaleMessage extends LocaleMessage<string> {
+}
+
+declare type ExtractToStringFunction<T> = T[ExtractToStringKey<T>];
+
+declare type ExtractToStringKey<T> = Extract<keyof T, 'toString'>;
+
+/** @VueI18nGeneral */
+export declare type FallbackLocale = Locale | Locale[] | {
+    [locale in string]: Locale[];
+} | false;
+
+export declare type FallbackLocales<Locales = 'en-US'> = Locales | Array<Locales> | {
+    [locale in string]: Array<PickupFallbackLocales<UnionToTuple<Locales>>>;
+} | false;
+
+/**
+ * Fallback with locale chain
+ *
+ * @remarks
+ * A fallback locale function implemented with a fallback chain algorithm. It's used in VueI18n as default.
+ *
+ * @param ctx - A {@link CoreContext | context}
+ * @param fallback - A {@link FallbackLocale | fallback locale}
+ * @param start - A starting {@link Locale | locale}
+ *
+ * @returns Fallback locales
+ *
+ * @VueI18nSee [Fallbacking](../guide/essentials/fallback)
+ *
+ * @VueI18nGeneral
+ */
+export declare function fallbackWithLocaleChain<Message = string>(ctx: CoreContext<Message>, fallback: FallbackLocale, start: Locale): Locale[];
+
+/**
+ * Fallback with simple implemenation
+ *
+ * @remarks
+ * A fallback locale function implemented with a simple fallback algorithm.
+ *
+ * Basically, it returns the value as specified in the `fallbackLocale` props, and is processed with the fallback inside intlify.
+ *
+ * @param ctx - A {@link CoreContext | context}
+ * @param fallback - A {@link FallbackLocale | fallback locale}
+ * @param start - A starting {@link Locale | locale}
+ *
+ * @returns Fallback locales
+ *
+ * @VueI18nGeneral
+ */
+export declare function fallbackWithSimple<Message = string>(ctx: CoreContext<Message>, fallback: FallbackLocale, start: Locale): Locale[];
+
+export declare type First<T extends readonly any[]> = T[0];
+
+export declare type FormatMatcher = 'basic' | 'best fit';
+
+export declare type FormattedNumberPart = {
+    type: FormattedNumberPartType;
+    value: string;
+};
+
+export declare type FormattedNumberPartType = 'currency' | 'decimal' | 'fraction' | 'group' | 'infinity' | 'integer' | 'literal' | 'minusSign' | 'nan' | 'plusSign' | 'percentSign';
+
+export declare const getAdditionalMeta: () => MetaInfo | null;
+
+export declare function getDevToolsHook(): IntlifyDevToolsEmitter | null;
+
+export declare const getFallbackContext: () => CoreContext | null;
+
+/* Excluded from this release type: getLocale */
+
+export declare function getWarnMessage(code: CoreWarnCodes, ...args: unknown[]): string;
+
+/* Excluded from this release type: handleMissing */
+
+export declare function initI18nDevTools(i18n: unknown, version: string, meta?: Record<string, unknown>): void;
+
+declare type IntlifyDevToolsEmitter = Emittable<IntlifyDevToolsEmitterHooks>;
+
+declare type IntlifyDevToolsEmitterHooks = {
+    [IntlifyDevToolsHooks.I18nInit]: IntlifyDevToolsHookPayloads[IntlifyDevToolsHooks.I18nInit];
+    [IntlifyDevToolsHooks.FunctionTranslate]: IntlifyDevToolsHookPayloads[IntlifyDevToolsHooks.FunctionTranslate];
+};
+
+declare type IntlifyDevToolsHookPayloads = {
+    [IntlifyDevToolsHooks.I18nInit]: {
+        timestamp: number;
+        i18n: unknown;
+        version: string;
+    } & AdditionalPayloads;
+    [IntlifyDevToolsHooks.FunctionTranslate]: {
+        timestamp: number;
+        message: string | number;
+        key: string;
+        locale: string;
+        format?: string;
+    } & AdditionalPayloads;
+};
+
+declare const enum IntlifyDevToolsHooks {
+    I18nInit = "i18n:init",
+    FunctionTranslate = "function:translate"
+}
+
+/* Excluded from this release type: isAlmostSameLocale */
+
+export declare type IsEmptyObject<T> = IsNever<keyof T> extends true ? true : false;
+
+/* Excluded from this release type: isImplicitFallback */
+
+export declare const isMessageAST: (val: unknown) => val is ResourceNode;
+
+export declare const isMessageFunction: <T>(val: unknown) => val is MessageFunction<T>;
+
+export declare type IsNever<T> = [T] extends [never] ? true : false;
+
+/* Excluded from this release type: isTranslateFallbackWarn */
+
+/* Excluded from this release type: isTranslateMissingWarn */
+
+export declare type IsUnion<T, B = T> = T extends B ? [B] extends [T] ? false : true : never;
+
+export declare type LastInUnion<U> = UnionToIntersection<U extends unknown ? (x: U) => 0 : never> extends (x: infer L) => 0 ? L : never;
+
+/** @VueI18nGeneral */
+export declare type LinkedModifiers<T = string> = {
+    [key: string]: LinkedModify<T>;
+};
+
+export declare type LinkedModify<T = string> = (value: T, type: string) => MessageType<T>;
+
+export declare interface LinkedOptions {
+    /**
+     * The message type of linked message
+     */
+    type?: string;
+    /**
+     * The modifier of linked message
+     */
+    modifier?: string;
+}
+
+/** @VueI18nGeneral */
+export declare type Locale = string;
+
+/** @VueI18nGeneral */
+export declare interface LocaleDetector<Args extends any[] = any[]> {
+    (...args: Args): Locale | Promise<Locale>;
+    resolvedOnce?: boolean;
+}
+
+/**
+ * The locale fallbacker
+ *
+ * @VueI18nGeneral
+ */
+export declare type LocaleFallbacker = <Message = string>(ctx: CoreContext<Message>, fallback: FallbackLocale, start: Locale) => Locale[];
+
+export declare type LocaleMatcher = 'lookup' | 'best fit';
+
+/** @VueI18nGeneral */
+export declare type LocaleMessage<Message = string> = Record<string, LocaleMessageValue<Message>>;
+
+/** @VueI18nGeneral */
+export declare type LocaleMessageDictionary<T, Message = string> = {
+    [K in keyof T]: LocaleMessageType<T[K], Message>;
+};
+
+/** @VueI18nGeneral */
+export declare type LocaleMessages<Schema, Locales = Locale, Message = string> = LocaleRecord<UnionToTuple<Locales>, Schema>;
+
+/** @VueI18nGeneral */
+export declare type LocaleMessageType<T, Message = string> = T extends string ? string : T extends () => Promise<infer P> ? LocaleMessageDictionary<P, Message> : T extends (...args: infer Arguments) => any ? (...args: Arguments) => ReturnType<T> : T extends Record<string, unknown> ? LocaleMessageDictionary<T, Message> : T extends Array<T> ? {
+    [K in keyof T]: T[K];
+} : T;
+
+/** @VueI18nGeneral */
+export declare type LocaleMessageValue<Message = string> = LocaleMessageDictionary<any, Message> | string;
+
+/** @VueI18nGeneral */
+export declare interface LocaleOptions<Locales = Locale> {
+    /**
+     * @remarks
+     * The locale of localization
+     */
+    locale?: Locales | LocaleDetector;
+}
+
+export declare type LocaleParams<T, Default = 'en-US'> = T extends IsUnion<T> ? {
+    messages: T;
+    datetimeFormats: T;
+    numberFormats: T;
+} : T extends {
+    messages?: infer M;
+    datetimeFormats?: infer D;
+    numberFormats?: infer N;
+} ? {
+    messages: LocaleParamsType<M, Default>;
+    datetimeFormats: LocaleParamsType<D, Default>;
+    numberFormats: LocaleParamsType<N, Default>;
+} : T extends string ? {
+    messages: T;
+    datetimeFormats: T;
+    numberFormats: T;
+} : {
+    messages: Default;
+    datetimeFormats: Default;
+    numberFormats: Default;
+};
+
+declare type LocaleParamsType<T, R> = T extends IsUnion<T> ? T : T extends string ? T : R;
+
+export declare type LocaleRecord<T extends any[], R> = {
+    [K in T[number]]: R;
+};
+
+/**
+ * The message compiler
+ *
+ * @param message - A resolved message that ususally will be passed the string. if you can transform to it with bundler, will be passed the AST.
+ * @param context - A message context {@link MessageCompilerContext}
+ *
+ * @returns A {@link MessageFunction}
+ *
+ * @VueI18nGeneral
+ */
+export declare type MessageCompiler<Message = string, MessageSource = string | ResourceNode> = (message: MessageSource, context: MessageCompilerContext) => MessageFunction<Message>;
+
+/**
+ * The context that will pass the message compiler.
+ *
+ * @VueI18nGeneral
+ */
+export declare type MessageCompilerContext = Pick<CompileOptions, 'onError' | 'onCacheKey' | 'onWarn'> & {
+    /**
+     * Whether to allow the use locale messages of HTML formatting.
+     */
+    warnHtmlMessage?: boolean;
+    /**
+     * The resolved locale message key
+     */
+    key: string;
+    /**
+     * The locale
+     */
+    locale: Locale;
+};
+
+/**
+ * The message context.
+ *
+ * @VueI18nGeneral
+ */
+export declare interface MessageContext<T = string> {
+    /**
+     * Resolve message value from list.
+     *
+     * @param index - An index of message values.
+     *
+     * @returns A resolved message value.
+     *
+     * @example
+     * ```js
+     * const messages = {
+     *   en: {
+     *     greeting: ({ list }) => `hello, ${list(0)}!`
+     *   }
+     * }
+     * ```
+     */
+    list(index: number): unknown;
+    /**
+     * Resolve message value from named.
+     *
+     * @param key - A key of message value.
+     *
+     * @returns A resolved message value.
+     *
+     * @example
+     * ```js
+     * const messages = {
+     *   en: {
+     *     greeting: ({ named }) => `hello, ${named('name')}!`
+     *   }
+     * }
+     * ```
+     */
+    named(key: string): unknown;
+    /**
+     * Resolve message with plural index.
+     *
+     * @remarks
+     * That's resolved with plural index with translation function.
+     *
+     * @param messages - the messages, that is resolved with plural index with translation function.
+     *
+     * @returns A resolved message.
+     *
+     * @example
+     * ```js
+     * const messages = {
+     *   en: {
+     *     car: ({ plural }) => plural(['car', 'cars']),
+     *     apple: ({ plural, named }) =>
+     *       plural([
+     *         'no apples',
+     *         'one apple',
+     *         `${named('count')} apples`
+     *       ])
+     *   }
+     * }
+     * ```
+     */
+    plural(messages: T[]): T;
+    /**
+     * Resolve linked message.
+     *
+     * @param key - A message key
+     * @param modifier - A modifier
+     *
+     * @returns A resolve message.
+     */
+    linked(key: Path, modifier?: string): MessageType<T>;
+    /**
+     * Overloaded `linked`
+     *
+     * @param key - A message key
+     * @param modifier - A modifier
+     * @param type - A message type
+     *
+     * @returns A resolve message.
+     */
+    linked(key: Path, modifier?: string, type?: string): MessageType<T>;
+    /**
+     * Overloaded `linked`
+     *
+     * @param key - A message key
+     * @param optoins - An {@link LinkedOptions | linked options}
+     *
+     * @returns A resolve message.
+     */
+    linked(key: Path, optoins?: LinkedOptions): MessageType<T>;
+    /* Excluded from this release type: message */
+    /**
+     * The message type to be handled by the message function.
+     *
+     * @remarks
+     * Usually `text`, you need to return **string** in message function.
+     */
+    type: string;
+    /* Excluded from this release type: interpolate */
+    /* Excluded from this release type: normalize */
+    /**
+     * The message values.
+     *
+     * @remarks
+     * The message values are the argument values passed from translation fucntion, such as `$t`, `t`, or `translate`.
+     *
+     * @example
+     * vue-i18n `$t` (or `t`) case:
+     * ```html
+     * <p>{{ $t('greeting', { name: 'DIO' }) }}</p> <!-- `{ name: 'DIO' }` is message vlaues -->
+     * ```
+     *
+     * `@intlify/core` (`@intlify/core-base`) `translate` case:
+     * ```js
+     * translate(context, 'foo.bar', ['dio']) // `['dio']` is message values
+     * ```
+     */
+    values: Record<string, unknown>;
+}
+
+export declare interface MessageContextOptions<T = string, N = {}> {
+    parent?: MessageContext<T>;
+    locale?: string;
+    list?: unknown[];
+    named?: NamedValue<N>;
+    modifiers?: LinkedModifiers<T>;
+    pluralIndex?: number;
+    pluralRules?: PluralizationRules;
+    messages?: MessageFunctions<T> | MessageResolveFunction<T>;
+    processor?: MessageProcessor<T>;
+}
+
+/**
+ * The Message Function.
+ *
+ * @param ctx - A {@link MessageContext}
+ *
+ * @return A resolved format message, that is string type basically.
+ *
+ * @VueI18nGeneral
+ */
+export declare type MessageFunction<T = string> = MessageFunctionCallable | MessageFunctionInternal<T>;
+
+export declare type MessageFunctionCallable = <T = string>(ctx: MessageContext<T>) => MessageFunctionReturn<T>;
+
+export declare type MessageFunctionInternal<T = string> = {
+    (ctx: MessageContext<T>): MessageFunctionReturn<T>;
+    key?: string;
+    locale?: string;
+    source?: string;
+};
+
+/** @VueI18nGeneral */
+export declare type MessageFunctionReturn<T = string> = T extends string ? MessageType<T> : MessageType<T>[];
+
+export declare type MessageFunctions<T = string> = Record<string, MessageFunction<T>>;
+
+export declare type MessageInterpolate<T = string> = (val: unknown) => MessageType<T>;
+
+export declare type MessageNormalize<T = string> = (values: MessageType<T>[]) => MessageFunctionReturn<T>;
+
+export declare interface MessageProcessor<T = string> {
+    type?: string;
+    interpolate?: MessageInterpolate<T>;
+    normalize?: MessageNormalize<T>;
+}
+
+export declare type MessageResolveFunction<T = string> = (key: string) => MessageFunction<T>;
+
+/** @VueI18nGeneral */
+export declare type MessageResolver = (obj: unknown, path: Path) => PathValue;
+
+export declare type MessageType<T = string> = T extends string ? string : StringConvertable<T>;
+
+export declare interface MetaInfo {
+    [field: string]: unknown;
+}
+
+export declare const MISSING_RESOLVE_VALUE = "";
+
+/** @VueI18nGeneral */
+export declare type NamedValue<T = {}> = T & Record<string, unknown>;
+
+export declare const NOT_REOSLVED = -1;
+
+/**
+ * `number` function overloads
+ */
+export declare function number<Context extends CoreContext<Message, {}, {}, {}>, Message = string>(context: Context, value: number): string | number | Intl.NumberFormatPart[];
+
+export declare function number<Context extends CoreContext<Message, {}, {}, {}>, Value extends number = number, Key extends string = string, ResourceKeys extends PickupFormatKeys<Context['numberFormats']> = PickupFormatKeys<Context['numberFormats']>, Message = string>(context: Context, value: Value, keyOrOptions: Key | ResourceKeys | NumberOptions<Key | ResourceKeys, Context['locale']>): string | number | Intl.NumberFormatPart[];
+
+export declare function number<Context extends CoreContext<Message, {}, {}, {}>, Value extends number = number, Key extends string = string, ResourceKeys extends PickupFormatKeys<Context['numberFormats']> = PickupFormatKeys<Context['numberFormats']>, Message = string>(context: Context, value: Value, keyOrOptions: Key | ResourceKeys | NumberOptions<Key | ResourceKeys, Context['locale']>, locale: Context['locale']): string | number | Intl.NumberFormatPart[];
+
+export declare function number<Context extends CoreContext<Message, {}, {}, {}>, Value extends number = number, Key extends string = string, ResourceKeys extends PickupFormatKeys<Context['numberFormats']> = PickupFormatKeys<Context['numberFormats']>, Message = string>(context: Context, value: Value, keyOrOptions: Key | ResourceKeys | NumberOptions<Key | ResourceKeys, Context['locale']>, override: Intl.NumberFormatOptions): string | number | Intl.NumberFormatPart[];
+
+export declare function number<Context extends CoreContext<Message, {}, {}, {}>, Value extends number = number, Key extends string = string, ResourceKeys extends PickupFormatKeys<Context['numberFormats']> = PickupFormatKeys<Context['numberFormats']>, Message = string>(context: Context, value: Value, keyOrOptions: Key | ResourceKeys | NumberOptions<Key | ResourceKeys, Context['locale']>, locale: Context['locale'], override: Intl.NumberFormatOptions): string | number | Intl.NumberFormatPart[];
+
+/* Excluded from this release type: NUMBER_FORMAT_OPTIONS_KEYS */
+
+export declare type NumberFormat = {
+    [key: string]: NumberFormatOptions;
+};
+
+export declare type NumberFormatOptions = Intl.NumberFormatOptions | SpecificNumberFormatOptions | CurrencyNumberFormatOptions;
+
+export declare type NumberFormats<Schema = NumberFormat, Locales = Locale> = LocaleRecord<UnionToTuple<Locales>, Schema>;
+
+export declare type NumberFormatToPartsResult = {
+    [index: number]: FormattedNumberPart;
+};
+
+/**
+ *  # number
+ *
+ *  ## usages
+ *    // for example `context.numberFormats` below
+ *    'en-US': {
+ *      'currency': {
+ *        style: 'currency', currency: 'USD', currencyDisplay: 'symbol'
+ *      }
+ *    },
+ *    'ja-JP: { ... }
+ *
+ *    // value only
+ *    number(context, value)
+ *
+ *    // key argument
+ *    number(context, value, 'currency')
+ *
+ *    // key & locale argument
+ *    number(context, value, 'currency', 'ja-JP')
+ *
+ *    // object sytle argument
+ *    number(context, value, { key: 'currency', locale: 'ja-JP' })
+ *
+ *    // suppress localize miss warning option, override context.missingWarn
+ *    number(context, value, { key: 'currency', locale: 'ja-JP', missingWarn: false })
+ *
+ *    // suppress localize fallback warning option, override context.fallbackWarn
+ *    number(context, value, { key: 'currency', locale: 'ja-JP', fallbackWarn: false })
+ *
+ *    // if you specify `part` options, you can get an array of objects containing the formatted number in parts
+ *    number(context, value, { key: 'currenty', part: true })
+ *
+ *    // orverride context.numberFormats[locale] options with functino options
+ *    number(cnotext, value, 'currency', { year: '2-digit' })
+ *    number(cnotext, value, 'currency', 'ja-JP', { year: '2-digit' })
+ *    number(context, value, { key: 'currenty', locale: 'ja-JP', part: true, year: '2-digit'})
+ */
+/**
+ * Number Options
+ *
+ * @remarks
+ * Options for Number formatting API
+ *
+ * @VueI18nGeneral
+ */
+export declare interface NumberOptions<Key = string, Locales = Locale> extends Intl.NumberFormatOptions, LocaleOptions<Locales> {
+    /**
+     * @remarks
+     * The target format key
+     */
+    key?: Key;
+    /**
+     * @remarks
+     * Whether suppress warnings outputted when localization fails
+     */
+    missingWarn?: boolean;
+    /**
+     * @remarks
+     * Whether do resolve on format keys when your language lacks a formatting for a key
+     */
+    fallbackWarn?: boolean;
+    /**
+     * @remarks
+     * Whether to use [Intel.NumberFormat#formatToParts](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/formatToParts)
+     */
+    part?: boolean;
+}
+
+/**
+ * Parse a string path into an array of segments
+ */
+export declare function parse(path: Path): string[] | undefined;
+
+/* Excluded from this release type: parseDateTimeArgs */
+
+/* Excluded from this release type: parseNumberArgs */
+
+/* Excluded from this release type: parseTranslateArgs */
+
+/** @VueI18nGeneral */
+export declare type Path = string;
+
+/** @VueI18nGeneral */
+export declare type PathValue = string | number | boolean | Function | null | {
+    [key: string]: PathValue;
+} | PathValue[];
+
+export declare type PickupFallbackLocales<T extends any[]> = T[number] | `${T[number]}!`;
+
+export declare type PickupFormatKeys<T extends Record<string, any>, K = keyof T> = K extends string ? ResourceFormatPath<T[K]> : never;
+
+export declare type PickupFormatPathKeys<T extends object> = ResourceFormatPath<T>;
+
+export declare type PickupKeys<T extends Record<string, any>, K = keyof T> = K extends string ? ResourcePath<T[K]> : never;
+
+export declare type PickupLocales<T extends Record<string, any>, K = keyof T> = K extends string ? K : never;
+
+export declare type PickupPaths<T extends object> = ResourcePath<T>;
+
+export declare type PluralizationProps = {
+    n?: number;
+    count?: number;
+};
+
+export declare type PluralizationRule = (choice: number, choicesLength: number, orgRule?: PluralizationRule) => number;
+
+/** @VueI18nGeneral */
+export declare type PluralizationRules = {
+    [locale: string]: PluralizationRule;
+};
+
+/** @VueI18nGeneral */
+export declare type PostTranslationHandler<Message = string> = (translated: MessageFunctionReturn<Message>, key: string) => MessageFunctionReturn<Message>;
+
+/**
+ * Register the locale fallbacker
+ *
+ * @param fallbacker - A {@link LocaleFallbacker} function
+ *
+ * @VueI18nGeneral
+ */
+export declare function registerLocaleFallbacker(fallbacker: LocaleFallbacker): void;
+
+export declare function registerMessageCompiler<Message>(compiler: MessageCompiler<Message, string | ResourceNode>): void;
+
+/**
+ * Register the message resolver
+ *
+ * @param resolver - A {@link MessageResolver} function
+ *
+ * @VueI18nGeneral
+ */
+export declare function registerMessageResolver(resolver: MessageResolver): void;
+
+export declare type RemovedIndexResources<T> = RemoveIndexSignature<{
+    [K in keyof T]: T[K];
+}>;
+
+export declare type RemoveIndexSignature<T> = {
+    [K in keyof T as string extends K ? never : number extends K ? never : K]: T[K];
+};
+
+/* Excluded from this release type: resolveLocale */
+
+/**
+ * message resolver
+ *
+ * @remarks
+ * Resolves messages. messages with a hierarchical structure such as objects can be resolved. This resolver is used in VueI18n as default.
+ *
+ * @param obj - A target object to be resolved with path
+ * @param path - A {@link Path | path} to resolve the value of message
+ *
+ * @returns A resolved {@link PathValue | path value}
+ *
+ * @VueI18nGeneral
+ */
+export declare function resolveValue(obj: unknown, path: Path): PathValue;
+
+/**
+ * key-value message resolver
+ *
+ * @remarks
+ * Resolves messages with the key-value structure. Note that messages with a hierarchical structure such as objects cannot be resolved
+ *
+ * @param obj - A target object to be resolved with path
+ * @param path - A {@link Path | path} to resolve the value of message
+ *
+ * @returns A resolved {@link PathValue | path value}
+ *
+ * @VueI18nGeneral
+ */
+export declare function resolveWithKeyValue(obj: unknown, path: Path): PathValue;
+
+export declare type ResourceFormatPath<T> = _ResourceFormatPath<T> extends string | keyof T ? _ResourceFormatPath<T> : keyof T;
+
+declare type _ResourceFormatPath<T> = __ResourceFormatPath<T, keyof T> | keyof T;
+export { ResourceNode }
+
+export declare type ResourcePath<T> = _ResourcePath<T> extends string | keyof T ? _ResourcePath<T> : keyof T;
+
+export declare type _ResourcePath<T> = __ResourcePath<T, keyof T> | keyof T;
+
+export declare type ResourceValue<T, P extends ResourcePath<T>> = P extends `${infer Key}.${infer Rest}` ? Key extends keyof T ? Rest extends ResourcePath<T[Key]> ? ResourceValue<T[Key], Rest> : never : never : P extends keyof T ? T[P] : never;
+
+export declare type SchemaParams<T, Message = string> = T extends readonly any[] ? {
+    message: First<T>;
+    datetime: DateTimeFormat;
+    number: NumberFormat;
+} : T extends {
+    message?: infer M;
+    datetime?: infer D;
+    number?: infer N;
+} ? {
+    message: M extends LocaleMessage<Message> ? M : LocaleMessage<Message>;
+    datetime: D extends DateTimeFormat ? D : DateTimeFormat;
+    number: N extends NumberFormat ? N : NumberFormat;
+} : {
+    message: LocaleMessage<Message>;
+    datetime: DateTimeFormat;
+    number: NumberFormat;
+};
+
+export declare const setAdditionalMeta: (meta: MetaInfo | null) => void;
+
+export declare function setDevToolsHook(hook: IntlifyDevToolsEmitter | null): void;
+
+export declare const setFallbackContext: (context: CoreContext | null) => void;
+
+export declare interface SpecificDateTimeFormatOptions extends Intl.DateTimeFormatOptions {
+    year?: DateTimeDigital;
+    month?: DateTimeDigital | DateTimeHumanReadable;
+    day?: DateTimeDigital;
+    hour?: DateTimeDigital;
+    minute?: DateTimeDigital;
+    second?: DateTimeDigital;
+    weekday?: DateTimeHumanReadable;
+    era?: DateTimeHumanReadable;
+    timeZoneName?: 'long' | 'short';
+    localeMatcher?: LocaleMatcher;
+    formatMatcher?: FormatMatcher;
+}
+
+export declare interface SpecificNumberFormatOptions extends Intl.NumberFormatOptions {
+    style?: 'decimal' | 'percent';
+    currency?: string;
+    currencyDisplay?: CurrencyDisplay;
+    localeMatcher?: LocaleMatcher;
+    formatMatcher?: FormatMatcher;
+}
+
+declare type StringConvertable<T> = ExtractToStringKey<T> extends never ? unknown : ExtractToStringFunction<T> extends (...args: any) => string ? T : unknown;
+
+/**
+ * TODO:
+ *  this type should be used (refactored) at `translate` type definition
+ *  (Unfortunately, using this type will result in key completion failure due to type mismatch...)
+ */
+/**
+ * `translate` function overloads
+ */
+export declare function translate<Context extends CoreContext<Message>, Key extends string = string, DefinedLocaleMessage extends RemovedIndexResources<DefineCoreLocaleMessage> = RemovedIndexResources<DefineCoreLocaleMessage>, CoreMessages = IsEmptyObject<DefinedLocaleMessage> extends false ? PickupPaths<{
+    [K in keyof DefinedLocaleMessage]: DefinedLocaleMessage[K];
+}> : never, ContextMessages = IsEmptyObject<Context['messages']> extends false ? PickupKeys<Context['messages']> : never, ResourceKeys extends CoreMessages | ContextMessages = IsNever<CoreMessages> extends false ? IsNever<ContextMessages> extends false ? CoreMessages | ContextMessages : CoreMessages : IsNever<ContextMessages> extends false ? ContextMessages : never, Message = string>(context: Context, key: Key | ResourceKeys | number | MessageFunction<Message>, plural: number): MessageFunctionReturn<Message> | number;
+
+export declare function translate<Context extends CoreContext<Message, {}, {}, {}>, Key extends string = string, DefinedLocaleMessage extends RemovedIndexResources<DefineCoreLocaleMessage> = RemovedIndexResources<DefineCoreLocaleMessage>, CoreMessages = IsEmptyObject<DefinedLocaleMessage> extends false ? PickupPaths<{
+    [K in keyof DefinedLocaleMessage]: DefinedLocaleMessage[K];
+}> : never, ContextMessages = IsEmptyObject<Context['messages']> extends false ? PickupKeys<Context['messages']> : never, ResourceKeys extends CoreMessages | ContextMessages = IsNever<CoreMessages> extends false ? IsNever<ContextMessages> extends false ? CoreMessages | ContextMessages : CoreMessages : IsNever<ContextMessages> extends false ? ContextMessages : never, Message = string>(context: Context, key: Key | ResourceKeys | number | MessageFunction<Message>): MessageFunctionReturn<Message> | number;
+
+export declare function translate<Context extends CoreContext<Message, {}, {}, {}>, Key extends string = string, DefinedLocaleMessage extends RemovedIndexResources<DefineCoreLocaleMessage> = RemovedIndexResources<DefineCoreLocaleMessage>, CoreMessages = IsEmptyObject<DefinedLocaleMessage> extends false ? PickupPaths<{
+    [K in keyof DefinedLocaleMessage]: DefinedLocaleMessage[K];
+}> : never, ContextMessages = IsEmptyObject<Context['messages']> extends false ? PickupKeys<Context['messages']> : never, ResourceKeys extends CoreMessages | ContextMessages = IsNever<CoreMessages> extends false ? IsNever<ContextMessages> extends false ? CoreMessages | ContextMessages : CoreMessages : IsNever<ContextMessages> extends false ? ContextMessages : never, Message = string>(context: Context, key: Key | ResourceKeys | number | MessageFunction<Message>, plural: number): MessageFunctionReturn<Message> | number;
+
+export declare function translate<Context extends CoreContext<Message, {}, {}, {}>, Key extends string = string, DefinedLocaleMessage extends RemovedIndexResources<DefineCoreLocaleMessage> = RemovedIndexResources<DefineCoreLocaleMessage>, CoreMessages = IsEmptyObject<DefinedLocaleMessage> extends false ? PickupPaths<{
+    [K in keyof DefinedLocaleMessage]: DefinedLocaleMessage[K];
+}> : never, ContextMessages = IsEmptyObject<Context['messages']> extends false ? PickupKeys<Context['messages']> : never, ResourceKeys extends CoreMessages | ContextMessages = IsNever<CoreMessages> extends false ? IsNever<ContextMessages> extends false ? CoreMessages | ContextMessages : CoreMessages : IsNever<ContextMessages> extends false ? ContextMessages : never, Message = string>(context: Context, key: Key | ResourceKeys | number | MessageFunction<Message>, plural: number, options: TranslateOptions<Context['locale']>): MessageFunctionReturn<Message> | number;
+
+export declare function translate<Context extends CoreContext<Message, {}, {}, {}>, Key extends string = string, DefinedLocaleMessage extends RemovedIndexResources<DefineCoreLocaleMessage> = RemovedIndexResources<DefineCoreLocaleMessage>, CoreMessages = IsEmptyObject<DefinedLocaleMessage> extends false ? PickupPaths<{
+    [K in keyof DefinedLocaleMessage]: DefinedLocaleMessage[K];
+}> : never, ContextMessages = IsEmptyObject<Context['messages']> extends false ? PickupKeys<Context['messages']> : never, ResourceKeys extends CoreMessages | ContextMessages = IsNever<CoreMessages> extends false ? IsNever<ContextMessages> extends false ? CoreMessages | ContextMessages : CoreMessages : IsNever<ContextMessages> extends false ? ContextMessages : never, Message = string>(context: Context, key: Key | ResourceKeys | number | MessageFunction<Message>, defaultMsg: string): MessageFunctionReturn<Message> | number;
+
+export declare function translate<Context extends CoreContext<Message, {}, {}, {}>, Key extends string = string, DefinedLocaleMessage extends RemovedIndexResources<DefineCoreLocaleMessage> = RemovedIndexResources<DefineCoreLocaleMessage>, CoreMessages = IsEmptyObject<DefinedLocaleMessage> extends false ? PickupPaths<{
+    [K in keyof DefinedLocaleMessage]: DefinedLocaleMessage[K];
+}> : never, ContextMessages = IsEmptyObject<Context['messages']> extends false ? PickupKeys<Context['messages']> : never, ResourceKeys extends CoreMessages | ContextMessages = IsNever<CoreMessages> extends false ? IsNever<ContextMessages> extends false ? CoreMessages | ContextMessages : CoreMessages : IsNever<ContextMessages> extends false ? ContextMessages : never, Message = string>(context: Context, key: Key | ResourceKeys | number | MessageFunction<Message>, defaultMsg: string, options: TranslateOptions<Context['locale']>): MessageFunctionReturn<Message> | number;
+
+export declare function translate<Context extends CoreContext<Message, {}, {}, {}>, Key extends string = string, DefinedLocaleMessage extends RemovedIndexResources<DefineCoreLocaleMessage> = RemovedIndexResources<DefineCoreLocaleMessage>, CoreMessages = IsEmptyObject<DefinedLocaleMessage> extends false ? PickupPaths<{
+    [K in keyof DefinedLocaleMessage]: DefinedLocaleMessage[K];
+}> : never, ContextMessages = IsEmptyObject<Context['messages']> extends false ? PickupKeys<Context['messages']> : never, ResourceKeys extends CoreMessages | ContextMessages = IsNever<CoreMessages> extends false ? IsNever<ContextMessages> extends false ? CoreMessages | ContextMessages : CoreMessages : IsNever<ContextMessages> extends false ? ContextMessages : never, Message = string>(context: Context, key: Key | ResourceKeys | number | MessageFunction<Message>, list: unknown[]): MessageFunctionReturn<Message> | number;
+
+export declare function translate<Context extends CoreContext<Message, {}, {}, {}>, Key extends string = string, DefinedLocaleMessage extends RemovedIndexResources<DefineCoreLocaleMessage> = RemovedIndexResources<DefineCoreLocaleMessage>, CoreMessages = IsEmptyObject<DefinedLocaleMessage> extends false ? PickupPaths<{
+    [K in keyof DefinedLocaleMessage]: DefinedLocaleMessage[K];
+}> : never, ContextMessages = IsEmptyObject<Context['messages']> extends false ? PickupKeys<Context['messages']> : never, ResourceKeys extends CoreMessages | ContextMessages = IsNever<CoreMessages> extends false ? IsNever<ContextMessages> extends false ? CoreMessages | ContextMessages : CoreMessages : IsNever<ContextMessages> extends false ? ContextMessages : never, Message = string>(context: Context, key: Key | ResourceKeys | number | MessageFunction<Message>, list: unknown[], plural: number): MessageFunctionReturn<Message> | number;
+
+export declare function translate<Context extends CoreContext<Message, {}, {}, {}>, Key extends string = string, DefinedLocaleMessage extends RemovedIndexResources<DefineCoreLocaleMessage> = RemovedIndexResources<DefineCoreLocaleMessage>, CoreMessages = IsEmptyObject<DefinedLocaleMessage> extends false ? PickupPaths<{
+    [K in keyof DefinedLocaleMessage]: DefinedLocaleMessage[K];
+}> : never, ContextMessages = IsEmptyObject<Context['messages']> extends false ? PickupKeys<Context['messages']> : never, ResourceKeys extends CoreMessages | ContextMessages = IsNever<CoreMessages> extends false ? IsNever<ContextMessages> extends false ? CoreMessages | ContextMessages : CoreMessages : IsNever<ContextMessages> extends false ? ContextMessages : never, Message = string>(context: Context, key: Key | ResourceKeys | number | MessageFunction<Message>, list: unknown[], defaultMsg: string): MessageFunctionReturn<Message> | number;
+
+export declare function translate<Context extends CoreContext<Message, {}, {}, {}>, Key extends string = string, DefinedLocaleMessage extends RemovedIndexResources<DefineCoreLocaleMessage> = RemovedIndexResources<DefineCoreLocaleMessage>, CoreMessages = IsEmptyObject<DefinedLocaleMessage> extends false ? PickupPaths<{
+    [K in keyof DefinedLocaleMessage]: DefinedLocaleMessage[K];
+}> : never, ContextMessages = IsEmptyObject<Context['messages']> extends false ? PickupKeys<Context['messages']> : never, ResourceKeys extends CoreMessages | ContextMessages = IsNever<CoreMessages> extends false ? IsNever<ContextMessages> extends false ? CoreMessages | ContextMessages : CoreMessages : IsNever<ContextMessages> extends false ? ContextMessages : never, Message = string>(context: Context, key: Key | ResourceKeys | number | MessageFunction<Message>, list: unknown[], options: TranslateOptions<Context['locale']>): MessageFunctionReturn<Message> | number;
+
+export declare function translate<Context extends CoreContext<Message, {}, {}, {}>, Key extends string = string, DefinedLocaleMessage extends RemovedIndexResources<DefineCoreLocaleMessage> = RemovedIndexResources<DefineCoreLocaleMessage>, CoreMessages = IsEmptyObject<DefinedLocaleMessage> extends false ? PickupPaths<{
+    [K in keyof DefinedLocaleMessage]: DefinedLocaleMessage[K];
+}> : never, ContextMessages = IsEmptyObject<Context['messages']> extends false ? PickupKeys<Context['messages']> : never, ResourceKeys extends CoreMessages | ContextMessages = IsNever<CoreMessages> extends false ? IsNever<ContextMessages> extends false ? CoreMessages | ContextMessages : CoreMessages : IsNever<ContextMessages> extends false ? ContextMessages : never, Message = string>(context: Context, key: Key | ResourceKeys | number | MessageFunction<Message>, named: NamedValue): MessageFunctionReturn<Message> | number;
+
+export declare function translate<Context extends CoreContext<Message, {}, {}, {}>, Key extends string = string, DefinedLocaleMessage extends RemovedIndexResources<DefineCoreLocaleMessage> = RemovedIndexResources<DefineCoreLocaleMessage>, CoreMessages = IsEmptyObject<DefinedLocaleMessage> extends false ? PickupPaths<{
+    [K in keyof DefinedLocaleMessage]: DefinedLocaleMessage[K];
+}> : never, ContextMessages = IsEmptyObject<Context['messages']> extends false ? PickupKeys<Context['messages']> : never, ResourceKeys extends CoreMessages | ContextMessages = IsNever<CoreMessages> extends false ? IsNever<ContextMessages> extends false ? CoreMessages | ContextMessages : CoreMessages : IsNever<ContextMessages> extends false ? ContextMessages : never, Message = string>(context: Context, key: Key | ResourceKeys | number | MessageFunction<Message>, named: NamedValue, plural: number): MessageFunctionReturn<Message> | number;
+
+export declare function translate<Context extends CoreContext<Message, {}, {}, {}>, Key extends string = string, DefinedLocaleMessage extends RemovedIndexResources<DefineCoreLocaleMessage> = RemovedIndexResources<DefineCoreLocaleMessage>, CoreMessages = IsEmptyObject<DefinedLocaleMessage> extends false ? PickupPaths<{
+    [K in keyof DefinedLocaleMessage]: DefinedLocaleMessage[K];
+}> : never, ContextMessages = IsEmptyObject<Context['messages']> extends false ? PickupKeys<Context['messages']> : never, ResourceKeys extends CoreMessages | ContextMessages = IsNever<CoreMessages> extends false ? IsNever<ContextMessages> extends false ? CoreMessages | ContextMessages : CoreMessages : IsNever<ContextMessages> extends false ? ContextMessages : never, Message = string>(context: Context, key: Key | ResourceKeys | number | MessageFunction<Message>, named: NamedValue, defaultMsg: string): MessageFunctionReturn<Message> | number;
+
+export declare function translate<Context extends CoreContext<Message, {}, {}, {}>, Key extends string = string, DefinedLocaleMessage extends RemovedIndexResources<DefineCoreLocaleMessage> = RemovedIndexResources<DefineCoreLocaleMessage>, CoreMessages = IsEmptyObject<DefinedLocaleMessage> extends false ? PickupPaths<{
+    [K in keyof DefinedLocaleMessage]: DefinedLocaleMessage[K];
+}> : never, ContextMessages = IsEmptyObject<Context['messages']> extends false ? PickupKeys<Context['messages']> : never, ResourceKeys extends CoreMessages | ContextMessages = IsNever<CoreMessages> extends false ? IsNever<ContextMessages> extends false ? CoreMessages | ContextMessages : CoreMessages : IsNever<ContextMessages> extends false ? ContextMessages : never, Message = string>(context: Context, key: Key | ResourceKeys | number | MessageFunction<Message>, named: NamedValue, options: TranslateOptions<Context['locale']>): MessageFunctionReturn<Message> | number;
+
+export declare const translateDevTools: (payloads: IntlifyDevToolsHookPayloads[IntlifyDevToolsHooks]) => void | null;
+
+/**
+ *  # translate
+ *
+ *  ## usages:
+ *    // for example, locale messages key
+ *    { 'foo.bar': 'hi {0} !' or 'hi {name} !' }
+ *
+ *    // no argument, context & path only
+ *    translate(context, 'foo.bar')
+ *
+ *    // list argument
+ *    translate(context, 'foo.bar', ['kazupon'])
+ *
+ *    // named argument
+ *    translate(context, 'foo.bar', { name: 'kazupon' })
+ *
+ *    // plural choice number
+ *    translate(context, 'foo.bar', 2)
+ *
+ *    // plural choice number with name argument
+ *    translate(context, 'foo.bar', { name: 'kazupon' }, 2)
+ *
+ *    // default message argument
+ *    translate(context, 'foo.bar', 'this is default message')
+ *
+ *    // default message with named argument
+ *    translate(context, 'foo.bar', { name: 'kazupon' }, 'Hello {name} !')
+ *
+ *    // use key as default message
+ *    translate(context, 'hi {0} !', ['kazupon'], { default: true })
+ *
+ *    // locale option, override context.locale
+ *    translate(context, 'foo.bar', { name: 'kazupon' }, { locale: 'ja' })
+ *
+ *    // suppress localize miss warning option, override context.missingWarn
+ *    translate(context, 'foo.bar', { name: 'kazupon' }, { missingWarn: false })
+ *
+ *    // suppress localize fallback warning option, override context.fallbackWarn
+ *    translate(context, 'foo.bar', { name: 'kazupon' }, { fallbackWarn: false })
+ *
+ *    // escape parameter option, override context.escapeParameter
+ *    translate(context, 'foo.bar', { name: 'kazupon' }, { escapeParameter: true })
+ */
+/**
+ * Translate Options
+ *
+ * @remarks
+ * Options for Translation API
+ *
+ * @VueI18nGeneral
+ */
+export declare interface TranslateOptions<Locales = Locale> extends LocaleOptions<Locales> {
+    /**
+     * @remarks
+     * List interpolation
+     */
+    list?: unknown[];
+    /**
+     * @remarks
+     * Named interpolation
+     */
+    named?: NamedValue;
+    /**
+     * @remarks
+     * Plulralzation choice number
+     */
+    plural?: number;
+    /**
+     * @remarks
+     * Default message when is occurred translation missing
+     */
+    default?: string | boolean;
+    /**
+     * @remarks
+     * Whether suppress warnings outputted when localization fails
+     */
+    missingWarn?: boolean;
+    /**
+     * @remarks
+     * Whether do template interpolation on translation keys when your language lacks a translation for a key
+     */
+    fallbackWarn?: boolean;
+    /**
+     * @remarks
+     * Whether do escape parameter for list or named interpolation values
+     */
+    escapeParameter?: boolean;
+    /**
+     * @remarks
+     * Whether the message has been resolved
+     */
+    resolvedMessage?: boolean;
+}
+
+export declare type UnionToIntersection<U> = (U extends any ? (arg: U) => void : never) extends (arg: infer I) => void ? I : never;
+
+export declare type UnionToTuple<U, Last = LastInUnion<U>> = [U] extends [never] ? [] : [...UnionToTuple<Exclude<U, Last>>, Last];
+
+/* Excluded from this release type: updateFallbackLocale */
+
+/* Excluded from this release type: VERSION */
+
+declare type VueDevToolsEmitter = Emittable<VueDevToolsEmitterEvents>;
+
+declare type VueDevToolsEmitterEvents = {
+    [VueDevToolsTimelineEvents.COMPILE_ERROR]: VueDevToolsTimelineEventPayloads[VueDevToolsTimelineEvents.COMPILE_ERROR];
+    [VueDevToolsTimelineEvents.MISSING]: VueDevToolsTimelineEventPayloads[VueDevToolsTimelineEvents.MISSING];
+    [VueDevToolsTimelineEvents.FALBACK]: VueDevToolsTimelineEventPayloads[VueDevToolsTimelineEvents.FALBACK];
+    [VueDevToolsTimelineEvents.MESSAGE_RESOLVE]: VueDevToolsTimelineEventPayloads[VueDevToolsTimelineEvents.MESSAGE_RESOLVE];
+    [VueDevToolsTimelineEvents.MESSAGE_COMPILATION]: VueDevToolsTimelineEventPayloads[VueDevToolsTimelineEvents.MESSAGE_COMPILATION];
+    [VueDevToolsTimelineEvents.MESSAGE_EVALUATION]: VueDevToolsTimelineEventPayloads[VueDevToolsTimelineEvents.MESSAGE_EVALUATION];
+};
+
+declare type VueDevToolsTimelineEventPayloads = {
+    [VueDevToolsTimelineEvents.COMPILE_ERROR]: {
+        message: string;
+        error: string;
+        start?: number;
+        end?: number;
+        groupId?: string;
+    };
+    [VueDevToolsTimelineEvents.MISSING]: {
+        locale: Locale_2;
+        key: Path_2;
+        type: CoreMissingType_2;
+        groupId?: string;
+    };
+    [VueDevToolsTimelineEvents.FALBACK]: {
+        key: Path_2;
+        type: CoreMissingType_2;
+        from?: Locale_2;
+        to: Locale_2 | 'global';
+        groupId?: string;
+    };
+    [VueDevToolsTimelineEvents.MESSAGE_RESOLVE]: {
+        type: VueDevToolsTimelineEvents.MESSAGE_RESOLVE;
+        key: Path_2;
+        message: PathValue_2;
+        time: number;
+        groupId?: string;
+    };
+    [VueDevToolsTimelineEvents.MESSAGE_COMPILATION]: {
+        type: VueDevToolsTimelineEvents.MESSAGE_COMPILATION;
+        message: string | ResourceNode_2 | MessageFunction_2;
+        time: number;
+        groupId?: string;
+    };
+    [VueDevToolsTimelineEvents.MESSAGE_EVALUATION]: {
+        type: VueDevToolsTimelineEvents.MESSAGE_EVALUATION;
+        value: unknown;
+        time: number;
+        groupId?: string;
+    };
+};
+
+declare const enum VueDevToolsTimelineEvents {
+    COMPILE_ERROR = "compile-error",
+    MISSING = "missing",
+    FALBACK = "fallback",
+    MESSAGE_RESOLVE = "message-resolve",
+    MESSAGE_COMPILATION = "message-compilation",
+    MESSAGE_EVALUATION = "message-evaluation"
+}
+
+export { }

+ 3538 - 0
node_modules/@intlify/core-base/dist/core-base.esm-browser.js

@@ -0,0 +1,3538 @@
+/*!
+  * core-base v9.13.1
+  * (c) 2024 kazuya kawaguchi
+  * Released under the MIT License.
+  */
+/**
+ * Original Utilities
+ * written by kazuya kawaguchi
+ */
+const inBrowser = typeof window !== 'undefined';
+let mark;
+let measure;
+{
+    const perf = inBrowser && window.performance;
+    if (perf &&
+        perf.mark &&
+        perf.measure &&
+        perf.clearMarks &&
+        // @ts-ignore browser compat
+        perf.clearMeasures) {
+        mark = (tag) => {
+            perf.mark(tag);
+        };
+        measure = (name, startTag, endTag) => {
+            perf.measure(name, startTag, endTag);
+            perf.clearMarks(startTag);
+            perf.clearMarks(endTag);
+        };
+    }
+}
+const RE_ARGS = /\{([0-9a-zA-Z]+)\}/g;
+/* eslint-disable */
+function format$1(message, ...args) {
+    if (args.length === 1 && isObject(args[0])) {
+        args = args[0];
+    }
+    if (!args || !args.hasOwnProperty) {
+        args = {};
+    }
+    return message.replace(RE_ARGS, (match, identifier) => {
+        return args.hasOwnProperty(identifier) ? args[identifier] : '';
+    });
+}
+const generateFormatCacheKey = (locale, key, source) => friendlyJSONstringify({ l: locale, k: key, s: source });
+const friendlyJSONstringify = (json) => JSON.stringify(json)
+    .replace(/\u2028/g, '\\u2028')
+    .replace(/\u2029/g, '\\u2029')
+    .replace(/\u0027/g, '\\u0027');
+const isNumber = (val) => typeof val === 'number' && isFinite(val);
+const isDate = (val) => toTypeString(val) === '[object Date]';
+const isRegExp = (val) => toTypeString(val) === '[object RegExp]';
+const isEmptyObject = (val) => isPlainObject(val) && Object.keys(val).length === 0;
+const assign = Object.assign;
+function escapeHtml(rawText) {
+    return rawText
+        .replace(/</g, '&lt;')
+        .replace(/>/g, '&gt;')
+        .replace(/"/g, '&quot;')
+        .replace(/'/g, '&apos;');
+}
+/* eslint-enable */
+/**
+ * Useful Utilities By Evan you
+ * Modified by kazuya kawaguchi
+ * MIT License
+ * https://github.com/vuejs/vue-next/blob/master/packages/shared/src/index.ts
+ * https://github.com/vuejs/vue-next/blob/master/packages/shared/src/codeframe.ts
+ */
+const isArray = Array.isArray;
+const isFunction = (val) => typeof val === 'function';
+const isString = (val) => typeof val === 'string';
+const isBoolean = (val) => typeof val === 'boolean';
+// eslint-disable-next-line @typescript-eslint/no-explicit-any
+const isObject = (val) => val !== null && typeof val === 'object';
+// eslint-disable-next-line @typescript-eslint/no-explicit-any
+const isPromise = (val) => {
+    return isObject(val) && isFunction(val.then) && isFunction(val.catch);
+};
+const objectToString = Object.prototype.toString;
+const toTypeString = (value) => objectToString.call(value);
+const isPlainObject = (val) => {
+    if (!isObject(val))
+        return false;
+    const proto = Object.getPrototypeOf(val);
+    return proto === null || proto.constructor === Object;
+};
+// for converting list and named values to displayed strings.
+const toDisplayString = (val) => {
+    return val == null
+        ? ''
+        : isArray(val) || (isPlainObject(val) && val.toString === objectToString)
+            ? JSON.stringify(val, null, 2)
+            : String(val);
+};
+function join(items, separator = '') {
+    return items.reduce((str, item, index) => (index === 0 ? str + item : str + separator + item), '');
+}
+const RANGE = 2;
+function generateCodeFrame(source, start = 0, end = source.length) {
+    const lines = source.split(/\r?\n/);
+    let count = 0;
+    const res = [];
+    for (let i = 0; i < lines.length; i++) {
+        count += lines[i].length + 1;
+        if (count >= start) {
+            for (let j = i - RANGE; j <= i + RANGE || end > count; j++) {
+                if (j < 0 || j >= lines.length)
+                    continue;
+                const line = j + 1;
+                res.push(`${line}${' '.repeat(3 - String(line).length)}|  ${lines[j]}`);
+                const lineLength = lines[j].length;
+                if (j === i) {
+                    // push underline
+                    const pad = start - (count - lineLength) + 1;
+                    const length = Math.max(1, end > count ? lineLength - pad : end - start);
+                    res.push(`   |  ` + ' '.repeat(pad) + '^'.repeat(length));
+                }
+                else if (j > i) {
+                    if (end > count) {
+                        const length = Math.max(Math.min(end - count, lineLength), 1);
+                        res.push(`   |  ` + '^'.repeat(length));
+                    }
+                    count += lineLength + 1;
+                }
+            }
+            break;
+        }
+    }
+    return res.join('\n');
+}
+function incrementer(code) {
+    let current = code;
+    return () => ++current;
+}
+
+function warn(msg, err) {
+    if (typeof console !== 'undefined') {
+        console.warn(`[intlify] ` + msg);
+        /* istanbul ignore if */
+        if (err) {
+            console.warn(err.stack);
+        }
+    }
+}
+const hasWarned = {};
+function warnOnce(msg) {
+    if (!hasWarned[msg]) {
+        hasWarned[msg] = true;
+        warn(msg);
+    }
+}
+
+function createPosition(line, column, offset) {
+    return { line, column, offset };
+}
+function createLocation(start, end, source) {
+    const loc = { start, end };
+    if (source != null) {
+        loc.source = source;
+    }
+    return loc;
+}
+
+const CompileWarnCodes = {
+    USE_MODULO_SYNTAX: 1,
+    __EXTEND_POINT__: 2
+};
+/** @internal */
+const warnMessages$1 = {
+    [CompileWarnCodes.USE_MODULO_SYNTAX]: `Use modulo before '{{0}}'.`
+};
+function createCompileWarn(code, loc, ...args) {
+    const msg = format$1(warnMessages$1[code] || '', ...(args || [])) ;
+    const message = { message: String(msg), code };
+    if (loc) {
+        message.location = loc;
+    }
+    return message;
+}
+
+const CompileErrorCodes = {
+    // tokenizer error codes
+    EXPECTED_TOKEN: 1,
+    INVALID_TOKEN_IN_PLACEHOLDER: 2,
+    UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER: 3,
+    UNKNOWN_ESCAPE_SEQUENCE: 4,
+    INVALID_UNICODE_ESCAPE_SEQUENCE: 5,
+    UNBALANCED_CLOSING_BRACE: 6,
+    UNTERMINATED_CLOSING_BRACE: 7,
+    EMPTY_PLACEHOLDER: 8,
+    NOT_ALLOW_NEST_PLACEHOLDER: 9,
+    INVALID_LINKED_FORMAT: 10,
+    // parser error codes
+    MUST_HAVE_MESSAGES_IN_PLURAL: 11,
+    UNEXPECTED_EMPTY_LINKED_MODIFIER: 12,
+    UNEXPECTED_EMPTY_LINKED_KEY: 13,
+    UNEXPECTED_LEXICAL_ANALYSIS: 14,
+    // generator error codes
+    UNHANDLED_CODEGEN_NODE_TYPE: 15,
+    // minifier error codes
+    UNHANDLED_MINIFIER_NODE_TYPE: 16,
+    // Special value for higher-order compilers to pick up the last code
+    // to avoid collision of error codes. This should always be kept as the last
+    // item.
+    __EXTEND_POINT__: 17
+};
+/** @internal */
+const errorMessages$1 = {
+    // tokenizer error messages
+    [CompileErrorCodes.EXPECTED_TOKEN]: `Expected token: '{0}'`,
+    [CompileErrorCodes.INVALID_TOKEN_IN_PLACEHOLDER]: `Invalid token in placeholder: '{0}'`,
+    [CompileErrorCodes.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER]: `Unterminated single quote in placeholder`,
+    [CompileErrorCodes.UNKNOWN_ESCAPE_SEQUENCE]: `Unknown escape sequence: \\{0}`,
+    [CompileErrorCodes.INVALID_UNICODE_ESCAPE_SEQUENCE]: `Invalid unicode escape sequence: {0}`,
+    [CompileErrorCodes.UNBALANCED_CLOSING_BRACE]: `Unbalanced closing brace`,
+    [CompileErrorCodes.UNTERMINATED_CLOSING_BRACE]: `Unterminated closing brace`,
+    [CompileErrorCodes.EMPTY_PLACEHOLDER]: `Empty placeholder`,
+    [CompileErrorCodes.NOT_ALLOW_NEST_PLACEHOLDER]: `Not allowed nest placeholder`,
+    [CompileErrorCodes.INVALID_LINKED_FORMAT]: `Invalid linked format`,
+    // parser error messages
+    [CompileErrorCodes.MUST_HAVE_MESSAGES_IN_PLURAL]: `Plural must have messages`,
+    [CompileErrorCodes.UNEXPECTED_EMPTY_LINKED_MODIFIER]: `Unexpected empty linked modifier`,
+    [CompileErrorCodes.UNEXPECTED_EMPTY_LINKED_KEY]: `Unexpected empty linked key`,
+    [CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS]: `Unexpected lexical analysis in token: '{0}'`,
+    // generator error messages
+    [CompileErrorCodes.UNHANDLED_CODEGEN_NODE_TYPE]: `unhandled codegen node type: '{0}'`,
+    // minimizer error messages
+    [CompileErrorCodes.UNHANDLED_MINIFIER_NODE_TYPE]: `unhandled mimifier node type: '{0}'`
+};
+function createCompileError(code, loc, options = {}) {
+    const { domain, messages, args } = options;
+    const msg = format$1((messages || errorMessages$1)[code] || '', ...(args || []))
+        ;
+    const error = new SyntaxError(String(msg));
+    error.code = code;
+    if (loc) {
+        error.location = loc;
+    }
+    error.domain = domain;
+    return error;
+}
+/** @internal */
+function defaultOnError(error) {
+    throw error;
+}
+
+// eslint-disable-next-line no-useless-escape
+const RE_HTML_TAG = /<\/?[\w\s="/.':;#-\/]+>/;
+const detectHtmlTag = (source) => RE_HTML_TAG.test(source);
+
+const CHAR_SP = ' ';
+const CHAR_CR = '\r';
+const CHAR_LF = '\n';
+const CHAR_LS = String.fromCharCode(0x2028);
+const CHAR_PS = String.fromCharCode(0x2029);
+function createScanner(str) {
+    const _buf = str;
+    let _index = 0;
+    let _line = 1;
+    let _column = 1;
+    let _peekOffset = 0;
+    const isCRLF = (index) => _buf[index] === CHAR_CR && _buf[index + 1] === CHAR_LF;
+    const isLF = (index) => _buf[index] === CHAR_LF;
+    const isPS = (index) => _buf[index] === CHAR_PS;
+    const isLS = (index) => _buf[index] === CHAR_LS;
+    const isLineEnd = (index) => isCRLF(index) || isLF(index) || isPS(index) || isLS(index);
+    const index = () => _index;
+    const line = () => _line;
+    const column = () => _column;
+    const peekOffset = () => _peekOffset;
+    const charAt = (offset) => isCRLF(offset) || isPS(offset) || isLS(offset) ? CHAR_LF : _buf[offset];
+    const currentChar = () => charAt(_index);
+    const currentPeek = () => charAt(_index + _peekOffset);
+    function next() {
+        _peekOffset = 0;
+        if (isLineEnd(_index)) {
+            _line++;
+            _column = 0;
+        }
+        if (isCRLF(_index)) {
+            _index++;
+        }
+        _index++;
+        _column++;
+        return _buf[_index];
+    }
+    function peek() {
+        if (isCRLF(_index + _peekOffset)) {
+            _peekOffset++;
+        }
+        _peekOffset++;
+        return _buf[_index + _peekOffset];
+    }
+    function reset() {
+        _index = 0;
+        _line = 1;
+        _column = 1;
+        _peekOffset = 0;
+    }
+    function resetPeek(offset = 0) {
+        _peekOffset = offset;
+    }
+    function skipToPeek() {
+        const target = _index + _peekOffset;
+        // eslint-disable-next-line no-unmodified-loop-condition
+        while (target !== _index) {
+            next();
+        }
+        _peekOffset = 0;
+    }
+    return {
+        index,
+        line,
+        column,
+        peekOffset,
+        charAt,
+        currentChar,
+        currentPeek,
+        next,
+        peek,
+        reset,
+        resetPeek,
+        skipToPeek
+    };
+}
+
+const EOF = undefined;
+const DOT = '.';
+const LITERAL_DELIMITER = "'";
+const ERROR_DOMAIN$3 = 'tokenizer';
+function createTokenizer(source, options = {}) {
+    const location = options.location !== false;
+    const _scnr = createScanner(source);
+    const currentOffset = () => _scnr.index();
+    const currentPosition = () => createPosition(_scnr.line(), _scnr.column(), _scnr.index());
+    const _initLoc = currentPosition();
+    const _initOffset = currentOffset();
+    const _context = {
+        currentType: 14 /* TokenTypes.EOF */,
+        offset: _initOffset,
+        startLoc: _initLoc,
+        endLoc: _initLoc,
+        lastType: 14 /* TokenTypes.EOF */,
+        lastOffset: _initOffset,
+        lastStartLoc: _initLoc,
+        lastEndLoc: _initLoc,
+        braceNest: 0,
+        inLinked: false,
+        text: ''
+    };
+    const context = () => _context;
+    const { onError } = options;
+    function emitError(code, pos, offset, ...args) {
+        const ctx = context();
+        pos.column += offset;
+        pos.offset += offset;
+        if (onError) {
+            const loc = location ? createLocation(ctx.startLoc, pos) : null;
+            const err = createCompileError(code, loc, {
+                domain: ERROR_DOMAIN$3,
+                args
+            });
+            onError(err);
+        }
+    }
+    function getToken(context, type, value) {
+        context.endLoc = currentPosition();
+        context.currentType = type;
+        const token = { type };
+        if (location) {
+            token.loc = createLocation(context.startLoc, context.endLoc);
+        }
+        if (value != null) {
+            token.value = value;
+        }
+        return token;
+    }
+    const getEndToken = (context) => getToken(context, 14 /* TokenTypes.EOF */);
+    function eat(scnr, ch) {
+        if (scnr.currentChar() === ch) {
+            scnr.next();
+            return ch;
+        }
+        else {
+            emitError(CompileErrorCodes.EXPECTED_TOKEN, currentPosition(), 0, ch);
+            return '';
+        }
+    }
+    function peekSpaces(scnr) {
+        let buf = '';
+        while (scnr.currentPeek() === CHAR_SP || scnr.currentPeek() === CHAR_LF) {
+            buf += scnr.currentPeek();
+            scnr.peek();
+        }
+        return buf;
+    }
+    function skipSpaces(scnr) {
+        const buf = peekSpaces(scnr);
+        scnr.skipToPeek();
+        return buf;
+    }
+    function isIdentifierStart(ch) {
+        if (ch === EOF) {
+            return false;
+        }
+        const cc = ch.charCodeAt(0);
+        return ((cc >= 97 && cc <= 122) || // a-z
+            (cc >= 65 && cc <= 90) || // A-Z
+            cc === 95 // _
+        );
+    }
+    function isNumberStart(ch) {
+        if (ch === EOF) {
+            return false;
+        }
+        const cc = ch.charCodeAt(0);
+        return cc >= 48 && cc <= 57; // 0-9
+    }
+    function isNamedIdentifierStart(scnr, context) {
+        const { currentType } = context;
+        if (currentType !== 2 /* TokenTypes.BraceLeft */) {
+            return false;
+        }
+        peekSpaces(scnr);
+        const ret = isIdentifierStart(scnr.currentPeek());
+        scnr.resetPeek();
+        return ret;
+    }
+    function isListIdentifierStart(scnr, context) {
+        const { currentType } = context;
+        if (currentType !== 2 /* TokenTypes.BraceLeft */) {
+            return false;
+        }
+        peekSpaces(scnr);
+        const ch = scnr.currentPeek() === '-' ? scnr.peek() : scnr.currentPeek();
+        const ret = isNumberStart(ch);
+        scnr.resetPeek();
+        return ret;
+    }
+    function isLiteralStart(scnr, context) {
+        const { currentType } = context;
+        if (currentType !== 2 /* TokenTypes.BraceLeft */) {
+            return false;
+        }
+        peekSpaces(scnr);
+        const ret = scnr.currentPeek() === LITERAL_DELIMITER;
+        scnr.resetPeek();
+        return ret;
+    }
+    function isLinkedDotStart(scnr, context) {
+        const { currentType } = context;
+        if (currentType !== 8 /* TokenTypes.LinkedAlias */) {
+            return false;
+        }
+        peekSpaces(scnr);
+        const ret = scnr.currentPeek() === "." /* TokenChars.LinkedDot */;
+        scnr.resetPeek();
+        return ret;
+    }
+    function isLinkedModifierStart(scnr, context) {
+        const { currentType } = context;
+        if (currentType !== 9 /* TokenTypes.LinkedDot */) {
+            return false;
+        }
+        peekSpaces(scnr);
+        const ret = isIdentifierStart(scnr.currentPeek());
+        scnr.resetPeek();
+        return ret;
+    }
+    function isLinkedDelimiterStart(scnr, context) {
+        const { currentType } = context;
+        if (!(currentType === 8 /* TokenTypes.LinkedAlias */ ||
+            currentType === 12 /* TokenTypes.LinkedModifier */)) {
+            return false;
+        }
+        peekSpaces(scnr);
+        const ret = scnr.currentPeek() === ":" /* TokenChars.LinkedDelimiter */;
+        scnr.resetPeek();
+        return ret;
+    }
+    function isLinkedReferStart(scnr, context) {
+        const { currentType } = context;
+        if (currentType !== 10 /* TokenTypes.LinkedDelimiter */) {
+            return false;
+        }
+        const fn = () => {
+            const ch = scnr.currentPeek();
+            if (ch === "{" /* TokenChars.BraceLeft */) {
+                return isIdentifierStart(scnr.peek());
+            }
+            else if (ch === "@" /* TokenChars.LinkedAlias */ ||
+                ch === "%" /* TokenChars.Modulo */ ||
+                ch === "|" /* TokenChars.Pipe */ ||
+                ch === ":" /* TokenChars.LinkedDelimiter */ ||
+                ch === "." /* TokenChars.LinkedDot */ ||
+                ch === CHAR_SP ||
+                !ch) {
+                return false;
+            }
+            else if (ch === CHAR_LF) {
+                scnr.peek();
+                return fn();
+            }
+            else {
+                // other characters
+                return isTextStart(scnr, false);
+            }
+        };
+        const ret = fn();
+        scnr.resetPeek();
+        return ret;
+    }
+    function isPluralStart(scnr) {
+        peekSpaces(scnr);
+        const ret = scnr.currentPeek() === "|" /* TokenChars.Pipe */;
+        scnr.resetPeek();
+        return ret;
+    }
+    function detectModuloStart(scnr) {
+        const spaces = peekSpaces(scnr);
+        const ret = scnr.currentPeek() === "%" /* TokenChars.Modulo */ &&
+            scnr.peek() === "{" /* TokenChars.BraceLeft */;
+        scnr.resetPeek();
+        return {
+            isModulo: ret,
+            hasSpace: spaces.length > 0
+        };
+    }
+    function isTextStart(scnr, reset = true) {
+        const fn = (hasSpace = false, prev = '', detectModulo = false) => {
+            const ch = scnr.currentPeek();
+            if (ch === "{" /* TokenChars.BraceLeft */) {
+                return prev === "%" /* TokenChars.Modulo */ ? false : hasSpace;
+            }
+            else if (ch === "@" /* TokenChars.LinkedAlias */ || !ch) {
+                return prev === "%" /* TokenChars.Modulo */ ? true : hasSpace;
+            }
+            else if (ch === "%" /* TokenChars.Modulo */) {
+                scnr.peek();
+                return fn(hasSpace, "%" /* TokenChars.Modulo */, true);
+            }
+            else if (ch === "|" /* TokenChars.Pipe */) {
+                return prev === "%" /* TokenChars.Modulo */ || detectModulo
+                    ? true
+                    : !(prev === CHAR_SP || prev === CHAR_LF);
+            }
+            else if (ch === CHAR_SP) {
+                scnr.peek();
+                return fn(true, CHAR_SP, detectModulo);
+            }
+            else if (ch === CHAR_LF) {
+                scnr.peek();
+                return fn(true, CHAR_LF, detectModulo);
+            }
+            else {
+                return true;
+            }
+        };
+        const ret = fn();
+        reset && scnr.resetPeek();
+        return ret;
+    }
+    function takeChar(scnr, fn) {
+        const ch = scnr.currentChar();
+        if (ch === EOF) {
+            return EOF;
+        }
+        if (fn(ch)) {
+            scnr.next();
+            return ch;
+        }
+        return null;
+    }
+    function isIdentifier(ch) {
+        const cc = ch.charCodeAt(0);
+        return ((cc >= 97 && cc <= 122) || // a-z
+            (cc >= 65 && cc <= 90) || // A-Z
+            (cc >= 48 && cc <= 57) || // 0-9
+            cc === 95 || // _
+            cc === 36 // $
+        );
+    }
+    function takeIdentifierChar(scnr) {
+        return takeChar(scnr, isIdentifier);
+    }
+    function isNamedIdentifier(ch) {
+        const cc = ch.charCodeAt(0);
+        return ((cc >= 97 && cc <= 122) || // a-z
+            (cc >= 65 && cc <= 90) || // A-Z
+            (cc >= 48 && cc <= 57) || // 0-9
+            cc === 95 || // _
+            cc === 36 || // $
+            cc === 45 // -
+        );
+    }
+    function takeNamedIdentifierChar(scnr) {
+        return takeChar(scnr, isNamedIdentifier);
+    }
+    function isDigit(ch) {
+        const cc = ch.charCodeAt(0);
+        return cc >= 48 && cc <= 57; // 0-9
+    }
+    function takeDigit(scnr) {
+        return takeChar(scnr, isDigit);
+    }
+    function isHexDigit(ch) {
+        const cc = ch.charCodeAt(0);
+        return ((cc >= 48 && cc <= 57) || // 0-9
+            (cc >= 65 && cc <= 70) || // A-F
+            (cc >= 97 && cc <= 102)); // a-f
+    }
+    function takeHexDigit(scnr) {
+        return takeChar(scnr, isHexDigit);
+    }
+    function getDigits(scnr) {
+        let ch = '';
+        let num = '';
+        while ((ch = takeDigit(scnr))) {
+            num += ch;
+        }
+        return num;
+    }
+    function readModulo(scnr) {
+        skipSpaces(scnr);
+        const ch = scnr.currentChar();
+        if (ch !== "%" /* TokenChars.Modulo */) {
+            emitError(CompileErrorCodes.EXPECTED_TOKEN, currentPosition(), 0, ch);
+        }
+        scnr.next();
+        return "%" /* TokenChars.Modulo */;
+    }
+    function readText(scnr) {
+        let buf = '';
+        // eslint-disable-next-line no-constant-condition
+        while (true) {
+            const ch = scnr.currentChar();
+            if (ch === "{" /* TokenChars.BraceLeft */ ||
+                ch === "}" /* TokenChars.BraceRight */ ||
+                ch === "@" /* TokenChars.LinkedAlias */ ||
+                ch === "|" /* TokenChars.Pipe */ ||
+                !ch) {
+                break;
+            }
+            else if (ch === "%" /* TokenChars.Modulo */) {
+                if (isTextStart(scnr)) {
+                    buf += ch;
+                    scnr.next();
+                }
+                else {
+                    break;
+                }
+            }
+            else if (ch === CHAR_SP || ch === CHAR_LF) {
+                if (isTextStart(scnr)) {
+                    buf += ch;
+                    scnr.next();
+                }
+                else if (isPluralStart(scnr)) {
+                    break;
+                }
+                else {
+                    buf += ch;
+                    scnr.next();
+                }
+            }
+            else {
+                buf += ch;
+                scnr.next();
+            }
+        }
+        return buf;
+    }
+    function readNamedIdentifier(scnr) {
+        skipSpaces(scnr);
+        let ch = '';
+        let name = '';
+        while ((ch = takeNamedIdentifierChar(scnr))) {
+            name += ch;
+        }
+        if (scnr.currentChar() === EOF) {
+            emitError(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE, currentPosition(), 0);
+        }
+        return name;
+    }
+    function readListIdentifier(scnr) {
+        skipSpaces(scnr);
+        let value = '';
+        if (scnr.currentChar() === '-') {
+            scnr.next();
+            value += `-${getDigits(scnr)}`;
+        }
+        else {
+            value += getDigits(scnr);
+        }
+        if (scnr.currentChar() === EOF) {
+            emitError(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE, currentPosition(), 0);
+        }
+        return value;
+    }
+    function isLiteral(ch) {
+        return ch !== LITERAL_DELIMITER && ch !== CHAR_LF;
+    }
+    function readLiteral(scnr) {
+        skipSpaces(scnr);
+        // eslint-disable-next-line no-useless-escape
+        eat(scnr, `\'`);
+        let ch = '';
+        let literal = '';
+        while ((ch = takeChar(scnr, isLiteral))) {
+            if (ch === '\\') {
+                literal += readEscapeSequence(scnr);
+            }
+            else {
+                literal += ch;
+            }
+        }
+        const current = scnr.currentChar();
+        if (current === CHAR_LF || current === EOF) {
+            emitError(CompileErrorCodes.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER, currentPosition(), 0);
+            // TODO: Is it correct really?
+            if (current === CHAR_LF) {
+                scnr.next();
+                // eslint-disable-next-line no-useless-escape
+                eat(scnr, `\'`);
+            }
+            return literal;
+        }
+        // eslint-disable-next-line no-useless-escape
+        eat(scnr, `\'`);
+        return literal;
+    }
+    function readEscapeSequence(scnr) {
+        const ch = scnr.currentChar();
+        switch (ch) {
+            case '\\':
+            case `\'`: // eslint-disable-line no-useless-escape
+                scnr.next();
+                return `\\${ch}`;
+            case 'u':
+                return readUnicodeEscapeSequence(scnr, ch, 4);
+            case 'U':
+                return readUnicodeEscapeSequence(scnr, ch, 6);
+            default:
+                emitError(CompileErrorCodes.UNKNOWN_ESCAPE_SEQUENCE, currentPosition(), 0, ch);
+                return '';
+        }
+    }
+    function readUnicodeEscapeSequence(scnr, unicode, digits) {
+        eat(scnr, unicode);
+        let sequence = '';
+        for (let i = 0; i < digits; i++) {
+            const ch = takeHexDigit(scnr);
+            if (!ch) {
+                emitError(CompileErrorCodes.INVALID_UNICODE_ESCAPE_SEQUENCE, currentPosition(), 0, `\\${unicode}${sequence}${scnr.currentChar()}`);
+                break;
+            }
+            sequence += ch;
+        }
+        return `\\${unicode}${sequence}`;
+    }
+    function isInvalidIdentifier(ch) {
+        return (ch !== "{" /* TokenChars.BraceLeft */ &&
+            ch !== "}" /* TokenChars.BraceRight */ &&
+            ch !== CHAR_SP &&
+            ch !== CHAR_LF);
+    }
+    function readInvalidIdentifier(scnr) {
+        skipSpaces(scnr);
+        let ch = '';
+        let identifiers = '';
+        while ((ch = takeChar(scnr, isInvalidIdentifier))) {
+            identifiers += ch;
+        }
+        return identifiers;
+    }
+    function readLinkedModifier(scnr) {
+        let ch = '';
+        let name = '';
+        while ((ch = takeIdentifierChar(scnr))) {
+            name += ch;
+        }
+        return name;
+    }
+    function readLinkedRefer(scnr) {
+        const fn = (buf) => {
+            const ch = scnr.currentChar();
+            if (ch === "{" /* TokenChars.BraceLeft */ ||
+                ch === "%" /* TokenChars.Modulo */ ||
+                ch === "@" /* TokenChars.LinkedAlias */ ||
+                ch === "|" /* TokenChars.Pipe */ ||
+                ch === "(" /* TokenChars.ParenLeft */ ||
+                ch === ")" /* TokenChars.ParenRight */ ||
+                !ch) {
+                return buf;
+            }
+            else if (ch === CHAR_SP) {
+                return buf;
+            }
+            else if (ch === CHAR_LF || ch === DOT) {
+                buf += ch;
+                scnr.next();
+                return fn(buf);
+            }
+            else {
+                buf += ch;
+                scnr.next();
+                return fn(buf);
+            }
+        };
+        return fn('');
+    }
+    function readPlural(scnr) {
+        skipSpaces(scnr);
+        const plural = eat(scnr, "|" /* TokenChars.Pipe */);
+        skipSpaces(scnr);
+        return plural;
+    }
+    // TODO: We need refactoring of token parsing ...
+    function readTokenInPlaceholder(scnr, context) {
+        let token = null;
+        const ch = scnr.currentChar();
+        switch (ch) {
+            case "{" /* TokenChars.BraceLeft */:
+                if (context.braceNest >= 1) {
+                    emitError(CompileErrorCodes.NOT_ALLOW_NEST_PLACEHOLDER, currentPosition(), 0);
+                }
+                scnr.next();
+                token = getToken(context, 2 /* TokenTypes.BraceLeft */, "{" /* TokenChars.BraceLeft */);
+                skipSpaces(scnr);
+                context.braceNest++;
+                return token;
+            case "}" /* TokenChars.BraceRight */:
+                if (context.braceNest > 0 &&
+                    context.currentType === 2 /* TokenTypes.BraceLeft */) {
+                    emitError(CompileErrorCodes.EMPTY_PLACEHOLDER, currentPosition(), 0);
+                }
+                scnr.next();
+                token = getToken(context, 3 /* TokenTypes.BraceRight */, "}" /* TokenChars.BraceRight */);
+                context.braceNest--;
+                context.braceNest > 0 && skipSpaces(scnr);
+                if (context.inLinked && context.braceNest === 0) {
+                    context.inLinked = false;
+                }
+                return token;
+            case "@" /* TokenChars.LinkedAlias */:
+                if (context.braceNest > 0) {
+                    emitError(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE, currentPosition(), 0);
+                }
+                token = readTokenInLinked(scnr, context) || getEndToken(context);
+                context.braceNest = 0;
+                return token;
+            default: {
+                let validNamedIdentifier = true;
+                let validListIdentifier = true;
+                let validLiteral = true;
+                if (isPluralStart(scnr)) {
+                    if (context.braceNest > 0) {
+                        emitError(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE, currentPosition(), 0);
+                    }
+                    token = getToken(context, 1 /* TokenTypes.Pipe */, readPlural(scnr));
+                    // reset
+                    context.braceNest = 0;
+                    context.inLinked = false;
+                    return token;
+                }
+                if (context.braceNest > 0 &&
+                    (context.currentType === 5 /* TokenTypes.Named */ ||
+                        context.currentType === 6 /* TokenTypes.List */ ||
+                        context.currentType === 7 /* TokenTypes.Literal */)) {
+                    emitError(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE, currentPosition(), 0);
+                    context.braceNest = 0;
+                    return readToken(scnr, context);
+                }
+                if ((validNamedIdentifier = isNamedIdentifierStart(scnr, context))) {
+                    token = getToken(context, 5 /* TokenTypes.Named */, readNamedIdentifier(scnr));
+                    skipSpaces(scnr);
+                    return token;
+                }
+                if ((validListIdentifier = isListIdentifierStart(scnr, context))) {
+                    token = getToken(context, 6 /* TokenTypes.List */, readListIdentifier(scnr));
+                    skipSpaces(scnr);
+                    return token;
+                }
+                if ((validLiteral = isLiteralStart(scnr, context))) {
+                    token = getToken(context, 7 /* TokenTypes.Literal */, readLiteral(scnr));
+                    skipSpaces(scnr);
+                    return token;
+                }
+                if (!validNamedIdentifier && !validListIdentifier && !validLiteral) {
+                    // TODO: we should be re-designed invalid cases, when we will extend message syntax near the future ...
+                    token = getToken(context, 13 /* TokenTypes.InvalidPlace */, readInvalidIdentifier(scnr));
+                    emitError(CompileErrorCodes.INVALID_TOKEN_IN_PLACEHOLDER, currentPosition(), 0, token.value);
+                    skipSpaces(scnr);
+                    return token;
+                }
+                break;
+            }
+        }
+        return token;
+    }
+    // TODO: We need refactoring of token parsing ...
+    function readTokenInLinked(scnr, context) {
+        const { currentType } = context;
+        let token = null;
+        const ch = scnr.currentChar();
+        if ((currentType === 8 /* TokenTypes.LinkedAlias */ ||
+            currentType === 9 /* TokenTypes.LinkedDot */ ||
+            currentType === 12 /* TokenTypes.LinkedModifier */ ||
+            currentType === 10 /* TokenTypes.LinkedDelimiter */) &&
+            (ch === CHAR_LF || ch === CHAR_SP)) {
+            emitError(CompileErrorCodes.INVALID_LINKED_FORMAT, currentPosition(), 0);
+        }
+        switch (ch) {
+            case "@" /* TokenChars.LinkedAlias */:
+                scnr.next();
+                token = getToken(context, 8 /* TokenTypes.LinkedAlias */, "@" /* TokenChars.LinkedAlias */);
+                context.inLinked = true;
+                return token;
+            case "." /* TokenChars.LinkedDot */:
+                skipSpaces(scnr);
+                scnr.next();
+                return getToken(context, 9 /* TokenTypes.LinkedDot */, "." /* TokenChars.LinkedDot */);
+            case ":" /* TokenChars.LinkedDelimiter */:
+                skipSpaces(scnr);
+                scnr.next();
+                return getToken(context, 10 /* TokenTypes.LinkedDelimiter */, ":" /* TokenChars.LinkedDelimiter */);
+            default:
+                if (isPluralStart(scnr)) {
+                    token = getToken(context, 1 /* TokenTypes.Pipe */, readPlural(scnr));
+                    // reset
+                    context.braceNest = 0;
+                    context.inLinked = false;
+                    return token;
+                }
+                if (isLinkedDotStart(scnr, context) ||
+                    isLinkedDelimiterStart(scnr, context)) {
+                    skipSpaces(scnr);
+                    return readTokenInLinked(scnr, context);
+                }
+                if (isLinkedModifierStart(scnr, context)) {
+                    skipSpaces(scnr);
+                    return getToken(context, 12 /* TokenTypes.LinkedModifier */, readLinkedModifier(scnr));
+                }
+                if (isLinkedReferStart(scnr, context)) {
+                    skipSpaces(scnr);
+                    if (ch === "{" /* TokenChars.BraceLeft */) {
+                        // scan the placeholder
+                        return readTokenInPlaceholder(scnr, context) || token;
+                    }
+                    else {
+                        return getToken(context, 11 /* TokenTypes.LinkedKey */, readLinkedRefer(scnr));
+                    }
+                }
+                if (currentType === 8 /* TokenTypes.LinkedAlias */) {
+                    emitError(CompileErrorCodes.INVALID_LINKED_FORMAT, currentPosition(), 0);
+                }
+                context.braceNest = 0;
+                context.inLinked = false;
+                return readToken(scnr, context);
+        }
+    }
+    // TODO: We need refactoring of token parsing ...
+    function readToken(scnr, context) {
+        let token = { type: 14 /* TokenTypes.EOF */ };
+        if (context.braceNest > 0) {
+            return readTokenInPlaceholder(scnr, context) || getEndToken(context);
+        }
+        if (context.inLinked) {
+            return readTokenInLinked(scnr, context) || getEndToken(context);
+        }
+        const ch = scnr.currentChar();
+        switch (ch) {
+            case "{" /* TokenChars.BraceLeft */:
+                return readTokenInPlaceholder(scnr, context) || getEndToken(context);
+            case "}" /* TokenChars.BraceRight */:
+                emitError(CompileErrorCodes.UNBALANCED_CLOSING_BRACE, currentPosition(), 0);
+                scnr.next();
+                return getToken(context, 3 /* TokenTypes.BraceRight */, "}" /* TokenChars.BraceRight */);
+            case "@" /* TokenChars.LinkedAlias */:
+                return readTokenInLinked(scnr, context) || getEndToken(context);
+            default: {
+                if (isPluralStart(scnr)) {
+                    token = getToken(context, 1 /* TokenTypes.Pipe */, readPlural(scnr));
+                    // reset
+                    context.braceNest = 0;
+                    context.inLinked = false;
+                    return token;
+                }
+                const { isModulo, hasSpace } = detectModuloStart(scnr);
+                if (isModulo) {
+                    return hasSpace
+                        ? getToken(context, 0 /* TokenTypes.Text */, readText(scnr))
+                        : getToken(context, 4 /* TokenTypes.Modulo */, readModulo(scnr));
+                }
+                if (isTextStart(scnr)) {
+                    return getToken(context, 0 /* TokenTypes.Text */, readText(scnr));
+                }
+                break;
+            }
+        }
+        return token;
+    }
+    function nextToken() {
+        const { currentType, offset, startLoc, endLoc } = _context;
+        _context.lastType = currentType;
+        _context.lastOffset = offset;
+        _context.lastStartLoc = startLoc;
+        _context.lastEndLoc = endLoc;
+        _context.offset = currentOffset();
+        _context.startLoc = currentPosition();
+        if (_scnr.currentChar() === EOF) {
+            return getToken(_context, 14 /* TokenTypes.EOF */);
+        }
+        return readToken(_scnr, _context);
+    }
+    return {
+        nextToken,
+        currentOffset,
+        currentPosition,
+        context
+    };
+}
+
+const ERROR_DOMAIN$2 = 'parser';
+// Backslash backslash, backslash quote, uHHHH, UHHHHHH.
+const KNOWN_ESCAPES = /(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;
+function fromEscapeSequence(match, codePoint4, codePoint6) {
+    switch (match) {
+        case `\\\\`:
+            return `\\`;
+        // eslint-disable-next-line no-useless-escape
+        case `\\\'`:
+            // eslint-disable-next-line no-useless-escape
+            return `\'`;
+        default: {
+            const codePoint = parseInt(codePoint4 || codePoint6, 16);
+            if (codePoint <= 0xd7ff || codePoint >= 0xe000) {
+                return String.fromCodePoint(codePoint);
+            }
+            // invalid ...
+            // Replace them with U+FFFD REPLACEMENT CHARACTER.
+            return '�';
+        }
+    }
+}
+function createParser(options = {}) {
+    const location = options.location !== false;
+    const { onError, onWarn } = options;
+    function emitError(tokenzer, code, start, offset, ...args) {
+        const end = tokenzer.currentPosition();
+        end.offset += offset;
+        end.column += offset;
+        if (onError) {
+            const loc = location ? createLocation(start, end) : null;
+            const err = createCompileError(code, loc, {
+                domain: ERROR_DOMAIN$2,
+                args
+            });
+            onError(err);
+        }
+    }
+    function emitWarn(tokenzer, code, start, offset, ...args) {
+        const end = tokenzer.currentPosition();
+        end.offset += offset;
+        end.column += offset;
+        if (onWarn) {
+            const loc = location ? createLocation(start, end) : null;
+            onWarn(createCompileWarn(code, loc, args));
+        }
+    }
+    function startNode(type, offset, loc) {
+        const node = { type };
+        if (location) {
+            node.start = offset;
+            node.end = offset;
+            node.loc = { start: loc, end: loc };
+        }
+        return node;
+    }
+    function endNode(node, offset, pos, type) {
+        if (type) {
+            node.type = type;
+        }
+        if (location) {
+            node.end = offset;
+            if (node.loc) {
+                node.loc.end = pos;
+            }
+        }
+    }
+    function parseText(tokenizer, value) {
+        const context = tokenizer.context();
+        const node = startNode(3 /* NodeTypes.Text */, context.offset, context.startLoc);
+        node.value = value;
+        endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());
+        return node;
+    }
+    function parseList(tokenizer, index) {
+        const context = tokenizer.context();
+        const { lastOffset: offset, lastStartLoc: loc } = context; // get brace left loc
+        const node = startNode(5 /* NodeTypes.List */, offset, loc);
+        node.index = parseInt(index, 10);
+        tokenizer.nextToken(); // skip brach right
+        endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());
+        return node;
+    }
+    function parseNamed(tokenizer, key, modulo) {
+        const context = tokenizer.context();
+        const { lastOffset: offset, lastStartLoc: loc } = context; // get brace left loc
+        const node = startNode(4 /* NodeTypes.Named */, offset, loc);
+        node.key = key;
+        if (modulo === true) {
+            node.modulo = true;
+        }
+        tokenizer.nextToken(); // skip brach right
+        endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());
+        return node;
+    }
+    function parseLiteral(tokenizer, value) {
+        const context = tokenizer.context();
+        const { lastOffset: offset, lastStartLoc: loc } = context; // get brace left loc
+        const node = startNode(9 /* NodeTypes.Literal */, offset, loc);
+        node.value = value.replace(KNOWN_ESCAPES, fromEscapeSequence);
+        tokenizer.nextToken(); // skip brach right
+        endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());
+        return node;
+    }
+    function parseLinkedModifier(tokenizer) {
+        const token = tokenizer.nextToken();
+        const context = tokenizer.context();
+        const { lastOffset: offset, lastStartLoc: loc } = context; // get linked dot loc
+        const node = startNode(8 /* NodeTypes.LinkedModifier */, offset, loc);
+        if (token.type !== 12 /* TokenTypes.LinkedModifier */) {
+            // empty modifier
+            emitError(tokenizer, CompileErrorCodes.UNEXPECTED_EMPTY_LINKED_MODIFIER, context.lastStartLoc, 0);
+            node.value = '';
+            endNode(node, offset, loc);
+            return {
+                nextConsumeToken: token,
+                node
+            };
+        }
+        // check token
+        if (token.value == null) {
+            emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));
+        }
+        node.value = token.value || '';
+        endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());
+        return {
+            node
+        };
+    }
+    function parseLinkedKey(tokenizer, value) {
+        const context = tokenizer.context();
+        const node = startNode(7 /* NodeTypes.LinkedKey */, context.offset, context.startLoc);
+        node.value = value;
+        endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());
+        return node;
+    }
+    function parseLinked(tokenizer) {
+        const context = tokenizer.context();
+        const linkedNode = startNode(6 /* NodeTypes.Linked */, context.offset, context.startLoc);
+        let token = tokenizer.nextToken();
+        if (token.type === 9 /* TokenTypes.LinkedDot */) {
+            const parsed = parseLinkedModifier(tokenizer);
+            linkedNode.modifier = parsed.node;
+            token = parsed.nextConsumeToken || tokenizer.nextToken();
+        }
+        // asset check token
+        if (token.type !== 10 /* TokenTypes.LinkedDelimiter */) {
+            emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));
+        }
+        token = tokenizer.nextToken();
+        // skip brace left
+        if (token.type === 2 /* TokenTypes.BraceLeft */) {
+            token = tokenizer.nextToken();
+        }
+        switch (token.type) {
+            case 11 /* TokenTypes.LinkedKey */:
+                if (token.value == null) {
+                    emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));
+                }
+                linkedNode.key = parseLinkedKey(tokenizer, token.value || '');
+                break;
+            case 5 /* TokenTypes.Named */:
+                if (token.value == null) {
+                    emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));
+                }
+                linkedNode.key = parseNamed(tokenizer, token.value || '');
+                break;
+            case 6 /* TokenTypes.List */:
+                if (token.value == null) {
+                    emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));
+                }
+                linkedNode.key = parseList(tokenizer, token.value || '');
+                break;
+            case 7 /* TokenTypes.Literal */:
+                if (token.value == null) {
+                    emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));
+                }
+                linkedNode.key = parseLiteral(tokenizer, token.value || '');
+                break;
+            default: {
+                // empty key
+                emitError(tokenizer, CompileErrorCodes.UNEXPECTED_EMPTY_LINKED_KEY, context.lastStartLoc, 0);
+                const nextContext = tokenizer.context();
+                const emptyLinkedKeyNode = startNode(7 /* NodeTypes.LinkedKey */, nextContext.offset, nextContext.startLoc);
+                emptyLinkedKeyNode.value = '';
+                endNode(emptyLinkedKeyNode, nextContext.offset, nextContext.startLoc);
+                linkedNode.key = emptyLinkedKeyNode;
+                endNode(linkedNode, nextContext.offset, nextContext.startLoc);
+                return {
+                    nextConsumeToken: token,
+                    node: linkedNode
+                };
+            }
+        }
+        endNode(linkedNode, tokenizer.currentOffset(), tokenizer.currentPosition());
+        return {
+            node: linkedNode
+        };
+    }
+    function parseMessage(tokenizer) {
+        const context = tokenizer.context();
+        const startOffset = context.currentType === 1 /* TokenTypes.Pipe */
+            ? tokenizer.currentOffset()
+            : context.offset;
+        const startLoc = context.currentType === 1 /* TokenTypes.Pipe */
+            ? context.endLoc
+            : context.startLoc;
+        const node = startNode(2 /* NodeTypes.Message */, startOffset, startLoc);
+        node.items = [];
+        let nextToken = null;
+        let modulo = null;
+        do {
+            const token = nextToken || tokenizer.nextToken();
+            nextToken = null;
+            switch (token.type) {
+                case 0 /* TokenTypes.Text */:
+                    if (token.value == null) {
+                        emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));
+                    }
+                    node.items.push(parseText(tokenizer, token.value || ''));
+                    break;
+                case 6 /* TokenTypes.List */:
+                    if (token.value == null) {
+                        emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));
+                    }
+                    node.items.push(parseList(tokenizer, token.value || ''));
+                    break;
+                case 4 /* TokenTypes.Modulo */:
+                    modulo = true;
+                    break;
+                case 5 /* TokenTypes.Named */:
+                    if (token.value == null) {
+                        emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));
+                    }
+                    node.items.push(parseNamed(tokenizer, token.value || '', !!modulo));
+                    if (modulo) {
+                        emitWarn(tokenizer, CompileWarnCodes.USE_MODULO_SYNTAX, context.lastStartLoc, 0, getTokenCaption(token));
+                        modulo = null;
+                    }
+                    break;
+                case 7 /* TokenTypes.Literal */:
+                    if (token.value == null) {
+                        emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));
+                    }
+                    node.items.push(parseLiteral(tokenizer, token.value || ''));
+                    break;
+                case 8 /* TokenTypes.LinkedAlias */: {
+                    const parsed = parseLinked(tokenizer);
+                    node.items.push(parsed.node);
+                    nextToken = parsed.nextConsumeToken || null;
+                    break;
+                }
+            }
+        } while (context.currentType !== 14 /* TokenTypes.EOF */ &&
+            context.currentType !== 1 /* TokenTypes.Pipe */);
+        // adjust message node loc
+        const endOffset = context.currentType === 1 /* TokenTypes.Pipe */
+            ? context.lastOffset
+            : tokenizer.currentOffset();
+        const endLoc = context.currentType === 1 /* TokenTypes.Pipe */
+            ? context.lastEndLoc
+            : tokenizer.currentPosition();
+        endNode(node, endOffset, endLoc);
+        return node;
+    }
+    function parsePlural(tokenizer, offset, loc, msgNode) {
+        const context = tokenizer.context();
+        let hasEmptyMessage = msgNode.items.length === 0;
+        const node = startNode(1 /* NodeTypes.Plural */, offset, loc);
+        node.cases = [];
+        node.cases.push(msgNode);
+        do {
+            const msg = parseMessage(tokenizer);
+            if (!hasEmptyMessage) {
+                hasEmptyMessage = msg.items.length === 0;
+            }
+            node.cases.push(msg);
+        } while (context.currentType !== 14 /* TokenTypes.EOF */);
+        if (hasEmptyMessage) {
+            emitError(tokenizer, CompileErrorCodes.MUST_HAVE_MESSAGES_IN_PLURAL, loc, 0);
+        }
+        endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());
+        return node;
+    }
+    function parseResource(tokenizer) {
+        const context = tokenizer.context();
+        const { offset, startLoc } = context;
+        const msgNode = parseMessage(tokenizer);
+        if (context.currentType === 14 /* TokenTypes.EOF */) {
+            return msgNode;
+        }
+        else {
+            return parsePlural(tokenizer, offset, startLoc, msgNode);
+        }
+    }
+    function parse(source) {
+        const tokenizer = createTokenizer(source, assign({}, options));
+        const context = tokenizer.context();
+        const node = startNode(0 /* NodeTypes.Resource */, context.offset, context.startLoc);
+        if (location && node.loc) {
+            node.loc.source = source;
+        }
+        node.body = parseResource(tokenizer);
+        if (options.onCacheKey) {
+            node.cacheKey = options.onCacheKey(source);
+        }
+        // assert whether achieved to EOF
+        if (context.currentType !== 14 /* TokenTypes.EOF */) {
+            emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, source[context.offset] || '');
+        }
+        endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());
+        return node;
+    }
+    return { parse };
+}
+function getTokenCaption(token) {
+    if (token.type === 14 /* TokenTypes.EOF */) {
+        return 'EOF';
+    }
+    const name = (token.value || '').replace(/\r?\n/gu, '\\n');
+    return name.length > 10 ? name.slice(0, 9) + '…' : name;
+}
+
+function createTransformer(ast, options = {} // eslint-disable-line
+) {
+    const _context = {
+        ast,
+        helpers: new Set()
+    };
+    const context = () => _context;
+    const helper = (name) => {
+        _context.helpers.add(name);
+        return name;
+    };
+    return { context, helper };
+}
+function traverseNodes(nodes, transformer) {
+    for (let i = 0; i < nodes.length; i++) {
+        traverseNode(nodes[i], transformer);
+    }
+}
+function traverseNode(node, transformer) {
+    // TODO: if we need pre-hook of transform, should be implemented to here
+    switch (node.type) {
+        case 1 /* NodeTypes.Plural */:
+            traverseNodes(node.cases, transformer);
+            transformer.helper("plural" /* HelperNameMap.PLURAL */);
+            break;
+        case 2 /* NodeTypes.Message */:
+            traverseNodes(node.items, transformer);
+            break;
+        case 6 /* NodeTypes.Linked */: {
+            const linked = node;
+            traverseNode(linked.key, transformer);
+            transformer.helper("linked" /* HelperNameMap.LINKED */);
+            transformer.helper("type" /* HelperNameMap.TYPE */);
+            break;
+        }
+        case 5 /* NodeTypes.List */:
+            transformer.helper("interpolate" /* HelperNameMap.INTERPOLATE */);
+            transformer.helper("list" /* HelperNameMap.LIST */);
+            break;
+        case 4 /* NodeTypes.Named */:
+            transformer.helper("interpolate" /* HelperNameMap.INTERPOLATE */);
+            transformer.helper("named" /* HelperNameMap.NAMED */);
+            break;
+    }
+    // TODO: if we need post-hook of transform, should be implemented to here
+}
+// transform AST
+function transform(ast, options = {} // eslint-disable-line
+) {
+    const transformer = createTransformer(ast);
+    transformer.helper("normalize" /* HelperNameMap.NORMALIZE */);
+    // traverse
+    ast.body && traverseNode(ast.body, transformer);
+    // set meta information
+    const context = transformer.context();
+    ast.helpers = Array.from(context.helpers);
+}
+
+function optimize(ast) {
+    const body = ast.body;
+    if (body.type === 2 /* NodeTypes.Message */) {
+        optimizeMessageNode(body);
+    }
+    else {
+        body.cases.forEach(c => optimizeMessageNode(c));
+    }
+    return ast;
+}
+function optimizeMessageNode(message) {
+    if (message.items.length === 1) {
+        const item = message.items[0];
+        if (item.type === 3 /* NodeTypes.Text */ || item.type === 9 /* NodeTypes.Literal */) {
+            message.static = item.value;
+            delete item.value; // optimization for size
+        }
+    }
+    else {
+        const values = [];
+        for (let i = 0; i < message.items.length; i++) {
+            const item = message.items[i];
+            if (!(item.type === 3 /* NodeTypes.Text */ || item.type === 9 /* NodeTypes.Literal */)) {
+                break;
+            }
+            if (item.value == null) {
+                break;
+            }
+            values.push(item.value);
+        }
+        if (values.length === message.items.length) {
+            message.static = join(values);
+            for (let i = 0; i < message.items.length; i++) {
+                const item = message.items[i];
+                if (item.type === 3 /* NodeTypes.Text */ || item.type === 9 /* NodeTypes.Literal */) {
+                    delete item.value; // optimization for size
+                }
+            }
+        }
+    }
+}
+
+const ERROR_DOMAIN$1 = 'minifier';
+/* eslint-disable @typescript-eslint/no-explicit-any */
+function minify(node) {
+    node.t = node.type;
+    switch (node.type) {
+        case 0 /* NodeTypes.Resource */: {
+            const resource = node;
+            minify(resource.body);
+            resource.b = resource.body;
+            delete resource.body;
+            break;
+        }
+        case 1 /* NodeTypes.Plural */: {
+            const plural = node;
+            const cases = plural.cases;
+            for (let i = 0; i < cases.length; i++) {
+                minify(cases[i]);
+            }
+            plural.c = cases;
+            delete plural.cases;
+            break;
+        }
+        case 2 /* NodeTypes.Message */: {
+            const message = node;
+            const items = message.items;
+            for (let i = 0; i < items.length; i++) {
+                minify(items[i]);
+            }
+            message.i = items;
+            delete message.items;
+            if (message.static) {
+                message.s = message.static;
+                delete message.static;
+            }
+            break;
+        }
+        case 3 /* NodeTypes.Text */:
+        case 9 /* NodeTypes.Literal */:
+        case 8 /* NodeTypes.LinkedModifier */:
+        case 7 /* NodeTypes.LinkedKey */: {
+            const valueNode = node;
+            if (valueNode.value) {
+                valueNode.v = valueNode.value;
+                delete valueNode.value;
+            }
+            break;
+        }
+        case 6 /* NodeTypes.Linked */: {
+            const linked = node;
+            minify(linked.key);
+            linked.k = linked.key;
+            delete linked.key;
+            if (linked.modifier) {
+                minify(linked.modifier);
+                linked.m = linked.modifier;
+                delete linked.modifier;
+            }
+            break;
+        }
+        case 5 /* NodeTypes.List */: {
+            const list = node;
+            list.i = list.index;
+            delete list.index;
+            break;
+        }
+        case 4 /* NodeTypes.Named */: {
+            const named = node;
+            named.k = named.key;
+            delete named.key;
+            break;
+        }
+        default:
+            {
+                throw createCompileError(CompileErrorCodes.UNHANDLED_MINIFIER_NODE_TYPE, null, {
+                    domain: ERROR_DOMAIN$1,
+                    args: [node.type]
+                });
+            }
+    }
+    delete node.type;
+}
+/* eslint-enable @typescript-eslint/no-explicit-any */
+
+// eslint-disable-next-line @typescript-eslint/triple-slash-reference
+/// <reference types="source-map-js" />
+const ERROR_DOMAIN = 'parser';
+function createCodeGenerator(ast, options) {
+    const { sourceMap, filename, breakLineCode, needIndent: _needIndent } = options;
+    const location = options.location !== false;
+    const _context = {
+        filename,
+        code: '',
+        column: 1,
+        line: 1,
+        offset: 0,
+        map: undefined,
+        breakLineCode,
+        needIndent: _needIndent,
+        indentLevel: 0
+    };
+    if (location && ast.loc) {
+        _context.source = ast.loc.source;
+    }
+    const context = () => _context;
+    function push(code, node) {
+        _context.code += code;
+    }
+    function _newline(n, withBreakLine = true) {
+        const _breakLineCode = withBreakLine ? breakLineCode : '';
+        push(_needIndent ? _breakLineCode + `  `.repeat(n) : _breakLineCode);
+    }
+    function indent(withNewLine = true) {
+        const level = ++_context.indentLevel;
+        withNewLine && _newline(level);
+    }
+    function deindent(withNewLine = true) {
+        const level = --_context.indentLevel;
+        withNewLine && _newline(level);
+    }
+    function newline() {
+        _newline(_context.indentLevel);
+    }
+    const helper = (key) => `_${key}`;
+    const needIndent = () => _context.needIndent;
+    return {
+        context,
+        push,
+        indent,
+        deindent,
+        newline,
+        helper,
+        needIndent
+    };
+}
+function generateLinkedNode(generator, node) {
+    const { helper } = generator;
+    generator.push(`${helper("linked" /* HelperNameMap.LINKED */)}(`);
+    generateNode(generator, node.key);
+    if (node.modifier) {
+        generator.push(`, `);
+        generateNode(generator, node.modifier);
+        generator.push(`, _type`);
+    }
+    else {
+        generator.push(`, undefined, _type`);
+    }
+    generator.push(`)`);
+}
+function generateMessageNode(generator, node) {
+    const { helper, needIndent } = generator;
+    generator.push(`${helper("normalize" /* HelperNameMap.NORMALIZE */)}([`);
+    generator.indent(needIndent());
+    const length = node.items.length;
+    for (let i = 0; i < length; i++) {
+        generateNode(generator, node.items[i]);
+        if (i === length - 1) {
+            break;
+        }
+        generator.push(', ');
+    }
+    generator.deindent(needIndent());
+    generator.push('])');
+}
+function generatePluralNode(generator, node) {
+    const { helper, needIndent } = generator;
+    if (node.cases.length > 1) {
+        generator.push(`${helper("plural" /* HelperNameMap.PLURAL */)}([`);
+        generator.indent(needIndent());
+        const length = node.cases.length;
+        for (let i = 0; i < length; i++) {
+            generateNode(generator, node.cases[i]);
+            if (i === length - 1) {
+                break;
+            }
+            generator.push(', ');
+        }
+        generator.deindent(needIndent());
+        generator.push(`])`);
+    }
+}
+function generateResource(generator, node) {
+    if (node.body) {
+        generateNode(generator, node.body);
+    }
+    else {
+        generator.push('null');
+    }
+}
+function generateNode(generator, node) {
+    const { helper } = generator;
+    switch (node.type) {
+        case 0 /* NodeTypes.Resource */:
+            generateResource(generator, node);
+            break;
+        case 1 /* NodeTypes.Plural */:
+            generatePluralNode(generator, node);
+            break;
+        case 2 /* NodeTypes.Message */:
+            generateMessageNode(generator, node);
+            break;
+        case 6 /* NodeTypes.Linked */:
+            generateLinkedNode(generator, node);
+            break;
+        case 8 /* NodeTypes.LinkedModifier */:
+            generator.push(JSON.stringify(node.value), node);
+            break;
+        case 7 /* NodeTypes.LinkedKey */:
+            generator.push(JSON.stringify(node.value), node);
+            break;
+        case 5 /* NodeTypes.List */:
+            generator.push(`${helper("interpolate" /* HelperNameMap.INTERPOLATE */)}(${helper("list" /* HelperNameMap.LIST */)}(${node.index}))`, node);
+            break;
+        case 4 /* NodeTypes.Named */:
+            generator.push(`${helper("interpolate" /* HelperNameMap.INTERPOLATE */)}(${helper("named" /* HelperNameMap.NAMED */)}(${JSON.stringify(node.key)}))`, node);
+            break;
+        case 9 /* NodeTypes.Literal */:
+            generator.push(JSON.stringify(node.value), node);
+            break;
+        case 3 /* NodeTypes.Text */:
+            generator.push(JSON.stringify(node.value), node);
+            break;
+        default:
+            {
+                throw createCompileError(CompileErrorCodes.UNHANDLED_CODEGEN_NODE_TYPE, null, {
+                    domain: ERROR_DOMAIN,
+                    args: [node.type]
+                });
+            }
+    }
+}
+// generate code from AST
+const generate = (ast, options = {} // eslint-disable-line
+) => {
+    const mode = isString(options.mode) ? options.mode : 'normal';
+    const filename = isString(options.filename)
+        ? options.filename
+        : 'message.intl';
+    const sourceMap = !!options.sourceMap;
+    // prettier-ignore
+    const breakLineCode = options.breakLineCode != null
+        ? options.breakLineCode
+        : mode === 'arrow'
+            ? ';'
+            : '\n';
+    const needIndent = options.needIndent ? options.needIndent : mode !== 'arrow';
+    const helpers = ast.helpers || [];
+    const generator = createCodeGenerator(ast, {
+        mode,
+        filename,
+        sourceMap,
+        breakLineCode,
+        needIndent
+    });
+    generator.push(mode === 'normal' ? `function __msg__ (ctx) {` : `(ctx) => {`);
+    generator.indent(needIndent);
+    if (helpers.length > 0) {
+        generator.push(`const { ${join(helpers.map(s => `${s}: _${s}`), ', ')} } = ctx`);
+        generator.newline();
+    }
+    generator.push(`return `);
+    generateNode(generator, ast);
+    generator.deindent(needIndent);
+    generator.push(`}`);
+    delete ast.helpers;
+    const { code, map } = generator.context();
+    return {
+        ast,
+        code,
+        map: map ? map.toJSON() : undefined // eslint-disable-line @typescript-eslint/no-explicit-any
+    };
+};
+
+function baseCompile$1(source, options = {}) {
+    const assignedOptions = assign({}, options);
+    const jit = !!assignedOptions.jit;
+    const enalbeMinify = !!assignedOptions.minify;
+    const enambeOptimize = assignedOptions.optimize == null ? true : assignedOptions.optimize;
+    // parse source codes
+    const parser = createParser(assignedOptions);
+    const ast = parser.parse(source);
+    if (!jit) {
+        // transform ASTs
+        transform(ast, assignedOptions);
+        // generate javascript codes
+        return generate(ast, assignedOptions);
+    }
+    else {
+        // optimize ASTs
+        enambeOptimize && optimize(ast);
+        // minimize ASTs
+        enalbeMinify && minify(ast);
+        // In JIT mode, no ast transform, no code generation.
+        return { ast, code: '' };
+    }
+}
+
+const pathStateMachine =  [];
+pathStateMachine[0 /* States.BEFORE_PATH */] = {
+    ["w" /* PathCharTypes.WORKSPACE */]: [0 /* States.BEFORE_PATH */],
+    ["i" /* PathCharTypes.IDENT */]: [3 /* States.IN_IDENT */, 0 /* Actions.APPEND */],
+    ["[" /* PathCharTypes.LEFT_BRACKET */]: [4 /* States.IN_SUB_PATH */],
+    ["o" /* PathCharTypes.END_OF_FAIL */]: [7 /* States.AFTER_PATH */]
+};
+pathStateMachine[1 /* States.IN_PATH */] = {
+    ["w" /* PathCharTypes.WORKSPACE */]: [1 /* States.IN_PATH */],
+    ["." /* PathCharTypes.DOT */]: [2 /* States.BEFORE_IDENT */],
+    ["[" /* PathCharTypes.LEFT_BRACKET */]: [4 /* States.IN_SUB_PATH */],
+    ["o" /* PathCharTypes.END_OF_FAIL */]: [7 /* States.AFTER_PATH */]
+};
+pathStateMachine[2 /* States.BEFORE_IDENT */] = {
+    ["w" /* PathCharTypes.WORKSPACE */]: [2 /* States.BEFORE_IDENT */],
+    ["i" /* PathCharTypes.IDENT */]: [3 /* States.IN_IDENT */, 0 /* Actions.APPEND */],
+    ["0" /* PathCharTypes.ZERO */]: [3 /* States.IN_IDENT */, 0 /* Actions.APPEND */]
+};
+pathStateMachine[3 /* States.IN_IDENT */] = {
+    ["i" /* PathCharTypes.IDENT */]: [3 /* States.IN_IDENT */, 0 /* Actions.APPEND */],
+    ["0" /* PathCharTypes.ZERO */]: [3 /* States.IN_IDENT */, 0 /* Actions.APPEND */],
+    ["w" /* PathCharTypes.WORKSPACE */]: [1 /* States.IN_PATH */, 1 /* Actions.PUSH */],
+    ["." /* PathCharTypes.DOT */]: [2 /* States.BEFORE_IDENT */, 1 /* Actions.PUSH */],
+    ["[" /* PathCharTypes.LEFT_BRACKET */]: [4 /* States.IN_SUB_PATH */, 1 /* Actions.PUSH */],
+    ["o" /* PathCharTypes.END_OF_FAIL */]: [7 /* States.AFTER_PATH */, 1 /* Actions.PUSH */]
+};
+pathStateMachine[4 /* States.IN_SUB_PATH */] = {
+    ["'" /* PathCharTypes.SINGLE_QUOTE */]: [5 /* States.IN_SINGLE_QUOTE */, 0 /* Actions.APPEND */],
+    ["\"" /* PathCharTypes.DOUBLE_QUOTE */]: [6 /* States.IN_DOUBLE_QUOTE */, 0 /* Actions.APPEND */],
+    ["[" /* PathCharTypes.LEFT_BRACKET */]: [
+        4 /* States.IN_SUB_PATH */,
+        2 /* Actions.INC_SUB_PATH_DEPTH */
+    ],
+    ["]" /* PathCharTypes.RIGHT_BRACKET */]: [1 /* States.IN_PATH */, 3 /* Actions.PUSH_SUB_PATH */],
+    ["o" /* PathCharTypes.END_OF_FAIL */]: 8 /* States.ERROR */,
+    ["l" /* PathCharTypes.ELSE */]: [4 /* States.IN_SUB_PATH */, 0 /* Actions.APPEND */]
+};
+pathStateMachine[5 /* States.IN_SINGLE_QUOTE */] = {
+    ["'" /* PathCharTypes.SINGLE_QUOTE */]: [4 /* States.IN_SUB_PATH */, 0 /* Actions.APPEND */],
+    ["o" /* PathCharTypes.END_OF_FAIL */]: 8 /* States.ERROR */,
+    ["l" /* PathCharTypes.ELSE */]: [5 /* States.IN_SINGLE_QUOTE */, 0 /* Actions.APPEND */]
+};
+pathStateMachine[6 /* States.IN_DOUBLE_QUOTE */] = {
+    ["\"" /* PathCharTypes.DOUBLE_QUOTE */]: [4 /* States.IN_SUB_PATH */, 0 /* Actions.APPEND */],
+    ["o" /* PathCharTypes.END_OF_FAIL */]: 8 /* States.ERROR */,
+    ["l" /* PathCharTypes.ELSE */]: [6 /* States.IN_DOUBLE_QUOTE */, 0 /* Actions.APPEND */]
+};
+/**
+ * Check if an expression is a literal value.
+ */
+const literalValueRE = /^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;
+function isLiteral(exp) {
+    return literalValueRE.test(exp);
+}
+/**
+ * Strip quotes from a string
+ */
+function stripQuotes(str) {
+    const a = str.charCodeAt(0);
+    const b = str.charCodeAt(str.length - 1);
+    return a === b && (a === 0x22 || a === 0x27) ? str.slice(1, -1) : str;
+}
+/**
+ * Determine the type of a character in a keypath.
+ */
+function getPathCharType(ch) {
+    if (ch === undefined || ch === null) {
+        return "o" /* PathCharTypes.END_OF_FAIL */;
+    }
+    const code = ch.charCodeAt(0);
+    switch (code) {
+        case 0x5b: // [
+        case 0x5d: // ]
+        case 0x2e: // .
+        case 0x22: // "
+        case 0x27: // '
+            return ch;
+        case 0x5f: // _
+        case 0x24: // $
+        case 0x2d: // -
+            return "i" /* PathCharTypes.IDENT */;
+        case 0x09: // Tab (HT)
+        case 0x0a: // Newline (LF)
+        case 0x0d: // Return (CR)
+        case 0xa0: // No-break space (NBSP)
+        case 0xfeff: // Byte Order Mark (BOM)
+        case 0x2028: // Line Separator (LS)
+        case 0x2029: // Paragraph Separator (PS)
+            return "w" /* PathCharTypes.WORKSPACE */;
+    }
+    return "i" /* PathCharTypes.IDENT */;
+}
+/**
+ * Format a subPath, return its plain form if it is
+ * a literal string or number. Otherwise prepend the
+ * dynamic indicator (*).
+ */
+function formatSubPath(path) {
+    const trimmed = path.trim();
+    // invalid leading 0
+    if (path.charAt(0) === '0' && isNaN(parseInt(path))) {
+        return false;
+    }
+    return isLiteral(trimmed)
+        ? stripQuotes(trimmed)
+        : "*" /* PathCharTypes.ASTARISK */ + trimmed;
+}
+/**
+ * Parse a string path into an array of segments
+ */
+function parse(path) {
+    const keys = [];
+    let index = -1;
+    let mode = 0 /* States.BEFORE_PATH */;
+    let subPathDepth = 0;
+    let c;
+    let key; // eslint-disable-line
+    let newChar;
+    let type;
+    let transition;
+    let action;
+    let typeMap;
+    const actions = [];
+    actions[0 /* Actions.APPEND */] = () => {
+        if (key === undefined) {
+            key = newChar;
+        }
+        else {
+            key += newChar;
+        }
+    };
+    actions[1 /* Actions.PUSH */] = () => {
+        if (key !== undefined) {
+            keys.push(key);
+            key = undefined;
+        }
+    };
+    actions[2 /* Actions.INC_SUB_PATH_DEPTH */] = () => {
+        actions[0 /* Actions.APPEND */]();
+        subPathDepth++;
+    };
+    actions[3 /* Actions.PUSH_SUB_PATH */] = () => {
+        if (subPathDepth > 0) {
+            subPathDepth--;
+            mode = 4 /* States.IN_SUB_PATH */;
+            actions[0 /* Actions.APPEND */]();
+        }
+        else {
+            subPathDepth = 0;
+            if (key === undefined) {
+                return false;
+            }
+            key = formatSubPath(key);
+            if (key === false) {
+                return false;
+            }
+            else {
+                actions[1 /* Actions.PUSH */]();
+            }
+        }
+    };
+    function maybeUnescapeQuote() {
+        const nextChar = path[index + 1];
+        if ((mode === 5 /* States.IN_SINGLE_QUOTE */ &&
+            nextChar === "'" /* PathCharTypes.SINGLE_QUOTE */) ||
+            (mode === 6 /* States.IN_DOUBLE_QUOTE */ &&
+                nextChar === "\"" /* PathCharTypes.DOUBLE_QUOTE */)) {
+            index++;
+            newChar = '\\' + nextChar;
+            actions[0 /* Actions.APPEND */]();
+            return true;
+        }
+    }
+    while (mode !== null) {
+        index++;
+        c = path[index];
+        if (c === '\\' && maybeUnescapeQuote()) {
+            continue;
+        }
+        type = getPathCharType(c);
+        typeMap = pathStateMachine[mode];
+        transition = typeMap[type] || typeMap["l" /* PathCharTypes.ELSE */] || 8 /* States.ERROR */;
+        // check parse error
+        if (transition === 8 /* States.ERROR */) {
+            return;
+        }
+        mode = transition[0];
+        if (transition[1] !== undefined) {
+            action = actions[transition[1]];
+            if (action) {
+                newChar = c;
+                if (action() === false) {
+                    return;
+                }
+            }
+        }
+        // check parse finish
+        if (mode === 7 /* States.AFTER_PATH */) {
+            return keys;
+        }
+    }
+}
+// path token cache
+const cache = new Map();
+/**
+ * key-value message resolver
+ *
+ * @remarks
+ * Resolves messages with the key-value structure. Note that messages with a hierarchical structure such as objects cannot be resolved
+ *
+ * @param obj - A target object to be resolved with path
+ * @param path - A {@link Path | path} to resolve the value of message
+ *
+ * @returns A resolved {@link PathValue | path value}
+ *
+ * @VueI18nGeneral
+ */
+function resolveWithKeyValue(obj, path) {
+    return isObject(obj) ? obj[path] : null;
+}
+/**
+ * message resolver
+ *
+ * @remarks
+ * Resolves messages. messages with a hierarchical structure such as objects can be resolved. This resolver is used in VueI18n as default.
+ *
+ * @param obj - A target object to be resolved with path
+ * @param path - A {@link Path | path} to resolve the value of message
+ *
+ * @returns A resolved {@link PathValue | path value}
+ *
+ * @VueI18nGeneral
+ */
+function resolveValue(obj, path) {
+    // check object
+    if (!isObject(obj)) {
+        return null;
+    }
+    // parse path
+    let hit = cache.get(path);
+    if (!hit) {
+        hit = parse(path);
+        if (hit) {
+            cache.set(path, hit);
+        }
+    }
+    // check hit
+    if (!hit) {
+        return null;
+    }
+    // resolve path value
+    const len = hit.length;
+    let last = obj;
+    let i = 0;
+    while (i < len) {
+        const val = last[hit[i]];
+        if (val === undefined) {
+            return null;
+        }
+        if (isFunction(last)) {
+            return null;
+        }
+        last = val;
+        i++;
+    }
+    return last;
+}
+
+const DEFAULT_MODIFIER = (str) => str;
+const DEFAULT_MESSAGE = (ctx) => ''; // eslint-disable-line
+const DEFAULT_MESSAGE_DATA_TYPE = 'text';
+const DEFAULT_NORMALIZE = (values) => values.length === 0 ? '' : join(values);
+const DEFAULT_INTERPOLATE = toDisplayString;
+function pluralDefault(choice, choicesLength) {
+    choice = Math.abs(choice);
+    if (choicesLength === 2) {
+        // prettier-ignore
+        return choice
+            ? choice > 1
+                ? 1
+                : 0
+            : 1;
+    }
+    return choice ? Math.min(choice, 2) : 0;
+}
+function getPluralIndex(options) {
+    // prettier-ignore
+    const index = isNumber(options.pluralIndex)
+        ? options.pluralIndex
+        : -1;
+    // prettier-ignore
+    return options.named && (isNumber(options.named.count) || isNumber(options.named.n))
+        ? isNumber(options.named.count)
+            ? options.named.count
+            : isNumber(options.named.n)
+                ? options.named.n
+                : index
+        : index;
+}
+function normalizeNamed(pluralIndex, props) {
+    if (!props.count) {
+        props.count = pluralIndex;
+    }
+    if (!props.n) {
+        props.n = pluralIndex;
+    }
+}
+function createMessageContext(options = {}) {
+    const locale = options.locale;
+    const pluralIndex = getPluralIndex(options);
+    const pluralRule = isObject(options.pluralRules) &&
+        isString(locale) &&
+        isFunction(options.pluralRules[locale])
+        ? options.pluralRules[locale]
+        : pluralDefault;
+    const orgPluralRule = isObject(options.pluralRules) &&
+        isString(locale) &&
+        isFunction(options.pluralRules[locale])
+        ? pluralDefault
+        : undefined;
+    const plural = (messages) => {
+        return messages[pluralRule(pluralIndex, messages.length, orgPluralRule)];
+    };
+    const _list = options.list || [];
+    const list = (index) => _list[index];
+    // eslint-disable-next-line @typescript-eslint/no-explicit-any
+    const _named = options.named || {};
+    isNumber(options.pluralIndex) && normalizeNamed(pluralIndex, _named);
+    const named = (key) => _named[key];
+    function message(key) {
+        // prettier-ignore
+        const msg = isFunction(options.messages)
+            ? options.messages(key)
+            : isObject(options.messages)
+                ? options.messages[key]
+                : false;
+        return !msg
+            ? options.parent
+                ? options.parent.message(key) // resolve from parent messages
+                : DEFAULT_MESSAGE
+            : msg;
+    }
+    const _modifier = (name) => options.modifiers
+        ? options.modifiers[name]
+        : DEFAULT_MODIFIER;
+    const normalize = isPlainObject(options.processor) && isFunction(options.processor.normalize)
+        ? options.processor.normalize
+        : DEFAULT_NORMALIZE;
+    const interpolate = isPlainObject(options.processor) &&
+        isFunction(options.processor.interpolate)
+        ? options.processor.interpolate
+        : DEFAULT_INTERPOLATE;
+    const type = isPlainObject(options.processor) && isString(options.processor.type)
+        ? options.processor.type
+        : DEFAULT_MESSAGE_DATA_TYPE;
+    const linked = (key, ...args) => {
+        const [arg1, arg2] = args;
+        let type = 'text';
+        let modifier = '';
+        if (args.length === 1) {
+            if (isObject(arg1)) {
+                modifier = arg1.modifier || modifier;
+                type = arg1.type || type;
+            }
+            else if (isString(arg1)) {
+                modifier = arg1 || modifier;
+            }
+        }
+        else if (args.length === 2) {
+            if (isString(arg1)) {
+                modifier = arg1 || modifier;
+            }
+            if (isString(arg2)) {
+                type = arg2 || type;
+            }
+        }
+        const ret = message(key)(ctx);
+        const msg = 
+        // The message in vnode resolved with linked are returned as an array by processor.nomalize
+        type === 'vnode' && isArray(ret) && modifier
+            ? ret[0]
+            : ret;
+        return modifier ? _modifier(modifier)(msg, type) : msg;
+    };
+    const ctx = {
+        ["list" /* HelperNameMap.LIST */]: list,
+        ["named" /* HelperNameMap.NAMED */]: named,
+        ["plural" /* HelperNameMap.PLURAL */]: plural,
+        ["linked" /* HelperNameMap.LINKED */]: linked,
+        ["message" /* HelperNameMap.MESSAGE */]: message,
+        ["type" /* HelperNameMap.TYPE */]: type,
+        ["interpolate" /* HelperNameMap.INTERPOLATE */]: interpolate,
+        ["normalize" /* HelperNameMap.NORMALIZE */]: normalize,
+        ["values" /* HelperNameMap.VALUES */]: assign({}, _list, _named)
+    };
+    return ctx;
+}
+
+let devtools = null;
+function setDevToolsHook(hook) {
+    devtools = hook;
+}
+function getDevToolsHook() {
+    return devtools;
+}
+function initI18nDevTools(i18n, version, meta) {
+    // TODO: queue if devtools is undefined
+    devtools &&
+        devtools.emit("i18n:init" /* IntlifyDevToolsHooks.I18nInit */, {
+            timestamp: Date.now(),
+            i18n,
+            version,
+            meta
+        });
+}
+const translateDevTools = /* #__PURE__*/ createDevToolsHook("function:translate" /* IntlifyDevToolsHooks.FunctionTranslate */);
+function createDevToolsHook(hook) {
+    return (payloads) => devtools && devtools.emit(hook, payloads);
+}
+
+const code$1 = CompileWarnCodes.__EXTEND_POINT__;
+const inc$1 = incrementer(code$1);
+const CoreWarnCodes = {
+    NOT_FOUND_KEY: code$1, // 2
+    FALLBACK_TO_TRANSLATE: inc$1(), // 3
+    CANNOT_FORMAT_NUMBER: inc$1(), // 4
+    FALLBACK_TO_NUMBER_FORMAT: inc$1(), // 5
+    CANNOT_FORMAT_DATE: inc$1(), // 6
+    FALLBACK_TO_DATE_FORMAT: inc$1(), // 7
+    EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER: inc$1(), // 8
+    __EXTEND_POINT__: inc$1() // 9
+};
+/** @internal */
+const warnMessages = {
+    [CoreWarnCodes.NOT_FOUND_KEY]: `Not found '{key}' key in '{locale}' locale messages.`,
+    [CoreWarnCodes.FALLBACK_TO_TRANSLATE]: `Fall back to translate '{key}' key with '{target}' locale.`,
+    [CoreWarnCodes.CANNOT_FORMAT_NUMBER]: `Cannot format a number value due to not supported Intl.NumberFormat.`,
+    [CoreWarnCodes.FALLBACK_TO_NUMBER_FORMAT]: `Fall back to number format '{key}' key with '{target}' locale.`,
+    [CoreWarnCodes.CANNOT_FORMAT_DATE]: `Cannot format a date value due to not supported Intl.DateTimeFormat.`,
+    [CoreWarnCodes.FALLBACK_TO_DATE_FORMAT]: `Fall back to datetime format '{key}' key with '{target}' locale.`,
+    [CoreWarnCodes.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER]: `This project is using Custom Message Compiler, which is an experimental feature. It may receive breaking changes or be removed in the future.`
+};
+function getWarnMessage(code, ...args) {
+    return format$1(warnMessages[code], ...args);
+}
+
+const code = CompileErrorCodes.__EXTEND_POINT__;
+const inc = incrementer(code);
+const CoreErrorCodes = {
+    INVALID_ARGUMENT: code, // 17
+    INVALID_DATE_ARGUMENT: inc(), // 18
+    INVALID_ISO_DATE_ARGUMENT: inc(), // 19
+    NOT_SUPPORT_NON_STRING_MESSAGE: inc(), // 20
+    NOT_SUPPORT_LOCALE_PROMISE_VALUE: inc(), // 21
+    NOT_SUPPORT_LOCALE_ASYNC_FUNCTION: inc(), // 22
+    NOT_SUPPORT_LOCALE_TYPE: inc(), // 23
+    __EXTEND_POINT__: inc() // 24
+};
+function createCoreError(code) {
+    return createCompileError(code, null, { messages: errorMessages } );
+}
+/** @internal */
+const errorMessages = {
+    [CoreErrorCodes.INVALID_ARGUMENT]: 'Invalid arguments',
+    [CoreErrorCodes.INVALID_DATE_ARGUMENT]: 'The date provided is an invalid Date object.' +
+        'Make sure your Date represents a valid date.',
+    [CoreErrorCodes.INVALID_ISO_DATE_ARGUMENT]: 'The argument provided is not a valid ISO date string',
+    [CoreErrorCodes.NOT_SUPPORT_NON_STRING_MESSAGE]: 'Not support non-string message',
+    [CoreErrorCodes.NOT_SUPPORT_LOCALE_PROMISE_VALUE]: 'cannot support promise value',
+    [CoreErrorCodes.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION]: 'cannot support async function',
+    [CoreErrorCodes.NOT_SUPPORT_LOCALE_TYPE]: 'cannot support locale type'
+};
+
+/** @internal */
+function getLocale(context, options) {
+    return options.locale != null
+        ? resolveLocale(options.locale)
+        : resolveLocale(context.locale);
+}
+let _resolveLocale;
+/** @internal */
+function resolveLocale(locale) {
+    if (isString(locale)) {
+        return locale;
+    }
+    else {
+        if (isFunction(locale)) {
+            if (locale.resolvedOnce && _resolveLocale != null) {
+                return _resolveLocale;
+            }
+            else if (locale.constructor.name === 'Function') {
+                const resolve = locale();
+                if (isPromise(resolve)) {
+                    throw createCoreError(CoreErrorCodes.NOT_SUPPORT_LOCALE_PROMISE_VALUE);
+                }
+                return (_resolveLocale = resolve);
+            }
+            else {
+                throw createCoreError(CoreErrorCodes.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION);
+            }
+        }
+        else {
+            throw createCoreError(CoreErrorCodes.NOT_SUPPORT_LOCALE_TYPE);
+        }
+    }
+}
+/**
+ * Fallback with simple implemenation
+ *
+ * @remarks
+ * A fallback locale function implemented with a simple fallback algorithm.
+ *
+ * Basically, it returns the value as specified in the `fallbackLocale` props, and is processed with the fallback inside intlify.
+ *
+ * @param ctx - A {@link CoreContext | context}
+ * @param fallback - A {@link FallbackLocale | fallback locale}
+ * @param start - A starting {@link Locale | locale}
+ *
+ * @returns Fallback locales
+ *
+ * @VueI18nGeneral
+ */
+function fallbackWithSimple(ctx, fallback, start // eslint-disable-line @typescript-eslint/no-unused-vars
+) {
+    // prettier-ignore
+    return [...new Set([
+            start,
+            ...(isArray(fallback)
+                ? fallback
+                : isObject(fallback)
+                    ? Object.keys(fallback)
+                    : isString(fallback)
+                        ? [fallback]
+                        : [start])
+        ])];
+}
+/**
+ * Fallback with locale chain
+ *
+ * @remarks
+ * A fallback locale function implemented with a fallback chain algorithm. It's used in VueI18n as default.
+ *
+ * @param ctx - A {@link CoreContext | context}
+ * @param fallback - A {@link FallbackLocale | fallback locale}
+ * @param start - A starting {@link Locale | locale}
+ *
+ * @returns Fallback locales
+ *
+ * @VueI18nSee [Fallbacking](../guide/essentials/fallback)
+ *
+ * @VueI18nGeneral
+ */
+function fallbackWithLocaleChain(ctx, fallback, start) {
+    const startLocale = isString(start) ? start : DEFAULT_LOCALE;
+    const context = ctx;
+    if (!context.__localeChainCache) {
+        context.__localeChainCache = new Map();
+    }
+    let chain = context.__localeChainCache.get(startLocale);
+    if (!chain) {
+        chain = [];
+        // first block defined by start
+        let block = [start];
+        // while any intervening block found
+        while (isArray(block)) {
+            block = appendBlockToChain(chain, block, fallback);
+        }
+        // prettier-ignore
+        // last block defined by default
+        const defaults = isArray(fallback) || !isPlainObject(fallback)
+            ? fallback
+            : fallback['default']
+                ? fallback['default']
+                : null;
+        // convert defaults to array
+        block = isString(defaults) ? [defaults] : defaults;
+        if (isArray(block)) {
+            appendBlockToChain(chain, block, false);
+        }
+        context.__localeChainCache.set(startLocale, chain);
+    }
+    return chain;
+}
+function appendBlockToChain(chain, block, blocks) {
+    let follow = true;
+    for (let i = 0; i < block.length && isBoolean(follow); i++) {
+        const locale = block[i];
+        if (isString(locale)) {
+            follow = appendLocaleToChain(chain, block[i], blocks);
+        }
+    }
+    return follow;
+}
+function appendLocaleToChain(chain, locale, blocks) {
+    let follow;
+    const tokens = locale.split('-');
+    do {
+        const target = tokens.join('-');
+        follow = appendItemToChain(chain, target, blocks);
+        tokens.splice(-1, 1);
+    } while (tokens.length && follow === true);
+    return follow;
+}
+function appendItemToChain(chain, target, blocks) {
+    let follow = false;
+    if (!chain.includes(target)) {
+        follow = true;
+        if (target) {
+            follow = target[target.length - 1] !== '!';
+            const locale = target.replace(/!/g, '');
+            chain.push(locale);
+            if ((isArray(blocks) || isPlainObject(blocks)) &&
+                blocks[locale] // eslint-disable-line @typescript-eslint/no-explicit-any
+            ) {
+                // eslint-disable-next-line @typescript-eslint/no-explicit-any
+                follow = blocks[locale];
+            }
+        }
+    }
+    return follow;
+}
+
+/* eslint-disable @typescript-eslint/no-explicit-any */
+/**
+ * Intlify core-base version
+ * @internal
+ */
+const VERSION = '9.13.1';
+const NOT_REOSLVED = -1;
+const DEFAULT_LOCALE = 'en-US';
+const MISSING_RESOLVE_VALUE = '';
+const capitalize = (str) => `${str.charAt(0).toLocaleUpperCase()}${str.substr(1)}`;
+function getDefaultLinkedModifiers() {
+    return {
+        upper: (val, type) => {
+            // prettier-ignore
+            return type === 'text' && isString(val)
+                ? val.toUpperCase()
+                : type === 'vnode' && isObject(val) && '__v_isVNode' in val
+                    ? val.children.toUpperCase()
+                    : val;
+        },
+        lower: (val, type) => {
+            // prettier-ignore
+            return type === 'text' && isString(val)
+                ? val.toLowerCase()
+                : type === 'vnode' && isObject(val) && '__v_isVNode' in val
+                    ? val.children.toLowerCase()
+                    : val;
+        },
+        capitalize: (val, type) => {
+            // prettier-ignore
+            return (type === 'text' && isString(val)
+                ? capitalize(val)
+                : type === 'vnode' && isObject(val) && '__v_isVNode' in val
+                    ? capitalize(val.children)
+                    : val);
+        }
+    };
+}
+let _compiler;
+function registerMessageCompiler(compiler) {
+    _compiler = compiler;
+}
+let _resolver;
+/**
+ * Register the message resolver
+ *
+ * @param resolver - A {@link MessageResolver} function
+ *
+ * @VueI18nGeneral
+ */
+function registerMessageResolver(resolver) {
+    _resolver = resolver;
+}
+let _fallbacker;
+/**
+ * Register the locale fallbacker
+ *
+ * @param fallbacker - A {@link LocaleFallbacker} function
+ *
+ * @VueI18nGeneral
+ */
+function registerLocaleFallbacker(fallbacker) {
+    _fallbacker = fallbacker;
+}
+// Additional Meta for Intlify DevTools
+let _additionalMeta =  null;
+/* #__NO_SIDE_EFFECTS__ */
+const setAdditionalMeta = (meta) => {
+    _additionalMeta = meta;
+};
+/* #__NO_SIDE_EFFECTS__ */
+const getAdditionalMeta = () => _additionalMeta;
+let _fallbackContext = null;
+const setFallbackContext = (context) => {
+    _fallbackContext = context;
+};
+const getFallbackContext = () => _fallbackContext;
+// ID for CoreContext
+let _cid = 0;
+function createCoreContext(options = {}) {
+    // setup options
+    const onWarn = isFunction(options.onWarn) ? options.onWarn : warn;
+    const version = isString(options.version) ? options.version : VERSION;
+    const locale = isString(options.locale) || isFunction(options.locale)
+        ? options.locale
+        : DEFAULT_LOCALE;
+    const _locale = isFunction(locale) ? DEFAULT_LOCALE : locale;
+    const fallbackLocale = isArray(options.fallbackLocale) ||
+        isPlainObject(options.fallbackLocale) ||
+        isString(options.fallbackLocale) ||
+        options.fallbackLocale === false
+        ? options.fallbackLocale
+        : _locale;
+    const messages = isPlainObject(options.messages)
+        ? options.messages
+        : { [_locale]: {} };
+    const datetimeFormats = isPlainObject(options.datetimeFormats)
+            ? options.datetimeFormats
+            : { [_locale]: {} }
+        ;
+    const numberFormats = isPlainObject(options.numberFormats)
+            ? options.numberFormats
+            : { [_locale]: {} }
+        ;
+    const modifiers = assign({}, options.modifiers || {}, getDefaultLinkedModifiers());
+    const pluralRules = options.pluralRules || {};
+    const missing = isFunction(options.missing) ? options.missing : null;
+    const missingWarn = isBoolean(options.missingWarn) || isRegExp(options.missingWarn)
+        ? options.missingWarn
+        : true;
+    const fallbackWarn = isBoolean(options.fallbackWarn) || isRegExp(options.fallbackWarn)
+        ? options.fallbackWarn
+        : true;
+    const fallbackFormat = !!options.fallbackFormat;
+    const unresolving = !!options.unresolving;
+    const postTranslation = isFunction(options.postTranslation)
+        ? options.postTranslation
+        : null;
+    const processor = isPlainObject(options.processor) ? options.processor : null;
+    const warnHtmlMessage = isBoolean(options.warnHtmlMessage)
+        ? options.warnHtmlMessage
+        : true;
+    const escapeParameter = !!options.escapeParameter;
+    const messageCompiler = isFunction(options.messageCompiler)
+        ? options.messageCompiler
+        : _compiler;
+    if (isFunction(options.messageCompiler)) {
+        warnOnce(getWarnMessage(CoreWarnCodes.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER));
+    }
+    const messageResolver = isFunction(options.messageResolver)
+        ? options.messageResolver
+        : _resolver || resolveWithKeyValue;
+    const localeFallbacker = isFunction(options.localeFallbacker)
+        ? options.localeFallbacker
+        : _fallbacker || fallbackWithSimple;
+    const fallbackContext = isObject(options.fallbackContext)
+        ? options.fallbackContext
+        : undefined;
+    // setup internal options
+    const internalOptions = options;
+    const __datetimeFormatters = isObject(internalOptions.__datetimeFormatters)
+            ? internalOptions.__datetimeFormatters
+            : new Map()
+        ;
+    const __numberFormatters = isObject(internalOptions.__numberFormatters)
+            ? internalOptions.__numberFormatters
+            : new Map()
+        ;
+    const __meta = isObject(internalOptions.__meta) ? internalOptions.__meta : {};
+    _cid++;
+    const context = {
+        version,
+        cid: _cid,
+        locale,
+        fallbackLocale,
+        messages,
+        modifiers,
+        pluralRules,
+        missing,
+        missingWarn,
+        fallbackWarn,
+        fallbackFormat,
+        unresolving,
+        postTranslation,
+        processor,
+        warnHtmlMessage,
+        escapeParameter,
+        messageCompiler,
+        messageResolver,
+        localeFallbacker,
+        fallbackContext,
+        onWarn,
+        __meta
+    };
+    {
+        context.datetimeFormats = datetimeFormats;
+        context.numberFormats = numberFormats;
+        context.__datetimeFormatters = __datetimeFormatters;
+        context.__numberFormatters = __numberFormatters;
+    }
+    // for vue-devtools timeline event
+    {
+        context.__v_emitter =
+            internalOptions.__v_emitter != null
+                ? internalOptions.__v_emitter
+                : undefined;
+    }
+    // NOTE: experimental !!
+    {
+        initI18nDevTools(context, version, __meta);
+    }
+    return context;
+}
+/** @internal */
+function isTranslateFallbackWarn(fallback, key) {
+    return fallback instanceof RegExp ? fallback.test(key) : fallback;
+}
+/** @internal */
+function isTranslateMissingWarn(missing, key) {
+    return missing instanceof RegExp ? missing.test(key) : missing;
+}
+/** @internal */
+function handleMissing(context, key, locale, missingWarn, type) {
+    const { missing, onWarn } = context;
+    // for vue-devtools timeline event
+    {
+        const emitter = context.__v_emitter;
+        if (emitter) {
+            emitter.emit("missing" /* VueDevToolsTimelineEvents.MISSING */, {
+                locale,
+                key,
+                type,
+                groupId: `${type}:${key}`
+            });
+        }
+    }
+    if (missing !== null) {
+        const ret = missing(context, locale, key, type);
+        return isString(ret) ? ret : key;
+    }
+    else {
+        if (isTranslateMissingWarn(missingWarn, key)) {
+            onWarn(getWarnMessage(CoreWarnCodes.NOT_FOUND_KEY, { key, locale }));
+        }
+        return key;
+    }
+}
+/** @internal */
+function updateFallbackLocale(ctx, locale, fallback) {
+    const context = ctx;
+    context.__localeChainCache = new Map();
+    ctx.localeFallbacker(ctx, fallback, locale);
+}
+/** @internal */
+function isAlmostSameLocale(locale, compareLocale) {
+    if (locale === compareLocale)
+        return false;
+    return locale.split('-')[0] === compareLocale.split('-')[0];
+}
+/** @internal */
+function isImplicitFallback(targetLocale, locales) {
+    const index = locales.indexOf(targetLocale);
+    if (index === -1) {
+        return false;
+    }
+    for (let i = index + 1; i < locales.length; i++) {
+        if (isAlmostSameLocale(targetLocale, locales[i])) {
+            return true;
+        }
+    }
+    return false;
+}
+/* eslint-enable @typescript-eslint/no-explicit-any */
+
+function format(ast) {
+    const msg = (ctx) => formatParts(ctx, ast);
+    return msg;
+}
+function formatParts(ctx, ast) {
+    const body = ast.b || ast.body;
+    if ((body.t || body.type) === 1 /* NodeTypes.Plural */) {
+        const plural = body;
+        const cases = plural.c || plural.cases;
+        return ctx.plural(cases.reduce((messages, c) => [
+            ...messages,
+            formatMessageParts(ctx, c)
+        ], []));
+    }
+    else {
+        return formatMessageParts(ctx, body);
+    }
+}
+function formatMessageParts(ctx, node) {
+    const _static = node.s || node.static;
+    if (_static) {
+        return ctx.type === 'text'
+            ? _static
+            : ctx.normalize([_static]);
+    }
+    else {
+        const messages = (node.i || node.items).reduce((acm, c) => [...acm, formatMessagePart(ctx, c)], []);
+        return ctx.normalize(messages);
+    }
+}
+function formatMessagePart(ctx, node) {
+    const type = node.t || node.type;
+    switch (type) {
+        case 3 /* NodeTypes.Text */: {
+            const text = node;
+            return (text.v || text.value);
+        }
+        case 9 /* NodeTypes.Literal */: {
+            const literal = node;
+            return (literal.v || literal.value);
+        }
+        case 4 /* NodeTypes.Named */: {
+            const named = node;
+            return ctx.interpolate(ctx.named(named.k || named.key));
+        }
+        case 5 /* NodeTypes.List */: {
+            const list = node;
+            return ctx.interpolate(ctx.list(list.i != null ? list.i : list.index));
+        }
+        case 6 /* NodeTypes.Linked */: {
+            const linked = node;
+            const modifier = linked.m || linked.modifier;
+            return ctx.linked(formatMessagePart(ctx, linked.k || linked.key), modifier ? formatMessagePart(ctx, modifier) : undefined, ctx.type);
+        }
+        case 7 /* NodeTypes.LinkedKey */: {
+            const linkedKey = node;
+            return (linkedKey.v || linkedKey.value);
+        }
+        case 8 /* NodeTypes.LinkedModifier */: {
+            const linkedModifier = node;
+            return (linkedModifier.v || linkedModifier.value);
+        }
+        default:
+            throw new Error(`unhandled node type on format message part: ${type}`);
+    }
+}
+
+const WARN_MESSAGE = `Detected HTML in '{source}' message. Recommend not using HTML messages to avoid XSS.`;
+function checkHtmlMessage(source, warnHtmlMessage) {
+    if (warnHtmlMessage && detectHtmlTag(source)) {
+        warn(format$1(WARN_MESSAGE, { source }));
+    }
+}
+const defaultOnCacheKey = (message) => message;
+let compileCache = Object.create(null);
+function onCompileWarn(_warn) {
+    if (_warn.code === CompileWarnCodes.USE_MODULO_SYNTAX) {
+        warn(`The use of named interpolation with modulo syntax is deprecated. ` +
+            `It will be removed in v10.\n` +
+            `reference: https://vue-i18n.intlify.dev/guide/essentials/syntax#rails-i18n-format \n` +
+            `(message compiler warning message: ${_warn.message})`);
+    }
+}
+function clearCompileCache() {
+    compileCache = Object.create(null);
+}
+const isMessageAST = (val) => isObject(val) &&
+    (val.t === 0 || val.type === 0) &&
+    ('b' in val || 'body' in val);
+function baseCompile(message, options = {}) {
+    // error detecting on compile
+    let detectError = false;
+    const onError = options.onError || defaultOnError;
+    options.onError = (err) => {
+        detectError = true;
+        onError(err);
+    };
+    // compile with mesasge-compiler
+    return { ...baseCompile$1(message, options), detectError };
+}
+/* #__NO_SIDE_EFFECTS__ */
+const compileToFunction = (message, context) => {
+    if (!isString(message)) {
+        throw createCoreError(CoreErrorCodes.NOT_SUPPORT_NON_STRING_MESSAGE);
+    }
+    // set onWarn
+    {
+        context.onWarn = onCompileWarn;
+    }
+    {
+        // check HTML message
+        const warnHtmlMessage = isBoolean(context.warnHtmlMessage)
+            ? context.warnHtmlMessage
+            : true;
+        checkHtmlMessage(message, warnHtmlMessage);
+        // check caches
+        const onCacheKey = context.onCacheKey || defaultOnCacheKey;
+        const cacheKey = onCacheKey(message);
+        const cached = compileCache[cacheKey];
+        if (cached) {
+            return cached;
+        }
+        // compile
+        const { code, detectError } = baseCompile(message, context);
+        // evaluate function
+        const msg = new Function(`return ${code}`)();
+        // if occurred compile error, don't cache
+        return !detectError
+            ? (compileCache[cacheKey] = msg)
+            : msg;
+    }
+};
+function compile(message, context) {
+    // set onWarn
+    {
+        context.onWarn = onCompileWarn;
+    }
+    if (isString(message)) {
+        // check HTML message
+        const warnHtmlMessage = isBoolean(context.warnHtmlMessage)
+            ? context.warnHtmlMessage
+            : true;
+        checkHtmlMessage(message, warnHtmlMessage);
+        // check caches
+        const onCacheKey = context.onCacheKey || defaultOnCacheKey;
+        const cacheKey = onCacheKey(message);
+        const cached = compileCache[cacheKey];
+        if (cached) {
+            return cached;
+        }
+        // compile with JIT mode
+        const { ast, detectError } = baseCompile(message, {
+            ...context,
+            location: true,
+            jit: true
+        });
+        // compose message function from AST
+        const msg = format(ast);
+        // if occurred compile error, don't cache
+        return !detectError
+            ? (compileCache[cacheKey] = msg)
+            : msg;
+    }
+    else {
+        if (!isMessageAST(message)) {
+            warn(`the message that is resolve with key '${context.key}' is not supported for jit compilation`);
+            return (() => message);
+        }
+        // AST case (passed from bundler)
+        const cacheKey = message.cacheKey;
+        if (cacheKey) {
+            const cached = compileCache[cacheKey];
+            if (cached) {
+                return cached;
+            }
+            // compose message function from message (AST)
+            return (compileCache[cacheKey] =
+                format(message));
+        }
+        else {
+            return format(message);
+        }
+    }
+}
+
+const NOOP_MESSAGE_FUNCTION = () => '';
+const isMessageFunction = (val) => isFunction(val);
+// implementation of `translate` function
+function translate(context, ...args) {
+    const { fallbackFormat, postTranslation, unresolving, messageCompiler, fallbackLocale, messages } = context;
+    const [key, options] = parseTranslateArgs(...args);
+    const missingWarn = isBoolean(options.missingWarn)
+        ? options.missingWarn
+        : context.missingWarn;
+    const fallbackWarn = isBoolean(options.fallbackWarn)
+        ? options.fallbackWarn
+        : context.fallbackWarn;
+    const escapeParameter = isBoolean(options.escapeParameter)
+        ? options.escapeParameter
+        : context.escapeParameter;
+    const resolvedMessage = !!options.resolvedMessage;
+    // prettier-ignore
+    const defaultMsgOrKey = isString(options.default) || isBoolean(options.default) // default by function option
+        ? !isBoolean(options.default)
+            ? options.default
+            : (!messageCompiler ? () => key : key)
+        : fallbackFormat // default by `fallbackFormat` option
+            ? (!messageCompiler ? () => key : key)
+            : '';
+    const enableDefaultMsg = fallbackFormat || defaultMsgOrKey !== '';
+    const locale = getLocale(context, options);
+    // escape params
+    escapeParameter && escapeParams(options);
+    // resolve message format
+    // eslint-disable-next-line prefer-const
+    let [formatScope, targetLocale, message] = !resolvedMessage
+        ? resolveMessageFormat(context, key, locale, fallbackLocale, fallbackWarn, missingWarn)
+        : [
+            key,
+            locale,
+            messages[locale] || {}
+        ];
+    // NOTE:
+    //  Fix to work around `ssrTransfrom` bug in Vite.
+    //  https://github.com/vitejs/vite/issues/4306
+    //  To get around this, use temporary variables.
+    //  https://github.com/nuxt/framework/issues/1461#issuecomment-954606243
+    let format = formatScope;
+    // if you use default message, set it as message format!
+    let cacheBaseKey = key;
+    if (!resolvedMessage &&
+        !(isString(format) ||
+            isMessageAST(format) ||
+            isMessageFunction(format))) {
+        if (enableDefaultMsg) {
+            format = defaultMsgOrKey;
+            cacheBaseKey = format;
+        }
+    }
+    // checking message format and target locale
+    if (!resolvedMessage &&
+        (!(isString(format) ||
+            isMessageAST(format) ||
+            isMessageFunction(format)) ||
+            !isString(targetLocale))) {
+        return unresolving ? NOT_REOSLVED : key;
+    }
+    // TODO: refactor
+    if (isString(format) && context.messageCompiler == null) {
+        warn(`The message format compilation is not supported in this build. ` +
+            `Because message compiler isn't included. ` +
+            `You need to pre-compilation all message format. ` +
+            `So translate function return '${key}'.`);
+        return key;
+    }
+    // setup compile error detecting
+    let occurred = false;
+    const onError = () => {
+        occurred = true;
+    };
+    // compile message format
+    const msg = !isMessageFunction(format)
+        ? compileMessageFormat(context, key, targetLocale, format, cacheBaseKey, onError)
+        : format;
+    // if occurred compile error, return the message format
+    if (occurred) {
+        return format;
+    }
+    // evaluate message with context
+    const ctxOptions = getMessageContextOptions(context, targetLocale, message, options);
+    const msgContext = createMessageContext(ctxOptions);
+    const messaged = evaluateMessage(context, msg, msgContext);
+    // if use post translation option, proceed it with handler
+    const ret = postTranslation
+        ? postTranslation(messaged, key)
+        : messaged;
+    // NOTE: experimental !!
+    {
+        // prettier-ignore
+        const payloads = {
+            timestamp: Date.now(),
+            key: isString(key)
+                ? key
+                : isMessageFunction(format)
+                    ? format.key
+                    : '',
+            locale: targetLocale || (isMessageFunction(format)
+                ? format.locale
+                : ''),
+            format: isString(format)
+                ? format
+                : isMessageFunction(format)
+                    ? format.source
+                    : '',
+            message: ret
+        };
+        payloads.meta = assign({}, context.__meta, getAdditionalMeta() || {});
+        translateDevTools(payloads);
+    }
+    return ret;
+}
+function escapeParams(options) {
+    if (isArray(options.list)) {
+        options.list = options.list.map(item => isString(item) ? escapeHtml(item) : item);
+    }
+    else if (isObject(options.named)) {
+        Object.keys(options.named).forEach(key => {
+            if (isString(options.named[key])) {
+                options.named[key] = escapeHtml(options.named[key]);
+            }
+        });
+    }
+}
+function resolveMessageFormat(context, key, locale, fallbackLocale, fallbackWarn, missingWarn) {
+    const { messages, onWarn, messageResolver: resolveValue, localeFallbacker } = context;
+    const locales = localeFallbacker(context, fallbackLocale, locale); // eslint-disable-line @typescript-eslint/no-explicit-any
+    let message = {};
+    let targetLocale;
+    let format = null;
+    let from = locale;
+    let to = null;
+    const type = 'translate';
+    for (let i = 0; i < locales.length; i++) {
+        targetLocale = to = locales[i];
+        if (locale !== targetLocale &&
+            !isAlmostSameLocale(locale, targetLocale) &&
+            isTranslateFallbackWarn(fallbackWarn, key)) {
+            onWarn(getWarnMessage(CoreWarnCodes.FALLBACK_TO_TRANSLATE, {
+                key,
+                target: targetLocale
+            }));
+        }
+        // for vue-devtools timeline event
+        if (locale !== targetLocale) {
+            const emitter = context.__v_emitter;
+            if (emitter) {
+                emitter.emit("fallback" /* VueDevToolsTimelineEvents.FALBACK */, {
+                    type,
+                    key,
+                    from,
+                    to,
+                    groupId: `${type}:${key}`
+                });
+            }
+        }
+        message =
+            messages[targetLocale] || {};
+        // for vue-devtools timeline event
+        let start = null;
+        let startTag;
+        let endTag;
+        if (inBrowser) {
+            start = window.performance.now();
+            startTag = 'intlify-message-resolve-start';
+            endTag = 'intlify-message-resolve-end';
+            mark && mark(startTag);
+        }
+        if ((format = resolveValue(message, key)) === null) {
+            // if null, resolve with object key path
+            format = message[key]; // eslint-disable-line @typescript-eslint/no-explicit-any
+        }
+        // for vue-devtools timeline event
+        if (inBrowser) {
+            const end = window.performance.now();
+            const emitter = context.__v_emitter;
+            if (emitter && start && format) {
+                emitter.emit("message-resolve" /* VueDevToolsTimelineEvents.MESSAGE_RESOLVE */, {
+                    type: "message-resolve" /* VueDevToolsTimelineEvents.MESSAGE_RESOLVE */,
+                    key,
+                    message: format,
+                    time: end - start,
+                    groupId: `${type}:${key}`
+                });
+            }
+            if (startTag && endTag && mark && measure) {
+                mark(endTag);
+                measure('intlify message resolve', startTag, endTag);
+            }
+        }
+        if (isString(format) || isMessageAST(format) || isMessageFunction(format)) {
+            break;
+        }
+        if (!isImplicitFallback(targetLocale, locales)) {
+            const missingRet = handleMissing(context, // eslint-disable-line @typescript-eslint/no-explicit-any
+            key, targetLocale, missingWarn, type);
+            if (missingRet !== key) {
+                format = missingRet;
+            }
+        }
+        from = to;
+    }
+    return [format, targetLocale, message];
+}
+function compileMessageFormat(context, key, targetLocale, format, cacheBaseKey, onError) {
+    const { messageCompiler, warnHtmlMessage } = context;
+    if (isMessageFunction(format)) {
+        const msg = format;
+        msg.locale = msg.locale || targetLocale;
+        msg.key = msg.key || key;
+        return msg;
+    }
+    if (messageCompiler == null) {
+        const msg = (() => format);
+        msg.locale = targetLocale;
+        msg.key = key;
+        return msg;
+    }
+    // for vue-devtools timeline event
+    let start = null;
+    let startTag;
+    let endTag;
+    if (inBrowser) {
+        start = window.performance.now();
+        startTag = 'intlify-message-compilation-start';
+        endTag = 'intlify-message-compilation-end';
+        mark && mark(startTag);
+    }
+    const msg = messageCompiler(format, getCompileContext(context, targetLocale, cacheBaseKey, format, warnHtmlMessage, onError));
+    // for vue-devtools timeline event
+    if (inBrowser) {
+        const end = window.performance.now();
+        const emitter = context.__v_emitter;
+        if (emitter && start) {
+            emitter.emit("message-compilation" /* VueDevToolsTimelineEvents.MESSAGE_COMPILATION */, {
+                type: "message-compilation" /* VueDevToolsTimelineEvents.MESSAGE_COMPILATION */,
+                message: format,
+                time: end - start,
+                groupId: `${'translate'}:${key}`
+            });
+        }
+        if (startTag && endTag && mark && measure) {
+            mark(endTag);
+            measure('intlify message compilation', startTag, endTag);
+        }
+    }
+    msg.locale = targetLocale;
+    msg.key = key;
+    msg.source = format;
+    return msg;
+}
+function evaluateMessage(context, msg, msgCtx) {
+    // for vue-devtools timeline event
+    let start = null;
+    let startTag;
+    let endTag;
+    if (inBrowser) {
+        start = window.performance.now();
+        startTag = 'intlify-message-evaluation-start';
+        endTag = 'intlify-message-evaluation-end';
+        mark && mark(startTag);
+    }
+    const messaged = msg(msgCtx);
+    // for vue-devtools timeline event
+    if (inBrowser) {
+        const end = window.performance.now();
+        const emitter = context.__v_emitter;
+        if (emitter && start) {
+            emitter.emit("message-evaluation" /* VueDevToolsTimelineEvents.MESSAGE_EVALUATION */, {
+                type: "message-evaluation" /* VueDevToolsTimelineEvents.MESSAGE_EVALUATION */,
+                value: messaged,
+                time: end - start,
+                groupId: `${'translate'}:${msg.key}`
+            });
+        }
+        if (startTag && endTag && mark && measure) {
+            mark(endTag);
+            measure('intlify message evaluation', startTag, endTag);
+        }
+    }
+    return messaged;
+}
+/** @internal */
+function parseTranslateArgs(...args) {
+    const [arg1, arg2, arg3] = args;
+    const options = {};
+    if (!isString(arg1) &&
+        !isNumber(arg1) &&
+        !isMessageFunction(arg1) &&
+        !isMessageAST(arg1)) {
+        throw createCoreError(CoreErrorCodes.INVALID_ARGUMENT);
+    }
+    // prettier-ignore
+    const key = isNumber(arg1)
+        ? String(arg1)
+        : isMessageFunction(arg1)
+            ? arg1
+            : arg1;
+    if (isNumber(arg2)) {
+        options.plural = arg2;
+    }
+    else if (isString(arg2)) {
+        options.default = arg2;
+    }
+    else if (isPlainObject(arg2) && !isEmptyObject(arg2)) {
+        options.named = arg2;
+    }
+    else if (isArray(arg2)) {
+        options.list = arg2;
+    }
+    if (isNumber(arg3)) {
+        options.plural = arg3;
+    }
+    else if (isString(arg3)) {
+        options.default = arg3;
+    }
+    else if (isPlainObject(arg3)) {
+        assign(options, arg3);
+    }
+    return [key, options];
+}
+function getCompileContext(context, locale, key, source, warnHtmlMessage, onError) {
+    return {
+        locale,
+        key,
+        warnHtmlMessage,
+        onError: (err) => {
+            onError && onError(err);
+            {
+                const _source = getSourceForCodeFrame(source);
+                const message = `Message compilation error: ${err.message}`;
+                const codeFrame = err.location &&
+                    _source &&
+                    generateCodeFrame(_source, err.location.start.offset, err.location.end.offset);
+                const emitter = context.__v_emitter;
+                if (emitter && _source) {
+                    emitter.emit("compile-error" /* VueDevToolsTimelineEvents.COMPILE_ERROR */, {
+                        message: _source,
+                        error: err.message,
+                        start: err.location && err.location.start.offset,
+                        end: err.location && err.location.end.offset,
+                        groupId: `${'translate'}:${key}`
+                    });
+                }
+                console.error(codeFrame ? `${message}\n${codeFrame}` : message);
+            }
+        },
+        onCacheKey: (source) => generateFormatCacheKey(locale, key, source)
+    };
+}
+function getSourceForCodeFrame(source) {
+    if (isString(source)) {
+        return source;
+    }
+    else {
+        if (source.loc && source.loc.source) {
+            return source.loc.source;
+        }
+    }
+}
+function getMessageContextOptions(context, locale, message, options) {
+    const { modifiers, pluralRules, messageResolver: resolveValue, fallbackLocale, fallbackWarn, missingWarn, fallbackContext } = context;
+    const resolveMessage = (key) => {
+        let val = resolveValue(message, key);
+        // fallback to root context
+        if (val == null && fallbackContext) {
+            const [, , message] = resolveMessageFormat(fallbackContext, key, locale, fallbackLocale, fallbackWarn, missingWarn);
+            val = resolveValue(message, key);
+        }
+        if (isString(val) || isMessageAST(val)) {
+            let occurred = false;
+            const onError = () => {
+                occurred = true;
+            };
+            const msg = compileMessageFormat(context, key, locale, val, key, onError);
+            return !occurred
+                ? msg
+                : NOOP_MESSAGE_FUNCTION;
+        }
+        else if (isMessageFunction(val)) {
+            return val;
+        }
+        else {
+            // TODO: should be implemented warning message
+            return NOOP_MESSAGE_FUNCTION;
+        }
+    };
+    const ctxOptions = {
+        locale,
+        modifiers,
+        pluralRules,
+        messages: resolveMessage
+    };
+    if (context.processor) {
+        ctxOptions.processor = context.processor;
+    }
+    if (options.list) {
+        ctxOptions.list = options.list;
+    }
+    if (options.named) {
+        ctxOptions.named = options.named;
+    }
+    if (isNumber(options.plural)) {
+        ctxOptions.pluralIndex = options.plural;
+    }
+    return ctxOptions;
+}
+
+const intlDefined = typeof Intl !== 'undefined';
+const Availabilities = {
+    dateTimeFormat: intlDefined && typeof Intl.DateTimeFormat !== 'undefined',
+    numberFormat: intlDefined && typeof Intl.NumberFormat !== 'undefined'
+};
+
+// implementation of `datetime` function
+function datetime(context, ...args) {
+    const { datetimeFormats, unresolving, fallbackLocale, onWarn, localeFallbacker } = context;
+    const { __datetimeFormatters } = context;
+    if (!Availabilities.dateTimeFormat) {
+        onWarn(getWarnMessage(CoreWarnCodes.CANNOT_FORMAT_DATE));
+        return MISSING_RESOLVE_VALUE;
+    }
+    const [key, value, options, overrides] = parseDateTimeArgs(...args);
+    const missingWarn = isBoolean(options.missingWarn)
+        ? options.missingWarn
+        : context.missingWarn;
+    const fallbackWarn = isBoolean(options.fallbackWarn)
+        ? options.fallbackWarn
+        : context.fallbackWarn;
+    const part = !!options.part;
+    const locale = getLocale(context, options);
+    const locales = localeFallbacker(context, // eslint-disable-line @typescript-eslint/no-explicit-any
+    fallbackLocale, locale);
+    if (!isString(key) || key === '') {
+        return new Intl.DateTimeFormat(locale, overrides).format(value);
+    }
+    // resolve format
+    let datetimeFormat = {};
+    let targetLocale;
+    let format = null;
+    let from = locale;
+    let to = null;
+    const type = 'datetime format';
+    for (let i = 0; i < locales.length; i++) {
+        targetLocale = to = locales[i];
+        if (locale !== targetLocale &&
+            isTranslateFallbackWarn(fallbackWarn, key)) {
+            onWarn(getWarnMessage(CoreWarnCodes.FALLBACK_TO_DATE_FORMAT, {
+                key,
+                target: targetLocale
+            }));
+        }
+        // for vue-devtools timeline event
+        if (locale !== targetLocale) {
+            const emitter = context.__v_emitter;
+            if (emitter) {
+                emitter.emit("fallback" /* VueDevToolsTimelineEvents.FALBACK */, {
+                    type,
+                    key,
+                    from,
+                    to,
+                    groupId: `${type}:${key}`
+                });
+            }
+        }
+        datetimeFormat =
+            datetimeFormats[targetLocale] || {};
+        format = datetimeFormat[key];
+        if (isPlainObject(format))
+            break;
+        handleMissing(context, key, targetLocale, missingWarn, type); // eslint-disable-line @typescript-eslint/no-explicit-any
+        from = to;
+    }
+    // checking format and target locale
+    if (!isPlainObject(format) || !isString(targetLocale)) {
+        return unresolving ? NOT_REOSLVED : key;
+    }
+    let id = `${targetLocale}__${key}`;
+    if (!isEmptyObject(overrides)) {
+        id = `${id}__${JSON.stringify(overrides)}`;
+    }
+    let formatter = __datetimeFormatters.get(id);
+    if (!formatter) {
+        formatter = new Intl.DateTimeFormat(targetLocale, assign({}, format, overrides));
+        __datetimeFormatters.set(id, formatter);
+    }
+    return !part ? formatter.format(value) : formatter.formatToParts(value);
+}
+/** @internal */
+const DATETIME_FORMAT_OPTIONS_KEYS = [
+    'localeMatcher',
+    'weekday',
+    'era',
+    'year',
+    'month',
+    'day',
+    'hour',
+    'minute',
+    'second',
+    'timeZoneName',
+    'formatMatcher',
+    'hour12',
+    'timeZone',
+    'dateStyle',
+    'timeStyle',
+    'calendar',
+    'dayPeriod',
+    'numberingSystem',
+    'hourCycle',
+    'fractionalSecondDigits'
+];
+/** @internal */
+function parseDateTimeArgs(...args) {
+    const [arg1, arg2, arg3, arg4] = args;
+    const options = {};
+    let overrides = {};
+    let value;
+    if (isString(arg1)) {
+        // Only allow ISO strings - other date formats are often supported,
+        // but may cause different results in different browsers.
+        const matches = arg1.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);
+        if (!matches) {
+            throw createCoreError(CoreErrorCodes.INVALID_ISO_DATE_ARGUMENT);
+        }
+        // Some browsers can not parse the iso datetime separated by space,
+        // this is a compromise solution by replace the 'T'/' ' with 'T'
+        const dateTime = matches[3]
+            ? matches[3].trim().startsWith('T')
+                ? `${matches[1].trim()}${matches[3].trim()}`
+                : `${matches[1].trim()}T${matches[3].trim()}`
+            : matches[1].trim();
+        value = new Date(dateTime);
+        try {
+            // This will fail if the date is not valid
+            value.toISOString();
+        }
+        catch (e) {
+            throw createCoreError(CoreErrorCodes.INVALID_ISO_DATE_ARGUMENT);
+        }
+    }
+    else if (isDate(arg1)) {
+        if (isNaN(arg1.getTime())) {
+            throw createCoreError(CoreErrorCodes.INVALID_DATE_ARGUMENT);
+        }
+        value = arg1;
+    }
+    else if (isNumber(arg1)) {
+        value = arg1;
+    }
+    else {
+        throw createCoreError(CoreErrorCodes.INVALID_ARGUMENT);
+    }
+    if (isString(arg2)) {
+        options.key = arg2;
+    }
+    else if (isPlainObject(arg2)) {
+        Object.keys(arg2).forEach(key => {
+            if (DATETIME_FORMAT_OPTIONS_KEYS.includes(key)) {
+                overrides[key] = arg2[key];
+            }
+            else {
+                options[key] = arg2[key];
+            }
+        });
+    }
+    if (isString(arg3)) {
+        options.locale = arg3;
+    }
+    else if (isPlainObject(arg3)) {
+        overrides = arg3;
+    }
+    if (isPlainObject(arg4)) {
+        overrides = arg4;
+    }
+    return [options.key || '', value, options, overrides];
+}
+/** @internal */
+function clearDateTimeFormat(ctx, locale, format) {
+    const context = ctx;
+    for (const key in format) {
+        const id = `${locale}__${key}`;
+        if (!context.__datetimeFormatters.has(id)) {
+            continue;
+        }
+        context.__datetimeFormatters.delete(id);
+    }
+}
+
+// implementation of `number` function
+function number(context, ...args) {
+    const { numberFormats, unresolving, fallbackLocale, onWarn, localeFallbacker } = context;
+    const { __numberFormatters } = context;
+    if (!Availabilities.numberFormat) {
+        onWarn(getWarnMessage(CoreWarnCodes.CANNOT_FORMAT_NUMBER));
+        return MISSING_RESOLVE_VALUE;
+    }
+    const [key, value, options, overrides] = parseNumberArgs(...args);
+    const missingWarn = isBoolean(options.missingWarn)
+        ? options.missingWarn
+        : context.missingWarn;
+    const fallbackWarn = isBoolean(options.fallbackWarn)
+        ? options.fallbackWarn
+        : context.fallbackWarn;
+    const part = !!options.part;
+    const locale = getLocale(context, options);
+    const locales = localeFallbacker(context, // eslint-disable-line @typescript-eslint/no-explicit-any
+    fallbackLocale, locale);
+    if (!isString(key) || key === '') {
+        return new Intl.NumberFormat(locale, overrides).format(value);
+    }
+    // resolve format
+    let numberFormat = {};
+    let targetLocale;
+    let format = null;
+    let from = locale;
+    let to = null;
+    const type = 'number format';
+    for (let i = 0; i < locales.length; i++) {
+        targetLocale = to = locales[i];
+        if (locale !== targetLocale &&
+            isTranslateFallbackWarn(fallbackWarn, key)) {
+            onWarn(getWarnMessage(CoreWarnCodes.FALLBACK_TO_NUMBER_FORMAT, {
+                key,
+                target: targetLocale
+            }));
+        }
+        // for vue-devtools timeline event
+        if (locale !== targetLocale) {
+            const emitter = context.__v_emitter;
+            if (emitter) {
+                emitter.emit("fallback" /* VueDevToolsTimelineEvents.FALBACK */, {
+                    type,
+                    key,
+                    from,
+                    to,
+                    groupId: `${type}:${key}`
+                });
+            }
+        }
+        numberFormat =
+            numberFormats[targetLocale] || {};
+        format = numberFormat[key];
+        if (isPlainObject(format))
+            break;
+        handleMissing(context, key, targetLocale, missingWarn, type); // eslint-disable-line @typescript-eslint/no-explicit-any
+        from = to;
+    }
+    // checking format and target locale
+    if (!isPlainObject(format) || !isString(targetLocale)) {
+        return unresolving ? NOT_REOSLVED : key;
+    }
+    let id = `${targetLocale}__${key}`;
+    if (!isEmptyObject(overrides)) {
+        id = `${id}__${JSON.stringify(overrides)}`;
+    }
+    let formatter = __numberFormatters.get(id);
+    if (!formatter) {
+        formatter = new Intl.NumberFormat(targetLocale, assign({}, format, overrides));
+        __numberFormatters.set(id, formatter);
+    }
+    return !part ? formatter.format(value) : formatter.formatToParts(value);
+}
+/** @internal */
+const NUMBER_FORMAT_OPTIONS_KEYS = [
+    'localeMatcher',
+    'style',
+    'currency',
+    'currencyDisplay',
+    'currencySign',
+    'useGrouping',
+    'minimumIntegerDigits',
+    'minimumFractionDigits',
+    'maximumFractionDigits',
+    'minimumSignificantDigits',
+    'maximumSignificantDigits',
+    'compactDisplay',
+    'notation',
+    'signDisplay',
+    'unit',
+    'unitDisplay',
+    'roundingMode',
+    'roundingPriority',
+    'roundingIncrement',
+    'trailingZeroDisplay'
+];
+/** @internal */
+function parseNumberArgs(...args) {
+    const [arg1, arg2, arg3, arg4] = args;
+    const options = {};
+    let overrides = {};
+    if (!isNumber(arg1)) {
+        throw createCoreError(CoreErrorCodes.INVALID_ARGUMENT);
+    }
+    const value = arg1;
+    if (isString(arg2)) {
+        options.key = arg2;
+    }
+    else if (isPlainObject(arg2)) {
+        Object.keys(arg2).forEach(key => {
+            if (NUMBER_FORMAT_OPTIONS_KEYS.includes(key)) {
+                overrides[key] = arg2[key];
+            }
+            else {
+                options[key] = arg2[key];
+            }
+        });
+    }
+    if (isString(arg3)) {
+        options.locale = arg3;
+    }
+    else if (isPlainObject(arg3)) {
+        overrides = arg3;
+    }
+    if (isPlainObject(arg4)) {
+        overrides = arg4;
+    }
+    return [options.key || '', value, options, overrides];
+}
+/** @internal */
+function clearNumberFormat(ctx, locale, format) {
+    const context = ctx;
+    for (const key in format) {
+        const id = `${locale}__${key}`;
+        if (!context.__numberFormatters.has(id)) {
+            continue;
+        }
+        context.__numberFormatters.delete(id);
+    }
+}
+
+export { CompileErrorCodes, CoreErrorCodes, CoreWarnCodes, DATETIME_FORMAT_OPTIONS_KEYS, DEFAULT_LOCALE, DEFAULT_MESSAGE_DATA_TYPE, MISSING_RESOLVE_VALUE, NOT_REOSLVED, NUMBER_FORMAT_OPTIONS_KEYS, VERSION, clearCompileCache, clearDateTimeFormat, clearNumberFormat, compile, compileToFunction, createCompileError, createCoreContext, createCoreError, createMessageContext, datetime, fallbackWithLocaleChain, fallbackWithSimple, getAdditionalMeta, getDevToolsHook, getFallbackContext, getLocale, getWarnMessage, handleMissing, initI18nDevTools, isAlmostSameLocale, isImplicitFallback, isMessageAST, isMessageFunction, isTranslateFallbackWarn, isTranslateMissingWarn, number, parse, parseDateTimeArgs, parseNumberArgs, parseTranslateArgs, registerLocaleFallbacker, registerMessageCompiler, registerMessageResolver, resolveLocale, resolveValue, resolveWithKeyValue, setAdditionalMeta, setDevToolsHook, setFallbackContext, translate, translateDevTools, updateFallbackLocale };

Fichier diff supprimé car celui-ci est trop grand
+ 5 - 0
node_modules/@intlify/core-base/dist/core-base.esm-browser.prod.js


+ 1 - 0
node_modules/@intlify/core-base/dist/core-base.esm-bundler.js

@@ -0,0 +1 @@
+export * from '../dist/core-base.mjs'

+ 3586 - 0
node_modules/@intlify/core-base/dist/core-base.global.js

@@ -0,0 +1,3586 @@
+/*!
+  * core-base v9.13.1
+  * (c) 2024 kazuya kawaguchi
+  * Released under the MIT License.
+  */
+var IntlifyCoreBase = (function (exports) {
+  'use strict';
+
+  /**
+   * Original Utilities
+   * written by kazuya kawaguchi
+   */
+  const inBrowser = typeof window !== 'undefined';
+  let mark;
+  let measure;
+  {
+      const perf = inBrowser && window.performance;
+      if (perf &&
+          perf.mark &&
+          perf.measure &&
+          perf.clearMarks &&
+          // @ts-ignore browser compat
+          perf.clearMeasures) {
+          mark = (tag) => {
+              perf.mark(tag);
+          };
+          measure = (name, startTag, endTag) => {
+              perf.measure(name, startTag, endTag);
+              perf.clearMarks(startTag);
+              perf.clearMarks(endTag);
+          };
+      }
+  }
+  const RE_ARGS = /\{([0-9a-zA-Z]+)\}/g;
+  /* eslint-disable */
+  function format$1(message, ...args) {
+      if (args.length === 1 && isObject(args[0])) {
+          args = args[0];
+      }
+      if (!args || !args.hasOwnProperty) {
+          args = {};
+      }
+      return message.replace(RE_ARGS, (match, identifier) => {
+          return args.hasOwnProperty(identifier) ? args[identifier] : '';
+      });
+  }
+  const generateFormatCacheKey = (locale, key, source) => friendlyJSONstringify({ l: locale, k: key, s: source });
+  const friendlyJSONstringify = (json) => JSON.stringify(json)
+      .replace(/\u2028/g, '\\u2028')
+      .replace(/\u2029/g, '\\u2029')
+      .replace(/\u0027/g, '\\u0027');
+  const isNumber = (val) => typeof val === 'number' && isFinite(val);
+  const isDate = (val) => toTypeString(val) === '[object Date]';
+  const isRegExp = (val) => toTypeString(val) === '[object RegExp]';
+  const isEmptyObject = (val) => isPlainObject(val) && Object.keys(val).length === 0;
+  const assign = Object.assign;
+  function escapeHtml(rawText) {
+      return rawText
+          .replace(/</g, '&lt;')
+          .replace(/>/g, '&gt;')
+          .replace(/"/g, '&quot;')
+          .replace(/'/g, '&apos;');
+  }
+  /* eslint-enable */
+  /**
+   * Useful Utilities By Evan you
+   * Modified by kazuya kawaguchi
+   * MIT License
+   * https://github.com/vuejs/vue-next/blob/master/packages/shared/src/index.ts
+   * https://github.com/vuejs/vue-next/blob/master/packages/shared/src/codeframe.ts
+   */
+  const isArray = Array.isArray;
+  const isFunction = (val) => typeof val === 'function';
+  const isString = (val) => typeof val === 'string';
+  const isBoolean = (val) => typeof val === 'boolean';
+  // eslint-disable-next-line @typescript-eslint/no-explicit-any
+  const isObject = (val) => val !== null && typeof val === 'object';
+  // eslint-disable-next-line @typescript-eslint/no-explicit-any
+  const isPromise = (val) => {
+      return isObject(val) && isFunction(val.then) && isFunction(val.catch);
+  };
+  const objectToString = Object.prototype.toString;
+  const toTypeString = (value) => objectToString.call(value);
+  const isPlainObject = (val) => {
+      if (!isObject(val))
+          return false;
+      const proto = Object.getPrototypeOf(val);
+      return proto === null || proto.constructor === Object;
+  };
+  // for converting list and named values to displayed strings.
+  const toDisplayString = (val) => {
+      return val == null
+          ? ''
+          : isArray(val) || (isPlainObject(val) && val.toString === objectToString)
+              ? JSON.stringify(val, null, 2)
+              : String(val);
+  };
+  function join(items, separator = '') {
+      return items.reduce((str, item, index) => (index === 0 ? str + item : str + separator + item), '');
+  }
+  const RANGE = 2;
+  function generateCodeFrame(source, start = 0, end = source.length) {
+      const lines = source.split(/\r?\n/);
+      let count = 0;
+      const res = [];
+      for (let i = 0; i < lines.length; i++) {
+          count += lines[i].length + 1;
+          if (count >= start) {
+              for (let j = i - RANGE; j <= i + RANGE || end > count; j++) {
+                  if (j < 0 || j >= lines.length)
+                      continue;
+                  const line = j + 1;
+                  res.push(`${line}${' '.repeat(3 - String(line).length)}|  ${lines[j]}`);
+                  const lineLength = lines[j].length;
+                  if (j === i) {
+                      // push underline
+                      const pad = start - (count - lineLength) + 1;
+                      const length = Math.max(1, end > count ? lineLength - pad : end - start);
+                      res.push(`   |  ` + ' '.repeat(pad) + '^'.repeat(length));
+                  }
+                  else if (j > i) {
+                      if (end > count) {
+                          const length = Math.max(Math.min(end - count, lineLength), 1);
+                          res.push(`   |  ` + '^'.repeat(length));
+                      }
+                      count += lineLength + 1;
+                  }
+              }
+              break;
+          }
+      }
+      return res.join('\n');
+  }
+  function incrementer(code) {
+      let current = code;
+      return () => ++current;
+  }
+
+  function warn(msg, err) {
+      if (typeof console !== 'undefined') {
+          console.warn(`[intlify] ` + msg);
+          /* istanbul ignore if */
+          if (err) {
+              console.warn(err.stack);
+          }
+      }
+  }
+
+  function createPosition(line, column, offset) {
+      return { line, column, offset };
+  }
+  function createLocation(start, end, source) {
+      const loc = { start, end };
+      if (source != null) {
+          loc.source = source;
+      }
+      return loc;
+  }
+
+  const CompileWarnCodes = {
+      USE_MODULO_SYNTAX: 1,
+      __EXTEND_POINT__: 2
+  };
+  /** @internal */
+  const warnMessages$1 = {
+      [CompileWarnCodes.USE_MODULO_SYNTAX]: `Use modulo before '{{0}}'.`
+  };
+  function createCompileWarn(code, loc, ...args) {
+      const msg = format$1(warnMessages$1[code] || '', ...(args || [])) ;
+      const message = { message: String(msg), code };
+      if (loc) {
+          message.location = loc;
+      }
+      return message;
+  }
+
+  const CompileErrorCodes = {
+      // tokenizer error codes
+      EXPECTED_TOKEN: 1,
+      INVALID_TOKEN_IN_PLACEHOLDER: 2,
+      UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER: 3,
+      UNKNOWN_ESCAPE_SEQUENCE: 4,
+      INVALID_UNICODE_ESCAPE_SEQUENCE: 5,
+      UNBALANCED_CLOSING_BRACE: 6,
+      UNTERMINATED_CLOSING_BRACE: 7,
+      EMPTY_PLACEHOLDER: 8,
+      NOT_ALLOW_NEST_PLACEHOLDER: 9,
+      INVALID_LINKED_FORMAT: 10,
+      // parser error codes
+      MUST_HAVE_MESSAGES_IN_PLURAL: 11,
+      UNEXPECTED_EMPTY_LINKED_MODIFIER: 12,
+      UNEXPECTED_EMPTY_LINKED_KEY: 13,
+      UNEXPECTED_LEXICAL_ANALYSIS: 14,
+      // generator error codes
+      UNHANDLED_CODEGEN_NODE_TYPE: 15,
+      // minifier error codes
+      UNHANDLED_MINIFIER_NODE_TYPE: 16,
+      // Special value for higher-order compilers to pick up the last code
+      // to avoid collision of error codes. This should always be kept as the last
+      // item.
+      __EXTEND_POINT__: 17
+  };
+  /** @internal */
+  const errorMessages$1 = {
+      // tokenizer error messages
+      [CompileErrorCodes.EXPECTED_TOKEN]: `Expected token: '{0}'`,
+      [CompileErrorCodes.INVALID_TOKEN_IN_PLACEHOLDER]: `Invalid token in placeholder: '{0}'`,
+      [CompileErrorCodes.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER]: `Unterminated single quote in placeholder`,
+      [CompileErrorCodes.UNKNOWN_ESCAPE_SEQUENCE]: `Unknown escape sequence: \\{0}`,
+      [CompileErrorCodes.INVALID_UNICODE_ESCAPE_SEQUENCE]: `Invalid unicode escape sequence: {0}`,
+      [CompileErrorCodes.UNBALANCED_CLOSING_BRACE]: `Unbalanced closing brace`,
+      [CompileErrorCodes.UNTERMINATED_CLOSING_BRACE]: `Unterminated closing brace`,
+      [CompileErrorCodes.EMPTY_PLACEHOLDER]: `Empty placeholder`,
+      [CompileErrorCodes.NOT_ALLOW_NEST_PLACEHOLDER]: `Not allowed nest placeholder`,
+      [CompileErrorCodes.INVALID_LINKED_FORMAT]: `Invalid linked format`,
+      // parser error messages
+      [CompileErrorCodes.MUST_HAVE_MESSAGES_IN_PLURAL]: `Plural must have messages`,
+      [CompileErrorCodes.UNEXPECTED_EMPTY_LINKED_MODIFIER]: `Unexpected empty linked modifier`,
+      [CompileErrorCodes.UNEXPECTED_EMPTY_LINKED_KEY]: `Unexpected empty linked key`,
+      [CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS]: `Unexpected lexical analysis in token: '{0}'`,
+      // generator error messages
+      [CompileErrorCodes.UNHANDLED_CODEGEN_NODE_TYPE]: `unhandled codegen node type: '{0}'`,
+      // minimizer error messages
+      [CompileErrorCodes.UNHANDLED_MINIFIER_NODE_TYPE]: `unhandled mimifier node type: '{0}'`
+  };
+  function createCompileError(code, loc, options = {}) {
+      const { domain, messages, args } = options;
+      const msg = format$1((messages || errorMessages$1)[code] || '', ...(args || []))
+          ;
+      const error = new SyntaxError(String(msg));
+      error.code = code;
+      if (loc) {
+          error.location = loc;
+      }
+      error.domain = domain;
+      return error;
+  }
+  /** @internal */
+  function defaultOnError(error) {
+      throw error;
+  }
+
+  // eslint-disable-next-line no-useless-escape
+  const RE_HTML_TAG = /<\/?[\w\s="/.':;#-\/]+>/;
+  const detectHtmlTag = (source) => RE_HTML_TAG.test(source);
+
+  const CHAR_SP = ' ';
+  const CHAR_CR = '\r';
+  const CHAR_LF = '\n';
+  const CHAR_LS = String.fromCharCode(0x2028);
+  const CHAR_PS = String.fromCharCode(0x2029);
+  function createScanner(str) {
+      const _buf = str;
+      let _index = 0;
+      let _line = 1;
+      let _column = 1;
+      let _peekOffset = 0;
+      const isCRLF = (index) => _buf[index] === CHAR_CR && _buf[index + 1] === CHAR_LF;
+      const isLF = (index) => _buf[index] === CHAR_LF;
+      const isPS = (index) => _buf[index] === CHAR_PS;
+      const isLS = (index) => _buf[index] === CHAR_LS;
+      const isLineEnd = (index) => isCRLF(index) || isLF(index) || isPS(index) || isLS(index);
+      const index = () => _index;
+      const line = () => _line;
+      const column = () => _column;
+      const peekOffset = () => _peekOffset;
+      const charAt = (offset) => isCRLF(offset) || isPS(offset) || isLS(offset) ? CHAR_LF : _buf[offset];
+      const currentChar = () => charAt(_index);
+      const currentPeek = () => charAt(_index + _peekOffset);
+      function next() {
+          _peekOffset = 0;
+          if (isLineEnd(_index)) {
+              _line++;
+              _column = 0;
+          }
+          if (isCRLF(_index)) {
+              _index++;
+          }
+          _index++;
+          _column++;
+          return _buf[_index];
+      }
+      function peek() {
+          if (isCRLF(_index + _peekOffset)) {
+              _peekOffset++;
+          }
+          _peekOffset++;
+          return _buf[_index + _peekOffset];
+      }
+      function reset() {
+          _index = 0;
+          _line = 1;
+          _column = 1;
+          _peekOffset = 0;
+      }
+      function resetPeek(offset = 0) {
+          _peekOffset = offset;
+      }
+      function skipToPeek() {
+          const target = _index + _peekOffset;
+          // eslint-disable-next-line no-unmodified-loop-condition
+          while (target !== _index) {
+              next();
+          }
+          _peekOffset = 0;
+      }
+      return {
+          index,
+          line,
+          column,
+          peekOffset,
+          charAt,
+          currentChar,
+          currentPeek,
+          next,
+          peek,
+          reset,
+          resetPeek,
+          skipToPeek
+      };
+  }
+
+  const EOF = undefined;
+  const DOT = '.';
+  const LITERAL_DELIMITER = "'";
+  const ERROR_DOMAIN$3 = 'tokenizer';
+  function createTokenizer(source, options = {}) {
+      const location = options.location !== false;
+      const _scnr = createScanner(source);
+      const currentOffset = () => _scnr.index();
+      const currentPosition = () => createPosition(_scnr.line(), _scnr.column(), _scnr.index());
+      const _initLoc = currentPosition();
+      const _initOffset = currentOffset();
+      const _context = {
+          currentType: 14 /* TokenTypes.EOF */,
+          offset: _initOffset,
+          startLoc: _initLoc,
+          endLoc: _initLoc,
+          lastType: 14 /* TokenTypes.EOF */,
+          lastOffset: _initOffset,
+          lastStartLoc: _initLoc,
+          lastEndLoc: _initLoc,
+          braceNest: 0,
+          inLinked: false,
+          text: ''
+      };
+      const context = () => _context;
+      const { onError } = options;
+      function emitError(code, pos, offset, ...args) {
+          const ctx = context();
+          pos.column += offset;
+          pos.offset += offset;
+          if (onError) {
+              const loc = location ? createLocation(ctx.startLoc, pos) : null;
+              const err = createCompileError(code, loc, {
+                  domain: ERROR_DOMAIN$3,
+                  args
+              });
+              onError(err);
+          }
+      }
+      function getToken(context, type, value) {
+          context.endLoc = currentPosition();
+          context.currentType = type;
+          const token = { type };
+          if (location) {
+              token.loc = createLocation(context.startLoc, context.endLoc);
+          }
+          if (value != null) {
+              token.value = value;
+          }
+          return token;
+      }
+      const getEndToken = (context) => getToken(context, 14 /* TokenTypes.EOF */);
+      function eat(scnr, ch) {
+          if (scnr.currentChar() === ch) {
+              scnr.next();
+              return ch;
+          }
+          else {
+              emitError(CompileErrorCodes.EXPECTED_TOKEN, currentPosition(), 0, ch);
+              return '';
+          }
+      }
+      function peekSpaces(scnr) {
+          let buf = '';
+          while (scnr.currentPeek() === CHAR_SP || scnr.currentPeek() === CHAR_LF) {
+              buf += scnr.currentPeek();
+              scnr.peek();
+          }
+          return buf;
+      }
+      function skipSpaces(scnr) {
+          const buf = peekSpaces(scnr);
+          scnr.skipToPeek();
+          return buf;
+      }
+      function isIdentifierStart(ch) {
+          if (ch === EOF) {
+              return false;
+          }
+          const cc = ch.charCodeAt(0);
+          return ((cc >= 97 && cc <= 122) || // a-z
+              (cc >= 65 && cc <= 90) || // A-Z
+              cc === 95 // _
+          );
+      }
+      function isNumberStart(ch) {
+          if (ch === EOF) {
+              return false;
+          }
+          const cc = ch.charCodeAt(0);
+          return cc >= 48 && cc <= 57; // 0-9
+      }
+      function isNamedIdentifierStart(scnr, context) {
+          const { currentType } = context;
+          if (currentType !== 2 /* TokenTypes.BraceLeft */) {
+              return false;
+          }
+          peekSpaces(scnr);
+          const ret = isIdentifierStart(scnr.currentPeek());
+          scnr.resetPeek();
+          return ret;
+      }
+      function isListIdentifierStart(scnr, context) {
+          const { currentType } = context;
+          if (currentType !== 2 /* TokenTypes.BraceLeft */) {
+              return false;
+          }
+          peekSpaces(scnr);
+          const ch = scnr.currentPeek() === '-' ? scnr.peek() : scnr.currentPeek();
+          const ret = isNumberStart(ch);
+          scnr.resetPeek();
+          return ret;
+      }
+      function isLiteralStart(scnr, context) {
+          const { currentType } = context;
+          if (currentType !== 2 /* TokenTypes.BraceLeft */) {
+              return false;
+          }
+          peekSpaces(scnr);
+          const ret = scnr.currentPeek() === LITERAL_DELIMITER;
+          scnr.resetPeek();
+          return ret;
+      }
+      function isLinkedDotStart(scnr, context) {
+          const { currentType } = context;
+          if (currentType !== 8 /* TokenTypes.LinkedAlias */) {
+              return false;
+          }
+          peekSpaces(scnr);
+          const ret = scnr.currentPeek() === "." /* TokenChars.LinkedDot */;
+          scnr.resetPeek();
+          return ret;
+      }
+      function isLinkedModifierStart(scnr, context) {
+          const { currentType } = context;
+          if (currentType !== 9 /* TokenTypes.LinkedDot */) {
+              return false;
+          }
+          peekSpaces(scnr);
+          const ret = isIdentifierStart(scnr.currentPeek());
+          scnr.resetPeek();
+          return ret;
+      }
+      function isLinkedDelimiterStart(scnr, context) {
+          const { currentType } = context;
+          if (!(currentType === 8 /* TokenTypes.LinkedAlias */ ||
+              currentType === 12 /* TokenTypes.LinkedModifier */)) {
+              return false;
+          }
+          peekSpaces(scnr);
+          const ret = scnr.currentPeek() === ":" /* TokenChars.LinkedDelimiter */;
+          scnr.resetPeek();
+          return ret;
+      }
+      function isLinkedReferStart(scnr, context) {
+          const { currentType } = context;
+          if (currentType !== 10 /* TokenTypes.LinkedDelimiter */) {
+              return false;
+          }
+          const fn = () => {
+              const ch = scnr.currentPeek();
+              if (ch === "{" /* TokenChars.BraceLeft */) {
+                  return isIdentifierStart(scnr.peek());
+              }
+              else if (ch === "@" /* TokenChars.LinkedAlias */ ||
+                  ch === "%" /* TokenChars.Modulo */ ||
+                  ch === "|" /* TokenChars.Pipe */ ||
+                  ch === ":" /* TokenChars.LinkedDelimiter */ ||
+                  ch === "." /* TokenChars.LinkedDot */ ||
+                  ch === CHAR_SP ||
+                  !ch) {
+                  return false;
+              }
+              else if (ch === CHAR_LF) {
+                  scnr.peek();
+                  return fn();
+              }
+              else {
+                  // other characters
+                  return isTextStart(scnr, false);
+              }
+          };
+          const ret = fn();
+          scnr.resetPeek();
+          return ret;
+      }
+      function isPluralStart(scnr) {
+          peekSpaces(scnr);
+          const ret = scnr.currentPeek() === "|" /* TokenChars.Pipe */;
+          scnr.resetPeek();
+          return ret;
+      }
+      function detectModuloStart(scnr) {
+          const spaces = peekSpaces(scnr);
+          const ret = scnr.currentPeek() === "%" /* TokenChars.Modulo */ &&
+              scnr.peek() === "{" /* TokenChars.BraceLeft */;
+          scnr.resetPeek();
+          return {
+              isModulo: ret,
+              hasSpace: spaces.length > 0
+          };
+      }
+      function isTextStart(scnr, reset = true) {
+          const fn = (hasSpace = false, prev = '', detectModulo = false) => {
+              const ch = scnr.currentPeek();
+              if (ch === "{" /* TokenChars.BraceLeft */) {
+                  return prev === "%" /* TokenChars.Modulo */ ? false : hasSpace;
+              }
+              else if (ch === "@" /* TokenChars.LinkedAlias */ || !ch) {
+                  return prev === "%" /* TokenChars.Modulo */ ? true : hasSpace;
+              }
+              else if (ch === "%" /* TokenChars.Modulo */) {
+                  scnr.peek();
+                  return fn(hasSpace, "%" /* TokenChars.Modulo */, true);
+              }
+              else if (ch === "|" /* TokenChars.Pipe */) {
+                  return prev === "%" /* TokenChars.Modulo */ || detectModulo
+                      ? true
+                      : !(prev === CHAR_SP || prev === CHAR_LF);
+              }
+              else if (ch === CHAR_SP) {
+                  scnr.peek();
+                  return fn(true, CHAR_SP, detectModulo);
+              }
+              else if (ch === CHAR_LF) {
+                  scnr.peek();
+                  return fn(true, CHAR_LF, detectModulo);
+              }
+              else {
+                  return true;
+              }
+          };
+          const ret = fn();
+          reset && scnr.resetPeek();
+          return ret;
+      }
+      function takeChar(scnr, fn) {
+          const ch = scnr.currentChar();
+          if (ch === EOF) {
+              return EOF;
+          }
+          if (fn(ch)) {
+              scnr.next();
+              return ch;
+          }
+          return null;
+      }
+      function isIdentifier(ch) {
+          const cc = ch.charCodeAt(0);
+          return ((cc >= 97 && cc <= 122) || // a-z
+              (cc >= 65 && cc <= 90) || // A-Z
+              (cc >= 48 && cc <= 57) || // 0-9
+              cc === 95 || // _
+              cc === 36 // $
+          );
+      }
+      function takeIdentifierChar(scnr) {
+          return takeChar(scnr, isIdentifier);
+      }
+      function isNamedIdentifier(ch) {
+          const cc = ch.charCodeAt(0);
+          return ((cc >= 97 && cc <= 122) || // a-z
+              (cc >= 65 && cc <= 90) || // A-Z
+              (cc >= 48 && cc <= 57) || // 0-9
+              cc === 95 || // _
+              cc === 36 || // $
+              cc === 45 // -
+          );
+      }
+      function takeNamedIdentifierChar(scnr) {
+          return takeChar(scnr, isNamedIdentifier);
+      }
+      function isDigit(ch) {
+          const cc = ch.charCodeAt(0);
+          return cc >= 48 && cc <= 57; // 0-9
+      }
+      function takeDigit(scnr) {
+          return takeChar(scnr, isDigit);
+      }
+      function isHexDigit(ch) {
+          const cc = ch.charCodeAt(0);
+          return ((cc >= 48 && cc <= 57) || // 0-9
+              (cc >= 65 && cc <= 70) || // A-F
+              (cc >= 97 && cc <= 102)); // a-f
+      }
+      function takeHexDigit(scnr) {
+          return takeChar(scnr, isHexDigit);
+      }
+      function getDigits(scnr) {
+          let ch = '';
+          let num = '';
+          while ((ch = takeDigit(scnr))) {
+              num += ch;
+          }
+          return num;
+      }
+      function readModulo(scnr) {
+          skipSpaces(scnr);
+          const ch = scnr.currentChar();
+          if (ch !== "%" /* TokenChars.Modulo */) {
+              emitError(CompileErrorCodes.EXPECTED_TOKEN, currentPosition(), 0, ch);
+          }
+          scnr.next();
+          return "%" /* TokenChars.Modulo */;
+      }
+      function readText(scnr) {
+          let buf = '';
+          // eslint-disable-next-line no-constant-condition
+          while (true) {
+              const ch = scnr.currentChar();
+              if (ch === "{" /* TokenChars.BraceLeft */ ||
+                  ch === "}" /* TokenChars.BraceRight */ ||
+                  ch === "@" /* TokenChars.LinkedAlias */ ||
+                  ch === "|" /* TokenChars.Pipe */ ||
+                  !ch) {
+                  break;
+              }
+              else if (ch === "%" /* TokenChars.Modulo */) {
+                  if (isTextStart(scnr)) {
+                      buf += ch;
+                      scnr.next();
+                  }
+                  else {
+                      break;
+                  }
+              }
+              else if (ch === CHAR_SP || ch === CHAR_LF) {
+                  if (isTextStart(scnr)) {
+                      buf += ch;
+                      scnr.next();
+                  }
+                  else if (isPluralStart(scnr)) {
+                      break;
+                  }
+                  else {
+                      buf += ch;
+                      scnr.next();
+                  }
+              }
+              else {
+                  buf += ch;
+                  scnr.next();
+              }
+          }
+          return buf;
+      }
+      function readNamedIdentifier(scnr) {
+          skipSpaces(scnr);
+          let ch = '';
+          let name = '';
+          while ((ch = takeNamedIdentifierChar(scnr))) {
+              name += ch;
+          }
+          if (scnr.currentChar() === EOF) {
+              emitError(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE, currentPosition(), 0);
+          }
+          return name;
+      }
+      function readListIdentifier(scnr) {
+          skipSpaces(scnr);
+          let value = '';
+          if (scnr.currentChar() === '-') {
+              scnr.next();
+              value += `-${getDigits(scnr)}`;
+          }
+          else {
+              value += getDigits(scnr);
+          }
+          if (scnr.currentChar() === EOF) {
+              emitError(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE, currentPosition(), 0);
+          }
+          return value;
+      }
+      function isLiteral(ch) {
+          return ch !== LITERAL_DELIMITER && ch !== CHAR_LF;
+      }
+      function readLiteral(scnr) {
+          skipSpaces(scnr);
+          // eslint-disable-next-line no-useless-escape
+          eat(scnr, `\'`);
+          let ch = '';
+          let literal = '';
+          while ((ch = takeChar(scnr, isLiteral))) {
+              if (ch === '\\') {
+                  literal += readEscapeSequence(scnr);
+              }
+              else {
+                  literal += ch;
+              }
+          }
+          const current = scnr.currentChar();
+          if (current === CHAR_LF || current === EOF) {
+              emitError(CompileErrorCodes.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER, currentPosition(), 0);
+              // TODO: Is it correct really?
+              if (current === CHAR_LF) {
+                  scnr.next();
+                  // eslint-disable-next-line no-useless-escape
+                  eat(scnr, `\'`);
+              }
+              return literal;
+          }
+          // eslint-disable-next-line no-useless-escape
+          eat(scnr, `\'`);
+          return literal;
+      }
+      function readEscapeSequence(scnr) {
+          const ch = scnr.currentChar();
+          switch (ch) {
+              case '\\':
+              case `\'`: // eslint-disable-line no-useless-escape
+                  scnr.next();
+                  return `\\${ch}`;
+              case 'u':
+                  return readUnicodeEscapeSequence(scnr, ch, 4);
+              case 'U':
+                  return readUnicodeEscapeSequence(scnr, ch, 6);
+              default:
+                  emitError(CompileErrorCodes.UNKNOWN_ESCAPE_SEQUENCE, currentPosition(), 0, ch);
+                  return '';
+          }
+      }
+      function readUnicodeEscapeSequence(scnr, unicode, digits) {
+          eat(scnr, unicode);
+          let sequence = '';
+          for (let i = 0; i < digits; i++) {
+              const ch = takeHexDigit(scnr);
+              if (!ch) {
+                  emitError(CompileErrorCodes.INVALID_UNICODE_ESCAPE_SEQUENCE, currentPosition(), 0, `\\${unicode}${sequence}${scnr.currentChar()}`);
+                  break;
+              }
+              sequence += ch;
+          }
+          return `\\${unicode}${sequence}`;
+      }
+      function isInvalidIdentifier(ch) {
+          return (ch !== "{" /* TokenChars.BraceLeft */ &&
+              ch !== "}" /* TokenChars.BraceRight */ &&
+              ch !== CHAR_SP &&
+              ch !== CHAR_LF);
+      }
+      function readInvalidIdentifier(scnr) {
+          skipSpaces(scnr);
+          let ch = '';
+          let identifiers = '';
+          while ((ch = takeChar(scnr, isInvalidIdentifier))) {
+              identifiers += ch;
+          }
+          return identifiers;
+      }
+      function readLinkedModifier(scnr) {
+          let ch = '';
+          let name = '';
+          while ((ch = takeIdentifierChar(scnr))) {
+              name += ch;
+          }
+          return name;
+      }
+      function readLinkedRefer(scnr) {
+          const fn = (buf) => {
+              const ch = scnr.currentChar();
+              if (ch === "{" /* TokenChars.BraceLeft */ ||
+                  ch === "%" /* TokenChars.Modulo */ ||
+                  ch === "@" /* TokenChars.LinkedAlias */ ||
+                  ch === "|" /* TokenChars.Pipe */ ||
+                  ch === "(" /* TokenChars.ParenLeft */ ||
+                  ch === ")" /* TokenChars.ParenRight */ ||
+                  !ch) {
+                  return buf;
+              }
+              else if (ch === CHAR_SP) {
+                  return buf;
+              }
+              else if (ch === CHAR_LF || ch === DOT) {
+                  buf += ch;
+                  scnr.next();
+                  return fn(buf);
+              }
+              else {
+                  buf += ch;
+                  scnr.next();
+                  return fn(buf);
+              }
+          };
+          return fn('');
+      }
+      function readPlural(scnr) {
+          skipSpaces(scnr);
+          const plural = eat(scnr, "|" /* TokenChars.Pipe */);
+          skipSpaces(scnr);
+          return plural;
+      }
+      // TODO: We need refactoring of token parsing ...
+      function readTokenInPlaceholder(scnr, context) {
+          let token = null;
+          const ch = scnr.currentChar();
+          switch (ch) {
+              case "{" /* TokenChars.BraceLeft */:
+                  if (context.braceNest >= 1) {
+                      emitError(CompileErrorCodes.NOT_ALLOW_NEST_PLACEHOLDER, currentPosition(), 0);
+                  }
+                  scnr.next();
+                  token = getToken(context, 2 /* TokenTypes.BraceLeft */, "{" /* TokenChars.BraceLeft */);
+                  skipSpaces(scnr);
+                  context.braceNest++;
+                  return token;
+              case "}" /* TokenChars.BraceRight */:
+                  if (context.braceNest > 0 &&
+                      context.currentType === 2 /* TokenTypes.BraceLeft */) {
+                      emitError(CompileErrorCodes.EMPTY_PLACEHOLDER, currentPosition(), 0);
+                  }
+                  scnr.next();
+                  token = getToken(context, 3 /* TokenTypes.BraceRight */, "}" /* TokenChars.BraceRight */);
+                  context.braceNest--;
+                  context.braceNest > 0 && skipSpaces(scnr);
+                  if (context.inLinked && context.braceNest === 0) {
+                      context.inLinked = false;
+                  }
+                  return token;
+              case "@" /* TokenChars.LinkedAlias */:
+                  if (context.braceNest > 0) {
+                      emitError(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE, currentPosition(), 0);
+                  }
+                  token = readTokenInLinked(scnr, context) || getEndToken(context);
+                  context.braceNest = 0;
+                  return token;
+              default: {
+                  let validNamedIdentifier = true;
+                  let validListIdentifier = true;
+                  let validLiteral = true;
+                  if (isPluralStart(scnr)) {
+                      if (context.braceNest > 0) {
+                          emitError(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE, currentPosition(), 0);
+                      }
+                      token = getToken(context, 1 /* TokenTypes.Pipe */, readPlural(scnr));
+                      // reset
+                      context.braceNest = 0;
+                      context.inLinked = false;
+                      return token;
+                  }
+                  if (context.braceNest > 0 &&
+                      (context.currentType === 5 /* TokenTypes.Named */ ||
+                          context.currentType === 6 /* TokenTypes.List */ ||
+                          context.currentType === 7 /* TokenTypes.Literal */)) {
+                      emitError(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE, currentPosition(), 0);
+                      context.braceNest = 0;
+                      return readToken(scnr, context);
+                  }
+                  if ((validNamedIdentifier = isNamedIdentifierStart(scnr, context))) {
+                      token = getToken(context, 5 /* TokenTypes.Named */, readNamedIdentifier(scnr));
+                      skipSpaces(scnr);
+                      return token;
+                  }
+                  if ((validListIdentifier = isListIdentifierStart(scnr, context))) {
+                      token = getToken(context, 6 /* TokenTypes.List */, readListIdentifier(scnr));
+                      skipSpaces(scnr);
+                      return token;
+                  }
+                  if ((validLiteral = isLiteralStart(scnr, context))) {
+                      token = getToken(context, 7 /* TokenTypes.Literal */, readLiteral(scnr));
+                      skipSpaces(scnr);
+                      return token;
+                  }
+                  if (!validNamedIdentifier && !validListIdentifier && !validLiteral) {
+                      // TODO: we should be re-designed invalid cases, when we will extend message syntax near the future ...
+                      token = getToken(context, 13 /* TokenTypes.InvalidPlace */, readInvalidIdentifier(scnr));
+                      emitError(CompileErrorCodes.INVALID_TOKEN_IN_PLACEHOLDER, currentPosition(), 0, token.value);
+                      skipSpaces(scnr);
+                      return token;
+                  }
+                  break;
+              }
+          }
+          return token;
+      }
+      // TODO: We need refactoring of token parsing ...
+      function readTokenInLinked(scnr, context) {
+          const { currentType } = context;
+          let token = null;
+          const ch = scnr.currentChar();
+          if ((currentType === 8 /* TokenTypes.LinkedAlias */ ||
+              currentType === 9 /* TokenTypes.LinkedDot */ ||
+              currentType === 12 /* TokenTypes.LinkedModifier */ ||
+              currentType === 10 /* TokenTypes.LinkedDelimiter */) &&
+              (ch === CHAR_LF || ch === CHAR_SP)) {
+              emitError(CompileErrorCodes.INVALID_LINKED_FORMAT, currentPosition(), 0);
+          }
+          switch (ch) {
+              case "@" /* TokenChars.LinkedAlias */:
+                  scnr.next();
+                  token = getToken(context, 8 /* TokenTypes.LinkedAlias */, "@" /* TokenChars.LinkedAlias */);
+                  context.inLinked = true;
+                  return token;
+              case "." /* TokenChars.LinkedDot */:
+                  skipSpaces(scnr);
+                  scnr.next();
+                  return getToken(context, 9 /* TokenTypes.LinkedDot */, "." /* TokenChars.LinkedDot */);
+              case ":" /* TokenChars.LinkedDelimiter */:
+                  skipSpaces(scnr);
+                  scnr.next();
+                  return getToken(context, 10 /* TokenTypes.LinkedDelimiter */, ":" /* TokenChars.LinkedDelimiter */);
+              default:
+                  if (isPluralStart(scnr)) {
+                      token = getToken(context, 1 /* TokenTypes.Pipe */, readPlural(scnr));
+                      // reset
+                      context.braceNest = 0;
+                      context.inLinked = false;
+                      return token;
+                  }
+                  if (isLinkedDotStart(scnr, context) ||
+                      isLinkedDelimiterStart(scnr, context)) {
+                      skipSpaces(scnr);
+                      return readTokenInLinked(scnr, context);
+                  }
+                  if (isLinkedModifierStart(scnr, context)) {
+                      skipSpaces(scnr);
+                      return getToken(context, 12 /* TokenTypes.LinkedModifier */, readLinkedModifier(scnr));
+                  }
+                  if (isLinkedReferStart(scnr, context)) {
+                      skipSpaces(scnr);
+                      if (ch === "{" /* TokenChars.BraceLeft */) {
+                          // scan the placeholder
+                          return readTokenInPlaceholder(scnr, context) || token;
+                      }
+                      else {
+                          return getToken(context, 11 /* TokenTypes.LinkedKey */, readLinkedRefer(scnr));
+                      }
+                  }
+                  if (currentType === 8 /* TokenTypes.LinkedAlias */) {
+                      emitError(CompileErrorCodes.INVALID_LINKED_FORMAT, currentPosition(), 0);
+                  }
+                  context.braceNest = 0;
+                  context.inLinked = false;
+                  return readToken(scnr, context);
+          }
+      }
+      // TODO: We need refactoring of token parsing ...
+      function readToken(scnr, context) {
+          let token = { type: 14 /* TokenTypes.EOF */ };
+          if (context.braceNest > 0) {
+              return readTokenInPlaceholder(scnr, context) || getEndToken(context);
+          }
+          if (context.inLinked) {
+              return readTokenInLinked(scnr, context) || getEndToken(context);
+          }
+          const ch = scnr.currentChar();
+          switch (ch) {
+              case "{" /* TokenChars.BraceLeft */:
+                  return readTokenInPlaceholder(scnr, context) || getEndToken(context);
+              case "}" /* TokenChars.BraceRight */:
+                  emitError(CompileErrorCodes.UNBALANCED_CLOSING_BRACE, currentPosition(), 0);
+                  scnr.next();
+                  return getToken(context, 3 /* TokenTypes.BraceRight */, "}" /* TokenChars.BraceRight */);
+              case "@" /* TokenChars.LinkedAlias */:
+                  return readTokenInLinked(scnr, context) || getEndToken(context);
+              default: {
+                  if (isPluralStart(scnr)) {
+                      token = getToken(context, 1 /* TokenTypes.Pipe */, readPlural(scnr));
+                      // reset
+                      context.braceNest = 0;
+                      context.inLinked = false;
+                      return token;
+                  }
+                  const { isModulo, hasSpace } = detectModuloStart(scnr);
+                  if (isModulo) {
+                      return hasSpace
+                          ? getToken(context, 0 /* TokenTypes.Text */, readText(scnr))
+                          : getToken(context, 4 /* TokenTypes.Modulo */, readModulo(scnr));
+                  }
+                  if (isTextStart(scnr)) {
+                      return getToken(context, 0 /* TokenTypes.Text */, readText(scnr));
+                  }
+                  break;
+              }
+          }
+          return token;
+      }
+      function nextToken() {
+          const { currentType, offset, startLoc, endLoc } = _context;
+          _context.lastType = currentType;
+          _context.lastOffset = offset;
+          _context.lastStartLoc = startLoc;
+          _context.lastEndLoc = endLoc;
+          _context.offset = currentOffset();
+          _context.startLoc = currentPosition();
+          if (_scnr.currentChar() === EOF) {
+              return getToken(_context, 14 /* TokenTypes.EOF */);
+          }
+          return readToken(_scnr, _context);
+      }
+      return {
+          nextToken,
+          currentOffset,
+          currentPosition,
+          context
+      };
+  }
+
+  const ERROR_DOMAIN$2 = 'parser';
+  // Backslash backslash, backslash quote, uHHHH, UHHHHHH.
+  const KNOWN_ESCAPES = /(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;
+  function fromEscapeSequence(match, codePoint4, codePoint6) {
+      switch (match) {
+          case `\\\\`:
+              return `\\`;
+          // eslint-disable-next-line no-useless-escape
+          case `\\\'`:
+              // eslint-disable-next-line no-useless-escape
+              return `\'`;
+          default: {
+              const codePoint = parseInt(codePoint4 || codePoint6, 16);
+              if (codePoint <= 0xd7ff || codePoint >= 0xe000) {
+                  return String.fromCodePoint(codePoint);
+              }
+              // invalid ...
+              // Replace them with U+FFFD REPLACEMENT CHARACTER.
+              return '�';
+          }
+      }
+  }
+  function createParser(options = {}) {
+      const location = options.location !== false;
+      const { onError, onWarn } = options;
+      function emitError(tokenzer, code, start, offset, ...args) {
+          const end = tokenzer.currentPosition();
+          end.offset += offset;
+          end.column += offset;
+          if (onError) {
+              const loc = location ? createLocation(start, end) : null;
+              const err = createCompileError(code, loc, {
+                  domain: ERROR_DOMAIN$2,
+                  args
+              });
+              onError(err);
+          }
+      }
+      function emitWarn(tokenzer, code, start, offset, ...args) {
+          const end = tokenzer.currentPosition();
+          end.offset += offset;
+          end.column += offset;
+          if (onWarn) {
+              const loc = location ? createLocation(start, end) : null;
+              onWarn(createCompileWarn(code, loc, args));
+          }
+      }
+      function startNode(type, offset, loc) {
+          const node = { type };
+          if (location) {
+              node.start = offset;
+              node.end = offset;
+              node.loc = { start: loc, end: loc };
+          }
+          return node;
+      }
+      function endNode(node, offset, pos, type) {
+          if (type) {
+              node.type = type;
+          }
+          if (location) {
+              node.end = offset;
+              if (node.loc) {
+                  node.loc.end = pos;
+              }
+          }
+      }
+      function parseText(tokenizer, value) {
+          const context = tokenizer.context();
+          const node = startNode(3 /* NodeTypes.Text */, context.offset, context.startLoc);
+          node.value = value;
+          endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());
+          return node;
+      }
+      function parseList(tokenizer, index) {
+          const context = tokenizer.context();
+          const { lastOffset: offset, lastStartLoc: loc } = context; // get brace left loc
+          const node = startNode(5 /* NodeTypes.List */, offset, loc);
+          node.index = parseInt(index, 10);
+          tokenizer.nextToken(); // skip brach right
+          endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());
+          return node;
+      }
+      function parseNamed(tokenizer, key, modulo) {
+          const context = tokenizer.context();
+          const { lastOffset: offset, lastStartLoc: loc } = context; // get brace left loc
+          const node = startNode(4 /* NodeTypes.Named */, offset, loc);
+          node.key = key;
+          if (modulo === true) {
+              node.modulo = true;
+          }
+          tokenizer.nextToken(); // skip brach right
+          endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());
+          return node;
+      }
+      function parseLiteral(tokenizer, value) {
+          const context = tokenizer.context();
+          const { lastOffset: offset, lastStartLoc: loc } = context; // get brace left loc
+          const node = startNode(9 /* NodeTypes.Literal */, offset, loc);
+          node.value = value.replace(KNOWN_ESCAPES, fromEscapeSequence);
+          tokenizer.nextToken(); // skip brach right
+          endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());
+          return node;
+      }
+      function parseLinkedModifier(tokenizer) {
+          const token = tokenizer.nextToken();
+          const context = tokenizer.context();
+          const { lastOffset: offset, lastStartLoc: loc } = context; // get linked dot loc
+          const node = startNode(8 /* NodeTypes.LinkedModifier */, offset, loc);
+          if (token.type !== 12 /* TokenTypes.LinkedModifier */) {
+              // empty modifier
+              emitError(tokenizer, CompileErrorCodes.UNEXPECTED_EMPTY_LINKED_MODIFIER, context.lastStartLoc, 0);
+              node.value = '';
+              endNode(node, offset, loc);
+              return {
+                  nextConsumeToken: token,
+                  node
+              };
+          }
+          // check token
+          if (token.value == null) {
+              emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));
+          }
+          node.value = token.value || '';
+          endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());
+          return {
+              node
+          };
+      }
+      function parseLinkedKey(tokenizer, value) {
+          const context = tokenizer.context();
+          const node = startNode(7 /* NodeTypes.LinkedKey */, context.offset, context.startLoc);
+          node.value = value;
+          endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());
+          return node;
+      }
+      function parseLinked(tokenizer) {
+          const context = tokenizer.context();
+          const linkedNode = startNode(6 /* NodeTypes.Linked */, context.offset, context.startLoc);
+          let token = tokenizer.nextToken();
+          if (token.type === 9 /* TokenTypes.LinkedDot */) {
+              const parsed = parseLinkedModifier(tokenizer);
+              linkedNode.modifier = parsed.node;
+              token = parsed.nextConsumeToken || tokenizer.nextToken();
+          }
+          // asset check token
+          if (token.type !== 10 /* TokenTypes.LinkedDelimiter */) {
+              emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));
+          }
+          token = tokenizer.nextToken();
+          // skip brace left
+          if (token.type === 2 /* TokenTypes.BraceLeft */) {
+              token = tokenizer.nextToken();
+          }
+          switch (token.type) {
+              case 11 /* TokenTypes.LinkedKey */:
+                  if (token.value == null) {
+                      emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));
+                  }
+                  linkedNode.key = parseLinkedKey(tokenizer, token.value || '');
+                  break;
+              case 5 /* TokenTypes.Named */:
+                  if (token.value == null) {
+                      emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));
+                  }
+                  linkedNode.key = parseNamed(tokenizer, token.value || '');
+                  break;
+              case 6 /* TokenTypes.List */:
+                  if (token.value == null) {
+                      emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));
+                  }
+                  linkedNode.key = parseList(tokenizer, token.value || '');
+                  break;
+              case 7 /* TokenTypes.Literal */:
+                  if (token.value == null) {
+                      emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));
+                  }
+                  linkedNode.key = parseLiteral(tokenizer, token.value || '');
+                  break;
+              default: {
+                  // empty key
+                  emitError(tokenizer, CompileErrorCodes.UNEXPECTED_EMPTY_LINKED_KEY, context.lastStartLoc, 0);
+                  const nextContext = tokenizer.context();
+                  const emptyLinkedKeyNode = startNode(7 /* NodeTypes.LinkedKey */, nextContext.offset, nextContext.startLoc);
+                  emptyLinkedKeyNode.value = '';
+                  endNode(emptyLinkedKeyNode, nextContext.offset, nextContext.startLoc);
+                  linkedNode.key = emptyLinkedKeyNode;
+                  endNode(linkedNode, nextContext.offset, nextContext.startLoc);
+                  return {
+                      nextConsumeToken: token,
+                      node: linkedNode
+                  };
+              }
+          }
+          endNode(linkedNode, tokenizer.currentOffset(), tokenizer.currentPosition());
+          return {
+              node: linkedNode
+          };
+      }
+      function parseMessage(tokenizer) {
+          const context = tokenizer.context();
+          const startOffset = context.currentType === 1 /* TokenTypes.Pipe */
+              ? tokenizer.currentOffset()
+              : context.offset;
+          const startLoc = context.currentType === 1 /* TokenTypes.Pipe */
+              ? context.endLoc
+              : context.startLoc;
+          const node = startNode(2 /* NodeTypes.Message */, startOffset, startLoc);
+          node.items = [];
+          let nextToken = null;
+          let modulo = null;
+          do {
+              const token = nextToken || tokenizer.nextToken();
+              nextToken = null;
+              switch (token.type) {
+                  case 0 /* TokenTypes.Text */:
+                      if (token.value == null) {
+                          emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));
+                      }
+                      node.items.push(parseText(tokenizer, token.value || ''));
+                      break;
+                  case 6 /* TokenTypes.List */:
+                      if (token.value == null) {
+                          emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));
+                      }
+                      node.items.push(parseList(tokenizer, token.value || ''));
+                      break;
+                  case 4 /* TokenTypes.Modulo */:
+                      modulo = true;
+                      break;
+                  case 5 /* TokenTypes.Named */:
+                      if (token.value == null) {
+                          emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));
+                      }
+                      node.items.push(parseNamed(tokenizer, token.value || '', !!modulo));
+                      if (modulo) {
+                          emitWarn(tokenizer, CompileWarnCodes.USE_MODULO_SYNTAX, context.lastStartLoc, 0, getTokenCaption(token));
+                          modulo = null;
+                      }
+                      break;
+                  case 7 /* TokenTypes.Literal */:
+                      if (token.value == null) {
+                          emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));
+                      }
+                      node.items.push(parseLiteral(tokenizer, token.value || ''));
+                      break;
+                  case 8 /* TokenTypes.LinkedAlias */: {
+                      const parsed = parseLinked(tokenizer);
+                      node.items.push(parsed.node);
+                      nextToken = parsed.nextConsumeToken || null;
+                      break;
+                  }
+              }
+          } while (context.currentType !== 14 /* TokenTypes.EOF */ &&
+              context.currentType !== 1 /* TokenTypes.Pipe */);
+          // adjust message node loc
+          const endOffset = context.currentType === 1 /* TokenTypes.Pipe */
+              ? context.lastOffset
+              : tokenizer.currentOffset();
+          const endLoc = context.currentType === 1 /* TokenTypes.Pipe */
+              ? context.lastEndLoc
+              : tokenizer.currentPosition();
+          endNode(node, endOffset, endLoc);
+          return node;
+      }
+      function parsePlural(tokenizer, offset, loc, msgNode) {
+          const context = tokenizer.context();
+          let hasEmptyMessage = msgNode.items.length === 0;
+          const node = startNode(1 /* NodeTypes.Plural */, offset, loc);
+          node.cases = [];
+          node.cases.push(msgNode);
+          do {
+              const msg = parseMessage(tokenizer);
+              if (!hasEmptyMessage) {
+                  hasEmptyMessage = msg.items.length === 0;
+              }
+              node.cases.push(msg);
+          } while (context.currentType !== 14 /* TokenTypes.EOF */);
+          if (hasEmptyMessage) {
+              emitError(tokenizer, CompileErrorCodes.MUST_HAVE_MESSAGES_IN_PLURAL, loc, 0);
+          }
+          endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());
+          return node;
+      }
+      function parseResource(tokenizer) {
+          const context = tokenizer.context();
+          const { offset, startLoc } = context;
+          const msgNode = parseMessage(tokenizer);
+          if (context.currentType === 14 /* TokenTypes.EOF */) {
+              return msgNode;
+          }
+          else {
+              return parsePlural(tokenizer, offset, startLoc, msgNode);
+          }
+      }
+      function parse(source) {
+          const tokenizer = createTokenizer(source, assign({}, options));
+          const context = tokenizer.context();
+          const node = startNode(0 /* NodeTypes.Resource */, context.offset, context.startLoc);
+          if (location && node.loc) {
+              node.loc.source = source;
+          }
+          node.body = parseResource(tokenizer);
+          if (options.onCacheKey) {
+              node.cacheKey = options.onCacheKey(source);
+          }
+          // assert whether achieved to EOF
+          if (context.currentType !== 14 /* TokenTypes.EOF */) {
+              emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, source[context.offset] || '');
+          }
+          endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());
+          return node;
+      }
+      return { parse };
+  }
+  function getTokenCaption(token) {
+      if (token.type === 14 /* TokenTypes.EOF */) {
+          return 'EOF';
+      }
+      const name = (token.value || '').replace(/\r?\n/gu, '\\n');
+      return name.length > 10 ? name.slice(0, 9) + '…' : name;
+  }
+
+  function createTransformer(ast, options = {} // eslint-disable-line
+  ) {
+      const _context = {
+          ast,
+          helpers: new Set()
+      };
+      const context = () => _context;
+      const helper = (name) => {
+          _context.helpers.add(name);
+          return name;
+      };
+      return { context, helper };
+  }
+  function traverseNodes(nodes, transformer) {
+      for (let i = 0; i < nodes.length; i++) {
+          traverseNode(nodes[i], transformer);
+      }
+  }
+  function traverseNode(node, transformer) {
+      // TODO: if we need pre-hook of transform, should be implemented to here
+      switch (node.type) {
+          case 1 /* NodeTypes.Plural */:
+              traverseNodes(node.cases, transformer);
+              transformer.helper("plural" /* HelperNameMap.PLURAL */);
+              break;
+          case 2 /* NodeTypes.Message */:
+              traverseNodes(node.items, transformer);
+              break;
+          case 6 /* NodeTypes.Linked */: {
+              const linked = node;
+              traverseNode(linked.key, transformer);
+              transformer.helper("linked" /* HelperNameMap.LINKED */);
+              transformer.helper("type" /* HelperNameMap.TYPE */);
+              break;
+          }
+          case 5 /* NodeTypes.List */:
+              transformer.helper("interpolate" /* HelperNameMap.INTERPOLATE */);
+              transformer.helper("list" /* HelperNameMap.LIST */);
+              break;
+          case 4 /* NodeTypes.Named */:
+              transformer.helper("interpolate" /* HelperNameMap.INTERPOLATE */);
+              transformer.helper("named" /* HelperNameMap.NAMED */);
+              break;
+      }
+      // TODO: if we need post-hook of transform, should be implemented to here
+  }
+  // transform AST
+  function transform(ast, options = {} // eslint-disable-line
+  ) {
+      const transformer = createTransformer(ast);
+      transformer.helper("normalize" /* HelperNameMap.NORMALIZE */);
+      // traverse
+      ast.body && traverseNode(ast.body, transformer);
+      // set meta information
+      const context = transformer.context();
+      ast.helpers = Array.from(context.helpers);
+  }
+
+  function optimize(ast) {
+      const body = ast.body;
+      if (body.type === 2 /* NodeTypes.Message */) {
+          optimizeMessageNode(body);
+      }
+      else {
+          body.cases.forEach(c => optimizeMessageNode(c));
+      }
+      return ast;
+  }
+  function optimizeMessageNode(message) {
+      if (message.items.length === 1) {
+          const item = message.items[0];
+          if (item.type === 3 /* NodeTypes.Text */ || item.type === 9 /* NodeTypes.Literal */) {
+              message.static = item.value;
+              delete item.value; // optimization for size
+          }
+      }
+      else {
+          const values = [];
+          for (let i = 0; i < message.items.length; i++) {
+              const item = message.items[i];
+              if (!(item.type === 3 /* NodeTypes.Text */ || item.type === 9 /* NodeTypes.Literal */)) {
+                  break;
+              }
+              if (item.value == null) {
+                  break;
+              }
+              values.push(item.value);
+          }
+          if (values.length === message.items.length) {
+              message.static = join(values);
+              for (let i = 0; i < message.items.length; i++) {
+                  const item = message.items[i];
+                  if (item.type === 3 /* NodeTypes.Text */ || item.type === 9 /* NodeTypes.Literal */) {
+                      delete item.value; // optimization for size
+                  }
+              }
+          }
+      }
+  }
+
+  const ERROR_DOMAIN$1 = 'minifier';
+  /* eslint-disable @typescript-eslint/no-explicit-any */
+  function minify(node) {
+      node.t = node.type;
+      switch (node.type) {
+          case 0 /* NodeTypes.Resource */: {
+              const resource = node;
+              minify(resource.body);
+              resource.b = resource.body;
+              delete resource.body;
+              break;
+          }
+          case 1 /* NodeTypes.Plural */: {
+              const plural = node;
+              const cases = plural.cases;
+              for (let i = 0; i < cases.length; i++) {
+                  minify(cases[i]);
+              }
+              plural.c = cases;
+              delete plural.cases;
+              break;
+          }
+          case 2 /* NodeTypes.Message */: {
+              const message = node;
+              const items = message.items;
+              for (let i = 0; i < items.length; i++) {
+                  minify(items[i]);
+              }
+              message.i = items;
+              delete message.items;
+              if (message.static) {
+                  message.s = message.static;
+                  delete message.static;
+              }
+              break;
+          }
+          case 3 /* NodeTypes.Text */:
+          case 9 /* NodeTypes.Literal */:
+          case 8 /* NodeTypes.LinkedModifier */:
+          case 7 /* NodeTypes.LinkedKey */: {
+              const valueNode = node;
+              if (valueNode.value) {
+                  valueNode.v = valueNode.value;
+                  delete valueNode.value;
+              }
+              break;
+          }
+          case 6 /* NodeTypes.Linked */: {
+              const linked = node;
+              minify(linked.key);
+              linked.k = linked.key;
+              delete linked.key;
+              if (linked.modifier) {
+                  minify(linked.modifier);
+                  linked.m = linked.modifier;
+                  delete linked.modifier;
+              }
+              break;
+          }
+          case 5 /* NodeTypes.List */: {
+              const list = node;
+              list.i = list.index;
+              delete list.index;
+              break;
+          }
+          case 4 /* NodeTypes.Named */: {
+              const named = node;
+              named.k = named.key;
+              delete named.key;
+              break;
+          }
+          default:
+              {
+                  throw createCompileError(CompileErrorCodes.UNHANDLED_MINIFIER_NODE_TYPE, null, {
+                      domain: ERROR_DOMAIN$1,
+                      args: [node.type]
+                  });
+              }
+      }
+      delete node.type;
+  }
+  /* eslint-enable @typescript-eslint/no-explicit-any */
+
+  // eslint-disable-next-line @typescript-eslint/triple-slash-reference
+  /// <reference types="source-map-js" />
+  const ERROR_DOMAIN = 'parser';
+  function createCodeGenerator(ast, options) {
+      const { sourceMap, filename, breakLineCode, needIndent: _needIndent } = options;
+      const location = options.location !== false;
+      const _context = {
+          filename,
+          code: '',
+          column: 1,
+          line: 1,
+          offset: 0,
+          map: undefined,
+          breakLineCode,
+          needIndent: _needIndent,
+          indentLevel: 0
+      };
+      if (location && ast.loc) {
+          _context.source = ast.loc.source;
+      }
+      const context = () => _context;
+      function push(code, node) {
+          _context.code += code;
+      }
+      function _newline(n, withBreakLine = true) {
+          const _breakLineCode = withBreakLine ? breakLineCode : '';
+          push(_needIndent ? _breakLineCode + `  `.repeat(n) : _breakLineCode);
+      }
+      function indent(withNewLine = true) {
+          const level = ++_context.indentLevel;
+          withNewLine && _newline(level);
+      }
+      function deindent(withNewLine = true) {
+          const level = --_context.indentLevel;
+          withNewLine && _newline(level);
+      }
+      function newline() {
+          _newline(_context.indentLevel);
+      }
+      const helper = (key) => `_${key}`;
+      const needIndent = () => _context.needIndent;
+      return {
+          context,
+          push,
+          indent,
+          deindent,
+          newline,
+          helper,
+          needIndent
+      };
+  }
+  function generateLinkedNode(generator, node) {
+      const { helper } = generator;
+      generator.push(`${helper("linked" /* HelperNameMap.LINKED */)}(`);
+      generateNode(generator, node.key);
+      if (node.modifier) {
+          generator.push(`, `);
+          generateNode(generator, node.modifier);
+          generator.push(`, _type`);
+      }
+      else {
+          generator.push(`, undefined, _type`);
+      }
+      generator.push(`)`);
+  }
+  function generateMessageNode(generator, node) {
+      const { helper, needIndent } = generator;
+      generator.push(`${helper("normalize" /* HelperNameMap.NORMALIZE */)}([`);
+      generator.indent(needIndent());
+      const length = node.items.length;
+      for (let i = 0; i < length; i++) {
+          generateNode(generator, node.items[i]);
+          if (i === length - 1) {
+              break;
+          }
+          generator.push(', ');
+      }
+      generator.deindent(needIndent());
+      generator.push('])');
+  }
+  function generatePluralNode(generator, node) {
+      const { helper, needIndent } = generator;
+      if (node.cases.length > 1) {
+          generator.push(`${helper("plural" /* HelperNameMap.PLURAL */)}([`);
+          generator.indent(needIndent());
+          const length = node.cases.length;
+          for (let i = 0; i < length; i++) {
+              generateNode(generator, node.cases[i]);
+              if (i === length - 1) {
+                  break;
+              }
+              generator.push(', ');
+          }
+          generator.deindent(needIndent());
+          generator.push(`])`);
+      }
+  }
+  function generateResource(generator, node) {
+      if (node.body) {
+          generateNode(generator, node.body);
+      }
+      else {
+          generator.push('null');
+      }
+  }
+  function generateNode(generator, node) {
+      const { helper } = generator;
+      switch (node.type) {
+          case 0 /* NodeTypes.Resource */:
+              generateResource(generator, node);
+              break;
+          case 1 /* NodeTypes.Plural */:
+              generatePluralNode(generator, node);
+              break;
+          case 2 /* NodeTypes.Message */:
+              generateMessageNode(generator, node);
+              break;
+          case 6 /* NodeTypes.Linked */:
+              generateLinkedNode(generator, node);
+              break;
+          case 8 /* NodeTypes.LinkedModifier */:
+              generator.push(JSON.stringify(node.value), node);
+              break;
+          case 7 /* NodeTypes.LinkedKey */:
+              generator.push(JSON.stringify(node.value), node);
+              break;
+          case 5 /* NodeTypes.List */:
+              generator.push(`${helper("interpolate" /* HelperNameMap.INTERPOLATE */)}(${helper("list" /* HelperNameMap.LIST */)}(${node.index}))`, node);
+              break;
+          case 4 /* NodeTypes.Named */:
+              generator.push(`${helper("interpolate" /* HelperNameMap.INTERPOLATE */)}(${helper("named" /* HelperNameMap.NAMED */)}(${JSON.stringify(node.key)}))`, node);
+              break;
+          case 9 /* NodeTypes.Literal */:
+              generator.push(JSON.stringify(node.value), node);
+              break;
+          case 3 /* NodeTypes.Text */:
+              generator.push(JSON.stringify(node.value), node);
+              break;
+          default:
+              {
+                  throw createCompileError(CompileErrorCodes.UNHANDLED_CODEGEN_NODE_TYPE, null, {
+                      domain: ERROR_DOMAIN,
+                      args: [node.type]
+                  });
+              }
+      }
+  }
+  // generate code from AST
+  const generate = (ast, options = {} // eslint-disable-line
+  ) => {
+      const mode = isString(options.mode) ? options.mode : 'normal';
+      const filename = isString(options.filename)
+          ? options.filename
+          : 'message.intl';
+      const sourceMap = !!options.sourceMap;
+      // prettier-ignore
+      const breakLineCode = options.breakLineCode != null
+          ? options.breakLineCode
+          : mode === 'arrow'
+              ? ';'
+              : '\n';
+      const needIndent = options.needIndent ? options.needIndent : mode !== 'arrow';
+      const helpers = ast.helpers || [];
+      const generator = createCodeGenerator(ast, {
+          mode,
+          filename,
+          sourceMap,
+          breakLineCode,
+          needIndent
+      });
+      generator.push(mode === 'normal' ? `function __msg__ (ctx) {` : `(ctx) => {`);
+      generator.indent(needIndent);
+      if (helpers.length > 0) {
+          generator.push(`const { ${join(helpers.map(s => `${s}: _${s}`), ', ')} } = ctx`);
+          generator.newline();
+      }
+      generator.push(`return `);
+      generateNode(generator, ast);
+      generator.deindent(needIndent);
+      generator.push(`}`);
+      delete ast.helpers;
+      const { code, map } = generator.context();
+      return {
+          ast,
+          code,
+          map: map ? map.toJSON() : undefined // eslint-disable-line @typescript-eslint/no-explicit-any
+      };
+  };
+
+  function baseCompile$1(source, options = {}) {
+      const assignedOptions = assign({}, options);
+      const jit = !!assignedOptions.jit;
+      const enalbeMinify = !!assignedOptions.minify;
+      const enambeOptimize = assignedOptions.optimize == null ? true : assignedOptions.optimize;
+      // parse source codes
+      const parser = createParser(assignedOptions);
+      const ast = parser.parse(source);
+      if (!jit) {
+          // transform ASTs
+          transform(ast, assignedOptions);
+          // generate javascript codes
+          return generate(ast, assignedOptions);
+      }
+      else {
+          // optimize ASTs
+          enambeOptimize && optimize(ast);
+          // minimize ASTs
+          enalbeMinify && minify(ast);
+          // In JIT mode, no ast transform, no code generation.
+          return { ast, code: '' };
+      }
+  }
+
+  const pathStateMachine =  [];
+  pathStateMachine[0 /* States.BEFORE_PATH */] = {
+      ["w" /* PathCharTypes.WORKSPACE */]: [0 /* States.BEFORE_PATH */],
+      ["i" /* PathCharTypes.IDENT */]: [3 /* States.IN_IDENT */, 0 /* Actions.APPEND */],
+      ["[" /* PathCharTypes.LEFT_BRACKET */]: [4 /* States.IN_SUB_PATH */],
+      ["o" /* PathCharTypes.END_OF_FAIL */]: [7 /* States.AFTER_PATH */]
+  };
+  pathStateMachine[1 /* States.IN_PATH */] = {
+      ["w" /* PathCharTypes.WORKSPACE */]: [1 /* States.IN_PATH */],
+      ["." /* PathCharTypes.DOT */]: [2 /* States.BEFORE_IDENT */],
+      ["[" /* PathCharTypes.LEFT_BRACKET */]: [4 /* States.IN_SUB_PATH */],
+      ["o" /* PathCharTypes.END_OF_FAIL */]: [7 /* States.AFTER_PATH */]
+  };
+  pathStateMachine[2 /* States.BEFORE_IDENT */] = {
+      ["w" /* PathCharTypes.WORKSPACE */]: [2 /* States.BEFORE_IDENT */],
+      ["i" /* PathCharTypes.IDENT */]: [3 /* States.IN_IDENT */, 0 /* Actions.APPEND */],
+      ["0" /* PathCharTypes.ZERO */]: [3 /* States.IN_IDENT */, 0 /* Actions.APPEND */]
+  };
+  pathStateMachine[3 /* States.IN_IDENT */] = {
+      ["i" /* PathCharTypes.IDENT */]: [3 /* States.IN_IDENT */, 0 /* Actions.APPEND */],
+      ["0" /* PathCharTypes.ZERO */]: [3 /* States.IN_IDENT */, 0 /* Actions.APPEND */],
+      ["w" /* PathCharTypes.WORKSPACE */]: [1 /* States.IN_PATH */, 1 /* Actions.PUSH */],
+      ["." /* PathCharTypes.DOT */]: [2 /* States.BEFORE_IDENT */, 1 /* Actions.PUSH */],
+      ["[" /* PathCharTypes.LEFT_BRACKET */]: [4 /* States.IN_SUB_PATH */, 1 /* Actions.PUSH */],
+      ["o" /* PathCharTypes.END_OF_FAIL */]: [7 /* States.AFTER_PATH */, 1 /* Actions.PUSH */]
+  };
+  pathStateMachine[4 /* States.IN_SUB_PATH */] = {
+      ["'" /* PathCharTypes.SINGLE_QUOTE */]: [5 /* States.IN_SINGLE_QUOTE */, 0 /* Actions.APPEND */],
+      ["\"" /* PathCharTypes.DOUBLE_QUOTE */]: [6 /* States.IN_DOUBLE_QUOTE */, 0 /* Actions.APPEND */],
+      ["[" /* PathCharTypes.LEFT_BRACKET */]: [
+          4 /* States.IN_SUB_PATH */,
+          2 /* Actions.INC_SUB_PATH_DEPTH */
+      ],
+      ["]" /* PathCharTypes.RIGHT_BRACKET */]: [1 /* States.IN_PATH */, 3 /* Actions.PUSH_SUB_PATH */],
+      ["o" /* PathCharTypes.END_OF_FAIL */]: 8 /* States.ERROR */,
+      ["l" /* PathCharTypes.ELSE */]: [4 /* States.IN_SUB_PATH */, 0 /* Actions.APPEND */]
+  };
+  pathStateMachine[5 /* States.IN_SINGLE_QUOTE */] = {
+      ["'" /* PathCharTypes.SINGLE_QUOTE */]: [4 /* States.IN_SUB_PATH */, 0 /* Actions.APPEND */],
+      ["o" /* PathCharTypes.END_OF_FAIL */]: 8 /* States.ERROR */,
+      ["l" /* PathCharTypes.ELSE */]: [5 /* States.IN_SINGLE_QUOTE */, 0 /* Actions.APPEND */]
+  };
+  pathStateMachine[6 /* States.IN_DOUBLE_QUOTE */] = {
+      ["\"" /* PathCharTypes.DOUBLE_QUOTE */]: [4 /* States.IN_SUB_PATH */, 0 /* Actions.APPEND */],
+      ["o" /* PathCharTypes.END_OF_FAIL */]: 8 /* States.ERROR */,
+      ["l" /* PathCharTypes.ELSE */]: [6 /* States.IN_DOUBLE_QUOTE */, 0 /* Actions.APPEND */]
+  };
+  /**
+   * Check if an expression is a literal value.
+   */
+  const literalValueRE = /^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;
+  function isLiteral(exp) {
+      return literalValueRE.test(exp);
+  }
+  /**
+   * Strip quotes from a string
+   */
+  function stripQuotes(str) {
+      const a = str.charCodeAt(0);
+      const b = str.charCodeAt(str.length - 1);
+      return a === b && (a === 0x22 || a === 0x27) ? str.slice(1, -1) : str;
+  }
+  /**
+   * Determine the type of a character in a keypath.
+   */
+  function getPathCharType(ch) {
+      if (ch === undefined || ch === null) {
+          return "o" /* PathCharTypes.END_OF_FAIL */;
+      }
+      const code = ch.charCodeAt(0);
+      switch (code) {
+          case 0x5b: // [
+          case 0x5d: // ]
+          case 0x2e: // .
+          case 0x22: // "
+          case 0x27: // '
+              return ch;
+          case 0x5f: // _
+          case 0x24: // $
+          case 0x2d: // -
+              return "i" /* PathCharTypes.IDENT */;
+          case 0x09: // Tab (HT)
+          case 0x0a: // Newline (LF)
+          case 0x0d: // Return (CR)
+          case 0xa0: // No-break space (NBSP)
+          case 0xfeff: // Byte Order Mark (BOM)
+          case 0x2028: // Line Separator (LS)
+          case 0x2029: // Paragraph Separator (PS)
+              return "w" /* PathCharTypes.WORKSPACE */;
+      }
+      return "i" /* PathCharTypes.IDENT */;
+  }
+  /**
+   * Format a subPath, return its plain form if it is
+   * a literal string or number. Otherwise prepend the
+   * dynamic indicator (*).
+   */
+  function formatSubPath(path) {
+      const trimmed = path.trim();
+      // invalid leading 0
+      if (path.charAt(0) === '0' && isNaN(parseInt(path))) {
+          return false;
+      }
+      return isLiteral(trimmed)
+          ? stripQuotes(trimmed)
+          : "*" /* PathCharTypes.ASTARISK */ + trimmed;
+  }
+  /**
+   * Parse a string path into an array of segments
+   */
+  function parse(path) {
+      const keys = [];
+      let index = -1;
+      let mode = 0 /* States.BEFORE_PATH */;
+      let subPathDepth = 0;
+      let c;
+      let key; // eslint-disable-line
+      let newChar;
+      let type;
+      let transition;
+      let action;
+      let typeMap;
+      const actions = [];
+      actions[0 /* Actions.APPEND */] = () => {
+          if (key === undefined) {
+              key = newChar;
+          }
+          else {
+              key += newChar;
+          }
+      };
+      actions[1 /* Actions.PUSH */] = () => {
+          if (key !== undefined) {
+              keys.push(key);
+              key = undefined;
+          }
+      };
+      actions[2 /* Actions.INC_SUB_PATH_DEPTH */] = () => {
+          actions[0 /* Actions.APPEND */]();
+          subPathDepth++;
+      };
+      actions[3 /* Actions.PUSH_SUB_PATH */] = () => {
+          if (subPathDepth > 0) {
+              subPathDepth--;
+              mode = 4 /* States.IN_SUB_PATH */;
+              actions[0 /* Actions.APPEND */]();
+          }
+          else {
+              subPathDepth = 0;
+              if (key === undefined) {
+                  return false;
+              }
+              key = formatSubPath(key);
+              if (key === false) {
+                  return false;
+              }
+              else {
+                  actions[1 /* Actions.PUSH */]();
+              }
+          }
+      };
+      function maybeUnescapeQuote() {
+          const nextChar = path[index + 1];
+          if ((mode === 5 /* States.IN_SINGLE_QUOTE */ &&
+              nextChar === "'" /* PathCharTypes.SINGLE_QUOTE */) ||
+              (mode === 6 /* States.IN_DOUBLE_QUOTE */ &&
+                  nextChar === "\"" /* PathCharTypes.DOUBLE_QUOTE */)) {
+              index++;
+              newChar = '\\' + nextChar;
+              actions[0 /* Actions.APPEND */]();
+              return true;
+          }
+      }
+      while (mode !== null) {
+          index++;
+          c = path[index];
+          if (c === '\\' && maybeUnescapeQuote()) {
+              continue;
+          }
+          type = getPathCharType(c);
+          typeMap = pathStateMachine[mode];
+          transition = typeMap[type] || typeMap["l" /* PathCharTypes.ELSE */] || 8 /* States.ERROR */;
+          // check parse error
+          if (transition === 8 /* States.ERROR */) {
+              return;
+          }
+          mode = transition[0];
+          if (transition[1] !== undefined) {
+              action = actions[transition[1]];
+              if (action) {
+                  newChar = c;
+                  if (action() === false) {
+                      return;
+                  }
+              }
+          }
+          // check parse finish
+          if (mode === 7 /* States.AFTER_PATH */) {
+              return keys;
+          }
+      }
+  }
+  // path token cache
+  const cache = new Map();
+  /**
+   * key-value message resolver
+   *
+   * @remarks
+   * Resolves messages with the key-value structure. Note that messages with a hierarchical structure such as objects cannot be resolved
+   *
+   * @param obj - A target object to be resolved with path
+   * @param path - A {@link Path | path} to resolve the value of message
+   *
+   * @returns A resolved {@link PathValue | path value}
+   *
+   * @VueI18nGeneral
+   */
+  function resolveWithKeyValue(obj, path) {
+      return isObject(obj) ? obj[path] : null;
+  }
+  /**
+   * message resolver
+   *
+   * @remarks
+   * Resolves messages. messages with a hierarchical structure such as objects can be resolved. This resolver is used in VueI18n as default.
+   *
+   * @param obj - A target object to be resolved with path
+   * @param path - A {@link Path | path} to resolve the value of message
+   *
+   * @returns A resolved {@link PathValue | path value}
+   *
+   * @VueI18nGeneral
+   */
+  function resolveValue(obj, path) {
+      // check object
+      if (!isObject(obj)) {
+          return null;
+      }
+      // parse path
+      let hit = cache.get(path);
+      if (!hit) {
+          hit = parse(path);
+          if (hit) {
+              cache.set(path, hit);
+          }
+      }
+      // check hit
+      if (!hit) {
+          return null;
+      }
+      // resolve path value
+      const len = hit.length;
+      let last = obj;
+      let i = 0;
+      while (i < len) {
+          const val = last[hit[i]];
+          if (val === undefined) {
+              return null;
+          }
+          if (isFunction(last)) {
+              return null;
+          }
+          last = val;
+          i++;
+      }
+      return last;
+  }
+
+  const DEFAULT_MODIFIER = (str) => str;
+  const DEFAULT_MESSAGE = (ctx) => ''; // eslint-disable-line
+  const DEFAULT_MESSAGE_DATA_TYPE = 'text';
+  const DEFAULT_NORMALIZE = (values) => values.length === 0 ? '' : join(values);
+  const DEFAULT_INTERPOLATE = toDisplayString;
+  function pluralDefault(choice, choicesLength) {
+      choice = Math.abs(choice);
+      if (choicesLength === 2) {
+          // prettier-ignore
+          return choice
+              ? choice > 1
+                  ? 1
+                  : 0
+              : 1;
+      }
+      return choice ? Math.min(choice, 2) : 0;
+  }
+  function getPluralIndex(options) {
+      // prettier-ignore
+      const index = isNumber(options.pluralIndex)
+          ? options.pluralIndex
+          : -1;
+      // prettier-ignore
+      return options.named && (isNumber(options.named.count) || isNumber(options.named.n))
+          ? isNumber(options.named.count)
+              ? options.named.count
+              : isNumber(options.named.n)
+                  ? options.named.n
+                  : index
+          : index;
+  }
+  function normalizeNamed(pluralIndex, props) {
+      if (!props.count) {
+          props.count = pluralIndex;
+      }
+      if (!props.n) {
+          props.n = pluralIndex;
+      }
+  }
+  function createMessageContext(options = {}) {
+      const locale = options.locale;
+      const pluralIndex = getPluralIndex(options);
+      const pluralRule = isObject(options.pluralRules) &&
+          isString(locale) &&
+          isFunction(options.pluralRules[locale])
+          ? options.pluralRules[locale]
+          : pluralDefault;
+      const orgPluralRule = isObject(options.pluralRules) &&
+          isString(locale) &&
+          isFunction(options.pluralRules[locale])
+          ? pluralDefault
+          : undefined;
+      const plural = (messages) => {
+          return messages[pluralRule(pluralIndex, messages.length, orgPluralRule)];
+      };
+      const _list = options.list || [];
+      const list = (index) => _list[index];
+      // eslint-disable-next-line @typescript-eslint/no-explicit-any
+      const _named = options.named || {};
+      isNumber(options.pluralIndex) && normalizeNamed(pluralIndex, _named);
+      const named = (key) => _named[key];
+      function message(key) {
+          // prettier-ignore
+          const msg = isFunction(options.messages)
+              ? options.messages(key)
+              : isObject(options.messages)
+                  ? options.messages[key]
+                  : false;
+          return !msg
+              ? options.parent
+                  ? options.parent.message(key) // resolve from parent messages
+                  : DEFAULT_MESSAGE
+              : msg;
+      }
+      const _modifier = (name) => options.modifiers
+          ? options.modifiers[name]
+          : DEFAULT_MODIFIER;
+      const normalize = isPlainObject(options.processor) && isFunction(options.processor.normalize)
+          ? options.processor.normalize
+          : DEFAULT_NORMALIZE;
+      const interpolate = isPlainObject(options.processor) &&
+          isFunction(options.processor.interpolate)
+          ? options.processor.interpolate
+          : DEFAULT_INTERPOLATE;
+      const type = isPlainObject(options.processor) && isString(options.processor.type)
+          ? options.processor.type
+          : DEFAULT_MESSAGE_DATA_TYPE;
+      const linked = (key, ...args) => {
+          const [arg1, arg2] = args;
+          let type = 'text';
+          let modifier = '';
+          if (args.length === 1) {
+              if (isObject(arg1)) {
+                  modifier = arg1.modifier || modifier;
+                  type = arg1.type || type;
+              }
+              else if (isString(arg1)) {
+                  modifier = arg1 || modifier;
+              }
+          }
+          else if (args.length === 2) {
+              if (isString(arg1)) {
+                  modifier = arg1 || modifier;
+              }
+              if (isString(arg2)) {
+                  type = arg2 || type;
+              }
+          }
+          const ret = message(key)(ctx);
+          const msg = 
+          // The message in vnode resolved with linked are returned as an array by processor.nomalize
+          type === 'vnode' && isArray(ret) && modifier
+              ? ret[0]
+              : ret;
+          return modifier ? _modifier(modifier)(msg, type) : msg;
+      };
+      const ctx = {
+          ["list" /* HelperNameMap.LIST */]: list,
+          ["named" /* HelperNameMap.NAMED */]: named,
+          ["plural" /* HelperNameMap.PLURAL */]: plural,
+          ["linked" /* HelperNameMap.LINKED */]: linked,
+          ["message" /* HelperNameMap.MESSAGE */]: message,
+          ["type" /* HelperNameMap.TYPE */]: type,
+          ["interpolate" /* HelperNameMap.INTERPOLATE */]: interpolate,
+          ["normalize" /* HelperNameMap.NORMALIZE */]: normalize,
+          ["values" /* HelperNameMap.VALUES */]: assign({}, _list, _named)
+      };
+      return ctx;
+  }
+
+  let devtools = null;
+  function setDevToolsHook(hook) {
+      devtools = hook;
+  }
+  function getDevToolsHook() {
+      return devtools;
+  }
+  function initI18nDevTools(i18n, version, meta) {
+      // TODO: queue if devtools is undefined
+      devtools &&
+          devtools.emit("i18n:init" /* IntlifyDevToolsHooks.I18nInit */, {
+              timestamp: Date.now(),
+              i18n,
+              version,
+              meta
+          });
+  }
+  const translateDevTools = /* #__PURE__*/ createDevToolsHook("function:translate" /* IntlifyDevToolsHooks.FunctionTranslate */);
+  function createDevToolsHook(hook) {
+      return (payloads) => devtools && devtools.emit(hook, payloads);
+  }
+
+  const code$1 = CompileWarnCodes.__EXTEND_POINT__;
+  const inc$1 = incrementer(code$1);
+  const CoreWarnCodes = {
+      NOT_FOUND_KEY: code$1, // 2
+      FALLBACK_TO_TRANSLATE: inc$1(), // 3
+      CANNOT_FORMAT_NUMBER: inc$1(), // 4
+      FALLBACK_TO_NUMBER_FORMAT: inc$1(), // 5
+      CANNOT_FORMAT_DATE: inc$1(), // 6
+      FALLBACK_TO_DATE_FORMAT: inc$1(), // 7
+      EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER: inc$1(), // 8
+      __EXTEND_POINT__: inc$1() // 9
+  };
+  /** @internal */
+  const warnMessages = {
+      [CoreWarnCodes.NOT_FOUND_KEY]: `Not found '{key}' key in '{locale}' locale messages.`,
+      [CoreWarnCodes.FALLBACK_TO_TRANSLATE]: `Fall back to translate '{key}' key with '{target}' locale.`,
+      [CoreWarnCodes.CANNOT_FORMAT_NUMBER]: `Cannot format a number value due to not supported Intl.NumberFormat.`,
+      [CoreWarnCodes.FALLBACK_TO_NUMBER_FORMAT]: `Fall back to number format '{key}' key with '{target}' locale.`,
+      [CoreWarnCodes.CANNOT_FORMAT_DATE]: `Cannot format a date value due to not supported Intl.DateTimeFormat.`,
+      [CoreWarnCodes.FALLBACK_TO_DATE_FORMAT]: `Fall back to datetime format '{key}' key with '{target}' locale.`,
+      [CoreWarnCodes.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER]: `This project is using Custom Message Compiler, which is an experimental feature. It may receive breaking changes or be removed in the future.`
+  };
+  function getWarnMessage(code, ...args) {
+      return format$1(warnMessages[code], ...args);
+  }
+
+  const code = CompileErrorCodes.__EXTEND_POINT__;
+  const inc = incrementer(code);
+  const CoreErrorCodes = {
+      INVALID_ARGUMENT: code, // 17
+      INVALID_DATE_ARGUMENT: inc(), // 18
+      INVALID_ISO_DATE_ARGUMENT: inc(), // 19
+      NOT_SUPPORT_NON_STRING_MESSAGE: inc(), // 20
+      NOT_SUPPORT_LOCALE_PROMISE_VALUE: inc(), // 21
+      NOT_SUPPORT_LOCALE_ASYNC_FUNCTION: inc(), // 22
+      NOT_SUPPORT_LOCALE_TYPE: inc(), // 23
+      __EXTEND_POINT__: inc() // 24
+  };
+  function createCoreError(code) {
+      return createCompileError(code, null, { messages: errorMessages } );
+  }
+  /** @internal */
+  const errorMessages = {
+      [CoreErrorCodes.INVALID_ARGUMENT]: 'Invalid arguments',
+      [CoreErrorCodes.INVALID_DATE_ARGUMENT]: 'The date provided is an invalid Date object.' +
+          'Make sure your Date represents a valid date.',
+      [CoreErrorCodes.INVALID_ISO_DATE_ARGUMENT]: 'The argument provided is not a valid ISO date string',
+      [CoreErrorCodes.NOT_SUPPORT_NON_STRING_MESSAGE]: 'Not support non-string message',
+      [CoreErrorCodes.NOT_SUPPORT_LOCALE_PROMISE_VALUE]: 'cannot support promise value',
+      [CoreErrorCodes.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION]: 'cannot support async function',
+      [CoreErrorCodes.NOT_SUPPORT_LOCALE_TYPE]: 'cannot support locale type'
+  };
+
+  /** @internal */
+  function getLocale(context, options) {
+      return options.locale != null
+          ? resolveLocale(options.locale)
+          : resolveLocale(context.locale);
+  }
+  let _resolveLocale;
+  /** @internal */
+  function resolveLocale(locale) {
+      if (isString(locale)) {
+          return locale;
+      }
+      else {
+          if (isFunction(locale)) {
+              if (locale.resolvedOnce && _resolveLocale != null) {
+                  return _resolveLocale;
+              }
+              else if (locale.constructor.name === 'Function') {
+                  const resolve = locale();
+                  if (isPromise(resolve)) {
+                      throw createCoreError(CoreErrorCodes.NOT_SUPPORT_LOCALE_PROMISE_VALUE);
+                  }
+                  return (_resolveLocale = resolve);
+              }
+              else {
+                  throw createCoreError(CoreErrorCodes.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION);
+              }
+          }
+          else {
+              throw createCoreError(CoreErrorCodes.NOT_SUPPORT_LOCALE_TYPE);
+          }
+      }
+  }
+  /**
+   * Fallback with simple implemenation
+   *
+   * @remarks
+   * A fallback locale function implemented with a simple fallback algorithm.
+   *
+   * Basically, it returns the value as specified in the `fallbackLocale` props, and is processed with the fallback inside intlify.
+   *
+   * @param ctx - A {@link CoreContext | context}
+   * @param fallback - A {@link FallbackLocale | fallback locale}
+   * @param start - A starting {@link Locale | locale}
+   *
+   * @returns Fallback locales
+   *
+   * @VueI18nGeneral
+   */
+  function fallbackWithSimple(ctx, fallback, start // eslint-disable-line @typescript-eslint/no-unused-vars
+  ) {
+      // prettier-ignore
+      return [...new Set([
+              start,
+              ...(isArray(fallback)
+                  ? fallback
+                  : isObject(fallback)
+                      ? Object.keys(fallback)
+                      : isString(fallback)
+                          ? [fallback]
+                          : [start])
+          ])];
+  }
+  /**
+   * Fallback with locale chain
+   *
+   * @remarks
+   * A fallback locale function implemented with a fallback chain algorithm. It's used in VueI18n as default.
+   *
+   * @param ctx - A {@link CoreContext | context}
+   * @param fallback - A {@link FallbackLocale | fallback locale}
+   * @param start - A starting {@link Locale | locale}
+   *
+   * @returns Fallback locales
+   *
+   * @VueI18nSee [Fallbacking](../guide/essentials/fallback)
+   *
+   * @VueI18nGeneral
+   */
+  function fallbackWithLocaleChain(ctx, fallback, start) {
+      const startLocale = isString(start) ? start : DEFAULT_LOCALE;
+      const context = ctx;
+      if (!context.__localeChainCache) {
+          context.__localeChainCache = new Map();
+      }
+      let chain = context.__localeChainCache.get(startLocale);
+      if (!chain) {
+          chain = [];
+          // first block defined by start
+          let block = [start];
+          // while any intervening block found
+          while (isArray(block)) {
+              block = appendBlockToChain(chain, block, fallback);
+          }
+          // prettier-ignore
+          // last block defined by default
+          const defaults = isArray(fallback) || !isPlainObject(fallback)
+              ? fallback
+              : fallback['default']
+                  ? fallback['default']
+                  : null;
+          // convert defaults to array
+          block = isString(defaults) ? [defaults] : defaults;
+          if (isArray(block)) {
+              appendBlockToChain(chain, block, false);
+          }
+          context.__localeChainCache.set(startLocale, chain);
+      }
+      return chain;
+  }
+  function appendBlockToChain(chain, block, blocks) {
+      let follow = true;
+      for (let i = 0; i < block.length && isBoolean(follow); i++) {
+          const locale = block[i];
+          if (isString(locale)) {
+              follow = appendLocaleToChain(chain, block[i], blocks);
+          }
+      }
+      return follow;
+  }
+  function appendLocaleToChain(chain, locale, blocks) {
+      let follow;
+      const tokens = locale.split('-');
+      do {
+          const target = tokens.join('-');
+          follow = appendItemToChain(chain, target, blocks);
+          tokens.splice(-1, 1);
+      } while (tokens.length && follow === true);
+      return follow;
+  }
+  function appendItemToChain(chain, target, blocks) {
+      let follow = false;
+      if (!chain.includes(target)) {
+          follow = true;
+          if (target) {
+              follow = target[target.length - 1] !== '!';
+              const locale = target.replace(/!/g, '');
+              chain.push(locale);
+              if ((isArray(blocks) || isPlainObject(blocks)) &&
+                  blocks[locale] // eslint-disable-line @typescript-eslint/no-explicit-any
+              ) {
+                  // eslint-disable-next-line @typescript-eslint/no-explicit-any
+                  follow = blocks[locale];
+              }
+          }
+      }
+      return follow;
+  }
+
+  /* eslint-disable @typescript-eslint/no-explicit-any */
+  /**
+   * Intlify core-base version
+   * @internal
+   */
+  const VERSION = '9.13.1';
+  const NOT_REOSLVED = -1;
+  const DEFAULT_LOCALE = 'en-US';
+  const MISSING_RESOLVE_VALUE = '';
+  const capitalize = (str) => `${str.charAt(0).toLocaleUpperCase()}${str.substr(1)}`;
+  function getDefaultLinkedModifiers() {
+      return {
+          upper: (val, type) => {
+              // prettier-ignore
+              return type === 'text' && isString(val)
+                  ? val.toUpperCase()
+                  : type === 'vnode' && isObject(val) && '__v_isVNode' in val
+                      ? val.children.toUpperCase()
+                      : val;
+          },
+          lower: (val, type) => {
+              // prettier-ignore
+              return type === 'text' && isString(val)
+                  ? val.toLowerCase()
+                  : type === 'vnode' && isObject(val) && '__v_isVNode' in val
+                      ? val.children.toLowerCase()
+                      : val;
+          },
+          capitalize: (val, type) => {
+              // prettier-ignore
+              return (type === 'text' && isString(val)
+                  ? capitalize(val)
+                  : type === 'vnode' && isObject(val) && '__v_isVNode' in val
+                      ? capitalize(val.children)
+                      : val);
+          }
+      };
+  }
+  let _compiler;
+  function registerMessageCompiler(compiler) {
+      _compiler = compiler;
+  }
+  let _resolver;
+  /**
+   * Register the message resolver
+   *
+   * @param resolver - A {@link MessageResolver} function
+   *
+   * @VueI18nGeneral
+   */
+  function registerMessageResolver(resolver) {
+      _resolver = resolver;
+  }
+  let _fallbacker;
+  /**
+   * Register the locale fallbacker
+   *
+   * @param fallbacker - A {@link LocaleFallbacker} function
+   *
+   * @VueI18nGeneral
+   */
+  function registerLocaleFallbacker(fallbacker) {
+      _fallbacker = fallbacker;
+  }
+  // Additional Meta for Intlify DevTools
+  let _additionalMeta =  null;
+  /* #__NO_SIDE_EFFECTS__ */
+  const setAdditionalMeta = (meta) => {
+      _additionalMeta = meta;
+  };
+  /* #__NO_SIDE_EFFECTS__ */
+  const getAdditionalMeta = () => _additionalMeta;
+  let _fallbackContext = null;
+  const setFallbackContext = (context) => {
+      _fallbackContext = context;
+  };
+  const getFallbackContext = () => _fallbackContext;
+  // ID for CoreContext
+  let _cid = 0;
+  function createCoreContext(options = {}) {
+      // setup options
+      const onWarn = isFunction(options.onWarn) ? options.onWarn : warn;
+      const version = isString(options.version) ? options.version : VERSION;
+      const locale = isString(options.locale) || isFunction(options.locale)
+          ? options.locale
+          : DEFAULT_LOCALE;
+      const _locale = isFunction(locale) ? DEFAULT_LOCALE : locale;
+      const fallbackLocale = isArray(options.fallbackLocale) ||
+          isPlainObject(options.fallbackLocale) ||
+          isString(options.fallbackLocale) ||
+          options.fallbackLocale === false
+          ? options.fallbackLocale
+          : _locale;
+      const messages = isPlainObject(options.messages)
+          ? options.messages
+          : { [_locale]: {} };
+      const datetimeFormats = isPlainObject(options.datetimeFormats)
+              ? options.datetimeFormats
+              : { [_locale]: {} }
+          ;
+      const numberFormats = isPlainObject(options.numberFormats)
+              ? options.numberFormats
+              : { [_locale]: {} }
+          ;
+      const modifiers = assign({}, options.modifiers || {}, getDefaultLinkedModifiers());
+      const pluralRules = options.pluralRules || {};
+      const missing = isFunction(options.missing) ? options.missing : null;
+      const missingWarn = isBoolean(options.missingWarn) || isRegExp(options.missingWarn)
+          ? options.missingWarn
+          : true;
+      const fallbackWarn = isBoolean(options.fallbackWarn) || isRegExp(options.fallbackWarn)
+          ? options.fallbackWarn
+          : true;
+      const fallbackFormat = !!options.fallbackFormat;
+      const unresolving = !!options.unresolving;
+      const postTranslation = isFunction(options.postTranslation)
+          ? options.postTranslation
+          : null;
+      const processor = isPlainObject(options.processor) ? options.processor : null;
+      const warnHtmlMessage = isBoolean(options.warnHtmlMessage)
+          ? options.warnHtmlMessage
+          : true;
+      const escapeParameter = !!options.escapeParameter;
+      const messageCompiler = isFunction(options.messageCompiler)
+          ? options.messageCompiler
+          : _compiler;
+      const messageResolver = isFunction(options.messageResolver)
+          ? options.messageResolver
+          : _resolver || resolveWithKeyValue;
+      const localeFallbacker = isFunction(options.localeFallbacker)
+          ? options.localeFallbacker
+          : _fallbacker || fallbackWithSimple;
+      const fallbackContext = isObject(options.fallbackContext)
+          ? options.fallbackContext
+          : undefined;
+      // setup internal options
+      const internalOptions = options;
+      const __datetimeFormatters = isObject(internalOptions.__datetimeFormatters)
+              ? internalOptions.__datetimeFormatters
+              : new Map()
+          ;
+      const __numberFormatters = isObject(internalOptions.__numberFormatters)
+              ? internalOptions.__numberFormatters
+              : new Map()
+          ;
+      const __meta = isObject(internalOptions.__meta) ? internalOptions.__meta : {};
+      _cid++;
+      const context = {
+          version,
+          cid: _cid,
+          locale,
+          fallbackLocale,
+          messages,
+          modifiers,
+          pluralRules,
+          missing,
+          missingWarn,
+          fallbackWarn,
+          fallbackFormat,
+          unresolving,
+          postTranslation,
+          processor,
+          warnHtmlMessage,
+          escapeParameter,
+          messageCompiler,
+          messageResolver,
+          localeFallbacker,
+          fallbackContext,
+          onWarn,
+          __meta
+      };
+      {
+          context.datetimeFormats = datetimeFormats;
+          context.numberFormats = numberFormats;
+          context.__datetimeFormatters = __datetimeFormatters;
+          context.__numberFormatters = __numberFormatters;
+      }
+      // for vue-devtools timeline event
+      {
+          context.__v_emitter =
+              internalOptions.__v_emitter != null
+                  ? internalOptions.__v_emitter
+                  : undefined;
+      }
+      // NOTE: experimental !!
+      {
+          initI18nDevTools(context, version, __meta);
+      }
+      return context;
+  }
+  /** @internal */
+  function isTranslateFallbackWarn(fallback, key) {
+      return fallback instanceof RegExp ? fallback.test(key) : fallback;
+  }
+  /** @internal */
+  function isTranslateMissingWarn(missing, key) {
+      return missing instanceof RegExp ? missing.test(key) : missing;
+  }
+  /** @internal */
+  function handleMissing(context, key, locale, missingWarn, type) {
+      const { missing, onWarn } = context;
+      // for vue-devtools timeline event
+      {
+          const emitter = context.__v_emitter;
+          if (emitter) {
+              emitter.emit("missing" /* VueDevToolsTimelineEvents.MISSING */, {
+                  locale,
+                  key,
+                  type,
+                  groupId: `${type}:${key}`
+              });
+          }
+      }
+      if (missing !== null) {
+          const ret = missing(context, locale, key, type);
+          return isString(ret) ? ret : key;
+      }
+      else {
+          if (isTranslateMissingWarn(missingWarn, key)) {
+              onWarn(getWarnMessage(CoreWarnCodes.NOT_FOUND_KEY, { key, locale }));
+          }
+          return key;
+      }
+  }
+  /** @internal */
+  function updateFallbackLocale(ctx, locale, fallback) {
+      const context = ctx;
+      context.__localeChainCache = new Map();
+      ctx.localeFallbacker(ctx, fallback, locale);
+  }
+  /** @internal */
+  function isAlmostSameLocale(locale, compareLocale) {
+      if (locale === compareLocale)
+          return false;
+      return locale.split('-')[0] === compareLocale.split('-')[0];
+  }
+  /** @internal */
+  function isImplicitFallback(targetLocale, locales) {
+      const index = locales.indexOf(targetLocale);
+      if (index === -1) {
+          return false;
+      }
+      for (let i = index + 1; i < locales.length; i++) {
+          if (isAlmostSameLocale(targetLocale, locales[i])) {
+              return true;
+          }
+      }
+      return false;
+  }
+  /* eslint-enable @typescript-eslint/no-explicit-any */
+
+  function format(ast) {
+      const msg = (ctx) => formatParts(ctx, ast);
+      return msg;
+  }
+  function formatParts(ctx, ast) {
+      const body = ast.b || ast.body;
+      if ((body.t || body.type) === 1 /* NodeTypes.Plural */) {
+          const plural = body;
+          const cases = plural.c || plural.cases;
+          return ctx.plural(cases.reduce((messages, c) => [
+              ...messages,
+              formatMessageParts(ctx, c)
+          ], []));
+      }
+      else {
+          return formatMessageParts(ctx, body);
+      }
+  }
+  function formatMessageParts(ctx, node) {
+      const _static = node.s || node.static;
+      if (_static) {
+          return ctx.type === 'text'
+              ? _static
+              : ctx.normalize([_static]);
+      }
+      else {
+          const messages = (node.i || node.items).reduce((acm, c) => [...acm, formatMessagePart(ctx, c)], []);
+          return ctx.normalize(messages);
+      }
+  }
+  function formatMessagePart(ctx, node) {
+      const type = node.t || node.type;
+      switch (type) {
+          case 3 /* NodeTypes.Text */: {
+              const text = node;
+              return (text.v || text.value);
+          }
+          case 9 /* NodeTypes.Literal */: {
+              const literal = node;
+              return (literal.v || literal.value);
+          }
+          case 4 /* NodeTypes.Named */: {
+              const named = node;
+              return ctx.interpolate(ctx.named(named.k || named.key));
+          }
+          case 5 /* NodeTypes.List */: {
+              const list = node;
+              return ctx.interpolate(ctx.list(list.i != null ? list.i : list.index));
+          }
+          case 6 /* NodeTypes.Linked */: {
+              const linked = node;
+              const modifier = linked.m || linked.modifier;
+              return ctx.linked(formatMessagePart(ctx, linked.k || linked.key), modifier ? formatMessagePart(ctx, modifier) : undefined, ctx.type);
+          }
+          case 7 /* NodeTypes.LinkedKey */: {
+              const linkedKey = node;
+              return (linkedKey.v || linkedKey.value);
+          }
+          case 8 /* NodeTypes.LinkedModifier */: {
+              const linkedModifier = node;
+              return (linkedModifier.v || linkedModifier.value);
+          }
+          default:
+              throw new Error(`unhandled node type on format message part: ${type}`);
+      }
+  }
+
+  const WARN_MESSAGE = `Detected HTML in '{source}' message. Recommend not using HTML messages to avoid XSS.`;
+  function checkHtmlMessage(source, warnHtmlMessage) {
+      if (warnHtmlMessage && detectHtmlTag(source)) {
+          warn(format$1(WARN_MESSAGE, { source }));
+      }
+  }
+  const defaultOnCacheKey = (message) => message;
+  let compileCache = Object.create(null);
+  function onCompileWarn(_warn) {
+      if (_warn.code === CompileWarnCodes.USE_MODULO_SYNTAX) {
+          warn(`The use of named interpolation with modulo syntax is deprecated. ` +
+              `It will be removed in v10.\n` +
+              `reference: https://vue-i18n.intlify.dev/guide/essentials/syntax#rails-i18n-format \n` +
+              `(message compiler warning message: ${_warn.message})`);
+      }
+  }
+  function clearCompileCache() {
+      compileCache = Object.create(null);
+  }
+  const isMessageAST = (val) => isObject(val) &&
+      (val.t === 0 || val.type === 0) &&
+      ('b' in val || 'body' in val);
+  function baseCompile(message, options = {}) {
+      // error detecting on compile
+      let detectError = false;
+      const onError = options.onError || defaultOnError;
+      options.onError = (err) => {
+          detectError = true;
+          onError(err);
+      };
+      // compile with mesasge-compiler
+      return { ...baseCompile$1(message, options), detectError };
+  }
+  /* #__NO_SIDE_EFFECTS__ */
+  const compileToFunction = (message, context) => {
+      if (!isString(message)) {
+          throw createCoreError(CoreErrorCodes.NOT_SUPPORT_NON_STRING_MESSAGE);
+      }
+      // set onWarn
+      {
+          context.onWarn = onCompileWarn;
+      }
+      {
+          // check HTML message
+          const warnHtmlMessage = isBoolean(context.warnHtmlMessage)
+              ? context.warnHtmlMessage
+              : true;
+          checkHtmlMessage(message, warnHtmlMessage);
+          // check caches
+          const onCacheKey = context.onCacheKey || defaultOnCacheKey;
+          const cacheKey = onCacheKey(message);
+          const cached = compileCache[cacheKey];
+          if (cached) {
+              return cached;
+          }
+          // compile
+          const { code, detectError } = baseCompile(message, context);
+          // evaluate function
+          const msg = new Function(`return ${code}`)();
+          // if occurred compile error, don't cache
+          return !detectError
+              ? (compileCache[cacheKey] = msg)
+              : msg;
+      }
+  };
+  function compile(message, context) {
+      // set onWarn
+      {
+          context.onWarn = onCompileWarn;
+      }
+      if (isString(message)) {
+          // check HTML message
+          const warnHtmlMessage = isBoolean(context.warnHtmlMessage)
+              ? context.warnHtmlMessage
+              : true;
+          checkHtmlMessage(message, warnHtmlMessage);
+          // check caches
+          const onCacheKey = context.onCacheKey || defaultOnCacheKey;
+          const cacheKey = onCacheKey(message);
+          const cached = compileCache[cacheKey];
+          if (cached) {
+              return cached;
+          }
+          // compile with JIT mode
+          const { ast, detectError } = baseCompile(message, {
+              ...context,
+              location: true,
+              jit: true
+          });
+          // compose message function from AST
+          const msg = format(ast);
+          // if occurred compile error, don't cache
+          return !detectError
+              ? (compileCache[cacheKey] = msg)
+              : msg;
+      }
+      else {
+          if (!isMessageAST(message)) {
+              warn(`the message that is resolve with key '${context.key}' is not supported for jit compilation`);
+              return (() => message);
+          }
+          // AST case (passed from bundler)
+          const cacheKey = message.cacheKey;
+          if (cacheKey) {
+              const cached = compileCache[cacheKey];
+              if (cached) {
+                  return cached;
+              }
+              // compose message function from message (AST)
+              return (compileCache[cacheKey] =
+                  format(message));
+          }
+          else {
+              return format(message);
+          }
+      }
+  }
+
+  const NOOP_MESSAGE_FUNCTION = () => '';
+  const isMessageFunction = (val) => isFunction(val);
+  // implementation of `translate` function
+  function translate(context, ...args) {
+      const { fallbackFormat, postTranslation, unresolving, messageCompiler, fallbackLocale, messages } = context;
+      const [key, options] = parseTranslateArgs(...args);
+      const missingWarn = isBoolean(options.missingWarn)
+          ? options.missingWarn
+          : context.missingWarn;
+      const fallbackWarn = isBoolean(options.fallbackWarn)
+          ? options.fallbackWarn
+          : context.fallbackWarn;
+      const escapeParameter = isBoolean(options.escapeParameter)
+          ? options.escapeParameter
+          : context.escapeParameter;
+      const resolvedMessage = !!options.resolvedMessage;
+      // prettier-ignore
+      const defaultMsgOrKey = isString(options.default) || isBoolean(options.default) // default by function option
+          ? !isBoolean(options.default)
+              ? options.default
+              : (!messageCompiler ? () => key : key)
+          : fallbackFormat // default by `fallbackFormat` option
+              ? (!messageCompiler ? () => key : key)
+              : '';
+      const enableDefaultMsg = fallbackFormat || defaultMsgOrKey !== '';
+      const locale = getLocale(context, options);
+      // escape params
+      escapeParameter && escapeParams(options);
+      // resolve message format
+      // eslint-disable-next-line prefer-const
+      let [formatScope, targetLocale, message] = !resolvedMessage
+          ? resolveMessageFormat(context, key, locale, fallbackLocale, fallbackWarn, missingWarn)
+          : [
+              key,
+              locale,
+              messages[locale] || {}
+          ];
+      // NOTE:
+      //  Fix to work around `ssrTransfrom` bug in Vite.
+      //  https://github.com/vitejs/vite/issues/4306
+      //  To get around this, use temporary variables.
+      //  https://github.com/nuxt/framework/issues/1461#issuecomment-954606243
+      let format = formatScope;
+      // if you use default message, set it as message format!
+      let cacheBaseKey = key;
+      if (!resolvedMessage &&
+          !(isString(format) ||
+              isMessageAST(format) ||
+              isMessageFunction(format))) {
+          if (enableDefaultMsg) {
+              format = defaultMsgOrKey;
+              cacheBaseKey = format;
+          }
+      }
+      // checking message format and target locale
+      if (!resolvedMessage &&
+          (!(isString(format) ||
+              isMessageAST(format) ||
+              isMessageFunction(format)) ||
+              !isString(targetLocale))) {
+          return unresolving ? NOT_REOSLVED : key;
+      }
+      // TODO: refactor
+      if (isString(format) && context.messageCompiler == null) {
+          warn(`The message format compilation is not supported in this build. ` +
+              `Because message compiler isn't included. ` +
+              `You need to pre-compilation all message format. ` +
+              `So translate function return '${key}'.`);
+          return key;
+      }
+      // setup compile error detecting
+      let occurred = false;
+      const onError = () => {
+          occurred = true;
+      };
+      // compile message format
+      const msg = !isMessageFunction(format)
+          ? compileMessageFormat(context, key, targetLocale, format, cacheBaseKey, onError)
+          : format;
+      // if occurred compile error, return the message format
+      if (occurred) {
+          return format;
+      }
+      // evaluate message with context
+      const ctxOptions = getMessageContextOptions(context, targetLocale, message, options);
+      const msgContext = createMessageContext(ctxOptions);
+      const messaged = evaluateMessage(context, msg, msgContext);
+      // if use post translation option, proceed it with handler
+      const ret = postTranslation
+          ? postTranslation(messaged, key)
+          : messaged;
+      // NOTE: experimental !!
+      {
+          // prettier-ignore
+          const payloads = {
+              timestamp: Date.now(),
+              key: isString(key)
+                  ? key
+                  : isMessageFunction(format)
+                      ? format.key
+                      : '',
+              locale: targetLocale || (isMessageFunction(format)
+                  ? format.locale
+                  : ''),
+              format: isString(format)
+                  ? format
+                  : isMessageFunction(format)
+                      ? format.source
+                      : '',
+              message: ret
+          };
+          payloads.meta = assign({}, context.__meta, getAdditionalMeta() || {});
+          translateDevTools(payloads);
+      }
+      return ret;
+  }
+  function escapeParams(options) {
+      if (isArray(options.list)) {
+          options.list = options.list.map(item => isString(item) ? escapeHtml(item) : item);
+      }
+      else if (isObject(options.named)) {
+          Object.keys(options.named).forEach(key => {
+              if (isString(options.named[key])) {
+                  options.named[key] = escapeHtml(options.named[key]);
+              }
+          });
+      }
+  }
+  function resolveMessageFormat(context, key, locale, fallbackLocale, fallbackWarn, missingWarn) {
+      const { messages, onWarn, messageResolver: resolveValue, localeFallbacker } = context;
+      const locales = localeFallbacker(context, fallbackLocale, locale); // eslint-disable-line @typescript-eslint/no-explicit-any
+      let message = {};
+      let targetLocale;
+      let format = null;
+      let from = locale;
+      let to = null;
+      const type = 'translate';
+      for (let i = 0; i < locales.length; i++) {
+          targetLocale = to = locales[i];
+          if (locale !== targetLocale &&
+              !isAlmostSameLocale(locale, targetLocale) &&
+              isTranslateFallbackWarn(fallbackWarn, key)) {
+              onWarn(getWarnMessage(CoreWarnCodes.FALLBACK_TO_TRANSLATE, {
+                  key,
+                  target: targetLocale
+              }));
+          }
+          // for vue-devtools timeline event
+          if (locale !== targetLocale) {
+              const emitter = context.__v_emitter;
+              if (emitter) {
+                  emitter.emit("fallback" /* VueDevToolsTimelineEvents.FALBACK */, {
+                      type,
+                      key,
+                      from,
+                      to,
+                      groupId: `${type}:${key}`
+                  });
+              }
+          }
+          message =
+              messages[targetLocale] || {};
+          // for vue-devtools timeline event
+          let start = null;
+          let startTag;
+          let endTag;
+          if (inBrowser) {
+              start = window.performance.now();
+              startTag = 'intlify-message-resolve-start';
+              endTag = 'intlify-message-resolve-end';
+              mark && mark(startTag);
+          }
+          if ((format = resolveValue(message, key)) === null) {
+              // if null, resolve with object key path
+              format = message[key]; // eslint-disable-line @typescript-eslint/no-explicit-any
+          }
+          // for vue-devtools timeline event
+          if (inBrowser) {
+              const end = window.performance.now();
+              const emitter = context.__v_emitter;
+              if (emitter && start && format) {
+                  emitter.emit("message-resolve" /* VueDevToolsTimelineEvents.MESSAGE_RESOLVE */, {
+                      type: "message-resolve" /* VueDevToolsTimelineEvents.MESSAGE_RESOLVE */,
+                      key,
+                      message: format,
+                      time: end - start,
+                      groupId: `${type}:${key}`
+                  });
+              }
+              if (startTag && endTag && mark && measure) {
+                  mark(endTag);
+                  measure('intlify message resolve', startTag, endTag);
+              }
+          }
+          if (isString(format) || isMessageAST(format) || isMessageFunction(format)) {
+              break;
+          }
+          if (!isImplicitFallback(targetLocale, locales)) {
+              const missingRet = handleMissing(context, // eslint-disable-line @typescript-eslint/no-explicit-any
+              key, targetLocale, missingWarn, type);
+              if (missingRet !== key) {
+                  format = missingRet;
+              }
+          }
+          from = to;
+      }
+      return [format, targetLocale, message];
+  }
+  function compileMessageFormat(context, key, targetLocale, format, cacheBaseKey, onError) {
+      const { messageCompiler, warnHtmlMessage } = context;
+      if (isMessageFunction(format)) {
+          const msg = format;
+          msg.locale = msg.locale || targetLocale;
+          msg.key = msg.key || key;
+          return msg;
+      }
+      if (messageCompiler == null) {
+          const msg = (() => format);
+          msg.locale = targetLocale;
+          msg.key = key;
+          return msg;
+      }
+      // for vue-devtools timeline event
+      let start = null;
+      let startTag;
+      let endTag;
+      if (inBrowser) {
+          start = window.performance.now();
+          startTag = 'intlify-message-compilation-start';
+          endTag = 'intlify-message-compilation-end';
+          mark && mark(startTag);
+      }
+      const msg = messageCompiler(format, getCompileContext(context, targetLocale, cacheBaseKey, format, warnHtmlMessage, onError));
+      // for vue-devtools timeline event
+      if (inBrowser) {
+          const end = window.performance.now();
+          const emitter = context.__v_emitter;
+          if (emitter && start) {
+              emitter.emit("message-compilation" /* VueDevToolsTimelineEvents.MESSAGE_COMPILATION */, {
+                  type: "message-compilation" /* VueDevToolsTimelineEvents.MESSAGE_COMPILATION */,
+                  message: format,
+                  time: end - start,
+                  groupId: `${'translate'}:${key}`
+              });
+          }
+          if (startTag && endTag && mark && measure) {
+              mark(endTag);
+              measure('intlify message compilation', startTag, endTag);
+          }
+      }
+      msg.locale = targetLocale;
+      msg.key = key;
+      msg.source = format;
+      return msg;
+  }
+  function evaluateMessage(context, msg, msgCtx) {
+      // for vue-devtools timeline event
+      let start = null;
+      let startTag;
+      let endTag;
+      if (inBrowser) {
+          start = window.performance.now();
+          startTag = 'intlify-message-evaluation-start';
+          endTag = 'intlify-message-evaluation-end';
+          mark && mark(startTag);
+      }
+      const messaged = msg(msgCtx);
+      // for vue-devtools timeline event
+      if (inBrowser) {
+          const end = window.performance.now();
+          const emitter = context.__v_emitter;
+          if (emitter && start) {
+              emitter.emit("message-evaluation" /* VueDevToolsTimelineEvents.MESSAGE_EVALUATION */, {
+                  type: "message-evaluation" /* VueDevToolsTimelineEvents.MESSAGE_EVALUATION */,
+                  value: messaged,
+                  time: end - start,
+                  groupId: `${'translate'}:${msg.key}`
+              });
+          }
+          if (startTag && endTag && mark && measure) {
+              mark(endTag);
+              measure('intlify message evaluation', startTag, endTag);
+          }
+      }
+      return messaged;
+  }
+  /** @internal */
+  function parseTranslateArgs(...args) {
+      const [arg1, arg2, arg3] = args;
+      const options = {};
+      if (!isString(arg1) &&
+          !isNumber(arg1) &&
+          !isMessageFunction(arg1) &&
+          !isMessageAST(arg1)) {
+          throw createCoreError(CoreErrorCodes.INVALID_ARGUMENT);
+      }
+      // prettier-ignore
+      const key = isNumber(arg1)
+          ? String(arg1)
+          : isMessageFunction(arg1)
+              ? arg1
+              : arg1;
+      if (isNumber(arg2)) {
+          options.plural = arg2;
+      }
+      else if (isString(arg2)) {
+          options.default = arg2;
+      }
+      else if (isPlainObject(arg2) && !isEmptyObject(arg2)) {
+          options.named = arg2;
+      }
+      else if (isArray(arg2)) {
+          options.list = arg2;
+      }
+      if (isNumber(arg3)) {
+          options.plural = arg3;
+      }
+      else if (isString(arg3)) {
+          options.default = arg3;
+      }
+      else if (isPlainObject(arg3)) {
+          assign(options, arg3);
+      }
+      return [key, options];
+  }
+  function getCompileContext(context, locale, key, source, warnHtmlMessage, onError) {
+      return {
+          locale,
+          key,
+          warnHtmlMessage,
+          onError: (err) => {
+              onError && onError(err);
+              {
+                  const _source = getSourceForCodeFrame(source);
+                  const message = `Message compilation error: ${err.message}`;
+                  const codeFrame = err.location &&
+                      _source &&
+                      generateCodeFrame(_source, err.location.start.offset, err.location.end.offset);
+                  const emitter = context.__v_emitter;
+                  if (emitter && _source) {
+                      emitter.emit("compile-error" /* VueDevToolsTimelineEvents.COMPILE_ERROR */, {
+                          message: _source,
+                          error: err.message,
+                          start: err.location && err.location.start.offset,
+                          end: err.location && err.location.end.offset,
+                          groupId: `${'translate'}:${key}`
+                      });
+                  }
+                  console.error(codeFrame ? `${message}\n${codeFrame}` : message);
+              }
+          },
+          onCacheKey: (source) => generateFormatCacheKey(locale, key, source)
+      };
+  }
+  function getSourceForCodeFrame(source) {
+      if (isString(source)) {
+          return source;
+      }
+      else {
+          if (source.loc && source.loc.source) {
+              return source.loc.source;
+          }
+      }
+  }
+  function getMessageContextOptions(context, locale, message, options) {
+      const { modifiers, pluralRules, messageResolver: resolveValue, fallbackLocale, fallbackWarn, missingWarn, fallbackContext } = context;
+      const resolveMessage = (key) => {
+          let val = resolveValue(message, key);
+          // fallback to root context
+          if (val == null && fallbackContext) {
+              const [, , message] = resolveMessageFormat(fallbackContext, key, locale, fallbackLocale, fallbackWarn, missingWarn);
+              val = resolveValue(message, key);
+          }
+          if (isString(val) || isMessageAST(val)) {
+              let occurred = false;
+              const onError = () => {
+                  occurred = true;
+              };
+              const msg = compileMessageFormat(context, key, locale, val, key, onError);
+              return !occurred
+                  ? msg
+                  : NOOP_MESSAGE_FUNCTION;
+          }
+          else if (isMessageFunction(val)) {
+              return val;
+          }
+          else {
+              // TODO: should be implemented warning message
+              return NOOP_MESSAGE_FUNCTION;
+          }
+      };
+      const ctxOptions = {
+          locale,
+          modifiers,
+          pluralRules,
+          messages: resolveMessage
+      };
+      if (context.processor) {
+          ctxOptions.processor = context.processor;
+      }
+      if (options.list) {
+          ctxOptions.list = options.list;
+      }
+      if (options.named) {
+          ctxOptions.named = options.named;
+      }
+      if (isNumber(options.plural)) {
+          ctxOptions.pluralIndex = options.plural;
+      }
+      return ctxOptions;
+  }
+
+  const intlDefined = typeof Intl !== 'undefined';
+  const Availabilities = {
+      dateTimeFormat: intlDefined && typeof Intl.DateTimeFormat !== 'undefined',
+      numberFormat: intlDefined && typeof Intl.NumberFormat !== 'undefined'
+  };
+
+  // implementation of `datetime` function
+  function datetime(context, ...args) {
+      const { datetimeFormats, unresolving, fallbackLocale, onWarn, localeFallbacker } = context;
+      const { __datetimeFormatters } = context;
+      if (!Availabilities.dateTimeFormat) {
+          onWarn(getWarnMessage(CoreWarnCodes.CANNOT_FORMAT_DATE));
+          return MISSING_RESOLVE_VALUE;
+      }
+      const [key, value, options, overrides] = parseDateTimeArgs(...args);
+      const missingWarn = isBoolean(options.missingWarn)
+          ? options.missingWarn
+          : context.missingWarn;
+      const fallbackWarn = isBoolean(options.fallbackWarn)
+          ? options.fallbackWarn
+          : context.fallbackWarn;
+      const part = !!options.part;
+      const locale = getLocale(context, options);
+      const locales = localeFallbacker(context, // eslint-disable-line @typescript-eslint/no-explicit-any
+      fallbackLocale, locale);
+      if (!isString(key) || key === '') {
+          return new Intl.DateTimeFormat(locale, overrides).format(value);
+      }
+      // resolve format
+      let datetimeFormat = {};
+      let targetLocale;
+      let format = null;
+      let from = locale;
+      let to = null;
+      const type = 'datetime format';
+      for (let i = 0; i < locales.length; i++) {
+          targetLocale = to = locales[i];
+          if (locale !== targetLocale &&
+              isTranslateFallbackWarn(fallbackWarn, key)) {
+              onWarn(getWarnMessage(CoreWarnCodes.FALLBACK_TO_DATE_FORMAT, {
+                  key,
+                  target: targetLocale
+              }));
+          }
+          // for vue-devtools timeline event
+          if (locale !== targetLocale) {
+              const emitter = context.__v_emitter;
+              if (emitter) {
+                  emitter.emit("fallback" /* VueDevToolsTimelineEvents.FALBACK */, {
+                      type,
+                      key,
+                      from,
+                      to,
+                      groupId: `${type}:${key}`
+                  });
+              }
+          }
+          datetimeFormat =
+              datetimeFormats[targetLocale] || {};
+          format = datetimeFormat[key];
+          if (isPlainObject(format))
+              break;
+          handleMissing(context, key, targetLocale, missingWarn, type); // eslint-disable-line @typescript-eslint/no-explicit-any
+          from = to;
+      }
+      // checking format and target locale
+      if (!isPlainObject(format) || !isString(targetLocale)) {
+          return unresolving ? NOT_REOSLVED : key;
+      }
+      let id = `${targetLocale}__${key}`;
+      if (!isEmptyObject(overrides)) {
+          id = `${id}__${JSON.stringify(overrides)}`;
+      }
+      let formatter = __datetimeFormatters.get(id);
+      if (!formatter) {
+          formatter = new Intl.DateTimeFormat(targetLocale, assign({}, format, overrides));
+          __datetimeFormatters.set(id, formatter);
+      }
+      return !part ? formatter.format(value) : formatter.formatToParts(value);
+  }
+  /** @internal */
+  const DATETIME_FORMAT_OPTIONS_KEYS = [
+      'localeMatcher',
+      'weekday',
+      'era',
+      'year',
+      'month',
+      'day',
+      'hour',
+      'minute',
+      'second',
+      'timeZoneName',
+      'formatMatcher',
+      'hour12',
+      'timeZone',
+      'dateStyle',
+      'timeStyle',
+      'calendar',
+      'dayPeriod',
+      'numberingSystem',
+      'hourCycle',
+      'fractionalSecondDigits'
+  ];
+  /** @internal */
+  function parseDateTimeArgs(...args) {
+      const [arg1, arg2, arg3, arg4] = args;
+      const options = {};
+      let overrides = {};
+      let value;
+      if (isString(arg1)) {
+          // Only allow ISO strings - other date formats are often supported,
+          // but may cause different results in different browsers.
+          const matches = arg1.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);
+          if (!matches) {
+              throw createCoreError(CoreErrorCodes.INVALID_ISO_DATE_ARGUMENT);
+          }
+          // Some browsers can not parse the iso datetime separated by space,
+          // this is a compromise solution by replace the 'T'/' ' with 'T'
+          const dateTime = matches[3]
+              ? matches[3].trim().startsWith('T')
+                  ? `${matches[1].trim()}${matches[3].trim()}`
+                  : `${matches[1].trim()}T${matches[3].trim()}`
+              : matches[1].trim();
+          value = new Date(dateTime);
+          try {
+              // This will fail if the date is not valid
+              value.toISOString();
+          }
+          catch (e) {
+              throw createCoreError(CoreErrorCodes.INVALID_ISO_DATE_ARGUMENT);
+          }
+      }
+      else if (isDate(arg1)) {
+          if (isNaN(arg1.getTime())) {
+              throw createCoreError(CoreErrorCodes.INVALID_DATE_ARGUMENT);
+          }
+          value = arg1;
+      }
+      else if (isNumber(arg1)) {
+          value = arg1;
+      }
+      else {
+          throw createCoreError(CoreErrorCodes.INVALID_ARGUMENT);
+      }
+      if (isString(arg2)) {
+          options.key = arg2;
+      }
+      else if (isPlainObject(arg2)) {
+          Object.keys(arg2).forEach(key => {
+              if (DATETIME_FORMAT_OPTIONS_KEYS.includes(key)) {
+                  overrides[key] = arg2[key];
+              }
+              else {
+                  options[key] = arg2[key];
+              }
+          });
+      }
+      if (isString(arg3)) {
+          options.locale = arg3;
+      }
+      else if (isPlainObject(arg3)) {
+          overrides = arg3;
+      }
+      if (isPlainObject(arg4)) {
+          overrides = arg4;
+      }
+      return [options.key || '', value, options, overrides];
+  }
+  /** @internal */
+  function clearDateTimeFormat(ctx, locale, format) {
+      const context = ctx;
+      for (const key in format) {
+          const id = `${locale}__${key}`;
+          if (!context.__datetimeFormatters.has(id)) {
+              continue;
+          }
+          context.__datetimeFormatters.delete(id);
+      }
+  }
+
+  // implementation of `number` function
+  function number(context, ...args) {
+      const { numberFormats, unresolving, fallbackLocale, onWarn, localeFallbacker } = context;
+      const { __numberFormatters } = context;
+      if (!Availabilities.numberFormat) {
+          onWarn(getWarnMessage(CoreWarnCodes.CANNOT_FORMAT_NUMBER));
+          return MISSING_RESOLVE_VALUE;
+      }
+      const [key, value, options, overrides] = parseNumberArgs(...args);
+      const missingWarn = isBoolean(options.missingWarn)
+          ? options.missingWarn
+          : context.missingWarn;
+      const fallbackWarn = isBoolean(options.fallbackWarn)
+          ? options.fallbackWarn
+          : context.fallbackWarn;
+      const part = !!options.part;
+      const locale = getLocale(context, options);
+      const locales = localeFallbacker(context, // eslint-disable-line @typescript-eslint/no-explicit-any
+      fallbackLocale, locale);
+      if (!isString(key) || key === '') {
+          return new Intl.NumberFormat(locale, overrides).format(value);
+      }
+      // resolve format
+      let numberFormat = {};
+      let targetLocale;
+      let format = null;
+      let from = locale;
+      let to = null;
+      const type = 'number format';
+      for (let i = 0; i < locales.length; i++) {
+          targetLocale = to = locales[i];
+          if (locale !== targetLocale &&
+              isTranslateFallbackWarn(fallbackWarn, key)) {
+              onWarn(getWarnMessage(CoreWarnCodes.FALLBACK_TO_NUMBER_FORMAT, {
+                  key,
+                  target: targetLocale
+              }));
+          }
+          // for vue-devtools timeline event
+          if (locale !== targetLocale) {
+              const emitter = context.__v_emitter;
+              if (emitter) {
+                  emitter.emit("fallback" /* VueDevToolsTimelineEvents.FALBACK */, {
+                      type,
+                      key,
+                      from,
+                      to,
+                      groupId: `${type}:${key}`
+                  });
+              }
+          }
+          numberFormat =
+              numberFormats[targetLocale] || {};
+          format = numberFormat[key];
+          if (isPlainObject(format))
+              break;
+          handleMissing(context, key, targetLocale, missingWarn, type); // eslint-disable-line @typescript-eslint/no-explicit-any
+          from = to;
+      }
+      // checking format and target locale
+      if (!isPlainObject(format) || !isString(targetLocale)) {
+          return unresolving ? NOT_REOSLVED : key;
+      }
+      let id = `${targetLocale}__${key}`;
+      if (!isEmptyObject(overrides)) {
+          id = `${id}__${JSON.stringify(overrides)}`;
+      }
+      let formatter = __numberFormatters.get(id);
+      if (!formatter) {
+          formatter = new Intl.NumberFormat(targetLocale, assign({}, format, overrides));
+          __numberFormatters.set(id, formatter);
+      }
+      return !part ? formatter.format(value) : formatter.formatToParts(value);
+  }
+  /** @internal */
+  const NUMBER_FORMAT_OPTIONS_KEYS = [
+      'localeMatcher',
+      'style',
+      'currency',
+      'currencyDisplay',
+      'currencySign',
+      'useGrouping',
+      'minimumIntegerDigits',
+      'minimumFractionDigits',
+      'maximumFractionDigits',
+      'minimumSignificantDigits',
+      'maximumSignificantDigits',
+      'compactDisplay',
+      'notation',
+      'signDisplay',
+      'unit',
+      'unitDisplay',
+      'roundingMode',
+      'roundingPriority',
+      'roundingIncrement',
+      'trailingZeroDisplay'
+  ];
+  /** @internal */
+  function parseNumberArgs(...args) {
+      const [arg1, arg2, arg3, arg4] = args;
+      const options = {};
+      let overrides = {};
+      if (!isNumber(arg1)) {
+          throw createCoreError(CoreErrorCodes.INVALID_ARGUMENT);
+      }
+      const value = arg1;
+      if (isString(arg2)) {
+          options.key = arg2;
+      }
+      else if (isPlainObject(arg2)) {
+          Object.keys(arg2).forEach(key => {
+              if (NUMBER_FORMAT_OPTIONS_KEYS.includes(key)) {
+                  overrides[key] = arg2[key];
+              }
+              else {
+                  options[key] = arg2[key];
+              }
+          });
+      }
+      if (isString(arg3)) {
+          options.locale = arg3;
+      }
+      else if (isPlainObject(arg3)) {
+          overrides = arg3;
+      }
+      if (isPlainObject(arg4)) {
+          overrides = arg4;
+      }
+      return [options.key || '', value, options, overrides];
+  }
+  /** @internal */
+  function clearNumberFormat(ctx, locale, format) {
+      const context = ctx;
+      for (const key in format) {
+          const id = `${locale}__${key}`;
+          if (!context.__numberFormatters.has(id)) {
+              continue;
+          }
+          context.__numberFormatters.delete(id);
+      }
+  }
+
+  exports.CompileErrorCodes = CompileErrorCodes;
+  exports.CoreErrorCodes = CoreErrorCodes;
+  exports.CoreWarnCodes = CoreWarnCodes;
+  exports.DATETIME_FORMAT_OPTIONS_KEYS = DATETIME_FORMAT_OPTIONS_KEYS;
+  exports.DEFAULT_LOCALE = DEFAULT_LOCALE;
+  exports.DEFAULT_MESSAGE_DATA_TYPE = DEFAULT_MESSAGE_DATA_TYPE;
+  exports.MISSING_RESOLVE_VALUE = MISSING_RESOLVE_VALUE;
+  exports.NOT_REOSLVED = NOT_REOSLVED;
+  exports.NUMBER_FORMAT_OPTIONS_KEYS = NUMBER_FORMAT_OPTIONS_KEYS;
+  exports.VERSION = VERSION;
+  exports.clearCompileCache = clearCompileCache;
+  exports.clearDateTimeFormat = clearDateTimeFormat;
+  exports.clearNumberFormat = clearNumberFormat;
+  exports.compile = compile;
+  exports.compileToFunction = compileToFunction;
+  exports.createCompileError = createCompileError;
+  exports.createCoreContext = createCoreContext;
+  exports.createCoreError = createCoreError;
+  exports.createMessageContext = createMessageContext;
+  exports.datetime = datetime;
+  exports.fallbackWithLocaleChain = fallbackWithLocaleChain;
+  exports.fallbackWithSimple = fallbackWithSimple;
+  exports.getAdditionalMeta = getAdditionalMeta;
+  exports.getDevToolsHook = getDevToolsHook;
+  exports.getFallbackContext = getFallbackContext;
+  exports.getLocale = getLocale;
+  exports.getWarnMessage = getWarnMessage;
+  exports.handleMissing = handleMissing;
+  exports.initI18nDevTools = initI18nDevTools;
+  exports.isAlmostSameLocale = isAlmostSameLocale;
+  exports.isImplicitFallback = isImplicitFallback;
+  exports.isMessageAST = isMessageAST;
+  exports.isMessageFunction = isMessageFunction;
+  exports.isTranslateFallbackWarn = isTranslateFallbackWarn;
+  exports.isTranslateMissingWarn = isTranslateMissingWarn;
+  exports.number = number;
+  exports.parse = parse;
+  exports.parseDateTimeArgs = parseDateTimeArgs;
+  exports.parseNumberArgs = parseNumberArgs;
+  exports.parseTranslateArgs = parseTranslateArgs;
+  exports.registerLocaleFallbacker = registerLocaleFallbacker;
+  exports.registerMessageCompiler = registerMessageCompiler;
+  exports.registerMessageResolver = registerMessageResolver;
+  exports.resolveLocale = resolveLocale;
+  exports.resolveValue = resolveValue;
+  exports.resolveWithKeyValue = resolveWithKeyValue;
+  exports.setAdditionalMeta = setAdditionalMeta;
+  exports.setDevToolsHook = setDevToolsHook;
+  exports.setFallbackContext = setFallbackContext;
+  exports.translate = translate;
+  exports.translateDevTools = translateDevTools;
+  exports.updateFallbackLocale = updateFallbackLocale;
+
+  return exports;
+
+})({});

Fichier diff supprimé car celui-ci est trop grand
+ 5 - 0
node_modules/@intlify/core-base/dist/core-base.global.prod.js


+ 1835 - 0
node_modules/@intlify/core-base/dist/core-base.mjs

@@ -0,0 +1,1835 @@
+/*!
+  * core-base v9.13.1
+  * (c) 2024 kazuya kawaguchi
+  * Released under the MIT License.
+  */
+import { getGlobalThis, isObject, isFunction, isString, isNumber, isPlainObject, assign, join, toDisplayString, isArray, incrementer, format as format$1, isPromise, isBoolean, warn, isRegExp, warnOnce, escapeHtml, inBrowser, mark, measure, isEmptyObject, generateCodeFrame, generateFormatCacheKey, isDate } from '@intlify/shared';
+import { CompileWarnCodes, CompileErrorCodes, createCompileError, detectHtmlTag, defaultOnError, baseCompile as baseCompile$1 } from '@intlify/message-compiler';
+export { CompileErrorCodes, createCompileError } from '@intlify/message-compiler';
+
+/**
+ * This is only called in esm-bundler builds.
+ * istanbul-ignore-next
+ */
+function initFeatureFlags() {
+    if (typeof __INTLIFY_PROD_DEVTOOLS__ !== 'boolean') {
+        getGlobalThis().__INTLIFY_PROD_DEVTOOLS__ = false;
+    }
+    if (typeof __INTLIFY_JIT_COMPILATION__ !== 'boolean') {
+        getGlobalThis().__INTLIFY_JIT_COMPILATION__ = false;
+    }
+    if (typeof __INTLIFY_DROP_MESSAGE_COMPILER__ !== 'boolean') {
+        getGlobalThis().__INTLIFY_DROP_MESSAGE_COMPILER__ = false;
+    }
+}
+
+const pathStateMachine =  [];
+pathStateMachine[0 /* States.BEFORE_PATH */] = {
+    ["w" /* PathCharTypes.WORKSPACE */]: [0 /* States.BEFORE_PATH */],
+    ["i" /* PathCharTypes.IDENT */]: [3 /* States.IN_IDENT */, 0 /* Actions.APPEND */],
+    ["[" /* PathCharTypes.LEFT_BRACKET */]: [4 /* States.IN_SUB_PATH */],
+    ["o" /* PathCharTypes.END_OF_FAIL */]: [7 /* States.AFTER_PATH */]
+};
+pathStateMachine[1 /* States.IN_PATH */] = {
+    ["w" /* PathCharTypes.WORKSPACE */]: [1 /* States.IN_PATH */],
+    ["." /* PathCharTypes.DOT */]: [2 /* States.BEFORE_IDENT */],
+    ["[" /* PathCharTypes.LEFT_BRACKET */]: [4 /* States.IN_SUB_PATH */],
+    ["o" /* PathCharTypes.END_OF_FAIL */]: [7 /* States.AFTER_PATH */]
+};
+pathStateMachine[2 /* States.BEFORE_IDENT */] = {
+    ["w" /* PathCharTypes.WORKSPACE */]: [2 /* States.BEFORE_IDENT */],
+    ["i" /* PathCharTypes.IDENT */]: [3 /* States.IN_IDENT */, 0 /* Actions.APPEND */],
+    ["0" /* PathCharTypes.ZERO */]: [3 /* States.IN_IDENT */, 0 /* Actions.APPEND */]
+};
+pathStateMachine[3 /* States.IN_IDENT */] = {
+    ["i" /* PathCharTypes.IDENT */]: [3 /* States.IN_IDENT */, 0 /* Actions.APPEND */],
+    ["0" /* PathCharTypes.ZERO */]: [3 /* States.IN_IDENT */, 0 /* Actions.APPEND */],
+    ["w" /* PathCharTypes.WORKSPACE */]: [1 /* States.IN_PATH */, 1 /* Actions.PUSH */],
+    ["." /* PathCharTypes.DOT */]: [2 /* States.BEFORE_IDENT */, 1 /* Actions.PUSH */],
+    ["[" /* PathCharTypes.LEFT_BRACKET */]: [4 /* States.IN_SUB_PATH */, 1 /* Actions.PUSH */],
+    ["o" /* PathCharTypes.END_OF_FAIL */]: [7 /* States.AFTER_PATH */, 1 /* Actions.PUSH */]
+};
+pathStateMachine[4 /* States.IN_SUB_PATH */] = {
+    ["'" /* PathCharTypes.SINGLE_QUOTE */]: [5 /* States.IN_SINGLE_QUOTE */, 0 /* Actions.APPEND */],
+    ["\"" /* PathCharTypes.DOUBLE_QUOTE */]: [6 /* States.IN_DOUBLE_QUOTE */, 0 /* Actions.APPEND */],
+    ["[" /* PathCharTypes.LEFT_BRACKET */]: [
+        4 /* States.IN_SUB_PATH */,
+        2 /* Actions.INC_SUB_PATH_DEPTH */
+    ],
+    ["]" /* PathCharTypes.RIGHT_BRACKET */]: [1 /* States.IN_PATH */, 3 /* Actions.PUSH_SUB_PATH */],
+    ["o" /* PathCharTypes.END_OF_FAIL */]: 8 /* States.ERROR */,
+    ["l" /* PathCharTypes.ELSE */]: [4 /* States.IN_SUB_PATH */, 0 /* Actions.APPEND */]
+};
+pathStateMachine[5 /* States.IN_SINGLE_QUOTE */] = {
+    ["'" /* PathCharTypes.SINGLE_QUOTE */]: [4 /* States.IN_SUB_PATH */, 0 /* Actions.APPEND */],
+    ["o" /* PathCharTypes.END_OF_FAIL */]: 8 /* States.ERROR */,
+    ["l" /* PathCharTypes.ELSE */]: [5 /* States.IN_SINGLE_QUOTE */, 0 /* Actions.APPEND */]
+};
+pathStateMachine[6 /* States.IN_DOUBLE_QUOTE */] = {
+    ["\"" /* PathCharTypes.DOUBLE_QUOTE */]: [4 /* States.IN_SUB_PATH */, 0 /* Actions.APPEND */],
+    ["o" /* PathCharTypes.END_OF_FAIL */]: 8 /* States.ERROR */,
+    ["l" /* PathCharTypes.ELSE */]: [6 /* States.IN_DOUBLE_QUOTE */, 0 /* Actions.APPEND */]
+};
+/**
+ * Check if an expression is a literal value.
+ */
+const literalValueRE = /^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;
+function isLiteral(exp) {
+    return literalValueRE.test(exp);
+}
+/**
+ * Strip quotes from a string
+ */
+function stripQuotes(str) {
+    const a = str.charCodeAt(0);
+    const b = str.charCodeAt(str.length - 1);
+    return a === b && (a === 0x22 || a === 0x27) ? str.slice(1, -1) : str;
+}
+/**
+ * Determine the type of a character in a keypath.
+ */
+function getPathCharType(ch) {
+    if (ch === undefined || ch === null) {
+        return "o" /* PathCharTypes.END_OF_FAIL */;
+    }
+    const code = ch.charCodeAt(0);
+    switch (code) {
+        case 0x5b: // [
+        case 0x5d: // ]
+        case 0x2e: // .
+        case 0x22: // "
+        case 0x27: // '
+            return ch;
+        case 0x5f: // _
+        case 0x24: // $
+        case 0x2d: // -
+            return "i" /* PathCharTypes.IDENT */;
+        case 0x09: // Tab (HT)
+        case 0x0a: // Newline (LF)
+        case 0x0d: // Return (CR)
+        case 0xa0: // No-break space (NBSP)
+        case 0xfeff: // Byte Order Mark (BOM)
+        case 0x2028: // Line Separator (LS)
+        case 0x2029: // Paragraph Separator (PS)
+            return "w" /* PathCharTypes.WORKSPACE */;
+    }
+    return "i" /* PathCharTypes.IDENT */;
+}
+/**
+ * Format a subPath, return its plain form if it is
+ * a literal string or number. Otherwise prepend the
+ * dynamic indicator (*).
+ */
+function formatSubPath(path) {
+    const trimmed = path.trim();
+    // invalid leading 0
+    if (path.charAt(0) === '0' && isNaN(parseInt(path))) {
+        return false;
+    }
+    return isLiteral(trimmed)
+        ? stripQuotes(trimmed)
+        : "*" /* PathCharTypes.ASTARISK */ + trimmed;
+}
+/**
+ * Parse a string path into an array of segments
+ */
+function parse(path) {
+    const keys = [];
+    let index = -1;
+    let mode = 0 /* States.BEFORE_PATH */;
+    let subPathDepth = 0;
+    let c;
+    let key; // eslint-disable-line
+    let newChar;
+    let type;
+    let transition;
+    let action;
+    let typeMap;
+    const actions = [];
+    actions[0 /* Actions.APPEND */] = () => {
+        if (key === undefined) {
+            key = newChar;
+        }
+        else {
+            key += newChar;
+        }
+    };
+    actions[1 /* Actions.PUSH */] = () => {
+        if (key !== undefined) {
+            keys.push(key);
+            key = undefined;
+        }
+    };
+    actions[2 /* Actions.INC_SUB_PATH_DEPTH */] = () => {
+        actions[0 /* Actions.APPEND */]();
+        subPathDepth++;
+    };
+    actions[3 /* Actions.PUSH_SUB_PATH */] = () => {
+        if (subPathDepth > 0) {
+            subPathDepth--;
+            mode = 4 /* States.IN_SUB_PATH */;
+            actions[0 /* Actions.APPEND */]();
+        }
+        else {
+            subPathDepth = 0;
+            if (key === undefined) {
+                return false;
+            }
+            key = formatSubPath(key);
+            if (key === false) {
+                return false;
+            }
+            else {
+                actions[1 /* Actions.PUSH */]();
+            }
+        }
+    };
+    function maybeUnescapeQuote() {
+        const nextChar = path[index + 1];
+        if ((mode === 5 /* States.IN_SINGLE_QUOTE */ &&
+            nextChar === "'" /* PathCharTypes.SINGLE_QUOTE */) ||
+            (mode === 6 /* States.IN_DOUBLE_QUOTE */ &&
+                nextChar === "\"" /* PathCharTypes.DOUBLE_QUOTE */)) {
+            index++;
+            newChar = '\\' + nextChar;
+            actions[0 /* Actions.APPEND */]();
+            return true;
+        }
+    }
+    while (mode !== null) {
+        index++;
+        c = path[index];
+        if (c === '\\' && maybeUnescapeQuote()) {
+            continue;
+        }
+        type = getPathCharType(c);
+        typeMap = pathStateMachine[mode];
+        transition = typeMap[type] || typeMap["l" /* PathCharTypes.ELSE */] || 8 /* States.ERROR */;
+        // check parse error
+        if (transition === 8 /* States.ERROR */) {
+            return;
+        }
+        mode = transition[0];
+        if (transition[1] !== undefined) {
+            action = actions[transition[1]];
+            if (action) {
+                newChar = c;
+                if (action() === false) {
+                    return;
+                }
+            }
+        }
+        // check parse finish
+        if (mode === 7 /* States.AFTER_PATH */) {
+            return keys;
+        }
+    }
+}
+// path token cache
+const cache = new Map();
+/**
+ * key-value message resolver
+ *
+ * @remarks
+ * Resolves messages with the key-value structure. Note that messages with a hierarchical structure such as objects cannot be resolved
+ *
+ * @param obj - A target object to be resolved with path
+ * @param path - A {@link Path | path} to resolve the value of message
+ *
+ * @returns A resolved {@link PathValue | path value}
+ *
+ * @VueI18nGeneral
+ */
+function resolveWithKeyValue(obj, path) {
+    return isObject(obj) ? obj[path] : null;
+}
+/**
+ * message resolver
+ *
+ * @remarks
+ * Resolves messages. messages with a hierarchical structure such as objects can be resolved. This resolver is used in VueI18n as default.
+ *
+ * @param obj - A target object to be resolved with path
+ * @param path - A {@link Path | path} to resolve the value of message
+ *
+ * @returns A resolved {@link PathValue | path value}
+ *
+ * @VueI18nGeneral
+ */
+function resolveValue(obj, path) {
+    // check object
+    if (!isObject(obj)) {
+        return null;
+    }
+    // parse path
+    let hit = cache.get(path);
+    if (!hit) {
+        hit = parse(path);
+        if (hit) {
+            cache.set(path, hit);
+        }
+    }
+    // check hit
+    if (!hit) {
+        return null;
+    }
+    // resolve path value
+    const len = hit.length;
+    let last = obj;
+    let i = 0;
+    while (i < len) {
+        const val = last[hit[i]];
+        if (val === undefined) {
+            return null;
+        }
+        if (isFunction(last)) {
+            return null;
+        }
+        last = val;
+        i++;
+    }
+    return last;
+}
+
+const DEFAULT_MODIFIER = (str) => str;
+const DEFAULT_MESSAGE = (ctx) => ''; // eslint-disable-line
+const DEFAULT_MESSAGE_DATA_TYPE = 'text';
+const DEFAULT_NORMALIZE = (values) => values.length === 0 ? '' : join(values);
+const DEFAULT_INTERPOLATE = toDisplayString;
+function pluralDefault(choice, choicesLength) {
+    choice = Math.abs(choice);
+    if (choicesLength === 2) {
+        // prettier-ignore
+        return choice
+            ? choice > 1
+                ? 1
+                : 0
+            : 1;
+    }
+    return choice ? Math.min(choice, 2) : 0;
+}
+function getPluralIndex(options) {
+    // prettier-ignore
+    const index = isNumber(options.pluralIndex)
+        ? options.pluralIndex
+        : -1;
+    // prettier-ignore
+    return options.named && (isNumber(options.named.count) || isNumber(options.named.n))
+        ? isNumber(options.named.count)
+            ? options.named.count
+            : isNumber(options.named.n)
+                ? options.named.n
+                : index
+        : index;
+}
+function normalizeNamed(pluralIndex, props) {
+    if (!props.count) {
+        props.count = pluralIndex;
+    }
+    if (!props.n) {
+        props.n = pluralIndex;
+    }
+}
+function createMessageContext(options = {}) {
+    const locale = options.locale;
+    const pluralIndex = getPluralIndex(options);
+    const pluralRule = isObject(options.pluralRules) &&
+        isString(locale) &&
+        isFunction(options.pluralRules[locale])
+        ? options.pluralRules[locale]
+        : pluralDefault;
+    const orgPluralRule = isObject(options.pluralRules) &&
+        isString(locale) &&
+        isFunction(options.pluralRules[locale])
+        ? pluralDefault
+        : undefined;
+    const plural = (messages) => {
+        return messages[pluralRule(pluralIndex, messages.length, orgPluralRule)];
+    };
+    const _list = options.list || [];
+    const list = (index) => _list[index];
+    // eslint-disable-next-line @typescript-eslint/no-explicit-any
+    const _named = options.named || {};
+    isNumber(options.pluralIndex) && normalizeNamed(pluralIndex, _named);
+    const named = (key) => _named[key];
+    function message(key) {
+        // prettier-ignore
+        const msg = isFunction(options.messages)
+            ? options.messages(key)
+            : isObject(options.messages)
+                ? options.messages[key]
+                : false;
+        return !msg
+            ? options.parent
+                ? options.parent.message(key) // resolve from parent messages
+                : DEFAULT_MESSAGE
+            : msg;
+    }
+    const _modifier = (name) => options.modifiers
+        ? options.modifiers[name]
+        : DEFAULT_MODIFIER;
+    const normalize = isPlainObject(options.processor) && isFunction(options.processor.normalize)
+        ? options.processor.normalize
+        : DEFAULT_NORMALIZE;
+    const interpolate = isPlainObject(options.processor) &&
+        isFunction(options.processor.interpolate)
+        ? options.processor.interpolate
+        : DEFAULT_INTERPOLATE;
+    const type = isPlainObject(options.processor) && isString(options.processor.type)
+        ? options.processor.type
+        : DEFAULT_MESSAGE_DATA_TYPE;
+    const linked = (key, ...args) => {
+        const [arg1, arg2] = args;
+        let type = 'text';
+        let modifier = '';
+        if (args.length === 1) {
+            if (isObject(arg1)) {
+                modifier = arg1.modifier || modifier;
+                type = arg1.type || type;
+            }
+            else if (isString(arg1)) {
+                modifier = arg1 || modifier;
+            }
+        }
+        else if (args.length === 2) {
+            if (isString(arg1)) {
+                modifier = arg1 || modifier;
+            }
+            if (isString(arg2)) {
+                type = arg2 || type;
+            }
+        }
+        const ret = message(key)(ctx);
+        const msg = 
+        // The message in vnode resolved with linked are returned as an array by processor.nomalize
+        type === 'vnode' && isArray(ret) && modifier
+            ? ret[0]
+            : ret;
+        return modifier ? _modifier(modifier)(msg, type) : msg;
+    };
+    const ctx = {
+        ["list" /* HelperNameMap.LIST */]: list,
+        ["named" /* HelperNameMap.NAMED */]: named,
+        ["plural" /* HelperNameMap.PLURAL */]: plural,
+        ["linked" /* HelperNameMap.LINKED */]: linked,
+        ["message" /* HelperNameMap.MESSAGE */]: message,
+        ["type" /* HelperNameMap.TYPE */]: type,
+        ["interpolate" /* HelperNameMap.INTERPOLATE */]: interpolate,
+        ["normalize" /* HelperNameMap.NORMALIZE */]: normalize,
+        ["values" /* HelperNameMap.VALUES */]: assign({}, _list, _named)
+    };
+    return ctx;
+}
+
+let devtools = null;
+function setDevToolsHook(hook) {
+    devtools = hook;
+}
+function getDevToolsHook() {
+    return devtools;
+}
+function initI18nDevTools(i18n, version, meta) {
+    // TODO: queue if devtools is undefined
+    devtools &&
+        devtools.emit("i18n:init" /* IntlifyDevToolsHooks.I18nInit */, {
+            timestamp: Date.now(),
+            i18n,
+            version,
+            meta
+        });
+}
+const translateDevTools = /* #__PURE__*/ createDevToolsHook("function:translate" /* IntlifyDevToolsHooks.FunctionTranslate */);
+function createDevToolsHook(hook) {
+    return (payloads) => devtools && devtools.emit(hook, payloads);
+}
+
+const code$1 = CompileWarnCodes.__EXTEND_POINT__;
+const inc$1 = incrementer(code$1);
+const CoreWarnCodes = {
+    NOT_FOUND_KEY: code$1, // 2
+    FALLBACK_TO_TRANSLATE: inc$1(), // 3
+    CANNOT_FORMAT_NUMBER: inc$1(), // 4
+    FALLBACK_TO_NUMBER_FORMAT: inc$1(), // 5
+    CANNOT_FORMAT_DATE: inc$1(), // 6
+    FALLBACK_TO_DATE_FORMAT: inc$1(), // 7
+    EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER: inc$1(), // 8
+    __EXTEND_POINT__: inc$1() // 9
+};
+/** @internal */
+const warnMessages = {
+    [CoreWarnCodes.NOT_FOUND_KEY]: `Not found '{key}' key in '{locale}' locale messages.`,
+    [CoreWarnCodes.FALLBACK_TO_TRANSLATE]: `Fall back to translate '{key}' key with '{target}' locale.`,
+    [CoreWarnCodes.CANNOT_FORMAT_NUMBER]: `Cannot format a number value due to not supported Intl.NumberFormat.`,
+    [CoreWarnCodes.FALLBACK_TO_NUMBER_FORMAT]: `Fall back to number format '{key}' key with '{target}' locale.`,
+    [CoreWarnCodes.CANNOT_FORMAT_DATE]: `Cannot format a date value due to not supported Intl.DateTimeFormat.`,
+    [CoreWarnCodes.FALLBACK_TO_DATE_FORMAT]: `Fall back to datetime format '{key}' key with '{target}' locale.`,
+    [CoreWarnCodes.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER]: `This project is using Custom Message Compiler, which is an experimental feature. It may receive breaking changes or be removed in the future.`
+};
+function getWarnMessage(code, ...args) {
+    return format$1(warnMessages[code], ...args);
+}
+
+const code = CompileErrorCodes.__EXTEND_POINT__;
+const inc = incrementer(code);
+const CoreErrorCodes = {
+    INVALID_ARGUMENT: code, // 17
+    INVALID_DATE_ARGUMENT: inc(), // 18
+    INVALID_ISO_DATE_ARGUMENT: inc(), // 19
+    NOT_SUPPORT_NON_STRING_MESSAGE: inc(), // 20
+    NOT_SUPPORT_LOCALE_PROMISE_VALUE: inc(), // 21
+    NOT_SUPPORT_LOCALE_ASYNC_FUNCTION: inc(), // 22
+    NOT_SUPPORT_LOCALE_TYPE: inc(), // 23
+    __EXTEND_POINT__: inc() // 24
+};
+function createCoreError(code) {
+    return createCompileError(code, null, (process.env.NODE_ENV !== 'production') ? { messages: errorMessages } : undefined);
+}
+/** @internal */
+const errorMessages = {
+    [CoreErrorCodes.INVALID_ARGUMENT]: 'Invalid arguments',
+    [CoreErrorCodes.INVALID_DATE_ARGUMENT]: 'The date provided is an invalid Date object.' +
+        'Make sure your Date represents a valid date.',
+    [CoreErrorCodes.INVALID_ISO_DATE_ARGUMENT]: 'The argument provided is not a valid ISO date string',
+    [CoreErrorCodes.NOT_SUPPORT_NON_STRING_MESSAGE]: 'Not support non-string message',
+    [CoreErrorCodes.NOT_SUPPORT_LOCALE_PROMISE_VALUE]: 'cannot support promise value',
+    [CoreErrorCodes.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION]: 'cannot support async function',
+    [CoreErrorCodes.NOT_SUPPORT_LOCALE_TYPE]: 'cannot support locale type'
+};
+
+/** @internal */
+function getLocale(context, options) {
+    return options.locale != null
+        ? resolveLocale(options.locale)
+        : resolveLocale(context.locale);
+}
+let _resolveLocale;
+/** @internal */
+function resolveLocale(locale) {
+    if (isString(locale)) {
+        return locale;
+    }
+    else {
+        if (isFunction(locale)) {
+            if (locale.resolvedOnce && _resolveLocale != null) {
+                return _resolveLocale;
+            }
+            else if (locale.constructor.name === 'Function') {
+                const resolve = locale();
+                if (isPromise(resolve)) {
+                    throw createCoreError(CoreErrorCodes.NOT_SUPPORT_LOCALE_PROMISE_VALUE);
+                }
+                return (_resolveLocale = resolve);
+            }
+            else {
+                throw createCoreError(CoreErrorCodes.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION);
+            }
+        }
+        else {
+            throw createCoreError(CoreErrorCodes.NOT_SUPPORT_LOCALE_TYPE);
+        }
+    }
+}
+/**
+ * Fallback with simple implemenation
+ *
+ * @remarks
+ * A fallback locale function implemented with a simple fallback algorithm.
+ *
+ * Basically, it returns the value as specified in the `fallbackLocale` props, and is processed with the fallback inside intlify.
+ *
+ * @param ctx - A {@link CoreContext | context}
+ * @param fallback - A {@link FallbackLocale | fallback locale}
+ * @param start - A starting {@link Locale | locale}
+ *
+ * @returns Fallback locales
+ *
+ * @VueI18nGeneral
+ */
+function fallbackWithSimple(ctx, fallback, start // eslint-disable-line @typescript-eslint/no-unused-vars
+) {
+    // prettier-ignore
+    return [...new Set([
+            start,
+            ...(isArray(fallback)
+                ? fallback
+                : isObject(fallback)
+                    ? Object.keys(fallback)
+                    : isString(fallback)
+                        ? [fallback]
+                        : [start])
+        ])];
+}
+/**
+ * Fallback with locale chain
+ *
+ * @remarks
+ * A fallback locale function implemented with a fallback chain algorithm. It's used in VueI18n as default.
+ *
+ * @param ctx - A {@link CoreContext | context}
+ * @param fallback - A {@link FallbackLocale | fallback locale}
+ * @param start - A starting {@link Locale | locale}
+ *
+ * @returns Fallback locales
+ *
+ * @VueI18nSee [Fallbacking](../guide/essentials/fallback)
+ *
+ * @VueI18nGeneral
+ */
+function fallbackWithLocaleChain(ctx, fallback, start) {
+    const startLocale = isString(start) ? start : DEFAULT_LOCALE;
+    const context = ctx;
+    if (!context.__localeChainCache) {
+        context.__localeChainCache = new Map();
+    }
+    let chain = context.__localeChainCache.get(startLocale);
+    if (!chain) {
+        chain = [];
+        // first block defined by start
+        let block = [start];
+        // while any intervening block found
+        while (isArray(block)) {
+            block = appendBlockToChain(chain, block, fallback);
+        }
+        // prettier-ignore
+        // last block defined by default
+        const defaults = isArray(fallback) || !isPlainObject(fallback)
+            ? fallback
+            : fallback['default']
+                ? fallback['default']
+                : null;
+        // convert defaults to array
+        block = isString(defaults) ? [defaults] : defaults;
+        if (isArray(block)) {
+            appendBlockToChain(chain, block, false);
+        }
+        context.__localeChainCache.set(startLocale, chain);
+    }
+    return chain;
+}
+function appendBlockToChain(chain, block, blocks) {
+    let follow = true;
+    for (let i = 0; i < block.length && isBoolean(follow); i++) {
+        const locale = block[i];
+        if (isString(locale)) {
+            follow = appendLocaleToChain(chain, block[i], blocks);
+        }
+    }
+    return follow;
+}
+function appendLocaleToChain(chain, locale, blocks) {
+    let follow;
+    const tokens = locale.split('-');
+    do {
+        const target = tokens.join('-');
+        follow = appendItemToChain(chain, target, blocks);
+        tokens.splice(-1, 1);
+    } while (tokens.length && follow === true);
+    return follow;
+}
+function appendItemToChain(chain, target, blocks) {
+    let follow = false;
+    if (!chain.includes(target)) {
+        follow = true;
+        if (target) {
+            follow = target[target.length - 1] !== '!';
+            const locale = target.replace(/!/g, '');
+            chain.push(locale);
+            if ((isArray(blocks) || isPlainObject(blocks)) &&
+                blocks[locale] // eslint-disable-line @typescript-eslint/no-explicit-any
+            ) {
+                // eslint-disable-next-line @typescript-eslint/no-explicit-any
+                follow = blocks[locale];
+            }
+        }
+    }
+    return follow;
+}
+
+/* eslint-disable @typescript-eslint/no-explicit-any */
+/**
+ * Intlify core-base version
+ * @internal
+ */
+const VERSION = '9.13.1';
+const NOT_REOSLVED = -1;
+const DEFAULT_LOCALE = 'en-US';
+const MISSING_RESOLVE_VALUE = '';
+const capitalize = (str) => `${str.charAt(0).toLocaleUpperCase()}${str.substr(1)}`;
+function getDefaultLinkedModifiers() {
+    return {
+        upper: (val, type) => {
+            // prettier-ignore
+            return type === 'text' && isString(val)
+                ? val.toUpperCase()
+                : type === 'vnode' && isObject(val) && '__v_isVNode' in val
+                    ? val.children.toUpperCase()
+                    : val;
+        },
+        lower: (val, type) => {
+            // prettier-ignore
+            return type === 'text' && isString(val)
+                ? val.toLowerCase()
+                : type === 'vnode' && isObject(val) && '__v_isVNode' in val
+                    ? val.children.toLowerCase()
+                    : val;
+        },
+        capitalize: (val, type) => {
+            // prettier-ignore
+            return (type === 'text' && isString(val)
+                ? capitalize(val)
+                : type === 'vnode' && isObject(val) && '__v_isVNode' in val
+                    ? capitalize(val.children)
+                    : val);
+        }
+    };
+}
+let _compiler;
+function registerMessageCompiler(compiler) {
+    _compiler = compiler;
+}
+let _resolver;
+/**
+ * Register the message resolver
+ *
+ * @param resolver - A {@link MessageResolver} function
+ *
+ * @VueI18nGeneral
+ */
+function registerMessageResolver(resolver) {
+    _resolver = resolver;
+}
+let _fallbacker;
+/**
+ * Register the locale fallbacker
+ *
+ * @param fallbacker - A {@link LocaleFallbacker} function
+ *
+ * @VueI18nGeneral
+ */
+function registerLocaleFallbacker(fallbacker) {
+    _fallbacker = fallbacker;
+}
+// Additional Meta for Intlify DevTools
+let _additionalMeta =  null;
+/* #__NO_SIDE_EFFECTS__ */
+const setAdditionalMeta = (meta) => {
+    _additionalMeta = meta;
+};
+/* #__NO_SIDE_EFFECTS__ */
+const getAdditionalMeta = () => _additionalMeta;
+let _fallbackContext = null;
+const setFallbackContext = (context) => {
+    _fallbackContext = context;
+};
+const getFallbackContext = () => _fallbackContext;
+// ID for CoreContext
+let _cid = 0;
+function createCoreContext(options = {}) {
+    // setup options
+    const onWarn = isFunction(options.onWarn) ? options.onWarn : warn;
+    const version = isString(options.version) ? options.version : VERSION;
+    const locale = isString(options.locale) || isFunction(options.locale)
+        ? options.locale
+        : DEFAULT_LOCALE;
+    const _locale = isFunction(locale) ? DEFAULT_LOCALE : locale;
+    const fallbackLocale = isArray(options.fallbackLocale) ||
+        isPlainObject(options.fallbackLocale) ||
+        isString(options.fallbackLocale) ||
+        options.fallbackLocale === false
+        ? options.fallbackLocale
+        : _locale;
+    const messages = isPlainObject(options.messages)
+        ? options.messages
+        : { [_locale]: {} };
+    const datetimeFormats = isPlainObject(options.datetimeFormats)
+            ? options.datetimeFormats
+            : { [_locale]: {} }
+        ;
+    const numberFormats = isPlainObject(options.numberFormats)
+            ? options.numberFormats
+            : { [_locale]: {} }
+        ;
+    const modifiers = assign({}, options.modifiers || {}, getDefaultLinkedModifiers());
+    const pluralRules = options.pluralRules || {};
+    const missing = isFunction(options.missing) ? options.missing : null;
+    const missingWarn = isBoolean(options.missingWarn) || isRegExp(options.missingWarn)
+        ? options.missingWarn
+        : true;
+    const fallbackWarn = isBoolean(options.fallbackWarn) || isRegExp(options.fallbackWarn)
+        ? options.fallbackWarn
+        : true;
+    const fallbackFormat = !!options.fallbackFormat;
+    const unresolving = !!options.unresolving;
+    const postTranslation = isFunction(options.postTranslation)
+        ? options.postTranslation
+        : null;
+    const processor = isPlainObject(options.processor) ? options.processor : null;
+    const warnHtmlMessage = isBoolean(options.warnHtmlMessage)
+        ? options.warnHtmlMessage
+        : true;
+    const escapeParameter = !!options.escapeParameter;
+    const messageCompiler = isFunction(options.messageCompiler)
+        ? options.messageCompiler
+        : _compiler;
+    if ((process.env.NODE_ENV !== 'production') &&
+        !false &&
+        !false &&
+        isFunction(options.messageCompiler)) {
+        warnOnce(getWarnMessage(CoreWarnCodes.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER));
+    }
+    const messageResolver = isFunction(options.messageResolver)
+        ? options.messageResolver
+        : _resolver || resolveWithKeyValue;
+    const localeFallbacker = isFunction(options.localeFallbacker)
+        ? options.localeFallbacker
+        : _fallbacker || fallbackWithSimple;
+    const fallbackContext = isObject(options.fallbackContext)
+        ? options.fallbackContext
+        : undefined;
+    // setup internal options
+    const internalOptions = options;
+    const __datetimeFormatters = isObject(internalOptions.__datetimeFormatters)
+            ? internalOptions.__datetimeFormatters
+            : new Map()
+        ;
+    const __numberFormatters = isObject(internalOptions.__numberFormatters)
+            ? internalOptions.__numberFormatters
+            : new Map()
+        ;
+    const __meta = isObject(internalOptions.__meta) ? internalOptions.__meta : {};
+    _cid++;
+    const context = {
+        version,
+        cid: _cid,
+        locale,
+        fallbackLocale,
+        messages,
+        modifiers,
+        pluralRules,
+        missing,
+        missingWarn,
+        fallbackWarn,
+        fallbackFormat,
+        unresolving,
+        postTranslation,
+        processor,
+        warnHtmlMessage,
+        escapeParameter,
+        messageCompiler,
+        messageResolver,
+        localeFallbacker,
+        fallbackContext,
+        onWarn,
+        __meta
+    };
+    {
+        context.datetimeFormats = datetimeFormats;
+        context.numberFormats = numberFormats;
+        context.__datetimeFormatters = __datetimeFormatters;
+        context.__numberFormatters = __numberFormatters;
+    }
+    // for vue-devtools timeline event
+    if ((process.env.NODE_ENV !== 'production')) {
+        context.__v_emitter =
+            internalOptions.__v_emitter != null
+                ? internalOptions.__v_emitter
+                : undefined;
+    }
+    // NOTE: experimental !!
+    if ((process.env.NODE_ENV !== 'production') || __INTLIFY_PROD_DEVTOOLS__) {
+        initI18nDevTools(context, version, __meta);
+    }
+    return context;
+}
+/** @internal */
+function isTranslateFallbackWarn(fallback, key) {
+    return fallback instanceof RegExp ? fallback.test(key) : fallback;
+}
+/** @internal */
+function isTranslateMissingWarn(missing, key) {
+    return missing instanceof RegExp ? missing.test(key) : missing;
+}
+/** @internal */
+function handleMissing(context, key, locale, missingWarn, type) {
+    const { missing, onWarn } = context;
+    // for vue-devtools timeline event
+    if ((process.env.NODE_ENV !== 'production')) {
+        const emitter = context.__v_emitter;
+        if (emitter) {
+            emitter.emit("missing" /* VueDevToolsTimelineEvents.MISSING */, {
+                locale,
+                key,
+                type,
+                groupId: `${type}:${key}`
+            });
+        }
+    }
+    if (missing !== null) {
+        const ret = missing(context, locale, key, type);
+        return isString(ret) ? ret : key;
+    }
+    else {
+        if ((process.env.NODE_ENV !== 'production') && isTranslateMissingWarn(missingWarn, key)) {
+            onWarn(getWarnMessage(CoreWarnCodes.NOT_FOUND_KEY, { key, locale }));
+        }
+        return key;
+    }
+}
+/** @internal */
+function updateFallbackLocale(ctx, locale, fallback) {
+    const context = ctx;
+    context.__localeChainCache = new Map();
+    ctx.localeFallbacker(ctx, fallback, locale);
+}
+/** @internal */
+function isAlmostSameLocale(locale, compareLocale) {
+    if (locale === compareLocale)
+        return false;
+    return locale.split('-')[0] === compareLocale.split('-')[0];
+}
+/** @internal */
+function isImplicitFallback(targetLocale, locales) {
+    const index = locales.indexOf(targetLocale);
+    if (index === -1) {
+        return false;
+    }
+    for (let i = index + 1; i < locales.length; i++) {
+        if (isAlmostSameLocale(targetLocale, locales[i])) {
+            return true;
+        }
+    }
+    return false;
+}
+/* eslint-enable @typescript-eslint/no-explicit-any */
+
+function format(ast) {
+    const msg = (ctx) => formatParts(ctx, ast);
+    return msg;
+}
+function formatParts(ctx, ast) {
+    const body = ast.b || ast.body;
+    if ((body.t || body.type) === 1 /* NodeTypes.Plural */) {
+        const plural = body;
+        const cases = plural.c || plural.cases;
+        return ctx.plural(cases.reduce((messages, c) => [
+            ...messages,
+            formatMessageParts(ctx, c)
+        ], []));
+    }
+    else {
+        return formatMessageParts(ctx, body);
+    }
+}
+function formatMessageParts(ctx, node) {
+    const _static = node.s || node.static;
+    if (_static) {
+        return ctx.type === 'text'
+            ? _static
+            : ctx.normalize([_static]);
+    }
+    else {
+        const messages = (node.i || node.items).reduce((acm, c) => [...acm, formatMessagePart(ctx, c)], []);
+        return ctx.normalize(messages);
+    }
+}
+function formatMessagePart(ctx, node) {
+    const type = node.t || node.type;
+    switch (type) {
+        case 3 /* NodeTypes.Text */: {
+            const text = node;
+            return (text.v || text.value);
+        }
+        case 9 /* NodeTypes.Literal */: {
+            const literal = node;
+            return (literal.v || literal.value);
+        }
+        case 4 /* NodeTypes.Named */: {
+            const named = node;
+            return ctx.interpolate(ctx.named(named.k || named.key));
+        }
+        case 5 /* NodeTypes.List */: {
+            const list = node;
+            return ctx.interpolate(ctx.list(list.i != null ? list.i : list.index));
+        }
+        case 6 /* NodeTypes.Linked */: {
+            const linked = node;
+            const modifier = linked.m || linked.modifier;
+            return ctx.linked(formatMessagePart(ctx, linked.k || linked.key), modifier ? formatMessagePart(ctx, modifier) : undefined, ctx.type);
+        }
+        case 7 /* NodeTypes.LinkedKey */: {
+            const linkedKey = node;
+            return (linkedKey.v || linkedKey.value);
+        }
+        case 8 /* NodeTypes.LinkedModifier */: {
+            const linkedModifier = node;
+            return (linkedModifier.v || linkedModifier.value);
+        }
+        default:
+            throw new Error(`unhandled node type on format message part: ${type}`);
+    }
+}
+
+const WARN_MESSAGE = `Detected HTML in '{source}' message. Recommend not using HTML messages to avoid XSS.`;
+function checkHtmlMessage(source, warnHtmlMessage) {
+    if (warnHtmlMessage && detectHtmlTag(source)) {
+        warn(format$1(WARN_MESSAGE, { source }));
+    }
+}
+const defaultOnCacheKey = (message) => message;
+let compileCache = Object.create(null);
+function onCompileWarn(_warn) {
+    if (_warn.code === CompileWarnCodes.USE_MODULO_SYNTAX) {
+        warn(`The use of named interpolation with modulo syntax is deprecated. ` +
+            `It will be removed in v10.\n` +
+            `reference: https://vue-i18n.intlify.dev/guide/essentials/syntax#rails-i18n-format \n` +
+            `(message compiler warning message: ${_warn.message})`);
+    }
+}
+function clearCompileCache() {
+    compileCache = Object.create(null);
+}
+const isMessageAST = (val) => isObject(val) &&
+    (val.t === 0 || val.type === 0) &&
+    ('b' in val || 'body' in val);
+function baseCompile(message, options = {}) {
+    // error detecting on compile
+    let detectError = false;
+    const onError = options.onError || defaultOnError;
+    options.onError = (err) => {
+        detectError = true;
+        onError(err);
+    };
+    // compile with mesasge-compiler
+    return { ...baseCompile$1(message, options), detectError };
+}
+/* #__NO_SIDE_EFFECTS__ */
+const compileToFunction = (message, context) => {
+    if (!isString(message)) {
+        throw createCoreError(CoreErrorCodes.NOT_SUPPORT_NON_STRING_MESSAGE);
+    }
+    // set onWarn
+    if ((process.env.NODE_ENV !== 'production')) {
+        context.onWarn = onCompileWarn;
+    }
+    {
+        // check HTML message
+        const warnHtmlMessage = isBoolean(context.warnHtmlMessage)
+            ? context.warnHtmlMessage
+            : true;
+        (process.env.NODE_ENV !== 'production') && checkHtmlMessage(message, warnHtmlMessage);
+        // check caches
+        const onCacheKey = context.onCacheKey || defaultOnCacheKey;
+        const cacheKey = onCacheKey(message);
+        const cached = compileCache[cacheKey];
+        if (cached) {
+            return cached;
+        }
+        // compile
+        const { code, detectError } = baseCompile(message, context);
+        // evaluate function
+        const msg = new Function(`return ${code}`)();
+        // if occurred compile error, don't cache
+        return !detectError
+            ? (compileCache[cacheKey] = msg)
+            : msg;
+    }
+};
+function compile(message, context) {
+    // set onWarn
+    if ((process.env.NODE_ENV !== 'production')) {
+        context.onWarn = onCompileWarn;
+    }
+    if (((__INTLIFY_JIT_COMPILATION__ && !__INTLIFY_DROP_MESSAGE_COMPILER__)) &&
+        isString(message)) {
+        // check HTML message
+        const warnHtmlMessage = isBoolean(context.warnHtmlMessage)
+            ? context.warnHtmlMessage
+            : true;
+        (process.env.NODE_ENV !== 'production') && checkHtmlMessage(message, warnHtmlMessage);
+        // check caches
+        const onCacheKey = context.onCacheKey || defaultOnCacheKey;
+        const cacheKey = onCacheKey(message);
+        const cached = compileCache[cacheKey];
+        if (cached) {
+            return cached;
+        }
+        // compile with JIT mode
+        const { ast, detectError } = baseCompile(message, {
+            ...context,
+            location: (process.env.NODE_ENV !== 'production'),
+            jit: true
+        });
+        // compose message function from AST
+        const msg = format(ast);
+        // if occurred compile error, don't cache
+        return !detectError
+            ? (compileCache[cacheKey] = msg)
+            : msg;
+    }
+    else {
+        if ((process.env.NODE_ENV !== 'production') && !isMessageAST(message)) {
+            warn(`the message that is resolve with key '${context.key}' is not supported for jit compilation`);
+            return (() => message);
+        }
+        // AST case (passed from bundler)
+        const cacheKey = message.cacheKey;
+        if (cacheKey) {
+            const cached = compileCache[cacheKey];
+            if (cached) {
+                return cached;
+            }
+            // compose message function from message (AST)
+            return (compileCache[cacheKey] =
+                format(message));
+        }
+        else {
+            return format(message);
+        }
+    }
+}
+
+const NOOP_MESSAGE_FUNCTION = () => '';
+const isMessageFunction = (val) => isFunction(val);
+// implementation of `translate` function
+function translate(context, ...args) {
+    const { fallbackFormat, postTranslation, unresolving, messageCompiler, fallbackLocale, messages } = context;
+    const [key, options] = parseTranslateArgs(...args);
+    const missingWarn = isBoolean(options.missingWarn)
+        ? options.missingWarn
+        : context.missingWarn;
+    const fallbackWarn = isBoolean(options.fallbackWarn)
+        ? options.fallbackWarn
+        : context.fallbackWarn;
+    const escapeParameter = isBoolean(options.escapeParameter)
+        ? options.escapeParameter
+        : context.escapeParameter;
+    const resolvedMessage = !!options.resolvedMessage;
+    // prettier-ignore
+    const defaultMsgOrKey = isString(options.default) || isBoolean(options.default) // default by function option
+        ? !isBoolean(options.default)
+            ? options.default
+            : (!messageCompiler ? () => key : key)
+        : fallbackFormat // default by `fallbackFormat` option
+            ? (!messageCompiler ? () => key : key)
+            : '';
+    const enableDefaultMsg = fallbackFormat || defaultMsgOrKey !== '';
+    const locale = getLocale(context, options);
+    // escape params
+    escapeParameter && escapeParams(options);
+    // resolve message format
+    // eslint-disable-next-line prefer-const
+    let [formatScope, targetLocale, message] = !resolvedMessage
+        ? resolveMessageFormat(context, key, locale, fallbackLocale, fallbackWarn, missingWarn)
+        : [
+            key,
+            locale,
+            messages[locale] || {}
+        ];
+    // NOTE:
+    //  Fix to work around `ssrTransfrom` bug in Vite.
+    //  https://github.com/vitejs/vite/issues/4306
+    //  To get around this, use temporary variables.
+    //  https://github.com/nuxt/framework/issues/1461#issuecomment-954606243
+    let format = formatScope;
+    // if you use default message, set it as message format!
+    let cacheBaseKey = key;
+    if (!resolvedMessage &&
+        !(isString(format) ||
+            isMessageAST(format) ||
+            isMessageFunction(format))) {
+        if (enableDefaultMsg) {
+            format = defaultMsgOrKey;
+            cacheBaseKey = format;
+        }
+    }
+    // checking message format and target locale
+    if (!resolvedMessage &&
+        (!(isString(format) ||
+            isMessageAST(format) ||
+            isMessageFunction(format)) ||
+            !isString(targetLocale))) {
+        return unresolving ? NOT_REOSLVED : key;
+    }
+    // TODO: refactor
+    if ((process.env.NODE_ENV !== 'production') && isString(format) && context.messageCompiler == null) {
+        warn(`The message format compilation is not supported in this build. ` +
+            `Because message compiler isn't included. ` +
+            `You need to pre-compilation all message format. ` +
+            `So translate function return '${key}'.`);
+        return key;
+    }
+    // setup compile error detecting
+    let occurred = false;
+    const onError = () => {
+        occurred = true;
+    };
+    // compile message format
+    const msg = !isMessageFunction(format)
+        ? compileMessageFormat(context, key, targetLocale, format, cacheBaseKey, onError)
+        : format;
+    // if occurred compile error, return the message format
+    if (occurred) {
+        return format;
+    }
+    // evaluate message with context
+    const ctxOptions = getMessageContextOptions(context, targetLocale, message, options);
+    const msgContext = createMessageContext(ctxOptions);
+    const messaged = evaluateMessage(context, msg, msgContext);
+    // if use post translation option, proceed it with handler
+    const ret = postTranslation
+        ? postTranslation(messaged, key)
+        : messaged;
+    // NOTE: experimental !!
+    if ((process.env.NODE_ENV !== 'production') || __INTLIFY_PROD_DEVTOOLS__) {
+        // prettier-ignore
+        const payloads = {
+            timestamp: Date.now(),
+            key: isString(key)
+                ? key
+                : isMessageFunction(format)
+                    ? format.key
+                    : '',
+            locale: targetLocale || (isMessageFunction(format)
+                ? format.locale
+                : ''),
+            format: isString(format)
+                ? format
+                : isMessageFunction(format)
+                    ? format.source
+                    : '',
+            message: ret
+        };
+        payloads.meta = assign({}, context.__meta, getAdditionalMeta() || {});
+        translateDevTools(payloads);
+    }
+    return ret;
+}
+function escapeParams(options) {
+    if (isArray(options.list)) {
+        options.list = options.list.map(item => isString(item) ? escapeHtml(item) : item);
+    }
+    else if (isObject(options.named)) {
+        Object.keys(options.named).forEach(key => {
+            if (isString(options.named[key])) {
+                options.named[key] = escapeHtml(options.named[key]);
+            }
+        });
+    }
+}
+function resolveMessageFormat(context, key, locale, fallbackLocale, fallbackWarn, missingWarn) {
+    const { messages, onWarn, messageResolver: resolveValue, localeFallbacker } = context;
+    const locales = localeFallbacker(context, fallbackLocale, locale); // eslint-disable-line @typescript-eslint/no-explicit-any
+    let message = {};
+    let targetLocale;
+    let format = null;
+    let from = locale;
+    let to = null;
+    const type = 'translate';
+    for (let i = 0; i < locales.length; i++) {
+        targetLocale = to = locales[i];
+        if ((process.env.NODE_ENV !== 'production') &&
+            locale !== targetLocale &&
+            !isAlmostSameLocale(locale, targetLocale) &&
+            isTranslateFallbackWarn(fallbackWarn, key)) {
+            onWarn(getWarnMessage(CoreWarnCodes.FALLBACK_TO_TRANSLATE, {
+                key,
+                target: targetLocale
+            }));
+        }
+        // for vue-devtools timeline event
+        if ((process.env.NODE_ENV !== 'production') && locale !== targetLocale) {
+            const emitter = context.__v_emitter;
+            if (emitter) {
+                emitter.emit("fallback" /* VueDevToolsTimelineEvents.FALBACK */, {
+                    type,
+                    key,
+                    from,
+                    to,
+                    groupId: `${type}:${key}`
+                });
+            }
+        }
+        message =
+            messages[targetLocale] || {};
+        // for vue-devtools timeline event
+        let start = null;
+        let startTag;
+        let endTag;
+        if ((process.env.NODE_ENV !== 'production') && inBrowser) {
+            start = window.performance.now();
+            startTag = 'intlify-message-resolve-start';
+            endTag = 'intlify-message-resolve-end';
+            mark && mark(startTag);
+        }
+        if ((format = resolveValue(message, key)) === null) {
+            // if null, resolve with object key path
+            format = message[key]; // eslint-disable-line @typescript-eslint/no-explicit-any
+        }
+        // for vue-devtools timeline event
+        if ((process.env.NODE_ENV !== 'production') && inBrowser) {
+            const end = window.performance.now();
+            const emitter = context.__v_emitter;
+            if (emitter && start && format) {
+                emitter.emit("message-resolve" /* VueDevToolsTimelineEvents.MESSAGE_RESOLVE */, {
+                    type: "message-resolve" /* VueDevToolsTimelineEvents.MESSAGE_RESOLVE */,
+                    key,
+                    message: format,
+                    time: end - start,
+                    groupId: `${type}:${key}`
+                });
+            }
+            if (startTag && endTag && mark && measure) {
+                mark(endTag);
+                measure('intlify message resolve', startTag, endTag);
+            }
+        }
+        if (isString(format) || isMessageAST(format) || isMessageFunction(format)) {
+            break;
+        }
+        if (!isImplicitFallback(targetLocale, locales)) {
+            const missingRet = handleMissing(context, // eslint-disable-line @typescript-eslint/no-explicit-any
+            key, targetLocale, missingWarn, type);
+            if (missingRet !== key) {
+                format = missingRet;
+            }
+        }
+        from = to;
+    }
+    return [format, targetLocale, message];
+}
+function compileMessageFormat(context, key, targetLocale, format, cacheBaseKey, onError) {
+    const { messageCompiler, warnHtmlMessage } = context;
+    if (isMessageFunction(format)) {
+        const msg = format;
+        msg.locale = msg.locale || targetLocale;
+        msg.key = msg.key || key;
+        return msg;
+    }
+    if (messageCompiler == null) {
+        const msg = (() => format);
+        msg.locale = targetLocale;
+        msg.key = key;
+        return msg;
+    }
+    // for vue-devtools timeline event
+    let start = null;
+    let startTag;
+    let endTag;
+    if ((process.env.NODE_ENV !== 'production') && inBrowser) {
+        start = window.performance.now();
+        startTag = 'intlify-message-compilation-start';
+        endTag = 'intlify-message-compilation-end';
+        mark && mark(startTag);
+    }
+    const msg = messageCompiler(format, getCompileContext(context, targetLocale, cacheBaseKey, format, warnHtmlMessage, onError));
+    // for vue-devtools timeline event
+    if ((process.env.NODE_ENV !== 'production') && inBrowser) {
+        const end = window.performance.now();
+        const emitter = context.__v_emitter;
+        if (emitter && start) {
+            emitter.emit("message-compilation" /* VueDevToolsTimelineEvents.MESSAGE_COMPILATION */, {
+                type: "message-compilation" /* VueDevToolsTimelineEvents.MESSAGE_COMPILATION */,
+                message: format,
+                time: end - start,
+                groupId: `${'translate'}:${key}`
+            });
+        }
+        if (startTag && endTag && mark && measure) {
+            mark(endTag);
+            measure('intlify message compilation', startTag, endTag);
+        }
+    }
+    msg.locale = targetLocale;
+    msg.key = key;
+    msg.source = format;
+    return msg;
+}
+function evaluateMessage(context, msg, msgCtx) {
+    // for vue-devtools timeline event
+    let start = null;
+    let startTag;
+    let endTag;
+    if ((process.env.NODE_ENV !== 'production') && inBrowser) {
+        start = window.performance.now();
+        startTag = 'intlify-message-evaluation-start';
+        endTag = 'intlify-message-evaluation-end';
+        mark && mark(startTag);
+    }
+    const messaged = msg(msgCtx);
+    // for vue-devtools timeline event
+    if ((process.env.NODE_ENV !== 'production') && inBrowser) {
+        const end = window.performance.now();
+        const emitter = context.__v_emitter;
+        if (emitter && start) {
+            emitter.emit("message-evaluation" /* VueDevToolsTimelineEvents.MESSAGE_EVALUATION */, {
+                type: "message-evaluation" /* VueDevToolsTimelineEvents.MESSAGE_EVALUATION */,
+                value: messaged,
+                time: end - start,
+                groupId: `${'translate'}:${msg.key}`
+            });
+        }
+        if (startTag && endTag && mark && measure) {
+            mark(endTag);
+            measure('intlify message evaluation', startTag, endTag);
+        }
+    }
+    return messaged;
+}
+/** @internal */
+function parseTranslateArgs(...args) {
+    const [arg1, arg2, arg3] = args;
+    const options = {};
+    if (!isString(arg1) &&
+        !isNumber(arg1) &&
+        !isMessageFunction(arg1) &&
+        !isMessageAST(arg1)) {
+        throw createCoreError(CoreErrorCodes.INVALID_ARGUMENT);
+    }
+    // prettier-ignore
+    const key = isNumber(arg1)
+        ? String(arg1)
+        : isMessageFunction(arg1)
+            ? arg1
+            : arg1;
+    if (isNumber(arg2)) {
+        options.plural = arg2;
+    }
+    else if (isString(arg2)) {
+        options.default = arg2;
+    }
+    else if (isPlainObject(arg2) && !isEmptyObject(arg2)) {
+        options.named = arg2;
+    }
+    else if (isArray(arg2)) {
+        options.list = arg2;
+    }
+    if (isNumber(arg3)) {
+        options.plural = arg3;
+    }
+    else if (isString(arg3)) {
+        options.default = arg3;
+    }
+    else if (isPlainObject(arg3)) {
+        assign(options, arg3);
+    }
+    return [key, options];
+}
+function getCompileContext(context, locale, key, source, warnHtmlMessage, onError) {
+    return {
+        locale,
+        key,
+        warnHtmlMessage,
+        onError: (err) => {
+            onError && onError(err);
+            if ((process.env.NODE_ENV !== 'production')) {
+                const _source = getSourceForCodeFrame(source);
+                const message = `Message compilation error: ${err.message}`;
+                const codeFrame = err.location &&
+                    _source &&
+                    generateCodeFrame(_source, err.location.start.offset, err.location.end.offset);
+                const emitter = context.__v_emitter;
+                if (emitter && _source) {
+                    emitter.emit("compile-error" /* VueDevToolsTimelineEvents.COMPILE_ERROR */, {
+                        message: _source,
+                        error: err.message,
+                        start: err.location && err.location.start.offset,
+                        end: err.location && err.location.end.offset,
+                        groupId: `${'translate'}:${key}`
+                    });
+                }
+                console.error(codeFrame ? `${message}\n${codeFrame}` : message);
+            }
+            else {
+                throw err;
+            }
+        },
+        onCacheKey: (source) => generateFormatCacheKey(locale, key, source)
+    };
+}
+function getSourceForCodeFrame(source) {
+    if (isString(source)) {
+        return source;
+    }
+    else {
+        if (source.loc && source.loc.source) {
+            return source.loc.source;
+        }
+    }
+}
+function getMessageContextOptions(context, locale, message, options) {
+    const { modifiers, pluralRules, messageResolver: resolveValue, fallbackLocale, fallbackWarn, missingWarn, fallbackContext } = context;
+    const resolveMessage = (key) => {
+        let val = resolveValue(message, key);
+        // fallback to root context
+        if (val == null && fallbackContext) {
+            const [, , message] = resolveMessageFormat(fallbackContext, key, locale, fallbackLocale, fallbackWarn, missingWarn);
+            val = resolveValue(message, key);
+        }
+        if (isString(val) || isMessageAST(val)) {
+            let occurred = false;
+            const onError = () => {
+                occurred = true;
+            };
+            const msg = compileMessageFormat(context, key, locale, val, key, onError);
+            return !occurred
+                ? msg
+                : NOOP_MESSAGE_FUNCTION;
+        }
+        else if (isMessageFunction(val)) {
+            return val;
+        }
+        else {
+            // TODO: should be implemented warning message
+            return NOOP_MESSAGE_FUNCTION;
+        }
+    };
+    const ctxOptions = {
+        locale,
+        modifiers,
+        pluralRules,
+        messages: resolveMessage
+    };
+    if (context.processor) {
+        ctxOptions.processor = context.processor;
+    }
+    if (options.list) {
+        ctxOptions.list = options.list;
+    }
+    if (options.named) {
+        ctxOptions.named = options.named;
+    }
+    if (isNumber(options.plural)) {
+        ctxOptions.pluralIndex = options.plural;
+    }
+    return ctxOptions;
+}
+
+const intlDefined = typeof Intl !== 'undefined';
+const Availabilities = {
+    dateTimeFormat: intlDefined && typeof Intl.DateTimeFormat !== 'undefined',
+    numberFormat: intlDefined && typeof Intl.NumberFormat !== 'undefined'
+};
+
+// implementation of `datetime` function
+function datetime(context, ...args) {
+    const { datetimeFormats, unresolving, fallbackLocale, onWarn, localeFallbacker } = context;
+    const { __datetimeFormatters } = context;
+    if ((process.env.NODE_ENV !== 'production') && !Availabilities.dateTimeFormat) {
+        onWarn(getWarnMessage(CoreWarnCodes.CANNOT_FORMAT_DATE));
+        return MISSING_RESOLVE_VALUE;
+    }
+    const [key, value, options, overrides] = parseDateTimeArgs(...args);
+    const missingWarn = isBoolean(options.missingWarn)
+        ? options.missingWarn
+        : context.missingWarn;
+    const fallbackWarn = isBoolean(options.fallbackWarn)
+        ? options.fallbackWarn
+        : context.fallbackWarn;
+    const part = !!options.part;
+    const locale = getLocale(context, options);
+    const locales = localeFallbacker(context, // eslint-disable-line @typescript-eslint/no-explicit-any
+    fallbackLocale, locale);
+    if (!isString(key) || key === '') {
+        return new Intl.DateTimeFormat(locale, overrides).format(value);
+    }
+    // resolve format
+    let datetimeFormat = {};
+    let targetLocale;
+    let format = null;
+    let from = locale;
+    let to = null;
+    const type = 'datetime format';
+    for (let i = 0; i < locales.length; i++) {
+        targetLocale = to = locales[i];
+        if ((process.env.NODE_ENV !== 'production') &&
+            locale !== targetLocale &&
+            isTranslateFallbackWarn(fallbackWarn, key)) {
+            onWarn(getWarnMessage(CoreWarnCodes.FALLBACK_TO_DATE_FORMAT, {
+                key,
+                target: targetLocale
+            }));
+        }
+        // for vue-devtools timeline event
+        if ((process.env.NODE_ENV !== 'production') && locale !== targetLocale) {
+            const emitter = context.__v_emitter;
+            if (emitter) {
+                emitter.emit("fallback" /* VueDevToolsTimelineEvents.FALBACK */, {
+                    type,
+                    key,
+                    from,
+                    to,
+                    groupId: `${type}:${key}`
+                });
+            }
+        }
+        datetimeFormat =
+            datetimeFormats[targetLocale] || {};
+        format = datetimeFormat[key];
+        if (isPlainObject(format))
+            break;
+        handleMissing(context, key, targetLocale, missingWarn, type); // eslint-disable-line @typescript-eslint/no-explicit-any
+        from = to;
+    }
+    // checking format and target locale
+    if (!isPlainObject(format) || !isString(targetLocale)) {
+        return unresolving ? NOT_REOSLVED : key;
+    }
+    let id = `${targetLocale}__${key}`;
+    if (!isEmptyObject(overrides)) {
+        id = `${id}__${JSON.stringify(overrides)}`;
+    }
+    let formatter = __datetimeFormatters.get(id);
+    if (!formatter) {
+        formatter = new Intl.DateTimeFormat(targetLocale, assign({}, format, overrides));
+        __datetimeFormatters.set(id, formatter);
+    }
+    return !part ? formatter.format(value) : formatter.formatToParts(value);
+}
+/** @internal */
+const DATETIME_FORMAT_OPTIONS_KEYS = [
+    'localeMatcher',
+    'weekday',
+    'era',
+    'year',
+    'month',
+    'day',
+    'hour',
+    'minute',
+    'second',
+    'timeZoneName',
+    'formatMatcher',
+    'hour12',
+    'timeZone',
+    'dateStyle',
+    'timeStyle',
+    'calendar',
+    'dayPeriod',
+    'numberingSystem',
+    'hourCycle',
+    'fractionalSecondDigits'
+];
+/** @internal */
+function parseDateTimeArgs(...args) {
+    const [arg1, arg2, arg3, arg4] = args;
+    const options = {};
+    let overrides = {};
+    let value;
+    if (isString(arg1)) {
+        // Only allow ISO strings - other date formats are often supported,
+        // but may cause different results in different browsers.
+        const matches = arg1.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);
+        if (!matches) {
+            throw createCoreError(CoreErrorCodes.INVALID_ISO_DATE_ARGUMENT);
+        }
+        // Some browsers can not parse the iso datetime separated by space,
+        // this is a compromise solution by replace the 'T'/' ' with 'T'
+        const dateTime = matches[3]
+            ? matches[3].trim().startsWith('T')
+                ? `${matches[1].trim()}${matches[3].trim()}`
+                : `${matches[1].trim()}T${matches[3].trim()}`
+            : matches[1].trim();
+        value = new Date(dateTime);
+        try {
+            // This will fail if the date is not valid
+            value.toISOString();
+        }
+        catch (e) {
+            throw createCoreError(CoreErrorCodes.INVALID_ISO_DATE_ARGUMENT);
+        }
+    }
+    else if (isDate(arg1)) {
+        if (isNaN(arg1.getTime())) {
+            throw createCoreError(CoreErrorCodes.INVALID_DATE_ARGUMENT);
+        }
+        value = arg1;
+    }
+    else if (isNumber(arg1)) {
+        value = arg1;
+    }
+    else {
+        throw createCoreError(CoreErrorCodes.INVALID_ARGUMENT);
+    }
+    if (isString(arg2)) {
+        options.key = arg2;
+    }
+    else if (isPlainObject(arg2)) {
+        Object.keys(arg2).forEach(key => {
+            if (DATETIME_FORMAT_OPTIONS_KEYS.includes(key)) {
+                overrides[key] = arg2[key];
+            }
+            else {
+                options[key] = arg2[key];
+            }
+        });
+    }
+    if (isString(arg3)) {
+        options.locale = arg3;
+    }
+    else if (isPlainObject(arg3)) {
+        overrides = arg3;
+    }
+    if (isPlainObject(arg4)) {
+        overrides = arg4;
+    }
+    return [options.key || '', value, options, overrides];
+}
+/** @internal */
+function clearDateTimeFormat(ctx, locale, format) {
+    const context = ctx;
+    for (const key in format) {
+        const id = `${locale}__${key}`;
+        if (!context.__datetimeFormatters.has(id)) {
+            continue;
+        }
+        context.__datetimeFormatters.delete(id);
+    }
+}
+
+// implementation of `number` function
+function number(context, ...args) {
+    const { numberFormats, unresolving, fallbackLocale, onWarn, localeFallbacker } = context;
+    const { __numberFormatters } = context;
+    if ((process.env.NODE_ENV !== 'production') && !Availabilities.numberFormat) {
+        onWarn(getWarnMessage(CoreWarnCodes.CANNOT_FORMAT_NUMBER));
+        return MISSING_RESOLVE_VALUE;
+    }
+    const [key, value, options, overrides] = parseNumberArgs(...args);
+    const missingWarn = isBoolean(options.missingWarn)
+        ? options.missingWarn
+        : context.missingWarn;
+    const fallbackWarn = isBoolean(options.fallbackWarn)
+        ? options.fallbackWarn
+        : context.fallbackWarn;
+    const part = !!options.part;
+    const locale = getLocale(context, options);
+    const locales = localeFallbacker(context, // eslint-disable-line @typescript-eslint/no-explicit-any
+    fallbackLocale, locale);
+    if (!isString(key) || key === '') {
+        return new Intl.NumberFormat(locale, overrides).format(value);
+    }
+    // resolve format
+    let numberFormat = {};
+    let targetLocale;
+    let format = null;
+    let from = locale;
+    let to = null;
+    const type = 'number format';
+    for (let i = 0; i < locales.length; i++) {
+        targetLocale = to = locales[i];
+        if ((process.env.NODE_ENV !== 'production') &&
+            locale !== targetLocale &&
+            isTranslateFallbackWarn(fallbackWarn, key)) {
+            onWarn(getWarnMessage(CoreWarnCodes.FALLBACK_TO_NUMBER_FORMAT, {
+                key,
+                target: targetLocale
+            }));
+        }
+        // for vue-devtools timeline event
+        if ((process.env.NODE_ENV !== 'production') && locale !== targetLocale) {
+            const emitter = context.__v_emitter;
+            if (emitter) {
+                emitter.emit("fallback" /* VueDevToolsTimelineEvents.FALBACK */, {
+                    type,
+                    key,
+                    from,
+                    to,
+                    groupId: `${type}:${key}`
+                });
+            }
+        }
+        numberFormat =
+            numberFormats[targetLocale] || {};
+        format = numberFormat[key];
+        if (isPlainObject(format))
+            break;
+        handleMissing(context, key, targetLocale, missingWarn, type); // eslint-disable-line @typescript-eslint/no-explicit-any
+        from = to;
+    }
+    // checking format and target locale
+    if (!isPlainObject(format) || !isString(targetLocale)) {
+        return unresolving ? NOT_REOSLVED : key;
+    }
+    let id = `${targetLocale}__${key}`;
+    if (!isEmptyObject(overrides)) {
+        id = `${id}__${JSON.stringify(overrides)}`;
+    }
+    let formatter = __numberFormatters.get(id);
+    if (!formatter) {
+        formatter = new Intl.NumberFormat(targetLocale, assign({}, format, overrides));
+        __numberFormatters.set(id, formatter);
+    }
+    return !part ? formatter.format(value) : formatter.formatToParts(value);
+}
+/** @internal */
+const NUMBER_FORMAT_OPTIONS_KEYS = [
+    'localeMatcher',
+    'style',
+    'currency',
+    'currencyDisplay',
+    'currencySign',
+    'useGrouping',
+    'minimumIntegerDigits',
+    'minimumFractionDigits',
+    'maximumFractionDigits',
+    'minimumSignificantDigits',
+    'maximumSignificantDigits',
+    'compactDisplay',
+    'notation',
+    'signDisplay',
+    'unit',
+    'unitDisplay',
+    'roundingMode',
+    'roundingPriority',
+    'roundingIncrement',
+    'trailingZeroDisplay'
+];
+/** @internal */
+function parseNumberArgs(...args) {
+    const [arg1, arg2, arg3, arg4] = args;
+    const options = {};
+    let overrides = {};
+    if (!isNumber(arg1)) {
+        throw createCoreError(CoreErrorCodes.INVALID_ARGUMENT);
+    }
+    const value = arg1;
+    if (isString(arg2)) {
+        options.key = arg2;
+    }
+    else if (isPlainObject(arg2)) {
+        Object.keys(arg2).forEach(key => {
+            if (NUMBER_FORMAT_OPTIONS_KEYS.includes(key)) {
+                overrides[key] = arg2[key];
+            }
+            else {
+                options[key] = arg2[key];
+            }
+        });
+    }
+    if (isString(arg3)) {
+        options.locale = arg3;
+    }
+    else if (isPlainObject(arg3)) {
+        overrides = arg3;
+    }
+    if (isPlainObject(arg4)) {
+        overrides = arg4;
+    }
+    return [options.key || '', value, options, overrides];
+}
+/** @internal */
+function clearNumberFormat(ctx, locale, format) {
+    const context = ctx;
+    for (const key in format) {
+        const id = `${locale}__${key}`;
+        if (!context.__numberFormatters.has(id)) {
+            continue;
+        }
+        context.__numberFormatters.delete(id);
+    }
+}
+
+{
+    initFeatureFlags();
+}
+
+export { CoreErrorCodes, CoreWarnCodes, DATETIME_FORMAT_OPTIONS_KEYS, DEFAULT_LOCALE, DEFAULT_MESSAGE_DATA_TYPE, MISSING_RESOLVE_VALUE, NOT_REOSLVED, NUMBER_FORMAT_OPTIONS_KEYS, VERSION, clearCompileCache, clearDateTimeFormat, clearNumberFormat, compile, compileToFunction, createCoreContext, createCoreError, createMessageContext, datetime, fallbackWithLocaleChain, fallbackWithSimple, getAdditionalMeta, getDevToolsHook, getFallbackContext, getLocale, getWarnMessage, handleMissing, initI18nDevTools, isAlmostSameLocale, isImplicitFallback, isMessageAST, isMessageFunction, isTranslateFallbackWarn, isTranslateMissingWarn, number, parse, parseDateTimeArgs, parseNumberArgs, parseTranslateArgs, registerLocaleFallbacker, registerMessageCompiler, registerMessageResolver, resolveLocale, resolveValue, resolveWithKeyValue, setAdditionalMeta, setDevToolsHook, setFallbackContext, translate, translateDevTools, updateFallbackLocale };

+ 1578 - 0
node_modules/@intlify/core-base/dist/core-base.prod.cjs

@@ -0,0 +1,1578 @@
+/*!
+  * core-base v9.13.1
+  * (c) 2024 kazuya kawaguchi
+  * Released under the MIT License.
+  */
+'use strict';
+
+var messageCompiler = require('@intlify/message-compiler');
+var shared = require('@intlify/shared');
+
+const pathStateMachine =  [];
+pathStateMachine[0 /* States.BEFORE_PATH */] = {
+    ["w" /* PathCharTypes.WORKSPACE */]: [0 /* States.BEFORE_PATH */],
+    ["i" /* PathCharTypes.IDENT */]: [3 /* States.IN_IDENT */, 0 /* Actions.APPEND */],
+    ["[" /* PathCharTypes.LEFT_BRACKET */]: [4 /* States.IN_SUB_PATH */],
+    ["o" /* PathCharTypes.END_OF_FAIL */]: [7 /* States.AFTER_PATH */]
+};
+pathStateMachine[1 /* States.IN_PATH */] = {
+    ["w" /* PathCharTypes.WORKSPACE */]: [1 /* States.IN_PATH */],
+    ["." /* PathCharTypes.DOT */]: [2 /* States.BEFORE_IDENT */],
+    ["[" /* PathCharTypes.LEFT_BRACKET */]: [4 /* States.IN_SUB_PATH */],
+    ["o" /* PathCharTypes.END_OF_FAIL */]: [7 /* States.AFTER_PATH */]
+};
+pathStateMachine[2 /* States.BEFORE_IDENT */] = {
+    ["w" /* PathCharTypes.WORKSPACE */]: [2 /* States.BEFORE_IDENT */],
+    ["i" /* PathCharTypes.IDENT */]: [3 /* States.IN_IDENT */, 0 /* Actions.APPEND */],
+    ["0" /* PathCharTypes.ZERO */]: [3 /* States.IN_IDENT */, 0 /* Actions.APPEND */]
+};
+pathStateMachine[3 /* States.IN_IDENT */] = {
+    ["i" /* PathCharTypes.IDENT */]: [3 /* States.IN_IDENT */, 0 /* Actions.APPEND */],
+    ["0" /* PathCharTypes.ZERO */]: [3 /* States.IN_IDENT */, 0 /* Actions.APPEND */],
+    ["w" /* PathCharTypes.WORKSPACE */]: [1 /* States.IN_PATH */, 1 /* Actions.PUSH */],
+    ["." /* PathCharTypes.DOT */]: [2 /* States.BEFORE_IDENT */, 1 /* Actions.PUSH */],
+    ["[" /* PathCharTypes.LEFT_BRACKET */]: [4 /* States.IN_SUB_PATH */, 1 /* Actions.PUSH */],
+    ["o" /* PathCharTypes.END_OF_FAIL */]: [7 /* States.AFTER_PATH */, 1 /* Actions.PUSH */]
+};
+pathStateMachine[4 /* States.IN_SUB_PATH */] = {
+    ["'" /* PathCharTypes.SINGLE_QUOTE */]: [5 /* States.IN_SINGLE_QUOTE */, 0 /* Actions.APPEND */],
+    ["\"" /* PathCharTypes.DOUBLE_QUOTE */]: [6 /* States.IN_DOUBLE_QUOTE */, 0 /* Actions.APPEND */],
+    ["[" /* PathCharTypes.LEFT_BRACKET */]: [
+        4 /* States.IN_SUB_PATH */,
+        2 /* Actions.INC_SUB_PATH_DEPTH */
+    ],
+    ["]" /* PathCharTypes.RIGHT_BRACKET */]: [1 /* States.IN_PATH */, 3 /* Actions.PUSH_SUB_PATH */],
+    ["o" /* PathCharTypes.END_OF_FAIL */]: 8 /* States.ERROR */,
+    ["l" /* PathCharTypes.ELSE */]: [4 /* States.IN_SUB_PATH */, 0 /* Actions.APPEND */]
+};
+pathStateMachine[5 /* States.IN_SINGLE_QUOTE */] = {
+    ["'" /* PathCharTypes.SINGLE_QUOTE */]: [4 /* States.IN_SUB_PATH */, 0 /* Actions.APPEND */],
+    ["o" /* PathCharTypes.END_OF_FAIL */]: 8 /* States.ERROR */,
+    ["l" /* PathCharTypes.ELSE */]: [5 /* States.IN_SINGLE_QUOTE */, 0 /* Actions.APPEND */]
+};
+pathStateMachine[6 /* States.IN_DOUBLE_QUOTE */] = {
+    ["\"" /* PathCharTypes.DOUBLE_QUOTE */]: [4 /* States.IN_SUB_PATH */, 0 /* Actions.APPEND */],
+    ["o" /* PathCharTypes.END_OF_FAIL */]: 8 /* States.ERROR */,
+    ["l" /* PathCharTypes.ELSE */]: [6 /* States.IN_DOUBLE_QUOTE */, 0 /* Actions.APPEND */]
+};
+/**
+ * Check if an expression is a literal value.
+ */
+const literalValueRE = /^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;
+function isLiteral(exp) {
+    return literalValueRE.test(exp);
+}
+/**
+ * Strip quotes from a string
+ */
+function stripQuotes(str) {
+    const a = str.charCodeAt(0);
+    const b = str.charCodeAt(str.length - 1);
+    return a === b && (a === 0x22 || a === 0x27) ? str.slice(1, -1) : str;
+}
+/**
+ * Determine the type of a character in a keypath.
+ */
+function getPathCharType(ch) {
+    if (ch === undefined || ch === null) {
+        return "o" /* PathCharTypes.END_OF_FAIL */;
+    }
+    const code = ch.charCodeAt(0);
+    switch (code) {
+        case 0x5b: // [
+        case 0x5d: // ]
+        case 0x2e: // .
+        case 0x22: // "
+        case 0x27: // '
+            return ch;
+        case 0x5f: // _
+        case 0x24: // $
+        case 0x2d: // -
+            return "i" /* PathCharTypes.IDENT */;
+        case 0x09: // Tab (HT)
+        case 0x0a: // Newline (LF)
+        case 0x0d: // Return (CR)
+        case 0xa0: // No-break space (NBSP)
+        case 0xfeff: // Byte Order Mark (BOM)
+        case 0x2028: // Line Separator (LS)
+        case 0x2029: // Paragraph Separator (PS)
+            return "w" /* PathCharTypes.WORKSPACE */;
+    }
+    return "i" /* PathCharTypes.IDENT */;
+}
+/**
+ * Format a subPath, return its plain form if it is
+ * a literal string or number. Otherwise prepend the
+ * dynamic indicator (*).
+ */
+function formatSubPath(path) {
+    const trimmed = path.trim();
+    // invalid leading 0
+    if (path.charAt(0) === '0' && isNaN(parseInt(path))) {
+        return false;
+    }
+    return isLiteral(trimmed)
+        ? stripQuotes(trimmed)
+        : "*" /* PathCharTypes.ASTARISK */ + trimmed;
+}
+/**
+ * Parse a string path into an array of segments
+ */
+function parse(path) {
+    const keys = [];
+    let index = -1;
+    let mode = 0 /* States.BEFORE_PATH */;
+    let subPathDepth = 0;
+    let c;
+    let key; // eslint-disable-line
+    let newChar;
+    let type;
+    let transition;
+    let action;
+    let typeMap;
+    const actions = [];
+    actions[0 /* Actions.APPEND */] = () => {
+        if (key === undefined) {
+            key = newChar;
+        }
+        else {
+            key += newChar;
+        }
+    };
+    actions[1 /* Actions.PUSH */] = () => {
+        if (key !== undefined) {
+            keys.push(key);
+            key = undefined;
+        }
+    };
+    actions[2 /* Actions.INC_SUB_PATH_DEPTH */] = () => {
+        actions[0 /* Actions.APPEND */]();
+        subPathDepth++;
+    };
+    actions[3 /* Actions.PUSH_SUB_PATH */] = () => {
+        if (subPathDepth > 0) {
+            subPathDepth--;
+            mode = 4 /* States.IN_SUB_PATH */;
+            actions[0 /* Actions.APPEND */]();
+        }
+        else {
+            subPathDepth = 0;
+            if (key === undefined) {
+                return false;
+            }
+            key = formatSubPath(key);
+            if (key === false) {
+                return false;
+            }
+            else {
+                actions[1 /* Actions.PUSH */]();
+            }
+        }
+    };
+    function maybeUnescapeQuote() {
+        const nextChar = path[index + 1];
+        if ((mode === 5 /* States.IN_SINGLE_QUOTE */ &&
+            nextChar === "'" /* PathCharTypes.SINGLE_QUOTE */) ||
+            (mode === 6 /* States.IN_DOUBLE_QUOTE */ &&
+                nextChar === "\"" /* PathCharTypes.DOUBLE_QUOTE */)) {
+            index++;
+            newChar = '\\' + nextChar;
+            actions[0 /* Actions.APPEND */]();
+            return true;
+        }
+    }
+    while (mode !== null) {
+        index++;
+        c = path[index];
+        if (c === '\\' && maybeUnescapeQuote()) {
+            continue;
+        }
+        type = getPathCharType(c);
+        typeMap = pathStateMachine[mode];
+        transition = typeMap[type] || typeMap["l" /* PathCharTypes.ELSE */] || 8 /* States.ERROR */;
+        // check parse error
+        if (transition === 8 /* States.ERROR */) {
+            return;
+        }
+        mode = transition[0];
+        if (transition[1] !== undefined) {
+            action = actions[transition[1]];
+            if (action) {
+                newChar = c;
+                if (action() === false) {
+                    return;
+                }
+            }
+        }
+        // check parse finish
+        if (mode === 7 /* States.AFTER_PATH */) {
+            return keys;
+        }
+    }
+}
+// path token cache
+const cache = new Map();
+/**
+ * key-value message resolver
+ *
+ * @remarks
+ * Resolves messages with the key-value structure. Note that messages with a hierarchical structure such as objects cannot be resolved
+ *
+ * @param obj - A target object to be resolved with path
+ * @param path - A {@link Path | path} to resolve the value of message
+ *
+ * @returns A resolved {@link PathValue | path value}
+ *
+ * @VueI18nGeneral
+ */
+function resolveWithKeyValue(obj, path) {
+    return shared.isObject(obj) ? obj[path] : null;
+}
+/**
+ * message resolver
+ *
+ * @remarks
+ * Resolves messages. messages with a hierarchical structure such as objects can be resolved. This resolver is used in VueI18n as default.
+ *
+ * @param obj - A target object to be resolved with path
+ * @param path - A {@link Path | path} to resolve the value of message
+ *
+ * @returns A resolved {@link PathValue | path value}
+ *
+ * @VueI18nGeneral
+ */
+function resolveValue(obj, path) {
+    // check object
+    if (!shared.isObject(obj)) {
+        return null;
+    }
+    // parse path
+    let hit = cache.get(path);
+    if (!hit) {
+        hit = parse(path);
+        if (hit) {
+            cache.set(path, hit);
+        }
+    }
+    // check hit
+    if (!hit) {
+        return null;
+    }
+    // resolve path value
+    const len = hit.length;
+    let last = obj;
+    let i = 0;
+    while (i < len) {
+        const val = last[hit[i]];
+        if (val === undefined) {
+            return null;
+        }
+        if (shared.isFunction(last)) {
+            return null;
+        }
+        last = val;
+        i++;
+    }
+    return last;
+}
+
+const DEFAULT_MODIFIER = (str) => str;
+const DEFAULT_MESSAGE = (ctx) => ''; // eslint-disable-line
+const DEFAULT_MESSAGE_DATA_TYPE = 'text';
+const DEFAULT_NORMALIZE = (values) => values.length === 0 ? '' : shared.join(values);
+const DEFAULT_INTERPOLATE = shared.toDisplayString;
+function pluralDefault(choice, choicesLength) {
+    choice = Math.abs(choice);
+    if (choicesLength === 2) {
+        // prettier-ignore
+        return choice
+            ? choice > 1
+                ? 1
+                : 0
+            : 1;
+    }
+    return choice ? Math.min(choice, 2) : 0;
+}
+function getPluralIndex(options) {
+    // prettier-ignore
+    const index = shared.isNumber(options.pluralIndex)
+        ? options.pluralIndex
+        : -1;
+    // prettier-ignore
+    return options.named && (shared.isNumber(options.named.count) || shared.isNumber(options.named.n))
+        ? shared.isNumber(options.named.count)
+            ? options.named.count
+            : shared.isNumber(options.named.n)
+                ? options.named.n
+                : index
+        : index;
+}
+function normalizeNamed(pluralIndex, props) {
+    if (!props.count) {
+        props.count = pluralIndex;
+    }
+    if (!props.n) {
+        props.n = pluralIndex;
+    }
+}
+function createMessageContext(options = {}) {
+    const locale = options.locale;
+    const pluralIndex = getPluralIndex(options);
+    const pluralRule = shared.isObject(options.pluralRules) &&
+        shared.isString(locale) &&
+        shared.isFunction(options.pluralRules[locale])
+        ? options.pluralRules[locale]
+        : pluralDefault;
+    const orgPluralRule = shared.isObject(options.pluralRules) &&
+        shared.isString(locale) &&
+        shared.isFunction(options.pluralRules[locale])
+        ? pluralDefault
+        : undefined;
+    const plural = (messages) => {
+        return messages[pluralRule(pluralIndex, messages.length, orgPluralRule)];
+    };
+    const _list = options.list || [];
+    const list = (index) => _list[index];
+    // eslint-disable-next-line @typescript-eslint/no-explicit-any
+    const _named = options.named || {};
+    shared.isNumber(options.pluralIndex) && normalizeNamed(pluralIndex, _named);
+    const named = (key) => _named[key];
+    function message(key) {
+        // prettier-ignore
+        const msg = shared.isFunction(options.messages)
+            ? options.messages(key)
+            : shared.isObject(options.messages)
+                ? options.messages[key]
+                : false;
+        return !msg
+            ? options.parent
+                ? options.parent.message(key) // resolve from parent messages
+                : DEFAULT_MESSAGE
+            : msg;
+    }
+    const _modifier = (name) => options.modifiers
+        ? options.modifiers[name]
+        : DEFAULT_MODIFIER;
+    const normalize = shared.isPlainObject(options.processor) && shared.isFunction(options.processor.normalize)
+        ? options.processor.normalize
+        : DEFAULT_NORMALIZE;
+    const interpolate = shared.isPlainObject(options.processor) &&
+        shared.isFunction(options.processor.interpolate)
+        ? options.processor.interpolate
+        : DEFAULT_INTERPOLATE;
+    const type = shared.isPlainObject(options.processor) && shared.isString(options.processor.type)
+        ? options.processor.type
+        : DEFAULT_MESSAGE_DATA_TYPE;
+    const linked = (key, ...args) => {
+        const [arg1, arg2] = args;
+        let type = 'text';
+        let modifier = '';
+        if (args.length === 1) {
+            if (shared.isObject(arg1)) {
+                modifier = arg1.modifier || modifier;
+                type = arg1.type || type;
+            }
+            else if (shared.isString(arg1)) {
+                modifier = arg1 || modifier;
+            }
+        }
+        else if (args.length === 2) {
+            if (shared.isString(arg1)) {
+                modifier = arg1 || modifier;
+            }
+            if (shared.isString(arg2)) {
+                type = arg2 || type;
+            }
+        }
+        const ret = message(key)(ctx);
+        const msg = 
+        // The message in vnode resolved with linked are returned as an array by processor.nomalize
+        type === 'vnode' && shared.isArray(ret) && modifier
+            ? ret[0]
+            : ret;
+        return modifier ? _modifier(modifier)(msg, type) : msg;
+    };
+    const ctx = {
+        ["list" /* HelperNameMap.LIST */]: list,
+        ["named" /* HelperNameMap.NAMED */]: named,
+        ["plural" /* HelperNameMap.PLURAL */]: plural,
+        ["linked" /* HelperNameMap.LINKED */]: linked,
+        ["message" /* HelperNameMap.MESSAGE */]: message,
+        ["type" /* HelperNameMap.TYPE */]: type,
+        ["interpolate" /* HelperNameMap.INTERPOLATE */]: interpolate,
+        ["normalize" /* HelperNameMap.NORMALIZE */]: normalize,
+        ["values" /* HelperNameMap.VALUES */]: shared.assign({}, _list, _named)
+    };
+    return ctx;
+}
+
+let devtools = null;
+function setDevToolsHook(hook) {
+    devtools = hook;
+}
+function getDevToolsHook() {
+    return devtools;
+}
+function initI18nDevTools(i18n, version, meta) {
+    // TODO: queue if devtools is undefined
+    devtools &&
+        devtools.emit("i18n:init" /* IntlifyDevToolsHooks.I18nInit */, {
+            timestamp: Date.now(),
+            i18n,
+            version,
+            meta
+        });
+}
+const translateDevTools = /* #__PURE__*/ createDevToolsHook("function:translate" /* IntlifyDevToolsHooks.FunctionTranslate */);
+function createDevToolsHook(hook) {
+    return (payloads) => devtools && devtools.emit(hook, payloads);
+}
+
+const code$1 = messageCompiler.CompileWarnCodes.__EXTEND_POINT__;
+const inc$1 = shared.incrementer(code$1);
+const CoreWarnCodes = {
+    NOT_FOUND_KEY: code$1, // 2
+    FALLBACK_TO_TRANSLATE: inc$1(), // 3
+    CANNOT_FORMAT_NUMBER: inc$1(), // 4
+    FALLBACK_TO_NUMBER_FORMAT: inc$1(), // 5
+    CANNOT_FORMAT_DATE: inc$1(), // 6
+    FALLBACK_TO_DATE_FORMAT: inc$1(), // 7
+    EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER: inc$1(), // 8
+    __EXTEND_POINT__: inc$1() // 9
+};
+/** @internal */
+const warnMessages = {
+    [CoreWarnCodes.NOT_FOUND_KEY]: `Not found '{key}' key in '{locale}' locale messages.`,
+    [CoreWarnCodes.FALLBACK_TO_TRANSLATE]: `Fall back to translate '{key}' key with '{target}' locale.`,
+    [CoreWarnCodes.CANNOT_FORMAT_NUMBER]: `Cannot format a number value due to not supported Intl.NumberFormat.`,
+    [CoreWarnCodes.FALLBACK_TO_NUMBER_FORMAT]: `Fall back to number format '{key}' key with '{target}' locale.`,
+    [CoreWarnCodes.CANNOT_FORMAT_DATE]: `Cannot format a date value due to not supported Intl.DateTimeFormat.`,
+    [CoreWarnCodes.FALLBACK_TO_DATE_FORMAT]: `Fall back to datetime format '{key}' key with '{target}' locale.`,
+    [CoreWarnCodes.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER]: `This project is using Custom Message Compiler, which is an experimental feature. It may receive breaking changes or be removed in the future.`
+};
+function getWarnMessage(code, ...args) {
+    return shared.format(warnMessages[code], ...args);
+}
+
+const code = messageCompiler.CompileErrorCodes.__EXTEND_POINT__;
+const inc = shared.incrementer(code);
+const CoreErrorCodes = {
+    INVALID_ARGUMENT: code, // 17
+    INVALID_DATE_ARGUMENT: inc(), // 18
+    INVALID_ISO_DATE_ARGUMENT: inc(), // 19
+    NOT_SUPPORT_NON_STRING_MESSAGE: inc(), // 20
+    NOT_SUPPORT_LOCALE_PROMISE_VALUE: inc(), // 21
+    NOT_SUPPORT_LOCALE_ASYNC_FUNCTION: inc(), // 22
+    NOT_SUPPORT_LOCALE_TYPE: inc(), // 23
+    __EXTEND_POINT__: inc() // 24
+};
+function createCoreError(code) {
+    return messageCompiler.createCompileError(code, null, undefined);
+}
+/** @internal */
+({
+    [CoreErrorCodes.INVALID_ARGUMENT]: 'Invalid arguments',
+    [CoreErrorCodes.INVALID_DATE_ARGUMENT]: 'The date provided is an invalid Date object.' +
+        'Make sure your Date represents a valid date.',
+    [CoreErrorCodes.INVALID_ISO_DATE_ARGUMENT]: 'The argument provided is not a valid ISO date string',
+    [CoreErrorCodes.NOT_SUPPORT_NON_STRING_MESSAGE]: 'Not support non-string message',
+    [CoreErrorCodes.NOT_SUPPORT_LOCALE_PROMISE_VALUE]: 'cannot support promise value',
+    [CoreErrorCodes.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION]: 'cannot support async function',
+    [CoreErrorCodes.NOT_SUPPORT_LOCALE_TYPE]: 'cannot support locale type'
+});
+
+/** @internal */
+function getLocale(context, options) {
+    return options.locale != null
+        ? resolveLocale(options.locale)
+        : resolveLocale(context.locale);
+}
+let _resolveLocale;
+/** @internal */
+function resolveLocale(locale) {
+    if (shared.isString(locale)) {
+        return locale;
+    }
+    else {
+        if (shared.isFunction(locale)) {
+            if (locale.resolvedOnce && _resolveLocale != null) {
+                return _resolveLocale;
+            }
+            else if (locale.constructor.name === 'Function') {
+                const resolve = locale();
+                if (shared.isPromise(resolve)) {
+                    throw createCoreError(CoreErrorCodes.NOT_SUPPORT_LOCALE_PROMISE_VALUE);
+                }
+                return (_resolveLocale = resolve);
+            }
+            else {
+                throw createCoreError(CoreErrorCodes.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION);
+            }
+        }
+        else {
+            throw createCoreError(CoreErrorCodes.NOT_SUPPORT_LOCALE_TYPE);
+        }
+    }
+}
+/**
+ * Fallback with simple implemenation
+ *
+ * @remarks
+ * A fallback locale function implemented with a simple fallback algorithm.
+ *
+ * Basically, it returns the value as specified in the `fallbackLocale` props, and is processed with the fallback inside intlify.
+ *
+ * @param ctx - A {@link CoreContext | context}
+ * @param fallback - A {@link FallbackLocale | fallback locale}
+ * @param start - A starting {@link Locale | locale}
+ *
+ * @returns Fallback locales
+ *
+ * @VueI18nGeneral
+ */
+function fallbackWithSimple(ctx, fallback, start // eslint-disable-line @typescript-eslint/no-unused-vars
+) {
+    // prettier-ignore
+    return [...new Set([
+            start,
+            ...(shared.isArray(fallback)
+                ? fallback
+                : shared.isObject(fallback)
+                    ? Object.keys(fallback)
+                    : shared.isString(fallback)
+                        ? [fallback]
+                        : [start])
+        ])];
+}
+/**
+ * Fallback with locale chain
+ *
+ * @remarks
+ * A fallback locale function implemented with a fallback chain algorithm. It's used in VueI18n as default.
+ *
+ * @param ctx - A {@link CoreContext | context}
+ * @param fallback - A {@link FallbackLocale | fallback locale}
+ * @param start - A starting {@link Locale | locale}
+ *
+ * @returns Fallback locales
+ *
+ * @VueI18nSee [Fallbacking](../guide/essentials/fallback)
+ *
+ * @VueI18nGeneral
+ */
+function fallbackWithLocaleChain(ctx, fallback, start) {
+    const startLocale = shared.isString(start) ? start : DEFAULT_LOCALE;
+    const context = ctx;
+    if (!context.__localeChainCache) {
+        context.__localeChainCache = new Map();
+    }
+    let chain = context.__localeChainCache.get(startLocale);
+    if (!chain) {
+        chain = [];
+        // first block defined by start
+        let block = [start];
+        // while any intervening block found
+        while (shared.isArray(block)) {
+            block = appendBlockToChain(chain, block, fallback);
+        }
+        // prettier-ignore
+        // last block defined by default
+        const defaults = shared.isArray(fallback) || !shared.isPlainObject(fallback)
+            ? fallback
+            : fallback['default']
+                ? fallback['default']
+                : null;
+        // convert defaults to array
+        block = shared.isString(defaults) ? [defaults] : defaults;
+        if (shared.isArray(block)) {
+            appendBlockToChain(chain, block, false);
+        }
+        context.__localeChainCache.set(startLocale, chain);
+    }
+    return chain;
+}
+function appendBlockToChain(chain, block, blocks) {
+    let follow = true;
+    for (let i = 0; i < block.length && shared.isBoolean(follow); i++) {
+        const locale = block[i];
+        if (shared.isString(locale)) {
+            follow = appendLocaleToChain(chain, block[i], blocks);
+        }
+    }
+    return follow;
+}
+function appendLocaleToChain(chain, locale, blocks) {
+    let follow;
+    const tokens = locale.split('-');
+    do {
+        const target = tokens.join('-');
+        follow = appendItemToChain(chain, target, blocks);
+        tokens.splice(-1, 1);
+    } while (tokens.length && follow === true);
+    return follow;
+}
+function appendItemToChain(chain, target, blocks) {
+    let follow = false;
+    if (!chain.includes(target)) {
+        follow = true;
+        if (target) {
+            follow = target[target.length - 1] !== '!';
+            const locale = target.replace(/!/g, '');
+            chain.push(locale);
+            if ((shared.isArray(blocks) || shared.isPlainObject(blocks)) &&
+                blocks[locale] // eslint-disable-line @typescript-eslint/no-explicit-any
+            ) {
+                // eslint-disable-next-line @typescript-eslint/no-explicit-any
+                follow = blocks[locale];
+            }
+        }
+    }
+    return follow;
+}
+
+/* eslint-disable @typescript-eslint/no-explicit-any */
+/**
+ * Intlify core-base version
+ * @internal
+ */
+const VERSION = '9.13.1';
+const NOT_REOSLVED = -1;
+const DEFAULT_LOCALE = 'en-US';
+const MISSING_RESOLVE_VALUE = '';
+const capitalize = (str) => `${str.charAt(0).toLocaleUpperCase()}${str.substr(1)}`;
+function getDefaultLinkedModifiers() {
+    return {
+        upper: (val, type) => {
+            // prettier-ignore
+            return type === 'text' && shared.isString(val)
+                ? val.toUpperCase()
+                : type === 'vnode' && shared.isObject(val) && '__v_isVNode' in val
+                    ? val.children.toUpperCase()
+                    : val;
+        },
+        lower: (val, type) => {
+            // prettier-ignore
+            return type === 'text' && shared.isString(val)
+                ? val.toLowerCase()
+                : type === 'vnode' && shared.isObject(val) && '__v_isVNode' in val
+                    ? val.children.toLowerCase()
+                    : val;
+        },
+        capitalize: (val, type) => {
+            // prettier-ignore
+            return (type === 'text' && shared.isString(val)
+                ? capitalize(val)
+                : type === 'vnode' && shared.isObject(val) && '__v_isVNode' in val
+                    ? capitalize(val.children)
+                    : val);
+        }
+    };
+}
+let _compiler;
+function registerMessageCompiler(compiler) {
+    _compiler = compiler;
+}
+let _resolver;
+/**
+ * Register the message resolver
+ *
+ * @param resolver - A {@link MessageResolver} function
+ *
+ * @VueI18nGeneral
+ */
+function registerMessageResolver(resolver) {
+    _resolver = resolver;
+}
+let _fallbacker;
+/**
+ * Register the locale fallbacker
+ *
+ * @param fallbacker - A {@link LocaleFallbacker} function
+ *
+ * @VueI18nGeneral
+ */
+function registerLocaleFallbacker(fallbacker) {
+    _fallbacker = fallbacker;
+}
+// Additional Meta for Intlify DevTools
+let _additionalMeta =  null;
+/* #__NO_SIDE_EFFECTS__ */
+const setAdditionalMeta = (meta) => {
+    _additionalMeta = meta;
+};
+/* #__NO_SIDE_EFFECTS__ */
+const getAdditionalMeta = () => _additionalMeta;
+let _fallbackContext = null;
+const setFallbackContext = (context) => {
+    _fallbackContext = context;
+};
+const getFallbackContext = () => _fallbackContext;
+// ID for CoreContext
+let _cid = 0;
+function createCoreContext(options = {}) {
+    // setup options
+    const onWarn = shared.isFunction(options.onWarn) ? options.onWarn : shared.warn;
+    const version = shared.isString(options.version) ? options.version : VERSION;
+    const locale = shared.isString(options.locale) || shared.isFunction(options.locale)
+        ? options.locale
+        : DEFAULT_LOCALE;
+    const _locale = shared.isFunction(locale) ? DEFAULT_LOCALE : locale;
+    const fallbackLocale = shared.isArray(options.fallbackLocale) ||
+        shared.isPlainObject(options.fallbackLocale) ||
+        shared.isString(options.fallbackLocale) ||
+        options.fallbackLocale === false
+        ? options.fallbackLocale
+        : _locale;
+    const messages = shared.isPlainObject(options.messages)
+        ? options.messages
+        : { [_locale]: {} };
+    const datetimeFormats = shared.isPlainObject(options.datetimeFormats)
+            ? options.datetimeFormats
+            : { [_locale]: {} }
+        ;
+    const numberFormats = shared.isPlainObject(options.numberFormats)
+            ? options.numberFormats
+            : { [_locale]: {} }
+        ;
+    const modifiers = shared.assign({}, options.modifiers || {}, getDefaultLinkedModifiers());
+    const pluralRules = options.pluralRules || {};
+    const missing = shared.isFunction(options.missing) ? options.missing : null;
+    const missingWarn = shared.isBoolean(options.missingWarn) || shared.isRegExp(options.missingWarn)
+        ? options.missingWarn
+        : true;
+    const fallbackWarn = shared.isBoolean(options.fallbackWarn) || shared.isRegExp(options.fallbackWarn)
+        ? options.fallbackWarn
+        : true;
+    const fallbackFormat = !!options.fallbackFormat;
+    const unresolving = !!options.unresolving;
+    const postTranslation = shared.isFunction(options.postTranslation)
+        ? options.postTranslation
+        : null;
+    const processor = shared.isPlainObject(options.processor) ? options.processor : null;
+    const warnHtmlMessage = shared.isBoolean(options.warnHtmlMessage)
+        ? options.warnHtmlMessage
+        : true;
+    const escapeParameter = !!options.escapeParameter;
+    const messageCompiler = shared.isFunction(options.messageCompiler)
+        ? options.messageCompiler
+        : _compiler;
+    const messageResolver = shared.isFunction(options.messageResolver)
+        ? options.messageResolver
+        : _resolver || resolveWithKeyValue;
+    const localeFallbacker = shared.isFunction(options.localeFallbacker)
+        ? options.localeFallbacker
+        : _fallbacker || fallbackWithSimple;
+    const fallbackContext = shared.isObject(options.fallbackContext)
+        ? options.fallbackContext
+        : undefined;
+    // setup internal options
+    const internalOptions = options;
+    const __datetimeFormatters = shared.isObject(internalOptions.__datetimeFormatters)
+            ? internalOptions.__datetimeFormatters
+            : new Map()
+        ;
+    const __numberFormatters = shared.isObject(internalOptions.__numberFormatters)
+            ? internalOptions.__numberFormatters
+            : new Map()
+        ;
+    const __meta = shared.isObject(internalOptions.__meta) ? internalOptions.__meta : {};
+    _cid++;
+    const context = {
+        version,
+        cid: _cid,
+        locale,
+        fallbackLocale,
+        messages,
+        modifiers,
+        pluralRules,
+        missing,
+        missingWarn,
+        fallbackWarn,
+        fallbackFormat,
+        unresolving,
+        postTranslation,
+        processor,
+        warnHtmlMessage,
+        escapeParameter,
+        messageCompiler,
+        messageResolver,
+        localeFallbacker,
+        fallbackContext,
+        onWarn,
+        __meta
+    };
+    {
+        context.datetimeFormats = datetimeFormats;
+        context.numberFormats = numberFormats;
+        context.__datetimeFormatters = __datetimeFormatters;
+        context.__numberFormatters = __numberFormatters;
+    }
+    return context;
+}
+/** @internal */
+function isTranslateFallbackWarn(fallback, key) {
+    return fallback instanceof RegExp ? fallback.test(key) : fallback;
+}
+/** @internal */
+function isTranslateMissingWarn(missing, key) {
+    return missing instanceof RegExp ? missing.test(key) : missing;
+}
+/** @internal */
+function handleMissing(context, key, locale, missingWarn, type) {
+    const { missing, onWarn } = context;
+    if (missing !== null) {
+        const ret = missing(context, locale, key, type);
+        return shared.isString(ret) ? ret : key;
+    }
+    else {
+        return key;
+    }
+}
+/** @internal */
+function updateFallbackLocale(ctx, locale, fallback) {
+    const context = ctx;
+    context.__localeChainCache = new Map();
+    ctx.localeFallbacker(ctx, fallback, locale);
+}
+/** @internal */
+function isAlmostSameLocale(locale, compareLocale) {
+    if (locale === compareLocale)
+        return false;
+    return locale.split('-')[0] === compareLocale.split('-')[0];
+}
+/** @internal */
+function isImplicitFallback(targetLocale, locales) {
+    const index = locales.indexOf(targetLocale);
+    if (index === -1) {
+        return false;
+    }
+    for (let i = index + 1; i < locales.length; i++) {
+        if (isAlmostSameLocale(targetLocale, locales[i])) {
+            return true;
+        }
+    }
+    return false;
+}
+/* eslint-enable @typescript-eslint/no-explicit-any */
+
+function format(ast) {
+    const msg = (ctx) => formatParts(ctx, ast);
+    return msg;
+}
+function formatParts(ctx, ast) {
+    const body = ast.b || ast.body;
+    if ((body.t || body.type) === 1 /* NodeTypes.Plural */) {
+        const plural = body;
+        const cases = plural.c || plural.cases;
+        return ctx.plural(cases.reduce((messages, c) => [
+            ...messages,
+            formatMessageParts(ctx, c)
+        ], []));
+    }
+    else {
+        return formatMessageParts(ctx, body);
+    }
+}
+function formatMessageParts(ctx, node) {
+    const _static = node.s || node.static;
+    if (_static) {
+        return ctx.type === 'text'
+            ? _static
+            : ctx.normalize([_static]);
+    }
+    else {
+        const messages = (node.i || node.items).reduce((acm, c) => [...acm, formatMessagePart(ctx, c)], []);
+        return ctx.normalize(messages);
+    }
+}
+function formatMessagePart(ctx, node) {
+    const type = node.t || node.type;
+    switch (type) {
+        case 3 /* NodeTypes.Text */: {
+            const text = node;
+            return (text.v || text.value);
+        }
+        case 9 /* NodeTypes.Literal */: {
+            const literal = node;
+            return (literal.v || literal.value);
+        }
+        case 4 /* NodeTypes.Named */: {
+            const named = node;
+            return ctx.interpolate(ctx.named(named.k || named.key));
+        }
+        case 5 /* NodeTypes.List */: {
+            const list = node;
+            return ctx.interpolate(ctx.list(list.i != null ? list.i : list.index));
+        }
+        case 6 /* NodeTypes.Linked */: {
+            const linked = node;
+            const modifier = linked.m || linked.modifier;
+            return ctx.linked(formatMessagePart(ctx, linked.k || linked.key), modifier ? formatMessagePart(ctx, modifier) : undefined, ctx.type);
+        }
+        case 7 /* NodeTypes.LinkedKey */: {
+            const linkedKey = node;
+            return (linkedKey.v || linkedKey.value);
+        }
+        case 8 /* NodeTypes.LinkedModifier */: {
+            const linkedModifier = node;
+            return (linkedModifier.v || linkedModifier.value);
+        }
+        default:
+            throw new Error(`unhandled node type on format message part: ${type}`);
+    }
+}
+
+const defaultOnCacheKey = (message) => message;
+let compileCache = Object.create(null);
+function clearCompileCache() {
+    compileCache = Object.create(null);
+}
+const isMessageAST = (val) => shared.isObject(val) &&
+    (val.t === 0 || val.type === 0) &&
+    ('b' in val || 'body' in val);
+function baseCompile(message, options = {}) {
+    // error detecting on compile
+    let detectError = false;
+    const onError = options.onError || messageCompiler.defaultOnError;
+    options.onError = (err) => {
+        detectError = true;
+        onError(err);
+    };
+    // compile with mesasge-compiler
+    return { ...messageCompiler.baseCompile(message, options), detectError };
+}
+/* #__NO_SIDE_EFFECTS__ */
+const compileToFunction = (message, context) => {
+    if (!shared.isString(message)) {
+        throw createCoreError(CoreErrorCodes.NOT_SUPPORT_NON_STRING_MESSAGE);
+    }
+    {
+        // check HTML message
+        shared.isBoolean(context.warnHtmlMessage)
+            ? context.warnHtmlMessage
+            : true;
+        // check caches
+        const onCacheKey = context.onCacheKey || defaultOnCacheKey;
+        const cacheKey = onCacheKey(message);
+        const cached = compileCache[cacheKey];
+        if (cached) {
+            return cached;
+        }
+        // compile
+        const { code, detectError } = baseCompile(message, context);
+        // evaluate function
+        const msg = new Function(`return ${code}`)();
+        // if occurred compile error, don't cache
+        return !detectError
+            ? (compileCache[cacheKey] = msg)
+            : msg;
+    }
+};
+function compile(message, context) {
+    if (shared.isString(message)) {
+        // check HTML message
+        shared.isBoolean(context.warnHtmlMessage)
+            ? context.warnHtmlMessage
+            : true;
+        // check caches
+        const onCacheKey = context.onCacheKey || defaultOnCacheKey;
+        const cacheKey = onCacheKey(message);
+        const cached = compileCache[cacheKey];
+        if (cached) {
+            return cached;
+        }
+        // compile with JIT mode
+        const { ast, detectError } = baseCompile(message, {
+            ...context,
+            location: false,
+            jit: true
+        });
+        // compose message function from AST
+        const msg = format(ast);
+        // if occurred compile error, don't cache
+        return !detectError
+            ? (compileCache[cacheKey] = msg)
+            : msg;
+    }
+    else {
+        // AST case (passed from bundler)
+        const cacheKey = message.cacheKey;
+        if (cacheKey) {
+            const cached = compileCache[cacheKey];
+            if (cached) {
+                return cached;
+            }
+            // compose message function from message (AST)
+            return (compileCache[cacheKey] =
+                format(message));
+        }
+        else {
+            return format(message);
+        }
+    }
+}
+
+const NOOP_MESSAGE_FUNCTION = () => '';
+const isMessageFunction = (val) => shared.isFunction(val);
+// implementation of `translate` function
+function translate(context, ...args) {
+    const { fallbackFormat, postTranslation, unresolving, messageCompiler, fallbackLocale, messages } = context;
+    const [key, options] = parseTranslateArgs(...args);
+    const missingWarn = shared.isBoolean(options.missingWarn)
+        ? options.missingWarn
+        : context.missingWarn;
+    const fallbackWarn = shared.isBoolean(options.fallbackWarn)
+        ? options.fallbackWarn
+        : context.fallbackWarn;
+    const escapeParameter = shared.isBoolean(options.escapeParameter)
+        ? options.escapeParameter
+        : context.escapeParameter;
+    const resolvedMessage = !!options.resolvedMessage;
+    // prettier-ignore
+    const defaultMsgOrKey = shared.isString(options.default) || shared.isBoolean(options.default) // default by function option
+        ? !shared.isBoolean(options.default)
+            ? options.default
+            : (!messageCompiler ? () => key : key)
+        : fallbackFormat // default by `fallbackFormat` option
+            ? (!messageCompiler ? () => key : key)
+            : '';
+    const enableDefaultMsg = fallbackFormat || defaultMsgOrKey !== '';
+    const locale = getLocale(context, options);
+    // escape params
+    escapeParameter && escapeParams(options);
+    // resolve message format
+    // eslint-disable-next-line prefer-const
+    let [formatScope, targetLocale, message] = !resolvedMessage
+        ? resolveMessageFormat(context, key, locale, fallbackLocale, fallbackWarn, missingWarn)
+        : [
+            key,
+            locale,
+            messages[locale] || {}
+        ];
+    // NOTE:
+    //  Fix to work around `ssrTransfrom` bug in Vite.
+    //  https://github.com/vitejs/vite/issues/4306
+    //  To get around this, use temporary variables.
+    //  https://github.com/nuxt/framework/issues/1461#issuecomment-954606243
+    let format = formatScope;
+    // if you use default message, set it as message format!
+    let cacheBaseKey = key;
+    if (!resolvedMessage &&
+        !(shared.isString(format) ||
+            isMessageAST(format) ||
+            isMessageFunction(format))) {
+        if (enableDefaultMsg) {
+            format = defaultMsgOrKey;
+            cacheBaseKey = format;
+        }
+    }
+    // checking message format and target locale
+    if (!resolvedMessage &&
+        (!(shared.isString(format) ||
+            isMessageAST(format) ||
+            isMessageFunction(format)) ||
+            !shared.isString(targetLocale))) {
+        return unresolving ? NOT_REOSLVED : key;
+    }
+    // setup compile error detecting
+    let occurred = false;
+    const onError = () => {
+        occurred = true;
+    };
+    // compile message format
+    const msg = !isMessageFunction(format)
+        ? compileMessageFormat(context, key, targetLocale, format, cacheBaseKey, onError)
+        : format;
+    // if occurred compile error, return the message format
+    if (occurred) {
+        return format;
+    }
+    // evaluate message with context
+    const ctxOptions = getMessageContextOptions(context, targetLocale, message, options);
+    const msgContext = createMessageContext(ctxOptions);
+    const messaged = evaluateMessage(context, msg, msgContext);
+    // if use post translation option, proceed it with handler
+    const ret = postTranslation
+        ? postTranslation(messaged, key)
+        : messaged;
+    return ret;
+}
+function escapeParams(options) {
+    if (shared.isArray(options.list)) {
+        options.list = options.list.map(item => shared.isString(item) ? shared.escapeHtml(item) : item);
+    }
+    else if (shared.isObject(options.named)) {
+        Object.keys(options.named).forEach(key => {
+            if (shared.isString(options.named[key])) {
+                options.named[key] = shared.escapeHtml(options.named[key]);
+            }
+        });
+    }
+}
+function resolveMessageFormat(context, key, locale, fallbackLocale, fallbackWarn, missingWarn) {
+    const { messages, onWarn, messageResolver: resolveValue, localeFallbacker } = context;
+    const locales = localeFallbacker(context, fallbackLocale, locale); // eslint-disable-line @typescript-eslint/no-explicit-any
+    let message = {};
+    let targetLocale;
+    let format = null;
+    const type = 'translate';
+    for (let i = 0; i < locales.length; i++) {
+        targetLocale = locales[i];
+        message =
+            messages[targetLocale] || {};
+        if ((format = resolveValue(message, key)) === null) {
+            // if null, resolve with object key path
+            format = message[key]; // eslint-disable-line @typescript-eslint/no-explicit-any
+        }
+        if (shared.isString(format) || isMessageAST(format) || isMessageFunction(format)) {
+            break;
+        }
+        if (!isImplicitFallback(targetLocale, locales)) {
+            const missingRet = handleMissing(context, // eslint-disable-line @typescript-eslint/no-explicit-any
+            key, targetLocale, missingWarn, type);
+            if (missingRet !== key) {
+                format = missingRet;
+            }
+        }
+    }
+    return [format, targetLocale, message];
+}
+function compileMessageFormat(context, key, targetLocale, format, cacheBaseKey, onError) {
+    const { messageCompiler, warnHtmlMessage } = context;
+    if (isMessageFunction(format)) {
+        const msg = format;
+        msg.locale = msg.locale || targetLocale;
+        msg.key = msg.key || key;
+        return msg;
+    }
+    if (messageCompiler == null) {
+        const msg = (() => format);
+        msg.locale = targetLocale;
+        msg.key = key;
+        return msg;
+    }
+    const msg = messageCompiler(format, getCompileContext(context, targetLocale, cacheBaseKey, format, warnHtmlMessage, onError));
+    msg.locale = targetLocale;
+    msg.key = key;
+    msg.source = format;
+    return msg;
+}
+function evaluateMessage(context, msg, msgCtx) {
+    const messaged = msg(msgCtx);
+    return messaged;
+}
+/** @internal */
+function parseTranslateArgs(...args) {
+    const [arg1, arg2, arg3] = args;
+    const options = {};
+    if (!shared.isString(arg1) &&
+        !shared.isNumber(arg1) &&
+        !isMessageFunction(arg1) &&
+        !isMessageAST(arg1)) {
+        throw createCoreError(CoreErrorCodes.INVALID_ARGUMENT);
+    }
+    // prettier-ignore
+    const key = shared.isNumber(arg1)
+        ? String(arg1)
+        : isMessageFunction(arg1)
+            ? arg1
+            : arg1;
+    if (shared.isNumber(arg2)) {
+        options.plural = arg2;
+    }
+    else if (shared.isString(arg2)) {
+        options.default = arg2;
+    }
+    else if (shared.isPlainObject(arg2) && !shared.isEmptyObject(arg2)) {
+        options.named = arg2;
+    }
+    else if (shared.isArray(arg2)) {
+        options.list = arg2;
+    }
+    if (shared.isNumber(arg3)) {
+        options.plural = arg3;
+    }
+    else if (shared.isString(arg3)) {
+        options.default = arg3;
+    }
+    else if (shared.isPlainObject(arg3)) {
+        shared.assign(options, arg3);
+    }
+    return [key, options];
+}
+function getCompileContext(context, locale, key, source, warnHtmlMessage, onError) {
+    return {
+        locale,
+        key,
+        warnHtmlMessage,
+        onError: (err) => {
+            onError && onError(err);
+            {
+                throw err;
+            }
+        },
+        onCacheKey: (source) => shared.generateFormatCacheKey(locale, key, source)
+    };
+}
+function getMessageContextOptions(context, locale, message, options) {
+    const { modifiers, pluralRules, messageResolver: resolveValue, fallbackLocale, fallbackWarn, missingWarn, fallbackContext } = context;
+    const resolveMessage = (key) => {
+        let val = resolveValue(message, key);
+        // fallback to root context
+        if (val == null && fallbackContext) {
+            const [, , message] = resolveMessageFormat(fallbackContext, key, locale, fallbackLocale, fallbackWarn, missingWarn);
+            val = resolveValue(message, key);
+        }
+        if (shared.isString(val) || isMessageAST(val)) {
+            let occurred = false;
+            const onError = () => {
+                occurred = true;
+            };
+            const msg = compileMessageFormat(context, key, locale, val, key, onError);
+            return !occurred
+                ? msg
+                : NOOP_MESSAGE_FUNCTION;
+        }
+        else if (isMessageFunction(val)) {
+            return val;
+        }
+        else {
+            // TODO: should be implemented warning message
+            return NOOP_MESSAGE_FUNCTION;
+        }
+    };
+    const ctxOptions = {
+        locale,
+        modifiers,
+        pluralRules,
+        messages: resolveMessage
+    };
+    if (context.processor) {
+        ctxOptions.processor = context.processor;
+    }
+    if (options.list) {
+        ctxOptions.list = options.list;
+    }
+    if (options.named) {
+        ctxOptions.named = options.named;
+    }
+    if (shared.isNumber(options.plural)) {
+        ctxOptions.pluralIndex = options.plural;
+    }
+    return ctxOptions;
+}
+
+// implementation of `datetime` function
+function datetime(context, ...args) {
+    const { datetimeFormats, unresolving, fallbackLocale, onWarn, localeFallbacker } = context;
+    const { __datetimeFormatters } = context;
+    const [key, value, options, overrides] = parseDateTimeArgs(...args);
+    const missingWarn = shared.isBoolean(options.missingWarn)
+        ? options.missingWarn
+        : context.missingWarn;
+    shared.isBoolean(options.fallbackWarn)
+        ? options.fallbackWarn
+        : context.fallbackWarn;
+    const part = !!options.part;
+    const locale = getLocale(context, options);
+    const locales = localeFallbacker(context, // eslint-disable-line @typescript-eslint/no-explicit-any
+    fallbackLocale, locale);
+    if (!shared.isString(key) || key === '') {
+        return new Intl.DateTimeFormat(locale, overrides).format(value);
+    }
+    // resolve format
+    let datetimeFormat = {};
+    let targetLocale;
+    let format = null;
+    const type = 'datetime format';
+    for (let i = 0; i < locales.length; i++) {
+        targetLocale = locales[i];
+        datetimeFormat =
+            datetimeFormats[targetLocale] || {};
+        format = datetimeFormat[key];
+        if (shared.isPlainObject(format))
+            break;
+        handleMissing(context, key, targetLocale, missingWarn, type); // eslint-disable-line @typescript-eslint/no-explicit-any
+    }
+    // checking format and target locale
+    if (!shared.isPlainObject(format) || !shared.isString(targetLocale)) {
+        return unresolving ? NOT_REOSLVED : key;
+    }
+    let id = `${targetLocale}__${key}`;
+    if (!shared.isEmptyObject(overrides)) {
+        id = `${id}__${JSON.stringify(overrides)}`;
+    }
+    let formatter = __datetimeFormatters.get(id);
+    if (!formatter) {
+        formatter = new Intl.DateTimeFormat(targetLocale, shared.assign({}, format, overrides));
+        __datetimeFormatters.set(id, formatter);
+    }
+    return !part ? formatter.format(value) : formatter.formatToParts(value);
+}
+/** @internal */
+const DATETIME_FORMAT_OPTIONS_KEYS = [
+    'localeMatcher',
+    'weekday',
+    'era',
+    'year',
+    'month',
+    'day',
+    'hour',
+    'minute',
+    'second',
+    'timeZoneName',
+    'formatMatcher',
+    'hour12',
+    'timeZone',
+    'dateStyle',
+    'timeStyle',
+    'calendar',
+    'dayPeriod',
+    'numberingSystem',
+    'hourCycle',
+    'fractionalSecondDigits'
+];
+/** @internal */
+function parseDateTimeArgs(...args) {
+    const [arg1, arg2, arg3, arg4] = args;
+    const options = {};
+    let overrides = {};
+    let value;
+    if (shared.isString(arg1)) {
+        // Only allow ISO strings - other date formats are often supported,
+        // but may cause different results in different browsers.
+        const matches = arg1.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);
+        if (!matches) {
+            throw createCoreError(CoreErrorCodes.INVALID_ISO_DATE_ARGUMENT);
+        }
+        // Some browsers can not parse the iso datetime separated by space,
+        // this is a compromise solution by replace the 'T'/' ' with 'T'
+        const dateTime = matches[3]
+            ? matches[3].trim().startsWith('T')
+                ? `${matches[1].trim()}${matches[3].trim()}`
+                : `${matches[1].trim()}T${matches[3].trim()}`
+            : matches[1].trim();
+        value = new Date(dateTime);
+        try {
+            // This will fail if the date is not valid
+            value.toISOString();
+        }
+        catch (e) {
+            throw createCoreError(CoreErrorCodes.INVALID_ISO_DATE_ARGUMENT);
+        }
+    }
+    else if (shared.isDate(arg1)) {
+        if (isNaN(arg1.getTime())) {
+            throw createCoreError(CoreErrorCodes.INVALID_DATE_ARGUMENT);
+        }
+        value = arg1;
+    }
+    else if (shared.isNumber(arg1)) {
+        value = arg1;
+    }
+    else {
+        throw createCoreError(CoreErrorCodes.INVALID_ARGUMENT);
+    }
+    if (shared.isString(arg2)) {
+        options.key = arg2;
+    }
+    else if (shared.isPlainObject(arg2)) {
+        Object.keys(arg2).forEach(key => {
+            if (DATETIME_FORMAT_OPTIONS_KEYS.includes(key)) {
+                overrides[key] = arg2[key];
+            }
+            else {
+                options[key] = arg2[key];
+            }
+        });
+    }
+    if (shared.isString(arg3)) {
+        options.locale = arg3;
+    }
+    else if (shared.isPlainObject(arg3)) {
+        overrides = arg3;
+    }
+    if (shared.isPlainObject(arg4)) {
+        overrides = arg4;
+    }
+    return [options.key || '', value, options, overrides];
+}
+/** @internal */
+function clearDateTimeFormat(ctx, locale, format) {
+    const context = ctx;
+    for (const key in format) {
+        const id = `${locale}__${key}`;
+        if (!context.__datetimeFormatters.has(id)) {
+            continue;
+        }
+        context.__datetimeFormatters.delete(id);
+    }
+}
+
+// implementation of `number` function
+function number(context, ...args) {
+    const { numberFormats, unresolving, fallbackLocale, onWarn, localeFallbacker } = context;
+    const { __numberFormatters } = context;
+    const [key, value, options, overrides] = parseNumberArgs(...args);
+    const missingWarn = shared.isBoolean(options.missingWarn)
+        ? options.missingWarn
+        : context.missingWarn;
+    shared.isBoolean(options.fallbackWarn)
+        ? options.fallbackWarn
+        : context.fallbackWarn;
+    const part = !!options.part;
+    const locale = getLocale(context, options);
+    const locales = localeFallbacker(context, // eslint-disable-line @typescript-eslint/no-explicit-any
+    fallbackLocale, locale);
+    if (!shared.isString(key) || key === '') {
+        return new Intl.NumberFormat(locale, overrides).format(value);
+    }
+    // resolve format
+    let numberFormat = {};
+    let targetLocale;
+    let format = null;
+    const type = 'number format';
+    for (let i = 0; i < locales.length; i++) {
+        targetLocale = locales[i];
+        numberFormat =
+            numberFormats[targetLocale] || {};
+        format = numberFormat[key];
+        if (shared.isPlainObject(format))
+            break;
+        handleMissing(context, key, targetLocale, missingWarn, type); // eslint-disable-line @typescript-eslint/no-explicit-any
+    }
+    // checking format and target locale
+    if (!shared.isPlainObject(format) || !shared.isString(targetLocale)) {
+        return unresolving ? NOT_REOSLVED : key;
+    }
+    let id = `${targetLocale}__${key}`;
+    if (!shared.isEmptyObject(overrides)) {
+        id = `${id}__${JSON.stringify(overrides)}`;
+    }
+    let formatter = __numberFormatters.get(id);
+    if (!formatter) {
+        formatter = new Intl.NumberFormat(targetLocale, shared.assign({}, format, overrides));
+        __numberFormatters.set(id, formatter);
+    }
+    return !part ? formatter.format(value) : formatter.formatToParts(value);
+}
+/** @internal */
+const NUMBER_FORMAT_OPTIONS_KEYS = [
+    'localeMatcher',
+    'style',
+    'currency',
+    'currencyDisplay',
+    'currencySign',
+    'useGrouping',
+    'minimumIntegerDigits',
+    'minimumFractionDigits',
+    'maximumFractionDigits',
+    'minimumSignificantDigits',
+    'maximumSignificantDigits',
+    'compactDisplay',
+    'notation',
+    'signDisplay',
+    'unit',
+    'unitDisplay',
+    'roundingMode',
+    'roundingPriority',
+    'roundingIncrement',
+    'trailingZeroDisplay'
+];
+/** @internal */
+function parseNumberArgs(...args) {
+    const [arg1, arg2, arg3, arg4] = args;
+    const options = {};
+    let overrides = {};
+    if (!shared.isNumber(arg1)) {
+        throw createCoreError(CoreErrorCodes.INVALID_ARGUMENT);
+    }
+    const value = arg1;
+    if (shared.isString(arg2)) {
+        options.key = arg2;
+    }
+    else if (shared.isPlainObject(arg2)) {
+        Object.keys(arg2).forEach(key => {
+            if (NUMBER_FORMAT_OPTIONS_KEYS.includes(key)) {
+                overrides[key] = arg2[key];
+            }
+            else {
+                options[key] = arg2[key];
+            }
+        });
+    }
+    if (shared.isString(arg3)) {
+        options.locale = arg3;
+    }
+    else if (shared.isPlainObject(arg3)) {
+        overrides = arg3;
+    }
+    if (shared.isPlainObject(arg4)) {
+        overrides = arg4;
+    }
+    return [options.key || '', value, options, overrides];
+}
+/** @internal */
+function clearNumberFormat(ctx, locale, format) {
+    const context = ctx;
+    for (const key in format) {
+        const id = `${locale}__${key}`;
+        if (!context.__numberFormatters.has(id)) {
+            continue;
+        }
+        context.__numberFormatters.delete(id);
+    }
+}
+
+exports.CompileErrorCodes = messageCompiler.CompileErrorCodes;
+exports.createCompileError = messageCompiler.createCompileError;
+exports.CoreErrorCodes = CoreErrorCodes;
+exports.CoreWarnCodes = CoreWarnCodes;
+exports.DATETIME_FORMAT_OPTIONS_KEYS = DATETIME_FORMAT_OPTIONS_KEYS;
+exports.DEFAULT_LOCALE = DEFAULT_LOCALE;
+exports.DEFAULT_MESSAGE_DATA_TYPE = DEFAULT_MESSAGE_DATA_TYPE;
+exports.MISSING_RESOLVE_VALUE = MISSING_RESOLVE_VALUE;
+exports.NOT_REOSLVED = NOT_REOSLVED;
+exports.NUMBER_FORMAT_OPTIONS_KEYS = NUMBER_FORMAT_OPTIONS_KEYS;
+exports.VERSION = VERSION;
+exports.clearCompileCache = clearCompileCache;
+exports.clearDateTimeFormat = clearDateTimeFormat;
+exports.clearNumberFormat = clearNumberFormat;
+exports.compile = compile;
+exports.compileToFunction = compileToFunction;
+exports.createCoreContext = createCoreContext;
+exports.createCoreError = createCoreError;
+exports.createMessageContext = createMessageContext;
+exports.datetime = datetime;
+exports.fallbackWithLocaleChain = fallbackWithLocaleChain;
+exports.fallbackWithSimple = fallbackWithSimple;
+exports.getAdditionalMeta = getAdditionalMeta;
+exports.getDevToolsHook = getDevToolsHook;
+exports.getFallbackContext = getFallbackContext;
+exports.getLocale = getLocale;
+exports.getWarnMessage = getWarnMessage;
+exports.handleMissing = handleMissing;
+exports.initI18nDevTools = initI18nDevTools;
+exports.isAlmostSameLocale = isAlmostSameLocale;
+exports.isImplicitFallback = isImplicitFallback;
+exports.isMessageAST = isMessageAST;
+exports.isMessageFunction = isMessageFunction;
+exports.isTranslateFallbackWarn = isTranslateFallbackWarn;
+exports.isTranslateMissingWarn = isTranslateMissingWarn;
+exports.number = number;
+exports.parse = parse;
+exports.parseDateTimeArgs = parseDateTimeArgs;
+exports.parseNumberArgs = parseNumberArgs;
+exports.parseTranslateArgs = parseTranslateArgs;
+exports.registerLocaleFallbacker = registerLocaleFallbacker;
+exports.registerMessageCompiler = registerMessageCompiler;
+exports.registerMessageResolver = registerMessageResolver;
+exports.resolveLocale = resolveLocale;
+exports.resolveValue = resolveValue;
+exports.resolveWithKeyValue = resolveWithKeyValue;
+exports.setAdditionalMeta = setAdditionalMeta;
+exports.setDevToolsHook = setDevToolsHook;
+exports.setFallbackContext = setFallbackContext;
+exports.translate = translate;
+exports.translateDevTools = translateDevTools;
+exports.updateFallbackLocale = updateFallbackLocale;

+ 7 - 0
node_modules/@intlify/core-base/index.js

@@ -0,0 +1,7 @@
+'use strict'
+
+if (process.env.NODE_ENV === 'production') {
+  module.exports = require('./dist/core-base.prod.cjs')
+} else {
+  module.exports = require('./dist/core-base.cjs')
+}

+ 81 - 0
node_modules/@intlify/core-base/package.json

@@ -0,0 +1,81 @@
+{
+  "name": "@intlify/core-base",
+  "version": "9.13.1",
+  "description": "@intlify/core-base",
+  "keywords": [
+    "core",
+    "fundamental",
+    "i18n",
+    "internationalization",
+    "intlify"
+  ],
+  "license": "MIT",
+  "author": {
+    "name": "kazuya kawaguchi",
+    "email": "kawakazu80@gmail.com"
+  },
+  "homepage": "https://github.com/intlify/vue-i18n-next/tree/master/packages/core-base#readme",
+  "repository": {
+    "type": "git",
+    "url": "git+https://github.com/intlify/vue-i18n-next.git",
+    "directory": "packages/core"
+  },
+  "bugs": {
+    "url": "https://github.com/intlify/vue-i18n-next/issues"
+  },
+  "files": [
+    "index.js",
+    "dist"
+  ],
+  "main": "index.js",
+  "module": "dist/core-base.mjs",
+  "unpkg": "dist/core-base.global.js",
+  "jsdelivr": "dist/core-base.global.js",
+  "types": "dist/core-base.d.ts",
+  "dependencies": {
+    "@intlify/message-compiler": "9.13.1",
+    "@intlify/shared": "9.13.1"
+  },
+  "devDependencies": {
+    "@intlify/vue-devtools": "9.13.1",
+    "@intlify/devtools-if": "9.13.1"
+  },
+  "engines": {
+    "node": ">= 16"
+  },
+  "buildOptions": {
+    "name": "IntlifyCoreBase",
+    "formats": [
+      "mjs",
+      "browser",
+      "cjs",
+      "global"
+    ]
+  },
+  "exports": {
+    ".": {
+      "types": "./dist/core-base.d.ts",
+      "import": "./dist/core-base.mjs",
+      "browser": "./dist/core-base.esm-browser.js",
+      "node": {
+        "import": {
+          "production": "./dist/core-base.prod.cjs",
+          "development": "./dist/core-base.mjs",
+          "default": "./dist/core-base.mjs"
+        },
+        "require": {
+          "production": "./dist/core-base.prod.cjs",
+          "development": "./dist/core-base.cjs",
+          "default": "./index.js"
+        }
+      }
+    },
+    "./dist/*": "./dist/*",
+    "./package.json": "./package.json"
+  },
+  "funding": "https://github.com/sponsors/kazupon",
+  "publishConfig": {
+    "access": "public"
+  },
+  "sideEffects": false
+}

+ 20 - 0
node_modules/@intlify/message-compiler/LICENSE

@@ -0,0 +1,20 @@
+The MIT License (MIT)
+
+Copyright (c) 2020 kazuya kawaguchi
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ 7 - 0
node_modules/@intlify/message-compiler/README.md

@@ -0,0 +1,7 @@
+# @intlify/message-compiler
+
+The message compiler for intlify project
+
+## :copyright: License
+
+[MIT](http://opensource.org/licenses/MIT)

+ 1674 - 0
node_modules/@intlify/message-compiler/dist/message-compiler.cjs

@@ -0,0 +1,1674 @@
+/*!
+  * message-compiler v9.13.1
+  * (c) 2024 kazuya kawaguchi
+  * Released under the MIT License.
+  */
+'use strict';
+
+var shared = require('@intlify/shared');
+var sourceMapJs = require('source-map-js');
+
+const LOCATION_STUB = {
+    start: { line: 1, column: 1, offset: 0 },
+    end: { line: 1, column: 1, offset: 0 }
+};
+function createPosition(line, column, offset) {
+    return { line, column, offset };
+}
+function createLocation(start, end, source) {
+    const loc = { start, end };
+    if (source != null) {
+        loc.source = source;
+    }
+    return loc;
+}
+
+const CompileWarnCodes = {
+    USE_MODULO_SYNTAX: 1,
+    __EXTEND_POINT__: 2
+};
+/** @internal */
+const warnMessages = {
+    [CompileWarnCodes.USE_MODULO_SYNTAX]: `Use modulo before '{{0}}'.`
+};
+function createCompileWarn(code, loc, ...args) {
+    const msg = shared.format(warnMessages[code] || '', ...(args || [])) ;
+    const message = { message: String(msg), code };
+    if (loc) {
+        message.location = loc;
+    }
+    return message;
+}
+
+const CompileErrorCodes = {
+    // tokenizer error codes
+    EXPECTED_TOKEN: 1,
+    INVALID_TOKEN_IN_PLACEHOLDER: 2,
+    UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER: 3,
+    UNKNOWN_ESCAPE_SEQUENCE: 4,
+    INVALID_UNICODE_ESCAPE_SEQUENCE: 5,
+    UNBALANCED_CLOSING_BRACE: 6,
+    UNTERMINATED_CLOSING_BRACE: 7,
+    EMPTY_PLACEHOLDER: 8,
+    NOT_ALLOW_NEST_PLACEHOLDER: 9,
+    INVALID_LINKED_FORMAT: 10,
+    // parser error codes
+    MUST_HAVE_MESSAGES_IN_PLURAL: 11,
+    UNEXPECTED_EMPTY_LINKED_MODIFIER: 12,
+    UNEXPECTED_EMPTY_LINKED_KEY: 13,
+    UNEXPECTED_LEXICAL_ANALYSIS: 14,
+    // generator error codes
+    UNHANDLED_CODEGEN_NODE_TYPE: 15,
+    // minifier error codes
+    UNHANDLED_MINIFIER_NODE_TYPE: 16,
+    // Special value for higher-order compilers to pick up the last code
+    // to avoid collision of error codes. This should always be kept as the last
+    // item.
+    __EXTEND_POINT__: 17
+};
+/** @internal */
+const errorMessages = {
+    // tokenizer error messages
+    [CompileErrorCodes.EXPECTED_TOKEN]: `Expected token: '{0}'`,
+    [CompileErrorCodes.INVALID_TOKEN_IN_PLACEHOLDER]: `Invalid token in placeholder: '{0}'`,
+    [CompileErrorCodes.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER]: `Unterminated single quote in placeholder`,
+    [CompileErrorCodes.UNKNOWN_ESCAPE_SEQUENCE]: `Unknown escape sequence: \\{0}`,
+    [CompileErrorCodes.INVALID_UNICODE_ESCAPE_SEQUENCE]: `Invalid unicode escape sequence: {0}`,
+    [CompileErrorCodes.UNBALANCED_CLOSING_BRACE]: `Unbalanced closing brace`,
+    [CompileErrorCodes.UNTERMINATED_CLOSING_BRACE]: `Unterminated closing brace`,
+    [CompileErrorCodes.EMPTY_PLACEHOLDER]: `Empty placeholder`,
+    [CompileErrorCodes.NOT_ALLOW_NEST_PLACEHOLDER]: `Not allowed nest placeholder`,
+    [CompileErrorCodes.INVALID_LINKED_FORMAT]: `Invalid linked format`,
+    // parser error messages
+    [CompileErrorCodes.MUST_HAVE_MESSAGES_IN_PLURAL]: `Plural must have messages`,
+    [CompileErrorCodes.UNEXPECTED_EMPTY_LINKED_MODIFIER]: `Unexpected empty linked modifier`,
+    [CompileErrorCodes.UNEXPECTED_EMPTY_LINKED_KEY]: `Unexpected empty linked key`,
+    [CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS]: `Unexpected lexical analysis in token: '{0}'`,
+    // generator error messages
+    [CompileErrorCodes.UNHANDLED_CODEGEN_NODE_TYPE]: `unhandled codegen node type: '{0}'`,
+    // minimizer error messages
+    [CompileErrorCodes.UNHANDLED_MINIFIER_NODE_TYPE]: `unhandled mimifier node type: '{0}'`
+};
+function createCompileError(code, loc, options = {}) {
+    const { domain, messages, args } = options;
+    const msg = shared.format((messages || errorMessages)[code] || '', ...(args || []))
+        ;
+    const error = new SyntaxError(String(msg));
+    error.code = code;
+    if (loc) {
+        error.location = loc;
+    }
+    error.domain = domain;
+    return error;
+}
+/** @internal */
+function defaultOnError(error) {
+    throw error;
+}
+
+// eslint-disable-next-line no-useless-escape
+const RE_HTML_TAG = /<\/?[\w\s="/.':;#-\/]+>/;
+const detectHtmlTag = (source) => RE_HTML_TAG.test(source);
+
+const CHAR_SP = ' ';
+const CHAR_CR = '\r';
+const CHAR_LF = '\n';
+const CHAR_LS = String.fromCharCode(0x2028);
+const CHAR_PS = String.fromCharCode(0x2029);
+function createScanner(str) {
+    const _buf = str;
+    let _index = 0;
+    let _line = 1;
+    let _column = 1;
+    let _peekOffset = 0;
+    const isCRLF = (index) => _buf[index] === CHAR_CR && _buf[index + 1] === CHAR_LF;
+    const isLF = (index) => _buf[index] === CHAR_LF;
+    const isPS = (index) => _buf[index] === CHAR_PS;
+    const isLS = (index) => _buf[index] === CHAR_LS;
+    const isLineEnd = (index) => isCRLF(index) || isLF(index) || isPS(index) || isLS(index);
+    const index = () => _index;
+    const line = () => _line;
+    const column = () => _column;
+    const peekOffset = () => _peekOffset;
+    const charAt = (offset) => isCRLF(offset) || isPS(offset) || isLS(offset) ? CHAR_LF : _buf[offset];
+    const currentChar = () => charAt(_index);
+    const currentPeek = () => charAt(_index + _peekOffset);
+    function next() {
+        _peekOffset = 0;
+        if (isLineEnd(_index)) {
+            _line++;
+            _column = 0;
+        }
+        if (isCRLF(_index)) {
+            _index++;
+        }
+        _index++;
+        _column++;
+        return _buf[_index];
+    }
+    function peek() {
+        if (isCRLF(_index + _peekOffset)) {
+            _peekOffset++;
+        }
+        _peekOffset++;
+        return _buf[_index + _peekOffset];
+    }
+    function reset() {
+        _index = 0;
+        _line = 1;
+        _column = 1;
+        _peekOffset = 0;
+    }
+    function resetPeek(offset = 0) {
+        _peekOffset = offset;
+    }
+    function skipToPeek() {
+        const target = _index + _peekOffset;
+        // eslint-disable-next-line no-unmodified-loop-condition
+        while (target !== _index) {
+            next();
+        }
+        _peekOffset = 0;
+    }
+    return {
+        index,
+        line,
+        column,
+        peekOffset,
+        charAt,
+        currentChar,
+        currentPeek,
+        next,
+        peek,
+        reset,
+        resetPeek,
+        skipToPeek
+    };
+}
+
+const EOF = undefined;
+const DOT = '.';
+const LITERAL_DELIMITER = "'";
+const ERROR_DOMAIN$3 = 'tokenizer';
+function createTokenizer(source, options = {}) {
+    const location = options.location !== false;
+    const _scnr = createScanner(source);
+    const currentOffset = () => _scnr.index();
+    const currentPosition = () => createPosition(_scnr.line(), _scnr.column(), _scnr.index());
+    const _initLoc = currentPosition();
+    const _initOffset = currentOffset();
+    const _context = {
+        currentType: 14 /* TokenTypes.EOF */,
+        offset: _initOffset,
+        startLoc: _initLoc,
+        endLoc: _initLoc,
+        lastType: 14 /* TokenTypes.EOF */,
+        lastOffset: _initOffset,
+        lastStartLoc: _initLoc,
+        lastEndLoc: _initLoc,
+        braceNest: 0,
+        inLinked: false,
+        text: ''
+    };
+    const context = () => _context;
+    const { onError } = options;
+    function emitError(code, pos, offset, ...args) {
+        const ctx = context();
+        pos.column += offset;
+        pos.offset += offset;
+        if (onError) {
+            const loc = location ? createLocation(ctx.startLoc, pos) : null;
+            const err = createCompileError(code, loc, {
+                domain: ERROR_DOMAIN$3,
+                args
+            });
+            onError(err);
+        }
+    }
+    function getToken(context, type, value) {
+        context.endLoc = currentPosition();
+        context.currentType = type;
+        const token = { type };
+        if (location) {
+            token.loc = createLocation(context.startLoc, context.endLoc);
+        }
+        if (value != null) {
+            token.value = value;
+        }
+        return token;
+    }
+    const getEndToken = (context) => getToken(context, 14 /* TokenTypes.EOF */);
+    function eat(scnr, ch) {
+        if (scnr.currentChar() === ch) {
+            scnr.next();
+            return ch;
+        }
+        else {
+            emitError(CompileErrorCodes.EXPECTED_TOKEN, currentPosition(), 0, ch);
+            return '';
+        }
+    }
+    function peekSpaces(scnr) {
+        let buf = '';
+        while (scnr.currentPeek() === CHAR_SP || scnr.currentPeek() === CHAR_LF) {
+            buf += scnr.currentPeek();
+            scnr.peek();
+        }
+        return buf;
+    }
+    function skipSpaces(scnr) {
+        const buf = peekSpaces(scnr);
+        scnr.skipToPeek();
+        return buf;
+    }
+    function isIdentifierStart(ch) {
+        if (ch === EOF) {
+            return false;
+        }
+        const cc = ch.charCodeAt(0);
+        return ((cc >= 97 && cc <= 122) || // a-z
+            (cc >= 65 && cc <= 90) || // A-Z
+            cc === 95 // _
+        );
+    }
+    function isNumberStart(ch) {
+        if (ch === EOF) {
+            return false;
+        }
+        const cc = ch.charCodeAt(0);
+        return cc >= 48 && cc <= 57; // 0-9
+    }
+    function isNamedIdentifierStart(scnr, context) {
+        const { currentType } = context;
+        if (currentType !== 2 /* TokenTypes.BraceLeft */) {
+            return false;
+        }
+        peekSpaces(scnr);
+        const ret = isIdentifierStart(scnr.currentPeek());
+        scnr.resetPeek();
+        return ret;
+    }
+    function isListIdentifierStart(scnr, context) {
+        const { currentType } = context;
+        if (currentType !== 2 /* TokenTypes.BraceLeft */) {
+            return false;
+        }
+        peekSpaces(scnr);
+        const ch = scnr.currentPeek() === '-' ? scnr.peek() : scnr.currentPeek();
+        const ret = isNumberStart(ch);
+        scnr.resetPeek();
+        return ret;
+    }
+    function isLiteralStart(scnr, context) {
+        const { currentType } = context;
+        if (currentType !== 2 /* TokenTypes.BraceLeft */) {
+            return false;
+        }
+        peekSpaces(scnr);
+        const ret = scnr.currentPeek() === LITERAL_DELIMITER;
+        scnr.resetPeek();
+        return ret;
+    }
+    function isLinkedDotStart(scnr, context) {
+        const { currentType } = context;
+        if (currentType !== 8 /* TokenTypes.LinkedAlias */) {
+            return false;
+        }
+        peekSpaces(scnr);
+        const ret = scnr.currentPeek() === "." /* TokenChars.LinkedDot */;
+        scnr.resetPeek();
+        return ret;
+    }
+    function isLinkedModifierStart(scnr, context) {
+        const { currentType } = context;
+        if (currentType !== 9 /* TokenTypes.LinkedDot */) {
+            return false;
+        }
+        peekSpaces(scnr);
+        const ret = isIdentifierStart(scnr.currentPeek());
+        scnr.resetPeek();
+        return ret;
+    }
+    function isLinkedDelimiterStart(scnr, context) {
+        const { currentType } = context;
+        if (!(currentType === 8 /* TokenTypes.LinkedAlias */ ||
+            currentType === 12 /* TokenTypes.LinkedModifier */)) {
+            return false;
+        }
+        peekSpaces(scnr);
+        const ret = scnr.currentPeek() === ":" /* TokenChars.LinkedDelimiter */;
+        scnr.resetPeek();
+        return ret;
+    }
+    function isLinkedReferStart(scnr, context) {
+        const { currentType } = context;
+        if (currentType !== 10 /* TokenTypes.LinkedDelimiter */) {
+            return false;
+        }
+        const fn = () => {
+            const ch = scnr.currentPeek();
+            if (ch === "{" /* TokenChars.BraceLeft */) {
+                return isIdentifierStart(scnr.peek());
+            }
+            else if (ch === "@" /* TokenChars.LinkedAlias */ ||
+                ch === "%" /* TokenChars.Modulo */ ||
+                ch === "|" /* TokenChars.Pipe */ ||
+                ch === ":" /* TokenChars.LinkedDelimiter */ ||
+                ch === "." /* TokenChars.LinkedDot */ ||
+                ch === CHAR_SP ||
+                !ch) {
+                return false;
+            }
+            else if (ch === CHAR_LF) {
+                scnr.peek();
+                return fn();
+            }
+            else {
+                // other characters
+                return isTextStart(scnr, false);
+            }
+        };
+        const ret = fn();
+        scnr.resetPeek();
+        return ret;
+    }
+    function isPluralStart(scnr) {
+        peekSpaces(scnr);
+        const ret = scnr.currentPeek() === "|" /* TokenChars.Pipe */;
+        scnr.resetPeek();
+        return ret;
+    }
+    function detectModuloStart(scnr) {
+        const spaces = peekSpaces(scnr);
+        const ret = scnr.currentPeek() === "%" /* TokenChars.Modulo */ &&
+            scnr.peek() === "{" /* TokenChars.BraceLeft */;
+        scnr.resetPeek();
+        return {
+            isModulo: ret,
+            hasSpace: spaces.length > 0
+        };
+    }
+    function isTextStart(scnr, reset = true) {
+        const fn = (hasSpace = false, prev = '', detectModulo = false) => {
+            const ch = scnr.currentPeek();
+            if (ch === "{" /* TokenChars.BraceLeft */) {
+                return prev === "%" /* TokenChars.Modulo */ ? false : hasSpace;
+            }
+            else if (ch === "@" /* TokenChars.LinkedAlias */ || !ch) {
+                return prev === "%" /* TokenChars.Modulo */ ? true : hasSpace;
+            }
+            else if (ch === "%" /* TokenChars.Modulo */) {
+                scnr.peek();
+                return fn(hasSpace, "%" /* TokenChars.Modulo */, true);
+            }
+            else if (ch === "|" /* TokenChars.Pipe */) {
+                return prev === "%" /* TokenChars.Modulo */ || detectModulo
+                    ? true
+                    : !(prev === CHAR_SP || prev === CHAR_LF);
+            }
+            else if (ch === CHAR_SP) {
+                scnr.peek();
+                return fn(true, CHAR_SP, detectModulo);
+            }
+            else if (ch === CHAR_LF) {
+                scnr.peek();
+                return fn(true, CHAR_LF, detectModulo);
+            }
+            else {
+                return true;
+            }
+        };
+        const ret = fn();
+        reset && scnr.resetPeek();
+        return ret;
+    }
+    function takeChar(scnr, fn) {
+        const ch = scnr.currentChar();
+        if (ch === EOF) {
+            return EOF;
+        }
+        if (fn(ch)) {
+            scnr.next();
+            return ch;
+        }
+        return null;
+    }
+    function isIdentifier(ch) {
+        const cc = ch.charCodeAt(0);
+        return ((cc >= 97 && cc <= 122) || // a-z
+            (cc >= 65 && cc <= 90) || // A-Z
+            (cc >= 48 && cc <= 57) || // 0-9
+            cc === 95 || // _
+            cc === 36 // $
+        );
+    }
+    function takeIdentifierChar(scnr) {
+        return takeChar(scnr, isIdentifier);
+    }
+    function isNamedIdentifier(ch) {
+        const cc = ch.charCodeAt(0);
+        return ((cc >= 97 && cc <= 122) || // a-z
+            (cc >= 65 && cc <= 90) || // A-Z
+            (cc >= 48 && cc <= 57) || // 0-9
+            cc === 95 || // _
+            cc === 36 || // $
+            cc === 45 // -
+        );
+    }
+    function takeNamedIdentifierChar(scnr) {
+        return takeChar(scnr, isNamedIdentifier);
+    }
+    function isDigit(ch) {
+        const cc = ch.charCodeAt(0);
+        return cc >= 48 && cc <= 57; // 0-9
+    }
+    function takeDigit(scnr) {
+        return takeChar(scnr, isDigit);
+    }
+    function isHexDigit(ch) {
+        const cc = ch.charCodeAt(0);
+        return ((cc >= 48 && cc <= 57) || // 0-9
+            (cc >= 65 && cc <= 70) || // A-F
+            (cc >= 97 && cc <= 102)); // a-f
+    }
+    function takeHexDigit(scnr) {
+        return takeChar(scnr, isHexDigit);
+    }
+    function getDigits(scnr) {
+        let ch = '';
+        let num = '';
+        while ((ch = takeDigit(scnr))) {
+            num += ch;
+        }
+        return num;
+    }
+    function readModulo(scnr) {
+        skipSpaces(scnr);
+        const ch = scnr.currentChar();
+        if (ch !== "%" /* TokenChars.Modulo */) {
+            emitError(CompileErrorCodes.EXPECTED_TOKEN, currentPosition(), 0, ch);
+        }
+        scnr.next();
+        return "%" /* TokenChars.Modulo */;
+    }
+    function readText(scnr) {
+        let buf = '';
+        // eslint-disable-next-line no-constant-condition
+        while (true) {
+            const ch = scnr.currentChar();
+            if (ch === "{" /* TokenChars.BraceLeft */ ||
+                ch === "}" /* TokenChars.BraceRight */ ||
+                ch === "@" /* TokenChars.LinkedAlias */ ||
+                ch === "|" /* TokenChars.Pipe */ ||
+                !ch) {
+                break;
+            }
+            else if (ch === "%" /* TokenChars.Modulo */) {
+                if (isTextStart(scnr)) {
+                    buf += ch;
+                    scnr.next();
+                }
+                else {
+                    break;
+                }
+            }
+            else if (ch === CHAR_SP || ch === CHAR_LF) {
+                if (isTextStart(scnr)) {
+                    buf += ch;
+                    scnr.next();
+                }
+                else if (isPluralStart(scnr)) {
+                    break;
+                }
+                else {
+                    buf += ch;
+                    scnr.next();
+                }
+            }
+            else {
+                buf += ch;
+                scnr.next();
+            }
+        }
+        return buf;
+    }
+    function readNamedIdentifier(scnr) {
+        skipSpaces(scnr);
+        let ch = '';
+        let name = '';
+        while ((ch = takeNamedIdentifierChar(scnr))) {
+            name += ch;
+        }
+        if (scnr.currentChar() === EOF) {
+            emitError(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE, currentPosition(), 0);
+        }
+        return name;
+    }
+    function readListIdentifier(scnr) {
+        skipSpaces(scnr);
+        let value = '';
+        if (scnr.currentChar() === '-') {
+            scnr.next();
+            value += `-${getDigits(scnr)}`;
+        }
+        else {
+            value += getDigits(scnr);
+        }
+        if (scnr.currentChar() === EOF) {
+            emitError(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE, currentPosition(), 0);
+        }
+        return value;
+    }
+    function isLiteral(ch) {
+        return ch !== LITERAL_DELIMITER && ch !== CHAR_LF;
+    }
+    function readLiteral(scnr) {
+        skipSpaces(scnr);
+        // eslint-disable-next-line no-useless-escape
+        eat(scnr, `\'`);
+        let ch = '';
+        let literal = '';
+        while ((ch = takeChar(scnr, isLiteral))) {
+            if (ch === '\\') {
+                literal += readEscapeSequence(scnr);
+            }
+            else {
+                literal += ch;
+            }
+        }
+        const current = scnr.currentChar();
+        if (current === CHAR_LF || current === EOF) {
+            emitError(CompileErrorCodes.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER, currentPosition(), 0);
+            // TODO: Is it correct really?
+            if (current === CHAR_LF) {
+                scnr.next();
+                // eslint-disable-next-line no-useless-escape
+                eat(scnr, `\'`);
+            }
+            return literal;
+        }
+        // eslint-disable-next-line no-useless-escape
+        eat(scnr, `\'`);
+        return literal;
+    }
+    function readEscapeSequence(scnr) {
+        const ch = scnr.currentChar();
+        switch (ch) {
+            case '\\':
+            case `\'`: // eslint-disable-line no-useless-escape
+                scnr.next();
+                return `\\${ch}`;
+            case 'u':
+                return readUnicodeEscapeSequence(scnr, ch, 4);
+            case 'U':
+                return readUnicodeEscapeSequence(scnr, ch, 6);
+            default:
+                emitError(CompileErrorCodes.UNKNOWN_ESCAPE_SEQUENCE, currentPosition(), 0, ch);
+                return '';
+        }
+    }
+    function readUnicodeEscapeSequence(scnr, unicode, digits) {
+        eat(scnr, unicode);
+        let sequence = '';
+        for (let i = 0; i < digits; i++) {
+            const ch = takeHexDigit(scnr);
+            if (!ch) {
+                emitError(CompileErrorCodes.INVALID_UNICODE_ESCAPE_SEQUENCE, currentPosition(), 0, `\\${unicode}${sequence}${scnr.currentChar()}`);
+                break;
+            }
+            sequence += ch;
+        }
+        return `\\${unicode}${sequence}`;
+    }
+    function isInvalidIdentifier(ch) {
+        return (ch !== "{" /* TokenChars.BraceLeft */ &&
+            ch !== "}" /* TokenChars.BraceRight */ &&
+            ch !== CHAR_SP &&
+            ch !== CHAR_LF);
+    }
+    function readInvalidIdentifier(scnr) {
+        skipSpaces(scnr);
+        let ch = '';
+        let identifiers = '';
+        while ((ch = takeChar(scnr, isInvalidIdentifier))) {
+            identifiers += ch;
+        }
+        return identifiers;
+    }
+    function readLinkedModifier(scnr) {
+        let ch = '';
+        let name = '';
+        while ((ch = takeIdentifierChar(scnr))) {
+            name += ch;
+        }
+        return name;
+    }
+    function readLinkedRefer(scnr) {
+        const fn = (buf) => {
+            const ch = scnr.currentChar();
+            if (ch === "{" /* TokenChars.BraceLeft */ ||
+                ch === "%" /* TokenChars.Modulo */ ||
+                ch === "@" /* TokenChars.LinkedAlias */ ||
+                ch === "|" /* TokenChars.Pipe */ ||
+                ch === "(" /* TokenChars.ParenLeft */ ||
+                ch === ")" /* TokenChars.ParenRight */ ||
+                !ch) {
+                return buf;
+            }
+            else if (ch === CHAR_SP) {
+                return buf;
+            }
+            else if (ch === CHAR_LF || ch === DOT) {
+                buf += ch;
+                scnr.next();
+                return fn(buf);
+            }
+            else {
+                buf += ch;
+                scnr.next();
+                return fn(buf);
+            }
+        };
+        return fn('');
+    }
+    function readPlural(scnr) {
+        skipSpaces(scnr);
+        const plural = eat(scnr, "|" /* TokenChars.Pipe */);
+        skipSpaces(scnr);
+        return plural;
+    }
+    // TODO: We need refactoring of token parsing ...
+    function readTokenInPlaceholder(scnr, context) {
+        let token = null;
+        const ch = scnr.currentChar();
+        switch (ch) {
+            case "{" /* TokenChars.BraceLeft */:
+                if (context.braceNest >= 1) {
+                    emitError(CompileErrorCodes.NOT_ALLOW_NEST_PLACEHOLDER, currentPosition(), 0);
+                }
+                scnr.next();
+                token = getToken(context, 2 /* TokenTypes.BraceLeft */, "{" /* TokenChars.BraceLeft */);
+                skipSpaces(scnr);
+                context.braceNest++;
+                return token;
+            case "}" /* TokenChars.BraceRight */:
+                if (context.braceNest > 0 &&
+                    context.currentType === 2 /* TokenTypes.BraceLeft */) {
+                    emitError(CompileErrorCodes.EMPTY_PLACEHOLDER, currentPosition(), 0);
+                }
+                scnr.next();
+                token = getToken(context, 3 /* TokenTypes.BraceRight */, "}" /* TokenChars.BraceRight */);
+                context.braceNest--;
+                context.braceNest > 0 && skipSpaces(scnr);
+                if (context.inLinked && context.braceNest === 0) {
+                    context.inLinked = false;
+                }
+                return token;
+            case "@" /* TokenChars.LinkedAlias */:
+                if (context.braceNest > 0) {
+                    emitError(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE, currentPosition(), 0);
+                }
+                token = readTokenInLinked(scnr, context) || getEndToken(context);
+                context.braceNest = 0;
+                return token;
+            default: {
+                let validNamedIdentifier = true;
+                let validListIdentifier = true;
+                let validLiteral = true;
+                if (isPluralStart(scnr)) {
+                    if (context.braceNest > 0) {
+                        emitError(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE, currentPosition(), 0);
+                    }
+                    token = getToken(context, 1 /* TokenTypes.Pipe */, readPlural(scnr));
+                    // reset
+                    context.braceNest = 0;
+                    context.inLinked = false;
+                    return token;
+                }
+                if (context.braceNest > 0 &&
+                    (context.currentType === 5 /* TokenTypes.Named */ ||
+                        context.currentType === 6 /* TokenTypes.List */ ||
+                        context.currentType === 7 /* TokenTypes.Literal */)) {
+                    emitError(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE, currentPosition(), 0);
+                    context.braceNest = 0;
+                    return readToken(scnr, context);
+                }
+                if ((validNamedIdentifier = isNamedIdentifierStart(scnr, context))) {
+                    token = getToken(context, 5 /* TokenTypes.Named */, readNamedIdentifier(scnr));
+                    skipSpaces(scnr);
+                    return token;
+                }
+                if ((validListIdentifier = isListIdentifierStart(scnr, context))) {
+                    token = getToken(context, 6 /* TokenTypes.List */, readListIdentifier(scnr));
+                    skipSpaces(scnr);
+                    return token;
+                }
+                if ((validLiteral = isLiteralStart(scnr, context))) {
+                    token = getToken(context, 7 /* TokenTypes.Literal */, readLiteral(scnr));
+                    skipSpaces(scnr);
+                    return token;
+                }
+                if (!validNamedIdentifier && !validListIdentifier && !validLiteral) {
+                    // TODO: we should be re-designed invalid cases, when we will extend message syntax near the future ...
+                    token = getToken(context, 13 /* TokenTypes.InvalidPlace */, readInvalidIdentifier(scnr));
+                    emitError(CompileErrorCodes.INVALID_TOKEN_IN_PLACEHOLDER, currentPosition(), 0, token.value);
+                    skipSpaces(scnr);
+                    return token;
+                }
+                break;
+            }
+        }
+        return token;
+    }
+    // TODO: We need refactoring of token parsing ...
+    function readTokenInLinked(scnr, context) {
+        const { currentType } = context;
+        let token = null;
+        const ch = scnr.currentChar();
+        if ((currentType === 8 /* TokenTypes.LinkedAlias */ ||
+            currentType === 9 /* TokenTypes.LinkedDot */ ||
+            currentType === 12 /* TokenTypes.LinkedModifier */ ||
+            currentType === 10 /* TokenTypes.LinkedDelimiter */) &&
+            (ch === CHAR_LF || ch === CHAR_SP)) {
+            emitError(CompileErrorCodes.INVALID_LINKED_FORMAT, currentPosition(), 0);
+        }
+        switch (ch) {
+            case "@" /* TokenChars.LinkedAlias */:
+                scnr.next();
+                token = getToken(context, 8 /* TokenTypes.LinkedAlias */, "@" /* TokenChars.LinkedAlias */);
+                context.inLinked = true;
+                return token;
+            case "." /* TokenChars.LinkedDot */:
+                skipSpaces(scnr);
+                scnr.next();
+                return getToken(context, 9 /* TokenTypes.LinkedDot */, "." /* TokenChars.LinkedDot */);
+            case ":" /* TokenChars.LinkedDelimiter */:
+                skipSpaces(scnr);
+                scnr.next();
+                return getToken(context, 10 /* TokenTypes.LinkedDelimiter */, ":" /* TokenChars.LinkedDelimiter */);
+            default:
+                if (isPluralStart(scnr)) {
+                    token = getToken(context, 1 /* TokenTypes.Pipe */, readPlural(scnr));
+                    // reset
+                    context.braceNest = 0;
+                    context.inLinked = false;
+                    return token;
+                }
+                if (isLinkedDotStart(scnr, context) ||
+                    isLinkedDelimiterStart(scnr, context)) {
+                    skipSpaces(scnr);
+                    return readTokenInLinked(scnr, context);
+                }
+                if (isLinkedModifierStart(scnr, context)) {
+                    skipSpaces(scnr);
+                    return getToken(context, 12 /* TokenTypes.LinkedModifier */, readLinkedModifier(scnr));
+                }
+                if (isLinkedReferStart(scnr, context)) {
+                    skipSpaces(scnr);
+                    if (ch === "{" /* TokenChars.BraceLeft */) {
+                        // scan the placeholder
+                        return readTokenInPlaceholder(scnr, context) || token;
+                    }
+                    else {
+                        return getToken(context, 11 /* TokenTypes.LinkedKey */, readLinkedRefer(scnr));
+                    }
+                }
+                if (currentType === 8 /* TokenTypes.LinkedAlias */) {
+                    emitError(CompileErrorCodes.INVALID_LINKED_FORMAT, currentPosition(), 0);
+                }
+                context.braceNest = 0;
+                context.inLinked = false;
+                return readToken(scnr, context);
+        }
+    }
+    // TODO: We need refactoring of token parsing ...
+    function readToken(scnr, context) {
+        let token = { type: 14 /* TokenTypes.EOF */ };
+        if (context.braceNest > 0) {
+            return readTokenInPlaceholder(scnr, context) || getEndToken(context);
+        }
+        if (context.inLinked) {
+            return readTokenInLinked(scnr, context) || getEndToken(context);
+        }
+        const ch = scnr.currentChar();
+        switch (ch) {
+            case "{" /* TokenChars.BraceLeft */:
+                return readTokenInPlaceholder(scnr, context) || getEndToken(context);
+            case "}" /* TokenChars.BraceRight */:
+                emitError(CompileErrorCodes.UNBALANCED_CLOSING_BRACE, currentPosition(), 0);
+                scnr.next();
+                return getToken(context, 3 /* TokenTypes.BraceRight */, "}" /* TokenChars.BraceRight */);
+            case "@" /* TokenChars.LinkedAlias */:
+                return readTokenInLinked(scnr, context) || getEndToken(context);
+            default: {
+                if (isPluralStart(scnr)) {
+                    token = getToken(context, 1 /* TokenTypes.Pipe */, readPlural(scnr));
+                    // reset
+                    context.braceNest = 0;
+                    context.inLinked = false;
+                    return token;
+                }
+                const { isModulo, hasSpace } = detectModuloStart(scnr);
+                if (isModulo) {
+                    return hasSpace
+                        ? getToken(context, 0 /* TokenTypes.Text */, readText(scnr))
+                        : getToken(context, 4 /* TokenTypes.Modulo */, readModulo(scnr));
+                }
+                if (isTextStart(scnr)) {
+                    return getToken(context, 0 /* TokenTypes.Text */, readText(scnr));
+                }
+                break;
+            }
+        }
+        return token;
+    }
+    function nextToken() {
+        const { currentType, offset, startLoc, endLoc } = _context;
+        _context.lastType = currentType;
+        _context.lastOffset = offset;
+        _context.lastStartLoc = startLoc;
+        _context.lastEndLoc = endLoc;
+        _context.offset = currentOffset();
+        _context.startLoc = currentPosition();
+        if (_scnr.currentChar() === EOF) {
+            return getToken(_context, 14 /* TokenTypes.EOF */);
+        }
+        return readToken(_scnr, _context);
+    }
+    return {
+        nextToken,
+        currentOffset,
+        currentPosition,
+        context
+    };
+}
+
+const ERROR_DOMAIN$2 = 'parser';
+// Backslash backslash, backslash quote, uHHHH, UHHHHHH.
+const KNOWN_ESCAPES = /(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;
+function fromEscapeSequence(match, codePoint4, codePoint6) {
+    switch (match) {
+        case `\\\\`:
+            return `\\`;
+        // eslint-disable-next-line no-useless-escape
+        case `\\\'`:
+            // eslint-disable-next-line no-useless-escape
+            return `\'`;
+        default: {
+            const codePoint = parseInt(codePoint4 || codePoint6, 16);
+            if (codePoint <= 0xd7ff || codePoint >= 0xe000) {
+                return String.fromCodePoint(codePoint);
+            }
+            // invalid ...
+            // Replace them with U+FFFD REPLACEMENT CHARACTER.
+            return '�';
+        }
+    }
+}
+function createParser(options = {}) {
+    const location = options.location !== false;
+    const { onError, onWarn } = options;
+    function emitError(tokenzer, code, start, offset, ...args) {
+        const end = tokenzer.currentPosition();
+        end.offset += offset;
+        end.column += offset;
+        if (onError) {
+            const loc = location ? createLocation(start, end) : null;
+            const err = createCompileError(code, loc, {
+                domain: ERROR_DOMAIN$2,
+                args
+            });
+            onError(err);
+        }
+    }
+    function emitWarn(tokenzer, code, start, offset, ...args) {
+        const end = tokenzer.currentPosition();
+        end.offset += offset;
+        end.column += offset;
+        if (onWarn) {
+            const loc = location ? createLocation(start, end) : null;
+            onWarn(createCompileWarn(code, loc, args));
+        }
+    }
+    function startNode(type, offset, loc) {
+        const node = { type };
+        if (location) {
+            node.start = offset;
+            node.end = offset;
+            node.loc = { start: loc, end: loc };
+        }
+        return node;
+    }
+    function endNode(node, offset, pos, type) {
+        if (type) {
+            node.type = type;
+        }
+        if (location) {
+            node.end = offset;
+            if (node.loc) {
+                node.loc.end = pos;
+            }
+        }
+    }
+    function parseText(tokenizer, value) {
+        const context = tokenizer.context();
+        const node = startNode(3 /* NodeTypes.Text */, context.offset, context.startLoc);
+        node.value = value;
+        endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());
+        return node;
+    }
+    function parseList(tokenizer, index) {
+        const context = tokenizer.context();
+        const { lastOffset: offset, lastStartLoc: loc } = context; // get brace left loc
+        const node = startNode(5 /* NodeTypes.List */, offset, loc);
+        node.index = parseInt(index, 10);
+        tokenizer.nextToken(); // skip brach right
+        endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());
+        return node;
+    }
+    function parseNamed(tokenizer, key, modulo) {
+        const context = tokenizer.context();
+        const { lastOffset: offset, lastStartLoc: loc } = context; // get brace left loc
+        const node = startNode(4 /* NodeTypes.Named */, offset, loc);
+        node.key = key;
+        if (modulo === true) {
+            node.modulo = true;
+        }
+        tokenizer.nextToken(); // skip brach right
+        endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());
+        return node;
+    }
+    function parseLiteral(tokenizer, value) {
+        const context = tokenizer.context();
+        const { lastOffset: offset, lastStartLoc: loc } = context; // get brace left loc
+        const node = startNode(9 /* NodeTypes.Literal */, offset, loc);
+        node.value = value.replace(KNOWN_ESCAPES, fromEscapeSequence);
+        tokenizer.nextToken(); // skip brach right
+        endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());
+        return node;
+    }
+    function parseLinkedModifier(tokenizer) {
+        const token = tokenizer.nextToken();
+        const context = tokenizer.context();
+        const { lastOffset: offset, lastStartLoc: loc } = context; // get linked dot loc
+        const node = startNode(8 /* NodeTypes.LinkedModifier */, offset, loc);
+        if (token.type !== 12 /* TokenTypes.LinkedModifier */) {
+            // empty modifier
+            emitError(tokenizer, CompileErrorCodes.UNEXPECTED_EMPTY_LINKED_MODIFIER, context.lastStartLoc, 0);
+            node.value = '';
+            endNode(node, offset, loc);
+            return {
+                nextConsumeToken: token,
+                node
+            };
+        }
+        // check token
+        if (token.value == null) {
+            emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));
+        }
+        node.value = token.value || '';
+        endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());
+        return {
+            node
+        };
+    }
+    function parseLinkedKey(tokenizer, value) {
+        const context = tokenizer.context();
+        const node = startNode(7 /* NodeTypes.LinkedKey */, context.offset, context.startLoc);
+        node.value = value;
+        endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());
+        return node;
+    }
+    function parseLinked(tokenizer) {
+        const context = tokenizer.context();
+        const linkedNode = startNode(6 /* NodeTypes.Linked */, context.offset, context.startLoc);
+        let token = tokenizer.nextToken();
+        if (token.type === 9 /* TokenTypes.LinkedDot */) {
+            const parsed = parseLinkedModifier(tokenizer);
+            linkedNode.modifier = parsed.node;
+            token = parsed.nextConsumeToken || tokenizer.nextToken();
+        }
+        // asset check token
+        if (token.type !== 10 /* TokenTypes.LinkedDelimiter */) {
+            emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));
+        }
+        token = tokenizer.nextToken();
+        // skip brace left
+        if (token.type === 2 /* TokenTypes.BraceLeft */) {
+            token = tokenizer.nextToken();
+        }
+        switch (token.type) {
+            case 11 /* TokenTypes.LinkedKey */:
+                if (token.value == null) {
+                    emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));
+                }
+                linkedNode.key = parseLinkedKey(tokenizer, token.value || '');
+                break;
+            case 5 /* TokenTypes.Named */:
+                if (token.value == null) {
+                    emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));
+                }
+                linkedNode.key = parseNamed(tokenizer, token.value || '');
+                break;
+            case 6 /* TokenTypes.List */:
+                if (token.value == null) {
+                    emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));
+                }
+                linkedNode.key = parseList(tokenizer, token.value || '');
+                break;
+            case 7 /* TokenTypes.Literal */:
+                if (token.value == null) {
+                    emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));
+                }
+                linkedNode.key = parseLiteral(tokenizer, token.value || '');
+                break;
+            default: {
+                // empty key
+                emitError(tokenizer, CompileErrorCodes.UNEXPECTED_EMPTY_LINKED_KEY, context.lastStartLoc, 0);
+                const nextContext = tokenizer.context();
+                const emptyLinkedKeyNode = startNode(7 /* NodeTypes.LinkedKey */, nextContext.offset, nextContext.startLoc);
+                emptyLinkedKeyNode.value = '';
+                endNode(emptyLinkedKeyNode, nextContext.offset, nextContext.startLoc);
+                linkedNode.key = emptyLinkedKeyNode;
+                endNode(linkedNode, nextContext.offset, nextContext.startLoc);
+                return {
+                    nextConsumeToken: token,
+                    node: linkedNode
+                };
+            }
+        }
+        endNode(linkedNode, tokenizer.currentOffset(), tokenizer.currentPosition());
+        return {
+            node: linkedNode
+        };
+    }
+    function parseMessage(tokenizer) {
+        const context = tokenizer.context();
+        const startOffset = context.currentType === 1 /* TokenTypes.Pipe */
+            ? tokenizer.currentOffset()
+            : context.offset;
+        const startLoc = context.currentType === 1 /* TokenTypes.Pipe */
+            ? context.endLoc
+            : context.startLoc;
+        const node = startNode(2 /* NodeTypes.Message */, startOffset, startLoc);
+        node.items = [];
+        let nextToken = null;
+        let modulo = null;
+        do {
+            const token = nextToken || tokenizer.nextToken();
+            nextToken = null;
+            switch (token.type) {
+                case 0 /* TokenTypes.Text */:
+                    if (token.value == null) {
+                        emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));
+                    }
+                    node.items.push(parseText(tokenizer, token.value || ''));
+                    break;
+                case 6 /* TokenTypes.List */:
+                    if (token.value == null) {
+                        emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));
+                    }
+                    node.items.push(parseList(tokenizer, token.value || ''));
+                    break;
+                case 4 /* TokenTypes.Modulo */:
+                    modulo = true;
+                    break;
+                case 5 /* TokenTypes.Named */:
+                    if (token.value == null) {
+                        emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));
+                    }
+                    node.items.push(parseNamed(tokenizer, token.value || '', !!modulo));
+                    if (modulo) {
+                        emitWarn(tokenizer, CompileWarnCodes.USE_MODULO_SYNTAX, context.lastStartLoc, 0, getTokenCaption(token));
+                        modulo = null;
+                    }
+                    break;
+                case 7 /* TokenTypes.Literal */:
+                    if (token.value == null) {
+                        emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));
+                    }
+                    node.items.push(parseLiteral(tokenizer, token.value || ''));
+                    break;
+                case 8 /* TokenTypes.LinkedAlias */: {
+                    const parsed = parseLinked(tokenizer);
+                    node.items.push(parsed.node);
+                    nextToken = parsed.nextConsumeToken || null;
+                    break;
+                }
+            }
+        } while (context.currentType !== 14 /* TokenTypes.EOF */ &&
+            context.currentType !== 1 /* TokenTypes.Pipe */);
+        // adjust message node loc
+        const endOffset = context.currentType === 1 /* TokenTypes.Pipe */
+            ? context.lastOffset
+            : tokenizer.currentOffset();
+        const endLoc = context.currentType === 1 /* TokenTypes.Pipe */
+            ? context.lastEndLoc
+            : tokenizer.currentPosition();
+        endNode(node, endOffset, endLoc);
+        return node;
+    }
+    function parsePlural(tokenizer, offset, loc, msgNode) {
+        const context = tokenizer.context();
+        let hasEmptyMessage = msgNode.items.length === 0;
+        const node = startNode(1 /* NodeTypes.Plural */, offset, loc);
+        node.cases = [];
+        node.cases.push(msgNode);
+        do {
+            const msg = parseMessage(tokenizer);
+            if (!hasEmptyMessage) {
+                hasEmptyMessage = msg.items.length === 0;
+            }
+            node.cases.push(msg);
+        } while (context.currentType !== 14 /* TokenTypes.EOF */);
+        if (hasEmptyMessage) {
+            emitError(tokenizer, CompileErrorCodes.MUST_HAVE_MESSAGES_IN_PLURAL, loc, 0);
+        }
+        endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());
+        return node;
+    }
+    function parseResource(tokenizer) {
+        const context = tokenizer.context();
+        const { offset, startLoc } = context;
+        const msgNode = parseMessage(tokenizer);
+        if (context.currentType === 14 /* TokenTypes.EOF */) {
+            return msgNode;
+        }
+        else {
+            return parsePlural(tokenizer, offset, startLoc, msgNode);
+        }
+    }
+    function parse(source) {
+        const tokenizer = createTokenizer(source, shared.assign({}, options));
+        const context = tokenizer.context();
+        const node = startNode(0 /* NodeTypes.Resource */, context.offset, context.startLoc);
+        if (location && node.loc) {
+            node.loc.source = source;
+        }
+        node.body = parseResource(tokenizer);
+        if (options.onCacheKey) {
+            node.cacheKey = options.onCacheKey(source);
+        }
+        // assert whether achieved to EOF
+        if (context.currentType !== 14 /* TokenTypes.EOF */) {
+            emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, source[context.offset] || '');
+        }
+        endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());
+        return node;
+    }
+    return { parse };
+}
+function getTokenCaption(token) {
+    if (token.type === 14 /* TokenTypes.EOF */) {
+        return 'EOF';
+    }
+    const name = (token.value || '').replace(/\r?\n/gu, '\\n');
+    return name.length > 10 ? name.slice(0, 9) + '…' : name;
+}
+
+function createTransformer(ast, options = {} // eslint-disable-line
+) {
+    const _context = {
+        ast,
+        helpers: new Set()
+    };
+    const context = () => _context;
+    const helper = (name) => {
+        _context.helpers.add(name);
+        return name;
+    };
+    return { context, helper };
+}
+function traverseNodes(nodes, transformer) {
+    for (let i = 0; i < nodes.length; i++) {
+        traverseNode(nodes[i], transformer);
+    }
+}
+function traverseNode(node, transformer) {
+    // TODO: if we need pre-hook of transform, should be implemented to here
+    switch (node.type) {
+        case 1 /* NodeTypes.Plural */:
+            traverseNodes(node.cases, transformer);
+            transformer.helper("plural" /* HelperNameMap.PLURAL */);
+            break;
+        case 2 /* NodeTypes.Message */:
+            traverseNodes(node.items, transformer);
+            break;
+        case 6 /* NodeTypes.Linked */: {
+            const linked = node;
+            traverseNode(linked.key, transformer);
+            transformer.helper("linked" /* HelperNameMap.LINKED */);
+            transformer.helper("type" /* HelperNameMap.TYPE */);
+            break;
+        }
+        case 5 /* NodeTypes.List */:
+            transformer.helper("interpolate" /* HelperNameMap.INTERPOLATE */);
+            transformer.helper("list" /* HelperNameMap.LIST */);
+            break;
+        case 4 /* NodeTypes.Named */:
+            transformer.helper("interpolate" /* HelperNameMap.INTERPOLATE */);
+            transformer.helper("named" /* HelperNameMap.NAMED */);
+            break;
+    }
+    // TODO: if we need post-hook of transform, should be implemented to here
+}
+// transform AST
+function transform(ast, options = {} // eslint-disable-line
+) {
+    const transformer = createTransformer(ast);
+    transformer.helper("normalize" /* HelperNameMap.NORMALIZE */);
+    // traverse
+    ast.body && traverseNode(ast.body, transformer);
+    // set meta information
+    const context = transformer.context();
+    ast.helpers = Array.from(context.helpers);
+}
+
+function optimize(ast) {
+    const body = ast.body;
+    if (body.type === 2 /* NodeTypes.Message */) {
+        optimizeMessageNode(body);
+    }
+    else {
+        body.cases.forEach(c => optimizeMessageNode(c));
+    }
+    return ast;
+}
+function optimizeMessageNode(message) {
+    if (message.items.length === 1) {
+        const item = message.items[0];
+        if (item.type === 3 /* NodeTypes.Text */ || item.type === 9 /* NodeTypes.Literal */) {
+            message.static = item.value;
+            delete item.value; // optimization for size
+        }
+    }
+    else {
+        const values = [];
+        for (let i = 0; i < message.items.length; i++) {
+            const item = message.items[i];
+            if (!(item.type === 3 /* NodeTypes.Text */ || item.type === 9 /* NodeTypes.Literal */)) {
+                break;
+            }
+            if (item.value == null) {
+                break;
+            }
+            values.push(item.value);
+        }
+        if (values.length === message.items.length) {
+            message.static = shared.join(values);
+            for (let i = 0; i < message.items.length; i++) {
+                const item = message.items[i];
+                if (item.type === 3 /* NodeTypes.Text */ || item.type === 9 /* NodeTypes.Literal */) {
+                    delete item.value; // optimization for size
+                }
+            }
+        }
+    }
+}
+
+const ERROR_DOMAIN$1 = 'minifier';
+/* eslint-disable @typescript-eslint/no-explicit-any */
+function minify(node) {
+    node.t = node.type;
+    switch (node.type) {
+        case 0 /* NodeTypes.Resource */: {
+            const resource = node;
+            minify(resource.body);
+            resource.b = resource.body;
+            delete resource.body;
+            break;
+        }
+        case 1 /* NodeTypes.Plural */: {
+            const plural = node;
+            const cases = plural.cases;
+            for (let i = 0; i < cases.length; i++) {
+                minify(cases[i]);
+            }
+            plural.c = cases;
+            delete plural.cases;
+            break;
+        }
+        case 2 /* NodeTypes.Message */: {
+            const message = node;
+            const items = message.items;
+            for (let i = 0; i < items.length; i++) {
+                minify(items[i]);
+            }
+            message.i = items;
+            delete message.items;
+            if (message.static) {
+                message.s = message.static;
+                delete message.static;
+            }
+            break;
+        }
+        case 3 /* NodeTypes.Text */:
+        case 9 /* NodeTypes.Literal */:
+        case 8 /* NodeTypes.LinkedModifier */:
+        case 7 /* NodeTypes.LinkedKey */: {
+            const valueNode = node;
+            if (valueNode.value) {
+                valueNode.v = valueNode.value;
+                delete valueNode.value;
+            }
+            break;
+        }
+        case 6 /* NodeTypes.Linked */: {
+            const linked = node;
+            minify(linked.key);
+            linked.k = linked.key;
+            delete linked.key;
+            if (linked.modifier) {
+                minify(linked.modifier);
+                linked.m = linked.modifier;
+                delete linked.modifier;
+            }
+            break;
+        }
+        case 5 /* NodeTypes.List */: {
+            const list = node;
+            list.i = list.index;
+            delete list.index;
+            break;
+        }
+        case 4 /* NodeTypes.Named */: {
+            const named = node;
+            named.k = named.key;
+            delete named.key;
+            break;
+        }
+        default:
+            {
+                throw createCompileError(CompileErrorCodes.UNHANDLED_MINIFIER_NODE_TYPE, null, {
+                    domain: ERROR_DOMAIN$1,
+                    args: [node.type]
+                });
+            }
+    }
+    delete node.type;
+}
+/* eslint-enable @typescript-eslint/no-explicit-any */
+
+// eslint-disable-next-line @typescript-eslint/triple-slash-reference
+/// <reference types="source-map-js" />
+const ERROR_DOMAIN = 'parser';
+function createCodeGenerator(ast, options) {
+    const { sourceMap, filename, breakLineCode, needIndent: _needIndent } = options;
+    const location = options.location !== false;
+    const _context = {
+        filename,
+        code: '',
+        column: 1,
+        line: 1,
+        offset: 0,
+        map: undefined,
+        breakLineCode,
+        needIndent: _needIndent,
+        indentLevel: 0
+    };
+    if (location && ast.loc) {
+        _context.source = ast.loc.source;
+    }
+    const context = () => _context;
+    function push(code, node) {
+        _context.code += code;
+        if (_context.map) {
+            if (node && node.loc && node.loc !== LOCATION_STUB) {
+                addMapping(node.loc.start, getMappingName(node));
+            }
+            advancePositionWithSource(_context, code);
+        }
+    }
+    function _newline(n, withBreakLine = true) {
+        const _breakLineCode = withBreakLine ? breakLineCode : '';
+        push(_needIndent ? _breakLineCode + `  `.repeat(n) : _breakLineCode);
+    }
+    function indent(withNewLine = true) {
+        const level = ++_context.indentLevel;
+        withNewLine && _newline(level);
+    }
+    function deindent(withNewLine = true) {
+        const level = --_context.indentLevel;
+        withNewLine && _newline(level);
+    }
+    function newline() {
+        _newline(_context.indentLevel);
+    }
+    const helper = (key) => `_${key}`;
+    const needIndent = () => _context.needIndent;
+    function addMapping(loc, name) {
+        _context.map.addMapping({
+            name,
+            source: _context.filename,
+            original: {
+                line: loc.line,
+                column: loc.column - 1
+            },
+            generated: {
+                line: _context.line,
+                column: _context.column - 1
+            }
+        });
+    }
+    if (location && sourceMap) {
+        _context.map = new sourceMapJs.SourceMapGenerator();
+        _context.map.setSourceContent(filename, _context.source);
+    }
+    return {
+        context,
+        push,
+        indent,
+        deindent,
+        newline,
+        helper,
+        needIndent
+    };
+}
+function generateLinkedNode(generator, node) {
+    const { helper } = generator;
+    generator.push(`${helper("linked" /* HelperNameMap.LINKED */)}(`);
+    generateNode(generator, node.key);
+    if (node.modifier) {
+        generator.push(`, `);
+        generateNode(generator, node.modifier);
+        generator.push(`, _type`);
+    }
+    else {
+        generator.push(`, undefined, _type`);
+    }
+    generator.push(`)`);
+}
+function generateMessageNode(generator, node) {
+    const { helper, needIndent } = generator;
+    generator.push(`${helper("normalize" /* HelperNameMap.NORMALIZE */)}([`);
+    generator.indent(needIndent());
+    const length = node.items.length;
+    for (let i = 0; i < length; i++) {
+        generateNode(generator, node.items[i]);
+        if (i === length - 1) {
+            break;
+        }
+        generator.push(', ');
+    }
+    generator.deindent(needIndent());
+    generator.push('])');
+}
+function generatePluralNode(generator, node) {
+    const { helper, needIndent } = generator;
+    if (node.cases.length > 1) {
+        generator.push(`${helper("plural" /* HelperNameMap.PLURAL */)}([`);
+        generator.indent(needIndent());
+        const length = node.cases.length;
+        for (let i = 0; i < length; i++) {
+            generateNode(generator, node.cases[i]);
+            if (i === length - 1) {
+                break;
+            }
+            generator.push(', ');
+        }
+        generator.deindent(needIndent());
+        generator.push(`])`);
+    }
+}
+function generateResource(generator, node) {
+    if (node.body) {
+        generateNode(generator, node.body);
+    }
+    else {
+        generator.push('null');
+    }
+}
+function generateNode(generator, node) {
+    const { helper } = generator;
+    switch (node.type) {
+        case 0 /* NodeTypes.Resource */:
+            generateResource(generator, node);
+            break;
+        case 1 /* NodeTypes.Plural */:
+            generatePluralNode(generator, node);
+            break;
+        case 2 /* NodeTypes.Message */:
+            generateMessageNode(generator, node);
+            break;
+        case 6 /* NodeTypes.Linked */:
+            generateLinkedNode(generator, node);
+            break;
+        case 8 /* NodeTypes.LinkedModifier */:
+            generator.push(JSON.stringify(node.value), node);
+            break;
+        case 7 /* NodeTypes.LinkedKey */:
+            generator.push(JSON.stringify(node.value), node);
+            break;
+        case 5 /* NodeTypes.List */:
+            generator.push(`${helper("interpolate" /* HelperNameMap.INTERPOLATE */)}(${helper("list" /* HelperNameMap.LIST */)}(${node.index}))`, node);
+            break;
+        case 4 /* NodeTypes.Named */:
+            generator.push(`${helper("interpolate" /* HelperNameMap.INTERPOLATE */)}(${helper("named" /* HelperNameMap.NAMED */)}(${JSON.stringify(node.key)}))`, node);
+            break;
+        case 9 /* NodeTypes.Literal */:
+            generator.push(JSON.stringify(node.value), node);
+            break;
+        case 3 /* NodeTypes.Text */:
+            generator.push(JSON.stringify(node.value), node);
+            break;
+        default:
+            {
+                throw createCompileError(CompileErrorCodes.UNHANDLED_CODEGEN_NODE_TYPE, null, {
+                    domain: ERROR_DOMAIN,
+                    args: [node.type]
+                });
+            }
+    }
+}
+// generate code from AST
+const generate = (ast, options = {} // eslint-disable-line
+) => {
+    const mode = shared.isString(options.mode) ? options.mode : 'normal';
+    const filename = shared.isString(options.filename)
+        ? options.filename
+        : 'message.intl';
+    const sourceMap = !!options.sourceMap;
+    // prettier-ignore
+    const breakLineCode = options.breakLineCode != null
+        ? options.breakLineCode
+        : mode === 'arrow'
+            ? ';'
+            : '\n';
+    const needIndent = options.needIndent ? options.needIndent : mode !== 'arrow';
+    const helpers = ast.helpers || [];
+    const generator = createCodeGenerator(ast, {
+        mode,
+        filename,
+        sourceMap,
+        breakLineCode,
+        needIndent
+    });
+    generator.push(mode === 'normal' ? `function __msg__ (ctx) {` : `(ctx) => {`);
+    generator.indent(needIndent);
+    if (helpers.length > 0) {
+        generator.push(`const { ${shared.join(helpers.map(s => `${s}: _${s}`), ', ')} } = ctx`);
+        generator.newline();
+    }
+    generator.push(`return `);
+    generateNode(generator, ast);
+    generator.deindent(needIndent);
+    generator.push(`}`);
+    delete ast.helpers;
+    const { code, map } = generator.context();
+    return {
+        ast,
+        code,
+        map: map ? map.toJSON() : undefined // eslint-disable-line @typescript-eslint/no-explicit-any
+    };
+};
+function getMappingName(node) {
+    switch (node.type) {
+        case 3 /* NodeTypes.Text */:
+        case 9 /* NodeTypes.Literal */:
+        case 8 /* NodeTypes.LinkedModifier */:
+        case 7 /* NodeTypes.LinkedKey */:
+            return node.value;
+        case 5 /* NodeTypes.List */:
+            return node.index.toString();
+        case 4 /* NodeTypes.Named */:
+            return node.key;
+        default:
+            return undefined;
+    }
+}
+function advancePositionWithSource(pos, source, numberOfCharacters = source.length) {
+    let linesCount = 0;
+    let lastNewLinePos = -1;
+    for (let i = 0; i < numberOfCharacters; i++) {
+        if (source.charCodeAt(i) === 10 /* newline char code */) {
+            linesCount++;
+            lastNewLinePos = i;
+        }
+    }
+    pos.offset += numberOfCharacters;
+    pos.line += linesCount;
+    pos.column =
+        lastNewLinePos === -1
+            ? pos.column + numberOfCharacters
+            : numberOfCharacters - lastNewLinePos;
+    return pos;
+}
+
+function baseCompile(source, options = {}) {
+    const assignedOptions = shared.assign({}, options);
+    const jit = !!assignedOptions.jit;
+    const enalbeMinify = !!assignedOptions.minify;
+    const enambeOptimize = assignedOptions.optimize == null ? true : assignedOptions.optimize;
+    // parse source codes
+    const parser = createParser(assignedOptions);
+    const ast = parser.parse(source);
+    if (!jit) {
+        // transform ASTs
+        transform(ast, assignedOptions);
+        // generate javascript codes
+        return generate(ast, assignedOptions);
+    }
+    else {
+        // optimize ASTs
+        enambeOptimize && optimize(ast);
+        // minimize ASTs
+        enalbeMinify && minify(ast);
+        // In JIT mode, no ast transform, no code generation.
+        return { ast, code: '' };
+    }
+}
+
+exports.CompileErrorCodes = CompileErrorCodes;
+exports.CompileWarnCodes = CompileWarnCodes;
+exports.ERROR_DOMAIN = ERROR_DOMAIN$2;
+exports.LOCATION_STUB = LOCATION_STUB;
+exports.baseCompile = baseCompile;
+exports.createCompileError = createCompileError;
+exports.createCompileWarn = createCompileWarn;
+exports.createLocation = createLocation;
+exports.createParser = createParser;
+exports.createPosition = createPosition;
+exports.defaultOnError = defaultOnError;
+exports.detectHtmlTag = detectHtmlTag;
+exports.errorMessages = errorMessages;
+exports.warnMessages = warnMessages;

+ 1 - 0
node_modules/@intlify/message-compiler/dist/message-compiler.cjs.js

@@ -0,0 +1 @@
+module.exports = require('../dist/message-compiler.cjs')

+ 1 - 0
node_modules/@intlify/message-compiler/dist/message-compiler.cjs.prod.js

@@ -0,0 +1 @@
+module.exports = require('../dist/message-compiler.prod.cjs')

+ 249 - 0
node_modules/@intlify/message-compiler/dist/message-compiler.d.ts

@@ -0,0 +1,249 @@
+
+
+import type { BaseError } from '@intlify/shared';
+import type { RawSourceMap } from 'source-map-js';
+
+export declare function baseCompile(source: string, options?: CompileOptions): CompilerResult;
+
+export declare type CacheKeyHandler = (source: string) => string;
+
+export declare interface CodeGenOptions {
+    location?: boolean;
+    mode?: 'normal' | 'arrow';
+    breakLineCode?: '\n' | ';';
+    needIndent?: boolean;
+    onWarn?: CompileWarnHandler;
+    onError?: CompileErrorHandler;
+    sourceMap?: boolean;
+    filename?: string;
+}
+
+declare interface CodeGenResult {
+    code: string;
+    ast: ResourceNode;
+    map?: RawSourceMap;
+}
+
+export declare type CompileDomain = 'tokenizer' | 'parser' | 'generator' | 'transformer' | 'optimizer' | 'minifier';
+
+export declare interface CompileError extends BaseError, SyntaxError {
+    domain?: CompileDomain;
+    location?: SourceLocation;
+}
+
+export declare const CompileErrorCodes: {
+    readonly EXPECTED_TOKEN: 1;
+    readonly INVALID_TOKEN_IN_PLACEHOLDER: 2;
+    readonly UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER: 3;
+    readonly UNKNOWN_ESCAPE_SEQUENCE: 4;
+    readonly INVALID_UNICODE_ESCAPE_SEQUENCE: 5;
+    readonly UNBALANCED_CLOSING_BRACE: 6;
+    readonly UNTERMINATED_CLOSING_BRACE: 7;
+    readonly EMPTY_PLACEHOLDER: 8;
+    readonly NOT_ALLOW_NEST_PLACEHOLDER: 9;
+    readonly INVALID_LINKED_FORMAT: 10;
+    readonly MUST_HAVE_MESSAGES_IN_PLURAL: 11;
+    readonly UNEXPECTED_EMPTY_LINKED_MODIFIER: 12;
+    readonly UNEXPECTED_EMPTY_LINKED_KEY: 13;
+    readonly UNEXPECTED_LEXICAL_ANALYSIS: 14;
+    readonly UNHANDLED_CODEGEN_NODE_TYPE: 15;
+    readonly UNHANDLED_MINIFIER_NODE_TYPE: 16;
+    readonly __EXTEND_POINT__: 17;
+};
+
+export declare type CompileErrorCodes = (typeof CompileErrorCodes)[keyof typeof CompileErrorCodes];
+
+export declare type CompileErrorHandler = (error: CompileError) => void;
+
+export declare interface CompileErrorOptions {
+    domain?: CompileDomain;
+    messages?: {
+        [code: number]: string;
+    };
+    args?: unknown[];
+}
+
+export declare type CompileOptions = {
+    optimize?: boolean;
+    minify?: boolean;
+    jit?: boolean;
+} & TransformOptions & CodeGenOptions & ParserOptions & TokenizeOptions;
+
+export declare type CompilerResult = CodeGenResult;
+
+export declare interface CompileWarn {
+    message: string;
+    code: number;
+    location?: SourceLocation;
+}
+
+export declare const CompileWarnCodes: {
+    readonly USE_MODULO_SYNTAX: 1;
+    readonly __EXTEND_POINT__: 2;
+};
+
+export declare type CompileWarnCodes = (typeof CompileWarnCodes)[keyof typeof CompileWarnCodes];
+
+export declare type CompileWarnHandler = (warn: CompileWarn) => void;
+
+export declare function createCompileError<T extends number>(code: T, loc: SourceLocation | null, options?: CompileErrorOptions): CompileError;
+
+export declare function createCompileWarn<T extends number>(code: T, loc: SourceLocation | null, ...args: unknown[]): CompileWarn;
+
+export declare function createLocation(start: Position, end: Position, source?: string): SourceLocation;
+
+export declare function createParser(options?: ParserOptions): Parser;
+
+export declare function createPosition(line: number, column: number, offset: number): Position;
+
+/* Excluded from this release type: defaultOnError */
+
+export declare const detectHtmlTag: (source: string) => boolean;
+
+export declare const ERROR_DOMAIN = "parser";
+
+/* Excluded from this release type: errorMessages */
+
+export declare const enum HelperNameMap {
+    LIST = "list",
+    NAMED = "named",
+    PLURAL = "plural",
+    LINKED = "linked",
+    MESSAGE = "message",
+    TYPE = "type",
+    INTERPOLATE = "interpolate",
+    NORMALIZE = "normalize",
+    VALUES = "values"
+}
+
+export declare type Identifier = string;
+
+export declare interface LinkedKeyNode extends Node_2 {
+    type: NodeTypes.LinkedKey;
+    value: string;
+    /* Excluded from this release type: v */
+}
+
+export declare interface LinkedModifierNode extends Node_2 {
+    type: NodeTypes.LinkedModifier;
+    value: Identifier;
+    /* Excluded from this release type: v */
+}
+
+export declare interface LinkedNode extends Node_2 {
+    type: NodeTypes.Linked;
+    modifier?: LinkedModifierNode;
+    /* Excluded from this release type: m */
+    key: LinkedKeyNode | NamedNode | ListNode | LiteralNode;
+    /* Excluded from this release type: k */
+}
+
+export declare interface ListNode extends Node_2 {
+    type: NodeTypes.List;
+    index: number;
+    /* Excluded from this release type: i */
+}
+
+export declare interface LiteralNode extends Node_2 {
+    type: NodeTypes.Literal;
+    value?: string;
+    /* Excluded from this release type: v */
+}
+
+export declare const LOCATION_STUB: SourceLocation;
+
+declare type MessageElementNode = TextNode | NamedNode | ListNode | LiteralNode | LinkedNode;
+
+export declare interface MessageNode extends Node_2 {
+    type: NodeTypes.Message;
+    static?: string;
+    /* Excluded from this release type: s */
+    items: MessageElementNode[];
+    /* Excluded from this release type: i */
+}
+
+export declare interface NamedNode extends Node_2 {
+    type: NodeTypes.Named;
+    key: Identifier;
+    modulo?: boolean;
+    /* Excluded from this release type: k */
+}
+
+declare interface Node_2 {
+    type: NodeTypes;
+    /* Excluded from this release type: t */
+    start?: number;
+    end?: number;
+    loc?: SourceLocation;
+}
+export { Node_2 as Node }
+
+export declare const enum NodeTypes {
+    Resource = 0,// 0
+    Plural = 1,
+    Message = 2,
+    Text = 3,
+    Named = 4,
+    List = 5,// 5
+    Linked = 6,
+    LinkedKey = 7,
+    LinkedModifier = 8,
+    Literal = 9
+}
+
+export declare interface Parser {
+    parse(source: string): ResourceNode;
+}
+
+export declare interface ParserOptions {
+    location?: boolean;
+    onCacheKey?: (source: string) => string;
+    onWarn?: CompileWarnHandler;
+    onError?: CompileErrorHandler;
+}
+
+export declare interface PluralNode extends Node_2 {
+    type: NodeTypes.Plural;
+    cases: MessageNode[];
+    /* Excluded from this release type: c */
+}
+
+export declare interface Position {
+    offset: number;
+    line: number;
+    column: number;
+}
+
+export declare interface ResourceNode extends Node_2 {
+    type: NodeTypes.Resource;
+    body: MessageNode | PluralNode;
+    /* Excluded from this release type: b */
+    cacheKey?: string;
+    helpers?: string[];
+}
+
+export declare interface SourceLocation {
+    start: Position;
+    end: Position;
+    source?: string;
+}
+
+export declare interface TextNode extends Node_2 {
+    type: NodeTypes.Text;
+    value?: string;
+    /* Excluded from this release type: v */
+}
+
+export declare interface TokenizeOptions {
+    location?: boolean;
+    onError?: CompileErrorHandler;
+}
+
+export declare interface TransformOptions {
+    onWarn?: CompileWarnHandler;
+    onError?: CompileErrorHandler;
+}
+
+/* Excluded from this release type: warnMessages */
+
+export { }

+ 1625 - 0
node_modules/@intlify/message-compiler/dist/message-compiler.esm-browser.js

@@ -0,0 +1,1625 @@
+/*!
+  * message-compiler v9.13.1
+  * (c) 2024 kazuya kawaguchi
+  * Released under the MIT License.
+  */
+const LOCATION_STUB = {
+    start: { line: 1, column: 1, offset: 0 },
+    end: { line: 1, column: 1, offset: 0 }
+};
+function createPosition(line, column, offset) {
+    return { line, column, offset };
+}
+function createLocation(start, end, source) {
+    const loc = { start, end };
+    if (source != null) {
+        loc.source = source;
+    }
+    return loc;
+}
+
+/**
+ * Original Utilities
+ * written by kazuya kawaguchi
+ */
+const RE_ARGS = /\{([0-9a-zA-Z]+)\}/g;
+/* eslint-disable */
+function format(message, ...args) {
+    if (args.length === 1 && isObject(args[0])) {
+        args = args[0];
+    }
+    if (!args || !args.hasOwnProperty) {
+        args = {};
+    }
+    return message.replace(RE_ARGS, (match, identifier) => {
+        return args.hasOwnProperty(identifier) ? args[identifier] : '';
+    });
+}
+const assign = Object.assign;
+const isString = (val) => typeof val === 'string';
+// eslint-disable-next-line @typescript-eslint/no-explicit-any
+const isObject = (val) => val !== null && typeof val === 'object';
+function join(items, separator = '') {
+    return items.reduce((str, item, index) => (index === 0 ? str + item : str + separator + item), '');
+}
+
+const CompileWarnCodes = {
+    USE_MODULO_SYNTAX: 1,
+    __EXTEND_POINT__: 2
+};
+/** @internal */
+const warnMessages = {
+    [CompileWarnCodes.USE_MODULO_SYNTAX]: `Use modulo before '{{0}}'.`
+};
+function createCompileWarn(code, loc, ...args) {
+    const msg = format(warnMessages[code] || '', ...(args || [])) ;
+    const message = { message: String(msg), code };
+    if (loc) {
+        message.location = loc;
+    }
+    return message;
+}
+
+const CompileErrorCodes = {
+    // tokenizer error codes
+    EXPECTED_TOKEN: 1,
+    INVALID_TOKEN_IN_PLACEHOLDER: 2,
+    UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER: 3,
+    UNKNOWN_ESCAPE_SEQUENCE: 4,
+    INVALID_UNICODE_ESCAPE_SEQUENCE: 5,
+    UNBALANCED_CLOSING_BRACE: 6,
+    UNTERMINATED_CLOSING_BRACE: 7,
+    EMPTY_PLACEHOLDER: 8,
+    NOT_ALLOW_NEST_PLACEHOLDER: 9,
+    INVALID_LINKED_FORMAT: 10,
+    // parser error codes
+    MUST_HAVE_MESSAGES_IN_PLURAL: 11,
+    UNEXPECTED_EMPTY_LINKED_MODIFIER: 12,
+    UNEXPECTED_EMPTY_LINKED_KEY: 13,
+    UNEXPECTED_LEXICAL_ANALYSIS: 14,
+    // generator error codes
+    UNHANDLED_CODEGEN_NODE_TYPE: 15,
+    // minifier error codes
+    UNHANDLED_MINIFIER_NODE_TYPE: 16,
+    // Special value for higher-order compilers to pick up the last code
+    // to avoid collision of error codes. This should always be kept as the last
+    // item.
+    __EXTEND_POINT__: 17
+};
+/** @internal */
+const errorMessages = {
+    // tokenizer error messages
+    [CompileErrorCodes.EXPECTED_TOKEN]: `Expected token: '{0}'`,
+    [CompileErrorCodes.INVALID_TOKEN_IN_PLACEHOLDER]: `Invalid token in placeholder: '{0}'`,
+    [CompileErrorCodes.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER]: `Unterminated single quote in placeholder`,
+    [CompileErrorCodes.UNKNOWN_ESCAPE_SEQUENCE]: `Unknown escape sequence: \\{0}`,
+    [CompileErrorCodes.INVALID_UNICODE_ESCAPE_SEQUENCE]: `Invalid unicode escape sequence: {0}`,
+    [CompileErrorCodes.UNBALANCED_CLOSING_BRACE]: `Unbalanced closing brace`,
+    [CompileErrorCodes.UNTERMINATED_CLOSING_BRACE]: `Unterminated closing brace`,
+    [CompileErrorCodes.EMPTY_PLACEHOLDER]: `Empty placeholder`,
+    [CompileErrorCodes.NOT_ALLOW_NEST_PLACEHOLDER]: `Not allowed nest placeholder`,
+    [CompileErrorCodes.INVALID_LINKED_FORMAT]: `Invalid linked format`,
+    // parser error messages
+    [CompileErrorCodes.MUST_HAVE_MESSAGES_IN_PLURAL]: `Plural must have messages`,
+    [CompileErrorCodes.UNEXPECTED_EMPTY_LINKED_MODIFIER]: `Unexpected empty linked modifier`,
+    [CompileErrorCodes.UNEXPECTED_EMPTY_LINKED_KEY]: `Unexpected empty linked key`,
+    [CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS]: `Unexpected lexical analysis in token: '{0}'`,
+    // generator error messages
+    [CompileErrorCodes.UNHANDLED_CODEGEN_NODE_TYPE]: `unhandled codegen node type: '{0}'`,
+    // minimizer error messages
+    [CompileErrorCodes.UNHANDLED_MINIFIER_NODE_TYPE]: `unhandled mimifier node type: '{0}'`
+};
+function createCompileError(code, loc, options = {}) {
+    const { domain, messages, args } = options;
+    const msg = format((messages || errorMessages)[code] || '', ...(args || []))
+        ;
+    const error = new SyntaxError(String(msg));
+    error.code = code;
+    if (loc) {
+        error.location = loc;
+    }
+    error.domain = domain;
+    return error;
+}
+/** @internal */
+function defaultOnError(error) {
+    throw error;
+}
+
+// eslint-disable-next-line no-useless-escape
+const RE_HTML_TAG = /<\/?[\w\s="/.':;#-\/]+>/;
+const detectHtmlTag = (source) => RE_HTML_TAG.test(source);
+
+const CHAR_SP = ' ';
+const CHAR_CR = '\r';
+const CHAR_LF = '\n';
+const CHAR_LS = String.fromCharCode(0x2028);
+const CHAR_PS = String.fromCharCode(0x2029);
+function createScanner(str) {
+    const _buf = str;
+    let _index = 0;
+    let _line = 1;
+    let _column = 1;
+    let _peekOffset = 0;
+    const isCRLF = (index) => _buf[index] === CHAR_CR && _buf[index + 1] === CHAR_LF;
+    const isLF = (index) => _buf[index] === CHAR_LF;
+    const isPS = (index) => _buf[index] === CHAR_PS;
+    const isLS = (index) => _buf[index] === CHAR_LS;
+    const isLineEnd = (index) => isCRLF(index) || isLF(index) || isPS(index) || isLS(index);
+    const index = () => _index;
+    const line = () => _line;
+    const column = () => _column;
+    const peekOffset = () => _peekOffset;
+    const charAt = (offset) => isCRLF(offset) || isPS(offset) || isLS(offset) ? CHAR_LF : _buf[offset];
+    const currentChar = () => charAt(_index);
+    const currentPeek = () => charAt(_index + _peekOffset);
+    function next() {
+        _peekOffset = 0;
+        if (isLineEnd(_index)) {
+            _line++;
+            _column = 0;
+        }
+        if (isCRLF(_index)) {
+            _index++;
+        }
+        _index++;
+        _column++;
+        return _buf[_index];
+    }
+    function peek() {
+        if (isCRLF(_index + _peekOffset)) {
+            _peekOffset++;
+        }
+        _peekOffset++;
+        return _buf[_index + _peekOffset];
+    }
+    function reset() {
+        _index = 0;
+        _line = 1;
+        _column = 1;
+        _peekOffset = 0;
+    }
+    function resetPeek(offset = 0) {
+        _peekOffset = offset;
+    }
+    function skipToPeek() {
+        const target = _index + _peekOffset;
+        // eslint-disable-next-line no-unmodified-loop-condition
+        while (target !== _index) {
+            next();
+        }
+        _peekOffset = 0;
+    }
+    return {
+        index,
+        line,
+        column,
+        peekOffset,
+        charAt,
+        currentChar,
+        currentPeek,
+        next,
+        peek,
+        reset,
+        resetPeek,
+        skipToPeek
+    };
+}
+
+const EOF = undefined;
+const DOT = '.';
+const LITERAL_DELIMITER = "'";
+const ERROR_DOMAIN$3 = 'tokenizer';
+function createTokenizer(source, options = {}) {
+    const location = options.location !== false;
+    const _scnr = createScanner(source);
+    const currentOffset = () => _scnr.index();
+    const currentPosition = () => createPosition(_scnr.line(), _scnr.column(), _scnr.index());
+    const _initLoc = currentPosition();
+    const _initOffset = currentOffset();
+    const _context = {
+        currentType: 14 /* TokenTypes.EOF */,
+        offset: _initOffset,
+        startLoc: _initLoc,
+        endLoc: _initLoc,
+        lastType: 14 /* TokenTypes.EOF */,
+        lastOffset: _initOffset,
+        lastStartLoc: _initLoc,
+        lastEndLoc: _initLoc,
+        braceNest: 0,
+        inLinked: false,
+        text: ''
+    };
+    const context = () => _context;
+    const { onError } = options;
+    function emitError(code, pos, offset, ...args) {
+        const ctx = context();
+        pos.column += offset;
+        pos.offset += offset;
+        if (onError) {
+            const loc = location ? createLocation(ctx.startLoc, pos) : null;
+            const err = createCompileError(code, loc, {
+                domain: ERROR_DOMAIN$3,
+                args
+            });
+            onError(err);
+        }
+    }
+    function getToken(context, type, value) {
+        context.endLoc = currentPosition();
+        context.currentType = type;
+        const token = { type };
+        if (location) {
+            token.loc = createLocation(context.startLoc, context.endLoc);
+        }
+        if (value != null) {
+            token.value = value;
+        }
+        return token;
+    }
+    const getEndToken = (context) => getToken(context, 14 /* TokenTypes.EOF */);
+    function eat(scnr, ch) {
+        if (scnr.currentChar() === ch) {
+            scnr.next();
+            return ch;
+        }
+        else {
+            emitError(CompileErrorCodes.EXPECTED_TOKEN, currentPosition(), 0, ch);
+            return '';
+        }
+    }
+    function peekSpaces(scnr) {
+        let buf = '';
+        while (scnr.currentPeek() === CHAR_SP || scnr.currentPeek() === CHAR_LF) {
+            buf += scnr.currentPeek();
+            scnr.peek();
+        }
+        return buf;
+    }
+    function skipSpaces(scnr) {
+        const buf = peekSpaces(scnr);
+        scnr.skipToPeek();
+        return buf;
+    }
+    function isIdentifierStart(ch) {
+        if (ch === EOF) {
+            return false;
+        }
+        const cc = ch.charCodeAt(0);
+        return ((cc >= 97 && cc <= 122) || // a-z
+            (cc >= 65 && cc <= 90) || // A-Z
+            cc === 95 // _
+        );
+    }
+    function isNumberStart(ch) {
+        if (ch === EOF) {
+            return false;
+        }
+        const cc = ch.charCodeAt(0);
+        return cc >= 48 && cc <= 57; // 0-9
+    }
+    function isNamedIdentifierStart(scnr, context) {
+        const { currentType } = context;
+        if (currentType !== 2 /* TokenTypes.BraceLeft */) {
+            return false;
+        }
+        peekSpaces(scnr);
+        const ret = isIdentifierStart(scnr.currentPeek());
+        scnr.resetPeek();
+        return ret;
+    }
+    function isListIdentifierStart(scnr, context) {
+        const { currentType } = context;
+        if (currentType !== 2 /* TokenTypes.BraceLeft */) {
+            return false;
+        }
+        peekSpaces(scnr);
+        const ch = scnr.currentPeek() === '-' ? scnr.peek() : scnr.currentPeek();
+        const ret = isNumberStart(ch);
+        scnr.resetPeek();
+        return ret;
+    }
+    function isLiteralStart(scnr, context) {
+        const { currentType } = context;
+        if (currentType !== 2 /* TokenTypes.BraceLeft */) {
+            return false;
+        }
+        peekSpaces(scnr);
+        const ret = scnr.currentPeek() === LITERAL_DELIMITER;
+        scnr.resetPeek();
+        return ret;
+    }
+    function isLinkedDotStart(scnr, context) {
+        const { currentType } = context;
+        if (currentType !== 8 /* TokenTypes.LinkedAlias */) {
+            return false;
+        }
+        peekSpaces(scnr);
+        const ret = scnr.currentPeek() === "." /* TokenChars.LinkedDot */;
+        scnr.resetPeek();
+        return ret;
+    }
+    function isLinkedModifierStart(scnr, context) {
+        const { currentType } = context;
+        if (currentType !== 9 /* TokenTypes.LinkedDot */) {
+            return false;
+        }
+        peekSpaces(scnr);
+        const ret = isIdentifierStart(scnr.currentPeek());
+        scnr.resetPeek();
+        return ret;
+    }
+    function isLinkedDelimiterStart(scnr, context) {
+        const { currentType } = context;
+        if (!(currentType === 8 /* TokenTypes.LinkedAlias */ ||
+            currentType === 12 /* TokenTypes.LinkedModifier */)) {
+            return false;
+        }
+        peekSpaces(scnr);
+        const ret = scnr.currentPeek() === ":" /* TokenChars.LinkedDelimiter */;
+        scnr.resetPeek();
+        return ret;
+    }
+    function isLinkedReferStart(scnr, context) {
+        const { currentType } = context;
+        if (currentType !== 10 /* TokenTypes.LinkedDelimiter */) {
+            return false;
+        }
+        const fn = () => {
+            const ch = scnr.currentPeek();
+            if (ch === "{" /* TokenChars.BraceLeft */) {
+                return isIdentifierStart(scnr.peek());
+            }
+            else if (ch === "@" /* TokenChars.LinkedAlias */ ||
+                ch === "%" /* TokenChars.Modulo */ ||
+                ch === "|" /* TokenChars.Pipe */ ||
+                ch === ":" /* TokenChars.LinkedDelimiter */ ||
+                ch === "." /* TokenChars.LinkedDot */ ||
+                ch === CHAR_SP ||
+                !ch) {
+                return false;
+            }
+            else if (ch === CHAR_LF) {
+                scnr.peek();
+                return fn();
+            }
+            else {
+                // other characters
+                return isTextStart(scnr, false);
+            }
+        };
+        const ret = fn();
+        scnr.resetPeek();
+        return ret;
+    }
+    function isPluralStart(scnr) {
+        peekSpaces(scnr);
+        const ret = scnr.currentPeek() === "|" /* TokenChars.Pipe */;
+        scnr.resetPeek();
+        return ret;
+    }
+    function detectModuloStart(scnr) {
+        const spaces = peekSpaces(scnr);
+        const ret = scnr.currentPeek() === "%" /* TokenChars.Modulo */ &&
+            scnr.peek() === "{" /* TokenChars.BraceLeft */;
+        scnr.resetPeek();
+        return {
+            isModulo: ret,
+            hasSpace: spaces.length > 0
+        };
+    }
+    function isTextStart(scnr, reset = true) {
+        const fn = (hasSpace = false, prev = '', detectModulo = false) => {
+            const ch = scnr.currentPeek();
+            if (ch === "{" /* TokenChars.BraceLeft */) {
+                return prev === "%" /* TokenChars.Modulo */ ? false : hasSpace;
+            }
+            else if (ch === "@" /* TokenChars.LinkedAlias */ || !ch) {
+                return prev === "%" /* TokenChars.Modulo */ ? true : hasSpace;
+            }
+            else if (ch === "%" /* TokenChars.Modulo */) {
+                scnr.peek();
+                return fn(hasSpace, "%" /* TokenChars.Modulo */, true);
+            }
+            else if (ch === "|" /* TokenChars.Pipe */) {
+                return prev === "%" /* TokenChars.Modulo */ || detectModulo
+                    ? true
+                    : !(prev === CHAR_SP || prev === CHAR_LF);
+            }
+            else if (ch === CHAR_SP) {
+                scnr.peek();
+                return fn(true, CHAR_SP, detectModulo);
+            }
+            else if (ch === CHAR_LF) {
+                scnr.peek();
+                return fn(true, CHAR_LF, detectModulo);
+            }
+            else {
+                return true;
+            }
+        };
+        const ret = fn();
+        reset && scnr.resetPeek();
+        return ret;
+    }
+    function takeChar(scnr, fn) {
+        const ch = scnr.currentChar();
+        if (ch === EOF) {
+            return EOF;
+        }
+        if (fn(ch)) {
+            scnr.next();
+            return ch;
+        }
+        return null;
+    }
+    function isIdentifier(ch) {
+        const cc = ch.charCodeAt(0);
+        return ((cc >= 97 && cc <= 122) || // a-z
+            (cc >= 65 && cc <= 90) || // A-Z
+            (cc >= 48 && cc <= 57) || // 0-9
+            cc === 95 || // _
+            cc === 36 // $
+        );
+    }
+    function takeIdentifierChar(scnr) {
+        return takeChar(scnr, isIdentifier);
+    }
+    function isNamedIdentifier(ch) {
+        const cc = ch.charCodeAt(0);
+        return ((cc >= 97 && cc <= 122) || // a-z
+            (cc >= 65 && cc <= 90) || // A-Z
+            (cc >= 48 && cc <= 57) || // 0-9
+            cc === 95 || // _
+            cc === 36 || // $
+            cc === 45 // -
+        );
+    }
+    function takeNamedIdentifierChar(scnr) {
+        return takeChar(scnr, isNamedIdentifier);
+    }
+    function isDigit(ch) {
+        const cc = ch.charCodeAt(0);
+        return cc >= 48 && cc <= 57; // 0-9
+    }
+    function takeDigit(scnr) {
+        return takeChar(scnr, isDigit);
+    }
+    function isHexDigit(ch) {
+        const cc = ch.charCodeAt(0);
+        return ((cc >= 48 && cc <= 57) || // 0-9
+            (cc >= 65 && cc <= 70) || // A-F
+            (cc >= 97 && cc <= 102)); // a-f
+    }
+    function takeHexDigit(scnr) {
+        return takeChar(scnr, isHexDigit);
+    }
+    function getDigits(scnr) {
+        let ch = '';
+        let num = '';
+        while ((ch = takeDigit(scnr))) {
+            num += ch;
+        }
+        return num;
+    }
+    function readModulo(scnr) {
+        skipSpaces(scnr);
+        const ch = scnr.currentChar();
+        if (ch !== "%" /* TokenChars.Modulo */) {
+            emitError(CompileErrorCodes.EXPECTED_TOKEN, currentPosition(), 0, ch);
+        }
+        scnr.next();
+        return "%" /* TokenChars.Modulo */;
+    }
+    function readText(scnr) {
+        let buf = '';
+        // eslint-disable-next-line no-constant-condition
+        while (true) {
+            const ch = scnr.currentChar();
+            if (ch === "{" /* TokenChars.BraceLeft */ ||
+                ch === "}" /* TokenChars.BraceRight */ ||
+                ch === "@" /* TokenChars.LinkedAlias */ ||
+                ch === "|" /* TokenChars.Pipe */ ||
+                !ch) {
+                break;
+            }
+            else if (ch === "%" /* TokenChars.Modulo */) {
+                if (isTextStart(scnr)) {
+                    buf += ch;
+                    scnr.next();
+                }
+                else {
+                    break;
+                }
+            }
+            else if (ch === CHAR_SP || ch === CHAR_LF) {
+                if (isTextStart(scnr)) {
+                    buf += ch;
+                    scnr.next();
+                }
+                else if (isPluralStart(scnr)) {
+                    break;
+                }
+                else {
+                    buf += ch;
+                    scnr.next();
+                }
+            }
+            else {
+                buf += ch;
+                scnr.next();
+            }
+        }
+        return buf;
+    }
+    function readNamedIdentifier(scnr) {
+        skipSpaces(scnr);
+        let ch = '';
+        let name = '';
+        while ((ch = takeNamedIdentifierChar(scnr))) {
+            name += ch;
+        }
+        if (scnr.currentChar() === EOF) {
+            emitError(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE, currentPosition(), 0);
+        }
+        return name;
+    }
+    function readListIdentifier(scnr) {
+        skipSpaces(scnr);
+        let value = '';
+        if (scnr.currentChar() === '-') {
+            scnr.next();
+            value += `-${getDigits(scnr)}`;
+        }
+        else {
+            value += getDigits(scnr);
+        }
+        if (scnr.currentChar() === EOF) {
+            emitError(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE, currentPosition(), 0);
+        }
+        return value;
+    }
+    function isLiteral(ch) {
+        return ch !== LITERAL_DELIMITER && ch !== CHAR_LF;
+    }
+    function readLiteral(scnr) {
+        skipSpaces(scnr);
+        // eslint-disable-next-line no-useless-escape
+        eat(scnr, `\'`);
+        let ch = '';
+        let literal = '';
+        while ((ch = takeChar(scnr, isLiteral))) {
+            if (ch === '\\') {
+                literal += readEscapeSequence(scnr);
+            }
+            else {
+                literal += ch;
+            }
+        }
+        const current = scnr.currentChar();
+        if (current === CHAR_LF || current === EOF) {
+            emitError(CompileErrorCodes.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER, currentPosition(), 0);
+            // TODO: Is it correct really?
+            if (current === CHAR_LF) {
+                scnr.next();
+                // eslint-disable-next-line no-useless-escape
+                eat(scnr, `\'`);
+            }
+            return literal;
+        }
+        // eslint-disable-next-line no-useless-escape
+        eat(scnr, `\'`);
+        return literal;
+    }
+    function readEscapeSequence(scnr) {
+        const ch = scnr.currentChar();
+        switch (ch) {
+            case '\\':
+            case `\'`: // eslint-disable-line no-useless-escape
+                scnr.next();
+                return `\\${ch}`;
+            case 'u':
+                return readUnicodeEscapeSequence(scnr, ch, 4);
+            case 'U':
+                return readUnicodeEscapeSequence(scnr, ch, 6);
+            default:
+                emitError(CompileErrorCodes.UNKNOWN_ESCAPE_SEQUENCE, currentPosition(), 0, ch);
+                return '';
+        }
+    }
+    function readUnicodeEscapeSequence(scnr, unicode, digits) {
+        eat(scnr, unicode);
+        let sequence = '';
+        for (let i = 0; i < digits; i++) {
+            const ch = takeHexDigit(scnr);
+            if (!ch) {
+                emitError(CompileErrorCodes.INVALID_UNICODE_ESCAPE_SEQUENCE, currentPosition(), 0, `\\${unicode}${sequence}${scnr.currentChar()}`);
+                break;
+            }
+            sequence += ch;
+        }
+        return `\\${unicode}${sequence}`;
+    }
+    function isInvalidIdentifier(ch) {
+        return (ch !== "{" /* TokenChars.BraceLeft */ &&
+            ch !== "}" /* TokenChars.BraceRight */ &&
+            ch !== CHAR_SP &&
+            ch !== CHAR_LF);
+    }
+    function readInvalidIdentifier(scnr) {
+        skipSpaces(scnr);
+        let ch = '';
+        let identifiers = '';
+        while ((ch = takeChar(scnr, isInvalidIdentifier))) {
+            identifiers += ch;
+        }
+        return identifiers;
+    }
+    function readLinkedModifier(scnr) {
+        let ch = '';
+        let name = '';
+        while ((ch = takeIdentifierChar(scnr))) {
+            name += ch;
+        }
+        return name;
+    }
+    function readLinkedRefer(scnr) {
+        const fn = (buf) => {
+            const ch = scnr.currentChar();
+            if (ch === "{" /* TokenChars.BraceLeft */ ||
+                ch === "%" /* TokenChars.Modulo */ ||
+                ch === "@" /* TokenChars.LinkedAlias */ ||
+                ch === "|" /* TokenChars.Pipe */ ||
+                ch === "(" /* TokenChars.ParenLeft */ ||
+                ch === ")" /* TokenChars.ParenRight */ ||
+                !ch) {
+                return buf;
+            }
+            else if (ch === CHAR_SP) {
+                return buf;
+            }
+            else if (ch === CHAR_LF || ch === DOT) {
+                buf += ch;
+                scnr.next();
+                return fn(buf);
+            }
+            else {
+                buf += ch;
+                scnr.next();
+                return fn(buf);
+            }
+        };
+        return fn('');
+    }
+    function readPlural(scnr) {
+        skipSpaces(scnr);
+        const plural = eat(scnr, "|" /* TokenChars.Pipe */);
+        skipSpaces(scnr);
+        return plural;
+    }
+    // TODO: We need refactoring of token parsing ...
+    function readTokenInPlaceholder(scnr, context) {
+        let token = null;
+        const ch = scnr.currentChar();
+        switch (ch) {
+            case "{" /* TokenChars.BraceLeft */:
+                if (context.braceNest >= 1) {
+                    emitError(CompileErrorCodes.NOT_ALLOW_NEST_PLACEHOLDER, currentPosition(), 0);
+                }
+                scnr.next();
+                token = getToken(context, 2 /* TokenTypes.BraceLeft */, "{" /* TokenChars.BraceLeft */);
+                skipSpaces(scnr);
+                context.braceNest++;
+                return token;
+            case "}" /* TokenChars.BraceRight */:
+                if (context.braceNest > 0 &&
+                    context.currentType === 2 /* TokenTypes.BraceLeft */) {
+                    emitError(CompileErrorCodes.EMPTY_PLACEHOLDER, currentPosition(), 0);
+                }
+                scnr.next();
+                token = getToken(context, 3 /* TokenTypes.BraceRight */, "}" /* TokenChars.BraceRight */);
+                context.braceNest--;
+                context.braceNest > 0 && skipSpaces(scnr);
+                if (context.inLinked && context.braceNest === 0) {
+                    context.inLinked = false;
+                }
+                return token;
+            case "@" /* TokenChars.LinkedAlias */:
+                if (context.braceNest > 0) {
+                    emitError(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE, currentPosition(), 0);
+                }
+                token = readTokenInLinked(scnr, context) || getEndToken(context);
+                context.braceNest = 0;
+                return token;
+            default: {
+                let validNamedIdentifier = true;
+                let validListIdentifier = true;
+                let validLiteral = true;
+                if (isPluralStart(scnr)) {
+                    if (context.braceNest > 0) {
+                        emitError(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE, currentPosition(), 0);
+                    }
+                    token = getToken(context, 1 /* TokenTypes.Pipe */, readPlural(scnr));
+                    // reset
+                    context.braceNest = 0;
+                    context.inLinked = false;
+                    return token;
+                }
+                if (context.braceNest > 0 &&
+                    (context.currentType === 5 /* TokenTypes.Named */ ||
+                        context.currentType === 6 /* TokenTypes.List */ ||
+                        context.currentType === 7 /* TokenTypes.Literal */)) {
+                    emitError(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE, currentPosition(), 0);
+                    context.braceNest = 0;
+                    return readToken(scnr, context);
+                }
+                if ((validNamedIdentifier = isNamedIdentifierStart(scnr, context))) {
+                    token = getToken(context, 5 /* TokenTypes.Named */, readNamedIdentifier(scnr));
+                    skipSpaces(scnr);
+                    return token;
+                }
+                if ((validListIdentifier = isListIdentifierStart(scnr, context))) {
+                    token = getToken(context, 6 /* TokenTypes.List */, readListIdentifier(scnr));
+                    skipSpaces(scnr);
+                    return token;
+                }
+                if ((validLiteral = isLiteralStart(scnr, context))) {
+                    token = getToken(context, 7 /* TokenTypes.Literal */, readLiteral(scnr));
+                    skipSpaces(scnr);
+                    return token;
+                }
+                if (!validNamedIdentifier && !validListIdentifier && !validLiteral) {
+                    // TODO: we should be re-designed invalid cases, when we will extend message syntax near the future ...
+                    token = getToken(context, 13 /* TokenTypes.InvalidPlace */, readInvalidIdentifier(scnr));
+                    emitError(CompileErrorCodes.INVALID_TOKEN_IN_PLACEHOLDER, currentPosition(), 0, token.value);
+                    skipSpaces(scnr);
+                    return token;
+                }
+                break;
+            }
+        }
+        return token;
+    }
+    // TODO: We need refactoring of token parsing ...
+    function readTokenInLinked(scnr, context) {
+        const { currentType } = context;
+        let token = null;
+        const ch = scnr.currentChar();
+        if ((currentType === 8 /* TokenTypes.LinkedAlias */ ||
+            currentType === 9 /* TokenTypes.LinkedDot */ ||
+            currentType === 12 /* TokenTypes.LinkedModifier */ ||
+            currentType === 10 /* TokenTypes.LinkedDelimiter */) &&
+            (ch === CHAR_LF || ch === CHAR_SP)) {
+            emitError(CompileErrorCodes.INVALID_LINKED_FORMAT, currentPosition(), 0);
+        }
+        switch (ch) {
+            case "@" /* TokenChars.LinkedAlias */:
+                scnr.next();
+                token = getToken(context, 8 /* TokenTypes.LinkedAlias */, "@" /* TokenChars.LinkedAlias */);
+                context.inLinked = true;
+                return token;
+            case "." /* TokenChars.LinkedDot */:
+                skipSpaces(scnr);
+                scnr.next();
+                return getToken(context, 9 /* TokenTypes.LinkedDot */, "." /* TokenChars.LinkedDot */);
+            case ":" /* TokenChars.LinkedDelimiter */:
+                skipSpaces(scnr);
+                scnr.next();
+                return getToken(context, 10 /* TokenTypes.LinkedDelimiter */, ":" /* TokenChars.LinkedDelimiter */);
+            default:
+                if (isPluralStart(scnr)) {
+                    token = getToken(context, 1 /* TokenTypes.Pipe */, readPlural(scnr));
+                    // reset
+                    context.braceNest = 0;
+                    context.inLinked = false;
+                    return token;
+                }
+                if (isLinkedDotStart(scnr, context) ||
+                    isLinkedDelimiterStart(scnr, context)) {
+                    skipSpaces(scnr);
+                    return readTokenInLinked(scnr, context);
+                }
+                if (isLinkedModifierStart(scnr, context)) {
+                    skipSpaces(scnr);
+                    return getToken(context, 12 /* TokenTypes.LinkedModifier */, readLinkedModifier(scnr));
+                }
+                if (isLinkedReferStart(scnr, context)) {
+                    skipSpaces(scnr);
+                    if (ch === "{" /* TokenChars.BraceLeft */) {
+                        // scan the placeholder
+                        return readTokenInPlaceholder(scnr, context) || token;
+                    }
+                    else {
+                        return getToken(context, 11 /* TokenTypes.LinkedKey */, readLinkedRefer(scnr));
+                    }
+                }
+                if (currentType === 8 /* TokenTypes.LinkedAlias */) {
+                    emitError(CompileErrorCodes.INVALID_LINKED_FORMAT, currentPosition(), 0);
+                }
+                context.braceNest = 0;
+                context.inLinked = false;
+                return readToken(scnr, context);
+        }
+    }
+    // TODO: We need refactoring of token parsing ...
+    function readToken(scnr, context) {
+        let token = { type: 14 /* TokenTypes.EOF */ };
+        if (context.braceNest > 0) {
+            return readTokenInPlaceholder(scnr, context) || getEndToken(context);
+        }
+        if (context.inLinked) {
+            return readTokenInLinked(scnr, context) || getEndToken(context);
+        }
+        const ch = scnr.currentChar();
+        switch (ch) {
+            case "{" /* TokenChars.BraceLeft */:
+                return readTokenInPlaceholder(scnr, context) || getEndToken(context);
+            case "}" /* TokenChars.BraceRight */:
+                emitError(CompileErrorCodes.UNBALANCED_CLOSING_BRACE, currentPosition(), 0);
+                scnr.next();
+                return getToken(context, 3 /* TokenTypes.BraceRight */, "}" /* TokenChars.BraceRight */);
+            case "@" /* TokenChars.LinkedAlias */:
+                return readTokenInLinked(scnr, context) || getEndToken(context);
+            default: {
+                if (isPluralStart(scnr)) {
+                    token = getToken(context, 1 /* TokenTypes.Pipe */, readPlural(scnr));
+                    // reset
+                    context.braceNest = 0;
+                    context.inLinked = false;
+                    return token;
+                }
+                const { isModulo, hasSpace } = detectModuloStart(scnr);
+                if (isModulo) {
+                    return hasSpace
+                        ? getToken(context, 0 /* TokenTypes.Text */, readText(scnr))
+                        : getToken(context, 4 /* TokenTypes.Modulo */, readModulo(scnr));
+                }
+                if (isTextStart(scnr)) {
+                    return getToken(context, 0 /* TokenTypes.Text */, readText(scnr));
+                }
+                break;
+            }
+        }
+        return token;
+    }
+    function nextToken() {
+        const { currentType, offset, startLoc, endLoc } = _context;
+        _context.lastType = currentType;
+        _context.lastOffset = offset;
+        _context.lastStartLoc = startLoc;
+        _context.lastEndLoc = endLoc;
+        _context.offset = currentOffset();
+        _context.startLoc = currentPosition();
+        if (_scnr.currentChar() === EOF) {
+            return getToken(_context, 14 /* TokenTypes.EOF */);
+        }
+        return readToken(_scnr, _context);
+    }
+    return {
+        nextToken,
+        currentOffset,
+        currentPosition,
+        context
+    };
+}
+
+const ERROR_DOMAIN$2 = 'parser';
+// Backslash backslash, backslash quote, uHHHH, UHHHHHH.
+const KNOWN_ESCAPES = /(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;
+function fromEscapeSequence(match, codePoint4, codePoint6) {
+    switch (match) {
+        case `\\\\`:
+            return `\\`;
+        // eslint-disable-next-line no-useless-escape
+        case `\\\'`:
+            // eslint-disable-next-line no-useless-escape
+            return `\'`;
+        default: {
+            const codePoint = parseInt(codePoint4 || codePoint6, 16);
+            if (codePoint <= 0xd7ff || codePoint >= 0xe000) {
+                return String.fromCodePoint(codePoint);
+            }
+            // invalid ...
+            // Replace them with U+FFFD REPLACEMENT CHARACTER.
+            return '�';
+        }
+    }
+}
+function createParser(options = {}) {
+    const location = options.location !== false;
+    const { onError, onWarn } = options;
+    function emitError(tokenzer, code, start, offset, ...args) {
+        const end = tokenzer.currentPosition();
+        end.offset += offset;
+        end.column += offset;
+        if (onError) {
+            const loc = location ? createLocation(start, end) : null;
+            const err = createCompileError(code, loc, {
+                domain: ERROR_DOMAIN$2,
+                args
+            });
+            onError(err);
+        }
+    }
+    function emitWarn(tokenzer, code, start, offset, ...args) {
+        const end = tokenzer.currentPosition();
+        end.offset += offset;
+        end.column += offset;
+        if (onWarn) {
+            const loc = location ? createLocation(start, end) : null;
+            onWarn(createCompileWarn(code, loc, args));
+        }
+    }
+    function startNode(type, offset, loc) {
+        const node = { type };
+        if (location) {
+            node.start = offset;
+            node.end = offset;
+            node.loc = { start: loc, end: loc };
+        }
+        return node;
+    }
+    function endNode(node, offset, pos, type) {
+        if (type) {
+            node.type = type;
+        }
+        if (location) {
+            node.end = offset;
+            if (node.loc) {
+                node.loc.end = pos;
+            }
+        }
+    }
+    function parseText(tokenizer, value) {
+        const context = tokenizer.context();
+        const node = startNode(3 /* NodeTypes.Text */, context.offset, context.startLoc);
+        node.value = value;
+        endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());
+        return node;
+    }
+    function parseList(tokenizer, index) {
+        const context = tokenizer.context();
+        const { lastOffset: offset, lastStartLoc: loc } = context; // get brace left loc
+        const node = startNode(5 /* NodeTypes.List */, offset, loc);
+        node.index = parseInt(index, 10);
+        tokenizer.nextToken(); // skip brach right
+        endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());
+        return node;
+    }
+    function parseNamed(tokenizer, key, modulo) {
+        const context = tokenizer.context();
+        const { lastOffset: offset, lastStartLoc: loc } = context; // get brace left loc
+        const node = startNode(4 /* NodeTypes.Named */, offset, loc);
+        node.key = key;
+        if (modulo === true) {
+            node.modulo = true;
+        }
+        tokenizer.nextToken(); // skip brach right
+        endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());
+        return node;
+    }
+    function parseLiteral(tokenizer, value) {
+        const context = tokenizer.context();
+        const { lastOffset: offset, lastStartLoc: loc } = context; // get brace left loc
+        const node = startNode(9 /* NodeTypes.Literal */, offset, loc);
+        node.value = value.replace(KNOWN_ESCAPES, fromEscapeSequence);
+        tokenizer.nextToken(); // skip brach right
+        endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());
+        return node;
+    }
+    function parseLinkedModifier(tokenizer) {
+        const token = tokenizer.nextToken();
+        const context = tokenizer.context();
+        const { lastOffset: offset, lastStartLoc: loc } = context; // get linked dot loc
+        const node = startNode(8 /* NodeTypes.LinkedModifier */, offset, loc);
+        if (token.type !== 12 /* TokenTypes.LinkedModifier */) {
+            // empty modifier
+            emitError(tokenizer, CompileErrorCodes.UNEXPECTED_EMPTY_LINKED_MODIFIER, context.lastStartLoc, 0);
+            node.value = '';
+            endNode(node, offset, loc);
+            return {
+                nextConsumeToken: token,
+                node
+            };
+        }
+        // check token
+        if (token.value == null) {
+            emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));
+        }
+        node.value = token.value || '';
+        endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());
+        return {
+            node
+        };
+    }
+    function parseLinkedKey(tokenizer, value) {
+        const context = tokenizer.context();
+        const node = startNode(7 /* NodeTypes.LinkedKey */, context.offset, context.startLoc);
+        node.value = value;
+        endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());
+        return node;
+    }
+    function parseLinked(tokenizer) {
+        const context = tokenizer.context();
+        const linkedNode = startNode(6 /* NodeTypes.Linked */, context.offset, context.startLoc);
+        let token = tokenizer.nextToken();
+        if (token.type === 9 /* TokenTypes.LinkedDot */) {
+            const parsed = parseLinkedModifier(tokenizer);
+            linkedNode.modifier = parsed.node;
+            token = parsed.nextConsumeToken || tokenizer.nextToken();
+        }
+        // asset check token
+        if (token.type !== 10 /* TokenTypes.LinkedDelimiter */) {
+            emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));
+        }
+        token = tokenizer.nextToken();
+        // skip brace left
+        if (token.type === 2 /* TokenTypes.BraceLeft */) {
+            token = tokenizer.nextToken();
+        }
+        switch (token.type) {
+            case 11 /* TokenTypes.LinkedKey */:
+                if (token.value == null) {
+                    emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));
+                }
+                linkedNode.key = parseLinkedKey(tokenizer, token.value || '');
+                break;
+            case 5 /* TokenTypes.Named */:
+                if (token.value == null) {
+                    emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));
+                }
+                linkedNode.key = parseNamed(tokenizer, token.value || '');
+                break;
+            case 6 /* TokenTypes.List */:
+                if (token.value == null) {
+                    emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));
+                }
+                linkedNode.key = parseList(tokenizer, token.value || '');
+                break;
+            case 7 /* TokenTypes.Literal */:
+                if (token.value == null) {
+                    emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));
+                }
+                linkedNode.key = parseLiteral(tokenizer, token.value || '');
+                break;
+            default: {
+                // empty key
+                emitError(tokenizer, CompileErrorCodes.UNEXPECTED_EMPTY_LINKED_KEY, context.lastStartLoc, 0);
+                const nextContext = tokenizer.context();
+                const emptyLinkedKeyNode = startNode(7 /* NodeTypes.LinkedKey */, nextContext.offset, nextContext.startLoc);
+                emptyLinkedKeyNode.value = '';
+                endNode(emptyLinkedKeyNode, nextContext.offset, nextContext.startLoc);
+                linkedNode.key = emptyLinkedKeyNode;
+                endNode(linkedNode, nextContext.offset, nextContext.startLoc);
+                return {
+                    nextConsumeToken: token,
+                    node: linkedNode
+                };
+            }
+        }
+        endNode(linkedNode, tokenizer.currentOffset(), tokenizer.currentPosition());
+        return {
+            node: linkedNode
+        };
+    }
+    function parseMessage(tokenizer) {
+        const context = tokenizer.context();
+        const startOffset = context.currentType === 1 /* TokenTypes.Pipe */
+            ? tokenizer.currentOffset()
+            : context.offset;
+        const startLoc = context.currentType === 1 /* TokenTypes.Pipe */
+            ? context.endLoc
+            : context.startLoc;
+        const node = startNode(2 /* NodeTypes.Message */, startOffset, startLoc);
+        node.items = [];
+        let nextToken = null;
+        let modulo = null;
+        do {
+            const token = nextToken || tokenizer.nextToken();
+            nextToken = null;
+            switch (token.type) {
+                case 0 /* TokenTypes.Text */:
+                    if (token.value == null) {
+                        emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));
+                    }
+                    node.items.push(parseText(tokenizer, token.value || ''));
+                    break;
+                case 6 /* TokenTypes.List */:
+                    if (token.value == null) {
+                        emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));
+                    }
+                    node.items.push(parseList(tokenizer, token.value || ''));
+                    break;
+                case 4 /* TokenTypes.Modulo */:
+                    modulo = true;
+                    break;
+                case 5 /* TokenTypes.Named */:
+                    if (token.value == null) {
+                        emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));
+                    }
+                    node.items.push(parseNamed(tokenizer, token.value || '', !!modulo));
+                    if (modulo) {
+                        emitWarn(tokenizer, CompileWarnCodes.USE_MODULO_SYNTAX, context.lastStartLoc, 0, getTokenCaption(token));
+                        modulo = null;
+                    }
+                    break;
+                case 7 /* TokenTypes.Literal */:
+                    if (token.value == null) {
+                        emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));
+                    }
+                    node.items.push(parseLiteral(tokenizer, token.value || ''));
+                    break;
+                case 8 /* TokenTypes.LinkedAlias */: {
+                    const parsed = parseLinked(tokenizer);
+                    node.items.push(parsed.node);
+                    nextToken = parsed.nextConsumeToken || null;
+                    break;
+                }
+            }
+        } while (context.currentType !== 14 /* TokenTypes.EOF */ &&
+            context.currentType !== 1 /* TokenTypes.Pipe */);
+        // adjust message node loc
+        const endOffset = context.currentType === 1 /* TokenTypes.Pipe */
+            ? context.lastOffset
+            : tokenizer.currentOffset();
+        const endLoc = context.currentType === 1 /* TokenTypes.Pipe */
+            ? context.lastEndLoc
+            : tokenizer.currentPosition();
+        endNode(node, endOffset, endLoc);
+        return node;
+    }
+    function parsePlural(tokenizer, offset, loc, msgNode) {
+        const context = tokenizer.context();
+        let hasEmptyMessage = msgNode.items.length === 0;
+        const node = startNode(1 /* NodeTypes.Plural */, offset, loc);
+        node.cases = [];
+        node.cases.push(msgNode);
+        do {
+            const msg = parseMessage(tokenizer);
+            if (!hasEmptyMessage) {
+                hasEmptyMessage = msg.items.length === 0;
+            }
+            node.cases.push(msg);
+        } while (context.currentType !== 14 /* TokenTypes.EOF */);
+        if (hasEmptyMessage) {
+            emitError(tokenizer, CompileErrorCodes.MUST_HAVE_MESSAGES_IN_PLURAL, loc, 0);
+        }
+        endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());
+        return node;
+    }
+    function parseResource(tokenizer) {
+        const context = tokenizer.context();
+        const { offset, startLoc } = context;
+        const msgNode = parseMessage(tokenizer);
+        if (context.currentType === 14 /* TokenTypes.EOF */) {
+            return msgNode;
+        }
+        else {
+            return parsePlural(tokenizer, offset, startLoc, msgNode);
+        }
+    }
+    function parse(source) {
+        const tokenizer = createTokenizer(source, assign({}, options));
+        const context = tokenizer.context();
+        const node = startNode(0 /* NodeTypes.Resource */, context.offset, context.startLoc);
+        if (location && node.loc) {
+            node.loc.source = source;
+        }
+        node.body = parseResource(tokenizer);
+        if (options.onCacheKey) {
+            node.cacheKey = options.onCacheKey(source);
+        }
+        // assert whether achieved to EOF
+        if (context.currentType !== 14 /* TokenTypes.EOF */) {
+            emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, source[context.offset] || '');
+        }
+        endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());
+        return node;
+    }
+    return { parse };
+}
+function getTokenCaption(token) {
+    if (token.type === 14 /* TokenTypes.EOF */) {
+        return 'EOF';
+    }
+    const name = (token.value || '').replace(/\r?\n/gu, '\\n');
+    return name.length > 10 ? name.slice(0, 9) + '…' : name;
+}
+
+function createTransformer(ast, options = {} // eslint-disable-line
+) {
+    const _context = {
+        ast,
+        helpers: new Set()
+    };
+    const context = () => _context;
+    const helper = (name) => {
+        _context.helpers.add(name);
+        return name;
+    };
+    return { context, helper };
+}
+function traverseNodes(nodes, transformer) {
+    for (let i = 0; i < nodes.length; i++) {
+        traverseNode(nodes[i], transformer);
+    }
+}
+function traverseNode(node, transformer) {
+    // TODO: if we need pre-hook of transform, should be implemented to here
+    switch (node.type) {
+        case 1 /* NodeTypes.Plural */:
+            traverseNodes(node.cases, transformer);
+            transformer.helper("plural" /* HelperNameMap.PLURAL */);
+            break;
+        case 2 /* NodeTypes.Message */:
+            traverseNodes(node.items, transformer);
+            break;
+        case 6 /* NodeTypes.Linked */: {
+            const linked = node;
+            traverseNode(linked.key, transformer);
+            transformer.helper("linked" /* HelperNameMap.LINKED */);
+            transformer.helper("type" /* HelperNameMap.TYPE */);
+            break;
+        }
+        case 5 /* NodeTypes.List */:
+            transformer.helper("interpolate" /* HelperNameMap.INTERPOLATE */);
+            transformer.helper("list" /* HelperNameMap.LIST */);
+            break;
+        case 4 /* NodeTypes.Named */:
+            transformer.helper("interpolate" /* HelperNameMap.INTERPOLATE */);
+            transformer.helper("named" /* HelperNameMap.NAMED */);
+            break;
+    }
+    // TODO: if we need post-hook of transform, should be implemented to here
+}
+// transform AST
+function transform(ast, options = {} // eslint-disable-line
+) {
+    const transformer = createTransformer(ast);
+    transformer.helper("normalize" /* HelperNameMap.NORMALIZE */);
+    // traverse
+    ast.body && traverseNode(ast.body, transformer);
+    // set meta information
+    const context = transformer.context();
+    ast.helpers = Array.from(context.helpers);
+}
+
+function optimize(ast) {
+    const body = ast.body;
+    if (body.type === 2 /* NodeTypes.Message */) {
+        optimizeMessageNode(body);
+    }
+    else {
+        body.cases.forEach(c => optimizeMessageNode(c));
+    }
+    return ast;
+}
+function optimizeMessageNode(message) {
+    if (message.items.length === 1) {
+        const item = message.items[0];
+        if (item.type === 3 /* NodeTypes.Text */ || item.type === 9 /* NodeTypes.Literal */) {
+            message.static = item.value;
+            delete item.value; // optimization for size
+        }
+    }
+    else {
+        const values = [];
+        for (let i = 0; i < message.items.length; i++) {
+            const item = message.items[i];
+            if (!(item.type === 3 /* NodeTypes.Text */ || item.type === 9 /* NodeTypes.Literal */)) {
+                break;
+            }
+            if (item.value == null) {
+                break;
+            }
+            values.push(item.value);
+        }
+        if (values.length === message.items.length) {
+            message.static = join(values);
+            for (let i = 0; i < message.items.length; i++) {
+                const item = message.items[i];
+                if (item.type === 3 /* NodeTypes.Text */ || item.type === 9 /* NodeTypes.Literal */) {
+                    delete item.value; // optimization for size
+                }
+            }
+        }
+    }
+}
+
+const ERROR_DOMAIN$1 = 'minifier';
+/* eslint-disable @typescript-eslint/no-explicit-any */
+function minify(node) {
+    node.t = node.type;
+    switch (node.type) {
+        case 0 /* NodeTypes.Resource */: {
+            const resource = node;
+            minify(resource.body);
+            resource.b = resource.body;
+            delete resource.body;
+            break;
+        }
+        case 1 /* NodeTypes.Plural */: {
+            const plural = node;
+            const cases = plural.cases;
+            for (let i = 0; i < cases.length; i++) {
+                minify(cases[i]);
+            }
+            plural.c = cases;
+            delete plural.cases;
+            break;
+        }
+        case 2 /* NodeTypes.Message */: {
+            const message = node;
+            const items = message.items;
+            for (let i = 0; i < items.length; i++) {
+                minify(items[i]);
+            }
+            message.i = items;
+            delete message.items;
+            if (message.static) {
+                message.s = message.static;
+                delete message.static;
+            }
+            break;
+        }
+        case 3 /* NodeTypes.Text */:
+        case 9 /* NodeTypes.Literal */:
+        case 8 /* NodeTypes.LinkedModifier */:
+        case 7 /* NodeTypes.LinkedKey */: {
+            const valueNode = node;
+            if (valueNode.value) {
+                valueNode.v = valueNode.value;
+                delete valueNode.value;
+            }
+            break;
+        }
+        case 6 /* NodeTypes.Linked */: {
+            const linked = node;
+            minify(linked.key);
+            linked.k = linked.key;
+            delete linked.key;
+            if (linked.modifier) {
+                minify(linked.modifier);
+                linked.m = linked.modifier;
+                delete linked.modifier;
+            }
+            break;
+        }
+        case 5 /* NodeTypes.List */: {
+            const list = node;
+            list.i = list.index;
+            delete list.index;
+            break;
+        }
+        case 4 /* NodeTypes.Named */: {
+            const named = node;
+            named.k = named.key;
+            delete named.key;
+            break;
+        }
+        default:
+            {
+                throw createCompileError(CompileErrorCodes.UNHANDLED_MINIFIER_NODE_TYPE, null, {
+                    domain: ERROR_DOMAIN$1,
+                    args: [node.type]
+                });
+            }
+    }
+    delete node.type;
+}
+/* eslint-enable @typescript-eslint/no-explicit-any */
+
+// eslint-disable-next-line @typescript-eslint/triple-slash-reference
+/// <reference types="source-map-js" />
+const ERROR_DOMAIN = 'parser';
+function createCodeGenerator(ast, options) {
+    const { sourceMap, filename, breakLineCode, needIndent: _needIndent } = options;
+    const location = options.location !== false;
+    const _context = {
+        filename,
+        code: '',
+        column: 1,
+        line: 1,
+        offset: 0,
+        map: undefined,
+        breakLineCode,
+        needIndent: _needIndent,
+        indentLevel: 0
+    };
+    if (location && ast.loc) {
+        _context.source = ast.loc.source;
+    }
+    const context = () => _context;
+    function push(code, node) {
+        _context.code += code;
+    }
+    function _newline(n, withBreakLine = true) {
+        const _breakLineCode = withBreakLine ? breakLineCode : '';
+        push(_needIndent ? _breakLineCode + `  `.repeat(n) : _breakLineCode);
+    }
+    function indent(withNewLine = true) {
+        const level = ++_context.indentLevel;
+        withNewLine && _newline(level);
+    }
+    function deindent(withNewLine = true) {
+        const level = --_context.indentLevel;
+        withNewLine && _newline(level);
+    }
+    function newline() {
+        _newline(_context.indentLevel);
+    }
+    const helper = (key) => `_${key}`;
+    const needIndent = () => _context.needIndent;
+    return {
+        context,
+        push,
+        indent,
+        deindent,
+        newline,
+        helper,
+        needIndent
+    };
+}
+function generateLinkedNode(generator, node) {
+    const { helper } = generator;
+    generator.push(`${helper("linked" /* HelperNameMap.LINKED */)}(`);
+    generateNode(generator, node.key);
+    if (node.modifier) {
+        generator.push(`, `);
+        generateNode(generator, node.modifier);
+        generator.push(`, _type`);
+    }
+    else {
+        generator.push(`, undefined, _type`);
+    }
+    generator.push(`)`);
+}
+function generateMessageNode(generator, node) {
+    const { helper, needIndent } = generator;
+    generator.push(`${helper("normalize" /* HelperNameMap.NORMALIZE */)}([`);
+    generator.indent(needIndent());
+    const length = node.items.length;
+    for (let i = 0; i < length; i++) {
+        generateNode(generator, node.items[i]);
+        if (i === length - 1) {
+            break;
+        }
+        generator.push(', ');
+    }
+    generator.deindent(needIndent());
+    generator.push('])');
+}
+function generatePluralNode(generator, node) {
+    const { helper, needIndent } = generator;
+    if (node.cases.length > 1) {
+        generator.push(`${helper("plural" /* HelperNameMap.PLURAL */)}([`);
+        generator.indent(needIndent());
+        const length = node.cases.length;
+        for (let i = 0; i < length; i++) {
+            generateNode(generator, node.cases[i]);
+            if (i === length - 1) {
+                break;
+            }
+            generator.push(', ');
+        }
+        generator.deindent(needIndent());
+        generator.push(`])`);
+    }
+}
+function generateResource(generator, node) {
+    if (node.body) {
+        generateNode(generator, node.body);
+    }
+    else {
+        generator.push('null');
+    }
+}
+function generateNode(generator, node) {
+    const { helper } = generator;
+    switch (node.type) {
+        case 0 /* NodeTypes.Resource */:
+            generateResource(generator, node);
+            break;
+        case 1 /* NodeTypes.Plural */:
+            generatePluralNode(generator, node);
+            break;
+        case 2 /* NodeTypes.Message */:
+            generateMessageNode(generator, node);
+            break;
+        case 6 /* NodeTypes.Linked */:
+            generateLinkedNode(generator, node);
+            break;
+        case 8 /* NodeTypes.LinkedModifier */:
+            generator.push(JSON.stringify(node.value), node);
+            break;
+        case 7 /* NodeTypes.LinkedKey */:
+            generator.push(JSON.stringify(node.value), node);
+            break;
+        case 5 /* NodeTypes.List */:
+            generator.push(`${helper("interpolate" /* HelperNameMap.INTERPOLATE */)}(${helper("list" /* HelperNameMap.LIST */)}(${node.index}))`, node);
+            break;
+        case 4 /* NodeTypes.Named */:
+            generator.push(`${helper("interpolate" /* HelperNameMap.INTERPOLATE */)}(${helper("named" /* HelperNameMap.NAMED */)}(${JSON.stringify(node.key)}))`, node);
+            break;
+        case 9 /* NodeTypes.Literal */:
+            generator.push(JSON.stringify(node.value), node);
+            break;
+        case 3 /* NodeTypes.Text */:
+            generator.push(JSON.stringify(node.value), node);
+            break;
+        default:
+            {
+                throw createCompileError(CompileErrorCodes.UNHANDLED_CODEGEN_NODE_TYPE, null, {
+                    domain: ERROR_DOMAIN,
+                    args: [node.type]
+                });
+            }
+    }
+}
+// generate code from AST
+const generate = (ast, options = {} // eslint-disable-line
+) => {
+    const mode = isString(options.mode) ? options.mode : 'normal';
+    const filename = isString(options.filename)
+        ? options.filename
+        : 'message.intl';
+    const sourceMap = !!options.sourceMap;
+    // prettier-ignore
+    const breakLineCode = options.breakLineCode != null
+        ? options.breakLineCode
+        : mode === 'arrow'
+            ? ';'
+            : '\n';
+    const needIndent = options.needIndent ? options.needIndent : mode !== 'arrow';
+    const helpers = ast.helpers || [];
+    const generator = createCodeGenerator(ast, {
+        mode,
+        filename,
+        sourceMap,
+        breakLineCode,
+        needIndent
+    });
+    generator.push(mode === 'normal' ? `function __msg__ (ctx) {` : `(ctx) => {`);
+    generator.indent(needIndent);
+    if (helpers.length > 0) {
+        generator.push(`const { ${join(helpers.map(s => `${s}: _${s}`), ', ')} } = ctx`);
+        generator.newline();
+    }
+    generator.push(`return `);
+    generateNode(generator, ast);
+    generator.deindent(needIndent);
+    generator.push(`}`);
+    delete ast.helpers;
+    const { code, map } = generator.context();
+    return {
+        ast,
+        code,
+        map: map ? map.toJSON() : undefined // eslint-disable-line @typescript-eslint/no-explicit-any
+    };
+};
+
+function baseCompile(source, options = {}) {
+    const assignedOptions = assign({}, options);
+    const jit = !!assignedOptions.jit;
+    const enalbeMinify = !!assignedOptions.minify;
+    const enambeOptimize = assignedOptions.optimize == null ? true : assignedOptions.optimize;
+    // parse source codes
+    const parser = createParser(assignedOptions);
+    const ast = parser.parse(source);
+    if (!jit) {
+        // transform ASTs
+        transform(ast, assignedOptions);
+        // generate javascript codes
+        return generate(ast, assignedOptions);
+    }
+    else {
+        // optimize ASTs
+        enambeOptimize && optimize(ast);
+        // minimize ASTs
+        enalbeMinify && minify(ast);
+        // In JIT mode, no ast transform, no code generation.
+        return { ast, code: '' };
+    }
+}
+
+export { CompileErrorCodes, CompileWarnCodes, ERROR_DOMAIN$2 as ERROR_DOMAIN, LOCATION_STUB, baseCompile, createCompileError, createCompileWarn, createLocation, createParser, createPosition, defaultOnError, detectHtmlTag, errorMessages, warnMessages };

Fichier diff supprimé car celui-ci est trop grand
+ 5 - 0
node_modules/@intlify/message-compiler/dist/message-compiler.esm-browser.prod.js


+ 1 - 0
node_modules/@intlify/message-compiler/dist/message-compiler.esm-bundler.js

@@ -0,0 +1 @@
+export * from '../dist/message-compiler.mjs'

+ 1645 - 0
node_modules/@intlify/message-compiler/dist/message-compiler.global.js

@@ -0,0 +1,1645 @@
+/*!
+  * message-compiler v9.13.1
+  * (c) 2024 kazuya kawaguchi
+  * Released under the MIT License.
+  */
+var IntlifyMessageCompiler = (function (exports) {
+  'use strict';
+
+  const LOCATION_STUB = {
+      start: { line: 1, column: 1, offset: 0 },
+      end: { line: 1, column: 1, offset: 0 }
+  };
+  function createPosition(line, column, offset) {
+      return { line, column, offset };
+  }
+  function createLocation(start, end, source) {
+      const loc = { start, end };
+      if (source != null) {
+          loc.source = source;
+      }
+      return loc;
+  }
+
+  /**
+   * Original Utilities
+   * written by kazuya kawaguchi
+   */
+  const RE_ARGS = /\{([0-9a-zA-Z]+)\}/g;
+  /* eslint-disable */
+  function format(message, ...args) {
+      if (args.length === 1 && isObject(args[0])) {
+          args = args[0];
+      }
+      if (!args || !args.hasOwnProperty) {
+          args = {};
+      }
+      return message.replace(RE_ARGS, (match, identifier) => {
+          return args.hasOwnProperty(identifier) ? args[identifier] : '';
+      });
+  }
+  const assign = Object.assign;
+  const isString = (val) => typeof val === 'string';
+  // eslint-disable-next-line @typescript-eslint/no-explicit-any
+  const isObject = (val) => val !== null && typeof val === 'object';
+  function join(items, separator = '') {
+      return items.reduce((str, item, index) => (index === 0 ? str + item : str + separator + item), '');
+  }
+
+  const CompileWarnCodes = {
+      USE_MODULO_SYNTAX: 1,
+      __EXTEND_POINT__: 2
+  };
+  /** @internal */
+  const warnMessages = {
+      [CompileWarnCodes.USE_MODULO_SYNTAX]: `Use modulo before '{{0}}'.`
+  };
+  function createCompileWarn(code, loc, ...args) {
+      const msg = format(warnMessages[code] || '', ...(args || [])) ;
+      const message = { message: String(msg), code };
+      if (loc) {
+          message.location = loc;
+      }
+      return message;
+  }
+
+  const CompileErrorCodes = {
+      // tokenizer error codes
+      EXPECTED_TOKEN: 1,
+      INVALID_TOKEN_IN_PLACEHOLDER: 2,
+      UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER: 3,
+      UNKNOWN_ESCAPE_SEQUENCE: 4,
+      INVALID_UNICODE_ESCAPE_SEQUENCE: 5,
+      UNBALANCED_CLOSING_BRACE: 6,
+      UNTERMINATED_CLOSING_BRACE: 7,
+      EMPTY_PLACEHOLDER: 8,
+      NOT_ALLOW_NEST_PLACEHOLDER: 9,
+      INVALID_LINKED_FORMAT: 10,
+      // parser error codes
+      MUST_HAVE_MESSAGES_IN_PLURAL: 11,
+      UNEXPECTED_EMPTY_LINKED_MODIFIER: 12,
+      UNEXPECTED_EMPTY_LINKED_KEY: 13,
+      UNEXPECTED_LEXICAL_ANALYSIS: 14,
+      // generator error codes
+      UNHANDLED_CODEGEN_NODE_TYPE: 15,
+      // minifier error codes
+      UNHANDLED_MINIFIER_NODE_TYPE: 16,
+      // Special value for higher-order compilers to pick up the last code
+      // to avoid collision of error codes. This should always be kept as the last
+      // item.
+      __EXTEND_POINT__: 17
+  };
+  /** @internal */
+  const errorMessages = {
+      // tokenizer error messages
+      [CompileErrorCodes.EXPECTED_TOKEN]: `Expected token: '{0}'`,
+      [CompileErrorCodes.INVALID_TOKEN_IN_PLACEHOLDER]: `Invalid token in placeholder: '{0}'`,
+      [CompileErrorCodes.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER]: `Unterminated single quote in placeholder`,
+      [CompileErrorCodes.UNKNOWN_ESCAPE_SEQUENCE]: `Unknown escape sequence: \\{0}`,
+      [CompileErrorCodes.INVALID_UNICODE_ESCAPE_SEQUENCE]: `Invalid unicode escape sequence: {0}`,
+      [CompileErrorCodes.UNBALANCED_CLOSING_BRACE]: `Unbalanced closing brace`,
+      [CompileErrorCodes.UNTERMINATED_CLOSING_BRACE]: `Unterminated closing brace`,
+      [CompileErrorCodes.EMPTY_PLACEHOLDER]: `Empty placeholder`,
+      [CompileErrorCodes.NOT_ALLOW_NEST_PLACEHOLDER]: `Not allowed nest placeholder`,
+      [CompileErrorCodes.INVALID_LINKED_FORMAT]: `Invalid linked format`,
+      // parser error messages
+      [CompileErrorCodes.MUST_HAVE_MESSAGES_IN_PLURAL]: `Plural must have messages`,
+      [CompileErrorCodes.UNEXPECTED_EMPTY_LINKED_MODIFIER]: `Unexpected empty linked modifier`,
+      [CompileErrorCodes.UNEXPECTED_EMPTY_LINKED_KEY]: `Unexpected empty linked key`,
+      [CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS]: `Unexpected lexical analysis in token: '{0}'`,
+      // generator error messages
+      [CompileErrorCodes.UNHANDLED_CODEGEN_NODE_TYPE]: `unhandled codegen node type: '{0}'`,
+      // minimizer error messages
+      [CompileErrorCodes.UNHANDLED_MINIFIER_NODE_TYPE]: `unhandled mimifier node type: '{0}'`
+  };
+  function createCompileError(code, loc, options = {}) {
+      const { domain, messages, args } = options;
+      const msg = format((messages || errorMessages)[code] || '', ...(args || []))
+          ;
+      const error = new SyntaxError(String(msg));
+      error.code = code;
+      if (loc) {
+          error.location = loc;
+      }
+      error.domain = domain;
+      return error;
+  }
+  /** @internal */
+  function defaultOnError(error) {
+      throw error;
+  }
+
+  // eslint-disable-next-line no-useless-escape
+  const RE_HTML_TAG = /<\/?[\w\s="/.':;#-\/]+>/;
+  const detectHtmlTag = (source) => RE_HTML_TAG.test(source);
+
+  const CHAR_SP = ' ';
+  const CHAR_CR = '\r';
+  const CHAR_LF = '\n';
+  const CHAR_LS = String.fromCharCode(0x2028);
+  const CHAR_PS = String.fromCharCode(0x2029);
+  function createScanner(str) {
+      const _buf = str;
+      let _index = 0;
+      let _line = 1;
+      let _column = 1;
+      let _peekOffset = 0;
+      const isCRLF = (index) => _buf[index] === CHAR_CR && _buf[index + 1] === CHAR_LF;
+      const isLF = (index) => _buf[index] === CHAR_LF;
+      const isPS = (index) => _buf[index] === CHAR_PS;
+      const isLS = (index) => _buf[index] === CHAR_LS;
+      const isLineEnd = (index) => isCRLF(index) || isLF(index) || isPS(index) || isLS(index);
+      const index = () => _index;
+      const line = () => _line;
+      const column = () => _column;
+      const peekOffset = () => _peekOffset;
+      const charAt = (offset) => isCRLF(offset) || isPS(offset) || isLS(offset) ? CHAR_LF : _buf[offset];
+      const currentChar = () => charAt(_index);
+      const currentPeek = () => charAt(_index + _peekOffset);
+      function next() {
+          _peekOffset = 0;
+          if (isLineEnd(_index)) {
+              _line++;
+              _column = 0;
+          }
+          if (isCRLF(_index)) {
+              _index++;
+          }
+          _index++;
+          _column++;
+          return _buf[_index];
+      }
+      function peek() {
+          if (isCRLF(_index + _peekOffset)) {
+              _peekOffset++;
+          }
+          _peekOffset++;
+          return _buf[_index + _peekOffset];
+      }
+      function reset() {
+          _index = 0;
+          _line = 1;
+          _column = 1;
+          _peekOffset = 0;
+      }
+      function resetPeek(offset = 0) {
+          _peekOffset = offset;
+      }
+      function skipToPeek() {
+          const target = _index + _peekOffset;
+          // eslint-disable-next-line no-unmodified-loop-condition
+          while (target !== _index) {
+              next();
+          }
+          _peekOffset = 0;
+      }
+      return {
+          index,
+          line,
+          column,
+          peekOffset,
+          charAt,
+          currentChar,
+          currentPeek,
+          next,
+          peek,
+          reset,
+          resetPeek,
+          skipToPeek
+      };
+  }
+
+  const EOF = undefined;
+  const DOT = '.';
+  const LITERAL_DELIMITER = "'";
+  const ERROR_DOMAIN$3 = 'tokenizer';
+  function createTokenizer(source, options = {}) {
+      const location = options.location !== false;
+      const _scnr = createScanner(source);
+      const currentOffset = () => _scnr.index();
+      const currentPosition = () => createPosition(_scnr.line(), _scnr.column(), _scnr.index());
+      const _initLoc = currentPosition();
+      const _initOffset = currentOffset();
+      const _context = {
+          currentType: 14 /* TokenTypes.EOF */,
+          offset: _initOffset,
+          startLoc: _initLoc,
+          endLoc: _initLoc,
+          lastType: 14 /* TokenTypes.EOF */,
+          lastOffset: _initOffset,
+          lastStartLoc: _initLoc,
+          lastEndLoc: _initLoc,
+          braceNest: 0,
+          inLinked: false,
+          text: ''
+      };
+      const context = () => _context;
+      const { onError } = options;
+      function emitError(code, pos, offset, ...args) {
+          const ctx = context();
+          pos.column += offset;
+          pos.offset += offset;
+          if (onError) {
+              const loc = location ? createLocation(ctx.startLoc, pos) : null;
+              const err = createCompileError(code, loc, {
+                  domain: ERROR_DOMAIN$3,
+                  args
+              });
+              onError(err);
+          }
+      }
+      function getToken(context, type, value) {
+          context.endLoc = currentPosition();
+          context.currentType = type;
+          const token = { type };
+          if (location) {
+              token.loc = createLocation(context.startLoc, context.endLoc);
+          }
+          if (value != null) {
+              token.value = value;
+          }
+          return token;
+      }
+      const getEndToken = (context) => getToken(context, 14 /* TokenTypes.EOF */);
+      function eat(scnr, ch) {
+          if (scnr.currentChar() === ch) {
+              scnr.next();
+              return ch;
+          }
+          else {
+              emitError(CompileErrorCodes.EXPECTED_TOKEN, currentPosition(), 0, ch);
+              return '';
+          }
+      }
+      function peekSpaces(scnr) {
+          let buf = '';
+          while (scnr.currentPeek() === CHAR_SP || scnr.currentPeek() === CHAR_LF) {
+              buf += scnr.currentPeek();
+              scnr.peek();
+          }
+          return buf;
+      }
+      function skipSpaces(scnr) {
+          const buf = peekSpaces(scnr);
+          scnr.skipToPeek();
+          return buf;
+      }
+      function isIdentifierStart(ch) {
+          if (ch === EOF) {
+              return false;
+          }
+          const cc = ch.charCodeAt(0);
+          return ((cc >= 97 && cc <= 122) || // a-z
+              (cc >= 65 && cc <= 90) || // A-Z
+              cc === 95 // _
+          );
+      }
+      function isNumberStart(ch) {
+          if (ch === EOF) {
+              return false;
+          }
+          const cc = ch.charCodeAt(0);
+          return cc >= 48 && cc <= 57; // 0-9
+      }
+      function isNamedIdentifierStart(scnr, context) {
+          const { currentType } = context;
+          if (currentType !== 2 /* TokenTypes.BraceLeft */) {
+              return false;
+          }
+          peekSpaces(scnr);
+          const ret = isIdentifierStart(scnr.currentPeek());
+          scnr.resetPeek();
+          return ret;
+      }
+      function isListIdentifierStart(scnr, context) {
+          const { currentType } = context;
+          if (currentType !== 2 /* TokenTypes.BraceLeft */) {
+              return false;
+          }
+          peekSpaces(scnr);
+          const ch = scnr.currentPeek() === '-' ? scnr.peek() : scnr.currentPeek();
+          const ret = isNumberStart(ch);
+          scnr.resetPeek();
+          return ret;
+      }
+      function isLiteralStart(scnr, context) {
+          const { currentType } = context;
+          if (currentType !== 2 /* TokenTypes.BraceLeft */) {
+              return false;
+          }
+          peekSpaces(scnr);
+          const ret = scnr.currentPeek() === LITERAL_DELIMITER;
+          scnr.resetPeek();
+          return ret;
+      }
+      function isLinkedDotStart(scnr, context) {
+          const { currentType } = context;
+          if (currentType !== 8 /* TokenTypes.LinkedAlias */) {
+              return false;
+          }
+          peekSpaces(scnr);
+          const ret = scnr.currentPeek() === "." /* TokenChars.LinkedDot */;
+          scnr.resetPeek();
+          return ret;
+      }
+      function isLinkedModifierStart(scnr, context) {
+          const { currentType } = context;
+          if (currentType !== 9 /* TokenTypes.LinkedDot */) {
+              return false;
+          }
+          peekSpaces(scnr);
+          const ret = isIdentifierStart(scnr.currentPeek());
+          scnr.resetPeek();
+          return ret;
+      }
+      function isLinkedDelimiterStart(scnr, context) {
+          const { currentType } = context;
+          if (!(currentType === 8 /* TokenTypes.LinkedAlias */ ||
+              currentType === 12 /* TokenTypes.LinkedModifier */)) {
+              return false;
+          }
+          peekSpaces(scnr);
+          const ret = scnr.currentPeek() === ":" /* TokenChars.LinkedDelimiter */;
+          scnr.resetPeek();
+          return ret;
+      }
+      function isLinkedReferStart(scnr, context) {
+          const { currentType } = context;
+          if (currentType !== 10 /* TokenTypes.LinkedDelimiter */) {
+              return false;
+          }
+          const fn = () => {
+              const ch = scnr.currentPeek();
+              if (ch === "{" /* TokenChars.BraceLeft */) {
+                  return isIdentifierStart(scnr.peek());
+              }
+              else if (ch === "@" /* TokenChars.LinkedAlias */ ||
+                  ch === "%" /* TokenChars.Modulo */ ||
+                  ch === "|" /* TokenChars.Pipe */ ||
+                  ch === ":" /* TokenChars.LinkedDelimiter */ ||
+                  ch === "." /* TokenChars.LinkedDot */ ||
+                  ch === CHAR_SP ||
+                  !ch) {
+                  return false;
+              }
+              else if (ch === CHAR_LF) {
+                  scnr.peek();
+                  return fn();
+              }
+              else {
+                  // other characters
+                  return isTextStart(scnr, false);
+              }
+          };
+          const ret = fn();
+          scnr.resetPeek();
+          return ret;
+      }
+      function isPluralStart(scnr) {
+          peekSpaces(scnr);
+          const ret = scnr.currentPeek() === "|" /* TokenChars.Pipe */;
+          scnr.resetPeek();
+          return ret;
+      }
+      function detectModuloStart(scnr) {
+          const spaces = peekSpaces(scnr);
+          const ret = scnr.currentPeek() === "%" /* TokenChars.Modulo */ &&
+              scnr.peek() === "{" /* TokenChars.BraceLeft */;
+          scnr.resetPeek();
+          return {
+              isModulo: ret,
+              hasSpace: spaces.length > 0
+          };
+      }
+      function isTextStart(scnr, reset = true) {
+          const fn = (hasSpace = false, prev = '', detectModulo = false) => {
+              const ch = scnr.currentPeek();
+              if (ch === "{" /* TokenChars.BraceLeft */) {
+                  return prev === "%" /* TokenChars.Modulo */ ? false : hasSpace;
+              }
+              else if (ch === "@" /* TokenChars.LinkedAlias */ || !ch) {
+                  return prev === "%" /* TokenChars.Modulo */ ? true : hasSpace;
+              }
+              else if (ch === "%" /* TokenChars.Modulo */) {
+                  scnr.peek();
+                  return fn(hasSpace, "%" /* TokenChars.Modulo */, true);
+              }
+              else if (ch === "|" /* TokenChars.Pipe */) {
+                  return prev === "%" /* TokenChars.Modulo */ || detectModulo
+                      ? true
+                      : !(prev === CHAR_SP || prev === CHAR_LF);
+              }
+              else if (ch === CHAR_SP) {
+                  scnr.peek();
+                  return fn(true, CHAR_SP, detectModulo);
+              }
+              else if (ch === CHAR_LF) {
+                  scnr.peek();
+                  return fn(true, CHAR_LF, detectModulo);
+              }
+              else {
+                  return true;
+              }
+          };
+          const ret = fn();
+          reset && scnr.resetPeek();
+          return ret;
+      }
+      function takeChar(scnr, fn) {
+          const ch = scnr.currentChar();
+          if (ch === EOF) {
+              return EOF;
+          }
+          if (fn(ch)) {
+              scnr.next();
+              return ch;
+          }
+          return null;
+      }
+      function isIdentifier(ch) {
+          const cc = ch.charCodeAt(0);
+          return ((cc >= 97 && cc <= 122) || // a-z
+              (cc >= 65 && cc <= 90) || // A-Z
+              (cc >= 48 && cc <= 57) || // 0-9
+              cc === 95 || // _
+              cc === 36 // $
+          );
+      }
+      function takeIdentifierChar(scnr) {
+          return takeChar(scnr, isIdentifier);
+      }
+      function isNamedIdentifier(ch) {
+          const cc = ch.charCodeAt(0);
+          return ((cc >= 97 && cc <= 122) || // a-z
+              (cc >= 65 && cc <= 90) || // A-Z
+              (cc >= 48 && cc <= 57) || // 0-9
+              cc === 95 || // _
+              cc === 36 || // $
+              cc === 45 // -
+          );
+      }
+      function takeNamedIdentifierChar(scnr) {
+          return takeChar(scnr, isNamedIdentifier);
+      }
+      function isDigit(ch) {
+          const cc = ch.charCodeAt(0);
+          return cc >= 48 && cc <= 57; // 0-9
+      }
+      function takeDigit(scnr) {
+          return takeChar(scnr, isDigit);
+      }
+      function isHexDigit(ch) {
+          const cc = ch.charCodeAt(0);
+          return ((cc >= 48 && cc <= 57) || // 0-9
+              (cc >= 65 && cc <= 70) || // A-F
+              (cc >= 97 && cc <= 102)); // a-f
+      }
+      function takeHexDigit(scnr) {
+          return takeChar(scnr, isHexDigit);
+      }
+      function getDigits(scnr) {
+          let ch = '';
+          let num = '';
+          while ((ch = takeDigit(scnr))) {
+              num += ch;
+          }
+          return num;
+      }
+      function readModulo(scnr) {
+          skipSpaces(scnr);
+          const ch = scnr.currentChar();
+          if (ch !== "%" /* TokenChars.Modulo */) {
+              emitError(CompileErrorCodes.EXPECTED_TOKEN, currentPosition(), 0, ch);
+          }
+          scnr.next();
+          return "%" /* TokenChars.Modulo */;
+      }
+      function readText(scnr) {
+          let buf = '';
+          // eslint-disable-next-line no-constant-condition
+          while (true) {
+              const ch = scnr.currentChar();
+              if (ch === "{" /* TokenChars.BraceLeft */ ||
+                  ch === "}" /* TokenChars.BraceRight */ ||
+                  ch === "@" /* TokenChars.LinkedAlias */ ||
+                  ch === "|" /* TokenChars.Pipe */ ||
+                  !ch) {
+                  break;
+              }
+              else if (ch === "%" /* TokenChars.Modulo */) {
+                  if (isTextStart(scnr)) {
+                      buf += ch;
+                      scnr.next();
+                  }
+                  else {
+                      break;
+                  }
+              }
+              else if (ch === CHAR_SP || ch === CHAR_LF) {
+                  if (isTextStart(scnr)) {
+                      buf += ch;
+                      scnr.next();
+                  }
+                  else if (isPluralStart(scnr)) {
+                      break;
+                  }
+                  else {
+                      buf += ch;
+                      scnr.next();
+                  }
+              }
+              else {
+                  buf += ch;
+                  scnr.next();
+              }
+          }
+          return buf;
+      }
+      function readNamedIdentifier(scnr) {
+          skipSpaces(scnr);
+          let ch = '';
+          let name = '';
+          while ((ch = takeNamedIdentifierChar(scnr))) {
+              name += ch;
+          }
+          if (scnr.currentChar() === EOF) {
+              emitError(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE, currentPosition(), 0);
+          }
+          return name;
+      }
+      function readListIdentifier(scnr) {
+          skipSpaces(scnr);
+          let value = '';
+          if (scnr.currentChar() === '-') {
+              scnr.next();
+              value += `-${getDigits(scnr)}`;
+          }
+          else {
+              value += getDigits(scnr);
+          }
+          if (scnr.currentChar() === EOF) {
+              emitError(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE, currentPosition(), 0);
+          }
+          return value;
+      }
+      function isLiteral(ch) {
+          return ch !== LITERAL_DELIMITER && ch !== CHAR_LF;
+      }
+      function readLiteral(scnr) {
+          skipSpaces(scnr);
+          // eslint-disable-next-line no-useless-escape
+          eat(scnr, `\'`);
+          let ch = '';
+          let literal = '';
+          while ((ch = takeChar(scnr, isLiteral))) {
+              if (ch === '\\') {
+                  literal += readEscapeSequence(scnr);
+              }
+              else {
+                  literal += ch;
+              }
+          }
+          const current = scnr.currentChar();
+          if (current === CHAR_LF || current === EOF) {
+              emitError(CompileErrorCodes.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER, currentPosition(), 0);
+              // TODO: Is it correct really?
+              if (current === CHAR_LF) {
+                  scnr.next();
+                  // eslint-disable-next-line no-useless-escape
+                  eat(scnr, `\'`);
+              }
+              return literal;
+          }
+          // eslint-disable-next-line no-useless-escape
+          eat(scnr, `\'`);
+          return literal;
+      }
+      function readEscapeSequence(scnr) {
+          const ch = scnr.currentChar();
+          switch (ch) {
+              case '\\':
+              case `\'`: // eslint-disable-line no-useless-escape
+                  scnr.next();
+                  return `\\${ch}`;
+              case 'u':
+                  return readUnicodeEscapeSequence(scnr, ch, 4);
+              case 'U':
+                  return readUnicodeEscapeSequence(scnr, ch, 6);
+              default:
+                  emitError(CompileErrorCodes.UNKNOWN_ESCAPE_SEQUENCE, currentPosition(), 0, ch);
+                  return '';
+          }
+      }
+      function readUnicodeEscapeSequence(scnr, unicode, digits) {
+          eat(scnr, unicode);
+          let sequence = '';
+          for (let i = 0; i < digits; i++) {
+              const ch = takeHexDigit(scnr);
+              if (!ch) {
+                  emitError(CompileErrorCodes.INVALID_UNICODE_ESCAPE_SEQUENCE, currentPosition(), 0, `\\${unicode}${sequence}${scnr.currentChar()}`);
+                  break;
+              }
+              sequence += ch;
+          }
+          return `\\${unicode}${sequence}`;
+      }
+      function isInvalidIdentifier(ch) {
+          return (ch !== "{" /* TokenChars.BraceLeft */ &&
+              ch !== "}" /* TokenChars.BraceRight */ &&
+              ch !== CHAR_SP &&
+              ch !== CHAR_LF);
+      }
+      function readInvalidIdentifier(scnr) {
+          skipSpaces(scnr);
+          let ch = '';
+          let identifiers = '';
+          while ((ch = takeChar(scnr, isInvalidIdentifier))) {
+              identifiers += ch;
+          }
+          return identifiers;
+      }
+      function readLinkedModifier(scnr) {
+          let ch = '';
+          let name = '';
+          while ((ch = takeIdentifierChar(scnr))) {
+              name += ch;
+          }
+          return name;
+      }
+      function readLinkedRefer(scnr) {
+          const fn = (buf) => {
+              const ch = scnr.currentChar();
+              if (ch === "{" /* TokenChars.BraceLeft */ ||
+                  ch === "%" /* TokenChars.Modulo */ ||
+                  ch === "@" /* TokenChars.LinkedAlias */ ||
+                  ch === "|" /* TokenChars.Pipe */ ||
+                  ch === "(" /* TokenChars.ParenLeft */ ||
+                  ch === ")" /* TokenChars.ParenRight */ ||
+                  !ch) {
+                  return buf;
+              }
+              else if (ch === CHAR_SP) {
+                  return buf;
+              }
+              else if (ch === CHAR_LF || ch === DOT) {
+                  buf += ch;
+                  scnr.next();
+                  return fn(buf);
+              }
+              else {
+                  buf += ch;
+                  scnr.next();
+                  return fn(buf);
+              }
+          };
+          return fn('');
+      }
+      function readPlural(scnr) {
+          skipSpaces(scnr);
+          const plural = eat(scnr, "|" /* TokenChars.Pipe */);
+          skipSpaces(scnr);
+          return plural;
+      }
+      // TODO: We need refactoring of token parsing ...
+      function readTokenInPlaceholder(scnr, context) {
+          let token = null;
+          const ch = scnr.currentChar();
+          switch (ch) {
+              case "{" /* TokenChars.BraceLeft */:
+                  if (context.braceNest >= 1) {
+                      emitError(CompileErrorCodes.NOT_ALLOW_NEST_PLACEHOLDER, currentPosition(), 0);
+                  }
+                  scnr.next();
+                  token = getToken(context, 2 /* TokenTypes.BraceLeft */, "{" /* TokenChars.BraceLeft */);
+                  skipSpaces(scnr);
+                  context.braceNest++;
+                  return token;
+              case "}" /* TokenChars.BraceRight */:
+                  if (context.braceNest > 0 &&
+                      context.currentType === 2 /* TokenTypes.BraceLeft */) {
+                      emitError(CompileErrorCodes.EMPTY_PLACEHOLDER, currentPosition(), 0);
+                  }
+                  scnr.next();
+                  token = getToken(context, 3 /* TokenTypes.BraceRight */, "}" /* TokenChars.BraceRight */);
+                  context.braceNest--;
+                  context.braceNest > 0 && skipSpaces(scnr);
+                  if (context.inLinked && context.braceNest === 0) {
+                      context.inLinked = false;
+                  }
+                  return token;
+              case "@" /* TokenChars.LinkedAlias */:
+                  if (context.braceNest > 0) {
+                      emitError(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE, currentPosition(), 0);
+                  }
+                  token = readTokenInLinked(scnr, context) || getEndToken(context);
+                  context.braceNest = 0;
+                  return token;
+              default: {
+                  let validNamedIdentifier = true;
+                  let validListIdentifier = true;
+                  let validLiteral = true;
+                  if (isPluralStart(scnr)) {
+                      if (context.braceNest > 0) {
+                          emitError(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE, currentPosition(), 0);
+                      }
+                      token = getToken(context, 1 /* TokenTypes.Pipe */, readPlural(scnr));
+                      // reset
+                      context.braceNest = 0;
+                      context.inLinked = false;
+                      return token;
+                  }
+                  if (context.braceNest > 0 &&
+                      (context.currentType === 5 /* TokenTypes.Named */ ||
+                          context.currentType === 6 /* TokenTypes.List */ ||
+                          context.currentType === 7 /* TokenTypes.Literal */)) {
+                      emitError(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE, currentPosition(), 0);
+                      context.braceNest = 0;
+                      return readToken(scnr, context);
+                  }
+                  if ((validNamedIdentifier = isNamedIdentifierStart(scnr, context))) {
+                      token = getToken(context, 5 /* TokenTypes.Named */, readNamedIdentifier(scnr));
+                      skipSpaces(scnr);
+                      return token;
+                  }
+                  if ((validListIdentifier = isListIdentifierStart(scnr, context))) {
+                      token = getToken(context, 6 /* TokenTypes.List */, readListIdentifier(scnr));
+                      skipSpaces(scnr);
+                      return token;
+                  }
+                  if ((validLiteral = isLiteralStart(scnr, context))) {
+                      token = getToken(context, 7 /* TokenTypes.Literal */, readLiteral(scnr));
+                      skipSpaces(scnr);
+                      return token;
+                  }
+                  if (!validNamedIdentifier && !validListIdentifier && !validLiteral) {
+                      // TODO: we should be re-designed invalid cases, when we will extend message syntax near the future ...
+                      token = getToken(context, 13 /* TokenTypes.InvalidPlace */, readInvalidIdentifier(scnr));
+                      emitError(CompileErrorCodes.INVALID_TOKEN_IN_PLACEHOLDER, currentPosition(), 0, token.value);
+                      skipSpaces(scnr);
+                      return token;
+                  }
+                  break;
+              }
+          }
+          return token;
+      }
+      // TODO: We need refactoring of token parsing ...
+      function readTokenInLinked(scnr, context) {
+          const { currentType } = context;
+          let token = null;
+          const ch = scnr.currentChar();
+          if ((currentType === 8 /* TokenTypes.LinkedAlias */ ||
+              currentType === 9 /* TokenTypes.LinkedDot */ ||
+              currentType === 12 /* TokenTypes.LinkedModifier */ ||
+              currentType === 10 /* TokenTypes.LinkedDelimiter */) &&
+              (ch === CHAR_LF || ch === CHAR_SP)) {
+              emitError(CompileErrorCodes.INVALID_LINKED_FORMAT, currentPosition(), 0);
+          }
+          switch (ch) {
+              case "@" /* TokenChars.LinkedAlias */:
+                  scnr.next();
+                  token = getToken(context, 8 /* TokenTypes.LinkedAlias */, "@" /* TokenChars.LinkedAlias */);
+                  context.inLinked = true;
+                  return token;
+              case "." /* TokenChars.LinkedDot */:
+                  skipSpaces(scnr);
+                  scnr.next();
+                  return getToken(context, 9 /* TokenTypes.LinkedDot */, "." /* TokenChars.LinkedDot */);
+              case ":" /* TokenChars.LinkedDelimiter */:
+                  skipSpaces(scnr);
+                  scnr.next();
+                  return getToken(context, 10 /* TokenTypes.LinkedDelimiter */, ":" /* TokenChars.LinkedDelimiter */);
+              default:
+                  if (isPluralStart(scnr)) {
+                      token = getToken(context, 1 /* TokenTypes.Pipe */, readPlural(scnr));
+                      // reset
+                      context.braceNest = 0;
+                      context.inLinked = false;
+                      return token;
+                  }
+                  if (isLinkedDotStart(scnr, context) ||
+                      isLinkedDelimiterStart(scnr, context)) {
+                      skipSpaces(scnr);
+                      return readTokenInLinked(scnr, context);
+                  }
+                  if (isLinkedModifierStart(scnr, context)) {
+                      skipSpaces(scnr);
+                      return getToken(context, 12 /* TokenTypes.LinkedModifier */, readLinkedModifier(scnr));
+                  }
+                  if (isLinkedReferStart(scnr, context)) {
+                      skipSpaces(scnr);
+                      if (ch === "{" /* TokenChars.BraceLeft */) {
+                          // scan the placeholder
+                          return readTokenInPlaceholder(scnr, context) || token;
+                      }
+                      else {
+                          return getToken(context, 11 /* TokenTypes.LinkedKey */, readLinkedRefer(scnr));
+                      }
+                  }
+                  if (currentType === 8 /* TokenTypes.LinkedAlias */) {
+                      emitError(CompileErrorCodes.INVALID_LINKED_FORMAT, currentPosition(), 0);
+                  }
+                  context.braceNest = 0;
+                  context.inLinked = false;
+                  return readToken(scnr, context);
+          }
+      }
+      // TODO: We need refactoring of token parsing ...
+      function readToken(scnr, context) {
+          let token = { type: 14 /* TokenTypes.EOF */ };
+          if (context.braceNest > 0) {
+              return readTokenInPlaceholder(scnr, context) || getEndToken(context);
+          }
+          if (context.inLinked) {
+              return readTokenInLinked(scnr, context) || getEndToken(context);
+          }
+          const ch = scnr.currentChar();
+          switch (ch) {
+              case "{" /* TokenChars.BraceLeft */:
+                  return readTokenInPlaceholder(scnr, context) || getEndToken(context);
+              case "}" /* TokenChars.BraceRight */:
+                  emitError(CompileErrorCodes.UNBALANCED_CLOSING_BRACE, currentPosition(), 0);
+                  scnr.next();
+                  return getToken(context, 3 /* TokenTypes.BraceRight */, "}" /* TokenChars.BraceRight */);
+              case "@" /* TokenChars.LinkedAlias */:
+                  return readTokenInLinked(scnr, context) || getEndToken(context);
+              default: {
+                  if (isPluralStart(scnr)) {
+                      token = getToken(context, 1 /* TokenTypes.Pipe */, readPlural(scnr));
+                      // reset
+                      context.braceNest = 0;
+                      context.inLinked = false;
+                      return token;
+                  }
+                  const { isModulo, hasSpace } = detectModuloStart(scnr);
+                  if (isModulo) {
+                      return hasSpace
+                          ? getToken(context, 0 /* TokenTypes.Text */, readText(scnr))
+                          : getToken(context, 4 /* TokenTypes.Modulo */, readModulo(scnr));
+                  }
+                  if (isTextStart(scnr)) {
+                      return getToken(context, 0 /* TokenTypes.Text */, readText(scnr));
+                  }
+                  break;
+              }
+          }
+          return token;
+      }
+      function nextToken() {
+          const { currentType, offset, startLoc, endLoc } = _context;
+          _context.lastType = currentType;
+          _context.lastOffset = offset;
+          _context.lastStartLoc = startLoc;
+          _context.lastEndLoc = endLoc;
+          _context.offset = currentOffset();
+          _context.startLoc = currentPosition();
+          if (_scnr.currentChar() === EOF) {
+              return getToken(_context, 14 /* TokenTypes.EOF */);
+          }
+          return readToken(_scnr, _context);
+      }
+      return {
+          nextToken,
+          currentOffset,
+          currentPosition,
+          context
+      };
+  }
+
+  const ERROR_DOMAIN$2 = 'parser';
+  // Backslash backslash, backslash quote, uHHHH, UHHHHHH.
+  const KNOWN_ESCAPES = /(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;
+  function fromEscapeSequence(match, codePoint4, codePoint6) {
+      switch (match) {
+          case `\\\\`:
+              return `\\`;
+          // eslint-disable-next-line no-useless-escape
+          case `\\\'`:
+              // eslint-disable-next-line no-useless-escape
+              return `\'`;
+          default: {
+              const codePoint = parseInt(codePoint4 || codePoint6, 16);
+              if (codePoint <= 0xd7ff || codePoint >= 0xe000) {
+                  return String.fromCodePoint(codePoint);
+              }
+              // invalid ...
+              // Replace them with U+FFFD REPLACEMENT CHARACTER.
+              return '�';
+          }
+      }
+  }
+  function createParser(options = {}) {
+      const location = options.location !== false;
+      const { onError, onWarn } = options;
+      function emitError(tokenzer, code, start, offset, ...args) {
+          const end = tokenzer.currentPosition();
+          end.offset += offset;
+          end.column += offset;
+          if (onError) {
+              const loc = location ? createLocation(start, end) : null;
+              const err = createCompileError(code, loc, {
+                  domain: ERROR_DOMAIN$2,
+                  args
+              });
+              onError(err);
+          }
+      }
+      function emitWarn(tokenzer, code, start, offset, ...args) {
+          const end = tokenzer.currentPosition();
+          end.offset += offset;
+          end.column += offset;
+          if (onWarn) {
+              const loc = location ? createLocation(start, end) : null;
+              onWarn(createCompileWarn(code, loc, args));
+          }
+      }
+      function startNode(type, offset, loc) {
+          const node = { type };
+          if (location) {
+              node.start = offset;
+              node.end = offset;
+              node.loc = { start: loc, end: loc };
+          }
+          return node;
+      }
+      function endNode(node, offset, pos, type) {
+          if (type) {
+              node.type = type;
+          }
+          if (location) {
+              node.end = offset;
+              if (node.loc) {
+                  node.loc.end = pos;
+              }
+          }
+      }
+      function parseText(tokenizer, value) {
+          const context = tokenizer.context();
+          const node = startNode(3 /* NodeTypes.Text */, context.offset, context.startLoc);
+          node.value = value;
+          endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());
+          return node;
+      }
+      function parseList(tokenizer, index) {
+          const context = tokenizer.context();
+          const { lastOffset: offset, lastStartLoc: loc } = context; // get brace left loc
+          const node = startNode(5 /* NodeTypes.List */, offset, loc);
+          node.index = parseInt(index, 10);
+          tokenizer.nextToken(); // skip brach right
+          endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());
+          return node;
+      }
+      function parseNamed(tokenizer, key, modulo) {
+          const context = tokenizer.context();
+          const { lastOffset: offset, lastStartLoc: loc } = context; // get brace left loc
+          const node = startNode(4 /* NodeTypes.Named */, offset, loc);
+          node.key = key;
+          if (modulo === true) {
+              node.modulo = true;
+          }
+          tokenizer.nextToken(); // skip brach right
+          endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());
+          return node;
+      }
+      function parseLiteral(tokenizer, value) {
+          const context = tokenizer.context();
+          const { lastOffset: offset, lastStartLoc: loc } = context; // get brace left loc
+          const node = startNode(9 /* NodeTypes.Literal */, offset, loc);
+          node.value = value.replace(KNOWN_ESCAPES, fromEscapeSequence);
+          tokenizer.nextToken(); // skip brach right
+          endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());
+          return node;
+      }
+      function parseLinkedModifier(tokenizer) {
+          const token = tokenizer.nextToken();
+          const context = tokenizer.context();
+          const { lastOffset: offset, lastStartLoc: loc } = context; // get linked dot loc
+          const node = startNode(8 /* NodeTypes.LinkedModifier */, offset, loc);
+          if (token.type !== 12 /* TokenTypes.LinkedModifier */) {
+              // empty modifier
+              emitError(tokenizer, CompileErrorCodes.UNEXPECTED_EMPTY_LINKED_MODIFIER, context.lastStartLoc, 0);
+              node.value = '';
+              endNode(node, offset, loc);
+              return {
+                  nextConsumeToken: token,
+                  node
+              };
+          }
+          // check token
+          if (token.value == null) {
+              emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));
+          }
+          node.value = token.value || '';
+          endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());
+          return {
+              node
+          };
+      }
+      function parseLinkedKey(tokenizer, value) {
+          const context = tokenizer.context();
+          const node = startNode(7 /* NodeTypes.LinkedKey */, context.offset, context.startLoc);
+          node.value = value;
+          endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());
+          return node;
+      }
+      function parseLinked(tokenizer) {
+          const context = tokenizer.context();
+          const linkedNode = startNode(6 /* NodeTypes.Linked */, context.offset, context.startLoc);
+          let token = tokenizer.nextToken();
+          if (token.type === 9 /* TokenTypes.LinkedDot */) {
+              const parsed = parseLinkedModifier(tokenizer);
+              linkedNode.modifier = parsed.node;
+              token = parsed.nextConsumeToken || tokenizer.nextToken();
+          }
+          // asset check token
+          if (token.type !== 10 /* TokenTypes.LinkedDelimiter */) {
+              emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));
+          }
+          token = tokenizer.nextToken();
+          // skip brace left
+          if (token.type === 2 /* TokenTypes.BraceLeft */) {
+              token = tokenizer.nextToken();
+          }
+          switch (token.type) {
+              case 11 /* TokenTypes.LinkedKey */:
+                  if (token.value == null) {
+                      emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));
+                  }
+                  linkedNode.key = parseLinkedKey(tokenizer, token.value || '');
+                  break;
+              case 5 /* TokenTypes.Named */:
+                  if (token.value == null) {
+                      emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));
+                  }
+                  linkedNode.key = parseNamed(tokenizer, token.value || '');
+                  break;
+              case 6 /* TokenTypes.List */:
+                  if (token.value == null) {
+                      emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));
+                  }
+                  linkedNode.key = parseList(tokenizer, token.value || '');
+                  break;
+              case 7 /* TokenTypes.Literal */:
+                  if (token.value == null) {
+                      emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));
+                  }
+                  linkedNode.key = parseLiteral(tokenizer, token.value || '');
+                  break;
+              default: {
+                  // empty key
+                  emitError(tokenizer, CompileErrorCodes.UNEXPECTED_EMPTY_LINKED_KEY, context.lastStartLoc, 0);
+                  const nextContext = tokenizer.context();
+                  const emptyLinkedKeyNode = startNode(7 /* NodeTypes.LinkedKey */, nextContext.offset, nextContext.startLoc);
+                  emptyLinkedKeyNode.value = '';
+                  endNode(emptyLinkedKeyNode, nextContext.offset, nextContext.startLoc);
+                  linkedNode.key = emptyLinkedKeyNode;
+                  endNode(linkedNode, nextContext.offset, nextContext.startLoc);
+                  return {
+                      nextConsumeToken: token,
+                      node: linkedNode
+                  };
+              }
+          }
+          endNode(linkedNode, tokenizer.currentOffset(), tokenizer.currentPosition());
+          return {
+              node: linkedNode
+          };
+      }
+      function parseMessage(tokenizer) {
+          const context = tokenizer.context();
+          const startOffset = context.currentType === 1 /* TokenTypes.Pipe */
+              ? tokenizer.currentOffset()
+              : context.offset;
+          const startLoc = context.currentType === 1 /* TokenTypes.Pipe */
+              ? context.endLoc
+              : context.startLoc;
+          const node = startNode(2 /* NodeTypes.Message */, startOffset, startLoc);
+          node.items = [];
+          let nextToken = null;
+          let modulo = null;
+          do {
+              const token = nextToken || tokenizer.nextToken();
+              nextToken = null;
+              switch (token.type) {
+                  case 0 /* TokenTypes.Text */:
+                      if (token.value == null) {
+                          emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));
+                      }
+                      node.items.push(parseText(tokenizer, token.value || ''));
+                      break;
+                  case 6 /* TokenTypes.List */:
+                      if (token.value == null) {
+                          emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));
+                      }
+                      node.items.push(parseList(tokenizer, token.value || ''));
+                      break;
+                  case 4 /* TokenTypes.Modulo */:
+                      modulo = true;
+                      break;
+                  case 5 /* TokenTypes.Named */:
+                      if (token.value == null) {
+                          emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));
+                      }
+                      node.items.push(parseNamed(tokenizer, token.value || '', !!modulo));
+                      if (modulo) {
+                          emitWarn(tokenizer, CompileWarnCodes.USE_MODULO_SYNTAX, context.lastStartLoc, 0, getTokenCaption(token));
+                          modulo = null;
+                      }
+                      break;
+                  case 7 /* TokenTypes.Literal */:
+                      if (token.value == null) {
+                          emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));
+                      }
+                      node.items.push(parseLiteral(tokenizer, token.value || ''));
+                      break;
+                  case 8 /* TokenTypes.LinkedAlias */: {
+                      const parsed = parseLinked(tokenizer);
+                      node.items.push(parsed.node);
+                      nextToken = parsed.nextConsumeToken || null;
+                      break;
+                  }
+              }
+          } while (context.currentType !== 14 /* TokenTypes.EOF */ &&
+              context.currentType !== 1 /* TokenTypes.Pipe */);
+          // adjust message node loc
+          const endOffset = context.currentType === 1 /* TokenTypes.Pipe */
+              ? context.lastOffset
+              : tokenizer.currentOffset();
+          const endLoc = context.currentType === 1 /* TokenTypes.Pipe */
+              ? context.lastEndLoc
+              : tokenizer.currentPosition();
+          endNode(node, endOffset, endLoc);
+          return node;
+      }
+      function parsePlural(tokenizer, offset, loc, msgNode) {
+          const context = tokenizer.context();
+          let hasEmptyMessage = msgNode.items.length === 0;
+          const node = startNode(1 /* NodeTypes.Plural */, offset, loc);
+          node.cases = [];
+          node.cases.push(msgNode);
+          do {
+              const msg = parseMessage(tokenizer);
+              if (!hasEmptyMessage) {
+                  hasEmptyMessage = msg.items.length === 0;
+              }
+              node.cases.push(msg);
+          } while (context.currentType !== 14 /* TokenTypes.EOF */);
+          if (hasEmptyMessage) {
+              emitError(tokenizer, CompileErrorCodes.MUST_HAVE_MESSAGES_IN_PLURAL, loc, 0);
+          }
+          endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());
+          return node;
+      }
+      function parseResource(tokenizer) {
+          const context = tokenizer.context();
+          const { offset, startLoc } = context;
+          const msgNode = parseMessage(tokenizer);
+          if (context.currentType === 14 /* TokenTypes.EOF */) {
+              return msgNode;
+          }
+          else {
+              return parsePlural(tokenizer, offset, startLoc, msgNode);
+          }
+      }
+      function parse(source) {
+          const tokenizer = createTokenizer(source, assign({}, options));
+          const context = tokenizer.context();
+          const node = startNode(0 /* NodeTypes.Resource */, context.offset, context.startLoc);
+          if (location && node.loc) {
+              node.loc.source = source;
+          }
+          node.body = parseResource(tokenizer);
+          if (options.onCacheKey) {
+              node.cacheKey = options.onCacheKey(source);
+          }
+          // assert whether achieved to EOF
+          if (context.currentType !== 14 /* TokenTypes.EOF */) {
+              emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, source[context.offset] || '');
+          }
+          endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());
+          return node;
+      }
+      return { parse };
+  }
+  function getTokenCaption(token) {
+      if (token.type === 14 /* TokenTypes.EOF */) {
+          return 'EOF';
+      }
+      const name = (token.value || '').replace(/\r?\n/gu, '\\n');
+      return name.length > 10 ? name.slice(0, 9) + '…' : name;
+  }
+
+  function createTransformer(ast, options = {} // eslint-disable-line
+  ) {
+      const _context = {
+          ast,
+          helpers: new Set()
+      };
+      const context = () => _context;
+      const helper = (name) => {
+          _context.helpers.add(name);
+          return name;
+      };
+      return { context, helper };
+  }
+  function traverseNodes(nodes, transformer) {
+      for (let i = 0; i < nodes.length; i++) {
+          traverseNode(nodes[i], transformer);
+      }
+  }
+  function traverseNode(node, transformer) {
+      // TODO: if we need pre-hook of transform, should be implemented to here
+      switch (node.type) {
+          case 1 /* NodeTypes.Plural */:
+              traverseNodes(node.cases, transformer);
+              transformer.helper("plural" /* HelperNameMap.PLURAL */);
+              break;
+          case 2 /* NodeTypes.Message */:
+              traverseNodes(node.items, transformer);
+              break;
+          case 6 /* NodeTypes.Linked */: {
+              const linked = node;
+              traverseNode(linked.key, transformer);
+              transformer.helper("linked" /* HelperNameMap.LINKED */);
+              transformer.helper("type" /* HelperNameMap.TYPE */);
+              break;
+          }
+          case 5 /* NodeTypes.List */:
+              transformer.helper("interpolate" /* HelperNameMap.INTERPOLATE */);
+              transformer.helper("list" /* HelperNameMap.LIST */);
+              break;
+          case 4 /* NodeTypes.Named */:
+              transformer.helper("interpolate" /* HelperNameMap.INTERPOLATE */);
+              transformer.helper("named" /* HelperNameMap.NAMED */);
+              break;
+      }
+      // TODO: if we need post-hook of transform, should be implemented to here
+  }
+  // transform AST
+  function transform(ast, options = {} // eslint-disable-line
+  ) {
+      const transformer = createTransformer(ast);
+      transformer.helper("normalize" /* HelperNameMap.NORMALIZE */);
+      // traverse
+      ast.body && traverseNode(ast.body, transformer);
+      // set meta information
+      const context = transformer.context();
+      ast.helpers = Array.from(context.helpers);
+  }
+
+  function optimize(ast) {
+      const body = ast.body;
+      if (body.type === 2 /* NodeTypes.Message */) {
+          optimizeMessageNode(body);
+      }
+      else {
+          body.cases.forEach(c => optimizeMessageNode(c));
+      }
+      return ast;
+  }
+  function optimizeMessageNode(message) {
+      if (message.items.length === 1) {
+          const item = message.items[0];
+          if (item.type === 3 /* NodeTypes.Text */ || item.type === 9 /* NodeTypes.Literal */) {
+              message.static = item.value;
+              delete item.value; // optimization for size
+          }
+      }
+      else {
+          const values = [];
+          for (let i = 0; i < message.items.length; i++) {
+              const item = message.items[i];
+              if (!(item.type === 3 /* NodeTypes.Text */ || item.type === 9 /* NodeTypes.Literal */)) {
+                  break;
+              }
+              if (item.value == null) {
+                  break;
+              }
+              values.push(item.value);
+          }
+          if (values.length === message.items.length) {
+              message.static = join(values);
+              for (let i = 0; i < message.items.length; i++) {
+                  const item = message.items[i];
+                  if (item.type === 3 /* NodeTypes.Text */ || item.type === 9 /* NodeTypes.Literal */) {
+                      delete item.value; // optimization for size
+                  }
+              }
+          }
+      }
+  }
+
+  const ERROR_DOMAIN$1 = 'minifier';
+  /* eslint-disable @typescript-eslint/no-explicit-any */
+  function minify(node) {
+      node.t = node.type;
+      switch (node.type) {
+          case 0 /* NodeTypes.Resource */: {
+              const resource = node;
+              minify(resource.body);
+              resource.b = resource.body;
+              delete resource.body;
+              break;
+          }
+          case 1 /* NodeTypes.Plural */: {
+              const plural = node;
+              const cases = plural.cases;
+              for (let i = 0; i < cases.length; i++) {
+                  minify(cases[i]);
+              }
+              plural.c = cases;
+              delete plural.cases;
+              break;
+          }
+          case 2 /* NodeTypes.Message */: {
+              const message = node;
+              const items = message.items;
+              for (let i = 0; i < items.length; i++) {
+                  minify(items[i]);
+              }
+              message.i = items;
+              delete message.items;
+              if (message.static) {
+                  message.s = message.static;
+                  delete message.static;
+              }
+              break;
+          }
+          case 3 /* NodeTypes.Text */:
+          case 9 /* NodeTypes.Literal */:
+          case 8 /* NodeTypes.LinkedModifier */:
+          case 7 /* NodeTypes.LinkedKey */: {
+              const valueNode = node;
+              if (valueNode.value) {
+                  valueNode.v = valueNode.value;
+                  delete valueNode.value;
+              }
+              break;
+          }
+          case 6 /* NodeTypes.Linked */: {
+              const linked = node;
+              minify(linked.key);
+              linked.k = linked.key;
+              delete linked.key;
+              if (linked.modifier) {
+                  minify(linked.modifier);
+                  linked.m = linked.modifier;
+                  delete linked.modifier;
+              }
+              break;
+          }
+          case 5 /* NodeTypes.List */: {
+              const list = node;
+              list.i = list.index;
+              delete list.index;
+              break;
+          }
+          case 4 /* NodeTypes.Named */: {
+              const named = node;
+              named.k = named.key;
+              delete named.key;
+              break;
+          }
+          default:
+              {
+                  throw createCompileError(CompileErrorCodes.UNHANDLED_MINIFIER_NODE_TYPE, null, {
+                      domain: ERROR_DOMAIN$1,
+                      args: [node.type]
+                  });
+              }
+      }
+      delete node.type;
+  }
+  /* eslint-enable @typescript-eslint/no-explicit-any */
+
+  // eslint-disable-next-line @typescript-eslint/triple-slash-reference
+  /// <reference types="source-map-js" />
+  const ERROR_DOMAIN = 'parser';
+  function createCodeGenerator(ast, options) {
+      const { sourceMap, filename, breakLineCode, needIndent: _needIndent } = options;
+      const location = options.location !== false;
+      const _context = {
+          filename,
+          code: '',
+          column: 1,
+          line: 1,
+          offset: 0,
+          map: undefined,
+          breakLineCode,
+          needIndent: _needIndent,
+          indentLevel: 0
+      };
+      if (location && ast.loc) {
+          _context.source = ast.loc.source;
+      }
+      const context = () => _context;
+      function push(code, node) {
+          _context.code += code;
+      }
+      function _newline(n, withBreakLine = true) {
+          const _breakLineCode = withBreakLine ? breakLineCode : '';
+          push(_needIndent ? _breakLineCode + `  `.repeat(n) : _breakLineCode);
+      }
+      function indent(withNewLine = true) {
+          const level = ++_context.indentLevel;
+          withNewLine && _newline(level);
+      }
+      function deindent(withNewLine = true) {
+          const level = --_context.indentLevel;
+          withNewLine && _newline(level);
+      }
+      function newline() {
+          _newline(_context.indentLevel);
+      }
+      const helper = (key) => `_${key}`;
+      const needIndent = () => _context.needIndent;
+      return {
+          context,
+          push,
+          indent,
+          deindent,
+          newline,
+          helper,
+          needIndent
+      };
+  }
+  function generateLinkedNode(generator, node) {
+      const { helper } = generator;
+      generator.push(`${helper("linked" /* HelperNameMap.LINKED */)}(`);
+      generateNode(generator, node.key);
+      if (node.modifier) {
+          generator.push(`, `);
+          generateNode(generator, node.modifier);
+          generator.push(`, _type`);
+      }
+      else {
+          generator.push(`, undefined, _type`);
+      }
+      generator.push(`)`);
+  }
+  function generateMessageNode(generator, node) {
+      const { helper, needIndent } = generator;
+      generator.push(`${helper("normalize" /* HelperNameMap.NORMALIZE */)}([`);
+      generator.indent(needIndent());
+      const length = node.items.length;
+      for (let i = 0; i < length; i++) {
+          generateNode(generator, node.items[i]);
+          if (i === length - 1) {
+              break;
+          }
+          generator.push(', ');
+      }
+      generator.deindent(needIndent());
+      generator.push('])');
+  }
+  function generatePluralNode(generator, node) {
+      const { helper, needIndent } = generator;
+      if (node.cases.length > 1) {
+          generator.push(`${helper("plural" /* HelperNameMap.PLURAL */)}([`);
+          generator.indent(needIndent());
+          const length = node.cases.length;
+          for (let i = 0; i < length; i++) {
+              generateNode(generator, node.cases[i]);
+              if (i === length - 1) {
+                  break;
+              }
+              generator.push(', ');
+          }
+          generator.deindent(needIndent());
+          generator.push(`])`);
+      }
+  }
+  function generateResource(generator, node) {
+      if (node.body) {
+          generateNode(generator, node.body);
+      }
+      else {
+          generator.push('null');
+      }
+  }
+  function generateNode(generator, node) {
+      const { helper } = generator;
+      switch (node.type) {
+          case 0 /* NodeTypes.Resource */:
+              generateResource(generator, node);
+              break;
+          case 1 /* NodeTypes.Plural */:
+              generatePluralNode(generator, node);
+              break;
+          case 2 /* NodeTypes.Message */:
+              generateMessageNode(generator, node);
+              break;
+          case 6 /* NodeTypes.Linked */:
+              generateLinkedNode(generator, node);
+              break;
+          case 8 /* NodeTypes.LinkedModifier */:
+              generator.push(JSON.stringify(node.value), node);
+              break;
+          case 7 /* NodeTypes.LinkedKey */:
+              generator.push(JSON.stringify(node.value), node);
+              break;
+          case 5 /* NodeTypes.List */:
+              generator.push(`${helper("interpolate" /* HelperNameMap.INTERPOLATE */)}(${helper("list" /* HelperNameMap.LIST */)}(${node.index}))`, node);
+              break;
+          case 4 /* NodeTypes.Named */:
+              generator.push(`${helper("interpolate" /* HelperNameMap.INTERPOLATE */)}(${helper("named" /* HelperNameMap.NAMED */)}(${JSON.stringify(node.key)}))`, node);
+              break;
+          case 9 /* NodeTypes.Literal */:
+              generator.push(JSON.stringify(node.value), node);
+              break;
+          case 3 /* NodeTypes.Text */:
+              generator.push(JSON.stringify(node.value), node);
+              break;
+          default:
+              {
+                  throw createCompileError(CompileErrorCodes.UNHANDLED_CODEGEN_NODE_TYPE, null, {
+                      domain: ERROR_DOMAIN,
+                      args: [node.type]
+                  });
+              }
+      }
+  }
+  // generate code from AST
+  const generate = (ast, options = {} // eslint-disable-line
+  ) => {
+      const mode = isString(options.mode) ? options.mode : 'normal';
+      const filename = isString(options.filename)
+          ? options.filename
+          : 'message.intl';
+      const sourceMap = !!options.sourceMap;
+      // prettier-ignore
+      const breakLineCode = options.breakLineCode != null
+          ? options.breakLineCode
+          : mode === 'arrow'
+              ? ';'
+              : '\n';
+      const needIndent = options.needIndent ? options.needIndent : mode !== 'arrow';
+      const helpers = ast.helpers || [];
+      const generator = createCodeGenerator(ast, {
+          mode,
+          filename,
+          sourceMap,
+          breakLineCode,
+          needIndent
+      });
+      generator.push(mode === 'normal' ? `function __msg__ (ctx) {` : `(ctx) => {`);
+      generator.indent(needIndent);
+      if (helpers.length > 0) {
+          generator.push(`const { ${join(helpers.map(s => `${s}: _${s}`), ', ')} } = ctx`);
+          generator.newline();
+      }
+      generator.push(`return `);
+      generateNode(generator, ast);
+      generator.deindent(needIndent);
+      generator.push(`}`);
+      delete ast.helpers;
+      const { code, map } = generator.context();
+      return {
+          ast,
+          code,
+          map: map ? map.toJSON() : undefined // eslint-disable-line @typescript-eslint/no-explicit-any
+      };
+  };
+
+  function baseCompile(source, options = {}) {
+      const assignedOptions = assign({}, options);
+      const jit = !!assignedOptions.jit;
+      const enalbeMinify = !!assignedOptions.minify;
+      const enambeOptimize = assignedOptions.optimize == null ? true : assignedOptions.optimize;
+      // parse source codes
+      const parser = createParser(assignedOptions);
+      const ast = parser.parse(source);
+      if (!jit) {
+          // transform ASTs
+          transform(ast, assignedOptions);
+          // generate javascript codes
+          return generate(ast, assignedOptions);
+      }
+      else {
+          // optimize ASTs
+          enambeOptimize && optimize(ast);
+          // minimize ASTs
+          enalbeMinify && minify(ast);
+          // In JIT mode, no ast transform, no code generation.
+          return { ast, code: '' };
+      }
+  }
+
+  exports.CompileErrorCodes = CompileErrorCodes;
+  exports.CompileWarnCodes = CompileWarnCodes;
+  exports.ERROR_DOMAIN = ERROR_DOMAIN$2;
+  exports.LOCATION_STUB = LOCATION_STUB;
+  exports.baseCompile = baseCompile;
+  exports.createCompileError = createCompileError;
+  exports.createCompileWarn = createCompileWarn;
+  exports.createLocation = createLocation;
+  exports.createParser = createParser;
+  exports.createPosition = createPosition;
+  exports.defaultOnError = defaultOnError;
+  exports.detectHtmlTag = detectHtmlTag;
+  exports.errorMessages = errorMessages;
+  exports.warnMessages = warnMessages;
+
+  return exports;
+
+})({});

Fichier diff supprimé car celui-ci est trop grand
+ 5 - 0
node_modules/@intlify/message-compiler/dist/message-compiler.global.prod.js


+ 1603 - 0
node_modules/@intlify/message-compiler/dist/message-compiler.mjs

@@ -0,0 +1,1603 @@
+/*!
+  * message-compiler v9.13.1
+  * (c) 2024 kazuya kawaguchi
+  * Released under the MIT License.
+  */
+import { format, assign, join, isString } from '@intlify/shared';
+
+const LOCATION_STUB = {
+    start: { line: 1, column: 1, offset: 0 },
+    end: { line: 1, column: 1, offset: 0 }
+};
+function createPosition(line, column, offset) {
+    return { line, column, offset };
+}
+function createLocation(start, end, source) {
+    const loc = { start, end };
+    if (source != null) {
+        loc.source = source;
+    }
+    return loc;
+}
+
+const CompileWarnCodes = {
+    USE_MODULO_SYNTAX: 1,
+    __EXTEND_POINT__: 2
+};
+/** @internal */
+const warnMessages = {
+    [CompileWarnCodes.USE_MODULO_SYNTAX]: `Use modulo before '{{0}}'.`
+};
+function createCompileWarn(code, loc, ...args) {
+    const msg = (process.env.NODE_ENV !== 'production') ? format(warnMessages[code] || '', ...(args || [])) : code;
+    const message = { message: String(msg), code };
+    if (loc) {
+        message.location = loc;
+    }
+    return message;
+}
+
+const CompileErrorCodes = {
+    // tokenizer error codes
+    EXPECTED_TOKEN: 1,
+    INVALID_TOKEN_IN_PLACEHOLDER: 2,
+    UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER: 3,
+    UNKNOWN_ESCAPE_SEQUENCE: 4,
+    INVALID_UNICODE_ESCAPE_SEQUENCE: 5,
+    UNBALANCED_CLOSING_BRACE: 6,
+    UNTERMINATED_CLOSING_BRACE: 7,
+    EMPTY_PLACEHOLDER: 8,
+    NOT_ALLOW_NEST_PLACEHOLDER: 9,
+    INVALID_LINKED_FORMAT: 10,
+    // parser error codes
+    MUST_HAVE_MESSAGES_IN_PLURAL: 11,
+    UNEXPECTED_EMPTY_LINKED_MODIFIER: 12,
+    UNEXPECTED_EMPTY_LINKED_KEY: 13,
+    UNEXPECTED_LEXICAL_ANALYSIS: 14,
+    // generator error codes
+    UNHANDLED_CODEGEN_NODE_TYPE: 15,
+    // minifier error codes
+    UNHANDLED_MINIFIER_NODE_TYPE: 16,
+    // Special value for higher-order compilers to pick up the last code
+    // to avoid collision of error codes. This should always be kept as the last
+    // item.
+    __EXTEND_POINT__: 17
+};
+/** @internal */
+const errorMessages = {
+    // tokenizer error messages
+    [CompileErrorCodes.EXPECTED_TOKEN]: `Expected token: '{0}'`,
+    [CompileErrorCodes.INVALID_TOKEN_IN_PLACEHOLDER]: `Invalid token in placeholder: '{0}'`,
+    [CompileErrorCodes.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER]: `Unterminated single quote in placeholder`,
+    [CompileErrorCodes.UNKNOWN_ESCAPE_SEQUENCE]: `Unknown escape sequence: \\{0}`,
+    [CompileErrorCodes.INVALID_UNICODE_ESCAPE_SEQUENCE]: `Invalid unicode escape sequence: {0}`,
+    [CompileErrorCodes.UNBALANCED_CLOSING_BRACE]: `Unbalanced closing brace`,
+    [CompileErrorCodes.UNTERMINATED_CLOSING_BRACE]: `Unterminated closing brace`,
+    [CompileErrorCodes.EMPTY_PLACEHOLDER]: `Empty placeholder`,
+    [CompileErrorCodes.NOT_ALLOW_NEST_PLACEHOLDER]: `Not allowed nest placeholder`,
+    [CompileErrorCodes.INVALID_LINKED_FORMAT]: `Invalid linked format`,
+    // parser error messages
+    [CompileErrorCodes.MUST_HAVE_MESSAGES_IN_PLURAL]: `Plural must have messages`,
+    [CompileErrorCodes.UNEXPECTED_EMPTY_LINKED_MODIFIER]: `Unexpected empty linked modifier`,
+    [CompileErrorCodes.UNEXPECTED_EMPTY_LINKED_KEY]: `Unexpected empty linked key`,
+    [CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS]: `Unexpected lexical analysis in token: '{0}'`,
+    // generator error messages
+    [CompileErrorCodes.UNHANDLED_CODEGEN_NODE_TYPE]: `unhandled codegen node type: '{0}'`,
+    // minimizer error messages
+    [CompileErrorCodes.UNHANDLED_MINIFIER_NODE_TYPE]: `unhandled mimifier node type: '{0}'`
+};
+function createCompileError(code, loc, options = {}) {
+    const { domain, messages, args } = options;
+    const msg = (process.env.NODE_ENV !== 'production')
+        ? format((messages || errorMessages)[code] || '', ...(args || []))
+        : code;
+    const error = new SyntaxError(String(msg));
+    error.code = code;
+    if (loc) {
+        error.location = loc;
+    }
+    error.domain = domain;
+    return error;
+}
+/** @internal */
+function defaultOnError(error) {
+    throw error;
+}
+
+// eslint-disable-next-line no-useless-escape
+const RE_HTML_TAG = /<\/?[\w\s="/.':;#-\/]+>/;
+const detectHtmlTag = (source) => RE_HTML_TAG.test(source);
+
+const CHAR_SP = ' ';
+const CHAR_CR = '\r';
+const CHAR_LF = '\n';
+const CHAR_LS = String.fromCharCode(0x2028);
+const CHAR_PS = String.fromCharCode(0x2029);
+function createScanner(str) {
+    const _buf = str;
+    let _index = 0;
+    let _line = 1;
+    let _column = 1;
+    let _peekOffset = 0;
+    const isCRLF = (index) => _buf[index] === CHAR_CR && _buf[index + 1] === CHAR_LF;
+    const isLF = (index) => _buf[index] === CHAR_LF;
+    const isPS = (index) => _buf[index] === CHAR_PS;
+    const isLS = (index) => _buf[index] === CHAR_LS;
+    const isLineEnd = (index) => isCRLF(index) || isLF(index) || isPS(index) || isLS(index);
+    const index = () => _index;
+    const line = () => _line;
+    const column = () => _column;
+    const peekOffset = () => _peekOffset;
+    const charAt = (offset) => isCRLF(offset) || isPS(offset) || isLS(offset) ? CHAR_LF : _buf[offset];
+    const currentChar = () => charAt(_index);
+    const currentPeek = () => charAt(_index + _peekOffset);
+    function next() {
+        _peekOffset = 0;
+        if (isLineEnd(_index)) {
+            _line++;
+            _column = 0;
+        }
+        if (isCRLF(_index)) {
+            _index++;
+        }
+        _index++;
+        _column++;
+        return _buf[_index];
+    }
+    function peek() {
+        if (isCRLF(_index + _peekOffset)) {
+            _peekOffset++;
+        }
+        _peekOffset++;
+        return _buf[_index + _peekOffset];
+    }
+    function reset() {
+        _index = 0;
+        _line = 1;
+        _column = 1;
+        _peekOffset = 0;
+    }
+    function resetPeek(offset = 0) {
+        _peekOffset = offset;
+    }
+    function skipToPeek() {
+        const target = _index + _peekOffset;
+        // eslint-disable-next-line no-unmodified-loop-condition
+        while (target !== _index) {
+            next();
+        }
+        _peekOffset = 0;
+    }
+    return {
+        index,
+        line,
+        column,
+        peekOffset,
+        charAt,
+        currentChar,
+        currentPeek,
+        next,
+        peek,
+        reset,
+        resetPeek,
+        skipToPeek
+    };
+}
+
+const EOF = undefined;
+const DOT = '.';
+const LITERAL_DELIMITER = "'";
+const ERROR_DOMAIN$3 = 'tokenizer';
+function createTokenizer(source, options = {}) {
+    const location = options.location !== false;
+    const _scnr = createScanner(source);
+    const currentOffset = () => _scnr.index();
+    const currentPosition = () => createPosition(_scnr.line(), _scnr.column(), _scnr.index());
+    const _initLoc = currentPosition();
+    const _initOffset = currentOffset();
+    const _context = {
+        currentType: 14 /* TokenTypes.EOF */,
+        offset: _initOffset,
+        startLoc: _initLoc,
+        endLoc: _initLoc,
+        lastType: 14 /* TokenTypes.EOF */,
+        lastOffset: _initOffset,
+        lastStartLoc: _initLoc,
+        lastEndLoc: _initLoc,
+        braceNest: 0,
+        inLinked: false,
+        text: ''
+    };
+    const context = () => _context;
+    const { onError } = options;
+    function emitError(code, pos, offset, ...args) {
+        const ctx = context();
+        pos.column += offset;
+        pos.offset += offset;
+        if (onError) {
+            const loc = location ? createLocation(ctx.startLoc, pos) : null;
+            const err = createCompileError(code, loc, {
+                domain: ERROR_DOMAIN$3,
+                args
+            });
+            onError(err);
+        }
+    }
+    function getToken(context, type, value) {
+        context.endLoc = currentPosition();
+        context.currentType = type;
+        const token = { type };
+        if (location) {
+            token.loc = createLocation(context.startLoc, context.endLoc);
+        }
+        if (value != null) {
+            token.value = value;
+        }
+        return token;
+    }
+    const getEndToken = (context) => getToken(context, 14 /* TokenTypes.EOF */);
+    function eat(scnr, ch) {
+        if (scnr.currentChar() === ch) {
+            scnr.next();
+            return ch;
+        }
+        else {
+            emitError(CompileErrorCodes.EXPECTED_TOKEN, currentPosition(), 0, ch);
+            return '';
+        }
+    }
+    function peekSpaces(scnr) {
+        let buf = '';
+        while (scnr.currentPeek() === CHAR_SP || scnr.currentPeek() === CHAR_LF) {
+            buf += scnr.currentPeek();
+            scnr.peek();
+        }
+        return buf;
+    }
+    function skipSpaces(scnr) {
+        const buf = peekSpaces(scnr);
+        scnr.skipToPeek();
+        return buf;
+    }
+    function isIdentifierStart(ch) {
+        if (ch === EOF) {
+            return false;
+        }
+        const cc = ch.charCodeAt(0);
+        return ((cc >= 97 && cc <= 122) || // a-z
+            (cc >= 65 && cc <= 90) || // A-Z
+            cc === 95 // _
+        );
+    }
+    function isNumberStart(ch) {
+        if (ch === EOF) {
+            return false;
+        }
+        const cc = ch.charCodeAt(0);
+        return cc >= 48 && cc <= 57; // 0-9
+    }
+    function isNamedIdentifierStart(scnr, context) {
+        const { currentType } = context;
+        if (currentType !== 2 /* TokenTypes.BraceLeft */) {
+            return false;
+        }
+        peekSpaces(scnr);
+        const ret = isIdentifierStart(scnr.currentPeek());
+        scnr.resetPeek();
+        return ret;
+    }
+    function isListIdentifierStart(scnr, context) {
+        const { currentType } = context;
+        if (currentType !== 2 /* TokenTypes.BraceLeft */) {
+            return false;
+        }
+        peekSpaces(scnr);
+        const ch = scnr.currentPeek() === '-' ? scnr.peek() : scnr.currentPeek();
+        const ret = isNumberStart(ch);
+        scnr.resetPeek();
+        return ret;
+    }
+    function isLiteralStart(scnr, context) {
+        const { currentType } = context;
+        if (currentType !== 2 /* TokenTypes.BraceLeft */) {
+            return false;
+        }
+        peekSpaces(scnr);
+        const ret = scnr.currentPeek() === LITERAL_DELIMITER;
+        scnr.resetPeek();
+        return ret;
+    }
+    function isLinkedDotStart(scnr, context) {
+        const { currentType } = context;
+        if (currentType !== 8 /* TokenTypes.LinkedAlias */) {
+            return false;
+        }
+        peekSpaces(scnr);
+        const ret = scnr.currentPeek() === "." /* TokenChars.LinkedDot */;
+        scnr.resetPeek();
+        return ret;
+    }
+    function isLinkedModifierStart(scnr, context) {
+        const { currentType } = context;
+        if (currentType !== 9 /* TokenTypes.LinkedDot */) {
+            return false;
+        }
+        peekSpaces(scnr);
+        const ret = isIdentifierStart(scnr.currentPeek());
+        scnr.resetPeek();
+        return ret;
+    }
+    function isLinkedDelimiterStart(scnr, context) {
+        const { currentType } = context;
+        if (!(currentType === 8 /* TokenTypes.LinkedAlias */ ||
+            currentType === 12 /* TokenTypes.LinkedModifier */)) {
+            return false;
+        }
+        peekSpaces(scnr);
+        const ret = scnr.currentPeek() === ":" /* TokenChars.LinkedDelimiter */;
+        scnr.resetPeek();
+        return ret;
+    }
+    function isLinkedReferStart(scnr, context) {
+        const { currentType } = context;
+        if (currentType !== 10 /* TokenTypes.LinkedDelimiter */) {
+            return false;
+        }
+        const fn = () => {
+            const ch = scnr.currentPeek();
+            if (ch === "{" /* TokenChars.BraceLeft */) {
+                return isIdentifierStart(scnr.peek());
+            }
+            else if (ch === "@" /* TokenChars.LinkedAlias */ ||
+                ch === "%" /* TokenChars.Modulo */ ||
+                ch === "|" /* TokenChars.Pipe */ ||
+                ch === ":" /* TokenChars.LinkedDelimiter */ ||
+                ch === "." /* TokenChars.LinkedDot */ ||
+                ch === CHAR_SP ||
+                !ch) {
+                return false;
+            }
+            else if (ch === CHAR_LF) {
+                scnr.peek();
+                return fn();
+            }
+            else {
+                // other characters
+                return isTextStart(scnr, false);
+            }
+        };
+        const ret = fn();
+        scnr.resetPeek();
+        return ret;
+    }
+    function isPluralStart(scnr) {
+        peekSpaces(scnr);
+        const ret = scnr.currentPeek() === "|" /* TokenChars.Pipe */;
+        scnr.resetPeek();
+        return ret;
+    }
+    function detectModuloStart(scnr) {
+        const spaces = peekSpaces(scnr);
+        const ret = scnr.currentPeek() === "%" /* TokenChars.Modulo */ &&
+            scnr.peek() === "{" /* TokenChars.BraceLeft */;
+        scnr.resetPeek();
+        return {
+            isModulo: ret,
+            hasSpace: spaces.length > 0
+        };
+    }
+    function isTextStart(scnr, reset = true) {
+        const fn = (hasSpace = false, prev = '', detectModulo = false) => {
+            const ch = scnr.currentPeek();
+            if (ch === "{" /* TokenChars.BraceLeft */) {
+                return prev === "%" /* TokenChars.Modulo */ ? false : hasSpace;
+            }
+            else if (ch === "@" /* TokenChars.LinkedAlias */ || !ch) {
+                return prev === "%" /* TokenChars.Modulo */ ? true : hasSpace;
+            }
+            else if (ch === "%" /* TokenChars.Modulo */) {
+                scnr.peek();
+                return fn(hasSpace, "%" /* TokenChars.Modulo */, true);
+            }
+            else if (ch === "|" /* TokenChars.Pipe */) {
+                return prev === "%" /* TokenChars.Modulo */ || detectModulo
+                    ? true
+                    : !(prev === CHAR_SP || prev === CHAR_LF);
+            }
+            else if (ch === CHAR_SP) {
+                scnr.peek();
+                return fn(true, CHAR_SP, detectModulo);
+            }
+            else if (ch === CHAR_LF) {
+                scnr.peek();
+                return fn(true, CHAR_LF, detectModulo);
+            }
+            else {
+                return true;
+            }
+        };
+        const ret = fn();
+        reset && scnr.resetPeek();
+        return ret;
+    }
+    function takeChar(scnr, fn) {
+        const ch = scnr.currentChar();
+        if (ch === EOF) {
+            return EOF;
+        }
+        if (fn(ch)) {
+            scnr.next();
+            return ch;
+        }
+        return null;
+    }
+    function isIdentifier(ch) {
+        const cc = ch.charCodeAt(0);
+        return ((cc >= 97 && cc <= 122) || // a-z
+            (cc >= 65 && cc <= 90) || // A-Z
+            (cc >= 48 && cc <= 57) || // 0-9
+            cc === 95 || // _
+            cc === 36 // $
+        );
+    }
+    function takeIdentifierChar(scnr) {
+        return takeChar(scnr, isIdentifier);
+    }
+    function isNamedIdentifier(ch) {
+        const cc = ch.charCodeAt(0);
+        return ((cc >= 97 && cc <= 122) || // a-z
+            (cc >= 65 && cc <= 90) || // A-Z
+            (cc >= 48 && cc <= 57) || // 0-9
+            cc === 95 || // _
+            cc === 36 || // $
+            cc === 45 // -
+        );
+    }
+    function takeNamedIdentifierChar(scnr) {
+        return takeChar(scnr, isNamedIdentifier);
+    }
+    function isDigit(ch) {
+        const cc = ch.charCodeAt(0);
+        return cc >= 48 && cc <= 57; // 0-9
+    }
+    function takeDigit(scnr) {
+        return takeChar(scnr, isDigit);
+    }
+    function isHexDigit(ch) {
+        const cc = ch.charCodeAt(0);
+        return ((cc >= 48 && cc <= 57) || // 0-9
+            (cc >= 65 && cc <= 70) || // A-F
+            (cc >= 97 && cc <= 102)); // a-f
+    }
+    function takeHexDigit(scnr) {
+        return takeChar(scnr, isHexDigit);
+    }
+    function getDigits(scnr) {
+        let ch = '';
+        let num = '';
+        while ((ch = takeDigit(scnr))) {
+            num += ch;
+        }
+        return num;
+    }
+    function readModulo(scnr) {
+        skipSpaces(scnr);
+        const ch = scnr.currentChar();
+        if (ch !== "%" /* TokenChars.Modulo */) {
+            emitError(CompileErrorCodes.EXPECTED_TOKEN, currentPosition(), 0, ch);
+        }
+        scnr.next();
+        return "%" /* TokenChars.Modulo */;
+    }
+    function readText(scnr) {
+        let buf = '';
+        // eslint-disable-next-line no-constant-condition
+        while (true) {
+            const ch = scnr.currentChar();
+            if (ch === "{" /* TokenChars.BraceLeft */ ||
+                ch === "}" /* TokenChars.BraceRight */ ||
+                ch === "@" /* TokenChars.LinkedAlias */ ||
+                ch === "|" /* TokenChars.Pipe */ ||
+                !ch) {
+                break;
+            }
+            else if (ch === "%" /* TokenChars.Modulo */) {
+                if (isTextStart(scnr)) {
+                    buf += ch;
+                    scnr.next();
+                }
+                else {
+                    break;
+                }
+            }
+            else if (ch === CHAR_SP || ch === CHAR_LF) {
+                if (isTextStart(scnr)) {
+                    buf += ch;
+                    scnr.next();
+                }
+                else if (isPluralStart(scnr)) {
+                    break;
+                }
+                else {
+                    buf += ch;
+                    scnr.next();
+                }
+            }
+            else {
+                buf += ch;
+                scnr.next();
+            }
+        }
+        return buf;
+    }
+    function readNamedIdentifier(scnr) {
+        skipSpaces(scnr);
+        let ch = '';
+        let name = '';
+        while ((ch = takeNamedIdentifierChar(scnr))) {
+            name += ch;
+        }
+        if (scnr.currentChar() === EOF) {
+            emitError(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE, currentPosition(), 0);
+        }
+        return name;
+    }
+    function readListIdentifier(scnr) {
+        skipSpaces(scnr);
+        let value = '';
+        if (scnr.currentChar() === '-') {
+            scnr.next();
+            value += `-${getDigits(scnr)}`;
+        }
+        else {
+            value += getDigits(scnr);
+        }
+        if (scnr.currentChar() === EOF) {
+            emitError(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE, currentPosition(), 0);
+        }
+        return value;
+    }
+    function isLiteral(ch) {
+        return ch !== LITERAL_DELIMITER && ch !== CHAR_LF;
+    }
+    function readLiteral(scnr) {
+        skipSpaces(scnr);
+        // eslint-disable-next-line no-useless-escape
+        eat(scnr, `\'`);
+        let ch = '';
+        let literal = '';
+        while ((ch = takeChar(scnr, isLiteral))) {
+            if (ch === '\\') {
+                literal += readEscapeSequence(scnr);
+            }
+            else {
+                literal += ch;
+            }
+        }
+        const current = scnr.currentChar();
+        if (current === CHAR_LF || current === EOF) {
+            emitError(CompileErrorCodes.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER, currentPosition(), 0);
+            // TODO: Is it correct really?
+            if (current === CHAR_LF) {
+                scnr.next();
+                // eslint-disable-next-line no-useless-escape
+                eat(scnr, `\'`);
+            }
+            return literal;
+        }
+        // eslint-disable-next-line no-useless-escape
+        eat(scnr, `\'`);
+        return literal;
+    }
+    function readEscapeSequence(scnr) {
+        const ch = scnr.currentChar();
+        switch (ch) {
+            case '\\':
+            case `\'`: // eslint-disable-line no-useless-escape
+                scnr.next();
+                return `\\${ch}`;
+            case 'u':
+                return readUnicodeEscapeSequence(scnr, ch, 4);
+            case 'U':
+                return readUnicodeEscapeSequence(scnr, ch, 6);
+            default:
+                emitError(CompileErrorCodes.UNKNOWN_ESCAPE_SEQUENCE, currentPosition(), 0, ch);
+                return '';
+        }
+    }
+    function readUnicodeEscapeSequence(scnr, unicode, digits) {
+        eat(scnr, unicode);
+        let sequence = '';
+        for (let i = 0; i < digits; i++) {
+            const ch = takeHexDigit(scnr);
+            if (!ch) {
+                emitError(CompileErrorCodes.INVALID_UNICODE_ESCAPE_SEQUENCE, currentPosition(), 0, `\\${unicode}${sequence}${scnr.currentChar()}`);
+                break;
+            }
+            sequence += ch;
+        }
+        return `\\${unicode}${sequence}`;
+    }
+    function isInvalidIdentifier(ch) {
+        return (ch !== "{" /* TokenChars.BraceLeft */ &&
+            ch !== "}" /* TokenChars.BraceRight */ &&
+            ch !== CHAR_SP &&
+            ch !== CHAR_LF);
+    }
+    function readInvalidIdentifier(scnr) {
+        skipSpaces(scnr);
+        let ch = '';
+        let identifiers = '';
+        while ((ch = takeChar(scnr, isInvalidIdentifier))) {
+            identifiers += ch;
+        }
+        return identifiers;
+    }
+    function readLinkedModifier(scnr) {
+        let ch = '';
+        let name = '';
+        while ((ch = takeIdentifierChar(scnr))) {
+            name += ch;
+        }
+        return name;
+    }
+    function readLinkedRefer(scnr) {
+        const fn = (buf) => {
+            const ch = scnr.currentChar();
+            if (ch === "{" /* TokenChars.BraceLeft */ ||
+                ch === "%" /* TokenChars.Modulo */ ||
+                ch === "@" /* TokenChars.LinkedAlias */ ||
+                ch === "|" /* TokenChars.Pipe */ ||
+                ch === "(" /* TokenChars.ParenLeft */ ||
+                ch === ")" /* TokenChars.ParenRight */ ||
+                !ch) {
+                return buf;
+            }
+            else if (ch === CHAR_SP) {
+                return buf;
+            }
+            else if (ch === CHAR_LF || ch === DOT) {
+                buf += ch;
+                scnr.next();
+                return fn(buf);
+            }
+            else {
+                buf += ch;
+                scnr.next();
+                return fn(buf);
+            }
+        };
+        return fn('');
+    }
+    function readPlural(scnr) {
+        skipSpaces(scnr);
+        const plural = eat(scnr, "|" /* TokenChars.Pipe */);
+        skipSpaces(scnr);
+        return plural;
+    }
+    // TODO: We need refactoring of token parsing ...
+    function readTokenInPlaceholder(scnr, context) {
+        let token = null;
+        const ch = scnr.currentChar();
+        switch (ch) {
+            case "{" /* TokenChars.BraceLeft */:
+                if (context.braceNest >= 1) {
+                    emitError(CompileErrorCodes.NOT_ALLOW_NEST_PLACEHOLDER, currentPosition(), 0);
+                }
+                scnr.next();
+                token = getToken(context, 2 /* TokenTypes.BraceLeft */, "{" /* TokenChars.BraceLeft */);
+                skipSpaces(scnr);
+                context.braceNest++;
+                return token;
+            case "}" /* TokenChars.BraceRight */:
+                if (context.braceNest > 0 &&
+                    context.currentType === 2 /* TokenTypes.BraceLeft */) {
+                    emitError(CompileErrorCodes.EMPTY_PLACEHOLDER, currentPosition(), 0);
+                }
+                scnr.next();
+                token = getToken(context, 3 /* TokenTypes.BraceRight */, "}" /* TokenChars.BraceRight */);
+                context.braceNest--;
+                context.braceNest > 0 && skipSpaces(scnr);
+                if (context.inLinked && context.braceNest === 0) {
+                    context.inLinked = false;
+                }
+                return token;
+            case "@" /* TokenChars.LinkedAlias */:
+                if (context.braceNest > 0) {
+                    emitError(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE, currentPosition(), 0);
+                }
+                token = readTokenInLinked(scnr, context) || getEndToken(context);
+                context.braceNest = 0;
+                return token;
+            default: {
+                let validNamedIdentifier = true;
+                let validListIdentifier = true;
+                let validLiteral = true;
+                if (isPluralStart(scnr)) {
+                    if (context.braceNest > 0) {
+                        emitError(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE, currentPosition(), 0);
+                    }
+                    token = getToken(context, 1 /* TokenTypes.Pipe */, readPlural(scnr));
+                    // reset
+                    context.braceNest = 0;
+                    context.inLinked = false;
+                    return token;
+                }
+                if (context.braceNest > 0 &&
+                    (context.currentType === 5 /* TokenTypes.Named */ ||
+                        context.currentType === 6 /* TokenTypes.List */ ||
+                        context.currentType === 7 /* TokenTypes.Literal */)) {
+                    emitError(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE, currentPosition(), 0);
+                    context.braceNest = 0;
+                    return readToken(scnr, context);
+                }
+                if ((validNamedIdentifier = isNamedIdentifierStart(scnr, context))) {
+                    token = getToken(context, 5 /* TokenTypes.Named */, readNamedIdentifier(scnr));
+                    skipSpaces(scnr);
+                    return token;
+                }
+                if ((validListIdentifier = isListIdentifierStart(scnr, context))) {
+                    token = getToken(context, 6 /* TokenTypes.List */, readListIdentifier(scnr));
+                    skipSpaces(scnr);
+                    return token;
+                }
+                if ((validLiteral = isLiteralStart(scnr, context))) {
+                    token = getToken(context, 7 /* TokenTypes.Literal */, readLiteral(scnr));
+                    skipSpaces(scnr);
+                    return token;
+                }
+                if (!validNamedIdentifier && !validListIdentifier && !validLiteral) {
+                    // TODO: we should be re-designed invalid cases, when we will extend message syntax near the future ...
+                    token = getToken(context, 13 /* TokenTypes.InvalidPlace */, readInvalidIdentifier(scnr));
+                    emitError(CompileErrorCodes.INVALID_TOKEN_IN_PLACEHOLDER, currentPosition(), 0, token.value);
+                    skipSpaces(scnr);
+                    return token;
+                }
+                break;
+            }
+        }
+        return token;
+    }
+    // TODO: We need refactoring of token parsing ...
+    function readTokenInLinked(scnr, context) {
+        const { currentType } = context;
+        let token = null;
+        const ch = scnr.currentChar();
+        if ((currentType === 8 /* TokenTypes.LinkedAlias */ ||
+            currentType === 9 /* TokenTypes.LinkedDot */ ||
+            currentType === 12 /* TokenTypes.LinkedModifier */ ||
+            currentType === 10 /* TokenTypes.LinkedDelimiter */) &&
+            (ch === CHAR_LF || ch === CHAR_SP)) {
+            emitError(CompileErrorCodes.INVALID_LINKED_FORMAT, currentPosition(), 0);
+        }
+        switch (ch) {
+            case "@" /* TokenChars.LinkedAlias */:
+                scnr.next();
+                token = getToken(context, 8 /* TokenTypes.LinkedAlias */, "@" /* TokenChars.LinkedAlias */);
+                context.inLinked = true;
+                return token;
+            case "." /* TokenChars.LinkedDot */:
+                skipSpaces(scnr);
+                scnr.next();
+                return getToken(context, 9 /* TokenTypes.LinkedDot */, "." /* TokenChars.LinkedDot */);
+            case ":" /* TokenChars.LinkedDelimiter */:
+                skipSpaces(scnr);
+                scnr.next();
+                return getToken(context, 10 /* TokenTypes.LinkedDelimiter */, ":" /* TokenChars.LinkedDelimiter */);
+            default:
+                if (isPluralStart(scnr)) {
+                    token = getToken(context, 1 /* TokenTypes.Pipe */, readPlural(scnr));
+                    // reset
+                    context.braceNest = 0;
+                    context.inLinked = false;
+                    return token;
+                }
+                if (isLinkedDotStart(scnr, context) ||
+                    isLinkedDelimiterStart(scnr, context)) {
+                    skipSpaces(scnr);
+                    return readTokenInLinked(scnr, context);
+                }
+                if (isLinkedModifierStart(scnr, context)) {
+                    skipSpaces(scnr);
+                    return getToken(context, 12 /* TokenTypes.LinkedModifier */, readLinkedModifier(scnr));
+                }
+                if (isLinkedReferStart(scnr, context)) {
+                    skipSpaces(scnr);
+                    if (ch === "{" /* TokenChars.BraceLeft */) {
+                        // scan the placeholder
+                        return readTokenInPlaceholder(scnr, context) || token;
+                    }
+                    else {
+                        return getToken(context, 11 /* TokenTypes.LinkedKey */, readLinkedRefer(scnr));
+                    }
+                }
+                if (currentType === 8 /* TokenTypes.LinkedAlias */) {
+                    emitError(CompileErrorCodes.INVALID_LINKED_FORMAT, currentPosition(), 0);
+                }
+                context.braceNest = 0;
+                context.inLinked = false;
+                return readToken(scnr, context);
+        }
+    }
+    // TODO: We need refactoring of token parsing ...
+    function readToken(scnr, context) {
+        let token = { type: 14 /* TokenTypes.EOF */ };
+        if (context.braceNest > 0) {
+            return readTokenInPlaceholder(scnr, context) || getEndToken(context);
+        }
+        if (context.inLinked) {
+            return readTokenInLinked(scnr, context) || getEndToken(context);
+        }
+        const ch = scnr.currentChar();
+        switch (ch) {
+            case "{" /* TokenChars.BraceLeft */:
+                return readTokenInPlaceholder(scnr, context) || getEndToken(context);
+            case "}" /* TokenChars.BraceRight */:
+                emitError(CompileErrorCodes.UNBALANCED_CLOSING_BRACE, currentPosition(), 0);
+                scnr.next();
+                return getToken(context, 3 /* TokenTypes.BraceRight */, "}" /* TokenChars.BraceRight */);
+            case "@" /* TokenChars.LinkedAlias */:
+                return readTokenInLinked(scnr, context) || getEndToken(context);
+            default: {
+                if (isPluralStart(scnr)) {
+                    token = getToken(context, 1 /* TokenTypes.Pipe */, readPlural(scnr));
+                    // reset
+                    context.braceNest = 0;
+                    context.inLinked = false;
+                    return token;
+                }
+                const { isModulo, hasSpace } = detectModuloStart(scnr);
+                if (isModulo) {
+                    return hasSpace
+                        ? getToken(context, 0 /* TokenTypes.Text */, readText(scnr))
+                        : getToken(context, 4 /* TokenTypes.Modulo */, readModulo(scnr));
+                }
+                if (isTextStart(scnr)) {
+                    return getToken(context, 0 /* TokenTypes.Text */, readText(scnr));
+                }
+                break;
+            }
+        }
+        return token;
+    }
+    function nextToken() {
+        const { currentType, offset, startLoc, endLoc } = _context;
+        _context.lastType = currentType;
+        _context.lastOffset = offset;
+        _context.lastStartLoc = startLoc;
+        _context.lastEndLoc = endLoc;
+        _context.offset = currentOffset();
+        _context.startLoc = currentPosition();
+        if (_scnr.currentChar() === EOF) {
+            return getToken(_context, 14 /* TokenTypes.EOF */);
+        }
+        return readToken(_scnr, _context);
+    }
+    return {
+        nextToken,
+        currentOffset,
+        currentPosition,
+        context
+    };
+}
+
+const ERROR_DOMAIN$2 = 'parser';
+// Backslash backslash, backslash quote, uHHHH, UHHHHHH.
+const KNOWN_ESCAPES = /(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;
+function fromEscapeSequence(match, codePoint4, codePoint6) {
+    switch (match) {
+        case `\\\\`:
+            return `\\`;
+        // eslint-disable-next-line no-useless-escape
+        case `\\\'`:
+            // eslint-disable-next-line no-useless-escape
+            return `\'`;
+        default: {
+            const codePoint = parseInt(codePoint4 || codePoint6, 16);
+            if (codePoint <= 0xd7ff || codePoint >= 0xe000) {
+                return String.fromCodePoint(codePoint);
+            }
+            // invalid ...
+            // Replace them with U+FFFD REPLACEMENT CHARACTER.
+            return '�';
+        }
+    }
+}
+function createParser(options = {}) {
+    const location = options.location !== false;
+    const { onError, onWarn } = options;
+    function emitError(tokenzer, code, start, offset, ...args) {
+        const end = tokenzer.currentPosition();
+        end.offset += offset;
+        end.column += offset;
+        if (onError) {
+            const loc = location ? createLocation(start, end) : null;
+            const err = createCompileError(code, loc, {
+                domain: ERROR_DOMAIN$2,
+                args
+            });
+            onError(err);
+        }
+    }
+    function emitWarn(tokenzer, code, start, offset, ...args) {
+        const end = tokenzer.currentPosition();
+        end.offset += offset;
+        end.column += offset;
+        if (onWarn) {
+            const loc = location ? createLocation(start, end) : null;
+            onWarn(createCompileWarn(code, loc, args));
+        }
+    }
+    function startNode(type, offset, loc) {
+        const node = { type };
+        if (location) {
+            node.start = offset;
+            node.end = offset;
+            node.loc = { start: loc, end: loc };
+        }
+        return node;
+    }
+    function endNode(node, offset, pos, type) {
+        if (type) {
+            node.type = type;
+        }
+        if (location) {
+            node.end = offset;
+            if (node.loc) {
+                node.loc.end = pos;
+            }
+        }
+    }
+    function parseText(tokenizer, value) {
+        const context = tokenizer.context();
+        const node = startNode(3 /* NodeTypes.Text */, context.offset, context.startLoc);
+        node.value = value;
+        endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());
+        return node;
+    }
+    function parseList(tokenizer, index) {
+        const context = tokenizer.context();
+        const { lastOffset: offset, lastStartLoc: loc } = context; // get brace left loc
+        const node = startNode(5 /* NodeTypes.List */, offset, loc);
+        node.index = parseInt(index, 10);
+        tokenizer.nextToken(); // skip brach right
+        endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());
+        return node;
+    }
+    function parseNamed(tokenizer, key, modulo) {
+        const context = tokenizer.context();
+        const { lastOffset: offset, lastStartLoc: loc } = context; // get brace left loc
+        const node = startNode(4 /* NodeTypes.Named */, offset, loc);
+        node.key = key;
+        if (modulo === true) {
+            node.modulo = true;
+        }
+        tokenizer.nextToken(); // skip brach right
+        endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());
+        return node;
+    }
+    function parseLiteral(tokenizer, value) {
+        const context = tokenizer.context();
+        const { lastOffset: offset, lastStartLoc: loc } = context; // get brace left loc
+        const node = startNode(9 /* NodeTypes.Literal */, offset, loc);
+        node.value = value.replace(KNOWN_ESCAPES, fromEscapeSequence);
+        tokenizer.nextToken(); // skip brach right
+        endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());
+        return node;
+    }
+    function parseLinkedModifier(tokenizer) {
+        const token = tokenizer.nextToken();
+        const context = tokenizer.context();
+        const { lastOffset: offset, lastStartLoc: loc } = context; // get linked dot loc
+        const node = startNode(8 /* NodeTypes.LinkedModifier */, offset, loc);
+        if (token.type !== 12 /* TokenTypes.LinkedModifier */) {
+            // empty modifier
+            emitError(tokenizer, CompileErrorCodes.UNEXPECTED_EMPTY_LINKED_MODIFIER, context.lastStartLoc, 0);
+            node.value = '';
+            endNode(node, offset, loc);
+            return {
+                nextConsumeToken: token,
+                node
+            };
+        }
+        // check token
+        if (token.value == null) {
+            emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));
+        }
+        node.value = token.value || '';
+        endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());
+        return {
+            node
+        };
+    }
+    function parseLinkedKey(tokenizer, value) {
+        const context = tokenizer.context();
+        const node = startNode(7 /* NodeTypes.LinkedKey */, context.offset, context.startLoc);
+        node.value = value;
+        endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());
+        return node;
+    }
+    function parseLinked(tokenizer) {
+        const context = tokenizer.context();
+        const linkedNode = startNode(6 /* NodeTypes.Linked */, context.offset, context.startLoc);
+        let token = tokenizer.nextToken();
+        if (token.type === 9 /* TokenTypes.LinkedDot */) {
+            const parsed = parseLinkedModifier(tokenizer);
+            linkedNode.modifier = parsed.node;
+            token = parsed.nextConsumeToken || tokenizer.nextToken();
+        }
+        // asset check token
+        if (token.type !== 10 /* TokenTypes.LinkedDelimiter */) {
+            emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));
+        }
+        token = tokenizer.nextToken();
+        // skip brace left
+        if (token.type === 2 /* TokenTypes.BraceLeft */) {
+            token = tokenizer.nextToken();
+        }
+        switch (token.type) {
+            case 11 /* TokenTypes.LinkedKey */:
+                if (token.value == null) {
+                    emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));
+                }
+                linkedNode.key = parseLinkedKey(tokenizer, token.value || '');
+                break;
+            case 5 /* TokenTypes.Named */:
+                if (token.value == null) {
+                    emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));
+                }
+                linkedNode.key = parseNamed(tokenizer, token.value || '');
+                break;
+            case 6 /* TokenTypes.List */:
+                if (token.value == null) {
+                    emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));
+                }
+                linkedNode.key = parseList(tokenizer, token.value || '');
+                break;
+            case 7 /* TokenTypes.Literal */:
+                if (token.value == null) {
+                    emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));
+                }
+                linkedNode.key = parseLiteral(tokenizer, token.value || '');
+                break;
+            default: {
+                // empty key
+                emitError(tokenizer, CompileErrorCodes.UNEXPECTED_EMPTY_LINKED_KEY, context.lastStartLoc, 0);
+                const nextContext = tokenizer.context();
+                const emptyLinkedKeyNode = startNode(7 /* NodeTypes.LinkedKey */, nextContext.offset, nextContext.startLoc);
+                emptyLinkedKeyNode.value = '';
+                endNode(emptyLinkedKeyNode, nextContext.offset, nextContext.startLoc);
+                linkedNode.key = emptyLinkedKeyNode;
+                endNode(linkedNode, nextContext.offset, nextContext.startLoc);
+                return {
+                    nextConsumeToken: token,
+                    node: linkedNode
+                };
+            }
+        }
+        endNode(linkedNode, tokenizer.currentOffset(), tokenizer.currentPosition());
+        return {
+            node: linkedNode
+        };
+    }
+    function parseMessage(tokenizer) {
+        const context = tokenizer.context();
+        const startOffset = context.currentType === 1 /* TokenTypes.Pipe */
+            ? tokenizer.currentOffset()
+            : context.offset;
+        const startLoc = context.currentType === 1 /* TokenTypes.Pipe */
+            ? context.endLoc
+            : context.startLoc;
+        const node = startNode(2 /* NodeTypes.Message */, startOffset, startLoc);
+        node.items = [];
+        let nextToken = null;
+        let modulo = null;
+        do {
+            const token = nextToken || tokenizer.nextToken();
+            nextToken = null;
+            switch (token.type) {
+                case 0 /* TokenTypes.Text */:
+                    if (token.value == null) {
+                        emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));
+                    }
+                    node.items.push(parseText(tokenizer, token.value || ''));
+                    break;
+                case 6 /* TokenTypes.List */:
+                    if (token.value == null) {
+                        emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));
+                    }
+                    node.items.push(parseList(tokenizer, token.value || ''));
+                    break;
+                case 4 /* TokenTypes.Modulo */:
+                    modulo = true;
+                    break;
+                case 5 /* TokenTypes.Named */:
+                    if (token.value == null) {
+                        emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));
+                    }
+                    node.items.push(parseNamed(tokenizer, token.value || '', !!modulo));
+                    if (modulo) {
+                        emitWarn(tokenizer, CompileWarnCodes.USE_MODULO_SYNTAX, context.lastStartLoc, 0, getTokenCaption(token));
+                        modulo = null;
+                    }
+                    break;
+                case 7 /* TokenTypes.Literal */:
+                    if (token.value == null) {
+                        emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));
+                    }
+                    node.items.push(parseLiteral(tokenizer, token.value || ''));
+                    break;
+                case 8 /* TokenTypes.LinkedAlias */: {
+                    const parsed = parseLinked(tokenizer);
+                    node.items.push(parsed.node);
+                    nextToken = parsed.nextConsumeToken || null;
+                    break;
+                }
+            }
+        } while (context.currentType !== 14 /* TokenTypes.EOF */ &&
+            context.currentType !== 1 /* TokenTypes.Pipe */);
+        // adjust message node loc
+        const endOffset = context.currentType === 1 /* TokenTypes.Pipe */
+            ? context.lastOffset
+            : tokenizer.currentOffset();
+        const endLoc = context.currentType === 1 /* TokenTypes.Pipe */
+            ? context.lastEndLoc
+            : tokenizer.currentPosition();
+        endNode(node, endOffset, endLoc);
+        return node;
+    }
+    function parsePlural(tokenizer, offset, loc, msgNode) {
+        const context = tokenizer.context();
+        let hasEmptyMessage = msgNode.items.length === 0;
+        const node = startNode(1 /* NodeTypes.Plural */, offset, loc);
+        node.cases = [];
+        node.cases.push(msgNode);
+        do {
+            const msg = parseMessage(tokenizer);
+            if (!hasEmptyMessage) {
+                hasEmptyMessage = msg.items.length === 0;
+            }
+            node.cases.push(msg);
+        } while (context.currentType !== 14 /* TokenTypes.EOF */);
+        if (hasEmptyMessage) {
+            emitError(tokenizer, CompileErrorCodes.MUST_HAVE_MESSAGES_IN_PLURAL, loc, 0);
+        }
+        endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());
+        return node;
+    }
+    function parseResource(tokenizer) {
+        const context = tokenizer.context();
+        const { offset, startLoc } = context;
+        const msgNode = parseMessage(tokenizer);
+        if (context.currentType === 14 /* TokenTypes.EOF */) {
+            return msgNode;
+        }
+        else {
+            return parsePlural(tokenizer, offset, startLoc, msgNode);
+        }
+    }
+    function parse(source) {
+        const tokenizer = createTokenizer(source, assign({}, options));
+        const context = tokenizer.context();
+        const node = startNode(0 /* NodeTypes.Resource */, context.offset, context.startLoc);
+        if (location && node.loc) {
+            node.loc.source = source;
+        }
+        node.body = parseResource(tokenizer);
+        if (options.onCacheKey) {
+            node.cacheKey = options.onCacheKey(source);
+        }
+        // assert whether achieved to EOF
+        if (context.currentType !== 14 /* TokenTypes.EOF */) {
+            emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, source[context.offset] || '');
+        }
+        endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());
+        return node;
+    }
+    return { parse };
+}
+function getTokenCaption(token) {
+    if (token.type === 14 /* TokenTypes.EOF */) {
+        return 'EOF';
+    }
+    const name = (token.value || '').replace(/\r?\n/gu, '\\n');
+    return name.length > 10 ? name.slice(0, 9) + '…' : name;
+}
+
+function createTransformer(ast, options = {} // eslint-disable-line
+) {
+    const _context = {
+        ast,
+        helpers: new Set()
+    };
+    const context = () => _context;
+    const helper = (name) => {
+        _context.helpers.add(name);
+        return name;
+    };
+    return { context, helper };
+}
+function traverseNodes(nodes, transformer) {
+    for (let i = 0; i < nodes.length; i++) {
+        traverseNode(nodes[i], transformer);
+    }
+}
+function traverseNode(node, transformer) {
+    // TODO: if we need pre-hook of transform, should be implemented to here
+    switch (node.type) {
+        case 1 /* NodeTypes.Plural */:
+            traverseNodes(node.cases, transformer);
+            transformer.helper("plural" /* HelperNameMap.PLURAL */);
+            break;
+        case 2 /* NodeTypes.Message */:
+            traverseNodes(node.items, transformer);
+            break;
+        case 6 /* NodeTypes.Linked */: {
+            const linked = node;
+            traverseNode(linked.key, transformer);
+            transformer.helper("linked" /* HelperNameMap.LINKED */);
+            transformer.helper("type" /* HelperNameMap.TYPE */);
+            break;
+        }
+        case 5 /* NodeTypes.List */:
+            transformer.helper("interpolate" /* HelperNameMap.INTERPOLATE */);
+            transformer.helper("list" /* HelperNameMap.LIST */);
+            break;
+        case 4 /* NodeTypes.Named */:
+            transformer.helper("interpolate" /* HelperNameMap.INTERPOLATE */);
+            transformer.helper("named" /* HelperNameMap.NAMED */);
+            break;
+    }
+    // TODO: if we need post-hook of transform, should be implemented to here
+}
+// transform AST
+function transform(ast, options = {} // eslint-disable-line
+) {
+    const transformer = createTransformer(ast);
+    transformer.helper("normalize" /* HelperNameMap.NORMALIZE */);
+    // traverse
+    ast.body && traverseNode(ast.body, transformer);
+    // set meta information
+    const context = transformer.context();
+    ast.helpers = Array.from(context.helpers);
+}
+
+function optimize(ast) {
+    const body = ast.body;
+    if (body.type === 2 /* NodeTypes.Message */) {
+        optimizeMessageNode(body);
+    }
+    else {
+        body.cases.forEach(c => optimizeMessageNode(c));
+    }
+    return ast;
+}
+function optimizeMessageNode(message) {
+    if (message.items.length === 1) {
+        const item = message.items[0];
+        if (item.type === 3 /* NodeTypes.Text */ || item.type === 9 /* NodeTypes.Literal */) {
+            message.static = item.value;
+            delete item.value; // optimization for size
+        }
+    }
+    else {
+        const values = [];
+        for (let i = 0; i < message.items.length; i++) {
+            const item = message.items[i];
+            if (!(item.type === 3 /* NodeTypes.Text */ || item.type === 9 /* NodeTypes.Literal */)) {
+                break;
+            }
+            if (item.value == null) {
+                break;
+            }
+            values.push(item.value);
+        }
+        if (values.length === message.items.length) {
+            message.static = join(values);
+            for (let i = 0; i < message.items.length; i++) {
+                const item = message.items[i];
+                if (item.type === 3 /* NodeTypes.Text */ || item.type === 9 /* NodeTypes.Literal */) {
+                    delete item.value; // optimization for size
+                }
+            }
+        }
+    }
+}
+
+const ERROR_DOMAIN$1 = 'minifier';
+/* eslint-disable @typescript-eslint/no-explicit-any */
+function minify(node) {
+    node.t = node.type;
+    switch (node.type) {
+        case 0 /* NodeTypes.Resource */: {
+            const resource = node;
+            minify(resource.body);
+            resource.b = resource.body;
+            delete resource.body;
+            break;
+        }
+        case 1 /* NodeTypes.Plural */: {
+            const plural = node;
+            const cases = plural.cases;
+            for (let i = 0; i < cases.length; i++) {
+                minify(cases[i]);
+            }
+            plural.c = cases;
+            delete plural.cases;
+            break;
+        }
+        case 2 /* NodeTypes.Message */: {
+            const message = node;
+            const items = message.items;
+            for (let i = 0; i < items.length; i++) {
+                minify(items[i]);
+            }
+            message.i = items;
+            delete message.items;
+            if (message.static) {
+                message.s = message.static;
+                delete message.static;
+            }
+            break;
+        }
+        case 3 /* NodeTypes.Text */:
+        case 9 /* NodeTypes.Literal */:
+        case 8 /* NodeTypes.LinkedModifier */:
+        case 7 /* NodeTypes.LinkedKey */: {
+            const valueNode = node;
+            if (valueNode.value) {
+                valueNode.v = valueNode.value;
+                delete valueNode.value;
+            }
+            break;
+        }
+        case 6 /* NodeTypes.Linked */: {
+            const linked = node;
+            minify(linked.key);
+            linked.k = linked.key;
+            delete linked.key;
+            if (linked.modifier) {
+                minify(linked.modifier);
+                linked.m = linked.modifier;
+                delete linked.modifier;
+            }
+            break;
+        }
+        case 5 /* NodeTypes.List */: {
+            const list = node;
+            list.i = list.index;
+            delete list.index;
+            break;
+        }
+        case 4 /* NodeTypes.Named */: {
+            const named = node;
+            named.k = named.key;
+            delete named.key;
+            break;
+        }
+        default:
+            if ((process.env.NODE_ENV !== 'production')) {
+                throw createCompileError(CompileErrorCodes.UNHANDLED_MINIFIER_NODE_TYPE, null, {
+                    domain: ERROR_DOMAIN$1,
+                    args: [node.type]
+                });
+            }
+    }
+    delete node.type;
+}
+/* eslint-enable @typescript-eslint/no-explicit-any */
+
+// eslint-disable-next-line @typescript-eslint/triple-slash-reference
+/// <reference types="source-map-js" />
+const ERROR_DOMAIN = 'parser';
+function createCodeGenerator(ast, options) {
+    const { sourceMap, filename, breakLineCode, needIndent: _needIndent } = options;
+    const location = options.location !== false;
+    const _context = {
+        filename,
+        code: '',
+        column: 1,
+        line: 1,
+        offset: 0,
+        map: undefined,
+        breakLineCode,
+        needIndent: _needIndent,
+        indentLevel: 0
+    };
+    if (location && ast.loc) {
+        _context.source = ast.loc.source;
+    }
+    const context = () => _context;
+    function push(code, node) {
+        _context.code += code;
+    }
+    function _newline(n, withBreakLine = true) {
+        const _breakLineCode = withBreakLine ? breakLineCode : '';
+        push(_needIndent ? _breakLineCode + `  `.repeat(n) : _breakLineCode);
+    }
+    function indent(withNewLine = true) {
+        const level = ++_context.indentLevel;
+        withNewLine && _newline(level);
+    }
+    function deindent(withNewLine = true) {
+        const level = --_context.indentLevel;
+        withNewLine && _newline(level);
+    }
+    function newline() {
+        _newline(_context.indentLevel);
+    }
+    const helper = (key) => `_${key}`;
+    const needIndent = () => _context.needIndent;
+    return {
+        context,
+        push,
+        indent,
+        deindent,
+        newline,
+        helper,
+        needIndent
+    };
+}
+function generateLinkedNode(generator, node) {
+    const { helper } = generator;
+    generator.push(`${helper("linked" /* HelperNameMap.LINKED */)}(`);
+    generateNode(generator, node.key);
+    if (node.modifier) {
+        generator.push(`, `);
+        generateNode(generator, node.modifier);
+        generator.push(`, _type`);
+    }
+    else {
+        generator.push(`, undefined, _type`);
+    }
+    generator.push(`)`);
+}
+function generateMessageNode(generator, node) {
+    const { helper, needIndent } = generator;
+    generator.push(`${helper("normalize" /* HelperNameMap.NORMALIZE */)}([`);
+    generator.indent(needIndent());
+    const length = node.items.length;
+    for (let i = 0; i < length; i++) {
+        generateNode(generator, node.items[i]);
+        if (i === length - 1) {
+            break;
+        }
+        generator.push(', ');
+    }
+    generator.deindent(needIndent());
+    generator.push('])');
+}
+function generatePluralNode(generator, node) {
+    const { helper, needIndent } = generator;
+    if (node.cases.length > 1) {
+        generator.push(`${helper("plural" /* HelperNameMap.PLURAL */)}([`);
+        generator.indent(needIndent());
+        const length = node.cases.length;
+        for (let i = 0; i < length; i++) {
+            generateNode(generator, node.cases[i]);
+            if (i === length - 1) {
+                break;
+            }
+            generator.push(', ');
+        }
+        generator.deindent(needIndent());
+        generator.push(`])`);
+    }
+}
+function generateResource(generator, node) {
+    if (node.body) {
+        generateNode(generator, node.body);
+    }
+    else {
+        generator.push('null');
+    }
+}
+function generateNode(generator, node) {
+    const { helper } = generator;
+    switch (node.type) {
+        case 0 /* NodeTypes.Resource */:
+            generateResource(generator, node);
+            break;
+        case 1 /* NodeTypes.Plural */:
+            generatePluralNode(generator, node);
+            break;
+        case 2 /* NodeTypes.Message */:
+            generateMessageNode(generator, node);
+            break;
+        case 6 /* NodeTypes.Linked */:
+            generateLinkedNode(generator, node);
+            break;
+        case 8 /* NodeTypes.LinkedModifier */:
+            generator.push(JSON.stringify(node.value), node);
+            break;
+        case 7 /* NodeTypes.LinkedKey */:
+            generator.push(JSON.stringify(node.value), node);
+            break;
+        case 5 /* NodeTypes.List */:
+            generator.push(`${helper("interpolate" /* HelperNameMap.INTERPOLATE */)}(${helper("list" /* HelperNameMap.LIST */)}(${node.index}))`, node);
+            break;
+        case 4 /* NodeTypes.Named */:
+            generator.push(`${helper("interpolate" /* HelperNameMap.INTERPOLATE */)}(${helper("named" /* HelperNameMap.NAMED */)}(${JSON.stringify(node.key)}))`, node);
+            break;
+        case 9 /* NodeTypes.Literal */:
+            generator.push(JSON.stringify(node.value), node);
+            break;
+        case 3 /* NodeTypes.Text */:
+            generator.push(JSON.stringify(node.value), node);
+            break;
+        default:
+            if ((process.env.NODE_ENV !== 'production')) {
+                throw createCompileError(CompileErrorCodes.UNHANDLED_CODEGEN_NODE_TYPE, null, {
+                    domain: ERROR_DOMAIN,
+                    args: [node.type]
+                });
+            }
+    }
+}
+// generate code from AST
+const generate = (ast, options = {} // eslint-disable-line
+) => {
+    const mode = isString(options.mode) ? options.mode : 'normal';
+    const filename = isString(options.filename)
+        ? options.filename
+        : 'message.intl';
+    const sourceMap = !!options.sourceMap;
+    // prettier-ignore
+    const breakLineCode = options.breakLineCode != null
+        ? options.breakLineCode
+        : mode === 'arrow'
+            ? ';'
+            : '\n';
+    const needIndent = options.needIndent ? options.needIndent : mode !== 'arrow';
+    const helpers = ast.helpers || [];
+    const generator = createCodeGenerator(ast, {
+        mode,
+        filename,
+        sourceMap,
+        breakLineCode,
+        needIndent
+    });
+    generator.push(mode === 'normal' ? `function __msg__ (ctx) {` : `(ctx) => {`);
+    generator.indent(needIndent);
+    if (helpers.length > 0) {
+        generator.push(`const { ${join(helpers.map(s => `${s}: _${s}`), ', ')} } = ctx`);
+        generator.newline();
+    }
+    generator.push(`return `);
+    generateNode(generator, ast);
+    generator.deindent(needIndent);
+    generator.push(`}`);
+    delete ast.helpers;
+    const { code, map } = generator.context();
+    return {
+        ast,
+        code,
+        map: map ? map.toJSON() : undefined // eslint-disable-line @typescript-eslint/no-explicit-any
+    };
+};
+
+function baseCompile(source, options = {}) {
+    const assignedOptions = assign({}, options);
+    const jit = !!assignedOptions.jit;
+    const enalbeMinify = !!assignedOptions.minify;
+    const enambeOptimize = assignedOptions.optimize == null ? true : assignedOptions.optimize;
+    // parse source codes
+    const parser = createParser(assignedOptions);
+    const ast = parser.parse(source);
+    if (!jit) {
+        // transform ASTs
+        transform(ast, assignedOptions);
+        // generate javascript codes
+        return generate(ast, assignedOptions);
+    }
+    else {
+        // optimize ASTs
+        enambeOptimize && optimize(ast);
+        // minimize ASTs
+        enalbeMinify && minify(ast);
+        // In JIT mode, no ast transform, no code generation.
+        return { ast, code: '' };
+    }
+}
+
+export { CompileErrorCodes, CompileWarnCodes, ERROR_DOMAIN$2 as ERROR_DOMAIN, LOCATION_STUB, baseCompile, createCompileError, createCompileWarn, createLocation, createParser, createPosition, defaultOnError, detectHtmlTag, errorMessages, warnMessages };

+ 1660 - 0
node_modules/@intlify/message-compiler/dist/message-compiler.node.mjs

@@ -0,0 +1,1660 @@
+/*!
+  * message-compiler v9.13.1
+  * (c) 2024 kazuya kawaguchi
+  * Released under the MIT License.
+  */
+import { format, assign, join, isString } from '@intlify/shared';
+import { SourceMapGenerator } from 'source-map-js';
+
+const LOCATION_STUB = {
+    start: { line: 1, column: 1, offset: 0 },
+    end: { line: 1, column: 1, offset: 0 }
+};
+function createPosition(line, column, offset) {
+    return { line, column, offset };
+}
+function createLocation(start, end, source) {
+    const loc = { start, end };
+    if (source != null) {
+        loc.source = source;
+    }
+    return loc;
+}
+
+const CompileWarnCodes = {
+    USE_MODULO_SYNTAX: 1,
+    __EXTEND_POINT__: 2
+};
+/** @internal */
+const warnMessages = {
+    [CompileWarnCodes.USE_MODULO_SYNTAX]: `Use modulo before '{{0}}'.`
+};
+function createCompileWarn(code, loc, ...args) {
+    const msg = (process.env.NODE_ENV !== 'production') ? format(warnMessages[code] || '', ...(args || [])) : code;
+    const message = { message: String(msg), code };
+    if (loc) {
+        message.location = loc;
+    }
+    return message;
+}
+
+const CompileErrorCodes = {
+    // tokenizer error codes
+    EXPECTED_TOKEN: 1,
+    INVALID_TOKEN_IN_PLACEHOLDER: 2,
+    UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER: 3,
+    UNKNOWN_ESCAPE_SEQUENCE: 4,
+    INVALID_UNICODE_ESCAPE_SEQUENCE: 5,
+    UNBALANCED_CLOSING_BRACE: 6,
+    UNTERMINATED_CLOSING_BRACE: 7,
+    EMPTY_PLACEHOLDER: 8,
+    NOT_ALLOW_NEST_PLACEHOLDER: 9,
+    INVALID_LINKED_FORMAT: 10,
+    // parser error codes
+    MUST_HAVE_MESSAGES_IN_PLURAL: 11,
+    UNEXPECTED_EMPTY_LINKED_MODIFIER: 12,
+    UNEXPECTED_EMPTY_LINKED_KEY: 13,
+    UNEXPECTED_LEXICAL_ANALYSIS: 14,
+    // generator error codes
+    UNHANDLED_CODEGEN_NODE_TYPE: 15,
+    // minifier error codes
+    UNHANDLED_MINIFIER_NODE_TYPE: 16,
+    // Special value for higher-order compilers to pick up the last code
+    // to avoid collision of error codes. This should always be kept as the last
+    // item.
+    __EXTEND_POINT__: 17
+};
+/** @internal */
+const errorMessages = {
+    // tokenizer error messages
+    [CompileErrorCodes.EXPECTED_TOKEN]: `Expected token: '{0}'`,
+    [CompileErrorCodes.INVALID_TOKEN_IN_PLACEHOLDER]: `Invalid token in placeholder: '{0}'`,
+    [CompileErrorCodes.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER]: `Unterminated single quote in placeholder`,
+    [CompileErrorCodes.UNKNOWN_ESCAPE_SEQUENCE]: `Unknown escape sequence: \\{0}`,
+    [CompileErrorCodes.INVALID_UNICODE_ESCAPE_SEQUENCE]: `Invalid unicode escape sequence: {0}`,
+    [CompileErrorCodes.UNBALANCED_CLOSING_BRACE]: `Unbalanced closing brace`,
+    [CompileErrorCodes.UNTERMINATED_CLOSING_BRACE]: `Unterminated closing brace`,
+    [CompileErrorCodes.EMPTY_PLACEHOLDER]: `Empty placeholder`,
+    [CompileErrorCodes.NOT_ALLOW_NEST_PLACEHOLDER]: `Not allowed nest placeholder`,
+    [CompileErrorCodes.INVALID_LINKED_FORMAT]: `Invalid linked format`,
+    // parser error messages
+    [CompileErrorCodes.MUST_HAVE_MESSAGES_IN_PLURAL]: `Plural must have messages`,
+    [CompileErrorCodes.UNEXPECTED_EMPTY_LINKED_MODIFIER]: `Unexpected empty linked modifier`,
+    [CompileErrorCodes.UNEXPECTED_EMPTY_LINKED_KEY]: `Unexpected empty linked key`,
+    [CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS]: `Unexpected lexical analysis in token: '{0}'`,
+    // generator error messages
+    [CompileErrorCodes.UNHANDLED_CODEGEN_NODE_TYPE]: `unhandled codegen node type: '{0}'`,
+    // minimizer error messages
+    [CompileErrorCodes.UNHANDLED_MINIFIER_NODE_TYPE]: `unhandled mimifier node type: '{0}'`
+};
+function createCompileError(code, loc, options = {}) {
+    const { domain, messages, args } = options;
+    const msg = (process.env.NODE_ENV !== 'production')
+        ? format((messages || errorMessages)[code] || '', ...(args || []))
+        : code;
+    const error = new SyntaxError(String(msg));
+    error.code = code;
+    if (loc) {
+        error.location = loc;
+    }
+    error.domain = domain;
+    return error;
+}
+/** @internal */
+function defaultOnError(error) {
+    throw error;
+}
+
+// eslint-disable-next-line no-useless-escape
+const RE_HTML_TAG = /<\/?[\w\s="/.':;#-\/]+>/;
+const detectHtmlTag = (source) => RE_HTML_TAG.test(source);
+
+const CHAR_SP = ' ';
+const CHAR_CR = '\r';
+const CHAR_LF = '\n';
+const CHAR_LS = String.fromCharCode(0x2028);
+const CHAR_PS = String.fromCharCode(0x2029);
+function createScanner(str) {
+    const _buf = str;
+    let _index = 0;
+    let _line = 1;
+    let _column = 1;
+    let _peekOffset = 0;
+    const isCRLF = (index) => _buf[index] === CHAR_CR && _buf[index + 1] === CHAR_LF;
+    const isLF = (index) => _buf[index] === CHAR_LF;
+    const isPS = (index) => _buf[index] === CHAR_PS;
+    const isLS = (index) => _buf[index] === CHAR_LS;
+    const isLineEnd = (index) => isCRLF(index) || isLF(index) || isPS(index) || isLS(index);
+    const index = () => _index;
+    const line = () => _line;
+    const column = () => _column;
+    const peekOffset = () => _peekOffset;
+    const charAt = (offset) => isCRLF(offset) || isPS(offset) || isLS(offset) ? CHAR_LF : _buf[offset];
+    const currentChar = () => charAt(_index);
+    const currentPeek = () => charAt(_index + _peekOffset);
+    function next() {
+        _peekOffset = 0;
+        if (isLineEnd(_index)) {
+            _line++;
+            _column = 0;
+        }
+        if (isCRLF(_index)) {
+            _index++;
+        }
+        _index++;
+        _column++;
+        return _buf[_index];
+    }
+    function peek() {
+        if (isCRLF(_index + _peekOffset)) {
+            _peekOffset++;
+        }
+        _peekOffset++;
+        return _buf[_index + _peekOffset];
+    }
+    function reset() {
+        _index = 0;
+        _line = 1;
+        _column = 1;
+        _peekOffset = 0;
+    }
+    function resetPeek(offset = 0) {
+        _peekOffset = offset;
+    }
+    function skipToPeek() {
+        const target = _index + _peekOffset;
+        // eslint-disable-next-line no-unmodified-loop-condition
+        while (target !== _index) {
+            next();
+        }
+        _peekOffset = 0;
+    }
+    return {
+        index,
+        line,
+        column,
+        peekOffset,
+        charAt,
+        currentChar,
+        currentPeek,
+        next,
+        peek,
+        reset,
+        resetPeek,
+        skipToPeek
+    };
+}
+
+const EOF = undefined;
+const DOT = '.';
+const LITERAL_DELIMITER = "'";
+const ERROR_DOMAIN$3 = 'tokenizer';
+function createTokenizer(source, options = {}) {
+    const location = options.location !== false;
+    const _scnr = createScanner(source);
+    const currentOffset = () => _scnr.index();
+    const currentPosition = () => createPosition(_scnr.line(), _scnr.column(), _scnr.index());
+    const _initLoc = currentPosition();
+    const _initOffset = currentOffset();
+    const _context = {
+        currentType: 14 /* TokenTypes.EOF */,
+        offset: _initOffset,
+        startLoc: _initLoc,
+        endLoc: _initLoc,
+        lastType: 14 /* TokenTypes.EOF */,
+        lastOffset: _initOffset,
+        lastStartLoc: _initLoc,
+        lastEndLoc: _initLoc,
+        braceNest: 0,
+        inLinked: false,
+        text: ''
+    };
+    const context = () => _context;
+    const { onError } = options;
+    function emitError(code, pos, offset, ...args) {
+        const ctx = context();
+        pos.column += offset;
+        pos.offset += offset;
+        if (onError) {
+            const loc = location ? createLocation(ctx.startLoc, pos) : null;
+            const err = createCompileError(code, loc, {
+                domain: ERROR_DOMAIN$3,
+                args
+            });
+            onError(err);
+        }
+    }
+    function getToken(context, type, value) {
+        context.endLoc = currentPosition();
+        context.currentType = type;
+        const token = { type };
+        if (location) {
+            token.loc = createLocation(context.startLoc, context.endLoc);
+        }
+        if (value != null) {
+            token.value = value;
+        }
+        return token;
+    }
+    const getEndToken = (context) => getToken(context, 14 /* TokenTypes.EOF */);
+    function eat(scnr, ch) {
+        if (scnr.currentChar() === ch) {
+            scnr.next();
+            return ch;
+        }
+        else {
+            emitError(CompileErrorCodes.EXPECTED_TOKEN, currentPosition(), 0, ch);
+            return '';
+        }
+    }
+    function peekSpaces(scnr) {
+        let buf = '';
+        while (scnr.currentPeek() === CHAR_SP || scnr.currentPeek() === CHAR_LF) {
+            buf += scnr.currentPeek();
+            scnr.peek();
+        }
+        return buf;
+    }
+    function skipSpaces(scnr) {
+        const buf = peekSpaces(scnr);
+        scnr.skipToPeek();
+        return buf;
+    }
+    function isIdentifierStart(ch) {
+        if (ch === EOF) {
+            return false;
+        }
+        const cc = ch.charCodeAt(0);
+        return ((cc >= 97 && cc <= 122) || // a-z
+            (cc >= 65 && cc <= 90) || // A-Z
+            cc === 95 // _
+        );
+    }
+    function isNumberStart(ch) {
+        if (ch === EOF) {
+            return false;
+        }
+        const cc = ch.charCodeAt(0);
+        return cc >= 48 && cc <= 57; // 0-9
+    }
+    function isNamedIdentifierStart(scnr, context) {
+        const { currentType } = context;
+        if (currentType !== 2 /* TokenTypes.BraceLeft */) {
+            return false;
+        }
+        peekSpaces(scnr);
+        const ret = isIdentifierStart(scnr.currentPeek());
+        scnr.resetPeek();
+        return ret;
+    }
+    function isListIdentifierStart(scnr, context) {
+        const { currentType } = context;
+        if (currentType !== 2 /* TokenTypes.BraceLeft */) {
+            return false;
+        }
+        peekSpaces(scnr);
+        const ch = scnr.currentPeek() === '-' ? scnr.peek() : scnr.currentPeek();
+        const ret = isNumberStart(ch);
+        scnr.resetPeek();
+        return ret;
+    }
+    function isLiteralStart(scnr, context) {
+        const { currentType } = context;
+        if (currentType !== 2 /* TokenTypes.BraceLeft */) {
+            return false;
+        }
+        peekSpaces(scnr);
+        const ret = scnr.currentPeek() === LITERAL_DELIMITER;
+        scnr.resetPeek();
+        return ret;
+    }
+    function isLinkedDotStart(scnr, context) {
+        const { currentType } = context;
+        if (currentType !== 8 /* TokenTypes.LinkedAlias */) {
+            return false;
+        }
+        peekSpaces(scnr);
+        const ret = scnr.currentPeek() === "." /* TokenChars.LinkedDot */;
+        scnr.resetPeek();
+        return ret;
+    }
+    function isLinkedModifierStart(scnr, context) {
+        const { currentType } = context;
+        if (currentType !== 9 /* TokenTypes.LinkedDot */) {
+            return false;
+        }
+        peekSpaces(scnr);
+        const ret = isIdentifierStart(scnr.currentPeek());
+        scnr.resetPeek();
+        return ret;
+    }
+    function isLinkedDelimiterStart(scnr, context) {
+        const { currentType } = context;
+        if (!(currentType === 8 /* TokenTypes.LinkedAlias */ ||
+            currentType === 12 /* TokenTypes.LinkedModifier */)) {
+            return false;
+        }
+        peekSpaces(scnr);
+        const ret = scnr.currentPeek() === ":" /* TokenChars.LinkedDelimiter */;
+        scnr.resetPeek();
+        return ret;
+    }
+    function isLinkedReferStart(scnr, context) {
+        const { currentType } = context;
+        if (currentType !== 10 /* TokenTypes.LinkedDelimiter */) {
+            return false;
+        }
+        const fn = () => {
+            const ch = scnr.currentPeek();
+            if (ch === "{" /* TokenChars.BraceLeft */) {
+                return isIdentifierStart(scnr.peek());
+            }
+            else if (ch === "@" /* TokenChars.LinkedAlias */ ||
+                ch === "%" /* TokenChars.Modulo */ ||
+                ch === "|" /* TokenChars.Pipe */ ||
+                ch === ":" /* TokenChars.LinkedDelimiter */ ||
+                ch === "." /* TokenChars.LinkedDot */ ||
+                ch === CHAR_SP ||
+                !ch) {
+                return false;
+            }
+            else if (ch === CHAR_LF) {
+                scnr.peek();
+                return fn();
+            }
+            else {
+                // other characters
+                return isTextStart(scnr, false);
+            }
+        };
+        const ret = fn();
+        scnr.resetPeek();
+        return ret;
+    }
+    function isPluralStart(scnr) {
+        peekSpaces(scnr);
+        const ret = scnr.currentPeek() === "|" /* TokenChars.Pipe */;
+        scnr.resetPeek();
+        return ret;
+    }
+    function detectModuloStart(scnr) {
+        const spaces = peekSpaces(scnr);
+        const ret = scnr.currentPeek() === "%" /* TokenChars.Modulo */ &&
+            scnr.peek() === "{" /* TokenChars.BraceLeft */;
+        scnr.resetPeek();
+        return {
+            isModulo: ret,
+            hasSpace: spaces.length > 0
+        };
+    }
+    function isTextStart(scnr, reset = true) {
+        const fn = (hasSpace = false, prev = '', detectModulo = false) => {
+            const ch = scnr.currentPeek();
+            if (ch === "{" /* TokenChars.BraceLeft */) {
+                return prev === "%" /* TokenChars.Modulo */ ? false : hasSpace;
+            }
+            else if (ch === "@" /* TokenChars.LinkedAlias */ || !ch) {
+                return prev === "%" /* TokenChars.Modulo */ ? true : hasSpace;
+            }
+            else if (ch === "%" /* TokenChars.Modulo */) {
+                scnr.peek();
+                return fn(hasSpace, "%" /* TokenChars.Modulo */, true);
+            }
+            else if (ch === "|" /* TokenChars.Pipe */) {
+                return prev === "%" /* TokenChars.Modulo */ || detectModulo
+                    ? true
+                    : !(prev === CHAR_SP || prev === CHAR_LF);
+            }
+            else if (ch === CHAR_SP) {
+                scnr.peek();
+                return fn(true, CHAR_SP, detectModulo);
+            }
+            else if (ch === CHAR_LF) {
+                scnr.peek();
+                return fn(true, CHAR_LF, detectModulo);
+            }
+            else {
+                return true;
+            }
+        };
+        const ret = fn();
+        reset && scnr.resetPeek();
+        return ret;
+    }
+    function takeChar(scnr, fn) {
+        const ch = scnr.currentChar();
+        if (ch === EOF) {
+            return EOF;
+        }
+        if (fn(ch)) {
+            scnr.next();
+            return ch;
+        }
+        return null;
+    }
+    function isIdentifier(ch) {
+        const cc = ch.charCodeAt(0);
+        return ((cc >= 97 && cc <= 122) || // a-z
+            (cc >= 65 && cc <= 90) || // A-Z
+            (cc >= 48 && cc <= 57) || // 0-9
+            cc === 95 || // _
+            cc === 36 // $
+        );
+    }
+    function takeIdentifierChar(scnr) {
+        return takeChar(scnr, isIdentifier);
+    }
+    function isNamedIdentifier(ch) {
+        const cc = ch.charCodeAt(0);
+        return ((cc >= 97 && cc <= 122) || // a-z
+            (cc >= 65 && cc <= 90) || // A-Z
+            (cc >= 48 && cc <= 57) || // 0-9
+            cc === 95 || // _
+            cc === 36 || // $
+            cc === 45 // -
+        );
+    }
+    function takeNamedIdentifierChar(scnr) {
+        return takeChar(scnr, isNamedIdentifier);
+    }
+    function isDigit(ch) {
+        const cc = ch.charCodeAt(0);
+        return cc >= 48 && cc <= 57; // 0-9
+    }
+    function takeDigit(scnr) {
+        return takeChar(scnr, isDigit);
+    }
+    function isHexDigit(ch) {
+        const cc = ch.charCodeAt(0);
+        return ((cc >= 48 && cc <= 57) || // 0-9
+            (cc >= 65 && cc <= 70) || // A-F
+            (cc >= 97 && cc <= 102)); // a-f
+    }
+    function takeHexDigit(scnr) {
+        return takeChar(scnr, isHexDigit);
+    }
+    function getDigits(scnr) {
+        let ch = '';
+        let num = '';
+        while ((ch = takeDigit(scnr))) {
+            num += ch;
+        }
+        return num;
+    }
+    function readModulo(scnr) {
+        skipSpaces(scnr);
+        const ch = scnr.currentChar();
+        if (ch !== "%" /* TokenChars.Modulo */) {
+            emitError(CompileErrorCodes.EXPECTED_TOKEN, currentPosition(), 0, ch);
+        }
+        scnr.next();
+        return "%" /* TokenChars.Modulo */;
+    }
+    function readText(scnr) {
+        let buf = '';
+        // eslint-disable-next-line no-constant-condition
+        while (true) {
+            const ch = scnr.currentChar();
+            if (ch === "{" /* TokenChars.BraceLeft */ ||
+                ch === "}" /* TokenChars.BraceRight */ ||
+                ch === "@" /* TokenChars.LinkedAlias */ ||
+                ch === "|" /* TokenChars.Pipe */ ||
+                !ch) {
+                break;
+            }
+            else if (ch === "%" /* TokenChars.Modulo */) {
+                if (isTextStart(scnr)) {
+                    buf += ch;
+                    scnr.next();
+                }
+                else {
+                    break;
+                }
+            }
+            else if (ch === CHAR_SP || ch === CHAR_LF) {
+                if (isTextStart(scnr)) {
+                    buf += ch;
+                    scnr.next();
+                }
+                else if (isPluralStart(scnr)) {
+                    break;
+                }
+                else {
+                    buf += ch;
+                    scnr.next();
+                }
+            }
+            else {
+                buf += ch;
+                scnr.next();
+            }
+        }
+        return buf;
+    }
+    function readNamedIdentifier(scnr) {
+        skipSpaces(scnr);
+        let ch = '';
+        let name = '';
+        while ((ch = takeNamedIdentifierChar(scnr))) {
+            name += ch;
+        }
+        if (scnr.currentChar() === EOF) {
+            emitError(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE, currentPosition(), 0);
+        }
+        return name;
+    }
+    function readListIdentifier(scnr) {
+        skipSpaces(scnr);
+        let value = '';
+        if (scnr.currentChar() === '-') {
+            scnr.next();
+            value += `-${getDigits(scnr)}`;
+        }
+        else {
+            value += getDigits(scnr);
+        }
+        if (scnr.currentChar() === EOF) {
+            emitError(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE, currentPosition(), 0);
+        }
+        return value;
+    }
+    function isLiteral(ch) {
+        return ch !== LITERAL_DELIMITER && ch !== CHAR_LF;
+    }
+    function readLiteral(scnr) {
+        skipSpaces(scnr);
+        // eslint-disable-next-line no-useless-escape
+        eat(scnr, `\'`);
+        let ch = '';
+        let literal = '';
+        while ((ch = takeChar(scnr, isLiteral))) {
+            if (ch === '\\') {
+                literal += readEscapeSequence(scnr);
+            }
+            else {
+                literal += ch;
+            }
+        }
+        const current = scnr.currentChar();
+        if (current === CHAR_LF || current === EOF) {
+            emitError(CompileErrorCodes.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER, currentPosition(), 0);
+            // TODO: Is it correct really?
+            if (current === CHAR_LF) {
+                scnr.next();
+                // eslint-disable-next-line no-useless-escape
+                eat(scnr, `\'`);
+            }
+            return literal;
+        }
+        // eslint-disable-next-line no-useless-escape
+        eat(scnr, `\'`);
+        return literal;
+    }
+    function readEscapeSequence(scnr) {
+        const ch = scnr.currentChar();
+        switch (ch) {
+            case '\\':
+            case `\'`: // eslint-disable-line no-useless-escape
+                scnr.next();
+                return `\\${ch}`;
+            case 'u':
+                return readUnicodeEscapeSequence(scnr, ch, 4);
+            case 'U':
+                return readUnicodeEscapeSequence(scnr, ch, 6);
+            default:
+                emitError(CompileErrorCodes.UNKNOWN_ESCAPE_SEQUENCE, currentPosition(), 0, ch);
+                return '';
+        }
+    }
+    function readUnicodeEscapeSequence(scnr, unicode, digits) {
+        eat(scnr, unicode);
+        let sequence = '';
+        for (let i = 0; i < digits; i++) {
+            const ch = takeHexDigit(scnr);
+            if (!ch) {
+                emitError(CompileErrorCodes.INVALID_UNICODE_ESCAPE_SEQUENCE, currentPosition(), 0, `\\${unicode}${sequence}${scnr.currentChar()}`);
+                break;
+            }
+            sequence += ch;
+        }
+        return `\\${unicode}${sequence}`;
+    }
+    function isInvalidIdentifier(ch) {
+        return (ch !== "{" /* TokenChars.BraceLeft */ &&
+            ch !== "}" /* TokenChars.BraceRight */ &&
+            ch !== CHAR_SP &&
+            ch !== CHAR_LF);
+    }
+    function readInvalidIdentifier(scnr) {
+        skipSpaces(scnr);
+        let ch = '';
+        let identifiers = '';
+        while ((ch = takeChar(scnr, isInvalidIdentifier))) {
+            identifiers += ch;
+        }
+        return identifiers;
+    }
+    function readLinkedModifier(scnr) {
+        let ch = '';
+        let name = '';
+        while ((ch = takeIdentifierChar(scnr))) {
+            name += ch;
+        }
+        return name;
+    }
+    function readLinkedRefer(scnr) {
+        const fn = (buf) => {
+            const ch = scnr.currentChar();
+            if (ch === "{" /* TokenChars.BraceLeft */ ||
+                ch === "%" /* TokenChars.Modulo */ ||
+                ch === "@" /* TokenChars.LinkedAlias */ ||
+                ch === "|" /* TokenChars.Pipe */ ||
+                ch === "(" /* TokenChars.ParenLeft */ ||
+                ch === ")" /* TokenChars.ParenRight */ ||
+                !ch) {
+                return buf;
+            }
+            else if (ch === CHAR_SP) {
+                return buf;
+            }
+            else if (ch === CHAR_LF || ch === DOT) {
+                buf += ch;
+                scnr.next();
+                return fn(buf);
+            }
+            else {
+                buf += ch;
+                scnr.next();
+                return fn(buf);
+            }
+        };
+        return fn('');
+    }
+    function readPlural(scnr) {
+        skipSpaces(scnr);
+        const plural = eat(scnr, "|" /* TokenChars.Pipe */);
+        skipSpaces(scnr);
+        return plural;
+    }
+    // TODO: We need refactoring of token parsing ...
+    function readTokenInPlaceholder(scnr, context) {
+        let token = null;
+        const ch = scnr.currentChar();
+        switch (ch) {
+            case "{" /* TokenChars.BraceLeft */:
+                if (context.braceNest >= 1) {
+                    emitError(CompileErrorCodes.NOT_ALLOW_NEST_PLACEHOLDER, currentPosition(), 0);
+                }
+                scnr.next();
+                token = getToken(context, 2 /* TokenTypes.BraceLeft */, "{" /* TokenChars.BraceLeft */);
+                skipSpaces(scnr);
+                context.braceNest++;
+                return token;
+            case "}" /* TokenChars.BraceRight */:
+                if (context.braceNest > 0 &&
+                    context.currentType === 2 /* TokenTypes.BraceLeft */) {
+                    emitError(CompileErrorCodes.EMPTY_PLACEHOLDER, currentPosition(), 0);
+                }
+                scnr.next();
+                token = getToken(context, 3 /* TokenTypes.BraceRight */, "}" /* TokenChars.BraceRight */);
+                context.braceNest--;
+                context.braceNest > 0 && skipSpaces(scnr);
+                if (context.inLinked && context.braceNest === 0) {
+                    context.inLinked = false;
+                }
+                return token;
+            case "@" /* TokenChars.LinkedAlias */:
+                if (context.braceNest > 0) {
+                    emitError(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE, currentPosition(), 0);
+                }
+                token = readTokenInLinked(scnr, context) || getEndToken(context);
+                context.braceNest = 0;
+                return token;
+            default: {
+                let validNamedIdentifier = true;
+                let validListIdentifier = true;
+                let validLiteral = true;
+                if (isPluralStart(scnr)) {
+                    if (context.braceNest > 0) {
+                        emitError(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE, currentPosition(), 0);
+                    }
+                    token = getToken(context, 1 /* TokenTypes.Pipe */, readPlural(scnr));
+                    // reset
+                    context.braceNest = 0;
+                    context.inLinked = false;
+                    return token;
+                }
+                if (context.braceNest > 0 &&
+                    (context.currentType === 5 /* TokenTypes.Named */ ||
+                        context.currentType === 6 /* TokenTypes.List */ ||
+                        context.currentType === 7 /* TokenTypes.Literal */)) {
+                    emitError(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE, currentPosition(), 0);
+                    context.braceNest = 0;
+                    return readToken(scnr, context);
+                }
+                if ((validNamedIdentifier = isNamedIdentifierStart(scnr, context))) {
+                    token = getToken(context, 5 /* TokenTypes.Named */, readNamedIdentifier(scnr));
+                    skipSpaces(scnr);
+                    return token;
+                }
+                if ((validListIdentifier = isListIdentifierStart(scnr, context))) {
+                    token = getToken(context, 6 /* TokenTypes.List */, readListIdentifier(scnr));
+                    skipSpaces(scnr);
+                    return token;
+                }
+                if ((validLiteral = isLiteralStart(scnr, context))) {
+                    token = getToken(context, 7 /* TokenTypes.Literal */, readLiteral(scnr));
+                    skipSpaces(scnr);
+                    return token;
+                }
+                if (!validNamedIdentifier && !validListIdentifier && !validLiteral) {
+                    // TODO: we should be re-designed invalid cases, when we will extend message syntax near the future ...
+                    token = getToken(context, 13 /* TokenTypes.InvalidPlace */, readInvalidIdentifier(scnr));
+                    emitError(CompileErrorCodes.INVALID_TOKEN_IN_PLACEHOLDER, currentPosition(), 0, token.value);
+                    skipSpaces(scnr);
+                    return token;
+                }
+                break;
+            }
+        }
+        return token;
+    }
+    // TODO: We need refactoring of token parsing ...
+    function readTokenInLinked(scnr, context) {
+        const { currentType } = context;
+        let token = null;
+        const ch = scnr.currentChar();
+        if ((currentType === 8 /* TokenTypes.LinkedAlias */ ||
+            currentType === 9 /* TokenTypes.LinkedDot */ ||
+            currentType === 12 /* TokenTypes.LinkedModifier */ ||
+            currentType === 10 /* TokenTypes.LinkedDelimiter */) &&
+            (ch === CHAR_LF || ch === CHAR_SP)) {
+            emitError(CompileErrorCodes.INVALID_LINKED_FORMAT, currentPosition(), 0);
+        }
+        switch (ch) {
+            case "@" /* TokenChars.LinkedAlias */:
+                scnr.next();
+                token = getToken(context, 8 /* TokenTypes.LinkedAlias */, "@" /* TokenChars.LinkedAlias */);
+                context.inLinked = true;
+                return token;
+            case "." /* TokenChars.LinkedDot */:
+                skipSpaces(scnr);
+                scnr.next();
+                return getToken(context, 9 /* TokenTypes.LinkedDot */, "." /* TokenChars.LinkedDot */);
+            case ":" /* TokenChars.LinkedDelimiter */:
+                skipSpaces(scnr);
+                scnr.next();
+                return getToken(context, 10 /* TokenTypes.LinkedDelimiter */, ":" /* TokenChars.LinkedDelimiter */);
+            default:
+                if (isPluralStart(scnr)) {
+                    token = getToken(context, 1 /* TokenTypes.Pipe */, readPlural(scnr));
+                    // reset
+                    context.braceNest = 0;
+                    context.inLinked = false;
+                    return token;
+                }
+                if (isLinkedDotStart(scnr, context) ||
+                    isLinkedDelimiterStart(scnr, context)) {
+                    skipSpaces(scnr);
+                    return readTokenInLinked(scnr, context);
+                }
+                if (isLinkedModifierStart(scnr, context)) {
+                    skipSpaces(scnr);
+                    return getToken(context, 12 /* TokenTypes.LinkedModifier */, readLinkedModifier(scnr));
+                }
+                if (isLinkedReferStart(scnr, context)) {
+                    skipSpaces(scnr);
+                    if (ch === "{" /* TokenChars.BraceLeft */) {
+                        // scan the placeholder
+                        return readTokenInPlaceholder(scnr, context) || token;
+                    }
+                    else {
+                        return getToken(context, 11 /* TokenTypes.LinkedKey */, readLinkedRefer(scnr));
+                    }
+                }
+                if (currentType === 8 /* TokenTypes.LinkedAlias */) {
+                    emitError(CompileErrorCodes.INVALID_LINKED_FORMAT, currentPosition(), 0);
+                }
+                context.braceNest = 0;
+                context.inLinked = false;
+                return readToken(scnr, context);
+        }
+    }
+    // TODO: We need refactoring of token parsing ...
+    function readToken(scnr, context) {
+        let token = { type: 14 /* TokenTypes.EOF */ };
+        if (context.braceNest > 0) {
+            return readTokenInPlaceholder(scnr, context) || getEndToken(context);
+        }
+        if (context.inLinked) {
+            return readTokenInLinked(scnr, context) || getEndToken(context);
+        }
+        const ch = scnr.currentChar();
+        switch (ch) {
+            case "{" /* TokenChars.BraceLeft */:
+                return readTokenInPlaceholder(scnr, context) || getEndToken(context);
+            case "}" /* TokenChars.BraceRight */:
+                emitError(CompileErrorCodes.UNBALANCED_CLOSING_BRACE, currentPosition(), 0);
+                scnr.next();
+                return getToken(context, 3 /* TokenTypes.BraceRight */, "}" /* TokenChars.BraceRight */);
+            case "@" /* TokenChars.LinkedAlias */:
+                return readTokenInLinked(scnr, context) || getEndToken(context);
+            default: {
+                if (isPluralStart(scnr)) {
+                    token = getToken(context, 1 /* TokenTypes.Pipe */, readPlural(scnr));
+                    // reset
+                    context.braceNest = 0;
+                    context.inLinked = false;
+                    return token;
+                }
+                const { isModulo, hasSpace } = detectModuloStart(scnr);
+                if (isModulo) {
+                    return hasSpace
+                        ? getToken(context, 0 /* TokenTypes.Text */, readText(scnr))
+                        : getToken(context, 4 /* TokenTypes.Modulo */, readModulo(scnr));
+                }
+                if (isTextStart(scnr)) {
+                    return getToken(context, 0 /* TokenTypes.Text */, readText(scnr));
+                }
+                break;
+            }
+        }
+        return token;
+    }
+    function nextToken() {
+        const { currentType, offset, startLoc, endLoc } = _context;
+        _context.lastType = currentType;
+        _context.lastOffset = offset;
+        _context.lastStartLoc = startLoc;
+        _context.lastEndLoc = endLoc;
+        _context.offset = currentOffset();
+        _context.startLoc = currentPosition();
+        if (_scnr.currentChar() === EOF) {
+            return getToken(_context, 14 /* TokenTypes.EOF */);
+        }
+        return readToken(_scnr, _context);
+    }
+    return {
+        nextToken,
+        currentOffset,
+        currentPosition,
+        context
+    };
+}
+
+const ERROR_DOMAIN$2 = 'parser';
+// Backslash backslash, backslash quote, uHHHH, UHHHHHH.
+const KNOWN_ESCAPES = /(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;
+function fromEscapeSequence(match, codePoint4, codePoint6) {
+    switch (match) {
+        case `\\\\`:
+            return `\\`;
+        // eslint-disable-next-line no-useless-escape
+        case `\\\'`:
+            // eslint-disable-next-line no-useless-escape
+            return `\'`;
+        default: {
+            const codePoint = parseInt(codePoint4 || codePoint6, 16);
+            if (codePoint <= 0xd7ff || codePoint >= 0xe000) {
+                return String.fromCodePoint(codePoint);
+            }
+            // invalid ...
+            // Replace them with U+FFFD REPLACEMENT CHARACTER.
+            return '�';
+        }
+    }
+}
+function createParser(options = {}) {
+    const location = options.location !== false;
+    const { onError, onWarn } = options;
+    function emitError(tokenzer, code, start, offset, ...args) {
+        const end = tokenzer.currentPosition();
+        end.offset += offset;
+        end.column += offset;
+        if (onError) {
+            const loc = location ? createLocation(start, end) : null;
+            const err = createCompileError(code, loc, {
+                domain: ERROR_DOMAIN$2,
+                args
+            });
+            onError(err);
+        }
+    }
+    function emitWarn(tokenzer, code, start, offset, ...args) {
+        const end = tokenzer.currentPosition();
+        end.offset += offset;
+        end.column += offset;
+        if (onWarn) {
+            const loc = location ? createLocation(start, end) : null;
+            onWarn(createCompileWarn(code, loc, args));
+        }
+    }
+    function startNode(type, offset, loc) {
+        const node = { type };
+        if (location) {
+            node.start = offset;
+            node.end = offset;
+            node.loc = { start: loc, end: loc };
+        }
+        return node;
+    }
+    function endNode(node, offset, pos, type) {
+        if (type) {
+            node.type = type;
+        }
+        if (location) {
+            node.end = offset;
+            if (node.loc) {
+                node.loc.end = pos;
+            }
+        }
+    }
+    function parseText(tokenizer, value) {
+        const context = tokenizer.context();
+        const node = startNode(3 /* NodeTypes.Text */, context.offset, context.startLoc);
+        node.value = value;
+        endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());
+        return node;
+    }
+    function parseList(tokenizer, index) {
+        const context = tokenizer.context();
+        const { lastOffset: offset, lastStartLoc: loc } = context; // get brace left loc
+        const node = startNode(5 /* NodeTypes.List */, offset, loc);
+        node.index = parseInt(index, 10);
+        tokenizer.nextToken(); // skip brach right
+        endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());
+        return node;
+    }
+    function parseNamed(tokenizer, key, modulo) {
+        const context = tokenizer.context();
+        const { lastOffset: offset, lastStartLoc: loc } = context; // get brace left loc
+        const node = startNode(4 /* NodeTypes.Named */, offset, loc);
+        node.key = key;
+        if (modulo === true) {
+            node.modulo = true;
+        }
+        tokenizer.nextToken(); // skip brach right
+        endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());
+        return node;
+    }
+    function parseLiteral(tokenizer, value) {
+        const context = tokenizer.context();
+        const { lastOffset: offset, lastStartLoc: loc } = context; // get brace left loc
+        const node = startNode(9 /* NodeTypes.Literal */, offset, loc);
+        node.value = value.replace(KNOWN_ESCAPES, fromEscapeSequence);
+        tokenizer.nextToken(); // skip brach right
+        endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());
+        return node;
+    }
+    function parseLinkedModifier(tokenizer) {
+        const token = tokenizer.nextToken();
+        const context = tokenizer.context();
+        const { lastOffset: offset, lastStartLoc: loc } = context; // get linked dot loc
+        const node = startNode(8 /* NodeTypes.LinkedModifier */, offset, loc);
+        if (token.type !== 12 /* TokenTypes.LinkedModifier */) {
+            // empty modifier
+            emitError(tokenizer, CompileErrorCodes.UNEXPECTED_EMPTY_LINKED_MODIFIER, context.lastStartLoc, 0);
+            node.value = '';
+            endNode(node, offset, loc);
+            return {
+                nextConsumeToken: token,
+                node
+            };
+        }
+        // check token
+        if (token.value == null) {
+            emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));
+        }
+        node.value = token.value || '';
+        endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());
+        return {
+            node
+        };
+    }
+    function parseLinkedKey(tokenizer, value) {
+        const context = tokenizer.context();
+        const node = startNode(7 /* NodeTypes.LinkedKey */, context.offset, context.startLoc);
+        node.value = value;
+        endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());
+        return node;
+    }
+    function parseLinked(tokenizer) {
+        const context = tokenizer.context();
+        const linkedNode = startNode(6 /* NodeTypes.Linked */, context.offset, context.startLoc);
+        let token = tokenizer.nextToken();
+        if (token.type === 9 /* TokenTypes.LinkedDot */) {
+            const parsed = parseLinkedModifier(tokenizer);
+            linkedNode.modifier = parsed.node;
+            token = parsed.nextConsumeToken || tokenizer.nextToken();
+        }
+        // asset check token
+        if (token.type !== 10 /* TokenTypes.LinkedDelimiter */) {
+            emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));
+        }
+        token = tokenizer.nextToken();
+        // skip brace left
+        if (token.type === 2 /* TokenTypes.BraceLeft */) {
+            token = tokenizer.nextToken();
+        }
+        switch (token.type) {
+            case 11 /* TokenTypes.LinkedKey */:
+                if (token.value == null) {
+                    emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));
+                }
+                linkedNode.key = parseLinkedKey(tokenizer, token.value || '');
+                break;
+            case 5 /* TokenTypes.Named */:
+                if (token.value == null) {
+                    emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));
+                }
+                linkedNode.key = parseNamed(tokenizer, token.value || '');
+                break;
+            case 6 /* TokenTypes.List */:
+                if (token.value == null) {
+                    emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));
+                }
+                linkedNode.key = parseList(tokenizer, token.value || '');
+                break;
+            case 7 /* TokenTypes.Literal */:
+                if (token.value == null) {
+                    emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));
+                }
+                linkedNode.key = parseLiteral(tokenizer, token.value || '');
+                break;
+            default: {
+                // empty key
+                emitError(tokenizer, CompileErrorCodes.UNEXPECTED_EMPTY_LINKED_KEY, context.lastStartLoc, 0);
+                const nextContext = tokenizer.context();
+                const emptyLinkedKeyNode = startNode(7 /* NodeTypes.LinkedKey */, nextContext.offset, nextContext.startLoc);
+                emptyLinkedKeyNode.value = '';
+                endNode(emptyLinkedKeyNode, nextContext.offset, nextContext.startLoc);
+                linkedNode.key = emptyLinkedKeyNode;
+                endNode(linkedNode, nextContext.offset, nextContext.startLoc);
+                return {
+                    nextConsumeToken: token,
+                    node: linkedNode
+                };
+            }
+        }
+        endNode(linkedNode, tokenizer.currentOffset(), tokenizer.currentPosition());
+        return {
+            node: linkedNode
+        };
+    }
+    function parseMessage(tokenizer) {
+        const context = tokenizer.context();
+        const startOffset = context.currentType === 1 /* TokenTypes.Pipe */
+            ? tokenizer.currentOffset()
+            : context.offset;
+        const startLoc = context.currentType === 1 /* TokenTypes.Pipe */
+            ? context.endLoc
+            : context.startLoc;
+        const node = startNode(2 /* NodeTypes.Message */, startOffset, startLoc);
+        node.items = [];
+        let nextToken = null;
+        let modulo = null;
+        do {
+            const token = nextToken || tokenizer.nextToken();
+            nextToken = null;
+            switch (token.type) {
+                case 0 /* TokenTypes.Text */:
+                    if (token.value == null) {
+                        emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));
+                    }
+                    node.items.push(parseText(tokenizer, token.value || ''));
+                    break;
+                case 6 /* TokenTypes.List */:
+                    if (token.value == null) {
+                        emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));
+                    }
+                    node.items.push(parseList(tokenizer, token.value || ''));
+                    break;
+                case 4 /* TokenTypes.Modulo */:
+                    modulo = true;
+                    break;
+                case 5 /* TokenTypes.Named */:
+                    if (token.value == null) {
+                        emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));
+                    }
+                    node.items.push(parseNamed(tokenizer, token.value || '', !!modulo));
+                    if (modulo) {
+                        emitWarn(tokenizer, CompileWarnCodes.USE_MODULO_SYNTAX, context.lastStartLoc, 0, getTokenCaption(token));
+                        modulo = null;
+                    }
+                    break;
+                case 7 /* TokenTypes.Literal */:
+                    if (token.value == null) {
+                        emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));
+                    }
+                    node.items.push(parseLiteral(tokenizer, token.value || ''));
+                    break;
+                case 8 /* TokenTypes.LinkedAlias */: {
+                    const parsed = parseLinked(tokenizer);
+                    node.items.push(parsed.node);
+                    nextToken = parsed.nextConsumeToken || null;
+                    break;
+                }
+            }
+        } while (context.currentType !== 14 /* TokenTypes.EOF */ &&
+            context.currentType !== 1 /* TokenTypes.Pipe */);
+        // adjust message node loc
+        const endOffset = context.currentType === 1 /* TokenTypes.Pipe */
+            ? context.lastOffset
+            : tokenizer.currentOffset();
+        const endLoc = context.currentType === 1 /* TokenTypes.Pipe */
+            ? context.lastEndLoc
+            : tokenizer.currentPosition();
+        endNode(node, endOffset, endLoc);
+        return node;
+    }
+    function parsePlural(tokenizer, offset, loc, msgNode) {
+        const context = tokenizer.context();
+        let hasEmptyMessage = msgNode.items.length === 0;
+        const node = startNode(1 /* NodeTypes.Plural */, offset, loc);
+        node.cases = [];
+        node.cases.push(msgNode);
+        do {
+            const msg = parseMessage(tokenizer);
+            if (!hasEmptyMessage) {
+                hasEmptyMessage = msg.items.length === 0;
+            }
+            node.cases.push(msg);
+        } while (context.currentType !== 14 /* TokenTypes.EOF */);
+        if (hasEmptyMessage) {
+            emitError(tokenizer, CompileErrorCodes.MUST_HAVE_MESSAGES_IN_PLURAL, loc, 0);
+        }
+        endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());
+        return node;
+    }
+    function parseResource(tokenizer) {
+        const context = tokenizer.context();
+        const { offset, startLoc } = context;
+        const msgNode = parseMessage(tokenizer);
+        if (context.currentType === 14 /* TokenTypes.EOF */) {
+            return msgNode;
+        }
+        else {
+            return parsePlural(tokenizer, offset, startLoc, msgNode);
+        }
+    }
+    function parse(source) {
+        const tokenizer = createTokenizer(source, assign({}, options));
+        const context = tokenizer.context();
+        const node = startNode(0 /* NodeTypes.Resource */, context.offset, context.startLoc);
+        if (location && node.loc) {
+            node.loc.source = source;
+        }
+        node.body = parseResource(tokenizer);
+        if (options.onCacheKey) {
+            node.cacheKey = options.onCacheKey(source);
+        }
+        // assert whether achieved to EOF
+        if (context.currentType !== 14 /* TokenTypes.EOF */) {
+            emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, source[context.offset] || '');
+        }
+        endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());
+        return node;
+    }
+    return { parse };
+}
+function getTokenCaption(token) {
+    if (token.type === 14 /* TokenTypes.EOF */) {
+        return 'EOF';
+    }
+    const name = (token.value || '').replace(/\r?\n/gu, '\\n');
+    return name.length > 10 ? name.slice(0, 9) + '…' : name;
+}
+
+function createTransformer(ast, options = {} // eslint-disable-line
+) {
+    const _context = {
+        ast,
+        helpers: new Set()
+    };
+    const context = () => _context;
+    const helper = (name) => {
+        _context.helpers.add(name);
+        return name;
+    };
+    return { context, helper };
+}
+function traverseNodes(nodes, transformer) {
+    for (let i = 0; i < nodes.length; i++) {
+        traverseNode(nodes[i], transformer);
+    }
+}
+function traverseNode(node, transformer) {
+    // TODO: if we need pre-hook of transform, should be implemented to here
+    switch (node.type) {
+        case 1 /* NodeTypes.Plural */:
+            traverseNodes(node.cases, transformer);
+            transformer.helper("plural" /* HelperNameMap.PLURAL */);
+            break;
+        case 2 /* NodeTypes.Message */:
+            traverseNodes(node.items, transformer);
+            break;
+        case 6 /* NodeTypes.Linked */: {
+            const linked = node;
+            traverseNode(linked.key, transformer);
+            transformer.helper("linked" /* HelperNameMap.LINKED */);
+            transformer.helper("type" /* HelperNameMap.TYPE */);
+            break;
+        }
+        case 5 /* NodeTypes.List */:
+            transformer.helper("interpolate" /* HelperNameMap.INTERPOLATE */);
+            transformer.helper("list" /* HelperNameMap.LIST */);
+            break;
+        case 4 /* NodeTypes.Named */:
+            transformer.helper("interpolate" /* HelperNameMap.INTERPOLATE */);
+            transformer.helper("named" /* HelperNameMap.NAMED */);
+            break;
+    }
+    // TODO: if we need post-hook of transform, should be implemented to here
+}
+// transform AST
+function transform(ast, options = {} // eslint-disable-line
+) {
+    const transformer = createTransformer(ast);
+    transformer.helper("normalize" /* HelperNameMap.NORMALIZE */);
+    // traverse
+    ast.body && traverseNode(ast.body, transformer);
+    // set meta information
+    const context = transformer.context();
+    ast.helpers = Array.from(context.helpers);
+}
+
+function optimize(ast) {
+    const body = ast.body;
+    if (body.type === 2 /* NodeTypes.Message */) {
+        optimizeMessageNode(body);
+    }
+    else {
+        body.cases.forEach(c => optimizeMessageNode(c));
+    }
+    return ast;
+}
+function optimizeMessageNode(message) {
+    if (message.items.length === 1) {
+        const item = message.items[0];
+        if (item.type === 3 /* NodeTypes.Text */ || item.type === 9 /* NodeTypes.Literal */) {
+            message.static = item.value;
+            delete item.value; // optimization for size
+        }
+    }
+    else {
+        const values = [];
+        for (let i = 0; i < message.items.length; i++) {
+            const item = message.items[i];
+            if (!(item.type === 3 /* NodeTypes.Text */ || item.type === 9 /* NodeTypes.Literal */)) {
+                break;
+            }
+            if (item.value == null) {
+                break;
+            }
+            values.push(item.value);
+        }
+        if (values.length === message.items.length) {
+            message.static = join(values);
+            for (let i = 0; i < message.items.length; i++) {
+                const item = message.items[i];
+                if (item.type === 3 /* NodeTypes.Text */ || item.type === 9 /* NodeTypes.Literal */) {
+                    delete item.value; // optimization for size
+                }
+            }
+        }
+    }
+}
+
+const ERROR_DOMAIN$1 = 'minifier';
+/* eslint-disable @typescript-eslint/no-explicit-any */
+function minify(node) {
+    node.t = node.type;
+    switch (node.type) {
+        case 0 /* NodeTypes.Resource */: {
+            const resource = node;
+            minify(resource.body);
+            resource.b = resource.body;
+            delete resource.body;
+            break;
+        }
+        case 1 /* NodeTypes.Plural */: {
+            const plural = node;
+            const cases = plural.cases;
+            for (let i = 0; i < cases.length; i++) {
+                minify(cases[i]);
+            }
+            plural.c = cases;
+            delete plural.cases;
+            break;
+        }
+        case 2 /* NodeTypes.Message */: {
+            const message = node;
+            const items = message.items;
+            for (let i = 0; i < items.length; i++) {
+                minify(items[i]);
+            }
+            message.i = items;
+            delete message.items;
+            if (message.static) {
+                message.s = message.static;
+                delete message.static;
+            }
+            break;
+        }
+        case 3 /* NodeTypes.Text */:
+        case 9 /* NodeTypes.Literal */:
+        case 8 /* NodeTypes.LinkedModifier */:
+        case 7 /* NodeTypes.LinkedKey */: {
+            const valueNode = node;
+            if (valueNode.value) {
+                valueNode.v = valueNode.value;
+                delete valueNode.value;
+            }
+            break;
+        }
+        case 6 /* NodeTypes.Linked */: {
+            const linked = node;
+            minify(linked.key);
+            linked.k = linked.key;
+            delete linked.key;
+            if (linked.modifier) {
+                minify(linked.modifier);
+                linked.m = linked.modifier;
+                delete linked.modifier;
+            }
+            break;
+        }
+        case 5 /* NodeTypes.List */: {
+            const list = node;
+            list.i = list.index;
+            delete list.index;
+            break;
+        }
+        case 4 /* NodeTypes.Named */: {
+            const named = node;
+            named.k = named.key;
+            delete named.key;
+            break;
+        }
+        default:
+            if ((process.env.NODE_ENV !== 'production')) {
+                throw createCompileError(CompileErrorCodes.UNHANDLED_MINIFIER_NODE_TYPE, null, {
+                    domain: ERROR_DOMAIN$1,
+                    args: [node.type]
+                });
+            }
+    }
+    delete node.type;
+}
+/* eslint-enable @typescript-eslint/no-explicit-any */
+
+// eslint-disable-next-line @typescript-eslint/triple-slash-reference
+/// <reference types="source-map-js" />
+const ERROR_DOMAIN = 'parser';
+function createCodeGenerator(ast, options) {
+    const { sourceMap, filename, breakLineCode, needIndent: _needIndent } = options;
+    const location = options.location !== false;
+    const _context = {
+        filename,
+        code: '',
+        column: 1,
+        line: 1,
+        offset: 0,
+        map: undefined,
+        breakLineCode,
+        needIndent: _needIndent,
+        indentLevel: 0
+    };
+    if (location && ast.loc) {
+        _context.source = ast.loc.source;
+    }
+    const context = () => _context;
+    function push(code, node) {
+        _context.code += code;
+        if (_context.map) {
+            if (node && node.loc && node.loc !== LOCATION_STUB) {
+                addMapping(node.loc.start, getMappingName(node));
+            }
+            advancePositionWithSource(_context, code);
+        }
+    }
+    function _newline(n, withBreakLine = true) {
+        const _breakLineCode = withBreakLine ? breakLineCode : '';
+        push(_needIndent ? _breakLineCode + `  `.repeat(n) : _breakLineCode);
+    }
+    function indent(withNewLine = true) {
+        const level = ++_context.indentLevel;
+        withNewLine && _newline(level);
+    }
+    function deindent(withNewLine = true) {
+        const level = --_context.indentLevel;
+        withNewLine && _newline(level);
+    }
+    function newline() {
+        _newline(_context.indentLevel);
+    }
+    const helper = (key) => `_${key}`;
+    const needIndent = () => _context.needIndent;
+    function addMapping(loc, name) {
+        _context.map.addMapping({
+            name,
+            source: _context.filename,
+            original: {
+                line: loc.line,
+                column: loc.column - 1
+            },
+            generated: {
+                line: _context.line,
+                column: _context.column - 1
+            }
+        });
+    }
+    if (location && sourceMap) {
+        _context.map = new SourceMapGenerator();
+        _context.map.setSourceContent(filename, _context.source);
+    }
+    return {
+        context,
+        push,
+        indent,
+        deindent,
+        newline,
+        helper,
+        needIndent
+    };
+}
+function generateLinkedNode(generator, node) {
+    const { helper } = generator;
+    generator.push(`${helper("linked" /* HelperNameMap.LINKED */)}(`);
+    generateNode(generator, node.key);
+    if (node.modifier) {
+        generator.push(`, `);
+        generateNode(generator, node.modifier);
+        generator.push(`, _type`);
+    }
+    else {
+        generator.push(`, undefined, _type`);
+    }
+    generator.push(`)`);
+}
+function generateMessageNode(generator, node) {
+    const { helper, needIndent } = generator;
+    generator.push(`${helper("normalize" /* HelperNameMap.NORMALIZE */)}([`);
+    generator.indent(needIndent());
+    const length = node.items.length;
+    for (let i = 0; i < length; i++) {
+        generateNode(generator, node.items[i]);
+        if (i === length - 1) {
+            break;
+        }
+        generator.push(', ');
+    }
+    generator.deindent(needIndent());
+    generator.push('])');
+}
+function generatePluralNode(generator, node) {
+    const { helper, needIndent } = generator;
+    if (node.cases.length > 1) {
+        generator.push(`${helper("plural" /* HelperNameMap.PLURAL */)}([`);
+        generator.indent(needIndent());
+        const length = node.cases.length;
+        for (let i = 0; i < length; i++) {
+            generateNode(generator, node.cases[i]);
+            if (i === length - 1) {
+                break;
+            }
+            generator.push(', ');
+        }
+        generator.deindent(needIndent());
+        generator.push(`])`);
+    }
+}
+function generateResource(generator, node) {
+    if (node.body) {
+        generateNode(generator, node.body);
+    }
+    else {
+        generator.push('null');
+    }
+}
+function generateNode(generator, node) {
+    const { helper } = generator;
+    switch (node.type) {
+        case 0 /* NodeTypes.Resource */:
+            generateResource(generator, node);
+            break;
+        case 1 /* NodeTypes.Plural */:
+            generatePluralNode(generator, node);
+            break;
+        case 2 /* NodeTypes.Message */:
+            generateMessageNode(generator, node);
+            break;
+        case 6 /* NodeTypes.Linked */:
+            generateLinkedNode(generator, node);
+            break;
+        case 8 /* NodeTypes.LinkedModifier */:
+            generator.push(JSON.stringify(node.value), node);
+            break;
+        case 7 /* NodeTypes.LinkedKey */:
+            generator.push(JSON.stringify(node.value), node);
+            break;
+        case 5 /* NodeTypes.List */:
+            generator.push(`${helper("interpolate" /* HelperNameMap.INTERPOLATE */)}(${helper("list" /* HelperNameMap.LIST */)}(${node.index}))`, node);
+            break;
+        case 4 /* NodeTypes.Named */:
+            generator.push(`${helper("interpolate" /* HelperNameMap.INTERPOLATE */)}(${helper("named" /* HelperNameMap.NAMED */)}(${JSON.stringify(node.key)}))`, node);
+            break;
+        case 9 /* NodeTypes.Literal */:
+            generator.push(JSON.stringify(node.value), node);
+            break;
+        case 3 /* NodeTypes.Text */:
+            generator.push(JSON.stringify(node.value), node);
+            break;
+        default:
+            if ((process.env.NODE_ENV !== 'production')) {
+                throw createCompileError(CompileErrorCodes.UNHANDLED_CODEGEN_NODE_TYPE, null, {
+                    domain: ERROR_DOMAIN,
+                    args: [node.type]
+                });
+            }
+    }
+}
+// generate code from AST
+const generate = (ast, options = {} // eslint-disable-line
+) => {
+    const mode = isString(options.mode) ? options.mode : 'normal';
+    const filename = isString(options.filename)
+        ? options.filename
+        : 'message.intl';
+    const sourceMap = !!options.sourceMap;
+    // prettier-ignore
+    const breakLineCode = options.breakLineCode != null
+        ? options.breakLineCode
+        : mode === 'arrow'
+            ? ';'
+            : '\n';
+    const needIndent = options.needIndent ? options.needIndent : mode !== 'arrow';
+    const helpers = ast.helpers || [];
+    const generator = createCodeGenerator(ast, {
+        mode,
+        filename,
+        sourceMap,
+        breakLineCode,
+        needIndent
+    });
+    generator.push(mode === 'normal' ? `function __msg__ (ctx) {` : `(ctx) => {`);
+    generator.indent(needIndent);
+    if (helpers.length > 0) {
+        generator.push(`const { ${join(helpers.map(s => `${s}: _${s}`), ', ')} } = ctx`);
+        generator.newline();
+    }
+    generator.push(`return `);
+    generateNode(generator, ast);
+    generator.deindent(needIndent);
+    generator.push(`}`);
+    delete ast.helpers;
+    const { code, map } = generator.context();
+    return {
+        ast,
+        code,
+        map: map ? map.toJSON() : undefined // eslint-disable-line @typescript-eslint/no-explicit-any
+    };
+};
+function getMappingName(node) {
+    switch (node.type) {
+        case 3 /* NodeTypes.Text */:
+        case 9 /* NodeTypes.Literal */:
+        case 8 /* NodeTypes.LinkedModifier */:
+        case 7 /* NodeTypes.LinkedKey */:
+            return node.value;
+        case 5 /* NodeTypes.List */:
+            return node.index.toString();
+        case 4 /* NodeTypes.Named */:
+            return node.key;
+        default:
+            return undefined;
+    }
+}
+function advancePositionWithSource(pos, source, numberOfCharacters = source.length) {
+    let linesCount = 0;
+    let lastNewLinePos = -1;
+    for (let i = 0; i < numberOfCharacters; i++) {
+        if (source.charCodeAt(i) === 10 /* newline char code */) {
+            linesCount++;
+            lastNewLinePos = i;
+        }
+    }
+    pos.offset += numberOfCharacters;
+    pos.line += linesCount;
+    pos.column =
+        lastNewLinePos === -1
+            ? pos.column + numberOfCharacters
+            : numberOfCharacters - lastNewLinePos;
+    return pos;
+}
+
+function baseCompile(source, options = {}) {
+    const assignedOptions = assign({}, options);
+    const jit = !!assignedOptions.jit;
+    const enalbeMinify = !!assignedOptions.minify;
+    const enambeOptimize = assignedOptions.optimize == null ? true : assignedOptions.optimize;
+    // parse source codes
+    const parser = createParser(assignedOptions);
+    const ast = parser.parse(source);
+    if (!jit) {
+        // transform ASTs
+        transform(ast, assignedOptions);
+        // generate javascript codes
+        return generate(ast, assignedOptions);
+    }
+    else {
+        // optimize ASTs
+        enambeOptimize && optimize(ast);
+        // minimize ASTs
+        enalbeMinify && minify(ast);
+        // In JIT mode, no ast transform, no code generation.
+        return { ast, code: '' };
+    }
+}
+
+export { CompileErrorCodes, CompileWarnCodes, ERROR_DOMAIN$2 as ERROR_DOMAIN, LOCATION_STUB, baseCompile, createCompileError, createCompileWarn, createLocation, createParser, createPosition, defaultOnError, detectHtmlTag, errorMessages, warnMessages };

+ 1657 - 0
node_modules/@intlify/message-compiler/dist/message-compiler.prod.cjs

@@ -0,0 +1,1657 @@
+/*!
+  * message-compiler v9.13.1
+  * (c) 2024 kazuya kawaguchi
+  * Released under the MIT License.
+  */
+'use strict';
+
+var shared = require('@intlify/shared');
+var sourceMapJs = require('source-map-js');
+
+const LOCATION_STUB = {
+    start: { line: 1, column: 1, offset: 0 },
+    end: { line: 1, column: 1, offset: 0 }
+};
+function createPosition(line, column, offset) {
+    return { line, column, offset };
+}
+function createLocation(start, end, source) {
+    const loc = { start, end };
+    if (source != null) {
+        loc.source = source;
+    }
+    return loc;
+}
+
+const CompileWarnCodes = {
+    USE_MODULO_SYNTAX: 1,
+    __EXTEND_POINT__: 2
+};
+/** @internal */
+const warnMessages = {
+    [CompileWarnCodes.USE_MODULO_SYNTAX]: `Use modulo before '{{0}}'.`
+};
+function createCompileWarn(code, loc, ...args) {
+    const msg = code;
+    const message = { message: String(msg), code };
+    if (loc) {
+        message.location = loc;
+    }
+    return message;
+}
+
+const CompileErrorCodes = {
+    // tokenizer error codes
+    EXPECTED_TOKEN: 1,
+    INVALID_TOKEN_IN_PLACEHOLDER: 2,
+    UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER: 3,
+    UNKNOWN_ESCAPE_SEQUENCE: 4,
+    INVALID_UNICODE_ESCAPE_SEQUENCE: 5,
+    UNBALANCED_CLOSING_BRACE: 6,
+    UNTERMINATED_CLOSING_BRACE: 7,
+    EMPTY_PLACEHOLDER: 8,
+    NOT_ALLOW_NEST_PLACEHOLDER: 9,
+    INVALID_LINKED_FORMAT: 10,
+    // parser error codes
+    MUST_HAVE_MESSAGES_IN_PLURAL: 11,
+    UNEXPECTED_EMPTY_LINKED_MODIFIER: 12,
+    UNEXPECTED_EMPTY_LINKED_KEY: 13,
+    UNEXPECTED_LEXICAL_ANALYSIS: 14,
+    // generator error codes
+    UNHANDLED_CODEGEN_NODE_TYPE: 15,
+    // minifier error codes
+    UNHANDLED_MINIFIER_NODE_TYPE: 16,
+    // Special value for higher-order compilers to pick up the last code
+    // to avoid collision of error codes. This should always be kept as the last
+    // item.
+    __EXTEND_POINT__: 17
+};
+/** @internal */
+const errorMessages = {
+    // tokenizer error messages
+    [CompileErrorCodes.EXPECTED_TOKEN]: `Expected token: '{0}'`,
+    [CompileErrorCodes.INVALID_TOKEN_IN_PLACEHOLDER]: `Invalid token in placeholder: '{0}'`,
+    [CompileErrorCodes.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER]: `Unterminated single quote in placeholder`,
+    [CompileErrorCodes.UNKNOWN_ESCAPE_SEQUENCE]: `Unknown escape sequence: \\{0}`,
+    [CompileErrorCodes.INVALID_UNICODE_ESCAPE_SEQUENCE]: `Invalid unicode escape sequence: {0}`,
+    [CompileErrorCodes.UNBALANCED_CLOSING_BRACE]: `Unbalanced closing brace`,
+    [CompileErrorCodes.UNTERMINATED_CLOSING_BRACE]: `Unterminated closing brace`,
+    [CompileErrorCodes.EMPTY_PLACEHOLDER]: `Empty placeholder`,
+    [CompileErrorCodes.NOT_ALLOW_NEST_PLACEHOLDER]: `Not allowed nest placeholder`,
+    [CompileErrorCodes.INVALID_LINKED_FORMAT]: `Invalid linked format`,
+    // parser error messages
+    [CompileErrorCodes.MUST_HAVE_MESSAGES_IN_PLURAL]: `Plural must have messages`,
+    [CompileErrorCodes.UNEXPECTED_EMPTY_LINKED_MODIFIER]: `Unexpected empty linked modifier`,
+    [CompileErrorCodes.UNEXPECTED_EMPTY_LINKED_KEY]: `Unexpected empty linked key`,
+    [CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS]: `Unexpected lexical analysis in token: '{0}'`,
+    // generator error messages
+    [CompileErrorCodes.UNHANDLED_CODEGEN_NODE_TYPE]: `unhandled codegen node type: '{0}'`,
+    // minimizer error messages
+    [CompileErrorCodes.UNHANDLED_MINIFIER_NODE_TYPE]: `unhandled mimifier node type: '{0}'`
+};
+function createCompileError(code, loc, options = {}) {
+    const { domain, messages, args } = options;
+    const msg = code;
+    const error = new SyntaxError(String(msg));
+    error.code = code;
+    if (loc) {
+        error.location = loc;
+    }
+    error.domain = domain;
+    return error;
+}
+/** @internal */
+function defaultOnError(error) {
+    throw error;
+}
+
+// eslint-disable-next-line no-useless-escape
+const RE_HTML_TAG = /<\/?[\w\s="/.':;#-\/]+>/;
+const detectHtmlTag = (source) => RE_HTML_TAG.test(source);
+
+const CHAR_SP = ' ';
+const CHAR_CR = '\r';
+const CHAR_LF = '\n';
+const CHAR_LS = String.fromCharCode(0x2028);
+const CHAR_PS = String.fromCharCode(0x2029);
+function createScanner(str) {
+    const _buf = str;
+    let _index = 0;
+    let _line = 1;
+    let _column = 1;
+    let _peekOffset = 0;
+    const isCRLF = (index) => _buf[index] === CHAR_CR && _buf[index + 1] === CHAR_LF;
+    const isLF = (index) => _buf[index] === CHAR_LF;
+    const isPS = (index) => _buf[index] === CHAR_PS;
+    const isLS = (index) => _buf[index] === CHAR_LS;
+    const isLineEnd = (index) => isCRLF(index) || isLF(index) || isPS(index) || isLS(index);
+    const index = () => _index;
+    const line = () => _line;
+    const column = () => _column;
+    const peekOffset = () => _peekOffset;
+    const charAt = (offset) => isCRLF(offset) || isPS(offset) || isLS(offset) ? CHAR_LF : _buf[offset];
+    const currentChar = () => charAt(_index);
+    const currentPeek = () => charAt(_index + _peekOffset);
+    function next() {
+        _peekOffset = 0;
+        if (isLineEnd(_index)) {
+            _line++;
+            _column = 0;
+        }
+        if (isCRLF(_index)) {
+            _index++;
+        }
+        _index++;
+        _column++;
+        return _buf[_index];
+    }
+    function peek() {
+        if (isCRLF(_index + _peekOffset)) {
+            _peekOffset++;
+        }
+        _peekOffset++;
+        return _buf[_index + _peekOffset];
+    }
+    function reset() {
+        _index = 0;
+        _line = 1;
+        _column = 1;
+        _peekOffset = 0;
+    }
+    function resetPeek(offset = 0) {
+        _peekOffset = offset;
+    }
+    function skipToPeek() {
+        const target = _index + _peekOffset;
+        // eslint-disable-next-line no-unmodified-loop-condition
+        while (target !== _index) {
+            next();
+        }
+        _peekOffset = 0;
+    }
+    return {
+        index,
+        line,
+        column,
+        peekOffset,
+        charAt,
+        currentChar,
+        currentPeek,
+        next,
+        peek,
+        reset,
+        resetPeek,
+        skipToPeek
+    };
+}
+
+const EOF = undefined;
+const DOT = '.';
+const LITERAL_DELIMITER = "'";
+const ERROR_DOMAIN$1 = 'tokenizer';
+function createTokenizer(source, options = {}) {
+    const location = options.location !== false;
+    const _scnr = createScanner(source);
+    const currentOffset = () => _scnr.index();
+    const currentPosition = () => createPosition(_scnr.line(), _scnr.column(), _scnr.index());
+    const _initLoc = currentPosition();
+    const _initOffset = currentOffset();
+    const _context = {
+        currentType: 14 /* TokenTypes.EOF */,
+        offset: _initOffset,
+        startLoc: _initLoc,
+        endLoc: _initLoc,
+        lastType: 14 /* TokenTypes.EOF */,
+        lastOffset: _initOffset,
+        lastStartLoc: _initLoc,
+        lastEndLoc: _initLoc,
+        braceNest: 0,
+        inLinked: false,
+        text: ''
+    };
+    const context = () => _context;
+    const { onError } = options;
+    function emitError(code, pos, offset, ...args) {
+        const ctx = context();
+        pos.column += offset;
+        pos.offset += offset;
+        if (onError) {
+            const loc = location ? createLocation(ctx.startLoc, pos) : null;
+            const err = createCompileError(code, loc, {
+                domain: ERROR_DOMAIN$1,
+                args
+            });
+            onError(err);
+        }
+    }
+    function getToken(context, type, value) {
+        context.endLoc = currentPosition();
+        context.currentType = type;
+        const token = { type };
+        if (location) {
+            token.loc = createLocation(context.startLoc, context.endLoc);
+        }
+        if (value != null) {
+            token.value = value;
+        }
+        return token;
+    }
+    const getEndToken = (context) => getToken(context, 14 /* TokenTypes.EOF */);
+    function eat(scnr, ch) {
+        if (scnr.currentChar() === ch) {
+            scnr.next();
+            return ch;
+        }
+        else {
+            emitError(CompileErrorCodes.EXPECTED_TOKEN, currentPosition(), 0, ch);
+            return '';
+        }
+    }
+    function peekSpaces(scnr) {
+        let buf = '';
+        while (scnr.currentPeek() === CHAR_SP || scnr.currentPeek() === CHAR_LF) {
+            buf += scnr.currentPeek();
+            scnr.peek();
+        }
+        return buf;
+    }
+    function skipSpaces(scnr) {
+        const buf = peekSpaces(scnr);
+        scnr.skipToPeek();
+        return buf;
+    }
+    function isIdentifierStart(ch) {
+        if (ch === EOF) {
+            return false;
+        }
+        const cc = ch.charCodeAt(0);
+        return ((cc >= 97 && cc <= 122) || // a-z
+            (cc >= 65 && cc <= 90) || // A-Z
+            cc === 95 // _
+        );
+    }
+    function isNumberStart(ch) {
+        if (ch === EOF) {
+            return false;
+        }
+        const cc = ch.charCodeAt(0);
+        return cc >= 48 && cc <= 57; // 0-9
+    }
+    function isNamedIdentifierStart(scnr, context) {
+        const { currentType } = context;
+        if (currentType !== 2 /* TokenTypes.BraceLeft */) {
+            return false;
+        }
+        peekSpaces(scnr);
+        const ret = isIdentifierStart(scnr.currentPeek());
+        scnr.resetPeek();
+        return ret;
+    }
+    function isListIdentifierStart(scnr, context) {
+        const { currentType } = context;
+        if (currentType !== 2 /* TokenTypes.BraceLeft */) {
+            return false;
+        }
+        peekSpaces(scnr);
+        const ch = scnr.currentPeek() === '-' ? scnr.peek() : scnr.currentPeek();
+        const ret = isNumberStart(ch);
+        scnr.resetPeek();
+        return ret;
+    }
+    function isLiteralStart(scnr, context) {
+        const { currentType } = context;
+        if (currentType !== 2 /* TokenTypes.BraceLeft */) {
+            return false;
+        }
+        peekSpaces(scnr);
+        const ret = scnr.currentPeek() === LITERAL_DELIMITER;
+        scnr.resetPeek();
+        return ret;
+    }
+    function isLinkedDotStart(scnr, context) {
+        const { currentType } = context;
+        if (currentType !== 8 /* TokenTypes.LinkedAlias */) {
+            return false;
+        }
+        peekSpaces(scnr);
+        const ret = scnr.currentPeek() === "." /* TokenChars.LinkedDot */;
+        scnr.resetPeek();
+        return ret;
+    }
+    function isLinkedModifierStart(scnr, context) {
+        const { currentType } = context;
+        if (currentType !== 9 /* TokenTypes.LinkedDot */) {
+            return false;
+        }
+        peekSpaces(scnr);
+        const ret = isIdentifierStart(scnr.currentPeek());
+        scnr.resetPeek();
+        return ret;
+    }
+    function isLinkedDelimiterStart(scnr, context) {
+        const { currentType } = context;
+        if (!(currentType === 8 /* TokenTypes.LinkedAlias */ ||
+            currentType === 12 /* TokenTypes.LinkedModifier */)) {
+            return false;
+        }
+        peekSpaces(scnr);
+        const ret = scnr.currentPeek() === ":" /* TokenChars.LinkedDelimiter */;
+        scnr.resetPeek();
+        return ret;
+    }
+    function isLinkedReferStart(scnr, context) {
+        const { currentType } = context;
+        if (currentType !== 10 /* TokenTypes.LinkedDelimiter */) {
+            return false;
+        }
+        const fn = () => {
+            const ch = scnr.currentPeek();
+            if (ch === "{" /* TokenChars.BraceLeft */) {
+                return isIdentifierStart(scnr.peek());
+            }
+            else if (ch === "@" /* TokenChars.LinkedAlias */ ||
+                ch === "%" /* TokenChars.Modulo */ ||
+                ch === "|" /* TokenChars.Pipe */ ||
+                ch === ":" /* TokenChars.LinkedDelimiter */ ||
+                ch === "." /* TokenChars.LinkedDot */ ||
+                ch === CHAR_SP ||
+                !ch) {
+                return false;
+            }
+            else if (ch === CHAR_LF) {
+                scnr.peek();
+                return fn();
+            }
+            else {
+                // other characters
+                return isTextStart(scnr, false);
+            }
+        };
+        const ret = fn();
+        scnr.resetPeek();
+        return ret;
+    }
+    function isPluralStart(scnr) {
+        peekSpaces(scnr);
+        const ret = scnr.currentPeek() === "|" /* TokenChars.Pipe */;
+        scnr.resetPeek();
+        return ret;
+    }
+    function detectModuloStart(scnr) {
+        const spaces = peekSpaces(scnr);
+        const ret = scnr.currentPeek() === "%" /* TokenChars.Modulo */ &&
+            scnr.peek() === "{" /* TokenChars.BraceLeft */;
+        scnr.resetPeek();
+        return {
+            isModulo: ret,
+            hasSpace: spaces.length > 0
+        };
+    }
+    function isTextStart(scnr, reset = true) {
+        const fn = (hasSpace = false, prev = '', detectModulo = false) => {
+            const ch = scnr.currentPeek();
+            if (ch === "{" /* TokenChars.BraceLeft */) {
+                return prev === "%" /* TokenChars.Modulo */ ? false : hasSpace;
+            }
+            else if (ch === "@" /* TokenChars.LinkedAlias */ || !ch) {
+                return prev === "%" /* TokenChars.Modulo */ ? true : hasSpace;
+            }
+            else if (ch === "%" /* TokenChars.Modulo */) {
+                scnr.peek();
+                return fn(hasSpace, "%" /* TokenChars.Modulo */, true);
+            }
+            else if (ch === "|" /* TokenChars.Pipe */) {
+                return prev === "%" /* TokenChars.Modulo */ || detectModulo
+                    ? true
+                    : !(prev === CHAR_SP || prev === CHAR_LF);
+            }
+            else if (ch === CHAR_SP) {
+                scnr.peek();
+                return fn(true, CHAR_SP, detectModulo);
+            }
+            else if (ch === CHAR_LF) {
+                scnr.peek();
+                return fn(true, CHAR_LF, detectModulo);
+            }
+            else {
+                return true;
+            }
+        };
+        const ret = fn();
+        reset && scnr.resetPeek();
+        return ret;
+    }
+    function takeChar(scnr, fn) {
+        const ch = scnr.currentChar();
+        if (ch === EOF) {
+            return EOF;
+        }
+        if (fn(ch)) {
+            scnr.next();
+            return ch;
+        }
+        return null;
+    }
+    function isIdentifier(ch) {
+        const cc = ch.charCodeAt(0);
+        return ((cc >= 97 && cc <= 122) || // a-z
+            (cc >= 65 && cc <= 90) || // A-Z
+            (cc >= 48 && cc <= 57) || // 0-9
+            cc === 95 || // _
+            cc === 36 // $
+        );
+    }
+    function takeIdentifierChar(scnr) {
+        return takeChar(scnr, isIdentifier);
+    }
+    function isNamedIdentifier(ch) {
+        const cc = ch.charCodeAt(0);
+        return ((cc >= 97 && cc <= 122) || // a-z
+            (cc >= 65 && cc <= 90) || // A-Z
+            (cc >= 48 && cc <= 57) || // 0-9
+            cc === 95 || // _
+            cc === 36 || // $
+            cc === 45 // -
+        );
+    }
+    function takeNamedIdentifierChar(scnr) {
+        return takeChar(scnr, isNamedIdentifier);
+    }
+    function isDigit(ch) {
+        const cc = ch.charCodeAt(0);
+        return cc >= 48 && cc <= 57; // 0-9
+    }
+    function takeDigit(scnr) {
+        return takeChar(scnr, isDigit);
+    }
+    function isHexDigit(ch) {
+        const cc = ch.charCodeAt(0);
+        return ((cc >= 48 && cc <= 57) || // 0-9
+            (cc >= 65 && cc <= 70) || // A-F
+            (cc >= 97 && cc <= 102)); // a-f
+    }
+    function takeHexDigit(scnr) {
+        return takeChar(scnr, isHexDigit);
+    }
+    function getDigits(scnr) {
+        let ch = '';
+        let num = '';
+        while ((ch = takeDigit(scnr))) {
+            num += ch;
+        }
+        return num;
+    }
+    function readModulo(scnr) {
+        skipSpaces(scnr);
+        const ch = scnr.currentChar();
+        if (ch !== "%" /* TokenChars.Modulo */) {
+            emitError(CompileErrorCodes.EXPECTED_TOKEN, currentPosition(), 0, ch);
+        }
+        scnr.next();
+        return "%" /* TokenChars.Modulo */;
+    }
+    function readText(scnr) {
+        let buf = '';
+        // eslint-disable-next-line no-constant-condition
+        while (true) {
+            const ch = scnr.currentChar();
+            if (ch === "{" /* TokenChars.BraceLeft */ ||
+                ch === "}" /* TokenChars.BraceRight */ ||
+                ch === "@" /* TokenChars.LinkedAlias */ ||
+                ch === "|" /* TokenChars.Pipe */ ||
+                !ch) {
+                break;
+            }
+            else if (ch === "%" /* TokenChars.Modulo */) {
+                if (isTextStart(scnr)) {
+                    buf += ch;
+                    scnr.next();
+                }
+                else {
+                    break;
+                }
+            }
+            else if (ch === CHAR_SP || ch === CHAR_LF) {
+                if (isTextStart(scnr)) {
+                    buf += ch;
+                    scnr.next();
+                }
+                else if (isPluralStart(scnr)) {
+                    break;
+                }
+                else {
+                    buf += ch;
+                    scnr.next();
+                }
+            }
+            else {
+                buf += ch;
+                scnr.next();
+            }
+        }
+        return buf;
+    }
+    function readNamedIdentifier(scnr) {
+        skipSpaces(scnr);
+        let ch = '';
+        let name = '';
+        while ((ch = takeNamedIdentifierChar(scnr))) {
+            name += ch;
+        }
+        if (scnr.currentChar() === EOF) {
+            emitError(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE, currentPosition(), 0);
+        }
+        return name;
+    }
+    function readListIdentifier(scnr) {
+        skipSpaces(scnr);
+        let value = '';
+        if (scnr.currentChar() === '-') {
+            scnr.next();
+            value += `-${getDigits(scnr)}`;
+        }
+        else {
+            value += getDigits(scnr);
+        }
+        if (scnr.currentChar() === EOF) {
+            emitError(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE, currentPosition(), 0);
+        }
+        return value;
+    }
+    function isLiteral(ch) {
+        return ch !== LITERAL_DELIMITER && ch !== CHAR_LF;
+    }
+    function readLiteral(scnr) {
+        skipSpaces(scnr);
+        // eslint-disable-next-line no-useless-escape
+        eat(scnr, `\'`);
+        let ch = '';
+        let literal = '';
+        while ((ch = takeChar(scnr, isLiteral))) {
+            if (ch === '\\') {
+                literal += readEscapeSequence(scnr);
+            }
+            else {
+                literal += ch;
+            }
+        }
+        const current = scnr.currentChar();
+        if (current === CHAR_LF || current === EOF) {
+            emitError(CompileErrorCodes.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER, currentPosition(), 0);
+            // TODO: Is it correct really?
+            if (current === CHAR_LF) {
+                scnr.next();
+                // eslint-disable-next-line no-useless-escape
+                eat(scnr, `\'`);
+            }
+            return literal;
+        }
+        // eslint-disable-next-line no-useless-escape
+        eat(scnr, `\'`);
+        return literal;
+    }
+    function readEscapeSequence(scnr) {
+        const ch = scnr.currentChar();
+        switch (ch) {
+            case '\\':
+            case `\'`: // eslint-disable-line no-useless-escape
+                scnr.next();
+                return `\\${ch}`;
+            case 'u':
+                return readUnicodeEscapeSequence(scnr, ch, 4);
+            case 'U':
+                return readUnicodeEscapeSequence(scnr, ch, 6);
+            default:
+                emitError(CompileErrorCodes.UNKNOWN_ESCAPE_SEQUENCE, currentPosition(), 0, ch);
+                return '';
+        }
+    }
+    function readUnicodeEscapeSequence(scnr, unicode, digits) {
+        eat(scnr, unicode);
+        let sequence = '';
+        for (let i = 0; i < digits; i++) {
+            const ch = takeHexDigit(scnr);
+            if (!ch) {
+                emitError(CompileErrorCodes.INVALID_UNICODE_ESCAPE_SEQUENCE, currentPosition(), 0, `\\${unicode}${sequence}${scnr.currentChar()}`);
+                break;
+            }
+            sequence += ch;
+        }
+        return `\\${unicode}${sequence}`;
+    }
+    function isInvalidIdentifier(ch) {
+        return (ch !== "{" /* TokenChars.BraceLeft */ &&
+            ch !== "}" /* TokenChars.BraceRight */ &&
+            ch !== CHAR_SP &&
+            ch !== CHAR_LF);
+    }
+    function readInvalidIdentifier(scnr) {
+        skipSpaces(scnr);
+        let ch = '';
+        let identifiers = '';
+        while ((ch = takeChar(scnr, isInvalidIdentifier))) {
+            identifiers += ch;
+        }
+        return identifiers;
+    }
+    function readLinkedModifier(scnr) {
+        let ch = '';
+        let name = '';
+        while ((ch = takeIdentifierChar(scnr))) {
+            name += ch;
+        }
+        return name;
+    }
+    function readLinkedRefer(scnr) {
+        const fn = (buf) => {
+            const ch = scnr.currentChar();
+            if (ch === "{" /* TokenChars.BraceLeft */ ||
+                ch === "%" /* TokenChars.Modulo */ ||
+                ch === "@" /* TokenChars.LinkedAlias */ ||
+                ch === "|" /* TokenChars.Pipe */ ||
+                ch === "(" /* TokenChars.ParenLeft */ ||
+                ch === ")" /* TokenChars.ParenRight */ ||
+                !ch) {
+                return buf;
+            }
+            else if (ch === CHAR_SP) {
+                return buf;
+            }
+            else if (ch === CHAR_LF || ch === DOT) {
+                buf += ch;
+                scnr.next();
+                return fn(buf);
+            }
+            else {
+                buf += ch;
+                scnr.next();
+                return fn(buf);
+            }
+        };
+        return fn('');
+    }
+    function readPlural(scnr) {
+        skipSpaces(scnr);
+        const plural = eat(scnr, "|" /* TokenChars.Pipe */);
+        skipSpaces(scnr);
+        return plural;
+    }
+    // TODO: We need refactoring of token parsing ...
+    function readTokenInPlaceholder(scnr, context) {
+        let token = null;
+        const ch = scnr.currentChar();
+        switch (ch) {
+            case "{" /* TokenChars.BraceLeft */:
+                if (context.braceNest >= 1) {
+                    emitError(CompileErrorCodes.NOT_ALLOW_NEST_PLACEHOLDER, currentPosition(), 0);
+                }
+                scnr.next();
+                token = getToken(context, 2 /* TokenTypes.BraceLeft */, "{" /* TokenChars.BraceLeft */);
+                skipSpaces(scnr);
+                context.braceNest++;
+                return token;
+            case "}" /* TokenChars.BraceRight */:
+                if (context.braceNest > 0 &&
+                    context.currentType === 2 /* TokenTypes.BraceLeft */) {
+                    emitError(CompileErrorCodes.EMPTY_PLACEHOLDER, currentPosition(), 0);
+                }
+                scnr.next();
+                token = getToken(context, 3 /* TokenTypes.BraceRight */, "}" /* TokenChars.BraceRight */);
+                context.braceNest--;
+                context.braceNest > 0 && skipSpaces(scnr);
+                if (context.inLinked && context.braceNest === 0) {
+                    context.inLinked = false;
+                }
+                return token;
+            case "@" /* TokenChars.LinkedAlias */:
+                if (context.braceNest > 0) {
+                    emitError(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE, currentPosition(), 0);
+                }
+                token = readTokenInLinked(scnr, context) || getEndToken(context);
+                context.braceNest = 0;
+                return token;
+            default: {
+                let validNamedIdentifier = true;
+                let validListIdentifier = true;
+                let validLiteral = true;
+                if (isPluralStart(scnr)) {
+                    if (context.braceNest > 0) {
+                        emitError(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE, currentPosition(), 0);
+                    }
+                    token = getToken(context, 1 /* TokenTypes.Pipe */, readPlural(scnr));
+                    // reset
+                    context.braceNest = 0;
+                    context.inLinked = false;
+                    return token;
+                }
+                if (context.braceNest > 0 &&
+                    (context.currentType === 5 /* TokenTypes.Named */ ||
+                        context.currentType === 6 /* TokenTypes.List */ ||
+                        context.currentType === 7 /* TokenTypes.Literal */)) {
+                    emitError(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE, currentPosition(), 0);
+                    context.braceNest = 0;
+                    return readToken(scnr, context);
+                }
+                if ((validNamedIdentifier = isNamedIdentifierStart(scnr, context))) {
+                    token = getToken(context, 5 /* TokenTypes.Named */, readNamedIdentifier(scnr));
+                    skipSpaces(scnr);
+                    return token;
+                }
+                if ((validListIdentifier = isListIdentifierStart(scnr, context))) {
+                    token = getToken(context, 6 /* TokenTypes.List */, readListIdentifier(scnr));
+                    skipSpaces(scnr);
+                    return token;
+                }
+                if ((validLiteral = isLiteralStart(scnr, context))) {
+                    token = getToken(context, 7 /* TokenTypes.Literal */, readLiteral(scnr));
+                    skipSpaces(scnr);
+                    return token;
+                }
+                if (!validNamedIdentifier && !validListIdentifier && !validLiteral) {
+                    // TODO: we should be re-designed invalid cases, when we will extend message syntax near the future ...
+                    token = getToken(context, 13 /* TokenTypes.InvalidPlace */, readInvalidIdentifier(scnr));
+                    emitError(CompileErrorCodes.INVALID_TOKEN_IN_PLACEHOLDER, currentPosition(), 0, token.value);
+                    skipSpaces(scnr);
+                    return token;
+                }
+                break;
+            }
+        }
+        return token;
+    }
+    // TODO: We need refactoring of token parsing ...
+    function readTokenInLinked(scnr, context) {
+        const { currentType } = context;
+        let token = null;
+        const ch = scnr.currentChar();
+        if ((currentType === 8 /* TokenTypes.LinkedAlias */ ||
+            currentType === 9 /* TokenTypes.LinkedDot */ ||
+            currentType === 12 /* TokenTypes.LinkedModifier */ ||
+            currentType === 10 /* TokenTypes.LinkedDelimiter */) &&
+            (ch === CHAR_LF || ch === CHAR_SP)) {
+            emitError(CompileErrorCodes.INVALID_LINKED_FORMAT, currentPosition(), 0);
+        }
+        switch (ch) {
+            case "@" /* TokenChars.LinkedAlias */:
+                scnr.next();
+                token = getToken(context, 8 /* TokenTypes.LinkedAlias */, "@" /* TokenChars.LinkedAlias */);
+                context.inLinked = true;
+                return token;
+            case "." /* TokenChars.LinkedDot */:
+                skipSpaces(scnr);
+                scnr.next();
+                return getToken(context, 9 /* TokenTypes.LinkedDot */, "." /* TokenChars.LinkedDot */);
+            case ":" /* TokenChars.LinkedDelimiter */:
+                skipSpaces(scnr);
+                scnr.next();
+                return getToken(context, 10 /* TokenTypes.LinkedDelimiter */, ":" /* TokenChars.LinkedDelimiter */);
+            default:
+                if (isPluralStart(scnr)) {
+                    token = getToken(context, 1 /* TokenTypes.Pipe */, readPlural(scnr));
+                    // reset
+                    context.braceNest = 0;
+                    context.inLinked = false;
+                    return token;
+                }
+                if (isLinkedDotStart(scnr, context) ||
+                    isLinkedDelimiterStart(scnr, context)) {
+                    skipSpaces(scnr);
+                    return readTokenInLinked(scnr, context);
+                }
+                if (isLinkedModifierStart(scnr, context)) {
+                    skipSpaces(scnr);
+                    return getToken(context, 12 /* TokenTypes.LinkedModifier */, readLinkedModifier(scnr));
+                }
+                if (isLinkedReferStart(scnr, context)) {
+                    skipSpaces(scnr);
+                    if (ch === "{" /* TokenChars.BraceLeft */) {
+                        // scan the placeholder
+                        return readTokenInPlaceholder(scnr, context) || token;
+                    }
+                    else {
+                        return getToken(context, 11 /* TokenTypes.LinkedKey */, readLinkedRefer(scnr));
+                    }
+                }
+                if (currentType === 8 /* TokenTypes.LinkedAlias */) {
+                    emitError(CompileErrorCodes.INVALID_LINKED_FORMAT, currentPosition(), 0);
+                }
+                context.braceNest = 0;
+                context.inLinked = false;
+                return readToken(scnr, context);
+        }
+    }
+    // TODO: We need refactoring of token parsing ...
+    function readToken(scnr, context) {
+        let token = { type: 14 /* TokenTypes.EOF */ };
+        if (context.braceNest > 0) {
+            return readTokenInPlaceholder(scnr, context) || getEndToken(context);
+        }
+        if (context.inLinked) {
+            return readTokenInLinked(scnr, context) || getEndToken(context);
+        }
+        const ch = scnr.currentChar();
+        switch (ch) {
+            case "{" /* TokenChars.BraceLeft */:
+                return readTokenInPlaceholder(scnr, context) || getEndToken(context);
+            case "}" /* TokenChars.BraceRight */:
+                emitError(CompileErrorCodes.UNBALANCED_CLOSING_BRACE, currentPosition(), 0);
+                scnr.next();
+                return getToken(context, 3 /* TokenTypes.BraceRight */, "}" /* TokenChars.BraceRight */);
+            case "@" /* TokenChars.LinkedAlias */:
+                return readTokenInLinked(scnr, context) || getEndToken(context);
+            default: {
+                if (isPluralStart(scnr)) {
+                    token = getToken(context, 1 /* TokenTypes.Pipe */, readPlural(scnr));
+                    // reset
+                    context.braceNest = 0;
+                    context.inLinked = false;
+                    return token;
+                }
+                const { isModulo, hasSpace } = detectModuloStart(scnr);
+                if (isModulo) {
+                    return hasSpace
+                        ? getToken(context, 0 /* TokenTypes.Text */, readText(scnr))
+                        : getToken(context, 4 /* TokenTypes.Modulo */, readModulo(scnr));
+                }
+                if (isTextStart(scnr)) {
+                    return getToken(context, 0 /* TokenTypes.Text */, readText(scnr));
+                }
+                break;
+            }
+        }
+        return token;
+    }
+    function nextToken() {
+        const { currentType, offset, startLoc, endLoc } = _context;
+        _context.lastType = currentType;
+        _context.lastOffset = offset;
+        _context.lastStartLoc = startLoc;
+        _context.lastEndLoc = endLoc;
+        _context.offset = currentOffset();
+        _context.startLoc = currentPosition();
+        if (_scnr.currentChar() === EOF) {
+            return getToken(_context, 14 /* TokenTypes.EOF */);
+        }
+        return readToken(_scnr, _context);
+    }
+    return {
+        nextToken,
+        currentOffset,
+        currentPosition,
+        context
+    };
+}
+
+const ERROR_DOMAIN = 'parser';
+// Backslash backslash, backslash quote, uHHHH, UHHHHHH.
+const KNOWN_ESCAPES = /(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;
+function fromEscapeSequence(match, codePoint4, codePoint6) {
+    switch (match) {
+        case `\\\\`:
+            return `\\`;
+        // eslint-disable-next-line no-useless-escape
+        case `\\\'`:
+            // eslint-disable-next-line no-useless-escape
+            return `\'`;
+        default: {
+            const codePoint = parseInt(codePoint4 || codePoint6, 16);
+            if (codePoint <= 0xd7ff || codePoint >= 0xe000) {
+                return String.fromCodePoint(codePoint);
+            }
+            // invalid ...
+            // Replace them with U+FFFD REPLACEMENT CHARACTER.
+            return '�';
+        }
+    }
+}
+function createParser(options = {}) {
+    const location = options.location !== false;
+    const { onError, onWarn } = options;
+    function emitError(tokenzer, code, start, offset, ...args) {
+        const end = tokenzer.currentPosition();
+        end.offset += offset;
+        end.column += offset;
+        if (onError) {
+            const loc = location ? createLocation(start, end) : null;
+            const err = createCompileError(code, loc, {
+                domain: ERROR_DOMAIN,
+                args
+            });
+            onError(err);
+        }
+    }
+    function emitWarn(tokenzer, code, start, offset, ...args) {
+        const end = tokenzer.currentPosition();
+        end.offset += offset;
+        end.column += offset;
+        if (onWarn) {
+            const loc = location ? createLocation(start, end) : null;
+            onWarn(createCompileWarn(code, loc, args));
+        }
+    }
+    function startNode(type, offset, loc) {
+        const node = { type };
+        if (location) {
+            node.start = offset;
+            node.end = offset;
+            node.loc = { start: loc, end: loc };
+        }
+        return node;
+    }
+    function endNode(node, offset, pos, type) {
+        if (type) {
+            node.type = type;
+        }
+        if (location) {
+            node.end = offset;
+            if (node.loc) {
+                node.loc.end = pos;
+            }
+        }
+    }
+    function parseText(tokenizer, value) {
+        const context = tokenizer.context();
+        const node = startNode(3 /* NodeTypes.Text */, context.offset, context.startLoc);
+        node.value = value;
+        endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());
+        return node;
+    }
+    function parseList(tokenizer, index) {
+        const context = tokenizer.context();
+        const { lastOffset: offset, lastStartLoc: loc } = context; // get brace left loc
+        const node = startNode(5 /* NodeTypes.List */, offset, loc);
+        node.index = parseInt(index, 10);
+        tokenizer.nextToken(); // skip brach right
+        endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());
+        return node;
+    }
+    function parseNamed(tokenizer, key, modulo) {
+        const context = tokenizer.context();
+        const { lastOffset: offset, lastStartLoc: loc } = context; // get brace left loc
+        const node = startNode(4 /* NodeTypes.Named */, offset, loc);
+        node.key = key;
+        if (modulo === true) {
+            node.modulo = true;
+        }
+        tokenizer.nextToken(); // skip brach right
+        endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());
+        return node;
+    }
+    function parseLiteral(tokenizer, value) {
+        const context = tokenizer.context();
+        const { lastOffset: offset, lastStartLoc: loc } = context; // get brace left loc
+        const node = startNode(9 /* NodeTypes.Literal */, offset, loc);
+        node.value = value.replace(KNOWN_ESCAPES, fromEscapeSequence);
+        tokenizer.nextToken(); // skip brach right
+        endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());
+        return node;
+    }
+    function parseLinkedModifier(tokenizer) {
+        const token = tokenizer.nextToken();
+        const context = tokenizer.context();
+        const { lastOffset: offset, lastStartLoc: loc } = context; // get linked dot loc
+        const node = startNode(8 /* NodeTypes.LinkedModifier */, offset, loc);
+        if (token.type !== 12 /* TokenTypes.LinkedModifier */) {
+            // empty modifier
+            emitError(tokenizer, CompileErrorCodes.UNEXPECTED_EMPTY_LINKED_MODIFIER, context.lastStartLoc, 0);
+            node.value = '';
+            endNode(node, offset, loc);
+            return {
+                nextConsumeToken: token,
+                node
+            };
+        }
+        // check token
+        if (token.value == null) {
+            emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));
+        }
+        node.value = token.value || '';
+        endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());
+        return {
+            node
+        };
+    }
+    function parseLinkedKey(tokenizer, value) {
+        const context = tokenizer.context();
+        const node = startNode(7 /* NodeTypes.LinkedKey */, context.offset, context.startLoc);
+        node.value = value;
+        endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());
+        return node;
+    }
+    function parseLinked(tokenizer) {
+        const context = tokenizer.context();
+        const linkedNode = startNode(6 /* NodeTypes.Linked */, context.offset, context.startLoc);
+        let token = tokenizer.nextToken();
+        if (token.type === 9 /* TokenTypes.LinkedDot */) {
+            const parsed = parseLinkedModifier(tokenizer);
+            linkedNode.modifier = parsed.node;
+            token = parsed.nextConsumeToken || tokenizer.nextToken();
+        }
+        // asset check token
+        if (token.type !== 10 /* TokenTypes.LinkedDelimiter */) {
+            emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));
+        }
+        token = tokenizer.nextToken();
+        // skip brace left
+        if (token.type === 2 /* TokenTypes.BraceLeft */) {
+            token = tokenizer.nextToken();
+        }
+        switch (token.type) {
+            case 11 /* TokenTypes.LinkedKey */:
+                if (token.value == null) {
+                    emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));
+                }
+                linkedNode.key = parseLinkedKey(tokenizer, token.value || '');
+                break;
+            case 5 /* TokenTypes.Named */:
+                if (token.value == null) {
+                    emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));
+                }
+                linkedNode.key = parseNamed(tokenizer, token.value || '');
+                break;
+            case 6 /* TokenTypes.List */:
+                if (token.value == null) {
+                    emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));
+                }
+                linkedNode.key = parseList(tokenizer, token.value || '');
+                break;
+            case 7 /* TokenTypes.Literal */:
+                if (token.value == null) {
+                    emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));
+                }
+                linkedNode.key = parseLiteral(tokenizer, token.value || '');
+                break;
+            default: {
+                // empty key
+                emitError(tokenizer, CompileErrorCodes.UNEXPECTED_EMPTY_LINKED_KEY, context.lastStartLoc, 0);
+                const nextContext = tokenizer.context();
+                const emptyLinkedKeyNode = startNode(7 /* NodeTypes.LinkedKey */, nextContext.offset, nextContext.startLoc);
+                emptyLinkedKeyNode.value = '';
+                endNode(emptyLinkedKeyNode, nextContext.offset, nextContext.startLoc);
+                linkedNode.key = emptyLinkedKeyNode;
+                endNode(linkedNode, nextContext.offset, nextContext.startLoc);
+                return {
+                    nextConsumeToken: token,
+                    node: linkedNode
+                };
+            }
+        }
+        endNode(linkedNode, tokenizer.currentOffset(), tokenizer.currentPosition());
+        return {
+            node: linkedNode
+        };
+    }
+    function parseMessage(tokenizer) {
+        const context = tokenizer.context();
+        const startOffset = context.currentType === 1 /* TokenTypes.Pipe */
+            ? tokenizer.currentOffset()
+            : context.offset;
+        const startLoc = context.currentType === 1 /* TokenTypes.Pipe */
+            ? context.endLoc
+            : context.startLoc;
+        const node = startNode(2 /* NodeTypes.Message */, startOffset, startLoc);
+        node.items = [];
+        let nextToken = null;
+        let modulo = null;
+        do {
+            const token = nextToken || tokenizer.nextToken();
+            nextToken = null;
+            switch (token.type) {
+                case 0 /* TokenTypes.Text */:
+                    if (token.value == null) {
+                        emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));
+                    }
+                    node.items.push(parseText(tokenizer, token.value || ''));
+                    break;
+                case 6 /* TokenTypes.List */:
+                    if (token.value == null) {
+                        emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));
+                    }
+                    node.items.push(parseList(tokenizer, token.value || ''));
+                    break;
+                case 4 /* TokenTypes.Modulo */:
+                    modulo = true;
+                    break;
+                case 5 /* TokenTypes.Named */:
+                    if (token.value == null) {
+                        emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));
+                    }
+                    node.items.push(parseNamed(tokenizer, token.value || '', !!modulo));
+                    if (modulo) {
+                        emitWarn(tokenizer, CompileWarnCodes.USE_MODULO_SYNTAX, context.lastStartLoc, 0, getTokenCaption(token));
+                        modulo = null;
+                    }
+                    break;
+                case 7 /* TokenTypes.Literal */:
+                    if (token.value == null) {
+                        emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, getTokenCaption(token));
+                    }
+                    node.items.push(parseLiteral(tokenizer, token.value || ''));
+                    break;
+                case 8 /* TokenTypes.LinkedAlias */: {
+                    const parsed = parseLinked(tokenizer);
+                    node.items.push(parsed.node);
+                    nextToken = parsed.nextConsumeToken || null;
+                    break;
+                }
+            }
+        } while (context.currentType !== 14 /* TokenTypes.EOF */ &&
+            context.currentType !== 1 /* TokenTypes.Pipe */);
+        // adjust message node loc
+        const endOffset = context.currentType === 1 /* TokenTypes.Pipe */
+            ? context.lastOffset
+            : tokenizer.currentOffset();
+        const endLoc = context.currentType === 1 /* TokenTypes.Pipe */
+            ? context.lastEndLoc
+            : tokenizer.currentPosition();
+        endNode(node, endOffset, endLoc);
+        return node;
+    }
+    function parsePlural(tokenizer, offset, loc, msgNode) {
+        const context = tokenizer.context();
+        let hasEmptyMessage = msgNode.items.length === 0;
+        const node = startNode(1 /* NodeTypes.Plural */, offset, loc);
+        node.cases = [];
+        node.cases.push(msgNode);
+        do {
+            const msg = parseMessage(tokenizer);
+            if (!hasEmptyMessage) {
+                hasEmptyMessage = msg.items.length === 0;
+            }
+            node.cases.push(msg);
+        } while (context.currentType !== 14 /* TokenTypes.EOF */);
+        if (hasEmptyMessage) {
+            emitError(tokenizer, CompileErrorCodes.MUST_HAVE_MESSAGES_IN_PLURAL, loc, 0);
+        }
+        endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());
+        return node;
+    }
+    function parseResource(tokenizer) {
+        const context = tokenizer.context();
+        const { offset, startLoc } = context;
+        const msgNode = parseMessage(tokenizer);
+        if (context.currentType === 14 /* TokenTypes.EOF */) {
+            return msgNode;
+        }
+        else {
+            return parsePlural(tokenizer, offset, startLoc, msgNode);
+        }
+    }
+    function parse(source) {
+        const tokenizer = createTokenizer(source, shared.assign({}, options));
+        const context = tokenizer.context();
+        const node = startNode(0 /* NodeTypes.Resource */, context.offset, context.startLoc);
+        if (location && node.loc) {
+            node.loc.source = source;
+        }
+        node.body = parseResource(tokenizer);
+        if (options.onCacheKey) {
+            node.cacheKey = options.onCacheKey(source);
+        }
+        // assert whether achieved to EOF
+        if (context.currentType !== 14 /* TokenTypes.EOF */) {
+            emitError(tokenizer, CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS, context.lastStartLoc, 0, source[context.offset] || '');
+        }
+        endNode(node, tokenizer.currentOffset(), tokenizer.currentPosition());
+        return node;
+    }
+    return { parse };
+}
+function getTokenCaption(token) {
+    if (token.type === 14 /* TokenTypes.EOF */) {
+        return 'EOF';
+    }
+    const name = (token.value || '').replace(/\r?\n/gu, '\\n');
+    return name.length > 10 ? name.slice(0, 9) + '…' : name;
+}
+
+function createTransformer(ast, options = {} // eslint-disable-line
+) {
+    const _context = {
+        ast,
+        helpers: new Set()
+    };
+    const context = () => _context;
+    const helper = (name) => {
+        _context.helpers.add(name);
+        return name;
+    };
+    return { context, helper };
+}
+function traverseNodes(nodes, transformer) {
+    for (let i = 0; i < nodes.length; i++) {
+        traverseNode(nodes[i], transformer);
+    }
+}
+function traverseNode(node, transformer) {
+    // TODO: if we need pre-hook of transform, should be implemented to here
+    switch (node.type) {
+        case 1 /* NodeTypes.Plural */:
+            traverseNodes(node.cases, transformer);
+            transformer.helper("plural" /* HelperNameMap.PLURAL */);
+            break;
+        case 2 /* NodeTypes.Message */:
+            traverseNodes(node.items, transformer);
+            break;
+        case 6 /* NodeTypes.Linked */: {
+            const linked = node;
+            traverseNode(linked.key, transformer);
+            transformer.helper("linked" /* HelperNameMap.LINKED */);
+            transformer.helper("type" /* HelperNameMap.TYPE */);
+            break;
+        }
+        case 5 /* NodeTypes.List */:
+            transformer.helper("interpolate" /* HelperNameMap.INTERPOLATE */);
+            transformer.helper("list" /* HelperNameMap.LIST */);
+            break;
+        case 4 /* NodeTypes.Named */:
+            transformer.helper("interpolate" /* HelperNameMap.INTERPOLATE */);
+            transformer.helper("named" /* HelperNameMap.NAMED */);
+            break;
+    }
+    // TODO: if we need post-hook of transform, should be implemented to here
+}
+// transform AST
+function transform(ast, options = {} // eslint-disable-line
+) {
+    const transformer = createTransformer(ast);
+    transformer.helper("normalize" /* HelperNameMap.NORMALIZE */);
+    // traverse
+    ast.body && traverseNode(ast.body, transformer);
+    // set meta information
+    const context = transformer.context();
+    ast.helpers = Array.from(context.helpers);
+}
+
+function optimize(ast) {
+    const body = ast.body;
+    if (body.type === 2 /* NodeTypes.Message */) {
+        optimizeMessageNode(body);
+    }
+    else {
+        body.cases.forEach(c => optimizeMessageNode(c));
+    }
+    return ast;
+}
+function optimizeMessageNode(message) {
+    if (message.items.length === 1) {
+        const item = message.items[0];
+        if (item.type === 3 /* NodeTypes.Text */ || item.type === 9 /* NodeTypes.Literal */) {
+            message.static = item.value;
+            delete item.value; // optimization for size
+        }
+    }
+    else {
+        const values = [];
+        for (let i = 0; i < message.items.length; i++) {
+            const item = message.items[i];
+            if (!(item.type === 3 /* NodeTypes.Text */ || item.type === 9 /* NodeTypes.Literal */)) {
+                break;
+            }
+            if (item.value == null) {
+                break;
+            }
+            values.push(item.value);
+        }
+        if (values.length === message.items.length) {
+            message.static = shared.join(values);
+            for (let i = 0; i < message.items.length; i++) {
+                const item = message.items[i];
+                if (item.type === 3 /* NodeTypes.Text */ || item.type === 9 /* NodeTypes.Literal */) {
+                    delete item.value; // optimization for size
+                }
+            }
+        }
+    }
+}
+
+/* eslint-disable @typescript-eslint/no-explicit-any */
+function minify(node) {
+    node.t = node.type;
+    switch (node.type) {
+        case 0 /* NodeTypes.Resource */: {
+            const resource = node;
+            minify(resource.body);
+            resource.b = resource.body;
+            delete resource.body;
+            break;
+        }
+        case 1 /* NodeTypes.Plural */: {
+            const plural = node;
+            const cases = plural.cases;
+            for (let i = 0; i < cases.length; i++) {
+                minify(cases[i]);
+            }
+            plural.c = cases;
+            delete plural.cases;
+            break;
+        }
+        case 2 /* NodeTypes.Message */: {
+            const message = node;
+            const items = message.items;
+            for (let i = 0; i < items.length; i++) {
+                minify(items[i]);
+            }
+            message.i = items;
+            delete message.items;
+            if (message.static) {
+                message.s = message.static;
+                delete message.static;
+            }
+            break;
+        }
+        case 3 /* NodeTypes.Text */:
+        case 9 /* NodeTypes.Literal */:
+        case 8 /* NodeTypes.LinkedModifier */:
+        case 7 /* NodeTypes.LinkedKey */: {
+            const valueNode = node;
+            if (valueNode.value) {
+                valueNode.v = valueNode.value;
+                delete valueNode.value;
+            }
+            break;
+        }
+        case 6 /* NodeTypes.Linked */: {
+            const linked = node;
+            minify(linked.key);
+            linked.k = linked.key;
+            delete linked.key;
+            if (linked.modifier) {
+                minify(linked.modifier);
+                linked.m = linked.modifier;
+                delete linked.modifier;
+            }
+            break;
+        }
+        case 5 /* NodeTypes.List */: {
+            const list = node;
+            list.i = list.index;
+            delete list.index;
+            break;
+        }
+        case 4 /* NodeTypes.Named */: {
+            const named = node;
+            named.k = named.key;
+            delete named.key;
+            break;
+        }
+    }
+    delete node.type;
+}
+/* eslint-enable @typescript-eslint/no-explicit-any */
+
+// eslint-disable-next-line @typescript-eslint/triple-slash-reference
+/// <reference types="source-map-js" />
+function createCodeGenerator(ast, options) {
+    const { sourceMap, filename, breakLineCode, needIndent: _needIndent } = options;
+    const location = options.location !== false;
+    const _context = {
+        filename,
+        code: '',
+        column: 1,
+        line: 1,
+        offset: 0,
+        map: undefined,
+        breakLineCode,
+        needIndent: _needIndent,
+        indentLevel: 0
+    };
+    if (location && ast.loc) {
+        _context.source = ast.loc.source;
+    }
+    const context = () => _context;
+    function push(code, node) {
+        _context.code += code;
+        if (_context.map) {
+            if (node && node.loc && node.loc !== LOCATION_STUB) {
+                addMapping(node.loc.start, getMappingName(node));
+            }
+            advancePositionWithSource(_context, code);
+        }
+    }
+    function _newline(n, withBreakLine = true) {
+        const _breakLineCode = withBreakLine ? breakLineCode : '';
+        push(_needIndent ? _breakLineCode + `  `.repeat(n) : _breakLineCode);
+    }
+    function indent(withNewLine = true) {
+        const level = ++_context.indentLevel;
+        withNewLine && _newline(level);
+    }
+    function deindent(withNewLine = true) {
+        const level = --_context.indentLevel;
+        withNewLine && _newline(level);
+    }
+    function newline() {
+        _newline(_context.indentLevel);
+    }
+    const helper = (key) => `_${key}`;
+    const needIndent = () => _context.needIndent;
+    function addMapping(loc, name) {
+        _context.map.addMapping({
+            name,
+            source: _context.filename,
+            original: {
+                line: loc.line,
+                column: loc.column - 1
+            },
+            generated: {
+                line: _context.line,
+                column: _context.column - 1
+            }
+        });
+    }
+    if (location && sourceMap) {
+        _context.map = new sourceMapJs.SourceMapGenerator();
+        _context.map.setSourceContent(filename, _context.source);
+    }
+    return {
+        context,
+        push,
+        indent,
+        deindent,
+        newline,
+        helper,
+        needIndent
+    };
+}
+function generateLinkedNode(generator, node) {
+    const { helper } = generator;
+    generator.push(`${helper("linked" /* HelperNameMap.LINKED */)}(`);
+    generateNode(generator, node.key);
+    if (node.modifier) {
+        generator.push(`, `);
+        generateNode(generator, node.modifier);
+        generator.push(`, _type`);
+    }
+    else {
+        generator.push(`, undefined, _type`);
+    }
+    generator.push(`)`);
+}
+function generateMessageNode(generator, node) {
+    const { helper, needIndent } = generator;
+    generator.push(`${helper("normalize" /* HelperNameMap.NORMALIZE */)}([`);
+    generator.indent(needIndent());
+    const length = node.items.length;
+    for (let i = 0; i < length; i++) {
+        generateNode(generator, node.items[i]);
+        if (i === length - 1) {
+            break;
+        }
+        generator.push(', ');
+    }
+    generator.deindent(needIndent());
+    generator.push('])');
+}
+function generatePluralNode(generator, node) {
+    const { helper, needIndent } = generator;
+    if (node.cases.length > 1) {
+        generator.push(`${helper("plural" /* HelperNameMap.PLURAL */)}([`);
+        generator.indent(needIndent());
+        const length = node.cases.length;
+        for (let i = 0; i < length; i++) {
+            generateNode(generator, node.cases[i]);
+            if (i === length - 1) {
+                break;
+            }
+            generator.push(', ');
+        }
+        generator.deindent(needIndent());
+        generator.push(`])`);
+    }
+}
+function generateResource(generator, node) {
+    if (node.body) {
+        generateNode(generator, node.body);
+    }
+    else {
+        generator.push('null');
+    }
+}
+function generateNode(generator, node) {
+    const { helper } = generator;
+    switch (node.type) {
+        case 0 /* NodeTypes.Resource */:
+            generateResource(generator, node);
+            break;
+        case 1 /* NodeTypes.Plural */:
+            generatePluralNode(generator, node);
+            break;
+        case 2 /* NodeTypes.Message */:
+            generateMessageNode(generator, node);
+            break;
+        case 6 /* NodeTypes.Linked */:
+            generateLinkedNode(generator, node);
+            break;
+        case 8 /* NodeTypes.LinkedModifier */:
+            generator.push(JSON.stringify(node.value), node);
+            break;
+        case 7 /* NodeTypes.LinkedKey */:
+            generator.push(JSON.stringify(node.value), node);
+            break;
+        case 5 /* NodeTypes.List */:
+            generator.push(`${helper("interpolate" /* HelperNameMap.INTERPOLATE */)}(${helper("list" /* HelperNameMap.LIST */)}(${node.index}))`, node);
+            break;
+        case 4 /* NodeTypes.Named */:
+            generator.push(`${helper("interpolate" /* HelperNameMap.INTERPOLATE */)}(${helper("named" /* HelperNameMap.NAMED */)}(${JSON.stringify(node.key)}))`, node);
+            break;
+        case 9 /* NodeTypes.Literal */:
+            generator.push(JSON.stringify(node.value), node);
+            break;
+        case 3 /* NodeTypes.Text */:
+            generator.push(JSON.stringify(node.value), node);
+            break;
+    }
+}
+// generate code from AST
+const generate = (ast, options = {} // eslint-disable-line
+) => {
+    const mode = shared.isString(options.mode) ? options.mode : 'normal';
+    const filename = shared.isString(options.filename)
+        ? options.filename
+        : 'message.intl';
+    const sourceMap = !!options.sourceMap;
+    // prettier-ignore
+    const breakLineCode = options.breakLineCode != null
+        ? options.breakLineCode
+        : mode === 'arrow'
+            ? ';'
+            : '\n';
+    const needIndent = options.needIndent ? options.needIndent : mode !== 'arrow';
+    const helpers = ast.helpers || [];
+    const generator = createCodeGenerator(ast, {
+        mode,
+        filename,
+        sourceMap,
+        breakLineCode,
+        needIndent
+    });
+    generator.push(mode === 'normal' ? `function __msg__ (ctx) {` : `(ctx) => {`);
+    generator.indent(needIndent);
+    if (helpers.length > 0) {
+        generator.push(`const { ${shared.join(helpers.map(s => `${s}: _${s}`), ', ')} } = ctx`);
+        generator.newline();
+    }
+    generator.push(`return `);
+    generateNode(generator, ast);
+    generator.deindent(needIndent);
+    generator.push(`}`);
+    delete ast.helpers;
+    const { code, map } = generator.context();
+    return {
+        ast,
+        code,
+        map: map ? map.toJSON() : undefined // eslint-disable-line @typescript-eslint/no-explicit-any
+    };
+};
+function getMappingName(node) {
+    switch (node.type) {
+        case 3 /* NodeTypes.Text */:
+        case 9 /* NodeTypes.Literal */:
+        case 8 /* NodeTypes.LinkedModifier */:
+        case 7 /* NodeTypes.LinkedKey */:
+            return node.value;
+        case 5 /* NodeTypes.List */:
+            return node.index.toString();
+        case 4 /* NodeTypes.Named */:
+            return node.key;
+        default:
+            return undefined;
+    }
+}
+function advancePositionWithSource(pos, source, numberOfCharacters = source.length) {
+    let linesCount = 0;
+    let lastNewLinePos = -1;
+    for (let i = 0; i < numberOfCharacters; i++) {
+        if (source.charCodeAt(i) === 10 /* newline char code */) {
+            linesCount++;
+            lastNewLinePos = i;
+        }
+    }
+    pos.offset += numberOfCharacters;
+    pos.line += linesCount;
+    pos.column =
+        lastNewLinePos === -1
+            ? pos.column + numberOfCharacters
+            : numberOfCharacters - lastNewLinePos;
+    return pos;
+}
+
+function baseCompile(source, options = {}) {
+    const assignedOptions = shared.assign({}, options);
+    const jit = !!assignedOptions.jit;
+    const enalbeMinify = !!assignedOptions.minify;
+    const enambeOptimize = assignedOptions.optimize == null ? true : assignedOptions.optimize;
+    // parse source codes
+    const parser = createParser(assignedOptions);
+    const ast = parser.parse(source);
+    if (!jit) {
+        // transform ASTs
+        transform(ast, assignedOptions);
+        // generate javascript codes
+        return generate(ast, assignedOptions);
+    }
+    else {
+        // optimize ASTs
+        enambeOptimize && optimize(ast);
+        // minimize ASTs
+        enalbeMinify && minify(ast);
+        // In JIT mode, no ast transform, no code generation.
+        return { ast, code: '' };
+    }
+}
+
+exports.CompileErrorCodes = CompileErrorCodes;
+exports.CompileWarnCodes = CompileWarnCodes;
+exports.ERROR_DOMAIN = ERROR_DOMAIN;
+exports.LOCATION_STUB = LOCATION_STUB;
+exports.baseCompile = baseCompile;
+exports.createCompileError = createCompileError;
+exports.createCompileWarn = createCompileWarn;
+exports.createLocation = createLocation;
+exports.createParser = createParser;
+exports.createPosition = createPosition;
+exports.defaultOnError = defaultOnError;
+exports.detectHtmlTag = detectHtmlTag;
+exports.errorMessages = errorMessages;
+exports.warnMessages = warnMessages;

+ 7 - 0
node_modules/@intlify/message-compiler/index.js

@@ -0,0 +1,7 @@
+'use strict'
+
+if (process.env.NODE_ENV === 'production') {
+  module.exports = require('./dist/message-compiler.prod.cjs')
+} else {
+  module.exports = require('./dist/message-compiler.cjs')
+}

+ 79 - 0
node_modules/@intlify/message-compiler/package.json

@@ -0,0 +1,79 @@
+{
+  "name": "@intlify/message-compiler",
+  "version": "9.13.1",
+  "description": "@intlify/message-compiler",
+  "keywords": [
+    "compiler",
+    "i18n",
+    "internationalization",
+    "intlify",
+    "message-format"
+  ],
+  "license": "MIT",
+  "author": {
+    "name": "kazuya kawaguchi",
+    "email": "kawakazu80@gmail.com"
+  },
+  "homepage": "https://github.com/intlify/vue-i18n-next/tree/master/packages/message-compiler#readme",
+  "repository": {
+    "type": "git",
+    "url": "git+https://github.com/intlify/vue-i18n-next.git",
+    "directory": "packages/message-compiler"
+  },
+  "bugs": {
+    "url": "https://github.com/intlify/vue-i18n-next/issues"
+  },
+  "files": [
+    "index.js",
+    "dist"
+  ],
+  "main": "index.js",
+  "module": "dist/message-compiler.mjs",
+  "unpkg": "dist/message-compiler.global.js",
+  "jsdelivr": "dist/message-compiler.global.js",
+  "types": "dist/message-compiler.d.ts",
+  "dependencies": {
+    "source-map-js": "^1.0.2",
+    "@intlify/shared": "9.13.1"
+  },
+  "engines": {
+    "node": ">= 16"
+  },
+  "buildOptions": {
+    "name": "IntlifyMessageCompiler",
+    "formats": [
+      "mjs",
+      "mjs-node",
+      "browser",
+      "cjs",
+      "global"
+    ],
+    "enableFullBundleForEsmBrowser": true
+  },
+  "exports": {
+    ".": {
+      "types": "./dist/message-compiler.d.ts",
+      "browser": "./dist/message-compiler.esm-browser.js",
+      "node": {
+        "import": {
+          "production": "./dist/message-compiler.node.mjs",
+          "development": "./dist/message-compiler.node.mjs",
+          "default": "./dist/message-compiler.node.mjs"
+        },
+        "require": {
+          "production": "./dist/message-compiler.prod.cjs",
+          "development": "./dist/message-compiler.cjs",
+          "default": "./index.js"
+        }
+      },
+      "import": "./dist/message-compiler.mjs"
+    },
+    "./dist/*": "./dist/*",
+    "./package.json": "./package.json"
+  },
+  "funding": "https://github.com/sponsors/kazupon",
+  "publishConfig": {
+    "access": "public"
+  },
+  "sideEffects": false
+}

+ 20 - 0
node_modules/@intlify/shared/LICENSE

@@ -0,0 +1,20 @@
+The MIT License (MIT)
+
+Copyright (c) 2020 kazuya kawaguchi
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ 18 - 0
node_modules/@intlify/shared/README.md

@@ -0,0 +1,18 @@
+# @intlify/shared
+
+The shared utility package for intlify project
+
+## Forks
+The implementation of this module is contains code forked from other packages or projects:
+
+- [@vue/shared](https://github.com/vuejs/vue-next/tree/master/packages/shared)
+  - Useful Utilities at `utils.ts`
+    - Author: Evan You
+    - License: MIT
+  - Event Emitter at `emitter.ts` and `emittable.ts`
+    - Author: Jason Miller
+    - License: MIT
+
+## :copyright: License
+
+[MIT](http://opensource.org/licenses/MIT)

+ 272 - 0
node_modules/@intlify/shared/dist/shared.cjs

@@ -0,0 +1,272 @@
+/*!
+  * shared v9.13.1
+  * (c) 2024 kazuya kawaguchi
+  * Released under the MIT License.
+  */
+'use strict';
+
+/**
+ * Original Utilities
+ * written by kazuya kawaguchi
+ */
+const inBrowser = typeof window !== 'undefined';
+exports.mark = void 0;
+exports.measure = void 0;
+{
+    const perf = inBrowser && window.performance;
+    if (perf &&
+        perf.mark &&
+        perf.measure &&
+        perf.clearMarks &&
+        // @ts-ignore browser compat
+        perf.clearMeasures) {
+        exports.mark = (tag) => {
+            perf.mark(tag);
+        };
+        exports.measure = (name, startTag, endTag) => {
+            perf.measure(name, startTag, endTag);
+            perf.clearMarks(startTag);
+            perf.clearMarks(endTag);
+        };
+    }
+}
+const RE_ARGS = /\{([0-9a-zA-Z]+)\}/g;
+/* eslint-disable */
+function format(message, ...args) {
+    if (args.length === 1 && isObject(args[0])) {
+        args = args[0];
+    }
+    if (!args || !args.hasOwnProperty) {
+        args = {};
+    }
+    return message.replace(RE_ARGS, (match, identifier) => {
+        return args.hasOwnProperty(identifier) ? args[identifier] : '';
+    });
+}
+const makeSymbol = (name, shareable = false) => !shareable ? Symbol(name) : Symbol.for(name);
+const generateFormatCacheKey = (locale, key, source) => friendlyJSONstringify({ l: locale, k: key, s: source });
+const friendlyJSONstringify = (json) => JSON.stringify(json)
+    .replace(/\u2028/g, '\\u2028')
+    .replace(/\u2029/g, '\\u2029')
+    .replace(/\u0027/g, '\\u0027');
+const isNumber = (val) => typeof val === 'number' && isFinite(val);
+const isDate = (val) => toTypeString(val) === '[object Date]';
+const isRegExp = (val) => toTypeString(val) === '[object RegExp]';
+const isEmptyObject = (val) => isPlainObject(val) && Object.keys(val).length === 0;
+const assign = Object.assign;
+let _globalThis;
+const getGlobalThis = () => {
+    // prettier-ignore
+    return (_globalThis ||
+        (_globalThis =
+            typeof globalThis !== 'undefined'
+                ? globalThis
+                : typeof self !== 'undefined'
+                    ? self
+                    : typeof window !== 'undefined'
+                        ? window
+                        : typeof global !== 'undefined'
+                            ? global
+                            : {}));
+};
+function escapeHtml(rawText) {
+    return rawText
+        .replace(/</g, '&lt;')
+        .replace(/>/g, '&gt;')
+        .replace(/"/g, '&quot;')
+        .replace(/'/g, '&apos;');
+}
+const hasOwnProperty = Object.prototype.hasOwnProperty;
+function hasOwn(obj, key) {
+    return hasOwnProperty.call(obj, key);
+}
+/* eslint-enable */
+/**
+ * Useful Utilities By Evan you
+ * Modified by kazuya kawaguchi
+ * MIT License
+ * https://github.com/vuejs/vue-next/blob/master/packages/shared/src/index.ts
+ * https://github.com/vuejs/vue-next/blob/master/packages/shared/src/codeframe.ts
+ */
+const isArray = Array.isArray;
+const isFunction = (val) => typeof val === 'function';
+const isString = (val) => typeof val === 'string';
+const isBoolean = (val) => typeof val === 'boolean';
+const isSymbol = (val) => typeof val === 'symbol';
+// eslint-disable-next-line @typescript-eslint/no-explicit-any
+const isObject = (val) => val !== null && typeof val === 'object';
+// eslint-disable-next-line @typescript-eslint/no-explicit-any
+const isPromise = (val) => {
+    return isObject(val) && isFunction(val.then) && isFunction(val.catch);
+};
+const objectToString = Object.prototype.toString;
+const toTypeString = (value) => objectToString.call(value);
+const isPlainObject = (val) => {
+    if (!isObject(val))
+        return false;
+    const proto = Object.getPrototypeOf(val);
+    return proto === null || proto.constructor === Object;
+};
+// for converting list and named values to displayed strings.
+const toDisplayString = (val) => {
+    return val == null
+        ? ''
+        : isArray(val) || (isPlainObject(val) && val.toString === objectToString)
+            ? JSON.stringify(val, null, 2)
+            : String(val);
+};
+function join(items, separator = '') {
+    return items.reduce((str, item, index) => (index === 0 ? str + item : str + separator + item), '');
+}
+const RANGE = 2;
+function generateCodeFrame(source, start = 0, end = source.length) {
+    const lines = source.split(/\r?\n/);
+    let count = 0;
+    const res = [];
+    for (let i = 0; i < lines.length; i++) {
+        count += lines[i].length + 1;
+        if (count >= start) {
+            for (let j = i - RANGE; j <= i + RANGE || end > count; j++) {
+                if (j < 0 || j >= lines.length)
+                    continue;
+                const line = j + 1;
+                res.push(`${line}${' '.repeat(3 - String(line).length)}|  ${lines[j]}`);
+                const lineLength = lines[j].length;
+                if (j === i) {
+                    // push underline
+                    const pad = start - (count - lineLength) + 1;
+                    const length = Math.max(1, end > count ? lineLength - pad : end - start);
+                    res.push(`   |  ` + ' '.repeat(pad) + '^'.repeat(length));
+                }
+                else if (j > i) {
+                    if (end > count) {
+                        const length = Math.max(Math.min(end - count, lineLength), 1);
+                        res.push(`   |  ` + '^'.repeat(length));
+                    }
+                    count += lineLength + 1;
+                }
+            }
+            break;
+        }
+    }
+    return res.join('\n');
+}
+function incrementer(code) {
+    let current = code;
+    return () => ++current;
+}
+
+function warn(msg, err) {
+    if (typeof console !== 'undefined') {
+        console.warn(`[intlify] ` + msg);
+        /* istanbul ignore if */
+        if (err) {
+            console.warn(err.stack);
+        }
+    }
+}
+const hasWarned = {};
+function warnOnce(msg) {
+    if (!hasWarned[msg]) {
+        hasWarned[msg] = true;
+        warn(msg);
+    }
+}
+
+/**
+ * Event emitter, forked from the below:
+ * - original repository url: https://github.com/developit/mitt
+ * - code url: https://github.com/developit/mitt/blob/master/src/index.ts
+ * - author: Jason Miller (https://github.com/developit)
+ * - license: MIT
+ */
+/**
+ * Create a event emitter
+ *
+ * @returns An event emitter
+ */
+function createEmitter() {
+    const events = new Map();
+    const emitter = {
+        events,
+        on(event, handler) {
+            const handlers = events.get(event);
+            const added = handlers && handlers.push(handler);
+            if (!added) {
+                events.set(event, [handler]);
+            }
+        },
+        off(event, handler) {
+            const handlers = events.get(event);
+            if (handlers) {
+                handlers.splice(handlers.indexOf(handler) >>> 0, 1);
+            }
+        },
+        emit(event, payload) {
+            (events.get(event) || [])
+                .slice()
+                .map(handler => handler(payload));
+            (events.get('*') || [])
+                .slice()
+                .map(handler => handler(event, payload));
+        }
+    };
+    return emitter;
+}
+
+const isNotObjectOrIsArray = (val) => !isObject(val) || isArray(val);
+// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
+function deepCopy(src, des) {
+    // src and des should both be objects, and none of them can be a array
+    if (isNotObjectOrIsArray(src) || isNotObjectOrIsArray(des)) {
+        throw new Error('Invalid value');
+    }
+    const stack = [{ src, des }];
+    while (stack.length) {
+        const { src, des } = stack.pop();
+        Object.keys(src).forEach(key => {
+            if (isNotObjectOrIsArray(src[key]) || isNotObjectOrIsArray(des[key])) {
+                // replace with src[key] when:
+                // src[key] or des[key] is not an object, or
+                // src[key] or des[key] is an array
+                des[key] = src[key];
+            }
+            else {
+                // src[key] and des[key] are both objects, merge them
+                stack.push({ src: src[key], des: des[key] });
+            }
+        });
+    }
+}
+
+exports.assign = assign;
+exports.createEmitter = createEmitter;
+exports.deepCopy = deepCopy;
+exports.escapeHtml = escapeHtml;
+exports.format = format;
+exports.friendlyJSONstringify = friendlyJSONstringify;
+exports.generateCodeFrame = generateCodeFrame;
+exports.generateFormatCacheKey = generateFormatCacheKey;
+exports.getGlobalThis = getGlobalThis;
+exports.hasOwn = hasOwn;
+exports.inBrowser = inBrowser;
+exports.incrementer = incrementer;
+exports.isArray = isArray;
+exports.isBoolean = isBoolean;
+exports.isDate = isDate;
+exports.isEmptyObject = isEmptyObject;
+exports.isFunction = isFunction;
+exports.isNumber = isNumber;
+exports.isObject = isObject;
+exports.isPlainObject = isPlainObject;
+exports.isPromise = isPromise;
+exports.isRegExp = isRegExp;
+exports.isString = isString;
+exports.isSymbol = isSymbol;
+exports.join = join;
+exports.makeSymbol = makeSymbol;
+exports.objectToString = objectToString;
+exports.toDisplayString = toDisplayString;
+exports.toTypeString = toTypeString;
+exports.warn = warn;
+exports.warnOnce = warnOnce;

+ 1 - 0
node_modules/@intlify/shared/dist/shared.cjs.js

@@ -0,0 +1 @@
+module.exports = require('../dist/shared.cjs')

+ 1 - 0
node_modules/@intlify/shared/dist/shared.cjs.prod.js

@@ -0,0 +1 @@
+module.exports = require('../dist/shared.prod.cjs')

+ 157 - 0
node_modules/@intlify/shared/dist/shared.d.ts

@@ -0,0 +1,157 @@
+
+export declare const assign: {
+    <T extends {}, U>(target: T, source: U): T & U;
+    <T_1 extends {}, U_1, V>(target: T_1, source1: U_1, source2: V): T_1 & U_1 & V;
+    <T_2 extends {}, U_2, V_1, W>(target: T_2, source1: U_2, source2: V_1, source3: W): T_2 & U_2 & V_1 & W;
+    (target: object, ...sources: any[]): any;
+};
+
+export declare interface BaseError {
+    code: number;
+}
+
+/**
+ * Create a event emitter
+ *
+ * @returns An event emitter
+ */
+export declare function createEmitter<Events extends Record<EventType, unknown>>(): Emittable<Events>;
+
+export declare function deepCopy(src: any, des: any): void;
+
+/**
+ * Event emitter interface
+ */
+export declare interface Emittable<Events extends Record<EventType, unknown> = {}> {
+    /**
+     * A map of event names of registered event handlers
+     */
+    events: EventHandlerMap<Events>;
+    /**
+     * Register an event handler with the event type
+     *
+     * @param event - An {@link EventType}
+     * @param handler - An {@link EventHandler}, or a {@link WildcardEventHandler} if you are specified "*"
+     */
+    on<Key extends keyof Events>(event: Key | '*', handler: EventHandler<Events[keyof Events]> | WildcardEventHandler<Events>): void;
+    /**
+     * Unregister an event handler for the event type
+     *
+     * @param event - An {@link EventType}
+     * @param handler - An {@link EventHandler}, or a {@link WildcardEventHandler} if you are specified "*"
+     */
+    off<Key extends keyof Events>(event: Key | '*', handler: EventHandler<Events[keyof Events]> | WildcardEventHandler<Events>): void;
+    /**
+     * Invoke all handlers with the event type
+     *
+     * @remarks
+     * Note Manually firing "*" handlers should be not supported
+     *
+     * @param event - An {@link EventType}
+     * @param payload - An event payload, optional
+     */
+    emit<Key extends keyof Events>(event: Key, payload?: Events[keyof Events]): void;
+}
+
+export declare function escapeHtml(rawText: string): string;
+
+/**
+ * Event handler
+ */
+export declare type EventHandler<T = unknown> = (payload?: T) => void;
+
+/**
+ * Event handler list
+ */
+export declare type EventHandlerList<T = unknown> = Array<EventHandler<T>>;
+
+/**
+ * Event handler map
+ */
+export declare type EventHandlerMap<Events extends Record<EventType, unknown>> = Map<keyof Events | '*', EventHandlerList<Events[keyof Events]> | WildcardEventHandlerList<Events>>;
+
+/**
+ * Event type
+ */
+export declare type EventType = string | symbol;
+
+export declare function format(message: string, ...args: any): string;
+
+export declare const friendlyJSONstringify: (json: unknown) => string;
+
+export declare function generateCodeFrame(source: string, start?: number, end?: number): string;
+
+export declare const generateFormatCacheKey: (locale: string, key: string, source: string) => string;
+
+export declare const getGlobalThis: () => any;
+
+export declare function hasOwn(obj: object | Array<any>, key: string): boolean;
+
+/**
+ * Original Utilities
+ * written by kazuya kawaguchi
+ */
+export declare const inBrowser: boolean;
+
+export declare function incrementer(code: number): () => number;
+
+/**
+ * Useful Utilities By Evan you
+ * Modified by kazuya kawaguchi
+ * MIT License
+ * https://github.com/vuejs/vue-next/blob/master/packages/shared/src/index.ts
+ * https://github.com/vuejs/vue-next/blob/master/packages/shared/src/codeframe.ts
+ */
+export declare const isArray: (arg: any) => arg is any[];
+
+export declare const isBoolean: (val: unknown) => val is boolean;
+
+export declare const isDate: (val: unknown) => val is Date;
+
+export declare const isEmptyObject: (val: unknown) => val is boolean;
+
+export declare const isFunction: (val: unknown) => val is Function;
+
+export declare const isNumber: (val: unknown) => val is number;
+
+export declare const isObject: (val: unknown) => val is Record<any, any>;
+
+export declare const isPlainObject: (val: unknown) => val is object;
+
+export declare const isPromise: <T = any>(val: unknown) => val is Promise<T>;
+
+export declare const isRegExp: (val: unknown) => val is RegExp;
+
+export declare const isString: (val: unknown) => val is string;
+
+export declare const isSymbol: (val: unknown) => val is symbol;
+
+export declare function join(items: string[], separator?: string): string;
+
+export declare const makeSymbol: (name: string, shareable?: boolean) => symbol;
+
+export declare let mark: (tag: string) => void | undefined;
+
+export declare let measure: (name: string, startTag: string, endTag: string) => void | undefined;
+
+export declare const objectToString: () => string;
+
+export declare const toDisplayString: (val: unknown) => string;
+
+export declare const toTypeString: (value: unknown) => string;
+
+export declare function warn(msg: string, err?: Error): void;
+
+export declare function warnOnce(msg: string): void;
+
+/**
+ * Wildcard event handler
+ */
+export declare type WildcardEventHandler<T = Record<string, unknown>> = (event: keyof T, payload?: T[keyof T]) => void;
+
+/**
+ * Wildcard event handler list
+ */
+export declare type WildcardEventHandlerList<T = Record<string, unknown>> = Array<WildcardEventHandler<T>>;
+
+export { }

+ 240 - 0
node_modules/@intlify/shared/dist/shared.esm-browser.js

@@ -0,0 +1,240 @@
+/*!
+  * shared v9.13.1
+  * (c) 2024 kazuya kawaguchi
+  * Released under the MIT License.
+  */
+/**
+ * Original Utilities
+ * written by kazuya kawaguchi
+ */
+const inBrowser = typeof window !== 'undefined';
+let mark;
+let measure;
+{
+    const perf = inBrowser && window.performance;
+    if (perf &&
+        perf.mark &&
+        perf.measure &&
+        perf.clearMarks &&
+        // @ts-ignore browser compat
+        perf.clearMeasures) {
+        mark = (tag) => {
+            perf.mark(tag);
+        };
+        measure = (name, startTag, endTag) => {
+            perf.measure(name, startTag, endTag);
+            perf.clearMarks(startTag);
+            perf.clearMarks(endTag);
+        };
+    }
+}
+const RE_ARGS = /\{([0-9a-zA-Z]+)\}/g;
+/* eslint-disable */
+function format(message, ...args) {
+    if (args.length === 1 && isObject(args[0])) {
+        args = args[0];
+    }
+    if (!args || !args.hasOwnProperty) {
+        args = {};
+    }
+    return message.replace(RE_ARGS, (match, identifier) => {
+        return args.hasOwnProperty(identifier) ? args[identifier] : '';
+    });
+}
+const makeSymbol = (name, shareable = false) => !shareable ? Symbol(name) : Symbol.for(name);
+const generateFormatCacheKey = (locale, key, source) => friendlyJSONstringify({ l: locale, k: key, s: source });
+const friendlyJSONstringify = (json) => JSON.stringify(json)
+    .replace(/\u2028/g, '\\u2028')
+    .replace(/\u2029/g, '\\u2029')
+    .replace(/\u0027/g, '\\u0027');
+const isNumber = (val) => typeof val === 'number' && isFinite(val);
+const isDate = (val) => toTypeString(val) === '[object Date]';
+const isRegExp = (val) => toTypeString(val) === '[object RegExp]';
+const isEmptyObject = (val) => isPlainObject(val) && Object.keys(val).length === 0;
+const assign = Object.assign;
+let _globalThis;
+const getGlobalThis = () => {
+    // prettier-ignore
+    return (_globalThis ||
+        (_globalThis =
+            typeof globalThis !== 'undefined'
+                ? globalThis
+                : typeof self !== 'undefined'
+                    ? self
+                    : typeof window !== 'undefined'
+                        ? window
+                        : typeof global !== 'undefined'
+                            ? global
+                            : {}));
+};
+function escapeHtml(rawText) {
+    return rawText
+        .replace(/</g, '&lt;')
+        .replace(/>/g, '&gt;')
+        .replace(/"/g, '&quot;')
+        .replace(/'/g, '&apos;');
+}
+const hasOwnProperty = Object.prototype.hasOwnProperty;
+function hasOwn(obj, key) {
+    return hasOwnProperty.call(obj, key);
+}
+/* eslint-enable */
+/**
+ * Useful Utilities By Evan you
+ * Modified by kazuya kawaguchi
+ * MIT License
+ * https://github.com/vuejs/vue-next/blob/master/packages/shared/src/index.ts
+ * https://github.com/vuejs/vue-next/blob/master/packages/shared/src/codeframe.ts
+ */
+const isArray = Array.isArray;
+const isFunction = (val) => typeof val === 'function';
+const isString = (val) => typeof val === 'string';
+const isBoolean = (val) => typeof val === 'boolean';
+const isSymbol = (val) => typeof val === 'symbol';
+// eslint-disable-next-line @typescript-eslint/no-explicit-any
+const isObject = (val) => val !== null && typeof val === 'object';
+// eslint-disable-next-line @typescript-eslint/no-explicit-any
+const isPromise = (val) => {
+    return isObject(val) && isFunction(val.then) && isFunction(val.catch);
+};
+const objectToString = Object.prototype.toString;
+const toTypeString = (value) => objectToString.call(value);
+const isPlainObject = (val) => {
+    if (!isObject(val))
+        return false;
+    const proto = Object.getPrototypeOf(val);
+    return proto === null || proto.constructor === Object;
+};
+// for converting list and named values to displayed strings.
+const toDisplayString = (val) => {
+    return val == null
+        ? ''
+        : isArray(val) || (isPlainObject(val) && val.toString === objectToString)
+            ? JSON.stringify(val, null, 2)
+            : String(val);
+};
+function join(items, separator = '') {
+    return items.reduce((str, item, index) => (index === 0 ? str + item : str + separator + item), '');
+}
+const RANGE = 2;
+function generateCodeFrame(source, start = 0, end = source.length) {
+    const lines = source.split(/\r?\n/);
+    let count = 0;
+    const res = [];
+    for (let i = 0; i < lines.length; i++) {
+        count += lines[i].length + 1;
+        if (count >= start) {
+            for (let j = i - RANGE; j <= i + RANGE || end > count; j++) {
+                if (j < 0 || j >= lines.length)
+                    continue;
+                const line = j + 1;
+                res.push(`${line}${' '.repeat(3 - String(line).length)}|  ${lines[j]}`);
+                const lineLength = lines[j].length;
+                if (j === i) {
+                    // push underline
+                    const pad = start - (count - lineLength) + 1;
+                    const length = Math.max(1, end > count ? lineLength - pad : end - start);
+                    res.push(`   |  ` + ' '.repeat(pad) + '^'.repeat(length));
+                }
+                else if (j > i) {
+                    if (end > count) {
+                        const length = Math.max(Math.min(end - count, lineLength), 1);
+                        res.push(`   |  ` + '^'.repeat(length));
+                    }
+                    count += lineLength + 1;
+                }
+            }
+            break;
+        }
+    }
+    return res.join('\n');
+}
+function incrementer(code) {
+    let current = code;
+    return () => ++current;
+}
+
+function warn(msg, err) {
+    if (typeof console !== 'undefined') {
+        console.warn(`[intlify] ` + msg);
+        /* istanbul ignore if */
+        if (err) {
+            console.warn(err.stack);
+        }
+    }
+}
+const hasWarned = {};
+function warnOnce(msg) {
+    if (!hasWarned[msg]) {
+        hasWarned[msg] = true;
+        warn(msg);
+    }
+}
+
+/**
+ * Event emitter, forked from the below:
+ * - original repository url: https://github.com/developit/mitt
+ * - code url: https://github.com/developit/mitt/blob/master/src/index.ts
+ * - author: Jason Miller (https://github.com/developit)
+ * - license: MIT
+ */
+/**
+ * Create a event emitter
+ *
+ * @returns An event emitter
+ */
+function createEmitter() {
+    const events = new Map();
+    const emitter = {
+        events,
+        on(event, handler) {
+            const handlers = events.get(event);
+            const added = handlers && handlers.push(handler);
+            if (!added) {
+                events.set(event, [handler]);
+            }
+        },
+        off(event, handler) {
+            const handlers = events.get(event);
+            if (handlers) {
+                handlers.splice(handlers.indexOf(handler) >>> 0, 1);
+            }
+        },
+        emit(event, payload) {
+            (events.get(event) || [])
+                .slice()
+                .map(handler => handler(payload));
+            (events.get('*') || [])
+                .slice()
+                .map(handler => handler(event, payload));
+        }
+    };
+    return emitter;
+}
+
+const isNotObjectOrIsArray = (val) => !isObject(val) || isArray(val);
+// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
+function deepCopy(src, des) {
+    // src and des should both be objects, and none of them can be a array
+    if (isNotObjectOrIsArray(src) || isNotObjectOrIsArray(des)) {
+        throw new Error('Invalid value');
+    }
+    const stack = [{ src, des }];
+    while (stack.length) {
+        const { src, des } = stack.pop();
+        Object.keys(src).forEach(key => {
+            if (isNotObjectOrIsArray(src[key]) || isNotObjectOrIsArray(des[key])) {
+                // replace with src[key] when:
+                // src[key] or des[key] is not an object, or
+                // src[key] or des[key] is an array
+                des[key] = src[key];
+            }
+            else {
+                // src[key] and des[key] are both objects, merge them
+                stack.push({ src: src[key], des: des[key] });
+            }
+        });
+    }
+}
+
+export { assign, createEmitter, deepCopy, escapeHtml, format, friendlyJSONstringify, generateCodeFrame, generateFormatCacheKey, getGlobalThis, hasOwn, inBrowser, incrementer, isArray, isBoolean, isDate, isEmptyObject, isFunction, isNumber, isObject, isPlainObject, isPromise, isRegExp, isString, isSymbol, join, makeSymbol, mark, measure, objectToString, toDisplayString, toTypeString, warn, warnOnce };

Fichier diff supprimé car celui-ci est trop grand
+ 5 - 0
node_modules/@intlify/shared/dist/shared.esm-browser.prod.js


+ 1 - 0
node_modules/@intlify/shared/dist/shared.esm-bundler.js

@@ -0,0 +1 @@
+export * from '../dist/shared.mjs'

+ 240 - 0
node_modules/@intlify/shared/dist/shared.mjs

@@ -0,0 +1,240 @@
+/*!
+  * shared v9.13.1
+  * (c) 2024 kazuya kawaguchi
+  * Released under the MIT License.
+  */
+/**
+ * Original Utilities
+ * written by kazuya kawaguchi
+ */
+const inBrowser = typeof window !== 'undefined';
+let mark;
+let measure;
+if ((process.env.NODE_ENV !== 'production')) {
+    const perf = inBrowser && window.performance;
+    if (perf &&
+        perf.mark &&
+        perf.measure &&
+        perf.clearMarks &&
+        // @ts-ignore browser compat
+        perf.clearMeasures) {
+        mark = (tag) => {
+            perf.mark(tag);
+        };
+        measure = (name, startTag, endTag) => {
+            perf.measure(name, startTag, endTag);
+            perf.clearMarks(startTag);
+            perf.clearMarks(endTag);
+        };
+    }
+}
+const RE_ARGS = /\{([0-9a-zA-Z]+)\}/g;
+/* eslint-disable */
+function format(message, ...args) {
+    if (args.length === 1 && isObject(args[0])) {
+        args = args[0];
+    }
+    if (!args || !args.hasOwnProperty) {
+        args = {};
+    }
+    return message.replace(RE_ARGS, (match, identifier) => {
+        return args.hasOwnProperty(identifier) ? args[identifier] : '';
+    });
+}
+const makeSymbol = (name, shareable = false) => !shareable ? Symbol(name) : Symbol.for(name);
+const generateFormatCacheKey = (locale, key, source) => friendlyJSONstringify({ l: locale, k: key, s: source });
+const friendlyJSONstringify = (json) => JSON.stringify(json)
+    .replace(/\u2028/g, '\\u2028')
+    .replace(/\u2029/g, '\\u2029')
+    .replace(/\u0027/g, '\\u0027');
+const isNumber = (val) => typeof val === 'number' && isFinite(val);
+const isDate = (val) => toTypeString(val) === '[object Date]';
+const isRegExp = (val) => toTypeString(val) === '[object RegExp]';
+const isEmptyObject = (val) => isPlainObject(val) && Object.keys(val).length === 0;
+const assign = Object.assign;
+let _globalThis;
+const getGlobalThis = () => {
+    // prettier-ignore
+    return (_globalThis ||
+        (_globalThis =
+            typeof globalThis !== 'undefined'
+                ? globalThis
+                : typeof self !== 'undefined'
+                    ? self
+                    : typeof window !== 'undefined'
+                        ? window
+                        : typeof global !== 'undefined'
+                            ? global
+                            : {}));
+};
+function escapeHtml(rawText) {
+    return rawText
+        .replace(/</g, '&lt;')
+        .replace(/>/g, '&gt;')
+        .replace(/"/g, '&quot;')
+        .replace(/'/g, '&apos;');
+}
+const hasOwnProperty = Object.prototype.hasOwnProperty;
+function hasOwn(obj, key) {
+    return hasOwnProperty.call(obj, key);
+}
+/* eslint-enable */
+/**
+ * Useful Utilities By Evan you
+ * Modified by kazuya kawaguchi
+ * MIT License
+ * https://github.com/vuejs/vue-next/blob/master/packages/shared/src/index.ts
+ * https://github.com/vuejs/vue-next/blob/master/packages/shared/src/codeframe.ts
+ */
+const isArray = Array.isArray;
+const isFunction = (val) => typeof val === 'function';
+const isString = (val) => typeof val === 'string';
+const isBoolean = (val) => typeof val === 'boolean';
+const isSymbol = (val) => typeof val === 'symbol';
+// eslint-disable-next-line @typescript-eslint/no-explicit-any
+const isObject = (val) => val !== null && typeof val === 'object';
+// eslint-disable-next-line @typescript-eslint/no-explicit-any
+const isPromise = (val) => {
+    return isObject(val) && isFunction(val.then) && isFunction(val.catch);
+};
+const objectToString = Object.prototype.toString;
+const toTypeString = (value) => objectToString.call(value);
+const isPlainObject = (val) => {
+    if (!isObject(val))
+        return false;
+    const proto = Object.getPrototypeOf(val);
+    return proto === null || proto.constructor === Object;
+};
+// for converting list and named values to displayed strings.
+const toDisplayString = (val) => {
+    return val == null
+        ? ''
+        : isArray(val) || (isPlainObject(val) && val.toString === objectToString)
+            ? JSON.stringify(val, null, 2)
+            : String(val);
+};
+function join(items, separator = '') {
+    return items.reduce((str, item, index) => (index === 0 ? str + item : str + separator + item), '');
+}
+const RANGE = 2;
+function generateCodeFrame(source, start = 0, end = source.length) {
+    const lines = source.split(/\r?\n/);
+    let count = 0;
+    const res = [];
+    for (let i = 0; i < lines.length; i++) {
+        count += lines[i].length + 1;
+        if (count >= start) {
+            for (let j = i - RANGE; j <= i + RANGE || end > count; j++) {
+                if (j < 0 || j >= lines.length)
+                    continue;
+                const line = j + 1;
+                res.push(`${line}${' '.repeat(3 - String(line).length)}|  ${lines[j]}`);
+                const lineLength = lines[j].length;
+                if (j === i) {
+                    // push underline
+                    const pad = start - (count - lineLength) + 1;
+                    const length = Math.max(1, end > count ? lineLength - pad : end - start);
+                    res.push(`   |  ` + ' '.repeat(pad) + '^'.repeat(length));
+                }
+                else if (j > i) {
+                    if (end > count) {
+                        const length = Math.max(Math.min(end - count, lineLength), 1);
+                        res.push(`   |  ` + '^'.repeat(length));
+                    }
+                    count += lineLength + 1;
+                }
+            }
+            break;
+        }
+    }
+    return res.join('\n');
+}
+function incrementer(code) {
+    let current = code;
+    return () => ++current;
+}
+
+function warn(msg, err) {
+    if (typeof console !== 'undefined') {
+        console.warn(`[intlify] ` + msg);
+        /* istanbul ignore if */
+        if (err) {
+            console.warn(err.stack);
+        }
+    }
+}
+const hasWarned = {};
+function warnOnce(msg) {
+    if (!hasWarned[msg]) {
+        hasWarned[msg] = true;
+        warn(msg);
+    }
+}
+
+/**
+ * Event emitter, forked from the below:
+ * - original repository url: https://github.com/developit/mitt
+ * - code url: https://github.com/developit/mitt/blob/master/src/index.ts
+ * - author: Jason Miller (https://github.com/developit)
+ * - license: MIT
+ */
+/**
+ * Create a event emitter
+ *
+ * @returns An event emitter
+ */
+function createEmitter() {
+    const events = new Map();
+    const emitter = {
+        events,
+        on(event, handler) {
+            const handlers = events.get(event);
+            const added = handlers && handlers.push(handler);
+            if (!added) {
+                events.set(event, [handler]);
+            }
+        },
+        off(event, handler) {
+            const handlers = events.get(event);
+            if (handlers) {
+                handlers.splice(handlers.indexOf(handler) >>> 0, 1);
+            }
+        },
+        emit(event, payload) {
+            (events.get(event) || [])
+                .slice()
+                .map(handler => handler(payload));
+            (events.get('*') || [])
+                .slice()
+                .map(handler => handler(event, payload));
+        }
+    };
+    return emitter;
+}
+
+const isNotObjectOrIsArray = (val) => !isObject(val) || isArray(val);
+// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
+function deepCopy(src, des) {
+    // src and des should both be objects, and none of them can be a array
+    if (isNotObjectOrIsArray(src) || isNotObjectOrIsArray(des)) {
+        throw new Error('Invalid value');
+    }
+    const stack = [{ src, des }];
+    while (stack.length) {
+        const { src, des } = stack.pop();
+        Object.keys(src).forEach(key => {
+            if (isNotObjectOrIsArray(src[key]) || isNotObjectOrIsArray(des[key])) {
+                // replace with src[key] when:
+                // src[key] or des[key] is not an object, or
+                // src[key] or des[key] is an array
+                des[key] = src[key];
+            }
+            else {
+                // src[key] and des[key] are both objects, merge them
+                stack.push({ src: src[key], des: des[key] });
+            }
+        });
+    }
+}
+
+export { assign, createEmitter, deepCopy, escapeHtml, format, friendlyJSONstringify, generateCodeFrame, generateFormatCacheKey, getGlobalThis, hasOwn, inBrowser, incrementer, isArray, isBoolean, isDate, isEmptyObject, isFunction, isNumber, isObject, isPlainObject, isPromise, isRegExp, isString, isSymbol, join, makeSymbol, mark, measure, objectToString, toDisplayString, toTypeString, warn, warnOnce };

+ 256 - 0
node_modules/@intlify/shared/dist/shared.prod.cjs

@@ -0,0 +1,256 @@
+/*!
+  * shared v9.13.1
+  * (c) 2024 kazuya kawaguchi
+  * Released under the MIT License.
+  */
+'use strict';
+
+/**
+ * Original Utilities
+ * written by kazuya kawaguchi
+ */
+const inBrowser = typeof window !== 'undefined';
+let mark;
+let measure;
+const RE_ARGS = /\{([0-9a-zA-Z]+)\}/g;
+/* eslint-disable */
+function format(message, ...args) {
+    if (args.length === 1 && isObject(args[0])) {
+        args = args[0];
+    }
+    if (!args || !args.hasOwnProperty) {
+        args = {};
+    }
+    return message.replace(RE_ARGS, (match, identifier) => {
+        return args.hasOwnProperty(identifier) ? args[identifier] : '';
+    });
+}
+const makeSymbol = (name, shareable = false) => !shareable ? Symbol(name) : Symbol.for(name);
+const generateFormatCacheKey = (locale, key, source) => friendlyJSONstringify({ l: locale, k: key, s: source });
+const friendlyJSONstringify = (json) => JSON.stringify(json)
+    .replace(/\u2028/g, '\\u2028')
+    .replace(/\u2029/g, '\\u2029')
+    .replace(/\u0027/g, '\\u0027');
+const isNumber = (val) => typeof val === 'number' && isFinite(val);
+const isDate = (val) => toTypeString(val) === '[object Date]';
+const isRegExp = (val) => toTypeString(val) === '[object RegExp]';
+const isEmptyObject = (val) => isPlainObject(val) && Object.keys(val).length === 0;
+const assign = Object.assign;
+let _globalThis;
+const getGlobalThis = () => {
+    // prettier-ignore
+    return (_globalThis ||
+        (_globalThis =
+            typeof globalThis !== 'undefined'
+                ? globalThis
+                : typeof self !== 'undefined'
+                    ? self
+                    : typeof window !== 'undefined'
+                        ? window
+                        : typeof global !== 'undefined'
+                            ? global
+                            : {}));
+};
+function escapeHtml(rawText) {
+    return rawText
+        .replace(/</g, '&lt;')
+        .replace(/>/g, '&gt;')
+        .replace(/"/g, '&quot;')
+        .replace(/'/g, '&apos;');
+}
+const hasOwnProperty = Object.prototype.hasOwnProperty;
+function hasOwn(obj, key) {
+    return hasOwnProperty.call(obj, key);
+}
+/* eslint-enable */
+/**
+ * Useful Utilities By Evan you
+ * Modified by kazuya kawaguchi
+ * MIT License
+ * https://github.com/vuejs/vue-next/blob/master/packages/shared/src/index.ts
+ * https://github.com/vuejs/vue-next/blob/master/packages/shared/src/codeframe.ts
+ */
+const isArray = Array.isArray;
+const isFunction = (val) => typeof val === 'function';
+const isString = (val) => typeof val === 'string';
+const isBoolean = (val) => typeof val === 'boolean';
+const isSymbol = (val) => typeof val === 'symbol';
+// eslint-disable-next-line @typescript-eslint/no-explicit-any
+const isObject = (val) => val !== null && typeof val === 'object';
+// eslint-disable-next-line @typescript-eslint/no-explicit-any
+const isPromise = (val) => {
+    return isObject(val) && isFunction(val.then) && isFunction(val.catch);
+};
+const objectToString = Object.prototype.toString;
+const toTypeString = (value) => objectToString.call(value);
+const isPlainObject = (val) => {
+    if (!isObject(val))
+        return false;
+    const proto = Object.getPrototypeOf(val);
+    return proto === null || proto.constructor === Object;
+};
+// for converting list and named values to displayed strings.
+const toDisplayString = (val) => {
+    return val == null
+        ? ''
+        : isArray(val) || (isPlainObject(val) && val.toString === objectToString)
+            ? JSON.stringify(val, null, 2)
+            : String(val);
+};
+function join(items, separator = '') {
+    return items.reduce((str, item, index) => (index === 0 ? str + item : str + separator + item), '');
+}
+const RANGE = 2;
+function generateCodeFrame(source, start = 0, end = source.length) {
+    const lines = source.split(/\r?\n/);
+    let count = 0;
+    const res = [];
+    for (let i = 0; i < lines.length; i++) {
+        count += lines[i].length + 1;
+        if (count >= start) {
+            for (let j = i - RANGE; j <= i + RANGE || end > count; j++) {
+                if (j < 0 || j >= lines.length)
+                    continue;
+                const line = j + 1;
+                res.push(`${line}${' '.repeat(3 - String(line).length)}|  ${lines[j]}`);
+                const lineLength = lines[j].length;
+                if (j === i) {
+                    // push underline
+                    const pad = start - (count - lineLength) + 1;
+                    const length = Math.max(1, end > count ? lineLength - pad : end - start);
+                    res.push(`   |  ` + ' '.repeat(pad) + '^'.repeat(length));
+                }
+                else if (j > i) {
+                    if (end > count) {
+                        const length = Math.max(Math.min(end - count, lineLength), 1);
+                        res.push(`   |  ` + '^'.repeat(length));
+                    }
+                    count += lineLength + 1;
+                }
+            }
+            break;
+        }
+    }
+    return res.join('\n');
+}
+function incrementer(code) {
+    let current = code;
+    return () => ++current;
+}
+
+function warn(msg, err) {
+    if (typeof console !== 'undefined') {
+        console.warn(`[intlify] ` + msg);
+        /* istanbul ignore if */
+        if (err) {
+            console.warn(err.stack);
+        }
+    }
+}
+const hasWarned = {};
+function warnOnce(msg) {
+    if (!hasWarned[msg]) {
+        hasWarned[msg] = true;
+        warn(msg);
+    }
+}
+
+/**
+ * Event emitter, forked from the below:
+ * - original repository url: https://github.com/developit/mitt
+ * - code url: https://github.com/developit/mitt/blob/master/src/index.ts
+ * - author: Jason Miller (https://github.com/developit)
+ * - license: MIT
+ */
+/**
+ * Create a event emitter
+ *
+ * @returns An event emitter
+ */
+function createEmitter() {
+    const events = new Map();
+    const emitter = {
+        events,
+        on(event, handler) {
+            const handlers = events.get(event);
+            const added = handlers && handlers.push(handler);
+            if (!added) {
+                events.set(event, [handler]);
+            }
+        },
+        off(event, handler) {
+            const handlers = events.get(event);
+            if (handlers) {
+                handlers.splice(handlers.indexOf(handler) >>> 0, 1);
+            }
+        },
+        emit(event, payload) {
+            (events.get(event) || [])
+                .slice()
+                .map(handler => handler(payload));
+            (events.get('*') || [])
+                .slice()
+                .map(handler => handler(event, payload));
+        }
+    };
+    return emitter;
+}
+
+const isNotObjectOrIsArray = (val) => !isObject(val) || isArray(val);
+// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
+function deepCopy(src, des) {
+    // src and des should both be objects, and none of them can be a array
+    if (isNotObjectOrIsArray(src) || isNotObjectOrIsArray(des)) {
+        throw new Error('Invalid value');
+    }
+    const stack = [{ src, des }];
+    while (stack.length) {
+        const { src, des } = stack.pop();
+        Object.keys(src).forEach(key => {
+            if (isNotObjectOrIsArray(src[key]) || isNotObjectOrIsArray(des[key])) {
+                // replace with src[key] when:
+                // src[key] or des[key] is not an object, or
+                // src[key] or des[key] is an array
+                des[key] = src[key];
+            }
+            else {
+                // src[key] and des[key] are both objects, merge them
+                stack.push({ src: src[key], des: des[key] });
+            }
+        });
+    }
+}
+
+exports.assign = assign;
+exports.createEmitter = createEmitter;
+exports.deepCopy = deepCopy;
+exports.escapeHtml = escapeHtml;
+exports.format = format;
+exports.friendlyJSONstringify = friendlyJSONstringify;
+exports.generateCodeFrame = generateCodeFrame;
+exports.generateFormatCacheKey = generateFormatCacheKey;
+exports.getGlobalThis = getGlobalThis;
+exports.hasOwn = hasOwn;
+exports.inBrowser = inBrowser;
+exports.incrementer = incrementer;
+exports.isArray = isArray;
+exports.isBoolean = isBoolean;
+exports.isDate = isDate;
+exports.isEmptyObject = isEmptyObject;
+exports.isFunction = isFunction;
+exports.isNumber = isNumber;
+exports.isObject = isObject;
+exports.isPlainObject = isPlainObject;
+exports.isPromise = isPromise;
+exports.isRegExp = isRegExp;
+exports.isString = isString;
+exports.isSymbol = isSymbol;
+exports.join = join;
+exports.makeSymbol = makeSymbol;
+exports.mark = mark;
+exports.measure = measure;
+exports.objectToString = objectToString;
+exports.toDisplayString = toDisplayString;
+exports.toTypeString = toTypeString;
+exports.warn = warn;
+exports.warnOnce = warnOnce;

+ 7 - 0
node_modules/@intlify/shared/index.js

@@ -0,0 +1,7 @@
+'use strict'
+
+if (process.env.NODE_ENV === 'production') {
+  module.exports = require('./dist/shared.prod.cjs')
+} else {
+  module.exports = require('./dist/shared.cjs')
+}

+ 69 - 0
node_modules/@intlify/shared/package.json

@@ -0,0 +1,69 @@
+{
+  "name": "@intlify/shared",
+  "version": "9.13.1",
+  "description": "@intlify/shared",
+  "keywords": [
+    "i18n",
+    "internationalization",
+    "intlify",
+    "utitlity"
+  ],
+  "license": "MIT",
+  "author": {
+    "name": "kazuya kawaguchi",
+    "email": "kawakazu80@gmail.com"
+  },
+  "homepage": "https://github.com/intlify/vue-i18n-next/tree/master/packages/shared#readme",
+  "repository": {
+    "type": "git",
+    "url": "git+https://github.com/intlify/vue-i18n-next.git",
+    "directory": "packages/shared"
+  },
+  "bugs": {
+    "url": "https://github.com/intlify/vue-i18n-next/issues"
+  },
+  "files": [
+    "index.js",
+    "dist"
+  ],
+  "main": "index.js",
+  "module": "dist/shared.mjs",
+  "types": "dist/shared.d.ts",
+  "engines": {
+    "node": ">= 16"
+  },
+  "buildOptions": {
+    "name": "IntlifyShared",
+    "formats": [
+      "mjs",
+      "browser",
+      "cjs"
+    ]
+  },
+  "exports": {
+    ".": {
+      "types": "./dist/shared.d.ts",
+      "import": "./dist/shared.mjs",
+      "browser": "./dist/shared.esm-browser.js",
+      "node": {
+        "import": {
+          "production": "./dist/shared.prod.cjs",
+          "development": "./dist/shared.mjs",
+          "default": "./dist/shared.mjs"
+        },
+        "require": {
+          "production": "./dist/shared.prod.cjs",
+          "development": "./dist/shared.cjs",
+          "default": "./index.js"
+        }
+      }
+    },
+    "./dist/*": "./dist/*",
+    "./package.json": "./package.json"
+  },
+  "funding": "https://github.com/sponsors/kazupon",
+  "publishConfig": {
+    "access": "public"
+  },
+  "sideEffects": false
+}

+ 21 - 0
node_modules/@jridgewell/sourcemap-codec/LICENSE

@@ -0,0 +1,21 @@
+The MIT License
+
+Copyright (c) 2015 Rich Harris
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.

+ 200 - 0
node_modules/@jridgewell/sourcemap-codec/README.md

@@ -0,0 +1,200 @@
+# @jridgewell/sourcemap-codec
+
+Encode/decode the `mappings` property of a [sourcemap](https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit).
+
+
+## Why?
+
+Sourcemaps are difficult to generate and manipulate, because the `mappings` property – the part that actually links the generated code back to the original source – is encoded using an obscure method called [Variable-length quantity](https://en.wikipedia.org/wiki/Variable-length_quantity). On top of that, each segment in the mapping contains offsets rather than absolute indices, which means that you can't look at a segment in isolation – you have to understand the whole sourcemap.
+
+This package makes the process slightly easier.
+
+
+## Installation
+
+```bash
+npm install @jridgewell/sourcemap-codec
+```
+
+
+## Usage
+
+```js
+import { encode, decode } from '@jridgewell/sourcemap-codec';
+
+var decoded = decode( ';EAEEA,EAAE,EAAC,CAAE;ECQY,UACC' );
+
+assert.deepEqual( decoded, [
+	// the first line (of the generated code) has no mappings,
+	// as shown by the starting semi-colon (which separates lines)
+	[],
+
+	// the second line contains four (comma-separated) segments
+	[
+		// segments are encoded as you'd expect:
+		// [ generatedCodeColumn, sourceIndex, sourceCodeLine, sourceCodeColumn, nameIndex ]
+
+		// i.e. the first segment begins at column 2, and maps back to the second column
+		// of the second line (both zero-based) of the 0th source, and uses the 0th
+		// name in the `map.names` array
+		[ 2, 0, 2, 2, 0 ],
+
+		// the remaining segments are 4-length rather than 5-length,
+		// because they don't map a name
+		[ 4, 0, 2, 4 ],
+		[ 6, 0, 2, 5 ],
+		[ 7, 0, 2, 7 ]
+	],
+
+	// the final line contains two segments
+	[
+		[ 2, 1, 10, 19 ],
+		[ 12, 1, 11, 20 ]
+	]
+]);
+
+var encoded = encode( decoded );
+assert.equal( encoded, ';EAEEA,EAAE,EAAC,CAAE;ECQY,UACC' );
+```
+
+## Benchmarks
+
+```
+node v18.0.0
+
+amp.js.map - 45120 segments
+
+Decode Memory Usage:
+@jridgewell/sourcemap-codec       5479160 bytes
+sourcemap-codec                   5659336 bytes
+source-map-0.6.1                 17144440 bytes
+source-map-0.8.0                  6867424 bytes
+Smallest memory usage is @jridgewell/sourcemap-codec
+
+Decode speed:
+decode: @jridgewell/sourcemap-codec x 502 ops/sec ±1.03% (90 runs sampled)
+decode: sourcemap-codec x 445 ops/sec ±0.97% (92 runs sampled)
+decode: source-map-0.6.1 x 36.01 ops/sec ±1.64% (49 runs sampled)
+decode: source-map-0.8.0 x 367 ops/sec ±0.04% (95 runs sampled)
+Fastest is decode: @jridgewell/sourcemap-codec
+
+Encode Memory Usage:
+@jridgewell/sourcemap-codec       1261620 bytes
+sourcemap-codec                   9119248 bytes
+source-map-0.6.1                  8968560 bytes
+source-map-0.8.0                  8952952 bytes
+Smallest memory usage is @jridgewell/sourcemap-codec
+
+Encode speed:
+encode: @jridgewell/sourcemap-codec x 738 ops/sec ±0.42% (98 runs sampled)
+encode: sourcemap-codec x 238 ops/sec ±0.73% (88 runs sampled)
+encode: source-map-0.6.1 x 162 ops/sec ±0.43% (84 runs sampled)
+encode: source-map-0.8.0 x 191 ops/sec ±0.34% (90 runs sampled)
+Fastest is encode: @jridgewell/sourcemap-codec
+
+
+***
+
+
+babel.min.js.map - 347793 segments
+
+Decode Memory Usage:
+@jridgewell/sourcemap-codec      35338184 bytes
+sourcemap-codec                  35922736 bytes
+source-map-0.6.1                 62366360 bytes
+source-map-0.8.0                 44337416 bytes
+Smallest memory usage is @jridgewell/sourcemap-codec
+
+Decode speed:
+decode: @jridgewell/sourcemap-codec x 40.35 ops/sec ±4.47% (54 runs sampled)
+decode: sourcemap-codec x 36.76 ops/sec ±3.67% (51 runs sampled)
+decode: source-map-0.6.1 x 4.44 ops/sec ±2.15% (16 runs sampled)
+decode: source-map-0.8.0 x 59.35 ops/sec ±0.05% (78 runs sampled)
+Fastest is decode: source-map-0.8.0
+
+Encode Memory Usage:
+@jridgewell/sourcemap-codec       7212604 bytes
+sourcemap-codec                  21421456 bytes
+source-map-0.6.1                 25286888 bytes
+source-map-0.8.0                 25498744 bytes
+Smallest memory usage is @jridgewell/sourcemap-codec
+
+Encode speed:
+encode: @jridgewell/sourcemap-codec x 112 ops/sec ±0.13% (84 runs sampled)
+encode: sourcemap-codec x 30.23 ops/sec ±2.76% (53 runs sampled)
+encode: source-map-0.6.1 x 19.43 ops/sec ±3.70% (37 runs sampled)
+encode: source-map-0.8.0 x 19.40 ops/sec ±3.26% (37 runs sampled)
+Fastest is encode: @jridgewell/sourcemap-codec
+
+
+***
+
+
+preact.js.map - 1992 segments
+
+Decode Memory Usage:
+@jridgewell/sourcemap-codec        500272 bytes
+sourcemap-codec                    516864 bytes
+source-map-0.6.1                  1596672 bytes
+source-map-0.8.0                   517272 bytes
+Smallest memory usage is @jridgewell/sourcemap-codec
+
+Decode speed:
+decode: @jridgewell/sourcemap-codec x 16,137 ops/sec ±0.17% (99 runs sampled)
+decode: sourcemap-codec x 12,139 ops/sec ±0.13% (99 runs sampled)
+decode: source-map-0.6.1 x 1,264 ops/sec ±0.12% (100 runs sampled)
+decode: source-map-0.8.0 x 9,894 ops/sec ±0.08% (101 runs sampled)
+Fastest is decode: @jridgewell/sourcemap-codec
+
+Encode Memory Usage:
+@jridgewell/sourcemap-codec        321026 bytes
+sourcemap-codec                    830832 bytes
+source-map-0.6.1                   586608 bytes
+source-map-0.8.0                   586680 bytes
+Smallest memory usage is @jridgewell/sourcemap-codec
+
+Encode speed:
+encode: @jridgewell/sourcemap-codec x 19,876 ops/sec ±0.78% (95 runs sampled)
+encode: sourcemap-codec x 6,983 ops/sec ±0.15% (100 runs sampled)
+encode: source-map-0.6.1 x 5,070 ops/sec ±0.12% (102 runs sampled)
+encode: source-map-0.8.0 x 5,641 ops/sec ±0.17% (100 runs sampled)
+Fastest is encode: @jridgewell/sourcemap-codec
+
+
+***
+
+
+react.js.map - 5726 segments
+
+Decode Memory Usage:
+@jridgewell/sourcemap-codec        734848 bytes
+sourcemap-codec                    954200 bytes
+source-map-0.6.1                  2276432 bytes
+source-map-0.8.0                   955488 bytes
+Smallest memory usage is @jridgewell/sourcemap-codec
+
+Decode speed:
+decode: @jridgewell/sourcemap-codec x 5,723 ops/sec ±0.12% (98 runs sampled)
+decode: sourcemap-codec x 4,555 ops/sec ±0.09% (101 runs sampled)
+decode: source-map-0.6.1 x 437 ops/sec ±0.11% (93 runs sampled)
+decode: source-map-0.8.0 x 3,441 ops/sec ±0.15% (100 runs sampled)
+Fastest is decode: @jridgewell/sourcemap-codec
+
+Encode Memory Usage:
+@jridgewell/sourcemap-codec        638672 bytes
+sourcemap-codec                   1109840 bytes
+source-map-0.6.1                  1321224 bytes
+source-map-0.8.0                  1324448 bytes
+Smallest memory usage is @jridgewell/sourcemap-codec
+
+Encode speed:
+encode: @jridgewell/sourcemap-codec x 6,801 ops/sec ±0.48% (98 runs sampled)
+encode: sourcemap-codec x 2,533 ops/sec ±0.13% (101 runs sampled)
+encode: source-map-0.6.1 x 2,248 ops/sec ±0.08% (100 runs sampled)
+encode: source-map-0.8.0 x 2,303 ops/sec ±0.15% (100 runs sampled)
+Fastest is encode: @jridgewell/sourcemap-codec
+```
+
+# License
+
+MIT

+ 164 - 0
node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs

@@ -0,0 +1,164 @@
+const comma = ','.charCodeAt(0);
+const semicolon = ';'.charCodeAt(0);
+const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
+const intToChar = new Uint8Array(64); // 64 possible chars.
+const charToInt = new Uint8Array(128); // z is 122 in ASCII
+for (let i = 0; i < chars.length; i++) {
+    const c = chars.charCodeAt(i);
+    intToChar[i] = c;
+    charToInt[c] = i;
+}
+// Provide a fallback for older environments.
+const td = typeof TextDecoder !== 'undefined'
+    ? /* #__PURE__ */ new TextDecoder()
+    : typeof Buffer !== 'undefined'
+        ? {
+            decode(buf) {
+                const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength);
+                return out.toString();
+            },
+        }
+        : {
+            decode(buf) {
+                let out = '';
+                for (let i = 0; i < buf.length; i++) {
+                    out += String.fromCharCode(buf[i]);
+                }
+                return out;
+            },
+        };
+function decode(mappings) {
+    const state = new Int32Array(5);
+    const decoded = [];
+    let index = 0;
+    do {
+        const semi = indexOf(mappings, index);
+        const line = [];
+        let sorted = true;
+        let lastCol = 0;
+        state[0] = 0;
+        for (let i = index; i < semi; i++) {
+            let seg;
+            i = decodeInteger(mappings, i, state, 0); // genColumn
+            const col = state[0];
+            if (col < lastCol)
+                sorted = false;
+            lastCol = col;
+            if (hasMoreVlq(mappings, i, semi)) {
+                i = decodeInteger(mappings, i, state, 1); // sourcesIndex
+                i = decodeInteger(mappings, i, state, 2); // sourceLine
+                i = decodeInteger(mappings, i, state, 3); // sourceColumn
+                if (hasMoreVlq(mappings, i, semi)) {
+                    i = decodeInteger(mappings, i, state, 4); // namesIndex
+                    seg = [col, state[1], state[2], state[3], state[4]];
+                }
+                else {
+                    seg = [col, state[1], state[2], state[3]];
+                }
+            }
+            else {
+                seg = [col];
+            }
+            line.push(seg);
+        }
+        if (!sorted)
+            sort(line);
+        decoded.push(line);
+        index = semi + 1;
+    } while (index <= mappings.length);
+    return decoded;
+}
+function indexOf(mappings, index) {
+    const idx = mappings.indexOf(';', index);
+    return idx === -1 ? mappings.length : idx;
+}
+function decodeInteger(mappings, pos, state, j) {
+    let value = 0;
+    let shift = 0;
+    let integer = 0;
+    do {
+        const c = mappings.charCodeAt(pos++);
+        integer = charToInt[c];
+        value |= (integer & 31) << shift;
+        shift += 5;
+    } while (integer & 32);
+    const shouldNegate = value & 1;
+    value >>>= 1;
+    if (shouldNegate) {
+        value = -0x80000000 | -value;
+    }
+    state[j] += value;
+    return pos;
+}
+function hasMoreVlq(mappings, i, length) {
+    if (i >= length)
+        return false;
+    return mappings.charCodeAt(i) !== comma;
+}
+function sort(line) {
+    line.sort(sortComparator);
+}
+function sortComparator(a, b) {
+    return a[0] - b[0];
+}
+function encode(decoded) {
+    const state = new Int32Array(5);
+    const bufLength = 1024 * 16;
+    const subLength = bufLength - 36;
+    const buf = new Uint8Array(bufLength);
+    const sub = buf.subarray(0, subLength);
+    let pos = 0;
+    let out = '';
+    for (let i = 0; i < decoded.length; i++) {
+        const line = decoded[i];
+        if (i > 0) {
+            if (pos === bufLength) {
+                out += td.decode(buf);
+                pos = 0;
+            }
+            buf[pos++] = semicolon;
+        }
+        if (line.length === 0)
+            continue;
+        state[0] = 0;
+        for (let j = 0; j < line.length; j++) {
+            const segment = line[j];
+            // We can push up to 5 ints, each int can take at most 7 chars, and we
+            // may push a comma.
+            if (pos > subLength) {
+                out += td.decode(sub);
+                buf.copyWithin(0, subLength, pos);
+                pos -= subLength;
+            }
+            if (j > 0)
+                buf[pos++] = comma;
+            pos = encodeInteger(buf, pos, state, segment, 0); // genColumn
+            if (segment.length === 1)
+                continue;
+            pos = encodeInteger(buf, pos, state, segment, 1); // sourcesIndex
+            pos = encodeInteger(buf, pos, state, segment, 2); // sourceLine
+            pos = encodeInteger(buf, pos, state, segment, 3); // sourceColumn
+            if (segment.length === 4)
+                continue;
+            pos = encodeInteger(buf, pos, state, segment, 4); // namesIndex
+        }
+    }
+    return out + td.decode(buf.subarray(0, pos));
+}
+function encodeInteger(buf, pos, state, segment, j) {
+    const next = segment[j];
+    let num = next - state[j];
+    state[j] = next;
+    num = num < 0 ? (-num << 1) | 1 : num << 1;
+    do {
+        let clamped = num & 0b011111;
+        num >>>= 5;
+        if (num > 0)
+            clamped |= 0b100000;
+        buf[pos++] = intToChar[clamped];
+    } while (num > 0);
+    return pos;
+}
+
+export { decode, encode };
+//# sourceMappingURL=sourcemap-codec.mjs.map

Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs.map


+ 175 - 0
node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js

@@ -0,0 +1,175 @@
+(function (global, factory) {
+    typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
+    typeof define === 'function' && define.amd ? define(['exports'], factory) :
+    (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.sourcemapCodec = {}));
+})(this, (function (exports) { 'use strict';
+
+    const comma = ','.charCodeAt(0);
+    const semicolon = ';'.charCodeAt(0);
+    const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
+    const intToChar = new Uint8Array(64); // 64 possible chars.
+    const charToInt = new Uint8Array(128); // z is 122 in ASCII
+    for (let i = 0; i < chars.length; i++) {
+        const c = chars.charCodeAt(i);
+        intToChar[i] = c;
+        charToInt[c] = i;
+    }
+    // Provide a fallback for older environments.
+    const td = typeof TextDecoder !== 'undefined'
+        ? /* #__PURE__ */ new TextDecoder()
+        : typeof Buffer !== 'undefined'
+            ? {
+                decode(buf) {
+                    const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength);
+                    return out.toString();
+                },
+            }
+            : {
+                decode(buf) {
+                    let out = '';
+                    for (let i = 0; i < buf.length; i++) {
+                        out += String.fromCharCode(buf[i]);
+                    }
+                    return out;
+                },
+            };
+    function decode(mappings) {
+        const state = new Int32Array(5);
+        const decoded = [];
+        let index = 0;
+        do {
+            const semi = indexOf(mappings, index);
+            const line = [];
+            let sorted = true;
+            let lastCol = 0;
+            state[0] = 0;
+            for (let i = index; i < semi; i++) {
+                let seg;
+                i = decodeInteger(mappings, i, state, 0); // genColumn
+                const col = state[0];
+                if (col < lastCol)
+                    sorted = false;
+                lastCol = col;
+                if (hasMoreVlq(mappings, i, semi)) {
+                    i = decodeInteger(mappings, i, state, 1); // sourcesIndex
+                    i = decodeInteger(mappings, i, state, 2); // sourceLine
+                    i = decodeInteger(mappings, i, state, 3); // sourceColumn
+                    if (hasMoreVlq(mappings, i, semi)) {
+                        i = decodeInteger(mappings, i, state, 4); // namesIndex
+                        seg = [col, state[1], state[2], state[3], state[4]];
+                    }
+                    else {
+                        seg = [col, state[1], state[2], state[3]];
+                    }
+                }
+                else {
+                    seg = [col];
+                }
+                line.push(seg);
+            }
+            if (!sorted)
+                sort(line);
+            decoded.push(line);
+            index = semi + 1;
+        } while (index <= mappings.length);
+        return decoded;
+    }
+    function indexOf(mappings, index) {
+        const idx = mappings.indexOf(';', index);
+        return idx === -1 ? mappings.length : idx;
+    }
+    function decodeInteger(mappings, pos, state, j) {
+        let value = 0;
+        let shift = 0;
+        let integer = 0;
+        do {
+            const c = mappings.charCodeAt(pos++);
+            integer = charToInt[c];
+            value |= (integer & 31) << shift;
+            shift += 5;
+        } while (integer & 32);
+        const shouldNegate = value & 1;
+        value >>>= 1;
+        if (shouldNegate) {
+            value = -0x80000000 | -value;
+        }
+        state[j] += value;
+        return pos;
+    }
+    function hasMoreVlq(mappings, i, length) {
+        if (i >= length)
+            return false;
+        return mappings.charCodeAt(i) !== comma;
+    }
+    function sort(line) {
+        line.sort(sortComparator);
+    }
+    function sortComparator(a, b) {
+        return a[0] - b[0];
+    }
+    function encode(decoded) {
+        const state = new Int32Array(5);
+        const bufLength = 1024 * 16;
+        const subLength = bufLength - 36;
+        const buf = new Uint8Array(bufLength);
+        const sub = buf.subarray(0, subLength);
+        let pos = 0;
+        let out = '';
+        for (let i = 0; i < decoded.length; i++) {
+            const line = decoded[i];
+            if (i > 0) {
+                if (pos === bufLength) {
+                    out += td.decode(buf);
+                    pos = 0;
+                }
+                buf[pos++] = semicolon;
+            }
+            if (line.length === 0)
+                continue;
+            state[0] = 0;
+            for (let j = 0; j < line.length; j++) {
+                const segment = line[j];
+                // We can push up to 5 ints, each int can take at most 7 chars, and we
+                // may push a comma.
+                if (pos > subLength) {
+                    out += td.decode(sub);
+                    buf.copyWithin(0, subLength, pos);
+                    pos -= subLength;
+                }
+                if (j > 0)
+                    buf[pos++] = comma;
+                pos = encodeInteger(buf, pos, state, segment, 0); // genColumn
+                if (segment.length === 1)
+                    continue;
+                pos = encodeInteger(buf, pos, state, segment, 1); // sourcesIndex
+                pos = encodeInteger(buf, pos, state, segment, 2); // sourceLine
+                pos = encodeInteger(buf, pos, state, segment, 3); // sourceColumn
+                if (segment.length === 4)
+                    continue;
+                pos = encodeInteger(buf, pos, state, segment, 4); // namesIndex
+            }
+        }
+        return out + td.decode(buf.subarray(0, pos));
+    }
+    function encodeInteger(buf, pos, state, segment, j) {
+        const next = segment[j];
+        let num = next - state[j];
+        state[j] = next;
+        num = num < 0 ? (-num << 1) | 1 : num << 1;
+        do {
+            let clamped = num & 0b011111;
+            num >>>= 5;
+            if (num > 0)
+                clamped |= 0b100000;
+            buf[pos++] = intToChar[clamped];
+        } while (num > 0);
+        return pos;
+    }
+
+    exports.decode = decode;
+    exports.encode = encode;
+
+    Object.defineProperty(exports, '__esModule', { value: true });
+
+}));
+//# sourceMappingURL=sourcemap-codec.umd.js.map

Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js.map


+ 6 - 0
node_modules/@jridgewell/sourcemap-codec/dist/types/sourcemap-codec.d.ts

@@ -0,0 +1,6 @@
+export declare type SourceMapSegment = [number] | [number, number, number, number] | [number, number, number, number, number];
+export declare type SourceMapLine = SourceMapSegment[];
+export declare type SourceMapMappings = SourceMapLine[];
+export declare function decode(mappings: string): SourceMapMappings;
+export declare function encode(decoded: SourceMapMappings): string;
+export declare function encode(decoded: Readonly<SourceMapMappings>): string;

+ 74 - 0
node_modules/@jridgewell/sourcemap-codec/package.json

@@ -0,0 +1,74 @@
+{
+  "name": "@jridgewell/sourcemap-codec",
+  "version": "1.4.15",
+  "description": "Encode/decode sourcemap mappings",
+  "keywords": [
+    "sourcemap",
+    "vlq"
+  ],
+  "main": "dist/sourcemap-codec.umd.js",
+  "module": "dist/sourcemap-codec.mjs",
+  "types": "dist/types/sourcemap-codec.d.ts",
+  "files": [
+    "dist"
+  ],
+  "exports": {
+    ".": [
+      {
+        "types": "./dist/types/sourcemap-codec.d.ts",
+        "browser": "./dist/sourcemap-codec.umd.js",
+        "require": "./dist/sourcemap-codec.umd.js",
+        "import": "./dist/sourcemap-codec.mjs"
+      },
+      "./dist/sourcemap-codec.umd.js"
+    ],
+    "./package.json": "./package.json"
+  },
+  "scripts": {
+    "benchmark": "run-s build:rollup benchmark:*",
+    "benchmark:install": "cd benchmark && npm install",
+    "benchmark:only": "node --expose-gc benchmark/index.js",
+    "build": "run-s -n build:*",
+    "build:rollup": "rollup -c rollup.config.js",
+    "build:ts": "tsc --project tsconfig.build.json",
+    "lint": "run-s -n lint:*",
+    "lint:prettier": "npm run test:lint:prettier -- --write",
+    "lint:ts": "npm run test:lint:ts -- --fix",
+    "prebuild": "rm -rf dist",
+    "prepublishOnly": "npm run preversion",
+    "preversion": "run-s test build",
+    "pretest": "run-s build:rollup",
+    "test": "run-s -n test:lint test:only",
+    "test:debug": "mocha --inspect-brk",
+    "test:lint": "run-s -n test:lint:*",
+    "test:lint:prettier": "prettier --check '{src,test}/**/*.ts'",
+    "test:lint:ts": "eslint '{src,test}/**/*.ts'",
+    "test:only": "mocha",
+    "test:coverage": "c8 mocha",
+    "test:watch": "mocha --watch"
+  },
+  "repository": {
+    "type": "git",
+    "url": "git+https://github.com/jridgewell/sourcemap-codec.git"
+  },
+  "author": "Rich Harris",
+  "license": "MIT",
+  "devDependencies": {
+    "@rollup/plugin-typescript": "8.3.0",
+    "@types/node": "17.0.15",
+    "@typescript-eslint/eslint-plugin": "5.10.0",
+    "@typescript-eslint/parser": "5.10.0",
+    "benchmark": "2.1.4",
+    "c8": "7.11.2",
+    "eslint": "8.7.0",
+    "eslint-config-prettier": "8.3.0",
+    "mocha": "9.2.0",
+    "npm-run-all": "4.1.5",
+    "prettier": "2.5.1",
+    "rollup": "2.64.0",
+    "source-map": "0.6.1",
+    "source-map-js": "1.0.2",
+    "sourcemap-codec": "1.4.8",
+    "typescript": "4.5.4"
+  }
+}

+ 21 - 0
node_modules/@vue/compiler-core/LICENSE

@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2018-present, Yuxi (Evan) You
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.

+ 1 - 0
node_modules/@vue/compiler-core/README.md

@@ -0,0 +1 @@
+# @vue/compiler-core

+ 6644 - 0
node_modules/@vue/compiler-core/dist/compiler-core.cjs.js

@@ -0,0 +1,6644 @@
+/**
+* @vue/compiler-core v3.4.27
+* (c) 2018-present Yuxi (Evan) You and Vue contributors
+* @license MIT
+**/
+'use strict';
+
+Object.defineProperty(exports, '__esModule', { value: true });
+
+var shared = require('@vue/shared');
+var decode_js = require('entities/lib/decode.js');
+var parser = require('@babel/parser');
+var estreeWalker = require('estree-walker');
+var sourceMapJs = require('source-map-js');
+
+const FRAGMENT = Symbol(`Fragment` );
+const TELEPORT = Symbol(`Teleport` );
+const SUSPENSE = Symbol(`Suspense` );
+const KEEP_ALIVE = Symbol(`KeepAlive` );
+const BASE_TRANSITION = Symbol(`BaseTransition` );
+const OPEN_BLOCK = Symbol(`openBlock` );
+const CREATE_BLOCK = Symbol(`createBlock` );
+const CREATE_ELEMENT_BLOCK = Symbol(`createElementBlock` );
+const CREATE_VNODE = Symbol(`createVNode` );
+const CREATE_ELEMENT_VNODE = Symbol(`createElementVNode` );
+const CREATE_COMMENT = Symbol(`createCommentVNode` );
+const CREATE_TEXT = Symbol(`createTextVNode` );
+const CREATE_STATIC = Symbol(`createStaticVNode` );
+const RESOLVE_COMPONENT = Symbol(`resolveComponent` );
+const RESOLVE_DYNAMIC_COMPONENT = Symbol(
+  `resolveDynamicComponent` 
+);
+const RESOLVE_DIRECTIVE = Symbol(`resolveDirective` );
+const RESOLVE_FILTER = Symbol(`resolveFilter` );
+const WITH_DIRECTIVES = Symbol(`withDirectives` );
+const RENDER_LIST = Symbol(`renderList` );
+const RENDER_SLOT = Symbol(`renderSlot` );
+const CREATE_SLOTS = Symbol(`createSlots` );
+const TO_DISPLAY_STRING = Symbol(`toDisplayString` );
+const MERGE_PROPS = Symbol(`mergeProps` );
+const NORMALIZE_CLASS = Symbol(`normalizeClass` );
+const NORMALIZE_STYLE = Symbol(`normalizeStyle` );
+const NORMALIZE_PROPS = Symbol(`normalizeProps` );
+const GUARD_REACTIVE_PROPS = Symbol(`guardReactiveProps` );
+const TO_HANDLERS = Symbol(`toHandlers` );
+const CAMELIZE = Symbol(`camelize` );
+const CAPITALIZE = Symbol(`capitalize` );
+const TO_HANDLER_KEY = Symbol(`toHandlerKey` );
+const SET_BLOCK_TRACKING = Symbol(`setBlockTracking` );
+const PUSH_SCOPE_ID = Symbol(`pushScopeId` );
+const POP_SCOPE_ID = Symbol(`popScopeId` );
+const WITH_CTX = Symbol(`withCtx` );
+const UNREF = Symbol(`unref` );
+const IS_REF = Symbol(`isRef` );
+const WITH_MEMO = Symbol(`withMemo` );
+const IS_MEMO_SAME = Symbol(`isMemoSame` );
+const helperNameMap = {
+  [FRAGMENT]: `Fragment`,
+  [TELEPORT]: `Teleport`,
+  [SUSPENSE]: `Suspense`,
+  [KEEP_ALIVE]: `KeepAlive`,
+  [BASE_TRANSITION]: `BaseTransition`,
+  [OPEN_BLOCK]: `openBlock`,
+  [CREATE_BLOCK]: `createBlock`,
+  [CREATE_ELEMENT_BLOCK]: `createElementBlock`,
+  [CREATE_VNODE]: `createVNode`,
+  [CREATE_ELEMENT_VNODE]: `createElementVNode`,
+  [CREATE_COMMENT]: `createCommentVNode`,
+  [CREATE_TEXT]: `createTextVNode`,
+  [CREATE_STATIC]: `createStaticVNode`,
+  [RESOLVE_COMPONENT]: `resolveComponent`,
+  [RESOLVE_DYNAMIC_COMPONENT]: `resolveDynamicComponent`,
+  [RESOLVE_DIRECTIVE]: `resolveDirective`,
+  [RESOLVE_FILTER]: `resolveFilter`,
+  [WITH_DIRECTIVES]: `withDirectives`,
+  [RENDER_LIST]: `renderList`,
+  [RENDER_SLOT]: `renderSlot`,
+  [CREATE_SLOTS]: `createSlots`,
+  [TO_DISPLAY_STRING]: `toDisplayString`,
+  [MERGE_PROPS]: `mergeProps`,
+  [NORMALIZE_CLASS]: `normalizeClass`,
+  [NORMALIZE_STYLE]: `normalizeStyle`,
+  [NORMALIZE_PROPS]: `normalizeProps`,
+  [GUARD_REACTIVE_PROPS]: `guardReactiveProps`,
+  [TO_HANDLERS]: `toHandlers`,
+  [CAMELIZE]: `camelize`,
+  [CAPITALIZE]: `capitalize`,
+  [TO_HANDLER_KEY]: `toHandlerKey`,
+  [SET_BLOCK_TRACKING]: `setBlockTracking`,
+  [PUSH_SCOPE_ID]: `pushScopeId`,
+  [POP_SCOPE_ID]: `popScopeId`,
+  [WITH_CTX]: `withCtx`,
+  [UNREF]: `unref`,
+  [IS_REF]: `isRef`,
+  [WITH_MEMO]: `withMemo`,
+  [IS_MEMO_SAME]: `isMemoSame`
+};
+function registerRuntimeHelpers(helpers) {
+  Object.getOwnPropertySymbols(helpers).forEach((s) => {
+    helperNameMap[s] = helpers[s];
+  });
+}
+
+const Namespaces = {
+  "HTML": 0,
+  "0": "HTML",
+  "SVG": 1,
+  "1": "SVG",
+  "MATH_ML": 2,
+  "2": "MATH_ML"
+};
+const NodeTypes = {
+  "ROOT": 0,
+  "0": "ROOT",
+  "ELEMENT": 1,
+  "1": "ELEMENT",
+  "TEXT": 2,
+  "2": "TEXT",
+  "COMMENT": 3,
+  "3": "COMMENT",
+  "SIMPLE_EXPRESSION": 4,
+  "4": "SIMPLE_EXPRESSION",
+  "INTERPOLATION": 5,
+  "5": "INTERPOLATION",
+  "ATTRIBUTE": 6,
+  "6": "ATTRIBUTE",
+  "DIRECTIVE": 7,
+  "7": "DIRECTIVE",
+  "COMPOUND_EXPRESSION": 8,
+  "8": "COMPOUND_EXPRESSION",
+  "IF": 9,
+  "9": "IF",
+  "IF_BRANCH": 10,
+  "10": "IF_BRANCH",
+  "FOR": 11,
+  "11": "FOR",
+  "TEXT_CALL": 12,
+  "12": "TEXT_CALL",
+  "VNODE_CALL": 13,
+  "13": "VNODE_CALL",
+  "JS_CALL_EXPRESSION": 14,
+  "14": "JS_CALL_EXPRESSION",
+  "JS_OBJECT_EXPRESSION": 15,
+  "15": "JS_OBJECT_EXPRESSION",
+  "JS_PROPERTY": 16,
+  "16": "JS_PROPERTY",
+  "JS_ARRAY_EXPRESSION": 17,
+  "17": "JS_ARRAY_EXPRESSION",
+  "JS_FUNCTION_EXPRESSION": 18,
+  "18": "JS_FUNCTION_EXPRESSION",
+  "JS_CONDITIONAL_EXPRESSION": 19,
+  "19": "JS_CONDITIONAL_EXPRESSION",
+  "JS_CACHE_EXPRESSION": 20,
+  "20": "JS_CACHE_EXPRESSION",
+  "JS_BLOCK_STATEMENT": 21,
+  "21": "JS_BLOCK_STATEMENT",
+  "JS_TEMPLATE_LITERAL": 22,
+  "22": "JS_TEMPLATE_LITERAL",
+  "JS_IF_STATEMENT": 23,
+  "23": "JS_IF_STATEMENT",
+  "JS_ASSIGNMENT_EXPRESSION": 24,
+  "24": "JS_ASSIGNMENT_EXPRESSION",
+  "JS_SEQUENCE_EXPRESSION": 25,
+  "25": "JS_SEQUENCE_EXPRESSION",
+  "JS_RETURN_STATEMENT": 26,
+  "26": "JS_RETURN_STATEMENT"
+};
+const ElementTypes = {
+  "ELEMENT": 0,
+  "0": "ELEMENT",
+  "COMPONENT": 1,
+  "1": "COMPONENT",
+  "SLOT": 2,
+  "2": "SLOT",
+  "TEMPLATE": 3,
+  "3": "TEMPLATE"
+};
+const ConstantTypes = {
+  "NOT_CONSTANT": 0,
+  "0": "NOT_CONSTANT",
+  "CAN_SKIP_PATCH": 1,
+  "1": "CAN_SKIP_PATCH",
+  "CAN_HOIST": 2,
+  "2": "CAN_HOIST",
+  "CAN_STRINGIFY": 3,
+  "3": "CAN_STRINGIFY"
+};
+const locStub = {
+  start: { line: 1, column: 1, offset: 0 },
+  end: { line: 1, column: 1, offset: 0 },
+  source: ""
+};
+function createRoot(children, source = "") {
+  return {
+    type: 0,
+    source,
+    children,
+    helpers: /* @__PURE__ */ new Set(),
+    components: [],
+    directives: [],
+    hoists: [],
+    imports: [],
+    cached: 0,
+    temps: 0,
+    codegenNode: void 0,
+    loc: locStub
+  };
+}
+function createVNodeCall(context, tag, props, children, patchFlag, dynamicProps, directives, isBlock = false, disableTracking = false, isComponent = false, loc = locStub) {
+  if (context) {
+    if (isBlock) {
+      context.helper(OPEN_BLOCK);
+      context.helper(getVNodeBlockHelper(context.inSSR, isComponent));
+    } else {
+      context.helper(getVNodeHelper(context.inSSR, isComponent));
+    }
+    if (directives) {
+      context.helper(WITH_DIRECTIVES);
+    }
+  }
+  return {
+    type: 13,
+    tag,
+    props,
+    children,
+    patchFlag,
+    dynamicProps,
+    directives,
+    isBlock,
+    disableTracking,
+    isComponent,
+    loc
+  };
+}
+function createArrayExpression(elements, loc = locStub) {
+  return {
+    type: 17,
+    loc,
+    elements
+  };
+}
+function createObjectExpression(properties, loc = locStub) {
+  return {
+    type: 15,
+    loc,
+    properties
+  };
+}
+function createObjectProperty(key, value) {
+  return {
+    type: 16,
+    loc: locStub,
+    key: shared.isString(key) ? createSimpleExpression(key, true) : key,
+    value
+  };
+}
+function createSimpleExpression(content, isStatic = false, loc = locStub, constType = 0) {
+  return {
+    type: 4,
+    loc,
+    content,
+    isStatic,
+    constType: isStatic ? 3 : constType
+  };
+}
+function createInterpolation(content, loc) {
+  return {
+    type: 5,
+    loc,
+    content: shared.isString(content) ? createSimpleExpression(content, false, loc) : content
+  };
+}
+function createCompoundExpression(children, loc = locStub) {
+  return {
+    type: 8,
+    loc,
+    children
+  };
+}
+function createCallExpression(callee, args = [], loc = locStub) {
+  return {
+    type: 14,
+    loc,
+    callee,
+    arguments: args
+  };
+}
+function createFunctionExpression(params, returns = void 0, newline = false, isSlot = false, loc = locStub) {
+  return {
+    type: 18,
+    params,
+    returns,
+    newline,
+    isSlot,
+    loc
+  };
+}
+function createConditionalExpression(test, consequent, alternate, newline = true) {
+  return {
+    type: 19,
+    test,
+    consequent,
+    alternate,
+    newline,
+    loc: locStub
+  };
+}
+function createCacheExpression(index, value, isVNode = false) {
+  return {
+    type: 20,
+    index,
+    value,
+    isVNode,
+    loc: locStub
+  };
+}
+function createBlockStatement(body) {
+  return {
+    type: 21,
+    body,
+    loc: locStub
+  };
+}
+function createTemplateLiteral(elements) {
+  return {
+    type: 22,
+    elements,
+    loc: locStub
+  };
+}
+function createIfStatement(test, consequent, alternate) {
+  return {
+    type: 23,
+    test,
+    consequent,
+    alternate,
+    loc: locStub
+  };
+}
+function createAssignmentExpression(left, right) {
+  return {
+    type: 24,
+    left,
+    right,
+    loc: locStub
+  };
+}
+function createSequenceExpression(expressions) {
+  return {
+    type: 25,
+    expressions,
+    loc: locStub
+  };
+}
+function createReturnStatement(returns) {
+  return {
+    type: 26,
+    returns,
+    loc: locStub
+  };
+}
+function getVNodeHelper(ssr, isComponent) {
+  return ssr || isComponent ? CREATE_VNODE : CREATE_ELEMENT_VNODE;
+}
+function getVNodeBlockHelper(ssr, isComponent) {
+  return ssr || isComponent ? CREATE_BLOCK : CREATE_ELEMENT_BLOCK;
+}
+function convertToBlock(node, { helper, removeHelper, inSSR }) {
+  if (!node.isBlock) {
+    node.isBlock = true;
+    removeHelper(getVNodeHelper(inSSR, node.isComponent));
+    helper(OPEN_BLOCK);
+    helper(getVNodeBlockHelper(inSSR, node.isComponent));
+  }
+}
+
+const defaultDelimitersOpen = new Uint8Array([123, 123]);
+const defaultDelimitersClose = new Uint8Array([125, 125]);
+function isTagStartChar(c) {
+  return c >= 97 && c <= 122 || c >= 65 && c <= 90;
+}
+function isWhitespace(c) {
+  return c === 32 || c === 10 || c === 9 || c === 12 || c === 13;
+}
+function isEndOfTagSection(c) {
+  return c === 47 || c === 62 || isWhitespace(c);
+}
+function toCharCodes(str) {
+  const ret = new Uint8Array(str.length);
+  for (let i = 0; i < str.length; i++) {
+    ret[i] = str.charCodeAt(i);
+  }
+  return ret;
+}
+const Sequences = {
+  Cdata: new Uint8Array([67, 68, 65, 84, 65, 91]),
+  // CDATA[
+  CdataEnd: new Uint8Array([93, 93, 62]),
+  // ]]>
+  CommentEnd: new Uint8Array([45, 45, 62]),
+  // `-->`
+  ScriptEnd: new Uint8Array([60, 47, 115, 99, 114, 105, 112, 116]),
+  // `<\/script`
+  StyleEnd: new Uint8Array([60, 47, 115, 116, 121, 108, 101]),
+  // `</style`
+  TitleEnd: new Uint8Array([60, 47, 116, 105, 116, 108, 101]),
+  // `</title`
+  TextareaEnd: new Uint8Array([
+    60,
+    47,
+    116,
+    101,
+    120,
+    116,
+    97,
+    114,
+    101,
+    97
+  ])
+  // `</textarea
+};
+class Tokenizer {
+  constructor(stack, cbs) {
+    this.stack = stack;
+    this.cbs = cbs;
+    /** The current state the tokenizer is in. */
+    this.state = 1;
+    /** The read buffer. */
+    this.buffer = "";
+    /** The beginning of the section that is currently being read. */
+    this.sectionStart = 0;
+    /** The index within the buffer that we are currently looking at. */
+    this.index = 0;
+    /** The start of the last entity. */
+    this.entityStart = 0;
+    /** Some behavior, eg. when decoding entities, is done while we are in another state. This keeps track of the other state type. */
+    this.baseState = 1;
+    /** For special parsing behavior inside of script and style tags. */
+    this.inRCDATA = false;
+    /** For disabling RCDATA tags handling */
+    this.inXML = false;
+    /** For disabling interpolation parsing in v-pre */
+    this.inVPre = false;
+    /** Record newline positions for fast line / column calculation */
+    this.newlines = [];
+    this.mode = 0;
+    this.delimiterOpen = defaultDelimitersOpen;
+    this.delimiterClose = defaultDelimitersClose;
+    this.delimiterIndex = -1;
+    this.currentSequence = void 0;
+    this.sequenceIndex = 0;
+    {
+      this.entityDecoder = new decode_js.EntityDecoder(
+        decode_js.htmlDecodeTree,
+        (cp, consumed) => this.emitCodePoint(cp, consumed)
+      );
+    }
+  }
+  get inSFCRoot() {
+    return this.mode === 2 && this.stack.length === 0;
+  }
+  reset() {
+    this.state = 1;
+    this.mode = 0;
+    this.buffer = "";
+    this.sectionStart = 0;
+    this.index = 0;
+    this.baseState = 1;
+    this.inRCDATA = false;
+    this.currentSequence = void 0;
+    this.newlines.length = 0;
+    this.delimiterOpen = defaultDelimitersOpen;
+    this.delimiterClose = defaultDelimitersClose;
+  }
+  /**
+   * Generate Position object with line / column information using recorded
+   * newline positions. We know the index is always going to be an already
+   * processed index, so all the newlines up to this index should have been
+   * recorded.
+   */
+  getPos(index) {
+    let line = 1;
+    let column = index + 1;
+    for (let i = this.newlines.length - 1; i >= 0; i--) {
+      const newlineIndex = this.newlines[i];
+      if (index > newlineIndex) {
+        line = i + 2;
+        column = index - newlineIndex;
+        break;
+      }
+    }
+    return {
+      column,
+      line,
+      offset: index
+    };
+  }
+  peek() {
+    return this.buffer.charCodeAt(this.index + 1);
+  }
+  stateText(c) {
+    if (c === 60) {
+      if (this.index > this.sectionStart) {
+        this.cbs.ontext(this.sectionStart, this.index);
+      }
+      this.state = 5;
+      this.sectionStart = this.index;
+    } else if (c === 38) {
+      this.startEntity();
+    } else if (!this.inVPre && c === this.delimiterOpen[0]) {
+      this.state = 2;
+      this.delimiterIndex = 0;
+      this.stateInterpolationOpen(c);
+    }
+  }
+  stateInterpolationOpen(c) {
+    if (c === this.delimiterOpen[this.delimiterIndex]) {
+      if (this.delimiterIndex === this.delimiterOpen.length - 1) {
+        const start = this.index + 1 - this.delimiterOpen.length;
+        if (start > this.sectionStart) {
+          this.cbs.ontext(this.sectionStart, start);
+        }
+        this.state = 3;
+        this.sectionStart = start;
+      } else {
+        this.delimiterIndex++;
+      }
+    } else if (this.inRCDATA) {
+      this.state = 32;
+      this.stateInRCDATA(c);
+    } else {
+      this.state = 1;
+      this.stateText(c);
+    }
+  }
+  stateInterpolation(c) {
+    if (c === this.delimiterClose[0]) {
+      this.state = 4;
+      this.delimiterIndex = 0;
+      this.stateInterpolationClose(c);
+    }
+  }
+  stateInterpolationClose(c) {
+    if (c === this.delimiterClose[this.delimiterIndex]) {
+      if (this.delimiterIndex === this.delimiterClose.length - 1) {
+        this.cbs.oninterpolation(this.sectionStart, this.index + 1);
+        if (this.inRCDATA) {
+          this.state = 32;
+        } else {
+          this.state = 1;
+        }
+        this.sectionStart = this.index + 1;
+      } else {
+        this.delimiterIndex++;
+      }
+    } else {
+      this.state = 3;
+      this.stateInterpolation(c);
+    }
+  }
+  stateSpecialStartSequence(c) {
+    const isEnd = this.sequenceIndex === this.currentSequence.length;
+    const isMatch = isEnd ? (
+      // If we are at the end of the sequence, make sure the tag name has ended
+      isEndOfTagSection(c)
+    ) : (
+      // Otherwise, do a case-insensitive comparison
+      (c | 32) === this.currentSequence[this.sequenceIndex]
+    );
+    if (!isMatch) {
+      this.inRCDATA = false;
+    } else if (!isEnd) {
+      this.sequenceIndex++;
+      return;
+    }
+    this.sequenceIndex = 0;
+    this.state = 6;
+    this.stateInTagName(c);
+  }
+  /** Look for an end tag. For <title> and <textarea>, also decode entities. */
+  stateInRCDATA(c) {
+    if (this.sequenceIndex === this.currentSequence.length) {
+      if (c === 62 || isWhitespace(c)) {
+        const endOfText = this.index - this.currentSequence.length;
+        if (this.sectionStart < endOfText) {
+          const actualIndex = this.index;
+          this.index = endOfText;
+          this.cbs.ontext(this.sectionStart, endOfText);
+          this.index = actualIndex;
+        }
+        this.sectionStart = endOfText + 2;
+        this.stateInClosingTagName(c);
+        this.inRCDATA = false;
+        return;
+      }
+      this.sequenceIndex = 0;
+    }
+    if ((c | 32) === this.currentSequence[this.sequenceIndex]) {
+      this.sequenceIndex += 1;
+    } else if (this.sequenceIndex === 0) {
+      if (this.currentSequence === Sequences.TitleEnd || this.currentSequence === Sequences.TextareaEnd && !this.inSFCRoot) {
+        if (c === 38) {
+          this.startEntity();
+        } else if (c === this.delimiterOpen[0]) {
+          this.state = 2;
+          this.delimiterIndex = 0;
+          this.stateInterpolationOpen(c);
+        }
+      } else if (this.fastForwardTo(60)) {
+        this.sequenceIndex = 1;
+      }
+    } else {
+      this.sequenceIndex = Number(c === 60);
+    }
+  }
+  stateCDATASequence(c) {
+    if (c === Sequences.Cdata[this.sequenceIndex]) {
+      if (++this.sequenceIndex === Sequences.Cdata.length) {
+        this.state = 28;
+        this.currentSequence = Sequences.CdataEnd;
+        this.sequenceIndex = 0;
+        this.sectionStart = this.index + 1;
+      }
+    } else {
+      this.sequenceIndex = 0;
+      this.state = 23;
+      this.stateInDeclaration(c);
+    }
+  }
+  /**
+   * When we wait for one specific character, we can speed things up
+   * by skipping through the buffer until we find it.
+   *
+   * @returns Whether the character was found.
+   */
+  fastForwardTo(c) {
+    while (++this.index < this.buffer.length) {
+      const cc = this.buffer.charCodeAt(this.index);
+      if (cc === 10) {
+        this.newlines.push(this.index);
+      }
+      if (cc === c) {
+        return true;
+      }
+    }
+    this.index = this.buffer.length - 1;
+    return false;
+  }
+  /**
+   * Comments and CDATA end with `-->` and `]]>`.
+   *
+   * Their common qualities are:
+   * - Their end sequences have a distinct character they start with.
+   * - That character is then repeated, so we have to check multiple repeats.
+   * - All characters but the start character of the sequence can be skipped.
+   */
+  stateInCommentLike(c) {
+    if (c === this.currentSequence[this.sequenceIndex]) {
+      if (++this.sequenceIndex === this.currentSequence.length) {
+        if (this.currentSequence === Sequences.CdataEnd) {
+          this.cbs.oncdata(this.sectionStart, this.index - 2);
+        } else {
+          this.cbs.oncomment(this.sectionStart, this.index - 2);
+        }
+        this.sequenceIndex = 0;
+        this.sectionStart = this.index + 1;
+        this.state = 1;
+      }
+    } else if (this.sequenceIndex === 0) {
+      if (this.fastForwardTo(this.currentSequence[0])) {
+        this.sequenceIndex = 1;
+      }
+    } else if (c !== this.currentSequence[this.sequenceIndex - 1]) {
+      this.sequenceIndex = 0;
+    }
+  }
+  startSpecial(sequence, offset) {
+    this.enterRCDATA(sequence, offset);
+    this.state = 31;
+  }
+  enterRCDATA(sequence, offset) {
+    this.inRCDATA = true;
+    this.currentSequence = sequence;
+    this.sequenceIndex = offset;
+  }
+  stateBeforeTagName(c) {
+    if (c === 33) {
+      this.state = 22;
+      this.sectionStart = this.index + 1;
+    } else if (c === 63) {
+      this.state = 24;
+      this.sectionStart = this.index + 1;
+    } else if (isTagStartChar(c)) {
+      this.sectionStart = this.index;
+      if (this.mode === 0) {
+        this.state = 6;
+      } else if (this.inSFCRoot) {
+        this.state = 34;
+      } else if (!this.inXML) {
+        if (c === 116) {
+          this.state = 30;
+        } else {
+          this.state = c === 115 ? 29 : 6;
+        }
+      } else {
+        this.state = 6;
+      }
+    } else if (c === 47) {
+      this.state = 8;
+    } else {
+      this.state = 1;
+      this.stateText(c);
+    }
+  }
+  stateInTagName(c) {
+    if (isEndOfTagSection(c)) {
+      this.handleTagName(c);
+    }
+  }
+  stateInSFCRootTagName(c) {
+    if (isEndOfTagSection(c)) {
+      const tag = this.buffer.slice(this.sectionStart, this.index);
+      if (tag !== "template") {
+        this.enterRCDATA(toCharCodes(`</` + tag), 0);
+      }
+      this.handleTagName(c);
+    }
+  }
+  handleTagName(c) {
+    this.cbs.onopentagname(this.sectionStart, this.index);
+    this.sectionStart = -1;
+    this.state = 11;
+    this.stateBeforeAttrName(c);
+  }
+  stateBeforeClosingTagName(c) {
+    if (isWhitespace(c)) ; else if (c === 62) {
+      {
+        this.cbs.onerr(14, this.index);
+      }
+      this.state = 1;
+      this.sectionStart = this.index + 1;
+    } else {
+      this.state = isTagStartChar(c) ? 9 : 27;
+      this.sectionStart = this.index;
+    }
+  }
+  stateInClosingTagName(c) {
+    if (c === 62 || isWhitespace(c)) {
+      this.cbs.onclosetag(this.sectionStart, this.index);
+      this.sectionStart = -1;
+      this.state = 10;
+      this.stateAfterClosingTagName(c);
+    }
+  }
+  stateAfterClosingTagName(c) {
+    if (c === 62) {
+      this.state = 1;
+      this.sectionStart = this.index + 1;
+    }
+  }
+  stateBeforeAttrName(c) {
+    if (c === 62) {
+      this.cbs.onopentagend(this.index);
+      if (this.inRCDATA) {
+        this.state = 32;
+      } else {
+        this.state = 1;
+      }
+      this.sectionStart = this.index + 1;
+    } else if (c === 47) {
+      this.state = 7;
+      if (this.peek() !== 62) {
+        this.cbs.onerr(22, this.index);
+      }
+    } else if (c === 60 && this.peek() === 47) {
+      this.cbs.onopentagend(this.index);
+      this.state = 5;
+      this.sectionStart = this.index;
+    } else if (!isWhitespace(c)) {
+      if (c === 61) {
+        this.cbs.onerr(
+          19,
+          this.index
+        );
+      }
+      this.handleAttrStart(c);
+    }
+  }
+  handleAttrStart(c) {
+    if (c === 118 && this.peek() === 45) {
+      this.state = 13;
+      this.sectionStart = this.index;
+    } else if (c === 46 || c === 58 || c === 64 || c === 35) {
+      this.cbs.ondirname(this.index, this.index + 1);
+      this.state = 14;
+      this.sectionStart = this.index + 1;
+    } else {
+      this.state = 12;
+      this.sectionStart = this.index;
+    }
+  }
+  stateInSelfClosingTag(c) {
+    if (c === 62) {
+      this.cbs.onselfclosingtag(this.index);
+      this.state = 1;
+      this.sectionStart = this.index + 1;
+      this.inRCDATA = false;
+    } else if (!isWhitespace(c)) {
+      this.state = 11;
+      this.stateBeforeAttrName(c);
+    }
+  }
+  stateInAttrName(c) {
+    if (c === 61 || isEndOfTagSection(c)) {
+      this.cbs.onattribname(this.sectionStart, this.index);
+      this.handleAttrNameEnd(c);
+    } else if (c === 34 || c === 39 || c === 60) {
+      this.cbs.onerr(
+        17,
+        this.index
+      );
+    }
+  }
+  stateInDirName(c) {
+    if (c === 61 || isEndOfTagSection(c)) {
+      this.cbs.ondirname(this.sectionStart, this.index);
+      this.handleAttrNameEnd(c);
+    } else if (c === 58) {
+      this.cbs.ondirname(this.sectionStart, this.index);
+      this.state = 14;
+      this.sectionStart = this.index + 1;
+    } else if (c === 46) {
+      this.cbs.ondirname(this.sectionStart, this.index);
+      this.state = 16;
+      this.sectionStart = this.index + 1;
+    }
+  }
+  stateInDirArg(c) {
+    if (c === 61 || isEndOfTagSection(c)) {
+      this.cbs.ondirarg(this.sectionStart, this.index);
+      this.handleAttrNameEnd(c);
+    } else if (c === 91) {
+      this.state = 15;
+    } else if (c === 46) {
+      this.cbs.ondirarg(this.sectionStart, this.index);
+      this.state = 16;
+      this.sectionStart = this.index + 1;
+    }
+  }
+  stateInDynamicDirArg(c) {
+    if (c === 93) {
+      this.state = 14;
+    } else if (c === 61 || isEndOfTagSection(c)) {
+      this.cbs.ondirarg(this.sectionStart, this.index + 1);
+      this.handleAttrNameEnd(c);
+      {
+        this.cbs.onerr(
+          27,
+          this.index
+        );
+      }
+    }
+  }
+  stateInDirModifier(c) {
+    if (c === 61 || isEndOfTagSection(c)) {
+      this.cbs.ondirmodifier(this.sectionStart, this.index);
+      this.handleAttrNameEnd(c);
+    } else if (c === 46) {
+      this.cbs.ondirmodifier(this.sectionStart, this.index);
+      this.sectionStart = this.index + 1;
+    }
+  }
+  handleAttrNameEnd(c) {
+    this.sectionStart = this.index;
+    this.state = 17;
+    this.cbs.onattribnameend(this.index);
+    this.stateAfterAttrName(c);
+  }
+  stateAfterAttrName(c) {
+    if (c === 61) {
+      this.state = 18;
+    } else if (c === 47 || c === 62) {
+      this.cbs.onattribend(0, this.sectionStart);
+      this.sectionStart = -1;
+      this.state = 11;
+      this.stateBeforeAttrName(c);
+    } else if (!isWhitespace(c)) {
+      this.cbs.onattribend(0, this.sectionStart);
+      this.handleAttrStart(c);
+    }
+  }
+  stateBeforeAttrValue(c) {
+    if (c === 34) {
+      this.state = 19;
+      this.sectionStart = this.index + 1;
+    } else if (c === 39) {
+      this.state = 20;
+      this.sectionStart = this.index + 1;
+    } else if (!isWhitespace(c)) {
+      this.sectionStart = this.index;
+      this.state = 21;
+      this.stateInAttrValueNoQuotes(c);
+    }
+  }
+  handleInAttrValue(c, quote) {
+    if (c === quote || false) {
+      this.cbs.onattribdata(this.sectionStart, this.index);
+      this.sectionStart = -1;
+      this.cbs.onattribend(
+        quote === 34 ? 3 : 2,
+        this.index + 1
+      );
+      this.state = 11;
+    } else if (c === 38) {
+      this.startEntity();
+    }
+  }
+  stateInAttrValueDoubleQuotes(c) {
+    this.handleInAttrValue(c, 34);
+  }
+  stateInAttrValueSingleQuotes(c) {
+    this.handleInAttrValue(c, 39);
+  }
+  stateInAttrValueNoQuotes(c) {
+    if (isWhitespace(c) || c === 62) {
+      this.cbs.onattribdata(this.sectionStart, this.index);
+      this.sectionStart = -1;
+      this.cbs.onattribend(1, this.index);
+      this.state = 11;
+      this.stateBeforeAttrName(c);
+    } else if (c === 34 || c === 39 || c === 60 || c === 61 || c === 96) {
+      this.cbs.onerr(
+        18,
+        this.index
+      );
+    } else if (c === 38) {
+      this.startEntity();
+    }
+  }
+  stateBeforeDeclaration(c) {
+    if (c === 91) {
+      this.state = 26;
+      this.sequenceIndex = 0;
+    } else {
+      this.state = c === 45 ? 25 : 23;
+    }
+  }
+  stateInDeclaration(c) {
+    if (c === 62 || this.fastForwardTo(62)) {
+      this.state = 1;
+      this.sectionStart = this.index + 1;
+    }
+  }
+  stateInProcessingInstruction(c) {
+    if (c === 62 || this.fastForwardTo(62)) {
+      this.cbs.onprocessinginstruction(this.sectionStart, this.index);
+      this.state = 1;
+      this.sectionStart = this.index + 1;
+    }
+  }
+  stateBeforeComment(c) {
+    if (c === 45) {
+      this.state = 28;
+      this.currentSequence = Sequences.CommentEnd;
+      this.sequenceIndex = 2;
+      this.sectionStart = this.index + 1;
+    } else {
+      this.state = 23;
+    }
+  }
+  stateInSpecialComment(c) {
+    if (c === 62 || this.fastForwardTo(62)) {
+      this.cbs.oncomment(this.sectionStart, this.index);
+      this.state = 1;
+      this.sectionStart = this.index + 1;
+    }
+  }
+  stateBeforeSpecialS(c) {
+    if (c === Sequences.ScriptEnd[3]) {
+      this.startSpecial(Sequences.ScriptEnd, 4);
+    } else if (c === Sequences.StyleEnd[3]) {
+      this.startSpecial(Sequences.StyleEnd, 4);
+    } else {
+      this.state = 6;
+      this.stateInTagName(c);
+    }
+  }
+  stateBeforeSpecialT(c) {
+    if (c === Sequences.TitleEnd[3]) {
+      this.startSpecial(Sequences.TitleEnd, 4);
+    } else if (c === Sequences.TextareaEnd[3]) {
+      this.startSpecial(Sequences.TextareaEnd, 4);
+    } else {
+      this.state = 6;
+      this.stateInTagName(c);
+    }
+  }
+  startEntity() {
+    {
+      this.baseState = this.state;
+      this.state = 33;
+      this.entityStart = this.index;
+      this.entityDecoder.startEntity(
+        this.baseState === 1 || this.baseState === 32 ? decode_js.DecodingMode.Legacy : decode_js.DecodingMode.Attribute
+      );
+    }
+  }
+  stateInEntity() {
+    {
+      const length = this.entityDecoder.write(this.buffer, this.index);
+      if (length >= 0) {
+        this.state = this.baseState;
+        if (length === 0) {
+          this.index = this.entityStart;
+        }
+      } else {
+        this.index = this.buffer.length - 1;
+      }
+    }
+  }
+  /**
+   * Iterates through the buffer, calling the function corresponding to the current state.
+   *
+   * States that are more likely to be hit are higher up, as a performance improvement.
+   */
+  parse(input) {
+    this.buffer = input;
+    while (this.index < this.buffer.length) {
+      const c = this.buffer.charCodeAt(this.index);
+      if (c === 10) {
+        this.newlines.push(this.index);
+      }
+      switch (this.state) {
+        case 1: {
+          this.stateText(c);
+          break;
+        }
+        case 2: {
+          this.stateInterpolationOpen(c);
+          break;
+        }
+        case 3: {
+          this.stateInterpolation(c);
+          break;
+        }
+        case 4: {
+          this.stateInterpolationClose(c);
+          break;
+        }
+        case 31: {
+          this.stateSpecialStartSequence(c);
+          break;
+        }
+        case 32: {
+          this.stateInRCDATA(c);
+          break;
+        }
+        case 26: {
+          this.stateCDATASequence(c);
+          break;
+        }
+        case 19: {
+          this.stateInAttrValueDoubleQuotes(c);
+          break;
+        }
+        case 12: {
+          this.stateInAttrName(c);
+          break;
+        }
+        case 13: {
+          this.stateInDirName(c);
+          break;
+        }
+        case 14: {
+          this.stateInDirArg(c);
+          break;
+        }
+        case 15: {
+          this.stateInDynamicDirArg(c);
+          break;
+        }
+        case 16: {
+          this.stateInDirModifier(c);
+          break;
+        }
+        case 28: {
+          this.stateInCommentLike(c);
+          break;
+        }
+        case 27: {
+          this.stateInSpecialComment(c);
+          break;
+        }
+        case 11: {
+          this.stateBeforeAttrName(c);
+          break;
+        }
+        case 6: {
+          this.stateInTagName(c);
+          break;
+        }
+        case 34: {
+          this.stateInSFCRootTagName(c);
+          break;
+        }
+        case 9: {
+          this.stateInClosingTagName(c);
+          break;
+        }
+        case 5: {
+          this.stateBeforeTagName(c);
+          break;
+        }
+        case 17: {
+          this.stateAfterAttrName(c);
+          break;
+        }
+        case 20: {
+          this.stateInAttrValueSingleQuotes(c);
+          break;
+        }
+        case 18: {
+          this.stateBeforeAttrValue(c);
+          break;
+        }
+        case 8: {
+          this.stateBeforeClosingTagName(c);
+          break;
+        }
+        case 10: {
+          this.stateAfterClosingTagName(c);
+          break;
+        }
+        case 29: {
+          this.stateBeforeSpecialS(c);
+          break;
+        }
+        case 30: {
+          this.stateBeforeSpecialT(c);
+          break;
+        }
+        case 21: {
+          this.stateInAttrValueNoQuotes(c);
+          break;
+        }
+        case 7: {
+          this.stateInSelfClosingTag(c);
+          break;
+        }
+        case 23: {
+          this.stateInDeclaration(c);
+          break;
+        }
+        case 22: {
+          this.stateBeforeDeclaration(c);
+          break;
+        }
+        case 25: {
+          this.stateBeforeComment(c);
+          break;
+        }
+        case 24: {
+          this.stateInProcessingInstruction(c);
+          break;
+        }
+        case 33: {
+          this.stateInEntity();
+          break;
+        }
+      }
+      this.index++;
+    }
+    this.cleanup();
+    this.finish();
+  }
+  /**
+   * Remove data that has already been consumed from the buffer.
+   */
+  cleanup() {
+    if (this.sectionStart !== this.index) {
+      if (this.state === 1 || this.state === 32 && this.sequenceIndex === 0) {
+        this.cbs.ontext(this.sectionStart, this.index);
+        this.sectionStart = this.index;
+      } else if (this.state === 19 || this.state === 20 || this.state === 21) {
+        this.cbs.onattribdata(this.sectionStart, this.index);
+        this.sectionStart = this.index;
+      }
+    }
+  }
+  finish() {
+    if (this.state === 33) {
+      this.entityDecoder.end();
+      this.state = this.baseState;
+    }
+    this.handleTrailingData();
+    this.cbs.onend();
+  }
+  /** Handle any trailing data. */
+  handleTrailingData() {
+    const endIndex = this.buffer.length;
+    if (this.sectionStart >= endIndex) {
+      return;
+    }
+    if (this.state === 28) {
+      if (this.currentSequence === Sequences.CdataEnd) {
+        this.cbs.oncdata(this.sectionStart, endIndex);
+      } else {
+        this.cbs.oncomment(this.sectionStart, endIndex);
+      }
+    } else if (this.state === 6 || this.state === 11 || this.state === 18 || this.state === 17 || this.state === 12 || this.state === 13 || this.state === 14 || this.state === 15 || this.state === 16 || this.state === 20 || this.state === 19 || this.state === 21 || this.state === 9) ; else {
+      this.cbs.ontext(this.sectionStart, endIndex);
+    }
+  }
+  emitCodePoint(cp, consumed) {
+    {
+      if (this.baseState !== 1 && this.baseState !== 32) {
+        if (this.sectionStart < this.entityStart) {
+          this.cbs.onattribdata(this.sectionStart, this.entityStart);
+        }
+        this.sectionStart = this.entityStart + consumed;
+        this.index = this.sectionStart - 1;
+        this.cbs.onattribentity(
+          decode_js.fromCodePoint(cp),
+          this.entityStart,
+          this.sectionStart
+        );
+      } else {
+        if (this.sectionStart < this.entityStart) {
+          this.cbs.ontext(this.sectionStart, this.entityStart);
+        }
+        this.sectionStart = this.entityStart + consumed;
+        this.index = this.sectionStart - 1;
+        this.cbs.ontextentity(
+          decode_js.fromCodePoint(cp),
+          this.entityStart,
+          this.sectionStart
+        );
+      }
+    }
+  }
+}
+
+const CompilerDeprecationTypes = {
+  "COMPILER_IS_ON_ELEMENT": "COMPILER_IS_ON_ELEMENT",
+  "COMPILER_V_BIND_SYNC": "COMPILER_V_BIND_SYNC",
+  "COMPILER_V_BIND_OBJECT_ORDER": "COMPILER_V_BIND_OBJECT_ORDER",
+  "COMPILER_V_ON_NATIVE": "COMPILER_V_ON_NATIVE",
+  "COMPILER_V_IF_V_FOR_PRECEDENCE": "COMPILER_V_IF_V_FOR_PRECEDENCE",
+  "COMPILER_NATIVE_TEMPLATE": "COMPILER_NATIVE_TEMPLATE",
+  "COMPILER_INLINE_TEMPLATE": "COMPILER_INLINE_TEMPLATE",
+  "COMPILER_FILTERS": "COMPILER_FILTERS"
+};
+const deprecationData = {
+  ["COMPILER_IS_ON_ELEMENT"]: {
+    message: `Platform-native elements with "is" prop will no longer be treated as components in Vue 3 unless the "is" value is explicitly prefixed with "vue:".`,
+    link: `https://v3-migration.vuejs.org/breaking-changes/custom-elements-interop.html`
+  },
+  ["COMPILER_V_BIND_SYNC"]: {
+    message: (key) => `.sync modifier for v-bind has been removed. Use v-model with argument instead. \`v-bind:${key}.sync\` should be changed to \`v-model:${key}\`.`,
+    link: `https://v3-migration.vuejs.org/breaking-changes/v-model.html`
+  },
+  ["COMPILER_V_BIND_OBJECT_ORDER"]: {
+    message: `v-bind="obj" usage is now order sensitive and behaves like JavaScript object spread: it will now overwrite an existing non-mergeable attribute that appears before v-bind in the case of conflict. To retain 2.x behavior, move v-bind to make it the first attribute. You can also suppress this warning if the usage is intended.`,
+    link: `https://v3-migration.vuejs.org/breaking-changes/v-bind.html`
+  },
+  ["COMPILER_V_ON_NATIVE"]: {
+    message: `.native modifier for v-on has been removed as is no longer necessary.`,
+    link: `https://v3-migration.vuejs.org/breaking-changes/v-on-native-modifier-removed.html`
+  },
+  ["COMPILER_V_IF_V_FOR_PRECEDENCE"]: {
+    message: `v-if / v-for precedence when used on the same element has changed in Vue 3: v-if now takes higher precedence and will no longer have access to v-for scope variables. It is best to avoid the ambiguity with <template> tags or use a computed property that filters v-for data source.`,
+    link: `https://v3-migration.vuejs.org/breaking-changes/v-if-v-for.html`
+  },
+  ["COMPILER_NATIVE_TEMPLATE"]: {
+    message: `<template> with no special directives will render as a native template element instead of its inner content in Vue 3.`
+  },
+  ["COMPILER_INLINE_TEMPLATE"]: {
+    message: `"inline-template" has been removed in Vue 3.`,
+    link: `https://v3-migration.vuejs.org/breaking-changes/inline-template-attribute.html`
+  },
+  ["COMPILER_FILTERS"]: {
+    message: `filters have been removed in Vue 3. The "|" symbol will be treated as native JavaScript bitwise OR operator. Use method calls or computed properties instead.`,
+    link: `https://v3-migration.vuejs.org/breaking-changes/filters.html`
+  }
+};
+function getCompatValue(key, { compatConfig }) {
+  const value = compatConfig && compatConfig[key];
+  if (key === "MODE") {
+    return value || 3;
+  } else {
+    return value;
+  }
+}
+function isCompatEnabled(key, context) {
+  const mode = getCompatValue("MODE", context);
+  const value = getCompatValue(key, context);
+  return mode === 3 ? value === true : value !== false;
+}
+function checkCompatEnabled(key, context, loc, ...args) {
+  const enabled = isCompatEnabled(key, context);
+  if (enabled) {
+    warnDeprecation(key, context, loc, ...args);
+  }
+  return enabled;
+}
+function warnDeprecation(key, context, loc, ...args) {
+  const val = getCompatValue(key, context);
+  if (val === "suppress-warning") {
+    return;
+  }
+  const { message, link } = deprecationData[key];
+  const msg = `(deprecation ${key}) ${typeof message === "function" ? message(...args) : message}${link ? `
+  Details: ${link}` : ``}`;
+  const err = new SyntaxError(msg);
+  err.code = key;
+  if (loc)
+    err.loc = loc;
+  context.onWarn(err);
+}
+
+function defaultOnError(error) {
+  throw error;
+}
+function defaultOnWarn(msg) {
+  console.warn(`[Vue warn] ${msg.message}`);
+}
+function createCompilerError(code, loc, messages, additionalMessage) {
+  const msg = (messages || errorMessages)[code] + (additionalMessage || ``) ;
+  const error = new SyntaxError(String(msg));
+  error.code = code;
+  error.loc = loc;
+  return error;
+}
+const ErrorCodes = {
+  "ABRUPT_CLOSING_OF_EMPTY_COMMENT": 0,
+  "0": "ABRUPT_CLOSING_OF_EMPTY_COMMENT",
+  "CDATA_IN_HTML_CONTENT": 1,
+  "1": "CDATA_IN_HTML_CONTENT",
+  "DUPLICATE_ATTRIBUTE": 2,
+  "2": "DUPLICATE_ATTRIBUTE",
+  "END_TAG_WITH_ATTRIBUTES": 3,
+  "3": "END_TAG_WITH_ATTRIBUTES",
+  "END_TAG_WITH_TRAILING_SOLIDUS": 4,
+  "4": "END_TAG_WITH_TRAILING_SOLIDUS",
+  "EOF_BEFORE_TAG_NAME": 5,
+  "5": "EOF_BEFORE_TAG_NAME",
+  "EOF_IN_CDATA": 6,
+  "6": "EOF_IN_CDATA",
+  "EOF_IN_COMMENT": 7,
+  "7": "EOF_IN_COMMENT",
+  "EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT": 8,
+  "8": "EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT",
+  "EOF_IN_TAG": 9,
+  "9": "EOF_IN_TAG",
+  "INCORRECTLY_CLOSED_COMMENT": 10,
+  "10": "INCORRECTLY_CLOSED_COMMENT",
+  "INCORRECTLY_OPENED_COMMENT": 11,
+  "11": "INCORRECTLY_OPENED_COMMENT",
+  "INVALID_FIRST_CHARACTER_OF_TAG_NAME": 12,
+  "12": "INVALID_FIRST_CHARACTER_OF_TAG_NAME",
+  "MISSING_ATTRIBUTE_VALUE": 13,
+  "13": "MISSING_ATTRIBUTE_VALUE",
+  "MISSING_END_TAG_NAME": 14,
+  "14": "MISSING_END_TAG_NAME",
+  "MISSING_WHITESPACE_BETWEEN_ATTRIBUTES": 15,
+  "15": "MISSING_WHITESPACE_BETWEEN_ATTRIBUTES",
+  "NESTED_COMMENT": 16,
+  "16": "NESTED_COMMENT",
+  "UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME": 17,
+  "17": "UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME",
+  "UNEXPECTED_CHARACTER_IN_UNQUOTED_ATTRIBUTE_VALUE": 18,
+  "18": "UNEXPECTED_CHARACTER_IN_UNQUOTED_ATTRIBUTE_VALUE",
+  "UNEXPECTED_EQUALS_SIGN_BEFORE_ATTRIBUTE_NAME": 19,
+  "19": "UNEXPECTED_EQUALS_SIGN_BEFORE_ATTRIBUTE_NAME",
+  "UNEXPECTED_NULL_CHARACTER": 20,
+  "20": "UNEXPECTED_NULL_CHARACTER",
+  "UNEXPECTED_QUESTION_MARK_INSTEAD_OF_TAG_NAME": 21,
+  "21": "UNEXPECTED_QUESTION_MARK_INSTEAD_OF_TAG_NAME",
+  "UNEXPECTED_SOLIDUS_IN_TAG": 22,
+  "22": "UNEXPECTED_SOLIDUS_IN_TAG",
+  "X_INVALID_END_TAG": 23,
+  "23": "X_INVALID_END_TAG",
+  "X_MISSING_END_TAG": 24,
+  "24": "X_MISSING_END_TAG",
+  "X_MISSING_INTERPOLATION_END": 25,
+  "25": "X_MISSING_INTERPOLATION_END",
+  "X_MISSING_DIRECTIVE_NAME": 26,
+  "26": "X_MISSING_DIRECTIVE_NAME",
+  "X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END": 27,
+  "27": "X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END",
+  "X_V_IF_NO_EXPRESSION": 28,
+  "28": "X_V_IF_NO_EXPRESSION",
+  "X_V_IF_SAME_KEY": 29,
+  "29": "X_V_IF_SAME_KEY",
+  "X_V_ELSE_NO_ADJACENT_IF": 30,
+  "30": "X_V_ELSE_NO_ADJACENT_IF",
+  "X_V_FOR_NO_EXPRESSION": 31,
+  "31": "X_V_FOR_NO_EXPRESSION",
+  "X_V_FOR_MALFORMED_EXPRESSION": 32,
+  "32": "X_V_FOR_MALFORMED_EXPRESSION",
+  "X_V_FOR_TEMPLATE_KEY_PLACEMENT": 33,
+  "33": "X_V_FOR_TEMPLATE_KEY_PLACEMENT",
+  "X_V_BIND_NO_EXPRESSION": 34,
+  "34": "X_V_BIND_NO_EXPRESSION",
+  "X_V_ON_NO_EXPRESSION": 35,
+  "35": "X_V_ON_NO_EXPRESSION",
+  "X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET": 36,
+  "36": "X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET",
+  "X_V_SLOT_MIXED_SLOT_USAGE": 37,
+  "37": "X_V_SLOT_MIXED_SLOT_USAGE",
+  "X_V_SLOT_DUPLICATE_SLOT_NAMES": 38,
+  "38": "X_V_SLOT_DUPLICATE_SLOT_NAMES",
+  "X_V_SLOT_EXTRANEOUS_DEFAULT_SLOT_CHILDREN": 39,
+  "39": "X_V_SLOT_EXTRANEOUS_DEFAULT_SLOT_CHILDREN",
+  "X_V_SLOT_MISPLACED": 40,
+  "40": "X_V_SLOT_MISPLACED",
+  "X_V_MODEL_NO_EXPRESSION": 41,
+  "41": "X_V_MODEL_NO_EXPRESSION",
+  "X_V_MODEL_MALFORMED_EXPRESSION": 42,
+  "42": "X_V_MODEL_MALFORMED_EXPRESSION",
+  "X_V_MODEL_ON_SCOPE_VARIABLE": 43,
+  "43": "X_V_MODEL_ON_SCOPE_VARIABLE",
+  "X_V_MODEL_ON_PROPS": 44,
+  "44": "X_V_MODEL_ON_PROPS",
+  "X_INVALID_EXPRESSION": 45,
+  "45": "X_INVALID_EXPRESSION",
+  "X_KEEP_ALIVE_INVALID_CHILDREN": 46,
+  "46": "X_KEEP_ALIVE_INVALID_CHILDREN",
+  "X_PREFIX_ID_NOT_SUPPORTED": 47,
+  "47": "X_PREFIX_ID_NOT_SUPPORTED",
+  "X_MODULE_MODE_NOT_SUPPORTED": 48,
+  "48": "X_MODULE_MODE_NOT_SUPPORTED",
+  "X_CACHE_HANDLER_NOT_SUPPORTED": 49,
+  "49": "X_CACHE_HANDLER_NOT_SUPPORTED",
+  "X_SCOPE_ID_NOT_SUPPORTED": 50,
+  "50": "X_SCOPE_ID_NOT_SUPPORTED",
+  "X_VNODE_HOOKS": 51,
+  "51": "X_VNODE_HOOKS",
+  "X_V_BIND_INVALID_SAME_NAME_ARGUMENT": 52,
+  "52": "X_V_BIND_INVALID_SAME_NAME_ARGUMENT",
+  "__EXTEND_POINT__": 53,
+  "53": "__EXTEND_POINT__"
+};
+const errorMessages = {
+  // parse errors
+  [0]: "Illegal comment.",
+  [1]: "CDATA section is allowed only in XML context.",
+  [2]: "Duplicate attribute.",
+  [3]: "End tag cannot have attributes.",
+  [4]: "Illegal '/' in tags.",
+  [5]: "Unexpected EOF in tag.",
+  [6]: "Unexpected EOF in CDATA section.",
+  [7]: "Unexpected EOF in comment.",
+  [8]: "Unexpected EOF in script.",
+  [9]: "Unexpected EOF in tag.",
+  [10]: "Incorrectly closed comment.",
+  [11]: "Incorrectly opened comment.",
+  [12]: "Illegal tag name. Use '&lt;' to print '<'.",
+  [13]: "Attribute value was expected.",
+  [14]: "End tag name was expected.",
+  [15]: "Whitespace was expected.",
+  [16]: "Unexpected '<!--' in comment.",
+  [17]: `Attribute name cannot contain U+0022 ("), U+0027 ('), and U+003C (<).`,
+  [18]: "Unquoted attribute value cannot contain U+0022 (\"), U+0027 ('), U+003C (<), U+003D (=), and U+0060 (`).",
+  [19]: "Attribute name cannot start with '='.",
+  [21]: "'<?' is allowed only in XML context.",
+  [20]: `Unexpected null character.`,
+  [22]: "Illegal '/' in tags.",
+  // Vue-specific parse errors
+  [23]: "Invalid end tag.",
+  [24]: "Element is missing end tag.",
+  [25]: "Interpolation end sign was not found.",
+  [27]: "End bracket for dynamic directive argument was not found. Note that dynamic directive argument cannot contain spaces.",
+  [26]: "Legal directive name was expected.",
+  // transform errors
+  [28]: `v-if/v-else-if is missing expression.`,
+  [29]: `v-if/else branches must use unique keys.`,
+  [30]: `v-else/v-else-if has no adjacent v-if or v-else-if.`,
+  [31]: `v-for is missing expression.`,
+  [32]: `v-for has invalid expression.`,
+  [33]: `<template v-for> key should be placed on the <template> tag.`,
+  [34]: `v-bind is missing expression.`,
+  [52]: `v-bind with same-name shorthand only allows static argument.`,
+  [35]: `v-on is missing expression.`,
+  [36]: `Unexpected custom directive on <slot> outlet.`,
+  [37]: `Mixed v-slot usage on both the component and nested <template>. When there are multiple named slots, all slots should use <template> syntax to avoid scope ambiguity.`,
+  [38]: `Duplicate slot names found. `,
+  [39]: `Extraneous children found when component already has explicitly named default slot. These children will be ignored.`,
+  [40]: `v-slot can only be used on components or <template> tags.`,
+  [41]: `v-model is missing expression.`,
+  [42]: `v-model value must be a valid JavaScript member expression.`,
+  [43]: `v-model cannot be used on v-for or v-slot scope variables because they are not writable.`,
+  [44]: `v-model cannot be used on a prop, because local prop bindings are not writable.
+Use a v-bind binding combined with a v-on listener that emits update:x event instead.`,
+  [45]: `Error parsing JavaScript expression: `,
+  [46]: `<KeepAlive> expects exactly one child component.`,
+  [51]: `@vnode-* hooks in templates are no longer supported. Use the vue: prefix instead. For example, @vnode-mounted should be changed to @vue:mounted. @vnode-* hooks support has been removed in 3.4.`,
+  // generic errors
+  [47]: `"prefixIdentifiers" option is not supported in this build of compiler.`,
+  [48]: `ES module mode is not supported in this build of compiler.`,
+  [49]: `"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.`,
+  [50]: `"scopeId" option is only supported in module mode.`,
+  // just to fulfill types
+  [53]: ``
+};
+
+function walkIdentifiers(root, onIdentifier, includeAll = false, parentStack = [], knownIds = /* @__PURE__ */ Object.create(null)) {
+  const rootExp = root.type === "Program" ? root.body[0].type === "ExpressionStatement" && root.body[0].expression : root;
+  estreeWalker.walk(root, {
+    enter(node, parent) {
+      parent && parentStack.push(parent);
+      if (parent && parent.type.startsWith("TS") && !TS_NODE_TYPES.includes(parent.type)) {
+        return this.skip();
+      }
+      if (node.type === "Identifier") {
+        const isLocal = !!knownIds[node.name];
+        const isRefed = isReferencedIdentifier(node, parent, parentStack);
+        if (includeAll || isRefed && !isLocal) {
+          onIdentifier(node, parent, parentStack, isRefed, isLocal);
+        }
+      } else if (node.type === "ObjectProperty" && (parent == null ? void 0 : parent.type) === "ObjectPattern") {
+        node.inPattern = true;
+      } else if (isFunctionType(node)) {
+        if (node.scopeIds) {
+          node.scopeIds.forEach((id) => markKnownIds(id, knownIds));
+        } else {
+          walkFunctionParams(
+            node,
+            (id) => markScopeIdentifier(node, id, knownIds)
+          );
+        }
+      } else if (node.type === "BlockStatement") {
+        if (node.scopeIds) {
+          node.scopeIds.forEach((id) => markKnownIds(id, knownIds));
+        } else {
+          walkBlockDeclarations(
+            node,
+            (id) => markScopeIdentifier(node, id, knownIds)
+          );
+        }
+      }
+    },
+    leave(node, parent) {
+      parent && parentStack.pop();
+      if (node !== rootExp && node.scopeIds) {
+        for (const id of node.scopeIds) {
+          knownIds[id]--;
+          if (knownIds[id] === 0) {
+            delete knownIds[id];
+          }
+        }
+      }
+    }
+  });
+}
+function isReferencedIdentifier(id, parent, parentStack) {
+  if (!parent) {
+    return true;
+  }
+  if (id.name === "arguments") {
+    return false;
+  }
+  if (isReferenced(id, parent)) {
+    return true;
+  }
+  switch (parent.type) {
+    case "AssignmentExpression":
+    case "AssignmentPattern":
+      return true;
+    case "ObjectPattern":
+    case "ArrayPattern":
+      return isInDestructureAssignment(parent, parentStack);
+  }
+  return false;
+}
+function isInDestructureAssignment(parent, parentStack) {
+  if (parent && (parent.type === "ObjectProperty" || parent.type === "ArrayPattern")) {
+    let i = parentStack.length;
+    while (i--) {
+      const p = parentStack[i];
+      if (p.type === "AssignmentExpression") {
+        return true;
+      } else if (p.type !== "ObjectProperty" && !p.type.endsWith("Pattern")) {
+        break;
+      }
+    }
+  }
+  return false;
+}
+function isInNewExpression(parentStack) {
+  let i = parentStack.length;
+  while (i--) {
+    const p = parentStack[i];
+    if (p.type === "NewExpression") {
+      return true;
+    } else if (p.type !== "MemberExpression") {
+      break;
+    }
+  }
+  return false;
+}
+function walkFunctionParams(node, onIdent) {
+  for (const p of node.params) {
+    for (const id of extractIdentifiers(p)) {
+      onIdent(id);
+    }
+  }
+}
+function walkBlockDeclarations(block, onIdent) {
+  for (const stmt of block.body) {
+    if (stmt.type === "VariableDeclaration") {
+      if (stmt.declare)
+        continue;
+      for (const decl of stmt.declarations) {
+        for (const id of extractIdentifiers(decl.id)) {
+          onIdent(id);
+        }
+      }
+    } else if (stmt.type === "FunctionDeclaration" || stmt.type === "ClassDeclaration") {
+      if (stmt.declare || !stmt.id)
+        continue;
+      onIdent(stmt.id);
+    } else if (stmt.type === "ForOfStatement" || stmt.type === "ForInStatement" || stmt.type === "ForStatement") {
+      const variable = stmt.type === "ForStatement" ? stmt.init : stmt.left;
+      if (variable && variable.type === "VariableDeclaration") {
+        for (const decl of variable.declarations) {
+          for (const id of extractIdentifiers(decl.id)) {
+            onIdent(id);
+          }
+        }
+      }
+    }
+  }
+}
+function extractIdentifiers(param, nodes = []) {
+  switch (param.type) {
+    case "Identifier":
+      nodes.push(param);
+      break;
+    case "MemberExpression":
+      let object = param;
+      while (object.type === "MemberExpression") {
+        object = object.object;
+      }
+      nodes.push(object);
+      break;
+    case "ObjectPattern":
+      for (const prop of param.properties) {
+        if (prop.type === "RestElement") {
+          extractIdentifiers(prop.argument, nodes);
+        } else {
+          extractIdentifiers(prop.value, nodes);
+        }
+      }
+      break;
+    case "ArrayPattern":
+      param.elements.forEach((element) => {
+        if (element)
+          extractIdentifiers(element, nodes);
+      });
+      break;
+    case "RestElement":
+      extractIdentifiers(param.argument, nodes);
+      break;
+    case "AssignmentPattern":
+      extractIdentifiers(param.left, nodes);
+      break;
+  }
+  return nodes;
+}
+function markKnownIds(name, knownIds) {
+  if (name in knownIds) {
+    knownIds[name]++;
+  } else {
+    knownIds[name] = 1;
+  }
+}
+function markScopeIdentifier(node, child, knownIds) {
+  const { name } = child;
+  if (node.scopeIds && node.scopeIds.has(name)) {
+    return;
+  }
+  markKnownIds(name, knownIds);
+  (node.scopeIds || (node.scopeIds = /* @__PURE__ */ new Set())).add(name);
+}
+const isFunctionType = (node) => {
+  return /Function(?:Expression|Declaration)$|Method$/.test(node.type);
+};
+const isStaticProperty = (node) => node && (node.type === "ObjectProperty" || node.type === "ObjectMethod") && !node.computed;
+const isStaticPropertyKey = (node, parent) => isStaticProperty(parent) && parent.key === node;
+function isReferenced(node, parent, grandparent) {
+  switch (parent.type) {
+    case "MemberExpression":
+    case "OptionalMemberExpression":
+      if (parent.property === node) {
+        return !!parent.computed;
+      }
+      return parent.object === node;
+    case "JSXMemberExpression":
+      return parent.object === node;
+    case "VariableDeclarator":
+      return parent.init === node;
+    case "ArrowFunctionExpression":
+      return parent.body === node;
+    case "PrivateName":
+      return false;
+    case "ClassMethod":
+    case "ClassPrivateMethod":
+    case "ObjectMethod":
+      if (parent.key === node) {
+        return !!parent.computed;
+      }
+      return false;
+    case "ObjectProperty":
+      if (parent.key === node) {
+        return !!parent.computed;
+      }
+      return !grandparent ;
+    case "ClassProperty":
+      if (parent.key === node) {
+        return !!parent.computed;
+      }
+      return true;
+    case "ClassPrivateProperty":
+      return parent.key !== node;
+    case "ClassDeclaration":
+    case "ClassExpression":
+      return parent.superClass === node;
+    case "AssignmentExpression":
+      return parent.right === node;
+    case "AssignmentPattern":
+      return parent.right === node;
+    case "LabeledStatement":
+      return false;
+    case "CatchClause":
+      return false;
+    case "RestElement":
+      return false;
+    case "BreakStatement":
+    case "ContinueStatement":
+      return false;
+    case "FunctionDeclaration":
+    case "FunctionExpression":
+      return false;
+    case "ExportNamespaceSpecifier":
+    case "ExportDefaultSpecifier":
+      return false;
+    case "ExportSpecifier":
+      return parent.local === node;
+    case "ImportDefaultSpecifier":
+    case "ImportNamespaceSpecifier":
+    case "ImportSpecifier":
+      return false;
+    case "ImportAttribute":
+      return false;
+    case "JSXAttribute":
+      return false;
+    case "ObjectPattern":
+    case "ArrayPattern":
+      return false;
+    case "MetaProperty":
+      return false;
+    case "ObjectTypeProperty":
+      return parent.key !== node;
+    case "TSEnumMember":
+      return parent.id !== node;
+    case "TSPropertySignature":
+      if (parent.key === node) {
+        return !!parent.computed;
+      }
+      return true;
+  }
+  return true;
+}
+const TS_NODE_TYPES = [
+  "TSAsExpression",
+  // foo as number
+  "TSTypeAssertion",
+  // (<number>foo)
+  "TSNonNullExpression",
+  // foo!
+  "TSInstantiationExpression",
+  // foo<string>
+  "TSSatisfiesExpression"
+  // foo satisfies T
+];
+function unwrapTSNode(node) {
+  if (TS_NODE_TYPES.includes(node.type)) {
+    return unwrapTSNode(node.expression);
+  } else {
+    return node;
+  }
+}
+
+const isStaticExp = (p) => p.type === 4 && p.isStatic;
+function isCoreComponent(tag) {
+  switch (tag) {
+    case "Teleport":
+    case "teleport":
+      return TELEPORT;
+    case "Suspense":
+    case "suspense":
+      return SUSPENSE;
+    case "KeepAlive":
+    case "keep-alive":
+      return KEEP_ALIVE;
+    case "BaseTransition":
+    case "base-transition":
+      return BASE_TRANSITION;
+  }
+}
+const nonIdentifierRE = /^\d|[^\$\w]/;
+const isSimpleIdentifier = (name) => !nonIdentifierRE.test(name);
+const validFirstIdentCharRE = /[A-Za-z_$\xA0-\uFFFF]/;
+const validIdentCharRE = /[\.\?\w$\xA0-\uFFFF]/;
+const whitespaceRE = /\s+[.[]\s*|\s*[.[]\s+/g;
+const isMemberExpressionBrowser = (path) => {
+  path = path.trim().replace(whitespaceRE, (s) => s.trim());
+  let state = 0 /* inMemberExp */;
+  let stateStack = [];
+  let currentOpenBracketCount = 0;
+  let currentOpenParensCount = 0;
+  let currentStringType = null;
+  for (let i = 0; i < path.length; i++) {
+    const char = path.charAt(i);
+    switch (state) {
+      case 0 /* inMemberExp */:
+        if (char === "[") {
+          stateStack.push(state);
+          state = 1 /* inBrackets */;
+          currentOpenBracketCount++;
+        } else if (char === "(") {
+          stateStack.push(state);
+          state = 2 /* inParens */;
+          currentOpenParensCount++;
+        } else if (!(i === 0 ? validFirstIdentCharRE : validIdentCharRE).test(char)) {
+          return false;
+        }
+        break;
+      case 1 /* inBrackets */:
+        if (char === `'` || char === `"` || char === "`") {
+          stateStack.push(state);
+          state = 3 /* inString */;
+          currentStringType = char;
+        } else if (char === `[`) {
+          currentOpenBracketCount++;
+        } else if (char === `]`) {
+          if (!--currentOpenBracketCount) {
+            state = stateStack.pop();
+          }
+        }
+        break;
+      case 2 /* inParens */:
+        if (char === `'` || char === `"` || char === "`") {
+          stateStack.push(state);
+          state = 3 /* inString */;
+          currentStringType = char;
+        } else if (char === `(`) {
+          currentOpenParensCount++;
+        } else if (char === `)`) {
+          if (i === path.length - 1) {
+            return false;
+          }
+          if (!--currentOpenParensCount) {
+            state = stateStack.pop();
+          }
+        }
+        break;
+      case 3 /* inString */:
+        if (char === currentStringType) {
+          state = stateStack.pop();
+          currentStringType = null;
+        }
+        break;
+    }
+  }
+  return !currentOpenBracketCount && !currentOpenParensCount;
+};
+const isMemberExpressionNode = (path, context) => {
+  try {
+    let ret = parser.parseExpression(path, {
+      plugins: context.expressionPlugins
+    });
+    ret = unwrapTSNode(ret);
+    return ret.type === "MemberExpression" || ret.type === "OptionalMemberExpression" || ret.type === "Identifier" && ret.name !== "undefined";
+  } catch (e) {
+    return false;
+  }
+};
+const isMemberExpression = isMemberExpressionNode;
+function advancePositionWithClone(pos, source, numberOfCharacters = source.length) {
+  return advancePositionWithMutation(
+    {
+      offset: pos.offset,
+      line: pos.line,
+      column: pos.column
+    },
+    source,
+    numberOfCharacters
+  );
+}
+function advancePositionWithMutation(pos, source, numberOfCharacters = source.length) {
+  let linesCount = 0;
+  let lastNewLinePos = -1;
+  for (let i = 0; i < numberOfCharacters; i++) {
+    if (source.charCodeAt(i) === 10) {
+      linesCount++;
+      lastNewLinePos = i;
+    }
+  }
+  pos.offset += numberOfCharacters;
+  pos.line += linesCount;
+  pos.column = lastNewLinePos === -1 ? pos.column + numberOfCharacters : numberOfCharacters - lastNewLinePos;
+  return pos;
+}
+function assert(condition, msg) {
+  if (!condition) {
+    throw new Error(msg || `unexpected compiler condition`);
+  }
+}
+function findDir(node, name, allowEmpty = false) {
+  for (let i = 0; i < node.props.length; i++) {
+    const p = node.props[i];
+    if (p.type === 7 && (allowEmpty || p.exp) && (shared.isString(name) ? p.name === name : name.test(p.name))) {
+      return p;
+    }
+  }
+}
+function findProp(node, name, dynamicOnly = false, allowEmpty = false) {
+  for (let i = 0; i < node.props.length; i++) {
+    const p = node.props[i];
+    if (p.type === 6) {
+      if (dynamicOnly)
+        continue;
+      if (p.name === name && (p.value || allowEmpty)) {
+        return p;
+      }
+    } else if (p.name === "bind" && (p.exp || allowEmpty) && isStaticArgOf(p.arg, name)) {
+      return p;
+    }
+  }
+}
+function isStaticArgOf(arg, name) {
+  return !!(arg && isStaticExp(arg) && arg.content === name);
+}
+function hasDynamicKeyVBind(node) {
+  return node.props.some(
+    (p) => p.type === 7 && p.name === "bind" && (!p.arg || // v-bind="obj"
+    p.arg.type !== 4 || // v-bind:[_ctx.foo]
+    !p.arg.isStatic)
+    // v-bind:[foo]
+  );
+}
+function isText$1(node) {
+  return node.type === 5 || node.type === 2;
+}
+function isVSlot(p) {
+  return p.type === 7 && p.name === "slot";
+}
+function isTemplateNode(node) {
+  return node.type === 1 && node.tagType === 3;
+}
+function isSlotOutlet(node) {
+  return node.type === 1 && node.tagType === 2;
+}
+const propsHelperSet = /* @__PURE__ */ new Set([NORMALIZE_PROPS, GUARD_REACTIVE_PROPS]);
+function getUnnormalizedProps(props, callPath = []) {
+  if (props && !shared.isString(props) && props.type === 14) {
+    const callee = props.callee;
+    if (!shared.isString(callee) && propsHelperSet.has(callee)) {
+      return getUnnormalizedProps(
+        props.arguments[0],
+        callPath.concat(props)
+      );
+    }
+  }
+  return [props, callPath];
+}
+function injectProp(node, prop, context) {
+  let propsWithInjection;
+  let props = node.type === 13 ? node.props : node.arguments[2];
+  let callPath = [];
+  let parentCall;
+  if (props && !shared.isString(props) && props.type === 14) {
+    const ret = getUnnormalizedProps(props);
+    props = ret[0];
+    callPath = ret[1];
+    parentCall = callPath[callPath.length - 1];
+  }
+  if (props == null || shared.isString(props)) {
+    propsWithInjection = createObjectExpression([prop]);
+  } else if (props.type === 14) {
+    const first = props.arguments[0];
+    if (!shared.isString(first) && first.type === 15) {
+      if (!hasProp(prop, first)) {
+        first.properties.unshift(prop);
+      }
+    } else {
+      if (props.callee === TO_HANDLERS) {
+        propsWithInjection = createCallExpression(context.helper(MERGE_PROPS), [
+          createObjectExpression([prop]),
+          props
+        ]);
+      } else {
+        props.arguments.unshift(createObjectExpression([prop]));
+      }
+    }
+    !propsWithInjection && (propsWithInjection = props);
+  } else if (props.type === 15) {
+    if (!hasProp(prop, props)) {
+      props.properties.unshift(prop);
+    }
+    propsWithInjection = props;
+  } else {
+    propsWithInjection = createCallExpression(context.helper(MERGE_PROPS), [
+      createObjectExpression([prop]),
+      props
+    ]);
+    if (parentCall && parentCall.callee === GUARD_REACTIVE_PROPS) {
+      parentCall = callPath[callPath.length - 2];
+    }
+  }
+  if (node.type === 13) {
+    if (parentCall) {
+      parentCall.arguments[0] = propsWithInjection;
+    } else {
+      node.props = propsWithInjection;
+    }
+  } else {
+    if (parentCall) {
+      parentCall.arguments[0] = propsWithInjection;
+    } else {
+      node.arguments[2] = propsWithInjection;
+    }
+  }
+}
+function hasProp(prop, props) {
+  let result = false;
+  if (prop.key.type === 4) {
+    const propKeyName = prop.key.content;
+    result = props.properties.some(
+      (p) => p.key.type === 4 && p.key.content === propKeyName
+    );
+  }
+  return result;
+}
+function toValidAssetId(name, type) {
+  return `_${type}_${name.replace(/[^\w]/g, (searchValue, replaceValue) => {
+    return searchValue === "-" ? "_" : name.charCodeAt(replaceValue).toString();
+  })}`;
+}
+function hasScopeRef(node, ids) {
+  if (!node || Object.keys(ids).length === 0) {
+    return false;
+  }
+  switch (node.type) {
+    case 1:
+      for (let i = 0; i < node.props.length; i++) {
+        const p = node.props[i];
+        if (p.type === 7 && (hasScopeRef(p.arg, ids) || hasScopeRef(p.exp, ids))) {
+          return true;
+        }
+      }
+      return node.children.some((c) => hasScopeRef(c, ids));
+    case 11:
+      if (hasScopeRef(node.source, ids)) {
+        return true;
+      }
+      return node.children.some((c) => hasScopeRef(c, ids));
+    case 9:
+      return node.branches.some((b) => hasScopeRef(b, ids));
+    case 10:
+      if (hasScopeRef(node.condition, ids)) {
+        return true;
+      }
+      return node.children.some((c) => hasScopeRef(c, ids));
+    case 4:
+      return !node.isStatic && isSimpleIdentifier(node.content) && !!ids[node.content];
+    case 8:
+      return node.children.some((c) => shared.isObject(c) && hasScopeRef(c, ids));
+    case 5:
+    case 12:
+      return hasScopeRef(node.content, ids);
+    case 2:
+    case 3:
+      return false;
+    default:
+      return false;
+  }
+}
+function getMemoedVNodeCall(node) {
+  if (node.type === 14 && node.callee === WITH_MEMO) {
+    return node.arguments[1].returns;
+  } else {
+    return node;
+  }
+}
+const forAliasRE = /([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/;
+
+const defaultParserOptions = {
+  parseMode: "base",
+  ns: 0,
+  delimiters: [`{{`, `}}`],
+  getNamespace: () => 0,
+  isVoidTag: shared.NO,
+  isPreTag: shared.NO,
+  isCustomElement: shared.NO,
+  onError: defaultOnError,
+  onWarn: defaultOnWarn,
+  comments: true,
+  prefixIdentifiers: false
+};
+let currentOptions = defaultParserOptions;
+let currentRoot = null;
+let currentInput = "";
+let currentOpenTag = null;
+let currentProp = null;
+let currentAttrValue = "";
+let currentAttrStartIndex = -1;
+let currentAttrEndIndex = -1;
+let inPre = 0;
+let inVPre = false;
+let currentVPreBoundary = null;
+const stack = [];
+const tokenizer = new Tokenizer(stack, {
+  onerr: emitError,
+  ontext(start, end) {
+    onText(getSlice(start, end), start, end);
+  },
+  ontextentity(char, start, end) {
+    onText(char, start, end);
+  },
+  oninterpolation(start, end) {
+    if (inVPre) {
+      return onText(getSlice(start, end), start, end);
+    }
+    let innerStart = start + tokenizer.delimiterOpen.length;
+    let innerEnd = end - tokenizer.delimiterClose.length;
+    while (isWhitespace(currentInput.charCodeAt(innerStart))) {
+      innerStart++;
+    }
+    while (isWhitespace(currentInput.charCodeAt(innerEnd - 1))) {
+      innerEnd--;
+    }
+    let exp = getSlice(innerStart, innerEnd);
+    if (exp.includes("&")) {
+      {
+        exp = decode_js.decodeHTML(exp);
+      }
+    }
+    addNode({
+      type: 5,
+      content: createExp(exp, false, getLoc(innerStart, innerEnd)),
+      loc: getLoc(start, end)
+    });
+  },
+  onopentagname(start, end) {
+    const name = getSlice(start, end);
+    currentOpenTag = {
+      type: 1,
+      tag: name,
+      ns: currentOptions.getNamespace(name, stack[0], currentOptions.ns),
+      tagType: 0,
+      // will be refined on tag close
+      props: [],
+      children: [],
+      loc: getLoc(start - 1, end),
+      codegenNode: void 0
+    };
+  },
+  onopentagend(end) {
+    endOpenTag(end);
+  },
+  onclosetag(start, end) {
+    const name = getSlice(start, end);
+    if (!currentOptions.isVoidTag(name)) {
+      let found = false;
+      for (let i = 0; i < stack.length; i++) {
+        const e = stack[i];
+        if (e.tag.toLowerCase() === name.toLowerCase()) {
+          found = true;
+          if (i > 0) {
+            emitError(24, stack[0].loc.start.offset);
+          }
+          for (let j = 0; j <= i; j++) {
+            const el = stack.shift();
+            onCloseTag(el, end, j < i);
+          }
+          break;
+        }
+      }
+      if (!found) {
+        emitError(23, backTrack(start, 60));
+      }
+    }
+  },
+  onselfclosingtag(end) {
+    const name = currentOpenTag.tag;
+    currentOpenTag.isSelfClosing = true;
+    endOpenTag(end);
+    if (stack[0] && stack[0].tag === name) {
+      onCloseTag(stack.shift(), end);
+    }
+  },
+  onattribname(start, end) {
+    currentProp = {
+      type: 6,
+      name: getSlice(start, end),
+      nameLoc: getLoc(start, end),
+      value: void 0,
+      loc: getLoc(start)
+    };
+  },
+  ondirname(start, end) {
+    const raw = getSlice(start, end);
+    const name = raw === "." || raw === ":" ? "bind" : raw === "@" ? "on" : raw === "#" ? "slot" : raw.slice(2);
+    if (!inVPre && name === "") {
+      emitError(26, start);
+    }
+    if (inVPre || name === "") {
+      currentProp = {
+        type: 6,
+        name: raw,
+        nameLoc: getLoc(start, end),
+        value: void 0,
+        loc: getLoc(start)
+      };
+    } else {
+      currentProp = {
+        type: 7,
+        name,
+        rawName: raw,
+        exp: void 0,
+        arg: void 0,
+        modifiers: raw === "." ? ["prop"] : [],
+        loc: getLoc(start)
+      };
+      if (name === "pre") {
+        inVPre = tokenizer.inVPre = true;
+        currentVPreBoundary = currentOpenTag;
+        const props = currentOpenTag.props;
+        for (let i = 0; i < props.length; i++) {
+          if (props[i].type === 7) {
+            props[i] = dirToAttr(props[i]);
+          }
+        }
+      }
+    }
+  },
+  ondirarg(start, end) {
+    if (start === end)
+      return;
+    const arg = getSlice(start, end);
+    if (inVPre) {
+      currentProp.name += arg;
+      setLocEnd(currentProp.nameLoc, end);
+    } else {
+      const isStatic = arg[0] !== `[`;
+      currentProp.arg = createExp(
+        isStatic ? arg : arg.slice(1, -1),
+        isStatic,
+        getLoc(start, end),
+        isStatic ? 3 : 0
+      );
+    }
+  },
+  ondirmodifier(start, end) {
+    const mod = getSlice(start, end);
+    if (inVPre) {
+      currentProp.name += "." + mod;
+      setLocEnd(currentProp.nameLoc, end);
+    } else if (currentProp.name === "slot") {
+      const arg = currentProp.arg;
+      if (arg) {
+        arg.content += "." + mod;
+        setLocEnd(arg.loc, end);
+      }
+    } else {
+      currentProp.modifiers.push(mod);
+    }
+  },
+  onattribdata(start, end) {
+    currentAttrValue += getSlice(start, end);
+    if (currentAttrStartIndex < 0)
+      currentAttrStartIndex = start;
+    currentAttrEndIndex = end;
+  },
+  onattribentity(char, start, end) {
+    currentAttrValue += char;
+    if (currentAttrStartIndex < 0)
+      currentAttrStartIndex = start;
+    currentAttrEndIndex = end;
+  },
+  onattribnameend(end) {
+    const start = currentProp.loc.start.offset;
+    const name = getSlice(start, end);
+    if (currentProp.type === 7) {
+      currentProp.rawName = name;
+    }
+    if (currentOpenTag.props.some(
+      (p) => (p.type === 7 ? p.rawName : p.name) === name
+    )) {
+      emitError(2, start);
+    }
+  },
+  onattribend(quote, end) {
+    if (currentOpenTag && currentProp) {
+      setLocEnd(currentProp.loc, end);
+      if (quote !== 0) {
+        if (currentProp.type === 6) {
+          if (currentProp.name === "class") {
+            currentAttrValue = condense(currentAttrValue).trim();
+          }
+          if (quote === 1 && !currentAttrValue) {
+            emitError(13, end);
+          }
+          currentProp.value = {
+            type: 2,
+            content: currentAttrValue,
+            loc: quote === 1 ? getLoc(currentAttrStartIndex, currentAttrEndIndex) : getLoc(currentAttrStartIndex - 1, currentAttrEndIndex + 1)
+          };
+          if (tokenizer.inSFCRoot && currentOpenTag.tag === "template" && currentProp.name === "lang" && currentAttrValue && currentAttrValue !== "html") {
+            tokenizer.enterRCDATA(toCharCodes(`</template`), 0);
+          }
+        } else {
+          let expParseMode = 0 /* Normal */;
+          {
+            if (currentProp.name === "for") {
+              expParseMode = 3 /* Skip */;
+            } else if (currentProp.name === "slot") {
+              expParseMode = 1 /* Params */;
+            } else if (currentProp.name === "on" && currentAttrValue.includes(";")) {
+              expParseMode = 2 /* Statements */;
+            }
+          }
+          currentProp.exp = createExp(
+            currentAttrValue,
+            false,
+            getLoc(currentAttrStartIndex, currentAttrEndIndex),
+            0,
+            expParseMode
+          );
+          if (currentProp.name === "for") {
+            currentProp.forParseResult = parseForExpression(currentProp.exp);
+          }
+          let syncIndex = -1;
+          if (currentProp.name === "bind" && (syncIndex = currentProp.modifiers.indexOf("sync")) > -1 && checkCompatEnabled(
+            "COMPILER_V_BIND_SYNC",
+            currentOptions,
+            currentProp.loc,
+            currentProp.rawName
+          )) {
+            currentProp.name = "model";
+            currentProp.modifiers.splice(syncIndex, 1);
+          }
+        }
+      }
+      if (currentProp.type !== 7 || currentProp.name !== "pre") {
+        currentOpenTag.props.push(currentProp);
+      }
+    }
+    currentAttrValue = "";
+    currentAttrStartIndex = currentAttrEndIndex = -1;
+  },
+  oncomment(start, end) {
+    if (currentOptions.comments) {
+      addNode({
+        type: 3,
+        content: getSlice(start, end),
+        loc: getLoc(start - 4, end + 3)
+      });
+    }
+  },
+  onend() {
+    const end = currentInput.length;
+    if (tokenizer.state !== 1) {
+      switch (tokenizer.state) {
+        case 5:
+        case 8:
+          emitError(5, end);
+          break;
+        case 3:
+        case 4:
+          emitError(
+            25,
+            tokenizer.sectionStart
+          );
+          break;
+        case 28:
+          if (tokenizer.currentSequence === Sequences.CdataEnd) {
+            emitError(6, end);
+          } else {
+            emitError(7, end);
+          }
+          break;
+        case 6:
+        case 7:
+        case 9:
+        case 11:
+        case 12:
+        case 13:
+        case 14:
+        case 15:
+        case 16:
+        case 17:
+        case 18:
+        case 19:
+        case 20:
+        case 21:
+          emitError(9, end);
+          break;
+      }
+    }
+    for (let index = 0; index < stack.length; index++) {
+      onCloseTag(stack[index], end - 1);
+      emitError(24, stack[index].loc.start.offset);
+    }
+  },
+  oncdata(start, end) {
+    if (stack[0].ns !== 0) {
+      onText(getSlice(start, end), start, end);
+    } else {
+      emitError(1, start - 9);
+    }
+  },
+  onprocessinginstruction(start) {
+    if ((stack[0] ? stack[0].ns : currentOptions.ns) === 0) {
+      emitError(
+        21,
+        start - 1
+      );
+    }
+  }
+});
+const forIteratorRE = /,([^,\}\]]*)(?:,([^,\}\]]*))?$/;
+const stripParensRE = /^\(|\)$/g;
+function parseForExpression(input) {
+  const loc = input.loc;
+  const exp = input.content;
+  const inMatch = exp.match(forAliasRE);
+  if (!inMatch)
+    return;
+  const [, LHS, RHS] = inMatch;
+  const createAliasExpression = (content, offset, asParam = false) => {
+    const start = loc.start.offset + offset;
+    const end = start + content.length;
+    return createExp(
+      content,
+      false,
+      getLoc(start, end),
+      0,
+      asParam ? 1 /* Params */ : 0 /* Normal */
+    );
+  };
+  const result = {
+    source: createAliasExpression(RHS.trim(), exp.indexOf(RHS, LHS.length)),
+    value: void 0,
+    key: void 0,
+    index: void 0,
+    finalized: false
+  };
+  let valueContent = LHS.trim().replace(stripParensRE, "").trim();
+  const trimmedOffset = LHS.indexOf(valueContent);
+  const iteratorMatch = valueContent.match(forIteratorRE);
+  if (iteratorMatch) {
+    valueContent = valueContent.replace(forIteratorRE, "").trim();
+    const keyContent = iteratorMatch[1].trim();
+    let keyOffset;
+    if (keyContent) {
+      keyOffset = exp.indexOf(keyContent, trimmedOffset + valueContent.length);
+      result.key = createAliasExpression(keyContent, keyOffset, true);
+    }
+    if (iteratorMatch[2]) {
+      const indexContent = iteratorMatch[2].trim();
+      if (indexContent) {
+        result.index = createAliasExpression(
+          indexContent,
+          exp.indexOf(
+            indexContent,
+            result.key ? keyOffset + keyContent.length : trimmedOffset + valueContent.length
+          ),
+          true
+        );
+      }
+    }
+  }
+  if (valueContent) {
+    result.value = createAliasExpression(valueContent, trimmedOffset, true);
+  }
+  return result;
+}
+function getSlice(start, end) {
+  return currentInput.slice(start, end);
+}
+function endOpenTag(end) {
+  if (tokenizer.inSFCRoot) {
+    currentOpenTag.innerLoc = getLoc(end + 1, end + 1);
+  }
+  addNode(currentOpenTag);
+  const { tag, ns } = currentOpenTag;
+  if (ns === 0 && currentOptions.isPreTag(tag)) {
+    inPre++;
+  }
+  if (currentOptions.isVoidTag(tag)) {
+    onCloseTag(currentOpenTag, end);
+  } else {
+    stack.unshift(currentOpenTag);
+    if (ns === 1 || ns === 2) {
+      tokenizer.inXML = true;
+    }
+  }
+  currentOpenTag = null;
+}
+function onText(content, start, end) {
+  const parent = stack[0] || currentRoot;
+  const lastNode = parent.children[parent.children.length - 1];
+  if (lastNode && lastNode.type === 2) {
+    lastNode.content += content;
+    setLocEnd(lastNode.loc, end);
+  } else {
+    parent.children.push({
+      type: 2,
+      content,
+      loc: getLoc(start, end)
+    });
+  }
+}
+function onCloseTag(el, end, isImplied = false) {
+  if (isImplied) {
+    setLocEnd(el.loc, backTrack(end, 60));
+  } else {
+    setLocEnd(el.loc, lookAhead(end, 62) + 1);
+  }
+  if (tokenizer.inSFCRoot) {
+    if (el.children.length) {
+      el.innerLoc.end = shared.extend({}, el.children[el.children.length - 1].loc.end);
+    } else {
+      el.innerLoc.end = shared.extend({}, el.innerLoc.start);
+    }
+    el.innerLoc.source = getSlice(
+      el.innerLoc.start.offset,
+      el.innerLoc.end.offset
+    );
+  }
+  const { tag, ns } = el;
+  if (!inVPre) {
+    if (tag === "slot") {
+      el.tagType = 2;
+    } else if (isFragmentTemplate(el)) {
+      el.tagType = 3;
+    } else if (isComponent(el)) {
+      el.tagType = 1;
+    }
+  }
+  if (!tokenizer.inRCDATA) {
+    el.children = condenseWhitespace(el.children, el.tag);
+  }
+  if (ns === 0 && currentOptions.isPreTag(tag)) {
+    inPre--;
+  }
+  if (currentVPreBoundary === el) {
+    inVPre = tokenizer.inVPre = false;
+    currentVPreBoundary = null;
+  }
+  if (tokenizer.inXML && (stack[0] ? stack[0].ns : currentOptions.ns) === 0) {
+    tokenizer.inXML = false;
+  }
+  {
+    const props = el.props;
+    if (isCompatEnabled(
+      "COMPILER_V_IF_V_FOR_PRECEDENCE",
+      currentOptions
+    )) {
+      let hasIf = false;
+      let hasFor = false;
+      for (let i = 0; i < props.length; i++) {
+        const p = props[i];
+        if (p.type === 7) {
+          if (p.name === "if") {
+            hasIf = true;
+          } else if (p.name === "for") {
+            hasFor = true;
+          }
+        }
+        if (hasIf && hasFor) {
+          warnDeprecation(
+            "COMPILER_V_IF_V_FOR_PRECEDENCE",
+            currentOptions,
+            el.loc
+          );
+          break;
+        }
+      }
+    }
+    if (!tokenizer.inSFCRoot && isCompatEnabled(
+      "COMPILER_NATIVE_TEMPLATE",
+      currentOptions
+    ) && el.tag === "template" && !isFragmentTemplate(el)) {
+      warnDeprecation(
+        "COMPILER_NATIVE_TEMPLATE",
+        currentOptions,
+        el.loc
+      );
+      const parent = stack[0] || currentRoot;
+      const index = parent.children.indexOf(el);
+      parent.children.splice(index, 1, ...el.children);
+    }
+    const inlineTemplateProp = props.find(
+      (p) => p.type === 6 && p.name === "inline-template"
+    );
+    if (inlineTemplateProp && checkCompatEnabled(
+      "COMPILER_INLINE_TEMPLATE",
+      currentOptions,
+      inlineTemplateProp.loc
+    ) && el.children.length) {
+      inlineTemplateProp.value = {
+        type: 2,
+        content: getSlice(
+          el.children[0].loc.start.offset,
+          el.children[el.children.length - 1].loc.end.offset
+        ),
+        loc: inlineTemplateProp.loc
+      };
+    }
+  }
+}
+function lookAhead(index, c) {
+  let i = index;
+  while (currentInput.charCodeAt(i) !== c && i < currentInput.length - 1)
+    i++;
+  return i;
+}
+function backTrack(index, c) {
+  let i = index;
+  while (currentInput.charCodeAt(i) !== c && i >= 0)
+    i--;
+  return i;
+}
+const specialTemplateDir = /* @__PURE__ */ new Set(["if", "else", "else-if", "for", "slot"]);
+function isFragmentTemplate({ tag, props }) {
+  if (tag === "template") {
+    for (let i = 0; i < props.length; i++) {
+      if (props[i].type === 7 && specialTemplateDir.has(props[i].name)) {
+        return true;
+      }
+    }
+  }
+  return false;
+}
+function isComponent({ tag, props }) {
+  if (currentOptions.isCustomElement(tag)) {
+    return false;
+  }
+  if (tag === "component" || isUpperCase(tag.charCodeAt(0)) || isCoreComponent(tag) || currentOptions.isBuiltInComponent && currentOptions.isBuiltInComponent(tag) || currentOptions.isNativeTag && !currentOptions.isNativeTag(tag)) {
+    return true;
+  }
+  for (let i = 0; i < props.length; i++) {
+    const p = props[i];
+    if (p.type === 6) {
+      if (p.name === "is" && p.value) {
+        if (p.value.content.startsWith("vue:")) {
+          return true;
+        } else if (checkCompatEnabled(
+          "COMPILER_IS_ON_ELEMENT",
+          currentOptions,
+          p.loc
+        )) {
+          return true;
+        }
+      }
+    } else if (// :is on plain element - only treat as component in compat mode
+    p.name === "bind" && isStaticArgOf(p.arg, "is") && checkCompatEnabled(
+      "COMPILER_IS_ON_ELEMENT",
+      currentOptions,
+      p.loc
+    )) {
+      return true;
+    }
+  }
+  return false;
+}
+function isUpperCase(c) {
+  return c > 64 && c < 91;
+}
+const windowsNewlineRE = /\r\n/g;
+function condenseWhitespace(nodes, tag) {
+  const shouldCondense = currentOptions.whitespace !== "preserve";
+  let removedWhitespace = false;
+  for (let i = 0; i < nodes.length; i++) {
+    const node = nodes[i];
+    if (node.type === 2) {
+      if (!inPre) {
+        if (isAllWhitespace(node.content)) {
+          const prev = nodes[i - 1] && nodes[i - 1].type;
+          const next = nodes[i + 1] && nodes[i + 1].type;
+          if (!prev || !next || shouldCondense && (prev === 3 && (next === 3 || next === 1) || prev === 1 && (next === 3 || next === 1 && hasNewlineChar(node.content)))) {
+            removedWhitespace = true;
+            nodes[i] = null;
+          } else {
+            node.content = " ";
+          }
+        } else if (shouldCondense) {
+          node.content = condense(node.content);
+        }
+      } else {
+        node.content = node.content.replace(windowsNewlineRE, "\n");
+      }
+    }
+  }
+  if (inPre && tag && currentOptions.isPreTag(tag)) {
+    const first = nodes[0];
+    if (first && first.type === 2) {
+      first.content = first.content.replace(/^\r?\n/, "");
+    }
+  }
+  return removedWhitespace ? nodes.filter(Boolean) : nodes;
+}
+function isAllWhitespace(str) {
+  for (let i = 0; i < str.length; i++) {
+    if (!isWhitespace(str.charCodeAt(i))) {
+      return false;
+    }
+  }
+  return true;
+}
+function hasNewlineChar(str) {
+  for (let i = 0; i < str.length; i++) {
+    const c = str.charCodeAt(i);
+    if (c === 10 || c === 13) {
+      return true;
+    }
+  }
+  return false;
+}
+function condense(str) {
+  let ret = "";
+  let prevCharIsWhitespace = false;
+  for (let i = 0; i < str.length; i++) {
+    if (isWhitespace(str.charCodeAt(i))) {
+      if (!prevCharIsWhitespace) {
+        ret += " ";
+        prevCharIsWhitespace = true;
+      }
+    } else {
+      ret += str[i];
+      prevCharIsWhitespace = false;
+    }
+  }
+  return ret;
+}
+function addNode(node) {
+  (stack[0] || currentRoot).children.push(node);
+}
+function getLoc(start, end) {
+  return {
+    start: tokenizer.getPos(start),
+    // @ts-expect-error allow late attachment
+    end: end == null ? end : tokenizer.getPos(end),
+    // @ts-expect-error allow late attachment
+    source: end == null ? end : getSlice(start, end)
+  };
+}
+function setLocEnd(loc, end) {
+  loc.end = tokenizer.getPos(end);
+  loc.source = getSlice(loc.start.offset, end);
+}
+function dirToAttr(dir) {
+  const attr = {
+    type: 6,
+    name: dir.rawName,
+    nameLoc: getLoc(
+      dir.loc.start.offset,
+      dir.loc.start.offset + dir.rawName.length
+    ),
+    value: void 0,
+    loc: dir.loc
+  };
+  if (dir.exp) {
+    const loc = dir.exp.loc;
+    if (loc.end.offset < dir.loc.end.offset) {
+      loc.start.offset--;
+      loc.start.column--;
+      loc.end.offset++;
+      loc.end.column++;
+    }
+    attr.value = {
+      type: 2,
+      content: dir.exp.content,
+      loc
+    };
+  }
+  return attr;
+}
+function createExp(content, isStatic = false, loc, constType = 0, parseMode = 0 /* Normal */) {
+  const exp = createSimpleExpression(content, isStatic, loc, constType);
+  if (!isStatic && currentOptions.prefixIdentifiers && parseMode !== 3 /* Skip */ && content.trim()) {
+    if (isSimpleIdentifier(content)) {
+      exp.ast = null;
+      return exp;
+    }
+    try {
+      const plugins = currentOptions.expressionPlugins;
+      const options = {
+        plugins: plugins ? [...plugins, "typescript"] : ["typescript"]
+      };
+      if (parseMode === 2 /* Statements */) {
+        exp.ast = parser.parse(` ${content} `, options).program;
+      } else if (parseMode === 1 /* Params */) {
+        exp.ast = parser.parseExpression(`(${content})=>{}`, options);
+      } else {
+        exp.ast = parser.parseExpression(`(${content})`, options);
+      }
+    } catch (e) {
+      exp.ast = false;
+      emitError(45, loc.start.offset, e.message);
+    }
+  }
+  return exp;
+}
+function emitError(code, index, message) {
+  currentOptions.onError(
+    createCompilerError(code, getLoc(index, index), void 0, message)
+  );
+}
+function reset() {
+  tokenizer.reset();
+  currentOpenTag = null;
+  currentProp = null;
+  currentAttrValue = "";
+  currentAttrStartIndex = -1;
+  currentAttrEndIndex = -1;
+  stack.length = 0;
+}
+function baseParse(input, options) {
+  reset();
+  currentInput = input;
+  currentOptions = shared.extend({}, defaultParserOptions);
+  if (options) {
+    let key;
+    for (key in options) {
+      if (options[key] != null) {
+        currentOptions[key] = options[key];
+      }
+    }
+  }
+  {
+    if (currentOptions.decodeEntities) {
+      console.warn(
+        `[@vue/compiler-core] decodeEntities option is passed but will be ignored in non-browser builds.`
+      );
+    }
+  }
+  tokenizer.mode = currentOptions.parseMode === "html" ? 1 : currentOptions.parseMode === "sfc" ? 2 : 0;
+  tokenizer.inXML = currentOptions.ns === 1 || currentOptions.ns === 2;
+  const delimiters = options && options.delimiters;
+  if (delimiters) {
+    tokenizer.delimiterOpen = toCharCodes(delimiters[0]);
+    tokenizer.delimiterClose = toCharCodes(delimiters[1]);
+  }
+  const root = currentRoot = createRoot([], input);
+  tokenizer.parse(currentInput);
+  root.loc = getLoc(0, input.length);
+  root.children = condenseWhitespace(root.children);
+  currentRoot = null;
+  return root;
+}
+
+function hoistStatic(root, context) {
+  walk(
+    root,
+    context,
+    // Root node is unfortunately non-hoistable due to potential parent
+    // fallthrough attributes.
+    isSingleElementRoot(root, root.children[0])
+  );
+}
+function isSingleElementRoot(root, child) {
+  const { children } = root;
+  return children.length === 1 && child.type === 1 && !isSlotOutlet(child);
+}
+function walk(node, context, doNotHoistNode = false) {
+  const { children } = node;
+  const originalCount = children.length;
+  let hoistedCount = 0;
+  for (let i = 0; i < children.length; i++) {
+    const child = children[i];
+    if (child.type === 1 && child.tagType === 0) {
+      const constantType = doNotHoistNode ? 0 : getConstantType(child, context);
+      if (constantType > 0) {
+        if (constantType >= 2) {
+          child.codegenNode.patchFlag = -1 + (` /* HOISTED */` );
+          child.codegenNode = context.hoist(child.codegenNode);
+          hoistedCount++;
+          continue;
+        }
+      } else {
+        const codegenNode = child.codegenNode;
+        if (codegenNode.type === 13) {
+          const flag = getPatchFlag(codegenNode);
+          if ((!flag || flag === 512 || flag === 1) && getGeneratedPropsConstantType(child, context) >= 2) {
+            const props = getNodeProps(child);
+            if (props) {
+              codegenNode.props = context.hoist(props);
+            }
+          }
+          if (codegenNode.dynamicProps) {
+            codegenNode.dynamicProps = context.hoist(codegenNode.dynamicProps);
+          }
+        }
+      }
+    }
+    if (child.type === 1) {
+      const isComponent = child.tagType === 1;
+      if (isComponent) {
+        context.scopes.vSlot++;
+      }
+      walk(child, context);
+      if (isComponent) {
+        context.scopes.vSlot--;
+      }
+    } else if (child.type === 11) {
+      walk(child, context, child.children.length === 1);
+    } else if (child.type === 9) {
+      for (let i2 = 0; i2 < child.branches.length; i2++) {
+        walk(
+          child.branches[i2],
+          context,
+          child.branches[i2].children.length === 1
+        );
+      }
+    }
+  }
+  if (hoistedCount && context.transformHoist) {
+    context.transformHoist(children, context, node);
+  }
+  if (hoistedCount && hoistedCount === originalCount && node.type === 1 && node.tagType === 0 && node.codegenNode && node.codegenNode.type === 13 && shared.isArray(node.codegenNode.children)) {
+    const hoisted = context.hoist(
+      createArrayExpression(node.codegenNode.children)
+    );
+    if (context.hmr) {
+      hoisted.content = `[...${hoisted.content}]`;
+    }
+    node.codegenNode.children = hoisted;
+  }
+}
+function getConstantType(node, context) {
+  const { constantCache } = context;
+  switch (node.type) {
+    case 1:
+      if (node.tagType !== 0) {
+        return 0;
+      }
+      const cached = constantCache.get(node);
+      if (cached !== void 0) {
+        return cached;
+      }
+      const codegenNode = node.codegenNode;
+      if (codegenNode.type !== 13) {
+        return 0;
+      }
+      if (codegenNode.isBlock && node.tag !== "svg" && node.tag !== "foreignObject") {
+        return 0;
+      }
+      const flag = getPatchFlag(codegenNode);
+      if (!flag) {
+        let returnType2 = 3;
+        const generatedPropsType = getGeneratedPropsConstantType(node, context);
+        if (generatedPropsType === 0) {
+          constantCache.set(node, 0);
+          return 0;
+        }
+        if (generatedPropsType < returnType2) {
+          returnType2 = generatedPropsType;
+        }
+        for (let i = 0; i < node.children.length; i++) {
+          const childType = getConstantType(node.children[i], context);
+          if (childType === 0) {
+            constantCache.set(node, 0);
+            return 0;
+          }
+          if (childType < returnType2) {
+            returnType2 = childType;
+          }
+        }
+        if (returnType2 > 1) {
+          for (let i = 0; i < node.props.length; i++) {
+            const p = node.props[i];
+            if (p.type === 7 && p.name === "bind" && p.exp) {
+              const expType = getConstantType(p.exp, context);
+              if (expType === 0) {
+                constantCache.set(node, 0);
+                return 0;
+              }
+              if (expType < returnType2) {
+                returnType2 = expType;
+              }
+            }
+          }
+        }
+        if (codegenNode.isBlock) {
+          for (let i = 0; i < node.props.length; i++) {
+            const p = node.props[i];
+            if (p.type === 7) {
+              constantCache.set(node, 0);
+              return 0;
+            }
+          }
+          context.removeHelper(OPEN_BLOCK);
+          context.removeHelper(
+            getVNodeBlockHelper(context.inSSR, codegenNode.isComponent)
+          );
+          codegenNode.isBlock = false;
+          context.helper(getVNodeHelper(context.inSSR, codegenNode.isComponent));
+        }
+        constantCache.set(node, returnType2);
+        return returnType2;
+      } else {
+        constantCache.set(node, 0);
+        return 0;
+      }
+    case 2:
+    case 3:
+      return 3;
+    case 9:
+    case 11:
+    case 10:
+      return 0;
+    case 5:
+    case 12:
+      return getConstantType(node.content, context);
+    case 4:
+      return node.constType;
+    case 8:
+      let returnType = 3;
+      for (let i = 0; i < node.children.length; i++) {
+        const child = node.children[i];
+        if (shared.isString(child) || shared.isSymbol(child)) {
+          continue;
+        }
+        const childType = getConstantType(child, context);
+        if (childType === 0) {
+          return 0;
+        } else if (childType < returnType) {
+          returnType = childType;
+        }
+      }
+      return returnType;
+    default:
+      return 0;
+  }
+}
+const allowHoistedHelperSet = /* @__PURE__ */ new Set([
+  NORMALIZE_CLASS,
+  NORMALIZE_STYLE,
+  NORMALIZE_PROPS,
+  GUARD_REACTIVE_PROPS
+]);
+function getConstantTypeOfHelperCall(value, context) {
+  if (value.type === 14 && !shared.isString(value.callee) && allowHoistedHelperSet.has(value.callee)) {
+    const arg = value.arguments[0];
+    if (arg.type === 4) {
+      return getConstantType(arg, context);
+    } else if (arg.type === 14) {
+      return getConstantTypeOfHelperCall(arg, context);
+    }
+  }
+  return 0;
+}
+function getGeneratedPropsConstantType(node, context) {
+  let returnType = 3;
+  const props = getNodeProps(node);
+  if (props && props.type === 15) {
+    const { properties } = props;
+    for (let i = 0; i < properties.length; i++) {
+      const { key, value } = properties[i];
+      const keyType = getConstantType(key, context);
+      if (keyType === 0) {
+        return keyType;
+      }
+      if (keyType < returnType) {
+        returnType = keyType;
+      }
+      let valueType;
+      if (value.type === 4) {
+        valueType = getConstantType(value, context);
+      } else if (value.type === 14) {
+        valueType = getConstantTypeOfHelperCall(value, context);
+      } else {
+        valueType = 0;
+      }
+      if (valueType === 0) {
+        return valueType;
+      }
+      if (valueType < returnType) {
+        returnType = valueType;
+      }
+    }
+  }
+  return returnType;
+}
+function getNodeProps(node) {
+  const codegenNode = node.codegenNode;
+  if (codegenNode.type === 13) {
+    return codegenNode.props;
+  }
+}
+function getPatchFlag(node) {
+  const flag = node.patchFlag;
+  return flag ? parseInt(flag, 10) : void 0;
+}
+
+function createTransformContext(root, {
+  filename = "",
+  prefixIdentifiers = false,
+  hoistStatic: hoistStatic2 = false,
+  hmr = false,
+  cacheHandlers = false,
+  nodeTransforms = [],
+  directiveTransforms = {},
+  transformHoist = null,
+  isBuiltInComponent = shared.NOOP,
+  isCustomElement = shared.NOOP,
+  expressionPlugins = [],
+  scopeId = null,
+  slotted = true,
+  ssr = false,
+  inSSR = false,
+  ssrCssVars = ``,
+  bindingMetadata = shared.EMPTY_OBJ,
+  inline = false,
+  isTS = false,
+  onError = defaultOnError,
+  onWarn = defaultOnWarn,
+  compatConfig
+}) {
+  const nameMatch = filename.replace(/\?.*$/, "").match(/([^/\\]+)\.\w+$/);
+  const context = {
+    // options
+    filename,
+    selfName: nameMatch && shared.capitalize(shared.camelize(nameMatch[1])),
+    prefixIdentifiers,
+    hoistStatic: hoistStatic2,
+    hmr,
+    cacheHandlers,
+    nodeTransforms,
+    directiveTransforms,
+    transformHoist,
+    isBuiltInComponent,
+    isCustomElement,
+    expressionPlugins,
+    scopeId,
+    slotted,
+    ssr,
+    inSSR,
+    ssrCssVars,
+    bindingMetadata,
+    inline,
+    isTS,
+    onError,
+    onWarn,
+    compatConfig,
+    // state
+    root,
+    helpers: /* @__PURE__ */ new Map(),
+    components: /* @__PURE__ */ new Set(),
+    directives: /* @__PURE__ */ new Set(),
+    hoists: [],
+    imports: [],
+    constantCache: /* @__PURE__ */ new WeakMap(),
+    temps: 0,
+    cached: 0,
+    identifiers: /* @__PURE__ */ Object.create(null),
+    scopes: {
+      vFor: 0,
+      vSlot: 0,
+      vPre: 0,
+      vOnce: 0
+    },
+    parent: null,
+    grandParent: null,
+    currentNode: root,
+    childIndex: 0,
+    inVOnce: false,
+    // methods
+    helper(name) {
+      const count = context.helpers.get(name) || 0;
+      context.helpers.set(name, count + 1);
+      return name;
+    },
+    removeHelper(name) {
+      const count = context.helpers.get(name);
+      if (count) {
+        const currentCount = count - 1;
+        if (!currentCount) {
+          context.helpers.delete(name);
+        } else {
+          context.helpers.set(name, currentCount);
+        }
+      }
+    },
+    helperString(name) {
+      return `_${helperNameMap[context.helper(name)]}`;
+    },
+    replaceNode(node) {
+      {
+        if (!context.currentNode) {
+          throw new Error(`Node being replaced is already removed.`);
+        }
+        if (!context.parent) {
+          throw new Error(`Cannot replace root node.`);
+        }
+      }
+      context.parent.children[context.childIndex] = context.currentNode = node;
+    },
+    removeNode(node) {
+      if (!context.parent) {
+        throw new Error(`Cannot remove root node.`);
+      }
+      const list = context.parent.children;
+      const removalIndex = node ? list.indexOf(node) : context.currentNode ? context.childIndex : -1;
+      if (removalIndex < 0) {
+        throw new Error(`node being removed is not a child of current parent`);
+      }
+      if (!node || node === context.currentNode) {
+        context.currentNode = null;
+        context.onNodeRemoved();
+      } else {
+        if (context.childIndex > removalIndex) {
+          context.childIndex--;
+          context.onNodeRemoved();
+        }
+      }
+      context.parent.children.splice(removalIndex, 1);
+    },
+    onNodeRemoved: shared.NOOP,
+    addIdentifiers(exp) {
+      {
+        if (shared.isString(exp)) {
+          addId(exp);
+        } else if (exp.identifiers) {
+          exp.identifiers.forEach(addId);
+        } else if (exp.type === 4) {
+          addId(exp.content);
+        }
+      }
+    },
+    removeIdentifiers(exp) {
+      {
+        if (shared.isString(exp)) {
+          removeId(exp);
+        } else if (exp.identifiers) {
+          exp.identifiers.forEach(removeId);
+        } else if (exp.type === 4) {
+          removeId(exp.content);
+        }
+      }
+    },
+    hoist(exp) {
+      if (shared.isString(exp))
+        exp = createSimpleExpression(exp);
+      context.hoists.push(exp);
+      const identifier = createSimpleExpression(
+        `_hoisted_${context.hoists.length}`,
+        false,
+        exp.loc,
+        2
+      );
+      identifier.hoisted = exp;
+      return identifier;
+    },
+    cache(exp, isVNode = false) {
+      return createCacheExpression(context.cached++, exp, isVNode);
+    }
+  };
+  {
+    context.filters = /* @__PURE__ */ new Set();
+  }
+  function addId(id) {
+    const { identifiers } = context;
+    if (identifiers[id] === void 0) {
+      identifiers[id] = 0;
+    }
+    identifiers[id]++;
+  }
+  function removeId(id) {
+    context.identifiers[id]--;
+  }
+  return context;
+}
+function transform(root, options) {
+  const context = createTransformContext(root, options);
+  traverseNode(root, context);
+  if (options.hoistStatic) {
+    hoistStatic(root, context);
+  }
+  if (!options.ssr) {
+    createRootCodegen(root, context);
+  }
+  root.helpers = /* @__PURE__ */ new Set([...context.helpers.keys()]);
+  root.components = [...context.components];
+  root.directives = [...context.directives];
+  root.imports = context.imports;
+  root.hoists = context.hoists;
+  root.temps = context.temps;
+  root.cached = context.cached;
+  root.transformed = true;
+  {
+    root.filters = [...context.filters];
+  }
+}
+function createRootCodegen(root, context) {
+  const { helper } = context;
+  const { children } = root;
+  if (children.length === 1) {
+    const child = children[0];
+    if (isSingleElementRoot(root, child) && child.codegenNode) {
+      const codegenNode = child.codegenNode;
+      if (codegenNode.type === 13) {
+        convertToBlock(codegenNode, context);
+      }
+      root.codegenNode = codegenNode;
+    } else {
+      root.codegenNode = child;
+    }
+  } else if (children.length > 1) {
+    let patchFlag = 64;
+    let patchFlagText = shared.PatchFlagNames[64];
+    if (children.filter((c) => c.type !== 3).length === 1) {
+      patchFlag |= 2048;
+      patchFlagText += `, ${shared.PatchFlagNames[2048]}`;
+    }
+    root.codegenNode = createVNodeCall(
+      context,
+      helper(FRAGMENT),
+      void 0,
+      root.children,
+      patchFlag + (` /* ${patchFlagText} */` ),
+      void 0,
+      void 0,
+      true,
+      void 0,
+      false
+    );
+  } else ;
+}
+function traverseChildren(parent, context) {
+  let i = 0;
+  const nodeRemoved = () => {
+    i--;
+  };
+  for (; i < parent.children.length; i++) {
+    const child = parent.children[i];
+    if (shared.isString(child))
+      continue;
+    context.grandParent = context.parent;
+    context.parent = parent;
+    context.childIndex = i;
+    context.onNodeRemoved = nodeRemoved;
+    traverseNode(child, context);
+  }
+}
+function traverseNode(node, context) {
+  context.currentNode = node;
+  const { nodeTransforms } = context;
+  const exitFns = [];
+  for (let i2 = 0; i2 < nodeTransforms.length; i2++) {
+    const onExit = nodeTransforms[i2](node, context);
+    if (onExit) {
+      if (shared.isArray(onExit)) {
+        exitFns.push(...onExit);
+      } else {
+        exitFns.push(onExit);
+      }
+    }
+    if (!context.currentNode) {
+      return;
+    } else {
+      node = context.currentNode;
+    }
+  }
+  switch (node.type) {
+    case 3:
+      if (!context.ssr) {
+        context.helper(CREATE_COMMENT);
+      }
+      break;
+    case 5:
+      if (!context.ssr) {
+        context.helper(TO_DISPLAY_STRING);
+      }
+      break;
+    case 9:
+      for (let i2 = 0; i2 < node.branches.length; i2++) {
+        traverseNode(node.branches[i2], context);
+      }
+      break;
+    case 10:
+    case 11:
+    case 1:
+    case 0:
+      traverseChildren(node, context);
+      break;
+  }
+  context.currentNode = node;
+  let i = exitFns.length;
+  while (i--) {
+    exitFns[i]();
+  }
+}
+function createStructuralDirectiveTransform(name, fn) {
+  const matches = shared.isString(name) ? (n) => n === name : (n) => name.test(n);
+  return (node, context) => {
+    if (node.type === 1) {
+      const { props } = node;
+      if (node.tagType === 3 && props.some(isVSlot)) {
+        return;
+      }
+      const exitFns = [];
+      for (let i = 0; i < props.length; i++) {
+        const prop = props[i];
+        if (prop.type === 7 && matches(prop.name)) {
+          props.splice(i, 1);
+          i--;
+          const onExit = fn(node, prop, context);
+          if (onExit)
+            exitFns.push(onExit);
+        }
+      }
+      return exitFns;
+    }
+  };
+}
+
+const PURE_ANNOTATION = `/*#__PURE__*/`;
+const aliasHelper = (s) => `${helperNameMap[s]}: _${helperNameMap[s]}`;
+function createCodegenContext(ast, {
+  mode = "function",
+  prefixIdentifiers = mode === "module",
+  sourceMap = false,
+  filename = `template.vue.html`,
+  scopeId = null,
+  optimizeImports = false,
+  runtimeGlobalName = `Vue`,
+  runtimeModuleName = `vue`,
+  ssrRuntimeModuleName = "vue/server-renderer",
+  ssr = false,
+  isTS = false,
+  inSSR = false
+}) {
+  const context = {
+    mode,
+    prefixIdentifiers,
+    sourceMap,
+    filename,
+    scopeId,
+    optimizeImports,
+    runtimeGlobalName,
+    runtimeModuleName,
+    ssrRuntimeModuleName,
+    ssr,
+    isTS,
+    inSSR,
+    source: ast.source,
+    code: ``,
+    column: 1,
+    line: 1,
+    offset: 0,
+    indentLevel: 0,
+    pure: false,
+    map: void 0,
+    helper(key) {
+      return `_${helperNameMap[key]}`;
+    },
+    push(code, newlineIndex = -2 /* None */, node) {
+      context.code += code;
+      if (context.map) {
+        if (node) {
+          let name;
+          if (node.type === 4 && !node.isStatic) {
+            const content = node.content.replace(/^_ctx\./, "");
+            if (content !== node.content && isSimpleIdentifier(content)) {
+              name = content;
+            }
+          }
+          addMapping(node.loc.start, name);
+        }
+        if (newlineIndex === -3 /* Unknown */) {
+          advancePositionWithMutation(context, code);
+        } else {
+          context.offset += code.length;
+          if (newlineIndex === -2 /* None */) {
+            context.column += code.length;
+          } else {
+            if (newlineIndex === -1 /* End */) {
+              newlineIndex = code.length - 1;
+            }
+            context.line++;
+            context.column = code.length - newlineIndex;
+          }
+        }
+        if (node && node.loc !== locStub) {
+          addMapping(node.loc.end);
+        }
+      }
+    },
+    indent() {
+      newline(++context.indentLevel);
+    },
+    deindent(withoutNewLine = false) {
+      if (withoutNewLine) {
+        --context.indentLevel;
+      } else {
+        newline(--context.indentLevel);
+      }
+    },
+    newline() {
+      newline(context.indentLevel);
+    }
+  };
+  function newline(n) {
+    context.push("\n" + `  `.repeat(n), 0 /* Start */);
+  }
+  function addMapping(loc, name = null) {
+    const { _names, _mappings } = context.map;
+    if (name !== null && !_names.has(name))
+      _names.add(name);
+    _mappings.add({
+      originalLine: loc.line,
+      originalColumn: loc.column - 1,
+      // source-map column is 0 based
+      generatedLine: context.line,
+      generatedColumn: context.column - 1,
+      source: filename,
+      name
+    });
+  }
+  if (sourceMap) {
+    context.map = new sourceMapJs.SourceMapGenerator();
+    context.map.setSourceContent(filename, context.source);
+    context.map._sources.add(filename);
+  }
+  return context;
+}
+function generate(ast, options = {}) {
+  const context = createCodegenContext(ast, options);
+  if (options.onContextCreated)
+    options.onContextCreated(context);
+  const {
+    mode,
+    push,
+    prefixIdentifiers,
+    indent,
+    deindent,
+    newline,
+    scopeId,
+    ssr
+  } = context;
+  const helpers = Array.from(ast.helpers);
+  const hasHelpers = helpers.length > 0;
+  const useWithBlock = !prefixIdentifiers && mode !== "module";
+  const genScopeId = scopeId != null && mode === "module";
+  const isSetupInlined = !!options.inline;
+  const preambleContext = isSetupInlined ? createCodegenContext(ast, options) : context;
+  if (mode === "module") {
+    genModulePreamble(ast, preambleContext, genScopeId, isSetupInlined);
+  } else {
+    genFunctionPreamble(ast, preambleContext);
+  }
+  const functionName = ssr ? `ssrRender` : `render`;
+  const args = ssr ? ["_ctx", "_push", "_parent", "_attrs"] : ["_ctx", "_cache"];
+  if (options.bindingMetadata && !options.inline) {
+    args.push("$props", "$setup", "$data", "$options");
+  }
+  const signature = options.isTS ? args.map((arg) => `${arg}: any`).join(",") : args.join(", ");
+  if (isSetupInlined) {
+    push(`(${signature}) => {`);
+  } else {
+    push(`function ${functionName}(${signature}) {`);
+  }
+  indent();
+  if (useWithBlock) {
+    push(`with (_ctx) {`);
+    indent();
+    if (hasHelpers) {
+      push(
+        `const { ${helpers.map(aliasHelper).join(", ")} } = _Vue
+`,
+        -1 /* End */
+      );
+      newline();
+    }
+  }
+  if (ast.components.length) {
+    genAssets(ast.components, "component", context);
+    if (ast.directives.length || ast.temps > 0) {
+      newline();
+    }
+  }
+  if (ast.directives.length) {
+    genAssets(ast.directives, "directive", context);
+    if (ast.temps > 0) {
+      newline();
+    }
+  }
+  if (ast.filters && ast.filters.length) {
+    newline();
+    genAssets(ast.filters, "filter", context);
+    newline();
+  }
+  if (ast.temps > 0) {
+    push(`let `);
+    for (let i = 0; i < ast.temps; i++) {
+      push(`${i > 0 ? `, ` : ``}_temp${i}`);
+    }
+  }
+  if (ast.components.length || ast.directives.length || ast.temps) {
+    push(`
+`, 0 /* Start */);
+    newline();
+  }
+  if (!ssr) {
+    push(`return `);
+  }
+  if (ast.codegenNode) {
+    genNode(ast.codegenNode, context);
+  } else {
+    push(`null`);
+  }
+  if (useWithBlock) {
+    deindent();
+    push(`}`);
+  }
+  deindent();
+  push(`}`);
+  return {
+    ast,
+    code: context.code,
+    preamble: isSetupInlined ? preambleContext.code : ``,
+    map: context.map ? context.map.toJSON() : void 0
+  };
+}
+function genFunctionPreamble(ast, context) {
+  const {
+    ssr,
+    prefixIdentifiers,
+    push,
+    newline,
+    runtimeModuleName,
+    runtimeGlobalName,
+    ssrRuntimeModuleName
+  } = context;
+  const VueBinding = ssr ? `require(${JSON.stringify(runtimeModuleName)})` : runtimeGlobalName;
+  const helpers = Array.from(ast.helpers);
+  if (helpers.length > 0) {
+    if (prefixIdentifiers) {
+      push(
+        `const { ${helpers.map(aliasHelper).join(", ")} } = ${VueBinding}
+`,
+        -1 /* End */
+      );
+    } else {
+      push(`const _Vue = ${VueBinding}
+`, -1 /* End */);
+      if (ast.hoists.length) {
+        const staticHelpers = [
+          CREATE_VNODE,
+          CREATE_ELEMENT_VNODE,
+          CREATE_COMMENT,
+          CREATE_TEXT,
+          CREATE_STATIC
+        ].filter((helper) => helpers.includes(helper)).map(aliasHelper).join(", ");
+        push(`const { ${staticHelpers} } = _Vue
+`, -1 /* End */);
+      }
+    }
+  }
+  if (ast.ssrHelpers && ast.ssrHelpers.length) {
+    push(
+      `const { ${ast.ssrHelpers.map(aliasHelper).join(", ")} } = require("${ssrRuntimeModuleName}")
+`,
+      -1 /* End */
+    );
+  }
+  genHoists(ast.hoists, context);
+  newline();
+  push(`return `);
+}
+function genModulePreamble(ast, context, genScopeId, inline) {
+  const {
+    push,
+    newline,
+    optimizeImports,
+    runtimeModuleName,
+    ssrRuntimeModuleName
+  } = context;
+  if (genScopeId && ast.hoists.length) {
+    ast.helpers.add(PUSH_SCOPE_ID);
+    ast.helpers.add(POP_SCOPE_ID);
+  }
+  if (ast.helpers.size) {
+    const helpers = Array.from(ast.helpers);
+    if (optimizeImports) {
+      push(
+        `import { ${helpers.map((s) => helperNameMap[s]).join(", ")} } from ${JSON.stringify(runtimeModuleName)}
+`,
+        -1 /* End */
+      );
+      push(
+        `
+// Binding optimization for webpack code-split
+const ${helpers.map((s) => `_${helperNameMap[s]} = ${helperNameMap[s]}`).join(", ")}
+`,
+        -1 /* End */
+      );
+    } else {
+      push(
+        `import { ${helpers.map((s) => `${helperNameMap[s]} as _${helperNameMap[s]}`).join(", ")} } from ${JSON.stringify(runtimeModuleName)}
+`,
+        -1 /* End */
+      );
+    }
+  }
+  if (ast.ssrHelpers && ast.ssrHelpers.length) {
+    push(
+      `import { ${ast.ssrHelpers.map((s) => `${helperNameMap[s]} as _${helperNameMap[s]}`).join(", ")} } from "${ssrRuntimeModuleName}"
+`,
+      -1 /* End */
+    );
+  }
+  if (ast.imports.length) {
+    genImports(ast.imports, context);
+    newline();
+  }
+  genHoists(ast.hoists, context);
+  newline();
+  if (!inline) {
+    push(`export `);
+  }
+}
+function genAssets(assets, type, { helper, push, newline, isTS }) {
+  const resolver = helper(
+    type === "filter" ? RESOLVE_FILTER : type === "component" ? RESOLVE_COMPONENT : RESOLVE_DIRECTIVE
+  );
+  for (let i = 0; i < assets.length; i++) {
+    let id = assets[i];
+    const maybeSelfReference = id.endsWith("__self");
+    if (maybeSelfReference) {
+      id = id.slice(0, -6);
+    }
+    push(
+      `const ${toValidAssetId(id, type)} = ${resolver}(${JSON.stringify(id)}${maybeSelfReference ? `, true` : ``})${isTS ? `!` : ``}`
+    );
+    if (i < assets.length - 1) {
+      newline();
+    }
+  }
+}
+function genHoists(hoists, context) {
+  if (!hoists.length) {
+    return;
+  }
+  context.pure = true;
+  const { push, newline, helper, scopeId, mode } = context;
+  const genScopeId = scopeId != null && mode !== "function";
+  newline();
+  if (genScopeId) {
+    push(
+      `const _withScopeId = n => (${helper(
+        PUSH_SCOPE_ID
+      )}("${scopeId}"),n=n(),${helper(POP_SCOPE_ID)}(),n)`
+    );
+    newline();
+  }
+  for (let i = 0; i < hoists.length; i++) {
+    const exp = hoists[i];
+    if (exp) {
+      const needScopeIdWrapper = genScopeId && exp.type === 13;
+      push(
+        `const _hoisted_${i + 1} = ${needScopeIdWrapper ? `${PURE_ANNOTATION} _withScopeId(() => ` : ``}`
+      );
+      genNode(exp, context);
+      if (needScopeIdWrapper) {
+        push(`)`);
+      }
+      newline();
+    }
+  }
+  context.pure = false;
+}
+function genImports(importsOptions, context) {
+  if (!importsOptions.length) {
+    return;
+  }
+  importsOptions.forEach((imports) => {
+    context.push(`import `);
+    genNode(imports.exp, context);
+    context.push(` from '${imports.path}'`);
+    context.newline();
+  });
+}
+function isText(n) {
+  return shared.isString(n) || n.type === 4 || n.type === 2 || n.type === 5 || n.type === 8;
+}
+function genNodeListAsArray(nodes, context) {
+  const multilines = nodes.length > 3 || nodes.some((n) => shared.isArray(n) || !isText(n));
+  context.push(`[`);
+  multilines && context.indent();
+  genNodeList(nodes, context, multilines);
+  multilines && context.deindent();
+  context.push(`]`);
+}
+function genNodeList(nodes, context, multilines = false, comma = true) {
+  const { push, newline } = context;
+  for (let i = 0; i < nodes.length; i++) {
+    const node = nodes[i];
+    if (shared.isString(node)) {
+      push(node, -3 /* Unknown */);
+    } else if (shared.isArray(node)) {
+      genNodeListAsArray(node, context);
+    } else {
+      genNode(node, context);
+    }
+    if (i < nodes.length - 1) {
+      if (multilines) {
+        comma && push(",");
+        newline();
+      } else {
+        comma && push(", ");
+      }
+    }
+  }
+}
+function genNode(node, context) {
+  if (shared.isString(node)) {
+    context.push(node, -3 /* Unknown */);
+    return;
+  }
+  if (shared.isSymbol(node)) {
+    context.push(context.helper(node));
+    return;
+  }
+  switch (node.type) {
+    case 1:
+    case 9:
+    case 11:
+      assert(
+        node.codegenNode != null,
+        `Codegen node is missing for element/if/for node. Apply appropriate transforms first.`
+      );
+      genNode(node.codegenNode, context);
+      break;
+    case 2:
+      genText(node, context);
+      break;
+    case 4:
+      genExpression(node, context);
+      break;
+    case 5:
+      genInterpolation(node, context);
+      break;
+    case 12:
+      genNode(node.codegenNode, context);
+      break;
+    case 8:
+      genCompoundExpression(node, context);
+      break;
+    case 3:
+      genComment(node, context);
+      break;
+    case 13:
+      genVNodeCall(node, context);
+      break;
+    case 14:
+      genCallExpression(node, context);
+      break;
+    case 15:
+      genObjectExpression(node, context);
+      break;
+    case 17:
+      genArrayExpression(node, context);
+      break;
+    case 18:
+      genFunctionExpression(node, context);
+      break;
+    case 19:
+      genConditionalExpression(node, context);
+      break;
+    case 20:
+      genCacheExpression(node, context);
+      break;
+    case 21:
+      genNodeList(node.body, context, true, false);
+      break;
+    case 22:
+      genTemplateLiteral(node, context);
+      break;
+    case 23:
+      genIfStatement(node, context);
+      break;
+    case 24:
+      genAssignmentExpression(node, context);
+      break;
+    case 25:
+      genSequenceExpression(node, context);
+      break;
+    case 26:
+      genReturnStatement(node, context);
+      break;
+    case 10:
+      break;
+    default:
+      {
+        assert(false, `unhandled codegen node type: ${node.type}`);
+        const exhaustiveCheck = node;
+        return exhaustiveCheck;
+      }
+  }
+}
+function genText(node, context) {
+  context.push(JSON.stringify(node.content), -3 /* Unknown */, node);
+}
+function genExpression(node, context) {
+  const { content, isStatic } = node;
+  context.push(
+    isStatic ? JSON.stringify(content) : content,
+    -3 /* Unknown */,
+    node
+  );
+}
+function genInterpolation(node, context) {
+  const { push, helper, pure } = context;
+  if (pure)
+    push(PURE_ANNOTATION);
+  push(`${helper(TO_DISPLAY_STRING)}(`);
+  genNode(node.content, context);
+  push(`)`);
+}
+function genCompoundExpression(node, context) {
+  for (let i = 0; i < node.children.length; i++) {
+    const child = node.children[i];
+    if (shared.isString(child)) {
+      context.push(child, -3 /* Unknown */);
+    } else {
+      genNode(child, context);
+    }
+  }
+}
+function genExpressionAsPropertyKey(node, context) {
+  const { push } = context;
+  if (node.type === 8) {
+    push(`[`);
+    genCompoundExpression(node, context);
+    push(`]`);
+  } else if (node.isStatic) {
+    const text = isSimpleIdentifier(node.content) ? node.content : JSON.stringify(node.content);
+    push(text, -2 /* None */, node);
+  } else {
+    push(`[${node.content}]`, -3 /* Unknown */, node);
+  }
+}
+function genComment(node, context) {
+  const { push, helper, pure } = context;
+  if (pure) {
+    push(PURE_ANNOTATION);
+  }
+  push(
+    `${helper(CREATE_COMMENT)}(${JSON.stringify(node.content)})`,
+    -3 /* Unknown */,
+    node
+  );
+}
+function genVNodeCall(node, context) {
+  const { push, helper, pure } = context;
+  const {
+    tag,
+    props,
+    children,
+    patchFlag,
+    dynamicProps,
+    directives,
+    isBlock,
+    disableTracking,
+    isComponent
+  } = node;
+  if (directives) {
+    push(helper(WITH_DIRECTIVES) + `(`);
+  }
+  if (isBlock) {
+    push(`(${helper(OPEN_BLOCK)}(${disableTracking ? `true` : ``}), `);
+  }
+  if (pure) {
+    push(PURE_ANNOTATION);
+  }
+  const callHelper = isBlock ? getVNodeBlockHelper(context.inSSR, isComponent) : getVNodeHelper(context.inSSR, isComponent);
+  push(helper(callHelper) + `(`, -2 /* None */, node);
+  genNodeList(
+    genNullableArgs([tag, props, children, patchFlag, dynamicProps]),
+    context
+  );
+  push(`)`);
+  if (isBlock) {
+    push(`)`);
+  }
+  if (directives) {
+    push(`, `);
+    genNode(directives, context);
+    push(`)`);
+  }
+}
+function genNullableArgs(args) {
+  let i = args.length;
+  while (i--) {
+    if (args[i] != null)
+      break;
+  }
+  return args.slice(0, i + 1).map((arg) => arg || `null`);
+}
+function genCallExpression(node, context) {
+  const { push, helper, pure } = context;
+  const callee = shared.isString(node.callee) ? node.callee : helper(node.callee);
+  if (pure) {
+    push(PURE_ANNOTATION);
+  }
+  push(callee + `(`, -2 /* None */, node);
+  genNodeList(node.arguments, context);
+  push(`)`);
+}
+function genObjectExpression(node, context) {
+  const { push, indent, deindent, newline } = context;
+  const { properties } = node;
+  if (!properties.length) {
+    push(`{}`, -2 /* None */, node);
+    return;
+  }
+  const multilines = properties.length > 1 || properties.some((p) => p.value.type !== 4);
+  push(multilines ? `{` : `{ `);
+  multilines && indent();
+  for (let i = 0; i < properties.length; i++) {
+    const { key, value } = properties[i];
+    genExpressionAsPropertyKey(key, context);
+    push(`: `);
+    genNode(value, context);
+    if (i < properties.length - 1) {
+      push(`,`);
+      newline();
+    }
+  }
+  multilines && deindent();
+  push(multilines ? `}` : ` }`);
+}
+function genArrayExpression(node, context) {
+  genNodeListAsArray(node.elements, context);
+}
+function genFunctionExpression(node, context) {
+  const { push, indent, deindent } = context;
+  const { params, returns, body, newline, isSlot } = node;
+  if (isSlot) {
+    push(`_${helperNameMap[WITH_CTX]}(`);
+  }
+  push(`(`, -2 /* None */, node);
+  if (shared.isArray(params)) {
+    genNodeList(params, context);
+  } else if (params) {
+    genNode(params, context);
+  }
+  push(`) => `);
+  if (newline || body) {
+    push(`{`);
+    indent();
+  }
+  if (returns) {
+    if (newline) {
+      push(`return `);
+    }
+    if (shared.isArray(returns)) {
+      genNodeListAsArray(returns, context);
+    } else {
+      genNode(returns, context);
+    }
+  } else if (body) {
+    genNode(body, context);
+  }
+  if (newline || body) {
+    deindent();
+    push(`}`);
+  }
+  if (isSlot) {
+    if (node.isNonScopedSlot) {
+      push(`, undefined, true`);
+    }
+    push(`)`);
+  }
+}
+function genConditionalExpression(node, context) {
+  const { test, consequent, alternate, newline: needNewline } = node;
+  const { push, indent, deindent, newline } = context;
+  if (test.type === 4) {
+    const needsParens = !isSimpleIdentifier(test.content);
+    needsParens && push(`(`);
+    genExpression(test, context);
+    needsParens && push(`)`);
+  } else {
+    push(`(`);
+    genNode(test, context);
+    push(`)`);
+  }
+  needNewline && indent();
+  context.indentLevel++;
+  needNewline || push(` `);
+  push(`? `);
+  genNode(consequent, context);
+  context.indentLevel--;
+  needNewline && newline();
+  needNewline || push(` `);
+  push(`: `);
+  const isNested = alternate.type === 19;
+  if (!isNested) {
+    context.indentLevel++;
+  }
+  genNode(alternate, context);
+  if (!isNested) {
+    context.indentLevel--;
+  }
+  needNewline && deindent(
+    true
+    /* without newline */
+  );
+}
+function genCacheExpression(node, context) {
+  const { push, helper, indent, deindent, newline } = context;
+  push(`_cache[${node.index}] || (`);
+  if (node.isVNode) {
+    indent();
+    push(`${helper(SET_BLOCK_TRACKING)}(-1),`);
+    newline();
+  }
+  push(`_cache[${node.index}] = `);
+  genNode(node.value, context);
+  if (node.isVNode) {
+    push(`,`);
+    newline();
+    push(`${helper(SET_BLOCK_TRACKING)}(1),`);
+    newline();
+    push(`_cache[${node.index}]`);
+    deindent();
+  }
+  push(`)`);
+}
+function genTemplateLiteral(node, context) {
+  const { push, indent, deindent } = context;
+  push("`");
+  const l = node.elements.length;
+  const multilines = l > 3;
+  for (let i = 0; i < l; i++) {
+    const e = node.elements[i];
+    if (shared.isString(e)) {
+      push(e.replace(/(`|\$|\\)/g, "\\$1"), -3 /* Unknown */);
+    } else {
+      push("${");
+      if (multilines)
+        indent();
+      genNode(e, context);
+      if (multilines)
+        deindent();
+      push("}");
+    }
+  }
+  push("`");
+}
+function genIfStatement(node, context) {
+  const { push, indent, deindent } = context;
+  const { test, consequent, alternate } = node;
+  push(`if (`);
+  genNode(test, context);
+  push(`) {`);
+  indent();
+  genNode(consequent, context);
+  deindent();
+  push(`}`);
+  if (alternate) {
+    push(` else `);
+    if (alternate.type === 23) {
+      genIfStatement(alternate, context);
+    } else {
+      push(`{`);
+      indent();
+      genNode(alternate, context);
+      deindent();
+      push(`}`);
+    }
+  }
+}
+function genAssignmentExpression(node, context) {
+  genNode(node.left, context);
+  context.push(` = `);
+  genNode(node.right, context);
+}
+function genSequenceExpression(node, context) {
+  context.push(`(`);
+  genNodeList(node.expressions, context);
+  context.push(`)`);
+}
+function genReturnStatement({ returns }, context) {
+  context.push(`return `);
+  if (shared.isArray(returns)) {
+    genNodeListAsArray(returns, context);
+  } else {
+    genNode(returns, context);
+  }
+}
+
+const isLiteralWhitelisted = /* @__PURE__ */ shared.makeMap("true,false,null,this");
+const transformExpression = (node, context) => {
+  if (node.type === 5) {
+    node.content = processExpression(
+      node.content,
+      context
+    );
+  } else if (node.type === 1) {
+    for (let i = 0; i < node.props.length; i++) {
+      const dir = node.props[i];
+      if (dir.type === 7 && dir.name !== "for") {
+        const exp = dir.exp;
+        const arg = dir.arg;
+        if (exp && exp.type === 4 && !(dir.name === "on" && arg)) {
+          dir.exp = processExpression(
+            exp,
+            context,
+            // slot args must be processed as function params
+            dir.name === "slot"
+          );
+        }
+        if (arg && arg.type === 4 && !arg.isStatic) {
+          dir.arg = processExpression(arg, context);
+        }
+      }
+    }
+  }
+};
+function processExpression(node, context, asParams = false, asRawStatements = false, localVars = Object.create(context.identifiers)) {
+  if (!context.prefixIdentifiers || !node.content.trim()) {
+    return node;
+  }
+  const { inline, bindingMetadata } = context;
+  const rewriteIdentifier = (raw, parent, id) => {
+    const type = shared.hasOwn(bindingMetadata, raw) && bindingMetadata[raw];
+    if (inline) {
+      const isAssignmentLVal = parent && parent.type === "AssignmentExpression" && parent.left === id;
+      const isUpdateArg = parent && parent.type === "UpdateExpression" && parent.argument === id;
+      const isDestructureAssignment = parent && isInDestructureAssignment(parent, parentStack);
+      const isNewExpression = parent && isInNewExpression(parentStack);
+      const wrapWithUnref = (raw2) => {
+        const wrapped = `${context.helperString(UNREF)}(${raw2})`;
+        return isNewExpression ? `(${wrapped})` : wrapped;
+      };
+      if (isConst(type) || type === "setup-reactive-const" || localVars[raw]) {
+        return raw;
+      } else if (type === "setup-ref") {
+        return `${raw}.value`;
+      } else if (type === "setup-maybe-ref") {
+        return isAssignmentLVal || isUpdateArg || isDestructureAssignment ? `${raw}.value` : wrapWithUnref(raw);
+      } else if (type === "setup-let") {
+        if (isAssignmentLVal) {
+          const { right: rVal, operator } = parent;
+          const rExp = rawExp.slice(rVal.start - 1, rVal.end - 1);
+          const rExpString = stringifyExpression(
+            processExpression(
+              createSimpleExpression(rExp, false),
+              context,
+              false,
+              false,
+              knownIds
+            )
+          );
+          return `${context.helperString(IS_REF)}(${raw})${context.isTS ? ` //@ts-ignore
+` : ``} ? ${raw}.value ${operator} ${rExpString} : ${raw}`;
+        } else if (isUpdateArg) {
+          id.start = parent.start;
+          id.end = parent.end;
+          const { prefix: isPrefix, operator } = parent;
+          const prefix = isPrefix ? operator : ``;
+          const postfix = isPrefix ? `` : operator;
+          return `${context.helperString(IS_REF)}(${raw})${context.isTS ? ` //@ts-ignore
+` : ``} ? ${prefix}${raw}.value${postfix} : ${prefix}${raw}${postfix}`;
+        } else if (isDestructureAssignment) {
+          return raw;
+        } else {
+          return wrapWithUnref(raw);
+        }
+      } else if (type === "props") {
+        return shared.genPropsAccessExp(raw);
+      } else if (type === "props-aliased") {
+        return shared.genPropsAccessExp(bindingMetadata.__propsAliases[raw]);
+      }
+    } else {
+      if (type && type.startsWith("setup") || type === "literal-const") {
+        return `$setup.${raw}`;
+      } else if (type === "props-aliased") {
+        return `$props['${bindingMetadata.__propsAliases[raw]}']`;
+      } else if (type) {
+        return `$${type}.${raw}`;
+      }
+    }
+    return `_ctx.${raw}`;
+  };
+  const rawExp = node.content;
+  let ast = node.ast;
+  if (ast === false) {
+    return node;
+  }
+  if (ast === null || !ast && isSimpleIdentifier(rawExp)) {
+    const isScopeVarReference = context.identifiers[rawExp];
+    const isAllowedGlobal = shared.isGloballyAllowed(rawExp);
+    const isLiteral = isLiteralWhitelisted(rawExp);
+    if (!asParams && !isScopeVarReference && !isLiteral && (!isAllowedGlobal || bindingMetadata[rawExp])) {
+      if (isConst(bindingMetadata[rawExp])) {
+        node.constType = 1;
+      }
+      node.content = rewriteIdentifier(rawExp);
+    } else if (!isScopeVarReference) {
+      if (isLiteral) {
+        node.constType = 3;
+      } else {
+        node.constType = 2;
+      }
+    }
+    return node;
+  }
+  if (!ast) {
+    const source = asRawStatements ? ` ${rawExp} ` : `(${rawExp})${asParams ? `=>{}` : ``}`;
+    try {
+      ast = parser.parseExpression(source, {
+        sourceType: "module",
+        plugins: context.expressionPlugins
+      });
+    } catch (e) {
+      context.onError(
+        createCompilerError(
+          45,
+          node.loc,
+          void 0,
+          e.message
+        )
+      );
+      return node;
+    }
+  }
+  const ids = [];
+  const parentStack = [];
+  const knownIds = Object.create(context.identifiers);
+  walkIdentifiers(
+    ast,
+    (node2, parent, _, isReferenced, isLocal) => {
+      if (isStaticPropertyKey(node2, parent)) {
+        return;
+      }
+      if (node2.name.startsWith("_filter_")) {
+        return;
+      }
+      const needPrefix = isReferenced && canPrefix(node2);
+      if (needPrefix && !isLocal) {
+        if (isStaticProperty(parent) && parent.shorthand) {
+          node2.prefix = `${node2.name}: `;
+        }
+        node2.name = rewriteIdentifier(node2.name, parent, node2);
+        ids.push(node2);
+      } else {
+        if (!(needPrefix && isLocal) && parent.type !== "CallExpression" && parent.type !== "NewExpression" && parent.type !== "MemberExpression") {
+          node2.isConstant = true;
+        }
+        ids.push(node2);
+      }
+    },
+    true,
+    // invoke on ALL identifiers
+    parentStack,
+    knownIds
+  );
+  const children = [];
+  ids.sort((a, b) => a.start - b.start);
+  ids.forEach((id, i) => {
+    const start = id.start - 1;
+    const end = id.end - 1;
+    const last = ids[i - 1];
+    const leadingText = rawExp.slice(last ? last.end - 1 : 0, start);
+    if (leadingText.length || id.prefix) {
+      children.push(leadingText + (id.prefix || ``));
+    }
+    const source = rawExp.slice(start, end);
+    children.push(
+      createSimpleExpression(
+        id.name,
+        false,
+        {
+          start: advancePositionWithClone(node.loc.start, source, start),
+          end: advancePositionWithClone(node.loc.start, source, end),
+          source
+        },
+        id.isConstant ? 3 : 0
+      )
+    );
+    if (i === ids.length - 1 && end < rawExp.length) {
+      children.push(rawExp.slice(end));
+    }
+  });
+  let ret;
+  if (children.length) {
+    ret = createCompoundExpression(children, node.loc);
+    ret.ast = ast;
+  } else {
+    ret = node;
+    ret.constType = 3;
+  }
+  ret.identifiers = Object.keys(knownIds);
+  return ret;
+}
+function canPrefix(id) {
+  if (shared.isGloballyAllowed(id.name)) {
+    return false;
+  }
+  if (id.name === "require") {
+    return false;
+  }
+  return true;
+}
+function stringifyExpression(exp) {
+  if (shared.isString(exp)) {
+    return exp;
+  } else if (exp.type === 4) {
+    return exp.content;
+  } else {
+    return exp.children.map(stringifyExpression).join("");
+  }
+}
+function isConst(type) {
+  return type === "setup-const" || type === "literal-const";
+}
+
+const transformIf = createStructuralDirectiveTransform(
+  /^(if|else|else-if)$/,
+  (node, dir, context) => {
+    return processIf(node, dir, context, (ifNode, branch, isRoot) => {
+      const siblings = context.parent.children;
+      let i = siblings.indexOf(ifNode);
+      let key = 0;
+      while (i-- >= 0) {
+        const sibling = siblings[i];
+        if (sibling && sibling.type === 9) {
+          key += sibling.branches.length;
+        }
+      }
+      return () => {
+        if (isRoot) {
+          ifNode.codegenNode = createCodegenNodeForBranch(
+            branch,
+            key,
+            context
+          );
+        } else {
+          const parentCondition = getParentCondition(ifNode.codegenNode);
+          parentCondition.alternate = createCodegenNodeForBranch(
+            branch,
+            key + ifNode.branches.length - 1,
+            context
+          );
+        }
+      };
+    });
+  }
+);
+function processIf(node, dir, context, processCodegen) {
+  if (dir.name !== "else" && (!dir.exp || !dir.exp.content.trim())) {
+    const loc = dir.exp ? dir.exp.loc : node.loc;
+    context.onError(
+      createCompilerError(28, dir.loc)
+    );
+    dir.exp = createSimpleExpression(`true`, false, loc);
+  }
+  if (context.prefixIdentifiers && dir.exp) {
+    dir.exp = processExpression(dir.exp, context);
+  }
+  if (dir.name === "if") {
+    const branch = createIfBranch(node, dir);
+    const ifNode = {
+      type: 9,
+      loc: node.loc,
+      branches: [branch]
+    };
+    context.replaceNode(ifNode);
+    if (processCodegen) {
+      return processCodegen(ifNode, branch, true);
+    }
+  } else {
+    const siblings = context.parent.children;
+    const comments = [];
+    let i = siblings.indexOf(node);
+    while (i-- >= -1) {
+      const sibling = siblings[i];
+      if (sibling && sibling.type === 3) {
+        context.removeNode(sibling);
+        comments.unshift(sibling);
+        continue;
+      }
+      if (sibling && sibling.type === 2 && !sibling.content.trim().length) {
+        context.removeNode(sibling);
+        continue;
+      }
+      if (sibling && sibling.type === 9) {
+        if (dir.name === "else-if" && sibling.branches[sibling.branches.length - 1].condition === void 0) {
+          context.onError(
+            createCompilerError(30, node.loc)
+          );
+        }
+        context.removeNode();
+        const branch = createIfBranch(node, dir);
+        if (comments.length && // #3619 ignore comments if the v-if is direct child of <transition>
+        !(context.parent && context.parent.type === 1 && (context.parent.tag === "transition" || context.parent.tag === "Transition"))) {
+          branch.children = [...comments, ...branch.children];
+        }
+        {
+          const key = branch.userKey;
+          if (key) {
+            sibling.branches.forEach(({ userKey }) => {
+              if (isSameKey(userKey, key)) {
+                context.onError(
+                  createCompilerError(
+                    29,
+                    branch.userKey.loc
+                  )
+                );
+              }
+            });
+          }
+        }
+        sibling.branches.push(branch);
+        const onExit = processCodegen && processCodegen(sibling, branch, false);
+        traverseNode(branch, context);
+        if (onExit)
+          onExit();
+        context.currentNode = null;
+      } else {
+        context.onError(
+          createCompilerError(30, node.loc)
+        );
+      }
+      break;
+    }
+  }
+}
+function createIfBranch(node, dir) {
+  const isTemplateIf = node.tagType === 3;
+  return {
+    type: 10,
+    loc: node.loc,
+    condition: dir.name === "else" ? void 0 : dir.exp,
+    children: isTemplateIf && !findDir(node, "for") ? node.children : [node],
+    userKey: findProp(node, `key`),
+    isTemplateIf
+  };
+}
+function createCodegenNodeForBranch(branch, keyIndex, context) {
+  if (branch.condition) {
+    return createConditionalExpression(
+      branch.condition,
+      createChildrenCodegenNode(branch, keyIndex, context),
+      // make sure to pass in asBlock: true so that the comment node call
+      // closes the current block.
+      createCallExpression(context.helper(CREATE_COMMENT), [
+        '"v-if"' ,
+        "true"
+      ])
+    );
+  } else {
+    return createChildrenCodegenNode(branch, keyIndex, context);
+  }
+}
+function createChildrenCodegenNode(branch, keyIndex, context) {
+  const { helper } = context;
+  const keyProperty = createObjectProperty(
+    `key`,
+    createSimpleExpression(
+      `${keyIndex}`,
+      false,
+      locStub,
+      2
+    )
+  );
+  const { children } = branch;
+  const firstChild = children[0];
+  const needFragmentWrapper = children.length !== 1 || firstChild.type !== 1;
+  if (needFragmentWrapper) {
+    if (children.length === 1 && firstChild.type === 11) {
+      const vnodeCall = firstChild.codegenNode;
+      injectProp(vnodeCall, keyProperty, context);
+      return vnodeCall;
+    } else {
+      let patchFlag = 64;
+      let patchFlagText = shared.PatchFlagNames[64];
+      if (!branch.isTemplateIf && children.filter((c) => c.type !== 3).length === 1) {
+        patchFlag |= 2048;
+        patchFlagText += `, ${shared.PatchFlagNames[2048]}`;
+      }
+      return createVNodeCall(
+        context,
+        helper(FRAGMENT),
+        createObjectExpression([keyProperty]),
+        children,
+        patchFlag + (` /* ${patchFlagText} */` ),
+        void 0,
+        void 0,
+        true,
+        false,
+        false,
+        branch.loc
+      );
+    }
+  } else {
+    const ret = firstChild.codegenNode;
+    const vnodeCall = getMemoedVNodeCall(ret);
+    if (vnodeCall.type === 13) {
+      convertToBlock(vnodeCall, context);
+    }
+    injectProp(vnodeCall, keyProperty, context);
+    return ret;
+  }
+}
+function isSameKey(a, b) {
+  if (!a || a.type !== b.type) {
+    return false;
+  }
+  if (a.type === 6) {
+    if (a.value.content !== b.value.content) {
+      return false;
+    }
+  } else {
+    const exp = a.exp;
+    const branchExp = b.exp;
+    if (exp.type !== branchExp.type) {
+      return false;
+    }
+    if (exp.type !== 4 || exp.isStatic !== branchExp.isStatic || exp.content !== branchExp.content) {
+      return false;
+    }
+  }
+  return true;
+}
+function getParentCondition(node) {
+  while (true) {
+    if (node.type === 19) {
+      if (node.alternate.type === 19) {
+        node = node.alternate;
+      } else {
+        return node;
+      }
+    } else if (node.type === 20) {
+      node = node.value;
+    }
+  }
+}
+
+const transformFor = createStructuralDirectiveTransform(
+  "for",
+  (node, dir, context) => {
+    const { helper, removeHelper } = context;
+    return processFor(node, dir, context, (forNode) => {
+      const renderExp = createCallExpression(helper(RENDER_LIST), [
+        forNode.source
+      ]);
+      const isTemplate = isTemplateNode(node);
+      const memo = findDir(node, "memo");
+      const keyProp = findProp(node, `key`);
+      const keyExp = keyProp && (keyProp.type === 6 ? createSimpleExpression(keyProp.value.content, true) : keyProp.exp);
+      const keyProperty = keyProp ? createObjectProperty(`key`, keyExp) : null;
+      if (isTemplate) {
+        if (memo) {
+          memo.exp = processExpression(
+            memo.exp,
+            context
+          );
+        }
+        if (keyProperty && keyProp.type !== 6) {
+          keyProperty.value = processExpression(
+            keyProperty.value,
+            context
+          );
+        }
+      }
+      const isStableFragment = forNode.source.type === 4 && forNode.source.constType > 0;
+      const fragmentFlag = isStableFragment ? 64 : keyProp ? 128 : 256;
+      forNode.codegenNode = createVNodeCall(
+        context,
+        helper(FRAGMENT),
+        void 0,
+        renderExp,
+        fragmentFlag + (` /* ${shared.PatchFlagNames[fragmentFlag]} */` ),
+        void 0,
+        void 0,
+        true,
+        !isStableFragment,
+        false,
+        node.loc
+      );
+      return () => {
+        let childBlock;
+        const { children } = forNode;
+        if (isTemplate) {
+          node.children.some((c) => {
+            if (c.type === 1) {
+              const key = findProp(c, "key");
+              if (key) {
+                context.onError(
+                  createCompilerError(
+                    33,
+                    key.loc
+                  )
+                );
+                return true;
+              }
+            }
+          });
+        }
+        const needFragmentWrapper = children.length !== 1 || children[0].type !== 1;
+        const slotOutlet = isSlotOutlet(node) ? node : isTemplate && node.children.length === 1 && isSlotOutlet(node.children[0]) ? node.children[0] : null;
+        if (slotOutlet) {
+          childBlock = slotOutlet.codegenNode;
+          if (isTemplate && keyProperty) {
+            injectProp(childBlock, keyProperty, context);
+          }
+        } else if (needFragmentWrapper) {
+          childBlock = createVNodeCall(
+            context,
+            helper(FRAGMENT),
+            keyProperty ? createObjectExpression([keyProperty]) : void 0,
+            node.children,
+            64 + (` /* ${shared.PatchFlagNames[64]} */` ),
+            void 0,
+            void 0,
+            true,
+            void 0,
+            false
+          );
+        } else {
+          childBlock = children[0].codegenNode;
+          if (isTemplate && keyProperty) {
+            injectProp(childBlock, keyProperty, context);
+          }
+          if (childBlock.isBlock !== !isStableFragment) {
+            if (childBlock.isBlock) {
+              removeHelper(OPEN_BLOCK);
+              removeHelper(
+                getVNodeBlockHelper(context.inSSR, childBlock.isComponent)
+              );
+            } else {
+              removeHelper(
+                getVNodeHelper(context.inSSR, childBlock.isComponent)
+              );
+            }
+          }
+          childBlock.isBlock = !isStableFragment;
+          if (childBlock.isBlock) {
+            helper(OPEN_BLOCK);
+            helper(getVNodeBlockHelper(context.inSSR, childBlock.isComponent));
+          } else {
+            helper(getVNodeHelper(context.inSSR, childBlock.isComponent));
+          }
+        }
+        if (memo) {
+          const loop = createFunctionExpression(
+            createForLoopParams(forNode.parseResult, [
+              createSimpleExpression(`_cached`)
+            ])
+          );
+          loop.body = createBlockStatement([
+            createCompoundExpression([`const _memo = (`, memo.exp, `)`]),
+            createCompoundExpression([
+              `if (_cached`,
+              ...keyExp ? [` && _cached.key === `, keyExp] : [],
+              ` && ${context.helperString(
+                IS_MEMO_SAME
+              )}(_cached, _memo)) return _cached`
+            ]),
+            createCompoundExpression([`const _item = `, childBlock]),
+            createSimpleExpression(`_item.memo = _memo`),
+            createSimpleExpression(`return _item`)
+          ]);
+          renderExp.arguments.push(
+            loop,
+            createSimpleExpression(`_cache`),
+            createSimpleExpression(String(context.cached++))
+          );
+        } else {
+          renderExp.arguments.push(
+            createFunctionExpression(
+              createForLoopParams(forNode.parseResult),
+              childBlock,
+              true
+            )
+          );
+        }
+      };
+    });
+  }
+);
+function processFor(node, dir, context, processCodegen) {
+  if (!dir.exp) {
+    context.onError(
+      createCompilerError(31, dir.loc)
+    );
+    return;
+  }
+  const parseResult = dir.forParseResult;
+  if (!parseResult) {
+    context.onError(
+      createCompilerError(32, dir.loc)
+    );
+    return;
+  }
+  finalizeForParseResult(parseResult, context);
+  const { addIdentifiers, removeIdentifiers, scopes } = context;
+  const { source, value, key, index } = parseResult;
+  const forNode = {
+    type: 11,
+    loc: dir.loc,
+    source,
+    valueAlias: value,
+    keyAlias: key,
+    objectIndexAlias: index,
+    parseResult,
+    children: isTemplateNode(node) ? node.children : [node]
+  };
+  context.replaceNode(forNode);
+  scopes.vFor++;
+  if (context.prefixIdentifiers) {
+    value && addIdentifiers(value);
+    key && addIdentifiers(key);
+    index && addIdentifiers(index);
+  }
+  const onExit = processCodegen && processCodegen(forNode);
+  return () => {
+    scopes.vFor--;
+    if (context.prefixIdentifiers) {
+      value && removeIdentifiers(value);
+      key && removeIdentifiers(key);
+      index && removeIdentifiers(index);
+    }
+    if (onExit)
+      onExit();
+  };
+}
+function finalizeForParseResult(result, context) {
+  if (result.finalized)
+    return;
+  if (context.prefixIdentifiers) {
+    result.source = processExpression(
+      result.source,
+      context
+    );
+    if (result.key) {
+      result.key = processExpression(
+        result.key,
+        context,
+        true
+      );
+    }
+    if (result.index) {
+      result.index = processExpression(
+        result.index,
+        context,
+        true
+      );
+    }
+    if (result.value) {
+      result.value = processExpression(
+        result.value,
+        context,
+        true
+      );
+    }
+  }
+  result.finalized = true;
+}
+function createForLoopParams({ value, key, index }, memoArgs = []) {
+  return createParamsList([value, key, index, ...memoArgs]);
+}
+function createParamsList(args) {
+  let i = args.length;
+  while (i--) {
+    if (args[i])
+      break;
+  }
+  return args.slice(0, i + 1).map((arg, i2) => arg || createSimpleExpression(`_`.repeat(i2 + 1), false));
+}
+
+const defaultFallback = createSimpleExpression(`undefined`, false);
+const trackSlotScopes = (node, context) => {
+  if (node.type === 1 && (node.tagType === 1 || node.tagType === 3)) {
+    const vSlot = findDir(node, "slot");
+    if (vSlot) {
+      const slotProps = vSlot.exp;
+      if (context.prefixIdentifiers) {
+        slotProps && context.addIdentifiers(slotProps);
+      }
+      context.scopes.vSlot++;
+      return () => {
+        if (context.prefixIdentifiers) {
+          slotProps && context.removeIdentifiers(slotProps);
+        }
+        context.scopes.vSlot--;
+      };
+    }
+  }
+};
+const trackVForSlotScopes = (node, context) => {
+  let vFor;
+  if (isTemplateNode(node) && node.props.some(isVSlot) && (vFor = findDir(node, "for"))) {
+    const result = vFor.forParseResult;
+    if (result) {
+      finalizeForParseResult(result, context);
+      const { value, key, index } = result;
+      const { addIdentifiers, removeIdentifiers } = context;
+      value && addIdentifiers(value);
+      key && addIdentifiers(key);
+      index && addIdentifiers(index);
+      return () => {
+        value && removeIdentifiers(value);
+        key && removeIdentifiers(key);
+        index && removeIdentifiers(index);
+      };
+    }
+  }
+};
+const buildClientSlotFn = (props, _vForExp, children, loc) => createFunctionExpression(
+  props,
+  children,
+  false,
+  true,
+  children.length ? children[0].loc : loc
+);
+function buildSlots(node, context, buildSlotFn = buildClientSlotFn) {
+  context.helper(WITH_CTX);
+  const { children, loc } = node;
+  const slotsProperties = [];
+  const dynamicSlots = [];
+  let hasDynamicSlots = context.scopes.vSlot > 0 || context.scopes.vFor > 0;
+  if (!context.ssr && context.prefixIdentifiers) {
+    hasDynamicSlots = hasScopeRef(node, context.identifiers);
+  }
+  const onComponentSlot = findDir(node, "slot", true);
+  if (onComponentSlot) {
+    const { arg, exp } = onComponentSlot;
+    if (arg && !isStaticExp(arg)) {
+      hasDynamicSlots = true;
+    }
+    slotsProperties.push(
+      createObjectProperty(
+        arg || createSimpleExpression("default", true),
+        buildSlotFn(exp, void 0, children, loc)
+      )
+    );
+  }
+  let hasTemplateSlots = false;
+  let hasNamedDefaultSlot = false;
+  const implicitDefaultChildren = [];
+  const seenSlotNames = /* @__PURE__ */ new Set();
+  let conditionalBranchIndex = 0;
+  for (let i = 0; i < children.length; i++) {
+    const slotElement = children[i];
+    let slotDir;
+    if (!isTemplateNode(slotElement) || !(slotDir = findDir(slotElement, "slot", true))) {
+      if (slotElement.type !== 3) {
+        implicitDefaultChildren.push(slotElement);
+      }
+      continue;
+    }
+    if (onComponentSlot) {
+      context.onError(
+        createCompilerError(37, slotDir.loc)
+      );
+      break;
+    }
+    hasTemplateSlots = true;
+    const { children: slotChildren, loc: slotLoc } = slotElement;
+    const {
+      arg: slotName = createSimpleExpression(`default`, true),
+      exp: slotProps,
+      loc: dirLoc
+    } = slotDir;
+    let staticSlotName;
+    if (isStaticExp(slotName)) {
+      staticSlotName = slotName ? slotName.content : `default`;
+    } else {
+      hasDynamicSlots = true;
+    }
+    const vFor = findDir(slotElement, "for");
+    const slotFunction = buildSlotFn(slotProps, vFor, slotChildren, slotLoc);
+    let vIf;
+    let vElse;
+    if (vIf = findDir(slotElement, "if")) {
+      hasDynamicSlots = true;
+      dynamicSlots.push(
+        createConditionalExpression(
+          vIf.exp,
+          buildDynamicSlot(slotName, slotFunction, conditionalBranchIndex++),
+          defaultFallback
+        )
+      );
+    } else if (vElse = findDir(
+      slotElement,
+      /^else(-if)?$/,
+      true
+      /* allowEmpty */
+    )) {
+      let j = i;
+      let prev;
+      while (j--) {
+        prev = children[j];
+        if (prev.type !== 3) {
+          break;
+        }
+      }
+      if (prev && isTemplateNode(prev) && findDir(prev, "if")) {
+        children.splice(i, 1);
+        i--;
+        let conditional = dynamicSlots[dynamicSlots.length - 1];
+        while (conditional.alternate.type === 19) {
+          conditional = conditional.alternate;
+        }
+        conditional.alternate = vElse.exp ? createConditionalExpression(
+          vElse.exp,
+          buildDynamicSlot(
+            slotName,
+            slotFunction,
+            conditionalBranchIndex++
+          ),
+          defaultFallback
+        ) : buildDynamicSlot(slotName, slotFunction, conditionalBranchIndex++);
+      } else {
+        context.onError(
+          createCompilerError(30, vElse.loc)
+        );
+      }
+    } else if (vFor) {
+      hasDynamicSlots = true;
+      const parseResult = vFor.forParseResult;
+      if (parseResult) {
+        finalizeForParseResult(parseResult, context);
+        dynamicSlots.push(
+          createCallExpression(context.helper(RENDER_LIST), [
+            parseResult.source,
+            createFunctionExpression(
+              createForLoopParams(parseResult),
+              buildDynamicSlot(slotName, slotFunction),
+              true
+            )
+          ])
+        );
+      } else {
+        context.onError(
+          createCompilerError(
+            32,
+            vFor.loc
+          )
+        );
+      }
+    } else {
+      if (staticSlotName) {
+        if (seenSlotNames.has(staticSlotName)) {
+          context.onError(
+            createCompilerError(
+              38,
+              dirLoc
+            )
+          );
+          continue;
+        }
+        seenSlotNames.add(staticSlotName);
+        if (staticSlotName === "default") {
+          hasNamedDefaultSlot = true;
+        }
+      }
+      slotsProperties.push(createObjectProperty(slotName, slotFunction));
+    }
+  }
+  if (!onComponentSlot) {
+    const buildDefaultSlotProperty = (props, children2) => {
+      const fn = buildSlotFn(props, void 0, children2, loc);
+      if (context.compatConfig) {
+        fn.isNonScopedSlot = true;
+      }
+      return createObjectProperty(`default`, fn);
+    };
+    if (!hasTemplateSlots) {
+      slotsProperties.push(buildDefaultSlotProperty(void 0, children));
+    } else if (implicitDefaultChildren.length && // #3766
+    // with whitespace: 'preserve', whitespaces between slots will end up in
+    // implicitDefaultChildren. Ignore if all implicit children are whitespaces.
+    implicitDefaultChildren.some((node2) => isNonWhitespaceContent(node2))) {
+      if (hasNamedDefaultSlot) {
+        context.onError(
+          createCompilerError(
+            39,
+            implicitDefaultChildren[0].loc
+          )
+        );
+      } else {
+        slotsProperties.push(
+          buildDefaultSlotProperty(void 0, implicitDefaultChildren)
+        );
+      }
+    }
+  }
+  const slotFlag = hasDynamicSlots ? 2 : hasForwardedSlots(node.children) ? 3 : 1;
+  let slots = createObjectExpression(
+    slotsProperties.concat(
+      createObjectProperty(
+        `_`,
+        // 2 = compiled but dynamic = can skip normalization, but must run diff
+        // 1 = compiled and static = can skip normalization AND diff as optimized
+        createSimpleExpression(
+          slotFlag + (` /* ${shared.slotFlagsText[slotFlag]} */` ),
+          false
+        )
+      )
+    ),
+    loc
+  );
+  if (dynamicSlots.length) {
+    slots = createCallExpression(context.helper(CREATE_SLOTS), [
+      slots,
+      createArrayExpression(dynamicSlots)
+    ]);
+  }
+  return {
+    slots,
+    hasDynamicSlots
+  };
+}
+function buildDynamicSlot(name, fn, index) {
+  const props = [
+    createObjectProperty(`name`, name),
+    createObjectProperty(`fn`, fn)
+  ];
+  if (index != null) {
+    props.push(
+      createObjectProperty(`key`, createSimpleExpression(String(index), true))
+    );
+  }
+  return createObjectExpression(props);
+}
+function hasForwardedSlots(children) {
+  for (let i = 0; i < children.length; i++) {
+    const child = children[i];
+    switch (child.type) {
+      case 1:
+        if (child.tagType === 2 || hasForwardedSlots(child.children)) {
+          return true;
+        }
+        break;
+      case 9:
+        if (hasForwardedSlots(child.branches))
+          return true;
+        break;
+      case 10:
+      case 11:
+        if (hasForwardedSlots(child.children))
+          return true;
+        break;
+    }
+  }
+  return false;
+}
+function isNonWhitespaceContent(node) {
+  if (node.type !== 2 && node.type !== 12)
+    return true;
+  return node.type === 2 ? !!node.content.trim() : isNonWhitespaceContent(node.content);
+}
+
+const directiveImportMap = /* @__PURE__ */ new WeakMap();
+const transformElement = (node, context) => {
+  return function postTransformElement() {
+    node = context.currentNode;
+    if (!(node.type === 1 && (node.tagType === 0 || node.tagType === 1))) {
+      return;
+    }
+    const { tag, props } = node;
+    const isComponent = node.tagType === 1;
+    let vnodeTag = isComponent ? resolveComponentType(node, context) : `"${tag}"`;
+    const isDynamicComponent = shared.isObject(vnodeTag) && vnodeTag.callee === RESOLVE_DYNAMIC_COMPONENT;
+    let vnodeProps;
+    let vnodeChildren;
+    let vnodePatchFlag;
+    let patchFlag = 0;
+    let vnodeDynamicProps;
+    let dynamicPropNames;
+    let vnodeDirectives;
+    let shouldUseBlock = (
+      // dynamic component may resolve to plain elements
+      isDynamicComponent || vnodeTag === TELEPORT || vnodeTag === SUSPENSE || !isComponent && // <svg> and <foreignObject> must be forced into blocks so that block
+      // updates inside get proper isSVG flag at runtime. (#639, #643)
+      // This is technically web-specific, but splitting the logic out of core
+      // leads to too much unnecessary complexity.
+      (tag === "svg" || tag === "foreignObject")
+    );
+    if (props.length > 0) {
+      const propsBuildResult = buildProps(
+        node,
+        context,
+        void 0,
+        isComponent,
+        isDynamicComponent
+      );
+      vnodeProps = propsBuildResult.props;
+      patchFlag = propsBuildResult.patchFlag;
+      dynamicPropNames = propsBuildResult.dynamicPropNames;
+      const directives = propsBuildResult.directives;
+      vnodeDirectives = directives && directives.length ? createArrayExpression(
+        directives.map((dir) => buildDirectiveArgs(dir, context))
+      ) : void 0;
+      if (propsBuildResult.shouldUseBlock) {
+        shouldUseBlock = true;
+      }
+    }
+    if (node.children.length > 0) {
+      if (vnodeTag === KEEP_ALIVE) {
+        shouldUseBlock = true;
+        patchFlag |= 1024;
+        if (node.children.length > 1) {
+          context.onError(
+            createCompilerError(46, {
+              start: node.children[0].loc.start,
+              end: node.children[node.children.length - 1].loc.end,
+              source: ""
+            })
+          );
+        }
+      }
+      const shouldBuildAsSlots = isComponent && // Teleport is not a real component and has dedicated runtime handling
+      vnodeTag !== TELEPORT && // explained above.
+      vnodeTag !== KEEP_ALIVE;
+      if (shouldBuildAsSlots) {
+        const { slots, hasDynamicSlots } = buildSlots(node, context);
+        vnodeChildren = slots;
+        if (hasDynamicSlots) {
+          patchFlag |= 1024;
+        }
+      } else if (node.children.length === 1 && vnodeTag !== TELEPORT) {
+        const child = node.children[0];
+        const type = child.type;
+        const hasDynamicTextChild = type === 5 || type === 8;
+        if (hasDynamicTextChild && getConstantType(child, context) === 0) {
+          patchFlag |= 1;
+        }
+        if (hasDynamicTextChild || type === 2) {
+          vnodeChildren = child;
+        } else {
+          vnodeChildren = node.children;
+        }
+      } else {
+        vnodeChildren = node.children;
+      }
+    }
+    if (patchFlag !== 0) {
+      {
+        if (patchFlag < 0) {
+          vnodePatchFlag = patchFlag + ` /* ${shared.PatchFlagNames[patchFlag]} */`;
+        } else {
+          const flagNames = Object.keys(shared.PatchFlagNames).map(Number).filter((n) => n > 0 && patchFlag & n).map((n) => shared.PatchFlagNames[n]).join(`, `);
+          vnodePatchFlag = patchFlag + ` /* ${flagNames} */`;
+        }
+      }
+      if (dynamicPropNames && dynamicPropNames.length) {
+        vnodeDynamicProps = stringifyDynamicPropNames(dynamicPropNames);
+      }
+    }
+    node.codegenNode = createVNodeCall(
+      context,
+      vnodeTag,
+      vnodeProps,
+      vnodeChildren,
+      vnodePatchFlag,
+      vnodeDynamicProps,
+      vnodeDirectives,
+      !!shouldUseBlock,
+      false,
+      isComponent,
+      node.loc
+    );
+  };
+};
+function resolveComponentType(node, context, ssr = false) {
+  let { tag } = node;
+  const isExplicitDynamic = isComponentTag(tag);
+  const isProp = findProp(
+    node,
+    "is",
+    false,
+    true
+    /* allow empty */
+  );
+  if (isProp) {
+    if (isExplicitDynamic || isCompatEnabled(
+      "COMPILER_IS_ON_ELEMENT",
+      context
+    )) {
+      let exp;
+      if (isProp.type === 6) {
+        exp = isProp.value && createSimpleExpression(isProp.value.content, true);
+      } else {
+        exp = isProp.exp;
+        if (!exp) {
+          exp = createSimpleExpression(`is`, false, isProp.loc);
+          {
+            exp = isProp.exp = processExpression(exp, context);
+          }
+        }
+      }
+      if (exp) {
+        return createCallExpression(context.helper(RESOLVE_DYNAMIC_COMPONENT), [
+          exp
+        ]);
+      }
+    } else if (isProp.type === 6 && isProp.value.content.startsWith("vue:")) {
+      tag = isProp.value.content.slice(4);
+    }
+  }
+  const builtIn = isCoreComponent(tag) || context.isBuiltInComponent(tag);
+  if (builtIn) {
+    if (!ssr)
+      context.helper(builtIn);
+    return builtIn;
+  }
+  {
+    const fromSetup = resolveSetupReference(tag, context);
+    if (fromSetup) {
+      return fromSetup;
+    }
+    const dotIndex = tag.indexOf(".");
+    if (dotIndex > 0) {
+      const ns = resolveSetupReference(tag.slice(0, dotIndex), context);
+      if (ns) {
+        return ns + tag.slice(dotIndex);
+      }
+    }
+  }
+  if (context.selfName && shared.capitalize(shared.camelize(tag)) === context.selfName) {
+    context.helper(RESOLVE_COMPONENT);
+    context.components.add(tag + `__self`);
+    return toValidAssetId(tag, `component`);
+  }
+  context.helper(RESOLVE_COMPONENT);
+  context.components.add(tag);
+  return toValidAssetId(tag, `component`);
+}
+function resolveSetupReference(name, context) {
+  const bindings = context.bindingMetadata;
+  if (!bindings || bindings.__isScriptSetup === false) {
+    return;
+  }
+  const camelName = shared.camelize(name);
+  const PascalName = shared.capitalize(camelName);
+  const checkType = (type) => {
+    if (bindings[name] === type) {
+      return name;
+    }
+    if (bindings[camelName] === type) {
+      return camelName;
+    }
+    if (bindings[PascalName] === type) {
+      return PascalName;
+    }
+  };
+  const fromConst = checkType("setup-const") || checkType("setup-reactive-const") || checkType("literal-const");
+  if (fromConst) {
+    return context.inline ? (
+      // in inline mode, const setup bindings (e.g. imports) can be used as-is
+      fromConst
+    ) : `$setup[${JSON.stringify(fromConst)}]`;
+  }
+  const fromMaybeRef = checkType("setup-let") || checkType("setup-ref") || checkType("setup-maybe-ref");
+  if (fromMaybeRef) {
+    return context.inline ? (
+      // setup scope bindings that may be refs need to be unrefed
+      `${context.helperString(UNREF)}(${fromMaybeRef})`
+    ) : `$setup[${JSON.stringify(fromMaybeRef)}]`;
+  }
+  const fromProps = checkType("props");
+  if (fromProps) {
+    return `${context.helperString(UNREF)}(${context.inline ? "__props" : "$props"}[${JSON.stringify(fromProps)}])`;
+  }
+}
+function buildProps(node, context, props = node.props, isComponent, isDynamicComponent, ssr = false) {
+  const { tag, loc: elementLoc, children } = node;
+  let properties = [];
+  const mergeArgs = [];
+  const runtimeDirectives = [];
+  const hasChildren = children.length > 0;
+  let shouldUseBlock = false;
+  let patchFlag = 0;
+  let hasRef = false;
+  let hasClassBinding = false;
+  let hasStyleBinding = false;
+  let hasHydrationEventBinding = false;
+  let hasDynamicKeys = false;
+  let hasVnodeHook = false;
+  const dynamicPropNames = [];
+  const pushMergeArg = (arg) => {
+    if (properties.length) {
+      mergeArgs.push(
+        createObjectExpression(dedupeProperties(properties), elementLoc)
+      );
+      properties = [];
+    }
+    if (arg)
+      mergeArgs.push(arg);
+  };
+  const pushRefVForMarker = () => {
+    if (context.scopes.vFor > 0) {
+      properties.push(
+        createObjectProperty(
+          createSimpleExpression("ref_for", true),
+          createSimpleExpression("true")
+        )
+      );
+    }
+  };
+  const analyzePatchFlag = ({ key, value }) => {
+    if (isStaticExp(key)) {
+      const name = key.content;
+      const isEventHandler = shared.isOn(name);
+      if (isEventHandler && (!isComponent || isDynamicComponent) && // omit the flag for click handlers because hydration gives click
+      // dedicated fast path.
+      name.toLowerCase() !== "onclick" && // omit v-model handlers
+      name !== "onUpdate:modelValue" && // omit onVnodeXXX hooks
+      !shared.isReservedProp(name)) {
+        hasHydrationEventBinding = true;
+      }
+      if (isEventHandler && shared.isReservedProp(name)) {
+        hasVnodeHook = true;
+      }
+      if (isEventHandler && value.type === 14) {
+        value = value.arguments[0];
+      }
+      if (value.type === 20 || (value.type === 4 || value.type === 8) && getConstantType(value, context) > 0) {
+        return;
+      }
+      if (name === "ref") {
+        hasRef = true;
+      } else if (name === "class") {
+        hasClassBinding = true;
+      } else if (name === "style") {
+        hasStyleBinding = true;
+      } else if (name !== "key" && !dynamicPropNames.includes(name)) {
+        dynamicPropNames.push(name);
+      }
+      if (isComponent && (name === "class" || name === "style") && !dynamicPropNames.includes(name)) {
+        dynamicPropNames.push(name);
+      }
+    } else {
+      hasDynamicKeys = true;
+    }
+  };
+  for (let i = 0; i < props.length; i++) {
+    const prop = props[i];
+    if (prop.type === 6) {
+      const { loc, name, nameLoc, value } = prop;
+      let isStatic = true;
+      if (name === "ref") {
+        hasRef = true;
+        pushRefVForMarker();
+        if (value && context.inline) {
+          const binding = context.bindingMetadata[value.content];
+          if (binding === "setup-let" || binding === "setup-ref" || binding === "setup-maybe-ref") {
+            isStatic = false;
+            properties.push(
+              createObjectProperty(
+                createSimpleExpression("ref_key", true),
+                createSimpleExpression(value.content, true, value.loc)
+              )
+            );
+          }
+        }
+      }
+      if (name === "is" && (isComponentTag(tag) || value && value.content.startsWith("vue:") || isCompatEnabled(
+        "COMPILER_IS_ON_ELEMENT",
+        context
+      ))) {
+        continue;
+      }
+      properties.push(
+        createObjectProperty(
+          createSimpleExpression(name, true, nameLoc),
+          createSimpleExpression(
+            value ? value.content : "",
+            isStatic,
+            value ? value.loc : loc
+          )
+        )
+      );
+    } else {
+      const { name, arg, exp, loc, modifiers } = prop;
+      const isVBind = name === "bind";
+      const isVOn = name === "on";
+      if (name === "slot") {
+        if (!isComponent) {
+          context.onError(
+            createCompilerError(40, loc)
+          );
+        }
+        continue;
+      }
+      if (name === "once" || name === "memo") {
+        continue;
+      }
+      if (name === "is" || isVBind && isStaticArgOf(arg, "is") && (isComponentTag(tag) || isCompatEnabled(
+        "COMPILER_IS_ON_ELEMENT",
+        context
+      ))) {
+        continue;
+      }
+      if (isVOn && ssr) {
+        continue;
+      }
+      if (
+        // #938: elements with dynamic keys should be forced into blocks
+        isVBind && isStaticArgOf(arg, "key") || // inline before-update hooks need to force block so that it is invoked
+        // before children
+        isVOn && hasChildren && isStaticArgOf(arg, "vue:before-update")
+      ) {
+        shouldUseBlock = true;
+      }
+      if (isVBind && isStaticArgOf(arg, "ref")) {
+        pushRefVForMarker();
+      }
+      if (!arg && (isVBind || isVOn)) {
+        hasDynamicKeys = true;
+        if (exp) {
+          if (isVBind) {
+            pushRefVForMarker();
+            pushMergeArg();
+            {
+              {
+                const hasOverridableKeys = mergeArgs.some((arg2) => {
+                  if (arg2.type === 15) {
+                    return arg2.properties.some(({ key }) => {
+                      if (key.type !== 4 || !key.isStatic) {
+                        return true;
+                      }
+                      return key.content !== "class" && key.content !== "style" && !shared.isOn(key.content);
+                    });
+                  } else {
+                    return true;
+                  }
+                });
+                if (hasOverridableKeys) {
+                  checkCompatEnabled(
+                    "COMPILER_V_BIND_OBJECT_ORDER",
+                    context,
+                    loc
+                  );
+                }
+              }
+              if (isCompatEnabled(
+                "COMPILER_V_BIND_OBJECT_ORDER",
+                context
+              )) {
+                mergeArgs.unshift(exp);
+                continue;
+              }
+            }
+            mergeArgs.push(exp);
+          } else {
+            pushMergeArg({
+              type: 14,
+              loc,
+              callee: context.helper(TO_HANDLERS),
+              arguments: isComponent ? [exp] : [exp, `true`]
+            });
+          }
+        } else {
+          context.onError(
+            createCompilerError(
+              isVBind ? 34 : 35,
+              loc
+            )
+          );
+        }
+        continue;
+      }
+      if (isVBind && modifiers.includes("prop")) {
+        patchFlag |= 32;
+      }
+      const directiveTransform = context.directiveTransforms[name];
+      if (directiveTransform) {
+        const { props: props2, needRuntime } = directiveTransform(prop, node, context);
+        !ssr && props2.forEach(analyzePatchFlag);
+        if (isVOn && arg && !isStaticExp(arg)) {
+          pushMergeArg(createObjectExpression(props2, elementLoc));
+        } else {
+          properties.push(...props2);
+        }
+        if (needRuntime) {
+          runtimeDirectives.push(prop);
+          if (shared.isSymbol(needRuntime)) {
+            directiveImportMap.set(prop, needRuntime);
+          }
+        }
+      } else if (!shared.isBuiltInDirective(name)) {
+        runtimeDirectives.push(prop);
+        if (hasChildren) {
+          shouldUseBlock = true;
+        }
+      }
+    }
+  }
+  let propsExpression = void 0;
+  if (mergeArgs.length) {
+    pushMergeArg();
+    if (mergeArgs.length > 1) {
+      propsExpression = createCallExpression(
+        context.helper(MERGE_PROPS),
+        mergeArgs,
+        elementLoc
+      );
+    } else {
+      propsExpression = mergeArgs[0];
+    }
+  } else if (properties.length) {
+    propsExpression = createObjectExpression(
+      dedupeProperties(properties),
+      elementLoc
+    );
+  }
+  if (hasDynamicKeys) {
+    patchFlag |= 16;
+  } else {
+    if (hasClassBinding && !isComponent) {
+      patchFlag |= 2;
+    }
+    if (hasStyleBinding && !isComponent) {
+      patchFlag |= 4;
+    }
+    if (dynamicPropNames.length) {
+      patchFlag |= 8;
+    }
+    if (hasHydrationEventBinding) {
+      patchFlag |= 32;
+    }
+  }
+  if (!shouldUseBlock && (patchFlag === 0 || patchFlag === 32) && (hasRef || hasVnodeHook || runtimeDirectives.length > 0)) {
+    patchFlag |= 512;
+  }
+  if (!context.inSSR && propsExpression) {
+    switch (propsExpression.type) {
+      case 15:
+        let classKeyIndex = -1;
+        let styleKeyIndex = -1;
+        let hasDynamicKey = false;
+        for (let i = 0; i < propsExpression.properties.length; i++) {
+          const key = propsExpression.properties[i].key;
+          if (isStaticExp(key)) {
+            if (key.content === "class") {
+              classKeyIndex = i;
+            } else if (key.content === "style") {
+              styleKeyIndex = i;
+            }
+          } else if (!key.isHandlerKey) {
+            hasDynamicKey = true;
+          }
+        }
+        const classProp = propsExpression.properties[classKeyIndex];
+        const styleProp = propsExpression.properties[styleKeyIndex];
+        if (!hasDynamicKey) {
+          if (classProp && !isStaticExp(classProp.value)) {
+            classProp.value = createCallExpression(
+              context.helper(NORMALIZE_CLASS),
+              [classProp.value]
+            );
+          }
+          if (styleProp && // the static style is compiled into an object,
+          // so use `hasStyleBinding` to ensure that it is a dynamic style binding
+          (hasStyleBinding || styleProp.value.type === 4 && styleProp.value.content.trim()[0] === `[` || // v-bind:style and style both exist,
+          // v-bind:style with static literal object
+          styleProp.value.type === 17)) {
+            styleProp.value = createCallExpression(
+              context.helper(NORMALIZE_STYLE),
+              [styleProp.value]
+            );
+          }
+        } else {
+          propsExpression = createCallExpression(
+            context.helper(NORMALIZE_PROPS),
+            [propsExpression]
+          );
+        }
+        break;
+      case 14:
+        break;
+      default:
+        propsExpression = createCallExpression(
+          context.helper(NORMALIZE_PROPS),
+          [
+            createCallExpression(context.helper(GUARD_REACTIVE_PROPS), [
+              propsExpression
+            ])
+          ]
+        );
+        break;
+    }
+  }
+  return {
+    props: propsExpression,
+    directives: runtimeDirectives,
+    patchFlag,
+    dynamicPropNames,
+    shouldUseBlock
+  };
+}
+function dedupeProperties(properties) {
+  const knownProps = /* @__PURE__ */ new Map();
+  const deduped = [];
+  for (let i = 0; i < properties.length; i++) {
+    const prop = properties[i];
+    if (prop.key.type === 8 || !prop.key.isStatic) {
+      deduped.push(prop);
+      continue;
+    }
+    const name = prop.key.content;
+    const existing = knownProps.get(name);
+    if (existing) {
+      if (name === "style" || name === "class" || shared.isOn(name)) {
+        mergeAsArray(existing, prop);
+      }
+    } else {
+      knownProps.set(name, prop);
+      deduped.push(prop);
+    }
+  }
+  return deduped;
+}
+function mergeAsArray(existing, incoming) {
+  if (existing.value.type === 17) {
+    existing.value.elements.push(incoming.value);
+  } else {
+    existing.value = createArrayExpression(
+      [existing.value, incoming.value],
+      existing.loc
+    );
+  }
+}
+function buildDirectiveArgs(dir, context) {
+  const dirArgs = [];
+  const runtime = directiveImportMap.get(dir);
+  if (runtime) {
+    dirArgs.push(context.helperString(runtime));
+  } else {
+    const fromSetup = resolveSetupReference("v-" + dir.name, context);
+    if (fromSetup) {
+      dirArgs.push(fromSetup);
+    } else {
+      context.helper(RESOLVE_DIRECTIVE);
+      context.directives.add(dir.name);
+      dirArgs.push(toValidAssetId(dir.name, `directive`));
+    }
+  }
+  const { loc } = dir;
+  if (dir.exp)
+    dirArgs.push(dir.exp);
+  if (dir.arg) {
+    if (!dir.exp) {
+      dirArgs.push(`void 0`);
+    }
+    dirArgs.push(dir.arg);
+  }
+  if (Object.keys(dir.modifiers).length) {
+    if (!dir.arg) {
+      if (!dir.exp) {
+        dirArgs.push(`void 0`);
+      }
+      dirArgs.push(`void 0`);
+    }
+    const trueExpression = createSimpleExpression(`true`, false, loc);
+    dirArgs.push(
+      createObjectExpression(
+        dir.modifiers.map(
+          (modifier) => createObjectProperty(modifier, trueExpression)
+        ),
+        loc
+      )
+    );
+  }
+  return createArrayExpression(dirArgs, dir.loc);
+}
+function stringifyDynamicPropNames(props) {
+  let propsNamesString = `[`;
+  for (let i = 0, l = props.length; i < l; i++) {
+    propsNamesString += JSON.stringify(props[i]);
+    if (i < l - 1)
+      propsNamesString += ", ";
+  }
+  return propsNamesString + `]`;
+}
+function isComponentTag(tag) {
+  return tag === "component" || tag === "Component";
+}
+
+const transformSlotOutlet = (node, context) => {
+  if (isSlotOutlet(node)) {
+    const { children, loc } = node;
+    const { slotName, slotProps } = processSlotOutlet(node, context);
+    const slotArgs = [
+      context.prefixIdentifiers ? `_ctx.$slots` : `$slots`,
+      slotName,
+      "{}",
+      "undefined",
+      "true"
+    ];
+    let expectedLen = 2;
+    if (slotProps) {
+      slotArgs[2] = slotProps;
+      expectedLen = 3;
+    }
+    if (children.length) {
+      slotArgs[3] = createFunctionExpression([], children, false, false, loc);
+      expectedLen = 4;
+    }
+    if (context.scopeId && !context.slotted) {
+      expectedLen = 5;
+    }
+    slotArgs.splice(expectedLen);
+    node.codegenNode = createCallExpression(
+      context.helper(RENDER_SLOT),
+      slotArgs,
+      loc
+    );
+  }
+};
+function processSlotOutlet(node, context) {
+  let slotName = `"default"`;
+  let slotProps = void 0;
+  const nonNameProps = [];
+  for (let i = 0; i < node.props.length; i++) {
+    const p = node.props[i];
+    if (p.type === 6) {
+      if (p.value) {
+        if (p.name === "name") {
+          slotName = JSON.stringify(p.value.content);
+        } else {
+          p.name = shared.camelize(p.name);
+          nonNameProps.push(p);
+        }
+      }
+    } else {
+      if (p.name === "bind" && isStaticArgOf(p.arg, "name")) {
+        if (p.exp) {
+          slotName = p.exp;
+        } else if (p.arg && p.arg.type === 4) {
+          const name = shared.camelize(p.arg.content);
+          slotName = p.exp = createSimpleExpression(name, false, p.arg.loc);
+          {
+            slotName = p.exp = processExpression(p.exp, context);
+          }
+        }
+      } else {
+        if (p.name === "bind" && p.arg && isStaticExp(p.arg)) {
+          p.arg.content = shared.camelize(p.arg.content);
+        }
+        nonNameProps.push(p);
+      }
+    }
+  }
+  if (nonNameProps.length > 0) {
+    const { props, directives } = buildProps(
+      node,
+      context,
+      nonNameProps,
+      false,
+      false
+    );
+    slotProps = props;
+    if (directives.length) {
+      context.onError(
+        createCompilerError(
+          36,
+          directives[0].loc
+        )
+      );
+    }
+  }
+  return {
+    slotName,
+    slotProps
+  };
+}
+
+const fnExpRE = /^\s*(async\s*)?(\([^)]*?\)|[\w$_]+)\s*(:[^=]+)?=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/;
+const transformOn = (dir, node, context, augmentor) => {
+  const { loc, modifiers, arg } = dir;
+  if (!dir.exp && !modifiers.length) {
+    context.onError(createCompilerError(35, loc));
+  }
+  let eventName;
+  if (arg.type === 4) {
+    if (arg.isStatic) {
+      let rawName = arg.content;
+      if (rawName.startsWith("vnode")) {
+        context.onError(createCompilerError(51, arg.loc));
+      }
+      if (rawName.startsWith("vue:")) {
+        rawName = `vnode-${rawName.slice(4)}`;
+      }
+      const eventString = node.tagType !== 0 || rawName.startsWith("vnode") || !/[A-Z]/.test(rawName) ? (
+        // for non-element and vnode lifecycle event listeners, auto convert
+        // it to camelCase. See issue #2249
+        shared.toHandlerKey(shared.camelize(rawName))
+      ) : (
+        // preserve case for plain element listeners that have uppercase
+        // letters, as these may be custom elements' custom events
+        `on:${rawName}`
+      );
+      eventName = createSimpleExpression(eventString, true, arg.loc);
+    } else {
+      eventName = createCompoundExpression([
+        `${context.helperString(TO_HANDLER_KEY)}(`,
+        arg,
+        `)`
+      ]);
+    }
+  } else {
+    eventName = arg;
+    eventName.children.unshift(`${context.helperString(TO_HANDLER_KEY)}(`);
+    eventName.children.push(`)`);
+  }
+  let exp = dir.exp;
+  if (exp && !exp.content.trim()) {
+    exp = void 0;
+  }
+  let shouldCache = context.cacheHandlers && !exp && !context.inVOnce;
+  if (exp) {
+    const isMemberExp = isMemberExpression(exp.content, context);
+    const isInlineStatement = !(isMemberExp || fnExpRE.test(exp.content));
+    const hasMultipleStatements = exp.content.includes(`;`);
+    if (context.prefixIdentifiers) {
+      isInlineStatement && context.addIdentifiers(`$event`);
+      exp = dir.exp = processExpression(
+        exp,
+        context,
+        false,
+        hasMultipleStatements
+      );
+      isInlineStatement && context.removeIdentifiers(`$event`);
+      shouldCache = context.cacheHandlers && // unnecessary to cache inside v-once
+      !context.inVOnce && // runtime constants don't need to be cached
+      // (this is analyzed by compileScript in SFC <script setup>)
+      !(exp.type === 4 && exp.constType > 0) && // #1541 bail if this is a member exp handler passed to a component -
+      // we need to use the original function to preserve arity,
+      // e.g. <transition> relies on checking cb.length to determine
+      // transition end handling. Inline function is ok since its arity
+      // is preserved even when cached.
+      !(isMemberExp && node.tagType === 1) && // bail if the function references closure variables (v-for, v-slot)
+      // it must be passed fresh to avoid stale values.
+      !hasScopeRef(exp, context.identifiers);
+      if (shouldCache && isMemberExp) {
+        if (exp.type === 4) {
+          exp.content = `${exp.content} && ${exp.content}(...args)`;
+        } else {
+          exp.children = [...exp.children, ` && `, ...exp.children, `(...args)`];
+        }
+      }
+    }
+    if (isInlineStatement || shouldCache && isMemberExp) {
+      exp = createCompoundExpression([
+        `${isInlineStatement ? context.isTS ? `($event: any)` : `$event` : `${context.isTS ? `
+//@ts-ignore
+` : ``}(...args)`} => ${hasMultipleStatements ? `{` : `(`}`,
+        exp,
+        hasMultipleStatements ? `}` : `)`
+      ]);
+    }
+  }
+  let ret = {
+    props: [
+      createObjectProperty(
+        eventName,
+        exp || createSimpleExpression(`() => {}`, false, loc)
+      )
+    ]
+  };
+  if (augmentor) {
+    ret = augmentor(ret);
+  }
+  if (shouldCache) {
+    ret.props[0].value = context.cache(ret.props[0].value);
+  }
+  ret.props.forEach((p) => p.key.isHandlerKey = true);
+  return ret;
+};
+
+const transformBind = (dir, _node, context) => {
+  const { modifiers, loc } = dir;
+  const arg = dir.arg;
+  let { exp } = dir;
+  if (exp && exp.type === 4 && !exp.content.trim()) {
+    {
+      context.onError(
+        createCompilerError(34, loc)
+      );
+      return {
+        props: [
+          createObjectProperty(arg, createSimpleExpression("", true, loc))
+        ]
+      };
+    }
+  }
+  if (!exp) {
+    if (arg.type !== 4 || !arg.isStatic) {
+      context.onError(
+        createCompilerError(
+          52,
+          arg.loc
+        )
+      );
+      return {
+        props: [
+          createObjectProperty(arg, createSimpleExpression("", true, loc))
+        ]
+      };
+    }
+    const propName = shared.camelize(arg.content);
+    exp = dir.exp = createSimpleExpression(propName, false, arg.loc);
+    {
+      exp = dir.exp = processExpression(exp, context);
+    }
+  }
+  if (arg.type !== 4) {
+    arg.children.unshift(`(`);
+    arg.children.push(`) || ""`);
+  } else if (!arg.isStatic) {
+    arg.content = `${arg.content} || ""`;
+  }
+  if (modifiers.includes("camel")) {
+    if (arg.type === 4) {
+      if (arg.isStatic) {
+        arg.content = shared.camelize(arg.content);
+      } else {
+        arg.content = `${context.helperString(CAMELIZE)}(${arg.content})`;
+      }
+    } else {
+      arg.children.unshift(`${context.helperString(CAMELIZE)}(`);
+      arg.children.push(`)`);
+    }
+  }
+  if (!context.inSSR) {
+    if (modifiers.includes("prop")) {
+      injectPrefix(arg, ".");
+    }
+    if (modifiers.includes("attr")) {
+      injectPrefix(arg, "^");
+    }
+  }
+  return {
+    props: [createObjectProperty(arg, exp)]
+  };
+};
+const injectPrefix = (arg, prefix) => {
+  if (arg.type === 4) {
+    if (arg.isStatic) {
+      arg.content = prefix + arg.content;
+    } else {
+      arg.content = `\`${prefix}\${${arg.content}}\``;
+    }
+  } else {
+    arg.children.unshift(`'${prefix}' + (`);
+    arg.children.push(`)`);
+  }
+};
+
+const transformText = (node, context) => {
+  if (node.type === 0 || node.type === 1 || node.type === 11 || node.type === 10) {
+    return () => {
+      const children = node.children;
+      let currentContainer = void 0;
+      let hasText = false;
+      for (let i = 0; i < children.length; i++) {
+        const child = children[i];
+        if (isText$1(child)) {
+          hasText = true;
+          for (let j = i + 1; j < children.length; j++) {
+            const next = children[j];
+            if (isText$1(next)) {
+              if (!currentContainer) {
+                currentContainer = children[i] = createCompoundExpression(
+                  [child],
+                  child.loc
+                );
+              }
+              currentContainer.children.push(` + `, next);
+              children.splice(j, 1);
+              j--;
+            } else {
+              currentContainer = void 0;
+              break;
+            }
+          }
+        }
+      }
+      if (!hasText || // if this is a plain element with a single text child, leave it
+      // as-is since the runtime has dedicated fast path for this by directly
+      // setting textContent of the element.
+      // for component root it's always normalized anyway.
+      children.length === 1 && (node.type === 0 || node.type === 1 && node.tagType === 0 && // #3756
+      // custom directives can potentially add DOM elements arbitrarily,
+      // we need to avoid setting textContent of the element at runtime
+      // to avoid accidentally overwriting the DOM elements added
+      // by the user through custom directives.
+      !node.props.find(
+        (p) => p.type === 7 && !context.directiveTransforms[p.name]
+      ) && // in compat mode, <template> tags with no special directives
+      // will be rendered as a fragment so its children must be
+      // converted into vnodes.
+      !(node.tag === "template"))) {
+        return;
+      }
+      for (let i = 0; i < children.length; i++) {
+        const child = children[i];
+        if (isText$1(child) || child.type === 8) {
+          const callArgs = [];
+          if (child.type !== 2 || child.content !== " ") {
+            callArgs.push(child);
+          }
+          if (!context.ssr && getConstantType(child, context) === 0) {
+            callArgs.push(
+              1 + (` /* ${shared.PatchFlagNames[1]} */` )
+            );
+          }
+          children[i] = {
+            type: 12,
+            content: child,
+            loc: child.loc,
+            codegenNode: createCallExpression(
+              context.helper(CREATE_TEXT),
+              callArgs
+            )
+          };
+        }
+      }
+    };
+  }
+};
+
+const seen$1 = /* @__PURE__ */ new WeakSet();
+const transformOnce = (node, context) => {
+  if (node.type === 1 && findDir(node, "once", true)) {
+    if (seen$1.has(node) || context.inVOnce || context.inSSR) {
+      return;
+    }
+    seen$1.add(node);
+    context.inVOnce = true;
+    context.helper(SET_BLOCK_TRACKING);
+    return () => {
+      context.inVOnce = false;
+      const cur = context.currentNode;
+      if (cur.codegenNode) {
+        cur.codegenNode = context.cache(
+          cur.codegenNode,
+          true
+          /* isVNode */
+        );
+      }
+    };
+  }
+};
+
+const transformModel = (dir, node, context) => {
+  const { exp, arg } = dir;
+  if (!exp) {
+    context.onError(
+      createCompilerError(41, dir.loc)
+    );
+    return createTransformProps();
+  }
+  const rawExp = exp.loc.source;
+  const expString = exp.type === 4 ? exp.content : rawExp;
+  const bindingType = context.bindingMetadata[rawExp];
+  if (bindingType === "props" || bindingType === "props-aliased") {
+    context.onError(createCompilerError(44, exp.loc));
+    return createTransformProps();
+  }
+  const maybeRef = context.inline && (bindingType === "setup-let" || bindingType === "setup-ref" || bindingType === "setup-maybe-ref");
+  if (!expString.trim() || !isMemberExpression(expString, context) && !maybeRef) {
+    context.onError(
+      createCompilerError(42, exp.loc)
+    );
+    return createTransformProps();
+  }
+  if (context.prefixIdentifiers && isSimpleIdentifier(expString) && context.identifiers[expString]) {
+    context.onError(
+      createCompilerError(43, exp.loc)
+    );
+    return createTransformProps();
+  }
+  const propName = arg ? arg : createSimpleExpression("modelValue", true);
+  const eventName = arg ? isStaticExp(arg) ? `onUpdate:${shared.camelize(arg.content)}` : createCompoundExpression(['"onUpdate:" + ', arg]) : `onUpdate:modelValue`;
+  let assignmentExp;
+  const eventArg = context.isTS ? `($event: any)` : `$event`;
+  if (maybeRef) {
+    if (bindingType === "setup-ref") {
+      assignmentExp = createCompoundExpression([
+        `${eventArg} => ((`,
+        createSimpleExpression(rawExp, false, exp.loc),
+        `).value = $event)`
+      ]);
+    } else {
+      const altAssignment = bindingType === "setup-let" ? `${rawExp} = $event` : `null`;
+      assignmentExp = createCompoundExpression([
+        `${eventArg} => (${context.helperString(IS_REF)}(${rawExp}) ? (`,
+        createSimpleExpression(rawExp, false, exp.loc),
+        `).value = $event : ${altAssignment})`
+      ]);
+    }
+  } else {
+    assignmentExp = createCompoundExpression([
+      `${eventArg} => ((`,
+      exp,
+      `) = $event)`
+    ]);
+  }
+  const props = [
+    // modelValue: foo
+    createObjectProperty(propName, dir.exp),
+    // "onUpdate:modelValue": $event => (foo = $event)
+    createObjectProperty(eventName, assignmentExp)
+  ];
+  if (context.prefixIdentifiers && !context.inVOnce && context.cacheHandlers && !hasScopeRef(exp, context.identifiers)) {
+    props[1].value = context.cache(props[1].value);
+  }
+  if (dir.modifiers.length && node.tagType === 1) {
+    const modifiers = dir.modifiers.map((m) => (isSimpleIdentifier(m) ? m : JSON.stringify(m)) + `: true`).join(`, `);
+    const modifiersKey = arg ? isStaticExp(arg) ? `${arg.content}Modifiers` : createCompoundExpression([arg, ' + "Modifiers"']) : `modelModifiers`;
+    props.push(
+      createObjectProperty(
+        modifiersKey,
+        createSimpleExpression(
+          `{ ${modifiers} }`,
+          false,
+          dir.loc,
+          2
+        )
+      )
+    );
+  }
+  return createTransformProps(props);
+};
+function createTransformProps(props = []) {
+  return { props };
+}
+
+const validDivisionCharRE = /[\w).+\-_$\]]/;
+const transformFilter = (node, context) => {
+  if (!isCompatEnabled("COMPILER_FILTERS", context)) {
+    return;
+  }
+  if (node.type === 5) {
+    rewriteFilter(node.content, context);
+  }
+  if (node.type === 1) {
+    node.props.forEach((prop) => {
+      if (prop.type === 7 && prop.name !== "for" && prop.exp) {
+        rewriteFilter(prop.exp, context);
+      }
+    });
+  }
+};
+function rewriteFilter(node, context) {
+  if (node.type === 4) {
+    parseFilter(node, context);
+  } else {
+    for (let i = 0; i < node.children.length; i++) {
+      const child = node.children[i];
+      if (typeof child !== "object")
+        continue;
+      if (child.type === 4) {
+        parseFilter(child, context);
+      } else if (child.type === 8) {
+        rewriteFilter(node, context);
+      } else if (child.type === 5) {
+        rewriteFilter(child.content, context);
+      }
+    }
+  }
+}
+function parseFilter(node, context) {
+  const exp = node.content;
+  let inSingle = false;
+  let inDouble = false;
+  let inTemplateString = false;
+  let inRegex = false;
+  let curly = 0;
+  let square = 0;
+  let paren = 0;
+  let lastFilterIndex = 0;
+  let c, prev, i, expression, filters = [];
+  for (i = 0; i < exp.length; i++) {
+    prev = c;
+    c = exp.charCodeAt(i);
+    if (inSingle) {
+      if (c === 39 && prev !== 92)
+        inSingle = false;
+    } else if (inDouble) {
+      if (c === 34 && prev !== 92)
+        inDouble = false;
+    } else if (inTemplateString) {
+      if (c === 96 && prev !== 92)
+        inTemplateString = false;
+    } else if (inRegex) {
+      if (c === 47 && prev !== 92)
+        inRegex = false;
+    } else if (c === 124 && // pipe
+    exp.charCodeAt(i + 1) !== 124 && exp.charCodeAt(i - 1) !== 124 && !curly && !square && !paren) {
+      if (expression === void 0) {
+        lastFilterIndex = i + 1;
+        expression = exp.slice(0, i).trim();
+      } else {
+        pushFilter();
+      }
+    } else {
+      switch (c) {
+        case 34:
+          inDouble = true;
+          break;
+        case 39:
+          inSingle = true;
+          break;
+        case 96:
+          inTemplateString = true;
+          break;
+        case 40:
+          paren++;
+          break;
+        case 41:
+          paren--;
+          break;
+        case 91:
+          square++;
+          break;
+        case 93:
+          square--;
+          break;
+        case 123:
+          curly++;
+          break;
+        case 125:
+          curly--;
+          break;
+      }
+      if (c === 47) {
+        let j = i - 1;
+        let p;
+        for (; j >= 0; j--) {
+          p = exp.charAt(j);
+          if (p !== " ")
+            break;
+        }
+        if (!p || !validDivisionCharRE.test(p)) {
+          inRegex = true;
+        }
+      }
+    }
+  }
+  if (expression === void 0) {
+    expression = exp.slice(0, i).trim();
+  } else if (lastFilterIndex !== 0) {
+    pushFilter();
+  }
+  function pushFilter() {
+    filters.push(exp.slice(lastFilterIndex, i).trim());
+    lastFilterIndex = i + 1;
+  }
+  if (filters.length) {
+    warnDeprecation(
+      "COMPILER_FILTERS",
+      context,
+      node.loc
+    );
+    for (i = 0; i < filters.length; i++) {
+      expression = wrapFilter(expression, filters[i], context);
+    }
+    node.content = expression;
+  }
+}
+function wrapFilter(exp, filter, context) {
+  context.helper(RESOLVE_FILTER);
+  const i = filter.indexOf("(");
+  if (i < 0) {
+    context.filters.add(filter);
+    return `${toValidAssetId(filter, "filter")}(${exp})`;
+  } else {
+    const name = filter.slice(0, i);
+    const args = filter.slice(i + 1);
+    context.filters.add(name);
+    return `${toValidAssetId(name, "filter")}(${exp}${args !== ")" ? "," + args : args}`;
+  }
+}
+
+const seen = /* @__PURE__ */ new WeakSet();
+const transformMemo = (node, context) => {
+  if (node.type === 1) {
+    const dir = findDir(node, "memo");
+    if (!dir || seen.has(node)) {
+      return;
+    }
+    seen.add(node);
+    return () => {
+      const codegenNode = node.codegenNode || context.currentNode.codegenNode;
+      if (codegenNode && codegenNode.type === 13) {
+        if (node.tagType !== 1) {
+          convertToBlock(codegenNode, context);
+        }
+        node.codegenNode = createCallExpression(context.helper(WITH_MEMO), [
+          dir.exp,
+          createFunctionExpression(void 0, codegenNode),
+          `_cache`,
+          String(context.cached++)
+        ]);
+      }
+    };
+  }
+};
+
+function getBaseTransformPreset(prefixIdentifiers) {
+  return [
+    [
+      transformOnce,
+      transformIf,
+      transformMemo,
+      transformFor,
+      ...[transformFilter] ,
+      ...prefixIdentifiers ? [
+        // order is important
+        trackVForSlotScopes,
+        transformExpression
+      ] : [],
+      transformSlotOutlet,
+      transformElement,
+      trackSlotScopes,
+      transformText
+    ],
+    {
+      on: transformOn,
+      bind: transformBind,
+      model: transformModel
+    }
+  ];
+}
+function baseCompile(source, options = {}) {
+  const onError = options.onError || defaultOnError;
+  const isModuleMode = options.mode === "module";
+  const prefixIdentifiers = options.prefixIdentifiers === true || isModuleMode;
+  if (!prefixIdentifiers && options.cacheHandlers) {
+    onError(createCompilerError(49));
+  }
+  if (options.scopeId && !isModuleMode) {
+    onError(createCompilerError(50));
+  }
+  const resolvedOptions = shared.extend({}, options, {
+    prefixIdentifiers
+  });
+  const ast = shared.isString(source) ? baseParse(source, resolvedOptions) : source;
+  const [nodeTransforms, directiveTransforms] = getBaseTransformPreset(prefixIdentifiers);
+  if (options.isTS) {
+    const { expressionPlugins } = options;
+    if (!expressionPlugins || !expressionPlugins.includes("typescript")) {
+      options.expressionPlugins = [...expressionPlugins || [], "typescript"];
+    }
+  }
+  transform(
+    ast,
+    shared.extend({}, resolvedOptions, {
+      nodeTransforms: [
+        ...nodeTransforms,
+        ...options.nodeTransforms || []
+        // user transforms
+      ],
+      directiveTransforms: shared.extend(
+        {},
+        directiveTransforms,
+        options.directiveTransforms || {}
+        // user transforms
+      )
+    })
+  );
+  return generate(ast, resolvedOptions);
+}
+
+const BindingTypes = {
+  "DATA": "data",
+  "PROPS": "props",
+  "PROPS_ALIASED": "props-aliased",
+  "SETUP_LET": "setup-let",
+  "SETUP_CONST": "setup-const",
+  "SETUP_REACTIVE_CONST": "setup-reactive-const",
+  "SETUP_MAYBE_REF": "setup-maybe-ref",
+  "SETUP_REF": "setup-ref",
+  "OPTIONS": "options",
+  "LITERAL_CONST": "literal-const"
+};
+
+const noopDirectiveTransform = () => ({ props: [] });
+
+exports.generateCodeFrame = shared.generateCodeFrame;
+exports.BASE_TRANSITION = BASE_TRANSITION;
+exports.BindingTypes = BindingTypes;
+exports.CAMELIZE = CAMELIZE;
+exports.CAPITALIZE = CAPITALIZE;
+exports.CREATE_BLOCK = CREATE_BLOCK;
+exports.CREATE_COMMENT = CREATE_COMMENT;
+exports.CREATE_ELEMENT_BLOCK = CREATE_ELEMENT_BLOCK;
+exports.CREATE_ELEMENT_VNODE = CREATE_ELEMENT_VNODE;
+exports.CREATE_SLOTS = CREATE_SLOTS;
+exports.CREATE_STATIC = CREATE_STATIC;
+exports.CREATE_TEXT = CREATE_TEXT;
+exports.CREATE_VNODE = CREATE_VNODE;
+exports.CompilerDeprecationTypes = CompilerDeprecationTypes;
+exports.ConstantTypes = ConstantTypes;
+exports.ElementTypes = ElementTypes;
+exports.ErrorCodes = ErrorCodes;
+exports.FRAGMENT = FRAGMENT;
+exports.GUARD_REACTIVE_PROPS = GUARD_REACTIVE_PROPS;
+exports.IS_MEMO_SAME = IS_MEMO_SAME;
+exports.IS_REF = IS_REF;
+exports.KEEP_ALIVE = KEEP_ALIVE;
+exports.MERGE_PROPS = MERGE_PROPS;
+exports.NORMALIZE_CLASS = NORMALIZE_CLASS;
+exports.NORMALIZE_PROPS = NORMALIZE_PROPS;
+exports.NORMALIZE_STYLE = NORMALIZE_STYLE;
+exports.Namespaces = Namespaces;
+exports.NodeTypes = NodeTypes;
+exports.OPEN_BLOCK = OPEN_BLOCK;
+exports.POP_SCOPE_ID = POP_SCOPE_ID;
+exports.PUSH_SCOPE_ID = PUSH_SCOPE_ID;
+exports.RENDER_LIST = RENDER_LIST;
+exports.RENDER_SLOT = RENDER_SLOT;
+exports.RESOLVE_COMPONENT = RESOLVE_COMPONENT;
+exports.RESOLVE_DIRECTIVE = RESOLVE_DIRECTIVE;
+exports.RESOLVE_DYNAMIC_COMPONENT = RESOLVE_DYNAMIC_COMPONENT;
+exports.RESOLVE_FILTER = RESOLVE_FILTER;
+exports.SET_BLOCK_TRACKING = SET_BLOCK_TRACKING;
+exports.SUSPENSE = SUSPENSE;
+exports.TELEPORT = TELEPORT;
+exports.TO_DISPLAY_STRING = TO_DISPLAY_STRING;
+exports.TO_HANDLERS = TO_HANDLERS;
+exports.TO_HANDLER_KEY = TO_HANDLER_KEY;
+exports.TS_NODE_TYPES = TS_NODE_TYPES;
+exports.UNREF = UNREF;
+exports.WITH_CTX = WITH_CTX;
+exports.WITH_DIRECTIVES = WITH_DIRECTIVES;
+exports.WITH_MEMO = WITH_MEMO;
+exports.advancePositionWithClone = advancePositionWithClone;
+exports.advancePositionWithMutation = advancePositionWithMutation;
+exports.assert = assert;
+exports.baseCompile = baseCompile;
+exports.baseParse = baseParse;
+exports.buildDirectiveArgs = buildDirectiveArgs;
+exports.buildProps = buildProps;
+exports.buildSlots = buildSlots;
+exports.checkCompatEnabled = checkCompatEnabled;
+exports.convertToBlock = convertToBlock;
+exports.createArrayExpression = createArrayExpression;
+exports.createAssignmentExpression = createAssignmentExpression;
+exports.createBlockStatement = createBlockStatement;
+exports.createCacheExpression = createCacheExpression;
+exports.createCallExpression = createCallExpression;
+exports.createCompilerError = createCompilerError;
+exports.createCompoundExpression = createCompoundExpression;
+exports.createConditionalExpression = createConditionalExpression;
+exports.createForLoopParams = createForLoopParams;
+exports.createFunctionExpression = createFunctionExpression;
+exports.createIfStatement = createIfStatement;
+exports.createInterpolation = createInterpolation;
+exports.createObjectExpression = createObjectExpression;
+exports.createObjectProperty = createObjectProperty;
+exports.createReturnStatement = createReturnStatement;
+exports.createRoot = createRoot;
+exports.createSequenceExpression = createSequenceExpression;
+exports.createSimpleExpression = createSimpleExpression;
+exports.createStructuralDirectiveTransform = createStructuralDirectiveTransform;
+exports.createTemplateLiteral = createTemplateLiteral;
+exports.createTransformContext = createTransformContext;
+exports.createVNodeCall = createVNodeCall;
+exports.errorMessages = errorMessages;
+exports.extractIdentifiers = extractIdentifiers;
+exports.findDir = findDir;
+exports.findProp = findProp;
+exports.forAliasRE = forAliasRE;
+exports.generate = generate;
+exports.getBaseTransformPreset = getBaseTransformPreset;
+exports.getConstantType = getConstantType;
+exports.getMemoedVNodeCall = getMemoedVNodeCall;
+exports.getVNodeBlockHelper = getVNodeBlockHelper;
+exports.getVNodeHelper = getVNodeHelper;
+exports.hasDynamicKeyVBind = hasDynamicKeyVBind;
+exports.hasScopeRef = hasScopeRef;
+exports.helperNameMap = helperNameMap;
+exports.injectProp = injectProp;
+exports.isCoreComponent = isCoreComponent;
+exports.isFunctionType = isFunctionType;
+exports.isInDestructureAssignment = isInDestructureAssignment;
+exports.isInNewExpression = isInNewExpression;
+exports.isMemberExpression = isMemberExpression;
+exports.isMemberExpressionBrowser = isMemberExpressionBrowser;
+exports.isMemberExpressionNode = isMemberExpressionNode;
+exports.isReferencedIdentifier = isReferencedIdentifier;
+exports.isSimpleIdentifier = isSimpleIdentifier;
+exports.isSlotOutlet = isSlotOutlet;
+exports.isStaticArgOf = isStaticArgOf;
+exports.isStaticExp = isStaticExp;
+exports.isStaticProperty = isStaticProperty;
+exports.isStaticPropertyKey = isStaticPropertyKey;
+exports.isTemplateNode = isTemplateNode;
+exports.isText = isText$1;
+exports.isVSlot = isVSlot;
+exports.locStub = locStub;
+exports.noopDirectiveTransform = noopDirectiveTransform;
+exports.processExpression = processExpression;
+exports.processFor = processFor;
+exports.processIf = processIf;
+exports.processSlotOutlet = processSlotOutlet;
+exports.registerRuntimeHelpers = registerRuntimeHelpers;
+exports.resolveComponentType = resolveComponentType;
+exports.stringifyExpression = stringifyExpression;
+exports.toValidAssetId = toValidAssetId;
+exports.trackSlotScopes = trackSlotScopes;
+exports.trackVForSlotScopes = trackVForSlotScopes;
+exports.transform = transform;
+exports.transformBind = transformBind;
+exports.transformElement = transformElement;
+exports.transformExpression = transformExpression;
+exports.transformModel = transformModel;
+exports.transformOn = transformOn;
+exports.traverseNode = traverseNode;
+exports.unwrapTSNode = unwrapTSNode;
+exports.walkBlockDeclarations = walkBlockDeclarations;
+exports.walkFunctionParams = walkFunctionParams;
+exports.walkIdentifiers = walkIdentifiers;
+exports.warnDeprecation = warnDeprecation;

+ 6520 - 0
node_modules/@vue/compiler-core/dist/compiler-core.cjs.prod.js

@@ -0,0 +1,6520 @@
+/**
+* @vue/compiler-core v3.4.27
+* (c) 2018-present Yuxi (Evan) You and Vue contributors
+* @license MIT
+**/
+'use strict';
+
+Object.defineProperty(exports, '__esModule', { value: true });
+
+var shared = require('@vue/shared');
+var decode_js = require('entities/lib/decode.js');
+var parser = require('@babel/parser');
+var estreeWalker = require('estree-walker');
+var sourceMapJs = require('source-map-js');
+
+const FRAGMENT = Symbol(``);
+const TELEPORT = Symbol(``);
+const SUSPENSE = Symbol(``);
+const KEEP_ALIVE = Symbol(``);
+const BASE_TRANSITION = Symbol(``);
+const OPEN_BLOCK = Symbol(``);
+const CREATE_BLOCK = Symbol(``);
+const CREATE_ELEMENT_BLOCK = Symbol(``);
+const CREATE_VNODE = Symbol(``);
+const CREATE_ELEMENT_VNODE = Symbol(``);
+const CREATE_COMMENT = Symbol(``);
+const CREATE_TEXT = Symbol(``);
+const CREATE_STATIC = Symbol(``);
+const RESOLVE_COMPONENT = Symbol(``);
+const RESOLVE_DYNAMIC_COMPONENT = Symbol(
+  ``
+);
+const RESOLVE_DIRECTIVE = Symbol(``);
+const RESOLVE_FILTER = Symbol(``);
+const WITH_DIRECTIVES = Symbol(``);
+const RENDER_LIST = Symbol(``);
+const RENDER_SLOT = Symbol(``);
+const CREATE_SLOTS = Symbol(``);
+const TO_DISPLAY_STRING = Symbol(``);
+const MERGE_PROPS = Symbol(``);
+const NORMALIZE_CLASS = Symbol(``);
+const NORMALIZE_STYLE = Symbol(``);
+const NORMALIZE_PROPS = Symbol(``);
+const GUARD_REACTIVE_PROPS = Symbol(``);
+const TO_HANDLERS = Symbol(``);
+const CAMELIZE = Symbol(``);
+const CAPITALIZE = Symbol(``);
+const TO_HANDLER_KEY = Symbol(``);
+const SET_BLOCK_TRACKING = Symbol(``);
+const PUSH_SCOPE_ID = Symbol(``);
+const POP_SCOPE_ID = Symbol(``);
+const WITH_CTX = Symbol(``);
+const UNREF = Symbol(``);
+const IS_REF = Symbol(``);
+const WITH_MEMO = Symbol(``);
+const IS_MEMO_SAME = Symbol(``);
+const helperNameMap = {
+  [FRAGMENT]: `Fragment`,
+  [TELEPORT]: `Teleport`,
+  [SUSPENSE]: `Suspense`,
+  [KEEP_ALIVE]: `KeepAlive`,
+  [BASE_TRANSITION]: `BaseTransition`,
+  [OPEN_BLOCK]: `openBlock`,
+  [CREATE_BLOCK]: `createBlock`,
+  [CREATE_ELEMENT_BLOCK]: `createElementBlock`,
+  [CREATE_VNODE]: `createVNode`,
+  [CREATE_ELEMENT_VNODE]: `createElementVNode`,
+  [CREATE_COMMENT]: `createCommentVNode`,
+  [CREATE_TEXT]: `createTextVNode`,
+  [CREATE_STATIC]: `createStaticVNode`,
+  [RESOLVE_COMPONENT]: `resolveComponent`,
+  [RESOLVE_DYNAMIC_COMPONENT]: `resolveDynamicComponent`,
+  [RESOLVE_DIRECTIVE]: `resolveDirective`,
+  [RESOLVE_FILTER]: `resolveFilter`,
+  [WITH_DIRECTIVES]: `withDirectives`,
+  [RENDER_LIST]: `renderList`,
+  [RENDER_SLOT]: `renderSlot`,
+  [CREATE_SLOTS]: `createSlots`,
+  [TO_DISPLAY_STRING]: `toDisplayString`,
+  [MERGE_PROPS]: `mergeProps`,
+  [NORMALIZE_CLASS]: `normalizeClass`,
+  [NORMALIZE_STYLE]: `normalizeStyle`,
+  [NORMALIZE_PROPS]: `normalizeProps`,
+  [GUARD_REACTIVE_PROPS]: `guardReactiveProps`,
+  [TO_HANDLERS]: `toHandlers`,
+  [CAMELIZE]: `camelize`,
+  [CAPITALIZE]: `capitalize`,
+  [TO_HANDLER_KEY]: `toHandlerKey`,
+  [SET_BLOCK_TRACKING]: `setBlockTracking`,
+  [PUSH_SCOPE_ID]: `pushScopeId`,
+  [POP_SCOPE_ID]: `popScopeId`,
+  [WITH_CTX]: `withCtx`,
+  [UNREF]: `unref`,
+  [IS_REF]: `isRef`,
+  [WITH_MEMO]: `withMemo`,
+  [IS_MEMO_SAME]: `isMemoSame`
+};
+function registerRuntimeHelpers(helpers) {
+  Object.getOwnPropertySymbols(helpers).forEach((s) => {
+    helperNameMap[s] = helpers[s];
+  });
+}
+
+const Namespaces = {
+  "HTML": 0,
+  "0": "HTML",
+  "SVG": 1,
+  "1": "SVG",
+  "MATH_ML": 2,
+  "2": "MATH_ML"
+};
+const NodeTypes = {
+  "ROOT": 0,
+  "0": "ROOT",
+  "ELEMENT": 1,
+  "1": "ELEMENT",
+  "TEXT": 2,
+  "2": "TEXT",
+  "COMMENT": 3,
+  "3": "COMMENT",
+  "SIMPLE_EXPRESSION": 4,
+  "4": "SIMPLE_EXPRESSION",
+  "INTERPOLATION": 5,
+  "5": "INTERPOLATION",
+  "ATTRIBUTE": 6,
+  "6": "ATTRIBUTE",
+  "DIRECTIVE": 7,
+  "7": "DIRECTIVE",
+  "COMPOUND_EXPRESSION": 8,
+  "8": "COMPOUND_EXPRESSION",
+  "IF": 9,
+  "9": "IF",
+  "IF_BRANCH": 10,
+  "10": "IF_BRANCH",
+  "FOR": 11,
+  "11": "FOR",
+  "TEXT_CALL": 12,
+  "12": "TEXT_CALL",
+  "VNODE_CALL": 13,
+  "13": "VNODE_CALL",
+  "JS_CALL_EXPRESSION": 14,
+  "14": "JS_CALL_EXPRESSION",
+  "JS_OBJECT_EXPRESSION": 15,
+  "15": "JS_OBJECT_EXPRESSION",
+  "JS_PROPERTY": 16,
+  "16": "JS_PROPERTY",
+  "JS_ARRAY_EXPRESSION": 17,
+  "17": "JS_ARRAY_EXPRESSION",
+  "JS_FUNCTION_EXPRESSION": 18,
+  "18": "JS_FUNCTION_EXPRESSION",
+  "JS_CONDITIONAL_EXPRESSION": 19,
+  "19": "JS_CONDITIONAL_EXPRESSION",
+  "JS_CACHE_EXPRESSION": 20,
+  "20": "JS_CACHE_EXPRESSION",
+  "JS_BLOCK_STATEMENT": 21,
+  "21": "JS_BLOCK_STATEMENT",
+  "JS_TEMPLATE_LITERAL": 22,
+  "22": "JS_TEMPLATE_LITERAL",
+  "JS_IF_STATEMENT": 23,
+  "23": "JS_IF_STATEMENT",
+  "JS_ASSIGNMENT_EXPRESSION": 24,
+  "24": "JS_ASSIGNMENT_EXPRESSION",
+  "JS_SEQUENCE_EXPRESSION": 25,
+  "25": "JS_SEQUENCE_EXPRESSION",
+  "JS_RETURN_STATEMENT": 26,
+  "26": "JS_RETURN_STATEMENT"
+};
+const ElementTypes = {
+  "ELEMENT": 0,
+  "0": "ELEMENT",
+  "COMPONENT": 1,
+  "1": "COMPONENT",
+  "SLOT": 2,
+  "2": "SLOT",
+  "TEMPLATE": 3,
+  "3": "TEMPLATE"
+};
+const ConstantTypes = {
+  "NOT_CONSTANT": 0,
+  "0": "NOT_CONSTANT",
+  "CAN_SKIP_PATCH": 1,
+  "1": "CAN_SKIP_PATCH",
+  "CAN_HOIST": 2,
+  "2": "CAN_HOIST",
+  "CAN_STRINGIFY": 3,
+  "3": "CAN_STRINGIFY"
+};
+const locStub = {
+  start: { line: 1, column: 1, offset: 0 },
+  end: { line: 1, column: 1, offset: 0 },
+  source: ""
+};
+function createRoot(children, source = "") {
+  return {
+    type: 0,
+    source,
+    children,
+    helpers: /* @__PURE__ */ new Set(),
+    components: [],
+    directives: [],
+    hoists: [],
+    imports: [],
+    cached: 0,
+    temps: 0,
+    codegenNode: void 0,
+    loc: locStub
+  };
+}
+function createVNodeCall(context, tag, props, children, patchFlag, dynamicProps, directives, isBlock = false, disableTracking = false, isComponent = false, loc = locStub) {
+  if (context) {
+    if (isBlock) {
+      context.helper(OPEN_BLOCK);
+      context.helper(getVNodeBlockHelper(context.inSSR, isComponent));
+    } else {
+      context.helper(getVNodeHelper(context.inSSR, isComponent));
+    }
+    if (directives) {
+      context.helper(WITH_DIRECTIVES);
+    }
+  }
+  return {
+    type: 13,
+    tag,
+    props,
+    children,
+    patchFlag,
+    dynamicProps,
+    directives,
+    isBlock,
+    disableTracking,
+    isComponent,
+    loc
+  };
+}
+function createArrayExpression(elements, loc = locStub) {
+  return {
+    type: 17,
+    loc,
+    elements
+  };
+}
+function createObjectExpression(properties, loc = locStub) {
+  return {
+    type: 15,
+    loc,
+    properties
+  };
+}
+function createObjectProperty(key, value) {
+  return {
+    type: 16,
+    loc: locStub,
+    key: shared.isString(key) ? createSimpleExpression(key, true) : key,
+    value
+  };
+}
+function createSimpleExpression(content, isStatic = false, loc = locStub, constType = 0) {
+  return {
+    type: 4,
+    loc,
+    content,
+    isStatic,
+    constType: isStatic ? 3 : constType
+  };
+}
+function createInterpolation(content, loc) {
+  return {
+    type: 5,
+    loc,
+    content: shared.isString(content) ? createSimpleExpression(content, false, loc) : content
+  };
+}
+function createCompoundExpression(children, loc = locStub) {
+  return {
+    type: 8,
+    loc,
+    children
+  };
+}
+function createCallExpression(callee, args = [], loc = locStub) {
+  return {
+    type: 14,
+    loc,
+    callee,
+    arguments: args
+  };
+}
+function createFunctionExpression(params, returns = void 0, newline = false, isSlot = false, loc = locStub) {
+  return {
+    type: 18,
+    params,
+    returns,
+    newline,
+    isSlot,
+    loc
+  };
+}
+function createConditionalExpression(test, consequent, alternate, newline = true) {
+  return {
+    type: 19,
+    test,
+    consequent,
+    alternate,
+    newline,
+    loc: locStub
+  };
+}
+function createCacheExpression(index, value, isVNode = false) {
+  return {
+    type: 20,
+    index,
+    value,
+    isVNode,
+    loc: locStub
+  };
+}
+function createBlockStatement(body) {
+  return {
+    type: 21,
+    body,
+    loc: locStub
+  };
+}
+function createTemplateLiteral(elements) {
+  return {
+    type: 22,
+    elements,
+    loc: locStub
+  };
+}
+function createIfStatement(test, consequent, alternate) {
+  return {
+    type: 23,
+    test,
+    consequent,
+    alternate,
+    loc: locStub
+  };
+}
+function createAssignmentExpression(left, right) {
+  return {
+    type: 24,
+    left,
+    right,
+    loc: locStub
+  };
+}
+function createSequenceExpression(expressions) {
+  return {
+    type: 25,
+    expressions,
+    loc: locStub
+  };
+}
+function createReturnStatement(returns) {
+  return {
+    type: 26,
+    returns,
+    loc: locStub
+  };
+}
+function getVNodeHelper(ssr, isComponent) {
+  return ssr || isComponent ? CREATE_VNODE : CREATE_ELEMENT_VNODE;
+}
+function getVNodeBlockHelper(ssr, isComponent) {
+  return ssr || isComponent ? CREATE_BLOCK : CREATE_ELEMENT_BLOCK;
+}
+function convertToBlock(node, { helper, removeHelper, inSSR }) {
+  if (!node.isBlock) {
+    node.isBlock = true;
+    removeHelper(getVNodeHelper(inSSR, node.isComponent));
+    helper(OPEN_BLOCK);
+    helper(getVNodeBlockHelper(inSSR, node.isComponent));
+  }
+}
+
+const defaultDelimitersOpen = new Uint8Array([123, 123]);
+const defaultDelimitersClose = new Uint8Array([125, 125]);
+function isTagStartChar(c) {
+  return c >= 97 && c <= 122 || c >= 65 && c <= 90;
+}
+function isWhitespace(c) {
+  return c === 32 || c === 10 || c === 9 || c === 12 || c === 13;
+}
+function isEndOfTagSection(c) {
+  return c === 47 || c === 62 || isWhitespace(c);
+}
+function toCharCodes(str) {
+  const ret = new Uint8Array(str.length);
+  for (let i = 0; i < str.length; i++) {
+    ret[i] = str.charCodeAt(i);
+  }
+  return ret;
+}
+const Sequences = {
+  Cdata: new Uint8Array([67, 68, 65, 84, 65, 91]),
+  // CDATA[
+  CdataEnd: new Uint8Array([93, 93, 62]),
+  // ]]>
+  CommentEnd: new Uint8Array([45, 45, 62]),
+  // `-->`
+  ScriptEnd: new Uint8Array([60, 47, 115, 99, 114, 105, 112, 116]),
+  // `<\/script`
+  StyleEnd: new Uint8Array([60, 47, 115, 116, 121, 108, 101]),
+  // `</style`
+  TitleEnd: new Uint8Array([60, 47, 116, 105, 116, 108, 101]),
+  // `</title`
+  TextareaEnd: new Uint8Array([
+    60,
+    47,
+    116,
+    101,
+    120,
+    116,
+    97,
+    114,
+    101,
+    97
+  ])
+  // `</textarea
+};
+class Tokenizer {
+  constructor(stack, cbs) {
+    this.stack = stack;
+    this.cbs = cbs;
+    /** The current state the tokenizer is in. */
+    this.state = 1;
+    /** The read buffer. */
+    this.buffer = "";
+    /** The beginning of the section that is currently being read. */
+    this.sectionStart = 0;
+    /** The index within the buffer that we are currently looking at. */
+    this.index = 0;
+    /** The start of the last entity. */
+    this.entityStart = 0;
+    /** Some behavior, eg. when decoding entities, is done while we are in another state. This keeps track of the other state type. */
+    this.baseState = 1;
+    /** For special parsing behavior inside of script and style tags. */
+    this.inRCDATA = false;
+    /** For disabling RCDATA tags handling */
+    this.inXML = false;
+    /** For disabling interpolation parsing in v-pre */
+    this.inVPre = false;
+    /** Record newline positions for fast line / column calculation */
+    this.newlines = [];
+    this.mode = 0;
+    this.delimiterOpen = defaultDelimitersOpen;
+    this.delimiterClose = defaultDelimitersClose;
+    this.delimiterIndex = -1;
+    this.currentSequence = void 0;
+    this.sequenceIndex = 0;
+    {
+      this.entityDecoder = new decode_js.EntityDecoder(
+        decode_js.htmlDecodeTree,
+        (cp, consumed) => this.emitCodePoint(cp, consumed)
+      );
+    }
+  }
+  get inSFCRoot() {
+    return this.mode === 2 && this.stack.length === 0;
+  }
+  reset() {
+    this.state = 1;
+    this.mode = 0;
+    this.buffer = "";
+    this.sectionStart = 0;
+    this.index = 0;
+    this.baseState = 1;
+    this.inRCDATA = false;
+    this.currentSequence = void 0;
+    this.newlines.length = 0;
+    this.delimiterOpen = defaultDelimitersOpen;
+    this.delimiterClose = defaultDelimitersClose;
+  }
+  /**
+   * Generate Position object with line / column information using recorded
+   * newline positions. We know the index is always going to be an already
+   * processed index, so all the newlines up to this index should have been
+   * recorded.
+   */
+  getPos(index) {
+    let line = 1;
+    let column = index + 1;
+    for (let i = this.newlines.length - 1; i >= 0; i--) {
+      const newlineIndex = this.newlines[i];
+      if (index > newlineIndex) {
+        line = i + 2;
+        column = index - newlineIndex;
+        break;
+      }
+    }
+    return {
+      column,
+      line,
+      offset: index
+    };
+  }
+  peek() {
+    return this.buffer.charCodeAt(this.index + 1);
+  }
+  stateText(c) {
+    if (c === 60) {
+      if (this.index > this.sectionStart) {
+        this.cbs.ontext(this.sectionStart, this.index);
+      }
+      this.state = 5;
+      this.sectionStart = this.index;
+    } else if (c === 38) {
+      this.startEntity();
+    } else if (!this.inVPre && c === this.delimiterOpen[0]) {
+      this.state = 2;
+      this.delimiterIndex = 0;
+      this.stateInterpolationOpen(c);
+    }
+  }
+  stateInterpolationOpen(c) {
+    if (c === this.delimiterOpen[this.delimiterIndex]) {
+      if (this.delimiterIndex === this.delimiterOpen.length - 1) {
+        const start = this.index + 1 - this.delimiterOpen.length;
+        if (start > this.sectionStart) {
+          this.cbs.ontext(this.sectionStart, start);
+        }
+        this.state = 3;
+        this.sectionStart = start;
+      } else {
+        this.delimiterIndex++;
+      }
+    } else if (this.inRCDATA) {
+      this.state = 32;
+      this.stateInRCDATA(c);
+    } else {
+      this.state = 1;
+      this.stateText(c);
+    }
+  }
+  stateInterpolation(c) {
+    if (c === this.delimiterClose[0]) {
+      this.state = 4;
+      this.delimiterIndex = 0;
+      this.stateInterpolationClose(c);
+    }
+  }
+  stateInterpolationClose(c) {
+    if (c === this.delimiterClose[this.delimiterIndex]) {
+      if (this.delimiterIndex === this.delimiterClose.length - 1) {
+        this.cbs.oninterpolation(this.sectionStart, this.index + 1);
+        if (this.inRCDATA) {
+          this.state = 32;
+        } else {
+          this.state = 1;
+        }
+        this.sectionStart = this.index + 1;
+      } else {
+        this.delimiterIndex++;
+      }
+    } else {
+      this.state = 3;
+      this.stateInterpolation(c);
+    }
+  }
+  stateSpecialStartSequence(c) {
+    const isEnd = this.sequenceIndex === this.currentSequence.length;
+    const isMatch = isEnd ? (
+      // If we are at the end of the sequence, make sure the tag name has ended
+      isEndOfTagSection(c)
+    ) : (
+      // Otherwise, do a case-insensitive comparison
+      (c | 32) === this.currentSequence[this.sequenceIndex]
+    );
+    if (!isMatch) {
+      this.inRCDATA = false;
+    } else if (!isEnd) {
+      this.sequenceIndex++;
+      return;
+    }
+    this.sequenceIndex = 0;
+    this.state = 6;
+    this.stateInTagName(c);
+  }
+  /** Look for an end tag. For <title> and <textarea>, also decode entities. */
+  stateInRCDATA(c) {
+    if (this.sequenceIndex === this.currentSequence.length) {
+      if (c === 62 || isWhitespace(c)) {
+        const endOfText = this.index - this.currentSequence.length;
+        if (this.sectionStart < endOfText) {
+          const actualIndex = this.index;
+          this.index = endOfText;
+          this.cbs.ontext(this.sectionStart, endOfText);
+          this.index = actualIndex;
+        }
+        this.sectionStart = endOfText + 2;
+        this.stateInClosingTagName(c);
+        this.inRCDATA = false;
+        return;
+      }
+      this.sequenceIndex = 0;
+    }
+    if ((c | 32) === this.currentSequence[this.sequenceIndex]) {
+      this.sequenceIndex += 1;
+    } else if (this.sequenceIndex === 0) {
+      if (this.currentSequence === Sequences.TitleEnd || this.currentSequence === Sequences.TextareaEnd && !this.inSFCRoot) {
+        if (c === 38) {
+          this.startEntity();
+        } else if (c === this.delimiterOpen[0]) {
+          this.state = 2;
+          this.delimiterIndex = 0;
+          this.stateInterpolationOpen(c);
+        }
+      } else if (this.fastForwardTo(60)) {
+        this.sequenceIndex = 1;
+      }
+    } else {
+      this.sequenceIndex = Number(c === 60);
+    }
+  }
+  stateCDATASequence(c) {
+    if (c === Sequences.Cdata[this.sequenceIndex]) {
+      if (++this.sequenceIndex === Sequences.Cdata.length) {
+        this.state = 28;
+        this.currentSequence = Sequences.CdataEnd;
+        this.sequenceIndex = 0;
+        this.sectionStart = this.index + 1;
+      }
+    } else {
+      this.sequenceIndex = 0;
+      this.state = 23;
+      this.stateInDeclaration(c);
+    }
+  }
+  /**
+   * When we wait for one specific character, we can speed things up
+   * by skipping through the buffer until we find it.
+   *
+   * @returns Whether the character was found.
+   */
+  fastForwardTo(c) {
+    while (++this.index < this.buffer.length) {
+      const cc = this.buffer.charCodeAt(this.index);
+      if (cc === 10) {
+        this.newlines.push(this.index);
+      }
+      if (cc === c) {
+        return true;
+      }
+    }
+    this.index = this.buffer.length - 1;
+    return false;
+  }
+  /**
+   * Comments and CDATA end with `-->` and `]]>`.
+   *
+   * Their common qualities are:
+   * - Their end sequences have a distinct character they start with.
+   * - That character is then repeated, so we have to check multiple repeats.
+   * - All characters but the start character of the sequence can be skipped.
+   */
+  stateInCommentLike(c) {
+    if (c === this.currentSequence[this.sequenceIndex]) {
+      if (++this.sequenceIndex === this.currentSequence.length) {
+        if (this.currentSequence === Sequences.CdataEnd) {
+          this.cbs.oncdata(this.sectionStart, this.index - 2);
+        } else {
+          this.cbs.oncomment(this.sectionStart, this.index - 2);
+        }
+        this.sequenceIndex = 0;
+        this.sectionStart = this.index + 1;
+        this.state = 1;
+      }
+    } else if (this.sequenceIndex === 0) {
+      if (this.fastForwardTo(this.currentSequence[0])) {
+        this.sequenceIndex = 1;
+      }
+    } else if (c !== this.currentSequence[this.sequenceIndex - 1]) {
+      this.sequenceIndex = 0;
+    }
+  }
+  startSpecial(sequence, offset) {
+    this.enterRCDATA(sequence, offset);
+    this.state = 31;
+  }
+  enterRCDATA(sequence, offset) {
+    this.inRCDATA = true;
+    this.currentSequence = sequence;
+    this.sequenceIndex = offset;
+  }
+  stateBeforeTagName(c) {
+    if (c === 33) {
+      this.state = 22;
+      this.sectionStart = this.index + 1;
+    } else if (c === 63) {
+      this.state = 24;
+      this.sectionStart = this.index + 1;
+    } else if (isTagStartChar(c)) {
+      this.sectionStart = this.index;
+      if (this.mode === 0) {
+        this.state = 6;
+      } else if (this.inSFCRoot) {
+        this.state = 34;
+      } else if (!this.inXML) {
+        if (c === 116) {
+          this.state = 30;
+        } else {
+          this.state = c === 115 ? 29 : 6;
+        }
+      } else {
+        this.state = 6;
+      }
+    } else if (c === 47) {
+      this.state = 8;
+    } else {
+      this.state = 1;
+      this.stateText(c);
+    }
+  }
+  stateInTagName(c) {
+    if (isEndOfTagSection(c)) {
+      this.handleTagName(c);
+    }
+  }
+  stateInSFCRootTagName(c) {
+    if (isEndOfTagSection(c)) {
+      const tag = this.buffer.slice(this.sectionStart, this.index);
+      if (tag !== "template") {
+        this.enterRCDATA(toCharCodes(`</` + tag), 0);
+      }
+      this.handleTagName(c);
+    }
+  }
+  handleTagName(c) {
+    this.cbs.onopentagname(this.sectionStart, this.index);
+    this.sectionStart = -1;
+    this.state = 11;
+    this.stateBeforeAttrName(c);
+  }
+  stateBeforeClosingTagName(c) {
+    if (isWhitespace(c)) ; else if (c === 62) {
+      {
+        this.cbs.onerr(14, this.index);
+      }
+      this.state = 1;
+      this.sectionStart = this.index + 1;
+    } else {
+      this.state = isTagStartChar(c) ? 9 : 27;
+      this.sectionStart = this.index;
+    }
+  }
+  stateInClosingTagName(c) {
+    if (c === 62 || isWhitespace(c)) {
+      this.cbs.onclosetag(this.sectionStart, this.index);
+      this.sectionStart = -1;
+      this.state = 10;
+      this.stateAfterClosingTagName(c);
+    }
+  }
+  stateAfterClosingTagName(c) {
+    if (c === 62) {
+      this.state = 1;
+      this.sectionStart = this.index + 1;
+    }
+  }
+  stateBeforeAttrName(c) {
+    if (c === 62) {
+      this.cbs.onopentagend(this.index);
+      if (this.inRCDATA) {
+        this.state = 32;
+      } else {
+        this.state = 1;
+      }
+      this.sectionStart = this.index + 1;
+    } else if (c === 47) {
+      this.state = 7;
+      if (this.peek() !== 62) {
+        this.cbs.onerr(22, this.index);
+      }
+    } else if (c === 60 && this.peek() === 47) {
+      this.cbs.onopentagend(this.index);
+      this.state = 5;
+      this.sectionStart = this.index;
+    } else if (!isWhitespace(c)) {
+      if (c === 61) {
+        this.cbs.onerr(
+          19,
+          this.index
+        );
+      }
+      this.handleAttrStart(c);
+    }
+  }
+  handleAttrStart(c) {
+    if (c === 118 && this.peek() === 45) {
+      this.state = 13;
+      this.sectionStart = this.index;
+    } else if (c === 46 || c === 58 || c === 64 || c === 35) {
+      this.cbs.ondirname(this.index, this.index + 1);
+      this.state = 14;
+      this.sectionStart = this.index + 1;
+    } else {
+      this.state = 12;
+      this.sectionStart = this.index;
+    }
+  }
+  stateInSelfClosingTag(c) {
+    if (c === 62) {
+      this.cbs.onselfclosingtag(this.index);
+      this.state = 1;
+      this.sectionStart = this.index + 1;
+      this.inRCDATA = false;
+    } else if (!isWhitespace(c)) {
+      this.state = 11;
+      this.stateBeforeAttrName(c);
+    }
+  }
+  stateInAttrName(c) {
+    if (c === 61 || isEndOfTagSection(c)) {
+      this.cbs.onattribname(this.sectionStart, this.index);
+      this.handleAttrNameEnd(c);
+    } else if (c === 34 || c === 39 || c === 60) {
+      this.cbs.onerr(
+        17,
+        this.index
+      );
+    }
+  }
+  stateInDirName(c) {
+    if (c === 61 || isEndOfTagSection(c)) {
+      this.cbs.ondirname(this.sectionStart, this.index);
+      this.handleAttrNameEnd(c);
+    } else if (c === 58) {
+      this.cbs.ondirname(this.sectionStart, this.index);
+      this.state = 14;
+      this.sectionStart = this.index + 1;
+    } else if (c === 46) {
+      this.cbs.ondirname(this.sectionStart, this.index);
+      this.state = 16;
+      this.sectionStart = this.index + 1;
+    }
+  }
+  stateInDirArg(c) {
+    if (c === 61 || isEndOfTagSection(c)) {
+      this.cbs.ondirarg(this.sectionStart, this.index);
+      this.handleAttrNameEnd(c);
+    } else if (c === 91) {
+      this.state = 15;
+    } else if (c === 46) {
+      this.cbs.ondirarg(this.sectionStart, this.index);
+      this.state = 16;
+      this.sectionStart = this.index + 1;
+    }
+  }
+  stateInDynamicDirArg(c) {
+    if (c === 93) {
+      this.state = 14;
+    } else if (c === 61 || isEndOfTagSection(c)) {
+      this.cbs.ondirarg(this.sectionStart, this.index + 1);
+      this.handleAttrNameEnd(c);
+      {
+        this.cbs.onerr(
+          27,
+          this.index
+        );
+      }
+    }
+  }
+  stateInDirModifier(c) {
+    if (c === 61 || isEndOfTagSection(c)) {
+      this.cbs.ondirmodifier(this.sectionStart, this.index);
+      this.handleAttrNameEnd(c);
+    } else if (c === 46) {
+      this.cbs.ondirmodifier(this.sectionStart, this.index);
+      this.sectionStart = this.index + 1;
+    }
+  }
+  handleAttrNameEnd(c) {
+    this.sectionStart = this.index;
+    this.state = 17;
+    this.cbs.onattribnameend(this.index);
+    this.stateAfterAttrName(c);
+  }
+  stateAfterAttrName(c) {
+    if (c === 61) {
+      this.state = 18;
+    } else if (c === 47 || c === 62) {
+      this.cbs.onattribend(0, this.sectionStart);
+      this.sectionStart = -1;
+      this.state = 11;
+      this.stateBeforeAttrName(c);
+    } else if (!isWhitespace(c)) {
+      this.cbs.onattribend(0, this.sectionStart);
+      this.handleAttrStart(c);
+    }
+  }
+  stateBeforeAttrValue(c) {
+    if (c === 34) {
+      this.state = 19;
+      this.sectionStart = this.index + 1;
+    } else if (c === 39) {
+      this.state = 20;
+      this.sectionStart = this.index + 1;
+    } else if (!isWhitespace(c)) {
+      this.sectionStart = this.index;
+      this.state = 21;
+      this.stateInAttrValueNoQuotes(c);
+    }
+  }
+  handleInAttrValue(c, quote) {
+    if (c === quote || false) {
+      this.cbs.onattribdata(this.sectionStart, this.index);
+      this.sectionStart = -1;
+      this.cbs.onattribend(
+        quote === 34 ? 3 : 2,
+        this.index + 1
+      );
+      this.state = 11;
+    } else if (c === 38) {
+      this.startEntity();
+    }
+  }
+  stateInAttrValueDoubleQuotes(c) {
+    this.handleInAttrValue(c, 34);
+  }
+  stateInAttrValueSingleQuotes(c) {
+    this.handleInAttrValue(c, 39);
+  }
+  stateInAttrValueNoQuotes(c) {
+    if (isWhitespace(c) || c === 62) {
+      this.cbs.onattribdata(this.sectionStart, this.index);
+      this.sectionStart = -1;
+      this.cbs.onattribend(1, this.index);
+      this.state = 11;
+      this.stateBeforeAttrName(c);
+    } else if (c === 34 || c === 39 || c === 60 || c === 61 || c === 96) {
+      this.cbs.onerr(
+        18,
+        this.index
+      );
+    } else if (c === 38) {
+      this.startEntity();
+    }
+  }
+  stateBeforeDeclaration(c) {
+    if (c === 91) {
+      this.state = 26;
+      this.sequenceIndex = 0;
+    } else {
+      this.state = c === 45 ? 25 : 23;
+    }
+  }
+  stateInDeclaration(c) {
+    if (c === 62 || this.fastForwardTo(62)) {
+      this.state = 1;
+      this.sectionStart = this.index + 1;
+    }
+  }
+  stateInProcessingInstruction(c) {
+    if (c === 62 || this.fastForwardTo(62)) {
+      this.cbs.onprocessinginstruction(this.sectionStart, this.index);
+      this.state = 1;
+      this.sectionStart = this.index + 1;
+    }
+  }
+  stateBeforeComment(c) {
+    if (c === 45) {
+      this.state = 28;
+      this.currentSequence = Sequences.CommentEnd;
+      this.sequenceIndex = 2;
+      this.sectionStart = this.index + 1;
+    } else {
+      this.state = 23;
+    }
+  }
+  stateInSpecialComment(c) {
+    if (c === 62 || this.fastForwardTo(62)) {
+      this.cbs.oncomment(this.sectionStart, this.index);
+      this.state = 1;
+      this.sectionStart = this.index + 1;
+    }
+  }
+  stateBeforeSpecialS(c) {
+    if (c === Sequences.ScriptEnd[3]) {
+      this.startSpecial(Sequences.ScriptEnd, 4);
+    } else if (c === Sequences.StyleEnd[3]) {
+      this.startSpecial(Sequences.StyleEnd, 4);
+    } else {
+      this.state = 6;
+      this.stateInTagName(c);
+    }
+  }
+  stateBeforeSpecialT(c) {
+    if (c === Sequences.TitleEnd[3]) {
+      this.startSpecial(Sequences.TitleEnd, 4);
+    } else if (c === Sequences.TextareaEnd[3]) {
+      this.startSpecial(Sequences.TextareaEnd, 4);
+    } else {
+      this.state = 6;
+      this.stateInTagName(c);
+    }
+  }
+  startEntity() {
+    {
+      this.baseState = this.state;
+      this.state = 33;
+      this.entityStart = this.index;
+      this.entityDecoder.startEntity(
+        this.baseState === 1 || this.baseState === 32 ? decode_js.DecodingMode.Legacy : decode_js.DecodingMode.Attribute
+      );
+    }
+  }
+  stateInEntity() {
+    {
+      const length = this.entityDecoder.write(this.buffer, this.index);
+      if (length >= 0) {
+        this.state = this.baseState;
+        if (length === 0) {
+          this.index = this.entityStart;
+        }
+      } else {
+        this.index = this.buffer.length - 1;
+      }
+    }
+  }
+  /**
+   * Iterates through the buffer, calling the function corresponding to the current state.
+   *
+   * States that are more likely to be hit are higher up, as a performance improvement.
+   */
+  parse(input) {
+    this.buffer = input;
+    while (this.index < this.buffer.length) {
+      const c = this.buffer.charCodeAt(this.index);
+      if (c === 10) {
+        this.newlines.push(this.index);
+      }
+      switch (this.state) {
+        case 1: {
+          this.stateText(c);
+          break;
+        }
+        case 2: {
+          this.stateInterpolationOpen(c);
+          break;
+        }
+        case 3: {
+          this.stateInterpolation(c);
+          break;
+        }
+        case 4: {
+          this.stateInterpolationClose(c);
+          break;
+        }
+        case 31: {
+          this.stateSpecialStartSequence(c);
+          break;
+        }
+        case 32: {
+          this.stateInRCDATA(c);
+          break;
+        }
+        case 26: {
+          this.stateCDATASequence(c);
+          break;
+        }
+        case 19: {
+          this.stateInAttrValueDoubleQuotes(c);
+          break;
+        }
+        case 12: {
+          this.stateInAttrName(c);
+          break;
+        }
+        case 13: {
+          this.stateInDirName(c);
+          break;
+        }
+        case 14: {
+          this.stateInDirArg(c);
+          break;
+        }
+        case 15: {
+          this.stateInDynamicDirArg(c);
+          break;
+        }
+        case 16: {
+          this.stateInDirModifier(c);
+          break;
+        }
+        case 28: {
+          this.stateInCommentLike(c);
+          break;
+        }
+        case 27: {
+          this.stateInSpecialComment(c);
+          break;
+        }
+        case 11: {
+          this.stateBeforeAttrName(c);
+          break;
+        }
+        case 6: {
+          this.stateInTagName(c);
+          break;
+        }
+        case 34: {
+          this.stateInSFCRootTagName(c);
+          break;
+        }
+        case 9: {
+          this.stateInClosingTagName(c);
+          break;
+        }
+        case 5: {
+          this.stateBeforeTagName(c);
+          break;
+        }
+        case 17: {
+          this.stateAfterAttrName(c);
+          break;
+        }
+        case 20: {
+          this.stateInAttrValueSingleQuotes(c);
+          break;
+        }
+        case 18: {
+          this.stateBeforeAttrValue(c);
+          break;
+        }
+        case 8: {
+          this.stateBeforeClosingTagName(c);
+          break;
+        }
+        case 10: {
+          this.stateAfterClosingTagName(c);
+          break;
+        }
+        case 29: {
+          this.stateBeforeSpecialS(c);
+          break;
+        }
+        case 30: {
+          this.stateBeforeSpecialT(c);
+          break;
+        }
+        case 21: {
+          this.stateInAttrValueNoQuotes(c);
+          break;
+        }
+        case 7: {
+          this.stateInSelfClosingTag(c);
+          break;
+        }
+        case 23: {
+          this.stateInDeclaration(c);
+          break;
+        }
+        case 22: {
+          this.stateBeforeDeclaration(c);
+          break;
+        }
+        case 25: {
+          this.stateBeforeComment(c);
+          break;
+        }
+        case 24: {
+          this.stateInProcessingInstruction(c);
+          break;
+        }
+        case 33: {
+          this.stateInEntity();
+          break;
+        }
+      }
+      this.index++;
+    }
+    this.cleanup();
+    this.finish();
+  }
+  /**
+   * Remove data that has already been consumed from the buffer.
+   */
+  cleanup() {
+    if (this.sectionStart !== this.index) {
+      if (this.state === 1 || this.state === 32 && this.sequenceIndex === 0) {
+        this.cbs.ontext(this.sectionStart, this.index);
+        this.sectionStart = this.index;
+      } else if (this.state === 19 || this.state === 20 || this.state === 21) {
+        this.cbs.onattribdata(this.sectionStart, this.index);
+        this.sectionStart = this.index;
+      }
+    }
+  }
+  finish() {
+    if (this.state === 33) {
+      this.entityDecoder.end();
+      this.state = this.baseState;
+    }
+    this.handleTrailingData();
+    this.cbs.onend();
+  }
+  /** Handle any trailing data. */
+  handleTrailingData() {
+    const endIndex = this.buffer.length;
+    if (this.sectionStart >= endIndex) {
+      return;
+    }
+    if (this.state === 28) {
+      if (this.currentSequence === Sequences.CdataEnd) {
+        this.cbs.oncdata(this.sectionStart, endIndex);
+      } else {
+        this.cbs.oncomment(this.sectionStart, endIndex);
+      }
+    } else if (this.state === 6 || this.state === 11 || this.state === 18 || this.state === 17 || this.state === 12 || this.state === 13 || this.state === 14 || this.state === 15 || this.state === 16 || this.state === 20 || this.state === 19 || this.state === 21 || this.state === 9) ; else {
+      this.cbs.ontext(this.sectionStart, endIndex);
+    }
+  }
+  emitCodePoint(cp, consumed) {
+    {
+      if (this.baseState !== 1 && this.baseState !== 32) {
+        if (this.sectionStart < this.entityStart) {
+          this.cbs.onattribdata(this.sectionStart, this.entityStart);
+        }
+        this.sectionStart = this.entityStart + consumed;
+        this.index = this.sectionStart - 1;
+        this.cbs.onattribentity(
+          decode_js.fromCodePoint(cp),
+          this.entityStart,
+          this.sectionStart
+        );
+      } else {
+        if (this.sectionStart < this.entityStart) {
+          this.cbs.ontext(this.sectionStart, this.entityStart);
+        }
+        this.sectionStart = this.entityStart + consumed;
+        this.index = this.sectionStart - 1;
+        this.cbs.ontextentity(
+          decode_js.fromCodePoint(cp),
+          this.entityStart,
+          this.sectionStart
+        );
+      }
+    }
+  }
+}
+
+const CompilerDeprecationTypes = {
+  "COMPILER_IS_ON_ELEMENT": "COMPILER_IS_ON_ELEMENT",
+  "COMPILER_V_BIND_SYNC": "COMPILER_V_BIND_SYNC",
+  "COMPILER_V_BIND_OBJECT_ORDER": "COMPILER_V_BIND_OBJECT_ORDER",
+  "COMPILER_V_ON_NATIVE": "COMPILER_V_ON_NATIVE",
+  "COMPILER_V_IF_V_FOR_PRECEDENCE": "COMPILER_V_IF_V_FOR_PRECEDENCE",
+  "COMPILER_NATIVE_TEMPLATE": "COMPILER_NATIVE_TEMPLATE",
+  "COMPILER_INLINE_TEMPLATE": "COMPILER_INLINE_TEMPLATE",
+  "COMPILER_FILTERS": "COMPILER_FILTERS"
+};
+const deprecationData = {
+  ["COMPILER_IS_ON_ELEMENT"]: {
+    message: `Platform-native elements with "is" prop will no longer be treated as components in Vue 3 unless the "is" value is explicitly prefixed with "vue:".`,
+    link: `https://v3-migration.vuejs.org/breaking-changes/custom-elements-interop.html`
+  },
+  ["COMPILER_V_BIND_SYNC"]: {
+    message: (key) => `.sync modifier for v-bind has been removed. Use v-model with argument instead. \`v-bind:${key}.sync\` should be changed to \`v-model:${key}\`.`,
+    link: `https://v3-migration.vuejs.org/breaking-changes/v-model.html`
+  },
+  ["COMPILER_V_BIND_OBJECT_ORDER"]: {
+    message: `v-bind="obj" usage is now order sensitive and behaves like JavaScript object spread: it will now overwrite an existing non-mergeable attribute that appears before v-bind in the case of conflict. To retain 2.x behavior, move v-bind to make it the first attribute. You can also suppress this warning if the usage is intended.`,
+    link: `https://v3-migration.vuejs.org/breaking-changes/v-bind.html`
+  },
+  ["COMPILER_V_ON_NATIVE"]: {
+    message: `.native modifier for v-on has been removed as is no longer necessary.`,
+    link: `https://v3-migration.vuejs.org/breaking-changes/v-on-native-modifier-removed.html`
+  },
+  ["COMPILER_V_IF_V_FOR_PRECEDENCE"]: {
+    message: `v-if / v-for precedence when used on the same element has changed in Vue 3: v-if now takes higher precedence and will no longer have access to v-for scope variables. It is best to avoid the ambiguity with <template> tags or use a computed property that filters v-for data source.`,
+    link: `https://v3-migration.vuejs.org/breaking-changes/v-if-v-for.html`
+  },
+  ["COMPILER_NATIVE_TEMPLATE"]: {
+    message: `<template> with no special directives will render as a native template element instead of its inner content in Vue 3.`
+  },
+  ["COMPILER_INLINE_TEMPLATE"]: {
+    message: `"inline-template" has been removed in Vue 3.`,
+    link: `https://v3-migration.vuejs.org/breaking-changes/inline-template-attribute.html`
+  },
+  ["COMPILER_FILTERS"]: {
+    message: `filters have been removed in Vue 3. The "|" symbol will be treated as native JavaScript bitwise OR operator. Use method calls or computed properties instead.`,
+    link: `https://v3-migration.vuejs.org/breaking-changes/filters.html`
+  }
+};
+function getCompatValue(key, { compatConfig }) {
+  const value = compatConfig && compatConfig[key];
+  if (key === "MODE") {
+    return value || 3;
+  } else {
+    return value;
+  }
+}
+function isCompatEnabled(key, context) {
+  const mode = getCompatValue("MODE", context);
+  const value = getCompatValue(key, context);
+  return mode === 3 ? value === true : value !== false;
+}
+function checkCompatEnabled(key, context, loc, ...args) {
+  const enabled = isCompatEnabled(key, context);
+  return enabled;
+}
+function warnDeprecation(key, context, loc, ...args) {
+  const val = getCompatValue(key, context);
+  if (val === "suppress-warning") {
+    return;
+  }
+  const { message, link } = deprecationData[key];
+  const msg = `(deprecation ${key}) ${typeof message === "function" ? message(...args) : message}${link ? `
+  Details: ${link}` : ``}`;
+  const err = new SyntaxError(msg);
+  err.code = key;
+  if (loc)
+    err.loc = loc;
+  context.onWarn(err);
+}
+
+function defaultOnError(error) {
+  throw error;
+}
+function defaultOnWarn(msg) {
+}
+function createCompilerError(code, loc, messages, additionalMessage) {
+  const msg = (messages || errorMessages)[code] + (additionalMessage || ``) ;
+  const error = new SyntaxError(String(msg));
+  error.code = code;
+  error.loc = loc;
+  return error;
+}
+const ErrorCodes = {
+  "ABRUPT_CLOSING_OF_EMPTY_COMMENT": 0,
+  "0": "ABRUPT_CLOSING_OF_EMPTY_COMMENT",
+  "CDATA_IN_HTML_CONTENT": 1,
+  "1": "CDATA_IN_HTML_CONTENT",
+  "DUPLICATE_ATTRIBUTE": 2,
+  "2": "DUPLICATE_ATTRIBUTE",
+  "END_TAG_WITH_ATTRIBUTES": 3,
+  "3": "END_TAG_WITH_ATTRIBUTES",
+  "END_TAG_WITH_TRAILING_SOLIDUS": 4,
+  "4": "END_TAG_WITH_TRAILING_SOLIDUS",
+  "EOF_BEFORE_TAG_NAME": 5,
+  "5": "EOF_BEFORE_TAG_NAME",
+  "EOF_IN_CDATA": 6,
+  "6": "EOF_IN_CDATA",
+  "EOF_IN_COMMENT": 7,
+  "7": "EOF_IN_COMMENT",
+  "EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT": 8,
+  "8": "EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT",
+  "EOF_IN_TAG": 9,
+  "9": "EOF_IN_TAG",
+  "INCORRECTLY_CLOSED_COMMENT": 10,
+  "10": "INCORRECTLY_CLOSED_COMMENT",
+  "INCORRECTLY_OPENED_COMMENT": 11,
+  "11": "INCORRECTLY_OPENED_COMMENT",
+  "INVALID_FIRST_CHARACTER_OF_TAG_NAME": 12,
+  "12": "INVALID_FIRST_CHARACTER_OF_TAG_NAME",
+  "MISSING_ATTRIBUTE_VALUE": 13,
+  "13": "MISSING_ATTRIBUTE_VALUE",
+  "MISSING_END_TAG_NAME": 14,
+  "14": "MISSING_END_TAG_NAME",
+  "MISSING_WHITESPACE_BETWEEN_ATTRIBUTES": 15,
+  "15": "MISSING_WHITESPACE_BETWEEN_ATTRIBUTES",
+  "NESTED_COMMENT": 16,
+  "16": "NESTED_COMMENT",
+  "UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME": 17,
+  "17": "UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME",
+  "UNEXPECTED_CHARACTER_IN_UNQUOTED_ATTRIBUTE_VALUE": 18,
+  "18": "UNEXPECTED_CHARACTER_IN_UNQUOTED_ATTRIBUTE_VALUE",
+  "UNEXPECTED_EQUALS_SIGN_BEFORE_ATTRIBUTE_NAME": 19,
+  "19": "UNEXPECTED_EQUALS_SIGN_BEFORE_ATTRIBUTE_NAME",
+  "UNEXPECTED_NULL_CHARACTER": 20,
+  "20": "UNEXPECTED_NULL_CHARACTER",
+  "UNEXPECTED_QUESTION_MARK_INSTEAD_OF_TAG_NAME": 21,
+  "21": "UNEXPECTED_QUESTION_MARK_INSTEAD_OF_TAG_NAME",
+  "UNEXPECTED_SOLIDUS_IN_TAG": 22,
+  "22": "UNEXPECTED_SOLIDUS_IN_TAG",
+  "X_INVALID_END_TAG": 23,
+  "23": "X_INVALID_END_TAG",
+  "X_MISSING_END_TAG": 24,
+  "24": "X_MISSING_END_TAG",
+  "X_MISSING_INTERPOLATION_END": 25,
+  "25": "X_MISSING_INTERPOLATION_END",
+  "X_MISSING_DIRECTIVE_NAME": 26,
+  "26": "X_MISSING_DIRECTIVE_NAME",
+  "X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END": 27,
+  "27": "X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END",
+  "X_V_IF_NO_EXPRESSION": 28,
+  "28": "X_V_IF_NO_EXPRESSION",
+  "X_V_IF_SAME_KEY": 29,
+  "29": "X_V_IF_SAME_KEY",
+  "X_V_ELSE_NO_ADJACENT_IF": 30,
+  "30": "X_V_ELSE_NO_ADJACENT_IF",
+  "X_V_FOR_NO_EXPRESSION": 31,
+  "31": "X_V_FOR_NO_EXPRESSION",
+  "X_V_FOR_MALFORMED_EXPRESSION": 32,
+  "32": "X_V_FOR_MALFORMED_EXPRESSION",
+  "X_V_FOR_TEMPLATE_KEY_PLACEMENT": 33,
+  "33": "X_V_FOR_TEMPLATE_KEY_PLACEMENT",
+  "X_V_BIND_NO_EXPRESSION": 34,
+  "34": "X_V_BIND_NO_EXPRESSION",
+  "X_V_ON_NO_EXPRESSION": 35,
+  "35": "X_V_ON_NO_EXPRESSION",
+  "X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET": 36,
+  "36": "X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET",
+  "X_V_SLOT_MIXED_SLOT_USAGE": 37,
+  "37": "X_V_SLOT_MIXED_SLOT_USAGE",
+  "X_V_SLOT_DUPLICATE_SLOT_NAMES": 38,
+  "38": "X_V_SLOT_DUPLICATE_SLOT_NAMES",
+  "X_V_SLOT_EXTRANEOUS_DEFAULT_SLOT_CHILDREN": 39,
+  "39": "X_V_SLOT_EXTRANEOUS_DEFAULT_SLOT_CHILDREN",
+  "X_V_SLOT_MISPLACED": 40,
+  "40": "X_V_SLOT_MISPLACED",
+  "X_V_MODEL_NO_EXPRESSION": 41,
+  "41": "X_V_MODEL_NO_EXPRESSION",
+  "X_V_MODEL_MALFORMED_EXPRESSION": 42,
+  "42": "X_V_MODEL_MALFORMED_EXPRESSION",
+  "X_V_MODEL_ON_SCOPE_VARIABLE": 43,
+  "43": "X_V_MODEL_ON_SCOPE_VARIABLE",
+  "X_V_MODEL_ON_PROPS": 44,
+  "44": "X_V_MODEL_ON_PROPS",
+  "X_INVALID_EXPRESSION": 45,
+  "45": "X_INVALID_EXPRESSION",
+  "X_KEEP_ALIVE_INVALID_CHILDREN": 46,
+  "46": "X_KEEP_ALIVE_INVALID_CHILDREN",
+  "X_PREFIX_ID_NOT_SUPPORTED": 47,
+  "47": "X_PREFIX_ID_NOT_SUPPORTED",
+  "X_MODULE_MODE_NOT_SUPPORTED": 48,
+  "48": "X_MODULE_MODE_NOT_SUPPORTED",
+  "X_CACHE_HANDLER_NOT_SUPPORTED": 49,
+  "49": "X_CACHE_HANDLER_NOT_SUPPORTED",
+  "X_SCOPE_ID_NOT_SUPPORTED": 50,
+  "50": "X_SCOPE_ID_NOT_SUPPORTED",
+  "X_VNODE_HOOKS": 51,
+  "51": "X_VNODE_HOOKS",
+  "X_V_BIND_INVALID_SAME_NAME_ARGUMENT": 52,
+  "52": "X_V_BIND_INVALID_SAME_NAME_ARGUMENT",
+  "__EXTEND_POINT__": 53,
+  "53": "__EXTEND_POINT__"
+};
+const errorMessages = {
+  // parse errors
+  [0]: "Illegal comment.",
+  [1]: "CDATA section is allowed only in XML context.",
+  [2]: "Duplicate attribute.",
+  [3]: "End tag cannot have attributes.",
+  [4]: "Illegal '/' in tags.",
+  [5]: "Unexpected EOF in tag.",
+  [6]: "Unexpected EOF in CDATA section.",
+  [7]: "Unexpected EOF in comment.",
+  [8]: "Unexpected EOF in script.",
+  [9]: "Unexpected EOF in tag.",
+  [10]: "Incorrectly closed comment.",
+  [11]: "Incorrectly opened comment.",
+  [12]: "Illegal tag name. Use '&lt;' to print '<'.",
+  [13]: "Attribute value was expected.",
+  [14]: "End tag name was expected.",
+  [15]: "Whitespace was expected.",
+  [16]: "Unexpected '<!--' in comment.",
+  [17]: `Attribute name cannot contain U+0022 ("), U+0027 ('), and U+003C (<).`,
+  [18]: "Unquoted attribute value cannot contain U+0022 (\"), U+0027 ('), U+003C (<), U+003D (=), and U+0060 (`).",
+  [19]: "Attribute name cannot start with '='.",
+  [21]: "'<?' is allowed only in XML context.",
+  [20]: `Unexpected null character.`,
+  [22]: "Illegal '/' in tags.",
+  // Vue-specific parse errors
+  [23]: "Invalid end tag.",
+  [24]: "Element is missing end tag.",
+  [25]: "Interpolation end sign was not found.",
+  [27]: "End bracket for dynamic directive argument was not found. Note that dynamic directive argument cannot contain spaces.",
+  [26]: "Legal directive name was expected.",
+  // transform errors
+  [28]: `v-if/v-else-if is missing expression.`,
+  [29]: `v-if/else branches must use unique keys.`,
+  [30]: `v-else/v-else-if has no adjacent v-if or v-else-if.`,
+  [31]: `v-for is missing expression.`,
+  [32]: `v-for has invalid expression.`,
+  [33]: `<template v-for> key should be placed on the <template> tag.`,
+  [34]: `v-bind is missing expression.`,
+  [52]: `v-bind with same-name shorthand only allows static argument.`,
+  [35]: `v-on is missing expression.`,
+  [36]: `Unexpected custom directive on <slot> outlet.`,
+  [37]: `Mixed v-slot usage on both the component and nested <template>. When there are multiple named slots, all slots should use <template> syntax to avoid scope ambiguity.`,
+  [38]: `Duplicate slot names found. `,
+  [39]: `Extraneous children found when component already has explicitly named default slot. These children will be ignored.`,
+  [40]: `v-slot can only be used on components or <template> tags.`,
+  [41]: `v-model is missing expression.`,
+  [42]: `v-model value must be a valid JavaScript member expression.`,
+  [43]: `v-model cannot be used on v-for or v-slot scope variables because they are not writable.`,
+  [44]: `v-model cannot be used on a prop, because local prop bindings are not writable.
+Use a v-bind binding combined with a v-on listener that emits update:x event instead.`,
+  [45]: `Error parsing JavaScript expression: `,
+  [46]: `<KeepAlive> expects exactly one child component.`,
+  [51]: `@vnode-* hooks in templates are no longer supported. Use the vue: prefix instead. For example, @vnode-mounted should be changed to @vue:mounted. @vnode-* hooks support has been removed in 3.4.`,
+  // generic errors
+  [47]: `"prefixIdentifiers" option is not supported in this build of compiler.`,
+  [48]: `ES module mode is not supported in this build of compiler.`,
+  [49]: `"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.`,
+  [50]: `"scopeId" option is only supported in module mode.`,
+  // just to fulfill types
+  [53]: ``
+};
+
+function walkIdentifiers(root, onIdentifier, includeAll = false, parentStack = [], knownIds = /* @__PURE__ */ Object.create(null)) {
+  const rootExp = root.type === "Program" ? root.body[0].type === "ExpressionStatement" && root.body[0].expression : root;
+  estreeWalker.walk(root, {
+    enter(node, parent) {
+      parent && parentStack.push(parent);
+      if (parent && parent.type.startsWith("TS") && !TS_NODE_TYPES.includes(parent.type)) {
+        return this.skip();
+      }
+      if (node.type === "Identifier") {
+        const isLocal = !!knownIds[node.name];
+        const isRefed = isReferencedIdentifier(node, parent, parentStack);
+        if (includeAll || isRefed && !isLocal) {
+          onIdentifier(node, parent, parentStack, isRefed, isLocal);
+        }
+      } else if (node.type === "ObjectProperty" && (parent == null ? void 0 : parent.type) === "ObjectPattern") {
+        node.inPattern = true;
+      } else if (isFunctionType(node)) {
+        if (node.scopeIds) {
+          node.scopeIds.forEach((id) => markKnownIds(id, knownIds));
+        } else {
+          walkFunctionParams(
+            node,
+            (id) => markScopeIdentifier(node, id, knownIds)
+          );
+        }
+      } else if (node.type === "BlockStatement") {
+        if (node.scopeIds) {
+          node.scopeIds.forEach((id) => markKnownIds(id, knownIds));
+        } else {
+          walkBlockDeclarations(
+            node,
+            (id) => markScopeIdentifier(node, id, knownIds)
+          );
+        }
+      }
+    },
+    leave(node, parent) {
+      parent && parentStack.pop();
+      if (node !== rootExp && node.scopeIds) {
+        for (const id of node.scopeIds) {
+          knownIds[id]--;
+          if (knownIds[id] === 0) {
+            delete knownIds[id];
+          }
+        }
+      }
+    }
+  });
+}
+function isReferencedIdentifier(id, parent, parentStack) {
+  if (!parent) {
+    return true;
+  }
+  if (id.name === "arguments") {
+    return false;
+  }
+  if (isReferenced(id, parent)) {
+    return true;
+  }
+  switch (parent.type) {
+    case "AssignmentExpression":
+    case "AssignmentPattern":
+      return true;
+    case "ObjectPattern":
+    case "ArrayPattern":
+      return isInDestructureAssignment(parent, parentStack);
+  }
+  return false;
+}
+function isInDestructureAssignment(parent, parentStack) {
+  if (parent && (parent.type === "ObjectProperty" || parent.type === "ArrayPattern")) {
+    let i = parentStack.length;
+    while (i--) {
+      const p = parentStack[i];
+      if (p.type === "AssignmentExpression") {
+        return true;
+      } else if (p.type !== "ObjectProperty" && !p.type.endsWith("Pattern")) {
+        break;
+      }
+    }
+  }
+  return false;
+}
+function isInNewExpression(parentStack) {
+  let i = parentStack.length;
+  while (i--) {
+    const p = parentStack[i];
+    if (p.type === "NewExpression") {
+      return true;
+    } else if (p.type !== "MemberExpression") {
+      break;
+    }
+  }
+  return false;
+}
+function walkFunctionParams(node, onIdent) {
+  for (const p of node.params) {
+    for (const id of extractIdentifiers(p)) {
+      onIdent(id);
+    }
+  }
+}
+function walkBlockDeclarations(block, onIdent) {
+  for (const stmt of block.body) {
+    if (stmt.type === "VariableDeclaration") {
+      if (stmt.declare)
+        continue;
+      for (const decl of stmt.declarations) {
+        for (const id of extractIdentifiers(decl.id)) {
+          onIdent(id);
+        }
+      }
+    } else if (stmt.type === "FunctionDeclaration" || stmt.type === "ClassDeclaration") {
+      if (stmt.declare || !stmt.id)
+        continue;
+      onIdent(stmt.id);
+    } else if (stmt.type === "ForOfStatement" || stmt.type === "ForInStatement" || stmt.type === "ForStatement") {
+      const variable = stmt.type === "ForStatement" ? stmt.init : stmt.left;
+      if (variable && variable.type === "VariableDeclaration") {
+        for (const decl of variable.declarations) {
+          for (const id of extractIdentifiers(decl.id)) {
+            onIdent(id);
+          }
+        }
+      }
+    }
+  }
+}
+function extractIdentifiers(param, nodes = []) {
+  switch (param.type) {
+    case "Identifier":
+      nodes.push(param);
+      break;
+    case "MemberExpression":
+      let object = param;
+      while (object.type === "MemberExpression") {
+        object = object.object;
+      }
+      nodes.push(object);
+      break;
+    case "ObjectPattern":
+      for (const prop of param.properties) {
+        if (prop.type === "RestElement") {
+          extractIdentifiers(prop.argument, nodes);
+        } else {
+          extractIdentifiers(prop.value, nodes);
+        }
+      }
+      break;
+    case "ArrayPattern":
+      param.elements.forEach((element) => {
+        if (element)
+          extractIdentifiers(element, nodes);
+      });
+      break;
+    case "RestElement":
+      extractIdentifiers(param.argument, nodes);
+      break;
+    case "AssignmentPattern":
+      extractIdentifiers(param.left, nodes);
+      break;
+  }
+  return nodes;
+}
+function markKnownIds(name, knownIds) {
+  if (name in knownIds) {
+    knownIds[name]++;
+  } else {
+    knownIds[name] = 1;
+  }
+}
+function markScopeIdentifier(node, child, knownIds) {
+  const { name } = child;
+  if (node.scopeIds && node.scopeIds.has(name)) {
+    return;
+  }
+  markKnownIds(name, knownIds);
+  (node.scopeIds || (node.scopeIds = /* @__PURE__ */ new Set())).add(name);
+}
+const isFunctionType = (node) => {
+  return /Function(?:Expression|Declaration)$|Method$/.test(node.type);
+};
+const isStaticProperty = (node) => node && (node.type === "ObjectProperty" || node.type === "ObjectMethod") && !node.computed;
+const isStaticPropertyKey = (node, parent) => isStaticProperty(parent) && parent.key === node;
+function isReferenced(node, parent, grandparent) {
+  switch (parent.type) {
+    case "MemberExpression":
+    case "OptionalMemberExpression":
+      if (parent.property === node) {
+        return !!parent.computed;
+      }
+      return parent.object === node;
+    case "JSXMemberExpression":
+      return parent.object === node;
+    case "VariableDeclarator":
+      return parent.init === node;
+    case "ArrowFunctionExpression":
+      return parent.body === node;
+    case "PrivateName":
+      return false;
+    case "ClassMethod":
+    case "ClassPrivateMethod":
+    case "ObjectMethod":
+      if (parent.key === node) {
+        return !!parent.computed;
+      }
+      return false;
+    case "ObjectProperty":
+      if (parent.key === node) {
+        return !!parent.computed;
+      }
+      return !grandparent ;
+    case "ClassProperty":
+      if (parent.key === node) {
+        return !!parent.computed;
+      }
+      return true;
+    case "ClassPrivateProperty":
+      return parent.key !== node;
+    case "ClassDeclaration":
+    case "ClassExpression":
+      return parent.superClass === node;
+    case "AssignmentExpression":
+      return parent.right === node;
+    case "AssignmentPattern":
+      return parent.right === node;
+    case "LabeledStatement":
+      return false;
+    case "CatchClause":
+      return false;
+    case "RestElement":
+      return false;
+    case "BreakStatement":
+    case "ContinueStatement":
+      return false;
+    case "FunctionDeclaration":
+    case "FunctionExpression":
+      return false;
+    case "ExportNamespaceSpecifier":
+    case "ExportDefaultSpecifier":
+      return false;
+    case "ExportSpecifier":
+      return parent.local === node;
+    case "ImportDefaultSpecifier":
+    case "ImportNamespaceSpecifier":
+    case "ImportSpecifier":
+      return false;
+    case "ImportAttribute":
+      return false;
+    case "JSXAttribute":
+      return false;
+    case "ObjectPattern":
+    case "ArrayPattern":
+      return false;
+    case "MetaProperty":
+      return false;
+    case "ObjectTypeProperty":
+      return parent.key !== node;
+    case "TSEnumMember":
+      return parent.id !== node;
+    case "TSPropertySignature":
+      if (parent.key === node) {
+        return !!parent.computed;
+      }
+      return true;
+  }
+  return true;
+}
+const TS_NODE_TYPES = [
+  "TSAsExpression",
+  // foo as number
+  "TSTypeAssertion",
+  // (<number>foo)
+  "TSNonNullExpression",
+  // foo!
+  "TSInstantiationExpression",
+  // foo<string>
+  "TSSatisfiesExpression"
+  // foo satisfies T
+];
+function unwrapTSNode(node) {
+  if (TS_NODE_TYPES.includes(node.type)) {
+    return unwrapTSNode(node.expression);
+  } else {
+    return node;
+  }
+}
+
+const isStaticExp = (p) => p.type === 4 && p.isStatic;
+function isCoreComponent(tag) {
+  switch (tag) {
+    case "Teleport":
+    case "teleport":
+      return TELEPORT;
+    case "Suspense":
+    case "suspense":
+      return SUSPENSE;
+    case "KeepAlive":
+    case "keep-alive":
+      return KEEP_ALIVE;
+    case "BaseTransition":
+    case "base-transition":
+      return BASE_TRANSITION;
+  }
+}
+const nonIdentifierRE = /^\d|[^\$\w]/;
+const isSimpleIdentifier = (name) => !nonIdentifierRE.test(name);
+const validFirstIdentCharRE = /[A-Za-z_$\xA0-\uFFFF]/;
+const validIdentCharRE = /[\.\?\w$\xA0-\uFFFF]/;
+const whitespaceRE = /\s+[.[]\s*|\s*[.[]\s+/g;
+const isMemberExpressionBrowser = (path) => {
+  path = path.trim().replace(whitespaceRE, (s) => s.trim());
+  let state = 0 /* inMemberExp */;
+  let stateStack = [];
+  let currentOpenBracketCount = 0;
+  let currentOpenParensCount = 0;
+  let currentStringType = null;
+  for (let i = 0; i < path.length; i++) {
+    const char = path.charAt(i);
+    switch (state) {
+      case 0 /* inMemberExp */:
+        if (char === "[") {
+          stateStack.push(state);
+          state = 1 /* inBrackets */;
+          currentOpenBracketCount++;
+        } else if (char === "(") {
+          stateStack.push(state);
+          state = 2 /* inParens */;
+          currentOpenParensCount++;
+        } else if (!(i === 0 ? validFirstIdentCharRE : validIdentCharRE).test(char)) {
+          return false;
+        }
+        break;
+      case 1 /* inBrackets */:
+        if (char === `'` || char === `"` || char === "`") {
+          stateStack.push(state);
+          state = 3 /* inString */;
+          currentStringType = char;
+        } else if (char === `[`) {
+          currentOpenBracketCount++;
+        } else if (char === `]`) {
+          if (!--currentOpenBracketCount) {
+            state = stateStack.pop();
+          }
+        }
+        break;
+      case 2 /* inParens */:
+        if (char === `'` || char === `"` || char === "`") {
+          stateStack.push(state);
+          state = 3 /* inString */;
+          currentStringType = char;
+        } else if (char === `(`) {
+          currentOpenParensCount++;
+        } else if (char === `)`) {
+          if (i === path.length - 1) {
+            return false;
+          }
+          if (!--currentOpenParensCount) {
+            state = stateStack.pop();
+          }
+        }
+        break;
+      case 3 /* inString */:
+        if (char === currentStringType) {
+          state = stateStack.pop();
+          currentStringType = null;
+        }
+        break;
+    }
+  }
+  return !currentOpenBracketCount && !currentOpenParensCount;
+};
+const isMemberExpressionNode = (path, context) => {
+  try {
+    let ret = parser.parseExpression(path, {
+      plugins: context.expressionPlugins
+    });
+    ret = unwrapTSNode(ret);
+    return ret.type === "MemberExpression" || ret.type === "OptionalMemberExpression" || ret.type === "Identifier" && ret.name !== "undefined";
+  } catch (e) {
+    return false;
+  }
+};
+const isMemberExpression = isMemberExpressionNode;
+function advancePositionWithClone(pos, source, numberOfCharacters = source.length) {
+  return advancePositionWithMutation(
+    {
+      offset: pos.offset,
+      line: pos.line,
+      column: pos.column
+    },
+    source,
+    numberOfCharacters
+  );
+}
+function advancePositionWithMutation(pos, source, numberOfCharacters = source.length) {
+  let linesCount = 0;
+  let lastNewLinePos = -1;
+  for (let i = 0; i < numberOfCharacters; i++) {
+    if (source.charCodeAt(i) === 10) {
+      linesCount++;
+      lastNewLinePos = i;
+    }
+  }
+  pos.offset += numberOfCharacters;
+  pos.line += linesCount;
+  pos.column = lastNewLinePos === -1 ? pos.column + numberOfCharacters : numberOfCharacters - lastNewLinePos;
+  return pos;
+}
+function assert(condition, msg) {
+  if (!condition) {
+    throw new Error(msg || `unexpected compiler condition`);
+  }
+}
+function findDir(node, name, allowEmpty = false) {
+  for (let i = 0; i < node.props.length; i++) {
+    const p = node.props[i];
+    if (p.type === 7 && (allowEmpty || p.exp) && (shared.isString(name) ? p.name === name : name.test(p.name))) {
+      return p;
+    }
+  }
+}
+function findProp(node, name, dynamicOnly = false, allowEmpty = false) {
+  for (let i = 0; i < node.props.length; i++) {
+    const p = node.props[i];
+    if (p.type === 6) {
+      if (dynamicOnly)
+        continue;
+      if (p.name === name && (p.value || allowEmpty)) {
+        return p;
+      }
+    } else if (p.name === "bind" && (p.exp || allowEmpty) && isStaticArgOf(p.arg, name)) {
+      return p;
+    }
+  }
+}
+function isStaticArgOf(arg, name) {
+  return !!(arg && isStaticExp(arg) && arg.content === name);
+}
+function hasDynamicKeyVBind(node) {
+  return node.props.some(
+    (p) => p.type === 7 && p.name === "bind" && (!p.arg || // v-bind="obj"
+    p.arg.type !== 4 || // v-bind:[_ctx.foo]
+    !p.arg.isStatic)
+    // v-bind:[foo]
+  );
+}
+function isText$1(node) {
+  return node.type === 5 || node.type === 2;
+}
+function isVSlot(p) {
+  return p.type === 7 && p.name === "slot";
+}
+function isTemplateNode(node) {
+  return node.type === 1 && node.tagType === 3;
+}
+function isSlotOutlet(node) {
+  return node.type === 1 && node.tagType === 2;
+}
+const propsHelperSet = /* @__PURE__ */ new Set([NORMALIZE_PROPS, GUARD_REACTIVE_PROPS]);
+function getUnnormalizedProps(props, callPath = []) {
+  if (props && !shared.isString(props) && props.type === 14) {
+    const callee = props.callee;
+    if (!shared.isString(callee) && propsHelperSet.has(callee)) {
+      return getUnnormalizedProps(
+        props.arguments[0],
+        callPath.concat(props)
+      );
+    }
+  }
+  return [props, callPath];
+}
+function injectProp(node, prop, context) {
+  let propsWithInjection;
+  let props = node.type === 13 ? node.props : node.arguments[2];
+  let callPath = [];
+  let parentCall;
+  if (props && !shared.isString(props) && props.type === 14) {
+    const ret = getUnnormalizedProps(props);
+    props = ret[0];
+    callPath = ret[1];
+    parentCall = callPath[callPath.length - 1];
+  }
+  if (props == null || shared.isString(props)) {
+    propsWithInjection = createObjectExpression([prop]);
+  } else if (props.type === 14) {
+    const first = props.arguments[0];
+    if (!shared.isString(first) && first.type === 15) {
+      if (!hasProp(prop, first)) {
+        first.properties.unshift(prop);
+      }
+    } else {
+      if (props.callee === TO_HANDLERS) {
+        propsWithInjection = createCallExpression(context.helper(MERGE_PROPS), [
+          createObjectExpression([prop]),
+          props
+        ]);
+      } else {
+        props.arguments.unshift(createObjectExpression([prop]));
+      }
+    }
+    !propsWithInjection && (propsWithInjection = props);
+  } else if (props.type === 15) {
+    if (!hasProp(prop, props)) {
+      props.properties.unshift(prop);
+    }
+    propsWithInjection = props;
+  } else {
+    propsWithInjection = createCallExpression(context.helper(MERGE_PROPS), [
+      createObjectExpression([prop]),
+      props
+    ]);
+    if (parentCall && parentCall.callee === GUARD_REACTIVE_PROPS) {
+      parentCall = callPath[callPath.length - 2];
+    }
+  }
+  if (node.type === 13) {
+    if (parentCall) {
+      parentCall.arguments[0] = propsWithInjection;
+    } else {
+      node.props = propsWithInjection;
+    }
+  } else {
+    if (parentCall) {
+      parentCall.arguments[0] = propsWithInjection;
+    } else {
+      node.arguments[2] = propsWithInjection;
+    }
+  }
+}
+function hasProp(prop, props) {
+  let result = false;
+  if (prop.key.type === 4) {
+    const propKeyName = prop.key.content;
+    result = props.properties.some(
+      (p) => p.key.type === 4 && p.key.content === propKeyName
+    );
+  }
+  return result;
+}
+function toValidAssetId(name, type) {
+  return `_${type}_${name.replace(/[^\w]/g, (searchValue, replaceValue) => {
+    return searchValue === "-" ? "_" : name.charCodeAt(replaceValue).toString();
+  })}`;
+}
+function hasScopeRef(node, ids) {
+  if (!node || Object.keys(ids).length === 0) {
+    return false;
+  }
+  switch (node.type) {
+    case 1:
+      for (let i = 0; i < node.props.length; i++) {
+        const p = node.props[i];
+        if (p.type === 7 && (hasScopeRef(p.arg, ids) || hasScopeRef(p.exp, ids))) {
+          return true;
+        }
+      }
+      return node.children.some((c) => hasScopeRef(c, ids));
+    case 11:
+      if (hasScopeRef(node.source, ids)) {
+        return true;
+      }
+      return node.children.some((c) => hasScopeRef(c, ids));
+    case 9:
+      return node.branches.some((b) => hasScopeRef(b, ids));
+    case 10:
+      if (hasScopeRef(node.condition, ids)) {
+        return true;
+      }
+      return node.children.some((c) => hasScopeRef(c, ids));
+    case 4:
+      return !node.isStatic && isSimpleIdentifier(node.content) && !!ids[node.content];
+    case 8:
+      return node.children.some((c) => shared.isObject(c) && hasScopeRef(c, ids));
+    case 5:
+    case 12:
+      return hasScopeRef(node.content, ids);
+    case 2:
+    case 3:
+      return false;
+    default:
+      return false;
+  }
+}
+function getMemoedVNodeCall(node) {
+  if (node.type === 14 && node.callee === WITH_MEMO) {
+    return node.arguments[1].returns;
+  } else {
+    return node;
+  }
+}
+const forAliasRE = /([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/;
+
+const defaultParserOptions = {
+  parseMode: "base",
+  ns: 0,
+  delimiters: [`{{`, `}}`],
+  getNamespace: () => 0,
+  isVoidTag: shared.NO,
+  isPreTag: shared.NO,
+  isCustomElement: shared.NO,
+  onError: defaultOnError,
+  onWarn: defaultOnWarn,
+  comments: false,
+  prefixIdentifiers: false
+};
+let currentOptions = defaultParserOptions;
+let currentRoot = null;
+let currentInput = "";
+let currentOpenTag = null;
+let currentProp = null;
+let currentAttrValue = "";
+let currentAttrStartIndex = -1;
+let currentAttrEndIndex = -1;
+let inPre = 0;
+let inVPre = false;
+let currentVPreBoundary = null;
+const stack = [];
+const tokenizer = new Tokenizer(stack, {
+  onerr: emitError,
+  ontext(start, end) {
+    onText(getSlice(start, end), start, end);
+  },
+  ontextentity(char, start, end) {
+    onText(char, start, end);
+  },
+  oninterpolation(start, end) {
+    if (inVPre) {
+      return onText(getSlice(start, end), start, end);
+    }
+    let innerStart = start + tokenizer.delimiterOpen.length;
+    let innerEnd = end - tokenizer.delimiterClose.length;
+    while (isWhitespace(currentInput.charCodeAt(innerStart))) {
+      innerStart++;
+    }
+    while (isWhitespace(currentInput.charCodeAt(innerEnd - 1))) {
+      innerEnd--;
+    }
+    let exp = getSlice(innerStart, innerEnd);
+    if (exp.includes("&")) {
+      {
+        exp = decode_js.decodeHTML(exp);
+      }
+    }
+    addNode({
+      type: 5,
+      content: createExp(exp, false, getLoc(innerStart, innerEnd)),
+      loc: getLoc(start, end)
+    });
+  },
+  onopentagname(start, end) {
+    const name = getSlice(start, end);
+    currentOpenTag = {
+      type: 1,
+      tag: name,
+      ns: currentOptions.getNamespace(name, stack[0], currentOptions.ns),
+      tagType: 0,
+      // will be refined on tag close
+      props: [],
+      children: [],
+      loc: getLoc(start - 1, end),
+      codegenNode: void 0
+    };
+  },
+  onopentagend(end) {
+    endOpenTag(end);
+  },
+  onclosetag(start, end) {
+    const name = getSlice(start, end);
+    if (!currentOptions.isVoidTag(name)) {
+      let found = false;
+      for (let i = 0; i < stack.length; i++) {
+        const e = stack[i];
+        if (e.tag.toLowerCase() === name.toLowerCase()) {
+          found = true;
+          if (i > 0) {
+            emitError(24, stack[0].loc.start.offset);
+          }
+          for (let j = 0; j <= i; j++) {
+            const el = stack.shift();
+            onCloseTag(el, end, j < i);
+          }
+          break;
+        }
+      }
+      if (!found) {
+        emitError(23, backTrack(start, 60));
+      }
+    }
+  },
+  onselfclosingtag(end) {
+    const name = currentOpenTag.tag;
+    currentOpenTag.isSelfClosing = true;
+    endOpenTag(end);
+    if (stack[0] && stack[0].tag === name) {
+      onCloseTag(stack.shift(), end);
+    }
+  },
+  onattribname(start, end) {
+    currentProp = {
+      type: 6,
+      name: getSlice(start, end),
+      nameLoc: getLoc(start, end),
+      value: void 0,
+      loc: getLoc(start)
+    };
+  },
+  ondirname(start, end) {
+    const raw = getSlice(start, end);
+    const name = raw === "." || raw === ":" ? "bind" : raw === "@" ? "on" : raw === "#" ? "slot" : raw.slice(2);
+    if (!inVPre && name === "") {
+      emitError(26, start);
+    }
+    if (inVPre || name === "") {
+      currentProp = {
+        type: 6,
+        name: raw,
+        nameLoc: getLoc(start, end),
+        value: void 0,
+        loc: getLoc(start)
+      };
+    } else {
+      currentProp = {
+        type: 7,
+        name,
+        rawName: raw,
+        exp: void 0,
+        arg: void 0,
+        modifiers: raw === "." ? ["prop"] : [],
+        loc: getLoc(start)
+      };
+      if (name === "pre") {
+        inVPre = tokenizer.inVPre = true;
+        currentVPreBoundary = currentOpenTag;
+        const props = currentOpenTag.props;
+        for (let i = 0; i < props.length; i++) {
+          if (props[i].type === 7) {
+            props[i] = dirToAttr(props[i]);
+          }
+        }
+      }
+    }
+  },
+  ondirarg(start, end) {
+    if (start === end)
+      return;
+    const arg = getSlice(start, end);
+    if (inVPre) {
+      currentProp.name += arg;
+      setLocEnd(currentProp.nameLoc, end);
+    } else {
+      const isStatic = arg[0] !== `[`;
+      currentProp.arg = createExp(
+        isStatic ? arg : arg.slice(1, -1),
+        isStatic,
+        getLoc(start, end),
+        isStatic ? 3 : 0
+      );
+    }
+  },
+  ondirmodifier(start, end) {
+    const mod = getSlice(start, end);
+    if (inVPre) {
+      currentProp.name += "." + mod;
+      setLocEnd(currentProp.nameLoc, end);
+    } else if (currentProp.name === "slot") {
+      const arg = currentProp.arg;
+      if (arg) {
+        arg.content += "." + mod;
+        setLocEnd(arg.loc, end);
+      }
+    } else {
+      currentProp.modifiers.push(mod);
+    }
+  },
+  onattribdata(start, end) {
+    currentAttrValue += getSlice(start, end);
+    if (currentAttrStartIndex < 0)
+      currentAttrStartIndex = start;
+    currentAttrEndIndex = end;
+  },
+  onattribentity(char, start, end) {
+    currentAttrValue += char;
+    if (currentAttrStartIndex < 0)
+      currentAttrStartIndex = start;
+    currentAttrEndIndex = end;
+  },
+  onattribnameend(end) {
+    const start = currentProp.loc.start.offset;
+    const name = getSlice(start, end);
+    if (currentProp.type === 7) {
+      currentProp.rawName = name;
+    }
+    if (currentOpenTag.props.some(
+      (p) => (p.type === 7 ? p.rawName : p.name) === name
+    )) {
+      emitError(2, start);
+    }
+  },
+  onattribend(quote, end) {
+    if (currentOpenTag && currentProp) {
+      setLocEnd(currentProp.loc, end);
+      if (quote !== 0) {
+        if (currentProp.type === 6) {
+          if (currentProp.name === "class") {
+            currentAttrValue = condense(currentAttrValue).trim();
+          }
+          if (quote === 1 && !currentAttrValue) {
+            emitError(13, end);
+          }
+          currentProp.value = {
+            type: 2,
+            content: currentAttrValue,
+            loc: quote === 1 ? getLoc(currentAttrStartIndex, currentAttrEndIndex) : getLoc(currentAttrStartIndex - 1, currentAttrEndIndex + 1)
+          };
+          if (tokenizer.inSFCRoot && currentOpenTag.tag === "template" && currentProp.name === "lang" && currentAttrValue && currentAttrValue !== "html") {
+            tokenizer.enterRCDATA(toCharCodes(`</template`), 0);
+          }
+        } else {
+          let expParseMode = 0 /* Normal */;
+          {
+            if (currentProp.name === "for") {
+              expParseMode = 3 /* Skip */;
+            } else if (currentProp.name === "slot") {
+              expParseMode = 1 /* Params */;
+            } else if (currentProp.name === "on" && currentAttrValue.includes(";")) {
+              expParseMode = 2 /* Statements */;
+            }
+          }
+          currentProp.exp = createExp(
+            currentAttrValue,
+            false,
+            getLoc(currentAttrStartIndex, currentAttrEndIndex),
+            0,
+            expParseMode
+          );
+          if (currentProp.name === "for") {
+            currentProp.forParseResult = parseForExpression(currentProp.exp);
+          }
+          let syncIndex = -1;
+          if (currentProp.name === "bind" && (syncIndex = currentProp.modifiers.indexOf("sync")) > -1 && checkCompatEnabled(
+            "COMPILER_V_BIND_SYNC",
+            currentOptions,
+            currentProp.loc,
+            currentProp.rawName
+          )) {
+            currentProp.name = "model";
+            currentProp.modifiers.splice(syncIndex, 1);
+          }
+        }
+      }
+      if (currentProp.type !== 7 || currentProp.name !== "pre") {
+        currentOpenTag.props.push(currentProp);
+      }
+    }
+    currentAttrValue = "";
+    currentAttrStartIndex = currentAttrEndIndex = -1;
+  },
+  oncomment(start, end) {
+    if (currentOptions.comments) {
+      addNode({
+        type: 3,
+        content: getSlice(start, end),
+        loc: getLoc(start - 4, end + 3)
+      });
+    }
+  },
+  onend() {
+    const end = currentInput.length;
+    if (tokenizer.state !== 1) {
+      switch (tokenizer.state) {
+        case 5:
+        case 8:
+          emitError(5, end);
+          break;
+        case 3:
+        case 4:
+          emitError(
+            25,
+            tokenizer.sectionStart
+          );
+          break;
+        case 28:
+          if (tokenizer.currentSequence === Sequences.CdataEnd) {
+            emitError(6, end);
+          } else {
+            emitError(7, end);
+          }
+          break;
+        case 6:
+        case 7:
+        case 9:
+        case 11:
+        case 12:
+        case 13:
+        case 14:
+        case 15:
+        case 16:
+        case 17:
+        case 18:
+        case 19:
+        case 20:
+        case 21:
+          emitError(9, end);
+          break;
+      }
+    }
+    for (let index = 0; index < stack.length; index++) {
+      onCloseTag(stack[index], end - 1);
+      emitError(24, stack[index].loc.start.offset);
+    }
+  },
+  oncdata(start, end) {
+    if (stack[0].ns !== 0) {
+      onText(getSlice(start, end), start, end);
+    } else {
+      emitError(1, start - 9);
+    }
+  },
+  onprocessinginstruction(start) {
+    if ((stack[0] ? stack[0].ns : currentOptions.ns) === 0) {
+      emitError(
+        21,
+        start - 1
+      );
+    }
+  }
+});
+const forIteratorRE = /,([^,\}\]]*)(?:,([^,\}\]]*))?$/;
+const stripParensRE = /^\(|\)$/g;
+function parseForExpression(input) {
+  const loc = input.loc;
+  const exp = input.content;
+  const inMatch = exp.match(forAliasRE);
+  if (!inMatch)
+    return;
+  const [, LHS, RHS] = inMatch;
+  const createAliasExpression = (content, offset, asParam = false) => {
+    const start = loc.start.offset + offset;
+    const end = start + content.length;
+    return createExp(
+      content,
+      false,
+      getLoc(start, end),
+      0,
+      asParam ? 1 /* Params */ : 0 /* Normal */
+    );
+  };
+  const result = {
+    source: createAliasExpression(RHS.trim(), exp.indexOf(RHS, LHS.length)),
+    value: void 0,
+    key: void 0,
+    index: void 0,
+    finalized: false
+  };
+  let valueContent = LHS.trim().replace(stripParensRE, "").trim();
+  const trimmedOffset = LHS.indexOf(valueContent);
+  const iteratorMatch = valueContent.match(forIteratorRE);
+  if (iteratorMatch) {
+    valueContent = valueContent.replace(forIteratorRE, "").trim();
+    const keyContent = iteratorMatch[1].trim();
+    let keyOffset;
+    if (keyContent) {
+      keyOffset = exp.indexOf(keyContent, trimmedOffset + valueContent.length);
+      result.key = createAliasExpression(keyContent, keyOffset, true);
+    }
+    if (iteratorMatch[2]) {
+      const indexContent = iteratorMatch[2].trim();
+      if (indexContent) {
+        result.index = createAliasExpression(
+          indexContent,
+          exp.indexOf(
+            indexContent,
+            result.key ? keyOffset + keyContent.length : trimmedOffset + valueContent.length
+          ),
+          true
+        );
+      }
+    }
+  }
+  if (valueContent) {
+    result.value = createAliasExpression(valueContent, trimmedOffset, true);
+  }
+  return result;
+}
+function getSlice(start, end) {
+  return currentInput.slice(start, end);
+}
+function endOpenTag(end) {
+  if (tokenizer.inSFCRoot) {
+    currentOpenTag.innerLoc = getLoc(end + 1, end + 1);
+  }
+  addNode(currentOpenTag);
+  const { tag, ns } = currentOpenTag;
+  if (ns === 0 && currentOptions.isPreTag(tag)) {
+    inPre++;
+  }
+  if (currentOptions.isVoidTag(tag)) {
+    onCloseTag(currentOpenTag, end);
+  } else {
+    stack.unshift(currentOpenTag);
+    if (ns === 1 || ns === 2) {
+      tokenizer.inXML = true;
+    }
+  }
+  currentOpenTag = null;
+}
+function onText(content, start, end) {
+  const parent = stack[0] || currentRoot;
+  const lastNode = parent.children[parent.children.length - 1];
+  if (lastNode && lastNode.type === 2) {
+    lastNode.content += content;
+    setLocEnd(lastNode.loc, end);
+  } else {
+    parent.children.push({
+      type: 2,
+      content,
+      loc: getLoc(start, end)
+    });
+  }
+}
+function onCloseTag(el, end, isImplied = false) {
+  if (isImplied) {
+    setLocEnd(el.loc, backTrack(end, 60));
+  } else {
+    setLocEnd(el.loc, lookAhead(end, 62) + 1);
+  }
+  if (tokenizer.inSFCRoot) {
+    if (el.children.length) {
+      el.innerLoc.end = shared.extend({}, el.children[el.children.length - 1].loc.end);
+    } else {
+      el.innerLoc.end = shared.extend({}, el.innerLoc.start);
+    }
+    el.innerLoc.source = getSlice(
+      el.innerLoc.start.offset,
+      el.innerLoc.end.offset
+    );
+  }
+  const { tag, ns } = el;
+  if (!inVPre) {
+    if (tag === "slot") {
+      el.tagType = 2;
+    } else if (isFragmentTemplate(el)) {
+      el.tagType = 3;
+    } else if (isComponent(el)) {
+      el.tagType = 1;
+    }
+  }
+  if (!tokenizer.inRCDATA) {
+    el.children = condenseWhitespace(el.children, el.tag);
+  }
+  if (ns === 0 && currentOptions.isPreTag(tag)) {
+    inPre--;
+  }
+  if (currentVPreBoundary === el) {
+    inVPre = tokenizer.inVPre = false;
+    currentVPreBoundary = null;
+  }
+  if (tokenizer.inXML && (stack[0] ? stack[0].ns : currentOptions.ns) === 0) {
+    tokenizer.inXML = false;
+  }
+  {
+    const props = el.props;
+    if (!tokenizer.inSFCRoot && isCompatEnabled(
+      "COMPILER_NATIVE_TEMPLATE",
+      currentOptions
+    ) && el.tag === "template" && !isFragmentTemplate(el)) {
+      const parent = stack[0] || currentRoot;
+      const index = parent.children.indexOf(el);
+      parent.children.splice(index, 1, ...el.children);
+    }
+    const inlineTemplateProp = props.find(
+      (p) => p.type === 6 && p.name === "inline-template"
+    );
+    if (inlineTemplateProp && checkCompatEnabled(
+      "COMPILER_INLINE_TEMPLATE",
+      currentOptions,
+      inlineTemplateProp.loc
+    ) && el.children.length) {
+      inlineTemplateProp.value = {
+        type: 2,
+        content: getSlice(
+          el.children[0].loc.start.offset,
+          el.children[el.children.length - 1].loc.end.offset
+        ),
+        loc: inlineTemplateProp.loc
+      };
+    }
+  }
+}
+function lookAhead(index, c) {
+  let i = index;
+  while (currentInput.charCodeAt(i) !== c && i < currentInput.length - 1)
+    i++;
+  return i;
+}
+function backTrack(index, c) {
+  let i = index;
+  while (currentInput.charCodeAt(i) !== c && i >= 0)
+    i--;
+  return i;
+}
+const specialTemplateDir = /* @__PURE__ */ new Set(["if", "else", "else-if", "for", "slot"]);
+function isFragmentTemplate({ tag, props }) {
+  if (tag === "template") {
+    for (let i = 0; i < props.length; i++) {
+      if (props[i].type === 7 && specialTemplateDir.has(props[i].name)) {
+        return true;
+      }
+    }
+  }
+  return false;
+}
+function isComponent({ tag, props }) {
+  if (currentOptions.isCustomElement(tag)) {
+    return false;
+  }
+  if (tag === "component" || isUpperCase(tag.charCodeAt(0)) || isCoreComponent(tag) || currentOptions.isBuiltInComponent && currentOptions.isBuiltInComponent(tag) || currentOptions.isNativeTag && !currentOptions.isNativeTag(tag)) {
+    return true;
+  }
+  for (let i = 0; i < props.length; i++) {
+    const p = props[i];
+    if (p.type === 6) {
+      if (p.name === "is" && p.value) {
+        if (p.value.content.startsWith("vue:")) {
+          return true;
+        } else if (checkCompatEnabled(
+          "COMPILER_IS_ON_ELEMENT",
+          currentOptions,
+          p.loc
+        )) {
+          return true;
+        }
+      }
+    } else if (// :is on plain element - only treat as component in compat mode
+    p.name === "bind" && isStaticArgOf(p.arg, "is") && checkCompatEnabled(
+      "COMPILER_IS_ON_ELEMENT",
+      currentOptions,
+      p.loc
+    )) {
+      return true;
+    }
+  }
+  return false;
+}
+function isUpperCase(c) {
+  return c > 64 && c < 91;
+}
+const windowsNewlineRE = /\r\n/g;
+function condenseWhitespace(nodes, tag) {
+  const shouldCondense = currentOptions.whitespace !== "preserve";
+  let removedWhitespace = false;
+  for (let i = 0; i < nodes.length; i++) {
+    const node = nodes[i];
+    if (node.type === 2) {
+      if (!inPre) {
+        if (isAllWhitespace(node.content)) {
+          const prev = nodes[i - 1] && nodes[i - 1].type;
+          const next = nodes[i + 1] && nodes[i + 1].type;
+          if (!prev || !next || shouldCondense && (prev === 3 && (next === 3 || next === 1) || prev === 1 && (next === 3 || next === 1 && hasNewlineChar(node.content)))) {
+            removedWhitespace = true;
+            nodes[i] = null;
+          } else {
+            node.content = " ";
+          }
+        } else if (shouldCondense) {
+          node.content = condense(node.content);
+        }
+      } else {
+        node.content = node.content.replace(windowsNewlineRE, "\n");
+      }
+    }
+  }
+  if (inPre && tag && currentOptions.isPreTag(tag)) {
+    const first = nodes[0];
+    if (first && first.type === 2) {
+      first.content = first.content.replace(/^\r?\n/, "");
+    }
+  }
+  return removedWhitespace ? nodes.filter(Boolean) : nodes;
+}
+function isAllWhitespace(str) {
+  for (let i = 0; i < str.length; i++) {
+    if (!isWhitespace(str.charCodeAt(i))) {
+      return false;
+    }
+  }
+  return true;
+}
+function hasNewlineChar(str) {
+  for (let i = 0; i < str.length; i++) {
+    const c = str.charCodeAt(i);
+    if (c === 10 || c === 13) {
+      return true;
+    }
+  }
+  return false;
+}
+function condense(str) {
+  let ret = "";
+  let prevCharIsWhitespace = false;
+  for (let i = 0; i < str.length; i++) {
+    if (isWhitespace(str.charCodeAt(i))) {
+      if (!prevCharIsWhitespace) {
+        ret += " ";
+        prevCharIsWhitespace = true;
+      }
+    } else {
+      ret += str[i];
+      prevCharIsWhitespace = false;
+    }
+  }
+  return ret;
+}
+function addNode(node) {
+  (stack[0] || currentRoot).children.push(node);
+}
+function getLoc(start, end) {
+  return {
+    start: tokenizer.getPos(start),
+    // @ts-expect-error allow late attachment
+    end: end == null ? end : tokenizer.getPos(end),
+    // @ts-expect-error allow late attachment
+    source: end == null ? end : getSlice(start, end)
+  };
+}
+function setLocEnd(loc, end) {
+  loc.end = tokenizer.getPos(end);
+  loc.source = getSlice(loc.start.offset, end);
+}
+function dirToAttr(dir) {
+  const attr = {
+    type: 6,
+    name: dir.rawName,
+    nameLoc: getLoc(
+      dir.loc.start.offset,
+      dir.loc.start.offset + dir.rawName.length
+    ),
+    value: void 0,
+    loc: dir.loc
+  };
+  if (dir.exp) {
+    const loc = dir.exp.loc;
+    if (loc.end.offset < dir.loc.end.offset) {
+      loc.start.offset--;
+      loc.start.column--;
+      loc.end.offset++;
+      loc.end.column++;
+    }
+    attr.value = {
+      type: 2,
+      content: dir.exp.content,
+      loc
+    };
+  }
+  return attr;
+}
+function createExp(content, isStatic = false, loc, constType = 0, parseMode = 0 /* Normal */) {
+  const exp = createSimpleExpression(content, isStatic, loc, constType);
+  if (!isStatic && currentOptions.prefixIdentifiers && parseMode !== 3 /* Skip */ && content.trim()) {
+    if (isSimpleIdentifier(content)) {
+      exp.ast = null;
+      return exp;
+    }
+    try {
+      const plugins = currentOptions.expressionPlugins;
+      const options = {
+        plugins: plugins ? [...plugins, "typescript"] : ["typescript"]
+      };
+      if (parseMode === 2 /* Statements */) {
+        exp.ast = parser.parse(` ${content} `, options).program;
+      } else if (parseMode === 1 /* Params */) {
+        exp.ast = parser.parseExpression(`(${content})=>{}`, options);
+      } else {
+        exp.ast = parser.parseExpression(`(${content})`, options);
+      }
+    } catch (e) {
+      exp.ast = false;
+      emitError(45, loc.start.offset, e.message);
+    }
+  }
+  return exp;
+}
+function emitError(code, index, message) {
+  currentOptions.onError(
+    createCompilerError(code, getLoc(index, index), void 0, message)
+  );
+}
+function reset() {
+  tokenizer.reset();
+  currentOpenTag = null;
+  currentProp = null;
+  currentAttrValue = "";
+  currentAttrStartIndex = -1;
+  currentAttrEndIndex = -1;
+  stack.length = 0;
+}
+function baseParse(input, options) {
+  reset();
+  currentInput = input;
+  currentOptions = shared.extend({}, defaultParserOptions);
+  if (options) {
+    let key;
+    for (key in options) {
+      if (options[key] != null) {
+        currentOptions[key] = options[key];
+      }
+    }
+  }
+  tokenizer.mode = currentOptions.parseMode === "html" ? 1 : currentOptions.parseMode === "sfc" ? 2 : 0;
+  tokenizer.inXML = currentOptions.ns === 1 || currentOptions.ns === 2;
+  const delimiters = options && options.delimiters;
+  if (delimiters) {
+    tokenizer.delimiterOpen = toCharCodes(delimiters[0]);
+    tokenizer.delimiterClose = toCharCodes(delimiters[1]);
+  }
+  const root = currentRoot = createRoot([], input);
+  tokenizer.parse(currentInput);
+  root.loc = getLoc(0, input.length);
+  root.children = condenseWhitespace(root.children);
+  currentRoot = null;
+  return root;
+}
+
+function hoistStatic(root, context) {
+  walk(
+    root,
+    context,
+    // Root node is unfortunately non-hoistable due to potential parent
+    // fallthrough attributes.
+    isSingleElementRoot(root, root.children[0])
+  );
+}
+function isSingleElementRoot(root, child) {
+  const { children } = root;
+  return children.length === 1 && child.type === 1 && !isSlotOutlet(child);
+}
+function walk(node, context, doNotHoistNode = false) {
+  const { children } = node;
+  const originalCount = children.length;
+  let hoistedCount = 0;
+  for (let i = 0; i < children.length; i++) {
+    const child = children[i];
+    if (child.type === 1 && child.tagType === 0) {
+      const constantType = doNotHoistNode ? 0 : getConstantType(child, context);
+      if (constantType > 0) {
+        if (constantType >= 2) {
+          child.codegenNode.patchFlag = -1 + (``);
+          child.codegenNode = context.hoist(child.codegenNode);
+          hoistedCount++;
+          continue;
+        }
+      } else {
+        const codegenNode = child.codegenNode;
+        if (codegenNode.type === 13) {
+          const flag = getPatchFlag(codegenNode);
+          if ((!flag || flag === 512 || flag === 1) && getGeneratedPropsConstantType(child, context) >= 2) {
+            const props = getNodeProps(child);
+            if (props) {
+              codegenNode.props = context.hoist(props);
+            }
+          }
+          if (codegenNode.dynamicProps) {
+            codegenNode.dynamicProps = context.hoist(codegenNode.dynamicProps);
+          }
+        }
+      }
+    }
+    if (child.type === 1) {
+      const isComponent = child.tagType === 1;
+      if (isComponent) {
+        context.scopes.vSlot++;
+      }
+      walk(child, context);
+      if (isComponent) {
+        context.scopes.vSlot--;
+      }
+    } else if (child.type === 11) {
+      walk(child, context, child.children.length === 1);
+    } else if (child.type === 9) {
+      for (let i2 = 0; i2 < child.branches.length; i2++) {
+        walk(
+          child.branches[i2],
+          context,
+          child.branches[i2].children.length === 1
+        );
+      }
+    }
+  }
+  if (hoistedCount && context.transformHoist) {
+    context.transformHoist(children, context, node);
+  }
+  if (hoistedCount && hoistedCount === originalCount && node.type === 1 && node.tagType === 0 && node.codegenNode && node.codegenNode.type === 13 && shared.isArray(node.codegenNode.children)) {
+    const hoisted = context.hoist(
+      createArrayExpression(node.codegenNode.children)
+    );
+    if (context.hmr) {
+      hoisted.content = `[...${hoisted.content}]`;
+    }
+    node.codegenNode.children = hoisted;
+  }
+}
+function getConstantType(node, context) {
+  const { constantCache } = context;
+  switch (node.type) {
+    case 1:
+      if (node.tagType !== 0) {
+        return 0;
+      }
+      const cached = constantCache.get(node);
+      if (cached !== void 0) {
+        return cached;
+      }
+      const codegenNode = node.codegenNode;
+      if (codegenNode.type !== 13) {
+        return 0;
+      }
+      if (codegenNode.isBlock && node.tag !== "svg" && node.tag !== "foreignObject") {
+        return 0;
+      }
+      const flag = getPatchFlag(codegenNode);
+      if (!flag) {
+        let returnType2 = 3;
+        const generatedPropsType = getGeneratedPropsConstantType(node, context);
+        if (generatedPropsType === 0) {
+          constantCache.set(node, 0);
+          return 0;
+        }
+        if (generatedPropsType < returnType2) {
+          returnType2 = generatedPropsType;
+        }
+        for (let i = 0; i < node.children.length; i++) {
+          const childType = getConstantType(node.children[i], context);
+          if (childType === 0) {
+            constantCache.set(node, 0);
+            return 0;
+          }
+          if (childType < returnType2) {
+            returnType2 = childType;
+          }
+        }
+        if (returnType2 > 1) {
+          for (let i = 0; i < node.props.length; i++) {
+            const p = node.props[i];
+            if (p.type === 7 && p.name === "bind" && p.exp) {
+              const expType = getConstantType(p.exp, context);
+              if (expType === 0) {
+                constantCache.set(node, 0);
+                return 0;
+              }
+              if (expType < returnType2) {
+                returnType2 = expType;
+              }
+            }
+          }
+        }
+        if (codegenNode.isBlock) {
+          for (let i = 0; i < node.props.length; i++) {
+            const p = node.props[i];
+            if (p.type === 7) {
+              constantCache.set(node, 0);
+              return 0;
+            }
+          }
+          context.removeHelper(OPEN_BLOCK);
+          context.removeHelper(
+            getVNodeBlockHelper(context.inSSR, codegenNode.isComponent)
+          );
+          codegenNode.isBlock = false;
+          context.helper(getVNodeHelper(context.inSSR, codegenNode.isComponent));
+        }
+        constantCache.set(node, returnType2);
+        return returnType2;
+      } else {
+        constantCache.set(node, 0);
+        return 0;
+      }
+    case 2:
+    case 3:
+      return 3;
+    case 9:
+    case 11:
+    case 10:
+      return 0;
+    case 5:
+    case 12:
+      return getConstantType(node.content, context);
+    case 4:
+      return node.constType;
+    case 8:
+      let returnType = 3;
+      for (let i = 0; i < node.children.length; i++) {
+        const child = node.children[i];
+        if (shared.isString(child) || shared.isSymbol(child)) {
+          continue;
+        }
+        const childType = getConstantType(child, context);
+        if (childType === 0) {
+          return 0;
+        } else if (childType < returnType) {
+          returnType = childType;
+        }
+      }
+      return returnType;
+    default:
+      return 0;
+  }
+}
+const allowHoistedHelperSet = /* @__PURE__ */ new Set([
+  NORMALIZE_CLASS,
+  NORMALIZE_STYLE,
+  NORMALIZE_PROPS,
+  GUARD_REACTIVE_PROPS
+]);
+function getConstantTypeOfHelperCall(value, context) {
+  if (value.type === 14 && !shared.isString(value.callee) && allowHoistedHelperSet.has(value.callee)) {
+    const arg = value.arguments[0];
+    if (arg.type === 4) {
+      return getConstantType(arg, context);
+    } else if (arg.type === 14) {
+      return getConstantTypeOfHelperCall(arg, context);
+    }
+  }
+  return 0;
+}
+function getGeneratedPropsConstantType(node, context) {
+  let returnType = 3;
+  const props = getNodeProps(node);
+  if (props && props.type === 15) {
+    const { properties } = props;
+    for (let i = 0; i < properties.length; i++) {
+      const { key, value } = properties[i];
+      const keyType = getConstantType(key, context);
+      if (keyType === 0) {
+        return keyType;
+      }
+      if (keyType < returnType) {
+        returnType = keyType;
+      }
+      let valueType;
+      if (value.type === 4) {
+        valueType = getConstantType(value, context);
+      } else if (value.type === 14) {
+        valueType = getConstantTypeOfHelperCall(value, context);
+      } else {
+        valueType = 0;
+      }
+      if (valueType === 0) {
+        return valueType;
+      }
+      if (valueType < returnType) {
+        returnType = valueType;
+      }
+    }
+  }
+  return returnType;
+}
+function getNodeProps(node) {
+  const codegenNode = node.codegenNode;
+  if (codegenNode.type === 13) {
+    return codegenNode.props;
+  }
+}
+function getPatchFlag(node) {
+  const flag = node.patchFlag;
+  return flag ? parseInt(flag, 10) : void 0;
+}
+
+function createTransformContext(root, {
+  filename = "",
+  prefixIdentifiers = false,
+  hoistStatic: hoistStatic2 = false,
+  hmr = false,
+  cacheHandlers = false,
+  nodeTransforms = [],
+  directiveTransforms = {},
+  transformHoist = null,
+  isBuiltInComponent = shared.NOOP,
+  isCustomElement = shared.NOOP,
+  expressionPlugins = [],
+  scopeId = null,
+  slotted = true,
+  ssr = false,
+  inSSR = false,
+  ssrCssVars = ``,
+  bindingMetadata = shared.EMPTY_OBJ,
+  inline = false,
+  isTS = false,
+  onError = defaultOnError,
+  onWarn = defaultOnWarn,
+  compatConfig
+}) {
+  const nameMatch = filename.replace(/\?.*$/, "").match(/([^/\\]+)\.\w+$/);
+  const context = {
+    // options
+    filename,
+    selfName: nameMatch && shared.capitalize(shared.camelize(nameMatch[1])),
+    prefixIdentifiers,
+    hoistStatic: hoistStatic2,
+    hmr,
+    cacheHandlers,
+    nodeTransforms,
+    directiveTransforms,
+    transformHoist,
+    isBuiltInComponent,
+    isCustomElement,
+    expressionPlugins,
+    scopeId,
+    slotted,
+    ssr,
+    inSSR,
+    ssrCssVars,
+    bindingMetadata,
+    inline,
+    isTS,
+    onError,
+    onWarn,
+    compatConfig,
+    // state
+    root,
+    helpers: /* @__PURE__ */ new Map(),
+    components: /* @__PURE__ */ new Set(),
+    directives: /* @__PURE__ */ new Set(),
+    hoists: [],
+    imports: [],
+    constantCache: /* @__PURE__ */ new WeakMap(),
+    temps: 0,
+    cached: 0,
+    identifiers: /* @__PURE__ */ Object.create(null),
+    scopes: {
+      vFor: 0,
+      vSlot: 0,
+      vPre: 0,
+      vOnce: 0
+    },
+    parent: null,
+    grandParent: null,
+    currentNode: root,
+    childIndex: 0,
+    inVOnce: false,
+    // methods
+    helper(name) {
+      const count = context.helpers.get(name) || 0;
+      context.helpers.set(name, count + 1);
+      return name;
+    },
+    removeHelper(name) {
+      const count = context.helpers.get(name);
+      if (count) {
+        const currentCount = count - 1;
+        if (!currentCount) {
+          context.helpers.delete(name);
+        } else {
+          context.helpers.set(name, currentCount);
+        }
+      }
+    },
+    helperString(name) {
+      return `_${helperNameMap[context.helper(name)]}`;
+    },
+    replaceNode(node) {
+      context.parent.children[context.childIndex] = context.currentNode = node;
+    },
+    removeNode(node) {
+      const list = context.parent.children;
+      const removalIndex = node ? list.indexOf(node) : context.currentNode ? context.childIndex : -1;
+      if (!node || node === context.currentNode) {
+        context.currentNode = null;
+        context.onNodeRemoved();
+      } else {
+        if (context.childIndex > removalIndex) {
+          context.childIndex--;
+          context.onNodeRemoved();
+        }
+      }
+      context.parent.children.splice(removalIndex, 1);
+    },
+    onNodeRemoved: shared.NOOP,
+    addIdentifiers(exp) {
+      {
+        if (shared.isString(exp)) {
+          addId(exp);
+        } else if (exp.identifiers) {
+          exp.identifiers.forEach(addId);
+        } else if (exp.type === 4) {
+          addId(exp.content);
+        }
+      }
+    },
+    removeIdentifiers(exp) {
+      {
+        if (shared.isString(exp)) {
+          removeId(exp);
+        } else if (exp.identifiers) {
+          exp.identifiers.forEach(removeId);
+        } else if (exp.type === 4) {
+          removeId(exp.content);
+        }
+      }
+    },
+    hoist(exp) {
+      if (shared.isString(exp))
+        exp = createSimpleExpression(exp);
+      context.hoists.push(exp);
+      const identifier = createSimpleExpression(
+        `_hoisted_${context.hoists.length}`,
+        false,
+        exp.loc,
+        2
+      );
+      identifier.hoisted = exp;
+      return identifier;
+    },
+    cache(exp, isVNode = false) {
+      return createCacheExpression(context.cached++, exp, isVNode);
+    }
+  };
+  {
+    context.filters = /* @__PURE__ */ new Set();
+  }
+  function addId(id) {
+    const { identifiers } = context;
+    if (identifiers[id] === void 0) {
+      identifiers[id] = 0;
+    }
+    identifiers[id]++;
+  }
+  function removeId(id) {
+    context.identifiers[id]--;
+  }
+  return context;
+}
+function transform(root, options) {
+  const context = createTransformContext(root, options);
+  traverseNode(root, context);
+  if (options.hoistStatic) {
+    hoistStatic(root, context);
+  }
+  if (!options.ssr) {
+    createRootCodegen(root, context);
+  }
+  root.helpers = /* @__PURE__ */ new Set([...context.helpers.keys()]);
+  root.components = [...context.components];
+  root.directives = [...context.directives];
+  root.imports = context.imports;
+  root.hoists = context.hoists;
+  root.temps = context.temps;
+  root.cached = context.cached;
+  root.transformed = true;
+  {
+    root.filters = [...context.filters];
+  }
+}
+function createRootCodegen(root, context) {
+  const { helper } = context;
+  const { children } = root;
+  if (children.length === 1) {
+    const child = children[0];
+    if (isSingleElementRoot(root, child) && child.codegenNode) {
+      const codegenNode = child.codegenNode;
+      if (codegenNode.type === 13) {
+        convertToBlock(codegenNode, context);
+      }
+      root.codegenNode = codegenNode;
+    } else {
+      root.codegenNode = child;
+    }
+  } else if (children.length > 1) {
+    let patchFlag = 64;
+    shared.PatchFlagNames[64];
+    root.codegenNode = createVNodeCall(
+      context,
+      helper(FRAGMENT),
+      void 0,
+      root.children,
+      patchFlag + (``),
+      void 0,
+      void 0,
+      true,
+      void 0,
+      false
+    );
+  } else ;
+}
+function traverseChildren(parent, context) {
+  let i = 0;
+  const nodeRemoved = () => {
+    i--;
+  };
+  for (; i < parent.children.length; i++) {
+    const child = parent.children[i];
+    if (shared.isString(child))
+      continue;
+    context.grandParent = context.parent;
+    context.parent = parent;
+    context.childIndex = i;
+    context.onNodeRemoved = nodeRemoved;
+    traverseNode(child, context);
+  }
+}
+function traverseNode(node, context) {
+  context.currentNode = node;
+  const { nodeTransforms } = context;
+  const exitFns = [];
+  for (let i2 = 0; i2 < nodeTransforms.length; i2++) {
+    const onExit = nodeTransforms[i2](node, context);
+    if (onExit) {
+      if (shared.isArray(onExit)) {
+        exitFns.push(...onExit);
+      } else {
+        exitFns.push(onExit);
+      }
+    }
+    if (!context.currentNode) {
+      return;
+    } else {
+      node = context.currentNode;
+    }
+  }
+  switch (node.type) {
+    case 3:
+      if (!context.ssr) {
+        context.helper(CREATE_COMMENT);
+      }
+      break;
+    case 5:
+      if (!context.ssr) {
+        context.helper(TO_DISPLAY_STRING);
+      }
+      break;
+    case 9:
+      for (let i2 = 0; i2 < node.branches.length; i2++) {
+        traverseNode(node.branches[i2], context);
+      }
+      break;
+    case 10:
+    case 11:
+    case 1:
+    case 0:
+      traverseChildren(node, context);
+      break;
+  }
+  context.currentNode = node;
+  let i = exitFns.length;
+  while (i--) {
+    exitFns[i]();
+  }
+}
+function createStructuralDirectiveTransform(name, fn) {
+  const matches = shared.isString(name) ? (n) => n === name : (n) => name.test(n);
+  return (node, context) => {
+    if (node.type === 1) {
+      const { props } = node;
+      if (node.tagType === 3 && props.some(isVSlot)) {
+        return;
+      }
+      const exitFns = [];
+      for (let i = 0; i < props.length; i++) {
+        const prop = props[i];
+        if (prop.type === 7 && matches(prop.name)) {
+          props.splice(i, 1);
+          i--;
+          const onExit = fn(node, prop, context);
+          if (onExit)
+            exitFns.push(onExit);
+        }
+      }
+      return exitFns;
+    }
+  };
+}
+
+const PURE_ANNOTATION = `/*#__PURE__*/`;
+const aliasHelper = (s) => `${helperNameMap[s]}: _${helperNameMap[s]}`;
+function createCodegenContext(ast, {
+  mode = "function",
+  prefixIdentifiers = mode === "module",
+  sourceMap = false,
+  filename = `template.vue.html`,
+  scopeId = null,
+  optimizeImports = false,
+  runtimeGlobalName = `Vue`,
+  runtimeModuleName = `vue`,
+  ssrRuntimeModuleName = "vue/server-renderer",
+  ssr = false,
+  isTS = false,
+  inSSR = false
+}) {
+  const context = {
+    mode,
+    prefixIdentifiers,
+    sourceMap,
+    filename,
+    scopeId,
+    optimizeImports,
+    runtimeGlobalName,
+    runtimeModuleName,
+    ssrRuntimeModuleName,
+    ssr,
+    isTS,
+    inSSR,
+    source: ast.source,
+    code: ``,
+    column: 1,
+    line: 1,
+    offset: 0,
+    indentLevel: 0,
+    pure: false,
+    map: void 0,
+    helper(key) {
+      return `_${helperNameMap[key]}`;
+    },
+    push(code, newlineIndex = -2 /* None */, node) {
+      context.code += code;
+      if (context.map) {
+        if (node) {
+          let name;
+          if (node.type === 4 && !node.isStatic) {
+            const content = node.content.replace(/^_ctx\./, "");
+            if (content !== node.content && isSimpleIdentifier(content)) {
+              name = content;
+            }
+          }
+          addMapping(node.loc.start, name);
+        }
+        if (newlineIndex === -3 /* Unknown */) {
+          advancePositionWithMutation(context, code);
+        } else {
+          context.offset += code.length;
+          if (newlineIndex === -2 /* None */) {
+            context.column += code.length;
+          } else {
+            if (newlineIndex === -1 /* End */) {
+              newlineIndex = code.length - 1;
+            }
+            context.line++;
+            context.column = code.length - newlineIndex;
+          }
+        }
+        if (node && node.loc !== locStub) {
+          addMapping(node.loc.end);
+        }
+      }
+    },
+    indent() {
+      newline(++context.indentLevel);
+    },
+    deindent(withoutNewLine = false) {
+      if (withoutNewLine) {
+        --context.indentLevel;
+      } else {
+        newline(--context.indentLevel);
+      }
+    },
+    newline() {
+      newline(context.indentLevel);
+    }
+  };
+  function newline(n) {
+    context.push("\n" + `  `.repeat(n), 0 /* Start */);
+  }
+  function addMapping(loc, name = null) {
+    const { _names, _mappings } = context.map;
+    if (name !== null && !_names.has(name))
+      _names.add(name);
+    _mappings.add({
+      originalLine: loc.line,
+      originalColumn: loc.column - 1,
+      // source-map column is 0 based
+      generatedLine: context.line,
+      generatedColumn: context.column - 1,
+      source: filename,
+      name
+    });
+  }
+  if (sourceMap) {
+    context.map = new sourceMapJs.SourceMapGenerator();
+    context.map.setSourceContent(filename, context.source);
+    context.map._sources.add(filename);
+  }
+  return context;
+}
+function generate(ast, options = {}) {
+  const context = createCodegenContext(ast, options);
+  if (options.onContextCreated)
+    options.onContextCreated(context);
+  const {
+    mode,
+    push,
+    prefixIdentifiers,
+    indent,
+    deindent,
+    newline,
+    scopeId,
+    ssr
+  } = context;
+  const helpers = Array.from(ast.helpers);
+  const hasHelpers = helpers.length > 0;
+  const useWithBlock = !prefixIdentifiers && mode !== "module";
+  const genScopeId = scopeId != null && mode === "module";
+  const isSetupInlined = !!options.inline;
+  const preambleContext = isSetupInlined ? createCodegenContext(ast, options) : context;
+  if (mode === "module") {
+    genModulePreamble(ast, preambleContext, genScopeId, isSetupInlined);
+  } else {
+    genFunctionPreamble(ast, preambleContext);
+  }
+  const functionName = ssr ? `ssrRender` : `render`;
+  const args = ssr ? ["_ctx", "_push", "_parent", "_attrs"] : ["_ctx", "_cache"];
+  if (options.bindingMetadata && !options.inline) {
+    args.push("$props", "$setup", "$data", "$options");
+  }
+  const signature = options.isTS ? args.map((arg) => `${arg}: any`).join(",") : args.join(", ");
+  if (isSetupInlined) {
+    push(`(${signature}) => {`);
+  } else {
+    push(`function ${functionName}(${signature}) {`);
+  }
+  indent();
+  if (useWithBlock) {
+    push(`with (_ctx) {`);
+    indent();
+    if (hasHelpers) {
+      push(
+        `const { ${helpers.map(aliasHelper).join(", ")} } = _Vue
+`,
+        -1 /* End */
+      );
+      newline();
+    }
+  }
+  if (ast.components.length) {
+    genAssets(ast.components, "component", context);
+    if (ast.directives.length || ast.temps > 0) {
+      newline();
+    }
+  }
+  if (ast.directives.length) {
+    genAssets(ast.directives, "directive", context);
+    if (ast.temps > 0) {
+      newline();
+    }
+  }
+  if (ast.filters && ast.filters.length) {
+    newline();
+    genAssets(ast.filters, "filter", context);
+    newline();
+  }
+  if (ast.temps > 0) {
+    push(`let `);
+    for (let i = 0; i < ast.temps; i++) {
+      push(`${i > 0 ? `, ` : ``}_temp${i}`);
+    }
+  }
+  if (ast.components.length || ast.directives.length || ast.temps) {
+    push(`
+`, 0 /* Start */);
+    newline();
+  }
+  if (!ssr) {
+    push(`return `);
+  }
+  if (ast.codegenNode) {
+    genNode(ast.codegenNode, context);
+  } else {
+    push(`null`);
+  }
+  if (useWithBlock) {
+    deindent();
+    push(`}`);
+  }
+  deindent();
+  push(`}`);
+  return {
+    ast,
+    code: context.code,
+    preamble: isSetupInlined ? preambleContext.code : ``,
+    map: context.map ? context.map.toJSON() : void 0
+  };
+}
+function genFunctionPreamble(ast, context) {
+  const {
+    ssr,
+    prefixIdentifiers,
+    push,
+    newline,
+    runtimeModuleName,
+    runtimeGlobalName,
+    ssrRuntimeModuleName
+  } = context;
+  const VueBinding = ssr ? `require(${JSON.stringify(runtimeModuleName)})` : runtimeGlobalName;
+  const helpers = Array.from(ast.helpers);
+  if (helpers.length > 0) {
+    if (prefixIdentifiers) {
+      push(
+        `const { ${helpers.map(aliasHelper).join(", ")} } = ${VueBinding}
+`,
+        -1 /* End */
+      );
+    } else {
+      push(`const _Vue = ${VueBinding}
+`, -1 /* End */);
+      if (ast.hoists.length) {
+        const staticHelpers = [
+          CREATE_VNODE,
+          CREATE_ELEMENT_VNODE,
+          CREATE_COMMENT,
+          CREATE_TEXT,
+          CREATE_STATIC
+        ].filter((helper) => helpers.includes(helper)).map(aliasHelper).join(", ");
+        push(`const { ${staticHelpers} } = _Vue
+`, -1 /* End */);
+      }
+    }
+  }
+  if (ast.ssrHelpers && ast.ssrHelpers.length) {
+    push(
+      `const { ${ast.ssrHelpers.map(aliasHelper).join(", ")} } = require("${ssrRuntimeModuleName}")
+`,
+      -1 /* End */
+    );
+  }
+  genHoists(ast.hoists, context);
+  newline();
+  push(`return `);
+}
+function genModulePreamble(ast, context, genScopeId, inline) {
+  const {
+    push,
+    newline,
+    optimizeImports,
+    runtimeModuleName,
+    ssrRuntimeModuleName
+  } = context;
+  if (genScopeId && ast.hoists.length) {
+    ast.helpers.add(PUSH_SCOPE_ID);
+    ast.helpers.add(POP_SCOPE_ID);
+  }
+  if (ast.helpers.size) {
+    const helpers = Array.from(ast.helpers);
+    if (optimizeImports) {
+      push(
+        `import { ${helpers.map((s) => helperNameMap[s]).join(", ")} } from ${JSON.stringify(runtimeModuleName)}
+`,
+        -1 /* End */
+      );
+      push(
+        `
+// Binding optimization for webpack code-split
+const ${helpers.map((s) => `_${helperNameMap[s]} = ${helperNameMap[s]}`).join(", ")}
+`,
+        -1 /* End */
+      );
+    } else {
+      push(
+        `import { ${helpers.map((s) => `${helperNameMap[s]} as _${helperNameMap[s]}`).join(", ")} } from ${JSON.stringify(runtimeModuleName)}
+`,
+        -1 /* End */
+      );
+    }
+  }
+  if (ast.ssrHelpers && ast.ssrHelpers.length) {
+    push(
+      `import { ${ast.ssrHelpers.map((s) => `${helperNameMap[s]} as _${helperNameMap[s]}`).join(", ")} } from "${ssrRuntimeModuleName}"
+`,
+      -1 /* End */
+    );
+  }
+  if (ast.imports.length) {
+    genImports(ast.imports, context);
+    newline();
+  }
+  genHoists(ast.hoists, context);
+  newline();
+  if (!inline) {
+    push(`export `);
+  }
+}
+function genAssets(assets, type, { helper, push, newline, isTS }) {
+  const resolver = helper(
+    type === "filter" ? RESOLVE_FILTER : type === "component" ? RESOLVE_COMPONENT : RESOLVE_DIRECTIVE
+  );
+  for (let i = 0; i < assets.length; i++) {
+    let id = assets[i];
+    const maybeSelfReference = id.endsWith("__self");
+    if (maybeSelfReference) {
+      id = id.slice(0, -6);
+    }
+    push(
+      `const ${toValidAssetId(id, type)} = ${resolver}(${JSON.stringify(id)}${maybeSelfReference ? `, true` : ``})${isTS ? `!` : ``}`
+    );
+    if (i < assets.length - 1) {
+      newline();
+    }
+  }
+}
+function genHoists(hoists, context) {
+  if (!hoists.length) {
+    return;
+  }
+  context.pure = true;
+  const { push, newline, helper, scopeId, mode } = context;
+  const genScopeId = scopeId != null && mode !== "function";
+  newline();
+  if (genScopeId) {
+    push(
+      `const _withScopeId = n => (${helper(
+        PUSH_SCOPE_ID
+      )}("${scopeId}"),n=n(),${helper(POP_SCOPE_ID)}(),n)`
+    );
+    newline();
+  }
+  for (let i = 0; i < hoists.length; i++) {
+    const exp = hoists[i];
+    if (exp) {
+      const needScopeIdWrapper = genScopeId && exp.type === 13;
+      push(
+        `const _hoisted_${i + 1} = ${needScopeIdWrapper ? `${PURE_ANNOTATION} _withScopeId(() => ` : ``}`
+      );
+      genNode(exp, context);
+      if (needScopeIdWrapper) {
+        push(`)`);
+      }
+      newline();
+    }
+  }
+  context.pure = false;
+}
+function genImports(importsOptions, context) {
+  if (!importsOptions.length) {
+    return;
+  }
+  importsOptions.forEach((imports) => {
+    context.push(`import `);
+    genNode(imports.exp, context);
+    context.push(` from '${imports.path}'`);
+    context.newline();
+  });
+}
+function isText(n) {
+  return shared.isString(n) || n.type === 4 || n.type === 2 || n.type === 5 || n.type === 8;
+}
+function genNodeListAsArray(nodes, context) {
+  const multilines = nodes.length > 3 || nodes.some((n) => shared.isArray(n) || !isText(n));
+  context.push(`[`);
+  multilines && context.indent();
+  genNodeList(nodes, context, multilines);
+  multilines && context.deindent();
+  context.push(`]`);
+}
+function genNodeList(nodes, context, multilines = false, comma = true) {
+  const { push, newline } = context;
+  for (let i = 0; i < nodes.length; i++) {
+    const node = nodes[i];
+    if (shared.isString(node)) {
+      push(node, -3 /* Unknown */);
+    } else if (shared.isArray(node)) {
+      genNodeListAsArray(node, context);
+    } else {
+      genNode(node, context);
+    }
+    if (i < nodes.length - 1) {
+      if (multilines) {
+        comma && push(",");
+        newline();
+      } else {
+        comma && push(", ");
+      }
+    }
+  }
+}
+function genNode(node, context) {
+  if (shared.isString(node)) {
+    context.push(node, -3 /* Unknown */);
+    return;
+  }
+  if (shared.isSymbol(node)) {
+    context.push(context.helper(node));
+    return;
+  }
+  switch (node.type) {
+    case 1:
+    case 9:
+    case 11:
+      genNode(node.codegenNode, context);
+      break;
+    case 2:
+      genText(node, context);
+      break;
+    case 4:
+      genExpression(node, context);
+      break;
+    case 5:
+      genInterpolation(node, context);
+      break;
+    case 12:
+      genNode(node.codegenNode, context);
+      break;
+    case 8:
+      genCompoundExpression(node, context);
+      break;
+    case 3:
+      genComment(node, context);
+      break;
+    case 13:
+      genVNodeCall(node, context);
+      break;
+    case 14:
+      genCallExpression(node, context);
+      break;
+    case 15:
+      genObjectExpression(node, context);
+      break;
+    case 17:
+      genArrayExpression(node, context);
+      break;
+    case 18:
+      genFunctionExpression(node, context);
+      break;
+    case 19:
+      genConditionalExpression(node, context);
+      break;
+    case 20:
+      genCacheExpression(node, context);
+      break;
+    case 21:
+      genNodeList(node.body, context, true, false);
+      break;
+    case 22:
+      genTemplateLiteral(node, context);
+      break;
+    case 23:
+      genIfStatement(node, context);
+      break;
+    case 24:
+      genAssignmentExpression(node, context);
+      break;
+    case 25:
+      genSequenceExpression(node, context);
+      break;
+    case 26:
+      genReturnStatement(node, context);
+      break;
+  }
+}
+function genText(node, context) {
+  context.push(JSON.stringify(node.content), -3 /* Unknown */, node);
+}
+function genExpression(node, context) {
+  const { content, isStatic } = node;
+  context.push(
+    isStatic ? JSON.stringify(content) : content,
+    -3 /* Unknown */,
+    node
+  );
+}
+function genInterpolation(node, context) {
+  const { push, helper, pure } = context;
+  if (pure)
+    push(PURE_ANNOTATION);
+  push(`${helper(TO_DISPLAY_STRING)}(`);
+  genNode(node.content, context);
+  push(`)`);
+}
+function genCompoundExpression(node, context) {
+  for (let i = 0; i < node.children.length; i++) {
+    const child = node.children[i];
+    if (shared.isString(child)) {
+      context.push(child, -3 /* Unknown */);
+    } else {
+      genNode(child, context);
+    }
+  }
+}
+function genExpressionAsPropertyKey(node, context) {
+  const { push } = context;
+  if (node.type === 8) {
+    push(`[`);
+    genCompoundExpression(node, context);
+    push(`]`);
+  } else if (node.isStatic) {
+    const text = isSimpleIdentifier(node.content) ? node.content : JSON.stringify(node.content);
+    push(text, -2 /* None */, node);
+  } else {
+    push(`[${node.content}]`, -3 /* Unknown */, node);
+  }
+}
+function genComment(node, context) {
+  const { push, helper, pure } = context;
+  if (pure) {
+    push(PURE_ANNOTATION);
+  }
+  push(
+    `${helper(CREATE_COMMENT)}(${JSON.stringify(node.content)})`,
+    -3 /* Unknown */,
+    node
+  );
+}
+function genVNodeCall(node, context) {
+  const { push, helper, pure } = context;
+  const {
+    tag,
+    props,
+    children,
+    patchFlag,
+    dynamicProps,
+    directives,
+    isBlock,
+    disableTracking,
+    isComponent
+  } = node;
+  if (directives) {
+    push(helper(WITH_DIRECTIVES) + `(`);
+  }
+  if (isBlock) {
+    push(`(${helper(OPEN_BLOCK)}(${disableTracking ? `true` : ``}), `);
+  }
+  if (pure) {
+    push(PURE_ANNOTATION);
+  }
+  const callHelper = isBlock ? getVNodeBlockHelper(context.inSSR, isComponent) : getVNodeHelper(context.inSSR, isComponent);
+  push(helper(callHelper) + `(`, -2 /* None */, node);
+  genNodeList(
+    genNullableArgs([tag, props, children, patchFlag, dynamicProps]),
+    context
+  );
+  push(`)`);
+  if (isBlock) {
+    push(`)`);
+  }
+  if (directives) {
+    push(`, `);
+    genNode(directives, context);
+    push(`)`);
+  }
+}
+function genNullableArgs(args) {
+  let i = args.length;
+  while (i--) {
+    if (args[i] != null)
+      break;
+  }
+  return args.slice(0, i + 1).map((arg) => arg || `null`);
+}
+function genCallExpression(node, context) {
+  const { push, helper, pure } = context;
+  const callee = shared.isString(node.callee) ? node.callee : helper(node.callee);
+  if (pure) {
+    push(PURE_ANNOTATION);
+  }
+  push(callee + `(`, -2 /* None */, node);
+  genNodeList(node.arguments, context);
+  push(`)`);
+}
+function genObjectExpression(node, context) {
+  const { push, indent, deindent, newline } = context;
+  const { properties } = node;
+  if (!properties.length) {
+    push(`{}`, -2 /* None */, node);
+    return;
+  }
+  const multilines = properties.length > 1 || properties.some((p) => p.value.type !== 4);
+  push(multilines ? `{` : `{ `);
+  multilines && indent();
+  for (let i = 0; i < properties.length; i++) {
+    const { key, value } = properties[i];
+    genExpressionAsPropertyKey(key, context);
+    push(`: `);
+    genNode(value, context);
+    if (i < properties.length - 1) {
+      push(`,`);
+      newline();
+    }
+  }
+  multilines && deindent();
+  push(multilines ? `}` : ` }`);
+}
+function genArrayExpression(node, context) {
+  genNodeListAsArray(node.elements, context);
+}
+function genFunctionExpression(node, context) {
+  const { push, indent, deindent } = context;
+  const { params, returns, body, newline, isSlot } = node;
+  if (isSlot) {
+    push(`_${helperNameMap[WITH_CTX]}(`);
+  }
+  push(`(`, -2 /* None */, node);
+  if (shared.isArray(params)) {
+    genNodeList(params, context);
+  } else if (params) {
+    genNode(params, context);
+  }
+  push(`) => `);
+  if (newline || body) {
+    push(`{`);
+    indent();
+  }
+  if (returns) {
+    if (newline) {
+      push(`return `);
+    }
+    if (shared.isArray(returns)) {
+      genNodeListAsArray(returns, context);
+    } else {
+      genNode(returns, context);
+    }
+  } else if (body) {
+    genNode(body, context);
+  }
+  if (newline || body) {
+    deindent();
+    push(`}`);
+  }
+  if (isSlot) {
+    if (node.isNonScopedSlot) {
+      push(`, undefined, true`);
+    }
+    push(`)`);
+  }
+}
+function genConditionalExpression(node, context) {
+  const { test, consequent, alternate, newline: needNewline } = node;
+  const { push, indent, deindent, newline } = context;
+  if (test.type === 4) {
+    const needsParens = !isSimpleIdentifier(test.content);
+    needsParens && push(`(`);
+    genExpression(test, context);
+    needsParens && push(`)`);
+  } else {
+    push(`(`);
+    genNode(test, context);
+    push(`)`);
+  }
+  needNewline && indent();
+  context.indentLevel++;
+  needNewline || push(` `);
+  push(`? `);
+  genNode(consequent, context);
+  context.indentLevel--;
+  needNewline && newline();
+  needNewline || push(` `);
+  push(`: `);
+  const isNested = alternate.type === 19;
+  if (!isNested) {
+    context.indentLevel++;
+  }
+  genNode(alternate, context);
+  if (!isNested) {
+    context.indentLevel--;
+  }
+  needNewline && deindent(
+    true
+    /* without newline */
+  );
+}
+function genCacheExpression(node, context) {
+  const { push, helper, indent, deindent, newline } = context;
+  push(`_cache[${node.index}] || (`);
+  if (node.isVNode) {
+    indent();
+    push(`${helper(SET_BLOCK_TRACKING)}(-1),`);
+    newline();
+  }
+  push(`_cache[${node.index}] = `);
+  genNode(node.value, context);
+  if (node.isVNode) {
+    push(`,`);
+    newline();
+    push(`${helper(SET_BLOCK_TRACKING)}(1),`);
+    newline();
+    push(`_cache[${node.index}]`);
+    deindent();
+  }
+  push(`)`);
+}
+function genTemplateLiteral(node, context) {
+  const { push, indent, deindent } = context;
+  push("`");
+  const l = node.elements.length;
+  const multilines = l > 3;
+  for (let i = 0; i < l; i++) {
+    const e = node.elements[i];
+    if (shared.isString(e)) {
+      push(e.replace(/(`|\$|\\)/g, "\\$1"), -3 /* Unknown */);
+    } else {
+      push("${");
+      if (multilines)
+        indent();
+      genNode(e, context);
+      if (multilines)
+        deindent();
+      push("}");
+    }
+  }
+  push("`");
+}
+function genIfStatement(node, context) {
+  const { push, indent, deindent } = context;
+  const { test, consequent, alternate } = node;
+  push(`if (`);
+  genNode(test, context);
+  push(`) {`);
+  indent();
+  genNode(consequent, context);
+  deindent();
+  push(`}`);
+  if (alternate) {
+    push(` else `);
+    if (alternate.type === 23) {
+      genIfStatement(alternate, context);
+    } else {
+      push(`{`);
+      indent();
+      genNode(alternate, context);
+      deindent();
+      push(`}`);
+    }
+  }
+}
+function genAssignmentExpression(node, context) {
+  genNode(node.left, context);
+  context.push(` = `);
+  genNode(node.right, context);
+}
+function genSequenceExpression(node, context) {
+  context.push(`(`);
+  genNodeList(node.expressions, context);
+  context.push(`)`);
+}
+function genReturnStatement({ returns }, context) {
+  context.push(`return `);
+  if (shared.isArray(returns)) {
+    genNodeListAsArray(returns, context);
+  } else {
+    genNode(returns, context);
+  }
+}
+
+const isLiteralWhitelisted = /* @__PURE__ */ shared.makeMap("true,false,null,this");
+const transformExpression = (node, context) => {
+  if (node.type === 5) {
+    node.content = processExpression(
+      node.content,
+      context
+    );
+  } else if (node.type === 1) {
+    for (let i = 0; i < node.props.length; i++) {
+      const dir = node.props[i];
+      if (dir.type === 7 && dir.name !== "for") {
+        const exp = dir.exp;
+        const arg = dir.arg;
+        if (exp && exp.type === 4 && !(dir.name === "on" && arg)) {
+          dir.exp = processExpression(
+            exp,
+            context,
+            // slot args must be processed as function params
+            dir.name === "slot"
+          );
+        }
+        if (arg && arg.type === 4 && !arg.isStatic) {
+          dir.arg = processExpression(arg, context);
+        }
+      }
+    }
+  }
+};
+function processExpression(node, context, asParams = false, asRawStatements = false, localVars = Object.create(context.identifiers)) {
+  if (!context.prefixIdentifiers || !node.content.trim()) {
+    return node;
+  }
+  const { inline, bindingMetadata } = context;
+  const rewriteIdentifier = (raw, parent, id) => {
+    const type = shared.hasOwn(bindingMetadata, raw) && bindingMetadata[raw];
+    if (inline) {
+      const isAssignmentLVal = parent && parent.type === "AssignmentExpression" && parent.left === id;
+      const isUpdateArg = parent && parent.type === "UpdateExpression" && parent.argument === id;
+      const isDestructureAssignment = parent && isInDestructureAssignment(parent, parentStack);
+      const isNewExpression = parent && isInNewExpression(parentStack);
+      const wrapWithUnref = (raw2) => {
+        const wrapped = `${context.helperString(UNREF)}(${raw2})`;
+        return isNewExpression ? `(${wrapped})` : wrapped;
+      };
+      if (isConst(type) || type === "setup-reactive-const" || localVars[raw]) {
+        return raw;
+      } else if (type === "setup-ref") {
+        return `${raw}.value`;
+      } else if (type === "setup-maybe-ref") {
+        return isAssignmentLVal || isUpdateArg || isDestructureAssignment ? `${raw}.value` : wrapWithUnref(raw);
+      } else if (type === "setup-let") {
+        if (isAssignmentLVal) {
+          const { right: rVal, operator } = parent;
+          const rExp = rawExp.slice(rVal.start - 1, rVal.end - 1);
+          const rExpString = stringifyExpression(
+            processExpression(
+              createSimpleExpression(rExp, false),
+              context,
+              false,
+              false,
+              knownIds
+            )
+          );
+          return `${context.helperString(IS_REF)}(${raw})${context.isTS ? ` //@ts-ignore
+` : ``} ? ${raw}.value ${operator} ${rExpString} : ${raw}`;
+        } else if (isUpdateArg) {
+          id.start = parent.start;
+          id.end = parent.end;
+          const { prefix: isPrefix, operator } = parent;
+          const prefix = isPrefix ? operator : ``;
+          const postfix = isPrefix ? `` : operator;
+          return `${context.helperString(IS_REF)}(${raw})${context.isTS ? ` //@ts-ignore
+` : ``} ? ${prefix}${raw}.value${postfix} : ${prefix}${raw}${postfix}`;
+        } else if (isDestructureAssignment) {
+          return raw;
+        } else {
+          return wrapWithUnref(raw);
+        }
+      } else if (type === "props") {
+        return shared.genPropsAccessExp(raw);
+      } else if (type === "props-aliased") {
+        return shared.genPropsAccessExp(bindingMetadata.__propsAliases[raw]);
+      }
+    } else {
+      if (type && type.startsWith("setup") || type === "literal-const") {
+        return `$setup.${raw}`;
+      } else if (type === "props-aliased") {
+        return `$props['${bindingMetadata.__propsAliases[raw]}']`;
+      } else if (type) {
+        return `$${type}.${raw}`;
+      }
+    }
+    return `_ctx.${raw}`;
+  };
+  const rawExp = node.content;
+  let ast = node.ast;
+  if (ast === false) {
+    return node;
+  }
+  if (ast === null || !ast && isSimpleIdentifier(rawExp)) {
+    const isScopeVarReference = context.identifiers[rawExp];
+    const isAllowedGlobal = shared.isGloballyAllowed(rawExp);
+    const isLiteral = isLiteralWhitelisted(rawExp);
+    if (!asParams && !isScopeVarReference && !isLiteral && (!isAllowedGlobal || bindingMetadata[rawExp])) {
+      if (isConst(bindingMetadata[rawExp])) {
+        node.constType = 1;
+      }
+      node.content = rewriteIdentifier(rawExp);
+    } else if (!isScopeVarReference) {
+      if (isLiteral) {
+        node.constType = 3;
+      } else {
+        node.constType = 2;
+      }
+    }
+    return node;
+  }
+  if (!ast) {
+    const source = asRawStatements ? ` ${rawExp} ` : `(${rawExp})${asParams ? `=>{}` : ``}`;
+    try {
+      ast = parser.parseExpression(source, {
+        sourceType: "module",
+        plugins: context.expressionPlugins
+      });
+    } catch (e) {
+      context.onError(
+        createCompilerError(
+          45,
+          node.loc,
+          void 0,
+          e.message
+        )
+      );
+      return node;
+    }
+  }
+  const ids = [];
+  const parentStack = [];
+  const knownIds = Object.create(context.identifiers);
+  walkIdentifiers(
+    ast,
+    (node2, parent, _, isReferenced, isLocal) => {
+      if (isStaticPropertyKey(node2, parent)) {
+        return;
+      }
+      if (node2.name.startsWith("_filter_")) {
+        return;
+      }
+      const needPrefix = isReferenced && canPrefix(node2);
+      if (needPrefix && !isLocal) {
+        if (isStaticProperty(parent) && parent.shorthand) {
+          node2.prefix = `${node2.name}: `;
+        }
+        node2.name = rewriteIdentifier(node2.name, parent, node2);
+        ids.push(node2);
+      } else {
+        if (!(needPrefix && isLocal) && parent.type !== "CallExpression" && parent.type !== "NewExpression" && parent.type !== "MemberExpression") {
+          node2.isConstant = true;
+        }
+        ids.push(node2);
+      }
+    },
+    true,
+    // invoke on ALL identifiers
+    parentStack,
+    knownIds
+  );
+  const children = [];
+  ids.sort((a, b) => a.start - b.start);
+  ids.forEach((id, i) => {
+    const start = id.start - 1;
+    const end = id.end - 1;
+    const last = ids[i - 1];
+    const leadingText = rawExp.slice(last ? last.end - 1 : 0, start);
+    if (leadingText.length || id.prefix) {
+      children.push(leadingText + (id.prefix || ``));
+    }
+    const source = rawExp.slice(start, end);
+    children.push(
+      createSimpleExpression(
+        id.name,
+        false,
+        {
+          start: advancePositionWithClone(node.loc.start, source, start),
+          end: advancePositionWithClone(node.loc.start, source, end),
+          source
+        },
+        id.isConstant ? 3 : 0
+      )
+    );
+    if (i === ids.length - 1 && end < rawExp.length) {
+      children.push(rawExp.slice(end));
+    }
+  });
+  let ret;
+  if (children.length) {
+    ret = createCompoundExpression(children, node.loc);
+    ret.ast = ast;
+  } else {
+    ret = node;
+    ret.constType = 3;
+  }
+  ret.identifiers = Object.keys(knownIds);
+  return ret;
+}
+function canPrefix(id) {
+  if (shared.isGloballyAllowed(id.name)) {
+    return false;
+  }
+  if (id.name === "require") {
+    return false;
+  }
+  return true;
+}
+function stringifyExpression(exp) {
+  if (shared.isString(exp)) {
+    return exp;
+  } else if (exp.type === 4) {
+    return exp.content;
+  } else {
+    return exp.children.map(stringifyExpression).join("");
+  }
+}
+function isConst(type) {
+  return type === "setup-const" || type === "literal-const";
+}
+
+const transformIf = createStructuralDirectiveTransform(
+  /^(if|else|else-if)$/,
+  (node, dir, context) => {
+    return processIf(node, dir, context, (ifNode, branch, isRoot) => {
+      const siblings = context.parent.children;
+      let i = siblings.indexOf(ifNode);
+      let key = 0;
+      while (i-- >= 0) {
+        const sibling = siblings[i];
+        if (sibling && sibling.type === 9) {
+          key += sibling.branches.length;
+        }
+      }
+      return () => {
+        if (isRoot) {
+          ifNode.codegenNode = createCodegenNodeForBranch(
+            branch,
+            key,
+            context
+          );
+        } else {
+          const parentCondition = getParentCondition(ifNode.codegenNode);
+          parentCondition.alternate = createCodegenNodeForBranch(
+            branch,
+            key + ifNode.branches.length - 1,
+            context
+          );
+        }
+      };
+    });
+  }
+);
+function processIf(node, dir, context, processCodegen) {
+  if (dir.name !== "else" && (!dir.exp || !dir.exp.content.trim())) {
+    const loc = dir.exp ? dir.exp.loc : node.loc;
+    context.onError(
+      createCompilerError(28, dir.loc)
+    );
+    dir.exp = createSimpleExpression(`true`, false, loc);
+  }
+  if (context.prefixIdentifiers && dir.exp) {
+    dir.exp = processExpression(dir.exp, context);
+  }
+  if (dir.name === "if") {
+    const branch = createIfBranch(node, dir);
+    const ifNode = {
+      type: 9,
+      loc: node.loc,
+      branches: [branch]
+    };
+    context.replaceNode(ifNode);
+    if (processCodegen) {
+      return processCodegen(ifNode, branch, true);
+    }
+  } else {
+    const siblings = context.parent.children;
+    let i = siblings.indexOf(node);
+    while (i-- >= -1) {
+      const sibling = siblings[i];
+      if (sibling && sibling.type === 3) {
+        context.removeNode(sibling);
+        continue;
+      }
+      if (sibling && sibling.type === 2 && !sibling.content.trim().length) {
+        context.removeNode(sibling);
+        continue;
+      }
+      if (sibling && sibling.type === 9) {
+        if (dir.name === "else-if" && sibling.branches[sibling.branches.length - 1].condition === void 0) {
+          context.onError(
+            createCompilerError(30, node.loc)
+          );
+        }
+        context.removeNode();
+        const branch = createIfBranch(node, dir);
+        {
+          const key = branch.userKey;
+          if (key) {
+            sibling.branches.forEach(({ userKey }) => {
+              if (isSameKey(userKey, key)) {
+                context.onError(
+                  createCompilerError(
+                    29,
+                    branch.userKey.loc
+                  )
+                );
+              }
+            });
+          }
+        }
+        sibling.branches.push(branch);
+        const onExit = processCodegen && processCodegen(sibling, branch, false);
+        traverseNode(branch, context);
+        if (onExit)
+          onExit();
+        context.currentNode = null;
+      } else {
+        context.onError(
+          createCompilerError(30, node.loc)
+        );
+      }
+      break;
+    }
+  }
+}
+function createIfBranch(node, dir) {
+  const isTemplateIf = node.tagType === 3;
+  return {
+    type: 10,
+    loc: node.loc,
+    condition: dir.name === "else" ? void 0 : dir.exp,
+    children: isTemplateIf && !findDir(node, "for") ? node.children : [node],
+    userKey: findProp(node, `key`),
+    isTemplateIf
+  };
+}
+function createCodegenNodeForBranch(branch, keyIndex, context) {
+  if (branch.condition) {
+    return createConditionalExpression(
+      branch.condition,
+      createChildrenCodegenNode(branch, keyIndex, context),
+      // make sure to pass in asBlock: true so that the comment node call
+      // closes the current block.
+      createCallExpression(context.helper(CREATE_COMMENT), [
+        '""',
+        "true"
+      ])
+    );
+  } else {
+    return createChildrenCodegenNode(branch, keyIndex, context);
+  }
+}
+function createChildrenCodegenNode(branch, keyIndex, context) {
+  const { helper } = context;
+  const keyProperty = createObjectProperty(
+    `key`,
+    createSimpleExpression(
+      `${keyIndex}`,
+      false,
+      locStub,
+      2
+    )
+  );
+  const { children } = branch;
+  const firstChild = children[0];
+  const needFragmentWrapper = children.length !== 1 || firstChild.type !== 1;
+  if (needFragmentWrapper) {
+    if (children.length === 1 && firstChild.type === 11) {
+      const vnodeCall = firstChild.codegenNode;
+      injectProp(vnodeCall, keyProperty, context);
+      return vnodeCall;
+    } else {
+      let patchFlag = 64;
+      shared.PatchFlagNames[64];
+      return createVNodeCall(
+        context,
+        helper(FRAGMENT),
+        createObjectExpression([keyProperty]),
+        children,
+        patchFlag + (``),
+        void 0,
+        void 0,
+        true,
+        false,
+        false,
+        branch.loc
+      );
+    }
+  } else {
+    const ret = firstChild.codegenNode;
+    const vnodeCall = getMemoedVNodeCall(ret);
+    if (vnodeCall.type === 13) {
+      convertToBlock(vnodeCall, context);
+    }
+    injectProp(vnodeCall, keyProperty, context);
+    return ret;
+  }
+}
+function isSameKey(a, b) {
+  if (!a || a.type !== b.type) {
+    return false;
+  }
+  if (a.type === 6) {
+    if (a.value.content !== b.value.content) {
+      return false;
+    }
+  } else {
+    const exp = a.exp;
+    const branchExp = b.exp;
+    if (exp.type !== branchExp.type) {
+      return false;
+    }
+    if (exp.type !== 4 || exp.isStatic !== branchExp.isStatic || exp.content !== branchExp.content) {
+      return false;
+    }
+  }
+  return true;
+}
+function getParentCondition(node) {
+  while (true) {
+    if (node.type === 19) {
+      if (node.alternate.type === 19) {
+        node = node.alternate;
+      } else {
+        return node;
+      }
+    } else if (node.type === 20) {
+      node = node.value;
+    }
+  }
+}
+
+const transformFor = createStructuralDirectiveTransform(
+  "for",
+  (node, dir, context) => {
+    const { helper, removeHelper } = context;
+    return processFor(node, dir, context, (forNode) => {
+      const renderExp = createCallExpression(helper(RENDER_LIST), [
+        forNode.source
+      ]);
+      const isTemplate = isTemplateNode(node);
+      const memo = findDir(node, "memo");
+      const keyProp = findProp(node, `key`);
+      const keyExp = keyProp && (keyProp.type === 6 ? createSimpleExpression(keyProp.value.content, true) : keyProp.exp);
+      const keyProperty = keyProp ? createObjectProperty(`key`, keyExp) : null;
+      if (isTemplate) {
+        if (memo) {
+          memo.exp = processExpression(
+            memo.exp,
+            context
+          );
+        }
+        if (keyProperty && keyProp.type !== 6) {
+          keyProperty.value = processExpression(
+            keyProperty.value,
+            context
+          );
+        }
+      }
+      const isStableFragment = forNode.source.type === 4 && forNode.source.constType > 0;
+      const fragmentFlag = isStableFragment ? 64 : keyProp ? 128 : 256;
+      forNode.codegenNode = createVNodeCall(
+        context,
+        helper(FRAGMENT),
+        void 0,
+        renderExp,
+        fragmentFlag + (``),
+        void 0,
+        void 0,
+        true,
+        !isStableFragment,
+        false,
+        node.loc
+      );
+      return () => {
+        let childBlock;
+        const { children } = forNode;
+        if (isTemplate) {
+          node.children.some((c) => {
+            if (c.type === 1) {
+              const key = findProp(c, "key");
+              if (key) {
+                context.onError(
+                  createCompilerError(
+                    33,
+                    key.loc
+                  )
+                );
+                return true;
+              }
+            }
+          });
+        }
+        const needFragmentWrapper = children.length !== 1 || children[0].type !== 1;
+        const slotOutlet = isSlotOutlet(node) ? node : isTemplate && node.children.length === 1 && isSlotOutlet(node.children[0]) ? node.children[0] : null;
+        if (slotOutlet) {
+          childBlock = slotOutlet.codegenNode;
+          if (isTemplate && keyProperty) {
+            injectProp(childBlock, keyProperty, context);
+          }
+        } else if (needFragmentWrapper) {
+          childBlock = createVNodeCall(
+            context,
+            helper(FRAGMENT),
+            keyProperty ? createObjectExpression([keyProperty]) : void 0,
+            node.children,
+            64 + (``),
+            void 0,
+            void 0,
+            true,
+            void 0,
+            false
+          );
+        } else {
+          childBlock = children[0].codegenNode;
+          if (isTemplate && keyProperty) {
+            injectProp(childBlock, keyProperty, context);
+          }
+          if (childBlock.isBlock !== !isStableFragment) {
+            if (childBlock.isBlock) {
+              removeHelper(OPEN_BLOCK);
+              removeHelper(
+                getVNodeBlockHelper(context.inSSR, childBlock.isComponent)
+              );
+            } else {
+              removeHelper(
+                getVNodeHelper(context.inSSR, childBlock.isComponent)
+              );
+            }
+          }
+          childBlock.isBlock = !isStableFragment;
+          if (childBlock.isBlock) {
+            helper(OPEN_BLOCK);
+            helper(getVNodeBlockHelper(context.inSSR, childBlock.isComponent));
+          } else {
+            helper(getVNodeHelper(context.inSSR, childBlock.isComponent));
+          }
+        }
+        if (memo) {
+          const loop = createFunctionExpression(
+            createForLoopParams(forNode.parseResult, [
+              createSimpleExpression(`_cached`)
+            ])
+          );
+          loop.body = createBlockStatement([
+            createCompoundExpression([`const _memo = (`, memo.exp, `)`]),
+            createCompoundExpression([
+              `if (_cached`,
+              ...keyExp ? [` && _cached.key === `, keyExp] : [],
+              ` && ${context.helperString(
+                IS_MEMO_SAME
+              )}(_cached, _memo)) return _cached`
+            ]),
+            createCompoundExpression([`const _item = `, childBlock]),
+            createSimpleExpression(`_item.memo = _memo`),
+            createSimpleExpression(`return _item`)
+          ]);
+          renderExp.arguments.push(
+            loop,
+            createSimpleExpression(`_cache`),
+            createSimpleExpression(String(context.cached++))
+          );
+        } else {
+          renderExp.arguments.push(
+            createFunctionExpression(
+              createForLoopParams(forNode.parseResult),
+              childBlock,
+              true
+            )
+          );
+        }
+      };
+    });
+  }
+);
+function processFor(node, dir, context, processCodegen) {
+  if (!dir.exp) {
+    context.onError(
+      createCompilerError(31, dir.loc)
+    );
+    return;
+  }
+  const parseResult = dir.forParseResult;
+  if (!parseResult) {
+    context.onError(
+      createCompilerError(32, dir.loc)
+    );
+    return;
+  }
+  finalizeForParseResult(parseResult, context);
+  const { addIdentifiers, removeIdentifiers, scopes } = context;
+  const { source, value, key, index } = parseResult;
+  const forNode = {
+    type: 11,
+    loc: dir.loc,
+    source,
+    valueAlias: value,
+    keyAlias: key,
+    objectIndexAlias: index,
+    parseResult,
+    children: isTemplateNode(node) ? node.children : [node]
+  };
+  context.replaceNode(forNode);
+  scopes.vFor++;
+  if (context.prefixIdentifiers) {
+    value && addIdentifiers(value);
+    key && addIdentifiers(key);
+    index && addIdentifiers(index);
+  }
+  const onExit = processCodegen && processCodegen(forNode);
+  return () => {
+    scopes.vFor--;
+    if (context.prefixIdentifiers) {
+      value && removeIdentifiers(value);
+      key && removeIdentifiers(key);
+      index && removeIdentifiers(index);
+    }
+    if (onExit)
+      onExit();
+  };
+}
+function finalizeForParseResult(result, context) {
+  if (result.finalized)
+    return;
+  if (context.prefixIdentifiers) {
+    result.source = processExpression(
+      result.source,
+      context
+    );
+    if (result.key) {
+      result.key = processExpression(
+        result.key,
+        context,
+        true
+      );
+    }
+    if (result.index) {
+      result.index = processExpression(
+        result.index,
+        context,
+        true
+      );
+    }
+    if (result.value) {
+      result.value = processExpression(
+        result.value,
+        context,
+        true
+      );
+    }
+  }
+  result.finalized = true;
+}
+function createForLoopParams({ value, key, index }, memoArgs = []) {
+  return createParamsList([value, key, index, ...memoArgs]);
+}
+function createParamsList(args) {
+  let i = args.length;
+  while (i--) {
+    if (args[i])
+      break;
+  }
+  return args.slice(0, i + 1).map((arg, i2) => arg || createSimpleExpression(`_`.repeat(i2 + 1), false));
+}
+
+const defaultFallback = createSimpleExpression(`undefined`, false);
+const trackSlotScopes = (node, context) => {
+  if (node.type === 1 && (node.tagType === 1 || node.tagType === 3)) {
+    const vSlot = findDir(node, "slot");
+    if (vSlot) {
+      const slotProps = vSlot.exp;
+      if (context.prefixIdentifiers) {
+        slotProps && context.addIdentifiers(slotProps);
+      }
+      context.scopes.vSlot++;
+      return () => {
+        if (context.prefixIdentifiers) {
+          slotProps && context.removeIdentifiers(slotProps);
+        }
+        context.scopes.vSlot--;
+      };
+    }
+  }
+};
+const trackVForSlotScopes = (node, context) => {
+  let vFor;
+  if (isTemplateNode(node) && node.props.some(isVSlot) && (vFor = findDir(node, "for"))) {
+    const result = vFor.forParseResult;
+    if (result) {
+      finalizeForParseResult(result, context);
+      const { value, key, index } = result;
+      const { addIdentifiers, removeIdentifiers } = context;
+      value && addIdentifiers(value);
+      key && addIdentifiers(key);
+      index && addIdentifiers(index);
+      return () => {
+        value && removeIdentifiers(value);
+        key && removeIdentifiers(key);
+        index && removeIdentifiers(index);
+      };
+    }
+  }
+};
+const buildClientSlotFn = (props, _vForExp, children, loc) => createFunctionExpression(
+  props,
+  children,
+  false,
+  true,
+  children.length ? children[0].loc : loc
+);
+function buildSlots(node, context, buildSlotFn = buildClientSlotFn) {
+  context.helper(WITH_CTX);
+  const { children, loc } = node;
+  const slotsProperties = [];
+  const dynamicSlots = [];
+  let hasDynamicSlots = context.scopes.vSlot > 0 || context.scopes.vFor > 0;
+  if (!context.ssr && context.prefixIdentifiers) {
+    hasDynamicSlots = hasScopeRef(node, context.identifiers);
+  }
+  const onComponentSlot = findDir(node, "slot", true);
+  if (onComponentSlot) {
+    const { arg, exp } = onComponentSlot;
+    if (arg && !isStaticExp(arg)) {
+      hasDynamicSlots = true;
+    }
+    slotsProperties.push(
+      createObjectProperty(
+        arg || createSimpleExpression("default", true),
+        buildSlotFn(exp, void 0, children, loc)
+      )
+    );
+  }
+  let hasTemplateSlots = false;
+  let hasNamedDefaultSlot = false;
+  const implicitDefaultChildren = [];
+  const seenSlotNames = /* @__PURE__ */ new Set();
+  let conditionalBranchIndex = 0;
+  for (let i = 0; i < children.length; i++) {
+    const slotElement = children[i];
+    let slotDir;
+    if (!isTemplateNode(slotElement) || !(slotDir = findDir(slotElement, "slot", true))) {
+      if (slotElement.type !== 3) {
+        implicitDefaultChildren.push(slotElement);
+      }
+      continue;
+    }
+    if (onComponentSlot) {
+      context.onError(
+        createCompilerError(37, slotDir.loc)
+      );
+      break;
+    }
+    hasTemplateSlots = true;
+    const { children: slotChildren, loc: slotLoc } = slotElement;
+    const {
+      arg: slotName = createSimpleExpression(`default`, true),
+      exp: slotProps,
+      loc: dirLoc
+    } = slotDir;
+    let staticSlotName;
+    if (isStaticExp(slotName)) {
+      staticSlotName = slotName ? slotName.content : `default`;
+    } else {
+      hasDynamicSlots = true;
+    }
+    const vFor = findDir(slotElement, "for");
+    const slotFunction = buildSlotFn(slotProps, vFor, slotChildren, slotLoc);
+    let vIf;
+    let vElse;
+    if (vIf = findDir(slotElement, "if")) {
+      hasDynamicSlots = true;
+      dynamicSlots.push(
+        createConditionalExpression(
+          vIf.exp,
+          buildDynamicSlot(slotName, slotFunction, conditionalBranchIndex++),
+          defaultFallback
+        )
+      );
+    } else if (vElse = findDir(
+      slotElement,
+      /^else(-if)?$/,
+      true
+      /* allowEmpty */
+    )) {
+      let j = i;
+      let prev;
+      while (j--) {
+        prev = children[j];
+        if (prev.type !== 3) {
+          break;
+        }
+      }
+      if (prev && isTemplateNode(prev) && findDir(prev, "if")) {
+        children.splice(i, 1);
+        i--;
+        let conditional = dynamicSlots[dynamicSlots.length - 1];
+        while (conditional.alternate.type === 19) {
+          conditional = conditional.alternate;
+        }
+        conditional.alternate = vElse.exp ? createConditionalExpression(
+          vElse.exp,
+          buildDynamicSlot(
+            slotName,
+            slotFunction,
+            conditionalBranchIndex++
+          ),
+          defaultFallback
+        ) : buildDynamicSlot(slotName, slotFunction, conditionalBranchIndex++);
+      } else {
+        context.onError(
+          createCompilerError(30, vElse.loc)
+        );
+      }
+    } else if (vFor) {
+      hasDynamicSlots = true;
+      const parseResult = vFor.forParseResult;
+      if (parseResult) {
+        finalizeForParseResult(parseResult, context);
+        dynamicSlots.push(
+          createCallExpression(context.helper(RENDER_LIST), [
+            parseResult.source,
+            createFunctionExpression(
+              createForLoopParams(parseResult),
+              buildDynamicSlot(slotName, slotFunction),
+              true
+            )
+          ])
+        );
+      } else {
+        context.onError(
+          createCompilerError(
+            32,
+            vFor.loc
+          )
+        );
+      }
+    } else {
+      if (staticSlotName) {
+        if (seenSlotNames.has(staticSlotName)) {
+          context.onError(
+            createCompilerError(
+              38,
+              dirLoc
+            )
+          );
+          continue;
+        }
+        seenSlotNames.add(staticSlotName);
+        if (staticSlotName === "default") {
+          hasNamedDefaultSlot = true;
+        }
+      }
+      slotsProperties.push(createObjectProperty(slotName, slotFunction));
+    }
+  }
+  if (!onComponentSlot) {
+    const buildDefaultSlotProperty = (props, children2) => {
+      const fn = buildSlotFn(props, void 0, children2, loc);
+      if (context.compatConfig) {
+        fn.isNonScopedSlot = true;
+      }
+      return createObjectProperty(`default`, fn);
+    };
+    if (!hasTemplateSlots) {
+      slotsProperties.push(buildDefaultSlotProperty(void 0, children));
+    } else if (implicitDefaultChildren.length && // #3766
+    // with whitespace: 'preserve', whitespaces between slots will end up in
+    // implicitDefaultChildren. Ignore if all implicit children are whitespaces.
+    implicitDefaultChildren.some((node2) => isNonWhitespaceContent(node2))) {
+      if (hasNamedDefaultSlot) {
+        context.onError(
+          createCompilerError(
+            39,
+            implicitDefaultChildren[0].loc
+          )
+        );
+      } else {
+        slotsProperties.push(
+          buildDefaultSlotProperty(void 0, implicitDefaultChildren)
+        );
+      }
+    }
+  }
+  const slotFlag = hasDynamicSlots ? 2 : hasForwardedSlots(node.children) ? 3 : 1;
+  let slots = createObjectExpression(
+    slotsProperties.concat(
+      createObjectProperty(
+        `_`,
+        // 2 = compiled but dynamic = can skip normalization, but must run diff
+        // 1 = compiled and static = can skip normalization AND diff as optimized
+        createSimpleExpression(
+          slotFlag + (``),
+          false
+        )
+      )
+    ),
+    loc
+  );
+  if (dynamicSlots.length) {
+    slots = createCallExpression(context.helper(CREATE_SLOTS), [
+      slots,
+      createArrayExpression(dynamicSlots)
+    ]);
+  }
+  return {
+    slots,
+    hasDynamicSlots
+  };
+}
+function buildDynamicSlot(name, fn, index) {
+  const props = [
+    createObjectProperty(`name`, name),
+    createObjectProperty(`fn`, fn)
+  ];
+  if (index != null) {
+    props.push(
+      createObjectProperty(`key`, createSimpleExpression(String(index), true))
+    );
+  }
+  return createObjectExpression(props);
+}
+function hasForwardedSlots(children) {
+  for (let i = 0; i < children.length; i++) {
+    const child = children[i];
+    switch (child.type) {
+      case 1:
+        if (child.tagType === 2 || hasForwardedSlots(child.children)) {
+          return true;
+        }
+        break;
+      case 9:
+        if (hasForwardedSlots(child.branches))
+          return true;
+        break;
+      case 10:
+      case 11:
+        if (hasForwardedSlots(child.children))
+          return true;
+        break;
+    }
+  }
+  return false;
+}
+function isNonWhitespaceContent(node) {
+  if (node.type !== 2 && node.type !== 12)
+    return true;
+  return node.type === 2 ? !!node.content.trim() : isNonWhitespaceContent(node.content);
+}
+
+const directiveImportMap = /* @__PURE__ */ new WeakMap();
+const transformElement = (node, context) => {
+  return function postTransformElement() {
+    node = context.currentNode;
+    if (!(node.type === 1 && (node.tagType === 0 || node.tagType === 1))) {
+      return;
+    }
+    const { tag, props } = node;
+    const isComponent = node.tagType === 1;
+    let vnodeTag = isComponent ? resolveComponentType(node, context) : `"${tag}"`;
+    const isDynamicComponent = shared.isObject(vnodeTag) && vnodeTag.callee === RESOLVE_DYNAMIC_COMPONENT;
+    let vnodeProps;
+    let vnodeChildren;
+    let vnodePatchFlag;
+    let patchFlag = 0;
+    let vnodeDynamicProps;
+    let dynamicPropNames;
+    let vnodeDirectives;
+    let shouldUseBlock = (
+      // dynamic component may resolve to plain elements
+      isDynamicComponent || vnodeTag === TELEPORT || vnodeTag === SUSPENSE || !isComponent && // <svg> and <foreignObject> must be forced into blocks so that block
+      // updates inside get proper isSVG flag at runtime. (#639, #643)
+      // This is technically web-specific, but splitting the logic out of core
+      // leads to too much unnecessary complexity.
+      (tag === "svg" || tag === "foreignObject")
+    );
+    if (props.length > 0) {
+      const propsBuildResult = buildProps(
+        node,
+        context,
+        void 0,
+        isComponent,
+        isDynamicComponent
+      );
+      vnodeProps = propsBuildResult.props;
+      patchFlag = propsBuildResult.patchFlag;
+      dynamicPropNames = propsBuildResult.dynamicPropNames;
+      const directives = propsBuildResult.directives;
+      vnodeDirectives = directives && directives.length ? createArrayExpression(
+        directives.map((dir) => buildDirectiveArgs(dir, context))
+      ) : void 0;
+      if (propsBuildResult.shouldUseBlock) {
+        shouldUseBlock = true;
+      }
+    }
+    if (node.children.length > 0) {
+      if (vnodeTag === KEEP_ALIVE) {
+        shouldUseBlock = true;
+        patchFlag |= 1024;
+      }
+      const shouldBuildAsSlots = isComponent && // Teleport is not a real component and has dedicated runtime handling
+      vnodeTag !== TELEPORT && // explained above.
+      vnodeTag !== KEEP_ALIVE;
+      if (shouldBuildAsSlots) {
+        const { slots, hasDynamicSlots } = buildSlots(node, context);
+        vnodeChildren = slots;
+        if (hasDynamicSlots) {
+          patchFlag |= 1024;
+        }
+      } else if (node.children.length === 1 && vnodeTag !== TELEPORT) {
+        const child = node.children[0];
+        const type = child.type;
+        const hasDynamicTextChild = type === 5 || type === 8;
+        if (hasDynamicTextChild && getConstantType(child, context) === 0) {
+          patchFlag |= 1;
+        }
+        if (hasDynamicTextChild || type === 2) {
+          vnodeChildren = child;
+        } else {
+          vnodeChildren = node.children;
+        }
+      } else {
+        vnodeChildren = node.children;
+      }
+    }
+    if (patchFlag !== 0) {
+      {
+        vnodePatchFlag = String(patchFlag);
+      }
+      if (dynamicPropNames && dynamicPropNames.length) {
+        vnodeDynamicProps = stringifyDynamicPropNames(dynamicPropNames);
+      }
+    }
+    node.codegenNode = createVNodeCall(
+      context,
+      vnodeTag,
+      vnodeProps,
+      vnodeChildren,
+      vnodePatchFlag,
+      vnodeDynamicProps,
+      vnodeDirectives,
+      !!shouldUseBlock,
+      false,
+      isComponent,
+      node.loc
+    );
+  };
+};
+function resolveComponentType(node, context, ssr = false) {
+  let { tag } = node;
+  const isExplicitDynamic = isComponentTag(tag);
+  const isProp = findProp(
+    node,
+    "is",
+    false,
+    true
+    /* allow empty */
+  );
+  if (isProp) {
+    if (isExplicitDynamic || isCompatEnabled(
+      "COMPILER_IS_ON_ELEMENT",
+      context
+    )) {
+      let exp;
+      if (isProp.type === 6) {
+        exp = isProp.value && createSimpleExpression(isProp.value.content, true);
+      } else {
+        exp = isProp.exp;
+        if (!exp) {
+          exp = createSimpleExpression(`is`, false, isProp.loc);
+          {
+            exp = isProp.exp = processExpression(exp, context);
+          }
+        }
+      }
+      if (exp) {
+        return createCallExpression(context.helper(RESOLVE_DYNAMIC_COMPONENT), [
+          exp
+        ]);
+      }
+    } else if (isProp.type === 6 && isProp.value.content.startsWith("vue:")) {
+      tag = isProp.value.content.slice(4);
+    }
+  }
+  const builtIn = isCoreComponent(tag) || context.isBuiltInComponent(tag);
+  if (builtIn) {
+    if (!ssr)
+      context.helper(builtIn);
+    return builtIn;
+  }
+  {
+    const fromSetup = resolveSetupReference(tag, context);
+    if (fromSetup) {
+      return fromSetup;
+    }
+    const dotIndex = tag.indexOf(".");
+    if (dotIndex > 0) {
+      const ns = resolveSetupReference(tag.slice(0, dotIndex), context);
+      if (ns) {
+        return ns + tag.slice(dotIndex);
+      }
+    }
+  }
+  if (context.selfName && shared.capitalize(shared.camelize(tag)) === context.selfName) {
+    context.helper(RESOLVE_COMPONENT);
+    context.components.add(tag + `__self`);
+    return toValidAssetId(tag, `component`);
+  }
+  context.helper(RESOLVE_COMPONENT);
+  context.components.add(tag);
+  return toValidAssetId(tag, `component`);
+}
+function resolveSetupReference(name, context) {
+  const bindings = context.bindingMetadata;
+  if (!bindings || bindings.__isScriptSetup === false) {
+    return;
+  }
+  const camelName = shared.camelize(name);
+  const PascalName = shared.capitalize(camelName);
+  const checkType = (type) => {
+    if (bindings[name] === type) {
+      return name;
+    }
+    if (bindings[camelName] === type) {
+      return camelName;
+    }
+    if (bindings[PascalName] === type) {
+      return PascalName;
+    }
+  };
+  const fromConst = checkType("setup-const") || checkType("setup-reactive-const") || checkType("literal-const");
+  if (fromConst) {
+    return context.inline ? (
+      // in inline mode, const setup bindings (e.g. imports) can be used as-is
+      fromConst
+    ) : `$setup[${JSON.stringify(fromConst)}]`;
+  }
+  const fromMaybeRef = checkType("setup-let") || checkType("setup-ref") || checkType("setup-maybe-ref");
+  if (fromMaybeRef) {
+    return context.inline ? (
+      // setup scope bindings that may be refs need to be unrefed
+      `${context.helperString(UNREF)}(${fromMaybeRef})`
+    ) : `$setup[${JSON.stringify(fromMaybeRef)}]`;
+  }
+  const fromProps = checkType("props");
+  if (fromProps) {
+    return `${context.helperString(UNREF)}(${context.inline ? "__props" : "$props"}[${JSON.stringify(fromProps)}])`;
+  }
+}
+function buildProps(node, context, props = node.props, isComponent, isDynamicComponent, ssr = false) {
+  const { tag, loc: elementLoc, children } = node;
+  let properties = [];
+  const mergeArgs = [];
+  const runtimeDirectives = [];
+  const hasChildren = children.length > 0;
+  let shouldUseBlock = false;
+  let patchFlag = 0;
+  let hasRef = false;
+  let hasClassBinding = false;
+  let hasStyleBinding = false;
+  let hasHydrationEventBinding = false;
+  let hasDynamicKeys = false;
+  let hasVnodeHook = false;
+  const dynamicPropNames = [];
+  const pushMergeArg = (arg) => {
+    if (properties.length) {
+      mergeArgs.push(
+        createObjectExpression(dedupeProperties(properties), elementLoc)
+      );
+      properties = [];
+    }
+    if (arg)
+      mergeArgs.push(arg);
+  };
+  const pushRefVForMarker = () => {
+    if (context.scopes.vFor > 0) {
+      properties.push(
+        createObjectProperty(
+          createSimpleExpression("ref_for", true),
+          createSimpleExpression("true")
+        )
+      );
+    }
+  };
+  const analyzePatchFlag = ({ key, value }) => {
+    if (isStaticExp(key)) {
+      const name = key.content;
+      const isEventHandler = shared.isOn(name);
+      if (isEventHandler && (!isComponent || isDynamicComponent) && // omit the flag for click handlers because hydration gives click
+      // dedicated fast path.
+      name.toLowerCase() !== "onclick" && // omit v-model handlers
+      name !== "onUpdate:modelValue" && // omit onVnodeXXX hooks
+      !shared.isReservedProp(name)) {
+        hasHydrationEventBinding = true;
+      }
+      if (isEventHandler && shared.isReservedProp(name)) {
+        hasVnodeHook = true;
+      }
+      if (isEventHandler && value.type === 14) {
+        value = value.arguments[0];
+      }
+      if (value.type === 20 || (value.type === 4 || value.type === 8) && getConstantType(value, context) > 0) {
+        return;
+      }
+      if (name === "ref") {
+        hasRef = true;
+      } else if (name === "class") {
+        hasClassBinding = true;
+      } else if (name === "style") {
+        hasStyleBinding = true;
+      } else if (name !== "key" && !dynamicPropNames.includes(name)) {
+        dynamicPropNames.push(name);
+      }
+      if (isComponent && (name === "class" || name === "style") && !dynamicPropNames.includes(name)) {
+        dynamicPropNames.push(name);
+      }
+    } else {
+      hasDynamicKeys = true;
+    }
+  };
+  for (let i = 0; i < props.length; i++) {
+    const prop = props[i];
+    if (prop.type === 6) {
+      const { loc, name, nameLoc, value } = prop;
+      let isStatic = true;
+      if (name === "ref") {
+        hasRef = true;
+        pushRefVForMarker();
+        if (value && context.inline) {
+          const binding = context.bindingMetadata[value.content];
+          if (binding === "setup-let" || binding === "setup-ref" || binding === "setup-maybe-ref") {
+            isStatic = false;
+            properties.push(
+              createObjectProperty(
+                createSimpleExpression("ref_key", true),
+                createSimpleExpression(value.content, true, value.loc)
+              )
+            );
+          }
+        }
+      }
+      if (name === "is" && (isComponentTag(tag) || value && value.content.startsWith("vue:") || isCompatEnabled(
+        "COMPILER_IS_ON_ELEMENT",
+        context
+      ))) {
+        continue;
+      }
+      properties.push(
+        createObjectProperty(
+          createSimpleExpression(name, true, nameLoc),
+          createSimpleExpression(
+            value ? value.content : "",
+            isStatic,
+            value ? value.loc : loc
+          )
+        )
+      );
+    } else {
+      const { name, arg, exp, loc, modifiers } = prop;
+      const isVBind = name === "bind";
+      const isVOn = name === "on";
+      if (name === "slot") {
+        if (!isComponent) {
+          context.onError(
+            createCompilerError(40, loc)
+          );
+        }
+        continue;
+      }
+      if (name === "once" || name === "memo") {
+        continue;
+      }
+      if (name === "is" || isVBind && isStaticArgOf(arg, "is") && (isComponentTag(tag) || isCompatEnabled(
+        "COMPILER_IS_ON_ELEMENT",
+        context
+      ))) {
+        continue;
+      }
+      if (isVOn && ssr) {
+        continue;
+      }
+      if (
+        // #938: elements with dynamic keys should be forced into blocks
+        isVBind && isStaticArgOf(arg, "key") || // inline before-update hooks need to force block so that it is invoked
+        // before children
+        isVOn && hasChildren && isStaticArgOf(arg, "vue:before-update")
+      ) {
+        shouldUseBlock = true;
+      }
+      if (isVBind && isStaticArgOf(arg, "ref")) {
+        pushRefVForMarker();
+      }
+      if (!arg && (isVBind || isVOn)) {
+        hasDynamicKeys = true;
+        if (exp) {
+          if (isVBind) {
+            pushRefVForMarker();
+            pushMergeArg();
+            {
+              if (isCompatEnabled(
+                "COMPILER_V_BIND_OBJECT_ORDER",
+                context
+              )) {
+                mergeArgs.unshift(exp);
+                continue;
+              }
+            }
+            mergeArgs.push(exp);
+          } else {
+            pushMergeArg({
+              type: 14,
+              loc,
+              callee: context.helper(TO_HANDLERS),
+              arguments: isComponent ? [exp] : [exp, `true`]
+            });
+          }
+        } else {
+          context.onError(
+            createCompilerError(
+              isVBind ? 34 : 35,
+              loc
+            )
+          );
+        }
+        continue;
+      }
+      if (isVBind && modifiers.includes("prop")) {
+        patchFlag |= 32;
+      }
+      const directiveTransform = context.directiveTransforms[name];
+      if (directiveTransform) {
+        const { props: props2, needRuntime } = directiveTransform(prop, node, context);
+        !ssr && props2.forEach(analyzePatchFlag);
+        if (isVOn && arg && !isStaticExp(arg)) {
+          pushMergeArg(createObjectExpression(props2, elementLoc));
+        } else {
+          properties.push(...props2);
+        }
+        if (needRuntime) {
+          runtimeDirectives.push(prop);
+          if (shared.isSymbol(needRuntime)) {
+            directiveImportMap.set(prop, needRuntime);
+          }
+        }
+      } else if (!shared.isBuiltInDirective(name)) {
+        runtimeDirectives.push(prop);
+        if (hasChildren) {
+          shouldUseBlock = true;
+        }
+      }
+    }
+  }
+  let propsExpression = void 0;
+  if (mergeArgs.length) {
+    pushMergeArg();
+    if (mergeArgs.length > 1) {
+      propsExpression = createCallExpression(
+        context.helper(MERGE_PROPS),
+        mergeArgs,
+        elementLoc
+      );
+    } else {
+      propsExpression = mergeArgs[0];
+    }
+  } else if (properties.length) {
+    propsExpression = createObjectExpression(
+      dedupeProperties(properties),
+      elementLoc
+    );
+  }
+  if (hasDynamicKeys) {
+    patchFlag |= 16;
+  } else {
+    if (hasClassBinding && !isComponent) {
+      patchFlag |= 2;
+    }
+    if (hasStyleBinding && !isComponent) {
+      patchFlag |= 4;
+    }
+    if (dynamicPropNames.length) {
+      patchFlag |= 8;
+    }
+    if (hasHydrationEventBinding) {
+      patchFlag |= 32;
+    }
+  }
+  if (!shouldUseBlock && (patchFlag === 0 || patchFlag === 32) && (hasRef || hasVnodeHook || runtimeDirectives.length > 0)) {
+    patchFlag |= 512;
+  }
+  if (!context.inSSR && propsExpression) {
+    switch (propsExpression.type) {
+      case 15:
+        let classKeyIndex = -1;
+        let styleKeyIndex = -1;
+        let hasDynamicKey = false;
+        for (let i = 0; i < propsExpression.properties.length; i++) {
+          const key = propsExpression.properties[i].key;
+          if (isStaticExp(key)) {
+            if (key.content === "class") {
+              classKeyIndex = i;
+            } else if (key.content === "style") {
+              styleKeyIndex = i;
+            }
+          } else if (!key.isHandlerKey) {
+            hasDynamicKey = true;
+          }
+        }
+        const classProp = propsExpression.properties[classKeyIndex];
+        const styleProp = propsExpression.properties[styleKeyIndex];
+        if (!hasDynamicKey) {
+          if (classProp && !isStaticExp(classProp.value)) {
+            classProp.value = createCallExpression(
+              context.helper(NORMALIZE_CLASS),
+              [classProp.value]
+            );
+          }
+          if (styleProp && // the static style is compiled into an object,
+          // so use `hasStyleBinding` to ensure that it is a dynamic style binding
+          (hasStyleBinding || styleProp.value.type === 4 && styleProp.value.content.trim()[0] === `[` || // v-bind:style and style both exist,
+          // v-bind:style with static literal object
+          styleProp.value.type === 17)) {
+            styleProp.value = createCallExpression(
+              context.helper(NORMALIZE_STYLE),
+              [styleProp.value]
+            );
+          }
+        } else {
+          propsExpression = createCallExpression(
+            context.helper(NORMALIZE_PROPS),
+            [propsExpression]
+          );
+        }
+        break;
+      case 14:
+        break;
+      default:
+        propsExpression = createCallExpression(
+          context.helper(NORMALIZE_PROPS),
+          [
+            createCallExpression(context.helper(GUARD_REACTIVE_PROPS), [
+              propsExpression
+            ])
+          ]
+        );
+        break;
+    }
+  }
+  return {
+    props: propsExpression,
+    directives: runtimeDirectives,
+    patchFlag,
+    dynamicPropNames,
+    shouldUseBlock
+  };
+}
+function dedupeProperties(properties) {
+  const knownProps = /* @__PURE__ */ new Map();
+  const deduped = [];
+  for (let i = 0; i < properties.length; i++) {
+    const prop = properties[i];
+    if (prop.key.type === 8 || !prop.key.isStatic) {
+      deduped.push(prop);
+      continue;
+    }
+    const name = prop.key.content;
+    const existing = knownProps.get(name);
+    if (existing) {
+      if (name === "style" || name === "class" || shared.isOn(name)) {
+        mergeAsArray(existing, prop);
+      }
+    } else {
+      knownProps.set(name, prop);
+      deduped.push(prop);
+    }
+  }
+  return deduped;
+}
+function mergeAsArray(existing, incoming) {
+  if (existing.value.type === 17) {
+    existing.value.elements.push(incoming.value);
+  } else {
+    existing.value = createArrayExpression(
+      [existing.value, incoming.value],
+      existing.loc
+    );
+  }
+}
+function buildDirectiveArgs(dir, context) {
+  const dirArgs = [];
+  const runtime = directiveImportMap.get(dir);
+  if (runtime) {
+    dirArgs.push(context.helperString(runtime));
+  } else {
+    const fromSetup = resolveSetupReference("v-" + dir.name, context);
+    if (fromSetup) {
+      dirArgs.push(fromSetup);
+    } else {
+      context.helper(RESOLVE_DIRECTIVE);
+      context.directives.add(dir.name);
+      dirArgs.push(toValidAssetId(dir.name, `directive`));
+    }
+  }
+  const { loc } = dir;
+  if (dir.exp)
+    dirArgs.push(dir.exp);
+  if (dir.arg) {
+    if (!dir.exp) {
+      dirArgs.push(`void 0`);
+    }
+    dirArgs.push(dir.arg);
+  }
+  if (Object.keys(dir.modifiers).length) {
+    if (!dir.arg) {
+      if (!dir.exp) {
+        dirArgs.push(`void 0`);
+      }
+      dirArgs.push(`void 0`);
+    }
+    const trueExpression = createSimpleExpression(`true`, false, loc);
+    dirArgs.push(
+      createObjectExpression(
+        dir.modifiers.map(
+          (modifier) => createObjectProperty(modifier, trueExpression)
+        ),
+        loc
+      )
+    );
+  }
+  return createArrayExpression(dirArgs, dir.loc);
+}
+function stringifyDynamicPropNames(props) {
+  let propsNamesString = `[`;
+  for (let i = 0, l = props.length; i < l; i++) {
+    propsNamesString += JSON.stringify(props[i]);
+    if (i < l - 1)
+      propsNamesString += ", ";
+  }
+  return propsNamesString + `]`;
+}
+function isComponentTag(tag) {
+  return tag === "component" || tag === "Component";
+}
+
+const transformSlotOutlet = (node, context) => {
+  if (isSlotOutlet(node)) {
+    const { children, loc } = node;
+    const { slotName, slotProps } = processSlotOutlet(node, context);
+    const slotArgs = [
+      context.prefixIdentifiers ? `_ctx.$slots` : `$slots`,
+      slotName,
+      "{}",
+      "undefined",
+      "true"
+    ];
+    let expectedLen = 2;
+    if (slotProps) {
+      slotArgs[2] = slotProps;
+      expectedLen = 3;
+    }
+    if (children.length) {
+      slotArgs[3] = createFunctionExpression([], children, false, false, loc);
+      expectedLen = 4;
+    }
+    if (context.scopeId && !context.slotted) {
+      expectedLen = 5;
+    }
+    slotArgs.splice(expectedLen);
+    node.codegenNode = createCallExpression(
+      context.helper(RENDER_SLOT),
+      slotArgs,
+      loc
+    );
+  }
+};
+function processSlotOutlet(node, context) {
+  let slotName = `"default"`;
+  let slotProps = void 0;
+  const nonNameProps = [];
+  for (let i = 0; i < node.props.length; i++) {
+    const p = node.props[i];
+    if (p.type === 6) {
+      if (p.value) {
+        if (p.name === "name") {
+          slotName = JSON.stringify(p.value.content);
+        } else {
+          p.name = shared.camelize(p.name);
+          nonNameProps.push(p);
+        }
+      }
+    } else {
+      if (p.name === "bind" && isStaticArgOf(p.arg, "name")) {
+        if (p.exp) {
+          slotName = p.exp;
+        } else if (p.arg && p.arg.type === 4) {
+          const name = shared.camelize(p.arg.content);
+          slotName = p.exp = createSimpleExpression(name, false, p.arg.loc);
+          {
+            slotName = p.exp = processExpression(p.exp, context);
+          }
+        }
+      } else {
+        if (p.name === "bind" && p.arg && isStaticExp(p.arg)) {
+          p.arg.content = shared.camelize(p.arg.content);
+        }
+        nonNameProps.push(p);
+      }
+    }
+  }
+  if (nonNameProps.length > 0) {
+    const { props, directives } = buildProps(
+      node,
+      context,
+      nonNameProps,
+      false,
+      false
+    );
+    slotProps = props;
+    if (directives.length) {
+      context.onError(
+        createCompilerError(
+          36,
+          directives[0].loc
+        )
+      );
+    }
+  }
+  return {
+    slotName,
+    slotProps
+  };
+}
+
+const fnExpRE = /^\s*(async\s*)?(\([^)]*?\)|[\w$_]+)\s*(:[^=]+)?=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/;
+const transformOn = (dir, node, context, augmentor) => {
+  const { loc, modifiers, arg } = dir;
+  if (!dir.exp && !modifiers.length) {
+    context.onError(createCompilerError(35, loc));
+  }
+  let eventName;
+  if (arg.type === 4) {
+    if (arg.isStatic) {
+      let rawName = arg.content;
+      if (rawName.startsWith("vue:")) {
+        rawName = `vnode-${rawName.slice(4)}`;
+      }
+      const eventString = node.tagType !== 0 || rawName.startsWith("vnode") || !/[A-Z]/.test(rawName) ? (
+        // for non-element and vnode lifecycle event listeners, auto convert
+        // it to camelCase. See issue #2249
+        shared.toHandlerKey(shared.camelize(rawName))
+      ) : (
+        // preserve case for plain element listeners that have uppercase
+        // letters, as these may be custom elements' custom events
+        `on:${rawName}`
+      );
+      eventName = createSimpleExpression(eventString, true, arg.loc);
+    } else {
+      eventName = createCompoundExpression([
+        `${context.helperString(TO_HANDLER_KEY)}(`,
+        arg,
+        `)`
+      ]);
+    }
+  } else {
+    eventName = arg;
+    eventName.children.unshift(`${context.helperString(TO_HANDLER_KEY)}(`);
+    eventName.children.push(`)`);
+  }
+  let exp = dir.exp;
+  if (exp && !exp.content.trim()) {
+    exp = void 0;
+  }
+  let shouldCache = context.cacheHandlers && !exp && !context.inVOnce;
+  if (exp) {
+    const isMemberExp = isMemberExpression(exp.content, context);
+    const isInlineStatement = !(isMemberExp || fnExpRE.test(exp.content));
+    const hasMultipleStatements = exp.content.includes(`;`);
+    if (context.prefixIdentifiers) {
+      isInlineStatement && context.addIdentifiers(`$event`);
+      exp = dir.exp = processExpression(
+        exp,
+        context,
+        false,
+        hasMultipleStatements
+      );
+      isInlineStatement && context.removeIdentifiers(`$event`);
+      shouldCache = context.cacheHandlers && // unnecessary to cache inside v-once
+      !context.inVOnce && // runtime constants don't need to be cached
+      // (this is analyzed by compileScript in SFC <script setup>)
+      !(exp.type === 4 && exp.constType > 0) && // #1541 bail if this is a member exp handler passed to a component -
+      // we need to use the original function to preserve arity,
+      // e.g. <transition> relies on checking cb.length to determine
+      // transition end handling. Inline function is ok since its arity
+      // is preserved even when cached.
+      !(isMemberExp && node.tagType === 1) && // bail if the function references closure variables (v-for, v-slot)
+      // it must be passed fresh to avoid stale values.
+      !hasScopeRef(exp, context.identifiers);
+      if (shouldCache && isMemberExp) {
+        if (exp.type === 4) {
+          exp.content = `${exp.content} && ${exp.content}(...args)`;
+        } else {
+          exp.children = [...exp.children, ` && `, ...exp.children, `(...args)`];
+        }
+      }
+    }
+    if (isInlineStatement || shouldCache && isMemberExp) {
+      exp = createCompoundExpression([
+        `${isInlineStatement ? context.isTS ? `($event: any)` : `$event` : `${context.isTS ? `
+//@ts-ignore
+` : ``}(...args)`} => ${hasMultipleStatements ? `{` : `(`}`,
+        exp,
+        hasMultipleStatements ? `}` : `)`
+      ]);
+    }
+  }
+  let ret = {
+    props: [
+      createObjectProperty(
+        eventName,
+        exp || createSimpleExpression(`() => {}`, false, loc)
+      )
+    ]
+  };
+  if (augmentor) {
+    ret = augmentor(ret);
+  }
+  if (shouldCache) {
+    ret.props[0].value = context.cache(ret.props[0].value);
+  }
+  ret.props.forEach((p) => p.key.isHandlerKey = true);
+  return ret;
+};
+
+const transformBind = (dir, _node, context) => {
+  const { modifiers, loc } = dir;
+  const arg = dir.arg;
+  let { exp } = dir;
+  if (exp && exp.type === 4 && !exp.content.trim()) {
+    {
+      context.onError(
+        createCompilerError(34, loc)
+      );
+      return {
+        props: [
+          createObjectProperty(arg, createSimpleExpression("", true, loc))
+        ]
+      };
+    }
+  }
+  if (!exp) {
+    if (arg.type !== 4 || !arg.isStatic) {
+      context.onError(
+        createCompilerError(
+          52,
+          arg.loc
+        )
+      );
+      return {
+        props: [
+          createObjectProperty(arg, createSimpleExpression("", true, loc))
+        ]
+      };
+    }
+    const propName = shared.camelize(arg.content);
+    exp = dir.exp = createSimpleExpression(propName, false, arg.loc);
+    {
+      exp = dir.exp = processExpression(exp, context);
+    }
+  }
+  if (arg.type !== 4) {
+    arg.children.unshift(`(`);
+    arg.children.push(`) || ""`);
+  } else if (!arg.isStatic) {
+    arg.content = `${arg.content} || ""`;
+  }
+  if (modifiers.includes("camel")) {
+    if (arg.type === 4) {
+      if (arg.isStatic) {
+        arg.content = shared.camelize(arg.content);
+      } else {
+        arg.content = `${context.helperString(CAMELIZE)}(${arg.content})`;
+      }
+    } else {
+      arg.children.unshift(`${context.helperString(CAMELIZE)}(`);
+      arg.children.push(`)`);
+    }
+  }
+  if (!context.inSSR) {
+    if (modifiers.includes("prop")) {
+      injectPrefix(arg, ".");
+    }
+    if (modifiers.includes("attr")) {
+      injectPrefix(arg, "^");
+    }
+  }
+  return {
+    props: [createObjectProperty(arg, exp)]
+  };
+};
+const injectPrefix = (arg, prefix) => {
+  if (arg.type === 4) {
+    if (arg.isStatic) {
+      arg.content = prefix + arg.content;
+    } else {
+      arg.content = `\`${prefix}\${${arg.content}}\``;
+    }
+  } else {
+    arg.children.unshift(`'${prefix}' + (`);
+    arg.children.push(`)`);
+  }
+};
+
+const transformText = (node, context) => {
+  if (node.type === 0 || node.type === 1 || node.type === 11 || node.type === 10) {
+    return () => {
+      const children = node.children;
+      let currentContainer = void 0;
+      let hasText = false;
+      for (let i = 0; i < children.length; i++) {
+        const child = children[i];
+        if (isText$1(child)) {
+          hasText = true;
+          for (let j = i + 1; j < children.length; j++) {
+            const next = children[j];
+            if (isText$1(next)) {
+              if (!currentContainer) {
+                currentContainer = children[i] = createCompoundExpression(
+                  [child],
+                  child.loc
+                );
+              }
+              currentContainer.children.push(` + `, next);
+              children.splice(j, 1);
+              j--;
+            } else {
+              currentContainer = void 0;
+              break;
+            }
+          }
+        }
+      }
+      if (!hasText || // if this is a plain element with a single text child, leave it
+      // as-is since the runtime has dedicated fast path for this by directly
+      // setting textContent of the element.
+      // for component root it's always normalized anyway.
+      children.length === 1 && (node.type === 0 || node.type === 1 && node.tagType === 0 && // #3756
+      // custom directives can potentially add DOM elements arbitrarily,
+      // we need to avoid setting textContent of the element at runtime
+      // to avoid accidentally overwriting the DOM elements added
+      // by the user through custom directives.
+      !node.props.find(
+        (p) => p.type === 7 && !context.directiveTransforms[p.name]
+      ) && // in compat mode, <template> tags with no special directives
+      // will be rendered as a fragment so its children must be
+      // converted into vnodes.
+      !(node.tag === "template"))) {
+        return;
+      }
+      for (let i = 0; i < children.length; i++) {
+        const child = children[i];
+        if (isText$1(child) || child.type === 8) {
+          const callArgs = [];
+          if (child.type !== 2 || child.content !== " ") {
+            callArgs.push(child);
+          }
+          if (!context.ssr && getConstantType(child, context) === 0) {
+            callArgs.push(
+              1 + (``)
+            );
+          }
+          children[i] = {
+            type: 12,
+            content: child,
+            loc: child.loc,
+            codegenNode: createCallExpression(
+              context.helper(CREATE_TEXT),
+              callArgs
+            )
+          };
+        }
+      }
+    };
+  }
+};
+
+const seen$1 = /* @__PURE__ */ new WeakSet();
+const transformOnce = (node, context) => {
+  if (node.type === 1 && findDir(node, "once", true)) {
+    if (seen$1.has(node) || context.inVOnce || context.inSSR) {
+      return;
+    }
+    seen$1.add(node);
+    context.inVOnce = true;
+    context.helper(SET_BLOCK_TRACKING);
+    return () => {
+      context.inVOnce = false;
+      const cur = context.currentNode;
+      if (cur.codegenNode) {
+        cur.codegenNode = context.cache(
+          cur.codegenNode,
+          true
+          /* isVNode */
+        );
+      }
+    };
+  }
+};
+
+const transformModel = (dir, node, context) => {
+  const { exp, arg } = dir;
+  if (!exp) {
+    context.onError(
+      createCompilerError(41, dir.loc)
+    );
+    return createTransformProps();
+  }
+  const rawExp = exp.loc.source;
+  const expString = exp.type === 4 ? exp.content : rawExp;
+  const bindingType = context.bindingMetadata[rawExp];
+  if (bindingType === "props" || bindingType === "props-aliased") {
+    context.onError(createCompilerError(44, exp.loc));
+    return createTransformProps();
+  }
+  const maybeRef = context.inline && (bindingType === "setup-let" || bindingType === "setup-ref" || bindingType === "setup-maybe-ref");
+  if (!expString.trim() || !isMemberExpression(expString, context) && !maybeRef) {
+    context.onError(
+      createCompilerError(42, exp.loc)
+    );
+    return createTransformProps();
+  }
+  if (context.prefixIdentifiers && isSimpleIdentifier(expString) && context.identifiers[expString]) {
+    context.onError(
+      createCompilerError(43, exp.loc)
+    );
+    return createTransformProps();
+  }
+  const propName = arg ? arg : createSimpleExpression("modelValue", true);
+  const eventName = arg ? isStaticExp(arg) ? `onUpdate:${shared.camelize(arg.content)}` : createCompoundExpression(['"onUpdate:" + ', arg]) : `onUpdate:modelValue`;
+  let assignmentExp;
+  const eventArg = context.isTS ? `($event: any)` : `$event`;
+  if (maybeRef) {
+    if (bindingType === "setup-ref") {
+      assignmentExp = createCompoundExpression([
+        `${eventArg} => ((`,
+        createSimpleExpression(rawExp, false, exp.loc),
+        `).value = $event)`
+      ]);
+    } else {
+      const altAssignment = bindingType === "setup-let" ? `${rawExp} = $event` : `null`;
+      assignmentExp = createCompoundExpression([
+        `${eventArg} => (${context.helperString(IS_REF)}(${rawExp}) ? (`,
+        createSimpleExpression(rawExp, false, exp.loc),
+        `).value = $event : ${altAssignment})`
+      ]);
+    }
+  } else {
+    assignmentExp = createCompoundExpression([
+      `${eventArg} => ((`,
+      exp,
+      `) = $event)`
+    ]);
+  }
+  const props = [
+    // modelValue: foo
+    createObjectProperty(propName, dir.exp),
+    // "onUpdate:modelValue": $event => (foo = $event)
+    createObjectProperty(eventName, assignmentExp)
+  ];
+  if (context.prefixIdentifiers && !context.inVOnce && context.cacheHandlers && !hasScopeRef(exp, context.identifiers)) {
+    props[1].value = context.cache(props[1].value);
+  }
+  if (dir.modifiers.length && node.tagType === 1) {
+    const modifiers = dir.modifiers.map((m) => (isSimpleIdentifier(m) ? m : JSON.stringify(m)) + `: true`).join(`, `);
+    const modifiersKey = arg ? isStaticExp(arg) ? `${arg.content}Modifiers` : createCompoundExpression([arg, ' + "Modifiers"']) : `modelModifiers`;
+    props.push(
+      createObjectProperty(
+        modifiersKey,
+        createSimpleExpression(
+          `{ ${modifiers} }`,
+          false,
+          dir.loc,
+          2
+        )
+      )
+    );
+  }
+  return createTransformProps(props);
+};
+function createTransformProps(props = []) {
+  return { props };
+}
+
+const validDivisionCharRE = /[\w).+\-_$\]]/;
+const transformFilter = (node, context) => {
+  if (!isCompatEnabled("COMPILER_FILTERS", context)) {
+    return;
+  }
+  if (node.type === 5) {
+    rewriteFilter(node.content, context);
+  }
+  if (node.type === 1) {
+    node.props.forEach((prop) => {
+      if (prop.type === 7 && prop.name !== "for" && prop.exp) {
+        rewriteFilter(prop.exp, context);
+      }
+    });
+  }
+};
+function rewriteFilter(node, context) {
+  if (node.type === 4) {
+    parseFilter(node, context);
+  } else {
+    for (let i = 0; i < node.children.length; i++) {
+      const child = node.children[i];
+      if (typeof child !== "object")
+        continue;
+      if (child.type === 4) {
+        parseFilter(child, context);
+      } else if (child.type === 8) {
+        rewriteFilter(node, context);
+      } else if (child.type === 5) {
+        rewriteFilter(child.content, context);
+      }
+    }
+  }
+}
+function parseFilter(node, context) {
+  const exp = node.content;
+  let inSingle = false;
+  let inDouble = false;
+  let inTemplateString = false;
+  let inRegex = false;
+  let curly = 0;
+  let square = 0;
+  let paren = 0;
+  let lastFilterIndex = 0;
+  let c, prev, i, expression, filters = [];
+  for (i = 0; i < exp.length; i++) {
+    prev = c;
+    c = exp.charCodeAt(i);
+    if (inSingle) {
+      if (c === 39 && prev !== 92)
+        inSingle = false;
+    } else if (inDouble) {
+      if (c === 34 && prev !== 92)
+        inDouble = false;
+    } else if (inTemplateString) {
+      if (c === 96 && prev !== 92)
+        inTemplateString = false;
+    } else if (inRegex) {
+      if (c === 47 && prev !== 92)
+        inRegex = false;
+    } else if (c === 124 && // pipe
+    exp.charCodeAt(i + 1) !== 124 && exp.charCodeAt(i - 1) !== 124 && !curly && !square && !paren) {
+      if (expression === void 0) {
+        lastFilterIndex = i + 1;
+        expression = exp.slice(0, i).trim();
+      } else {
+        pushFilter();
+      }
+    } else {
+      switch (c) {
+        case 34:
+          inDouble = true;
+          break;
+        case 39:
+          inSingle = true;
+          break;
+        case 96:
+          inTemplateString = true;
+          break;
+        case 40:
+          paren++;
+          break;
+        case 41:
+          paren--;
+          break;
+        case 91:
+          square++;
+          break;
+        case 93:
+          square--;
+          break;
+        case 123:
+          curly++;
+          break;
+        case 125:
+          curly--;
+          break;
+      }
+      if (c === 47) {
+        let j = i - 1;
+        let p;
+        for (; j >= 0; j--) {
+          p = exp.charAt(j);
+          if (p !== " ")
+            break;
+        }
+        if (!p || !validDivisionCharRE.test(p)) {
+          inRegex = true;
+        }
+      }
+    }
+  }
+  if (expression === void 0) {
+    expression = exp.slice(0, i).trim();
+  } else if (lastFilterIndex !== 0) {
+    pushFilter();
+  }
+  function pushFilter() {
+    filters.push(exp.slice(lastFilterIndex, i).trim());
+    lastFilterIndex = i + 1;
+  }
+  if (filters.length) {
+    for (i = 0; i < filters.length; i++) {
+      expression = wrapFilter(expression, filters[i], context);
+    }
+    node.content = expression;
+  }
+}
+function wrapFilter(exp, filter, context) {
+  context.helper(RESOLVE_FILTER);
+  const i = filter.indexOf("(");
+  if (i < 0) {
+    context.filters.add(filter);
+    return `${toValidAssetId(filter, "filter")}(${exp})`;
+  } else {
+    const name = filter.slice(0, i);
+    const args = filter.slice(i + 1);
+    context.filters.add(name);
+    return `${toValidAssetId(name, "filter")}(${exp}${args !== ")" ? "," + args : args}`;
+  }
+}
+
+const seen = /* @__PURE__ */ new WeakSet();
+const transformMemo = (node, context) => {
+  if (node.type === 1) {
+    const dir = findDir(node, "memo");
+    if (!dir || seen.has(node)) {
+      return;
+    }
+    seen.add(node);
+    return () => {
+      const codegenNode = node.codegenNode || context.currentNode.codegenNode;
+      if (codegenNode && codegenNode.type === 13) {
+        if (node.tagType !== 1) {
+          convertToBlock(codegenNode, context);
+        }
+        node.codegenNode = createCallExpression(context.helper(WITH_MEMO), [
+          dir.exp,
+          createFunctionExpression(void 0, codegenNode),
+          `_cache`,
+          String(context.cached++)
+        ]);
+      }
+    };
+  }
+};
+
+function getBaseTransformPreset(prefixIdentifiers) {
+  return [
+    [
+      transformOnce,
+      transformIf,
+      transformMemo,
+      transformFor,
+      ...[transformFilter] ,
+      ...prefixIdentifiers ? [
+        // order is important
+        trackVForSlotScopes,
+        transformExpression
+      ] : [],
+      transformSlotOutlet,
+      transformElement,
+      trackSlotScopes,
+      transformText
+    ],
+    {
+      on: transformOn,
+      bind: transformBind,
+      model: transformModel
+    }
+  ];
+}
+function baseCompile(source, options = {}) {
+  const onError = options.onError || defaultOnError;
+  const isModuleMode = options.mode === "module";
+  const prefixIdentifiers = options.prefixIdentifiers === true || isModuleMode;
+  if (!prefixIdentifiers && options.cacheHandlers) {
+    onError(createCompilerError(49));
+  }
+  if (options.scopeId && !isModuleMode) {
+    onError(createCompilerError(50));
+  }
+  const resolvedOptions = shared.extend({}, options, {
+    prefixIdentifiers
+  });
+  const ast = shared.isString(source) ? baseParse(source, resolvedOptions) : source;
+  const [nodeTransforms, directiveTransforms] = getBaseTransformPreset(prefixIdentifiers);
+  if (options.isTS) {
+    const { expressionPlugins } = options;
+    if (!expressionPlugins || !expressionPlugins.includes("typescript")) {
+      options.expressionPlugins = [...expressionPlugins || [], "typescript"];
+    }
+  }
+  transform(
+    ast,
+    shared.extend({}, resolvedOptions, {
+      nodeTransforms: [
+        ...nodeTransforms,
+        ...options.nodeTransforms || []
+        // user transforms
+      ],
+      directiveTransforms: shared.extend(
+        {},
+        directiveTransforms,
+        options.directiveTransforms || {}
+        // user transforms
+      )
+    })
+  );
+  return generate(ast, resolvedOptions);
+}
+
+const BindingTypes = {
+  "DATA": "data",
+  "PROPS": "props",
+  "PROPS_ALIASED": "props-aliased",
+  "SETUP_LET": "setup-let",
+  "SETUP_CONST": "setup-const",
+  "SETUP_REACTIVE_CONST": "setup-reactive-const",
+  "SETUP_MAYBE_REF": "setup-maybe-ref",
+  "SETUP_REF": "setup-ref",
+  "OPTIONS": "options",
+  "LITERAL_CONST": "literal-const"
+};
+
+const noopDirectiveTransform = () => ({ props: [] });
+
+exports.generateCodeFrame = shared.generateCodeFrame;
+exports.BASE_TRANSITION = BASE_TRANSITION;
+exports.BindingTypes = BindingTypes;
+exports.CAMELIZE = CAMELIZE;
+exports.CAPITALIZE = CAPITALIZE;
+exports.CREATE_BLOCK = CREATE_BLOCK;
+exports.CREATE_COMMENT = CREATE_COMMENT;
+exports.CREATE_ELEMENT_BLOCK = CREATE_ELEMENT_BLOCK;
+exports.CREATE_ELEMENT_VNODE = CREATE_ELEMENT_VNODE;
+exports.CREATE_SLOTS = CREATE_SLOTS;
+exports.CREATE_STATIC = CREATE_STATIC;
+exports.CREATE_TEXT = CREATE_TEXT;
+exports.CREATE_VNODE = CREATE_VNODE;
+exports.CompilerDeprecationTypes = CompilerDeprecationTypes;
+exports.ConstantTypes = ConstantTypes;
+exports.ElementTypes = ElementTypes;
+exports.ErrorCodes = ErrorCodes;
+exports.FRAGMENT = FRAGMENT;
+exports.GUARD_REACTIVE_PROPS = GUARD_REACTIVE_PROPS;
+exports.IS_MEMO_SAME = IS_MEMO_SAME;
+exports.IS_REF = IS_REF;
+exports.KEEP_ALIVE = KEEP_ALIVE;
+exports.MERGE_PROPS = MERGE_PROPS;
+exports.NORMALIZE_CLASS = NORMALIZE_CLASS;
+exports.NORMALIZE_PROPS = NORMALIZE_PROPS;
+exports.NORMALIZE_STYLE = NORMALIZE_STYLE;
+exports.Namespaces = Namespaces;
+exports.NodeTypes = NodeTypes;
+exports.OPEN_BLOCK = OPEN_BLOCK;
+exports.POP_SCOPE_ID = POP_SCOPE_ID;
+exports.PUSH_SCOPE_ID = PUSH_SCOPE_ID;
+exports.RENDER_LIST = RENDER_LIST;
+exports.RENDER_SLOT = RENDER_SLOT;
+exports.RESOLVE_COMPONENT = RESOLVE_COMPONENT;
+exports.RESOLVE_DIRECTIVE = RESOLVE_DIRECTIVE;
+exports.RESOLVE_DYNAMIC_COMPONENT = RESOLVE_DYNAMIC_COMPONENT;
+exports.RESOLVE_FILTER = RESOLVE_FILTER;
+exports.SET_BLOCK_TRACKING = SET_BLOCK_TRACKING;
+exports.SUSPENSE = SUSPENSE;
+exports.TELEPORT = TELEPORT;
+exports.TO_DISPLAY_STRING = TO_DISPLAY_STRING;
+exports.TO_HANDLERS = TO_HANDLERS;
+exports.TO_HANDLER_KEY = TO_HANDLER_KEY;
+exports.TS_NODE_TYPES = TS_NODE_TYPES;
+exports.UNREF = UNREF;
+exports.WITH_CTX = WITH_CTX;
+exports.WITH_DIRECTIVES = WITH_DIRECTIVES;
+exports.WITH_MEMO = WITH_MEMO;
+exports.advancePositionWithClone = advancePositionWithClone;
+exports.advancePositionWithMutation = advancePositionWithMutation;
+exports.assert = assert;
+exports.baseCompile = baseCompile;
+exports.baseParse = baseParse;
+exports.buildDirectiveArgs = buildDirectiveArgs;
+exports.buildProps = buildProps;
+exports.buildSlots = buildSlots;
+exports.checkCompatEnabled = checkCompatEnabled;
+exports.convertToBlock = convertToBlock;
+exports.createArrayExpression = createArrayExpression;
+exports.createAssignmentExpression = createAssignmentExpression;
+exports.createBlockStatement = createBlockStatement;
+exports.createCacheExpression = createCacheExpression;
+exports.createCallExpression = createCallExpression;
+exports.createCompilerError = createCompilerError;
+exports.createCompoundExpression = createCompoundExpression;
+exports.createConditionalExpression = createConditionalExpression;
+exports.createForLoopParams = createForLoopParams;
+exports.createFunctionExpression = createFunctionExpression;
+exports.createIfStatement = createIfStatement;
+exports.createInterpolation = createInterpolation;
+exports.createObjectExpression = createObjectExpression;
+exports.createObjectProperty = createObjectProperty;
+exports.createReturnStatement = createReturnStatement;
+exports.createRoot = createRoot;
+exports.createSequenceExpression = createSequenceExpression;
+exports.createSimpleExpression = createSimpleExpression;
+exports.createStructuralDirectiveTransform = createStructuralDirectiveTransform;
+exports.createTemplateLiteral = createTemplateLiteral;
+exports.createTransformContext = createTransformContext;
+exports.createVNodeCall = createVNodeCall;
+exports.errorMessages = errorMessages;
+exports.extractIdentifiers = extractIdentifiers;
+exports.findDir = findDir;
+exports.findProp = findProp;
+exports.forAliasRE = forAliasRE;
+exports.generate = generate;
+exports.getBaseTransformPreset = getBaseTransformPreset;
+exports.getConstantType = getConstantType;
+exports.getMemoedVNodeCall = getMemoedVNodeCall;
+exports.getVNodeBlockHelper = getVNodeBlockHelper;
+exports.getVNodeHelper = getVNodeHelper;
+exports.hasDynamicKeyVBind = hasDynamicKeyVBind;
+exports.hasScopeRef = hasScopeRef;
+exports.helperNameMap = helperNameMap;
+exports.injectProp = injectProp;
+exports.isCoreComponent = isCoreComponent;
+exports.isFunctionType = isFunctionType;
+exports.isInDestructureAssignment = isInDestructureAssignment;
+exports.isInNewExpression = isInNewExpression;
+exports.isMemberExpression = isMemberExpression;
+exports.isMemberExpressionBrowser = isMemberExpressionBrowser;
+exports.isMemberExpressionNode = isMemberExpressionNode;
+exports.isReferencedIdentifier = isReferencedIdentifier;
+exports.isSimpleIdentifier = isSimpleIdentifier;
+exports.isSlotOutlet = isSlotOutlet;
+exports.isStaticArgOf = isStaticArgOf;
+exports.isStaticExp = isStaticExp;
+exports.isStaticProperty = isStaticProperty;
+exports.isStaticPropertyKey = isStaticPropertyKey;
+exports.isTemplateNode = isTemplateNode;
+exports.isText = isText$1;
+exports.isVSlot = isVSlot;
+exports.locStub = locStub;
+exports.noopDirectiveTransform = noopDirectiveTransform;
+exports.processExpression = processExpression;
+exports.processFor = processFor;
+exports.processIf = processIf;
+exports.processSlotOutlet = processSlotOutlet;
+exports.registerRuntimeHelpers = registerRuntimeHelpers;
+exports.resolveComponentType = resolveComponentType;
+exports.stringifyExpression = stringifyExpression;
+exports.toValidAssetId = toValidAssetId;
+exports.trackSlotScopes = trackSlotScopes;
+exports.trackVForSlotScopes = trackVForSlotScopes;
+exports.transform = transform;
+exports.transformBind = transformBind;
+exports.transformElement = transformElement;
+exports.transformExpression = transformExpression;
+exports.transformModel = transformModel;
+exports.transformOn = transformOn;
+exports.traverseNode = traverseNode;
+exports.unwrapTSNode = unwrapTSNode;
+exports.walkBlockDeclarations = walkBlockDeclarations;
+exports.walkFunctionParams = walkFunctionParams;
+exports.walkIdentifiers = walkIdentifiers;
+exports.warnDeprecation = warnDeprecation;

+ 1073 - 0
node_modules/@vue/compiler-core/dist/compiler-core.d.ts

@@ -0,0 +1,1073 @@
+import { Node as Node$1, Identifier, Function, BlockStatement as BlockStatement$1, Program, ObjectProperty } from '@babel/types';
+import { ParserPlugin } from '@babel/parser';
+export { generateCodeFrame } from '@vue/shared';
+
+export declare const FRAGMENT: unique symbol;
+export declare const TELEPORT: unique symbol;
+export declare const SUSPENSE: unique symbol;
+export declare const KEEP_ALIVE: unique symbol;
+export declare const BASE_TRANSITION: unique symbol;
+export declare const OPEN_BLOCK: unique symbol;
+export declare const CREATE_BLOCK: unique symbol;
+export declare const CREATE_ELEMENT_BLOCK: unique symbol;
+export declare const CREATE_VNODE: unique symbol;
+export declare const CREATE_ELEMENT_VNODE: unique symbol;
+export declare const CREATE_COMMENT: unique symbol;
+export declare const CREATE_TEXT: unique symbol;
+export declare const CREATE_STATIC: unique symbol;
+export declare const RESOLVE_COMPONENT: unique symbol;
+export declare const RESOLVE_DYNAMIC_COMPONENT: unique symbol;
+export declare const RESOLVE_DIRECTIVE: unique symbol;
+export declare const RESOLVE_FILTER: unique symbol;
+export declare const WITH_DIRECTIVES: unique symbol;
+export declare const RENDER_LIST: unique symbol;
+export declare const RENDER_SLOT: unique symbol;
+export declare const CREATE_SLOTS: unique symbol;
+export declare const TO_DISPLAY_STRING: unique symbol;
+export declare const MERGE_PROPS: unique symbol;
+export declare const NORMALIZE_CLASS: unique symbol;
+export declare const NORMALIZE_STYLE: unique symbol;
+export declare const NORMALIZE_PROPS: unique symbol;
+export declare const GUARD_REACTIVE_PROPS: unique symbol;
+export declare const TO_HANDLERS: unique symbol;
+export declare const CAMELIZE: unique symbol;
+export declare const CAPITALIZE: unique symbol;
+export declare const TO_HANDLER_KEY: unique symbol;
+export declare const SET_BLOCK_TRACKING: unique symbol;
+export declare const PUSH_SCOPE_ID: unique symbol;
+export declare const POP_SCOPE_ID: unique symbol;
+export declare const WITH_CTX: unique symbol;
+export declare const UNREF: unique symbol;
+export declare const IS_REF: unique symbol;
+export declare const WITH_MEMO: unique symbol;
+export declare const IS_MEMO_SAME: unique symbol;
+export declare const helperNameMap: Record<symbol, string>;
+export declare function registerRuntimeHelpers(helpers: Record<symbol, string>): void;
+
+type OptionalOptions = 'decodeEntities' | 'whitespace' | 'isNativeTag' | 'isBuiltInComponent' | 'expressionPlugins' | keyof CompilerCompatOptions;
+type MergedParserOptions = Omit<Required<ParserOptions>, OptionalOptions> & Pick<ParserOptions, OptionalOptions>;
+export declare function baseParse(input: string, options?: ParserOptions): RootNode;
+
+type CompilerCompatConfig = Partial<Record<CompilerDeprecationTypes, boolean | 'suppress-warning'>> & {
+    MODE?: 2 | 3;
+};
+interface CompilerCompatOptions {
+    compatConfig?: CompilerCompatConfig;
+}
+export declare enum CompilerDeprecationTypes {
+    COMPILER_IS_ON_ELEMENT = "COMPILER_IS_ON_ELEMENT",
+    COMPILER_V_BIND_SYNC = "COMPILER_V_BIND_SYNC",
+    COMPILER_V_BIND_OBJECT_ORDER = "COMPILER_V_BIND_OBJECT_ORDER",
+    COMPILER_V_ON_NATIVE = "COMPILER_V_ON_NATIVE",
+    COMPILER_V_IF_V_FOR_PRECEDENCE = "COMPILER_V_IF_V_FOR_PRECEDENCE",
+    COMPILER_NATIVE_TEMPLATE = "COMPILER_NATIVE_TEMPLATE",
+    COMPILER_INLINE_TEMPLATE = "COMPILER_INLINE_TEMPLATE",
+    COMPILER_FILTERS = "COMPILER_FILTERS"
+}
+export declare function checkCompatEnabled(key: CompilerDeprecationTypes, context: MergedParserOptions | TransformContext, loc: SourceLocation | null, ...args: any[]): boolean;
+export declare function warnDeprecation(key: CompilerDeprecationTypes, context: MergedParserOptions | TransformContext, loc: SourceLocation | null, ...args: any[]): void;
+
+export type NodeTransform = (node: RootNode | TemplateChildNode, context: TransformContext) => void | (() => void) | (() => void)[];
+export type DirectiveTransform = (dir: DirectiveNode, node: ElementNode, context: TransformContext, augmentor?: (ret: DirectiveTransformResult) => DirectiveTransformResult) => DirectiveTransformResult;
+interface DirectiveTransformResult {
+    props: Property[];
+    needRuntime?: boolean | symbol;
+    ssrTagParts?: TemplateLiteral['elements'];
+}
+export type StructuralDirectiveTransform = (node: ElementNode, dir: DirectiveNode, context: TransformContext) => void | (() => void);
+interface ImportItem {
+    exp: string | ExpressionNode;
+    path: string;
+}
+export interface TransformContext extends Required<Omit<TransformOptions, keyof CompilerCompatOptions>>, CompilerCompatOptions {
+    selfName: string | null;
+    root: RootNode;
+    helpers: Map<symbol, number>;
+    components: Set<string>;
+    directives: Set<string>;
+    hoists: (JSChildNode | null)[];
+    imports: ImportItem[];
+    temps: number;
+    cached: number;
+    identifiers: {
+        [name: string]: number | undefined;
+    };
+    scopes: {
+        vFor: number;
+        vSlot: number;
+        vPre: number;
+        vOnce: number;
+    };
+    parent: ParentNode | null;
+    grandParent: ParentNode | null;
+    childIndex: number;
+    currentNode: RootNode | TemplateChildNode | null;
+    inVOnce: boolean;
+    helper<T extends symbol>(name: T): T;
+    removeHelper<T extends symbol>(name: T): void;
+    helperString(name: symbol): string;
+    replaceNode(node: TemplateChildNode): void;
+    removeNode(node?: TemplateChildNode): void;
+    onNodeRemoved(): void;
+    addIdentifiers(exp: ExpressionNode | string): void;
+    removeIdentifiers(exp: ExpressionNode | string): void;
+    hoist(exp: string | JSChildNode | ArrayExpression): SimpleExpressionNode;
+    cache<T extends JSChildNode>(exp: T, isVNode?: boolean): CacheExpression | T;
+    constantCache: WeakMap<TemplateChildNode, ConstantTypes>;
+    filters?: Set<string>;
+}
+export declare function createTransformContext(root: RootNode, { filename, prefixIdentifiers, hoistStatic, hmr, cacheHandlers, nodeTransforms, directiveTransforms, transformHoist, isBuiltInComponent, isCustomElement, expressionPlugins, scopeId, slotted, ssr, inSSR, ssrCssVars, bindingMetadata, inline, isTS, onError, onWarn, compatConfig, }: TransformOptions): TransformContext;
+export declare function transform(root: RootNode, options: TransformOptions): void;
+export declare function traverseNode(node: RootNode | TemplateChildNode, context: TransformContext): void;
+export declare function createStructuralDirectiveTransform(name: string | RegExp, fn: StructuralDirectiveTransform): NodeTransform;
+
+export declare const transformElement: NodeTransform;
+export declare function resolveComponentType(node: ComponentNode, context: TransformContext, ssr?: boolean): string | symbol | CallExpression;
+export type PropsExpression = ObjectExpression | CallExpression | ExpressionNode;
+export declare function buildProps(node: ElementNode, context: TransformContext, props: (DirectiveNode | AttributeNode)[] | undefined, isComponent: boolean, isDynamicComponent: boolean, ssr?: boolean): {
+    props: PropsExpression | undefined;
+    directives: DirectiveNode[];
+    patchFlag: number;
+    dynamicPropNames: string[];
+    shouldUseBlock: boolean;
+};
+export declare function buildDirectiveArgs(dir: DirectiveNode, context: TransformContext): ArrayExpression;
+
+export type Namespace = number;
+export declare enum Namespaces {
+    HTML = 0,
+    SVG = 1,
+    MATH_ML = 2
+}
+export declare enum NodeTypes {
+    ROOT = 0,
+    ELEMENT = 1,
+    TEXT = 2,
+    COMMENT = 3,
+    SIMPLE_EXPRESSION = 4,
+    INTERPOLATION = 5,
+    ATTRIBUTE = 6,
+    DIRECTIVE = 7,
+    COMPOUND_EXPRESSION = 8,
+    IF = 9,
+    IF_BRANCH = 10,
+    FOR = 11,
+    TEXT_CALL = 12,
+    VNODE_CALL = 13,
+    JS_CALL_EXPRESSION = 14,
+    JS_OBJECT_EXPRESSION = 15,
+    JS_PROPERTY = 16,
+    JS_ARRAY_EXPRESSION = 17,
+    JS_FUNCTION_EXPRESSION = 18,
+    JS_CONDITIONAL_EXPRESSION = 19,
+    JS_CACHE_EXPRESSION = 20,
+    JS_BLOCK_STATEMENT = 21,
+    JS_TEMPLATE_LITERAL = 22,
+    JS_IF_STATEMENT = 23,
+    JS_ASSIGNMENT_EXPRESSION = 24,
+    JS_SEQUENCE_EXPRESSION = 25,
+    JS_RETURN_STATEMENT = 26
+}
+export declare enum ElementTypes {
+    ELEMENT = 0,
+    COMPONENT = 1,
+    SLOT = 2,
+    TEMPLATE = 3
+}
+export interface Node {
+    type: NodeTypes;
+    loc: SourceLocation;
+}
+export interface SourceLocation {
+    start: Position;
+    end: Position;
+    source: string;
+}
+export interface Position {
+    offset: number;
+    line: number;
+    column: number;
+}
+export type ParentNode = RootNode | ElementNode | IfBranchNode | ForNode;
+export type ExpressionNode = SimpleExpressionNode | CompoundExpressionNode;
+export type TemplateChildNode = ElementNode | InterpolationNode | CompoundExpressionNode | TextNode | CommentNode | IfNode | IfBranchNode | ForNode | TextCallNode;
+export interface RootNode extends Node {
+    type: NodeTypes.ROOT;
+    source: string;
+    children: TemplateChildNode[];
+    helpers: Set<symbol>;
+    components: string[];
+    directives: string[];
+    hoists: (JSChildNode | null)[];
+    imports: ImportItem[];
+    cached: number;
+    temps: number;
+    ssrHelpers?: symbol[];
+    codegenNode?: TemplateChildNode | JSChildNode | BlockStatement;
+    transformed?: boolean;
+    filters?: string[];
+}
+export type ElementNode = PlainElementNode | ComponentNode | SlotOutletNode | TemplateNode;
+export interface BaseElementNode extends Node {
+    type: NodeTypes.ELEMENT;
+    ns: Namespace;
+    tag: string;
+    tagType: ElementTypes;
+    props: Array<AttributeNode | DirectiveNode>;
+    children: TemplateChildNode[];
+    isSelfClosing?: boolean;
+    innerLoc?: SourceLocation;
+}
+export interface PlainElementNode extends BaseElementNode {
+    tagType: ElementTypes.ELEMENT;
+    codegenNode: VNodeCall | SimpleExpressionNode | CacheExpression | MemoExpression | undefined;
+    ssrCodegenNode?: TemplateLiteral;
+}
+export interface ComponentNode extends BaseElementNode {
+    tagType: ElementTypes.COMPONENT;
+    codegenNode: VNodeCall | CacheExpression | MemoExpression | undefined;
+    ssrCodegenNode?: CallExpression;
+}
+export interface SlotOutletNode extends BaseElementNode {
+    tagType: ElementTypes.SLOT;
+    codegenNode: RenderSlotCall | CacheExpression | undefined;
+    ssrCodegenNode?: CallExpression;
+}
+export interface TemplateNode extends BaseElementNode {
+    tagType: ElementTypes.TEMPLATE;
+    codegenNode: undefined;
+}
+export interface TextNode extends Node {
+    type: NodeTypes.TEXT;
+    content: string;
+}
+export interface CommentNode extends Node {
+    type: NodeTypes.COMMENT;
+    content: string;
+}
+export interface AttributeNode extends Node {
+    type: NodeTypes.ATTRIBUTE;
+    name: string;
+    nameLoc: SourceLocation;
+    value: TextNode | undefined;
+}
+export interface DirectiveNode extends Node {
+    type: NodeTypes.DIRECTIVE;
+    /**
+     * the normalized name without prefix or shorthands, e.g. "bind", "on"
+     */
+    name: string;
+    /**
+     * the raw attribute name, preserving shorthand, and including arg & modifiers
+     * this is only used during parse.
+     */
+    rawName?: string;
+    exp: ExpressionNode | undefined;
+    arg: ExpressionNode | undefined;
+    modifiers: string[];
+    /**
+     * optional property to cache the expression parse result for v-for
+     */
+    forParseResult?: ForParseResult;
+}
+/**
+ * Static types have several levels.
+ * Higher levels implies lower levels. e.g. a node that can be stringified
+ * can always be hoisted and skipped for patch.
+ */
+export declare enum ConstantTypes {
+    NOT_CONSTANT = 0,
+    CAN_SKIP_PATCH = 1,
+    CAN_HOIST = 2,
+    CAN_STRINGIFY = 3
+}
+export interface SimpleExpressionNode extends Node {
+    type: NodeTypes.SIMPLE_EXPRESSION;
+    content: string;
+    isStatic: boolean;
+    constType: ConstantTypes;
+    /**
+     * - `null` means the expression is a simple identifier that doesn't need
+     *    parsing
+     * - `false` means there was a parsing error
+     */
+    ast?: Node$1 | null | false;
+    /**
+     * Indicates this is an identifier for a hoist vnode call and points to the
+     * hoisted node.
+     */
+    hoisted?: JSChildNode;
+    /**
+     * an expression parsed as the params of a function will track
+     * the identifiers declared inside the function body.
+     */
+    identifiers?: string[];
+    isHandlerKey?: boolean;
+}
+export interface InterpolationNode extends Node {
+    type: NodeTypes.INTERPOLATION;
+    content: ExpressionNode;
+}
+export interface CompoundExpressionNode extends Node {
+    type: NodeTypes.COMPOUND_EXPRESSION;
+    /**
+     * - `null` means the expression is a simple identifier that doesn't need
+     *    parsing
+     * - `false` means there was a parsing error
+     */
+    ast?: Node$1 | null | false;
+    children: (SimpleExpressionNode | CompoundExpressionNode | InterpolationNode | TextNode | string | symbol)[];
+    /**
+     * an expression parsed as the params of a function will track
+     * the identifiers declared inside the function body.
+     */
+    identifiers?: string[];
+    isHandlerKey?: boolean;
+}
+export interface IfNode extends Node {
+    type: NodeTypes.IF;
+    branches: IfBranchNode[];
+    codegenNode?: IfConditionalExpression | CacheExpression;
+}
+export interface IfBranchNode extends Node {
+    type: NodeTypes.IF_BRANCH;
+    condition: ExpressionNode | undefined;
+    children: TemplateChildNode[];
+    userKey?: AttributeNode | DirectiveNode;
+    isTemplateIf?: boolean;
+}
+export interface ForNode extends Node {
+    type: NodeTypes.FOR;
+    source: ExpressionNode;
+    valueAlias: ExpressionNode | undefined;
+    keyAlias: ExpressionNode | undefined;
+    objectIndexAlias: ExpressionNode | undefined;
+    parseResult: ForParseResult;
+    children: TemplateChildNode[];
+    codegenNode?: ForCodegenNode;
+}
+export interface ForParseResult {
+    source: ExpressionNode;
+    value: ExpressionNode | undefined;
+    key: ExpressionNode | undefined;
+    index: ExpressionNode | undefined;
+    finalized: boolean;
+}
+export interface TextCallNode extends Node {
+    type: NodeTypes.TEXT_CALL;
+    content: TextNode | InterpolationNode | CompoundExpressionNode;
+    codegenNode: CallExpression | SimpleExpressionNode;
+}
+export type TemplateTextChildNode = TextNode | InterpolationNode | CompoundExpressionNode;
+export interface VNodeCall extends Node {
+    type: NodeTypes.VNODE_CALL;
+    tag: string | symbol | CallExpression;
+    props: PropsExpression | undefined;
+    children: TemplateChildNode[] | TemplateTextChildNode | SlotsExpression | ForRenderListExpression | SimpleExpressionNode | undefined;
+    patchFlag: string | undefined;
+    dynamicProps: string | SimpleExpressionNode | undefined;
+    directives: DirectiveArguments | undefined;
+    isBlock: boolean;
+    disableTracking: boolean;
+    isComponent: boolean;
+}
+export type JSChildNode = VNodeCall | CallExpression | ObjectExpression | ArrayExpression | ExpressionNode | FunctionExpression | ConditionalExpression | CacheExpression | AssignmentExpression | SequenceExpression;
+export interface CallExpression extends Node {
+    type: NodeTypes.JS_CALL_EXPRESSION;
+    callee: string | symbol;
+    arguments: (string | symbol | JSChildNode | SSRCodegenNode | TemplateChildNode | TemplateChildNode[])[];
+}
+export interface ObjectExpression extends Node {
+    type: NodeTypes.JS_OBJECT_EXPRESSION;
+    properties: Array<Property>;
+}
+export interface Property extends Node {
+    type: NodeTypes.JS_PROPERTY;
+    key: ExpressionNode;
+    value: JSChildNode;
+}
+export interface ArrayExpression extends Node {
+    type: NodeTypes.JS_ARRAY_EXPRESSION;
+    elements: Array<string | Node>;
+}
+export interface FunctionExpression extends Node {
+    type: NodeTypes.JS_FUNCTION_EXPRESSION;
+    params: ExpressionNode | string | (ExpressionNode | string)[] | undefined;
+    returns?: TemplateChildNode | TemplateChildNode[] | JSChildNode;
+    body?: BlockStatement | IfStatement;
+    newline: boolean;
+    /**
+     * This flag is for codegen to determine whether it needs to generate the
+     * withScopeId() wrapper
+     */
+    isSlot: boolean;
+    /**
+     * __COMPAT__ only, indicates a slot function that should be excluded from
+     * the legacy $scopedSlots instance property.
+     */
+    isNonScopedSlot?: boolean;
+}
+export interface ConditionalExpression extends Node {
+    type: NodeTypes.JS_CONDITIONAL_EXPRESSION;
+    test: JSChildNode;
+    consequent: JSChildNode;
+    alternate: JSChildNode;
+    newline: boolean;
+}
+export interface CacheExpression extends Node {
+    type: NodeTypes.JS_CACHE_EXPRESSION;
+    index: number;
+    value: JSChildNode;
+    isVNode: boolean;
+}
+export interface MemoExpression extends CallExpression {
+    callee: typeof WITH_MEMO;
+    arguments: [ExpressionNode, MemoFactory, string, string];
+}
+interface MemoFactory extends FunctionExpression {
+    returns: BlockCodegenNode;
+}
+export type SSRCodegenNode = BlockStatement | TemplateLiteral | IfStatement | AssignmentExpression | ReturnStatement | SequenceExpression;
+export interface BlockStatement extends Node {
+    type: NodeTypes.JS_BLOCK_STATEMENT;
+    body: (JSChildNode | IfStatement)[];
+}
+export interface TemplateLiteral extends Node {
+    type: NodeTypes.JS_TEMPLATE_LITERAL;
+    elements: (string | JSChildNode)[];
+}
+export interface IfStatement extends Node {
+    type: NodeTypes.JS_IF_STATEMENT;
+    test: ExpressionNode;
+    consequent: BlockStatement;
+    alternate: IfStatement | BlockStatement | ReturnStatement | undefined;
+}
+export interface AssignmentExpression extends Node {
+    type: NodeTypes.JS_ASSIGNMENT_EXPRESSION;
+    left: SimpleExpressionNode;
+    right: JSChildNode;
+}
+export interface SequenceExpression extends Node {
+    type: NodeTypes.JS_SEQUENCE_EXPRESSION;
+    expressions: JSChildNode[];
+}
+export interface ReturnStatement extends Node {
+    type: NodeTypes.JS_RETURN_STATEMENT;
+    returns: TemplateChildNode | TemplateChildNode[] | JSChildNode;
+}
+export interface DirectiveArguments extends ArrayExpression {
+    elements: DirectiveArgumentNode[];
+}
+export interface DirectiveArgumentNode extends ArrayExpression {
+    elements: [string] | [string, ExpressionNode] | [string, ExpressionNode, ExpressionNode] | [string, ExpressionNode, ExpressionNode, ObjectExpression];
+}
+export interface RenderSlotCall extends CallExpression {
+    callee: typeof RENDER_SLOT;
+    arguments: [string, string | ExpressionNode] | [string, string | ExpressionNode, PropsExpression] | [
+        string,
+        string | ExpressionNode,
+        PropsExpression | '{}',
+        TemplateChildNode[]
+    ];
+}
+export type SlotsExpression = SlotsObjectExpression | DynamicSlotsExpression;
+export interface SlotsObjectExpression extends ObjectExpression {
+    properties: SlotsObjectProperty[];
+}
+export interface SlotsObjectProperty extends Property {
+    value: SlotFunctionExpression;
+}
+export interface SlotFunctionExpression extends FunctionExpression {
+    returns: TemplateChildNode[];
+}
+export interface DynamicSlotsExpression extends CallExpression {
+    callee: typeof CREATE_SLOTS;
+    arguments: [SlotsObjectExpression, DynamicSlotEntries];
+}
+export interface DynamicSlotEntries extends ArrayExpression {
+    elements: (ConditionalDynamicSlotNode | ListDynamicSlotNode)[];
+}
+export interface ConditionalDynamicSlotNode extends ConditionalExpression {
+    consequent: DynamicSlotNode;
+    alternate: DynamicSlotNode | SimpleExpressionNode;
+}
+export interface ListDynamicSlotNode extends CallExpression {
+    callee: typeof RENDER_LIST;
+    arguments: [ExpressionNode, ListDynamicSlotIterator];
+}
+export interface ListDynamicSlotIterator extends FunctionExpression {
+    returns: DynamicSlotNode;
+}
+export interface DynamicSlotNode extends ObjectExpression {
+    properties: [Property, DynamicSlotFnProperty];
+}
+export interface DynamicSlotFnProperty extends Property {
+    value: SlotFunctionExpression;
+}
+export type BlockCodegenNode = VNodeCall | RenderSlotCall;
+export interface IfConditionalExpression extends ConditionalExpression {
+    consequent: BlockCodegenNode | MemoExpression;
+    alternate: BlockCodegenNode | IfConditionalExpression | MemoExpression;
+}
+export interface ForCodegenNode extends VNodeCall {
+    isBlock: true;
+    tag: typeof FRAGMENT;
+    props: undefined;
+    children: ForRenderListExpression;
+    patchFlag: string;
+    disableTracking: boolean;
+}
+export interface ForRenderListExpression extends CallExpression {
+    callee: typeof RENDER_LIST;
+    arguments: [ExpressionNode, ForIteratorExpression];
+}
+export interface ForIteratorExpression extends FunctionExpression {
+    returns: BlockCodegenNode;
+}
+export declare const locStub: SourceLocation;
+export declare function createRoot(children: TemplateChildNode[], source?: string): RootNode;
+export declare function createVNodeCall(context: TransformContext | null, tag: VNodeCall['tag'], props?: VNodeCall['props'], children?: VNodeCall['children'], patchFlag?: VNodeCall['patchFlag'], dynamicProps?: VNodeCall['dynamicProps'], directives?: VNodeCall['directives'], isBlock?: VNodeCall['isBlock'], disableTracking?: VNodeCall['disableTracking'], isComponent?: VNodeCall['isComponent'], loc?: SourceLocation): VNodeCall;
+export declare function createArrayExpression(elements: ArrayExpression['elements'], loc?: SourceLocation): ArrayExpression;
+export declare function createObjectExpression(properties: ObjectExpression['properties'], loc?: SourceLocation): ObjectExpression;
+export declare function createObjectProperty(key: Property['key'] | string, value: Property['value']): Property;
+export declare function createSimpleExpression(content: SimpleExpressionNode['content'], isStatic?: SimpleExpressionNode['isStatic'], loc?: SourceLocation, constType?: ConstantTypes): SimpleExpressionNode;
+export declare function createInterpolation(content: InterpolationNode['content'] | string, loc: SourceLocation): InterpolationNode;
+export declare function createCompoundExpression(children: CompoundExpressionNode['children'], loc?: SourceLocation): CompoundExpressionNode;
+type InferCodegenNodeType<T> = T extends typeof RENDER_SLOT ? RenderSlotCall : CallExpression;
+export declare function createCallExpression<T extends CallExpression['callee']>(callee: T, args?: CallExpression['arguments'], loc?: SourceLocation): InferCodegenNodeType<T>;
+export declare function createFunctionExpression(params: FunctionExpression['params'], returns?: FunctionExpression['returns'], newline?: boolean, isSlot?: boolean, loc?: SourceLocation): FunctionExpression;
+export declare function createConditionalExpression(test: ConditionalExpression['test'], consequent: ConditionalExpression['consequent'], alternate: ConditionalExpression['alternate'], newline?: boolean): ConditionalExpression;
+export declare function createCacheExpression(index: number, value: JSChildNode, isVNode?: boolean): CacheExpression;
+export declare function createBlockStatement(body: BlockStatement['body']): BlockStatement;
+export declare function createTemplateLiteral(elements: TemplateLiteral['elements']): TemplateLiteral;
+export declare function createIfStatement(test: IfStatement['test'], consequent: IfStatement['consequent'], alternate?: IfStatement['alternate']): IfStatement;
+export declare function createAssignmentExpression(left: AssignmentExpression['left'], right: AssignmentExpression['right']): AssignmentExpression;
+export declare function createSequenceExpression(expressions: SequenceExpression['expressions']): SequenceExpression;
+export declare function createReturnStatement(returns: ReturnStatement['returns']): ReturnStatement;
+export declare function getVNodeHelper(ssr: boolean, isComponent: boolean): typeof CREATE_VNODE | typeof CREATE_ELEMENT_VNODE;
+export declare function getVNodeBlockHelper(ssr: boolean, isComponent: boolean): typeof CREATE_BLOCK | typeof CREATE_ELEMENT_BLOCK;
+export declare function convertToBlock(node: VNodeCall, { helper, removeHelper, inSSR }: TransformContext): void;
+
+export interface CompilerError extends SyntaxError {
+    code: number | string;
+    loc?: SourceLocation;
+}
+export interface CoreCompilerError extends CompilerError {
+    code: ErrorCodes;
+}
+type InferCompilerError<T> = T extends ErrorCodes ? CoreCompilerError : CompilerError;
+export declare function createCompilerError<T extends number>(code: T, loc?: SourceLocation, messages?: {
+    [code: number]: string;
+}, additionalMessage?: string): InferCompilerError<T>;
+export declare enum ErrorCodes {
+    ABRUPT_CLOSING_OF_EMPTY_COMMENT = 0,
+    CDATA_IN_HTML_CONTENT = 1,
+    DUPLICATE_ATTRIBUTE = 2,
+    END_TAG_WITH_ATTRIBUTES = 3,
+    END_TAG_WITH_TRAILING_SOLIDUS = 4,
+    EOF_BEFORE_TAG_NAME = 5,
+    EOF_IN_CDATA = 6,
+    EOF_IN_COMMENT = 7,
+    EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT = 8,
+    EOF_IN_TAG = 9,
+    INCORRECTLY_CLOSED_COMMENT = 10,
+    INCORRECTLY_OPENED_COMMENT = 11,
+    INVALID_FIRST_CHARACTER_OF_TAG_NAME = 12,
+    MISSING_ATTRIBUTE_VALUE = 13,
+    MISSING_END_TAG_NAME = 14,
+    MISSING_WHITESPACE_BETWEEN_ATTRIBUTES = 15,
+    NESTED_COMMENT = 16,
+    UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME = 17,
+    UNEXPECTED_CHARACTER_IN_UNQUOTED_ATTRIBUTE_VALUE = 18,
+    UNEXPECTED_EQUALS_SIGN_BEFORE_ATTRIBUTE_NAME = 19,
+    UNEXPECTED_NULL_CHARACTER = 20,
+    UNEXPECTED_QUESTION_MARK_INSTEAD_OF_TAG_NAME = 21,
+    UNEXPECTED_SOLIDUS_IN_TAG = 22,
+    X_INVALID_END_TAG = 23,
+    X_MISSING_END_TAG = 24,
+    X_MISSING_INTERPOLATION_END = 25,
+    X_MISSING_DIRECTIVE_NAME = 26,
+    X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END = 27,
+    X_V_IF_NO_EXPRESSION = 28,
+    X_V_IF_SAME_KEY = 29,
+    X_V_ELSE_NO_ADJACENT_IF = 30,
+    X_V_FOR_NO_EXPRESSION = 31,
+    X_V_FOR_MALFORMED_EXPRESSION = 32,
+    X_V_FOR_TEMPLATE_KEY_PLACEMENT = 33,
+    X_V_BIND_NO_EXPRESSION = 34,
+    X_V_ON_NO_EXPRESSION = 35,
+    X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET = 36,
+    X_V_SLOT_MIXED_SLOT_USAGE = 37,
+    X_V_SLOT_DUPLICATE_SLOT_NAMES = 38,
+    X_V_SLOT_EXTRANEOUS_DEFAULT_SLOT_CHILDREN = 39,
+    X_V_SLOT_MISPLACED = 40,
+    X_V_MODEL_NO_EXPRESSION = 41,
+    X_V_MODEL_MALFORMED_EXPRESSION = 42,
+    X_V_MODEL_ON_SCOPE_VARIABLE = 43,
+    X_V_MODEL_ON_PROPS = 44,
+    X_INVALID_EXPRESSION = 45,
+    X_KEEP_ALIVE_INVALID_CHILDREN = 46,
+    X_PREFIX_ID_NOT_SUPPORTED = 47,
+    X_MODULE_MODE_NOT_SUPPORTED = 48,
+    X_CACHE_HANDLER_NOT_SUPPORTED = 49,
+    X_SCOPE_ID_NOT_SUPPORTED = 50,
+    X_VNODE_HOOKS = 51,
+    X_V_BIND_INVALID_SAME_NAME_ARGUMENT = 52,
+    __EXTEND_POINT__ = 53
+}
+export declare const errorMessages: Record<ErrorCodes, string>;
+
+interface ErrorHandlingOptions {
+    onWarn?: (warning: CompilerError) => void;
+    onError?: (error: CompilerError) => void;
+}
+export interface ParserOptions extends ErrorHandlingOptions, CompilerCompatOptions {
+    /**
+     * Base mode is platform agnostic and only parses HTML-like template syntax,
+     * treating all tags the same way. Specific tag parsing behavior can be
+     * configured by higher-level compilers.
+     *
+     * HTML mode adds additional logic for handling special parsing behavior in
+     * `<script>`, `<style>`,`<title>` and `<textarea>`.
+     * The logic is handled inside compiler-core for efficiency.
+     *
+     * SFC mode treats content of all root-level tags except `<template>` as plain
+     * text.
+     */
+    parseMode?: 'base' | 'html' | 'sfc';
+    /**
+     * Specify the root namespace to use when parsing a template.
+     * Defaults to `Namespaces.HTML` (0).
+     */
+    ns?: Namespaces;
+    /**
+     * e.g. platform native elements, e.g. `<div>` for browsers
+     */
+    isNativeTag?: (tag: string) => boolean;
+    /**
+     * e.g. native elements that can self-close, e.g. `<img>`, `<br>`, `<hr>`
+     */
+    isVoidTag?: (tag: string) => boolean;
+    /**
+     * e.g. elements that should preserve whitespace inside, e.g. `<pre>`
+     */
+    isPreTag?: (tag: string) => boolean;
+    /**
+     * Platform-specific built-in components e.g. `<Transition>`
+     */
+    isBuiltInComponent?: (tag: string) => symbol | void;
+    /**
+     * Separate option for end users to extend the native elements list
+     */
+    isCustomElement?: (tag: string) => boolean | void;
+    /**
+     * Get tag namespace
+     */
+    getNamespace?: (tag: string, parent: ElementNode | undefined, rootNamespace: Namespace) => Namespace;
+    /**
+     * @default ['{{', '}}']
+     */
+    delimiters?: [string, string];
+    /**
+     * Whitespace handling strategy
+     * @default 'condense'
+     */
+    whitespace?: 'preserve' | 'condense';
+    /**
+     * Only used for DOM compilers that runs in the browser.
+     * In non-browser builds, this option is ignored.
+     */
+    decodeEntities?: (rawText: string, asAttr: boolean) => string;
+    /**
+     * Whether to keep comments in the templates AST.
+     * This defaults to `true` in development and `false` in production builds.
+     */
+    comments?: boolean;
+    /**
+     * Parse JavaScript expressions with Babel.
+     * @default false
+     */
+    prefixIdentifiers?: boolean;
+    /**
+     * A list of parser plugins to enable for `@babel/parser`, which is used to
+     * parse expressions in bindings and interpolations.
+     * https://babeljs.io/docs/en/next/babel-parser#plugins
+     */
+    expressionPlugins?: ParserPlugin[];
+}
+export type HoistTransform = (children: TemplateChildNode[], context: TransformContext, parent: ParentNode) => void;
+export declare enum BindingTypes {
+    /**
+     * returned from data()
+     */
+    DATA = "data",
+    /**
+     * declared as a prop
+     */
+    PROPS = "props",
+    /**
+     * a local alias of a `<script setup>` destructured prop.
+     * the original is stored in __propsAliases of the bindingMetadata object.
+     */
+    PROPS_ALIASED = "props-aliased",
+    /**
+     * a let binding (may or may not be a ref)
+     */
+    SETUP_LET = "setup-let",
+    /**
+     * a const binding that can never be a ref.
+     * these bindings don't need `unref()` calls when processed in inlined
+     * template expressions.
+     */
+    SETUP_CONST = "setup-const",
+    /**
+     * a const binding that does not need `unref()`, but may be mutated.
+     */
+    SETUP_REACTIVE_CONST = "setup-reactive-const",
+    /**
+     * a const binding that may be a ref.
+     */
+    SETUP_MAYBE_REF = "setup-maybe-ref",
+    /**
+     * bindings that are guaranteed to be refs
+     */
+    SETUP_REF = "setup-ref",
+    /**
+     * declared by other options, e.g. computed, inject
+     */
+    OPTIONS = "options",
+    /**
+     * a literal constant, e.g. 'foo', 1, true
+     */
+    LITERAL_CONST = "literal-const"
+}
+export type BindingMetadata = {
+    [key: string]: BindingTypes | undefined;
+} & {
+    __isScriptSetup?: boolean;
+    __propsAliases?: Record<string, string>;
+};
+interface SharedTransformCodegenOptions {
+    /**
+     * Transform expressions like {{ foo }} to `_ctx.foo`.
+     * If this option is false, the generated code will be wrapped in a
+     * `with (this) { ... }` block.
+     * - This is force-enabled in module mode, since modules are by default strict
+     * and cannot use `with`
+     * @default mode === 'module'
+     */
+    prefixIdentifiers?: boolean;
+    /**
+     * Control whether generate SSR-optimized render functions instead.
+     * The resulting function must be attached to the component via the
+     * `ssrRender` option instead of `render`.
+     *
+     * When compiler generates code for SSR's fallback branch, we need to set it to false:
+     *  - context.ssr = false
+     *
+     * see `subTransform` in `ssrTransformComponent.ts`
+     */
+    ssr?: boolean;
+    /**
+     * Indicates whether the compiler generates code for SSR,
+     * it is always true when generating code for SSR,
+     * regardless of whether we are generating code for SSR's fallback branch,
+     * this means that when the compiler generates code for SSR's fallback branch:
+     *  - context.ssr = false
+     *  - context.inSSR = true
+     */
+    inSSR?: boolean;
+    /**
+     * Optional binding metadata analyzed from script - used to optimize
+     * binding access when `prefixIdentifiers` is enabled.
+     */
+    bindingMetadata?: BindingMetadata;
+    /**
+     * Compile the function for inlining inside setup().
+     * This allows the function to directly access setup() local bindings.
+     */
+    inline?: boolean;
+    /**
+     * Indicates that transforms and codegen should try to output valid TS code
+     */
+    isTS?: boolean;
+    /**
+     * Filename for source map generation.
+     * Also used for self-recursive reference in templates
+     * @default 'template.vue.html'
+     */
+    filename?: string;
+}
+export interface TransformOptions extends SharedTransformCodegenOptions, ErrorHandlingOptions, CompilerCompatOptions {
+    /**
+     * An array of node transforms to be applied to every AST node.
+     */
+    nodeTransforms?: NodeTransform[];
+    /**
+     * An object of { name: transform } to be applied to every directive attribute
+     * node found on element nodes.
+     */
+    directiveTransforms?: Record<string, DirectiveTransform | undefined>;
+    /**
+     * An optional hook to transform a node being hoisted.
+     * used by compiler-dom to turn hoisted nodes into stringified HTML vnodes.
+     * @default null
+     */
+    transformHoist?: HoistTransform | null;
+    /**
+     * If the pairing runtime provides additional built-in elements, use this to
+     * mark them as built-in so the compiler will generate component vnodes
+     * for them.
+     */
+    isBuiltInComponent?: (tag: string) => symbol | void;
+    /**
+     * Used by some transforms that expects only native elements
+     */
+    isCustomElement?: (tag: string) => boolean | void;
+    /**
+     * Transform expressions like {{ foo }} to `_ctx.foo`.
+     * If this option is false, the generated code will be wrapped in a
+     * `with (this) { ... }` block.
+     * - This is force-enabled in module mode, since modules are by default strict
+     * and cannot use `with`
+     * @default mode === 'module'
+     */
+    prefixIdentifiers?: boolean;
+    /**
+     * Hoist static VNodes and props objects to `_hoisted_x` constants
+     * @default false
+     */
+    hoistStatic?: boolean;
+    /**
+     * Cache v-on handlers to avoid creating new inline functions on each render,
+     * also avoids the need for dynamically patching the handlers by wrapping it.
+     * e.g `@click="foo"` by default is compiled to `{ onClick: foo }`. With this
+     * option it's compiled to:
+     * ```js
+     * { onClick: _cache[0] || (_cache[0] = e => _ctx.foo(e)) }
+     * ```
+     * - Requires "prefixIdentifiers" to be enabled because it relies on scope
+     * analysis to determine if a handler is safe to cache.
+     * @default false
+     */
+    cacheHandlers?: boolean;
+    /**
+     * A list of parser plugins to enable for `@babel/parser`, which is used to
+     * parse expressions in bindings and interpolations.
+     * https://babeljs.io/docs/en/next/babel-parser#plugins
+     */
+    expressionPlugins?: ParserPlugin[];
+    /**
+     * SFC scoped styles ID
+     */
+    scopeId?: string | null;
+    /**
+     * Indicates this SFC template has used :slotted in its styles
+     * Defaults to `true` for backwards compatibility - SFC tooling should set it
+     * to `false` if no `:slotted` usage is detected in `<style>`
+     */
+    slotted?: boolean;
+    /**
+     * SFC `<style vars>` injection string
+     * Should already be an object expression, e.g. `{ 'xxxx-color': color }`
+     * needed to render inline CSS variables on component root
+     */
+    ssrCssVars?: string;
+    /**
+     * Whether to compile the template assuming it needs to handle HMR.
+     * Some edge cases may need to generate different code for HMR to work
+     * correctly, e.g. #6938, #7138
+     */
+    hmr?: boolean;
+}
+export interface CodegenOptions extends SharedTransformCodegenOptions {
+    /**
+     * - `module` mode will generate ES module import statements for helpers
+     * and export the render function as the default export.
+     * - `function` mode will generate a single `const { helpers... } = Vue`
+     * statement and return the render function. It expects `Vue` to be globally
+     * available (or passed by wrapping the code with an IIFE). It is meant to be
+     * used with `new Function(code)()` to generate a render function at runtime.
+     * @default 'function'
+     */
+    mode?: 'module' | 'function';
+    /**
+     * Generate source map?
+     * @default false
+     */
+    sourceMap?: boolean;
+    /**
+     * SFC scoped styles ID
+     */
+    scopeId?: string | null;
+    /**
+     * Option to optimize helper import bindings via variable assignment
+     * (only used for webpack code-split)
+     * @default false
+     */
+    optimizeImports?: boolean;
+    /**
+     * Customize where to import runtime helpers from.
+     * @default 'vue'
+     */
+    runtimeModuleName?: string;
+    /**
+     * Customize where to import ssr runtime helpers from/**
+     * @default 'vue/server-renderer'
+     */
+    ssrRuntimeModuleName?: string;
+    /**
+     * Customize the global variable name of `Vue` to get helpers from
+     * in function mode
+     * @default 'Vue'
+     */
+    runtimeGlobalName?: string;
+}
+export type CompilerOptions = ParserOptions & TransformOptions & CodegenOptions;
+
+/**
+ * The `SourceMapGenerator` type from `source-map-js` is a bit incomplete as it
+ * misses `toJSON()`. We also need to add types for internal properties which we
+ * need to access for better performance.
+ *
+ * Since TS 5.3, dts generation starts to strangely include broken triple slash
+ * references for source-map-js, so we are inlining all source map related types
+ * here to to workaround that.
+ */
+export interface CodegenSourceMapGenerator {
+    setSourceContent(sourceFile: string, sourceContent: string): void;
+    toJSON(): RawSourceMap;
+    _sources: Set<string>;
+    _names: Set<string>;
+    _mappings: {
+        add(mapping: MappingItem): void;
+    };
+}
+export interface RawSourceMap {
+    file?: string;
+    sourceRoot?: string;
+    version: string;
+    sources: string[];
+    names: string[];
+    sourcesContent?: string[];
+    mappings: string;
+}
+interface MappingItem {
+    source: string;
+    generatedLine: number;
+    generatedColumn: number;
+    originalLine: number;
+    originalColumn: number;
+    name: string | null;
+}
+type CodegenNode = TemplateChildNode | JSChildNode | SSRCodegenNode;
+export interface CodegenResult {
+    code: string;
+    preamble: string;
+    ast: RootNode;
+    map?: RawSourceMap;
+}
+export interface CodegenContext extends Omit<Required<CodegenOptions>, 'bindingMetadata' | 'inline'> {
+    source: string;
+    code: string;
+    line: number;
+    column: number;
+    offset: number;
+    indentLevel: number;
+    pure: boolean;
+    map?: CodegenSourceMapGenerator;
+    helper(key: symbol): string;
+    push(code: string, newlineIndex?: number, node?: CodegenNode): void;
+    indent(): void;
+    deindent(withoutNewLine?: boolean): void;
+    newline(): void;
+}
+export declare function generate(ast: RootNode, options?: CodegenOptions & {
+    onContextCreated?: (context: CodegenContext) => void;
+}): CodegenResult;
+
+export type TransformPreset = [
+    NodeTransform[],
+    Record<string, DirectiveTransform>
+];
+export declare function getBaseTransformPreset(prefixIdentifiers?: boolean): TransformPreset;
+export declare function baseCompile(source: string | RootNode, options?: CompilerOptions): CodegenResult;
+
+export declare const isStaticExp: (p: JSChildNode) => p is SimpleExpressionNode;
+export declare function isCoreComponent(tag: string): symbol | void;
+export declare const isSimpleIdentifier: (name: string) => boolean;
+/**
+ * Simple lexer to check if an expression is a member expression. This is
+ * lax and only checks validity at the root level (i.e. does not validate exps
+ * inside square brackets), but it's ok since these are only used on template
+ * expressions and false positives are invalid expressions in the first place.
+ */
+export declare const isMemberExpressionBrowser: (path: string) => boolean;
+export declare const isMemberExpressionNode: (path: string, context: TransformContext) => boolean;
+export declare const isMemberExpression: (path: string, context: TransformContext) => boolean;
+export declare function advancePositionWithClone(pos: Position, source: string, numberOfCharacters?: number): Position;
+export declare function advancePositionWithMutation(pos: Position, source: string, numberOfCharacters?: number): Position;
+export declare function assert(condition: boolean, msg?: string): void;
+export declare function findDir(node: ElementNode, name: string | RegExp, allowEmpty?: boolean): DirectiveNode | undefined;
+export declare function findProp(node: ElementNode, name: string, dynamicOnly?: boolean, allowEmpty?: boolean): ElementNode['props'][0] | undefined;
+export declare function isStaticArgOf(arg: DirectiveNode['arg'], name: string): boolean;
+export declare function hasDynamicKeyVBind(node: ElementNode): boolean;
+export declare function isText(node: TemplateChildNode): node is TextNode | InterpolationNode;
+export declare function isVSlot(p: ElementNode['props'][0]): p is DirectiveNode;
+export declare function isTemplateNode(node: RootNode | TemplateChildNode): node is TemplateNode;
+export declare function isSlotOutlet(node: RootNode | TemplateChildNode): node is SlotOutletNode;
+export declare function injectProp(node: VNodeCall | RenderSlotCall, prop: Property, context: TransformContext): void;
+export declare function toValidAssetId(name: string, type: 'component' | 'directive' | 'filter'): string;
+export declare function hasScopeRef(node: TemplateChildNode | IfBranchNode | ExpressionNode | undefined, ids: TransformContext['identifiers']): boolean;
+export declare function getMemoedVNodeCall(node: BlockCodegenNode | MemoExpression): VNodeCall | RenderSlotCall;
+export declare const forAliasRE: RegExp;
+
+/**
+ * Return value indicates whether the AST walked can be a constant
+ */
+export declare function walkIdentifiers(root: Node$1, onIdentifier: (node: Identifier, parent: Node$1, parentStack: Node$1[], isReference: boolean, isLocal: boolean) => void, includeAll?: boolean, parentStack?: Node$1[], knownIds?: Record<string, number>): void;
+export declare function isReferencedIdentifier(id: Identifier, parent: Node$1 | null, parentStack: Node$1[]): boolean;
+export declare function isInDestructureAssignment(parent: Node$1, parentStack: Node$1[]): boolean;
+export declare function isInNewExpression(parentStack: Node$1[]): boolean;
+export declare function walkFunctionParams(node: Function, onIdent: (id: Identifier) => void): void;
+export declare function walkBlockDeclarations(block: BlockStatement$1 | Program, onIdent: (node: Identifier) => void): void;
+export declare function extractIdentifiers(param: Node$1, nodes?: Identifier[]): Identifier[];
+export declare const isFunctionType: (node: Node$1) => node is Function;
+export declare const isStaticProperty: (node: Node$1) => node is ObjectProperty;
+export declare const isStaticPropertyKey: (node: Node$1, parent: Node$1) => boolean;
+export declare const TS_NODE_TYPES: string[];
+export declare function unwrapTSNode(node: Node$1): Node$1;
+
+export declare const transformModel: DirectiveTransform;
+
+export declare const transformOn: DirectiveTransform;
+
+export declare const transformBind: DirectiveTransform;
+
+export declare const noopDirectiveTransform: DirectiveTransform;
+
+export declare function processIf(node: ElementNode, dir: DirectiveNode, context: TransformContext, processCodegen?: (node: IfNode, branch: IfBranchNode, isRoot: boolean) => (() => void) | undefined): (() => void) | undefined;
+
+export declare function processFor(node: ElementNode, dir: DirectiveNode, context: TransformContext, processCodegen?: (forNode: ForNode) => (() => void) | undefined): (() => void) | undefined;
+export declare function createForLoopParams({ value, key, index }: ForParseResult, memoArgs?: ExpressionNode[]): ExpressionNode[];
+
+export declare const transformExpression: NodeTransform;
+export declare function processExpression(node: SimpleExpressionNode, context: TransformContext, asParams?: boolean, asRawStatements?: boolean, localVars?: Record<string, number>): ExpressionNode;
+export declare function stringifyExpression(exp: ExpressionNode | string): string;
+
+export declare const trackSlotScopes: NodeTransform;
+export declare const trackVForSlotScopes: NodeTransform;
+export type SlotFnBuilder = (slotProps: ExpressionNode | undefined, vFor: DirectiveNode | undefined, slotChildren: TemplateChildNode[], loc: SourceLocation) => FunctionExpression;
+export declare function buildSlots(node: ElementNode, context: TransformContext, buildSlotFn?: SlotFnBuilder): {
+    slots: SlotsExpression;
+    hasDynamicSlots: boolean;
+};
+
+interface SlotOutletProcessResult {
+    slotName: string | ExpressionNode;
+    slotProps: PropsExpression | undefined;
+}
+export declare function processSlotOutlet(node: SlotOutletNode, context: TransformContext): SlotOutletProcessResult;
+
+export declare function getConstantType(node: TemplateChildNode | SimpleExpressionNode, context: TransformContext): ConstantTypes;
+

Fichier diff supprimé car celui-ci est trop grand
+ 5692 - 0
node_modules/@vue/compiler-core/dist/compiler-core.esm-bundler.js


+ 7 - 0
node_modules/@vue/compiler-core/index.js

@@ -0,0 +1,7 @@
+'use strict'
+
+if (process.env.NODE_ENV === 'production') {
+  module.exports = require('./dist/compiler-core.cjs.prod.js')
+} else {
+  module.exports = require('./dist/compiler-core.cjs.js')
+}

+ 58 - 0
node_modules/@vue/compiler-core/package.json

@@ -0,0 +1,58 @@
+{
+  "name": "@vue/compiler-core",
+  "version": "3.4.27",
+  "description": "@vue/compiler-core",
+  "main": "index.js",
+  "module": "dist/compiler-core.esm-bundler.js",
+  "types": "dist/compiler-core.d.ts",
+  "files": [
+    "index.js",
+    "dist"
+  ],
+  "exports": {
+    ".": {
+      "types": "./dist/compiler-core.d.ts",
+      "node": {
+        "production": "./dist/compiler-core.cjs.prod.js",
+        "development": "./dist/compiler-core.cjs.js",
+        "default": "./index.js"
+      },
+      "module": "./dist/compiler-core.esm-bundler.js",
+      "import": "./dist/compiler-core.esm-bundler.js",
+      "require": "./index.js"
+    },
+    "./*": "./*"
+  },
+  "buildOptions": {
+    "name": "VueCompilerCore",
+    "compat": true,
+    "formats": [
+      "esm-bundler",
+      "cjs"
+    ]
+  },
+  "repository": {
+    "type": "git",
+    "url": "git+https://github.com/vuejs/core.git",
+    "directory": "packages/compiler-core"
+  },
+  "keywords": [
+    "vue"
+  ],
+  "author": "Evan You",
+  "license": "MIT",
+  "bugs": {
+    "url": "https://github.com/vuejs/core/issues"
+  },
+  "homepage": "https://github.com/vuejs/core/tree/main/packages/compiler-core#readme",
+  "dependencies": {
+    "@babel/parser": "^7.24.4",
+    "entities": "^4.5.0",
+    "estree-walker": "^2.0.2",
+    "source-map-js": "^1.2.0",
+    "@vue/shared": "3.4.27"
+  },
+  "devDependencies": {
+    "@babel/types": "^7.24.0"
+  }
+}

+ 21 - 0
node_modules/@vue/compiler-dom/LICENSE

@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2018-present, Yuxi (Evan) You
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.

+ 1 - 0
node_modules/@vue/compiler-dom/README.md

@@ -0,0 +1 @@
+# @vue/compiler-dom

+ 731 - 0
node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.js

@@ -0,0 +1,731 @@
+/**
+* @vue/compiler-dom v3.4.27
+* (c) 2018-present Yuxi (Evan) You and Vue contributors
+* @license MIT
+**/
+'use strict';
+
+Object.defineProperty(exports, '__esModule', { value: true });
+
+var compilerCore = require('@vue/compiler-core');
+var shared = require('@vue/shared');
+
+const V_MODEL_RADIO = Symbol(`vModelRadio` );
+const V_MODEL_CHECKBOX = Symbol(`vModelCheckbox` );
+const V_MODEL_TEXT = Symbol(`vModelText` );
+const V_MODEL_SELECT = Symbol(`vModelSelect` );
+const V_MODEL_DYNAMIC = Symbol(`vModelDynamic` );
+const V_ON_WITH_MODIFIERS = Symbol(`vOnModifiersGuard` );
+const V_ON_WITH_KEYS = Symbol(`vOnKeysGuard` );
+const V_SHOW = Symbol(`vShow` );
+const TRANSITION = Symbol(`Transition` );
+const TRANSITION_GROUP = Symbol(`TransitionGroup` );
+compilerCore.registerRuntimeHelpers({
+  [V_MODEL_RADIO]: `vModelRadio`,
+  [V_MODEL_CHECKBOX]: `vModelCheckbox`,
+  [V_MODEL_TEXT]: `vModelText`,
+  [V_MODEL_SELECT]: `vModelSelect`,
+  [V_MODEL_DYNAMIC]: `vModelDynamic`,
+  [V_ON_WITH_MODIFIERS]: `withModifiers`,
+  [V_ON_WITH_KEYS]: `withKeys`,
+  [V_SHOW]: `vShow`,
+  [TRANSITION]: `Transition`,
+  [TRANSITION_GROUP]: `TransitionGroup`
+});
+
+const parserOptions = {
+  parseMode: "html",
+  isVoidTag: shared.isVoidTag,
+  isNativeTag: (tag) => shared.isHTMLTag(tag) || shared.isSVGTag(tag) || shared.isMathMLTag(tag),
+  isPreTag: (tag) => tag === "pre",
+  decodeEntities: void 0,
+  isBuiltInComponent: (tag) => {
+    if (tag === "Transition" || tag === "transition") {
+      return TRANSITION;
+    } else if (tag === "TransitionGroup" || tag === "transition-group") {
+      return TRANSITION_GROUP;
+    }
+  },
+  // https://html.spec.whatwg.org/multipage/parsing.html#tree-construction-dispatcher
+  getNamespace(tag, parent, rootNamespace) {
+    let ns = parent ? parent.ns : rootNamespace;
+    if (parent && ns === 2) {
+      if (parent.tag === "annotation-xml") {
+        if (tag === "svg") {
+          return 1;
+        }
+        if (parent.props.some(
+          (a) => a.type === 6 && a.name === "encoding" && a.value != null && (a.value.content === "text/html" || a.value.content === "application/xhtml+xml")
+        )) {
+          ns = 0;
+        }
+      } else if (/^m(?:[ions]|text)$/.test(parent.tag) && tag !== "mglyph" && tag !== "malignmark") {
+        ns = 0;
+      }
+    } else if (parent && ns === 1) {
+      if (parent.tag === "foreignObject" || parent.tag === "desc" || parent.tag === "title") {
+        ns = 0;
+      }
+    }
+    if (ns === 0) {
+      if (tag === "svg") {
+        return 1;
+      }
+      if (tag === "math") {
+        return 2;
+      }
+    }
+    return ns;
+  }
+};
+
+const transformStyle = (node) => {
+  if (node.type === 1) {
+    node.props.forEach((p, i) => {
+      if (p.type === 6 && p.name === "style" && p.value) {
+        node.props[i] = {
+          type: 7,
+          name: `bind`,
+          arg: compilerCore.createSimpleExpression(`style`, true, p.loc),
+          exp: parseInlineCSS(p.value.content, p.loc),
+          modifiers: [],
+          loc: p.loc
+        };
+      }
+    });
+  }
+};
+const parseInlineCSS = (cssText, loc) => {
+  const normalized = shared.parseStringStyle(cssText);
+  return compilerCore.createSimpleExpression(
+    JSON.stringify(normalized),
+    false,
+    loc,
+    3
+  );
+};
+
+function createDOMCompilerError(code, loc) {
+  return compilerCore.createCompilerError(
+    code,
+    loc,
+    DOMErrorMessages 
+  );
+}
+const DOMErrorCodes = {
+  "X_V_HTML_NO_EXPRESSION": 53,
+  "53": "X_V_HTML_NO_EXPRESSION",
+  "X_V_HTML_WITH_CHILDREN": 54,
+  "54": "X_V_HTML_WITH_CHILDREN",
+  "X_V_TEXT_NO_EXPRESSION": 55,
+  "55": "X_V_TEXT_NO_EXPRESSION",
+  "X_V_TEXT_WITH_CHILDREN": 56,
+  "56": "X_V_TEXT_WITH_CHILDREN",
+  "X_V_MODEL_ON_INVALID_ELEMENT": 57,
+  "57": "X_V_MODEL_ON_INVALID_ELEMENT",
+  "X_V_MODEL_ARG_ON_ELEMENT": 58,
+  "58": "X_V_MODEL_ARG_ON_ELEMENT",
+  "X_V_MODEL_ON_FILE_INPUT_ELEMENT": 59,
+  "59": "X_V_MODEL_ON_FILE_INPUT_ELEMENT",
+  "X_V_MODEL_UNNECESSARY_VALUE": 60,
+  "60": "X_V_MODEL_UNNECESSARY_VALUE",
+  "X_V_SHOW_NO_EXPRESSION": 61,
+  "61": "X_V_SHOW_NO_EXPRESSION",
+  "X_TRANSITION_INVALID_CHILDREN": 62,
+  "62": "X_TRANSITION_INVALID_CHILDREN",
+  "X_IGNORED_SIDE_EFFECT_TAG": 63,
+  "63": "X_IGNORED_SIDE_EFFECT_TAG",
+  "__EXTEND_POINT__": 64,
+  "64": "__EXTEND_POINT__"
+};
+const DOMErrorMessages = {
+  [53]: `v-html is missing expression.`,
+  [54]: `v-html will override element children.`,
+  [55]: `v-text is missing expression.`,
+  [56]: `v-text will override element children.`,
+  [57]: `v-model can only be used on <input>, <textarea> and <select> elements.`,
+  [58]: `v-model argument is not supported on plain elements.`,
+  [59]: `v-model cannot be used on file inputs since they are read-only. Use a v-on:change listener instead.`,
+  [60]: `Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.`,
+  [61]: `v-show is missing expression.`,
+  [62]: `<Transition> expects exactly one child element or component.`,
+  [63]: `Tags with side effect (<script> and <style>) are ignored in client component templates.`
+};
+
+const transformVHtml = (dir, node, context) => {
+  const { exp, loc } = dir;
+  if (!exp) {
+    context.onError(
+      createDOMCompilerError(53, loc)
+    );
+  }
+  if (node.children.length) {
+    context.onError(
+      createDOMCompilerError(54, loc)
+    );
+    node.children.length = 0;
+  }
+  return {
+    props: [
+      compilerCore.createObjectProperty(
+        compilerCore.createSimpleExpression(`innerHTML`, true, loc),
+        exp || compilerCore.createSimpleExpression("", true)
+      )
+    ]
+  };
+};
+
+const transformVText = (dir, node, context) => {
+  const { exp, loc } = dir;
+  if (!exp) {
+    context.onError(
+      createDOMCompilerError(55, loc)
+    );
+  }
+  if (node.children.length) {
+    context.onError(
+      createDOMCompilerError(56, loc)
+    );
+    node.children.length = 0;
+  }
+  return {
+    props: [
+      compilerCore.createObjectProperty(
+        compilerCore.createSimpleExpression(`textContent`, true),
+        exp ? compilerCore.getConstantType(exp, context) > 0 ? exp : compilerCore.createCallExpression(
+          context.helperString(compilerCore.TO_DISPLAY_STRING),
+          [exp],
+          loc
+        ) : compilerCore.createSimpleExpression("", true)
+      )
+    ]
+  };
+};
+
+const transformModel = (dir, node, context) => {
+  const baseResult = compilerCore.transformModel(dir, node, context);
+  if (!baseResult.props.length || node.tagType === 1) {
+    return baseResult;
+  }
+  if (dir.arg) {
+    context.onError(
+      createDOMCompilerError(
+        58,
+        dir.arg.loc
+      )
+    );
+  }
+  function checkDuplicatedValue() {
+    const value = compilerCore.findDir(node, "bind");
+    if (value && compilerCore.isStaticArgOf(value.arg, "value")) {
+      context.onError(
+        createDOMCompilerError(
+          60,
+          value.loc
+        )
+      );
+    }
+  }
+  const { tag } = node;
+  const isCustomElement = context.isCustomElement(tag);
+  if (tag === "input" || tag === "textarea" || tag === "select" || isCustomElement) {
+    let directiveToUse = V_MODEL_TEXT;
+    let isInvalidType = false;
+    if (tag === "input" || isCustomElement) {
+      const type = compilerCore.findProp(node, `type`);
+      if (type) {
+        if (type.type === 7) {
+          directiveToUse = V_MODEL_DYNAMIC;
+        } else if (type.value) {
+          switch (type.value.content) {
+            case "radio":
+              directiveToUse = V_MODEL_RADIO;
+              break;
+            case "checkbox":
+              directiveToUse = V_MODEL_CHECKBOX;
+              break;
+            case "file":
+              isInvalidType = true;
+              context.onError(
+                createDOMCompilerError(
+                  59,
+                  dir.loc
+                )
+              );
+              break;
+            default:
+              checkDuplicatedValue();
+              break;
+          }
+        }
+      } else if (compilerCore.hasDynamicKeyVBind(node)) {
+        directiveToUse = V_MODEL_DYNAMIC;
+      } else {
+        checkDuplicatedValue();
+      }
+    } else if (tag === "select") {
+      directiveToUse = V_MODEL_SELECT;
+    } else {
+      checkDuplicatedValue();
+    }
+    if (!isInvalidType) {
+      baseResult.needRuntime = context.helper(directiveToUse);
+    }
+  } else {
+    context.onError(
+      createDOMCompilerError(
+        57,
+        dir.loc
+      )
+    );
+  }
+  baseResult.props = baseResult.props.filter(
+    (p) => !(p.key.type === 4 && p.key.content === "modelValue")
+  );
+  return baseResult;
+};
+
+const isEventOptionModifier = /* @__PURE__ */ shared.makeMap(`passive,once,capture`);
+const isNonKeyModifier = /* @__PURE__ */ shared.makeMap(
+  // event propagation management
+  `stop,prevent,self,ctrl,shift,alt,meta,exact,middle`
+);
+const maybeKeyModifier = /* @__PURE__ */ shared.makeMap("left,right");
+const isKeyboardEvent = /* @__PURE__ */ shared.makeMap(
+  `onkeyup,onkeydown,onkeypress`,
+  true
+);
+const resolveModifiers = (key, modifiers, context, loc) => {
+  const keyModifiers = [];
+  const nonKeyModifiers = [];
+  const eventOptionModifiers = [];
+  for (let i = 0; i < modifiers.length; i++) {
+    const modifier = modifiers[i];
+    if (modifier === "native" && compilerCore.checkCompatEnabled(
+      "COMPILER_V_ON_NATIVE",
+      context,
+      loc
+    )) {
+      eventOptionModifiers.push(modifier);
+    } else if (isEventOptionModifier(modifier)) {
+      eventOptionModifiers.push(modifier);
+    } else {
+      if (maybeKeyModifier(modifier)) {
+        if (compilerCore.isStaticExp(key)) {
+          if (isKeyboardEvent(key.content)) {
+            keyModifiers.push(modifier);
+          } else {
+            nonKeyModifiers.push(modifier);
+          }
+        } else {
+          keyModifiers.push(modifier);
+          nonKeyModifiers.push(modifier);
+        }
+      } else {
+        if (isNonKeyModifier(modifier)) {
+          nonKeyModifiers.push(modifier);
+        } else {
+          keyModifiers.push(modifier);
+        }
+      }
+    }
+  }
+  return {
+    keyModifiers,
+    nonKeyModifiers,
+    eventOptionModifiers
+  };
+};
+const transformClick = (key, event) => {
+  const isStaticClick = compilerCore.isStaticExp(key) && key.content.toLowerCase() === "onclick";
+  return isStaticClick ? compilerCore.createSimpleExpression(event, true) : key.type !== 4 ? compilerCore.createCompoundExpression([
+    `(`,
+    key,
+    `) === "onClick" ? "${event}" : (`,
+    key,
+    `)`
+  ]) : key;
+};
+const transformOn = (dir, node, context) => {
+  return compilerCore.transformOn(dir, node, context, (baseResult) => {
+    const { modifiers } = dir;
+    if (!modifiers.length)
+      return baseResult;
+    let { key, value: handlerExp } = baseResult.props[0];
+    const { keyModifiers, nonKeyModifiers, eventOptionModifiers } = resolveModifiers(key, modifiers, context, dir.loc);
+    if (nonKeyModifiers.includes("right")) {
+      key = transformClick(key, `onContextmenu`);
+    }
+    if (nonKeyModifiers.includes("middle")) {
+      key = transformClick(key, `onMouseup`);
+    }
+    if (nonKeyModifiers.length) {
+      handlerExp = compilerCore.createCallExpression(context.helper(V_ON_WITH_MODIFIERS), [
+        handlerExp,
+        JSON.stringify(nonKeyModifiers)
+      ]);
+    }
+    if (keyModifiers.length && // if event name is dynamic, always wrap with keys guard
+    (!compilerCore.isStaticExp(key) || isKeyboardEvent(key.content))) {
+      handlerExp = compilerCore.createCallExpression(context.helper(V_ON_WITH_KEYS), [
+        handlerExp,
+        JSON.stringify(keyModifiers)
+      ]);
+    }
+    if (eventOptionModifiers.length) {
+      const modifierPostfix = eventOptionModifiers.map(shared.capitalize).join("");
+      key = compilerCore.isStaticExp(key) ? compilerCore.createSimpleExpression(`${key.content}${modifierPostfix}`, true) : compilerCore.createCompoundExpression([`(`, key, `) + "${modifierPostfix}"`]);
+    }
+    return {
+      props: [compilerCore.createObjectProperty(key, handlerExp)]
+    };
+  });
+};
+
+const transformShow = (dir, node, context) => {
+  const { exp, loc } = dir;
+  if (!exp) {
+    context.onError(
+      createDOMCompilerError(61, loc)
+    );
+  }
+  return {
+    props: [],
+    needRuntime: context.helper(V_SHOW)
+  };
+};
+
+const transformTransition = (node, context) => {
+  if (node.type === 1 && node.tagType === 1) {
+    const component = context.isBuiltInComponent(node.tag);
+    if (component === TRANSITION) {
+      return () => {
+        if (!node.children.length) {
+          return;
+        }
+        if (hasMultipleChildren(node)) {
+          context.onError(
+            createDOMCompilerError(
+              62,
+              {
+                start: node.children[0].loc.start,
+                end: node.children[node.children.length - 1].loc.end,
+                source: ""
+              }
+            )
+          );
+        }
+        const child = node.children[0];
+        if (child.type === 1) {
+          for (const p of child.props) {
+            if (p.type === 7 && p.name === "show") {
+              node.props.push({
+                type: 6,
+                name: "persisted",
+                nameLoc: node.loc,
+                value: void 0,
+                loc: node.loc
+              });
+            }
+          }
+        }
+      };
+    }
+  }
+};
+function hasMultipleChildren(node) {
+  const children = node.children = node.children.filter(
+    (c) => c.type !== 3 && !(c.type === 2 && !c.content.trim())
+  );
+  const child = children[0];
+  return children.length !== 1 || child.type === 11 || child.type === 9 && child.branches.some(hasMultipleChildren);
+}
+
+const expReplaceRE = /__VUE_EXP_START__(.*?)__VUE_EXP_END__/g;
+const stringifyStatic = (children, context, parent) => {
+  if (context.scopes.vSlot > 0) {
+    return;
+  }
+  let nc = 0;
+  let ec = 0;
+  const currentChunk = [];
+  const stringifyCurrentChunk = (currentIndex) => {
+    if (nc >= 20 || ec >= 5) {
+      const staticCall = compilerCore.createCallExpression(context.helper(compilerCore.CREATE_STATIC), [
+        JSON.stringify(
+          currentChunk.map((node) => stringifyNode(node, context)).join("")
+        ).replace(expReplaceRE, `" + $1 + "`),
+        // the 2nd argument indicates the number of DOM nodes this static vnode
+        // will insert / hydrate
+        String(currentChunk.length)
+      ]);
+      replaceHoist(currentChunk[0], staticCall, context);
+      if (currentChunk.length > 1) {
+        for (let i2 = 1; i2 < currentChunk.length; i2++) {
+          replaceHoist(currentChunk[i2], null, context);
+        }
+        const deleteCount = currentChunk.length - 1;
+        children.splice(currentIndex - currentChunk.length + 1, deleteCount);
+        return deleteCount;
+      }
+    }
+    return 0;
+  };
+  let i = 0;
+  for (; i < children.length; i++) {
+    const child = children[i];
+    const hoisted = getHoistedNode(child);
+    if (hoisted) {
+      const node = child;
+      const result = analyzeNode(node);
+      if (result) {
+        nc += result[0];
+        ec += result[1];
+        currentChunk.push(node);
+        continue;
+      }
+    }
+    i -= stringifyCurrentChunk(i);
+    nc = 0;
+    ec = 0;
+    currentChunk.length = 0;
+  }
+  stringifyCurrentChunk(i);
+};
+const getHoistedNode = (node) => (node.type === 1 && node.tagType === 0 || node.type == 12) && node.codegenNode && node.codegenNode.type === 4 && node.codegenNode.hoisted;
+const dataAriaRE = /^(data|aria)-/;
+const isStringifiableAttr = (name, ns) => {
+  return (ns === 0 ? shared.isKnownHtmlAttr(name) : ns === 1 ? shared.isKnownSvgAttr(name) : false) || dataAriaRE.test(name);
+};
+const replaceHoist = (node, replacement, context) => {
+  const hoistToReplace = node.codegenNode.hoisted;
+  context.hoists[context.hoists.indexOf(hoistToReplace)] = replacement;
+};
+const isNonStringifiable = /* @__PURE__ */ shared.makeMap(
+  `caption,thead,tr,th,tbody,td,tfoot,colgroup,col`
+);
+function analyzeNode(node) {
+  if (node.type === 1 && isNonStringifiable(node.tag)) {
+    return false;
+  }
+  if (node.type === 12) {
+    return [1, 0];
+  }
+  let nc = 1;
+  let ec = node.props.length > 0 ? 1 : 0;
+  let bailed = false;
+  const bail = () => {
+    bailed = true;
+    return false;
+  };
+  function walk(node2) {
+    const isOptionTag = node2.tag === "option" && node2.ns === 0;
+    for (let i = 0; i < node2.props.length; i++) {
+      const p = node2.props[i];
+      if (p.type === 6 && !isStringifiableAttr(p.name, node2.ns)) {
+        return bail();
+      }
+      if (p.type === 7 && p.name === "bind") {
+        if (p.arg && (p.arg.type === 8 || p.arg.isStatic && !isStringifiableAttr(p.arg.content, node2.ns))) {
+          return bail();
+        }
+        if (p.exp && (p.exp.type === 8 || p.exp.constType < 3)) {
+          return bail();
+        }
+        if (isOptionTag && compilerCore.isStaticArgOf(p.arg, "value") && p.exp && p.exp.ast && p.exp.ast.type !== "StringLiteral") {
+          return bail();
+        }
+      }
+    }
+    for (let i = 0; i < node2.children.length; i++) {
+      nc++;
+      const child = node2.children[i];
+      if (child.type === 1) {
+        if (child.props.length > 0) {
+          ec++;
+        }
+        walk(child);
+        if (bailed) {
+          return false;
+        }
+      }
+    }
+    return true;
+  }
+  return walk(node) ? [nc, ec] : false;
+}
+function stringifyNode(node, context) {
+  if (shared.isString(node)) {
+    return node;
+  }
+  if (shared.isSymbol(node)) {
+    return ``;
+  }
+  switch (node.type) {
+    case 1:
+      return stringifyElement(node, context);
+    case 2:
+      return shared.escapeHtml(node.content);
+    case 3:
+      return `<!--${shared.escapeHtml(node.content)}-->`;
+    case 5:
+      return shared.escapeHtml(shared.toDisplayString(evaluateConstant(node.content)));
+    case 8:
+      return shared.escapeHtml(evaluateConstant(node));
+    case 12:
+      return stringifyNode(node.content, context);
+    default:
+      return "";
+  }
+}
+function stringifyElement(node, context) {
+  let res = `<${node.tag}`;
+  let innerHTML = "";
+  for (let i = 0; i < node.props.length; i++) {
+    const p = node.props[i];
+    if (p.type === 6) {
+      res += ` ${p.name}`;
+      if (p.value) {
+        res += `="${shared.escapeHtml(p.value.content)}"`;
+      }
+    } else if (p.type === 7) {
+      if (p.name === "bind") {
+        const exp = p.exp;
+        if (exp.content[0] === "_") {
+          res += ` ${p.arg.content}="__VUE_EXP_START__${exp.content}__VUE_EXP_END__"`;
+          continue;
+        }
+        if (shared.isBooleanAttr(p.arg.content) && exp.content === "false") {
+          continue;
+        }
+        let evaluated = evaluateConstant(exp);
+        if (evaluated != null) {
+          const arg = p.arg && p.arg.content;
+          if (arg === "class") {
+            evaluated = shared.normalizeClass(evaluated);
+          } else if (arg === "style") {
+            evaluated = shared.stringifyStyle(shared.normalizeStyle(evaluated));
+          }
+          res += ` ${p.arg.content}="${shared.escapeHtml(
+            evaluated
+          )}"`;
+        }
+      } else if (p.name === "html") {
+        innerHTML = evaluateConstant(p.exp);
+      } else if (p.name === "text") {
+        innerHTML = shared.escapeHtml(
+          shared.toDisplayString(evaluateConstant(p.exp))
+        );
+      }
+    }
+  }
+  if (context.scopeId) {
+    res += ` ${context.scopeId}`;
+  }
+  res += `>`;
+  if (innerHTML) {
+    res += innerHTML;
+  } else {
+    for (let i = 0; i < node.children.length; i++) {
+      res += stringifyNode(node.children[i], context);
+    }
+  }
+  if (!shared.isVoidTag(node.tag)) {
+    res += `</${node.tag}>`;
+  }
+  return res;
+}
+function evaluateConstant(exp) {
+  if (exp.type === 4) {
+    return new Function(`return (${exp.content})`)();
+  } else {
+    let res = ``;
+    exp.children.forEach((c) => {
+      if (shared.isString(c) || shared.isSymbol(c)) {
+        return;
+      }
+      if (c.type === 2) {
+        res += c.content;
+      } else if (c.type === 5) {
+        res += shared.toDisplayString(evaluateConstant(c.content));
+      } else {
+        res += evaluateConstant(c);
+      }
+    });
+    return res;
+  }
+}
+
+const ignoreSideEffectTags = (node, context) => {
+  if (node.type === 1 && node.tagType === 0 && (node.tag === "script" || node.tag === "style")) {
+    context.onError(
+      createDOMCompilerError(
+        63,
+        node.loc
+      )
+    );
+    context.removeNode();
+  }
+};
+
+const DOMNodeTransforms = [
+  transformStyle,
+  ...[transformTransition] 
+];
+const DOMDirectiveTransforms = {
+  cloak: compilerCore.noopDirectiveTransform,
+  html: transformVHtml,
+  text: transformVText,
+  model: transformModel,
+  // override compiler-core
+  on: transformOn,
+  // override compiler-core
+  show: transformShow
+};
+function compile(src, options = {}) {
+  return compilerCore.baseCompile(
+    src,
+    shared.extend({}, parserOptions, options, {
+      nodeTransforms: [
+        // ignore <script> and <tag>
+        // this is not put inside DOMNodeTransforms because that list is used
+        // by compiler-ssr to generate vnode fallback branches
+        ignoreSideEffectTags,
+        ...DOMNodeTransforms,
+        ...options.nodeTransforms || []
+      ],
+      directiveTransforms: shared.extend(
+        {},
+        DOMDirectiveTransforms,
+        options.directiveTransforms || {}
+      ),
+      transformHoist: stringifyStatic
+    })
+  );
+}
+function parse(template, options = {}) {
+  return compilerCore.baseParse(template, shared.extend({}, parserOptions, options));
+}
+
+exports.DOMDirectiveTransforms = DOMDirectiveTransforms;
+exports.DOMErrorCodes = DOMErrorCodes;
+exports.DOMErrorMessages = DOMErrorMessages;
+exports.DOMNodeTransforms = DOMNodeTransforms;
+exports.TRANSITION = TRANSITION;
+exports.TRANSITION_GROUP = TRANSITION_GROUP;
+exports.V_MODEL_CHECKBOX = V_MODEL_CHECKBOX;
+exports.V_MODEL_DYNAMIC = V_MODEL_DYNAMIC;
+exports.V_MODEL_RADIO = V_MODEL_RADIO;
+exports.V_MODEL_SELECT = V_MODEL_SELECT;
+exports.V_MODEL_TEXT = V_MODEL_TEXT;
+exports.V_ON_WITH_KEYS = V_ON_WITH_KEYS;
+exports.V_ON_WITH_MODIFIERS = V_ON_WITH_MODIFIERS;
+exports.V_SHOW = V_SHOW;
+exports.compile = compile;
+exports.createDOMCompilerError = createDOMCompilerError;
+exports.parse = parse;
+exports.parserOptions = parserOptions;
+exports.transformStyle = transformStyle;
+Object.keys(compilerCore).forEach(function (k) {
+  if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = compilerCore[k];
+});

+ 661 - 0
node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.prod.js

@@ -0,0 +1,661 @@
+/**
+* @vue/compiler-dom v3.4.27
+* (c) 2018-present Yuxi (Evan) You and Vue contributors
+* @license MIT
+**/
+'use strict';
+
+Object.defineProperty(exports, '__esModule', { value: true });
+
+var compilerCore = require('@vue/compiler-core');
+var shared = require('@vue/shared');
+
+const V_MODEL_RADIO = Symbol(``);
+const V_MODEL_CHECKBOX = Symbol(``);
+const V_MODEL_TEXT = Symbol(``);
+const V_MODEL_SELECT = Symbol(``);
+const V_MODEL_DYNAMIC = Symbol(``);
+const V_ON_WITH_MODIFIERS = Symbol(``);
+const V_ON_WITH_KEYS = Symbol(``);
+const V_SHOW = Symbol(``);
+const TRANSITION = Symbol(``);
+const TRANSITION_GROUP = Symbol(``);
+compilerCore.registerRuntimeHelpers({
+  [V_MODEL_RADIO]: `vModelRadio`,
+  [V_MODEL_CHECKBOX]: `vModelCheckbox`,
+  [V_MODEL_TEXT]: `vModelText`,
+  [V_MODEL_SELECT]: `vModelSelect`,
+  [V_MODEL_DYNAMIC]: `vModelDynamic`,
+  [V_ON_WITH_MODIFIERS]: `withModifiers`,
+  [V_ON_WITH_KEYS]: `withKeys`,
+  [V_SHOW]: `vShow`,
+  [TRANSITION]: `Transition`,
+  [TRANSITION_GROUP]: `TransitionGroup`
+});
+
+const parserOptions = {
+  parseMode: "html",
+  isVoidTag: shared.isVoidTag,
+  isNativeTag: (tag) => shared.isHTMLTag(tag) || shared.isSVGTag(tag) || shared.isMathMLTag(tag),
+  isPreTag: (tag) => tag === "pre",
+  decodeEntities: void 0,
+  isBuiltInComponent: (tag) => {
+    if (tag === "Transition" || tag === "transition") {
+      return TRANSITION;
+    } else if (tag === "TransitionGroup" || tag === "transition-group") {
+      return TRANSITION_GROUP;
+    }
+  },
+  // https://html.spec.whatwg.org/multipage/parsing.html#tree-construction-dispatcher
+  getNamespace(tag, parent, rootNamespace) {
+    let ns = parent ? parent.ns : rootNamespace;
+    if (parent && ns === 2) {
+      if (parent.tag === "annotation-xml") {
+        if (tag === "svg") {
+          return 1;
+        }
+        if (parent.props.some(
+          (a) => a.type === 6 && a.name === "encoding" && a.value != null && (a.value.content === "text/html" || a.value.content === "application/xhtml+xml")
+        )) {
+          ns = 0;
+        }
+      } else if (/^m(?:[ions]|text)$/.test(parent.tag) && tag !== "mglyph" && tag !== "malignmark") {
+        ns = 0;
+      }
+    } else if (parent && ns === 1) {
+      if (parent.tag === "foreignObject" || parent.tag === "desc" || parent.tag === "title") {
+        ns = 0;
+      }
+    }
+    if (ns === 0) {
+      if (tag === "svg") {
+        return 1;
+      }
+      if (tag === "math") {
+        return 2;
+      }
+    }
+    return ns;
+  }
+};
+
+const transformStyle = (node) => {
+  if (node.type === 1) {
+    node.props.forEach((p, i) => {
+      if (p.type === 6 && p.name === "style" && p.value) {
+        node.props[i] = {
+          type: 7,
+          name: `bind`,
+          arg: compilerCore.createSimpleExpression(`style`, true, p.loc),
+          exp: parseInlineCSS(p.value.content, p.loc),
+          modifiers: [],
+          loc: p.loc
+        };
+      }
+    });
+  }
+};
+const parseInlineCSS = (cssText, loc) => {
+  const normalized = shared.parseStringStyle(cssText);
+  return compilerCore.createSimpleExpression(
+    JSON.stringify(normalized),
+    false,
+    loc,
+    3
+  );
+};
+
+function createDOMCompilerError(code, loc) {
+  return compilerCore.createCompilerError(
+    code,
+    loc,
+    DOMErrorMessages 
+  );
+}
+const DOMErrorCodes = {
+  "X_V_HTML_NO_EXPRESSION": 53,
+  "53": "X_V_HTML_NO_EXPRESSION",
+  "X_V_HTML_WITH_CHILDREN": 54,
+  "54": "X_V_HTML_WITH_CHILDREN",
+  "X_V_TEXT_NO_EXPRESSION": 55,
+  "55": "X_V_TEXT_NO_EXPRESSION",
+  "X_V_TEXT_WITH_CHILDREN": 56,
+  "56": "X_V_TEXT_WITH_CHILDREN",
+  "X_V_MODEL_ON_INVALID_ELEMENT": 57,
+  "57": "X_V_MODEL_ON_INVALID_ELEMENT",
+  "X_V_MODEL_ARG_ON_ELEMENT": 58,
+  "58": "X_V_MODEL_ARG_ON_ELEMENT",
+  "X_V_MODEL_ON_FILE_INPUT_ELEMENT": 59,
+  "59": "X_V_MODEL_ON_FILE_INPUT_ELEMENT",
+  "X_V_MODEL_UNNECESSARY_VALUE": 60,
+  "60": "X_V_MODEL_UNNECESSARY_VALUE",
+  "X_V_SHOW_NO_EXPRESSION": 61,
+  "61": "X_V_SHOW_NO_EXPRESSION",
+  "X_TRANSITION_INVALID_CHILDREN": 62,
+  "62": "X_TRANSITION_INVALID_CHILDREN",
+  "X_IGNORED_SIDE_EFFECT_TAG": 63,
+  "63": "X_IGNORED_SIDE_EFFECT_TAG",
+  "__EXTEND_POINT__": 64,
+  "64": "__EXTEND_POINT__"
+};
+const DOMErrorMessages = {
+  [53]: `v-html is missing expression.`,
+  [54]: `v-html will override element children.`,
+  [55]: `v-text is missing expression.`,
+  [56]: `v-text will override element children.`,
+  [57]: `v-model can only be used on <input>, <textarea> and <select> elements.`,
+  [58]: `v-model argument is not supported on plain elements.`,
+  [59]: `v-model cannot be used on file inputs since they are read-only. Use a v-on:change listener instead.`,
+  [60]: `Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.`,
+  [61]: `v-show is missing expression.`,
+  [62]: `<Transition> expects exactly one child element or component.`,
+  [63]: `Tags with side effect (<script> and <style>) are ignored in client component templates.`
+};
+
+const transformVHtml = (dir, node, context) => {
+  const { exp, loc } = dir;
+  if (!exp) {
+    context.onError(
+      createDOMCompilerError(53, loc)
+    );
+  }
+  if (node.children.length) {
+    context.onError(
+      createDOMCompilerError(54, loc)
+    );
+    node.children.length = 0;
+  }
+  return {
+    props: [
+      compilerCore.createObjectProperty(
+        compilerCore.createSimpleExpression(`innerHTML`, true, loc),
+        exp || compilerCore.createSimpleExpression("", true)
+      )
+    ]
+  };
+};
+
+const transformVText = (dir, node, context) => {
+  const { exp, loc } = dir;
+  if (!exp) {
+    context.onError(
+      createDOMCompilerError(55, loc)
+    );
+  }
+  if (node.children.length) {
+    context.onError(
+      createDOMCompilerError(56, loc)
+    );
+    node.children.length = 0;
+  }
+  return {
+    props: [
+      compilerCore.createObjectProperty(
+        compilerCore.createSimpleExpression(`textContent`, true),
+        exp ? compilerCore.getConstantType(exp, context) > 0 ? exp : compilerCore.createCallExpression(
+          context.helperString(compilerCore.TO_DISPLAY_STRING),
+          [exp],
+          loc
+        ) : compilerCore.createSimpleExpression("", true)
+      )
+    ]
+  };
+};
+
+const transformModel = (dir, node, context) => {
+  const baseResult = compilerCore.transformModel(dir, node, context);
+  if (!baseResult.props.length || node.tagType === 1) {
+    return baseResult;
+  }
+  if (dir.arg) {
+    context.onError(
+      createDOMCompilerError(
+        58,
+        dir.arg.loc
+      )
+    );
+  }
+  const { tag } = node;
+  const isCustomElement = context.isCustomElement(tag);
+  if (tag === "input" || tag === "textarea" || tag === "select" || isCustomElement) {
+    let directiveToUse = V_MODEL_TEXT;
+    let isInvalidType = false;
+    if (tag === "input" || isCustomElement) {
+      const type = compilerCore.findProp(node, `type`);
+      if (type) {
+        if (type.type === 7) {
+          directiveToUse = V_MODEL_DYNAMIC;
+        } else if (type.value) {
+          switch (type.value.content) {
+            case "radio":
+              directiveToUse = V_MODEL_RADIO;
+              break;
+            case "checkbox":
+              directiveToUse = V_MODEL_CHECKBOX;
+              break;
+            case "file":
+              isInvalidType = true;
+              context.onError(
+                createDOMCompilerError(
+                  59,
+                  dir.loc
+                )
+              );
+              break;
+          }
+        }
+      } else if (compilerCore.hasDynamicKeyVBind(node)) {
+        directiveToUse = V_MODEL_DYNAMIC;
+      } else ;
+    } else if (tag === "select") {
+      directiveToUse = V_MODEL_SELECT;
+    } else ;
+    if (!isInvalidType) {
+      baseResult.needRuntime = context.helper(directiveToUse);
+    }
+  } else {
+    context.onError(
+      createDOMCompilerError(
+        57,
+        dir.loc
+      )
+    );
+  }
+  baseResult.props = baseResult.props.filter(
+    (p) => !(p.key.type === 4 && p.key.content === "modelValue")
+  );
+  return baseResult;
+};
+
+const isEventOptionModifier = /* @__PURE__ */ shared.makeMap(`passive,once,capture`);
+const isNonKeyModifier = /* @__PURE__ */ shared.makeMap(
+  // event propagation management
+  `stop,prevent,self,ctrl,shift,alt,meta,exact,middle`
+);
+const maybeKeyModifier = /* @__PURE__ */ shared.makeMap("left,right");
+const isKeyboardEvent = /* @__PURE__ */ shared.makeMap(
+  `onkeyup,onkeydown,onkeypress`,
+  true
+);
+const resolveModifiers = (key, modifiers, context, loc) => {
+  const keyModifiers = [];
+  const nonKeyModifiers = [];
+  const eventOptionModifiers = [];
+  for (let i = 0; i < modifiers.length; i++) {
+    const modifier = modifiers[i];
+    if (modifier === "native" && compilerCore.checkCompatEnabled(
+      "COMPILER_V_ON_NATIVE",
+      context,
+      loc
+    )) {
+      eventOptionModifiers.push(modifier);
+    } else if (isEventOptionModifier(modifier)) {
+      eventOptionModifiers.push(modifier);
+    } else {
+      if (maybeKeyModifier(modifier)) {
+        if (compilerCore.isStaticExp(key)) {
+          if (isKeyboardEvent(key.content)) {
+            keyModifiers.push(modifier);
+          } else {
+            nonKeyModifiers.push(modifier);
+          }
+        } else {
+          keyModifiers.push(modifier);
+          nonKeyModifiers.push(modifier);
+        }
+      } else {
+        if (isNonKeyModifier(modifier)) {
+          nonKeyModifiers.push(modifier);
+        } else {
+          keyModifiers.push(modifier);
+        }
+      }
+    }
+  }
+  return {
+    keyModifiers,
+    nonKeyModifiers,
+    eventOptionModifiers
+  };
+};
+const transformClick = (key, event) => {
+  const isStaticClick = compilerCore.isStaticExp(key) && key.content.toLowerCase() === "onclick";
+  return isStaticClick ? compilerCore.createSimpleExpression(event, true) : key.type !== 4 ? compilerCore.createCompoundExpression([
+    `(`,
+    key,
+    `) === "onClick" ? "${event}" : (`,
+    key,
+    `)`
+  ]) : key;
+};
+const transformOn = (dir, node, context) => {
+  return compilerCore.transformOn(dir, node, context, (baseResult) => {
+    const { modifiers } = dir;
+    if (!modifiers.length)
+      return baseResult;
+    let { key, value: handlerExp } = baseResult.props[0];
+    const { keyModifiers, nonKeyModifiers, eventOptionModifiers } = resolveModifiers(key, modifiers, context, dir.loc);
+    if (nonKeyModifiers.includes("right")) {
+      key = transformClick(key, `onContextmenu`);
+    }
+    if (nonKeyModifiers.includes("middle")) {
+      key = transformClick(key, `onMouseup`);
+    }
+    if (nonKeyModifiers.length) {
+      handlerExp = compilerCore.createCallExpression(context.helper(V_ON_WITH_MODIFIERS), [
+        handlerExp,
+        JSON.stringify(nonKeyModifiers)
+      ]);
+    }
+    if (keyModifiers.length && // if event name is dynamic, always wrap with keys guard
+    (!compilerCore.isStaticExp(key) || isKeyboardEvent(key.content))) {
+      handlerExp = compilerCore.createCallExpression(context.helper(V_ON_WITH_KEYS), [
+        handlerExp,
+        JSON.stringify(keyModifiers)
+      ]);
+    }
+    if (eventOptionModifiers.length) {
+      const modifierPostfix = eventOptionModifiers.map(shared.capitalize).join("");
+      key = compilerCore.isStaticExp(key) ? compilerCore.createSimpleExpression(`${key.content}${modifierPostfix}`, true) : compilerCore.createCompoundExpression([`(`, key, `) + "${modifierPostfix}"`]);
+    }
+    return {
+      props: [compilerCore.createObjectProperty(key, handlerExp)]
+    };
+  });
+};
+
+const transformShow = (dir, node, context) => {
+  const { exp, loc } = dir;
+  if (!exp) {
+    context.onError(
+      createDOMCompilerError(61, loc)
+    );
+  }
+  return {
+    props: [],
+    needRuntime: context.helper(V_SHOW)
+  };
+};
+
+const expReplaceRE = /__VUE_EXP_START__(.*?)__VUE_EXP_END__/g;
+const stringifyStatic = (children, context, parent) => {
+  if (context.scopes.vSlot > 0) {
+    return;
+  }
+  let nc = 0;
+  let ec = 0;
+  const currentChunk = [];
+  const stringifyCurrentChunk = (currentIndex) => {
+    if (nc >= 20 || ec >= 5) {
+      const staticCall = compilerCore.createCallExpression(context.helper(compilerCore.CREATE_STATIC), [
+        JSON.stringify(
+          currentChunk.map((node) => stringifyNode(node, context)).join("")
+        ).replace(expReplaceRE, `" + $1 + "`),
+        // the 2nd argument indicates the number of DOM nodes this static vnode
+        // will insert / hydrate
+        String(currentChunk.length)
+      ]);
+      replaceHoist(currentChunk[0], staticCall, context);
+      if (currentChunk.length > 1) {
+        for (let i2 = 1; i2 < currentChunk.length; i2++) {
+          replaceHoist(currentChunk[i2], null, context);
+        }
+        const deleteCount = currentChunk.length - 1;
+        children.splice(currentIndex - currentChunk.length + 1, deleteCount);
+        return deleteCount;
+      }
+    }
+    return 0;
+  };
+  let i = 0;
+  for (; i < children.length; i++) {
+    const child = children[i];
+    const hoisted = getHoistedNode(child);
+    if (hoisted) {
+      const node = child;
+      const result = analyzeNode(node);
+      if (result) {
+        nc += result[0];
+        ec += result[1];
+        currentChunk.push(node);
+        continue;
+      }
+    }
+    i -= stringifyCurrentChunk(i);
+    nc = 0;
+    ec = 0;
+    currentChunk.length = 0;
+  }
+  stringifyCurrentChunk(i);
+};
+const getHoistedNode = (node) => (node.type === 1 && node.tagType === 0 || node.type == 12) && node.codegenNode && node.codegenNode.type === 4 && node.codegenNode.hoisted;
+const dataAriaRE = /^(data|aria)-/;
+const isStringifiableAttr = (name, ns) => {
+  return (ns === 0 ? shared.isKnownHtmlAttr(name) : ns === 1 ? shared.isKnownSvgAttr(name) : false) || dataAriaRE.test(name);
+};
+const replaceHoist = (node, replacement, context) => {
+  const hoistToReplace = node.codegenNode.hoisted;
+  context.hoists[context.hoists.indexOf(hoistToReplace)] = replacement;
+};
+const isNonStringifiable = /* @__PURE__ */ shared.makeMap(
+  `caption,thead,tr,th,tbody,td,tfoot,colgroup,col`
+);
+function analyzeNode(node) {
+  if (node.type === 1 && isNonStringifiable(node.tag)) {
+    return false;
+  }
+  if (node.type === 12) {
+    return [1, 0];
+  }
+  let nc = 1;
+  let ec = node.props.length > 0 ? 1 : 0;
+  let bailed = false;
+  const bail = () => {
+    bailed = true;
+    return false;
+  };
+  function walk(node2) {
+    const isOptionTag = node2.tag === "option" && node2.ns === 0;
+    for (let i = 0; i < node2.props.length; i++) {
+      const p = node2.props[i];
+      if (p.type === 6 && !isStringifiableAttr(p.name, node2.ns)) {
+        return bail();
+      }
+      if (p.type === 7 && p.name === "bind") {
+        if (p.arg && (p.arg.type === 8 || p.arg.isStatic && !isStringifiableAttr(p.arg.content, node2.ns))) {
+          return bail();
+        }
+        if (p.exp && (p.exp.type === 8 || p.exp.constType < 3)) {
+          return bail();
+        }
+        if (isOptionTag && compilerCore.isStaticArgOf(p.arg, "value") && p.exp && p.exp.ast && p.exp.ast.type !== "StringLiteral") {
+          return bail();
+        }
+      }
+    }
+    for (let i = 0; i < node2.children.length; i++) {
+      nc++;
+      const child = node2.children[i];
+      if (child.type === 1) {
+        if (child.props.length > 0) {
+          ec++;
+        }
+        walk(child);
+        if (bailed) {
+          return false;
+        }
+      }
+    }
+    return true;
+  }
+  return walk(node) ? [nc, ec] : false;
+}
+function stringifyNode(node, context) {
+  if (shared.isString(node)) {
+    return node;
+  }
+  if (shared.isSymbol(node)) {
+    return ``;
+  }
+  switch (node.type) {
+    case 1:
+      return stringifyElement(node, context);
+    case 2:
+      return shared.escapeHtml(node.content);
+    case 3:
+      return `<!--${shared.escapeHtml(node.content)}-->`;
+    case 5:
+      return shared.escapeHtml(shared.toDisplayString(evaluateConstant(node.content)));
+    case 8:
+      return shared.escapeHtml(evaluateConstant(node));
+    case 12:
+      return stringifyNode(node.content, context);
+    default:
+      return "";
+  }
+}
+function stringifyElement(node, context) {
+  let res = `<${node.tag}`;
+  let innerHTML = "";
+  for (let i = 0; i < node.props.length; i++) {
+    const p = node.props[i];
+    if (p.type === 6) {
+      res += ` ${p.name}`;
+      if (p.value) {
+        res += `="${shared.escapeHtml(p.value.content)}"`;
+      }
+    } else if (p.type === 7) {
+      if (p.name === "bind") {
+        const exp = p.exp;
+        if (exp.content[0] === "_") {
+          res += ` ${p.arg.content}="__VUE_EXP_START__${exp.content}__VUE_EXP_END__"`;
+          continue;
+        }
+        if (shared.isBooleanAttr(p.arg.content) && exp.content === "false") {
+          continue;
+        }
+        let evaluated = evaluateConstant(exp);
+        if (evaluated != null) {
+          const arg = p.arg && p.arg.content;
+          if (arg === "class") {
+            evaluated = shared.normalizeClass(evaluated);
+          } else if (arg === "style") {
+            evaluated = shared.stringifyStyle(shared.normalizeStyle(evaluated));
+          }
+          res += ` ${p.arg.content}="${shared.escapeHtml(
+            evaluated
+          )}"`;
+        }
+      } else if (p.name === "html") {
+        innerHTML = evaluateConstant(p.exp);
+      } else if (p.name === "text") {
+        innerHTML = shared.escapeHtml(
+          shared.toDisplayString(evaluateConstant(p.exp))
+        );
+      }
+    }
+  }
+  if (context.scopeId) {
+    res += ` ${context.scopeId}`;
+  }
+  res += `>`;
+  if (innerHTML) {
+    res += innerHTML;
+  } else {
+    for (let i = 0; i < node.children.length; i++) {
+      res += stringifyNode(node.children[i], context);
+    }
+  }
+  if (!shared.isVoidTag(node.tag)) {
+    res += `</${node.tag}>`;
+  }
+  return res;
+}
+function evaluateConstant(exp) {
+  if (exp.type === 4) {
+    return new Function(`return (${exp.content})`)();
+  } else {
+    let res = ``;
+    exp.children.forEach((c) => {
+      if (shared.isString(c) || shared.isSymbol(c)) {
+        return;
+      }
+      if (c.type === 2) {
+        res += c.content;
+      } else if (c.type === 5) {
+        res += shared.toDisplayString(evaluateConstant(c.content));
+      } else {
+        res += evaluateConstant(c);
+      }
+    });
+    return res;
+  }
+}
+
+const ignoreSideEffectTags = (node, context) => {
+  if (node.type === 1 && node.tagType === 0 && (node.tag === "script" || node.tag === "style")) {
+    context.removeNode();
+  }
+};
+
+const DOMNodeTransforms = [
+  transformStyle,
+  ...[]
+];
+const DOMDirectiveTransforms = {
+  cloak: compilerCore.noopDirectiveTransform,
+  html: transformVHtml,
+  text: transformVText,
+  model: transformModel,
+  // override compiler-core
+  on: transformOn,
+  // override compiler-core
+  show: transformShow
+};
+function compile(src, options = {}) {
+  return compilerCore.baseCompile(
+    src,
+    shared.extend({}, parserOptions, options, {
+      nodeTransforms: [
+        // ignore <script> and <tag>
+        // this is not put inside DOMNodeTransforms because that list is used
+        // by compiler-ssr to generate vnode fallback branches
+        ignoreSideEffectTags,
+        ...DOMNodeTransforms,
+        ...options.nodeTransforms || []
+      ],
+      directiveTransforms: shared.extend(
+        {},
+        DOMDirectiveTransforms,
+        options.directiveTransforms || {}
+      ),
+      transformHoist: stringifyStatic
+    })
+  );
+}
+function parse(template, options = {}) {
+  return compilerCore.baseParse(template, shared.extend({}, parserOptions, options));
+}
+
+exports.DOMDirectiveTransforms = DOMDirectiveTransforms;
+exports.DOMErrorCodes = DOMErrorCodes;
+exports.DOMErrorMessages = DOMErrorMessages;
+exports.DOMNodeTransforms = DOMNodeTransforms;
+exports.TRANSITION = TRANSITION;
+exports.TRANSITION_GROUP = TRANSITION_GROUP;
+exports.V_MODEL_CHECKBOX = V_MODEL_CHECKBOX;
+exports.V_MODEL_DYNAMIC = V_MODEL_DYNAMIC;
+exports.V_MODEL_RADIO = V_MODEL_RADIO;
+exports.V_MODEL_SELECT = V_MODEL_SELECT;
+exports.V_MODEL_TEXT = V_MODEL_TEXT;
+exports.V_ON_WITH_KEYS = V_ON_WITH_KEYS;
+exports.V_ON_WITH_MODIFIERS = V_ON_WITH_MODIFIERS;
+exports.V_SHOW = V_SHOW;
+exports.compile = compile;
+exports.createDOMCompilerError = createDOMCompilerError;
+exports.parse = parse;
+exports.parserOptions = parserOptions;
+exports.transformStyle = transformStyle;
+Object.keys(compilerCore).forEach(function (k) {
+  if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = compilerCore[k];
+});

+ 45 - 0
node_modules/@vue/compiler-dom/dist/compiler-dom.d.ts

@@ -0,0 +1,45 @@
+import { ParserOptions, NodeTransform, SourceLocation, CompilerError, DirectiveTransform, RootNode, CompilerOptions, CodegenResult } from '@vue/compiler-core';
+export * from '@vue/compiler-core';
+
+export declare const parserOptions: ParserOptions;
+
+export declare const V_MODEL_RADIO: unique symbol;
+export declare const V_MODEL_CHECKBOX: unique symbol;
+export declare const V_MODEL_TEXT: unique symbol;
+export declare const V_MODEL_SELECT: unique symbol;
+export declare const V_MODEL_DYNAMIC: unique symbol;
+export declare const V_ON_WITH_MODIFIERS: unique symbol;
+export declare const V_ON_WITH_KEYS: unique symbol;
+export declare const V_SHOW: unique symbol;
+export declare const TRANSITION: unique symbol;
+export declare const TRANSITION_GROUP: unique symbol;
+
+export declare const transformStyle: NodeTransform;
+
+interface DOMCompilerError extends CompilerError {
+    code: DOMErrorCodes;
+}
+export declare function createDOMCompilerError(code: DOMErrorCodes, loc?: SourceLocation): DOMCompilerError;
+export declare enum DOMErrorCodes {
+    X_V_HTML_NO_EXPRESSION = 53,
+    X_V_HTML_WITH_CHILDREN = 54,
+    X_V_TEXT_NO_EXPRESSION = 55,
+    X_V_TEXT_WITH_CHILDREN = 56,
+    X_V_MODEL_ON_INVALID_ELEMENT = 57,
+    X_V_MODEL_ARG_ON_ELEMENT = 58,
+    X_V_MODEL_ON_FILE_INPUT_ELEMENT = 59,
+    X_V_MODEL_UNNECESSARY_VALUE = 60,
+    X_V_SHOW_NO_EXPRESSION = 61,
+    X_TRANSITION_INVALID_CHILDREN = 62,
+    X_IGNORED_SIDE_EFFECT_TAG = 63,
+    __EXTEND_POINT__ = 64
+}
+export declare const DOMErrorMessages: {
+    [code: number]: string;
+};
+
+export declare const DOMNodeTransforms: NodeTransform[];
+export declare const DOMDirectiveTransforms: Record<string, DirectiveTransform>;
+export declare function compile(src: string | RootNode, options?: CompilerOptions): CodegenResult;
+export declare function parse(template: string, options?: ParserOptions): RootNode;
+

Fichier diff supprimé car celui-ci est trop grand
+ 6311 - 0
node_modules/@vue/compiler-dom/dist/compiler-dom.esm-browser.js


Fichier diff supprimé car celui-ci est trop grand
+ 6 - 0
node_modules/@vue/compiler-dom/dist/compiler-dom.esm-browser.prod.js


+ 506 - 0
node_modules/@vue/compiler-dom/dist/compiler-dom.esm-bundler.js

@@ -0,0 +1,506 @@
+/**
+* @vue/compiler-dom v3.4.27
+* (c) 2018-present Yuxi (Evan) You and Vue contributors
+* @license MIT
+**/
+import { registerRuntimeHelpers, createSimpleExpression, createCompilerError, createObjectProperty, getConstantType, createCallExpression, TO_DISPLAY_STRING, transformModel as transformModel$1, findProp, hasDynamicKeyVBind, findDir, isStaticArgOf, transformOn as transformOn$1, isStaticExp, createCompoundExpression, checkCompatEnabled, noopDirectiveTransform, baseCompile, baseParse } from '@vue/compiler-core';
+export * from '@vue/compiler-core';
+import { isVoidTag, isHTMLTag, isSVGTag, isMathMLTag, parseStringStyle, capitalize, makeMap, extend } from '@vue/shared';
+
+const V_MODEL_RADIO = Symbol(!!(process.env.NODE_ENV !== "production") ? `vModelRadio` : ``);
+const V_MODEL_CHECKBOX = Symbol(!!(process.env.NODE_ENV !== "production") ? `vModelCheckbox` : ``);
+const V_MODEL_TEXT = Symbol(!!(process.env.NODE_ENV !== "production") ? `vModelText` : ``);
+const V_MODEL_SELECT = Symbol(!!(process.env.NODE_ENV !== "production") ? `vModelSelect` : ``);
+const V_MODEL_DYNAMIC = Symbol(!!(process.env.NODE_ENV !== "production") ? `vModelDynamic` : ``);
+const V_ON_WITH_MODIFIERS = Symbol(!!(process.env.NODE_ENV !== "production") ? `vOnModifiersGuard` : ``);
+const V_ON_WITH_KEYS = Symbol(!!(process.env.NODE_ENV !== "production") ? `vOnKeysGuard` : ``);
+const V_SHOW = Symbol(!!(process.env.NODE_ENV !== "production") ? `vShow` : ``);
+const TRANSITION = Symbol(!!(process.env.NODE_ENV !== "production") ? `Transition` : ``);
+const TRANSITION_GROUP = Symbol(!!(process.env.NODE_ENV !== "production") ? `TransitionGroup` : ``);
+registerRuntimeHelpers({
+  [V_MODEL_RADIO]: `vModelRadio`,
+  [V_MODEL_CHECKBOX]: `vModelCheckbox`,
+  [V_MODEL_TEXT]: `vModelText`,
+  [V_MODEL_SELECT]: `vModelSelect`,
+  [V_MODEL_DYNAMIC]: `vModelDynamic`,
+  [V_ON_WITH_MODIFIERS]: `withModifiers`,
+  [V_ON_WITH_KEYS]: `withKeys`,
+  [V_SHOW]: `vShow`,
+  [TRANSITION]: `Transition`,
+  [TRANSITION_GROUP]: `TransitionGroup`
+});
+
+let decoder;
+function decodeHtmlBrowser(raw, asAttr = false) {
+  if (!decoder) {
+    decoder = document.createElement("div");
+  }
+  if (asAttr) {
+    decoder.innerHTML = `<div foo="${raw.replace(/"/g, "&quot;")}">`;
+    return decoder.children[0].getAttribute("foo");
+  } else {
+    decoder.innerHTML = raw;
+    return decoder.textContent;
+  }
+}
+
+const parserOptions = {
+  parseMode: "html",
+  isVoidTag,
+  isNativeTag: (tag) => isHTMLTag(tag) || isSVGTag(tag) || isMathMLTag(tag),
+  isPreTag: (tag) => tag === "pre",
+  decodeEntities: decodeHtmlBrowser ,
+  isBuiltInComponent: (tag) => {
+    if (tag === "Transition" || tag === "transition") {
+      return TRANSITION;
+    } else if (tag === "TransitionGroup" || tag === "transition-group") {
+      return TRANSITION_GROUP;
+    }
+  },
+  // https://html.spec.whatwg.org/multipage/parsing.html#tree-construction-dispatcher
+  getNamespace(tag, parent, rootNamespace) {
+    let ns = parent ? parent.ns : rootNamespace;
+    if (parent && ns === 2) {
+      if (parent.tag === "annotation-xml") {
+        if (tag === "svg") {
+          return 1;
+        }
+        if (parent.props.some(
+          (a) => a.type === 6 && a.name === "encoding" && a.value != null && (a.value.content === "text/html" || a.value.content === "application/xhtml+xml")
+        )) {
+          ns = 0;
+        }
+      } else if (/^m(?:[ions]|text)$/.test(parent.tag) && tag !== "mglyph" && tag !== "malignmark") {
+        ns = 0;
+      }
+    } else if (parent && ns === 1) {
+      if (parent.tag === "foreignObject" || parent.tag === "desc" || parent.tag === "title") {
+        ns = 0;
+      }
+    }
+    if (ns === 0) {
+      if (tag === "svg") {
+        return 1;
+      }
+      if (tag === "math") {
+        return 2;
+      }
+    }
+    return ns;
+  }
+};
+
+const transformStyle = (node) => {
+  if (node.type === 1) {
+    node.props.forEach((p, i) => {
+      if (p.type === 6 && p.name === "style" && p.value) {
+        node.props[i] = {
+          type: 7,
+          name: `bind`,
+          arg: createSimpleExpression(`style`, true, p.loc),
+          exp: parseInlineCSS(p.value.content, p.loc),
+          modifiers: [],
+          loc: p.loc
+        };
+      }
+    });
+  }
+};
+const parseInlineCSS = (cssText, loc) => {
+  const normalized = parseStringStyle(cssText);
+  return createSimpleExpression(
+    JSON.stringify(normalized),
+    false,
+    loc,
+    3
+  );
+};
+
+function createDOMCompilerError(code, loc) {
+  return createCompilerError(
+    code,
+    loc,
+    !!(process.env.NODE_ENV !== "production") || false ? DOMErrorMessages : void 0
+  );
+}
+const DOMErrorCodes = {
+  "X_V_HTML_NO_EXPRESSION": 53,
+  "53": "X_V_HTML_NO_EXPRESSION",
+  "X_V_HTML_WITH_CHILDREN": 54,
+  "54": "X_V_HTML_WITH_CHILDREN",
+  "X_V_TEXT_NO_EXPRESSION": 55,
+  "55": "X_V_TEXT_NO_EXPRESSION",
+  "X_V_TEXT_WITH_CHILDREN": 56,
+  "56": "X_V_TEXT_WITH_CHILDREN",
+  "X_V_MODEL_ON_INVALID_ELEMENT": 57,
+  "57": "X_V_MODEL_ON_INVALID_ELEMENT",
+  "X_V_MODEL_ARG_ON_ELEMENT": 58,
+  "58": "X_V_MODEL_ARG_ON_ELEMENT",
+  "X_V_MODEL_ON_FILE_INPUT_ELEMENT": 59,
+  "59": "X_V_MODEL_ON_FILE_INPUT_ELEMENT",
+  "X_V_MODEL_UNNECESSARY_VALUE": 60,
+  "60": "X_V_MODEL_UNNECESSARY_VALUE",
+  "X_V_SHOW_NO_EXPRESSION": 61,
+  "61": "X_V_SHOW_NO_EXPRESSION",
+  "X_TRANSITION_INVALID_CHILDREN": 62,
+  "62": "X_TRANSITION_INVALID_CHILDREN",
+  "X_IGNORED_SIDE_EFFECT_TAG": 63,
+  "63": "X_IGNORED_SIDE_EFFECT_TAG",
+  "__EXTEND_POINT__": 64,
+  "64": "__EXTEND_POINT__"
+};
+const DOMErrorMessages = {
+  [53]: `v-html is missing expression.`,
+  [54]: `v-html will override element children.`,
+  [55]: `v-text is missing expression.`,
+  [56]: `v-text will override element children.`,
+  [57]: `v-model can only be used on <input>, <textarea> and <select> elements.`,
+  [58]: `v-model argument is not supported on plain elements.`,
+  [59]: `v-model cannot be used on file inputs since they are read-only. Use a v-on:change listener instead.`,
+  [60]: `Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.`,
+  [61]: `v-show is missing expression.`,
+  [62]: `<Transition> expects exactly one child element or component.`,
+  [63]: `Tags with side effect (<script> and <style>) are ignored in client component templates.`
+};
+
+const transformVHtml = (dir, node, context) => {
+  const { exp, loc } = dir;
+  if (!exp) {
+    context.onError(
+      createDOMCompilerError(53, loc)
+    );
+  }
+  if (node.children.length) {
+    context.onError(
+      createDOMCompilerError(54, loc)
+    );
+    node.children.length = 0;
+  }
+  return {
+    props: [
+      createObjectProperty(
+        createSimpleExpression(`innerHTML`, true, loc),
+        exp || createSimpleExpression("", true)
+      )
+    ]
+  };
+};
+
+const transformVText = (dir, node, context) => {
+  const { exp, loc } = dir;
+  if (!exp) {
+    context.onError(
+      createDOMCompilerError(55, loc)
+    );
+  }
+  if (node.children.length) {
+    context.onError(
+      createDOMCompilerError(56, loc)
+    );
+    node.children.length = 0;
+  }
+  return {
+    props: [
+      createObjectProperty(
+        createSimpleExpression(`textContent`, true),
+        exp ? getConstantType(exp, context) > 0 ? exp : createCallExpression(
+          context.helperString(TO_DISPLAY_STRING),
+          [exp],
+          loc
+        ) : createSimpleExpression("", true)
+      )
+    ]
+  };
+};
+
+const transformModel = (dir, node, context) => {
+  const baseResult = transformModel$1(dir, node, context);
+  if (!baseResult.props.length || node.tagType === 1) {
+    return baseResult;
+  }
+  if (dir.arg) {
+    context.onError(
+      createDOMCompilerError(
+        58,
+        dir.arg.loc
+      )
+    );
+  }
+  function checkDuplicatedValue() {
+    const value = findDir(node, "bind");
+    if (value && isStaticArgOf(value.arg, "value")) {
+      context.onError(
+        createDOMCompilerError(
+          60,
+          value.loc
+        )
+      );
+    }
+  }
+  const { tag } = node;
+  const isCustomElement = context.isCustomElement(tag);
+  if (tag === "input" || tag === "textarea" || tag === "select" || isCustomElement) {
+    let directiveToUse = V_MODEL_TEXT;
+    let isInvalidType = false;
+    if (tag === "input" || isCustomElement) {
+      const type = findProp(node, `type`);
+      if (type) {
+        if (type.type === 7) {
+          directiveToUse = V_MODEL_DYNAMIC;
+        } else if (type.value) {
+          switch (type.value.content) {
+            case "radio":
+              directiveToUse = V_MODEL_RADIO;
+              break;
+            case "checkbox":
+              directiveToUse = V_MODEL_CHECKBOX;
+              break;
+            case "file":
+              isInvalidType = true;
+              context.onError(
+                createDOMCompilerError(
+                  59,
+                  dir.loc
+                )
+              );
+              break;
+            default:
+              !!(process.env.NODE_ENV !== "production") && checkDuplicatedValue();
+              break;
+          }
+        }
+      } else if (hasDynamicKeyVBind(node)) {
+        directiveToUse = V_MODEL_DYNAMIC;
+      } else {
+        !!(process.env.NODE_ENV !== "production") && checkDuplicatedValue();
+      }
+    } else if (tag === "select") {
+      directiveToUse = V_MODEL_SELECT;
+    } else {
+      !!(process.env.NODE_ENV !== "production") && checkDuplicatedValue();
+    }
+    if (!isInvalidType) {
+      baseResult.needRuntime = context.helper(directiveToUse);
+    }
+  } else {
+    context.onError(
+      createDOMCompilerError(
+        57,
+        dir.loc
+      )
+    );
+  }
+  baseResult.props = baseResult.props.filter(
+    (p) => !(p.key.type === 4 && p.key.content === "modelValue")
+  );
+  return baseResult;
+};
+
+const isEventOptionModifier = /* @__PURE__ */ makeMap(`passive,once,capture`);
+const isNonKeyModifier = /* @__PURE__ */ makeMap(
+  // event propagation management
+  `stop,prevent,self,ctrl,shift,alt,meta,exact,middle`
+);
+const maybeKeyModifier = /* @__PURE__ */ makeMap("left,right");
+const isKeyboardEvent = /* @__PURE__ */ makeMap(
+  `onkeyup,onkeydown,onkeypress`,
+  true
+);
+const resolveModifiers = (key, modifiers, context, loc) => {
+  const keyModifiers = [];
+  const nonKeyModifiers = [];
+  const eventOptionModifiers = [];
+  for (let i = 0; i < modifiers.length; i++) {
+    const modifier = modifiers[i];
+    if (modifier === "native" && checkCompatEnabled(
+      "COMPILER_V_ON_NATIVE",
+      context,
+      loc
+    )) {
+      eventOptionModifiers.push(modifier);
+    } else if (isEventOptionModifier(modifier)) {
+      eventOptionModifiers.push(modifier);
+    } else {
+      if (maybeKeyModifier(modifier)) {
+        if (isStaticExp(key)) {
+          if (isKeyboardEvent(key.content)) {
+            keyModifiers.push(modifier);
+          } else {
+            nonKeyModifiers.push(modifier);
+          }
+        } else {
+          keyModifiers.push(modifier);
+          nonKeyModifiers.push(modifier);
+        }
+      } else {
+        if (isNonKeyModifier(modifier)) {
+          nonKeyModifiers.push(modifier);
+        } else {
+          keyModifiers.push(modifier);
+        }
+      }
+    }
+  }
+  return {
+    keyModifiers,
+    nonKeyModifiers,
+    eventOptionModifiers
+  };
+};
+const transformClick = (key, event) => {
+  const isStaticClick = isStaticExp(key) && key.content.toLowerCase() === "onclick";
+  return isStaticClick ? createSimpleExpression(event, true) : key.type !== 4 ? createCompoundExpression([
+    `(`,
+    key,
+    `) === "onClick" ? "${event}" : (`,
+    key,
+    `)`
+  ]) : key;
+};
+const transformOn = (dir, node, context) => {
+  return transformOn$1(dir, node, context, (baseResult) => {
+    const { modifiers } = dir;
+    if (!modifiers.length)
+      return baseResult;
+    let { key, value: handlerExp } = baseResult.props[0];
+    const { keyModifiers, nonKeyModifiers, eventOptionModifiers } = resolveModifiers(key, modifiers, context, dir.loc);
+    if (nonKeyModifiers.includes("right")) {
+      key = transformClick(key, `onContextmenu`);
+    }
+    if (nonKeyModifiers.includes("middle")) {
+      key = transformClick(key, `onMouseup`);
+    }
+    if (nonKeyModifiers.length) {
+      handlerExp = createCallExpression(context.helper(V_ON_WITH_MODIFIERS), [
+        handlerExp,
+        JSON.stringify(nonKeyModifiers)
+      ]);
+    }
+    if (keyModifiers.length && // if event name is dynamic, always wrap with keys guard
+    (!isStaticExp(key) || isKeyboardEvent(key.content))) {
+      handlerExp = createCallExpression(context.helper(V_ON_WITH_KEYS), [
+        handlerExp,
+        JSON.stringify(keyModifiers)
+      ]);
+    }
+    if (eventOptionModifiers.length) {
+      const modifierPostfix = eventOptionModifiers.map(capitalize).join("");
+      key = isStaticExp(key) ? createSimpleExpression(`${key.content}${modifierPostfix}`, true) : createCompoundExpression([`(`, key, `) + "${modifierPostfix}"`]);
+    }
+    return {
+      props: [createObjectProperty(key, handlerExp)]
+    };
+  });
+};
+
+const transformShow = (dir, node, context) => {
+  const { exp, loc } = dir;
+  if (!exp) {
+    context.onError(
+      createDOMCompilerError(61, loc)
+    );
+  }
+  return {
+    props: [],
+    needRuntime: context.helper(V_SHOW)
+  };
+};
+
+const transformTransition = (node, context) => {
+  if (node.type === 1 && node.tagType === 1) {
+    const component = context.isBuiltInComponent(node.tag);
+    if (component === TRANSITION) {
+      return () => {
+        if (!node.children.length) {
+          return;
+        }
+        if (hasMultipleChildren(node)) {
+          context.onError(
+            createDOMCompilerError(
+              62,
+              {
+                start: node.children[0].loc.start,
+                end: node.children[node.children.length - 1].loc.end,
+                source: ""
+              }
+            )
+          );
+        }
+        const child = node.children[0];
+        if (child.type === 1) {
+          for (const p of child.props) {
+            if (p.type === 7 && p.name === "show") {
+              node.props.push({
+                type: 6,
+                name: "persisted",
+                nameLoc: node.loc,
+                value: void 0,
+                loc: node.loc
+              });
+            }
+          }
+        }
+      };
+    }
+  }
+};
+function hasMultipleChildren(node) {
+  const children = node.children = node.children.filter(
+    (c) => c.type !== 3 && !(c.type === 2 && !c.content.trim())
+  );
+  const child = children[0];
+  return children.length !== 1 || child.type === 11 || child.type === 9 && child.branches.some(hasMultipleChildren);
+}
+
+const ignoreSideEffectTags = (node, context) => {
+  if (node.type === 1 && node.tagType === 0 && (node.tag === "script" || node.tag === "style")) {
+    !!(process.env.NODE_ENV !== "production") && context.onError(
+      createDOMCompilerError(
+        63,
+        node.loc
+      )
+    );
+    context.removeNode();
+  }
+};
+
+const DOMNodeTransforms = [
+  transformStyle,
+  ...!!(process.env.NODE_ENV !== "production") ? [transformTransition] : []
+];
+const DOMDirectiveTransforms = {
+  cloak: noopDirectiveTransform,
+  html: transformVHtml,
+  text: transformVText,
+  model: transformModel,
+  // override compiler-core
+  on: transformOn,
+  // override compiler-core
+  show: transformShow
+};
+function compile(src, options = {}) {
+  return baseCompile(
+    src,
+    extend({}, parserOptions, options, {
+      nodeTransforms: [
+        // ignore <script> and <tag>
+        // this is not put inside DOMNodeTransforms because that list is used
+        // by compiler-ssr to generate vnode fallback branches
+        ignoreSideEffectTags,
+        ...DOMNodeTransforms,
+        ...options.nodeTransforms || []
+      ],
+      directiveTransforms: extend(
+        {},
+        DOMDirectiveTransforms,
+        options.directiveTransforms || {}
+      ),
+      transformHoist: null 
+    })
+  );
+}
+function parse(template, options = {}) {
+  return baseParse(template, extend({}, parserOptions, options));
+}
+
+export { DOMDirectiveTransforms, DOMErrorCodes, DOMErrorMessages, DOMNodeTransforms, TRANSITION, TRANSITION_GROUP, V_MODEL_CHECKBOX, V_MODEL_DYNAMIC, V_MODEL_RADIO, V_MODEL_SELECT, V_MODEL_TEXT, V_ON_WITH_KEYS, V_ON_WITH_MODIFIERS, V_SHOW, compile, createDOMCompilerError, parse, parserOptions, transformStyle };

+ 6473 - 0
node_modules/@vue/compiler-dom/dist/compiler-dom.global.js

@@ -0,0 +1,6473 @@
+/**
+* @vue/compiler-dom v3.4.27
+* (c) 2018-present Yuxi (Evan) You and Vue contributors
+* @license MIT
+**/
+var VueCompilerDOM = (function (exports) {
+  'use strict';
+
+  /*! #__NO_SIDE_EFFECTS__ */
+  // @__NO_SIDE_EFFECTS__
+  function makeMap(str, expectsLowerCase) {
+    const set = new Set(str.split(","));
+    return expectsLowerCase ? (val) => set.has(val.toLowerCase()) : (val) => set.has(val);
+  }
+
+  const EMPTY_OBJ = Object.freeze({}) ;
+  const NOOP = () => {
+  };
+  const NO = () => false;
+  const isOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // uppercase letter
+  (key.charCodeAt(2) > 122 || key.charCodeAt(2) < 97);
+  const extend = Object.assign;
+  const isArray = Array.isArray;
+  const isString = (val) => typeof val === "string";
+  const isSymbol = (val) => typeof val === "symbol";
+  const isObject = (val) => val !== null && typeof val === "object";
+  const isReservedProp = /* @__PURE__ */ makeMap(
+    // the leading comma is intentional so empty string "" is also included
+    ",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"
+  );
+  const isBuiltInDirective = /* @__PURE__ */ makeMap(
+    "bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"
+  );
+  const cacheStringFunction = (fn) => {
+    const cache = /* @__PURE__ */ Object.create(null);
+    return (str) => {
+      const hit = cache[str];
+      return hit || (cache[str] = fn(str));
+    };
+  };
+  const camelizeRE = /-(\w)/g;
+  const camelize = cacheStringFunction((str) => {
+    return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : "");
+  });
+  const capitalize = cacheStringFunction((str) => {
+    return str.charAt(0).toUpperCase() + str.slice(1);
+  });
+  const toHandlerKey = cacheStringFunction((str) => {
+    const s = str ? `on${capitalize(str)}` : ``;
+    return s;
+  });
+
+  const PatchFlagNames = {
+    [1]: `TEXT`,
+    [2]: `CLASS`,
+    [4]: `STYLE`,
+    [8]: `PROPS`,
+    [16]: `FULL_PROPS`,
+    [32]: `NEED_HYDRATION`,
+    [64]: `STABLE_FRAGMENT`,
+    [128]: `KEYED_FRAGMENT`,
+    [256]: `UNKEYED_FRAGMENT`,
+    [512]: `NEED_PATCH`,
+    [1024]: `DYNAMIC_SLOTS`,
+    [2048]: `DEV_ROOT_FRAGMENT`,
+    [-1]: `HOISTED`,
+    [-2]: `BAIL`
+  };
+
+  const slotFlagsText = {
+    [1]: "STABLE",
+    [2]: "DYNAMIC",
+    [3]: "FORWARDED"
+  };
+
+  const range = 2;
+  function generateCodeFrame(source, start = 0, end = source.length) {
+    let lines = source.split(/(\r?\n)/);
+    const newlineSequences = lines.filter((_, idx) => idx % 2 === 1);
+    lines = lines.filter((_, idx) => idx % 2 === 0);
+    let count = 0;
+    const res = [];
+    for (let i = 0; i < lines.length; i++) {
+      count += lines[i].length + (newlineSequences[i] && newlineSequences[i].length || 0);
+      if (count >= start) {
+        for (let j = i - range; j <= i + range || end > count; j++) {
+          if (j < 0 || j >= lines.length)
+            continue;
+          const line = j + 1;
+          res.push(
+            `${line}${" ".repeat(Math.max(3 - String(line).length, 0))}|  ${lines[j]}`
+          );
+          const lineLength = lines[j].length;
+          const newLineSeqLength = newlineSequences[j] && newlineSequences[j].length || 0;
+          if (j === i) {
+            const pad = start - (count - (lineLength + newLineSeqLength));
+            const length = Math.max(
+              1,
+              end > count ? lineLength - pad : end - start
+            );
+            res.push(`   |  ` + " ".repeat(pad) + "^".repeat(length));
+          } else if (j > i) {
+            if (end > count) {
+              const length = Math.max(Math.min(end - count, lineLength), 1);
+              res.push(`   |  ` + "^".repeat(length));
+            }
+            count += lineLength + newLineSeqLength;
+          }
+        }
+        break;
+      }
+    }
+    return res.join("\n");
+  }
+
+  const listDelimiterRE = /;(?![^(]*\))/g;
+  const propertyDelimiterRE = /:([^]+)/;
+  const styleCommentRE = /\/\*[^]*?\*\//g;
+  function parseStringStyle(cssText) {
+    const ret = {};
+    cssText.replace(styleCommentRE, "").split(listDelimiterRE).forEach((item) => {
+      if (item) {
+        const tmp = item.split(propertyDelimiterRE);
+        tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim());
+      }
+    });
+    return ret;
+  }
+
+  const HTML_TAGS = "html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot";
+  const SVG_TAGS = "svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view";
+  const MATH_TAGS = "annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics";
+  const VOID_TAGS = "area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr";
+  const isHTMLTag = /* @__PURE__ */ makeMap(HTML_TAGS);
+  const isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS);
+  const isMathMLTag = /* @__PURE__ */ makeMap(MATH_TAGS);
+  const isVoidTag = /* @__PURE__ */ makeMap(VOID_TAGS);
+
+  const FRAGMENT = Symbol(`Fragment` );
+  const TELEPORT = Symbol(`Teleport` );
+  const SUSPENSE = Symbol(`Suspense` );
+  const KEEP_ALIVE = Symbol(`KeepAlive` );
+  const BASE_TRANSITION = Symbol(`BaseTransition` );
+  const OPEN_BLOCK = Symbol(`openBlock` );
+  const CREATE_BLOCK = Symbol(`createBlock` );
+  const CREATE_ELEMENT_BLOCK = Symbol(`createElementBlock` );
+  const CREATE_VNODE = Symbol(`createVNode` );
+  const CREATE_ELEMENT_VNODE = Symbol(`createElementVNode` );
+  const CREATE_COMMENT = Symbol(`createCommentVNode` );
+  const CREATE_TEXT = Symbol(`createTextVNode` );
+  const CREATE_STATIC = Symbol(`createStaticVNode` );
+  const RESOLVE_COMPONENT = Symbol(`resolveComponent` );
+  const RESOLVE_DYNAMIC_COMPONENT = Symbol(
+    `resolveDynamicComponent` 
+  );
+  const RESOLVE_DIRECTIVE = Symbol(`resolveDirective` );
+  const RESOLVE_FILTER = Symbol(`resolveFilter` );
+  const WITH_DIRECTIVES = Symbol(`withDirectives` );
+  const RENDER_LIST = Symbol(`renderList` );
+  const RENDER_SLOT = Symbol(`renderSlot` );
+  const CREATE_SLOTS = Symbol(`createSlots` );
+  const TO_DISPLAY_STRING = Symbol(`toDisplayString` );
+  const MERGE_PROPS = Symbol(`mergeProps` );
+  const NORMALIZE_CLASS = Symbol(`normalizeClass` );
+  const NORMALIZE_STYLE = Symbol(`normalizeStyle` );
+  const NORMALIZE_PROPS = Symbol(`normalizeProps` );
+  const GUARD_REACTIVE_PROPS = Symbol(`guardReactiveProps` );
+  const TO_HANDLERS = Symbol(`toHandlers` );
+  const CAMELIZE = Symbol(`camelize` );
+  const CAPITALIZE = Symbol(`capitalize` );
+  const TO_HANDLER_KEY = Symbol(`toHandlerKey` );
+  const SET_BLOCK_TRACKING = Symbol(`setBlockTracking` );
+  const PUSH_SCOPE_ID = Symbol(`pushScopeId` );
+  const POP_SCOPE_ID = Symbol(`popScopeId` );
+  const WITH_CTX = Symbol(`withCtx` );
+  const UNREF = Symbol(`unref` );
+  const IS_REF = Symbol(`isRef` );
+  const WITH_MEMO = Symbol(`withMemo` );
+  const IS_MEMO_SAME = Symbol(`isMemoSame` );
+  const helperNameMap = {
+    [FRAGMENT]: `Fragment`,
+    [TELEPORT]: `Teleport`,
+    [SUSPENSE]: `Suspense`,
+    [KEEP_ALIVE]: `KeepAlive`,
+    [BASE_TRANSITION]: `BaseTransition`,
+    [OPEN_BLOCK]: `openBlock`,
+    [CREATE_BLOCK]: `createBlock`,
+    [CREATE_ELEMENT_BLOCK]: `createElementBlock`,
+    [CREATE_VNODE]: `createVNode`,
+    [CREATE_ELEMENT_VNODE]: `createElementVNode`,
+    [CREATE_COMMENT]: `createCommentVNode`,
+    [CREATE_TEXT]: `createTextVNode`,
+    [CREATE_STATIC]: `createStaticVNode`,
+    [RESOLVE_COMPONENT]: `resolveComponent`,
+    [RESOLVE_DYNAMIC_COMPONENT]: `resolveDynamicComponent`,
+    [RESOLVE_DIRECTIVE]: `resolveDirective`,
+    [RESOLVE_FILTER]: `resolveFilter`,
+    [WITH_DIRECTIVES]: `withDirectives`,
+    [RENDER_LIST]: `renderList`,
+    [RENDER_SLOT]: `renderSlot`,
+    [CREATE_SLOTS]: `createSlots`,
+    [TO_DISPLAY_STRING]: `toDisplayString`,
+    [MERGE_PROPS]: `mergeProps`,
+    [NORMALIZE_CLASS]: `normalizeClass`,
+    [NORMALIZE_STYLE]: `normalizeStyle`,
+    [NORMALIZE_PROPS]: `normalizeProps`,
+    [GUARD_REACTIVE_PROPS]: `guardReactiveProps`,
+    [TO_HANDLERS]: `toHandlers`,
+    [CAMELIZE]: `camelize`,
+    [CAPITALIZE]: `capitalize`,
+    [TO_HANDLER_KEY]: `toHandlerKey`,
+    [SET_BLOCK_TRACKING]: `setBlockTracking`,
+    [PUSH_SCOPE_ID]: `pushScopeId`,
+    [POP_SCOPE_ID]: `popScopeId`,
+    [WITH_CTX]: `withCtx`,
+    [UNREF]: `unref`,
+    [IS_REF]: `isRef`,
+    [WITH_MEMO]: `withMemo`,
+    [IS_MEMO_SAME]: `isMemoSame`
+  };
+  function registerRuntimeHelpers(helpers) {
+    Object.getOwnPropertySymbols(helpers).forEach((s) => {
+      helperNameMap[s] = helpers[s];
+    });
+  }
+
+  const Namespaces = {
+    "HTML": 0,
+    "0": "HTML",
+    "SVG": 1,
+    "1": "SVG",
+    "MATH_ML": 2,
+    "2": "MATH_ML"
+  };
+  const NodeTypes = {
+    "ROOT": 0,
+    "0": "ROOT",
+    "ELEMENT": 1,
+    "1": "ELEMENT",
+    "TEXT": 2,
+    "2": "TEXT",
+    "COMMENT": 3,
+    "3": "COMMENT",
+    "SIMPLE_EXPRESSION": 4,
+    "4": "SIMPLE_EXPRESSION",
+    "INTERPOLATION": 5,
+    "5": "INTERPOLATION",
+    "ATTRIBUTE": 6,
+    "6": "ATTRIBUTE",
+    "DIRECTIVE": 7,
+    "7": "DIRECTIVE",
+    "COMPOUND_EXPRESSION": 8,
+    "8": "COMPOUND_EXPRESSION",
+    "IF": 9,
+    "9": "IF",
+    "IF_BRANCH": 10,
+    "10": "IF_BRANCH",
+    "FOR": 11,
+    "11": "FOR",
+    "TEXT_CALL": 12,
+    "12": "TEXT_CALL",
+    "VNODE_CALL": 13,
+    "13": "VNODE_CALL",
+    "JS_CALL_EXPRESSION": 14,
+    "14": "JS_CALL_EXPRESSION",
+    "JS_OBJECT_EXPRESSION": 15,
+    "15": "JS_OBJECT_EXPRESSION",
+    "JS_PROPERTY": 16,
+    "16": "JS_PROPERTY",
+    "JS_ARRAY_EXPRESSION": 17,
+    "17": "JS_ARRAY_EXPRESSION",
+    "JS_FUNCTION_EXPRESSION": 18,
+    "18": "JS_FUNCTION_EXPRESSION",
+    "JS_CONDITIONAL_EXPRESSION": 19,
+    "19": "JS_CONDITIONAL_EXPRESSION",
+    "JS_CACHE_EXPRESSION": 20,
+    "20": "JS_CACHE_EXPRESSION",
+    "JS_BLOCK_STATEMENT": 21,
+    "21": "JS_BLOCK_STATEMENT",
+    "JS_TEMPLATE_LITERAL": 22,
+    "22": "JS_TEMPLATE_LITERAL",
+    "JS_IF_STATEMENT": 23,
+    "23": "JS_IF_STATEMENT",
+    "JS_ASSIGNMENT_EXPRESSION": 24,
+    "24": "JS_ASSIGNMENT_EXPRESSION",
+    "JS_SEQUENCE_EXPRESSION": 25,
+    "25": "JS_SEQUENCE_EXPRESSION",
+    "JS_RETURN_STATEMENT": 26,
+    "26": "JS_RETURN_STATEMENT"
+  };
+  const ElementTypes = {
+    "ELEMENT": 0,
+    "0": "ELEMENT",
+    "COMPONENT": 1,
+    "1": "COMPONENT",
+    "SLOT": 2,
+    "2": "SLOT",
+    "TEMPLATE": 3,
+    "3": "TEMPLATE"
+  };
+  const ConstantTypes = {
+    "NOT_CONSTANT": 0,
+    "0": "NOT_CONSTANT",
+    "CAN_SKIP_PATCH": 1,
+    "1": "CAN_SKIP_PATCH",
+    "CAN_HOIST": 2,
+    "2": "CAN_HOIST",
+    "CAN_STRINGIFY": 3,
+    "3": "CAN_STRINGIFY"
+  };
+  const locStub = {
+    start: { line: 1, column: 1, offset: 0 },
+    end: { line: 1, column: 1, offset: 0 },
+    source: ""
+  };
+  function createRoot(children, source = "") {
+    return {
+      type: 0,
+      source,
+      children,
+      helpers: /* @__PURE__ */ new Set(),
+      components: [],
+      directives: [],
+      hoists: [],
+      imports: [],
+      cached: 0,
+      temps: 0,
+      codegenNode: void 0,
+      loc: locStub
+    };
+  }
+  function createVNodeCall(context, tag, props, children, patchFlag, dynamicProps, directives, isBlock = false, disableTracking = false, isComponent = false, loc = locStub) {
+    if (context) {
+      if (isBlock) {
+        context.helper(OPEN_BLOCK);
+        context.helper(getVNodeBlockHelper(context.inSSR, isComponent));
+      } else {
+        context.helper(getVNodeHelper(context.inSSR, isComponent));
+      }
+      if (directives) {
+        context.helper(WITH_DIRECTIVES);
+      }
+    }
+    return {
+      type: 13,
+      tag,
+      props,
+      children,
+      patchFlag,
+      dynamicProps,
+      directives,
+      isBlock,
+      disableTracking,
+      isComponent,
+      loc
+    };
+  }
+  function createArrayExpression(elements, loc = locStub) {
+    return {
+      type: 17,
+      loc,
+      elements
+    };
+  }
+  function createObjectExpression(properties, loc = locStub) {
+    return {
+      type: 15,
+      loc,
+      properties
+    };
+  }
+  function createObjectProperty(key, value) {
+    return {
+      type: 16,
+      loc: locStub,
+      key: isString(key) ? createSimpleExpression(key, true) : key,
+      value
+    };
+  }
+  function createSimpleExpression(content, isStatic = false, loc = locStub, constType = 0) {
+    return {
+      type: 4,
+      loc,
+      content,
+      isStatic,
+      constType: isStatic ? 3 : constType
+    };
+  }
+  function createInterpolation(content, loc) {
+    return {
+      type: 5,
+      loc,
+      content: isString(content) ? createSimpleExpression(content, false, loc) : content
+    };
+  }
+  function createCompoundExpression(children, loc = locStub) {
+    return {
+      type: 8,
+      loc,
+      children
+    };
+  }
+  function createCallExpression(callee, args = [], loc = locStub) {
+    return {
+      type: 14,
+      loc,
+      callee,
+      arguments: args
+    };
+  }
+  function createFunctionExpression(params, returns = void 0, newline = false, isSlot = false, loc = locStub) {
+    return {
+      type: 18,
+      params,
+      returns,
+      newline,
+      isSlot,
+      loc
+    };
+  }
+  function createConditionalExpression(test, consequent, alternate, newline = true) {
+    return {
+      type: 19,
+      test,
+      consequent,
+      alternate,
+      newline,
+      loc: locStub
+    };
+  }
+  function createCacheExpression(index, value, isVNode = false) {
+    return {
+      type: 20,
+      index,
+      value,
+      isVNode,
+      loc: locStub
+    };
+  }
+  function createBlockStatement(body) {
+    return {
+      type: 21,
+      body,
+      loc: locStub
+    };
+  }
+  function createTemplateLiteral(elements) {
+    return {
+      type: 22,
+      elements,
+      loc: locStub
+    };
+  }
+  function createIfStatement(test, consequent, alternate) {
+    return {
+      type: 23,
+      test,
+      consequent,
+      alternate,
+      loc: locStub
+    };
+  }
+  function createAssignmentExpression(left, right) {
+    return {
+      type: 24,
+      left,
+      right,
+      loc: locStub
+    };
+  }
+  function createSequenceExpression(expressions) {
+    return {
+      type: 25,
+      expressions,
+      loc: locStub
+    };
+  }
+  function createReturnStatement(returns) {
+    return {
+      type: 26,
+      returns,
+      loc: locStub
+    };
+  }
+  function getVNodeHelper(ssr, isComponent) {
+    return ssr || isComponent ? CREATE_VNODE : CREATE_ELEMENT_VNODE;
+  }
+  function getVNodeBlockHelper(ssr, isComponent) {
+    return ssr || isComponent ? CREATE_BLOCK : CREATE_ELEMENT_BLOCK;
+  }
+  function convertToBlock(node, { helper, removeHelper, inSSR }) {
+    if (!node.isBlock) {
+      node.isBlock = true;
+      removeHelper(getVNodeHelper(inSSR, node.isComponent));
+      helper(OPEN_BLOCK);
+      helper(getVNodeBlockHelper(inSSR, node.isComponent));
+    }
+  }
+
+  const defaultDelimitersOpen = new Uint8Array([123, 123]);
+  const defaultDelimitersClose = new Uint8Array([125, 125]);
+  function isTagStartChar(c) {
+    return c >= 97 && c <= 122 || c >= 65 && c <= 90;
+  }
+  function isWhitespace(c) {
+    return c === 32 || c === 10 || c === 9 || c === 12 || c === 13;
+  }
+  function isEndOfTagSection(c) {
+    return c === 47 || c === 62 || isWhitespace(c);
+  }
+  function toCharCodes(str) {
+    const ret = new Uint8Array(str.length);
+    for (let i = 0; i < str.length; i++) {
+      ret[i] = str.charCodeAt(i);
+    }
+    return ret;
+  }
+  const Sequences = {
+    Cdata: new Uint8Array([67, 68, 65, 84, 65, 91]),
+    // CDATA[
+    CdataEnd: new Uint8Array([93, 93, 62]),
+    // ]]>
+    CommentEnd: new Uint8Array([45, 45, 62]),
+    // `-->`
+    ScriptEnd: new Uint8Array([60, 47, 115, 99, 114, 105, 112, 116]),
+    // `<\/script`
+    StyleEnd: new Uint8Array([60, 47, 115, 116, 121, 108, 101]),
+    // `</style`
+    TitleEnd: new Uint8Array([60, 47, 116, 105, 116, 108, 101]),
+    // `</title`
+    TextareaEnd: new Uint8Array([
+      60,
+      47,
+      116,
+      101,
+      120,
+      116,
+      97,
+      114,
+      101,
+      97
+    ])
+    // `</textarea
+  };
+  class Tokenizer {
+    constructor(stack, cbs) {
+      this.stack = stack;
+      this.cbs = cbs;
+      /** The current state the tokenizer is in. */
+      this.state = 1;
+      /** The read buffer. */
+      this.buffer = "";
+      /** The beginning of the section that is currently being read. */
+      this.sectionStart = 0;
+      /** The index within the buffer that we are currently looking at. */
+      this.index = 0;
+      /** The start of the last entity. */
+      this.entityStart = 0;
+      /** Some behavior, eg. when decoding entities, is done while we are in another state. This keeps track of the other state type. */
+      this.baseState = 1;
+      /** For special parsing behavior inside of script and style tags. */
+      this.inRCDATA = false;
+      /** For disabling RCDATA tags handling */
+      this.inXML = false;
+      /** For disabling interpolation parsing in v-pre */
+      this.inVPre = false;
+      /** Record newline positions for fast line / column calculation */
+      this.newlines = [];
+      this.mode = 0;
+      this.delimiterOpen = defaultDelimitersOpen;
+      this.delimiterClose = defaultDelimitersClose;
+      this.delimiterIndex = -1;
+      this.currentSequence = void 0;
+      this.sequenceIndex = 0;
+    }
+    get inSFCRoot() {
+      return this.mode === 2 && this.stack.length === 0;
+    }
+    reset() {
+      this.state = 1;
+      this.mode = 0;
+      this.buffer = "";
+      this.sectionStart = 0;
+      this.index = 0;
+      this.baseState = 1;
+      this.inRCDATA = false;
+      this.currentSequence = void 0;
+      this.newlines.length = 0;
+      this.delimiterOpen = defaultDelimitersOpen;
+      this.delimiterClose = defaultDelimitersClose;
+    }
+    /**
+     * Generate Position object with line / column information using recorded
+     * newline positions. We know the index is always going to be an already
+     * processed index, so all the newlines up to this index should have been
+     * recorded.
+     */
+    getPos(index) {
+      let line = 1;
+      let column = index + 1;
+      for (let i = this.newlines.length - 1; i >= 0; i--) {
+        const newlineIndex = this.newlines[i];
+        if (index > newlineIndex) {
+          line = i + 2;
+          column = index - newlineIndex;
+          break;
+        }
+      }
+      return {
+        column,
+        line,
+        offset: index
+      };
+    }
+    peek() {
+      return this.buffer.charCodeAt(this.index + 1);
+    }
+    stateText(c) {
+      if (c === 60) {
+        if (this.index > this.sectionStart) {
+          this.cbs.ontext(this.sectionStart, this.index);
+        }
+        this.state = 5;
+        this.sectionStart = this.index;
+      } else if (!this.inVPre && c === this.delimiterOpen[0]) {
+        this.state = 2;
+        this.delimiterIndex = 0;
+        this.stateInterpolationOpen(c);
+      }
+    }
+    stateInterpolationOpen(c) {
+      if (c === this.delimiterOpen[this.delimiterIndex]) {
+        if (this.delimiterIndex === this.delimiterOpen.length - 1) {
+          const start = this.index + 1 - this.delimiterOpen.length;
+          if (start > this.sectionStart) {
+            this.cbs.ontext(this.sectionStart, start);
+          }
+          this.state = 3;
+          this.sectionStart = start;
+        } else {
+          this.delimiterIndex++;
+        }
+      } else if (this.inRCDATA) {
+        this.state = 32;
+        this.stateInRCDATA(c);
+      } else {
+        this.state = 1;
+        this.stateText(c);
+      }
+    }
+    stateInterpolation(c) {
+      if (c === this.delimiterClose[0]) {
+        this.state = 4;
+        this.delimiterIndex = 0;
+        this.stateInterpolationClose(c);
+      }
+    }
+    stateInterpolationClose(c) {
+      if (c === this.delimiterClose[this.delimiterIndex]) {
+        if (this.delimiterIndex === this.delimiterClose.length - 1) {
+          this.cbs.oninterpolation(this.sectionStart, this.index + 1);
+          if (this.inRCDATA) {
+            this.state = 32;
+          } else {
+            this.state = 1;
+          }
+          this.sectionStart = this.index + 1;
+        } else {
+          this.delimiterIndex++;
+        }
+      } else {
+        this.state = 3;
+        this.stateInterpolation(c);
+      }
+    }
+    stateSpecialStartSequence(c) {
+      const isEnd = this.sequenceIndex === this.currentSequence.length;
+      const isMatch = isEnd ? (
+        // If we are at the end of the sequence, make sure the tag name has ended
+        isEndOfTagSection(c)
+      ) : (
+        // Otherwise, do a case-insensitive comparison
+        (c | 32) === this.currentSequence[this.sequenceIndex]
+      );
+      if (!isMatch) {
+        this.inRCDATA = false;
+      } else if (!isEnd) {
+        this.sequenceIndex++;
+        return;
+      }
+      this.sequenceIndex = 0;
+      this.state = 6;
+      this.stateInTagName(c);
+    }
+    /** Look for an end tag. For <title> and <textarea>, also decode entities. */
+    stateInRCDATA(c) {
+      if (this.sequenceIndex === this.currentSequence.length) {
+        if (c === 62 || isWhitespace(c)) {
+          const endOfText = this.index - this.currentSequence.length;
+          if (this.sectionStart < endOfText) {
+            const actualIndex = this.index;
+            this.index = endOfText;
+            this.cbs.ontext(this.sectionStart, endOfText);
+            this.index = actualIndex;
+          }
+          this.sectionStart = endOfText + 2;
+          this.stateInClosingTagName(c);
+          this.inRCDATA = false;
+          return;
+        }
+        this.sequenceIndex = 0;
+      }
+      if ((c | 32) === this.currentSequence[this.sequenceIndex]) {
+        this.sequenceIndex += 1;
+      } else if (this.sequenceIndex === 0) {
+        if (this.currentSequence === Sequences.TitleEnd || this.currentSequence === Sequences.TextareaEnd && !this.inSFCRoot) {
+          if (c === this.delimiterOpen[0]) {
+            this.state = 2;
+            this.delimiterIndex = 0;
+            this.stateInterpolationOpen(c);
+          }
+        } else if (this.fastForwardTo(60)) {
+          this.sequenceIndex = 1;
+        }
+      } else {
+        this.sequenceIndex = Number(c === 60);
+      }
+    }
+    stateCDATASequence(c) {
+      if (c === Sequences.Cdata[this.sequenceIndex]) {
+        if (++this.sequenceIndex === Sequences.Cdata.length) {
+          this.state = 28;
+          this.currentSequence = Sequences.CdataEnd;
+          this.sequenceIndex = 0;
+          this.sectionStart = this.index + 1;
+        }
+      } else {
+        this.sequenceIndex = 0;
+        this.state = 23;
+        this.stateInDeclaration(c);
+      }
+    }
+    /**
+     * When we wait for one specific character, we can speed things up
+     * by skipping through the buffer until we find it.
+     *
+     * @returns Whether the character was found.
+     */
+    fastForwardTo(c) {
+      while (++this.index < this.buffer.length) {
+        const cc = this.buffer.charCodeAt(this.index);
+        if (cc === 10) {
+          this.newlines.push(this.index);
+        }
+        if (cc === c) {
+          return true;
+        }
+      }
+      this.index = this.buffer.length - 1;
+      return false;
+    }
+    /**
+     * Comments and CDATA end with `-->` and `]]>`.
+     *
+     * Their common qualities are:
+     * - Their end sequences have a distinct character they start with.
+     * - That character is then repeated, so we have to check multiple repeats.
+     * - All characters but the start character of the sequence can be skipped.
+     */
+    stateInCommentLike(c) {
+      if (c === this.currentSequence[this.sequenceIndex]) {
+        if (++this.sequenceIndex === this.currentSequence.length) {
+          if (this.currentSequence === Sequences.CdataEnd) {
+            this.cbs.oncdata(this.sectionStart, this.index - 2);
+          } else {
+            this.cbs.oncomment(this.sectionStart, this.index - 2);
+          }
+          this.sequenceIndex = 0;
+          this.sectionStart = this.index + 1;
+          this.state = 1;
+        }
+      } else if (this.sequenceIndex === 0) {
+        if (this.fastForwardTo(this.currentSequence[0])) {
+          this.sequenceIndex = 1;
+        }
+      } else if (c !== this.currentSequence[this.sequenceIndex - 1]) {
+        this.sequenceIndex = 0;
+      }
+    }
+    startSpecial(sequence, offset) {
+      this.enterRCDATA(sequence, offset);
+      this.state = 31;
+    }
+    enterRCDATA(sequence, offset) {
+      this.inRCDATA = true;
+      this.currentSequence = sequence;
+      this.sequenceIndex = offset;
+    }
+    stateBeforeTagName(c) {
+      if (c === 33) {
+        this.state = 22;
+        this.sectionStart = this.index + 1;
+      } else if (c === 63) {
+        this.state = 24;
+        this.sectionStart = this.index + 1;
+      } else if (isTagStartChar(c)) {
+        this.sectionStart = this.index;
+        if (this.mode === 0) {
+          this.state = 6;
+        } else if (this.inSFCRoot) {
+          this.state = 34;
+        } else if (!this.inXML) {
+          if (c === 116) {
+            this.state = 30;
+          } else {
+            this.state = c === 115 ? 29 : 6;
+          }
+        } else {
+          this.state = 6;
+        }
+      } else if (c === 47) {
+        this.state = 8;
+      } else {
+        this.state = 1;
+        this.stateText(c);
+      }
+    }
+    stateInTagName(c) {
+      if (isEndOfTagSection(c)) {
+        this.handleTagName(c);
+      }
+    }
+    stateInSFCRootTagName(c) {
+      if (isEndOfTagSection(c)) {
+        const tag = this.buffer.slice(this.sectionStart, this.index);
+        if (tag !== "template") {
+          this.enterRCDATA(toCharCodes(`</` + tag), 0);
+        }
+        this.handleTagName(c);
+      }
+    }
+    handleTagName(c) {
+      this.cbs.onopentagname(this.sectionStart, this.index);
+      this.sectionStart = -1;
+      this.state = 11;
+      this.stateBeforeAttrName(c);
+    }
+    stateBeforeClosingTagName(c) {
+      if (isWhitespace(c)) ; else if (c === 62) {
+        {
+          this.cbs.onerr(14, this.index);
+        }
+        this.state = 1;
+        this.sectionStart = this.index + 1;
+      } else {
+        this.state = isTagStartChar(c) ? 9 : 27;
+        this.sectionStart = this.index;
+      }
+    }
+    stateInClosingTagName(c) {
+      if (c === 62 || isWhitespace(c)) {
+        this.cbs.onclosetag(this.sectionStart, this.index);
+        this.sectionStart = -1;
+        this.state = 10;
+        this.stateAfterClosingTagName(c);
+      }
+    }
+    stateAfterClosingTagName(c) {
+      if (c === 62) {
+        this.state = 1;
+        this.sectionStart = this.index + 1;
+      }
+    }
+    stateBeforeAttrName(c) {
+      if (c === 62) {
+        this.cbs.onopentagend(this.index);
+        if (this.inRCDATA) {
+          this.state = 32;
+        } else {
+          this.state = 1;
+        }
+        this.sectionStart = this.index + 1;
+      } else if (c === 47) {
+        this.state = 7;
+        if (this.peek() !== 62) {
+          this.cbs.onerr(22, this.index);
+        }
+      } else if (c === 60 && this.peek() === 47) {
+        this.cbs.onopentagend(this.index);
+        this.state = 5;
+        this.sectionStart = this.index;
+      } else if (!isWhitespace(c)) {
+        if (c === 61) {
+          this.cbs.onerr(
+            19,
+            this.index
+          );
+        }
+        this.handleAttrStart(c);
+      }
+    }
+    handleAttrStart(c) {
+      if (c === 118 && this.peek() === 45) {
+        this.state = 13;
+        this.sectionStart = this.index;
+      } else if (c === 46 || c === 58 || c === 64 || c === 35) {
+        this.cbs.ondirname(this.index, this.index + 1);
+        this.state = 14;
+        this.sectionStart = this.index + 1;
+      } else {
+        this.state = 12;
+        this.sectionStart = this.index;
+      }
+    }
+    stateInSelfClosingTag(c) {
+      if (c === 62) {
+        this.cbs.onselfclosingtag(this.index);
+        this.state = 1;
+        this.sectionStart = this.index + 1;
+        this.inRCDATA = false;
+      } else if (!isWhitespace(c)) {
+        this.state = 11;
+        this.stateBeforeAttrName(c);
+      }
+    }
+    stateInAttrName(c) {
+      if (c === 61 || isEndOfTagSection(c)) {
+        this.cbs.onattribname(this.sectionStart, this.index);
+        this.handleAttrNameEnd(c);
+      } else if (c === 34 || c === 39 || c === 60) {
+        this.cbs.onerr(
+          17,
+          this.index
+        );
+      }
+    }
+    stateInDirName(c) {
+      if (c === 61 || isEndOfTagSection(c)) {
+        this.cbs.ondirname(this.sectionStart, this.index);
+        this.handleAttrNameEnd(c);
+      } else if (c === 58) {
+        this.cbs.ondirname(this.sectionStart, this.index);
+        this.state = 14;
+        this.sectionStart = this.index + 1;
+      } else if (c === 46) {
+        this.cbs.ondirname(this.sectionStart, this.index);
+        this.state = 16;
+        this.sectionStart = this.index + 1;
+      }
+    }
+    stateInDirArg(c) {
+      if (c === 61 || isEndOfTagSection(c)) {
+        this.cbs.ondirarg(this.sectionStart, this.index);
+        this.handleAttrNameEnd(c);
+      } else if (c === 91) {
+        this.state = 15;
+      } else if (c === 46) {
+        this.cbs.ondirarg(this.sectionStart, this.index);
+        this.state = 16;
+        this.sectionStart = this.index + 1;
+      }
+    }
+    stateInDynamicDirArg(c) {
+      if (c === 93) {
+        this.state = 14;
+      } else if (c === 61 || isEndOfTagSection(c)) {
+        this.cbs.ondirarg(this.sectionStart, this.index + 1);
+        this.handleAttrNameEnd(c);
+        {
+          this.cbs.onerr(
+            27,
+            this.index
+          );
+        }
+      }
+    }
+    stateInDirModifier(c) {
+      if (c === 61 || isEndOfTagSection(c)) {
+        this.cbs.ondirmodifier(this.sectionStart, this.index);
+        this.handleAttrNameEnd(c);
+      } else if (c === 46) {
+        this.cbs.ondirmodifier(this.sectionStart, this.index);
+        this.sectionStart = this.index + 1;
+      }
+    }
+    handleAttrNameEnd(c) {
+      this.sectionStart = this.index;
+      this.state = 17;
+      this.cbs.onattribnameend(this.index);
+      this.stateAfterAttrName(c);
+    }
+    stateAfterAttrName(c) {
+      if (c === 61) {
+        this.state = 18;
+      } else if (c === 47 || c === 62) {
+        this.cbs.onattribend(0, this.sectionStart);
+        this.sectionStart = -1;
+        this.state = 11;
+        this.stateBeforeAttrName(c);
+      } else if (!isWhitespace(c)) {
+        this.cbs.onattribend(0, this.sectionStart);
+        this.handleAttrStart(c);
+      }
+    }
+    stateBeforeAttrValue(c) {
+      if (c === 34) {
+        this.state = 19;
+        this.sectionStart = this.index + 1;
+      } else if (c === 39) {
+        this.state = 20;
+        this.sectionStart = this.index + 1;
+      } else if (!isWhitespace(c)) {
+        this.sectionStart = this.index;
+        this.state = 21;
+        this.stateInAttrValueNoQuotes(c);
+      }
+    }
+    handleInAttrValue(c, quote) {
+      if (c === quote || this.fastForwardTo(quote)) {
+        this.cbs.onattribdata(this.sectionStart, this.index);
+        this.sectionStart = -1;
+        this.cbs.onattribend(
+          quote === 34 ? 3 : 2,
+          this.index + 1
+        );
+        this.state = 11;
+      }
+    }
+    stateInAttrValueDoubleQuotes(c) {
+      this.handleInAttrValue(c, 34);
+    }
+    stateInAttrValueSingleQuotes(c) {
+      this.handleInAttrValue(c, 39);
+    }
+    stateInAttrValueNoQuotes(c) {
+      if (isWhitespace(c) || c === 62) {
+        this.cbs.onattribdata(this.sectionStart, this.index);
+        this.sectionStart = -1;
+        this.cbs.onattribend(1, this.index);
+        this.state = 11;
+        this.stateBeforeAttrName(c);
+      } else if (c === 34 || c === 39 || c === 60 || c === 61 || c === 96) {
+        this.cbs.onerr(
+          18,
+          this.index
+        );
+      } else ;
+    }
+    stateBeforeDeclaration(c) {
+      if (c === 91) {
+        this.state = 26;
+        this.sequenceIndex = 0;
+      } else {
+        this.state = c === 45 ? 25 : 23;
+      }
+    }
+    stateInDeclaration(c) {
+      if (c === 62 || this.fastForwardTo(62)) {
+        this.state = 1;
+        this.sectionStart = this.index + 1;
+      }
+    }
+    stateInProcessingInstruction(c) {
+      if (c === 62 || this.fastForwardTo(62)) {
+        this.cbs.onprocessinginstruction(this.sectionStart, this.index);
+        this.state = 1;
+        this.sectionStart = this.index + 1;
+      }
+    }
+    stateBeforeComment(c) {
+      if (c === 45) {
+        this.state = 28;
+        this.currentSequence = Sequences.CommentEnd;
+        this.sequenceIndex = 2;
+        this.sectionStart = this.index + 1;
+      } else {
+        this.state = 23;
+      }
+    }
+    stateInSpecialComment(c) {
+      if (c === 62 || this.fastForwardTo(62)) {
+        this.cbs.oncomment(this.sectionStart, this.index);
+        this.state = 1;
+        this.sectionStart = this.index + 1;
+      }
+    }
+    stateBeforeSpecialS(c) {
+      if (c === Sequences.ScriptEnd[3]) {
+        this.startSpecial(Sequences.ScriptEnd, 4);
+      } else if (c === Sequences.StyleEnd[3]) {
+        this.startSpecial(Sequences.StyleEnd, 4);
+      } else {
+        this.state = 6;
+        this.stateInTagName(c);
+      }
+    }
+    stateBeforeSpecialT(c) {
+      if (c === Sequences.TitleEnd[3]) {
+        this.startSpecial(Sequences.TitleEnd, 4);
+      } else if (c === Sequences.TextareaEnd[3]) {
+        this.startSpecial(Sequences.TextareaEnd, 4);
+      } else {
+        this.state = 6;
+        this.stateInTagName(c);
+      }
+    }
+    startEntity() {
+    }
+    stateInEntity() {
+    }
+    /**
+     * Iterates through the buffer, calling the function corresponding to the current state.
+     *
+     * States that are more likely to be hit are higher up, as a performance improvement.
+     */
+    parse(input) {
+      this.buffer = input;
+      while (this.index < this.buffer.length) {
+        const c = this.buffer.charCodeAt(this.index);
+        if (c === 10) {
+          this.newlines.push(this.index);
+        }
+        switch (this.state) {
+          case 1: {
+            this.stateText(c);
+            break;
+          }
+          case 2: {
+            this.stateInterpolationOpen(c);
+            break;
+          }
+          case 3: {
+            this.stateInterpolation(c);
+            break;
+          }
+          case 4: {
+            this.stateInterpolationClose(c);
+            break;
+          }
+          case 31: {
+            this.stateSpecialStartSequence(c);
+            break;
+          }
+          case 32: {
+            this.stateInRCDATA(c);
+            break;
+          }
+          case 26: {
+            this.stateCDATASequence(c);
+            break;
+          }
+          case 19: {
+            this.stateInAttrValueDoubleQuotes(c);
+            break;
+          }
+          case 12: {
+            this.stateInAttrName(c);
+            break;
+          }
+          case 13: {
+            this.stateInDirName(c);
+            break;
+          }
+          case 14: {
+            this.stateInDirArg(c);
+            break;
+          }
+          case 15: {
+            this.stateInDynamicDirArg(c);
+            break;
+          }
+          case 16: {
+            this.stateInDirModifier(c);
+            break;
+          }
+          case 28: {
+            this.stateInCommentLike(c);
+            break;
+          }
+          case 27: {
+            this.stateInSpecialComment(c);
+            break;
+          }
+          case 11: {
+            this.stateBeforeAttrName(c);
+            break;
+          }
+          case 6: {
+            this.stateInTagName(c);
+            break;
+          }
+          case 34: {
+            this.stateInSFCRootTagName(c);
+            break;
+          }
+          case 9: {
+            this.stateInClosingTagName(c);
+            break;
+          }
+          case 5: {
+            this.stateBeforeTagName(c);
+            break;
+          }
+          case 17: {
+            this.stateAfterAttrName(c);
+            break;
+          }
+          case 20: {
+            this.stateInAttrValueSingleQuotes(c);
+            break;
+          }
+          case 18: {
+            this.stateBeforeAttrValue(c);
+            break;
+          }
+          case 8: {
+            this.stateBeforeClosingTagName(c);
+            break;
+          }
+          case 10: {
+            this.stateAfterClosingTagName(c);
+            break;
+          }
+          case 29: {
+            this.stateBeforeSpecialS(c);
+            break;
+          }
+          case 30: {
+            this.stateBeforeSpecialT(c);
+            break;
+          }
+          case 21: {
+            this.stateInAttrValueNoQuotes(c);
+            break;
+          }
+          case 7: {
+            this.stateInSelfClosingTag(c);
+            break;
+          }
+          case 23: {
+            this.stateInDeclaration(c);
+            break;
+          }
+          case 22: {
+            this.stateBeforeDeclaration(c);
+            break;
+          }
+          case 25: {
+            this.stateBeforeComment(c);
+            break;
+          }
+          case 24: {
+            this.stateInProcessingInstruction(c);
+            break;
+          }
+          case 33: {
+            this.stateInEntity();
+            break;
+          }
+        }
+        this.index++;
+      }
+      this.cleanup();
+      this.finish();
+    }
+    /**
+     * Remove data that has already been consumed from the buffer.
+     */
+    cleanup() {
+      if (this.sectionStart !== this.index) {
+        if (this.state === 1 || this.state === 32 && this.sequenceIndex === 0) {
+          this.cbs.ontext(this.sectionStart, this.index);
+          this.sectionStart = this.index;
+        } else if (this.state === 19 || this.state === 20 || this.state === 21) {
+          this.cbs.onattribdata(this.sectionStart, this.index);
+          this.sectionStart = this.index;
+        }
+      }
+    }
+    finish() {
+      this.handleTrailingData();
+      this.cbs.onend();
+    }
+    /** Handle any trailing data. */
+    handleTrailingData() {
+      const endIndex = this.buffer.length;
+      if (this.sectionStart >= endIndex) {
+        return;
+      }
+      if (this.state === 28) {
+        if (this.currentSequence === Sequences.CdataEnd) {
+          this.cbs.oncdata(this.sectionStart, endIndex);
+        } else {
+          this.cbs.oncomment(this.sectionStart, endIndex);
+        }
+      } else if (this.state === 6 || this.state === 11 || this.state === 18 || this.state === 17 || this.state === 12 || this.state === 13 || this.state === 14 || this.state === 15 || this.state === 16 || this.state === 20 || this.state === 19 || this.state === 21 || this.state === 9) ; else {
+        this.cbs.ontext(this.sectionStart, endIndex);
+      }
+    }
+    emitCodePoint(cp, consumed) {
+    }
+  }
+
+  const CompilerDeprecationTypes = {
+    "COMPILER_IS_ON_ELEMENT": "COMPILER_IS_ON_ELEMENT",
+    "COMPILER_V_BIND_SYNC": "COMPILER_V_BIND_SYNC",
+    "COMPILER_V_BIND_OBJECT_ORDER": "COMPILER_V_BIND_OBJECT_ORDER",
+    "COMPILER_V_ON_NATIVE": "COMPILER_V_ON_NATIVE",
+    "COMPILER_V_IF_V_FOR_PRECEDENCE": "COMPILER_V_IF_V_FOR_PRECEDENCE",
+    "COMPILER_NATIVE_TEMPLATE": "COMPILER_NATIVE_TEMPLATE",
+    "COMPILER_INLINE_TEMPLATE": "COMPILER_INLINE_TEMPLATE",
+    "COMPILER_FILTERS": "COMPILER_FILTERS"
+  };
+  const deprecationData = {
+    ["COMPILER_IS_ON_ELEMENT"]: {
+      message: `Platform-native elements with "is" prop will no longer be treated as components in Vue 3 unless the "is" value is explicitly prefixed with "vue:".`,
+      link: `https://v3-migration.vuejs.org/breaking-changes/custom-elements-interop.html`
+    },
+    ["COMPILER_V_BIND_SYNC"]: {
+      message: (key) => `.sync modifier for v-bind has been removed. Use v-model with argument instead. \`v-bind:${key}.sync\` should be changed to \`v-model:${key}\`.`,
+      link: `https://v3-migration.vuejs.org/breaking-changes/v-model.html`
+    },
+    ["COMPILER_V_BIND_OBJECT_ORDER"]: {
+      message: `v-bind="obj" usage is now order sensitive and behaves like JavaScript object spread: it will now overwrite an existing non-mergeable attribute that appears before v-bind in the case of conflict. To retain 2.x behavior, move v-bind to make it the first attribute. You can also suppress this warning if the usage is intended.`,
+      link: `https://v3-migration.vuejs.org/breaking-changes/v-bind.html`
+    },
+    ["COMPILER_V_ON_NATIVE"]: {
+      message: `.native modifier for v-on has been removed as is no longer necessary.`,
+      link: `https://v3-migration.vuejs.org/breaking-changes/v-on-native-modifier-removed.html`
+    },
+    ["COMPILER_V_IF_V_FOR_PRECEDENCE"]: {
+      message: `v-if / v-for precedence when used on the same element has changed in Vue 3: v-if now takes higher precedence and will no longer have access to v-for scope variables. It is best to avoid the ambiguity with <template> tags or use a computed property that filters v-for data source.`,
+      link: `https://v3-migration.vuejs.org/breaking-changes/v-if-v-for.html`
+    },
+    ["COMPILER_NATIVE_TEMPLATE"]: {
+      message: `<template> with no special directives will render as a native template element instead of its inner content in Vue 3.`
+    },
+    ["COMPILER_INLINE_TEMPLATE"]: {
+      message: `"inline-template" has been removed in Vue 3.`,
+      link: `https://v3-migration.vuejs.org/breaking-changes/inline-template-attribute.html`
+    },
+    ["COMPILER_FILTERS"]: {
+      message: `filters have been removed in Vue 3. The "|" symbol will be treated as native JavaScript bitwise OR operator. Use method calls or computed properties instead.`,
+      link: `https://v3-migration.vuejs.org/breaking-changes/filters.html`
+    }
+  };
+  function getCompatValue(key, { compatConfig }) {
+    const value = compatConfig && compatConfig[key];
+    if (key === "MODE") {
+      return value || 3;
+    } else {
+      return value;
+    }
+  }
+  function isCompatEnabled(key, context) {
+    const mode = getCompatValue("MODE", context);
+    const value = getCompatValue(key, context);
+    return mode === 3 ? value === true : value !== false;
+  }
+  function checkCompatEnabled(key, context, loc, ...args) {
+    const enabled = isCompatEnabled(key, context);
+    if (enabled) {
+      warnDeprecation(key, context, loc, ...args);
+    }
+    return enabled;
+  }
+  function warnDeprecation(key, context, loc, ...args) {
+    const val = getCompatValue(key, context);
+    if (val === "suppress-warning") {
+      return;
+    }
+    const { message, link } = deprecationData[key];
+    const msg = `(deprecation ${key}) ${typeof message === "function" ? message(...args) : message}${link ? `
+  Details: ${link}` : ``}`;
+    const err = new SyntaxError(msg);
+    err.code = key;
+    if (loc)
+      err.loc = loc;
+    context.onWarn(err);
+  }
+
+  function defaultOnError(error) {
+    throw error;
+  }
+  function defaultOnWarn(msg) {
+    console.warn(`[Vue warn] ${msg.message}`);
+  }
+  function createCompilerError(code, loc, messages, additionalMessage) {
+    const msg = (messages || errorMessages)[code] + (additionalMessage || ``) ;
+    const error = new SyntaxError(String(msg));
+    error.code = code;
+    error.loc = loc;
+    return error;
+  }
+  const ErrorCodes = {
+    "ABRUPT_CLOSING_OF_EMPTY_COMMENT": 0,
+    "0": "ABRUPT_CLOSING_OF_EMPTY_COMMENT",
+    "CDATA_IN_HTML_CONTENT": 1,
+    "1": "CDATA_IN_HTML_CONTENT",
+    "DUPLICATE_ATTRIBUTE": 2,
+    "2": "DUPLICATE_ATTRIBUTE",
+    "END_TAG_WITH_ATTRIBUTES": 3,
+    "3": "END_TAG_WITH_ATTRIBUTES",
+    "END_TAG_WITH_TRAILING_SOLIDUS": 4,
+    "4": "END_TAG_WITH_TRAILING_SOLIDUS",
+    "EOF_BEFORE_TAG_NAME": 5,
+    "5": "EOF_BEFORE_TAG_NAME",
+    "EOF_IN_CDATA": 6,
+    "6": "EOF_IN_CDATA",
+    "EOF_IN_COMMENT": 7,
+    "7": "EOF_IN_COMMENT",
+    "EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT": 8,
+    "8": "EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT",
+    "EOF_IN_TAG": 9,
+    "9": "EOF_IN_TAG",
+    "INCORRECTLY_CLOSED_COMMENT": 10,
+    "10": "INCORRECTLY_CLOSED_COMMENT",
+    "INCORRECTLY_OPENED_COMMENT": 11,
+    "11": "INCORRECTLY_OPENED_COMMENT",
+    "INVALID_FIRST_CHARACTER_OF_TAG_NAME": 12,
+    "12": "INVALID_FIRST_CHARACTER_OF_TAG_NAME",
+    "MISSING_ATTRIBUTE_VALUE": 13,
+    "13": "MISSING_ATTRIBUTE_VALUE",
+    "MISSING_END_TAG_NAME": 14,
+    "14": "MISSING_END_TAG_NAME",
+    "MISSING_WHITESPACE_BETWEEN_ATTRIBUTES": 15,
+    "15": "MISSING_WHITESPACE_BETWEEN_ATTRIBUTES",
+    "NESTED_COMMENT": 16,
+    "16": "NESTED_COMMENT",
+    "UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME": 17,
+    "17": "UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME",
+    "UNEXPECTED_CHARACTER_IN_UNQUOTED_ATTRIBUTE_VALUE": 18,
+    "18": "UNEXPECTED_CHARACTER_IN_UNQUOTED_ATTRIBUTE_VALUE",
+    "UNEXPECTED_EQUALS_SIGN_BEFORE_ATTRIBUTE_NAME": 19,
+    "19": "UNEXPECTED_EQUALS_SIGN_BEFORE_ATTRIBUTE_NAME",
+    "UNEXPECTED_NULL_CHARACTER": 20,
+    "20": "UNEXPECTED_NULL_CHARACTER",
+    "UNEXPECTED_QUESTION_MARK_INSTEAD_OF_TAG_NAME": 21,
+    "21": "UNEXPECTED_QUESTION_MARK_INSTEAD_OF_TAG_NAME",
+    "UNEXPECTED_SOLIDUS_IN_TAG": 22,
+    "22": "UNEXPECTED_SOLIDUS_IN_TAG",
+    "X_INVALID_END_TAG": 23,
+    "23": "X_INVALID_END_TAG",
+    "X_MISSING_END_TAG": 24,
+    "24": "X_MISSING_END_TAG",
+    "X_MISSING_INTERPOLATION_END": 25,
+    "25": "X_MISSING_INTERPOLATION_END",
+    "X_MISSING_DIRECTIVE_NAME": 26,
+    "26": "X_MISSING_DIRECTIVE_NAME",
+    "X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END": 27,
+    "27": "X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END",
+    "X_V_IF_NO_EXPRESSION": 28,
+    "28": "X_V_IF_NO_EXPRESSION",
+    "X_V_IF_SAME_KEY": 29,
+    "29": "X_V_IF_SAME_KEY",
+    "X_V_ELSE_NO_ADJACENT_IF": 30,
+    "30": "X_V_ELSE_NO_ADJACENT_IF",
+    "X_V_FOR_NO_EXPRESSION": 31,
+    "31": "X_V_FOR_NO_EXPRESSION",
+    "X_V_FOR_MALFORMED_EXPRESSION": 32,
+    "32": "X_V_FOR_MALFORMED_EXPRESSION",
+    "X_V_FOR_TEMPLATE_KEY_PLACEMENT": 33,
+    "33": "X_V_FOR_TEMPLATE_KEY_PLACEMENT",
+    "X_V_BIND_NO_EXPRESSION": 34,
+    "34": "X_V_BIND_NO_EXPRESSION",
+    "X_V_ON_NO_EXPRESSION": 35,
+    "35": "X_V_ON_NO_EXPRESSION",
+    "X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET": 36,
+    "36": "X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET",
+    "X_V_SLOT_MIXED_SLOT_USAGE": 37,
+    "37": "X_V_SLOT_MIXED_SLOT_USAGE",
+    "X_V_SLOT_DUPLICATE_SLOT_NAMES": 38,
+    "38": "X_V_SLOT_DUPLICATE_SLOT_NAMES",
+    "X_V_SLOT_EXTRANEOUS_DEFAULT_SLOT_CHILDREN": 39,
+    "39": "X_V_SLOT_EXTRANEOUS_DEFAULT_SLOT_CHILDREN",
+    "X_V_SLOT_MISPLACED": 40,
+    "40": "X_V_SLOT_MISPLACED",
+    "X_V_MODEL_NO_EXPRESSION": 41,
+    "41": "X_V_MODEL_NO_EXPRESSION",
+    "X_V_MODEL_MALFORMED_EXPRESSION": 42,
+    "42": "X_V_MODEL_MALFORMED_EXPRESSION",
+    "X_V_MODEL_ON_SCOPE_VARIABLE": 43,
+    "43": "X_V_MODEL_ON_SCOPE_VARIABLE",
+    "X_V_MODEL_ON_PROPS": 44,
+    "44": "X_V_MODEL_ON_PROPS",
+    "X_INVALID_EXPRESSION": 45,
+    "45": "X_INVALID_EXPRESSION",
+    "X_KEEP_ALIVE_INVALID_CHILDREN": 46,
+    "46": "X_KEEP_ALIVE_INVALID_CHILDREN",
+    "X_PREFIX_ID_NOT_SUPPORTED": 47,
+    "47": "X_PREFIX_ID_NOT_SUPPORTED",
+    "X_MODULE_MODE_NOT_SUPPORTED": 48,
+    "48": "X_MODULE_MODE_NOT_SUPPORTED",
+    "X_CACHE_HANDLER_NOT_SUPPORTED": 49,
+    "49": "X_CACHE_HANDLER_NOT_SUPPORTED",
+    "X_SCOPE_ID_NOT_SUPPORTED": 50,
+    "50": "X_SCOPE_ID_NOT_SUPPORTED",
+    "X_VNODE_HOOKS": 51,
+    "51": "X_VNODE_HOOKS",
+    "X_V_BIND_INVALID_SAME_NAME_ARGUMENT": 52,
+    "52": "X_V_BIND_INVALID_SAME_NAME_ARGUMENT",
+    "__EXTEND_POINT__": 53,
+    "53": "__EXTEND_POINT__"
+  };
+  const errorMessages = {
+    // parse errors
+    [0]: "Illegal comment.",
+    [1]: "CDATA section is allowed only in XML context.",
+    [2]: "Duplicate attribute.",
+    [3]: "End tag cannot have attributes.",
+    [4]: "Illegal '/' in tags.",
+    [5]: "Unexpected EOF in tag.",
+    [6]: "Unexpected EOF in CDATA section.",
+    [7]: "Unexpected EOF in comment.",
+    [8]: "Unexpected EOF in script.",
+    [9]: "Unexpected EOF in tag.",
+    [10]: "Incorrectly closed comment.",
+    [11]: "Incorrectly opened comment.",
+    [12]: "Illegal tag name. Use '&lt;' to print '<'.",
+    [13]: "Attribute value was expected.",
+    [14]: "End tag name was expected.",
+    [15]: "Whitespace was expected.",
+    [16]: "Unexpected '<!--' in comment.",
+    [17]: `Attribute name cannot contain U+0022 ("), U+0027 ('), and U+003C (<).`,
+    [18]: "Unquoted attribute value cannot contain U+0022 (\"), U+0027 ('), U+003C (<), U+003D (=), and U+0060 (`).",
+    [19]: "Attribute name cannot start with '='.",
+    [21]: "'<?' is allowed only in XML context.",
+    [20]: `Unexpected null character.`,
+    [22]: "Illegal '/' in tags.",
+    // Vue-specific parse errors
+    [23]: "Invalid end tag.",
+    [24]: "Element is missing end tag.",
+    [25]: "Interpolation end sign was not found.",
+    [27]: "End bracket for dynamic directive argument was not found. Note that dynamic directive argument cannot contain spaces.",
+    [26]: "Legal directive name was expected.",
+    // transform errors
+    [28]: `v-if/v-else-if is missing expression.`,
+    [29]: `v-if/else branches must use unique keys.`,
+    [30]: `v-else/v-else-if has no adjacent v-if or v-else-if.`,
+    [31]: `v-for is missing expression.`,
+    [32]: `v-for has invalid expression.`,
+    [33]: `<template v-for> key should be placed on the <template> tag.`,
+    [34]: `v-bind is missing expression.`,
+    [52]: `v-bind with same-name shorthand only allows static argument.`,
+    [35]: `v-on is missing expression.`,
+    [36]: `Unexpected custom directive on <slot> outlet.`,
+    [37]: `Mixed v-slot usage on both the component and nested <template>. When there are multiple named slots, all slots should use <template> syntax to avoid scope ambiguity.`,
+    [38]: `Duplicate slot names found. `,
+    [39]: `Extraneous children found when component already has explicitly named default slot. These children will be ignored.`,
+    [40]: `v-slot can only be used on components or <template> tags.`,
+    [41]: `v-model is missing expression.`,
+    [42]: `v-model value must be a valid JavaScript member expression.`,
+    [43]: `v-model cannot be used on v-for or v-slot scope variables because they are not writable.`,
+    [44]: `v-model cannot be used on a prop, because local prop bindings are not writable.
+Use a v-bind binding combined with a v-on listener that emits update:x event instead.`,
+    [45]: `Error parsing JavaScript expression: `,
+    [46]: `<KeepAlive> expects exactly one child component.`,
+    [51]: `@vnode-* hooks in templates are no longer supported. Use the vue: prefix instead. For example, @vnode-mounted should be changed to @vue:mounted. @vnode-* hooks support has been removed in 3.4.`,
+    // generic errors
+    [47]: `"prefixIdentifiers" option is not supported in this build of compiler.`,
+    [48]: `ES module mode is not supported in this build of compiler.`,
+    [49]: `"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.`,
+    [50]: `"scopeId" option is only supported in module mode.`,
+    // just to fulfill types
+    [53]: ``
+  };
+
+  function walkIdentifiers(root, onIdentifier, includeAll = false, parentStack = [], knownIds = /* @__PURE__ */ Object.create(null)) {
+    {
+      return;
+    }
+  }
+  function isReferencedIdentifier(id, parent, parentStack) {
+    {
+      return false;
+    }
+  }
+  function isInDestructureAssignment(parent, parentStack) {
+    if (parent && (parent.type === "ObjectProperty" || parent.type === "ArrayPattern")) {
+      let i = parentStack.length;
+      while (i--) {
+        const p = parentStack[i];
+        if (p.type === "AssignmentExpression") {
+          return true;
+        } else if (p.type !== "ObjectProperty" && !p.type.endsWith("Pattern")) {
+          break;
+        }
+      }
+    }
+    return false;
+  }
+  function isInNewExpression(parentStack) {
+    let i = parentStack.length;
+    while (i--) {
+      const p = parentStack[i];
+      if (p.type === "NewExpression") {
+        return true;
+      } else if (p.type !== "MemberExpression") {
+        break;
+      }
+    }
+    return false;
+  }
+  function walkFunctionParams(node, onIdent) {
+    for (const p of node.params) {
+      for (const id of extractIdentifiers(p)) {
+        onIdent(id);
+      }
+    }
+  }
+  function walkBlockDeclarations(block, onIdent) {
+    for (const stmt of block.body) {
+      if (stmt.type === "VariableDeclaration") {
+        if (stmt.declare)
+          continue;
+        for (const decl of stmt.declarations) {
+          for (const id of extractIdentifiers(decl.id)) {
+            onIdent(id);
+          }
+        }
+      } else if (stmt.type === "FunctionDeclaration" || stmt.type === "ClassDeclaration") {
+        if (stmt.declare || !stmt.id)
+          continue;
+        onIdent(stmt.id);
+      } else if (stmt.type === "ForOfStatement" || stmt.type === "ForInStatement" || stmt.type === "ForStatement") {
+        const variable = stmt.type === "ForStatement" ? stmt.init : stmt.left;
+        if (variable && variable.type === "VariableDeclaration") {
+          for (const decl of variable.declarations) {
+            for (const id of extractIdentifiers(decl.id)) {
+              onIdent(id);
+            }
+          }
+        }
+      }
+    }
+  }
+  function extractIdentifiers(param, nodes = []) {
+    switch (param.type) {
+      case "Identifier":
+        nodes.push(param);
+        break;
+      case "MemberExpression":
+        let object = param;
+        while (object.type === "MemberExpression") {
+          object = object.object;
+        }
+        nodes.push(object);
+        break;
+      case "ObjectPattern":
+        for (const prop of param.properties) {
+          if (prop.type === "RestElement") {
+            extractIdentifiers(prop.argument, nodes);
+          } else {
+            extractIdentifiers(prop.value, nodes);
+          }
+        }
+        break;
+      case "ArrayPattern":
+        param.elements.forEach((element) => {
+          if (element)
+            extractIdentifiers(element, nodes);
+        });
+        break;
+      case "RestElement":
+        extractIdentifiers(param.argument, nodes);
+        break;
+      case "AssignmentPattern":
+        extractIdentifiers(param.left, nodes);
+        break;
+    }
+    return nodes;
+  }
+  const isFunctionType = (node) => {
+    return /Function(?:Expression|Declaration)$|Method$/.test(node.type);
+  };
+  const isStaticProperty = (node) => node && (node.type === "ObjectProperty" || node.type === "ObjectMethod") && !node.computed;
+  const isStaticPropertyKey = (node, parent) => isStaticProperty(parent) && parent.key === node;
+  const TS_NODE_TYPES = [
+    "TSAsExpression",
+    // foo as number
+    "TSTypeAssertion",
+    // (<number>foo)
+    "TSNonNullExpression",
+    // foo!
+    "TSInstantiationExpression",
+    // foo<string>
+    "TSSatisfiesExpression"
+    // foo satisfies T
+  ];
+  function unwrapTSNode(node) {
+    if (TS_NODE_TYPES.includes(node.type)) {
+      return unwrapTSNode(node.expression);
+    } else {
+      return node;
+    }
+  }
+
+  const isStaticExp = (p) => p.type === 4 && p.isStatic;
+  function isCoreComponent(tag) {
+    switch (tag) {
+      case "Teleport":
+      case "teleport":
+        return TELEPORT;
+      case "Suspense":
+      case "suspense":
+        return SUSPENSE;
+      case "KeepAlive":
+      case "keep-alive":
+        return KEEP_ALIVE;
+      case "BaseTransition":
+      case "base-transition":
+        return BASE_TRANSITION;
+    }
+  }
+  const nonIdentifierRE = /^\d|[^\$\w]/;
+  const isSimpleIdentifier = (name) => !nonIdentifierRE.test(name);
+  const validFirstIdentCharRE = /[A-Za-z_$\xA0-\uFFFF]/;
+  const validIdentCharRE = /[\.\?\w$\xA0-\uFFFF]/;
+  const whitespaceRE = /\s+[.[]\s*|\s*[.[]\s+/g;
+  const isMemberExpressionBrowser = (path) => {
+    path = path.trim().replace(whitespaceRE, (s) => s.trim());
+    let state = 0 /* inMemberExp */;
+    let stateStack = [];
+    let currentOpenBracketCount = 0;
+    let currentOpenParensCount = 0;
+    let currentStringType = null;
+    for (let i = 0; i < path.length; i++) {
+      const char = path.charAt(i);
+      switch (state) {
+        case 0 /* inMemberExp */:
+          if (char === "[") {
+            stateStack.push(state);
+            state = 1 /* inBrackets */;
+            currentOpenBracketCount++;
+          } else if (char === "(") {
+            stateStack.push(state);
+            state = 2 /* inParens */;
+            currentOpenParensCount++;
+          } else if (!(i === 0 ? validFirstIdentCharRE : validIdentCharRE).test(char)) {
+            return false;
+          }
+          break;
+        case 1 /* inBrackets */:
+          if (char === `'` || char === `"` || char === "`") {
+            stateStack.push(state);
+            state = 3 /* inString */;
+            currentStringType = char;
+          } else if (char === `[`) {
+            currentOpenBracketCount++;
+          } else if (char === `]`) {
+            if (!--currentOpenBracketCount) {
+              state = stateStack.pop();
+            }
+          }
+          break;
+        case 2 /* inParens */:
+          if (char === `'` || char === `"` || char === "`") {
+            stateStack.push(state);
+            state = 3 /* inString */;
+            currentStringType = char;
+          } else if (char === `(`) {
+            currentOpenParensCount++;
+          } else if (char === `)`) {
+            if (i === path.length - 1) {
+              return false;
+            }
+            if (!--currentOpenParensCount) {
+              state = stateStack.pop();
+            }
+          }
+          break;
+        case 3 /* inString */:
+          if (char === currentStringType) {
+            state = stateStack.pop();
+            currentStringType = null;
+          }
+          break;
+      }
+    }
+    return !currentOpenBracketCount && !currentOpenParensCount;
+  };
+  const isMemberExpressionNode = NOOP ;
+  const isMemberExpression = isMemberExpressionBrowser ;
+  function advancePositionWithClone(pos, source, numberOfCharacters = source.length) {
+    return advancePositionWithMutation(
+      {
+        offset: pos.offset,
+        line: pos.line,
+        column: pos.column
+      },
+      source,
+      numberOfCharacters
+    );
+  }
+  function advancePositionWithMutation(pos, source, numberOfCharacters = source.length) {
+    let linesCount = 0;
+    let lastNewLinePos = -1;
+    for (let i = 0; i < numberOfCharacters; i++) {
+      if (source.charCodeAt(i) === 10) {
+        linesCount++;
+        lastNewLinePos = i;
+      }
+    }
+    pos.offset += numberOfCharacters;
+    pos.line += linesCount;
+    pos.column = lastNewLinePos === -1 ? pos.column + numberOfCharacters : numberOfCharacters - lastNewLinePos;
+    return pos;
+  }
+  function assert(condition, msg) {
+    if (!condition) {
+      throw new Error(msg || `unexpected compiler condition`);
+    }
+  }
+  function findDir(node, name, allowEmpty = false) {
+    for (let i = 0; i < node.props.length; i++) {
+      const p = node.props[i];
+      if (p.type === 7 && (allowEmpty || p.exp) && (isString(name) ? p.name === name : name.test(p.name))) {
+        return p;
+      }
+    }
+  }
+  function findProp(node, name, dynamicOnly = false, allowEmpty = false) {
+    for (let i = 0; i < node.props.length; i++) {
+      const p = node.props[i];
+      if (p.type === 6) {
+        if (dynamicOnly)
+          continue;
+        if (p.name === name && (p.value || allowEmpty)) {
+          return p;
+        }
+      } else if (p.name === "bind" && (p.exp || allowEmpty) && isStaticArgOf(p.arg, name)) {
+        return p;
+      }
+    }
+  }
+  function isStaticArgOf(arg, name) {
+    return !!(arg && isStaticExp(arg) && arg.content === name);
+  }
+  function hasDynamicKeyVBind(node) {
+    return node.props.some(
+      (p) => p.type === 7 && p.name === "bind" && (!p.arg || // v-bind="obj"
+      p.arg.type !== 4 || // v-bind:[_ctx.foo]
+      !p.arg.isStatic)
+      // v-bind:[foo]
+    );
+  }
+  function isText$1(node) {
+    return node.type === 5 || node.type === 2;
+  }
+  function isVSlot(p) {
+    return p.type === 7 && p.name === "slot";
+  }
+  function isTemplateNode(node) {
+    return node.type === 1 && node.tagType === 3;
+  }
+  function isSlotOutlet(node) {
+    return node.type === 1 && node.tagType === 2;
+  }
+  const propsHelperSet = /* @__PURE__ */ new Set([NORMALIZE_PROPS, GUARD_REACTIVE_PROPS]);
+  function getUnnormalizedProps(props, callPath = []) {
+    if (props && !isString(props) && props.type === 14) {
+      const callee = props.callee;
+      if (!isString(callee) && propsHelperSet.has(callee)) {
+        return getUnnormalizedProps(
+          props.arguments[0],
+          callPath.concat(props)
+        );
+      }
+    }
+    return [props, callPath];
+  }
+  function injectProp(node, prop, context) {
+    let propsWithInjection;
+    let props = node.type === 13 ? node.props : node.arguments[2];
+    let callPath = [];
+    let parentCall;
+    if (props && !isString(props) && props.type === 14) {
+      const ret = getUnnormalizedProps(props);
+      props = ret[0];
+      callPath = ret[1];
+      parentCall = callPath[callPath.length - 1];
+    }
+    if (props == null || isString(props)) {
+      propsWithInjection = createObjectExpression([prop]);
+    } else if (props.type === 14) {
+      const first = props.arguments[0];
+      if (!isString(first) && first.type === 15) {
+        if (!hasProp(prop, first)) {
+          first.properties.unshift(prop);
+        }
+      } else {
+        if (props.callee === TO_HANDLERS) {
+          propsWithInjection = createCallExpression(context.helper(MERGE_PROPS), [
+            createObjectExpression([prop]),
+            props
+          ]);
+        } else {
+          props.arguments.unshift(createObjectExpression([prop]));
+        }
+      }
+      !propsWithInjection && (propsWithInjection = props);
+    } else if (props.type === 15) {
+      if (!hasProp(prop, props)) {
+        props.properties.unshift(prop);
+      }
+      propsWithInjection = props;
+    } else {
+      propsWithInjection = createCallExpression(context.helper(MERGE_PROPS), [
+        createObjectExpression([prop]),
+        props
+      ]);
+      if (parentCall && parentCall.callee === GUARD_REACTIVE_PROPS) {
+        parentCall = callPath[callPath.length - 2];
+      }
+    }
+    if (node.type === 13) {
+      if (parentCall) {
+        parentCall.arguments[0] = propsWithInjection;
+      } else {
+        node.props = propsWithInjection;
+      }
+    } else {
+      if (parentCall) {
+        parentCall.arguments[0] = propsWithInjection;
+      } else {
+        node.arguments[2] = propsWithInjection;
+      }
+    }
+  }
+  function hasProp(prop, props) {
+    let result = false;
+    if (prop.key.type === 4) {
+      const propKeyName = prop.key.content;
+      result = props.properties.some(
+        (p) => p.key.type === 4 && p.key.content === propKeyName
+      );
+    }
+    return result;
+  }
+  function toValidAssetId(name, type) {
+    return `_${type}_${name.replace(/[^\w]/g, (searchValue, replaceValue) => {
+    return searchValue === "-" ? "_" : name.charCodeAt(replaceValue).toString();
+  })}`;
+  }
+  function hasScopeRef(node, ids) {
+    if (!node || Object.keys(ids).length === 0) {
+      return false;
+    }
+    switch (node.type) {
+      case 1:
+        for (let i = 0; i < node.props.length; i++) {
+          const p = node.props[i];
+          if (p.type === 7 && (hasScopeRef(p.arg, ids) || hasScopeRef(p.exp, ids))) {
+            return true;
+          }
+        }
+        return node.children.some((c) => hasScopeRef(c, ids));
+      case 11:
+        if (hasScopeRef(node.source, ids)) {
+          return true;
+        }
+        return node.children.some((c) => hasScopeRef(c, ids));
+      case 9:
+        return node.branches.some((b) => hasScopeRef(b, ids));
+      case 10:
+        if (hasScopeRef(node.condition, ids)) {
+          return true;
+        }
+        return node.children.some((c) => hasScopeRef(c, ids));
+      case 4:
+        return !node.isStatic && isSimpleIdentifier(node.content) && !!ids[node.content];
+      case 8:
+        return node.children.some((c) => isObject(c) && hasScopeRef(c, ids));
+      case 5:
+      case 12:
+        return hasScopeRef(node.content, ids);
+      case 2:
+      case 3:
+        return false;
+      default:
+        return false;
+    }
+  }
+  function getMemoedVNodeCall(node) {
+    if (node.type === 14 && node.callee === WITH_MEMO) {
+      return node.arguments[1].returns;
+    } else {
+      return node;
+    }
+  }
+  const forAliasRE = /([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/;
+
+  const defaultParserOptions = {
+    parseMode: "base",
+    ns: 0,
+    delimiters: [`{{`, `}}`],
+    getNamespace: () => 0,
+    isVoidTag: NO,
+    isPreTag: NO,
+    isCustomElement: NO,
+    onError: defaultOnError,
+    onWarn: defaultOnWarn,
+    comments: true,
+    prefixIdentifiers: false
+  };
+  let currentOptions = defaultParserOptions;
+  let currentRoot = null;
+  let currentInput = "";
+  let currentOpenTag = null;
+  let currentProp = null;
+  let currentAttrValue = "";
+  let currentAttrStartIndex = -1;
+  let currentAttrEndIndex = -1;
+  let inPre = 0;
+  let inVPre = false;
+  let currentVPreBoundary = null;
+  const stack = [];
+  const tokenizer = new Tokenizer(stack, {
+    onerr: emitError,
+    ontext(start, end) {
+      onText(getSlice(start, end), start, end);
+    },
+    ontextentity(char, start, end) {
+      onText(char, start, end);
+    },
+    oninterpolation(start, end) {
+      if (inVPre) {
+        return onText(getSlice(start, end), start, end);
+      }
+      let innerStart = start + tokenizer.delimiterOpen.length;
+      let innerEnd = end - tokenizer.delimiterClose.length;
+      while (isWhitespace(currentInput.charCodeAt(innerStart))) {
+        innerStart++;
+      }
+      while (isWhitespace(currentInput.charCodeAt(innerEnd - 1))) {
+        innerEnd--;
+      }
+      let exp = getSlice(innerStart, innerEnd);
+      if (exp.includes("&")) {
+        {
+          exp = currentOptions.decodeEntities(exp, false);
+        }
+      }
+      addNode({
+        type: 5,
+        content: createExp(exp, false, getLoc(innerStart, innerEnd)),
+        loc: getLoc(start, end)
+      });
+    },
+    onopentagname(start, end) {
+      const name = getSlice(start, end);
+      currentOpenTag = {
+        type: 1,
+        tag: name,
+        ns: currentOptions.getNamespace(name, stack[0], currentOptions.ns),
+        tagType: 0,
+        // will be refined on tag close
+        props: [],
+        children: [],
+        loc: getLoc(start - 1, end),
+        codegenNode: void 0
+      };
+    },
+    onopentagend(end) {
+      endOpenTag(end);
+    },
+    onclosetag(start, end) {
+      const name = getSlice(start, end);
+      if (!currentOptions.isVoidTag(name)) {
+        let found = false;
+        for (let i = 0; i < stack.length; i++) {
+          const e = stack[i];
+          if (e.tag.toLowerCase() === name.toLowerCase()) {
+            found = true;
+            if (i > 0) {
+              emitError(24, stack[0].loc.start.offset);
+            }
+            for (let j = 0; j <= i; j++) {
+              const el = stack.shift();
+              onCloseTag(el, end, j < i);
+            }
+            break;
+          }
+        }
+        if (!found) {
+          emitError(23, backTrack(start, 60));
+        }
+      }
+    },
+    onselfclosingtag(end) {
+      const name = currentOpenTag.tag;
+      currentOpenTag.isSelfClosing = true;
+      endOpenTag(end);
+      if (stack[0] && stack[0].tag === name) {
+        onCloseTag(stack.shift(), end);
+      }
+    },
+    onattribname(start, end) {
+      currentProp = {
+        type: 6,
+        name: getSlice(start, end),
+        nameLoc: getLoc(start, end),
+        value: void 0,
+        loc: getLoc(start)
+      };
+    },
+    ondirname(start, end) {
+      const raw = getSlice(start, end);
+      const name = raw === "." || raw === ":" ? "bind" : raw === "@" ? "on" : raw === "#" ? "slot" : raw.slice(2);
+      if (!inVPre && name === "") {
+        emitError(26, start);
+      }
+      if (inVPre || name === "") {
+        currentProp = {
+          type: 6,
+          name: raw,
+          nameLoc: getLoc(start, end),
+          value: void 0,
+          loc: getLoc(start)
+        };
+      } else {
+        currentProp = {
+          type: 7,
+          name,
+          rawName: raw,
+          exp: void 0,
+          arg: void 0,
+          modifiers: raw === "." ? ["prop"] : [],
+          loc: getLoc(start)
+        };
+        if (name === "pre") {
+          inVPre = tokenizer.inVPre = true;
+          currentVPreBoundary = currentOpenTag;
+          const props = currentOpenTag.props;
+          for (let i = 0; i < props.length; i++) {
+            if (props[i].type === 7) {
+              props[i] = dirToAttr(props[i]);
+            }
+          }
+        }
+      }
+    },
+    ondirarg(start, end) {
+      if (start === end)
+        return;
+      const arg = getSlice(start, end);
+      if (inVPre) {
+        currentProp.name += arg;
+        setLocEnd(currentProp.nameLoc, end);
+      } else {
+        const isStatic = arg[0] !== `[`;
+        currentProp.arg = createExp(
+          isStatic ? arg : arg.slice(1, -1),
+          isStatic,
+          getLoc(start, end),
+          isStatic ? 3 : 0
+        );
+      }
+    },
+    ondirmodifier(start, end) {
+      const mod = getSlice(start, end);
+      if (inVPre) {
+        currentProp.name += "." + mod;
+        setLocEnd(currentProp.nameLoc, end);
+      } else if (currentProp.name === "slot") {
+        const arg = currentProp.arg;
+        if (arg) {
+          arg.content += "." + mod;
+          setLocEnd(arg.loc, end);
+        }
+      } else {
+        currentProp.modifiers.push(mod);
+      }
+    },
+    onattribdata(start, end) {
+      currentAttrValue += getSlice(start, end);
+      if (currentAttrStartIndex < 0)
+        currentAttrStartIndex = start;
+      currentAttrEndIndex = end;
+    },
+    onattribentity(char, start, end) {
+      currentAttrValue += char;
+      if (currentAttrStartIndex < 0)
+        currentAttrStartIndex = start;
+      currentAttrEndIndex = end;
+    },
+    onattribnameend(end) {
+      const start = currentProp.loc.start.offset;
+      const name = getSlice(start, end);
+      if (currentProp.type === 7) {
+        currentProp.rawName = name;
+      }
+      if (currentOpenTag.props.some(
+        (p) => (p.type === 7 ? p.rawName : p.name) === name
+      )) {
+        emitError(2, start);
+      }
+    },
+    onattribend(quote, end) {
+      if (currentOpenTag && currentProp) {
+        setLocEnd(currentProp.loc, end);
+        if (quote !== 0) {
+          if (currentAttrValue.includes("&")) {
+            currentAttrValue = currentOptions.decodeEntities(
+              currentAttrValue,
+              true
+            );
+          }
+          if (currentProp.type === 6) {
+            if (currentProp.name === "class") {
+              currentAttrValue = condense(currentAttrValue).trim();
+            }
+            if (quote === 1 && !currentAttrValue) {
+              emitError(13, end);
+            }
+            currentProp.value = {
+              type: 2,
+              content: currentAttrValue,
+              loc: quote === 1 ? getLoc(currentAttrStartIndex, currentAttrEndIndex) : getLoc(currentAttrStartIndex - 1, currentAttrEndIndex + 1)
+            };
+            if (tokenizer.inSFCRoot && currentOpenTag.tag === "template" && currentProp.name === "lang" && currentAttrValue && currentAttrValue !== "html") {
+              tokenizer.enterRCDATA(toCharCodes(`</template`), 0);
+            }
+          } else {
+            let expParseMode = 0 /* Normal */;
+            currentProp.exp = createExp(
+              currentAttrValue,
+              false,
+              getLoc(currentAttrStartIndex, currentAttrEndIndex),
+              0,
+              expParseMode
+            );
+            if (currentProp.name === "for") {
+              currentProp.forParseResult = parseForExpression(currentProp.exp);
+            }
+            let syncIndex = -1;
+            if (currentProp.name === "bind" && (syncIndex = currentProp.modifiers.indexOf("sync")) > -1 && checkCompatEnabled(
+              "COMPILER_V_BIND_SYNC",
+              currentOptions,
+              currentProp.loc,
+              currentProp.rawName
+            )) {
+              currentProp.name = "model";
+              currentProp.modifiers.splice(syncIndex, 1);
+            }
+          }
+        }
+        if (currentProp.type !== 7 || currentProp.name !== "pre") {
+          currentOpenTag.props.push(currentProp);
+        }
+      }
+      currentAttrValue = "";
+      currentAttrStartIndex = currentAttrEndIndex = -1;
+    },
+    oncomment(start, end) {
+      if (currentOptions.comments) {
+        addNode({
+          type: 3,
+          content: getSlice(start, end),
+          loc: getLoc(start - 4, end + 3)
+        });
+      }
+    },
+    onend() {
+      const end = currentInput.length;
+      if (tokenizer.state !== 1) {
+        switch (tokenizer.state) {
+          case 5:
+          case 8:
+            emitError(5, end);
+            break;
+          case 3:
+          case 4:
+            emitError(
+              25,
+              tokenizer.sectionStart
+            );
+            break;
+          case 28:
+            if (tokenizer.currentSequence === Sequences.CdataEnd) {
+              emitError(6, end);
+            } else {
+              emitError(7, end);
+            }
+            break;
+          case 6:
+          case 7:
+          case 9:
+          case 11:
+          case 12:
+          case 13:
+          case 14:
+          case 15:
+          case 16:
+          case 17:
+          case 18:
+          case 19:
+          case 20:
+          case 21:
+            emitError(9, end);
+            break;
+        }
+      }
+      for (let index = 0; index < stack.length; index++) {
+        onCloseTag(stack[index], end - 1);
+        emitError(24, stack[index].loc.start.offset);
+      }
+    },
+    oncdata(start, end) {
+      if (stack[0].ns !== 0) {
+        onText(getSlice(start, end), start, end);
+      } else {
+        emitError(1, start - 9);
+      }
+    },
+    onprocessinginstruction(start) {
+      if ((stack[0] ? stack[0].ns : currentOptions.ns) === 0) {
+        emitError(
+          21,
+          start - 1
+        );
+      }
+    }
+  });
+  const forIteratorRE = /,([^,\}\]]*)(?:,([^,\}\]]*))?$/;
+  const stripParensRE = /^\(|\)$/g;
+  function parseForExpression(input) {
+    const loc = input.loc;
+    const exp = input.content;
+    const inMatch = exp.match(forAliasRE);
+    if (!inMatch)
+      return;
+    const [, LHS, RHS] = inMatch;
+    const createAliasExpression = (content, offset, asParam = false) => {
+      const start = loc.start.offset + offset;
+      const end = start + content.length;
+      return createExp(
+        content,
+        false,
+        getLoc(start, end),
+        0,
+        asParam ? 1 /* Params */ : 0 /* Normal */
+      );
+    };
+    const result = {
+      source: createAliasExpression(RHS.trim(), exp.indexOf(RHS, LHS.length)),
+      value: void 0,
+      key: void 0,
+      index: void 0,
+      finalized: false
+    };
+    let valueContent = LHS.trim().replace(stripParensRE, "").trim();
+    const trimmedOffset = LHS.indexOf(valueContent);
+    const iteratorMatch = valueContent.match(forIteratorRE);
+    if (iteratorMatch) {
+      valueContent = valueContent.replace(forIteratorRE, "").trim();
+      const keyContent = iteratorMatch[1].trim();
+      let keyOffset;
+      if (keyContent) {
+        keyOffset = exp.indexOf(keyContent, trimmedOffset + valueContent.length);
+        result.key = createAliasExpression(keyContent, keyOffset, true);
+      }
+      if (iteratorMatch[2]) {
+        const indexContent = iteratorMatch[2].trim();
+        if (indexContent) {
+          result.index = createAliasExpression(
+            indexContent,
+            exp.indexOf(
+              indexContent,
+              result.key ? keyOffset + keyContent.length : trimmedOffset + valueContent.length
+            ),
+            true
+          );
+        }
+      }
+    }
+    if (valueContent) {
+      result.value = createAliasExpression(valueContent, trimmedOffset, true);
+    }
+    return result;
+  }
+  function getSlice(start, end) {
+    return currentInput.slice(start, end);
+  }
+  function endOpenTag(end) {
+    if (tokenizer.inSFCRoot) {
+      currentOpenTag.innerLoc = getLoc(end + 1, end + 1);
+    }
+    addNode(currentOpenTag);
+    const { tag, ns } = currentOpenTag;
+    if (ns === 0 && currentOptions.isPreTag(tag)) {
+      inPre++;
+    }
+    if (currentOptions.isVoidTag(tag)) {
+      onCloseTag(currentOpenTag, end);
+    } else {
+      stack.unshift(currentOpenTag);
+      if (ns === 1 || ns === 2) {
+        tokenizer.inXML = true;
+      }
+    }
+    currentOpenTag = null;
+  }
+  function onText(content, start, end) {
+    {
+      const tag = stack[0] && stack[0].tag;
+      if (tag !== "script" && tag !== "style" && content.includes("&")) {
+        content = currentOptions.decodeEntities(content, false);
+      }
+    }
+    const parent = stack[0] || currentRoot;
+    const lastNode = parent.children[parent.children.length - 1];
+    if (lastNode && lastNode.type === 2) {
+      lastNode.content += content;
+      setLocEnd(lastNode.loc, end);
+    } else {
+      parent.children.push({
+        type: 2,
+        content,
+        loc: getLoc(start, end)
+      });
+    }
+  }
+  function onCloseTag(el, end, isImplied = false) {
+    if (isImplied) {
+      setLocEnd(el.loc, backTrack(end, 60));
+    } else {
+      setLocEnd(el.loc, lookAhead(end, 62) + 1);
+    }
+    if (tokenizer.inSFCRoot) {
+      if (el.children.length) {
+        el.innerLoc.end = extend({}, el.children[el.children.length - 1].loc.end);
+      } else {
+        el.innerLoc.end = extend({}, el.innerLoc.start);
+      }
+      el.innerLoc.source = getSlice(
+        el.innerLoc.start.offset,
+        el.innerLoc.end.offset
+      );
+    }
+    const { tag, ns } = el;
+    if (!inVPre) {
+      if (tag === "slot") {
+        el.tagType = 2;
+      } else if (isFragmentTemplate(el)) {
+        el.tagType = 3;
+      } else if (isComponent(el)) {
+        el.tagType = 1;
+      }
+    }
+    if (!tokenizer.inRCDATA) {
+      el.children = condenseWhitespace(el.children, el.tag);
+    }
+    if (ns === 0 && currentOptions.isPreTag(tag)) {
+      inPre--;
+    }
+    if (currentVPreBoundary === el) {
+      inVPre = tokenizer.inVPre = false;
+      currentVPreBoundary = null;
+    }
+    if (tokenizer.inXML && (stack[0] ? stack[0].ns : currentOptions.ns) === 0) {
+      tokenizer.inXML = false;
+    }
+    {
+      const props = el.props;
+      if (isCompatEnabled(
+        "COMPILER_V_IF_V_FOR_PRECEDENCE",
+        currentOptions
+      )) {
+        let hasIf = false;
+        let hasFor = false;
+        for (let i = 0; i < props.length; i++) {
+          const p = props[i];
+          if (p.type === 7) {
+            if (p.name === "if") {
+              hasIf = true;
+            } else if (p.name === "for") {
+              hasFor = true;
+            }
+          }
+          if (hasIf && hasFor) {
+            warnDeprecation(
+              "COMPILER_V_IF_V_FOR_PRECEDENCE",
+              currentOptions,
+              el.loc
+            );
+            break;
+          }
+        }
+      }
+      if (!tokenizer.inSFCRoot && isCompatEnabled(
+        "COMPILER_NATIVE_TEMPLATE",
+        currentOptions
+      ) && el.tag === "template" && !isFragmentTemplate(el)) {
+        warnDeprecation(
+          "COMPILER_NATIVE_TEMPLATE",
+          currentOptions,
+          el.loc
+        );
+        const parent = stack[0] || currentRoot;
+        const index = parent.children.indexOf(el);
+        parent.children.splice(index, 1, ...el.children);
+      }
+      const inlineTemplateProp = props.find(
+        (p) => p.type === 6 && p.name === "inline-template"
+      );
+      if (inlineTemplateProp && checkCompatEnabled(
+        "COMPILER_INLINE_TEMPLATE",
+        currentOptions,
+        inlineTemplateProp.loc
+      ) && el.children.length) {
+        inlineTemplateProp.value = {
+          type: 2,
+          content: getSlice(
+            el.children[0].loc.start.offset,
+            el.children[el.children.length - 1].loc.end.offset
+          ),
+          loc: inlineTemplateProp.loc
+        };
+      }
+    }
+  }
+  function lookAhead(index, c) {
+    let i = index;
+    while (currentInput.charCodeAt(i) !== c && i < currentInput.length - 1)
+      i++;
+    return i;
+  }
+  function backTrack(index, c) {
+    let i = index;
+    while (currentInput.charCodeAt(i) !== c && i >= 0)
+      i--;
+    return i;
+  }
+  const specialTemplateDir = /* @__PURE__ */ new Set(["if", "else", "else-if", "for", "slot"]);
+  function isFragmentTemplate({ tag, props }) {
+    if (tag === "template") {
+      for (let i = 0; i < props.length; i++) {
+        if (props[i].type === 7 && specialTemplateDir.has(props[i].name)) {
+          return true;
+        }
+      }
+    }
+    return false;
+  }
+  function isComponent({ tag, props }) {
+    if (currentOptions.isCustomElement(tag)) {
+      return false;
+    }
+    if (tag === "component" || isUpperCase(tag.charCodeAt(0)) || isCoreComponent(tag) || currentOptions.isBuiltInComponent && currentOptions.isBuiltInComponent(tag) || currentOptions.isNativeTag && !currentOptions.isNativeTag(tag)) {
+      return true;
+    }
+    for (let i = 0; i < props.length; i++) {
+      const p = props[i];
+      if (p.type === 6) {
+        if (p.name === "is" && p.value) {
+          if (p.value.content.startsWith("vue:")) {
+            return true;
+          } else if (checkCompatEnabled(
+            "COMPILER_IS_ON_ELEMENT",
+            currentOptions,
+            p.loc
+          )) {
+            return true;
+          }
+        }
+      } else if (// :is on plain element - only treat as component in compat mode
+      p.name === "bind" && isStaticArgOf(p.arg, "is") && checkCompatEnabled(
+        "COMPILER_IS_ON_ELEMENT",
+        currentOptions,
+        p.loc
+      )) {
+        return true;
+      }
+    }
+    return false;
+  }
+  function isUpperCase(c) {
+    return c > 64 && c < 91;
+  }
+  const windowsNewlineRE = /\r\n/g;
+  function condenseWhitespace(nodes, tag) {
+    const shouldCondense = currentOptions.whitespace !== "preserve";
+    let removedWhitespace = false;
+    for (let i = 0; i < nodes.length; i++) {
+      const node = nodes[i];
+      if (node.type === 2) {
+        if (!inPre) {
+          if (isAllWhitespace(node.content)) {
+            const prev = nodes[i - 1] && nodes[i - 1].type;
+            const next = nodes[i + 1] && nodes[i + 1].type;
+            if (!prev || !next || shouldCondense && (prev === 3 && (next === 3 || next === 1) || prev === 1 && (next === 3 || next === 1 && hasNewlineChar(node.content)))) {
+              removedWhitespace = true;
+              nodes[i] = null;
+            } else {
+              node.content = " ";
+            }
+          } else if (shouldCondense) {
+            node.content = condense(node.content);
+          }
+        } else {
+          node.content = node.content.replace(windowsNewlineRE, "\n");
+        }
+      }
+    }
+    if (inPre && tag && currentOptions.isPreTag(tag)) {
+      const first = nodes[0];
+      if (first && first.type === 2) {
+        first.content = first.content.replace(/^\r?\n/, "");
+      }
+    }
+    return removedWhitespace ? nodes.filter(Boolean) : nodes;
+  }
+  function isAllWhitespace(str) {
+    for (let i = 0; i < str.length; i++) {
+      if (!isWhitespace(str.charCodeAt(i))) {
+        return false;
+      }
+    }
+    return true;
+  }
+  function hasNewlineChar(str) {
+    for (let i = 0; i < str.length; i++) {
+      const c = str.charCodeAt(i);
+      if (c === 10 || c === 13) {
+        return true;
+      }
+    }
+    return false;
+  }
+  function condense(str) {
+    let ret = "";
+    let prevCharIsWhitespace = false;
+    for (let i = 0; i < str.length; i++) {
+      if (isWhitespace(str.charCodeAt(i))) {
+        if (!prevCharIsWhitespace) {
+          ret += " ";
+          prevCharIsWhitespace = true;
+        }
+      } else {
+        ret += str[i];
+        prevCharIsWhitespace = false;
+      }
+    }
+    return ret;
+  }
+  function addNode(node) {
+    (stack[0] || currentRoot).children.push(node);
+  }
+  function getLoc(start, end) {
+    return {
+      start: tokenizer.getPos(start),
+      // @ts-expect-error allow late attachment
+      end: end == null ? end : tokenizer.getPos(end),
+      // @ts-expect-error allow late attachment
+      source: end == null ? end : getSlice(start, end)
+    };
+  }
+  function setLocEnd(loc, end) {
+    loc.end = tokenizer.getPos(end);
+    loc.source = getSlice(loc.start.offset, end);
+  }
+  function dirToAttr(dir) {
+    const attr = {
+      type: 6,
+      name: dir.rawName,
+      nameLoc: getLoc(
+        dir.loc.start.offset,
+        dir.loc.start.offset + dir.rawName.length
+      ),
+      value: void 0,
+      loc: dir.loc
+    };
+    if (dir.exp) {
+      const loc = dir.exp.loc;
+      if (loc.end.offset < dir.loc.end.offset) {
+        loc.start.offset--;
+        loc.start.column--;
+        loc.end.offset++;
+        loc.end.column++;
+      }
+      attr.value = {
+        type: 2,
+        content: dir.exp.content,
+        loc
+      };
+    }
+    return attr;
+  }
+  function createExp(content, isStatic = false, loc, constType = 0, parseMode = 0 /* Normal */) {
+    const exp = createSimpleExpression(content, isStatic, loc, constType);
+    return exp;
+  }
+  function emitError(code, index, message) {
+    currentOptions.onError(
+      createCompilerError(code, getLoc(index, index), void 0, message)
+    );
+  }
+  function reset() {
+    tokenizer.reset();
+    currentOpenTag = null;
+    currentProp = null;
+    currentAttrValue = "";
+    currentAttrStartIndex = -1;
+    currentAttrEndIndex = -1;
+    stack.length = 0;
+  }
+  function baseParse(input, options) {
+    reset();
+    currentInput = input;
+    currentOptions = extend({}, defaultParserOptions);
+    if (options) {
+      let key;
+      for (key in options) {
+        if (options[key] != null) {
+          currentOptions[key] = options[key];
+        }
+      }
+    }
+    {
+      if (!currentOptions.decodeEntities) {
+        throw new Error(
+          `[@vue/compiler-core] decodeEntities option is required in browser builds.`
+        );
+      }
+    }
+    tokenizer.mode = currentOptions.parseMode === "html" ? 1 : currentOptions.parseMode === "sfc" ? 2 : 0;
+    tokenizer.inXML = currentOptions.ns === 1 || currentOptions.ns === 2;
+    const delimiters = options && options.delimiters;
+    if (delimiters) {
+      tokenizer.delimiterOpen = toCharCodes(delimiters[0]);
+      tokenizer.delimiterClose = toCharCodes(delimiters[1]);
+    }
+    const root = currentRoot = createRoot([], input);
+    tokenizer.parse(currentInput);
+    root.loc = getLoc(0, input.length);
+    root.children = condenseWhitespace(root.children);
+    currentRoot = null;
+    return root;
+  }
+
+  function hoistStatic(root, context) {
+    walk(
+      root,
+      context,
+      // Root node is unfortunately non-hoistable due to potential parent
+      // fallthrough attributes.
+      isSingleElementRoot(root, root.children[0])
+    );
+  }
+  function isSingleElementRoot(root, child) {
+    const { children } = root;
+    return children.length === 1 && child.type === 1 && !isSlotOutlet(child);
+  }
+  function walk(node, context, doNotHoistNode = false) {
+    const { children } = node;
+    const originalCount = children.length;
+    let hoistedCount = 0;
+    for (let i = 0; i < children.length; i++) {
+      const child = children[i];
+      if (child.type === 1 && child.tagType === 0) {
+        const constantType = doNotHoistNode ? 0 : getConstantType(child, context);
+        if (constantType > 0) {
+          if (constantType >= 2) {
+            child.codegenNode.patchFlag = -1 + (` /* HOISTED */` );
+            child.codegenNode = context.hoist(child.codegenNode);
+            hoistedCount++;
+            continue;
+          }
+        } else {
+          const codegenNode = child.codegenNode;
+          if (codegenNode.type === 13) {
+            const flag = getPatchFlag(codegenNode);
+            if ((!flag || flag === 512 || flag === 1) && getGeneratedPropsConstantType(child, context) >= 2) {
+              const props = getNodeProps(child);
+              if (props) {
+                codegenNode.props = context.hoist(props);
+              }
+            }
+            if (codegenNode.dynamicProps) {
+              codegenNode.dynamicProps = context.hoist(codegenNode.dynamicProps);
+            }
+          }
+        }
+      }
+      if (child.type === 1) {
+        const isComponent = child.tagType === 1;
+        if (isComponent) {
+          context.scopes.vSlot++;
+        }
+        walk(child, context);
+        if (isComponent) {
+          context.scopes.vSlot--;
+        }
+      } else if (child.type === 11) {
+        walk(child, context, child.children.length === 1);
+      } else if (child.type === 9) {
+        for (let i2 = 0; i2 < child.branches.length; i2++) {
+          walk(
+            child.branches[i2],
+            context,
+            child.branches[i2].children.length === 1
+          );
+        }
+      }
+    }
+    if (hoistedCount && context.transformHoist) {
+      context.transformHoist(children, context, node);
+    }
+    if (hoistedCount && hoistedCount === originalCount && node.type === 1 && node.tagType === 0 && node.codegenNode && node.codegenNode.type === 13 && isArray(node.codegenNode.children)) {
+      const hoisted = context.hoist(
+        createArrayExpression(node.codegenNode.children)
+      );
+      if (context.hmr) {
+        hoisted.content = `[...${hoisted.content}]`;
+      }
+      node.codegenNode.children = hoisted;
+    }
+  }
+  function getConstantType(node, context) {
+    const { constantCache } = context;
+    switch (node.type) {
+      case 1:
+        if (node.tagType !== 0) {
+          return 0;
+        }
+        const cached = constantCache.get(node);
+        if (cached !== void 0) {
+          return cached;
+        }
+        const codegenNode = node.codegenNode;
+        if (codegenNode.type !== 13) {
+          return 0;
+        }
+        if (codegenNode.isBlock && node.tag !== "svg" && node.tag !== "foreignObject") {
+          return 0;
+        }
+        const flag = getPatchFlag(codegenNode);
+        if (!flag) {
+          let returnType2 = 3;
+          const generatedPropsType = getGeneratedPropsConstantType(node, context);
+          if (generatedPropsType === 0) {
+            constantCache.set(node, 0);
+            return 0;
+          }
+          if (generatedPropsType < returnType2) {
+            returnType2 = generatedPropsType;
+          }
+          for (let i = 0; i < node.children.length; i++) {
+            const childType = getConstantType(node.children[i], context);
+            if (childType === 0) {
+              constantCache.set(node, 0);
+              return 0;
+            }
+            if (childType < returnType2) {
+              returnType2 = childType;
+            }
+          }
+          if (returnType2 > 1) {
+            for (let i = 0; i < node.props.length; i++) {
+              const p = node.props[i];
+              if (p.type === 7 && p.name === "bind" && p.exp) {
+                const expType = getConstantType(p.exp, context);
+                if (expType === 0) {
+                  constantCache.set(node, 0);
+                  return 0;
+                }
+                if (expType < returnType2) {
+                  returnType2 = expType;
+                }
+              }
+            }
+          }
+          if (codegenNode.isBlock) {
+            for (let i = 0; i < node.props.length; i++) {
+              const p = node.props[i];
+              if (p.type === 7) {
+                constantCache.set(node, 0);
+                return 0;
+              }
+            }
+            context.removeHelper(OPEN_BLOCK);
+            context.removeHelper(
+              getVNodeBlockHelper(context.inSSR, codegenNode.isComponent)
+            );
+            codegenNode.isBlock = false;
+            context.helper(getVNodeHelper(context.inSSR, codegenNode.isComponent));
+          }
+          constantCache.set(node, returnType2);
+          return returnType2;
+        } else {
+          constantCache.set(node, 0);
+          return 0;
+        }
+      case 2:
+      case 3:
+        return 3;
+      case 9:
+      case 11:
+      case 10:
+        return 0;
+      case 5:
+      case 12:
+        return getConstantType(node.content, context);
+      case 4:
+        return node.constType;
+      case 8:
+        let returnType = 3;
+        for (let i = 0; i < node.children.length; i++) {
+          const child = node.children[i];
+          if (isString(child) || isSymbol(child)) {
+            continue;
+          }
+          const childType = getConstantType(child, context);
+          if (childType === 0) {
+            return 0;
+          } else if (childType < returnType) {
+            returnType = childType;
+          }
+        }
+        return returnType;
+      default:
+        return 0;
+    }
+  }
+  const allowHoistedHelperSet = /* @__PURE__ */ new Set([
+    NORMALIZE_CLASS,
+    NORMALIZE_STYLE,
+    NORMALIZE_PROPS,
+    GUARD_REACTIVE_PROPS
+  ]);
+  function getConstantTypeOfHelperCall(value, context) {
+    if (value.type === 14 && !isString(value.callee) && allowHoistedHelperSet.has(value.callee)) {
+      const arg = value.arguments[0];
+      if (arg.type === 4) {
+        return getConstantType(arg, context);
+      } else if (arg.type === 14) {
+        return getConstantTypeOfHelperCall(arg, context);
+      }
+    }
+    return 0;
+  }
+  function getGeneratedPropsConstantType(node, context) {
+    let returnType = 3;
+    const props = getNodeProps(node);
+    if (props && props.type === 15) {
+      const { properties } = props;
+      for (let i = 0; i < properties.length; i++) {
+        const { key, value } = properties[i];
+        const keyType = getConstantType(key, context);
+        if (keyType === 0) {
+          return keyType;
+        }
+        if (keyType < returnType) {
+          returnType = keyType;
+        }
+        let valueType;
+        if (value.type === 4) {
+          valueType = getConstantType(value, context);
+        } else if (value.type === 14) {
+          valueType = getConstantTypeOfHelperCall(value, context);
+        } else {
+          valueType = 0;
+        }
+        if (valueType === 0) {
+          return valueType;
+        }
+        if (valueType < returnType) {
+          returnType = valueType;
+        }
+      }
+    }
+    return returnType;
+  }
+  function getNodeProps(node) {
+    const codegenNode = node.codegenNode;
+    if (codegenNode.type === 13) {
+      return codegenNode.props;
+    }
+  }
+  function getPatchFlag(node) {
+    const flag = node.patchFlag;
+    return flag ? parseInt(flag, 10) : void 0;
+  }
+
+  function createTransformContext(root, {
+    filename = "",
+    prefixIdentifiers = false,
+    hoistStatic: hoistStatic2 = false,
+    hmr = false,
+    cacheHandlers = false,
+    nodeTransforms = [],
+    directiveTransforms = {},
+    transformHoist = null,
+    isBuiltInComponent = NOOP,
+    isCustomElement = NOOP,
+    expressionPlugins = [],
+    scopeId = null,
+    slotted = true,
+    ssr = false,
+    inSSR = false,
+    ssrCssVars = ``,
+    bindingMetadata = EMPTY_OBJ,
+    inline = false,
+    isTS = false,
+    onError = defaultOnError,
+    onWarn = defaultOnWarn,
+    compatConfig
+  }) {
+    const nameMatch = filename.replace(/\?.*$/, "").match(/([^/\\]+)\.\w+$/);
+    const context = {
+      // options
+      filename,
+      selfName: nameMatch && capitalize(camelize(nameMatch[1])),
+      prefixIdentifiers,
+      hoistStatic: hoistStatic2,
+      hmr,
+      cacheHandlers,
+      nodeTransforms,
+      directiveTransforms,
+      transformHoist,
+      isBuiltInComponent,
+      isCustomElement,
+      expressionPlugins,
+      scopeId,
+      slotted,
+      ssr,
+      inSSR,
+      ssrCssVars,
+      bindingMetadata,
+      inline,
+      isTS,
+      onError,
+      onWarn,
+      compatConfig,
+      // state
+      root,
+      helpers: /* @__PURE__ */ new Map(),
+      components: /* @__PURE__ */ new Set(),
+      directives: /* @__PURE__ */ new Set(),
+      hoists: [],
+      imports: [],
+      constantCache: /* @__PURE__ */ new WeakMap(),
+      temps: 0,
+      cached: 0,
+      identifiers: /* @__PURE__ */ Object.create(null),
+      scopes: {
+        vFor: 0,
+        vSlot: 0,
+        vPre: 0,
+        vOnce: 0
+      },
+      parent: null,
+      grandParent: null,
+      currentNode: root,
+      childIndex: 0,
+      inVOnce: false,
+      // methods
+      helper(name) {
+        const count = context.helpers.get(name) || 0;
+        context.helpers.set(name, count + 1);
+        return name;
+      },
+      removeHelper(name) {
+        const count = context.helpers.get(name);
+        if (count) {
+          const currentCount = count - 1;
+          if (!currentCount) {
+            context.helpers.delete(name);
+          } else {
+            context.helpers.set(name, currentCount);
+          }
+        }
+      },
+      helperString(name) {
+        return `_${helperNameMap[context.helper(name)]}`;
+      },
+      replaceNode(node) {
+        {
+          if (!context.currentNode) {
+            throw new Error(`Node being replaced is already removed.`);
+          }
+          if (!context.parent) {
+            throw new Error(`Cannot replace root node.`);
+          }
+        }
+        context.parent.children[context.childIndex] = context.currentNode = node;
+      },
+      removeNode(node) {
+        if (!context.parent) {
+          throw new Error(`Cannot remove root node.`);
+        }
+        const list = context.parent.children;
+        const removalIndex = node ? list.indexOf(node) : context.currentNode ? context.childIndex : -1;
+        if (removalIndex < 0) {
+          throw new Error(`node being removed is not a child of current parent`);
+        }
+        if (!node || node === context.currentNode) {
+          context.currentNode = null;
+          context.onNodeRemoved();
+        } else {
+          if (context.childIndex > removalIndex) {
+            context.childIndex--;
+            context.onNodeRemoved();
+          }
+        }
+        context.parent.children.splice(removalIndex, 1);
+      },
+      onNodeRemoved: NOOP,
+      addIdentifiers(exp) {
+      },
+      removeIdentifiers(exp) {
+      },
+      hoist(exp) {
+        if (isString(exp))
+          exp = createSimpleExpression(exp);
+        context.hoists.push(exp);
+        const identifier = createSimpleExpression(
+          `_hoisted_${context.hoists.length}`,
+          false,
+          exp.loc,
+          2
+        );
+        identifier.hoisted = exp;
+        return identifier;
+      },
+      cache(exp, isVNode = false) {
+        return createCacheExpression(context.cached++, exp, isVNode);
+      }
+    };
+    {
+      context.filters = /* @__PURE__ */ new Set();
+    }
+    return context;
+  }
+  function transform(root, options) {
+    const context = createTransformContext(root, options);
+    traverseNode(root, context);
+    if (options.hoistStatic) {
+      hoistStatic(root, context);
+    }
+    if (!options.ssr) {
+      createRootCodegen(root, context);
+    }
+    root.helpers = /* @__PURE__ */ new Set([...context.helpers.keys()]);
+    root.components = [...context.components];
+    root.directives = [...context.directives];
+    root.imports = context.imports;
+    root.hoists = context.hoists;
+    root.temps = context.temps;
+    root.cached = context.cached;
+    root.transformed = true;
+    {
+      root.filters = [...context.filters];
+    }
+  }
+  function createRootCodegen(root, context) {
+    const { helper } = context;
+    const { children } = root;
+    if (children.length === 1) {
+      const child = children[0];
+      if (isSingleElementRoot(root, child) && child.codegenNode) {
+        const codegenNode = child.codegenNode;
+        if (codegenNode.type === 13) {
+          convertToBlock(codegenNode, context);
+        }
+        root.codegenNode = codegenNode;
+      } else {
+        root.codegenNode = child;
+      }
+    } else if (children.length > 1) {
+      let patchFlag = 64;
+      let patchFlagText = PatchFlagNames[64];
+      if (children.filter((c) => c.type !== 3).length === 1) {
+        patchFlag |= 2048;
+        patchFlagText += `, ${PatchFlagNames[2048]}`;
+      }
+      root.codegenNode = createVNodeCall(
+        context,
+        helper(FRAGMENT),
+        void 0,
+        root.children,
+        patchFlag + (` /* ${patchFlagText} */` ),
+        void 0,
+        void 0,
+        true,
+        void 0,
+        false
+      );
+    } else ;
+  }
+  function traverseChildren(parent, context) {
+    let i = 0;
+    const nodeRemoved = () => {
+      i--;
+    };
+    for (; i < parent.children.length; i++) {
+      const child = parent.children[i];
+      if (isString(child))
+        continue;
+      context.grandParent = context.parent;
+      context.parent = parent;
+      context.childIndex = i;
+      context.onNodeRemoved = nodeRemoved;
+      traverseNode(child, context);
+    }
+  }
+  function traverseNode(node, context) {
+    context.currentNode = node;
+    const { nodeTransforms } = context;
+    const exitFns = [];
+    for (let i2 = 0; i2 < nodeTransforms.length; i2++) {
+      const onExit = nodeTransforms[i2](node, context);
+      if (onExit) {
+        if (isArray(onExit)) {
+          exitFns.push(...onExit);
+        } else {
+          exitFns.push(onExit);
+        }
+      }
+      if (!context.currentNode) {
+        return;
+      } else {
+        node = context.currentNode;
+      }
+    }
+    switch (node.type) {
+      case 3:
+        if (!context.ssr) {
+          context.helper(CREATE_COMMENT);
+        }
+        break;
+      case 5:
+        if (!context.ssr) {
+          context.helper(TO_DISPLAY_STRING);
+        }
+        break;
+      case 9:
+        for (let i2 = 0; i2 < node.branches.length; i2++) {
+          traverseNode(node.branches[i2], context);
+        }
+        break;
+      case 10:
+      case 11:
+      case 1:
+      case 0:
+        traverseChildren(node, context);
+        break;
+    }
+    context.currentNode = node;
+    let i = exitFns.length;
+    while (i--) {
+      exitFns[i]();
+    }
+  }
+  function createStructuralDirectiveTransform(name, fn) {
+    const matches = isString(name) ? (n) => n === name : (n) => name.test(n);
+    return (node, context) => {
+      if (node.type === 1) {
+        const { props } = node;
+        if (node.tagType === 3 && props.some(isVSlot)) {
+          return;
+        }
+        const exitFns = [];
+        for (let i = 0; i < props.length; i++) {
+          const prop = props[i];
+          if (prop.type === 7 && matches(prop.name)) {
+            props.splice(i, 1);
+            i--;
+            const onExit = fn(node, prop, context);
+            if (onExit)
+              exitFns.push(onExit);
+          }
+        }
+        return exitFns;
+      }
+    };
+  }
+
+  const PURE_ANNOTATION = `/*#__PURE__*/`;
+  const aliasHelper = (s) => `${helperNameMap[s]}: _${helperNameMap[s]}`;
+  function createCodegenContext(ast, {
+    mode = "function",
+    prefixIdentifiers = mode === "module",
+    sourceMap = false,
+    filename = `template.vue.html`,
+    scopeId = null,
+    optimizeImports = false,
+    runtimeGlobalName = `Vue`,
+    runtimeModuleName = `vue`,
+    ssrRuntimeModuleName = "vue/server-renderer",
+    ssr = false,
+    isTS = false,
+    inSSR = false
+  }) {
+    const context = {
+      mode,
+      prefixIdentifiers,
+      sourceMap,
+      filename,
+      scopeId,
+      optimizeImports,
+      runtimeGlobalName,
+      runtimeModuleName,
+      ssrRuntimeModuleName,
+      ssr,
+      isTS,
+      inSSR,
+      source: ast.source,
+      code: ``,
+      column: 1,
+      line: 1,
+      offset: 0,
+      indentLevel: 0,
+      pure: false,
+      map: void 0,
+      helper(key) {
+        return `_${helperNameMap[key]}`;
+      },
+      push(code, newlineIndex = -2 /* None */, node) {
+        context.code += code;
+      },
+      indent() {
+        newline(++context.indentLevel);
+      },
+      deindent(withoutNewLine = false) {
+        if (withoutNewLine) {
+          --context.indentLevel;
+        } else {
+          newline(--context.indentLevel);
+        }
+      },
+      newline() {
+        newline(context.indentLevel);
+      }
+    };
+    function newline(n) {
+      context.push("\n" + `  `.repeat(n), 0 /* Start */);
+    }
+    return context;
+  }
+  function generate(ast, options = {}) {
+    const context = createCodegenContext(ast, options);
+    if (options.onContextCreated)
+      options.onContextCreated(context);
+    const {
+      mode,
+      push,
+      prefixIdentifiers,
+      indent,
+      deindent,
+      newline,
+      scopeId,
+      ssr
+    } = context;
+    const helpers = Array.from(ast.helpers);
+    const hasHelpers = helpers.length > 0;
+    const useWithBlock = !prefixIdentifiers && mode !== "module";
+    const preambleContext = context;
+    {
+      genFunctionPreamble(ast, preambleContext);
+    }
+    const functionName = ssr ? `ssrRender` : `render`;
+    const args = ssr ? ["_ctx", "_push", "_parent", "_attrs"] : ["_ctx", "_cache"];
+    const signature = args.join(", ");
+    {
+      push(`function ${functionName}(${signature}) {`);
+    }
+    indent();
+    if (useWithBlock) {
+      push(`with (_ctx) {`);
+      indent();
+      if (hasHelpers) {
+        push(
+          `const { ${helpers.map(aliasHelper).join(", ")} } = _Vue
+`,
+          -1 /* End */
+        );
+        newline();
+      }
+    }
+    if (ast.components.length) {
+      genAssets(ast.components, "component", context);
+      if (ast.directives.length || ast.temps > 0) {
+        newline();
+      }
+    }
+    if (ast.directives.length) {
+      genAssets(ast.directives, "directive", context);
+      if (ast.temps > 0) {
+        newline();
+      }
+    }
+    if (ast.filters && ast.filters.length) {
+      newline();
+      genAssets(ast.filters, "filter", context);
+      newline();
+    }
+    if (ast.temps > 0) {
+      push(`let `);
+      for (let i = 0; i < ast.temps; i++) {
+        push(`${i > 0 ? `, ` : ``}_temp${i}`);
+      }
+    }
+    if (ast.components.length || ast.directives.length || ast.temps) {
+      push(`
+`, 0 /* Start */);
+      newline();
+    }
+    if (!ssr) {
+      push(`return `);
+    }
+    if (ast.codegenNode) {
+      genNode(ast.codegenNode, context);
+    } else {
+      push(`null`);
+    }
+    if (useWithBlock) {
+      deindent();
+      push(`}`);
+    }
+    deindent();
+    push(`}`);
+    return {
+      ast,
+      code: context.code,
+      preamble: ``,
+      map: context.map ? context.map.toJSON() : void 0
+    };
+  }
+  function genFunctionPreamble(ast, context) {
+    const {
+      ssr,
+      prefixIdentifiers,
+      push,
+      newline,
+      runtimeModuleName,
+      runtimeGlobalName,
+      ssrRuntimeModuleName
+    } = context;
+    const VueBinding = runtimeGlobalName;
+    const helpers = Array.from(ast.helpers);
+    if (helpers.length > 0) {
+      {
+        push(`const _Vue = ${VueBinding}
+`, -1 /* End */);
+        if (ast.hoists.length) {
+          const staticHelpers = [
+            CREATE_VNODE,
+            CREATE_ELEMENT_VNODE,
+            CREATE_COMMENT,
+            CREATE_TEXT,
+            CREATE_STATIC
+          ].filter((helper) => helpers.includes(helper)).map(aliasHelper).join(", ");
+          push(`const { ${staticHelpers} } = _Vue
+`, -1 /* End */);
+        }
+      }
+    }
+    genHoists(ast.hoists, context);
+    newline();
+    push(`return `);
+  }
+  function genAssets(assets, type, { helper, push, newline, isTS }) {
+    const resolver = helper(
+      type === "filter" ? RESOLVE_FILTER : type === "component" ? RESOLVE_COMPONENT : RESOLVE_DIRECTIVE
+    );
+    for (let i = 0; i < assets.length; i++) {
+      let id = assets[i];
+      const maybeSelfReference = id.endsWith("__self");
+      if (maybeSelfReference) {
+        id = id.slice(0, -6);
+      }
+      push(
+        `const ${toValidAssetId(id, type)} = ${resolver}(${JSON.stringify(id)}${maybeSelfReference ? `, true` : ``})${isTS ? `!` : ``}`
+      );
+      if (i < assets.length - 1) {
+        newline();
+      }
+    }
+  }
+  function genHoists(hoists, context) {
+    if (!hoists.length) {
+      return;
+    }
+    context.pure = true;
+    const { push, newline, helper, scopeId, mode } = context;
+    newline();
+    for (let i = 0; i < hoists.length; i++) {
+      const exp = hoists[i];
+      if (exp) {
+        push(
+          `const _hoisted_${i + 1} = ${``}`
+        );
+        genNode(exp, context);
+        newline();
+      }
+    }
+    context.pure = false;
+  }
+  function isText(n) {
+    return isString(n) || n.type === 4 || n.type === 2 || n.type === 5 || n.type === 8;
+  }
+  function genNodeListAsArray(nodes, context) {
+    const multilines = nodes.length > 3 || nodes.some((n) => isArray(n) || !isText(n));
+    context.push(`[`);
+    multilines && context.indent();
+    genNodeList(nodes, context, multilines);
+    multilines && context.deindent();
+    context.push(`]`);
+  }
+  function genNodeList(nodes, context, multilines = false, comma = true) {
+    const { push, newline } = context;
+    for (let i = 0; i < nodes.length; i++) {
+      const node = nodes[i];
+      if (isString(node)) {
+        push(node, -3 /* Unknown */);
+      } else if (isArray(node)) {
+        genNodeListAsArray(node, context);
+      } else {
+        genNode(node, context);
+      }
+      if (i < nodes.length - 1) {
+        if (multilines) {
+          comma && push(",");
+          newline();
+        } else {
+          comma && push(", ");
+        }
+      }
+    }
+  }
+  function genNode(node, context) {
+    if (isString(node)) {
+      context.push(node, -3 /* Unknown */);
+      return;
+    }
+    if (isSymbol(node)) {
+      context.push(context.helper(node));
+      return;
+    }
+    switch (node.type) {
+      case 1:
+      case 9:
+      case 11:
+        assert(
+          node.codegenNode != null,
+          `Codegen node is missing for element/if/for node. Apply appropriate transforms first.`
+        );
+        genNode(node.codegenNode, context);
+        break;
+      case 2:
+        genText(node, context);
+        break;
+      case 4:
+        genExpression(node, context);
+        break;
+      case 5:
+        genInterpolation(node, context);
+        break;
+      case 12:
+        genNode(node.codegenNode, context);
+        break;
+      case 8:
+        genCompoundExpression(node, context);
+        break;
+      case 3:
+        genComment(node, context);
+        break;
+      case 13:
+        genVNodeCall(node, context);
+        break;
+      case 14:
+        genCallExpression(node, context);
+        break;
+      case 15:
+        genObjectExpression(node, context);
+        break;
+      case 17:
+        genArrayExpression(node, context);
+        break;
+      case 18:
+        genFunctionExpression(node, context);
+        break;
+      case 19:
+        genConditionalExpression(node, context);
+        break;
+      case 20:
+        genCacheExpression(node, context);
+        break;
+      case 21:
+        genNodeList(node.body, context, true, false);
+        break;
+      case 22:
+        break;
+      case 23:
+        break;
+      case 24:
+        break;
+      case 25:
+        break;
+      case 26:
+        break;
+      case 10:
+        break;
+      default:
+        {
+          assert(false, `unhandled codegen node type: ${node.type}`);
+          const exhaustiveCheck = node;
+          return exhaustiveCheck;
+        }
+    }
+  }
+  function genText(node, context) {
+    context.push(JSON.stringify(node.content), -3 /* Unknown */, node);
+  }
+  function genExpression(node, context) {
+    const { content, isStatic } = node;
+    context.push(
+      isStatic ? JSON.stringify(content) : content,
+      -3 /* Unknown */,
+      node
+    );
+  }
+  function genInterpolation(node, context) {
+    const { push, helper, pure } = context;
+    if (pure)
+      push(PURE_ANNOTATION);
+    push(`${helper(TO_DISPLAY_STRING)}(`);
+    genNode(node.content, context);
+    push(`)`);
+  }
+  function genCompoundExpression(node, context) {
+    for (let i = 0; i < node.children.length; i++) {
+      const child = node.children[i];
+      if (isString(child)) {
+        context.push(child, -3 /* Unknown */);
+      } else {
+        genNode(child, context);
+      }
+    }
+  }
+  function genExpressionAsPropertyKey(node, context) {
+    const { push } = context;
+    if (node.type === 8) {
+      push(`[`);
+      genCompoundExpression(node, context);
+      push(`]`);
+    } else if (node.isStatic) {
+      const text = isSimpleIdentifier(node.content) ? node.content : JSON.stringify(node.content);
+      push(text, -2 /* None */, node);
+    } else {
+      push(`[${node.content}]`, -3 /* Unknown */, node);
+    }
+  }
+  function genComment(node, context) {
+    const { push, helper, pure } = context;
+    if (pure) {
+      push(PURE_ANNOTATION);
+    }
+    push(
+      `${helper(CREATE_COMMENT)}(${JSON.stringify(node.content)})`,
+      -3 /* Unknown */,
+      node
+    );
+  }
+  function genVNodeCall(node, context) {
+    const { push, helper, pure } = context;
+    const {
+      tag,
+      props,
+      children,
+      patchFlag,
+      dynamicProps,
+      directives,
+      isBlock,
+      disableTracking,
+      isComponent
+    } = node;
+    if (directives) {
+      push(helper(WITH_DIRECTIVES) + `(`);
+    }
+    if (isBlock) {
+      push(`(${helper(OPEN_BLOCK)}(${disableTracking ? `true` : ``}), `);
+    }
+    if (pure) {
+      push(PURE_ANNOTATION);
+    }
+    const callHelper = isBlock ? getVNodeBlockHelper(context.inSSR, isComponent) : getVNodeHelper(context.inSSR, isComponent);
+    push(helper(callHelper) + `(`, -2 /* None */, node);
+    genNodeList(
+      genNullableArgs([tag, props, children, patchFlag, dynamicProps]),
+      context
+    );
+    push(`)`);
+    if (isBlock) {
+      push(`)`);
+    }
+    if (directives) {
+      push(`, `);
+      genNode(directives, context);
+      push(`)`);
+    }
+  }
+  function genNullableArgs(args) {
+    let i = args.length;
+    while (i--) {
+      if (args[i] != null)
+        break;
+    }
+    return args.slice(0, i + 1).map((arg) => arg || `null`);
+  }
+  function genCallExpression(node, context) {
+    const { push, helper, pure } = context;
+    const callee = isString(node.callee) ? node.callee : helper(node.callee);
+    if (pure) {
+      push(PURE_ANNOTATION);
+    }
+    push(callee + `(`, -2 /* None */, node);
+    genNodeList(node.arguments, context);
+    push(`)`);
+  }
+  function genObjectExpression(node, context) {
+    const { push, indent, deindent, newline } = context;
+    const { properties } = node;
+    if (!properties.length) {
+      push(`{}`, -2 /* None */, node);
+      return;
+    }
+    const multilines = properties.length > 1 || properties.some((p) => p.value.type !== 4);
+    push(multilines ? `{` : `{ `);
+    multilines && indent();
+    for (let i = 0; i < properties.length; i++) {
+      const { key, value } = properties[i];
+      genExpressionAsPropertyKey(key, context);
+      push(`: `);
+      genNode(value, context);
+      if (i < properties.length - 1) {
+        push(`,`);
+        newline();
+      }
+    }
+    multilines && deindent();
+    push(multilines ? `}` : ` }`);
+  }
+  function genArrayExpression(node, context) {
+    genNodeListAsArray(node.elements, context);
+  }
+  function genFunctionExpression(node, context) {
+    const { push, indent, deindent } = context;
+    const { params, returns, body, newline, isSlot } = node;
+    if (isSlot) {
+      push(`_${helperNameMap[WITH_CTX]}(`);
+    }
+    push(`(`, -2 /* None */, node);
+    if (isArray(params)) {
+      genNodeList(params, context);
+    } else if (params) {
+      genNode(params, context);
+    }
+    push(`) => `);
+    if (newline || body) {
+      push(`{`);
+      indent();
+    }
+    if (returns) {
+      if (newline) {
+        push(`return `);
+      }
+      if (isArray(returns)) {
+        genNodeListAsArray(returns, context);
+      } else {
+        genNode(returns, context);
+      }
+    } else if (body) {
+      genNode(body, context);
+    }
+    if (newline || body) {
+      deindent();
+      push(`}`);
+    }
+    if (isSlot) {
+      if (node.isNonScopedSlot) {
+        push(`, undefined, true`);
+      }
+      push(`)`);
+    }
+  }
+  function genConditionalExpression(node, context) {
+    const { test, consequent, alternate, newline: needNewline } = node;
+    const { push, indent, deindent, newline } = context;
+    if (test.type === 4) {
+      const needsParens = !isSimpleIdentifier(test.content);
+      needsParens && push(`(`);
+      genExpression(test, context);
+      needsParens && push(`)`);
+    } else {
+      push(`(`);
+      genNode(test, context);
+      push(`)`);
+    }
+    needNewline && indent();
+    context.indentLevel++;
+    needNewline || push(` `);
+    push(`? `);
+    genNode(consequent, context);
+    context.indentLevel--;
+    needNewline && newline();
+    needNewline || push(` `);
+    push(`: `);
+    const isNested = alternate.type === 19;
+    if (!isNested) {
+      context.indentLevel++;
+    }
+    genNode(alternate, context);
+    if (!isNested) {
+      context.indentLevel--;
+    }
+    needNewline && deindent(
+      true
+      /* without newline */
+    );
+  }
+  function genCacheExpression(node, context) {
+    const { push, helper, indent, deindent, newline } = context;
+    push(`_cache[${node.index}] || (`);
+    if (node.isVNode) {
+      indent();
+      push(`${helper(SET_BLOCK_TRACKING)}(-1),`);
+      newline();
+    }
+    push(`_cache[${node.index}] = `);
+    genNode(node.value, context);
+    if (node.isVNode) {
+      push(`,`);
+      newline();
+      push(`${helper(SET_BLOCK_TRACKING)}(1),`);
+      newline();
+      push(`_cache[${node.index}]`);
+      deindent();
+    }
+    push(`)`);
+  }
+
+  const prohibitedKeywordRE = new RegExp(
+    "\\b" + "arguments,await,break,case,catch,class,const,continue,debugger,default,delete,do,else,export,extends,finally,for,function,if,import,let,new,return,super,switch,throw,try,var,void,while,with,yield".split(",").join("\\b|\\b") + "\\b"
+  );
+  const stripStringRE = /'(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*"|`(?:[^`\\]|\\.)*\$\{|\}(?:[^`\\]|\\.)*`|`(?:[^`\\]|\\.)*`/g;
+  function validateBrowserExpression(node, context, asParams = false, asRawStatements = false) {
+    const exp = node.content;
+    if (!exp.trim()) {
+      return;
+    }
+    try {
+      new Function(
+        asRawStatements ? ` ${exp} ` : `return ${asParams ? `(${exp}) => {}` : `(${exp})`}`
+      );
+    } catch (e) {
+      let message = e.message;
+      const keywordMatch = exp.replace(stripStringRE, "").match(prohibitedKeywordRE);
+      if (keywordMatch) {
+        message = `avoid using JavaScript keyword as property name: "${keywordMatch[0]}"`;
+      }
+      context.onError(
+        createCompilerError(
+          45,
+          node.loc,
+          void 0,
+          message
+        )
+      );
+    }
+  }
+
+  const transformExpression = (node, context) => {
+    if (node.type === 5) {
+      node.content = processExpression(
+        node.content,
+        context
+      );
+    } else if (node.type === 1) {
+      for (let i = 0; i < node.props.length; i++) {
+        const dir = node.props[i];
+        if (dir.type === 7 && dir.name !== "for") {
+          const exp = dir.exp;
+          const arg = dir.arg;
+          if (exp && exp.type === 4 && !(dir.name === "on" && arg)) {
+            dir.exp = processExpression(
+              exp,
+              context,
+              // slot args must be processed as function params
+              dir.name === "slot"
+            );
+          }
+          if (arg && arg.type === 4 && !arg.isStatic) {
+            dir.arg = processExpression(arg, context);
+          }
+        }
+      }
+    }
+  };
+  function processExpression(node, context, asParams = false, asRawStatements = false, localVars = Object.create(context.identifiers)) {
+    {
+      {
+        validateBrowserExpression(node, context, asParams, asRawStatements);
+      }
+      return node;
+    }
+  }
+  function stringifyExpression(exp) {
+    if (isString(exp)) {
+      return exp;
+    } else if (exp.type === 4) {
+      return exp.content;
+    } else {
+      return exp.children.map(stringifyExpression).join("");
+    }
+  }
+
+  const transformIf = createStructuralDirectiveTransform(
+    /^(if|else|else-if)$/,
+    (node, dir, context) => {
+      return processIf(node, dir, context, (ifNode, branch, isRoot) => {
+        const siblings = context.parent.children;
+        let i = siblings.indexOf(ifNode);
+        let key = 0;
+        while (i-- >= 0) {
+          const sibling = siblings[i];
+          if (sibling && sibling.type === 9) {
+            key += sibling.branches.length;
+          }
+        }
+        return () => {
+          if (isRoot) {
+            ifNode.codegenNode = createCodegenNodeForBranch(
+              branch,
+              key,
+              context
+            );
+          } else {
+            const parentCondition = getParentCondition(ifNode.codegenNode);
+            parentCondition.alternate = createCodegenNodeForBranch(
+              branch,
+              key + ifNode.branches.length - 1,
+              context
+            );
+          }
+        };
+      });
+    }
+  );
+  function processIf(node, dir, context, processCodegen) {
+    if (dir.name !== "else" && (!dir.exp || !dir.exp.content.trim())) {
+      const loc = dir.exp ? dir.exp.loc : node.loc;
+      context.onError(
+        createCompilerError(28, dir.loc)
+      );
+      dir.exp = createSimpleExpression(`true`, false, loc);
+    }
+    if (dir.exp) {
+      validateBrowserExpression(dir.exp, context);
+    }
+    if (dir.name === "if") {
+      const branch = createIfBranch(node, dir);
+      const ifNode = {
+        type: 9,
+        loc: node.loc,
+        branches: [branch]
+      };
+      context.replaceNode(ifNode);
+      if (processCodegen) {
+        return processCodegen(ifNode, branch, true);
+      }
+    } else {
+      const siblings = context.parent.children;
+      const comments = [];
+      let i = siblings.indexOf(node);
+      while (i-- >= -1) {
+        const sibling = siblings[i];
+        if (sibling && sibling.type === 3) {
+          context.removeNode(sibling);
+          comments.unshift(sibling);
+          continue;
+        }
+        if (sibling && sibling.type === 2 && !sibling.content.trim().length) {
+          context.removeNode(sibling);
+          continue;
+        }
+        if (sibling && sibling.type === 9) {
+          if (dir.name === "else-if" && sibling.branches[sibling.branches.length - 1].condition === void 0) {
+            context.onError(
+              createCompilerError(30, node.loc)
+            );
+          }
+          context.removeNode();
+          const branch = createIfBranch(node, dir);
+          if (comments.length && // #3619 ignore comments if the v-if is direct child of <transition>
+          !(context.parent && context.parent.type === 1 && (context.parent.tag === "transition" || context.parent.tag === "Transition"))) {
+            branch.children = [...comments, ...branch.children];
+          }
+          {
+            const key = branch.userKey;
+            if (key) {
+              sibling.branches.forEach(({ userKey }) => {
+                if (isSameKey(userKey, key)) {
+                  context.onError(
+                    createCompilerError(
+                      29,
+                      branch.userKey.loc
+                    )
+                  );
+                }
+              });
+            }
+          }
+          sibling.branches.push(branch);
+          const onExit = processCodegen && processCodegen(sibling, branch, false);
+          traverseNode(branch, context);
+          if (onExit)
+            onExit();
+          context.currentNode = null;
+        } else {
+          context.onError(
+            createCompilerError(30, node.loc)
+          );
+        }
+        break;
+      }
+    }
+  }
+  function createIfBranch(node, dir) {
+    const isTemplateIf = node.tagType === 3;
+    return {
+      type: 10,
+      loc: node.loc,
+      condition: dir.name === "else" ? void 0 : dir.exp,
+      children: isTemplateIf && !findDir(node, "for") ? node.children : [node],
+      userKey: findProp(node, `key`),
+      isTemplateIf
+    };
+  }
+  function createCodegenNodeForBranch(branch, keyIndex, context) {
+    if (branch.condition) {
+      return createConditionalExpression(
+        branch.condition,
+        createChildrenCodegenNode(branch, keyIndex, context),
+        // make sure to pass in asBlock: true so that the comment node call
+        // closes the current block.
+        createCallExpression(context.helper(CREATE_COMMENT), [
+          '"v-if"' ,
+          "true"
+        ])
+      );
+    } else {
+      return createChildrenCodegenNode(branch, keyIndex, context);
+    }
+  }
+  function createChildrenCodegenNode(branch, keyIndex, context) {
+    const { helper } = context;
+    const keyProperty = createObjectProperty(
+      `key`,
+      createSimpleExpression(
+        `${keyIndex}`,
+        false,
+        locStub,
+        2
+      )
+    );
+    const { children } = branch;
+    const firstChild = children[0];
+    const needFragmentWrapper = children.length !== 1 || firstChild.type !== 1;
+    if (needFragmentWrapper) {
+      if (children.length === 1 && firstChild.type === 11) {
+        const vnodeCall = firstChild.codegenNode;
+        injectProp(vnodeCall, keyProperty, context);
+        return vnodeCall;
+      } else {
+        let patchFlag = 64;
+        let patchFlagText = PatchFlagNames[64];
+        if (!branch.isTemplateIf && children.filter((c) => c.type !== 3).length === 1) {
+          patchFlag |= 2048;
+          patchFlagText += `, ${PatchFlagNames[2048]}`;
+        }
+        return createVNodeCall(
+          context,
+          helper(FRAGMENT),
+          createObjectExpression([keyProperty]),
+          children,
+          patchFlag + (` /* ${patchFlagText} */` ),
+          void 0,
+          void 0,
+          true,
+          false,
+          false,
+          branch.loc
+        );
+      }
+    } else {
+      const ret = firstChild.codegenNode;
+      const vnodeCall = getMemoedVNodeCall(ret);
+      if (vnodeCall.type === 13) {
+        convertToBlock(vnodeCall, context);
+      }
+      injectProp(vnodeCall, keyProperty, context);
+      return ret;
+    }
+  }
+  function isSameKey(a, b) {
+    if (!a || a.type !== b.type) {
+      return false;
+    }
+    if (a.type === 6) {
+      if (a.value.content !== b.value.content) {
+        return false;
+      }
+    } else {
+      const exp = a.exp;
+      const branchExp = b.exp;
+      if (exp.type !== branchExp.type) {
+        return false;
+      }
+      if (exp.type !== 4 || exp.isStatic !== branchExp.isStatic || exp.content !== branchExp.content) {
+        return false;
+      }
+    }
+    return true;
+  }
+  function getParentCondition(node) {
+    while (true) {
+      if (node.type === 19) {
+        if (node.alternate.type === 19) {
+          node = node.alternate;
+        } else {
+          return node;
+        }
+      } else if (node.type === 20) {
+        node = node.value;
+      }
+    }
+  }
+
+  const transformFor = createStructuralDirectiveTransform(
+    "for",
+    (node, dir, context) => {
+      const { helper, removeHelper } = context;
+      return processFor(node, dir, context, (forNode) => {
+        const renderExp = createCallExpression(helper(RENDER_LIST), [
+          forNode.source
+        ]);
+        const isTemplate = isTemplateNode(node);
+        const memo = findDir(node, "memo");
+        const keyProp = findProp(node, `key`);
+        const keyExp = keyProp && (keyProp.type === 6 ? createSimpleExpression(keyProp.value.content, true) : keyProp.exp);
+        const keyProperty = keyProp ? createObjectProperty(`key`, keyExp) : null;
+        const isStableFragment = forNode.source.type === 4 && forNode.source.constType > 0;
+        const fragmentFlag = isStableFragment ? 64 : keyProp ? 128 : 256;
+        forNode.codegenNode = createVNodeCall(
+          context,
+          helper(FRAGMENT),
+          void 0,
+          renderExp,
+          fragmentFlag + (` /* ${PatchFlagNames[fragmentFlag]} */` ),
+          void 0,
+          void 0,
+          true,
+          !isStableFragment,
+          false,
+          node.loc
+        );
+        return () => {
+          let childBlock;
+          const { children } = forNode;
+          if (isTemplate) {
+            node.children.some((c) => {
+              if (c.type === 1) {
+                const key = findProp(c, "key");
+                if (key) {
+                  context.onError(
+                    createCompilerError(
+                      33,
+                      key.loc
+                    )
+                  );
+                  return true;
+                }
+              }
+            });
+          }
+          const needFragmentWrapper = children.length !== 1 || children[0].type !== 1;
+          const slotOutlet = isSlotOutlet(node) ? node : isTemplate && node.children.length === 1 && isSlotOutlet(node.children[0]) ? node.children[0] : null;
+          if (slotOutlet) {
+            childBlock = slotOutlet.codegenNode;
+            if (isTemplate && keyProperty) {
+              injectProp(childBlock, keyProperty, context);
+            }
+          } else if (needFragmentWrapper) {
+            childBlock = createVNodeCall(
+              context,
+              helper(FRAGMENT),
+              keyProperty ? createObjectExpression([keyProperty]) : void 0,
+              node.children,
+              64 + (` /* ${PatchFlagNames[64]} */` ),
+              void 0,
+              void 0,
+              true,
+              void 0,
+              false
+            );
+          } else {
+            childBlock = children[0].codegenNode;
+            if (isTemplate && keyProperty) {
+              injectProp(childBlock, keyProperty, context);
+            }
+            if (childBlock.isBlock !== !isStableFragment) {
+              if (childBlock.isBlock) {
+                removeHelper(OPEN_BLOCK);
+                removeHelper(
+                  getVNodeBlockHelper(context.inSSR, childBlock.isComponent)
+                );
+              } else {
+                removeHelper(
+                  getVNodeHelper(context.inSSR, childBlock.isComponent)
+                );
+              }
+            }
+            childBlock.isBlock = !isStableFragment;
+            if (childBlock.isBlock) {
+              helper(OPEN_BLOCK);
+              helper(getVNodeBlockHelper(context.inSSR, childBlock.isComponent));
+            } else {
+              helper(getVNodeHelper(context.inSSR, childBlock.isComponent));
+            }
+          }
+          if (memo) {
+            const loop = createFunctionExpression(
+              createForLoopParams(forNode.parseResult, [
+                createSimpleExpression(`_cached`)
+              ])
+            );
+            loop.body = createBlockStatement([
+              createCompoundExpression([`const _memo = (`, memo.exp, `)`]),
+              createCompoundExpression([
+                `if (_cached`,
+                ...keyExp ? [` && _cached.key === `, keyExp] : [],
+                ` && ${context.helperString(
+                IS_MEMO_SAME
+              )}(_cached, _memo)) return _cached`
+              ]),
+              createCompoundExpression([`const _item = `, childBlock]),
+              createSimpleExpression(`_item.memo = _memo`),
+              createSimpleExpression(`return _item`)
+            ]);
+            renderExp.arguments.push(
+              loop,
+              createSimpleExpression(`_cache`),
+              createSimpleExpression(String(context.cached++))
+            );
+          } else {
+            renderExp.arguments.push(
+              createFunctionExpression(
+                createForLoopParams(forNode.parseResult),
+                childBlock,
+                true
+              )
+            );
+          }
+        };
+      });
+    }
+  );
+  function processFor(node, dir, context, processCodegen) {
+    if (!dir.exp) {
+      context.onError(
+        createCompilerError(31, dir.loc)
+      );
+      return;
+    }
+    const parseResult = dir.forParseResult;
+    if (!parseResult) {
+      context.onError(
+        createCompilerError(32, dir.loc)
+      );
+      return;
+    }
+    finalizeForParseResult(parseResult, context);
+    const { addIdentifiers, removeIdentifiers, scopes } = context;
+    const { source, value, key, index } = parseResult;
+    const forNode = {
+      type: 11,
+      loc: dir.loc,
+      source,
+      valueAlias: value,
+      keyAlias: key,
+      objectIndexAlias: index,
+      parseResult,
+      children: isTemplateNode(node) ? node.children : [node]
+    };
+    context.replaceNode(forNode);
+    scopes.vFor++;
+    const onExit = processCodegen && processCodegen(forNode);
+    return () => {
+      scopes.vFor--;
+      if (onExit)
+        onExit();
+    };
+  }
+  function finalizeForParseResult(result, context) {
+    if (result.finalized)
+      return;
+    {
+      validateBrowserExpression(result.source, context);
+      if (result.key) {
+        validateBrowserExpression(
+          result.key,
+          context,
+          true
+        );
+      }
+      if (result.index) {
+        validateBrowserExpression(
+          result.index,
+          context,
+          true
+        );
+      }
+      if (result.value) {
+        validateBrowserExpression(
+          result.value,
+          context,
+          true
+        );
+      }
+    }
+    result.finalized = true;
+  }
+  function createForLoopParams({ value, key, index }, memoArgs = []) {
+    return createParamsList([value, key, index, ...memoArgs]);
+  }
+  function createParamsList(args) {
+    let i = args.length;
+    while (i--) {
+      if (args[i])
+        break;
+    }
+    return args.slice(0, i + 1).map((arg, i2) => arg || createSimpleExpression(`_`.repeat(i2 + 1), false));
+  }
+
+  const defaultFallback = createSimpleExpression(`undefined`, false);
+  const trackSlotScopes = (node, context) => {
+    if (node.type === 1 && (node.tagType === 1 || node.tagType === 3)) {
+      const vSlot = findDir(node, "slot");
+      if (vSlot) {
+        vSlot.exp;
+        context.scopes.vSlot++;
+        return () => {
+          context.scopes.vSlot--;
+        };
+      }
+    }
+  };
+  const trackVForSlotScopes = (node, context) => {
+    let vFor;
+    if (isTemplateNode(node) && node.props.some(isVSlot) && (vFor = findDir(node, "for"))) {
+      const result = vFor.forParseResult;
+      if (result) {
+        finalizeForParseResult(result, context);
+        const { value, key, index } = result;
+        const { addIdentifiers, removeIdentifiers } = context;
+        value && addIdentifiers(value);
+        key && addIdentifiers(key);
+        index && addIdentifiers(index);
+        return () => {
+          value && removeIdentifiers(value);
+          key && removeIdentifiers(key);
+          index && removeIdentifiers(index);
+        };
+      }
+    }
+  };
+  const buildClientSlotFn = (props, _vForExp, children, loc) => createFunctionExpression(
+    props,
+    children,
+    false,
+    true,
+    children.length ? children[0].loc : loc
+  );
+  function buildSlots(node, context, buildSlotFn = buildClientSlotFn) {
+    context.helper(WITH_CTX);
+    const { children, loc } = node;
+    const slotsProperties = [];
+    const dynamicSlots = [];
+    let hasDynamicSlots = context.scopes.vSlot > 0 || context.scopes.vFor > 0;
+    const onComponentSlot = findDir(node, "slot", true);
+    if (onComponentSlot) {
+      const { arg, exp } = onComponentSlot;
+      if (arg && !isStaticExp(arg)) {
+        hasDynamicSlots = true;
+      }
+      slotsProperties.push(
+        createObjectProperty(
+          arg || createSimpleExpression("default", true),
+          buildSlotFn(exp, void 0, children, loc)
+        )
+      );
+    }
+    let hasTemplateSlots = false;
+    let hasNamedDefaultSlot = false;
+    const implicitDefaultChildren = [];
+    const seenSlotNames = /* @__PURE__ */ new Set();
+    let conditionalBranchIndex = 0;
+    for (let i = 0; i < children.length; i++) {
+      const slotElement = children[i];
+      let slotDir;
+      if (!isTemplateNode(slotElement) || !(slotDir = findDir(slotElement, "slot", true))) {
+        if (slotElement.type !== 3) {
+          implicitDefaultChildren.push(slotElement);
+        }
+        continue;
+      }
+      if (onComponentSlot) {
+        context.onError(
+          createCompilerError(37, slotDir.loc)
+        );
+        break;
+      }
+      hasTemplateSlots = true;
+      const { children: slotChildren, loc: slotLoc } = slotElement;
+      const {
+        arg: slotName = createSimpleExpression(`default`, true),
+        exp: slotProps,
+        loc: dirLoc
+      } = slotDir;
+      let staticSlotName;
+      if (isStaticExp(slotName)) {
+        staticSlotName = slotName ? slotName.content : `default`;
+      } else {
+        hasDynamicSlots = true;
+      }
+      const vFor = findDir(slotElement, "for");
+      const slotFunction = buildSlotFn(slotProps, vFor, slotChildren, slotLoc);
+      let vIf;
+      let vElse;
+      if (vIf = findDir(slotElement, "if")) {
+        hasDynamicSlots = true;
+        dynamicSlots.push(
+          createConditionalExpression(
+            vIf.exp,
+            buildDynamicSlot(slotName, slotFunction, conditionalBranchIndex++),
+            defaultFallback
+          )
+        );
+      } else if (vElse = findDir(
+        slotElement,
+        /^else(-if)?$/,
+        true
+        /* allowEmpty */
+      )) {
+        let j = i;
+        let prev;
+        while (j--) {
+          prev = children[j];
+          if (prev.type !== 3) {
+            break;
+          }
+        }
+        if (prev && isTemplateNode(prev) && findDir(prev, "if")) {
+          children.splice(i, 1);
+          i--;
+          let conditional = dynamicSlots[dynamicSlots.length - 1];
+          while (conditional.alternate.type === 19) {
+            conditional = conditional.alternate;
+          }
+          conditional.alternate = vElse.exp ? createConditionalExpression(
+            vElse.exp,
+            buildDynamicSlot(
+              slotName,
+              slotFunction,
+              conditionalBranchIndex++
+            ),
+            defaultFallback
+          ) : buildDynamicSlot(slotName, slotFunction, conditionalBranchIndex++);
+        } else {
+          context.onError(
+            createCompilerError(30, vElse.loc)
+          );
+        }
+      } else if (vFor) {
+        hasDynamicSlots = true;
+        const parseResult = vFor.forParseResult;
+        if (parseResult) {
+          finalizeForParseResult(parseResult, context);
+          dynamicSlots.push(
+            createCallExpression(context.helper(RENDER_LIST), [
+              parseResult.source,
+              createFunctionExpression(
+                createForLoopParams(parseResult),
+                buildDynamicSlot(slotName, slotFunction),
+                true
+              )
+            ])
+          );
+        } else {
+          context.onError(
+            createCompilerError(
+              32,
+              vFor.loc
+            )
+          );
+        }
+      } else {
+        if (staticSlotName) {
+          if (seenSlotNames.has(staticSlotName)) {
+            context.onError(
+              createCompilerError(
+                38,
+                dirLoc
+              )
+            );
+            continue;
+          }
+          seenSlotNames.add(staticSlotName);
+          if (staticSlotName === "default") {
+            hasNamedDefaultSlot = true;
+          }
+        }
+        slotsProperties.push(createObjectProperty(slotName, slotFunction));
+      }
+    }
+    if (!onComponentSlot) {
+      const buildDefaultSlotProperty = (props, children2) => {
+        const fn = buildSlotFn(props, void 0, children2, loc);
+        if (context.compatConfig) {
+          fn.isNonScopedSlot = true;
+        }
+        return createObjectProperty(`default`, fn);
+      };
+      if (!hasTemplateSlots) {
+        slotsProperties.push(buildDefaultSlotProperty(void 0, children));
+      } else if (implicitDefaultChildren.length && // #3766
+      // with whitespace: 'preserve', whitespaces between slots will end up in
+      // implicitDefaultChildren. Ignore if all implicit children are whitespaces.
+      implicitDefaultChildren.some((node2) => isNonWhitespaceContent(node2))) {
+        if (hasNamedDefaultSlot) {
+          context.onError(
+            createCompilerError(
+              39,
+              implicitDefaultChildren[0].loc
+            )
+          );
+        } else {
+          slotsProperties.push(
+            buildDefaultSlotProperty(void 0, implicitDefaultChildren)
+          );
+        }
+      }
+    }
+    const slotFlag = hasDynamicSlots ? 2 : hasForwardedSlots(node.children) ? 3 : 1;
+    let slots = createObjectExpression(
+      slotsProperties.concat(
+        createObjectProperty(
+          `_`,
+          // 2 = compiled but dynamic = can skip normalization, but must run diff
+          // 1 = compiled and static = can skip normalization AND diff as optimized
+          createSimpleExpression(
+            slotFlag + (` /* ${slotFlagsText[slotFlag]} */` ),
+            false
+          )
+        )
+      ),
+      loc
+    );
+    if (dynamicSlots.length) {
+      slots = createCallExpression(context.helper(CREATE_SLOTS), [
+        slots,
+        createArrayExpression(dynamicSlots)
+      ]);
+    }
+    return {
+      slots,
+      hasDynamicSlots
+    };
+  }
+  function buildDynamicSlot(name, fn, index) {
+    const props = [
+      createObjectProperty(`name`, name),
+      createObjectProperty(`fn`, fn)
+    ];
+    if (index != null) {
+      props.push(
+        createObjectProperty(`key`, createSimpleExpression(String(index), true))
+      );
+    }
+    return createObjectExpression(props);
+  }
+  function hasForwardedSlots(children) {
+    for (let i = 0; i < children.length; i++) {
+      const child = children[i];
+      switch (child.type) {
+        case 1:
+          if (child.tagType === 2 || hasForwardedSlots(child.children)) {
+            return true;
+          }
+          break;
+        case 9:
+          if (hasForwardedSlots(child.branches))
+            return true;
+          break;
+        case 10:
+        case 11:
+          if (hasForwardedSlots(child.children))
+            return true;
+          break;
+      }
+    }
+    return false;
+  }
+  function isNonWhitespaceContent(node) {
+    if (node.type !== 2 && node.type !== 12)
+      return true;
+    return node.type === 2 ? !!node.content.trim() : isNonWhitespaceContent(node.content);
+  }
+
+  const directiveImportMap = /* @__PURE__ */ new WeakMap();
+  const transformElement = (node, context) => {
+    return function postTransformElement() {
+      node = context.currentNode;
+      if (!(node.type === 1 && (node.tagType === 0 || node.tagType === 1))) {
+        return;
+      }
+      const { tag, props } = node;
+      const isComponent = node.tagType === 1;
+      let vnodeTag = isComponent ? resolveComponentType(node, context) : `"${tag}"`;
+      const isDynamicComponent = isObject(vnodeTag) && vnodeTag.callee === RESOLVE_DYNAMIC_COMPONENT;
+      let vnodeProps;
+      let vnodeChildren;
+      let vnodePatchFlag;
+      let patchFlag = 0;
+      let vnodeDynamicProps;
+      let dynamicPropNames;
+      let vnodeDirectives;
+      let shouldUseBlock = (
+        // dynamic component may resolve to plain elements
+        isDynamicComponent || vnodeTag === TELEPORT || vnodeTag === SUSPENSE || !isComponent && // <svg> and <foreignObject> must be forced into blocks so that block
+        // updates inside get proper isSVG flag at runtime. (#639, #643)
+        // This is technically web-specific, but splitting the logic out of core
+        // leads to too much unnecessary complexity.
+        (tag === "svg" || tag === "foreignObject")
+      );
+      if (props.length > 0) {
+        const propsBuildResult = buildProps(
+          node,
+          context,
+          void 0,
+          isComponent,
+          isDynamicComponent
+        );
+        vnodeProps = propsBuildResult.props;
+        patchFlag = propsBuildResult.patchFlag;
+        dynamicPropNames = propsBuildResult.dynamicPropNames;
+        const directives = propsBuildResult.directives;
+        vnodeDirectives = directives && directives.length ? createArrayExpression(
+          directives.map((dir) => buildDirectiveArgs(dir, context))
+        ) : void 0;
+        if (propsBuildResult.shouldUseBlock) {
+          shouldUseBlock = true;
+        }
+      }
+      if (node.children.length > 0) {
+        if (vnodeTag === KEEP_ALIVE) {
+          shouldUseBlock = true;
+          patchFlag |= 1024;
+          if (node.children.length > 1) {
+            context.onError(
+              createCompilerError(46, {
+                start: node.children[0].loc.start,
+                end: node.children[node.children.length - 1].loc.end,
+                source: ""
+              })
+            );
+          }
+        }
+        const shouldBuildAsSlots = isComponent && // Teleport is not a real component and has dedicated runtime handling
+        vnodeTag !== TELEPORT && // explained above.
+        vnodeTag !== KEEP_ALIVE;
+        if (shouldBuildAsSlots) {
+          const { slots, hasDynamicSlots } = buildSlots(node, context);
+          vnodeChildren = slots;
+          if (hasDynamicSlots) {
+            patchFlag |= 1024;
+          }
+        } else if (node.children.length === 1 && vnodeTag !== TELEPORT) {
+          const child = node.children[0];
+          const type = child.type;
+          const hasDynamicTextChild = type === 5 || type === 8;
+          if (hasDynamicTextChild && getConstantType(child, context) === 0) {
+            patchFlag |= 1;
+          }
+          if (hasDynamicTextChild || type === 2) {
+            vnodeChildren = child;
+          } else {
+            vnodeChildren = node.children;
+          }
+        } else {
+          vnodeChildren = node.children;
+        }
+      }
+      if (patchFlag !== 0) {
+        {
+          if (patchFlag < 0) {
+            vnodePatchFlag = patchFlag + ` /* ${PatchFlagNames[patchFlag]} */`;
+          } else {
+            const flagNames = Object.keys(PatchFlagNames).map(Number).filter((n) => n > 0 && patchFlag & n).map((n) => PatchFlagNames[n]).join(`, `);
+            vnodePatchFlag = patchFlag + ` /* ${flagNames} */`;
+          }
+        }
+        if (dynamicPropNames && dynamicPropNames.length) {
+          vnodeDynamicProps = stringifyDynamicPropNames(dynamicPropNames);
+        }
+      }
+      node.codegenNode = createVNodeCall(
+        context,
+        vnodeTag,
+        vnodeProps,
+        vnodeChildren,
+        vnodePatchFlag,
+        vnodeDynamicProps,
+        vnodeDirectives,
+        !!shouldUseBlock,
+        false,
+        isComponent,
+        node.loc
+      );
+    };
+  };
+  function resolveComponentType(node, context, ssr = false) {
+    let { tag } = node;
+    const isExplicitDynamic = isComponentTag(tag);
+    const isProp = findProp(
+      node,
+      "is",
+      false,
+      true
+      /* allow empty */
+    );
+    if (isProp) {
+      if (isExplicitDynamic || isCompatEnabled(
+        "COMPILER_IS_ON_ELEMENT",
+        context
+      )) {
+        let exp;
+        if (isProp.type === 6) {
+          exp = isProp.value && createSimpleExpression(isProp.value.content, true);
+        } else {
+          exp = isProp.exp;
+          if (!exp) {
+            exp = createSimpleExpression(`is`, false, isProp.loc);
+          }
+        }
+        if (exp) {
+          return createCallExpression(context.helper(RESOLVE_DYNAMIC_COMPONENT), [
+            exp
+          ]);
+        }
+      } else if (isProp.type === 6 && isProp.value.content.startsWith("vue:")) {
+        tag = isProp.value.content.slice(4);
+      }
+    }
+    const builtIn = isCoreComponent(tag) || context.isBuiltInComponent(tag);
+    if (builtIn) {
+      if (!ssr)
+        context.helper(builtIn);
+      return builtIn;
+    }
+    context.helper(RESOLVE_COMPONENT);
+    context.components.add(tag);
+    return toValidAssetId(tag, `component`);
+  }
+  function buildProps(node, context, props = node.props, isComponent, isDynamicComponent, ssr = false) {
+    const { tag, loc: elementLoc, children } = node;
+    let properties = [];
+    const mergeArgs = [];
+    const runtimeDirectives = [];
+    const hasChildren = children.length > 0;
+    let shouldUseBlock = false;
+    let patchFlag = 0;
+    let hasRef = false;
+    let hasClassBinding = false;
+    let hasStyleBinding = false;
+    let hasHydrationEventBinding = false;
+    let hasDynamicKeys = false;
+    let hasVnodeHook = false;
+    const dynamicPropNames = [];
+    const pushMergeArg = (arg) => {
+      if (properties.length) {
+        mergeArgs.push(
+          createObjectExpression(dedupeProperties(properties), elementLoc)
+        );
+        properties = [];
+      }
+      if (arg)
+        mergeArgs.push(arg);
+    };
+    const pushRefVForMarker = () => {
+      if (context.scopes.vFor > 0) {
+        properties.push(
+          createObjectProperty(
+            createSimpleExpression("ref_for", true),
+            createSimpleExpression("true")
+          )
+        );
+      }
+    };
+    const analyzePatchFlag = ({ key, value }) => {
+      if (isStaticExp(key)) {
+        const name = key.content;
+        const isEventHandler = isOn(name);
+        if (isEventHandler && (!isComponent || isDynamicComponent) && // omit the flag for click handlers because hydration gives click
+        // dedicated fast path.
+        name.toLowerCase() !== "onclick" && // omit v-model handlers
+        name !== "onUpdate:modelValue" && // omit onVnodeXXX hooks
+        !isReservedProp(name)) {
+          hasHydrationEventBinding = true;
+        }
+        if (isEventHandler && isReservedProp(name)) {
+          hasVnodeHook = true;
+        }
+        if (isEventHandler && value.type === 14) {
+          value = value.arguments[0];
+        }
+        if (value.type === 20 || (value.type === 4 || value.type === 8) && getConstantType(value, context) > 0) {
+          return;
+        }
+        if (name === "ref") {
+          hasRef = true;
+        } else if (name === "class") {
+          hasClassBinding = true;
+        } else if (name === "style") {
+          hasStyleBinding = true;
+        } else if (name !== "key" && !dynamicPropNames.includes(name)) {
+          dynamicPropNames.push(name);
+        }
+        if (isComponent && (name === "class" || name === "style") && !dynamicPropNames.includes(name)) {
+          dynamicPropNames.push(name);
+        }
+      } else {
+        hasDynamicKeys = true;
+      }
+    };
+    for (let i = 0; i < props.length; i++) {
+      const prop = props[i];
+      if (prop.type === 6) {
+        const { loc, name, nameLoc, value } = prop;
+        let isStatic = true;
+        if (name === "ref") {
+          hasRef = true;
+          pushRefVForMarker();
+        }
+        if (name === "is" && (isComponentTag(tag) || value && value.content.startsWith("vue:") || isCompatEnabled(
+          "COMPILER_IS_ON_ELEMENT",
+          context
+        ))) {
+          continue;
+        }
+        properties.push(
+          createObjectProperty(
+            createSimpleExpression(name, true, nameLoc),
+            createSimpleExpression(
+              value ? value.content : "",
+              isStatic,
+              value ? value.loc : loc
+            )
+          )
+        );
+      } else {
+        const { name, arg, exp, loc, modifiers } = prop;
+        const isVBind = name === "bind";
+        const isVOn = name === "on";
+        if (name === "slot") {
+          if (!isComponent) {
+            context.onError(
+              createCompilerError(40, loc)
+            );
+          }
+          continue;
+        }
+        if (name === "once" || name === "memo") {
+          continue;
+        }
+        if (name === "is" || isVBind && isStaticArgOf(arg, "is") && (isComponentTag(tag) || isCompatEnabled(
+          "COMPILER_IS_ON_ELEMENT",
+          context
+        ))) {
+          continue;
+        }
+        if (isVOn && ssr) {
+          continue;
+        }
+        if (
+          // #938: elements with dynamic keys should be forced into blocks
+          isVBind && isStaticArgOf(arg, "key") || // inline before-update hooks need to force block so that it is invoked
+          // before children
+          isVOn && hasChildren && isStaticArgOf(arg, "vue:before-update")
+        ) {
+          shouldUseBlock = true;
+        }
+        if (isVBind && isStaticArgOf(arg, "ref")) {
+          pushRefVForMarker();
+        }
+        if (!arg && (isVBind || isVOn)) {
+          hasDynamicKeys = true;
+          if (exp) {
+            if (isVBind) {
+              pushRefVForMarker();
+              pushMergeArg();
+              {
+                {
+                  const hasOverridableKeys = mergeArgs.some((arg2) => {
+                    if (arg2.type === 15) {
+                      return arg2.properties.some(({ key }) => {
+                        if (key.type !== 4 || !key.isStatic) {
+                          return true;
+                        }
+                        return key.content !== "class" && key.content !== "style" && !isOn(key.content);
+                      });
+                    } else {
+                      return true;
+                    }
+                  });
+                  if (hasOverridableKeys) {
+                    checkCompatEnabled(
+                      "COMPILER_V_BIND_OBJECT_ORDER",
+                      context,
+                      loc
+                    );
+                  }
+                }
+                if (isCompatEnabled(
+                  "COMPILER_V_BIND_OBJECT_ORDER",
+                  context
+                )) {
+                  mergeArgs.unshift(exp);
+                  continue;
+                }
+              }
+              mergeArgs.push(exp);
+            } else {
+              pushMergeArg({
+                type: 14,
+                loc,
+                callee: context.helper(TO_HANDLERS),
+                arguments: isComponent ? [exp] : [exp, `true`]
+              });
+            }
+          } else {
+            context.onError(
+              createCompilerError(
+                isVBind ? 34 : 35,
+                loc
+              )
+            );
+          }
+          continue;
+        }
+        if (isVBind && modifiers.includes("prop")) {
+          patchFlag |= 32;
+        }
+        const directiveTransform = context.directiveTransforms[name];
+        if (directiveTransform) {
+          const { props: props2, needRuntime } = directiveTransform(prop, node, context);
+          !ssr && props2.forEach(analyzePatchFlag);
+          if (isVOn && arg && !isStaticExp(arg)) {
+            pushMergeArg(createObjectExpression(props2, elementLoc));
+          } else {
+            properties.push(...props2);
+          }
+          if (needRuntime) {
+            runtimeDirectives.push(prop);
+            if (isSymbol(needRuntime)) {
+              directiveImportMap.set(prop, needRuntime);
+            }
+          }
+        } else if (!isBuiltInDirective(name)) {
+          runtimeDirectives.push(prop);
+          if (hasChildren) {
+            shouldUseBlock = true;
+          }
+        }
+      }
+    }
+    let propsExpression = void 0;
+    if (mergeArgs.length) {
+      pushMergeArg();
+      if (mergeArgs.length > 1) {
+        propsExpression = createCallExpression(
+          context.helper(MERGE_PROPS),
+          mergeArgs,
+          elementLoc
+        );
+      } else {
+        propsExpression = mergeArgs[0];
+      }
+    } else if (properties.length) {
+      propsExpression = createObjectExpression(
+        dedupeProperties(properties),
+        elementLoc
+      );
+    }
+    if (hasDynamicKeys) {
+      patchFlag |= 16;
+    } else {
+      if (hasClassBinding && !isComponent) {
+        patchFlag |= 2;
+      }
+      if (hasStyleBinding && !isComponent) {
+        patchFlag |= 4;
+      }
+      if (dynamicPropNames.length) {
+        patchFlag |= 8;
+      }
+      if (hasHydrationEventBinding) {
+        patchFlag |= 32;
+      }
+    }
+    if (!shouldUseBlock && (patchFlag === 0 || patchFlag === 32) && (hasRef || hasVnodeHook || runtimeDirectives.length > 0)) {
+      patchFlag |= 512;
+    }
+    if (!context.inSSR && propsExpression) {
+      switch (propsExpression.type) {
+        case 15:
+          let classKeyIndex = -1;
+          let styleKeyIndex = -1;
+          let hasDynamicKey = false;
+          for (let i = 0; i < propsExpression.properties.length; i++) {
+            const key = propsExpression.properties[i].key;
+            if (isStaticExp(key)) {
+              if (key.content === "class") {
+                classKeyIndex = i;
+              } else if (key.content === "style") {
+                styleKeyIndex = i;
+              }
+            } else if (!key.isHandlerKey) {
+              hasDynamicKey = true;
+            }
+          }
+          const classProp = propsExpression.properties[classKeyIndex];
+          const styleProp = propsExpression.properties[styleKeyIndex];
+          if (!hasDynamicKey) {
+            if (classProp && !isStaticExp(classProp.value)) {
+              classProp.value = createCallExpression(
+                context.helper(NORMALIZE_CLASS),
+                [classProp.value]
+              );
+            }
+            if (styleProp && // the static style is compiled into an object,
+            // so use `hasStyleBinding` to ensure that it is a dynamic style binding
+            (hasStyleBinding || styleProp.value.type === 4 && styleProp.value.content.trim()[0] === `[` || // v-bind:style and style both exist,
+            // v-bind:style with static literal object
+            styleProp.value.type === 17)) {
+              styleProp.value = createCallExpression(
+                context.helper(NORMALIZE_STYLE),
+                [styleProp.value]
+              );
+            }
+          } else {
+            propsExpression = createCallExpression(
+              context.helper(NORMALIZE_PROPS),
+              [propsExpression]
+            );
+          }
+          break;
+        case 14:
+          break;
+        default:
+          propsExpression = createCallExpression(
+            context.helper(NORMALIZE_PROPS),
+            [
+              createCallExpression(context.helper(GUARD_REACTIVE_PROPS), [
+                propsExpression
+              ])
+            ]
+          );
+          break;
+      }
+    }
+    return {
+      props: propsExpression,
+      directives: runtimeDirectives,
+      patchFlag,
+      dynamicPropNames,
+      shouldUseBlock
+    };
+  }
+  function dedupeProperties(properties) {
+    const knownProps = /* @__PURE__ */ new Map();
+    const deduped = [];
+    for (let i = 0; i < properties.length; i++) {
+      const prop = properties[i];
+      if (prop.key.type === 8 || !prop.key.isStatic) {
+        deduped.push(prop);
+        continue;
+      }
+      const name = prop.key.content;
+      const existing = knownProps.get(name);
+      if (existing) {
+        if (name === "style" || name === "class" || isOn(name)) {
+          mergeAsArray(existing, prop);
+        }
+      } else {
+        knownProps.set(name, prop);
+        deduped.push(prop);
+      }
+    }
+    return deduped;
+  }
+  function mergeAsArray(existing, incoming) {
+    if (existing.value.type === 17) {
+      existing.value.elements.push(incoming.value);
+    } else {
+      existing.value = createArrayExpression(
+        [existing.value, incoming.value],
+        existing.loc
+      );
+    }
+  }
+  function buildDirectiveArgs(dir, context) {
+    const dirArgs = [];
+    const runtime = directiveImportMap.get(dir);
+    if (runtime) {
+      dirArgs.push(context.helperString(runtime));
+    } else {
+      {
+        context.helper(RESOLVE_DIRECTIVE);
+        context.directives.add(dir.name);
+        dirArgs.push(toValidAssetId(dir.name, `directive`));
+      }
+    }
+    const { loc } = dir;
+    if (dir.exp)
+      dirArgs.push(dir.exp);
+    if (dir.arg) {
+      if (!dir.exp) {
+        dirArgs.push(`void 0`);
+      }
+      dirArgs.push(dir.arg);
+    }
+    if (Object.keys(dir.modifiers).length) {
+      if (!dir.arg) {
+        if (!dir.exp) {
+          dirArgs.push(`void 0`);
+        }
+        dirArgs.push(`void 0`);
+      }
+      const trueExpression = createSimpleExpression(`true`, false, loc);
+      dirArgs.push(
+        createObjectExpression(
+          dir.modifiers.map(
+            (modifier) => createObjectProperty(modifier, trueExpression)
+          ),
+          loc
+        )
+      );
+    }
+    return createArrayExpression(dirArgs, dir.loc);
+  }
+  function stringifyDynamicPropNames(props) {
+    let propsNamesString = `[`;
+    for (let i = 0, l = props.length; i < l; i++) {
+      propsNamesString += JSON.stringify(props[i]);
+      if (i < l - 1)
+        propsNamesString += ", ";
+    }
+    return propsNamesString + `]`;
+  }
+  function isComponentTag(tag) {
+    return tag === "component" || tag === "Component";
+  }
+
+  const transformSlotOutlet = (node, context) => {
+    if (isSlotOutlet(node)) {
+      const { children, loc } = node;
+      const { slotName, slotProps } = processSlotOutlet(node, context);
+      const slotArgs = [
+        context.prefixIdentifiers ? `_ctx.$slots` : `$slots`,
+        slotName,
+        "{}",
+        "undefined",
+        "true"
+      ];
+      let expectedLen = 2;
+      if (slotProps) {
+        slotArgs[2] = slotProps;
+        expectedLen = 3;
+      }
+      if (children.length) {
+        slotArgs[3] = createFunctionExpression([], children, false, false, loc);
+        expectedLen = 4;
+      }
+      if (context.scopeId && !context.slotted) {
+        expectedLen = 5;
+      }
+      slotArgs.splice(expectedLen);
+      node.codegenNode = createCallExpression(
+        context.helper(RENDER_SLOT),
+        slotArgs,
+        loc
+      );
+    }
+  };
+  function processSlotOutlet(node, context) {
+    let slotName = `"default"`;
+    let slotProps = void 0;
+    const nonNameProps = [];
+    for (let i = 0; i < node.props.length; i++) {
+      const p = node.props[i];
+      if (p.type === 6) {
+        if (p.value) {
+          if (p.name === "name") {
+            slotName = JSON.stringify(p.value.content);
+          } else {
+            p.name = camelize(p.name);
+            nonNameProps.push(p);
+          }
+        }
+      } else {
+        if (p.name === "bind" && isStaticArgOf(p.arg, "name")) {
+          if (p.exp) {
+            slotName = p.exp;
+          } else if (p.arg && p.arg.type === 4) {
+            const name = camelize(p.arg.content);
+            slotName = p.exp = createSimpleExpression(name, false, p.arg.loc);
+          }
+        } else {
+          if (p.name === "bind" && p.arg && isStaticExp(p.arg)) {
+            p.arg.content = camelize(p.arg.content);
+          }
+          nonNameProps.push(p);
+        }
+      }
+    }
+    if (nonNameProps.length > 0) {
+      const { props, directives } = buildProps(
+        node,
+        context,
+        nonNameProps,
+        false,
+        false
+      );
+      slotProps = props;
+      if (directives.length) {
+        context.onError(
+          createCompilerError(
+            36,
+            directives[0].loc
+          )
+        );
+      }
+    }
+    return {
+      slotName,
+      slotProps
+    };
+  }
+
+  const fnExpRE = /^\s*(async\s*)?(\([^)]*?\)|[\w$_]+)\s*(:[^=]+)?=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/;
+  const transformOn$1 = (dir, node, context, augmentor) => {
+    const { loc, modifiers, arg } = dir;
+    if (!dir.exp && !modifiers.length) {
+      context.onError(createCompilerError(35, loc));
+    }
+    let eventName;
+    if (arg.type === 4) {
+      if (arg.isStatic) {
+        let rawName = arg.content;
+        if (rawName.startsWith("vnode")) {
+          context.onError(createCompilerError(51, arg.loc));
+        }
+        if (rawName.startsWith("vue:")) {
+          rawName = `vnode-${rawName.slice(4)}`;
+        }
+        const eventString = node.tagType !== 0 || rawName.startsWith("vnode") || !/[A-Z]/.test(rawName) ? (
+          // for non-element and vnode lifecycle event listeners, auto convert
+          // it to camelCase. See issue #2249
+          toHandlerKey(camelize(rawName))
+        ) : (
+          // preserve case for plain element listeners that have uppercase
+          // letters, as these may be custom elements' custom events
+          `on:${rawName}`
+        );
+        eventName = createSimpleExpression(eventString, true, arg.loc);
+      } else {
+        eventName = createCompoundExpression([
+          `${context.helperString(TO_HANDLER_KEY)}(`,
+          arg,
+          `)`
+        ]);
+      }
+    } else {
+      eventName = arg;
+      eventName.children.unshift(`${context.helperString(TO_HANDLER_KEY)}(`);
+      eventName.children.push(`)`);
+    }
+    let exp = dir.exp;
+    if (exp && !exp.content.trim()) {
+      exp = void 0;
+    }
+    let shouldCache = context.cacheHandlers && !exp && !context.inVOnce;
+    if (exp) {
+      const isMemberExp = isMemberExpression(exp.content);
+      const isInlineStatement = !(isMemberExp || fnExpRE.test(exp.content));
+      const hasMultipleStatements = exp.content.includes(`;`);
+      {
+        validateBrowserExpression(
+          exp,
+          context,
+          false,
+          hasMultipleStatements
+        );
+      }
+      if (isInlineStatement || shouldCache && isMemberExp) {
+        exp = createCompoundExpression([
+          `${isInlineStatement ? `$event` : `${``}(...args)`} => ${hasMultipleStatements ? `{` : `(`}`,
+          exp,
+          hasMultipleStatements ? `}` : `)`
+        ]);
+      }
+    }
+    let ret = {
+      props: [
+        createObjectProperty(
+          eventName,
+          exp || createSimpleExpression(`() => {}`, false, loc)
+        )
+      ]
+    };
+    if (augmentor) {
+      ret = augmentor(ret);
+    }
+    if (shouldCache) {
+      ret.props[0].value = context.cache(ret.props[0].value);
+    }
+    ret.props.forEach((p) => p.key.isHandlerKey = true);
+    return ret;
+  };
+
+  const transformBind = (dir, _node, context) => {
+    const { modifiers, loc } = dir;
+    const arg = dir.arg;
+    let { exp } = dir;
+    if (exp && exp.type === 4 && !exp.content.trim()) {
+      {
+        exp = void 0;
+      }
+    }
+    if (!exp) {
+      if (arg.type !== 4 || !arg.isStatic) {
+        context.onError(
+          createCompilerError(
+            52,
+            arg.loc
+          )
+        );
+        return {
+          props: [
+            createObjectProperty(arg, createSimpleExpression("", true, loc))
+          ]
+        };
+      }
+      const propName = camelize(arg.content);
+      exp = dir.exp = createSimpleExpression(propName, false, arg.loc);
+    }
+    if (arg.type !== 4) {
+      arg.children.unshift(`(`);
+      arg.children.push(`) || ""`);
+    } else if (!arg.isStatic) {
+      arg.content = `${arg.content} || ""`;
+    }
+    if (modifiers.includes("camel")) {
+      if (arg.type === 4) {
+        if (arg.isStatic) {
+          arg.content = camelize(arg.content);
+        } else {
+          arg.content = `${context.helperString(CAMELIZE)}(${arg.content})`;
+        }
+      } else {
+        arg.children.unshift(`${context.helperString(CAMELIZE)}(`);
+        arg.children.push(`)`);
+      }
+    }
+    if (!context.inSSR) {
+      if (modifiers.includes("prop")) {
+        injectPrefix(arg, ".");
+      }
+      if (modifiers.includes("attr")) {
+        injectPrefix(arg, "^");
+      }
+    }
+    return {
+      props: [createObjectProperty(arg, exp)]
+    };
+  };
+  const injectPrefix = (arg, prefix) => {
+    if (arg.type === 4) {
+      if (arg.isStatic) {
+        arg.content = prefix + arg.content;
+      } else {
+        arg.content = `\`${prefix}\${${arg.content}}\``;
+      }
+    } else {
+      arg.children.unshift(`'${prefix}' + (`);
+      arg.children.push(`)`);
+    }
+  };
+
+  const transformText = (node, context) => {
+    if (node.type === 0 || node.type === 1 || node.type === 11 || node.type === 10) {
+      return () => {
+        const children = node.children;
+        let currentContainer = void 0;
+        let hasText = false;
+        for (let i = 0; i < children.length; i++) {
+          const child = children[i];
+          if (isText$1(child)) {
+            hasText = true;
+            for (let j = i + 1; j < children.length; j++) {
+              const next = children[j];
+              if (isText$1(next)) {
+                if (!currentContainer) {
+                  currentContainer = children[i] = createCompoundExpression(
+                    [child],
+                    child.loc
+                  );
+                }
+                currentContainer.children.push(` + `, next);
+                children.splice(j, 1);
+                j--;
+              } else {
+                currentContainer = void 0;
+                break;
+              }
+            }
+          }
+        }
+        if (!hasText || // if this is a plain element with a single text child, leave it
+        // as-is since the runtime has dedicated fast path for this by directly
+        // setting textContent of the element.
+        // for component root it's always normalized anyway.
+        children.length === 1 && (node.type === 0 || node.type === 1 && node.tagType === 0 && // #3756
+        // custom directives can potentially add DOM elements arbitrarily,
+        // we need to avoid setting textContent of the element at runtime
+        // to avoid accidentally overwriting the DOM elements added
+        // by the user through custom directives.
+        !node.props.find(
+          (p) => p.type === 7 && !context.directiveTransforms[p.name]
+        ) && // in compat mode, <template> tags with no special directives
+        // will be rendered as a fragment so its children must be
+        // converted into vnodes.
+        !(node.tag === "template"))) {
+          return;
+        }
+        for (let i = 0; i < children.length; i++) {
+          const child = children[i];
+          if (isText$1(child) || child.type === 8) {
+            const callArgs = [];
+            if (child.type !== 2 || child.content !== " ") {
+              callArgs.push(child);
+            }
+            if (!context.ssr && getConstantType(child, context) === 0) {
+              callArgs.push(
+                1 + (` /* ${PatchFlagNames[1]} */` )
+              );
+            }
+            children[i] = {
+              type: 12,
+              content: child,
+              loc: child.loc,
+              codegenNode: createCallExpression(
+                context.helper(CREATE_TEXT),
+                callArgs
+              )
+            };
+          }
+        }
+      };
+    }
+  };
+
+  const seen$1 = /* @__PURE__ */ new WeakSet();
+  const transformOnce = (node, context) => {
+    if (node.type === 1 && findDir(node, "once", true)) {
+      if (seen$1.has(node) || context.inVOnce || context.inSSR) {
+        return;
+      }
+      seen$1.add(node);
+      context.inVOnce = true;
+      context.helper(SET_BLOCK_TRACKING);
+      return () => {
+        context.inVOnce = false;
+        const cur = context.currentNode;
+        if (cur.codegenNode) {
+          cur.codegenNode = context.cache(
+            cur.codegenNode,
+            true
+            /* isVNode */
+          );
+        }
+      };
+    }
+  };
+
+  const transformModel$1 = (dir, node, context) => {
+    const { exp, arg } = dir;
+    if (!exp) {
+      context.onError(
+        createCompilerError(41, dir.loc)
+      );
+      return createTransformProps();
+    }
+    const rawExp = exp.loc.source;
+    const expString = exp.type === 4 ? exp.content : rawExp;
+    const bindingType = context.bindingMetadata[rawExp];
+    if (bindingType === "props" || bindingType === "props-aliased") {
+      context.onError(createCompilerError(44, exp.loc));
+      return createTransformProps();
+    }
+    const maybeRef = false;
+    if (!expString.trim() || !isMemberExpression(expString) && !maybeRef) {
+      context.onError(
+        createCompilerError(42, exp.loc)
+      );
+      return createTransformProps();
+    }
+    const propName = arg ? arg : createSimpleExpression("modelValue", true);
+    const eventName = arg ? isStaticExp(arg) ? `onUpdate:${camelize(arg.content)}` : createCompoundExpression(['"onUpdate:" + ', arg]) : `onUpdate:modelValue`;
+    let assignmentExp;
+    const eventArg = context.isTS ? `($event: any)` : `$event`;
+    {
+      assignmentExp = createCompoundExpression([
+        `${eventArg} => ((`,
+        exp,
+        `) = $event)`
+      ]);
+    }
+    const props = [
+      // modelValue: foo
+      createObjectProperty(propName, dir.exp),
+      // "onUpdate:modelValue": $event => (foo = $event)
+      createObjectProperty(eventName, assignmentExp)
+    ];
+    if (dir.modifiers.length && node.tagType === 1) {
+      const modifiers = dir.modifiers.map((m) => (isSimpleIdentifier(m) ? m : JSON.stringify(m)) + `: true`).join(`, `);
+      const modifiersKey = arg ? isStaticExp(arg) ? `${arg.content}Modifiers` : createCompoundExpression([arg, ' + "Modifiers"']) : `modelModifiers`;
+      props.push(
+        createObjectProperty(
+          modifiersKey,
+          createSimpleExpression(
+            `{ ${modifiers} }`,
+            false,
+            dir.loc,
+            2
+          )
+        )
+      );
+    }
+    return createTransformProps(props);
+  };
+  function createTransformProps(props = []) {
+    return { props };
+  }
+
+  const validDivisionCharRE = /[\w).+\-_$\]]/;
+  const transformFilter = (node, context) => {
+    if (!isCompatEnabled("COMPILER_FILTERS", context)) {
+      return;
+    }
+    if (node.type === 5) {
+      rewriteFilter(node.content, context);
+    }
+    if (node.type === 1) {
+      node.props.forEach((prop) => {
+        if (prop.type === 7 && prop.name !== "for" && prop.exp) {
+          rewriteFilter(prop.exp, context);
+        }
+      });
+    }
+  };
+  function rewriteFilter(node, context) {
+    if (node.type === 4) {
+      parseFilter(node, context);
+    } else {
+      for (let i = 0; i < node.children.length; i++) {
+        const child = node.children[i];
+        if (typeof child !== "object")
+          continue;
+        if (child.type === 4) {
+          parseFilter(child, context);
+        } else if (child.type === 8) {
+          rewriteFilter(node, context);
+        } else if (child.type === 5) {
+          rewriteFilter(child.content, context);
+        }
+      }
+    }
+  }
+  function parseFilter(node, context) {
+    const exp = node.content;
+    let inSingle = false;
+    let inDouble = false;
+    let inTemplateString = false;
+    let inRegex = false;
+    let curly = 0;
+    let square = 0;
+    let paren = 0;
+    let lastFilterIndex = 0;
+    let c, prev, i, expression, filters = [];
+    for (i = 0; i < exp.length; i++) {
+      prev = c;
+      c = exp.charCodeAt(i);
+      if (inSingle) {
+        if (c === 39 && prev !== 92)
+          inSingle = false;
+      } else if (inDouble) {
+        if (c === 34 && prev !== 92)
+          inDouble = false;
+      } else if (inTemplateString) {
+        if (c === 96 && prev !== 92)
+          inTemplateString = false;
+      } else if (inRegex) {
+        if (c === 47 && prev !== 92)
+          inRegex = false;
+      } else if (c === 124 && // pipe
+      exp.charCodeAt(i + 1) !== 124 && exp.charCodeAt(i - 1) !== 124 && !curly && !square && !paren) {
+        if (expression === void 0) {
+          lastFilterIndex = i + 1;
+          expression = exp.slice(0, i).trim();
+        } else {
+          pushFilter();
+        }
+      } else {
+        switch (c) {
+          case 34:
+            inDouble = true;
+            break;
+          case 39:
+            inSingle = true;
+            break;
+          case 96:
+            inTemplateString = true;
+            break;
+          case 40:
+            paren++;
+            break;
+          case 41:
+            paren--;
+            break;
+          case 91:
+            square++;
+            break;
+          case 93:
+            square--;
+            break;
+          case 123:
+            curly++;
+            break;
+          case 125:
+            curly--;
+            break;
+        }
+        if (c === 47) {
+          let j = i - 1;
+          let p;
+          for (; j >= 0; j--) {
+            p = exp.charAt(j);
+            if (p !== " ")
+              break;
+          }
+          if (!p || !validDivisionCharRE.test(p)) {
+            inRegex = true;
+          }
+        }
+      }
+    }
+    if (expression === void 0) {
+      expression = exp.slice(0, i).trim();
+    } else if (lastFilterIndex !== 0) {
+      pushFilter();
+    }
+    function pushFilter() {
+      filters.push(exp.slice(lastFilterIndex, i).trim());
+      lastFilterIndex = i + 1;
+    }
+    if (filters.length) {
+      warnDeprecation(
+        "COMPILER_FILTERS",
+        context,
+        node.loc
+      );
+      for (i = 0; i < filters.length; i++) {
+        expression = wrapFilter(expression, filters[i], context);
+      }
+      node.content = expression;
+    }
+  }
+  function wrapFilter(exp, filter, context) {
+    context.helper(RESOLVE_FILTER);
+    const i = filter.indexOf("(");
+    if (i < 0) {
+      context.filters.add(filter);
+      return `${toValidAssetId(filter, "filter")}(${exp})`;
+    } else {
+      const name = filter.slice(0, i);
+      const args = filter.slice(i + 1);
+      context.filters.add(name);
+      return `${toValidAssetId(name, "filter")}(${exp}${args !== ")" ? "," + args : args}`;
+    }
+  }
+
+  const seen = /* @__PURE__ */ new WeakSet();
+  const transformMemo = (node, context) => {
+    if (node.type === 1) {
+      const dir = findDir(node, "memo");
+      if (!dir || seen.has(node)) {
+        return;
+      }
+      seen.add(node);
+      return () => {
+        const codegenNode = node.codegenNode || context.currentNode.codegenNode;
+        if (codegenNode && codegenNode.type === 13) {
+          if (node.tagType !== 1) {
+            convertToBlock(codegenNode, context);
+          }
+          node.codegenNode = createCallExpression(context.helper(WITH_MEMO), [
+            dir.exp,
+            createFunctionExpression(void 0, codegenNode),
+            `_cache`,
+            String(context.cached++)
+          ]);
+        }
+      };
+    }
+  };
+
+  function getBaseTransformPreset(prefixIdentifiers) {
+    return [
+      [
+        transformOnce,
+        transformIf,
+        transformMemo,
+        transformFor,
+        ...[transformFilter] ,
+        ...[transformExpression] ,
+        transformSlotOutlet,
+        transformElement,
+        trackSlotScopes,
+        transformText
+      ],
+      {
+        on: transformOn$1,
+        bind: transformBind,
+        model: transformModel$1
+      }
+    ];
+  }
+  function baseCompile(source, options = {}) {
+    const onError = options.onError || defaultOnError;
+    const isModuleMode = options.mode === "module";
+    {
+      if (options.prefixIdentifiers === true) {
+        onError(createCompilerError(47));
+      } else if (isModuleMode) {
+        onError(createCompilerError(48));
+      }
+    }
+    const prefixIdentifiers = false;
+    if (options.cacheHandlers) {
+      onError(createCompilerError(49));
+    }
+    if (options.scopeId && !isModuleMode) {
+      onError(createCompilerError(50));
+    }
+    const resolvedOptions = extend({}, options, {
+      prefixIdentifiers
+    });
+    const ast = isString(source) ? baseParse(source, resolvedOptions) : source;
+    const [nodeTransforms, directiveTransforms] = getBaseTransformPreset();
+    transform(
+      ast,
+      extend({}, resolvedOptions, {
+        nodeTransforms: [
+          ...nodeTransforms,
+          ...options.nodeTransforms || []
+          // user transforms
+        ],
+        directiveTransforms: extend(
+          {},
+          directiveTransforms,
+          options.directiveTransforms || {}
+          // user transforms
+        )
+      })
+    );
+    return generate(ast, resolvedOptions);
+  }
+
+  const BindingTypes = {
+    "DATA": "data",
+    "PROPS": "props",
+    "PROPS_ALIASED": "props-aliased",
+    "SETUP_LET": "setup-let",
+    "SETUP_CONST": "setup-const",
+    "SETUP_REACTIVE_CONST": "setup-reactive-const",
+    "SETUP_MAYBE_REF": "setup-maybe-ref",
+    "SETUP_REF": "setup-ref",
+    "OPTIONS": "options",
+    "LITERAL_CONST": "literal-const"
+  };
+
+  const noopDirectiveTransform = () => ({ props: [] });
+
+  const V_MODEL_RADIO = Symbol(`vModelRadio` );
+  const V_MODEL_CHECKBOX = Symbol(`vModelCheckbox` );
+  const V_MODEL_TEXT = Symbol(`vModelText` );
+  const V_MODEL_SELECT = Symbol(`vModelSelect` );
+  const V_MODEL_DYNAMIC = Symbol(`vModelDynamic` );
+  const V_ON_WITH_MODIFIERS = Symbol(`vOnModifiersGuard` );
+  const V_ON_WITH_KEYS = Symbol(`vOnKeysGuard` );
+  const V_SHOW = Symbol(`vShow` );
+  const TRANSITION = Symbol(`Transition` );
+  const TRANSITION_GROUP = Symbol(`TransitionGroup` );
+  registerRuntimeHelpers({
+    [V_MODEL_RADIO]: `vModelRadio`,
+    [V_MODEL_CHECKBOX]: `vModelCheckbox`,
+    [V_MODEL_TEXT]: `vModelText`,
+    [V_MODEL_SELECT]: `vModelSelect`,
+    [V_MODEL_DYNAMIC]: `vModelDynamic`,
+    [V_ON_WITH_MODIFIERS]: `withModifiers`,
+    [V_ON_WITH_KEYS]: `withKeys`,
+    [V_SHOW]: `vShow`,
+    [TRANSITION]: `Transition`,
+    [TRANSITION_GROUP]: `TransitionGroup`
+  });
+
+  let decoder;
+  function decodeHtmlBrowser(raw, asAttr = false) {
+    if (!decoder) {
+      decoder = document.createElement("div");
+    }
+    if (asAttr) {
+      decoder.innerHTML = `<div foo="${raw.replace(/"/g, "&quot;")}">`;
+      return decoder.children[0].getAttribute("foo");
+    } else {
+      decoder.innerHTML = raw;
+      return decoder.textContent;
+    }
+  }
+
+  const parserOptions = {
+    parseMode: "html",
+    isVoidTag,
+    isNativeTag: (tag) => isHTMLTag(tag) || isSVGTag(tag) || isMathMLTag(tag),
+    isPreTag: (tag) => tag === "pre",
+    decodeEntities: decodeHtmlBrowser ,
+    isBuiltInComponent: (tag) => {
+      if (tag === "Transition" || tag === "transition") {
+        return TRANSITION;
+      } else if (tag === "TransitionGroup" || tag === "transition-group") {
+        return TRANSITION_GROUP;
+      }
+    },
+    // https://html.spec.whatwg.org/multipage/parsing.html#tree-construction-dispatcher
+    getNamespace(tag, parent, rootNamespace) {
+      let ns = parent ? parent.ns : rootNamespace;
+      if (parent && ns === 2) {
+        if (parent.tag === "annotation-xml") {
+          if (tag === "svg") {
+            return 1;
+          }
+          if (parent.props.some(
+            (a) => a.type === 6 && a.name === "encoding" && a.value != null && (a.value.content === "text/html" || a.value.content === "application/xhtml+xml")
+          )) {
+            ns = 0;
+          }
+        } else if (/^m(?:[ions]|text)$/.test(parent.tag) && tag !== "mglyph" && tag !== "malignmark") {
+          ns = 0;
+        }
+      } else if (parent && ns === 1) {
+        if (parent.tag === "foreignObject" || parent.tag === "desc" || parent.tag === "title") {
+          ns = 0;
+        }
+      }
+      if (ns === 0) {
+        if (tag === "svg") {
+          return 1;
+        }
+        if (tag === "math") {
+          return 2;
+        }
+      }
+      return ns;
+    }
+  };
+
+  const transformStyle = (node) => {
+    if (node.type === 1) {
+      node.props.forEach((p, i) => {
+        if (p.type === 6 && p.name === "style" && p.value) {
+          node.props[i] = {
+            type: 7,
+            name: `bind`,
+            arg: createSimpleExpression(`style`, true, p.loc),
+            exp: parseInlineCSS(p.value.content, p.loc),
+            modifiers: [],
+            loc: p.loc
+          };
+        }
+      });
+    }
+  };
+  const parseInlineCSS = (cssText, loc) => {
+    const normalized = parseStringStyle(cssText);
+    return createSimpleExpression(
+      JSON.stringify(normalized),
+      false,
+      loc,
+      3
+    );
+  };
+
+  function createDOMCompilerError(code, loc) {
+    return createCompilerError(
+      code,
+      loc,
+      DOMErrorMessages 
+    );
+  }
+  const DOMErrorCodes = {
+    "X_V_HTML_NO_EXPRESSION": 53,
+    "53": "X_V_HTML_NO_EXPRESSION",
+    "X_V_HTML_WITH_CHILDREN": 54,
+    "54": "X_V_HTML_WITH_CHILDREN",
+    "X_V_TEXT_NO_EXPRESSION": 55,
+    "55": "X_V_TEXT_NO_EXPRESSION",
+    "X_V_TEXT_WITH_CHILDREN": 56,
+    "56": "X_V_TEXT_WITH_CHILDREN",
+    "X_V_MODEL_ON_INVALID_ELEMENT": 57,
+    "57": "X_V_MODEL_ON_INVALID_ELEMENT",
+    "X_V_MODEL_ARG_ON_ELEMENT": 58,
+    "58": "X_V_MODEL_ARG_ON_ELEMENT",
+    "X_V_MODEL_ON_FILE_INPUT_ELEMENT": 59,
+    "59": "X_V_MODEL_ON_FILE_INPUT_ELEMENT",
+    "X_V_MODEL_UNNECESSARY_VALUE": 60,
+    "60": "X_V_MODEL_UNNECESSARY_VALUE",
+    "X_V_SHOW_NO_EXPRESSION": 61,
+    "61": "X_V_SHOW_NO_EXPRESSION",
+    "X_TRANSITION_INVALID_CHILDREN": 62,
+    "62": "X_TRANSITION_INVALID_CHILDREN",
+    "X_IGNORED_SIDE_EFFECT_TAG": 63,
+    "63": "X_IGNORED_SIDE_EFFECT_TAG",
+    "__EXTEND_POINT__": 64,
+    "64": "__EXTEND_POINT__"
+  };
+  const DOMErrorMessages = {
+    [53]: `v-html is missing expression.`,
+    [54]: `v-html will override element children.`,
+    [55]: `v-text is missing expression.`,
+    [56]: `v-text will override element children.`,
+    [57]: `v-model can only be used on <input>, <textarea> and <select> elements.`,
+    [58]: `v-model argument is not supported on plain elements.`,
+    [59]: `v-model cannot be used on file inputs since they are read-only. Use a v-on:change listener instead.`,
+    [60]: `Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.`,
+    [61]: `v-show is missing expression.`,
+    [62]: `<Transition> expects exactly one child element or component.`,
+    [63]: `Tags with side effect (<script> and <style>) are ignored in client component templates.`
+  };
+
+  const transformVHtml = (dir, node, context) => {
+    const { exp, loc } = dir;
+    if (!exp) {
+      context.onError(
+        createDOMCompilerError(53, loc)
+      );
+    }
+    if (node.children.length) {
+      context.onError(
+        createDOMCompilerError(54, loc)
+      );
+      node.children.length = 0;
+    }
+    return {
+      props: [
+        createObjectProperty(
+          createSimpleExpression(`innerHTML`, true, loc),
+          exp || createSimpleExpression("", true)
+        )
+      ]
+    };
+  };
+
+  const transformVText = (dir, node, context) => {
+    const { exp, loc } = dir;
+    if (!exp) {
+      context.onError(
+        createDOMCompilerError(55, loc)
+      );
+    }
+    if (node.children.length) {
+      context.onError(
+        createDOMCompilerError(56, loc)
+      );
+      node.children.length = 0;
+    }
+    return {
+      props: [
+        createObjectProperty(
+          createSimpleExpression(`textContent`, true),
+          exp ? getConstantType(exp, context) > 0 ? exp : createCallExpression(
+            context.helperString(TO_DISPLAY_STRING),
+            [exp],
+            loc
+          ) : createSimpleExpression("", true)
+        )
+      ]
+    };
+  };
+
+  const transformModel = (dir, node, context) => {
+    const baseResult = transformModel$1(dir, node, context);
+    if (!baseResult.props.length || node.tagType === 1) {
+      return baseResult;
+    }
+    if (dir.arg) {
+      context.onError(
+        createDOMCompilerError(
+          58,
+          dir.arg.loc
+        )
+      );
+    }
+    function checkDuplicatedValue() {
+      const value = findDir(node, "bind");
+      if (value && isStaticArgOf(value.arg, "value")) {
+        context.onError(
+          createDOMCompilerError(
+            60,
+            value.loc
+          )
+        );
+      }
+    }
+    const { tag } = node;
+    const isCustomElement = context.isCustomElement(tag);
+    if (tag === "input" || tag === "textarea" || tag === "select" || isCustomElement) {
+      let directiveToUse = V_MODEL_TEXT;
+      let isInvalidType = false;
+      if (tag === "input" || isCustomElement) {
+        const type = findProp(node, `type`);
+        if (type) {
+          if (type.type === 7) {
+            directiveToUse = V_MODEL_DYNAMIC;
+          } else if (type.value) {
+            switch (type.value.content) {
+              case "radio":
+                directiveToUse = V_MODEL_RADIO;
+                break;
+              case "checkbox":
+                directiveToUse = V_MODEL_CHECKBOX;
+                break;
+              case "file":
+                isInvalidType = true;
+                context.onError(
+                  createDOMCompilerError(
+                    59,
+                    dir.loc
+                  )
+                );
+                break;
+              default:
+                checkDuplicatedValue();
+                break;
+            }
+          }
+        } else if (hasDynamicKeyVBind(node)) {
+          directiveToUse = V_MODEL_DYNAMIC;
+        } else {
+          checkDuplicatedValue();
+        }
+      } else if (tag === "select") {
+        directiveToUse = V_MODEL_SELECT;
+      } else {
+        checkDuplicatedValue();
+      }
+      if (!isInvalidType) {
+        baseResult.needRuntime = context.helper(directiveToUse);
+      }
+    } else {
+      context.onError(
+        createDOMCompilerError(
+          57,
+          dir.loc
+        )
+      );
+    }
+    baseResult.props = baseResult.props.filter(
+      (p) => !(p.key.type === 4 && p.key.content === "modelValue")
+    );
+    return baseResult;
+  };
+
+  const isEventOptionModifier = /* @__PURE__ */ makeMap(`passive,once,capture`);
+  const isNonKeyModifier = /* @__PURE__ */ makeMap(
+    // event propagation management
+    `stop,prevent,self,ctrl,shift,alt,meta,exact,middle`
+  );
+  const maybeKeyModifier = /* @__PURE__ */ makeMap("left,right");
+  const isKeyboardEvent = /* @__PURE__ */ makeMap(
+    `onkeyup,onkeydown,onkeypress`,
+    true
+  );
+  const resolveModifiers = (key, modifiers, context, loc) => {
+    const keyModifiers = [];
+    const nonKeyModifiers = [];
+    const eventOptionModifiers = [];
+    for (let i = 0; i < modifiers.length; i++) {
+      const modifier = modifiers[i];
+      if (modifier === "native" && checkCompatEnabled(
+        "COMPILER_V_ON_NATIVE",
+        context,
+        loc
+      )) {
+        eventOptionModifiers.push(modifier);
+      } else if (isEventOptionModifier(modifier)) {
+        eventOptionModifiers.push(modifier);
+      } else {
+        if (maybeKeyModifier(modifier)) {
+          if (isStaticExp(key)) {
+            if (isKeyboardEvent(key.content)) {
+              keyModifiers.push(modifier);
+            } else {
+              nonKeyModifiers.push(modifier);
+            }
+          } else {
+            keyModifiers.push(modifier);
+            nonKeyModifiers.push(modifier);
+          }
+        } else {
+          if (isNonKeyModifier(modifier)) {
+            nonKeyModifiers.push(modifier);
+          } else {
+            keyModifiers.push(modifier);
+          }
+        }
+      }
+    }
+    return {
+      keyModifiers,
+      nonKeyModifiers,
+      eventOptionModifiers
+    };
+  };
+  const transformClick = (key, event) => {
+    const isStaticClick = isStaticExp(key) && key.content.toLowerCase() === "onclick";
+    return isStaticClick ? createSimpleExpression(event, true) : key.type !== 4 ? createCompoundExpression([
+      `(`,
+      key,
+      `) === "onClick" ? "${event}" : (`,
+      key,
+      `)`
+    ]) : key;
+  };
+  const transformOn = (dir, node, context) => {
+    return transformOn$1(dir, node, context, (baseResult) => {
+      const { modifiers } = dir;
+      if (!modifiers.length)
+        return baseResult;
+      let { key, value: handlerExp } = baseResult.props[0];
+      const { keyModifiers, nonKeyModifiers, eventOptionModifiers } = resolveModifiers(key, modifiers, context, dir.loc);
+      if (nonKeyModifiers.includes("right")) {
+        key = transformClick(key, `onContextmenu`);
+      }
+      if (nonKeyModifiers.includes("middle")) {
+        key = transformClick(key, `onMouseup`);
+      }
+      if (nonKeyModifiers.length) {
+        handlerExp = createCallExpression(context.helper(V_ON_WITH_MODIFIERS), [
+          handlerExp,
+          JSON.stringify(nonKeyModifiers)
+        ]);
+      }
+      if (keyModifiers.length && // if event name is dynamic, always wrap with keys guard
+      (!isStaticExp(key) || isKeyboardEvent(key.content))) {
+        handlerExp = createCallExpression(context.helper(V_ON_WITH_KEYS), [
+          handlerExp,
+          JSON.stringify(keyModifiers)
+        ]);
+      }
+      if (eventOptionModifiers.length) {
+        const modifierPostfix = eventOptionModifiers.map(capitalize).join("");
+        key = isStaticExp(key) ? createSimpleExpression(`${key.content}${modifierPostfix}`, true) : createCompoundExpression([`(`, key, `) + "${modifierPostfix}"`]);
+      }
+      return {
+        props: [createObjectProperty(key, handlerExp)]
+      };
+    });
+  };
+
+  const transformShow = (dir, node, context) => {
+    const { exp, loc } = dir;
+    if (!exp) {
+      context.onError(
+        createDOMCompilerError(61, loc)
+      );
+    }
+    return {
+      props: [],
+      needRuntime: context.helper(V_SHOW)
+    };
+  };
+
+  const transformTransition = (node, context) => {
+    if (node.type === 1 && node.tagType === 1) {
+      const component = context.isBuiltInComponent(node.tag);
+      if (component === TRANSITION) {
+        return () => {
+          if (!node.children.length) {
+            return;
+          }
+          if (hasMultipleChildren(node)) {
+            context.onError(
+              createDOMCompilerError(
+                62,
+                {
+                  start: node.children[0].loc.start,
+                  end: node.children[node.children.length - 1].loc.end,
+                  source: ""
+                }
+              )
+            );
+          }
+          const child = node.children[0];
+          if (child.type === 1) {
+            for (const p of child.props) {
+              if (p.type === 7 && p.name === "show") {
+                node.props.push({
+                  type: 6,
+                  name: "persisted",
+                  nameLoc: node.loc,
+                  value: void 0,
+                  loc: node.loc
+                });
+              }
+            }
+          }
+        };
+      }
+    }
+  };
+  function hasMultipleChildren(node) {
+    const children = node.children = node.children.filter(
+      (c) => c.type !== 3 && !(c.type === 2 && !c.content.trim())
+    );
+    const child = children[0];
+    return children.length !== 1 || child.type === 11 || child.type === 9 && child.branches.some(hasMultipleChildren);
+  }
+
+  const ignoreSideEffectTags = (node, context) => {
+    if (node.type === 1 && node.tagType === 0 && (node.tag === "script" || node.tag === "style")) {
+      context.onError(
+        createDOMCompilerError(
+          63,
+          node.loc
+        )
+      );
+      context.removeNode();
+    }
+  };
+
+  const DOMNodeTransforms = [
+    transformStyle,
+    ...[transformTransition] 
+  ];
+  const DOMDirectiveTransforms = {
+    cloak: noopDirectiveTransform,
+    html: transformVHtml,
+    text: transformVText,
+    model: transformModel,
+    // override compiler-core
+    on: transformOn,
+    // override compiler-core
+    show: transformShow
+  };
+  function compile(src, options = {}) {
+    return baseCompile(
+      src,
+      extend({}, parserOptions, options, {
+        nodeTransforms: [
+          // ignore <script> and <tag>
+          // this is not put inside DOMNodeTransforms because that list is used
+          // by compiler-ssr to generate vnode fallback branches
+          ignoreSideEffectTags,
+          ...DOMNodeTransforms,
+          ...options.nodeTransforms || []
+        ],
+        directiveTransforms: extend(
+          {},
+          DOMDirectiveTransforms,
+          options.directiveTransforms || {}
+        ),
+        transformHoist: null 
+      })
+    );
+  }
+  function parse(template, options = {}) {
+    return baseParse(template, extend({}, parserOptions, options));
+  }
+
+  exports.BASE_TRANSITION = BASE_TRANSITION;
+  exports.BindingTypes = BindingTypes;
+  exports.CAMELIZE = CAMELIZE;
+  exports.CAPITALIZE = CAPITALIZE;
+  exports.CREATE_BLOCK = CREATE_BLOCK;
+  exports.CREATE_COMMENT = CREATE_COMMENT;
+  exports.CREATE_ELEMENT_BLOCK = CREATE_ELEMENT_BLOCK;
+  exports.CREATE_ELEMENT_VNODE = CREATE_ELEMENT_VNODE;
+  exports.CREATE_SLOTS = CREATE_SLOTS;
+  exports.CREATE_STATIC = CREATE_STATIC;
+  exports.CREATE_TEXT = CREATE_TEXT;
+  exports.CREATE_VNODE = CREATE_VNODE;
+  exports.CompilerDeprecationTypes = CompilerDeprecationTypes;
+  exports.ConstantTypes = ConstantTypes;
+  exports.DOMDirectiveTransforms = DOMDirectiveTransforms;
+  exports.DOMErrorCodes = DOMErrorCodes;
+  exports.DOMErrorMessages = DOMErrorMessages;
+  exports.DOMNodeTransforms = DOMNodeTransforms;
+  exports.ElementTypes = ElementTypes;
+  exports.ErrorCodes = ErrorCodes;
+  exports.FRAGMENT = FRAGMENT;
+  exports.GUARD_REACTIVE_PROPS = GUARD_REACTIVE_PROPS;
+  exports.IS_MEMO_SAME = IS_MEMO_SAME;
+  exports.IS_REF = IS_REF;
+  exports.KEEP_ALIVE = KEEP_ALIVE;
+  exports.MERGE_PROPS = MERGE_PROPS;
+  exports.NORMALIZE_CLASS = NORMALIZE_CLASS;
+  exports.NORMALIZE_PROPS = NORMALIZE_PROPS;
+  exports.NORMALIZE_STYLE = NORMALIZE_STYLE;
+  exports.Namespaces = Namespaces;
+  exports.NodeTypes = NodeTypes;
+  exports.OPEN_BLOCK = OPEN_BLOCK;
+  exports.POP_SCOPE_ID = POP_SCOPE_ID;
+  exports.PUSH_SCOPE_ID = PUSH_SCOPE_ID;
+  exports.RENDER_LIST = RENDER_LIST;
+  exports.RENDER_SLOT = RENDER_SLOT;
+  exports.RESOLVE_COMPONENT = RESOLVE_COMPONENT;
+  exports.RESOLVE_DIRECTIVE = RESOLVE_DIRECTIVE;
+  exports.RESOLVE_DYNAMIC_COMPONENT = RESOLVE_DYNAMIC_COMPONENT;
+  exports.RESOLVE_FILTER = RESOLVE_FILTER;
+  exports.SET_BLOCK_TRACKING = SET_BLOCK_TRACKING;
+  exports.SUSPENSE = SUSPENSE;
+  exports.TELEPORT = TELEPORT;
+  exports.TO_DISPLAY_STRING = TO_DISPLAY_STRING;
+  exports.TO_HANDLERS = TO_HANDLERS;
+  exports.TO_HANDLER_KEY = TO_HANDLER_KEY;
+  exports.TRANSITION = TRANSITION;
+  exports.TRANSITION_GROUP = TRANSITION_GROUP;
+  exports.TS_NODE_TYPES = TS_NODE_TYPES;
+  exports.UNREF = UNREF;
+  exports.V_MODEL_CHECKBOX = V_MODEL_CHECKBOX;
+  exports.V_MODEL_DYNAMIC = V_MODEL_DYNAMIC;
+  exports.V_MODEL_RADIO = V_MODEL_RADIO;
+  exports.V_MODEL_SELECT = V_MODEL_SELECT;
+  exports.V_MODEL_TEXT = V_MODEL_TEXT;
+  exports.V_ON_WITH_KEYS = V_ON_WITH_KEYS;
+  exports.V_ON_WITH_MODIFIERS = V_ON_WITH_MODIFIERS;
+  exports.V_SHOW = V_SHOW;
+  exports.WITH_CTX = WITH_CTX;
+  exports.WITH_DIRECTIVES = WITH_DIRECTIVES;
+  exports.WITH_MEMO = WITH_MEMO;
+  exports.advancePositionWithClone = advancePositionWithClone;
+  exports.advancePositionWithMutation = advancePositionWithMutation;
+  exports.assert = assert;
+  exports.baseCompile = baseCompile;
+  exports.baseParse = baseParse;
+  exports.buildDirectiveArgs = buildDirectiveArgs;
+  exports.buildProps = buildProps;
+  exports.buildSlots = buildSlots;
+  exports.checkCompatEnabled = checkCompatEnabled;
+  exports.compile = compile;
+  exports.convertToBlock = convertToBlock;
+  exports.createArrayExpression = createArrayExpression;
+  exports.createAssignmentExpression = createAssignmentExpression;
+  exports.createBlockStatement = createBlockStatement;
+  exports.createCacheExpression = createCacheExpression;
+  exports.createCallExpression = createCallExpression;
+  exports.createCompilerError = createCompilerError;
+  exports.createCompoundExpression = createCompoundExpression;
+  exports.createConditionalExpression = createConditionalExpression;
+  exports.createDOMCompilerError = createDOMCompilerError;
+  exports.createForLoopParams = createForLoopParams;
+  exports.createFunctionExpression = createFunctionExpression;
+  exports.createIfStatement = createIfStatement;
+  exports.createInterpolation = createInterpolation;
+  exports.createObjectExpression = createObjectExpression;
+  exports.createObjectProperty = createObjectProperty;
+  exports.createReturnStatement = createReturnStatement;
+  exports.createRoot = createRoot;
+  exports.createSequenceExpression = createSequenceExpression;
+  exports.createSimpleExpression = createSimpleExpression;
+  exports.createStructuralDirectiveTransform = createStructuralDirectiveTransform;
+  exports.createTemplateLiteral = createTemplateLiteral;
+  exports.createTransformContext = createTransformContext;
+  exports.createVNodeCall = createVNodeCall;
+  exports.errorMessages = errorMessages;
+  exports.extractIdentifiers = extractIdentifiers;
+  exports.findDir = findDir;
+  exports.findProp = findProp;
+  exports.forAliasRE = forAliasRE;
+  exports.generate = generate;
+  exports.generateCodeFrame = generateCodeFrame;
+  exports.getBaseTransformPreset = getBaseTransformPreset;
+  exports.getConstantType = getConstantType;
+  exports.getMemoedVNodeCall = getMemoedVNodeCall;
+  exports.getVNodeBlockHelper = getVNodeBlockHelper;
+  exports.getVNodeHelper = getVNodeHelper;
+  exports.hasDynamicKeyVBind = hasDynamicKeyVBind;
+  exports.hasScopeRef = hasScopeRef;
+  exports.helperNameMap = helperNameMap;
+  exports.injectProp = injectProp;
+  exports.isCoreComponent = isCoreComponent;
+  exports.isFunctionType = isFunctionType;
+  exports.isInDestructureAssignment = isInDestructureAssignment;
+  exports.isInNewExpression = isInNewExpression;
+  exports.isMemberExpression = isMemberExpression;
+  exports.isMemberExpressionBrowser = isMemberExpressionBrowser;
+  exports.isMemberExpressionNode = isMemberExpressionNode;
+  exports.isReferencedIdentifier = isReferencedIdentifier;
+  exports.isSimpleIdentifier = isSimpleIdentifier;
+  exports.isSlotOutlet = isSlotOutlet;
+  exports.isStaticArgOf = isStaticArgOf;
+  exports.isStaticExp = isStaticExp;
+  exports.isStaticProperty = isStaticProperty;
+  exports.isStaticPropertyKey = isStaticPropertyKey;
+  exports.isTemplateNode = isTemplateNode;
+  exports.isText = isText$1;
+  exports.isVSlot = isVSlot;
+  exports.locStub = locStub;
+  exports.noopDirectiveTransform = noopDirectiveTransform;
+  exports.parse = parse;
+  exports.parserOptions = parserOptions;
+  exports.processExpression = processExpression;
+  exports.processFor = processFor;
+  exports.processIf = processIf;
+  exports.processSlotOutlet = processSlotOutlet;
+  exports.registerRuntimeHelpers = registerRuntimeHelpers;
+  exports.resolveComponentType = resolveComponentType;
+  exports.stringifyExpression = stringifyExpression;
+  exports.toValidAssetId = toValidAssetId;
+  exports.trackSlotScopes = trackSlotScopes;
+  exports.trackVForSlotScopes = trackVForSlotScopes;
+  exports.transform = transform;
+  exports.transformBind = transformBind;
+  exports.transformElement = transformElement;
+  exports.transformExpression = transformExpression;
+  exports.transformModel = transformModel$1;
+  exports.transformOn = transformOn$1;
+  exports.transformStyle = transformStyle;
+  exports.traverseNode = traverseNode;
+  exports.unwrapTSNode = unwrapTSNode;
+  exports.walkBlockDeclarations = walkBlockDeclarations;
+  exports.walkFunctionParams = walkFunctionParams;
+  exports.walkIdentifiers = walkIdentifiers;
+  exports.warnDeprecation = warnDeprecation;
+
+  return exports;
+
+})({});

Fichier diff supprimé car celui-ci est trop grand
+ 6 - 0
node_modules/@vue/compiler-dom/dist/compiler-dom.global.prod.js


+ 7 - 0
node_modules/@vue/compiler-dom/index.js

@@ -0,0 +1,7 @@
+'use strict'
+
+if (process.env.NODE_ENV === 'production') {
+  module.exports = require('./dist/compiler-dom.cjs.prod.js')
+} else {
+  module.exports = require('./dist/compiler-dom.cjs.js')
+}

+ 57 - 0
node_modules/@vue/compiler-dom/package.json

@@ -0,0 +1,57 @@
+{
+  "name": "@vue/compiler-dom",
+  "version": "3.4.27",
+  "description": "@vue/compiler-dom",
+  "main": "index.js",
+  "module": "dist/compiler-dom.esm-bundler.js",
+  "types": "dist/compiler-dom.d.ts",
+  "unpkg": "dist/compiler-dom.global.js",
+  "jsdelivr": "dist/compiler-dom.global.js",
+  "files": [
+    "index.js",
+    "dist"
+  ],
+  "exports": {
+    ".": {
+      "types": "./dist/compiler-dom.d.ts",
+      "node": {
+        "production": "./dist/compiler-dom.cjs.prod.js",
+        "development": "./dist/compiler-dom.cjs.js",
+        "default": "./index.js"
+      },
+      "module": "./dist/compiler-dom.esm-bundler.js",
+      "import": "./dist/compiler-dom.esm-bundler.js",
+      "require": "./index.js"
+    },
+    "./*": "./*"
+  },
+  "sideEffects": false,
+  "buildOptions": {
+    "name": "VueCompilerDOM",
+    "compat": true,
+    "formats": [
+      "esm-bundler",
+      "esm-browser",
+      "cjs",
+      "global"
+    ]
+  },
+  "repository": {
+    "type": "git",
+    "url": "git+https://github.com/vuejs/core.git",
+    "directory": "packages/compiler-dom"
+  },
+  "keywords": [
+    "vue"
+  ],
+  "author": "Evan You",
+  "license": "MIT",
+  "bugs": {
+    "url": "https://github.com/vuejs/core/issues"
+  },
+  "homepage": "https://github.com/vuejs/core/tree/main/packages/compiler-dom#readme",
+  "dependencies": {
+    "@vue/shared": "3.4.27",
+    "@vue/compiler-core": "3.4.27"
+  }
+}

+ 21 - 0
node_modules/@vue/compiler-sfc/LICENSE

@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2018-present, Yuxi (Evan) You
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.

+ 80 - 0
node_modules/@vue/compiler-sfc/README.md

@@ -0,0 +1,80 @@
+# @vue/compiler-sfc
+
+> Lower level utilities for compiling Vue Single File Components
+
+**Note: as of 3.2.13+, this package is included as a dependency of the main `vue` package and can be accessed as `vue/compiler-sfc`. This means you no longer need to explicitly install this package and ensure its version match that of `vue`'s. Just use the main `vue/compiler-sfc` deep import instead.**
+
+This package contains lower level utilities that you can use if you are writing a plugin / transform for a bundler or module system that compiles Vue Single File Components (SFCs) into JavaScript. It is used in [vue-loader](https://github.com/vuejs/vue-loader) and [@vitejs/plugin-vue](https://github.com/vitejs/vite-plugin-vue/tree/main/packages/plugin-vue).
+
+## API
+
+The API is intentionally low-level due to the various considerations when integrating Vue SFCs in a build system:
+
+- Separate hot-module replacement (HMR) for script, template and styles
+
+  - template updates should not reset component state
+  - style updates should be performed without component re-render
+
+- Leveraging the tool's plugin system for pre-processor handling. e.g. `<style lang="scss">` should be processed by the corresponding webpack loader.
+
+- In some cases, transformers of each block in an SFC do not share the same execution context. For example, when used with `thread-loader` or other parallelized configurations, the template sub-loader in `vue-loader` may not have access to the full SFC and its descriptor.
+
+The general idea is to generate a facade module that imports the individual blocks of the component. The trick is the module imports itself with different query strings so that the build system can handle each request as "virtual" modules:
+
+```
+                                  +--------------------+
+                                  |                    |
+                                  |  script transform  |
+                           +----->+                    |
+                           |      +--------------------+
+                           |
++--------------------+     |      +--------------------+
+|                    |     |      |                    |
+|  facade transform  +----------->+ template transform |
+|                    |     |      |                    |
++--------------------+     |      +--------------------+
+                           |
+                           |      +--------------------+
+                           +----->+                    |
+                                  |  style transform   |
+                                  |                    |
+                                  +--------------------+
+```
+
+Where the facade module looks like this:
+
+```js
+// main script
+import script from '/project/foo.vue?vue&type=script'
+// template compiled to render function
+import { render } from '/project/foo.vue?vue&type=template&id=xxxxxx'
+// css
+import '/project/foo.vue?vue&type=style&index=0&id=xxxxxx'
+
+// attach render function to script
+script.render = render
+
+// attach additional metadata
+// some of these should be dev only
+script.__file = 'example.vue'
+script.__scopeId = 'xxxxxx'
+
+// additional tooling-specific HMR handling code
+// using __VUE_HMR_API__ global
+
+export default script
+```
+
+### High Level Workflow
+
+1. In facade transform, parse the source into descriptor with the `parse` API and generate the above facade module code based on the descriptor;
+
+2. In script transform, use `compileScript` to process the script. This handles features like `<script setup>` and CSS variable injection. Alternatively, this can be done directly in the facade module (with the code inlined instead of imported), but it will require rewriting `export default` to a temp variable (a `rewriteDefault` convenience API is provided for this purpose) so additional options can be attached to the exported object.
+
+3. In template transform, use `compileTemplate` to compile the raw template into render function code.
+
+4. In style transform, use `compileStyle` to compile raw CSS to handle `<style scoped>`, `<style module>` and CSS variable injection.
+
+Options needed for these APIs can be passed via the query string.
+
+For detailed API references and options, check out the source type definitions. For actual usage of these APIs, check out [@vitejs/plugin-vue](https://github.com/vitejs/vite-plugin-vue/tree/main/packages/plugin-vue) or [vue-loader](https://github.com/vuejs/vue-loader/tree/next).

Fichier diff supprimé car celui-ci est trop grand
+ 13093 - 0
node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js


+ 542 - 0
node_modules/@vue/compiler-sfc/dist/compiler-sfc.d.ts

@@ -0,0 +1,542 @@
+import * as _babel_types from '@babel/types';
+import { Statement, Expression, TSType, Node, Program, CallExpression, ObjectPattern, TSModuleDeclaration, TSPropertySignature, TSMethodSignature, TSCallSignatureDeclaration, TSFunctionType } from '@babel/types';
+import { RootNode, CompilerOptions, CodegenResult, ParserOptions, CompilerError, RawSourceMap, SourceLocation, BindingMetadata as BindingMetadata$1 } from '@vue/compiler-core';
+export { BindingMetadata, CompilerError, CompilerOptions, extractIdentifiers, generateCodeFrame, isInDestructureAssignment, isStaticProperty, walkIdentifiers } from '@vue/compiler-core';
+import { ParserPlugin } from '@babel/parser';
+export { parse as babelParse } from '@babel/parser';
+import { Result, LazyResult } from 'postcss';
+import MagicString from 'magic-string';
+export { default as MagicString } from 'magic-string';
+import TS from 'typescript';
+
+export interface AssetURLTagConfig {
+    [name: string]: string[];
+}
+export interface AssetURLOptions {
+    /**
+     * If base is provided, instead of transforming relative asset urls into
+     * imports, they will be directly rewritten to absolute urls.
+     */
+    base?: string | null;
+    /**
+     * If true, also processes absolute urls.
+     */
+    includeAbsolute?: boolean;
+    tags?: AssetURLTagConfig;
+}
+
+export interface TemplateCompiler {
+    compile(source: string | RootNode, options: CompilerOptions): CodegenResult;
+    parse(template: string, options: ParserOptions): RootNode;
+}
+export interface SFCTemplateCompileResults {
+    code: string;
+    ast?: RootNode;
+    preamble?: string;
+    source: string;
+    tips: string[];
+    errors: (string | CompilerError)[];
+    map?: RawSourceMap;
+}
+export interface SFCTemplateCompileOptions {
+    source: string;
+    ast?: RootNode;
+    filename: string;
+    id: string;
+    scoped?: boolean;
+    slotted?: boolean;
+    isProd?: boolean;
+    ssr?: boolean;
+    ssrCssVars?: string[];
+    inMap?: RawSourceMap;
+    compiler?: TemplateCompiler;
+    compilerOptions?: CompilerOptions;
+    preprocessLang?: string;
+    preprocessOptions?: any;
+    /**
+     * In some cases, compiler-sfc may not be inside the project root (e.g. when
+     * linked or globally installed). In such cases a custom `require` can be
+     * passed to correctly resolve the preprocessors.
+     */
+    preprocessCustomRequire?: (id: string) => any;
+    /**
+     * Configure what tags/attributes to transform into asset url imports,
+     * or disable the transform altogether with `false`.
+     */
+    transformAssetUrls?: AssetURLOptions | AssetURLTagConfig | boolean;
+}
+export declare function compileTemplate(options: SFCTemplateCompileOptions): SFCTemplateCompileResults;
+
+export interface SFCScriptCompileOptions {
+    /**
+     * Scope ID for prefixing injected CSS variables.
+     * This must be consistent with the `id` passed to `compileStyle`.
+     */
+    id: string;
+    /**
+     * Production mode. Used to determine whether to generate hashed CSS variables
+     */
+    isProd?: boolean;
+    /**
+     * Enable/disable source map. Defaults to true.
+     */
+    sourceMap?: boolean;
+    /**
+     * https://babeljs.io/docs/en/babel-parser#plugins
+     */
+    babelParserPlugins?: ParserPlugin[];
+    /**
+     * A list of files to parse for global types to be made available for type
+     * resolving in SFC macros. The list must be fully resolved file system paths.
+     */
+    globalTypeFiles?: string[];
+    /**
+     * Compile the template and inline the resulting render function
+     * directly inside setup().
+     * - Only affects `<script setup>`
+     * - This should only be used in production because it prevents the template
+     * from being hot-reloaded separately from component state.
+     */
+    inlineTemplate?: boolean;
+    /**
+     * Generate the final component as a variable instead of default export.
+     * This is useful in e.g. @vitejs/plugin-vue where the script needs to be
+     * placed inside the main module.
+     */
+    genDefaultAs?: string;
+    /**
+     * Options for template compilation when inlining. Note these are options that
+     * would normally be passed to `compiler-sfc`'s own `compileTemplate()`, not
+     * options passed to `compiler-dom`.
+     */
+    templateOptions?: Partial<SFCTemplateCompileOptions>;
+    /**
+     * Hoist <script setup> static constants.
+     * - Only enables when one `<script setup>` exists.
+     * @default true
+     */
+    hoistStatic?: boolean;
+    /**
+     * (**Experimental**) Enable reactive destructure for `defineProps`
+     * @default false
+     */
+    propsDestructure?: boolean;
+    /**
+     * File system access methods to be used when resolving types
+     * imported in SFC macros. Defaults to ts.sys in Node.js, can be overwritten
+     * to use a virtual file system for use in browsers (e.g. in REPLs)
+     */
+    fs?: {
+        fileExists(file: string): boolean;
+        readFile(file: string): string | undefined;
+        realpath?(file: string): string;
+    };
+    /**
+     * Transform Vue SFCs into custom elements.
+     */
+    customElement?: boolean | ((filename: string) => boolean);
+}
+interface ImportBinding {
+    isType: boolean;
+    imported: string;
+    local: string;
+    source: string;
+    isFromSetup: boolean;
+    isUsedInTemplate: boolean;
+}
+/**
+ * Compile `<script setup>`
+ * It requires the whole SFC descriptor because we need to handle and merge
+ * normal `<script>` + `<script setup>` if both are present.
+ */
+export declare function compileScript(sfc: SFCDescriptor, options: SFCScriptCompileOptions): SFCScriptBlock;
+
+export interface SFCParseOptions {
+    filename?: string;
+    sourceMap?: boolean;
+    sourceRoot?: string;
+    pad?: boolean | 'line' | 'space';
+    ignoreEmpty?: boolean;
+    compiler?: TemplateCompiler;
+    templateParseOptions?: ParserOptions;
+    /**
+     * TODO remove in 3.5
+     * @deprecated use `templateParseOptions: { prefixIdentifiers: false }` instead
+     */
+    parseExpressions?: boolean;
+}
+export interface SFCBlock {
+    type: string;
+    content: string;
+    attrs: Record<string, string | true>;
+    loc: SourceLocation;
+    map?: RawSourceMap;
+    lang?: string;
+    src?: string;
+}
+export interface SFCTemplateBlock extends SFCBlock {
+    type: 'template';
+    ast?: RootNode;
+}
+export interface SFCScriptBlock extends SFCBlock {
+    type: 'script';
+    setup?: string | boolean;
+    bindings?: BindingMetadata$1;
+    imports?: Record<string, ImportBinding>;
+    scriptAst?: _babel_types.Statement[];
+    scriptSetupAst?: _babel_types.Statement[];
+    warnings?: string[];
+    /**
+     * Fully resolved dependency file paths (unix slashes) with imported types
+     * used in macros, used for HMR cache busting in @vitejs/plugin-vue and
+     * vue-loader.
+     */
+    deps?: string[];
+}
+export interface SFCStyleBlock extends SFCBlock {
+    type: 'style';
+    scoped?: boolean;
+    module?: string | boolean;
+}
+export interface SFCDescriptor {
+    filename: string;
+    source: string;
+    template: SFCTemplateBlock | null;
+    script: SFCScriptBlock | null;
+    scriptSetup: SFCScriptBlock | null;
+    styles: SFCStyleBlock[];
+    customBlocks: SFCBlock[];
+    cssVars: string[];
+    /**
+     * whether the SFC uses :slotted() modifier.
+     * this is used as a compiler optimization hint.
+     */
+    slotted: boolean;
+    /**
+     * compare with an existing descriptor to determine whether HMR should perform
+     * a reload vs. re-render.
+     *
+     * Note: this comparison assumes the prev/next script are already identical,
+     * and only checks the special case where <script setup lang="ts"> unused import
+     * pruning result changes due to template changes.
+     */
+    shouldForceReload: (prevImports: Record<string, ImportBinding>) => boolean;
+}
+export interface SFCParseResult {
+    descriptor: SFCDescriptor;
+    errors: (CompilerError | SyntaxError)[];
+}
+export declare function parse(source: string, options?: SFCParseOptions): SFCParseResult;
+
+type PreprocessLang = 'less' | 'sass' | 'scss' | 'styl' | 'stylus';
+
+export interface SFCStyleCompileOptions {
+    source: string;
+    filename: string;
+    id: string;
+    scoped?: boolean;
+    trim?: boolean;
+    isProd?: boolean;
+    inMap?: RawSourceMap;
+    preprocessLang?: PreprocessLang;
+    preprocessOptions?: any;
+    preprocessCustomRequire?: (id: string) => any;
+    postcssOptions?: any;
+    postcssPlugins?: any[];
+    /**
+     * @deprecated use `inMap` instead.
+     */
+    map?: RawSourceMap;
+}
+/**
+ * Aligns with postcss-modules
+ * https://github.com/css-modules/postcss-modules
+ */
+interface CSSModulesOptions {
+    scopeBehaviour?: 'global' | 'local';
+    generateScopedName?: string | ((name: string, filename: string, css: string) => string);
+    hashPrefix?: string;
+    localsConvention?: 'camelCase' | 'camelCaseOnly' | 'dashes' | 'dashesOnly';
+    exportGlobals?: boolean;
+    globalModulePaths?: RegExp[];
+}
+export interface SFCAsyncStyleCompileOptions extends SFCStyleCompileOptions {
+    isAsync?: boolean;
+    modules?: boolean;
+    modulesOptions?: CSSModulesOptions;
+}
+export interface SFCStyleCompileResults {
+    code: string;
+    map: RawSourceMap | undefined;
+    rawResult: Result | LazyResult | undefined;
+    errors: Error[];
+    modules?: Record<string, string>;
+    dependencies: Set<string>;
+}
+export declare function compileStyle(options: SFCStyleCompileOptions): SFCStyleCompileResults;
+export declare function compileStyleAsync(options: SFCAsyncStyleCompileOptions): Promise<SFCStyleCompileResults>;
+
+export declare function rewriteDefault(input: string, as: string, parserPlugins?: ParserPlugin[]): string;
+/**
+ * Utility for rewriting `export default` in a script block into a variable
+ * declaration so that we can inject things into it
+ */
+export declare function rewriteDefaultAST(ast: Statement[], s: MagicString, as: string): void;
+
+type PropsDestructureBindings = Record<string, // public prop key
+{
+    local: string;
+    default?: Expression;
+}>;
+export declare function extractRuntimeProps(ctx: TypeResolveContext): string | undefined;
+
+interface ModelDecl {
+    type: TSType | undefined;
+    options: string | undefined;
+    identifier: string | undefined;
+    runtimeOptionNodes: Node[];
+}
+
+declare enum BindingTypes {
+    /**
+     * returned from data()
+     */
+    DATA = "data",
+    /**
+     * declared as a prop
+     */
+    PROPS = "props",
+    /**
+     * a local alias of a `<script setup>` destructured prop.
+     * the original is stored in __propsAliases of the bindingMetadata object.
+     */
+    PROPS_ALIASED = "props-aliased",
+    /**
+     * a let binding (may or may not be a ref)
+     */
+    SETUP_LET = "setup-let",
+    /**
+     * a const binding that can never be a ref.
+     * these bindings don't need `unref()` calls when processed in inlined
+     * template expressions.
+     */
+    SETUP_CONST = "setup-const",
+    /**
+     * a const binding that does not need `unref()`, but may be mutated.
+     */
+    SETUP_REACTIVE_CONST = "setup-reactive-const",
+    /**
+     * a const binding that may be a ref.
+     */
+    SETUP_MAYBE_REF = "setup-maybe-ref",
+    /**
+     * bindings that are guaranteed to be refs
+     */
+    SETUP_REF = "setup-ref",
+    /**
+     * declared by other options, e.g. computed, inject
+     */
+    OPTIONS = "options",
+    /**
+     * a literal constant, e.g. 'foo', 1, true
+     */
+    LITERAL_CONST = "literal-const"
+}
+type BindingMetadata = {
+    [key: string]: BindingTypes | undefined;
+} & {
+    __isScriptSetup?: boolean;
+    __propsAliases?: Record<string, string>;
+};
+
+export declare class ScriptCompileContext {
+    descriptor: SFCDescriptor;
+    options: Partial<SFCScriptCompileOptions>;
+    isJS: boolean;
+    isTS: boolean;
+    isCE: boolean;
+    scriptAst: Program | null;
+    scriptSetupAst: Program | null;
+    source: string;
+    filename: string;
+    s: MagicString;
+    startOffset: number | undefined;
+    endOffset: number | undefined;
+    scope?: TypeScope;
+    globalScopes?: TypeScope[];
+    userImports: Record<string, ImportBinding>;
+    hasDefinePropsCall: boolean;
+    hasDefineEmitCall: boolean;
+    hasDefineExposeCall: boolean;
+    hasDefaultExportName: boolean;
+    hasDefaultExportRender: boolean;
+    hasDefineOptionsCall: boolean;
+    hasDefineSlotsCall: boolean;
+    hasDefineModelCall: boolean;
+    propsCall: CallExpression | undefined;
+    propsDecl: Node | undefined;
+    propsRuntimeDecl: Node | undefined;
+    propsTypeDecl: Node | undefined;
+    propsDestructureDecl: ObjectPattern | undefined;
+    propsDestructuredBindings: PropsDestructureBindings;
+    propsDestructureRestId: string | undefined;
+    propsRuntimeDefaults: Node | undefined;
+    emitsRuntimeDecl: Node | undefined;
+    emitsTypeDecl: Node | undefined;
+    emitDecl: Node | undefined;
+    modelDecls: Record<string, ModelDecl>;
+    optionsRuntimeDecl: Node | undefined;
+    bindingMetadata: BindingMetadata;
+    helperImports: Set<string>;
+    helper(key: string): string;
+    /**
+     * to be exposed on compiled script block for HMR cache busting
+     */
+    deps?: Set<string>;
+    /**
+     * cache for resolved fs
+     */
+    fs?: NonNullable<SFCScriptCompileOptions['fs']>;
+    constructor(descriptor: SFCDescriptor, options: Partial<SFCScriptCompileOptions>);
+    getString(node: Node, scriptSetup?: boolean): string;
+    error(msg: string, node: Node, scope?: TypeScope): never;
+}
+
+export type SimpleTypeResolveOptions = Partial<Pick<SFCScriptCompileOptions, 'globalTypeFiles' | 'fs' | 'babelParserPlugins' | 'isProd'>>;
+/**
+ * TypeResolveContext is compatible with ScriptCompileContext
+ * but also allows a simpler version of it with minimal required properties
+ * when resolveType needs to be used in a non-SFC context, e.g. in a babel
+ * plugin. The simplest context can be just:
+ * ```ts
+ * const ctx: SimpleTypeResolveContext = {
+ *   filename: '...',
+ *   source: '...',
+ *   options: {},
+ *   error() {},
+ *   ast: []
+ * }
+ * ```
+ */
+export type SimpleTypeResolveContext = Pick<ScriptCompileContext, 'source' | 'filename' | 'error' | 'helper' | 'getString' | 'propsTypeDecl' | 'propsRuntimeDefaults' | 'propsDestructuredBindings' | 'emitsTypeDecl' | 'isCE'> & Partial<Pick<ScriptCompileContext, 'scope' | 'globalScopes' | 'deps' | 'fs'>> & {
+    ast: Statement[];
+    options: SimpleTypeResolveOptions;
+};
+export type TypeResolveContext = ScriptCompileContext | SimpleTypeResolveContext;
+type Import = Pick<ImportBinding, 'source' | 'imported'>;
+interface WithScope {
+    _ownerScope: TypeScope;
+}
+type ScopeTypeNode = Node & WithScope & {
+    _ns?: TSModuleDeclaration & WithScope;
+};
+declare class TypeScope {
+    filename: string;
+    source: string;
+    offset: number;
+    imports: Record<string, Import>;
+    types: Record<string, ScopeTypeNode>;
+    declares: Record<string, ScopeTypeNode>;
+    constructor(filename: string, source: string, offset?: number, imports?: Record<string, Import>, types?: Record<string, ScopeTypeNode>, declares?: Record<string, ScopeTypeNode>);
+    isGenericScope: boolean;
+    resolvedImportSources: Record<string, string>;
+    exportedTypes: Record<string, ScopeTypeNode>;
+    exportedDeclares: Record<string, ScopeTypeNode>;
+}
+interface MaybeWithScope {
+    _ownerScope?: TypeScope;
+}
+interface ResolvedElements {
+    props: Record<string, (TSPropertySignature | TSMethodSignature) & {
+        _ownerScope: TypeScope;
+    }>;
+    calls?: (TSCallSignatureDeclaration | TSFunctionType)[];
+}
+/**
+ * Resolve arbitrary type node to a list of type elements that can be then
+ * mapped to runtime props or emits.
+ */
+export declare function resolveTypeElements(ctx: TypeResolveContext, node: Node & MaybeWithScope & {
+    _resolvedElements?: ResolvedElements;
+}, scope?: TypeScope, typeParameters?: Record<string, Node>): ResolvedElements;
+/**
+ * @private
+ */
+export declare function registerTS(_loadTS: () => typeof TS): void;
+/**
+ * @private
+ */
+export declare function invalidateTypeCache(filename: string): void;
+export declare function inferRuntimeType(ctx: TypeResolveContext, node: Node & MaybeWithScope, scope?: TypeScope, isKeyOf?: boolean): string[];
+
+export declare function extractRuntimeEmits(ctx: TypeResolveContext): Set<string>;
+
+export declare const version: string;
+
+export declare const parseCache: Map<string, SFCParseResult>;
+export declare const errorMessages: {
+    0: string;
+    1: string;
+    2: string;
+    3: string;
+    4: string;
+    5: string;
+    6: string;
+    7: string;
+    8: string;
+    9: string;
+    10: string;
+    11: string;
+    12: string;
+    13: string;
+    14: string;
+    15: string;
+    16: string;
+    17: string;
+    18: string;
+    19: string;
+    20: string;
+    21: string;
+    22: string;
+    23: string;
+    24: string;
+    25: string;
+    26: string;
+    27: string;
+    28: string;
+    29: string;
+    30: string;
+    31: string;
+    32: string;
+    33: string;
+    34: string;
+    35: string;
+    36: string;
+    37: string;
+    38: string;
+    39: string;
+    40: string;
+    41: string;
+    42: string;
+    43: string;
+    44: string;
+    45: string;
+    46: string;
+    47: string;
+    48: string;
+    49: string;
+    50: string;
+    51: string;
+    52: string;
+    53: string;
+};
+
+export declare const walk: any;
+
+/**
+ * @deprecated this is preserved to avoid breaking vite-plugin-vue < 5.0
+ * with reactivityTransform: true. The desired behavior should be silently
+ * ignoring the option instead of breaking.
+ */
+export declare const shouldTransformRef: () => boolean;
+

Fichier diff supprimé car celui-ci est trop grand
+ 231 - 0
node_modules/@vue/compiler-sfc/dist/compiler-sfc.esm-browser.js


+ 67 - 0
node_modules/@vue/compiler-sfc/package.json

@@ -0,0 +1,67 @@
+{
+  "name": "@vue/compiler-sfc",
+  "version": "3.4.27",
+  "description": "@vue/compiler-sfc",
+  "main": "dist/compiler-sfc.cjs.js",
+  "module": "dist/compiler-sfc.esm-browser.js",
+  "types": "dist/compiler-sfc.d.ts",
+  "files": [
+    "dist"
+  ],
+  "exports": {
+    ".": {
+      "types": "./dist/compiler-sfc.d.ts",
+      "node": "./dist/compiler-sfc.cjs.js",
+      "module": "./dist/compiler-sfc.esm-browser.js",
+      "import": "./dist/compiler-sfc.esm-browser.js",
+      "require": "./dist/compiler-sfc.cjs.js"
+    },
+    "./*": "./*"
+  },
+  "buildOptions": {
+    "name": "VueCompilerSFC",
+    "formats": [
+      "cjs",
+      "esm-browser"
+    ],
+    "prod": false,
+    "enableNonBrowserBranches": true
+  },
+  "repository": {
+    "type": "git",
+    "url": "git+https://github.com/vuejs/core.git",
+    "directory": "packages/compiler-sfc"
+  },
+  "keywords": [
+    "vue"
+  ],
+  "author": "Evan You",
+  "license": "MIT",
+  "bugs": {
+    "url": "https://github.com/vuejs/core/issues"
+  },
+  "homepage": "https://github.com/vuejs/core/tree/main/packages/compiler-sfc#readme",
+  "dependencies": {
+    "@babel/parser": "^7.24.4",
+    "estree-walker": "^2.0.2",
+    "magic-string": "^0.30.10",
+    "postcss": "^8.4.38",
+    "source-map-js": "^1.2.0",
+    "@vue/shared": "3.4.27",
+    "@vue/compiler-core": "3.4.27",
+    "@vue/compiler-ssr": "3.4.27",
+    "@vue/compiler-dom": "3.4.27"
+  },
+  "devDependencies": {
+    "@babel/types": "^7.24.0",
+    "@vue/consolidate": "^1.0.0",
+    "hash-sum": "^2.0.0",
+    "lru-cache": "10.1.0",
+    "merge-source-map": "^1.1.0",
+    "minimatch": "^9.0.4",
+    "postcss-modules": "^6.0.0",
+    "postcss-selector-parser": "^6.0.16",
+    "pug": "^3.0.2",
+    "sass": "^1.76.0"
+  }
+}

+ 21 - 0
node_modules/@vue/compiler-ssr/LICENSE

@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2018-present, Yuxi (Evan) You
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.

+ 1 - 0
node_modules/@vue/compiler-ssr/README.md

@@ -0,0 +1 @@
+# @vue/compiler-ssr

+ 1376 - 0
node_modules/@vue/compiler-ssr/dist/compiler-ssr.cjs.js

@@ -0,0 +1,1376 @@
+/**
+* @vue/compiler-ssr v3.4.27
+* (c) 2018-present Yuxi (Evan) You and Vue contributors
+* @license MIT
+**/
+'use strict';
+
+Object.defineProperty(exports, '__esModule', { value: true });
+
+var compilerDom = require('@vue/compiler-dom');
+var shared = require('@vue/shared');
+
+const SSR_INTERPOLATE = Symbol(`ssrInterpolate`);
+const SSR_RENDER_VNODE = Symbol(`ssrRenderVNode`);
+const SSR_RENDER_COMPONENT = Symbol(`ssrRenderComponent`);
+const SSR_RENDER_SLOT = Symbol(`ssrRenderSlot`);
+const SSR_RENDER_SLOT_INNER = Symbol(`ssrRenderSlotInner`);
+const SSR_RENDER_CLASS = Symbol(`ssrRenderClass`);
+const SSR_RENDER_STYLE = Symbol(`ssrRenderStyle`);
+const SSR_RENDER_ATTRS = Symbol(`ssrRenderAttrs`);
+const SSR_RENDER_ATTR = Symbol(`ssrRenderAttr`);
+const SSR_RENDER_DYNAMIC_ATTR = Symbol(`ssrRenderDynamicAttr`);
+const SSR_RENDER_LIST = Symbol(`ssrRenderList`);
+const SSR_INCLUDE_BOOLEAN_ATTR = Symbol(`ssrIncludeBooleanAttr`);
+const SSR_LOOSE_EQUAL = Symbol(`ssrLooseEqual`);
+const SSR_LOOSE_CONTAIN = Symbol(`ssrLooseContain`);
+const SSR_RENDER_DYNAMIC_MODEL = Symbol(`ssrRenderDynamicModel`);
+const SSR_GET_DYNAMIC_MODEL_PROPS = Symbol(`ssrGetDynamicModelProps`);
+const SSR_RENDER_TELEPORT = Symbol(`ssrRenderTeleport`);
+const SSR_RENDER_SUSPENSE = Symbol(`ssrRenderSuspense`);
+const SSR_GET_DIRECTIVE_PROPS = Symbol(`ssrGetDirectiveProps`);
+const ssrHelpers = {
+  [SSR_INTERPOLATE]: `ssrInterpolate`,
+  [SSR_RENDER_VNODE]: `ssrRenderVNode`,
+  [SSR_RENDER_COMPONENT]: `ssrRenderComponent`,
+  [SSR_RENDER_SLOT]: `ssrRenderSlot`,
+  [SSR_RENDER_SLOT_INNER]: `ssrRenderSlotInner`,
+  [SSR_RENDER_CLASS]: `ssrRenderClass`,
+  [SSR_RENDER_STYLE]: `ssrRenderStyle`,
+  [SSR_RENDER_ATTRS]: `ssrRenderAttrs`,
+  [SSR_RENDER_ATTR]: `ssrRenderAttr`,
+  [SSR_RENDER_DYNAMIC_ATTR]: `ssrRenderDynamicAttr`,
+  [SSR_RENDER_LIST]: `ssrRenderList`,
+  [SSR_INCLUDE_BOOLEAN_ATTR]: `ssrIncludeBooleanAttr`,
+  [SSR_LOOSE_EQUAL]: `ssrLooseEqual`,
+  [SSR_LOOSE_CONTAIN]: `ssrLooseContain`,
+  [SSR_RENDER_DYNAMIC_MODEL]: `ssrRenderDynamicModel`,
+  [SSR_GET_DYNAMIC_MODEL_PROPS]: `ssrGetDynamicModelProps`,
+  [SSR_RENDER_TELEPORT]: `ssrRenderTeleport`,
+  [SSR_RENDER_SUSPENSE]: `ssrRenderSuspense`,
+  [SSR_GET_DIRECTIVE_PROPS]: `ssrGetDirectiveProps`
+};
+compilerDom.registerRuntimeHelpers(ssrHelpers);
+
+const ssrTransformIf = compilerDom.createStructuralDirectiveTransform(
+  /^(if|else|else-if)$/,
+  compilerDom.processIf
+);
+function ssrProcessIf(node, context, disableNestedFragments = false, disableCommentAsIfAlternate = false) {
+  const [rootBranch] = node.branches;
+  const ifStatement = compilerDom.createIfStatement(
+    rootBranch.condition,
+    processIfBranch(rootBranch, context, disableNestedFragments)
+  );
+  context.pushStatement(ifStatement);
+  let currentIf = ifStatement;
+  for (let i = 1; i < node.branches.length; i++) {
+    const branch = node.branches[i];
+    const branchBlockStatement = processIfBranch(
+      branch,
+      context,
+      disableNestedFragments
+    );
+    if (branch.condition) {
+      currentIf = currentIf.alternate = compilerDom.createIfStatement(
+        branch.condition,
+        branchBlockStatement
+      );
+    } else {
+      currentIf.alternate = branchBlockStatement;
+    }
+  }
+  if (!currentIf.alternate && !disableCommentAsIfAlternate) {
+    currentIf.alternate = compilerDom.createBlockStatement([
+      compilerDom.createCallExpression(`_push`, ["`<!---->`"])
+    ]);
+  }
+}
+function processIfBranch(branch, context, disableNestedFragments = false) {
+  const { children } = branch;
+  const needFragmentWrapper = !disableNestedFragments && (children.length !== 1 || children[0].type !== 1) && // optimize away nested fragments when the only child is a ForNode
+  !(children.length === 1 && children[0].type === 11);
+  return processChildrenAsStatement(branch, context, needFragmentWrapper);
+}
+
+const ssrTransformFor = compilerDom.createStructuralDirectiveTransform(
+  "for",
+  compilerDom.processFor
+);
+function ssrProcessFor(node, context, disableNestedFragments = false) {
+  const needFragmentWrapper = !disableNestedFragments && (node.children.length !== 1 || node.children[0].type !== 1);
+  const renderLoop = compilerDom.createFunctionExpression(
+    compilerDom.createForLoopParams(node.parseResult)
+  );
+  renderLoop.body = processChildrenAsStatement(
+    node,
+    context,
+    needFragmentWrapper
+  );
+  if (!disableNestedFragments) {
+    context.pushStringPart(`<!--[-->`);
+  }
+  context.pushStatement(
+    compilerDom.createCallExpression(context.helper(SSR_RENDER_LIST), [
+      node.source,
+      renderLoop
+    ])
+  );
+  if (!disableNestedFragments) {
+    context.pushStringPart(`<!--]-->`);
+  }
+}
+
+const ssrTransformSlotOutlet = (node, context) => {
+  if (compilerDom.isSlotOutlet(node)) {
+    const { slotName, slotProps } = compilerDom.processSlotOutlet(node, context);
+    const args = [
+      `_ctx.$slots`,
+      slotName,
+      slotProps || `{}`,
+      // fallback content placeholder. will be replaced in the process phase
+      `null`,
+      `_push`,
+      `_parent`
+    ];
+    if (context.scopeId && context.slotted !== false) {
+      args.push(`"${context.scopeId}-s"`);
+    }
+    let method = SSR_RENDER_SLOT;
+    let parent = context.parent;
+    if (parent) {
+      const children = parent.children;
+      if (parent.type === 10) {
+        parent = context.grandParent;
+      }
+      let componentType;
+      if (parent.type === 1 && parent.tagType === 1 && ((componentType = compilerDom.resolveComponentType(parent, context, true)) === compilerDom.TRANSITION || componentType === compilerDom.TRANSITION_GROUP) && children.filter((c) => c.type === 1).length === 1) {
+        method = SSR_RENDER_SLOT_INNER;
+        if (!(context.scopeId && context.slotted !== false)) {
+          args.push("null");
+        }
+        args.push("true");
+      }
+    }
+    node.ssrCodegenNode = compilerDom.createCallExpression(context.helper(method), args);
+  }
+};
+function ssrProcessSlotOutlet(node, context) {
+  const renderCall = node.ssrCodegenNode;
+  if (node.children.length) {
+    const fallbackRenderFn = compilerDom.createFunctionExpression([]);
+    fallbackRenderFn.body = processChildrenAsStatement(node, context);
+    renderCall.arguments[3] = fallbackRenderFn;
+  }
+  if (context.withSlotScopeId) {
+    const slotScopeId = renderCall.arguments[6];
+    renderCall.arguments[6] = slotScopeId ? `${slotScopeId} + _scopeId` : `_scopeId`;
+  }
+  context.pushStatement(node.ssrCodegenNode);
+}
+
+function createSSRCompilerError(code, loc) {
+  return compilerDom.createCompilerError(code, loc, SSRErrorMessages);
+}
+const SSRErrorMessages = {
+  [65]: `Unsafe attribute name for SSR.`,
+  [66]: `Missing the 'to' prop on teleport element.`,
+  [67]: `Invalid AST node during SSR transform.`
+};
+
+function ssrProcessTeleport(node, context) {
+  const targetProp = compilerDom.findProp(node, "to");
+  if (!targetProp) {
+    context.onError(
+      createSSRCompilerError(66, node.loc)
+    );
+    return;
+  }
+  let target;
+  if (targetProp.type === 6) {
+    target = targetProp.value && compilerDom.createSimpleExpression(targetProp.value.content, true);
+  } else {
+    target = targetProp.exp;
+  }
+  if (!target) {
+    context.onError(
+      createSSRCompilerError(
+        66,
+        targetProp.loc
+      )
+    );
+    return;
+  }
+  const disabledProp = compilerDom.findProp(
+    node,
+    "disabled",
+    false,
+    true
+    /* allow empty */
+  );
+  const disabled = disabledProp ? disabledProp.type === 6 ? `true` : disabledProp.exp || `false` : `false`;
+  const contentRenderFn = compilerDom.createFunctionExpression(
+    [`_push`],
+    void 0,
+    // Body is added later
+    true,
+    // newline
+    false,
+    // isSlot
+    node.loc
+  );
+  contentRenderFn.body = processChildrenAsStatement(node, context);
+  context.pushStatement(
+    compilerDom.createCallExpression(context.helper(SSR_RENDER_TELEPORT), [
+      `_push`,
+      contentRenderFn,
+      target,
+      disabled,
+      `_parent`
+    ])
+  );
+}
+
+const wipMap$3 = /* @__PURE__ */ new WeakMap();
+function ssrTransformSuspense(node, context) {
+  return () => {
+    if (node.children.length) {
+      const wipEntry = {
+        slotsExp: null,
+        // to be immediately set
+        wipSlots: []
+      };
+      wipMap$3.set(node, wipEntry);
+      wipEntry.slotsExp = compilerDom.buildSlots(
+        node,
+        context,
+        (_props, _vForExp, children, loc) => {
+          const fn = compilerDom.createFunctionExpression(
+            [],
+            void 0,
+            // no return, assign body later
+            true,
+            // newline
+            false,
+            // suspense slots are not treated as normal slots
+            loc
+          );
+          wipEntry.wipSlots.push({
+            fn,
+            children
+          });
+          return fn;
+        }
+      ).slots;
+    }
+  };
+}
+function ssrProcessSuspense(node, context) {
+  const wipEntry = wipMap$3.get(node);
+  if (!wipEntry) {
+    return;
+  }
+  const { slotsExp, wipSlots } = wipEntry;
+  for (let i = 0; i < wipSlots.length; i++) {
+    const slot = wipSlots[i];
+    slot.fn.body = processChildrenAsStatement(slot, context);
+  }
+  context.pushStatement(
+    compilerDom.createCallExpression(context.helper(SSR_RENDER_SUSPENSE), [
+      `_push`,
+      slotsExp
+    ])
+  );
+}
+
+const rawChildrenMap = /* @__PURE__ */ new WeakMap();
+const ssrTransformElement = (node, context) => {
+  if (node.type !== 1 || node.tagType !== 0) {
+    return;
+  }
+  return function ssrPostTransformElement() {
+    const openTag = [`<${node.tag}`];
+    const needTagForRuntime = node.tag === "textarea" || node.tag.indexOf("-") > 0;
+    const hasDynamicVBind = compilerDom.hasDynamicKeyVBind(node);
+    const hasCustomDir = node.props.some(
+      (p) => p.type === 7 && !shared.isBuiltInDirective(p.name)
+    );
+    const needMergeProps = hasDynamicVBind || hasCustomDir;
+    if (needMergeProps) {
+      const { props, directives } = compilerDom.buildProps(
+        node,
+        context,
+        node.props,
+        false,
+        false,
+        true
+      );
+      if (props || directives.length) {
+        const mergedProps = buildSSRProps(props, directives, context);
+        const propsExp = compilerDom.createCallExpression(
+          context.helper(SSR_RENDER_ATTRS),
+          [mergedProps]
+        );
+        if (node.tag === "textarea") {
+          const existingText = node.children[0];
+          if (!existingText || existingText.type !== 5) {
+            const tempId = `_temp${context.temps++}`;
+            propsExp.arguments = [
+              compilerDom.createAssignmentExpression(
+                compilerDom.createSimpleExpression(tempId, false),
+                mergedProps
+              )
+            ];
+            rawChildrenMap.set(
+              node,
+              compilerDom.createCallExpression(context.helper(SSR_INTERPOLATE), [
+                compilerDom.createConditionalExpression(
+                  compilerDom.createSimpleExpression(`"value" in ${tempId}`, false),
+                  compilerDom.createSimpleExpression(`${tempId}.value`, false),
+                  compilerDom.createSimpleExpression(
+                    existingText ? existingText.content : ``,
+                    true
+                  ),
+                  false
+                )
+              ])
+            );
+          }
+        } else if (node.tag === "input") {
+          const vModel = findVModel(node);
+          if (vModel) {
+            const tempId = `_temp${context.temps++}`;
+            const tempExp = compilerDom.createSimpleExpression(tempId, false);
+            propsExp.arguments = [
+              compilerDom.createSequenceExpression([
+                compilerDom.createAssignmentExpression(tempExp, mergedProps),
+                compilerDom.createCallExpression(context.helper(compilerDom.MERGE_PROPS), [
+                  tempExp,
+                  compilerDom.createCallExpression(
+                    context.helper(SSR_GET_DYNAMIC_MODEL_PROPS),
+                    [
+                      tempExp,
+                      // existing props
+                      vModel.exp
+                      // model
+                    ]
+                  )
+                ])
+              ])
+            ];
+          }
+        }
+        if (needTagForRuntime) {
+          propsExp.arguments.push(`"${node.tag}"`);
+        }
+        openTag.push(propsExp);
+      }
+    }
+    let dynamicClassBinding = void 0;
+    let staticClassBinding = void 0;
+    let dynamicStyleBinding = void 0;
+    for (let i = 0; i < node.props.length; i++) {
+      const prop = node.props[i];
+      if (node.tag === "input" && isTrueFalseValue(prop)) {
+        continue;
+      }
+      if (prop.type === 7) {
+        if (prop.name === "html" && prop.exp) {
+          rawChildrenMap.set(
+            node,
+            compilerDom.createCompoundExpression([`(`, prop.exp, `) ?? ''`])
+          );
+        } else if (prop.name === "text" && prop.exp) {
+          node.children = [compilerDom.createInterpolation(prop.exp, prop.loc)];
+        } else if (prop.name === "slot") {
+          context.onError(
+            compilerDom.createCompilerError(40, prop.loc)
+          );
+        } else if (isTextareaWithValue(node, prop) && prop.exp) {
+          if (!needMergeProps) {
+            node.children = [compilerDom.createInterpolation(prop.exp, prop.loc)];
+          }
+        } else if (!needMergeProps && prop.name !== "on") {
+          const directiveTransform = context.directiveTransforms[prop.name];
+          if (directiveTransform) {
+            const { props, ssrTagParts } = directiveTransform(
+              prop,
+              node,
+              context
+            );
+            if (ssrTagParts) {
+              openTag.push(...ssrTagParts);
+            }
+            for (let j = 0; j < props.length; j++) {
+              const { key, value } = props[j];
+              if (compilerDom.isStaticExp(key)) {
+                let attrName = key.content;
+                if (attrName === "key" || attrName === "ref") {
+                  continue;
+                }
+                if (attrName === "class") {
+                  openTag.push(
+                    ` class="`,
+                    dynamicClassBinding = compilerDom.createCallExpression(
+                      context.helper(SSR_RENDER_CLASS),
+                      [value]
+                    ),
+                    `"`
+                  );
+                } else if (attrName === "style") {
+                  if (dynamicStyleBinding) {
+                    mergeCall(dynamicStyleBinding, value);
+                  } else {
+                    openTag.push(
+                      ` style="`,
+                      dynamicStyleBinding = compilerDom.createCallExpression(
+                        context.helper(SSR_RENDER_STYLE),
+                        [value]
+                      ),
+                      `"`
+                    );
+                  }
+                } else {
+                  attrName = node.tag.indexOf("-") > 0 ? attrName : shared.propsToAttrMap[attrName] || attrName.toLowerCase();
+                  if (shared.isBooleanAttr(attrName)) {
+                    openTag.push(
+                      compilerDom.createConditionalExpression(
+                        compilerDom.createCallExpression(
+                          context.helper(SSR_INCLUDE_BOOLEAN_ATTR),
+                          [value]
+                        ),
+                        compilerDom.createSimpleExpression(" " + attrName, true),
+                        compilerDom.createSimpleExpression("", true),
+                        false
+                      )
+                    );
+                  } else if (shared.isSSRSafeAttrName(attrName)) {
+                    openTag.push(
+                      compilerDom.createCallExpression(context.helper(SSR_RENDER_ATTR), [
+                        key,
+                        value
+                      ])
+                    );
+                  } else {
+                    context.onError(
+                      createSSRCompilerError(
+                        65,
+                        key.loc
+                      )
+                    );
+                  }
+                }
+              } else {
+                const args = [key, value];
+                if (needTagForRuntime) {
+                  args.push(`"${node.tag}"`);
+                }
+                openTag.push(
+                  compilerDom.createCallExpression(
+                    context.helper(SSR_RENDER_DYNAMIC_ATTR),
+                    args
+                  )
+                );
+              }
+            }
+          }
+        }
+      } else {
+        const name = prop.name;
+        if (node.tag === "textarea" && name === "value" && prop.value) {
+          rawChildrenMap.set(node, shared.escapeHtml(prop.value.content));
+        } else if (!needMergeProps) {
+          if (name === "key" || name === "ref") {
+            continue;
+          }
+          if (name === "class" && prop.value) {
+            staticClassBinding = JSON.stringify(prop.value.content);
+          }
+          openTag.push(
+            ` ${prop.name}` + (prop.value ? `="${shared.escapeHtml(prop.value.content)}"` : ``)
+          );
+        }
+      }
+    }
+    if (dynamicClassBinding && staticClassBinding) {
+      mergeCall(dynamicClassBinding, staticClassBinding);
+      removeStaticBinding(openTag, "class");
+    }
+    if (context.scopeId) {
+      openTag.push(` ${context.scopeId}`);
+    }
+    node.ssrCodegenNode = compilerDom.createTemplateLiteral(openTag);
+  };
+};
+function buildSSRProps(props, directives, context) {
+  let mergePropsArgs = [];
+  if (props) {
+    if (props.type === 14) {
+      mergePropsArgs = props.arguments;
+    } else {
+      mergePropsArgs.push(props);
+    }
+  }
+  if (directives.length) {
+    for (const dir of directives) {
+      mergePropsArgs.push(
+        compilerDom.createCallExpression(context.helper(SSR_GET_DIRECTIVE_PROPS), [
+          `_ctx`,
+          ...compilerDom.buildDirectiveArgs(dir, context).elements
+        ])
+      );
+    }
+  }
+  return mergePropsArgs.length > 1 ? compilerDom.createCallExpression(context.helper(compilerDom.MERGE_PROPS), mergePropsArgs) : mergePropsArgs[0];
+}
+function isTrueFalseValue(prop) {
+  if (prop.type === 7) {
+    return prop.name === "bind" && prop.arg && compilerDom.isStaticExp(prop.arg) && (prop.arg.content === "true-value" || prop.arg.content === "false-value");
+  } else {
+    return prop.name === "true-value" || prop.name === "false-value";
+  }
+}
+function isTextareaWithValue(node, prop) {
+  return !!(node.tag === "textarea" && prop.name === "bind" && compilerDom.isStaticArgOf(prop.arg, "value"));
+}
+function mergeCall(call, arg) {
+  const existing = call.arguments[0];
+  if (existing.type === 17) {
+    existing.elements.push(arg);
+  } else {
+    call.arguments[0] = compilerDom.createArrayExpression([existing, arg]);
+  }
+}
+function removeStaticBinding(tag, binding) {
+  const regExp = new RegExp(`^ ${binding}=".+"$`);
+  const i = tag.findIndex((e) => typeof e === "string" && regExp.test(e));
+  if (i > -1) {
+    tag.splice(i, 1);
+  }
+}
+function findVModel(node) {
+  return node.props.find(
+    (p) => p.type === 7 && p.name === "model" && p.exp
+  );
+}
+function ssrProcessElement(node, context) {
+  const isVoidTag = context.options.isVoidTag || shared.NO;
+  const elementsToAdd = node.ssrCodegenNode.elements;
+  for (let j = 0; j < elementsToAdd.length; j++) {
+    context.pushStringPart(elementsToAdd[j]);
+  }
+  if (context.withSlotScopeId) {
+    context.pushStringPart(compilerDom.createSimpleExpression(`_scopeId`, false));
+  }
+  context.pushStringPart(`>`);
+  const rawChildren = rawChildrenMap.get(node);
+  if (rawChildren) {
+    context.pushStringPart(rawChildren);
+  } else if (node.children.length) {
+    processChildren(node, context);
+  }
+  if (!isVoidTag(node.tag)) {
+    context.pushStringPart(`</${node.tag}>`);
+  }
+}
+
+const wipMap$2 = /* @__PURE__ */ new WeakMap();
+function ssrTransformTransitionGroup(node, context) {
+  return () => {
+    const tag = compilerDom.findProp(node, "tag");
+    if (tag) {
+      const otherProps = node.props.filter((p) => p !== tag);
+      const { props, directives } = compilerDom.buildProps(
+        node,
+        context,
+        otherProps,
+        true,
+        false,
+        true
+      );
+      let propsExp = null;
+      if (props || directives.length) {
+        propsExp = compilerDom.createCallExpression(context.helper(SSR_RENDER_ATTRS), [
+          buildSSRProps(props, directives, context)
+        ]);
+      }
+      wipMap$2.set(node, {
+        tag,
+        propsExp,
+        scopeId: context.scopeId || null
+      });
+    }
+  };
+}
+function ssrProcessTransitionGroup(node, context) {
+  const entry = wipMap$2.get(node);
+  if (entry) {
+    const { tag, propsExp, scopeId } = entry;
+    if (tag.type === 7) {
+      context.pushStringPart(`<`);
+      context.pushStringPart(tag.exp);
+      if (propsExp) {
+        context.pushStringPart(propsExp);
+      }
+      if (scopeId) {
+        context.pushStringPart(` ${scopeId}`);
+      }
+      context.pushStringPart(`>`);
+      processChildren(
+        node,
+        context,
+        false,
+        /**
+         * TransitionGroup has the special runtime behavior of flattening and
+         * concatenating all children into a single fragment (in order for them to
+         * be patched using the same key map) so we need to account for that here
+         * by disabling nested fragment wrappers from being generated.
+         */
+        true,
+        /**
+         * TransitionGroup filters out comment children at runtime and thus
+         * doesn't expect comments to be present during hydration. We need to
+         * account for that by disabling the empty comment that is otherwise
+         * rendered for a falsy v-if that has no v-else specified. (#6715)
+         */
+        true
+      );
+      context.pushStringPart(`</`);
+      context.pushStringPart(tag.exp);
+      context.pushStringPart(`>`);
+    } else {
+      context.pushStringPart(`<${tag.value.content}`);
+      if (propsExp) {
+        context.pushStringPart(propsExp);
+      }
+      if (scopeId) {
+        context.pushStringPart(` ${scopeId}`);
+      }
+      context.pushStringPart(`>`);
+      processChildren(node, context, false, true);
+      context.pushStringPart(`</${tag.value.content}>`);
+    }
+  } else {
+    processChildren(node, context, true, true, true);
+  }
+}
+
+const wipMap$1 = /* @__PURE__ */ new WeakMap();
+function ssrTransformTransition(node, context) {
+  return () => {
+    const appear = compilerDom.findProp(node, "appear", false, true);
+    wipMap$1.set(node, !!appear);
+  };
+}
+function ssrProcessTransition(node, context) {
+  node.children = node.children.filter((c) => c.type !== 3);
+  const appear = wipMap$1.get(node);
+  if (appear) {
+    context.pushStringPart(`<template>`);
+    processChildren(node, context, false, true);
+    context.pushStringPart(`</template>`);
+  } else {
+    processChildren(node, context, false, true);
+  }
+}
+
+const wipMap = /* @__PURE__ */ new WeakMap();
+const WIP_SLOT = Symbol();
+const componentTypeMap = /* @__PURE__ */ new WeakMap();
+const ssrTransformComponent = (node, context) => {
+  if (node.type !== 1 || node.tagType !== 1) {
+    return;
+  }
+  const component = compilerDom.resolveComponentType(
+    node,
+    context,
+    true
+    /* ssr */
+  );
+  const isDynamicComponent = shared.isObject(component) && component.callee === compilerDom.RESOLVE_DYNAMIC_COMPONENT;
+  componentTypeMap.set(node, component);
+  if (shared.isSymbol(component)) {
+    if (component === compilerDom.SUSPENSE) {
+      return ssrTransformSuspense(node, context);
+    } else if (component === compilerDom.TRANSITION_GROUP) {
+      return ssrTransformTransitionGroup(node, context);
+    } else if (component === compilerDom.TRANSITION) {
+      return ssrTransformTransition(node);
+    }
+    return;
+  }
+  const vnodeBranches = [];
+  const clonedNode = clone(node);
+  return function ssrPostTransformComponent() {
+    if (clonedNode.children.length) {
+      compilerDom.buildSlots(clonedNode, context, (props, vFor, children) => {
+        vnodeBranches.push(
+          createVNodeSlotBranch(props, vFor, children, context)
+        );
+        return compilerDom.createFunctionExpression(void 0);
+      });
+    }
+    let propsExp = `null`;
+    if (node.props.length) {
+      const { props, directives } = compilerDom.buildProps(
+        node,
+        context,
+        void 0,
+        true,
+        isDynamicComponent
+      );
+      if (props || directives.length) {
+        propsExp = buildSSRProps(props, directives, context);
+      }
+    }
+    const wipEntries = [];
+    wipMap.set(node, wipEntries);
+    const buildSSRSlotFn = (props, _vForExp, children, loc) => {
+      const param0 = props && compilerDom.stringifyExpression(props) || `_`;
+      const fn = compilerDom.createFunctionExpression(
+        [param0, `_push`, `_parent`, `_scopeId`],
+        void 0,
+        // no return, assign body later
+        true,
+        // newline
+        true,
+        // isSlot
+        loc
+      );
+      wipEntries.push({
+        type: WIP_SLOT,
+        fn,
+        children,
+        // also collect the corresponding vnode branch built earlier
+        vnodeBranch: vnodeBranches[wipEntries.length]
+      });
+      return fn;
+    };
+    const slots = node.children.length ? compilerDom.buildSlots(node, context, buildSSRSlotFn).slots : `null`;
+    if (typeof component !== "string") {
+      node.ssrCodegenNode = compilerDom.createCallExpression(
+        context.helper(SSR_RENDER_VNODE),
+        [
+          `_push`,
+          compilerDom.createCallExpression(context.helper(compilerDom.CREATE_VNODE), [
+            component,
+            propsExp,
+            slots
+          ]),
+          `_parent`
+        ]
+      );
+    } else {
+      node.ssrCodegenNode = compilerDom.createCallExpression(
+        context.helper(SSR_RENDER_COMPONENT),
+        [component, propsExp, slots, `_parent`]
+      );
+    }
+  };
+};
+function ssrProcessComponent(node, context, parent) {
+  const component = componentTypeMap.get(node);
+  if (!node.ssrCodegenNode) {
+    if (component === compilerDom.TELEPORT) {
+      return ssrProcessTeleport(node, context);
+    } else if (component === compilerDom.SUSPENSE) {
+      return ssrProcessSuspense(node, context);
+    } else if (component === compilerDom.TRANSITION_GROUP) {
+      return ssrProcessTransitionGroup(node, context);
+    } else {
+      if (parent.type === WIP_SLOT) {
+        context.pushStringPart(``);
+      }
+      if (component === compilerDom.TRANSITION) {
+        return ssrProcessTransition(node, context);
+      }
+      processChildren(node, context);
+    }
+  } else {
+    const wipEntries = wipMap.get(node) || [];
+    for (let i = 0; i < wipEntries.length; i++) {
+      const { fn, vnodeBranch } = wipEntries[i];
+      fn.body = compilerDom.createIfStatement(
+        compilerDom.createSimpleExpression(`_push`, false),
+        processChildrenAsStatement(
+          wipEntries[i],
+          context,
+          false,
+          true
+        ),
+        vnodeBranch
+      );
+    }
+    if (context.withSlotScopeId) {
+      node.ssrCodegenNode.arguments.push(`_scopeId`);
+    }
+    if (typeof component === "string") {
+      context.pushStatement(
+        compilerDom.createCallExpression(`_push`, [node.ssrCodegenNode])
+      );
+    } else {
+      context.pushStatement(node.ssrCodegenNode);
+    }
+  }
+}
+const rawOptionsMap = /* @__PURE__ */ new WeakMap();
+const [baseNodeTransforms, baseDirectiveTransforms] = compilerDom.getBaseTransformPreset(true);
+const vnodeNodeTransforms = [...baseNodeTransforms, ...compilerDom.DOMNodeTransforms];
+const vnodeDirectiveTransforms = {
+  ...baseDirectiveTransforms,
+  ...compilerDom.DOMDirectiveTransforms
+};
+function createVNodeSlotBranch(slotProps, vFor, children, parentContext) {
+  const rawOptions = rawOptionsMap.get(parentContext.root);
+  const subOptions = {
+    ...rawOptions,
+    // overwrite with vnode-based transforms
+    nodeTransforms: [
+      ...vnodeNodeTransforms,
+      ...rawOptions.nodeTransforms || []
+    ],
+    directiveTransforms: {
+      ...vnodeDirectiveTransforms,
+      ...rawOptions.directiveTransforms || {}
+    }
+  };
+  const wrapperProps = [];
+  if (slotProps) {
+    wrapperProps.push({
+      type: 7,
+      name: "slot",
+      exp: slotProps,
+      arg: void 0,
+      modifiers: [],
+      loc: compilerDom.locStub
+    });
+  }
+  if (vFor) {
+    wrapperProps.push(shared.extend({}, vFor));
+  }
+  const wrapperNode = {
+    type: 1,
+    ns: 0,
+    tag: "template",
+    tagType: 3,
+    props: wrapperProps,
+    children,
+    loc: compilerDom.locStub,
+    codegenNode: void 0
+  };
+  subTransform(wrapperNode, subOptions, parentContext);
+  return compilerDom.createReturnStatement(children);
+}
+function subTransform(node, options, parentContext) {
+  const childRoot = compilerDom.createRoot([node]);
+  const childContext = compilerDom.createTransformContext(childRoot, options);
+  childContext.ssr = false;
+  childContext.scopes = { ...parentContext.scopes };
+  childContext.identifiers = { ...parentContext.identifiers };
+  childContext.imports = parentContext.imports;
+  compilerDom.traverseNode(childRoot, childContext);
+  ["helpers", "components", "directives"].forEach((key) => {
+    childContext[key].forEach((value, helperKey) => {
+      if (key === "helpers") {
+        const parentCount = parentContext.helpers.get(helperKey);
+        if (parentCount === void 0) {
+          parentContext.helpers.set(helperKey, value);
+        } else {
+          parentContext.helpers.set(helperKey, value + parentCount);
+        }
+      } else {
+        parentContext[key].add(value);
+      }
+    });
+  });
+}
+function clone(v) {
+  if (shared.isArray(v)) {
+    return v.map(clone);
+  } else if (shared.isPlainObject(v)) {
+    const res = {};
+    for (const key in v) {
+      res[key] = clone(v[key]);
+    }
+    return res;
+  } else {
+    return v;
+  }
+}
+
+function ssrCodegenTransform(ast, options) {
+  const context = createSSRTransformContext(ast, options);
+  if (options.ssrCssVars) {
+    const cssContext = compilerDom.createTransformContext(compilerDom.createRoot([]), options);
+    const varsExp = compilerDom.processExpression(
+      compilerDom.createSimpleExpression(options.ssrCssVars, false),
+      cssContext
+    );
+    context.body.push(
+      compilerDom.createCompoundExpression([`const _cssVars = { style: `, varsExp, `}`])
+    );
+    Array.from(cssContext.helpers.keys()).forEach((helper) => {
+      ast.helpers.add(helper);
+    });
+  }
+  const isFragment = ast.children.length > 1 && ast.children.some((c) => !compilerDom.isText(c));
+  processChildren(ast, context, isFragment);
+  ast.codegenNode = compilerDom.createBlockStatement(context.body);
+  ast.ssrHelpers = Array.from(
+    /* @__PURE__ */ new Set([
+      ...Array.from(ast.helpers).filter((h) => h in ssrHelpers),
+      ...context.helpers
+    ])
+  );
+  ast.helpers = new Set(Array.from(ast.helpers).filter((h) => !(h in ssrHelpers)));
+}
+function createSSRTransformContext(root, options, helpers = /* @__PURE__ */ new Set(), withSlotScopeId = false) {
+  const body = [];
+  let currentString = null;
+  return {
+    root,
+    options,
+    body,
+    helpers,
+    withSlotScopeId,
+    onError: options.onError || ((e) => {
+      throw e;
+    }),
+    helper(name) {
+      helpers.add(name);
+      return name;
+    },
+    pushStringPart(part) {
+      if (!currentString) {
+        const currentCall = compilerDom.createCallExpression(`_push`);
+        body.push(currentCall);
+        currentString = compilerDom.createTemplateLiteral([]);
+        currentCall.arguments.push(currentString);
+      }
+      const bufferedElements = currentString.elements;
+      const lastItem = bufferedElements[bufferedElements.length - 1];
+      if (shared.isString(part) && shared.isString(lastItem)) {
+        bufferedElements[bufferedElements.length - 1] += part;
+      } else {
+        bufferedElements.push(part);
+      }
+    },
+    pushStatement(statement) {
+      currentString = null;
+      body.push(statement);
+    }
+  };
+}
+function createChildContext(parent, withSlotScopeId = parent.withSlotScopeId) {
+  return createSSRTransformContext(
+    parent.root,
+    parent.options,
+    parent.helpers,
+    withSlotScopeId
+  );
+}
+function processChildren(parent, context, asFragment = false, disableNestedFragments = false, disableCommentAsIfAlternate = false) {
+  if (asFragment) {
+    context.pushStringPart(`<!--[-->`);
+  }
+  const { children } = parent;
+  for (let i = 0; i < children.length; i++) {
+    const child = children[i];
+    switch (child.type) {
+      case 1:
+        switch (child.tagType) {
+          case 0:
+            ssrProcessElement(child, context);
+            break;
+          case 1:
+            ssrProcessComponent(child, context, parent);
+            break;
+          case 2:
+            ssrProcessSlotOutlet(child, context);
+            break;
+          case 3:
+            break;
+          default:
+            context.onError(
+              createSSRCompilerError(
+                67,
+                child.loc
+              )
+            );
+            const exhaustiveCheck2 = child;
+            return exhaustiveCheck2;
+        }
+        break;
+      case 2:
+        context.pushStringPart(shared.escapeHtml(child.content));
+        break;
+      case 3:
+        context.pushStringPart(`<!--${child.content}-->`);
+        break;
+      case 5:
+        context.pushStringPart(
+          compilerDom.createCallExpression(context.helper(SSR_INTERPOLATE), [
+            child.content
+          ])
+        );
+        break;
+      case 9:
+        ssrProcessIf(
+          child,
+          context,
+          disableNestedFragments,
+          disableCommentAsIfAlternate
+        );
+        break;
+      case 11:
+        ssrProcessFor(child, context, disableNestedFragments);
+        break;
+      case 10:
+        break;
+      case 12:
+      case 8:
+        break;
+      default:
+        context.onError(
+          createSSRCompilerError(
+            67,
+            child.loc
+          )
+        );
+        const exhaustiveCheck = child;
+        return exhaustiveCheck;
+    }
+  }
+  if (asFragment) {
+    context.pushStringPart(`<!--]-->`);
+  }
+}
+function processChildrenAsStatement(parent, parentContext, asFragment = false, withSlotScopeId = parentContext.withSlotScopeId) {
+  const childContext = createChildContext(parentContext, withSlotScopeId);
+  processChildren(parent, childContext, asFragment);
+  return compilerDom.createBlockStatement(childContext.body);
+}
+
+const ssrTransformModel = (dir, node, context) => {
+  const model = dir.exp;
+  function checkDuplicatedValue() {
+    const value = compilerDom.findProp(node, "value");
+    if (value) {
+      context.onError(
+        compilerDom.createDOMCompilerError(
+          60,
+          value.loc
+        )
+      );
+    }
+  }
+  function processOption(plainNode) {
+    if (plainNode.tag === "option") {
+      if (plainNode.props.findIndex((p) => p.name === "selected") === -1) {
+        const value = findValueBinding(plainNode);
+        plainNode.ssrCodegenNode.elements.push(
+          compilerDom.createConditionalExpression(
+            compilerDom.createCallExpression(context.helper(SSR_INCLUDE_BOOLEAN_ATTR), [
+              compilerDom.createConditionalExpression(
+                compilerDom.createCallExpression(`Array.isArray`, [model]),
+                compilerDom.createCallExpression(context.helper(SSR_LOOSE_CONTAIN), [
+                  model,
+                  value
+                ]),
+                compilerDom.createCallExpression(context.helper(SSR_LOOSE_EQUAL), [
+                  model,
+                  value
+                ])
+              )
+            ]),
+            compilerDom.createSimpleExpression(" selected", true),
+            compilerDom.createSimpleExpression("", true),
+            false
+          )
+        );
+      }
+    } else if (plainNode.tag === "optgroup") {
+      plainNode.children.forEach(
+        (option) => processOption(option)
+      );
+    }
+  }
+  if (node.tagType === 0) {
+    const res = { props: [] };
+    const defaultProps = [
+      // default value binding for text type inputs
+      compilerDom.createObjectProperty(`value`, model)
+    ];
+    if (node.tag === "input") {
+      const type = compilerDom.findProp(node, "type");
+      if (type) {
+        const value = findValueBinding(node);
+        if (type.type === 7) {
+          res.ssrTagParts = [
+            compilerDom.createCallExpression(context.helper(SSR_RENDER_DYNAMIC_MODEL), [
+              type.exp,
+              model,
+              value
+            ])
+          ];
+        } else if (type.value) {
+          switch (type.value.content) {
+            case "radio":
+              res.props = [
+                compilerDom.createObjectProperty(
+                  `checked`,
+                  compilerDom.createCallExpression(context.helper(SSR_LOOSE_EQUAL), [
+                    model,
+                    value
+                  ])
+                )
+              ];
+              break;
+            case "checkbox":
+              const trueValueBinding = compilerDom.findProp(node, "true-value");
+              if (trueValueBinding) {
+                const trueValue = trueValueBinding.type === 6 ? JSON.stringify(trueValueBinding.value.content) : trueValueBinding.exp;
+                res.props = [
+                  compilerDom.createObjectProperty(
+                    `checked`,
+                    compilerDom.createCallExpression(context.helper(SSR_LOOSE_EQUAL), [
+                      model,
+                      trueValue
+                    ])
+                  )
+                ];
+              } else {
+                res.props = [
+                  compilerDom.createObjectProperty(
+                    `checked`,
+                    compilerDom.createConditionalExpression(
+                      compilerDom.createCallExpression(`Array.isArray`, [model]),
+                      compilerDom.createCallExpression(context.helper(SSR_LOOSE_CONTAIN), [
+                        model,
+                        value
+                      ]),
+                      model
+                    )
+                  )
+                ];
+              }
+              break;
+            case "file":
+              context.onError(
+                compilerDom.createDOMCompilerError(
+                  59,
+                  dir.loc
+                )
+              );
+              break;
+            default:
+              checkDuplicatedValue();
+              res.props = defaultProps;
+              break;
+          }
+        }
+      } else if (compilerDom.hasDynamicKeyVBind(node)) ; else {
+        checkDuplicatedValue();
+        res.props = defaultProps;
+      }
+    } else if (node.tag === "textarea") {
+      checkDuplicatedValue();
+      node.children = [compilerDom.createInterpolation(model, model.loc)];
+    } else if (node.tag === "select") {
+      node.children.forEach((child) => {
+        if (child.type === 1) {
+          processOption(child);
+        }
+      });
+    } else {
+      context.onError(
+        compilerDom.createDOMCompilerError(
+          57,
+          dir.loc
+        )
+      );
+    }
+    return res;
+  } else {
+    return compilerDom.transformModel(dir, node, context);
+  }
+};
+function findValueBinding(node) {
+  const valueBinding = compilerDom.findProp(node, "value");
+  return valueBinding ? valueBinding.type === 7 ? valueBinding.exp : compilerDom.createSimpleExpression(valueBinding.value.content, true) : compilerDom.createSimpleExpression(`null`, false);
+}
+
+const ssrTransformShow = (dir, node, context) => {
+  if (!dir.exp) {
+    context.onError(
+      compilerDom.createDOMCompilerError(61)
+    );
+  }
+  return {
+    props: [
+      compilerDom.createObjectProperty(
+        `style`,
+        compilerDom.createConditionalExpression(
+          dir.exp,
+          compilerDom.createSimpleExpression(`null`, false),
+          compilerDom.createObjectExpression([
+            compilerDom.createObjectProperty(
+              `display`,
+              compilerDom.createSimpleExpression(`none`, true)
+            )
+          ]),
+          false
+        )
+      )
+    ]
+  };
+};
+
+const filterChild = (node) => node.children.filter((n) => n.type !== 3);
+const hasSingleChild = (node) => filterChild(node).length === 1;
+const ssrInjectFallthroughAttrs = (node, context) => {
+  if (node.type === 0) {
+    context.identifiers._attrs = 1;
+  }
+  if (node.type === 1 && node.tagType === 1 && (node.tag === "transition" || node.tag === "Transition" || node.tag === "KeepAlive" || node.tag === "keep-alive")) {
+    const rootChildren = filterChild(context.root);
+    if (rootChildren.length === 1 && rootChildren[0] === node) {
+      if (hasSingleChild(node)) {
+        injectFallthroughAttrs(node.children[0]);
+      }
+      return;
+    }
+  }
+  const parent = context.parent;
+  if (!parent || parent.type !== 0) {
+    return;
+  }
+  if (node.type === 10 && hasSingleChild(node)) {
+    let hasEncounteredIf = false;
+    for (const c of filterChild(parent)) {
+      if (c.type === 9 || c.type === 1 && compilerDom.findDir(c, "if")) {
+        if (hasEncounteredIf)
+          return;
+        hasEncounteredIf = true;
+      } else if (
+        // node before v-if
+        !hasEncounteredIf || // non else nodes
+        !(c.type === 1 && compilerDom.findDir(c, /else/, true))
+      ) {
+        return;
+      }
+    }
+    injectFallthroughAttrs(node.children[0]);
+  } else if (hasSingleChild(parent)) {
+    injectFallthroughAttrs(node);
+  }
+};
+function injectFallthroughAttrs(node) {
+  if (node.type === 1 && (node.tagType === 0 || node.tagType === 1) && !compilerDom.findDir(node, "for")) {
+    node.props.push({
+      type: 7,
+      name: "bind",
+      arg: void 0,
+      exp: compilerDom.createSimpleExpression(`_attrs`, false),
+      modifiers: [],
+      loc: compilerDom.locStub
+    });
+  }
+}
+
+const ssrInjectCssVars = (node, context) => {
+  if (!context.ssrCssVars) {
+    return;
+  }
+  if (node.type === 0) {
+    context.identifiers._cssVars = 1;
+  }
+  const parent = context.parent;
+  if (!parent || parent.type !== 0) {
+    return;
+  }
+  if (node.type === 10) {
+    for (const child of node.children) {
+      injectCssVars(child);
+    }
+  } else {
+    injectCssVars(node);
+  }
+};
+function injectCssVars(node) {
+  if (node.type === 1 && (node.tagType === 0 || node.tagType === 1) && !compilerDom.findDir(node, "for")) {
+    if (node.tag === "suspense" || node.tag === "Suspense") {
+      for (const child of node.children) {
+        if (child.type === 1 && child.tagType === 3) {
+          child.children.forEach(injectCssVars);
+        } else {
+          injectCssVars(child);
+        }
+      }
+    } else {
+      node.props.push({
+        type: 7,
+        name: "bind",
+        arg: void 0,
+        exp: compilerDom.createSimpleExpression(`_cssVars`, false),
+        modifiers: [],
+        loc: compilerDom.locStub
+      });
+    }
+  }
+}
+
+function compile(source, options = {}) {
+  options = {
+    ...options,
+    ...compilerDom.parserOptions,
+    ssr: true,
+    inSSR: true,
+    scopeId: options.mode === "function" ? null : options.scopeId,
+    // always prefix since compiler-ssr doesn't have size concern
+    prefixIdentifiers: true,
+    // disable optimizations that are unnecessary for ssr
+    cacheHandlers: false,
+    hoistStatic: false
+  };
+  const ast = typeof source === "string" ? compilerDom.baseParse(source, options) : source;
+  rawOptionsMap.set(ast, options);
+  compilerDom.transform(ast, {
+    ...options,
+    hoistStatic: false,
+    nodeTransforms: [
+      ssrTransformIf,
+      ssrTransformFor,
+      compilerDom.trackVForSlotScopes,
+      compilerDom.transformExpression,
+      ssrTransformSlotOutlet,
+      ssrInjectFallthroughAttrs,
+      ssrInjectCssVars,
+      ssrTransformElement,
+      ssrTransformComponent,
+      compilerDom.trackSlotScopes,
+      compilerDom.transformStyle,
+      ...options.nodeTransforms || []
+      // user transforms
+    ],
+    directiveTransforms: {
+      // reusing core v-bind
+      bind: compilerDom.transformBind,
+      on: compilerDom.transformOn,
+      // model and show have dedicated SSR handling
+      model: ssrTransformModel,
+      show: ssrTransformShow,
+      // the following are ignored during SSR
+      // on: noopDirectiveTransform,
+      cloak: compilerDom.noopDirectiveTransform,
+      once: compilerDom.noopDirectiveTransform,
+      memo: compilerDom.noopDirectiveTransform,
+      ...options.directiveTransforms || {}
+      // user transforms
+    }
+  });
+  ssrCodegenTransform(ast, options);
+  return compilerDom.generate(ast, options);
+}
+
+exports.compile = compile;

+ 4 - 0
node_modules/@vue/compiler-ssr/dist/compiler-ssr.d.ts

@@ -0,0 +1,4 @@
+import { RootNode, CompilerOptions, CodegenResult } from '@vue/compiler-dom';
+
+export declare function compile(source: string | RootNode, options?: CompilerOptions): CodegenResult;
+

Certains fichiers n'ont pas été affichés car il y a eu trop de fichiers modifiés dans ce diff