gt 2.14.35 → 2.14.36

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 (429) hide show
  1. package/CHANGELOG.md +16 -1
  2. package/dist/api/collectUserEditDiffs.js +112 -155
  3. package/dist/api/collectUserEditDiffs.js.map +1 -0
  4. package/dist/api/downloadFileBatch.js +164 -241
  5. package/dist/api/downloadFileBatch.js.map +1 -0
  6. package/dist/api/saveLocalEdits.js +37 -41
  7. package/dist/api/saveLocalEdits.js.map +1 -0
  8. package/dist/bin/bin-entry.js +17 -7
  9. package/dist/bin/bin-entry.js.map +1 -0
  10. package/dist/bin/bin-main.js +43 -61
  11. package/dist/bin/bin-main.js.map +1 -0
  12. package/dist/cli/base.js +382 -497
  13. package/dist/cli/base.js.map +1 -0
  14. package/dist/cli/commands/download.js +41 -49
  15. package/dist/cli/commands/download.js.map +1 -0
  16. package/dist/cli/commands/enqueue.js +26 -25
  17. package/dist/cli/commands/enqueue.js.map +1 -0
  18. package/dist/cli/commands/setupProject.js +33 -36
  19. package/dist/cli/commands/setupProject.js.map +1 -0
  20. package/dist/cli/commands/stage.js +53 -61
  21. package/dist/cli/commands/stage.js.map +1 -0
  22. package/dist/cli/commands/translate.js +75 -112
  23. package/dist/cli/commands/translate.js.map +1 -0
  24. package/dist/cli/commands/upload.js +185 -213
  25. package/dist/cli/commands/upload.js.map +1 -0
  26. package/dist/cli/commands/utils/validation.js +39 -34
  27. package/dist/cli/commands/utils/validation.js.map +1 -0
  28. package/dist/cli/flags.js +35 -62
  29. package/dist/cli/flags.js.map +1 -0
  30. package/dist/cli/inline.js +112 -137
  31. package/dist/cli/inline.js.map +1 -0
  32. package/dist/cli/next.js +17 -12
  33. package/dist/cli/next.js.map +1 -0
  34. package/dist/cli/node.js +19 -15
  35. package/dist/cli/node.js.map +1 -0
  36. package/dist/cli/python.js +13 -8
  37. package/dist/cli/python.js.map +1 -0
  38. package/dist/cli/react.js +61 -78
  39. package/dist/cli/react.js.map +1 -0
  40. package/dist/config/defaults.js +16 -11
  41. package/dist/config/defaults.js.map +1 -0
  42. package/dist/config/generateSettings.js +167 -269
  43. package/dist/config/generateSettings.js.map +1 -0
  44. package/dist/config/optionPresets.js +78 -96
  45. package/dist/config/optionPresets.js.map +1 -0
  46. package/dist/config/resolveConfig.js +27 -32
  47. package/dist/config/resolveConfig.js.map +1 -0
  48. package/dist/config/utils.js +7 -3
  49. package/dist/config/utils.js.map +1 -0
  50. package/dist/config/validateSettings.js +19 -30
  51. package/dist/config/validateSettings.js.map +1 -0
  52. package/dist/console/colors.js +18 -13
  53. package/dist/console/colors.js.map +1 -0
  54. package/dist/console/displayTranslateSummary.js +40 -37
  55. package/dist/console/displayTranslateSummary.js.map +1 -0
  56. package/dist/console/formatting.js +8 -5
  57. package/dist/console/formatting.js.map +1 -0
  58. package/dist/console/index.d.ts +11 -9
  59. package/dist/console/index.js +53 -50
  60. package/dist/console/index.js.map +1 -0
  61. package/dist/console/inkFields.d.ts +23 -0
  62. package/dist/console/inkFields.js +87 -0
  63. package/dist/console/inkFields.js.map +1 -0
  64. package/dist/console/inkLayout.d.ts +7 -0
  65. package/dist/console/inkLayout.js +139 -0
  66. package/dist/console/inkLayout.js.map +1 -0
  67. package/dist/console/inkLocaleData.d.ts +4 -0
  68. package/dist/console/inkLocaleData.js +32 -0
  69. package/dist/console/inkLocaleData.js.map +1 -0
  70. package/dist/console/inkPrompts.d.ts +8 -0
  71. package/dist/console/inkPrompts.js +496 -0
  72. package/dist/console/inkPrompts.js.map +1 -0
  73. package/dist/console/inkSession.d.ts +3 -0
  74. package/dist/console/inkSession.js +42 -0
  75. package/dist/console/inkSession.js.map +1 -0
  76. package/dist/console/inkTerminal.d.ts +4 -0
  77. package/dist/console/inkTerminal.js +15 -0
  78. package/dist/console/inkTerminal.js.map +1 -0
  79. package/dist/console/inkTypes.d.ts +66 -0
  80. package/dist/console/inkTypes.js +1 -0
  81. package/dist/console/inkUtils.d.ts +24 -0
  82. package/dist/console/inkUtils.js +87 -0
  83. package/dist/console/inkUtils.js.map +1 -0
  84. package/dist/console/logger.js +209 -249
  85. package/dist/console/logger.js.map +1 -0
  86. package/dist/console/logging.d.ts +14 -0
  87. package/dist/console/logging.js +203 -162
  88. package/dist/console/logging.js.map +1 -0
  89. package/dist/console/promptParsing.d.ts +5 -0
  90. package/dist/console/promptParsing.js +28 -0
  91. package/dist/console/promptParsing.js.map +1 -0
  92. package/dist/console/terminalSession.d.ts +5 -0
  93. package/dist/console/terminalSession.js +38 -0
  94. package/dist/console/terminalSession.js.map +1 -0
  95. package/dist/extraction/index.js +3 -2
  96. package/dist/extraction/mapToUpdates.js +19 -18
  97. package/dist/extraction/mapToUpdates.js.map +1 -0
  98. package/dist/extraction/postProcess.js +68 -86
  99. package/dist/extraction/postProcess.js.map +1 -0
  100. package/dist/formats/files/aggregateFiles.js +223 -304
  101. package/dist/formats/files/aggregateFiles.js.map +1 -0
  102. package/dist/formats/files/collectFiles.js +53 -54
  103. package/dist/formats/files/collectFiles.js.map +1 -0
  104. package/dist/formats/files/convertToFileTranslationData.js +21 -19
  105. package/dist/formats/files/convertToFileTranslationData.js.map +1 -0
  106. package/dist/formats/files/fileMapping.js +82 -119
  107. package/dist/formats/files/fileMapping.js.map +1 -0
  108. package/dist/formats/files/preprocess/mdx.js +15 -12
  109. package/dist/formats/files/preprocess/mdx.js.map +1 -0
  110. package/dist/formats/files/preprocess/mintlify.js +15 -13
  111. package/dist/formats/files/preprocess/mintlify.js.map +1 -0
  112. package/dist/formats/files/preprocessContent.js +20 -21
  113. package/dist/formats/files/preprocessContent.js.map +1 -0
  114. package/dist/formats/files/save.js +18 -15
  115. package/dist/formats/files/save.js.map +1 -0
  116. package/dist/formats/files/supportedFiles.js +27 -22
  117. package/dist/formats/files/supportedFiles.js.map +1 -0
  118. package/dist/formats/files/transformFormat.js +93 -100
  119. package/dist/formats/files/transformFormat.js.map +1 -0
  120. package/dist/formats/json/extractJson.js +83 -110
  121. package/dist/formats/json/extractJson.js.map +1 -0
  122. package/dist/formats/json/flattenJson.js +41 -48
  123. package/dist/formats/json/flattenJson.js.map +1 -0
  124. package/dist/formats/json/jsonPath.js +20 -15
  125. package/dist/formats/json/jsonPath.js.map +1 -0
  126. package/dist/formats/json/jsonPointer.js +17 -17
  127. package/dist/formats/json/jsonPointer.js.map +1 -0
  128. package/dist/formats/json/mergeJson.js +230 -371
  129. package/dist/formats/json/mergeJson.js.map +1 -0
  130. package/dist/formats/json/parseJson.js +74 -111
  131. package/dist/formats/json/parseJson.js.map +1 -0
  132. package/dist/formats/json/transformJson.js +53 -61
  133. package/dist/formats/json/transformJson.js.map +1 -0
  134. package/dist/formats/json/utils.js +158 -187
  135. package/dist/formats/json/utils.js.map +1 -0
  136. package/dist/formats/parseKeyedMetadata.js +85 -106
  137. package/dist/formats/parseKeyedMetadata.js.map +1 -0
  138. package/dist/formats/utils.js +13 -23
  139. package/dist/formats/utils.js.map +1 -0
  140. package/dist/formats/yaml/extractYaml.js +32 -31
  141. package/dist/formats/yaml/extractYaml.js.map +1 -0
  142. package/dist/formats/yaml/mergeYaml.js +43 -60
  143. package/dist/formats/yaml/mergeYaml.js.map +1 -0
  144. package/dist/formats/yaml/parseYaml.js +34 -23
  145. package/dist/formats/yaml/parseYaml.js.map +1 -0
  146. package/dist/formats/yaml/utils.js +19 -21
  147. package/dist/formats/yaml/utils.js.map +1 -0
  148. package/dist/fs/clearLocaleDirs.js +82 -114
  149. package/dist/fs/clearLocaleDirs.js.map +1 -0
  150. package/dist/fs/config/downloadedVersions.js +174 -188
  151. package/dist/fs/config/downloadedVersions.js.map +1 -0
  152. package/dist/fs/config/loadConfig.js +12 -8
  153. package/dist/fs/config/loadConfig.js.map +1 -0
  154. package/dist/fs/config/parseFilesConfig.js +166 -227
  155. package/dist/fs/config/parseFilesConfig.js.map +1 -0
  156. package/dist/fs/config/setupConfig.js +43 -52
  157. package/dist/fs/config/setupConfig.js.map +1 -0
  158. package/dist/fs/config/updateConfig.js +44 -56
  159. package/dist/fs/config/updateConfig.js.map +1 -0
  160. package/dist/fs/config/updateVersions.js +27 -28
  161. package/dist/fs/config/updateVersions.js.map +1 -0
  162. package/dist/fs/copyFile.js +33 -37
  163. package/dist/fs/copyFile.js.map +1 -0
  164. package/dist/fs/createLoadTranslationsFile.js +32 -48
  165. package/dist/fs/createLoadTranslationsFile.js.map +1 -0
  166. package/dist/fs/determineFramework/detectPythonLibrary.js +30 -34
  167. package/dist/fs/determineFramework/detectPythonLibrary.js.map +1 -0
  168. package/dist/fs/determineFramework/index.js +46 -64
  169. package/dist/fs/determineFramework/index.js.map +1 -0
  170. package/dist/fs/determineFramework/matchPyprojectDependency.js +65 -78
  171. package/dist/fs/determineFramework/matchPyprojectDependency.js.map +1 -0
  172. package/dist/fs/determineFramework/matchRequirementsTxtDependency.js +21 -19
  173. package/dist/fs/determineFramework/matchRequirementsTxtDependency.js.map +1 -0
  174. package/dist/fs/determineFramework/matchSetupPyDependency.js +60 -81
  175. package/dist/fs/determineFramework/matchSetupPyDependency.js.map +1 -0
  176. package/dist/fs/determineFramework/resolveGtDependency.js +15 -15
  177. package/dist/fs/determineFramework/resolveGtDependency.js.map +1 -0
  178. package/dist/fs/findFilepath.js +63 -78
  179. package/dist/fs/findFilepath.js.map +1 -0
  180. package/dist/fs/loadJSON.js +18 -15
  181. package/dist/fs/loadJSON.js.map +1 -0
  182. package/dist/fs/matchFiles.js +12 -7
  183. package/dist/fs/matchFiles.js.map +1 -0
  184. package/dist/fs/saveJSON.js +10 -6
  185. package/dist/fs/saveJSON.js.map +1 -0
  186. package/dist/fs/utils.js +19 -15
  187. package/dist/fs/utils.js.map +1 -0
  188. package/dist/functions.d.ts +2 -1
  189. package/dist/functions.js +3 -6
  190. package/dist/generated/version.d.ts +1 -1
  191. package/dist/generated/version.js +6 -2
  192. package/dist/generated/version.js.map +1 -0
  193. package/dist/git/branches.js +77 -83
  194. package/dist/git/branches.js.map +1 -0
  195. package/dist/hooks/postProcess.js +97 -114
  196. package/dist/hooks/postProcess.js.map +1 -0
  197. package/dist/index.js +23 -31
  198. package/dist/index.js.map +1 -0
  199. package/dist/locadex/setupFlow.js +11 -8
  200. package/dist/locadex/setupFlow.js.map +1 -0
  201. package/dist/main.js +17 -7
  202. package/dist/main.js.map +1 -0
  203. package/dist/next/config/parseNextConfig.js +32 -51
  204. package/dist/next/config/parseNextConfig.js.map +1 -0
  205. package/dist/next/jsx/utils.js +25 -37
  206. package/dist/next/jsx/utils.js.map +1 -0
  207. package/dist/next/parse/handleInitGT.js +87 -154
  208. package/dist/next/parse/handleInitGT.js.map +1 -0
  209. package/dist/next/parse/wrapContent.js +136 -158
  210. package/dist/next/parse/wrapContent.js.map +1 -0
  211. package/dist/python/parse/createPythonInlineUpdates.js +36 -33
  212. package/dist/python/parse/createPythonInlineUpdates.js.map +1 -0
  213. package/dist/react/config/createESBuildConfig.js +115 -115
  214. package/dist/react/config/createESBuildConfig.js.map +1 -0
  215. package/dist/react/jsx/evaluateJsx.js +90 -124
  216. package/dist/react/jsx/evaluateJsx.js.map +1 -0
  217. package/dist/react/jsx/utils/buildImportMap.js +24 -28
  218. package/dist/react/jsx/utils/buildImportMap.js.map +1 -0
  219. package/dist/react/jsx/utils/constants.js +79 -87
  220. package/dist/react/jsx/utils/constants.js.map +1 -0
  221. package/dist/react/jsx/utils/extractSourceCode.js +36 -37
  222. package/dist/react/jsx/utils/extractSourceCode.js.map +1 -0
  223. package/dist/react/jsx/utils/getCalleeNameFromExpression.js +30 -30
  224. package/dist/react/jsx/utils/getCalleeNameFromExpression.js.map +1 -0
  225. package/dist/react/jsx/utils/getPathsAndAliases.js +70 -105
  226. package/dist/react/jsx/utils/getPathsAndAliases.js.map +1 -0
  227. package/dist/react/jsx/utils/isNumberLiteral.js +13 -11
  228. package/dist/react/jsx/utils/isNumberLiteral.js.map +1 -0
  229. package/dist/react/jsx/utils/jsxParsing/addGTIdentifierToSyntaxTree.js +103 -148
  230. package/dist/react/jsx/utils/jsxParsing/addGTIdentifierToSyntaxTree.js.map +1 -0
  231. package/dist/react/jsx/utils/jsxParsing/autoInsertion.js +305 -389
  232. package/dist/react/jsx/utils/jsxParsing/autoInsertion.js.map +1 -0
  233. package/dist/react/jsx/utils/jsxParsing/handleChildrenWhitespace.js +122 -193
  234. package/dist/react/jsx/utils/jsxParsing/handleChildrenWhitespace.js.map +1 -0
  235. package/dist/react/jsx/utils/jsxParsing/multiplication/findMultiplicationNode.js +50 -64
  236. package/dist/react/jsx/utils/jsxParsing/multiplication/findMultiplicationNode.js.map +1 -0
  237. package/dist/react/jsx/utils/jsxParsing/multiplication/multiplyJsxTree.js +41 -68
  238. package/dist/react/jsx/utils/jsxParsing/multiplication/multiplyJsxTree.js.map +1 -0
  239. package/dist/react/jsx/utils/jsxParsing/parseJsx.js +760 -1107
  240. package/dist/react/jsx/utils/jsxParsing/parseJsx.js.map +1 -0
  241. package/dist/react/jsx/utils/jsxParsing/parseTProps.js +35 -71
  242. package/dist/react/jsx/utils/jsxParsing/parseTProps.js.map +1 -0
  243. package/dist/react/jsx/utils/jsxParsing/removeNullChildrenFields.js +39 -58
  244. package/dist/react/jsx/utils/jsxParsing/removeNullChildrenFields.js.map +1 -0
  245. package/dist/react/jsx/utils/jsxParsing/types.js +10 -24
  246. package/dist/react/jsx/utils/jsxParsing/types.js.map +1 -0
  247. package/dist/react/jsx/utils/mapAttributeName.js +13 -13
  248. package/dist/react/jsx/utils/mapAttributeName.js.map +1 -0
  249. package/dist/react/jsx/utils/parseAst.js +142 -272
  250. package/dist/react/jsx/utils/parseAst.js.map +1 -0
  251. package/dist/react/jsx/utils/parseString.js +726 -1090
  252. package/dist/react/jsx/utils/parseString.js.map +1 -0
  253. package/dist/react/jsx/utils/parseStringFunction.js +274 -401
  254. package/dist/react/jsx/utils/parseStringFunction.js.map +1 -0
  255. package/dist/react/jsx/utils/resolveImportPath.js +104 -108
  256. package/dist/react/jsx/utils/resolveImportPath.js.map +1 -0
  257. package/dist/react/jsx/utils/stringParsing/derivation/containsDeriveCall.js +18 -24
  258. package/dist/react/jsx/utils/stringParsing/derivation/containsDeriveCall.js.map +1 -0
  259. package/dist/react/jsx/utils/stringParsing/derivation/handleDerivation.js +412 -579
  260. package/dist/react/jsx/utils/stringParsing/derivation/handleDerivation.js.map +1 -0
  261. package/dist/react/jsx/utils/stringParsing/derivation/index.js +57 -67
  262. package/dist/react/jsx/utils/stringParsing/derivation/index.js.map +1 -0
  263. package/dist/react/jsx/utils/stringParsing/derivation/isDeriveCall.js +26 -36
  264. package/dist/react/jsx/utils/stringParsing/derivation/isDeriveCall.js.map +1 -0
  265. package/dist/react/jsx/utils/stringParsing/processTaggedTemplateCall/handleTaggedTemplateTranslationCall.js +29 -24
  266. package/dist/react/jsx/utils/stringParsing/processTaggedTemplateCall/handleTaggedTemplateTranslationCall.js.map +1 -0
  267. package/dist/react/jsx/utils/stringParsing/processTaggedTemplateCall/index.js +34 -32
  268. package/dist/react/jsx/utils/stringParsing/processTaggedTemplateCall/index.js.map +1 -0
  269. package/dist/react/jsx/utils/stringParsing/processTranslationCall/extractStringEntryMetadata.js +80 -117
  270. package/dist/react/jsx/utils/stringParsing/processTranslationCall/extractStringEntryMetadata.js.map +1 -0
  271. package/dist/react/jsx/utils/stringParsing/processTranslationCall/handleDeriveTranslationCall.js +24 -19
  272. package/dist/react/jsx/utils/stringParsing/processTranslationCall/handleDeriveTranslationCall.js.map +1 -0
  273. package/dist/react/jsx/utils/stringParsing/processTranslationCall/handleInvalidTranslationCall.js +18 -21
  274. package/dist/react/jsx/utils/stringParsing/processTranslationCall/handleInvalidTranslationCall.js.map +1 -0
  275. package/dist/react/jsx/utils/stringParsing/processTranslationCall/handleLiteralTranslationCall.js +45 -50
  276. package/dist/react/jsx/utils/stringParsing/processTranslationCall/handleLiteralTranslationCall.js.map +1 -0
  277. package/dist/react/jsx/utils/stringParsing/processTranslationCall/index.js +54 -59
  278. package/dist/react/jsx/utils/stringParsing/processTranslationCall/index.js.map +1 -0
  279. package/dist/react/jsx/utils/stringParsing/processTranslationCall/routeTranslationCall.js +56 -69
  280. package/dist/react/jsx/utils/stringParsing/processTranslationCall/routeTranslationCall.js.map +1 -0
  281. package/dist/react/jsx/utils/validateStringFunction.js +21 -29
  282. package/dist/react/jsx/utils/validateStringFunction.js.map +1 -0
  283. package/dist/react/jsx/wrapJsx.js +192 -375
  284. package/dist/react/jsx/wrapJsx.js.map +1 -0
  285. package/dist/react/parse/addVitePlugin/index.js +40 -34
  286. package/dist/react/parse/addVitePlugin/index.js.map +1 -0
  287. package/dist/react/parse/addVitePlugin/installCompiler.js +18 -20
  288. package/dist/react/parse/addVitePlugin/installCompiler.js.map +1 -0
  289. package/dist/react/parse/addVitePlugin/updateViteConfig.js +107 -111
  290. package/dist/react/parse/addVitePlugin/updateViteConfig.js.map +1 -0
  291. package/dist/react/parse/addVitePlugin/utils/addCompilerImport.js +23 -26
  292. package/dist/react/parse/addVitePlugin/utils/addCompilerImport.js.map +1 -0
  293. package/dist/react/parse/addVitePlugin/utils/addPluginInvocation.js +29 -43
  294. package/dist/react/parse/addVitePlugin/utils/addPluginInvocation.js.map +1 -0
  295. package/dist/react/parse/addVitePlugin/utils/checkCompilerImport.js +70 -104
  296. package/dist/react/parse/addVitePlugin/utils/checkCompilerImport.js.map +1 -0
  297. package/dist/react/parse/addVitePlugin/utils/checkPluginInvocation.js +23 -29
  298. package/dist/react/parse/addVitePlugin/utils/checkPluginInvocation.js.map +1 -0
  299. package/dist/react/parse/createDictionaryUpdates.js +121 -185
  300. package/dist/react/parse/createDictionaryUpdates.js.map +1 -0
  301. package/dist/react/parse/createInlineUpdates.js +123 -139
  302. package/dist/react/parse/createInlineUpdates.js.map +1 -0
  303. package/dist/react/parse/wrapContent.js +131 -156
  304. package/dist/react/parse/wrapContent.js.map +1 -0
  305. package/dist/react/utils/flattenDictionary.js +55 -70
  306. package/dist/react/utils/flattenDictionary.js.map +1 -0
  307. package/dist/react/utils/getEntryAndMetadata.js +14 -10
  308. package/dist/react/utils/getEntryAndMetadata.js.map +1 -0
  309. package/dist/react/utils/getVariableName.js +36 -33
  310. package/dist/react/utils/getVariableName.js.map +1 -0
  311. package/dist/setup/detectFramework.js +85 -102
  312. package/dist/setup/detectFramework.js.map +1 -0
  313. package/dist/setup/frameworkUtils.js +17 -28
  314. package/dist/setup/frameworkUtils.js.map +1 -0
  315. package/dist/setup/userInput.js +24 -31
  316. package/dist/setup/userInput.js.map +1 -0
  317. package/dist/setup/wizard.js +141 -143
  318. package/dist/setup/wizard.js.map +1 -0
  319. package/dist/state/mintlifyRefMap.js +12 -9
  320. package/dist/state/mintlifyRefMap.js.map +1 -0
  321. package/dist/state/recentDownloads.js +26 -23
  322. package/dist/state/recentDownloads.js.map +1 -0
  323. package/dist/state/translateWarnings.js +17 -8
  324. package/dist/state/translateWarnings.js.map +1 -0
  325. package/dist/translation/parse.js +77 -98
  326. package/dist/translation/parse.js.map +1 -0
  327. package/dist/translation/stage.js +28 -43
  328. package/dist/translation/stage.js.map +1 -0
  329. package/dist/translation/validate.js +68 -91
  330. package/dist/translation/validate.js.map +1 -0
  331. package/dist/types/libraries.js +93 -91
  332. package/dist/types/libraries.js.map +1 -0
  333. package/dist/types/parsing.js +19 -10
  334. package/dist/types/parsing.js.map +1 -0
  335. package/dist/utils/addExplicitAnchorIds.js +270 -389
  336. package/dist/utils/addExplicitAnchorIds.js.map +1 -0
  337. package/dist/utils/calculateTimeoutMs.js +11 -6
  338. package/dist/utils/calculateTimeoutMs.js.map +1 -0
  339. package/dist/utils/constants.js +15 -12
  340. package/dist/utils/constants.js.map +1 -0
  341. package/dist/utils/credentials.js +67 -114
  342. package/dist/utils/credentials.js.map +1 -0
  343. package/dist/utils/fetch.js +22 -20
  344. package/dist/utils/fetch.js.map +1 -0
  345. package/dist/utils/flattenJsonFiles.js +27 -34
  346. package/dist/utils/flattenJsonFiles.js.map +1 -0
  347. package/dist/utils/gitDiff.js +30 -32
  348. package/dist/utils/gitDiff.js.map +1 -0
  349. package/dist/utils/gt.js +7 -2
  350. package/dist/utils/gt.js.map +1 -0
  351. package/dist/utils/hash.js +14 -9
  352. package/dist/utils/hash.js.map +1 -0
  353. package/dist/utils/headers.js +10 -13
  354. package/dist/utils/headers.js.map +1 -0
  355. package/dist/utils/installPackage.js +70 -75
  356. package/dist/utils/installPackage.js.map +1 -0
  357. package/dist/utils/localizeRelativeAssets.js +114 -157
  358. package/dist/utils/localizeRelativeAssets.js.map +1 -0
  359. package/dist/utils/localizeStaticImports.js +229 -371
  360. package/dist/utils/localizeStaticImports.js.map +1 -0
  361. package/dist/utils/localizeStaticUrls.js +241 -424
  362. package/dist/utils/localizeStaticUrls.js.map +1 -0
  363. package/dist/utils/mintlifyTitleFallback.js +64 -72
  364. package/dist/utils/mintlifyTitleFallback.js.map +1 -0
  365. package/dist/utils/monorepoVersionCheck.js +177 -215
  366. package/dist/utils/monorepoVersionCheck.js.map +1 -0
  367. package/dist/utils/packageInfo.js +17 -16
  368. package/dist/utils/packageInfo.js.map +1 -0
  369. package/dist/utils/packageJson.js +51 -66
  370. package/dist/utils/packageJson.js.map +1 -0
  371. package/dist/utils/packageManager.js +237 -260
  372. package/dist/utils/packageManager.js.map +1 -0
  373. package/dist/utils/parse/needsCJS.js +36 -69
  374. package/dist/utils/parse/needsCJS.js.map +1 -0
  375. package/dist/utils/persistPostprocessHashes.js +30 -32
  376. package/dist/utils/persistPostprocessHashes.js.map +1 -0
  377. package/dist/utils/processAnchorIds.js +32 -54
  378. package/dist/utils/processAnchorIds.js.map +1 -0
  379. package/dist/utils/processOpenApi.js +469 -578
  380. package/dist/utils/processOpenApi.js.map +1 -0
  381. package/dist/utils/resolveMintlifyRefs.js +89 -105
  382. package/dist/utils/resolveMintlifyRefs.js.map +1 -0
  383. package/dist/utils/resolvePublish.js +46 -54
  384. package/dist/utils/resolvePublish.js.map +1 -0
  385. package/dist/utils/sanitizeFileContent.js +20 -27
  386. package/dist/utils/sanitizeFileContent.js.map +1 -0
  387. package/dist/utils/sharedStaticAssets.js +248 -366
  388. package/dist/utils/sharedStaticAssets.js.map +1 -0
  389. package/dist/utils/splitMintlifyLanguageRefs.js +208 -282
  390. package/dist/utils/splitMintlifyLanguageRefs.js.map +1 -0
  391. package/dist/utils/validateMdx.js +26 -23
  392. package/dist/utils/validateMdx.js.map +1 -0
  393. package/dist/utils/wrapPlainUrls.js +58 -70
  394. package/dist/utils/wrapPlainUrls.js.map +1 -0
  395. package/dist/workflows/download.js +92 -126
  396. package/dist/workflows/download.js.map +1 -0
  397. package/dist/workflows/enqueue.js +47 -54
  398. package/dist/workflows/enqueue.js.map +1 -0
  399. package/dist/workflows/publish.js +29 -29
  400. package/dist/workflows/publish.js.map +1 -0
  401. package/dist/workflows/setupProject.js +39 -40
  402. package/dist/workflows/setupProject.js.map +1 -0
  403. package/dist/workflows/stage.js +61 -65
  404. package/dist/workflows/stage.js.map +1 -0
  405. package/dist/workflows/steps/BranchStep.js +118 -163
  406. package/dist/workflows/steps/BranchStep.js.map +1 -0
  407. package/dist/workflows/steps/DownloadStep.js +107 -137
  408. package/dist/workflows/steps/DownloadStep.js.map +1 -0
  409. package/dist/workflows/steps/EnqueueStep.js +32 -32
  410. package/dist/workflows/steps/EnqueueStep.js.map +1 -0
  411. package/dist/workflows/steps/PollJobsStep.js +208 -292
  412. package/dist/workflows/steps/PollJobsStep.js.map +1 -0
  413. package/dist/workflows/steps/PublishStep.js +33 -38
  414. package/dist/workflows/steps/PublishStep.js.map +1 -0
  415. package/dist/workflows/steps/SetupStep.js +71 -72
  416. package/dist/workflows/steps/SetupStep.js.map +1 -0
  417. package/dist/workflows/steps/TagStep.js +39 -44
  418. package/dist/workflows/steps/TagStep.js.map +1 -0
  419. package/dist/workflows/steps/UploadSourcesStep.js +108 -140
  420. package/dist/workflows/steps/UploadSourcesStep.js.map +1 -0
  421. package/dist/workflows/steps/UploadTranslationsStep.js +61 -71
  422. package/dist/workflows/steps/UploadTranslationsStep.js.map +1 -0
  423. package/dist/workflows/steps/UserEditDiffsStep.js +32 -34
  424. package/dist/workflows/steps/UserEditDiffsStep.js.map +1 -0
  425. package/dist/workflows/steps/WorkflowStep.js +6 -2
  426. package/dist/workflows/steps/WorkflowStep.js.map +1 -0
  427. package/dist/workflows/upload.js +45 -46
  428. package/dist/workflows/upload.js.map +1 -0
  429. package/package.json +14 -7
