@intlify/message-compiler 9.3.0-beta.16 → 9.3.0-beta.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (101) hide show
  1. package/dist/e2e/bridge/basic.spec.d.ts +2 -0
  2. package/dist/e2e/bridge/basic.spec.d.ts.map +1 -0
  3. package/dist/e2e/bridge/component.spec.d.ts +2 -0
  4. package/dist/e2e/bridge/component.spec.d.ts.map +1 -0
  5. package/dist/e2e/bridge/components/datetime-format.spec.d.ts +2 -0
  6. package/dist/e2e/bridge/components/datetime-format.spec.d.ts.map +1 -0
  7. package/dist/e2e/bridge/components/number-format.spec.d.ts +2 -0
  8. package/dist/e2e/bridge/components/number-format.spec.d.ts.map +1 -0
  9. package/dist/e2e/bridge/components/translation.spec.d.ts +2 -0
  10. package/dist/e2e/bridge/components/translation.spec.d.ts.map +1 -0
  11. package/dist/e2e/bridge/plural.spec.d.ts +2 -0
  12. package/dist/e2e/bridge/plural.spec.d.ts.map +1 -0
  13. package/dist/e2e/bridge/scope/global.spec.d.ts +2 -0
  14. package/dist/e2e/bridge/scope/global.spec.d.ts.map +1 -0
  15. package/dist/e2e/bridge/scope/inherit-locale.spec.d.ts +2 -0
  16. package/dist/e2e/bridge/scope/inherit-locale.spec.d.ts.map +1 -0
  17. package/dist/e2e/bridge/scope/local.spec.d.ts +2 -0
  18. package/dist/e2e/bridge/scope/local.spec.d.ts.map +1 -0
  19. package/dist/e2e/components/datetime-format.spec.d.ts +2 -0
  20. package/dist/e2e/components/datetime-format.spec.d.ts.map +1 -0
  21. package/dist/e2e/components/number-format.spec.d.ts +2 -0
  22. package/dist/e2e/components/number-format.spec.d.ts.map +1 -0
  23. package/dist/e2e/components/translation.spec.d.ts +2 -0
  24. package/dist/e2e/components/translation.spec.d.ts.map +1 -0
  25. package/dist/e2e/composition.spec.d.ts +2 -0
  26. package/dist/e2e/composition.spec.d.ts.map +1 -0
  27. package/dist/e2e/datetime.spec.d.ts +2 -0
  28. package/dist/e2e/datetime.spec.d.ts.map +1 -0
  29. package/dist/e2e/directive/basic.spec.d.ts +2 -0
  30. package/dist/e2e/directive/basic.spec.d.ts.map +1 -0
  31. package/dist/e2e/directive/object.spec.d.ts +2 -0
  32. package/dist/e2e/directive/object.spec.d.ts.map +1 -0
  33. package/dist/e2e/directive/plural.spec.d.ts +2 -0
  34. package/dist/e2e/directive/plural.spec.d.ts.map +1 -0
  35. package/dist/e2e/directive/preserve.spec.d.ts +2 -0
  36. package/dist/e2e/directive/preserve.spec.d.ts.map +1 -0
  37. package/dist/e2e/fallback/basic.spec.d.ts +2 -0
  38. package/dist/e2e/fallback/basic.spec.d.ts.map +1 -0
  39. package/dist/e2e/fallback/component.spec.d.ts +2 -0
  40. package/dist/e2e/fallback/component.spec.d.ts.map +1 -0
  41. package/dist/e2e/fallback/default-format.spec.d.ts +2 -0
  42. package/dist/e2e/fallback/default-format.spec.d.ts.map +1 -0
  43. package/dist/e2e/fallback/format.spec.d.ts +2 -0
  44. package/dist/e2e/fallback/format.spec.d.ts.map +1 -0
  45. package/dist/e2e/fallback/option.spec.d.ts +2 -0
  46. package/dist/e2e/fallback/option.spec.d.ts.map +1 -0
  47. package/dist/e2e/fallback/suppress.spec.d.ts +2 -0
  48. package/dist/e2e/fallback/suppress.spec.d.ts.map +1 -0
  49. package/dist/e2e/formatting/linked.spec.d.ts +2 -0
  50. package/dist/e2e/formatting/linked.spec.d.ts.map +1 -0
  51. package/dist/e2e/formatting/list.spec.d.ts +2 -0
  52. package/dist/e2e/formatting/list.spec.d.ts.map +1 -0
  53. package/dist/e2e/formatting/literal.spec.d.ts +2 -0
  54. package/dist/e2e/formatting/literal.spec.d.ts.map +1 -0
  55. package/dist/e2e/formatting/named.spec.d.ts +2 -0
  56. package/dist/e2e/formatting/named.spec.d.ts.map +1 -0
  57. package/dist/e2e/formatting/ruby.spec.d.ts +2 -0
  58. package/dist/e2e/formatting/ruby.spec.d.ts.map +1 -0
  59. package/dist/e2e/functions/linked.spec.d.ts +2 -0
  60. package/dist/e2e/functions/linked.spec.d.ts.map +1 -0
  61. package/dist/e2e/functions/list.spec.d.ts +2 -0
  62. package/dist/e2e/functions/list.spec.d.ts.map +1 -0
  63. package/dist/e2e/functions/named.spec.d.ts +2 -0
  64. package/dist/e2e/functions/named.spec.d.ts.map +1 -0
  65. package/dist/e2e/functions/plural.spec.d.ts +2 -0
  66. package/dist/e2e/functions/plural.spec.d.ts.map +1 -0
  67. package/dist/e2e/helper.d.ts +9 -0
  68. package/dist/e2e/helper.d.ts.map +1 -0
  69. package/dist/e2e/missing/handler.spec.d.ts +2 -0
  70. package/dist/e2e/missing/handler.spec.d.ts.map +1 -0
  71. package/dist/e2e/missing/option.spec.d.ts +2 -0
  72. package/dist/e2e/missing/option.spec.d.ts.map +1 -0
  73. package/dist/e2e/missing/suppress.spec.d.ts +2 -0
  74. package/dist/e2e/missing/suppress.spec.d.ts.map +1 -0
  75. package/dist/e2e/number.spec.d.ts +2 -0
  76. package/dist/e2e/number.spec.d.ts.map +1 -0
  77. package/dist/e2e/plural/basic.spec.d.ts +2 -0
  78. package/dist/e2e/plural/basic.spec.d.ts.map +1 -0
  79. package/dist/e2e/plural/custom.spec.d.ts +2 -0
  80. package/dist/e2e/plural/custom.spec.d.ts.map +1 -0
  81. package/dist/e2e/scope/global.spec.d.ts +2 -0
  82. package/dist/e2e/scope/global.spec.d.ts.map +1 -0
  83. package/dist/e2e/scope/inherit-locale.spec.d.ts +2 -0
  84. package/dist/e2e/scope/inherit-locale.spec.d.ts.map +1 -0
  85. package/dist/e2e/scope/local.spec.d.ts +2 -0
  86. package/dist/e2e/scope/local.spec.d.ts.map +1 -0
  87. package/dist/e2e/started.spec.d.ts +2 -0
  88. package/dist/e2e/started.spec.d.ts.map +1 -0
  89. package/dist/message-compiler.cjs +5 -3
  90. package/dist/message-compiler.d.ts +3 -2
  91. package/dist/message-compiler.esm-browser.js +5 -2
  92. package/dist/message-compiler.esm-browser.prod.js +2 -2
  93. package/dist/message-compiler.global.js +5 -3
  94. package/dist/message-compiler.global.prod.js +2 -2
  95. package/dist/message-compiler.mjs +5 -2
  96. package/dist/message-compiler.prod.cjs +5 -3
  97. package/dist/scripts/vitest.globalSetup.d.ts +2 -0
  98. package/dist/scripts/vitest.globalSetup.d.ts.map +1 -0
  99. package/dist/scripts/vitest.setup.d.ts +2 -0
  100. package/dist/scripts/vitest.setup.d.ts.map +1 -0
  101. package/package.json +2 -2
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=basic.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"basic.spec.d.ts","sourceRoot":"","sources":["../../../../../e2e/bridge/basic.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=component.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"component.spec.d.ts","sourceRoot":"","sources":["../../../../../e2e/bridge/component.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=datetime-format.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"datetime-format.spec.d.ts","sourceRoot":"","sources":["../../../../../../e2e/bridge/components/datetime-format.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=number-format.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"number-format.spec.d.ts","sourceRoot":"","sources":["../../../../../../e2e/bridge/components/number-format.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=translation.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"translation.spec.d.ts","sourceRoot":"","sources":["../../../../../../e2e/bridge/components/translation.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=plural.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plural.spec.d.ts","sourceRoot":"","sources":["../../../../../e2e/bridge/plural.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=global.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"global.spec.d.ts","sourceRoot":"","sources":["../../../../../../e2e/bridge/scope/global.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=inherit-locale.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inherit-locale.spec.d.ts","sourceRoot":"","sources":["../../../../../../e2e/bridge/scope/inherit-locale.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=local.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"local.spec.d.ts","sourceRoot":"","sources":["../../../../../../e2e/bridge/scope/local.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=datetime-format.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"datetime-format.spec.d.ts","sourceRoot":"","sources":["../../../../../e2e/components/datetime-format.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=number-format.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"number-format.spec.d.ts","sourceRoot":"","sources":["../../../../../e2e/components/number-format.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=translation.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"translation.spec.d.ts","sourceRoot":"","sources":["../../../../../e2e/components/translation.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=composition.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"composition.spec.d.ts","sourceRoot":"","sources":["../../../../e2e/composition.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=datetime.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"datetime.spec.d.ts","sourceRoot":"","sources":["../../../../e2e/datetime.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=basic.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"basic.spec.d.ts","sourceRoot":"","sources":["../../../../../e2e/directive/basic.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=object.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"object.spec.d.ts","sourceRoot":"","sources":["../../../../../e2e/directive/object.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=plural.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plural.spec.d.ts","sourceRoot":"","sources":["../../../../../e2e/directive/plural.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=preserve.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"preserve.spec.d.ts","sourceRoot":"","sources":["../../../../../e2e/directive/preserve.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=basic.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"basic.spec.d.ts","sourceRoot":"","sources":["../../../../../e2e/fallback/basic.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=component.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"component.spec.d.ts","sourceRoot":"","sources":["../../../../../e2e/fallback/component.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=default-format.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"default-format.spec.d.ts","sourceRoot":"","sources":["../../../../../e2e/fallback/default-format.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=format.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"format.spec.d.ts","sourceRoot":"","sources":["../../../../../e2e/fallback/format.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=option.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"option.spec.d.ts","sourceRoot":"","sources":["../../../../../e2e/fallback/option.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=suppress.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"suppress.spec.d.ts","sourceRoot":"","sources":["../../../../../e2e/fallback/suppress.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=linked.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"linked.spec.d.ts","sourceRoot":"","sources":["../../../../../e2e/formatting/linked.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=list.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list.spec.d.ts","sourceRoot":"","sources":["../../../../../e2e/formatting/list.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=literal.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"literal.spec.d.ts","sourceRoot":"","sources":["../../../../../e2e/formatting/literal.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=named.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"named.spec.d.ts","sourceRoot":"","sources":["../../../../../e2e/formatting/named.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=ruby.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ruby.spec.d.ts","sourceRoot":"","sources":["../../../../../e2e/formatting/ruby.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=linked.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"linked.spec.d.ts","sourceRoot":"","sources":["../../../../../e2e/functions/linked.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=list.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list.spec.d.ts","sourceRoot":"","sources":["../../../../../e2e/functions/list.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=named.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"named.spec.d.ts","sourceRoot":"","sources":["../../../../../e2e/functions/named.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=plural.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plural.spec.d.ts","sourceRoot":"","sources":["../../../../../e2e/functions/plural.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,9 @@
1
+ import type { Page } from 'playwright';
2
+ export declare function sleep(delay: number): Promise<unknown>;
3
+ export declare function getText(page: Page, selector: string, options?: Parameters<Page['locator']>[1]): Promise<string>;
4
+ export declare function getData(page: Page, selector: string, options?: Parameters<Page['locator']>[1]): Promise<any>;
5
+ export declare function assetLocaleHead(page: Page, headSelector: string): Promise<void>;
6
+ export declare function getDom(html: string): Document;
7
+ export declare function getDataFromDom(dom: Document, selector: string): any;
8
+ export declare function assertLocaleHeadWithDom(dom: Document, headSelector: string): Promise<void>;
9
+ //# sourceMappingURL=helper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helper.d.ts","sourceRoot":"","sources":["../../../../e2e/helper.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAA;AAEtC,wBAAsB,KAAK,CAAC,KAAK,EAAE,MAAM,oBAExC;AAED,wBAAsB,OAAO,CAC3B,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,mBAGzC;AAED,wBAAsB,OAAO,CAC3B,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,gBAGzC;AAED,wBAAsB,eAAe,CAAC,IAAI,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,iBAsBrE;AAED,wBAAgB,MAAM,CAAC,IAAI,EAAE,MAAM,YAElC;AAED,wBAAgB,cAAc,CAAC,GAAG,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,OAK7D;AAED,wBAAsB,uBAAuB,CAC3C,GAAG,EAAE,QAAQ,EACb,YAAY,EAAE,MAAM,iBAiBrB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=handler.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handler.spec.d.ts","sourceRoot":"","sources":["../../../../../e2e/missing/handler.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=option.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"option.spec.d.ts","sourceRoot":"","sources":["../../../../../e2e/missing/option.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=suppress.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"suppress.spec.d.ts","sourceRoot":"","sources":["../../../../../e2e/missing/suppress.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=number.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"number.spec.d.ts","sourceRoot":"","sources":["../../../../e2e/number.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=basic.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"basic.spec.d.ts","sourceRoot":"","sources":["../../../../../e2e/plural/basic.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=custom.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"custom.spec.d.ts","sourceRoot":"","sources":["../../../../../e2e/plural/custom.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=global.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"global.spec.d.ts","sourceRoot":"","sources":["../../../../../e2e/scope/global.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=inherit-locale.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inherit-locale.spec.d.ts","sourceRoot":"","sources":["../../../../../e2e/scope/inherit-locale.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=local.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"local.spec.d.ts","sourceRoot":"","sources":["../../../../../e2e/scope/local.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=started.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"started.spec.d.ts","sourceRoot":"","sources":["../../../../e2e/started.spec.ts"],"names":[],"mappings":""}
@@ -1,12 +1,10 @@
1
1
  /*!
2
- * message-compiler v9.3.0-beta.16
2
+ * message-compiler v9.3.0-beta.17
3
3
  * (c) 2023 kazuya kawaguchi
4
4
  * Released under the MIT License.
5
5
  */
6
6
  'use strict';
7
7
 
8
- Object.defineProperty(exports, '__esModule', { value: true });
9
-
10
8
  var shared = require('@intlify/shared');
11
9
  var sourceMap = require('source-map');
12
10
 
@@ -68,6 +66,9 @@ function defaultOnError(error) {
68
66
  throw error;
69
67
  }
70
68
 
69
+ const RE_HTML_TAG = /<\/?[\w\s="/.':;#-\/]+>/;
70
+ const detectHtmlTag = (source) => RE_HTML_TAG.test(source);
71
+
71
72
  const LocationStub = {
72
73
  start: { line: 1, column: 1, offset: 0 },
73
74
  end: { line: 1, column: 1, offset: 0 }
@@ -1438,4 +1439,5 @@ exports.createLocation = createLocation;
1438
1439
  exports.createParser = createParser;
1439
1440
  exports.createPosition = createPosition;
1440
1441
  exports.defaultOnError = defaultOnError;
1442
+ exports.detectHtmlTag = detectHtmlTag;
1441
1443
  exports.errorMessages = errorMessages;
@@ -45,12 +45,11 @@ export declare const CompileErrorCodes: {
45
45
  readonly __EXTEND_POINT__: 15;
46
46
  };
47
47
 
48
- export declare type CompileErrorCodes = typeof CompileErrorCodes[keyof typeof CompileErrorCodes];
48
+ export declare type CompileErrorCodes = (typeof CompileErrorCodes)[keyof typeof CompileErrorCodes];
49
49
 
50
50
  export declare type CompileErrorHandler = (error: CompileError) => void;
51
51
 
52
52
  export declare type CompileOptions = {
53
- warnHtmlMessage?: boolean;
54
53
  onCacheKey?: CompileCacheKeyHandler;
55
54
  } & TransformOptions & CodeGenOptions & ParserOptions & TokenizeOptions;
56
55
 
@@ -72,6 +71,8 @@ export declare function createPosition(line: number, column: number, offset: num
72
71
 
73
72
  /* Excluded from this release type: defaultOnError */
74
73
 
74
+ export declare const detectHtmlTag: (source: string) => boolean;
75
+
75
76
  export declare const ERROR_DOMAIN = "parser";
76
77
 
77
78
  /* Excluded from this release type: errorMessages */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * message-compiler v9.3.0-beta.16
2
+ * message-compiler v9.3.0-beta.17
3
3
  * (c) 2023 kazuya kawaguchi
4
4
  * Released under the MIT License.
5
5
  */
@@ -83,6 +83,9 @@ function defaultOnError(error) {
83
83
  throw error;
84
84
  }
85
85
 
86
+ const RE_HTML_TAG = /<\/?[\w\s="/.':;#-\/]+>/;
87
+ const detectHtmlTag = (source) => RE_HTML_TAG.test(source);
88
+
86
89
  const LocationStub = {
87
90
  start: { line: 1, column: 1, offset: 0 },
88
91
  end: { line: 1, column: 1, offset: 0 }
@@ -1388,4 +1391,4 @@ function baseCompile(source, options = {}) {
1388
1391
  return generate(ast, assignedOptions);
1389
1392
  }
1390
1393
 
1391
- export { CompileErrorCodes, ERROR_DOMAIN, LocationStub, baseCompile, createCompileError, createLocation, createParser, createPosition, defaultOnError, errorMessages };
1394
+ export { CompileErrorCodes, ERROR_DOMAIN, LocationStub, baseCompile, createCompileError, createLocation, createParser, createPosition, defaultOnError, detectHtmlTag, errorMessages };
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * message-compiler v9.3.0-beta.16
2
+ * message-compiler v9.3.0-beta.17
3
3
  * (c) 2023 kazuya kawaguchi
4
4
  * Released under the MIT License.
5
5
  */
6
- const assign=Object.assign,isString=e=>"string"==typeof e,CompileErrorCodes={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,MUST_HAVE_MESSAGES_IN_PLURAL:11,UNEXPECTED_EMPTY_LINKED_MODIFIER:12,UNEXPECTED_EMPTY_LINKED_KEY:13,UNEXPECTED_LEXICAL_ANALYSIS:14,__EXTEND_POINT__:15},errorMessages={[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",[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}'"};function createCompileError(e,t,n={}){const{domain:r,messages:o,args:c}=n,s=new SyntaxError(String(e));return s.code=e,t&&(s.location=t),s.domain=r,s}function defaultOnError(e){throw e}const LocationStub={start:{line:1,column:1,offset:0},end:{line:1,column:1,offset:0}};function createPosition(e,t,n){return{line:e,column:t,offset:n}}function createLocation(e,t,n){const r={start:e,end:t};return null!=n&&(r.source=n),r}const CHAR_SP=" ",CHAR_CR="\r",CHAR_LF="\n",CHAR_LS=String.fromCharCode(8232),CHAR_PS=String.fromCharCode(8233);function createScanner(e){const t=e;let n=0,r=1,o=1,c=0;const s=e=>"\r"===t[e]&&"\n"===t[e+1],u=e=>t[e]===CHAR_PS,a=e=>t[e]===CHAR_LS,i=e=>s(e)||(e=>"\n"===t[e])(e)||u(e)||a(e),l=e=>s(e)||u(e)||a(e)?"\n":t[e];function f(){return c=0,i(n)&&(r++,o=0),s(n)&&n++,n++,o++,t[n]}return{index:()=>n,line:()=>r,column:()=>o,peekOffset:()=>c,charAt:l,currentChar:()=>l(n),currentPeek:()=>l(n+c),next:f,peek:function(){return s(n+c)&&c++,c++,t[n+c]},reset:function(){n=0,r=1,o=1,c=0},resetPeek:function(e=0){c=e},skipToPeek:function(){const e=n+c;for(;e!==n;)f();c=0}}}const EOF=void 0,LITERAL_DELIMITER="'",ERROR_DOMAIN$1="tokenizer";function createTokenizer(e,t={}){const n=!1!==t.location,r=createScanner(e),o=()=>r.index(),c=()=>createPosition(r.line(),r.column(),r.index()),s=c(),u=o(),a={currentType:14,offset:u,startLoc:s,endLoc:s,lastType:14,lastOffset:u,lastStartLoc:s,lastEndLoc:s,braceNest:0,inLinked:!1,text:""},i=()=>a,{onError:l}=t;function f(e,t,r){e.endLoc=c(),e.currentType=t;const o={type:t};return n&&(o.loc=createLocation(e.startLoc,e.endLoc)),null!=r&&(o.value=r),o}const d=e=>f(e,14);function p(e,t){return e.currentChar()===t?(e.next(),t):(c(),"")}function E(e){let t="";for(;" "===e.currentPeek()||"\n"===e.currentPeek();)t+=e.currentPeek(),e.peek();return t}function C(e){const t=E(e);return e.skipToPeek(),t}function k(e){if(e===EOF)return!1;const t=e.charCodeAt(0);return t>=97&&t<=122||t>=65&&t<=90||95===t}function L(e,t){const{currentType:n}=t;if(2!==n)return!1;E(e);const r=function(e){if(e===EOF)return!1;const t=e.charCodeAt(0);return t>=48&&t<=57}("-"===e.currentPeek()?e.peek():e.currentPeek());return e.resetPeek(),r}function N(e){E(e);const t="|"===e.currentPeek();return e.resetPeek(),t}function h(e,t=!0){const n=(t=!1,r="",o=!1)=>{const c=e.currentPeek();return"{"===c?"%"!==r&&t:"@"!==c&&c?"%"===c?(e.peek(),n(t,"%",!0)):"|"===c?!("%"!==r&&!o)||!(" "===r||"\n"===r):" "===c?(e.peek(),n(!0," ",o)):"\n"!==c||(e.peek(),n(!0,"\n",o)):"%"===r||t},r=n();return t&&e.resetPeek(),r}function T(e,t){const n=e.currentChar();return n===EOF?EOF:t(n)?(e.next(),n):null}function _(e){return T(e,(e=>{const t=e.charCodeAt(0);return t>=97&&t<=122||t>=65&&t<=90||t>=48&&t<=57||95===t||36===t}))}function m(e){return T(e,(e=>{const t=e.charCodeAt(0);return t>=48&&t<=57}))}function P(e){return T(e,(e=>{const t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}))}function S(e){let t="",n="";for(;t=m(e);)n+=t;return n}function O(e){let t="";for(;;){const n=e.currentChar();if("{"===n||"}"===n||"@"===n||"|"===n||!n)break;if("%"===n){if(!h(e))break;t+=n,e.next()}else if(" "===n||"\n"===n)if(h(e))t+=n,e.next();else{if(N(e))break;t+=n,e.next()}else t+=n,e.next()}return t}function A(e){const t=e.currentChar();switch(t){case"\\":case"'":return e.next(),`\\${t}`;case"u":return x(e,t,4);case"U":return x(e,t,6);default:return c(),""}}function x(e,t,n){p(e,t);let r="";for(let t=0;t<n;t++){const t=P(e);if(!t){c(),e.currentChar();break}r+=t}return`\\${t}${r}`}function y(e){C(e);const t=p(e,"|");return C(e),t}function g(e,t){let n=null;switch(e.currentChar()){case"{":return t.braceNest>=1&&c(),e.next(),n=f(t,2,"{"),C(e),t.braceNest++,n;case"}":return t.braceNest>0&&2===t.currentType&&c(),e.next(),n=f(t,3,"}"),t.braceNest--,t.braceNest>0&&C(e),t.inLinked&&0===t.braceNest&&(t.inLinked=!1),n;case"@":return t.braceNest>0&&c(),n=I(e,t)||d(t),t.braceNest=0,n;default:let r=!0,o=!0,s=!0;if(N(e))return t.braceNest>0&&c(),n=f(t,1,y(e)),t.braceNest=0,t.inLinked=!1,n;if(t.braceNest>0&&(5===t.currentType||6===t.currentType||7===t.currentType))return c(),t.braceNest=0,b(e,t);if(r=function(e,t){const{currentType:n}=t;if(2!==n)return!1;E(e);const r=k(e.currentPeek());return e.resetPeek(),r}(e,t))return n=f(t,5,function(e){C(e);let t="",n="";for(;t=_(e);)n+=t;return e.currentChar()===EOF&&c(),n}(e)),C(e),n;if(o=L(e,t))return n=f(t,6,function(e){C(e);let t="";return"-"===e.currentChar()?(e.next(),t+=`-${S(e)}`):t+=S(e),e.currentChar()===EOF&&c(),t}(e)),C(e),n;if(s=function(e,t){const{currentType:n}=t;if(2!==n)return!1;E(e);const r="'"===e.currentPeek();return e.resetPeek(),r}(e,t))return n=f(t,7,function(e){C(e),p(e,"'");let t="",n="";const r=e=>"'"!==e&&"\n"!==e;for(;t=T(e,r);)n+="\\"===t?A(e):t;const o=e.currentChar();return"\n"===o||o===EOF?(c(),"\n"===o&&(e.next(),p(e,"'")),n):(p(e,"'"),n)}(e)),C(e),n;if(!r&&!o&&!s)return n=f(t,13,function(e){C(e);let t="",n="";const r=e=>"{"!==e&&"}"!==e&&" "!==e&&"\n"!==e;for(;t=T(e,r);)n+=t;return n}(e)),c(),n.value,C(e),n}return n}function I(e,t){const{currentType:n}=t;let r=null;const o=e.currentChar();switch(8!==n&&9!==n&&12!==n&&10!==n||"\n"!==o&&" "!==o||c(),o){case"@":return e.next(),r=f(t,8,"@"),t.inLinked=!0,r;case".":return C(e),e.next(),f(t,9,".");case":":return C(e),e.next(),f(t,10,":");default:return N(e)?(r=f(t,1,y(e)),t.braceNest=0,t.inLinked=!1,r):function(e,t){const{currentType:n}=t;if(8!==n)return!1;E(e);const r="."===e.currentPeek();return e.resetPeek(),r}(e,t)||function(e,t){const{currentType:n}=t;if(8!==n&&12!==n)return!1;E(e);const r=":"===e.currentPeek();return e.resetPeek(),r}(e,t)?(C(e),I(e,t)):function(e,t){const{currentType:n}=t;if(9!==n)return!1;E(e);const r=k(e.currentPeek());return e.resetPeek(),r}(e,t)?(C(e),f(t,12,function(e){let t="",n="";for(;t=_(e);)n+=t;return n}(e))):function(e,t){const{currentType:n}=t;if(10!==n)return!1;const r=()=>{const t=e.currentPeek();return"{"===t?k(e.peek()):!("@"===t||"%"===t||"|"===t||":"===t||"."===t||" "===t||!t)&&("\n"===t?(e.peek(),r()):k(t))},o=r();return e.resetPeek(),o}(e,t)?(C(e),"{"===o?g(e,t)||r:f(t,11,function(e){const t=(n=!1,r)=>{const o=e.currentChar();return"{"!==o&&"%"!==o&&"@"!==o&&"|"!==o&&o?" "===o?r:"\n"===o?(r+=o,e.next(),t(n,r)):(r+=o,e.next(),t(!0,r)):r};return t(!1,"")}(e))):(8===n&&c(),t.braceNest=0,t.inLinked=!1,b(e,t))}}function b(e,t){let n={type:14};if(t.braceNest>0)return g(e,t)||d(t);if(t.inLinked)return I(e,t)||d(t);switch(e.currentChar()){case"{":return g(e,t)||d(t);case"}":return c(),e.next(),f(t,3,"}");case"@":return I(e,t)||d(t);default:if(N(e))return n=f(t,1,y(e)),t.braceNest=0,t.inLinked=!1,n;const{isModulo:r,hasSpace:o}=function(e){const t=E(e),n="%"===e.currentPeek()&&"{"===e.peek();return e.resetPeek(),{isModulo:n,hasSpace:t.length>0}}(e);if(r)return o?f(t,0,O(e)):f(t,4,function(e){C(e);return"%"!==e.currentChar()&&c(),e.next(),"%"}(e));if(h(e))return f(t,0,O(e))}return n}return{nextToken:function(){const{currentType:e,offset:t,startLoc:n,endLoc:s}=a;return a.lastType=e,a.lastOffset=t,a.lastStartLoc=n,a.lastEndLoc=s,a.offset=o(),a.startLoc=c(),r.currentChar()===EOF?f(a,14):b(r,a)},currentOffset:o,currentPosition:c,context:i}}const ERROR_DOMAIN="parser",KNOWN_ESCAPES=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function fromEscapeSequence(e,t,n){switch(e){case"\\\\":return"\\";case"\\'":return"'";default:{const e=parseInt(t||n,16);return e<=55295||e>=57344?String.fromCodePoint(e):"�"}}}function createParser(e={}){const t=!1!==e.location,{onError:n}=e;function r(e,n,r){const o={type:e,start:n,end:n};return t&&(o.loc={start:r,end:r}),o}function o(e,n,r,o){e.end=n,o&&(e.type=o),t&&e.loc&&(e.loc.end=r)}function c(e,t){const n=e.context(),c=r(3,n.offset,n.startLoc);return c.value=t,o(c,e.currentOffset(),e.currentPosition()),c}function s(e,t){const n=e.context(),{lastOffset:c,lastStartLoc:s}=n,u=r(5,c,s);return u.index=parseInt(t,10),e.nextToken(),o(u,e.currentOffset(),e.currentPosition()),u}function u(e,t){const n=e.context(),{lastOffset:c,lastStartLoc:s}=n,u=r(4,c,s);return u.key=t,e.nextToken(),o(u,e.currentOffset(),e.currentPosition()),u}function a(e,t){const n=e.context(),{lastOffset:c,lastStartLoc:s}=n,u=r(9,c,s);return u.value=t.replace(KNOWN_ESCAPES,fromEscapeSequence),e.nextToken(),o(u,e.currentOffset(),e.currentPosition()),u}function i(e){const t=e.context(),n=r(6,t.offset,t.startLoc);let c=e.nextToken();if(9===c.type){const t=function(e){const t=e.nextToken(),n=e.context(),{lastOffset:c,lastStartLoc:s}=n,u=r(8,c,s);return 12!==t.type?(n.lastStartLoc,u.value="",o(u,c,s),{nextConsumeToken:t,node:u}):(null==t.value&&(n.lastStartLoc,getTokenCaption(t)),u.value=t.value||"",o(u,e.currentOffset(),e.currentPosition()),{node:u})}(e);n.modifier=t.node,c=t.nextConsumeToken||e.nextToken()}switch(10!==c.type&&(t.lastStartLoc,getTokenCaption(c)),c=e.nextToken(),2===c.type&&(c=e.nextToken()),c.type){case 11:null==c.value&&(t.lastStartLoc,getTokenCaption(c)),n.key=function(e,t){const n=e.context(),c=r(7,n.offset,n.startLoc);return c.value=t,o(c,e.currentOffset(),e.currentPosition()),c}(e,c.value||"");break;case 5:null==c.value&&(t.lastStartLoc,getTokenCaption(c)),n.key=u(e,c.value||"");break;case 6:null==c.value&&(t.lastStartLoc,getTokenCaption(c)),n.key=s(e,c.value||"");break;case 7:null==c.value&&(t.lastStartLoc,getTokenCaption(c)),n.key=a(e,c.value||"");break;default:t.lastStartLoc;const i=e.context(),l=r(7,i.offset,i.startLoc);return l.value="",o(l,i.offset,i.startLoc),n.key=l,o(n,i.offset,i.startLoc),{nextConsumeToken:c,node:n}}return o(n,e.currentOffset(),e.currentPosition()),{node:n}}function l(e){const t=e.context(),n=r(2,1===t.currentType?e.currentOffset():t.offset,1===t.currentType?t.endLoc:t.startLoc);n.items=[];let l=null;do{const r=l||e.nextToken();switch(l=null,r.type){case 0:null==r.value&&(t.lastStartLoc,getTokenCaption(r)),n.items.push(c(e,r.value||""));break;case 6:null==r.value&&(t.lastStartLoc,getTokenCaption(r)),n.items.push(s(e,r.value||""));break;case 5:null==r.value&&(t.lastStartLoc,getTokenCaption(r)),n.items.push(u(e,r.value||""));break;case 7:null==r.value&&(t.lastStartLoc,getTokenCaption(r)),n.items.push(a(e,r.value||""));break;case 8:const o=i(e);n.items.push(o.node),l=o.nextConsumeToken||null}}while(14!==t.currentType&&1!==t.currentType);return o(n,1===t.currentType?t.lastOffset:e.currentOffset(),1===t.currentType?t.lastEndLoc:e.currentPosition()),n}function f(e){const t=e.context(),{offset:n,startLoc:c}=t,s=l(e);return 14===t.currentType?s:function(e,t,n,c){const s=e.context();let u=0===c.items.length;const a=r(1,t,n);a.cases=[],a.cases.push(c);do{const t=l(e);u||(u=0===t.items.length),a.cases.push(t)}while(14!==s.currentType);return o(a,e.currentOffset(),e.currentPosition()),a}(e,n,c,s)}return{parse:function(n){const c=createTokenizer(n,assign({},e)),s=c.context(),u=r(0,s.offset,s.startLoc);return t&&u.loc&&(u.loc.source=n),u.body=f(c),14!==s.currentType&&(s.lastStartLoc,n[s.offset]),o(u,c.currentOffset(),c.currentPosition()),u}}}function getTokenCaption(e){if(14===e.type)return"EOF";const t=(e.value||"").replace(/\r?\n/gu,"\\n");return t.length>10?t.slice(0,9)+"…":t}function createTransformer(e,t={}){const n={ast:e,helpers:new Set};return{context:()=>n,helper:e=>(n.helpers.add(e),e)}}function traverseNodes(e,t){for(let n=0;n<e.length;n++)traverseNode(e[n],t)}function traverseNode(e,t){switch(e.type){case 1:traverseNodes(e.cases,t),t.helper("plural");break;case 2:traverseNodes(e.items,t);break;case 6:traverseNode(e.key,t),t.helper("linked"),t.helper("type");break;case 5:t.helper("interpolate"),t.helper("list");break;case 4:t.helper("interpolate"),t.helper("named")}}function transform(e,t={}){const n=createTransformer(e);n.helper("normalize"),e.body&&traverseNode(e.body,n);const r=n.context();e.helpers=Array.from(r.helpers)}function createCodeGenerator(e,t){const{sourceMap:n,filename:r,breakLineCode:o,needIndent:c}=t,s={source:e.loc.source,filename:r,code:"",column:1,line:1,offset:0,map:void 0,breakLineCode:o,needIndent:c,indentLevel:0};function u(e,t){s.code+=e}function a(e,t=!0){const n=t?o:"";u(c?n+" ".repeat(e):n)}return{context:()=>s,push:u,indent:function(e=!0){const t=++s.indentLevel;e&&a(t)},deindent:function(e=!0){const t=--s.indentLevel;e&&a(t)},newline:function(){a(s.indentLevel)},helper:e=>`_${e}`,needIndent:()=>s.needIndent}}function generateLinkedNode(e,t){const{helper:n}=e;e.push(`${n("linked")}(`),generateNode(e,t.key),t.modifier?(e.push(", "),generateNode(e,t.modifier),e.push(", _type")):e.push(", undefined, _type"),e.push(")")}function generateMessageNode(e,t){const{helper:n,needIndent:r}=e;e.push(`${n("normalize")}([`),e.indent(r());const o=t.items.length;for(let n=0;n<o&&(generateNode(e,t.items[n]),n!==o-1);n++)e.push(", ");e.deindent(r()),e.push("])")}function generatePluralNode(e,t){const{helper:n,needIndent:r}=e;if(t.cases.length>1){e.push(`${n("plural")}([`),e.indent(r());const o=t.cases.length;for(let n=0;n<o&&(generateNode(e,t.cases[n]),n!==o-1);n++)e.push(", ");e.deindent(r()),e.push("])")}}function generateResource(e,t){t.body?generateNode(e,t.body):e.push("null")}function generateNode(e,t){const{helper:n}=e;switch(t.type){case 0:generateResource(e,t);break;case 1:generatePluralNode(e,t);break;case 2:generateMessageNode(e,t);break;case 6:generateLinkedNode(e,t);break;case 8:case 7:case 9:case 3:e.push(JSON.stringify(t.value),t);break;case 5:e.push(`${n("interpolate")}(${n("list")}(${t.index}))`,t);break;case 4:e.push(`${n("interpolate")}(${n("named")}(${JSON.stringify(t.key)}))`,t)}}const generate=(e,t={})=>{const n=isString(t.mode)?t.mode:"normal",r=isString(t.filename)?t.filename:"message.intl",o=!!t.sourceMap,c=null!=t.breakLineCode?t.breakLineCode:"arrow"===n?";":"\n",s=t.needIndent?t.needIndent:"arrow"!==n,u=e.helpers||[],a=createCodeGenerator(e,{mode:n,filename:r,sourceMap:o,breakLineCode:c,needIndent:s});a.push("normal"===n?"function __msg__ (ctx) {":"(ctx) => {"),a.indent(s),u.length>0&&(a.push(`const { ${u.map((e=>`${e}: _${e}`)).join(", ")} } = ctx`),a.newline()),a.push("return "),generateNode(a,e),a.deindent(s),a.push("}");const{code:i,map:l}=a.context();return{ast:e,code:i,map:l?l.toJSON():void 0}};function baseCompile(e,t={}){const n=assign({},t),r=createParser(n).parse(e);return transform(r,n),generate(r,n)}export{CompileErrorCodes,ERROR_DOMAIN,LocationStub,baseCompile,createCompileError,createLocation,createParser,createPosition,defaultOnError,errorMessages};
6
+ const assign=Object.assign,isString=e=>"string"==typeof e,CompileErrorCodes={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,MUST_HAVE_MESSAGES_IN_PLURAL:11,UNEXPECTED_EMPTY_LINKED_MODIFIER:12,UNEXPECTED_EMPTY_LINKED_KEY:13,UNEXPECTED_LEXICAL_ANALYSIS:14,__EXTEND_POINT__:15},errorMessages={[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",[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}'"};function createCompileError(e,t,r={}){const{domain:n,messages:o,args:c}=r,s=new SyntaxError(String(e));return s.code=e,t&&(s.location=t),s.domain=n,s}function defaultOnError(e){throw e}const RE_HTML_TAG=/<\/?[\w\s="/.':;#-\/]+>/,detectHtmlTag=e=>RE_HTML_TAG.test(e),LocationStub={start:{line:1,column:1,offset:0},end:{line:1,column:1,offset:0}};function createPosition(e,t,r){return{line:e,column:t,offset:r}}function createLocation(e,t,r){const n={start:e,end:t};return null!=r&&(n.source=r),n}const CHAR_SP=" ",CHAR_CR="\r",CHAR_LF="\n",CHAR_LS=String.fromCharCode(8232),CHAR_PS=String.fromCharCode(8233);function createScanner(e){const t=e;let r=0,n=1,o=1,c=0;const s=e=>t[e]===CHAR_CR&&t[e+1]===CHAR_LF,u=e=>t[e]===CHAR_PS,a=e=>t[e]===CHAR_LS,i=e=>s(e)||(e=>t[e]===CHAR_LF)(e)||u(e)||a(e),E=e=>s(e)||u(e)||a(e)?CHAR_LF:t[e];function l(){return c=0,i(r)&&(n++,o=0),s(r)&&r++,r++,o++,t[r]}return{index:()=>r,line:()=>n,column:()=>o,peekOffset:()=>c,charAt:E,currentChar:()=>E(r),currentPeek:()=>E(r+c),next:l,peek:function(){return s(r+c)&&c++,c++,t[r+c]},reset:function(){r=0,n=1,o=1,c=0},resetPeek:function(e=0){c=e},skipToPeek:function(){const e=r+c;for(;e!==r;)l();c=0}}}const EOF=void 0,LITERAL_DELIMITER="'",ERROR_DOMAIN$1="tokenizer";function createTokenizer(e,t={}){const r=!1!==t.location,n=createScanner(e),o=()=>n.index(),c=()=>createPosition(n.line(),n.column(),n.index()),s=c(),u=o(),a={currentType:14,offset:u,startLoc:s,endLoc:s,lastType:14,lastOffset:u,lastStartLoc:s,lastEndLoc:s,braceNest:0,inLinked:!1,text:""},i=()=>a,{onError:E}=t;function l(e,t,n){e.endLoc=c(),e.currentType=t;const o={type:t};return r&&(o.loc=createLocation(e.startLoc,e.endLoc)),null!=n&&(o.value=n),o}const C=e=>l(e,14);function f(e,t){return e.currentChar()===t?(e.next(),t):(CompileErrorCodes.EXPECTED_TOKEN,c(),"")}function d(e){let t="";for(;e.currentPeek()===CHAR_SP||e.currentPeek()===CHAR_LF;)t+=e.currentPeek(),e.peek();return t}function L(e){const t=d(e);return e.skipToPeek(),t}function p(e){if(e===EOF)return!1;const t=e.charCodeAt(0);return t>=97&&t<=122||t>=65&&t<=90||95===t}function _(e,t){const{currentType:r}=t;if(2!==r)return!1;d(e);const n=function(e){if(e===EOF)return!1;const t=e.charCodeAt(0);return t>=48&&t<=57}("-"===e.currentPeek()?e.peek():e.currentPeek());return e.resetPeek(),n}function N(e){d(e);const t="|"===e.currentPeek();return e.resetPeek(),t}function A(e,t=!0){const r=(t=!1,n="",o=!1)=>{const c=e.currentPeek();return"{"===c?"%"!==n&&t:"@"!==c&&c?"%"===c?(e.peek(),r(t,"%",!0)):"|"===c?!("%"!==n&&!o)||!(n===CHAR_SP||n===CHAR_LF):c===CHAR_SP?(e.peek(),r(!0,CHAR_SP,o)):c!==CHAR_LF||(e.peek(),r(!0,CHAR_LF,o)):"%"===n||t},n=r();return t&&e.resetPeek(),n}function T(e,t){const r=e.currentChar();return r===EOF?EOF:t(r)?(e.next(),r):null}function k(e){return T(e,(e=>{const t=e.charCodeAt(0);return t>=97&&t<=122||t>=65&&t<=90||t>=48&&t<=57||95===t||36===t}))}function I(e){return T(e,(e=>{const t=e.charCodeAt(0);return t>=48&&t<=57}))}function S(e){return T(e,(e=>{const t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}))}function m(e){let t="",r="";for(;t=I(e);)r+=t;return r}function P(e){let t="";for(;;){const r=e.currentChar();if("{"===r||"}"===r||"@"===r||"|"===r||!r)break;if("%"===r){if(!A(e))break;t+=r,e.next()}else if(r===CHAR_SP||r===CHAR_LF)if(A(e))t+=r,e.next();else{if(N(e))break;t+=r,e.next()}else t+=r,e.next()}return t}function h(e){const t=e.currentChar();switch(t){case"\\":case"'":return e.next(),`\\${t}`;case"u":return O(e,t,4);case"U":return O(e,t,6);default:return CompileErrorCodes.UNKNOWN_ESCAPE_SEQUENCE,c(),""}}function O(e,t,r){f(e,t);let n="";for(let o=0;o<r;o++){const t=S(e);if(!t){CompileErrorCodes.INVALID_UNICODE_ESCAPE_SEQUENCE,c(),e.currentChar();break}n+=t}return`\\${t}${n}`}function R(e){L(e);const t=f(e,"|");return L(e),t}function D(e,t){let r=null;switch(e.currentChar()){case"{":return t.braceNest>=1&&(CompileErrorCodes.NOT_ALLOW_NEST_PLACEHOLDER,c()),e.next(),r=l(t,2,"{"),L(e),t.braceNest++,r;case"}":return t.braceNest>0&&2===t.currentType&&(CompileErrorCodes.EMPTY_PLACEHOLDER,c()),e.next(),r=l(t,3,"}"),t.braceNest--,t.braceNest>0&&L(e),t.inLinked&&0===t.braceNest&&(t.inLinked=!1),r;case"@":return t.braceNest>0&&(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE,c()),r=g(e,t)||C(t),t.braceNest=0,r;default:let n=!0,o=!0,s=!0;if(N(e))return t.braceNest>0&&(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE,c()),r=l(t,1,R(e)),t.braceNest=0,t.inLinked=!1,r;if(t.braceNest>0&&(5===t.currentType||6===t.currentType||7===t.currentType))return CompileErrorCodes.UNTERMINATED_CLOSING_BRACE,c(),t.braceNest=0,x(e,t);if(n=function(e,t){const{currentType:r}=t;if(2!==r)return!1;d(e);const n=p(e.currentPeek());return e.resetPeek(),n}(e,t))return r=l(t,5,function(e){L(e);let t="",r="";for(;t=k(e);)r+=t;return e.currentChar()===EOF&&(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE,c()),r}(e)),L(e),r;if(o=_(e,t))return r=l(t,6,function(e){L(e);let t="";return"-"===e.currentChar()?(e.next(),t+=`-${m(e)}`):t+=m(e),e.currentChar()===EOF&&(CompileErrorCodes.UNTERMINATED_CLOSING_BRACE,c()),t}(e)),L(e),r;if(s=function(e,t){const{currentType:r}=t;if(2!==r)return!1;d(e);const n=e.currentPeek()===LITERAL_DELIMITER;return e.resetPeek(),n}(e,t))return r=l(t,7,function(e){L(e),f(e,"'");let t="",r="";const n=e=>e!==LITERAL_DELIMITER&&e!==CHAR_LF;for(;t=T(e,n);)r+="\\"===t?h(e):t;const o=e.currentChar();return o===CHAR_LF||o===EOF?(CompileErrorCodes.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,c(),o===CHAR_LF&&(e.next(),f(e,"'")),r):(f(e,"'"),r)}(e)),L(e),r;if(!n&&!o&&!s)return r=l(t,13,function(e){L(e);let t="",r="";const n=e=>"{"!==e&&"}"!==e&&e!==CHAR_SP&&e!==CHAR_LF;for(;t=T(e,n);)r+=t;return r}(e)),CompileErrorCodes.INVALID_TOKEN_IN_PLACEHOLDER,c(),r.value,L(e),r}return r}function g(e,t){const{currentType:r}=t;let n=null;const o=e.currentChar();switch(8!==r&&9!==r&&12!==r&&10!==r||o!==CHAR_LF&&o!==CHAR_SP||(CompileErrorCodes.INVALID_LINKED_FORMAT,c()),o){case"@":return e.next(),n=l(t,8,"@"),t.inLinked=!0,n;case".":return L(e),e.next(),l(t,9,".");case":":return L(e),e.next(),l(t,10,":");default:return N(e)?(n=l(t,1,R(e)),t.braceNest=0,t.inLinked=!1,n):function(e,t){const{currentType:r}=t;if(8!==r)return!1;d(e);const n="."===e.currentPeek();return e.resetPeek(),n}(e,t)||function(e,t){const{currentType:r}=t;if(8!==r&&12!==r)return!1;d(e);const n=":"===e.currentPeek();return e.resetPeek(),n}(e,t)?(L(e),g(e,t)):function(e,t){const{currentType:r}=t;if(9!==r)return!1;d(e);const n=p(e.currentPeek());return e.resetPeek(),n}(e,t)?(L(e),l(t,12,function(e){let t="",r="";for(;t=k(e);)r+=t;return r}(e))):function(e,t){const{currentType:r}=t;if(10!==r)return!1;const n=()=>{const t=e.currentPeek();return"{"===t?p(e.peek()):!("@"===t||"%"===t||"|"===t||":"===t||"."===t||t===CHAR_SP||!t)&&(t===CHAR_LF?(e.peek(),n()):p(t))},o=n();return e.resetPeek(),o}(e,t)?(L(e),"{"===o?D(e,t)||n:l(t,11,function(e){const t=(r=!1,n)=>{const o=e.currentChar();return"{"!==o&&"%"!==o&&"@"!==o&&"|"!==o&&o?o===CHAR_SP?n:o===CHAR_LF?(n+=o,e.next(),t(r,n)):(n+=o,e.next(),t(!0,n)):n};return t(!1,"")}(e))):(8===r&&(CompileErrorCodes.INVALID_LINKED_FORMAT,c()),t.braceNest=0,t.inLinked=!1,x(e,t))}}function x(e,t){let r={type:14};if(t.braceNest>0)return D(e,t)||C(t);if(t.inLinked)return g(e,t)||C(t);switch(e.currentChar()){case"{":return D(e,t)||C(t);case"}":return CompileErrorCodes.UNBALANCED_CLOSING_BRACE,c(),e.next(),l(t,3,"}");case"@":return g(e,t)||C(t);default:if(N(e))return r=l(t,1,R(e)),t.braceNest=0,t.inLinked=!1,r;const{isModulo:n,hasSpace:o}=function(e){const t=d(e),r="%"===e.currentPeek()&&"{"===e.peek();return e.resetPeek(),{isModulo:r,hasSpace:t.length>0}}(e);if(n)return o?l(t,0,P(e)):l(t,4,function(e){L(e);const t=e.currentChar();return"%"!==t&&(CompileErrorCodes.EXPECTED_TOKEN,c()),e.next(),"%"}(e));if(A(e))return l(t,0,P(e))}return r}return{nextToken:function(){const{currentType:e,offset:t,startLoc:r,endLoc:s}=a;return a.lastType=e,a.lastOffset=t,a.lastStartLoc=r,a.lastEndLoc=s,a.offset=o(),a.startLoc=c(),n.currentChar()===EOF?l(a,14):x(n,a)},currentOffset:o,currentPosition:c,context:i}}const ERROR_DOMAIN="parser",KNOWN_ESCAPES=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function fromEscapeSequence(e,t,r){switch(e){case"\\\\":return"\\";case"\\'":return"'";default:{const e=parseInt(t||r,16);return e<=55295||e>=57344?String.fromCodePoint(e):"�"}}}function createParser(e={}){const t=!1!==e.location,{onError:r}=e;function n(e,r,n){const o={type:e,start:r,end:r};return t&&(o.loc={start:n,end:n}),o}function o(e,r,n,o){e.end=r,o&&(e.type=o),t&&e.loc&&(e.loc.end=n)}function c(e,t){const r=e.context(),c=n(3,r.offset,r.startLoc);return c.value=t,o(c,e.currentOffset(),e.currentPosition()),c}function s(e,t){const r=e.context(),{lastOffset:c,lastStartLoc:s}=r,u=n(5,c,s);return u.index=parseInt(t,10),e.nextToken(),o(u,e.currentOffset(),e.currentPosition()),u}function u(e,t){const r=e.context(),{lastOffset:c,lastStartLoc:s}=r,u=n(4,c,s);return u.key=t,e.nextToken(),o(u,e.currentOffset(),e.currentPosition()),u}function a(e,t){const r=e.context(),{lastOffset:c,lastStartLoc:s}=r,u=n(9,c,s);return u.value=t.replace(KNOWN_ESCAPES,fromEscapeSequence),e.nextToken(),o(u,e.currentOffset(),e.currentPosition()),u}function i(e){const t=e.context(),r=n(6,t.offset,t.startLoc);let c=e.nextToken();if(9===c.type){const t=function(e){const t=e.nextToken(),r=e.context(),{lastOffset:c,lastStartLoc:s}=r,u=n(8,c,s);return 12!==t.type?(CompileErrorCodes.UNEXPECTED_EMPTY_LINKED_MODIFIER,r.lastStartLoc,u.value="",o(u,c,s),{nextConsumeToken:t,node:u}):(null==t.value&&(CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,r.lastStartLoc,getTokenCaption(t)),u.value=t.value||"",o(u,e.currentOffset(),e.currentPosition()),{node:u})}(e);r.modifier=t.node,c=t.nextConsumeToken||e.nextToken()}switch(10!==c.type&&(CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,getTokenCaption(c)),c=e.nextToken(),2===c.type&&(c=e.nextToken()),c.type){case 11:null==c.value&&(CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,getTokenCaption(c)),r.key=function(e,t){const r=e.context(),c=n(7,r.offset,r.startLoc);return c.value=t,o(c,e.currentOffset(),e.currentPosition()),c}(e,c.value||"");break;case 5:null==c.value&&(CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,getTokenCaption(c)),r.key=u(e,c.value||"");break;case 6:null==c.value&&(CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,getTokenCaption(c)),r.key=s(e,c.value||"");break;case 7:null==c.value&&(CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,getTokenCaption(c)),r.key=a(e,c.value||"");break;default:CompileErrorCodes.UNEXPECTED_EMPTY_LINKED_KEY,t.lastStartLoc;const i=e.context(),E=n(7,i.offset,i.startLoc);return E.value="",o(E,i.offset,i.startLoc),r.key=E,o(r,i.offset,i.startLoc),{nextConsumeToken:c,node:r}}return o(r,e.currentOffset(),e.currentPosition()),{node:r}}function E(e){const t=e.context(),r=n(2,1===t.currentType?e.currentOffset():t.offset,1===t.currentType?t.endLoc:t.startLoc);r.items=[];let E=null;do{const n=E||e.nextToken();switch(E=null,n.type){case 0:null==n.value&&(CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,getTokenCaption(n)),r.items.push(c(e,n.value||""));break;case 6:null==n.value&&(CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,getTokenCaption(n)),r.items.push(s(e,n.value||""));break;case 5:null==n.value&&(CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,getTokenCaption(n)),r.items.push(u(e,n.value||""));break;case 7:null==n.value&&(CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,getTokenCaption(n)),r.items.push(a(e,n.value||""));break;case 8:const o=i(e);r.items.push(o.node),E=o.nextConsumeToken||null}}while(14!==t.currentType&&1!==t.currentType);return o(r,1===t.currentType?t.lastOffset:e.currentOffset(),1===t.currentType?t.lastEndLoc:e.currentPosition()),r}function l(e){const t=e.context(),{offset:r,startLoc:c}=t,s=E(e);return 14===t.currentType?s:function(e,t,r,c){const s=e.context();let u=0===c.items.length;const a=n(1,t,r);a.cases=[],a.cases.push(c);do{const t=E(e);u||(u=0===t.items.length),a.cases.push(t)}while(14!==s.currentType);return u&&CompileErrorCodes.MUST_HAVE_MESSAGES_IN_PLURAL,o(a,e.currentOffset(),e.currentPosition()),a}(e,r,c,s)}return{parse:function(r){const c=createTokenizer(r,assign({},e)),s=c.context(),u=n(0,s.offset,s.startLoc);return t&&u.loc&&(u.loc.source=r),u.body=l(c),14!==s.currentType&&(CompileErrorCodes.UNEXPECTED_LEXICAL_ANALYSIS,s.lastStartLoc,r[s.offset]),o(u,c.currentOffset(),c.currentPosition()),u}}}function getTokenCaption(e){if(14===e.type)return"EOF";const t=(e.value||"").replace(/\r?\n/gu,"\\n");return t.length>10?t.slice(0,9)+"…":t}function createTransformer(e,t={}){const r={ast:e,helpers:new Set};return{context:()=>r,helper:e=>(r.helpers.add(e),e)}}function traverseNodes(e,t){for(let r=0;r<e.length;r++)traverseNode(e[r],t)}function traverseNode(e,t){switch(e.type){case 1:traverseNodes(e.cases,t),t.helper("plural");break;case 2:traverseNodes(e.items,t);break;case 6:traverseNode(e.key,t),t.helper("linked"),t.helper("type");break;case 5:t.helper("interpolate"),t.helper("list");break;case 4:t.helper("interpolate"),t.helper("named")}}function transform(e,t={}){const r=createTransformer(e);r.helper("normalize"),e.body&&traverseNode(e.body,r);const n=r.context();e.helpers=Array.from(n.helpers)}function createCodeGenerator(e,t){const{sourceMap:r,filename:n,breakLineCode:o,needIndent:c}=t,s={source:e.loc.source,filename:n,code:"",column:1,line:1,offset:0,map:void 0,breakLineCode:o,needIndent:c,indentLevel:0};function u(e,t){s.code+=e}function a(e,t=!0){const r=t?o:"";u(c?r+" ".repeat(e):r)}return{context:()=>s,push:u,indent:function(e=!0){const t=++s.indentLevel;e&&a(t)},deindent:function(e=!0){const t=--s.indentLevel;e&&a(t)},newline:function(){a(s.indentLevel)},helper:e=>`_${e}`,needIndent:()=>s.needIndent}}function generateLinkedNode(e,t){const{helper:r}=e;e.push(`${r("linked")}(`),generateNode(e,t.key),t.modifier?(e.push(", "),generateNode(e,t.modifier),e.push(", _type")):e.push(", undefined, _type"),e.push(")")}function generateMessageNode(e,t){const{helper:r,needIndent:n}=e;e.push(`${r("normalize")}([`),e.indent(n());const o=t.items.length;for(let c=0;c<o&&(generateNode(e,t.items[c]),c!==o-1);c++)e.push(", ");e.deindent(n()),e.push("])")}function generatePluralNode(e,t){const{helper:r,needIndent:n}=e;if(t.cases.length>1){e.push(`${r("plural")}([`),e.indent(n());const o=t.cases.length;for(let r=0;r<o&&(generateNode(e,t.cases[r]),r!==o-1);r++)e.push(", ");e.deindent(n()),e.push("])")}}function generateResource(e,t){t.body?generateNode(e,t.body):e.push("null")}function generateNode(e,t){const{helper:r}=e;switch(t.type){case 0:generateResource(e,t);break;case 1:generatePluralNode(e,t);break;case 2:generateMessageNode(e,t);break;case 6:generateLinkedNode(e,t);break;case 8:case 7:case 9:case 3:e.push(JSON.stringify(t.value),t);break;case 5:e.push(`${r("interpolate")}(${r("list")}(${t.index}))`,t);break;case 4:e.push(`${r("interpolate")}(${r("named")}(${JSON.stringify(t.key)}))`,t)}}const generate=(e,t={})=>{const r=isString(t.mode)?t.mode:"normal",n=isString(t.filename)?t.filename:"message.intl",o=!!t.sourceMap,c=null!=t.breakLineCode?t.breakLineCode:"arrow"===r?";":"\n",s=t.needIndent?t.needIndent:"arrow"!==r,u=e.helpers||[],a=createCodeGenerator(e,{mode:r,filename:n,sourceMap:o,breakLineCode:c,needIndent:s});a.push("normal"===r?"function __msg__ (ctx) {":"(ctx) => {"),a.indent(s),u.length>0&&(a.push(`const { ${u.map((e=>`${e}: _${e}`)).join(", ")} } = ctx`),a.newline()),a.push("return "),generateNode(a,e),a.deindent(s),a.push("}");const{code:i,map:E}=a.context();return{ast:e,code:i,map:E?E.toJSON():void 0}};function baseCompile(e,t={}){const r=assign({},t),n=createParser(r).parse(e);return transform(n,r),generate(n,r)}export{CompileErrorCodes,ERROR_DOMAIN,LocationStub,baseCompile,createCompileError,createLocation,createParser,createPosition,defaultOnError,detectHtmlTag,errorMessages};
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * message-compiler v9.3.0-beta.16
2
+ * message-compiler v9.3.0-beta.17
3
3
  * (c) 2023 kazuya kawaguchi
4
4
  * Released under the MIT License.
5
5
  */
@@ -86,6 +86,9 @@ var IntlifyMessageCompiler = (function (exports) {
86
86
  throw error;
87
87
  }
88
88
 
89
+ const RE_HTML_TAG = /<\/?[\w\s="/.':;#-\/]+>/;
90
+ const detectHtmlTag = (source) => RE_HTML_TAG.test(source);
91
+
89
92
  const LocationStub = {
90
93
  start: { line: 1, column: 1, offset: 0 },
91
94
  end: { line: 1, column: 1, offset: 0 }
@@ -1400,10 +1403,9 @@ var IntlifyMessageCompiler = (function (exports) {
1400
1403
  exports.createParser = createParser;
1401
1404
  exports.createPosition = createPosition;
1402
1405
  exports.defaultOnError = defaultOnError;
1406
+ exports.detectHtmlTag = detectHtmlTag;
1403
1407
  exports.errorMessages = errorMessages;
1404
1408
 
1405
- Object.defineProperty(exports, '__esModule', { value: true });
1406
-
1407
1409
  return exports;
1408
1410
 
1409
1411
  })({});
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * message-compiler v9.3.0-beta.16
2
+ * message-compiler v9.3.0-beta.17
3
3
  * (c) 2023 kazuya kawaguchi
4
4
  * Released under the MIT License.
5
5
  */
6
- var IntlifyMessageCompiler=function(e){"use strict";const t=Object.assign,n=e=>"string"==typeof e,r={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,MUST_HAVE_MESSAGES_IN_PLURAL:11,UNEXPECTED_EMPTY_LINKED_MODIFIER:12,UNEXPECTED_EMPTY_LINKED_KEY:13,UNEXPECTED_LEXICAL_ANALYSIS:14,__EXTEND_POINT__:15},c={[r.EXPECTED_TOKEN]:"Expected token: '{0}'",[r.INVALID_TOKEN_IN_PLACEHOLDER]:"Invalid token in placeholder: '{0}'",[r.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER]:"Unterminated single quote in placeholder",[r.UNKNOWN_ESCAPE_SEQUENCE]:"Unknown escape sequence: \\{0}",[r.INVALID_UNICODE_ESCAPE_SEQUENCE]:"Invalid unicode escape sequence: {0}",[r.UNBALANCED_CLOSING_BRACE]:"Unbalanced closing brace",[r.UNTERMINATED_CLOSING_BRACE]:"Unterminated closing brace",[r.EMPTY_PLACEHOLDER]:"Empty placeholder",[r.NOT_ALLOW_NEST_PLACEHOLDER]:"Not allowed nest placeholder",[r.INVALID_LINKED_FORMAT]:"Invalid linked format",[r.MUST_HAVE_MESSAGES_IN_PLURAL]:"Plural must have messages",[r.UNEXPECTED_EMPTY_LINKED_MODIFIER]:"Unexpected empty linked modifier",[r.UNEXPECTED_EMPTY_LINKED_KEY]:"Unexpected empty linked key",[r.UNEXPECTED_LEXICAL_ANALYSIS]:"Unexpected lexical analysis in token: '{0}'"};function o(e,t,n={}){const{domain:r,messages:c,args:o}=n,s=new SyntaxError(String(e));return s.code=e,t&&(s.location=t),s.domain=r,s}function s(e,t,n){return{line:e,column:t,offset:n}}function u(e,t,n){const r={start:e,end:t};return null!=n&&(r.source=n),r}const a=" ",i="\n",l=String.fromCharCode(8232),f=String.fromCharCode(8233);function d(e){const t=e;let n=0,r=1,c=1,o=0;const s=e=>"\r"===t[e]&&t[e+1]===i,u=e=>t[e]===f,a=e=>t[e]===l,d=e=>s(e)||(e=>t[e]===i)(e)||u(e)||a(e),p=e=>s(e)||u(e)||a(e)?i:t[e];function E(){return o=0,d(n)&&(r++,c=0),s(n)&&n++,n++,c++,t[n]}return{index:()=>n,line:()=>r,column:()=>c,peekOffset:()=>o,charAt:p,currentChar:()=>p(n),currentPeek:()=>p(n+o),next:E,peek:function(){return s(n+o)&&o++,o++,t[n+o]},reset:function(){n=0,r=1,c=1,o=0},resetPeek:function(e=0){o=e},skipToPeek:function(){const e=n+o;for(;e!==n;)E();o=0}}}const p=void 0;function E(e,t={}){const n=!1!==t.location,r=d(e),c=()=>r.index(),o=()=>s(r.line(),r.column(),r.index()),l=o(),f=c(),E={currentType:14,offset:f,startLoc:l,endLoc:l,lastType:14,lastOffset:f,lastStartLoc:l,lastEndLoc:l,braceNest:0,inLinked:!1,text:""},L=()=>E,{onError:k}=t;function h(e,t,r){e.endLoc=o(),e.currentType=t;const c={type:t};return n&&(c.loc=u(e.startLoc,e.endLoc)),null!=r&&(c.value=r),c}const N=e=>h(e,14);function _(e,t){return e.currentChar()===t?(e.next(),t):(o(),"")}function T(e){let t="";for(;e.currentPeek()===a||e.currentPeek()===i;)t+=e.currentPeek(),e.peek();return t}function C(e){const t=T(e);return e.skipToPeek(),t}function P(e){if(e===p)return!1;const t=e.charCodeAt(0);return t>=97&&t<=122||t>=65&&t<=90||95===t}function y(e,t){const{currentType:n}=t;if(2!==n)return!1;T(e);const r=function(e){if(e===p)return!1;const t=e.charCodeAt(0);return t>=48&&t<=57}("-"===e.currentPeek()?e.peek():e.currentPeek());return e.resetPeek(),r}function x(e){T(e);const t="|"===e.currentPeek();return e.resetPeek(),t}function m(e,t=!0){const n=(t=!1,r="",c=!1)=>{const o=e.currentPeek();return"{"===o?"%"!==r&&t:"@"!==o&&o?"%"===o?(e.peek(),n(t,"%",!0)):"|"===o?!("%"!==r&&!c)||!(r===a||r===i):o===a?(e.peek(),n(!0,a,c)):o!==i||(e.peek(),n(!0,i,c)):"%"===r||t},r=n();return t&&e.resetPeek(),r}function I(e,t){const n=e.currentChar();return n===p?p:t(n)?(e.next(),n):null}function O(e){return I(e,(e=>{const t=e.charCodeAt(0);return t>=97&&t<=122||t>=65&&t<=90||t>=48&&t<=57||95===t||36===t}))}function S(e){return I(e,(e=>{const t=e.charCodeAt(0);return t>=48&&t<=57}))}function b(e){return I(e,(e=>{const t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}))}function A(e){let t="",n="";for(;t=S(e);)n+=t;return n}function v(e){let t="";for(;;){const n=e.currentChar();if("{"===n||"}"===n||"@"===n||"|"===n||!n)break;if("%"===n){if(!m(e))break;t+=n,e.next()}else if(n===a||n===i)if(m(e))t+=n,e.next();else{if(x(e))break;t+=n,e.next()}else t+=n,e.next()}return t}function D(e){const t=e.currentChar();switch(t){case"\\":case"'":return e.next(),`\\${t}`;case"u":return U(e,t,4);case"U":return U(e,t,6);default:return o(),""}}function U(e,t,n){_(e,t);let r="";for(let t=0;t<n;t++){const t=b(e);if(!t){o(),e.currentChar();break}r+=t}return`\\${t}${r}`}function g(e){C(e);const t=_(e,"|");return C(e),t}function M(e,t){let n=null;switch(e.currentChar()){case"{":return t.braceNest>=1&&o(),e.next(),n=h(t,2,"{"),C(e),t.braceNest++,n;case"}":return t.braceNest>0&&2===t.currentType&&o(),e.next(),n=h(t,3,"}"),t.braceNest--,t.braceNest>0&&C(e),t.inLinked&&0===t.braceNest&&(t.inLinked=!1),n;case"@":return t.braceNest>0&&o(),n=R(e,t)||N(t),t.braceNest=0,n;default:let r=!0,c=!0,s=!0;if(x(e))return t.braceNest>0&&o(),n=h(t,1,g(e)),t.braceNest=0,t.inLinked=!1,n;if(t.braceNest>0&&(5===t.currentType||6===t.currentType||7===t.currentType))return o(),t.braceNest=0,w(e,t);if(r=function(e,t){const{currentType:n}=t;if(2!==n)return!1;T(e);const r=P(e.currentPeek());return e.resetPeek(),r}(e,t))return n=h(t,5,function(e){C(e);let t="",n="";for(;t=O(e);)n+=t;return e.currentChar()===p&&o(),n}(e)),C(e),n;if(c=y(e,t))return n=h(t,6,function(e){C(e);let t="";return"-"===e.currentChar()?(e.next(),t+=`-${A(e)}`):t+=A(e),e.currentChar()===p&&o(),t}(e)),C(e),n;if(s=function(e,t){const{currentType:n}=t;if(2!==n)return!1;T(e);const r="'"===e.currentPeek();return e.resetPeek(),r}(e,t))return n=h(t,7,function(e){C(e),_(e,"'");let t="",n="";const r=e=>"'"!==e&&e!==i;for(;t=I(e,r);)n+="\\"===t?D(e):t;const c=e.currentChar();return c===i||c===p?(o(),c===i&&(e.next(),_(e,"'")),n):(_(e,"'"),n)}(e)),C(e),n;if(!r&&!c&&!s)return n=h(t,13,function(e){C(e);let t="",n="";const r=e=>"{"!==e&&"}"!==e&&e!==a&&e!==i;for(;t=I(e,r);)n+=t;return n}(e)),o(),n.value,C(e),n}return n}function R(e,t){const{currentType:n}=t;let r=null;const c=e.currentChar();switch(8!==n&&9!==n&&12!==n&&10!==n||c!==i&&c!==a||o(),c){case"@":return e.next(),r=h(t,8,"@"),t.inLinked=!0,r;case".":return C(e),e.next(),h(t,9,".");case":":return C(e),e.next(),h(t,10,":");default:return x(e)?(r=h(t,1,g(e)),t.braceNest=0,t.inLinked=!1,r):function(e,t){const{currentType:n}=t;if(8!==n)return!1;T(e);const r="."===e.currentPeek();return e.resetPeek(),r}(e,t)||function(e,t){const{currentType:n}=t;if(8!==n&&12!==n)return!1;T(e);const r=":"===e.currentPeek();return e.resetPeek(),r}(e,t)?(C(e),R(e,t)):function(e,t){const{currentType:n}=t;if(9!==n)return!1;T(e);const r=P(e.currentPeek());return e.resetPeek(),r}(e,t)?(C(e),h(t,12,function(e){let t="",n="";for(;t=O(e);)n+=t;return n}(e))):function(e,t){const{currentType:n}=t;if(10!==n)return!1;const r=()=>{const t=e.currentPeek();return"{"===t?P(e.peek()):!("@"===t||"%"===t||"|"===t||":"===t||"."===t||t===a||!t)&&(t===i?(e.peek(),r()):P(t))},c=r();return e.resetPeek(),c}(e,t)?(C(e),"{"===c?M(e,t)||r:h(t,11,function(e){const t=(n=!1,r)=>{const c=e.currentChar();return"{"!==c&&"%"!==c&&"@"!==c&&"|"!==c&&c?c===a?r:c===i?(r+=c,e.next(),t(n,r)):(r+=c,e.next(),t(!0,r)):r};return t(!1,"")}(e))):(8===n&&o(),t.braceNest=0,t.inLinked=!1,w(e,t))}}function w(e,t){let n={type:14};if(t.braceNest>0)return M(e,t)||N(t);if(t.inLinked)return R(e,t)||N(t);switch(e.currentChar()){case"{":return M(e,t)||N(t);case"}":return o(),e.next(),h(t,3,"}");case"@":return R(e,t)||N(t);default:if(x(e))return n=h(t,1,g(e)),t.braceNest=0,t.inLinked=!1,n;const{isModulo:r,hasSpace:c}=function(e){const t=T(e),n="%"===e.currentPeek()&&"{"===e.peek();return e.resetPeek(),{isModulo:n,hasSpace:t.length>0}}(e);if(r)return c?h(t,0,v(e)):h(t,4,function(e){C(e);return"%"!==e.currentChar()&&o(),e.next(),"%"}(e));if(m(e))return h(t,0,v(e))}return n}return{nextToken:function(){const{currentType:e,offset:t,startLoc:n,endLoc:s}=E;return E.lastType=e,E.lastOffset=t,E.lastStartLoc=n,E.lastEndLoc=s,E.offset=c(),E.startLoc=o(),r.currentChar()===p?h(E,14):w(r,E)},currentOffset:c,currentPosition:o,context:L}}const L="parser",k=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function h(e,t,n){switch(e){case"\\\\":return"\\";case"\\'":return"'";default:{const e=parseInt(t||n,16);return e<=55295||e>=57344?String.fromCodePoint(e):"�"}}}function N(e={}){const n=!1!==e.location,{onError:r}=e;function c(e,t,r){const c={type:e,start:t,end:t};return n&&(c.loc={start:r,end:r}),c}function o(e,t,r,c){e.end=t,c&&(e.type=c),n&&e.loc&&(e.loc.end=r)}function s(e,t){const n=e.context(),r=c(3,n.offset,n.startLoc);return r.value=t,o(r,e.currentOffset(),e.currentPosition()),r}function u(e,t){const n=e.context(),{lastOffset:r,lastStartLoc:s}=n,u=c(5,r,s);return u.index=parseInt(t,10),e.nextToken(),o(u,e.currentOffset(),e.currentPosition()),u}function a(e,t){const n=e.context(),{lastOffset:r,lastStartLoc:s}=n,u=c(4,r,s);return u.key=t,e.nextToken(),o(u,e.currentOffset(),e.currentPosition()),u}function i(e,t){const n=e.context(),{lastOffset:r,lastStartLoc:s}=n,u=c(9,r,s);return u.value=t.replace(k,h),e.nextToken(),o(u,e.currentOffset(),e.currentPosition()),u}function l(e){const t=e.context(),n=c(6,t.offset,t.startLoc);let r=e.nextToken();if(9===r.type){const t=function(e){const t=e.nextToken(),n=e.context(),{lastOffset:r,lastStartLoc:s}=n,u=c(8,r,s);return 12!==t.type?(n.lastStartLoc,u.value="",o(u,r,s),{nextConsumeToken:t,node:u}):(null==t.value&&(n.lastStartLoc,_(t)),u.value=t.value||"",o(u,e.currentOffset(),e.currentPosition()),{node:u})}(e);n.modifier=t.node,r=t.nextConsumeToken||e.nextToken()}switch(10!==r.type&&(t.lastStartLoc,_(r)),r=e.nextToken(),2===r.type&&(r=e.nextToken()),r.type){case 11:null==r.value&&(t.lastStartLoc,_(r)),n.key=function(e,t){const n=e.context(),r=c(7,n.offset,n.startLoc);return r.value=t,o(r,e.currentOffset(),e.currentPosition()),r}(e,r.value||"");break;case 5:null==r.value&&(t.lastStartLoc,_(r)),n.key=a(e,r.value||"");break;case 6:null==r.value&&(t.lastStartLoc,_(r)),n.key=u(e,r.value||"");break;case 7:null==r.value&&(t.lastStartLoc,_(r)),n.key=i(e,r.value||"");break;default:t.lastStartLoc;const s=e.context(),l=c(7,s.offset,s.startLoc);return l.value="",o(l,s.offset,s.startLoc),n.key=l,o(n,s.offset,s.startLoc),{nextConsumeToken:r,node:n}}return o(n,e.currentOffset(),e.currentPosition()),{node:n}}function f(e){const t=e.context(),n=c(2,1===t.currentType?e.currentOffset():t.offset,1===t.currentType?t.endLoc:t.startLoc);n.items=[];let r=null;do{const c=r||e.nextToken();switch(r=null,c.type){case 0:null==c.value&&(t.lastStartLoc,_(c)),n.items.push(s(e,c.value||""));break;case 6:null==c.value&&(t.lastStartLoc,_(c)),n.items.push(u(e,c.value||""));break;case 5:null==c.value&&(t.lastStartLoc,_(c)),n.items.push(a(e,c.value||""));break;case 7:null==c.value&&(t.lastStartLoc,_(c)),n.items.push(i(e,c.value||""));break;case 8:const o=l(e);n.items.push(o.node),r=o.nextConsumeToken||null}}while(14!==t.currentType&&1!==t.currentType);return o(n,1===t.currentType?t.lastOffset:e.currentOffset(),1===t.currentType?t.lastEndLoc:e.currentPosition()),n}function d(e){const t=e.context(),{offset:n,startLoc:r}=t,s=f(e);return 14===t.currentType?s:function(e,t,n,r){const s=e.context();let u=0===r.items.length;const a=c(1,t,n);a.cases=[],a.cases.push(r);do{const t=f(e);u||(u=0===t.items.length),a.cases.push(t)}while(14!==s.currentType);return o(a,e.currentOffset(),e.currentPosition()),a}(e,n,r,s)}return{parse:function(r){const s=E(r,t({},e)),u=s.context(),a=c(0,u.offset,u.startLoc);return n&&a.loc&&(a.loc.source=r),a.body=d(s),14!==u.currentType&&(u.lastStartLoc,r[u.offset]),o(a,s.currentOffset(),s.currentPosition()),a}}}function _(e){if(14===e.type)return"EOF";const t=(e.value||"").replace(/\r?\n/gu,"\\n");return t.length>10?t.slice(0,9)+"…":t}function T(e,t){for(let n=0;n<e.length;n++)C(e[n],t)}function C(e,t){switch(e.type){case 1:T(e.cases,t),t.helper("plural");break;case 2:T(e.items,t);break;case 6:C(e.key,t),t.helper("linked"),t.helper("type");break;case 5:t.helper("interpolate"),t.helper("list");break;case 4:t.helper("interpolate"),t.helper("named")}}function P(e,t={}){const n=function(e,t={}){const n={ast:e,helpers:new Set};return{context:()=>n,helper:e=>(n.helpers.add(e),e)}}(e);n.helper("normalize"),e.body&&C(e.body,n);const r=n.context();e.helpers=Array.from(r.helpers)}function y(e,t){const{helper:n}=e;switch(t.type){case 0:!function(e,t){t.body?y(e,t.body):e.push("null")}(e,t);break;case 1:!function(e,t){const{helper:n,needIndent:r}=e;if(t.cases.length>1){e.push(`${n("plural")}([`),e.indent(r());const c=t.cases.length;for(let n=0;n<c&&(y(e,t.cases[n]),n!==c-1);n++)e.push(", ");e.deindent(r()),e.push("])")}}(e,t);break;case 2:!function(e,t){const{helper:n,needIndent:r}=e;e.push(`${n("normalize")}([`),e.indent(r());const c=t.items.length;for(let n=0;n<c&&(y(e,t.items[n]),n!==c-1);n++)e.push(", ");e.deindent(r()),e.push("])")}(e,t);break;case 6:!function(e,t){const{helper:n}=e;e.push(`${n("linked")}(`),y(e,t.key),t.modifier?(e.push(", "),y(e,t.modifier),e.push(", _type")):e.push(", undefined, _type"),e.push(")")}(e,t);break;case 8:case 7:case 9:case 3:e.push(JSON.stringify(t.value),t);break;case 5:e.push(`${n("interpolate")}(${n("list")}(${t.index}))`,t);break;case 4:e.push(`${n("interpolate")}(${n("named")}(${JSON.stringify(t.key)}))`,t)}}return e.CompileErrorCodes=r,e.ERROR_DOMAIN=L,e.LocationStub={start:{line:1,column:1,offset:0},end:{line:1,column:1,offset:0}},e.baseCompile=function(e,r={}){const c=t({},r),o=N(c).parse(e);return P(o,c),((e,t={})=>{const r=n(t.mode)?t.mode:"normal",c=n(t.filename)?t.filename:"message.intl",o=!!t.sourceMap,s=null!=t.breakLineCode?t.breakLineCode:"arrow"===r?";":"\n",u=t.needIndent?t.needIndent:"arrow"!==r,a=e.helpers||[],i=function(e,t){const{sourceMap:n,filename:r,breakLineCode:c,needIndent:o}=t,s={source:e.loc.source,filename:r,code:"",column:1,line:1,offset:0,map:void 0,breakLineCode:c,needIndent:o,indentLevel:0};function u(e,t){s.code+=e}function a(e,t=!0){const n=t?c:"";u(o?n+" ".repeat(e):n)}return{context:()=>s,push:u,indent:function(e=!0){const t=++s.indentLevel;e&&a(t)},deindent:function(e=!0){const t=--s.indentLevel;e&&a(t)},newline:function(){a(s.indentLevel)},helper:e=>`_${e}`,needIndent:()=>s.needIndent}}(e,{mode:r,filename:c,sourceMap:o,breakLineCode:s,needIndent:u});i.push("normal"===r?"function __msg__ (ctx) {":"(ctx) => {"),i.indent(u),a.length>0&&(i.push(`const { ${a.map((e=>`${e}: _${e}`)).join(", ")} } = ctx`),i.newline()),i.push("return "),y(i,e),i.deindent(u),i.push("}");const{code:l,map:f}=i.context();return{ast:e,code:l,map:f?f.toJSON():void 0}})(o,c)},e.createCompileError=o,e.createLocation=u,e.createParser=N,e.createPosition=s,e.defaultOnError=function(e){throw e},e.errorMessages=c,Object.defineProperty(e,"__esModule",{value:!0}),e}({});
6
+ var IntlifyMessageCompiler=function(e){"use strict";const t=Object.assign,n=e=>"string"==typeof e,r={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,MUST_HAVE_MESSAGES_IN_PLURAL:11,UNEXPECTED_EMPTY_LINKED_MODIFIER:12,UNEXPECTED_EMPTY_LINKED_KEY:13,UNEXPECTED_LEXICAL_ANALYSIS:14,__EXTEND_POINT__:15},c={[r.EXPECTED_TOKEN]:"Expected token: '{0}'",[r.INVALID_TOKEN_IN_PLACEHOLDER]:"Invalid token in placeholder: '{0}'",[r.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER]:"Unterminated single quote in placeholder",[r.UNKNOWN_ESCAPE_SEQUENCE]:"Unknown escape sequence: \\{0}",[r.INVALID_UNICODE_ESCAPE_SEQUENCE]:"Invalid unicode escape sequence: {0}",[r.UNBALANCED_CLOSING_BRACE]:"Unbalanced closing brace",[r.UNTERMINATED_CLOSING_BRACE]:"Unterminated closing brace",[r.EMPTY_PLACEHOLDER]:"Empty placeholder",[r.NOT_ALLOW_NEST_PLACEHOLDER]:"Not allowed nest placeholder",[r.INVALID_LINKED_FORMAT]:"Invalid linked format",[r.MUST_HAVE_MESSAGES_IN_PLURAL]:"Plural must have messages",[r.UNEXPECTED_EMPTY_LINKED_MODIFIER]:"Unexpected empty linked modifier",[r.UNEXPECTED_EMPTY_LINKED_KEY]:"Unexpected empty linked key",[r.UNEXPECTED_LEXICAL_ANALYSIS]:"Unexpected lexical analysis in token: '{0}'"};function o(e,t,n={}){const{domain:r,messages:c,args:o}=n,s=new SyntaxError(String(e));return s.code=e,t&&(s.location=t),s.domain=r,s}const s=/<\/?[\w\s="/.':;#-\/]+>/;function u(e,t,n){return{line:e,column:t,offset:n}}function a(e,t,n){const r={start:e,end:t};return null!=n&&(r.source=n),r}const i=" ",l="\r",E="\n",f=String.fromCharCode(8232),L=String.fromCharCode(8233);function N(e){const t=e;let n=0,r=1,c=1,o=0;const s=e=>t[e]===l&&t[e+1]===E,u=e=>t[e]===L,a=e=>t[e]===f,i=e=>s(e)||(e=>t[e]===E)(e)||u(e)||a(e),N=e=>s(e)||u(e)||a(e)?E:t[e];function _(){return o=0,i(n)&&(r++,c=0),s(n)&&n++,n++,c++,t[n]}return{index:()=>n,line:()=>r,column:()=>c,peekOffset:()=>o,charAt:N,currentChar:()=>N(n),currentPeek:()=>N(n+o),next:_,peek:function(){return s(n+o)&&o++,o++,t[n+o]},reset:function(){n=0,r=1,c=1,o=0},resetPeek:function(e=0){o=e},skipToPeek:function(){const e=n+o;for(;e!==n;)_();o=0}}}const _=void 0,d="'";function p(e,t={}){const n=!1!==t.location,c=N(e),o=()=>c.index(),s=()=>u(c.line(),c.column(),c.index()),l=s(),f=o(),L={currentType:14,offset:f,startLoc:l,endLoc:l,lastType:14,lastOffset:f,lastStartLoc:l,lastEndLoc:l,braceNest:0,inLinked:!1,text:""},p=()=>L,{onError:C}=t;function T(e,t,r){e.endLoc=s(),e.currentType=t;const c={type:t};return n&&(c.loc=a(e.startLoc,e.endLoc)),null!=r&&(c.value=r),c}const A=e=>T(e,14);function I(e,t){return e.currentChar()===t?(e.next(),t):(r.EXPECTED_TOKEN,s(),"")}function k(e){let t="";for(;e.currentPeek()===i||e.currentPeek()===E;)t+=e.currentPeek(),e.peek();return t}function h(e){const t=k(e);return e.skipToPeek(),t}function P(e){if(e===_)return!1;const t=e.charCodeAt(0);return t>=97&&t<=122||t>=65&&t<=90||95===t}function S(e,t){const{currentType:n}=t;if(2!==n)return!1;k(e);const r=function(e){if(e===_)return!1;const t=e.charCodeAt(0);return t>=48&&t<=57}("-"===e.currentPeek()?e.peek():e.currentPeek());return e.resetPeek(),r}function O(e){k(e);const t="|"===e.currentPeek();return e.resetPeek(),t}function D(e,t=!0){const n=(t=!1,r="",c=!1)=>{const o=e.currentPeek();return"{"===o?"%"!==r&&t:"@"!==o&&o?"%"===o?(e.peek(),n(t,"%",!0)):"|"===o?!("%"!==r&&!c)||!(r===i||r===E):o===i?(e.peek(),n(!0,i,c)):o!==E||(e.peek(),n(!0,E,c)):"%"===r||t},r=n();return t&&e.resetPeek(),r}function y(e,t){const n=e.currentChar();return n===_?_:t(n)?(e.next(),n):null}function m(e){return y(e,(e=>{const t=e.charCodeAt(0);return t>=97&&t<=122||t>=65&&t<=90||t>=48&&t<=57||95===t||36===t}))}function x(e){return y(e,(e=>{const t=e.charCodeAt(0);return t>=48&&t<=57}))}function U(e){return y(e,(e=>{const t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}))}function b(e){let t="",n="";for(;t=x(e);)n+=t;return n}function R(e){let t="";for(;;){const n=e.currentChar();if("{"===n||"}"===n||"@"===n||"|"===n||!n)break;if("%"===n){if(!D(e))break;t+=n,e.next()}else if(n===i||n===E)if(D(e))t+=n,e.next();else{if(O(e))break;t+=n,e.next()}else t+=n,e.next()}return t}function v(e){const t=e.currentChar();switch(t){case"\\":case"'":return e.next(),`\\${t}`;case"u":return M(e,t,4);case"U":return M(e,t,6);default:return r.UNKNOWN_ESCAPE_SEQUENCE,s(),""}}function M(e,t,n){I(e,t);let c="";for(let o=0;o<n;o++){const t=U(e);if(!t){r.INVALID_UNICODE_ESCAPE_SEQUENCE,s(),e.currentChar();break}c+=t}return`\\${t}${c}`}function X(e){h(e);const t=I(e,"|");return h(e),t}function g(e,t){let n=null;switch(e.currentChar()){case"{":return t.braceNest>=1&&(r.NOT_ALLOW_NEST_PLACEHOLDER,s()),e.next(),n=T(t,2,"{"),h(e),t.braceNest++,n;case"}":return t.braceNest>0&&2===t.currentType&&(r.EMPTY_PLACEHOLDER,s()),e.next(),n=T(t,3,"}"),t.braceNest--,t.braceNest>0&&h(e),t.inLinked&&0===t.braceNest&&(t.inLinked=!1),n;case"@":return t.braceNest>0&&(r.UNTERMINATED_CLOSING_BRACE,s()),n=Y(e,t)||A(t),t.braceNest=0,n;default:let c=!0,o=!0,u=!0;if(O(e))return t.braceNest>0&&(r.UNTERMINATED_CLOSING_BRACE,s()),n=T(t,1,X(e)),t.braceNest=0,t.inLinked=!1,n;if(t.braceNest>0&&(5===t.currentType||6===t.currentType||7===t.currentType))return r.UNTERMINATED_CLOSING_BRACE,s(),t.braceNest=0,K(e,t);if(c=function(e,t){const{currentType:n}=t;if(2!==n)return!1;k(e);const r=P(e.currentPeek());return e.resetPeek(),r}(e,t))return n=T(t,5,function(e){h(e);let t="",n="";for(;t=m(e);)n+=t;return e.currentChar()===_&&(r.UNTERMINATED_CLOSING_BRACE,s()),n}(e)),h(e),n;if(o=S(e,t))return n=T(t,6,function(e){h(e);let t="";return"-"===e.currentChar()?(e.next(),t+=`-${b(e)}`):t+=b(e),e.currentChar()===_&&(r.UNTERMINATED_CLOSING_BRACE,s()),t}(e)),h(e),n;if(u=function(e,t){const{currentType:n}=t;if(2!==n)return!1;k(e);const r=e.currentPeek()===d;return e.resetPeek(),r}(e,t))return n=T(t,7,function(e){h(e),I(e,"'");let t="",n="";const c=e=>e!==d&&e!==E;for(;t=y(e,c);)n+="\\"===t?v(e):t;const o=e.currentChar();return o===E||o===_?(r.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,s(),o===E&&(e.next(),I(e,"'")),n):(I(e,"'"),n)}(e)),h(e),n;if(!c&&!o&&!u)return n=T(t,13,function(e){h(e);let t="",n="";const r=e=>"{"!==e&&"}"!==e&&e!==i&&e!==E;for(;t=y(e,r);)n+=t;return n}(e)),r.INVALID_TOKEN_IN_PLACEHOLDER,s(),n.value,h(e),n}return n}function Y(e,t){const{currentType:n}=t;let c=null;const o=e.currentChar();switch(8!==n&&9!==n&&12!==n&&10!==n||o!==E&&o!==i||(r.INVALID_LINKED_FORMAT,s()),o){case"@":return e.next(),c=T(t,8,"@"),t.inLinked=!0,c;case".":return h(e),e.next(),T(t,9,".");case":":return h(e),e.next(),T(t,10,":");default:return O(e)?(c=T(t,1,X(e)),t.braceNest=0,t.inLinked=!1,c):function(e,t){const{currentType:n}=t;if(8!==n)return!1;k(e);const r="."===e.currentPeek();return e.resetPeek(),r}(e,t)||function(e,t){const{currentType:n}=t;if(8!==n&&12!==n)return!1;k(e);const r=":"===e.currentPeek();return e.resetPeek(),r}(e,t)?(h(e),Y(e,t)):function(e,t){const{currentType:n}=t;if(9!==n)return!1;k(e);const r=P(e.currentPeek());return e.resetPeek(),r}(e,t)?(h(e),T(t,12,function(e){let t="",n="";for(;t=m(e);)n+=t;return n}(e))):function(e,t){const{currentType:n}=t;if(10!==n)return!1;const r=()=>{const t=e.currentPeek();return"{"===t?P(e.peek()):!("@"===t||"%"===t||"|"===t||":"===t||"."===t||t===i||!t)&&(t===E?(e.peek(),r()):P(t))},c=r();return e.resetPeek(),c}(e,t)?(h(e),"{"===o?g(e,t)||c:T(t,11,function(e){const t=(n=!1,r)=>{const c=e.currentChar();return"{"!==c&&"%"!==c&&"@"!==c&&"|"!==c&&c?c===i?r:c===E?(r+=c,e.next(),t(n,r)):(r+=c,e.next(),t(!0,r)):r};return t(!1,"")}(e))):(8===n&&(r.INVALID_LINKED_FORMAT,s()),t.braceNest=0,t.inLinked=!1,K(e,t))}}function K(e,t){let n={type:14};if(t.braceNest>0)return g(e,t)||A(t);if(t.inLinked)return Y(e,t)||A(t);switch(e.currentChar()){case"{":return g(e,t)||A(t);case"}":return r.UNBALANCED_CLOSING_BRACE,s(),e.next(),T(t,3,"}");case"@":return Y(e,t)||A(t);default:if(O(e))return n=T(t,1,X(e)),t.braceNest=0,t.inLinked=!1,n;const{isModulo:c,hasSpace:o}=function(e){const t=k(e),n="%"===e.currentPeek()&&"{"===e.peek();return e.resetPeek(),{isModulo:n,hasSpace:t.length>0}}(e);if(c)return o?T(t,0,R(e)):T(t,4,function(e){h(e);const t=e.currentChar();return"%"!==t&&(r.EXPECTED_TOKEN,s()),e.next(),"%"}(e));if(D(e))return T(t,0,R(e))}return n}return{nextToken:function(){const{currentType:e,offset:t,startLoc:n,endLoc:r}=L;return L.lastType=e,L.lastOffset=t,L.lastStartLoc=n,L.lastEndLoc=r,L.offset=o(),L.startLoc=s(),c.currentChar()===_?T(L,14):K(c,L)},currentOffset:o,currentPosition:s,context:p}}const C="parser",T=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function A(e,t,n){switch(e){case"\\\\":return"\\";case"\\'":return"'";default:{const e=parseInt(t||n,16);return e<=55295||e>=57344?String.fromCodePoint(e):"�"}}}function I(e={}){const n=!1!==e.location,{onError:c}=e;function o(e,t,r){const c={type:e,start:t,end:t};return n&&(c.loc={start:r,end:r}),c}function s(e,t,r,c){e.end=t,c&&(e.type=c),n&&e.loc&&(e.loc.end=r)}function u(e,t){const n=e.context(),r=o(3,n.offset,n.startLoc);return r.value=t,s(r,e.currentOffset(),e.currentPosition()),r}function a(e,t){const n=e.context(),{lastOffset:r,lastStartLoc:c}=n,u=o(5,r,c);return u.index=parseInt(t,10),e.nextToken(),s(u,e.currentOffset(),e.currentPosition()),u}function i(e,t){const n=e.context(),{lastOffset:r,lastStartLoc:c}=n,u=o(4,r,c);return u.key=t,e.nextToken(),s(u,e.currentOffset(),e.currentPosition()),u}function l(e,t){const n=e.context(),{lastOffset:r,lastStartLoc:c}=n,u=o(9,r,c);return u.value=t.replace(T,A),e.nextToken(),s(u,e.currentOffset(),e.currentPosition()),u}function E(e){const t=e.context(),n=o(6,t.offset,t.startLoc);let c=e.nextToken();if(9===c.type){const t=function(e){const t=e.nextToken(),n=e.context(),{lastOffset:c,lastStartLoc:u}=n,a=o(8,c,u);return 12!==t.type?(r.UNEXPECTED_EMPTY_LINKED_MODIFIER,n.lastStartLoc,a.value="",s(a,c,u),{nextConsumeToken:t,node:a}):(null==t.value&&(r.UNEXPECTED_LEXICAL_ANALYSIS,n.lastStartLoc,k(t)),a.value=t.value||"",s(a,e.currentOffset(),e.currentPosition()),{node:a})}(e);n.modifier=t.node,c=t.nextConsumeToken||e.nextToken()}switch(10!==c.type&&(r.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,k(c)),c=e.nextToken(),2===c.type&&(c=e.nextToken()),c.type){case 11:null==c.value&&(r.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,k(c)),n.key=function(e,t){const n=e.context(),r=o(7,n.offset,n.startLoc);return r.value=t,s(r,e.currentOffset(),e.currentPosition()),r}(e,c.value||"");break;case 5:null==c.value&&(r.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,k(c)),n.key=i(e,c.value||"");break;case 6:null==c.value&&(r.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,k(c)),n.key=a(e,c.value||"");break;case 7:null==c.value&&(r.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,k(c)),n.key=l(e,c.value||"");break;default:r.UNEXPECTED_EMPTY_LINKED_KEY,t.lastStartLoc;const u=e.context(),E=o(7,u.offset,u.startLoc);return E.value="",s(E,u.offset,u.startLoc),n.key=E,s(n,u.offset,u.startLoc),{nextConsumeToken:c,node:n}}return s(n,e.currentOffset(),e.currentPosition()),{node:n}}function f(e){const t=e.context(),n=o(2,1===t.currentType?e.currentOffset():t.offset,1===t.currentType?t.endLoc:t.startLoc);n.items=[];let c=null;do{const o=c||e.nextToken();switch(c=null,o.type){case 0:null==o.value&&(r.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,k(o)),n.items.push(u(e,o.value||""));break;case 6:null==o.value&&(r.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,k(o)),n.items.push(a(e,o.value||""));break;case 5:null==o.value&&(r.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,k(o)),n.items.push(i(e,o.value||""));break;case 7:null==o.value&&(r.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,k(o)),n.items.push(l(e,o.value||""));break;case 8:const s=E(e);n.items.push(s.node),c=s.nextConsumeToken||null}}while(14!==t.currentType&&1!==t.currentType);return s(n,1===t.currentType?t.lastOffset:e.currentOffset(),1===t.currentType?t.lastEndLoc:e.currentPosition()),n}function L(e){const t=e.context(),{offset:n,startLoc:c}=t,u=f(e);return 14===t.currentType?u:function(e,t,n,c){const u=e.context();let a=0===c.items.length;const i=o(1,t,n);i.cases=[],i.cases.push(c);do{const t=f(e);a||(a=0===t.items.length),i.cases.push(t)}while(14!==u.currentType);return a&&r.MUST_HAVE_MESSAGES_IN_PLURAL,s(i,e.currentOffset(),e.currentPosition()),i}(e,n,c,u)}return{parse:function(c){const u=p(c,t({},e)),a=u.context(),i=o(0,a.offset,a.startLoc);return n&&i.loc&&(i.loc.source=c),i.body=L(u),14!==a.currentType&&(r.UNEXPECTED_LEXICAL_ANALYSIS,a.lastStartLoc,c[a.offset]),s(i,u.currentOffset(),u.currentPosition()),i}}}function k(e){if(14===e.type)return"EOF";const t=(e.value||"").replace(/\r?\n/gu,"\\n");return t.length>10?t.slice(0,9)+"…":t}function h(e,t){for(let n=0;n<e.length;n++)P(e[n],t)}function P(e,t){switch(e.type){case 1:h(e.cases,t),t.helper("plural");break;case 2:h(e.items,t);break;case 6:P(e.key,t),t.helper("linked"),t.helper("type");break;case 5:t.helper("interpolate"),t.helper("list");break;case 4:t.helper("interpolate"),t.helper("named")}}function S(e,t={}){const n=function(e,t={}){const n={ast:e,helpers:new Set};return{context:()=>n,helper:e=>(n.helpers.add(e),e)}}(e);n.helper("normalize"),e.body&&P(e.body,n);const r=n.context();e.helpers=Array.from(r.helpers)}function O(e,t){const{helper:n}=e;switch(t.type){case 0:!function(e,t){t.body?O(e,t.body):e.push("null")}(e,t);break;case 1:!function(e,t){const{helper:n,needIndent:r}=e;if(t.cases.length>1){e.push(`${n("plural")}([`),e.indent(r());const c=t.cases.length;for(let n=0;n<c&&(O(e,t.cases[n]),n!==c-1);n++)e.push(", ");e.deindent(r()),e.push("])")}}(e,t);break;case 2:!function(e,t){const{helper:n,needIndent:r}=e;e.push(`${n("normalize")}([`),e.indent(r());const c=t.items.length;for(let o=0;o<c&&(O(e,t.items[o]),o!==c-1);o++)e.push(", ");e.deindent(r()),e.push("])")}(e,t);break;case 6:!function(e,t){const{helper:n}=e;e.push(`${n("linked")}(`),O(e,t.key),t.modifier?(e.push(", "),O(e,t.modifier),e.push(", _type")):e.push(", undefined, _type"),e.push(")")}(e,t);break;case 8:case 7:case 9:case 3:e.push(JSON.stringify(t.value),t);break;case 5:e.push(`${n("interpolate")}(${n("list")}(${t.index}))`,t);break;case 4:e.push(`${n("interpolate")}(${n("named")}(${JSON.stringify(t.key)}))`,t)}}const D=(e,t={})=>{const r=n(t.mode)?t.mode:"normal",c=n(t.filename)?t.filename:"message.intl",o=!!t.sourceMap,s=null!=t.breakLineCode?t.breakLineCode:"arrow"===r?";":"\n",u=t.needIndent?t.needIndent:"arrow"!==r,a=e.helpers||[],i=function(e,t){const{sourceMap:n,filename:r,breakLineCode:c,needIndent:o}=t,s={source:e.loc.source,filename:r,code:"",column:1,line:1,offset:0,map:void 0,breakLineCode:c,needIndent:o,indentLevel:0};function u(e,t){s.code+=e}function a(e,t=!0){const n=t?c:"";u(o?n+" ".repeat(e):n)}return{context:()=>s,push:u,indent:function(e=!0){const t=++s.indentLevel;e&&a(t)},deindent:function(e=!0){const t=--s.indentLevel;e&&a(t)},newline:function(){a(s.indentLevel)},helper:e=>`_${e}`,needIndent:()=>s.needIndent}}(e,{mode:r,filename:c,sourceMap:o,breakLineCode:s,needIndent:u});i.push("normal"===r?"function __msg__ (ctx) {":"(ctx) => {"),i.indent(u),a.length>0&&(i.push(`const { ${a.map((e=>`${e}: _${e}`)).join(", ")} } = ctx`),i.newline()),i.push("return "),O(i,e),i.deindent(u),i.push("}");const{code:l,map:E}=i.context();return{ast:e,code:l,map:E?E.toJSON():void 0}};return e.CompileErrorCodes=r,e.ERROR_DOMAIN=C,e.LocationStub={start:{line:1,column:1,offset:0},end:{line:1,column:1,offset:0}},e.baseCompile=function(e,n={}){const r=t({},n),c=I(r).parse(e);return S(c,r),D(c,r)},e.createCompileError=o,e.createLocation=a,e.createParser=I,e.createPosition=u,e.defaultOnError=function(e){throw e},e.detectHtmlTag=e=>s.test(e),e.errorMessages=c,e}({});
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * message-compiler v9.3.0-beta.16
2
+ * message-compiler v9.3.0-beta.17
3
3
  * (c) 2023 kazuya kawaguchi
4
4
  * Released under the MIT License.
5
5
  */
@@ -64,6 +64,9 @@ function defaultOnError(error) {
64
64
  throw error;
65
65
  }
66
66
 
67
+ const RE_HTML_TAG = /<\/?[\w\s="/.':;#-\/]+>/;
68
+ const detectHtmlTag = (source) => RE_HTML_TAG.test(source);
69
+
67
70
  const LocationStub = {
68
71
  start: { line: 1, column: 1, offset: 0 },
69
72
  end: { line: 1, column: 1, offset: 0 }
@@ -1369,4 +1372,4 @@ function baseCompile(source, options = {}) {
1369
1372
  return generate(ast, assignedOptions);
1370
1373
  }
1371
1374
 
1372
- export { CompileErrorCodes, ERROR_DOMAIN, LocationStub, baseCompile, createCompileError, createLocation, createParser, createPosition, defaultOnError, errorMessages };
1375
+ export { CompileErrorCodes, ERROR_DOMAIN, LocationStub, baseCompile, createCompileError, createLocation, createParser, createPosition, defaultOnError, detectHtmlTag, errorMessages };
@@ -1,12 +1,10 @@
1
1
  /*!
2
- * message-compiler v9.3.0-beta.16
2
+ * message-compiler v9.3.0-beta.17
3
3
  * (c) 2023 kazuya kawaguchi
4
4
  * Released under the MIT License.
5
5
  */
6
6
  'use strict';
7
7
 
8
- Object.defineProperty(exports, '__esModule', { value: true });
9
-
10
8
  var shared = require('@intlify/shared');
11
9
  var sourceMap = require('source-map');
12
10
 
@@ -67,6 +65,9 @@ function defaultOnError(error) {
67
65
  throw error;
68
66
  }
69
67
 
68
+ const RE_HTML_TAG = /<\/?[\w\s="/.':;#-\/]+>/;
69
+ const detectHtmlTag = (source) => RE_HTML_TAG.test(source);
70
+
70
71
  const LocationStub = {
71
72
  start: { line: 1, column: 1, offset: 0 },
72
73
  end: { line: 1, column: 1, offset: 0 }
@@ -1433,4 +1434,5 @@ exports.createLocation = createLocation;
1433
1434
  exports.createParser = createParser;
1434
1435
  exports.createPosition = createPosition;
1435
1436
  exports.defaultOnError = defaultOnError;
1437
+ exports.detectHtmlTag = detectHtmlTag;
1436
1438
  exports.errorMessages = errorMessages;
@@ -0,0 +1,2 @@
1
+ export declare function setup(): Promise<() => Promise<void>>;
2
+ //# sourceMappingURL=vitest.globalSetup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vitest.globalSetup.d.ts","sourceRoot":"","sources":["../../../../scripts/vitest.globalSetup.ts"],"names":[],"mappings":"AASA,wBAAsB,KAAK,iCAK1B"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=vitest.setup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vitest.setup.d.ts","sourceRoot":"","sources":["../../../../scripts/vitest.setup.ts"],"names":[],"mappings":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intlify/message-compiler",
3
- "version": "9.3.0-beta.16",
3
+ "version": "9.3.0-beta.17",
4
4
  "description": "@intlify/message-compiler",
5
5
  "keywords": [
6
6
  "compiler",
@@ -34,7 +34,7 @@
34
34
  "types": "dist/message-compiler.d.ts",
35
35
  "dependencies": {
36
36
  "source-map": "0.6.1",
37
- "@intlify/shared": "9.3.0-beta.16"
37
+ "@intlify/shared": "9.3.0-beta.17"
38
38
  },
39
39
  "engines": {
40
40
  "node": ">= 14"