@@ -1,153 +1,108 @@
1
- import { HTML_CONTENT_PROPS, } from '@generaltranslation/format/types';
2
- import { defaultVariableNames, getVariableName, minifyVariableType, } from '../../../utils/getVariableName.js';
3
- import { isAcceptedPluralForm } from 'generaltranslation/internal';
4
- import { DATA_ATTR_PREFIX, BRANCH_COMPONENT, PLURAL_COMPONENT, } from '../constants.js';
1
+ import { DATA_ATTR_PREFIX } from "../constants.js";
2
+ import { defaultVariableNames, getVariableName, minifyVariableType } from "../../../utils/getVariableName.js";
3
+ import { HTML_CONTENT_PROPS } from "@generaltranslation/format/types";
4
+ import { isAcceptedPluralForm } from "generaltranslation/internal";
5
+ //#region src/react/jsx/utils/jsxParsing/addGTIdentifierToSyntaxTree.ts
5
6
  /**
6
- * Construct the data-_gt prop
7
- * @param type - The type of the element
8
- * @param props - The props of the element
9
- * @param id - The id of the element
10
- * @returns The data-_gt prop
11
- */
7
+ * Construct the data-_gt prop
8
+ * @param type - The type of the element
9
+ * @param props - The props of the element
10
+ * @param id - The id of the element
11
+ * @returns The data-_gt prop
12
+ */
12
13
  function constructGTProp(type, props, id) {
13
- // Add translatable HTML content props
14
- const generaltranslation = Object.entries(HTML_CONTENT_PROPS).reduce((acc, [minifiedName, fullName]) => {
15
- const value = props[fullName];
16
- if (typeof value === 'string') {
17
- acc[minifiedName] = value;
18
- }
19
- return acc;
20
- }, {});
21
- // Plural
22
- if (type === PLURAL_COMPONENT) {
23
- const pluralBranches = Object.entries(props).reduce((acc, [branchName, branch]) => {
24
- if (isAcceptedPluralForm(branchName)) {
25
- acc[branchName] = addGTIdentifierToSyntaxTree(branch, id);
26
- }
27
- return acc;
28
- }, {});
29
- // Add plural branches to the generaltranslation
30
- if (Object.keys(pluralBranches).length) {
31
- generaltranslation.t = 'p';
32
- generaltranslation.b = pluralBranches;
33
- }
34
- // Branch
35
- }
36
- else if (type === BRANCH_COMPONENT) {
37
- const { children: _children, branch: _branch, ...allBranches } = props;
38
- // Filter out data-* attributes injected by build tools
39
- const branches = Object.fromEntries(Object.entries(allBranches).filter(([key]) => !key.startsWith(DATA_ATTR_PREFIX)));
40
- const resultBranches = Object.entries(branches).reduce((acc, [branchName, branch]) => {
41
- acc[branchName] = addGTIdentifierToSyntaxTree(branch, id);
42
- return acc;
43
- }, {});
44
- // Add branches to the generaltranslation
45
- if (Object.keys(resultBranches).length) {
46
- generaltranslation.t = 'b';
47
- generaltranslation.b = resultBranches;
48
- }
49
- }
50
- return Object.keys(generaltranslation).length
51
- ? generaltranslation
52
- : undefined;
14
+ const generaltranslation = Object.entries(HTML_CONTENT_PROPS).reduce((acc, [minifiedName, fullName]) => {
15
+ const value = props[fullName];
16
+ if (typeof value === "string") acc[minifiedName] = value;
17
+ return acc;
18
+ }, {});
19
+ if (type === "Plural") {
20
+ const pluralBranches = Object.entries(props).reduce((acc, [branchName, branch]) => {
21
+ if (isAcceptedPluralForm(branchName)) acc[branchName] = addGTIdentifierToSyntaxTree(branch, id);
22
+ return acc;
23
+ }, {});
24
+ if (Object.keys(pluralBranches).length) {
25
+ generaltranslation.t = "p";
26
+ generaltranslation.b = pluralBranches;
27
+ }
28
+ } else if (type === "Branch") {
29
+ const { children: _children, branch: _branch, ...allBranches } = props;
30
+ const branches = Object.fromEntries(Object.entries(allBranches).filter(([key]) => !key.startsWith(DATA_ATTR_PREFIX)));
31
+ const resultBranches = Object.entries(branches).reduce((acc, [branchName, branch]) => {
32
+ acc[branchName] = addGTIdentifierToSyntaxTree(branch, id);
33
+ return acc;
34
+ }, {});
35
+ if (Object.keys(resultBranches).length) {
36
+ generaltranslation.t = "b";
37
+ generaltranslation.b = resultBranches;
38
+ }
39
+ }
40
+ return Object.keys(generaltranslation).length ? generaltranslation : void 0;
53
41
  }
54
42
  /**
55
- * Add GT Identifier and minify the tree (recreates addGTIdentifier and writeChildrenAsObjects)
56
- * @param tree - The tree to add GT identifiers to
57
- * @param startingIndex - The starting index for GT IDs
58
- * @returns The tree with GT identifiers added
59
- */
60
- export default function addGTIdentifierToSyntaxTree(tree, startingIndex = 0, gtVariableNames) {
61
- // Edge case: boolean or null, just return the tree
62
- if (typeof tree === 'boolean' || tree === null) {
63
- return tree;
64
- }
65
- // Object to keep track of the current index for GT IDs
66
- const indexObject = { index: startingIndex };
67
- /**
68
- * Handle a single child
69
- * @param child - The child to handle
70
- * @returns The handled child
71
- */
72
- const handleSingleChild = (child) => {
73
- // Handle JSX elements
74
- if (child && typeof child === 'object') {
75
- let { type } = child;
76
- const { props } = child;
77
- indexObject.index += 1;
78
- // Handle fragments
79
- if (type === 'React.Fragment') {
80
- type = '';
81
- }
82
- // Variables — only treat as GT variable if confirmed as GT import
83
- const isGTVariable = gtVariableNames
84
- ? gtVariableNames.has(type)
85
- : Object.keys(defaultVariableNames).includes(type);
86
- if (isGTVariable) {
87
- const variableType = minifyVariableType(type);
88
- const variableName = getVariableName(props, type, indexObject.index);
89
- return {
90
- i: indexObject.index,
91
- k: variableName,
92
- v: variableType,
93
- };
94
- }
95
- // Construct the data-_gt prop
96
- const generaltranslation = constructGTProp(type, (props || {}), indexObject.index);
97
- // Save current index and recurse.
98
- // For Branch/Plural, children use an independent index counter
99
- // (same as branch props) so they don't inflate sibling indices.
100
- // This matches the compiler's id.copy() behavior.
101
- const currentIndex = indexObject.index;
102
- const isBranching = type === BRANCH_COMPONENT || type === PLURAL_COMPONENT;
103
- let children;
104
- if (isBranching) {
105
- const savedIndex = indexObject.index;
106
- children = handleChildren(props?.children === undefined ? null : props?.children);
107
- indexObject.index = savedIndex;
108
- }
109
- else {
110
- children = handleChildren(props?.children === undefined ? null : props?.children);
111
- }
112
- // Enforce boolean rendering behavior
113
- // <T>{true}</T> -> true <- this is a boolean value, not a string
114
- // <T>{false}</T> -> nothing
115
- let includeChildren = true;
116
- if (typeof children === 'boolean') {
117
- // So, technically JsxChildren do include boolean values, but the type is incorrect
118
- includeChildren = children !== false;
119
- }
120
- // Return the result
121
- return {
122
- t: type || `C${currentIndex}`,
123
- i: currentIndex,
124
- ...(includeChildren && { c: children }),
125
- ...(generaltranslation && { d: generaltranslation }),
126
- };
127
- }
128
- if (typeof child === 'number') {
129
- return child.toString();
130
- }
131
- return child;
132
- };
133
- /**
134
- * Handle children
135
- * @param children - The children to handle
136
- * @returns The handled children
137
- */
138
- const handleChildren = (children) => {
139
- return Array.isArray(children)
140
- ? children.map(handleSingleChild).filter((child) => {
141
- // Enforce boolean rendering behavior
142
- // <T>{true}{false}{null}</T> -> []
143
- if (typeof child === 'boolean' ||
144
- child === null ||
145
- child === undefined) {
146
- return false;
147
- }
148
- return true;
149
- })
150
- : handleSingleChild(children);
151
- };
152
- return handleChildren(tree);
43
+ * Add GT Identifier and minify the tree (recreates addGTIdentifier and writeChildrenAsObjects)
44
+ * @param tree - The tree to add GT identifiers to
45
+ * @param startingIndex - The starting index for GT IDs
46
+ * @returns The tree with GT identifiers added
47
+ */
48
+ function addGTIdentifierToSyntaxTree(tree, startingIndex = 0, gtVariableNames) {
49
+ if (typeof tree === "boolean" || tree === null) return tree;
50
+ const indexObject = { index: startingIndex };
51
+ /**
52
+ * Handle a single child
53
+ * @param child - The child to handle
54
+ * @returns The handled child
55
+ */
56
+ const handleSingleChild = (child) => {
57
+ if (child && typeof child === "object") {
58
+ let { type } = child;
59
+ const { props } = child;
60
+ indexObject.index += 1;
61
+ if (type === "React.Fragment") type = "";
62
+ if (gtVariableNames ? gtVariableNames.has(type) : Object.keys(defaultVariableNames).includes(type)) {
63
+ const variableType = minifyVariableType(type);
64
+ const variableName = getVariableName(props, type, indexObject.index);
65
+ return {
66
+ i: indexObject.index,
67
+ k: variableName,
68
+ v: variableType
69
+ };
70
+ }
71
+ const generaltranslation = constructGTProp(type, props || {}, indexObject.index);
72
+ const currentIndex = indexObject.index;
73
+ const isBranching = type === "Branch" || type === "Plural";
74
+ let children;
75
+ if (isBranching) {
76
+ const savedIndex = indexObject.index;
77
+ children = handleChildren(props?.children === void 0 ? null : props?.children);
78
+ indexObject.index = savedIndex;
79
+ } else children = handleChildren(props?.children === void 0 ? null : props?.children);
80
+ let includeChildren = true;
81
+ if (typeof children === "boolean") includeChildren = children !== false;
82
+ return {
83
+ t: type || `C${currentIndex}`,
84
+ i: currentIndex,
85
+ ...includeChildren && { c: children },
86
+ ...generaltranslation && { d: generaltranslation }
87
+ };
88
+ }
89
+ if (typeof child === "number") return child.toString();
90
+ return child;
91
+ };
92
+ /**
93
+ * Handle children
94
+ * @param children - The children to handle
95
+ * @returns The handled children
96
+ */
97
+ const handleChildren = (children) => {
98
+ return Array.isArray(children) ? children.map(handleSingleChild).filter((child) => {
99
+ if (typeof child === "boolean" || child === null || child === void 0) return false;
100
+ return true;
101
+ }) : handleSingleChild(children);
102
+ };
103
+ return handleChildren(tree);
153
104
  }
105
+ //#endregion
106
+ export { addGTIdentifierToSyntaxTree as default };
107
+
108
+ //# sourceMappingURL=addGTIdentifierToSyntaxTree.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"addGTIdentifierToSyntaxTree.js","names":[],"sources":["../../../../../src/react/jsx/utils/jsxParsing/addGTIdentifierToSyntaxTree.ts"],"sourcesContent":["import {\n GTProp,\n HtmlContentPropKeysRecord,\n HTML_CONTENT_PROPS,\n JsxChild,\n JsxChildren,\n} from '@generaltranslation/format/types';\nimport {\n defaultVariableNames,\n getVariableName,\n minifyVariableType,\n} from '../../../utils/getVariableName.js';\nimport { isAcceptedPluralForm } from 'generaltranslation/internal';\nimport { MultipliedTreeNode } from './types.js';\nimport {\n DATA_ATTR_PREFIX,\n BRANCH_COMPONENT,\n PLURAL_COMPONENT,\n} from '../constants.js';\n\n/**\n * Construct the data-_gt prop\n * @param type - The type of the element\n * @param props - The props of the element\n * @param id - The id of the element\n * @returns The data-_gt prop\n */\nfunction constructGTProp(\n type: string,\n props: Record<string, unknown>,\n id: number\n): GTProp | undefined {\n // Add translatable HTML content props\n const generaltranslation: GTProp = Object.entries(\n HTML_CONTENT_PROPS\n ).reduce<GTProp>((acc, [minifiedName, fullName]) => {\n const value = props[fullName];\n if (typeof value === 'string') {\n acc[minifiedName as keyof HtmlContentPropKeysRecord] = value;\n }\n return acc;\n }, {});\n\n // Plural\n if (type === PLURAL_COMPONENT) {\n const pluralBranches = Object.entries(props).reduce(\n (acc: Record<string, JsxChildren>, [branchName, branch]) => {\n if (isAcceptedPluralForm(branchName)) {\n acc[branchName] = addGTIdentifierToSyntaxTree(\n branch as MultipliedTreeNode,\n id\n );\n }\n return acc;\n },\n {}\n );\n // Add plural branches to the generaltranslation\n if (Object.keys(pluralBranches).length) {\n generaltranslation.t = 'p';\n generaltranslation.b = pluralBranches;\n }\n\n // Branch\n } else if (type === BRANCH_COMPONENT) {\n const { children: _children, branch: _branch, ...allBranches } = props;\n // Filter out data-* attributes injected by build tools\n const branches = Object.fromEntries(\n Object.entries(allBranches).filter(\n ([key]) => !key.startsWith(DATA_ATTR_PREFIX)\n )\n );\n const resultBranches = Object.entries(branches).reduce(\n (acc: Record<string, JsxChildren>, [branchName, branch]) => {\n acc[branchName] = addGTIdentifierToSyntaxTree(\n branch as MultipliedTreeNode,\n id\n );\n return acc;\n },\n {}\n );\n // Add branches to the generaltranslation\n if (Object.keys(resultBranches).length) {\n generaltranslation.t = 'b';\n generaltranslation.b = resultBranches;\n }\n }\n\n return Object.keys(generaltranslation).length\n ? generaltranslation\n : undefined;\n}\n\n/**\n * Add GT Identifier and minify the tree (recreates addGTIdentifier and writeChildrenAsObjects)\n * @param tree - The tree to add GT identifiers to\n * @param startingIndex - The starting index for GT IDs\n * @returns The tree with GT identifiers added\n */\nexport default function addGTIdentifierToSyntaxTree(\n tree: MultipliedTreeNode,\n startingIndex = 0,\n gtVariableNames?: Set<string>\n): JsxChildren {\n // Edge case: boolean or null, just return the tree\n if (typeof tree === 'boolean' || tree === null) {\n return tree as unknown as JsxChild;\n }\n\n // Object to keep track of the current index for GT IDs\n const indexObject: { index: number } = { index: startingIndex };\n\n /**\n * Handle a single child\n * @param child - The child to handle\n * @returns The handled child\n */\n const handleSingleChild = (child: MultipliedTreeNode): JsxChild => {\n // Handle JSX elements\n if (child && typeof child === 'object') {\n let { type } = child;\n const { props } = child;\n indexObject.index += 1;\n\n // Handle fragments\n if (type === 'React.Fragment') {\n type = '';\n }\n\n // Variables — only treat as GT variable if confirmed as GT import\n const isGTVariable = gtVariableNames\n ? gtVariableNames.has(type)\n : Object.keys(defaultVariableNames).includes(type);\n if (isGTVariable) {\n const variableType = minifyVariableType(\n type as keyof typeof defaultVariableNames\n );\n const variableName = getVariableName(\n props,\n type as keyof typeof defaultVariableNames,\n indexObject.index\n );\n return {\n i: indexObject.index,\n k: variableName,\n v: variableType,\n };\n }\n\n // Construct the data-_gt prop\n const generaltranslation = constructGTProp(\n type as string,\n (props || {}) as Record<string, unknown>,\n indexObject.index\n );\n\n // Save current index and recurse.\n // For Branch/Plural, children use an independent index counter\n // (same as branch props) so they don't inflate sibling indices.\n // This matches the compiler's id.copy() behavior.\n const currentIndex = indexObject.index;\n const isBranching =\n type === BRANCH_COMPONENT || type === PLURAL_COMPONENT;\n let children: JsxChildren;\n if (isBranching) {\n const savedIndex = indexObject.index;\n children = handleChildren(\n props?.children === undefined ? null : props?.children\n );\n indexObject.index = savedIndex;\n } else {\n children = handleChildren(\n props?.children === undefined ? null : props?.children\n );\n }\n\n // Enforce boolean rendering behavior\n // <T>{true}</T> -> true <- this is a boolean value, not a string\n // <T>{false}</T> -> nothing\n let includeChildren = true;\n if (typeof children === 'boolean') {\n // So, technically JsxChildren do include boolean values, but the type is incorrect\n includeChildren = children !== false;\n }\n\n // Return the result\n return {\n t: type || `C${currentIndex}`,\n i: currentIndex,\n ...(includeChildren && { c: children }),\n ...(generaltranslation && { d: generaltranslation }),\n };\n }\n if (typeof child === 'number') {\n return child.toString();\n }\n return child as JsxChild;\n };\n\n /**\n * Handle children\n * @param children - The children to handle\n * @returns The handled children\n */\n const handleChildren = (children: MultipliedTreeNode): JsxChildren => {\n return Array.isArray(children)\n ? children.map(handleSingleChild).filter((child) => {\n // Enforce boolean rendering behavior\n // <T>{true}{false}{null}</T> -> []\n if (\n typeof child === 'boolean' ||\n child === null ||\n child === undefined\n ) {\n return false;\n }\n return true;\n })\n : handleSingleChild(children);\n };\n\n return handleChildren(tree);\n}\n"],"mappings":";;;;;;;;;;;;AA2BA,SAAS,gBACP,MACA,OACA,IACoB;CAEpB,MAAM,qBAA6B,OAAO,QACxC,mBACD,CAAC,QAAgB,KAAK,CAAC,cAAc,cAAc;EAClD,MAAM,QAAQ,MAAM;AACpB,MAAI,OAAO,UAAU,SACnB,KAAI,gBAAmD;AAEzD,SAAO;IACN,EAAE,CAAC;AAGN,KAAI,SAAA,UAA2B;EAC7B,MAAM,iBAAiB,OAAO,QAAQ,MAAM,CAAC,QAC1C,KAAkC,CAAC,YAAY,YAAY;AAC1D,OAAI,qBAAqB,WAAW,CAClC,KAAI,cAAc,4BAChB,QACA,GACD;AAEH,UAAO;KAET,EAAE,CACH;AAED,MAAI,OAAO,KAAK,eAAe,CAAC,QAAQ;AACtC,sBAAmB,IAAI;AACvB,sBAAmB,IAAI;;YAIhB,SAAA,UAA2B;EACpC,MAAM,EAAE,UAAU,WAAW,QAAQ,SAAS,GAAG,gBAAgB;EAEjE,MAAM,WAAW,OAAO,YACtB,OAAO,QAAQ,YAAY,CAAC,QACzB,CAAC,SAAS,CAAC,IAAI,WAAW,iBAAiB,CAC7C,CACF;EACD,MAAM,iBAAiB,OAAO,QAAQ,SAAS,CAAC,QAC7C,KAAkC,CAAC,YAAY,YAAY;AAC1D,OAAI,cAAc,4BAChB,QACA,GACD;AACD,UAAO;KAET,EAAE,CACH;AAED,MAAI,OAAO,KAAK,eAAe,CAAC,QAAQ;AACtC,sBAAmB,IAAI;AACvB,sBAAmB,IAAI;;;AAI3B,QAAO,OAAO,KAAK,mBAAmB,CAAC,SACnC,qBACA,KAAA;;;;;;;;AASN,SAAwB,4BACtB,MACA,gBAAgB,GAChB,iBACa;AAEb,KAAI,OAAO,SAAS,aAAa,SAAS,KACxC,QAAO;CAIT,MAAM,cAAiC,EAAE,OAAO,eAAe;;;;;;CAO/D,MAAM,qBAAqB,UAAwC;AAEjE,MAAI,SAAS,OAAO,UAAU,UAAU;GACtC,IAAI,EAAE,SAAS;GACf,MAAM,EAAE,UAAU;AAClB,eAAY,SAAS;AAGrB,OAAI,SAAS,iBACX,QAAO;AAOT,OAHqB,kBACjB,gBAAgB,IAAI,KAAK,GACzB,OAAO,KAAK,qBAAqB,CAAC,SAAS,KAAK,EAClC;IAChB,MAAM,eAAe,mBACnB,KACD;IACD,MAAM,eAAe,gBACnB,OACA,MACA,YAAY,MACb;AACD,WAAO;KACL,GAAG,YAAY;KACf,GAAG;KACH,GAAG;KACJ;;GAIH,MAAM,qBAAqB,gBACzB,MACC,SAAS,EAAE,EACZ,YAAY,MACb;GAMD,MAAM,eAAe,YAAY;GACjC,MAAM,cACJ,SAAA,YAA6B,SAAA;GAC/B,IAAI;AACJ,OAAI,aAAa;IACf,MAAM,aAAa,YAAY;AAC/B,eAAW,eACT,OAAO,aAAa,KAAA,IAAY,OAAO,OAAO,SAC/C;AACD,gBAAY,QAAQ;SAEpB,YAAW,eACT,OAAO,aAAa,KAAA,IAAY,OAAO,OAAO,SAC/C;GAMH,IAAI,kBAAkB;AACtB,OAAI,OAAO,aAAa,UAEtB,mBAAkB,aAAa;AAIjC,UAAO;IACL,GAAG,QAAQ,IAAI;IACf,GAAG;IACH,GAAI,mBAAmB,EAAE,GAAG,UAAU;IACtC,GAAI,sBAAsB,EAAE,GAAG,oBAAoB;IACpD;;AAEH,MAAI,OAAO,UAAU,SACnB,QAAO,MAAM,UAAU;AAEzB,SAAO;;;;;;;CAQT,MAAM,kBAAkB,aAA8C;AACpE,SAAO,MAAM,QAAQ,SAAS,GAC1B,SAAS,IAAI,kBAAkB,CAAC,QAAQ,UAAU;AAGhD,OACE,OAAO,UAAU,aACjB,UAAU,QACV,UAAU,KAAA,EAEV,QAAO;AAET,UAAO;IACP,GACF,kBAAkB,SAAS;;AAGjC,QAAO,eAAe,KAAK"}