xmlui 0.4.0

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 (308) hide show
  1. package/dist/Pdf-DeGhSMXe.mjs +19537 -0
  2. package/dist/Pdf.css +1 -0
  3. package/dist/apiInterceptorWorker-CwuUhYyc.mjs +9229 -0
  4. package/dist/array-USo-Szhp.mjs +12 -0
  5. package/dist/index-C24dkfpd.mjs +1434 -0
  6. package/dist/index-ao27SnVp.mjs +145185 -0
  7. package/dist/index.css +1 -0
  8. package/dist/nivo-bar.es-CWh0ZlxB.mjs +1666 -0
  9. package/dist/nivo-geo.es-BTqNt5Db.mjs +1579 -0
  10. package/dist/nivo-legends.es-BuIxHGSU.mjs +6916 -0
  11. package/dist/nivo-pie.es-BvCBFA0L.mjs +700 -0
  12. package/dist/react-apexcharts.min-DqWuDOyO.mjs +8881 -0
  13. package/dist/scripts/bin/bootstrap.js +11 -0
  14. package/dist/scripts/bin/build.js +256 -0
  15. package/dist/scripts/bin/index.js +88 -0
  16. package/dist/scripts/bin/preview.js +27 -0
  17. package/dist/scripts/bin/start.js +41 -0
  18. package/dist/scripts/bin/vite-ueml-plugin.js +113 -0
  19. package/dist/scripts/bin/viteConfig.js +112 -0
  20. package/dist/scripts/src/abstractions/ActionDefs.js +2 -0
  21. package/dist/scripts/src/abstractions/AppContextDefs.js +2 -0
  22. package/dist/scripts/src/abstractions/BlockScope.js +4 -0
  23. package/dist/scripts/src/abstractions/ComponentDefs.js +2 -0
  24. package/dist/scripts/src/abstractions/ComponentDescriptorDefs.js +2 -0
  25. package/dist/scripts/src/abstractions/ContainerDefs.js +2 -0
  26. package/dist/scripts/src/abstractions/FunctionDefs.js +2 -0
  27. package/dist/scripts/src/abstractions/RendererDefs.js +2 -0
  28. package/dist/scripts/src/abstractions/scripting/ScriptParserError.js +2 -0
  29. package/dist/scripts/src/abstractions/scripting/ScriptingSourceTree.js +2 -0
  30. package/dist/scripts/src/abstractions/scripting/Token.js +110 -0
  31. package/dist/scripts/src/components/App/App.js +253 -0
  32. package/dist/scripts/src/components/App/AppLayoutContext.js +9 -0
  33. package/dist/scripts/src/components/App/AppStateContext.js +9 -0
  34. package/dist/scripts/src/components/App/Sheet.js +89 -0
  35. package/dist/scripts/src/components/AppHeader/AppHeader.js +121 -0
  36. package/dist/scripts/src/components/AppState/AppState.js +29 -0
  37. package/dist/scripts/src/components/Avatar/Avatar.js +81 -0
  38. package/dist/scripts/src/components/Badge/Badge.js +56 -0
  39. package/dist/scripts/src/components/BarChart/BarChart.js +199 -0
  40. package/dist/scripts/src/components/Bookmark/Bookmark.js +11 -0
  41. package/dist/scripts/src/components/Button/Button.js +196 -0
  42. package/dist/scripts/src/components/Card/Card.js +65 -0
  43. package/dist/scripts/src/components/ChangeListener/ChangeListener.js +43 -0
  44. package/dist/scripts/src/components/Chart/Chart.js +158 -0
  45. package/dist/scripts/src/components/Checkbox/Checkbox.js +43 -0
  46. package/dist/scripts/src/components/Combobox/Combobox.js +145 -0
  47. package/dist/scripts/src/components/ComponentProvider.js +357 -0
  48. package/dist/scripts/src/components/ContentSeparator/ContentSeparator.js +40 -0
  49. package/dist/scripts/src/components/DatePicker/DatePicker.js +196 -0
  50. package/dist/scripts/src/components/DropdownMenu/DropdownMenu.js +175 -0
  51. package/dist/scripts/src/components/EmojiSelector/EmojiSelector.js +56 -0
  52. package/dist/scripts/src/components/FileInput/FileInput.js +127 -0
  53. package/dist/scripts/src/components/FileUploadDropZone/FileUploadDropZone.js +106 -0
  54. package/dist/scripts/src/components/FlowLayout/FlowLayout.js +139 -0
  55. package/dist/scripts/src/components/Footer/Footer.js +42 -0
  56. package/dist/scripts/src/components/Form/Form.js +320 -0
  57. package/dist/scripts/src/components/Form/FormContext.js +9 -0
  58. package/dist/scripts/src/components/Form/formActions.js +86 -0
  59. package/dist/scripts/src/components/FormItem/FormItem.js +204 -0
  60. package/dist/scripts/src/components/FormItem/HelperText.js +27 -0
  61. package/dist/scripts/src/components/FormItem/ItemWithLabel.js +39 -0
  62. package/dist/scripts/src/components/FormItem/Validations.js +346 -0
  63. package/dist/scripts/src/components/FormSection/FormSection.js +45 -0
  64. package/dist/scripts/src/components/Heading/Heading.js +206 -0
  65. package/dist/scripts/src/components/HoverCard/HoverCard.js +45 -0
  66. package/dist/scripts/src/components/Icon/ApiIcon.js +10 -0
  67. package/dist/scripts/src/components/Icon/Attach.js +10 -0
  68. package/dist/scripts/src/components/Icon/Binding.js +11 -0
  69. package/dist/scripts/src/components/Icon/BoardIcon.js +7 -0
  70. package/dist/scripts/src/components/Icon/BoxIcon.js +10 -0
  71. package/dist/scripts/src/components/Icon/CheckIcon.js +7 -0
  72. package/dist/scripts/src/components/Icon/ChevronDownIcon.js +7 -0
  73. package/dist/scripts/src/components/Icon/ChevronLeft.js +7 -0
  74. package/dist/scripts/src/components/Icon/ChevronRight.js +7 -0
  75. package/dist/scripts/src/components/Icon/ChevronUpIcon.js +7 -0
  76. package/dist/scripts/src/components/Icon/CodeFileIcon.js +10 -0
  77. package/dist/scripts/src/components/Icon/CodeSandbox.js +10 -0
  78. package/dist/scripts/src/components/Icon/CompactListIcon.js +7 -0
  79. package/dist/scripts/src/components/Icon/ContentCopyIcon.js +7 -0
  80. package/dist/scripts/src/components/Icon/DatabaseIcon.js +11 -0
  81. package/dist/scripts/src/components/Icon/DocFileIcon.js +10 -0
  82. package/dist/scripts/src/components/Icon/DocIcon.js +10 -0
  83. package/dist/scripts/src/components/Icon/DotMenuHorizontalIcon.js +7 -0
  84. package/dist/scripts/src/components/Icon/DotMenuIcon.js +7 -0
  85. package/dist/scripts/src/components/Icon/EmailIcon.js +7 -0
  86. package/dist/scripts/src/components/Icon/EmptyFolderIcon.js +10 -0
  87. package/dist/scripts/src/components/Icon/ErrorIcon.js +7 -0
  88. package/dist/scripts/src/components/Icon/ExpressionIcon.js +10 -0
  89. package/dist/scripts/src/components/Icon/FillPlusCricleIcon.js +7 -0
  90. package/dist/scripts/src/components/Icon/FilterIcon.js +10 -0
  91. package/dist/scripts/src/components/Icon/FolderIcon.js +10 -0
  92. package/dist/scripts/src/components/Icon/GlobeIcon.js +7 -0
  93. package/dist/scripts/src/components/Icon/HomeIcon.js +7 -0
  94. package/dist/scripts/src/components/Icon/HyperLinkIcon.js +7 -0
  95. package/dist/scripts/src/components/Icon/Icon.js +101 -0
  96. package/dist/scripts/src/components/Icon/ImageFileIcon.js +10 -0
  97. package/dist/scripts/src/components/Icon/LinkIcon.js +7 -0
  98. package/dist/scripts/src/components/Icon/ListIcon.js +7 -0
  99. package/dist/scripts/src/components/Icon/LooseListIcon.js +7 -0
  100. package/dist/scripts/src/components/Icon/MoonIcon.js +10 -0
  101. package/dist/scripts/src/components/Icon/MoreOptionsIcon.js +7 -0
  102. package/dist/scripts/src/components/Icon/PDFIcon.js +10 -0
  103. package/dist/scripts/src/components/Icon/PenIcon.js +7 -0
  104. package/dist/scripts/src/components/Icon/PhoneIcon.js +7 -0
  105. package/dist/scripts/src/components/Icon/PhotoIcon.js +10 -0
  106. package/dist/scripts/src/components/Icon/PlusIcon.js +7 -0
  107. package/dist/scripts/src/components/Icon/SearchIcon.js +7 -0
  108. package/dist/scripts/src/components/Icon/ShareIcon.js +10 -0
  109. package/dist/scripts/src/components/Icon/SunIcon.js +10 -0
  110. package/dist/scripts/src/components/Icon/TrashIcon.js +7 -0
  111. package/dist/scripts/src/components/Icon/TxtIcon.js +10 -0
  112. package/dist/scripts/src/components/Icon/UnknownFileIcon.js +10 -0
  113. package/dist/scripts/src/components/Icon/UnlinkIcon.js +10 -0
  114. package/dist/scripts/src/components/Icon/UserIcon.js +7 -0
  115. package/dist/scripts/src/components/Icon/WarningIcon.js +7 -0
  116. package/dist/scripts/src/components/Icon/XlsIcon.js +10 -0
  117. package/dist/scripts/src/components/IconProvider.js +249 -0
  118. package/dist/scripts/src/components/IconRegistryContext.js +307 -0
  119. package/dist/scripts/src/components/Image/Image.js +34 -0
  120. package/dist/scripts/src/components/Input/InputAdornment.js +14 -0
  121. package/dist/scripts/src/components/Input/input-abstractions.js +44 -0
  122. package/dist/scripts/src/components/Items/Items.js +48 -0
  123. package/dist/scripts/src/components/Link/Link.js +72 -0
  124. package/dist/scripts/src/components/List/List.js +442 -0
  125. package/dist/scripts/src/components/Logo/Logo.js +25 -0
  126. package/dist/scripts/src/components/Map/Map.js +60 -0
  127. package/dist/scripts/src/components/Map/world_countries.json +45307 -0
  128. package/dist/scripts/src/components/Markdown/Markdown.js +120 -0
  129. package/dist/scripts/src/components/ModalDialog/ConfirmationModalContextProvider.js +106 -0
  130. package/dist/scripts/src/components/ModalDialog/Dialog.js +20 -0
  131. package/dist/scripts/src/components/ModalDialog/ModalDialog.js +145 -0
  132. package/dist/scripts/src/components/MultiCombobox/MultiCombobox.js +249 -0
  133. package/dist/scripts/src/components/MultiSelect/MultiSelect.js +192 -0
  134. package/dist/scripts/src/components/NavGroup/NavGroup.js +113 -0
  135. package/dist/scripts/src/components/NavLink/NavLink.js +115 -0
  136. package/dist/scripts/src/components/NavPanel/NavPanel.js +101 -0
  137. package/dist/scripts/src/components/NoResult/NoResult.js +39 -0
  138. package/dist/scripts/src/components/NumberBox/NumberBox.js +373 -0
  139. package/dist/scripts/src/components/Option/Option.js +41 -0
  140. package/dist/scripts/src/components/PageMetaTitle/PageMetaTitle.js +22 -0
  141. package/dist/scripts/src/components/Pages/Pages.js +74 -0
  142. package/dist/scripts/src/components/Pdf/LazyPdf.js +44 -0
  143. package/dist/scripts/src/components/Pdf/Pdf.js +19 -0
  144. package/dist/scripts/src/components/PieChart/PieChart.js +184 -0
  145. package/dist/scripts/src/components/PositionedContainer/PositionedContainer.js +29 -0
  146. package/dist/scripts/src/components/ProgressBar/ProgressBar.js +38 -0
  147. package/dist/scripts/src/components/Queue/Queue.js +286 -0
  148. package/dist/scripts/src/components/Queue/queueActions.js +87 -0
  149. package/dist/scripts/src/components/RadioGroup/RadioGroup.js +144 -0
  150. package/dist/scripts/src/components/RealTimeAdapter/RealTimeAdapter.js +147 -0
  151. package/dist/scripts/src/components/Redirect/Redirect.js +10 -0
  152. package/dist/scripts/src/components/Select/Select.js +139 -0
  153. package/dist/scripts/src/components/Select/SelectContext.js +45 -0
  154. package/dist/scripts/src/components/SelectionStore/SelectionStore.js +88 -0
  155. package/dist/scripts/src/components/SpaceFiller/SpaceFiller.js +22 -0
  156. package/dist/scripts/src/components/Spinner/Spinner.js +59 -0
  157. package/dist/scripts/src/components/Splitter/Splitter.js +205 -0
  158. package/dist/scripts/src/components/Splitter/utils.js +17 -0
  159. package/dist/scripts/src/components/Stack/Stack.js +117 -0
  160. package/dist/scripts/src/components/StickyBox/StickyBox.js +33 -0
  161. package/dist/scripts/src/components/Switch/Switch.js +50 -0
  162. package/dist/scripts/src/components/Table/Table.js +499 -0
  163. package/dist/scripts/src/components/Table/useRowSelection.js +169 -0
  164. package/dist/scripts/src/components/TableColumnDef/TableColumnDef.js +44 -0
  165. package/dist/scripts/src/components/TableColumnDef/TableContext.js +12 -0
  166. package/dist/scripts/src/components/Tabs/Tabs.js +85 -0
  167. package/dist/scripts/src/components/Text/Text.js +175 -0
  168. package/dist/scripts/src/components/TextArea/TextArea.js +194 -0
  169. package/dist/scripts/src/components/TextArea/TextAreaResizable.js +63 -0
  170. package/dist/scripts/src/components/TextArea/useComposedRef.js +50 -0
  171. package/dist/scripts/src/components/TextBox/TextBox.js +145 -0
  172. package/dist/scripts/src/components/Theme/NotificationToast.js +39 -0
  173. package/dist/scripts/src/components/Theme/Theme.js +153 -0
  174. package/dist/scripts/src/components/ThemeChanger/ThemeChanger.js +125 -0
  175. package/dist/scripts/src/components/Toggle/Toggle.js +88 -0
  176. package/dist/scripts/src/components/Tree/TreeComponent.js +79 -0
  177. package/dist/scripts/src/components/ValidationSummary/ValidationSummary.js +59 -0
  178. package/dist/scripts/src/components/ViewComponentRegistryContext.js +34 -0
  179. package/dist/scripts/src/components/abstractions.js +2 -0
  180. package/dist/scripts/src/components/chart-color-schemes.js +43 -0
  181. package/dist/scripts/src/components/component-utils.js +32 -0
  182. package/dist/scripts/src/components/container-helpers.js +18 -0
  183. package/dist/scripts/src/components-core/ApiBoundComponent.js +189 -0
  184. package/dist/scripts/src/components-core/AppContext.js +17 -0
  185. package/dist/scripts/src/components-core/ChildrenSlot.js +10 -0
  186. package/dist/scripts/src/components-core/Component.js +280 -0
  187. package/dist/scripts/src/components-core/ComponentDecorator.js +63 -0
  188. package/dist/scripts/src/components-core/CompoundComponent.js +132 -0
  189. package/dist/scripts/src/components-core/EngineError.js +91 -0
  190. package/dist/scripts/src/components-core/ErrorBoundary.js +58 -0
  191. package/dist/scripts/src/components-core/Fragment.js +14 -0
  192. package/dist/scripts/src/components-core/InvalidComponent.js +15 -0
  193. package/dist/scripts/src/components-core/LoaderComponent.js +78 -0
  194. package/dist/scripts/src/components-core/RestApiProxy.js +341 -0
  195. package/dist/scripts/src/components-core/RootComponent.js +272 -0
  196. package/dist/scripts/src/components-core/RouteContext.js +45 -0
  197. package/dist/scripts/src/components-core/ScrollContext.js +9 -0
  198. package/dist/scripts/src/components-core/UnknownComponent.js +15 -0
  199. package/dist/scripts/src/components-core/abstractions/ComponentRenderer.js +2 -0
  200. package/dist/scripts/src/components-core/abstractions/LoaderRenderer.js +2 -0
  201. package/dist/scripts/src/components-core/abstractions/containers.js +18 -0
  202. package/dist/scripts/src/components-core/abstractions/treeAbstractions.js +2 -0
  203. package/dist/scripts/src/components-core/action/ApiAction.js +276 -0
  204. package/dist/scripts/src/components-core/action/DownloadFileAction.js +80 -0
  205. package/dist/scripts/src/components-core/action/NavigateAction.js +20 -0
  206. package/dist/scripts/src/components-core/action/TimedAction.js +21 -0
  207. package/dist/scripts/src/components-core/action/UploadAction.js +88 -0
  208. package/dist/scripts/src/components-core/action/actions.js +15 -0
  209. package/dist/scripts/src/components-core/appContext/date-functions.js +19 -0
  210. package/dist/scripts/src/components-core/appContext/misc-utils.js +12 -0
  211. package/dist/scripts/src/components-core/component-hooks.js +25 -0
  212. package/dist/scripts/src/components-core/constants.js +18 -0
  213. package/dist/scripts/src/components-core/container/Container.js +1110 -0
  214. package/dist/scripts/src/components-core/container/ContainerComponentDef.js +16 -0
  215. package/dist/scripts/src/components-core/container/buildProxy.js +54 -0
  216. package/dist/scripts/src/components-core/container/collectFnVarDeps.js +26 -0
  217. package/dist/scripts/src/components-core/container/valueExtractor.js +195 -0
  218. package/dist/scripts/src/components-core/descriptorHelper.js +75 -0
  219. package/dist/scripts/src/components-core/interception/abstractions.js +2 -0
  220. package/dist/scripts/src/components-core/interception/useApiInterceptorContext.js +9 -0
  221. package/dist/scripts/src/components-core/loader/ApiLoader.js +46 -0
  222. package/dist/scripts/src/components-core/loader/DataLoader.js +160 -0
  223. package/dist/scripts/src/components-core/loader/ExternalDataLoader.js +52 -0
  224. package/dist/scripts/src/components-core/loader/Loader.js +115 -0
  225. package/dist/scripts/src/components-core/loader/MockLoaderRenderer.js +32 -0
  226. package/dist/scripts/src/components-core/loader/PageableLoader.js +240 -0
  227. package/dist/scripts/src/components-core/renderers.js +45 -0
  228. package/dist/scripts/src/components-core/reportEngineError.js +59 -0
  229. package/dist/scripts/src/components-core/script-runner/BindingTreeEvaluationContext.js +35 -0
  230. package/dist/scripts/src/components-core/script-runner/ICustomOperations.js +34 -0
  231. package/dist/scripts/src/components-core/script-runner/LogicalThread.js +2 -0
  232. package/dist/scripts/src/components-core/script-runner/LoopScope.js +2 -0
  233. package/dist/scripts/src/components-core/script-runner/ParameterParser.js +117 -0
  234. package/dist/scripts/src/components-core/script-runner/TryScope.js +2 -0
  235. package/dist/scripts/src/components-core/script-runner/asyncProxy.js +96 -0
  236. package/dist/scripts/src/components-core/script-runner/bannedFunctions.js +34 -0
  237. package/dist/scripts/src/components-core/script-runner/custom-operations-registry.js +40 -0
  238. package/dist/scripts/src/components-core/script-runner/custom-ui-data.js +40 -0
  239. package/dist/scripts/src/components-core/script-runner/eval-tree-async.js +551 -0
  240. package/dist/scripts/src/components-core/script-runner/eval-tree-common.js +498 -0
  241. package/dist/scripts/src/components-core/script-runner/eval-tree-sync.js +434 -0
  242. package/dist/scripts/src/components-core/script-runner/modules.js +250 -0
  243. package/dist/scripts/src/components-core/script-runner/process-statement-async.js +818 -0
  244. package/dist/scripts/src/components-core/script-runner/process-statement-common.js +193 -0
  245. package/dist/scripts/src/components-core/script-runner/process-statement-sync.js +740 -0
  246. package/dist/scripts/src/components-core/script-runner/statement-queue.js +62 -0
  247. package/dist/scripts/src/components-core/script-runner/visitors.js +352 -0
  248. package/dist/scripts/src/components-core/theming/ThemeContext.js +43 -0
  249. package/dist/scripts/src/components-core/theming/ThemeProvider.js +334 -0
  250. package/dist/scripts/src/components-core/theming/abstractions.js +11 -0
  251. package/dist/scripts/src/components-core/theming/extendThemeUtils.js +114 -0
  252. package/dist/scripts/src/components-core/theming/hvar.js +105 -0
  253. package/dist/scripts/src/components-core/theming/themeVars.js +62 -0
  254. package/dist/scripts/src/components-core/theming/themes/base-utils.js +31 -0
  255. package/dist/scripts/src/components-core/theming/themes/palette.js +53 -0
  256. package/dist/scripts/src/components-core/theming/themes/root.js +257 -0
  257. package/dist/scripts/src/components-core/theming/themes/solid.js +16 -0
  258. package/dist/scripts/src/components-core/theming/themes/theme-colors.js +407 -0
  259. package/dist/scripts/src/components-core/theming/themes/xmlui.js +32 -0
  260. package/dist/scripts/src/components-core/theming/transformThemeVars.js +286 -0
  261. package/dist/scripts/src/components-core/utils/DataLoaderQueryKeyGenerator.js +34 -0
  262. package/dist/scripts/src/components-core/utils/LruCache.js +184 -0
  263. package/dist/scripts/src/components-core/utils/actionUtils.js +32 -0
  264. package/dist/scripts/src/components-core/utils/classnames.js +58 -0
  265. package/dist/scripts/src/components-core/utils/css-utils.js +127 -0
  266. package/dist/scripts/src/components-core/utils/date-utils.js +78 -0
  267. package/dist/scripts/src/components-core/utils/extractParam.js +148 -0
  268. package/dist/scripts/src/components-core/utils/hooks.js +221 -0
  269. package/dist/scripts/src/components-core/utils/mergeProps.js +45 -0
  270. package/dist/scripts/src/components-core/utils/misc.js +460 -0
  271. package/dist/scripts/src/components-core/utils/statementUtils.js +205 -0
  272. package/dist/scripts/src/components-core/utils/treeUtils.js +48 -0
  273. package/dist/scripts/src/components-core/xmlui-parser.js +52 -0
  274. package/dist/scripts/src/parsers/scripting/InputStream.js +59 -0
  275. package/dist/scripts/src/parsers/scripting/Lexer.js +1028 -0
  276. package/dist/scripts/src/parsers/scripting/Parser.js +2647 -0
  277. package/dist/scripts/src/parsers/scripting/ParserError.js +46 -0
  278. package/dist/scripts/src/parsers/scripting/TokenTrait.js +109 -0
  279. package/dist/scripts/src/parsers/scripting/code-behind-collect.js +118 -0
  280. package/dist/scripts/src/parsers/scripting/tree-visitor.js +602 -0
  281. package/dist/scripts/src/parsers/style-parser/StyleInputStream.js +39 -0
  282. package/dist/scripts/src/parsers/style-parser/StyleLexer.js +621 -0
  283. package/dist/scripts/src/parsers/style-parser/StyleParser.js +1000 -0
  284. package/dist/scripts/src/parsers/style-parser/errors.js +37 -0
  285. package/dist/scripts/src/parsers/style-parser/source-tree.js +2 -0
  286. package/dist/scripts/src/parsers/style-parser/style-compiler.js +513 -0
  287. package/dist/scripts/src/parsers/style-parser/tokens.js +42 -0
  288. package/dist/scripts/src/parsers/ueml/ParserError.js +54 -0
  289. package/dist/scripts/src/parsers/ueml/UemlHelper.js +579 -0
  290. package/dist/scripts/src/parsers/ueml/UemlInputStream.js +59 -0
  291. package/dist/scripts/src/parsers/ueml/UemlLexer.js +868 -0
  292. package/dist/scripts/src/parsers/ueml/UemlParser.js +1439 -0
  293. package/dist/scripts/src/parsers/ueml/UemlToken.js +24 -0
  294. package/dist/scripts/src/parsers/ueml/fileExtensions.js +6 -0
  295. package/dist/scripts/src/parsers/ueml/source-tree.js +2 -0
  296. package/dist/scripts/src/parsers/ueml/ueml-tree.js +2 -0
  297. package/dist/scripts/src/parsers/xmlui-parser/CharacterCodes.js +136 -0
  298. package/dist/scripts/src/parsers/xmlui-parser/diagnostics.js +100 -0
  299. package/dist/scripts/src/parsers/xmlui-parser/parser.js +476 -0
  300. package/dist/scripts/src/parsers/xmlui-parser/scanner.js +415 -0
  301. package/dist/scripts/src/parsers/xmlui-parser/syntax-kind.js +106 -0
  302. package/dist/scripts/src/parsers/xmlui-parser/syntax-node.js +2 -0
  303. package/dist/scripts/src/parsers/xmlui-parser/transform.js +922 -0
  304. package/dist/scripts/src/parsers/xmlui-parser/utils.js +83 -0
  305. package/dist/xmlui.es.d.ts +1667 -0
  306. package/dist/xmlui.es.js +17 -0
  307. package/dist/xmlui.umd.js +1589 -0
  308. package/package.json +175 -0
@@ -0,0 +1,1579 @@
1
+ import { k as q, A as $, l as S } from "./index-ao27SnVp.mjs";
2
+ import { z as ot, X as $i, ba as pt, bb as ht, L as zi, bc as Bi, bd as Di, w as Xi, be as Yi, bf as Hi, o as Nt, x as Gt, v as Ze, bg as bt, I as At, q as Zi, y as Ki, H as Ji, A as Ke } from "./nivo-legends.es-BuIxHGSU.mjs";
3
+ function ut() {
4
+ return new wt();
5
+ }
6
+ function wt() {
7
+ this.reset();
8
+ }
9
+ wt.prototype = {
10
+ constructor: wt,
11
+ reset: function() {
12
+ this.s = // rounded value
13
+ this.t = 0;
14
+ },
15
+ add: function(n) {
16
+ Ce(dt, n, this.t), Ce(this, dt.s, this.s), this.s ? this.t += dt.t : this.s = dt.t;
17
+ },
18
+ valueOf: function() {
19
+ return this.s;
20
+ }
21
+ };
22
+ var dt = new wt();
23
+ function Ce(n, t, i) {
24
+ var e = n.s = t + i, r = e - t, o = e - r;
25
+ n.t = t - o + (i - r);
26
+ }
27
+ var F = 1e-6, Je = 1e-12, G = Math.PI, ln = G / 2, Re = G / 4, hn = G * 2, pn = 180 / G, H = G / 180, Y = Math.abs, at = Math.atan, On = Math.atan2, I = Math.cos, vt = Math.ceil, Qe = Math.exp, Ue = Math.log, N = Math.sin, Qi = Math.sign || function(n) {
28
+ return n > 0 ? 1 : n < 0 ? -1 : 0;
29
+ }, yn = Math.sqrt, Ve = Math.tan;
30
+ function _e(n) {
31
+ return n > 1 ? 0 : n < -1 ? G : Math.acos(n);
32
+ }
33
+ function jn(n) {
34
+ return n > 1 ? ln : n < -1 ? -ln : Math.asin(n);
35
+ }
36
+ function tn() {
37
+ }
38
+ function Et(n, t) {
39
+ n && Ee.hasOwnProperty(n.type) && Ee[n.type](n, t);
40
+ }
41
+ var we = {
42
+ Feature: function(n, t) {
43
+ Et(n.geometry, t);
44
+ },
45
+ FeatureCollection: function(n, t) {
46
+ for (var i = n.features, e = -1, r = i.length; ++e < r; )
47
+ Et(i[e].geometry, t);
48
+ }
49
+ }, Ee = {
50
+ Sphere: function(n, t) {
51
+ t.sphere();
52
+ },
53
+ Point: function(n, t) {
54
+ n = n.coordinates, t.point(n[0], n[1], n[2]);
55
+ },
56
+ MultiPoint: function(n, t) {
57
+ for (var i = n.coordinates, e = -1, r = i.length; ++e < r; )
58
+ n = i[e], t.point(n[0], n[1], n[2]);
59
+ },
60
+ LineString: function(n, t) {
61
+ Kt(n.coordinates, t, 0);
62
+ },
63
+ MultiLineString: function(n, t) {
64
+ for (var i = n.coordinates, e = -1, r = i.length; ++e < r; )
65
+ Kt(i[e], t, 0);
66
+ },
67
+ Polygon: function(n, t) {
68
+ je(n.coordinates, t);
69
+ },
70
+ MultiPolygon: function(n, t) {
71
+ for (var i = n.coordinates, e = -1, r = i.length; ++e < r; )
72
+ je(i[e], t);
73
+ },
74
+ GeometryCollection: function(n, t) {
75
+ for (var i = n.geometries, e = -1, r = i.length; ++e < r; )
76
+ Et(i[e], t);
77
+ }
78
+ };
79
+ function Kt(n, t, i) {
80
+ var e = -1, r = n.length - i, o;
81
+ for (t.lineStart(); ++e < r; )
82
+ o = n[e], t.point(o[0], o[1], o[2]);
83
+ t.lineEnd();
84
+ }
85
+ function je(n, t) {
86
+ var i = -1, e = n.length;
87
+ for (t.polygonStart(); ++i < e; )
88
+ Kt(n[i], t, 1);
89
+ t.polygonEnd();
90
+ }
91
+ function Fn(n, t) {
92
+ n && we.hasOwnProperty(n.type) ? we[n.type](n, t) : Et(n, t);
93
+ }
94
+ function Jt(n) {
95
+ return [On(n[1], n[0]), jn(n[2])];
96
+ }
97
+ function $n(n) {
98
+ var t = n[0], i = n[1], e = I(i);
99
+ return [e * I(t), e * N(t), N(i)];
100
+ }
101
+ function gt(n, t) {
102
+ return n[0] * t[0] + n[1] * t[1] + n[2] * t[2];
103
+ }
104
+ function jt(n, t) {
105
+ return [n[1] * t[2] - n[2] * t[1], n[2] * t[0] - n[0] * t[2], n[0] * t[1] - n[1] * t[0]];
106
+ }
107
+ function Dt(n, t) {
108
+ n[0] += t[0], n[1] += t[1], n[2] += t[2];
109
+ }
110
+ function mt(n, t) {
111
+ return [n[0] * t, n[1] * t, n[2] * t];
112
+ }
113
+ function Qt(n) {
114
+ var t = yn(n[0] * n[0] + n[1] * n[1] + n[2] * n[2]);
115
+ n[0] /= t, n[1] /= t, n[2] /= t;
116
+ }
117
+ function Ut(n, t) {
118
+ function i(e, r) {
119
+ return e = n(e, r), t(e[0], e[1]);
120
+ }
121
+ return n.invert && t.invert && (i.invert = function(e, r) {
122
+ return e = t.invert(e, r), e && n.invert(e[0], e[1]);
123
+ }), i;
124
+ }
125
+ function Vt(n, t) {
126
+ return [Y(n) > G ? n + Math.round(-n / hn) * hn : n, t];
127
+ }
128
+ Vt.invert = Vt;
129
+ function ni(n, t, i) {
130
+ return (n %= hn) ? t || i ? Ut(Pe(n), qe(t, i)) : Pe(n) : t || i ? qe(t, i) : Vt;
131
+ }
132
+ function Te(n) {
133
+ return function(t, i) {
134
+ return t += n, [t > G ? t - hn : t < -G ? t + hn : t, i];
135
+ };
136
+ }
137
+ function Pe(n) {
138
+ var t = Te(n);
139
+ return t.invert = Te(-n), t;
140
+ }
141
+ function qe(n, t) {
142
+ var i = I(n), e = N(n), r = I(t), o = N(t);
143
+ function u(f, d) {
144
+ var v = I(d), a = I(f) * v, l = N(f) * v, c = N(d), h = c * i + a * e;
145
+ return [
146
+ On(l * r - h * o, a * i - c * e),
147
+ jn(h * r + l * o)
148
+ ];
149
+ }
150
+ return u.invert = function(f, d) {
151
+ var v = I(d), a = I(f) * v, l = N(f) * v, c = N(d), h = c * r - l * o;
152
+ return [
153
+ On(l * r + c * o, a * i + h * e),
154
+ jn(h * i - a * e)
155
+ ];
156
+ }, u;
157
+ }
158
+ function Ui(n) {
159
+ n = ni(n[0] * H, n[1] * H, n.length > 2 ? n[2] * H : 0);
160
+ function t(i) {
161
+ return i = n(i[0] * H, i[1] * H), i[0] *= pn, i[1] *= pn, i;
162
+ }
163
+ return t.invert = function(i) {
164
+ return i = n.invert(i[0] * H, i[1] * H), i[0] *= pn, i[1] *= pn, i;
165
+ }, t;
166
+ }
167
+ function Vi(n, t, i, e, r, o) {
168
+ if (i) {
169
+ var u = I(t), f = N(t), d = e * i;
170
+ r == null ? (r = t + e * hn, o = t - d / 2) : (r = xe(u, r), o = xe(u, o), (e > 0 ? r < o : r > o) && (r += e * hn));
171
+ for (var v, a = r; e > 0 ? a > o : a < o; a -= d)
172
+ v = Jt([u, -f * I(a), -f * N(a)]), n.point(v[0], v[1]);
173
+ }
174
+ }
175
+ function xe(n, t) {
176
+ t = $n(t), t[0] -= n, Qt(t);
177
+ var i = _e(-t[1]);
178
+ return ((-t[2] < 0 ? -i : i) + hn - F) % hn;
179
+ }
180
+ function ti() {
181
+ var n = [], t;
182
+ return {
183
+ point: function(i, e, r) {
184
+ t.push([i, e, r]);
185
+ },
186
+ lineStart: function() {
187
+ n.push(t = []);
188
+ },
189
+ lineEnd: tn,
190
+ rejoin: function() {
191
+ n.length > 1 && n.push(n.pop().concat(n.shift()));
192
+ },
193
+ result: function() {
194
+ var i = n;
195
+ return n = [], t = null, i;
196
+ }
197
+ };
198
+ }
199
+ function Mt(n, t) {
200
+ return Y(n[0] - t[0]) < F && Y(n[1] - t[1]) < F;
201
+ }
202
+ function yt(n, t, i, e) {
203
+ this.x = n, this.z = t, this.o = i, this.e = e, this.v = !1, this.n = this.p = null;
204
+ }
205
+ function ei(n, t, i, e, r) {
206
+ var o = [], u = [], f, d;
207
+ if (n.forEach(function(p) {
208
+ if (!((R = p.length - 1) <= 0)) {
209
+ var R, m = p[0], M = p[R], y;
210
+ if (Mt(m, M)) {
211
+ if (!m[2] && !M[2]) {
212
+ for (r.lineStart(), f = 0; f < R; ++f)
213
+ r.point((m = p[f])[0], m[1]);
214
+ r.lineEnd();
215
+ return;
216
+ }
217
+ M[0] += 2 * F;
218
+ }
219
+ o.push(y = new yt(m, p, null, !0)), u.push(y.o = new yt(m, null, y, !1)), o.push(y = new yt(M, p, null, !1)), u.push(y.o = new yt(M, null, y, !0));
220
+ }
221
+ }), !!o.length) {
222
+ for (u.sort(t), Le(o), Le(u), f = 0, d = u.length; f < d; ++f)
223
+ u[f].e = i = !i;
224
+ for (var v = o[0], a, l; ; ) {
225
+ for (var c = v, h = !0; c.v; )
226
+ if ((c = c.n) === v)
227
+ return;
228
+ a = c.z, r.lineStart();
229
+ do {
230
+ if (c.v = c.o.v = !0, c.e) {
231
+ if (h)
232
+ for (f = 0, d = a.length; f < d; ++f)
233
+ r.point((l = a[f])[0], l[1]);
234
+ else
235
+ e(c.x, c.n.x, 1, r);
236
+ c = c.n;
237
+ } else {
238
+ if (h)
239
+ for (a = c.p.z, f = a.length - 1; f >= 0; --f)
240
+ r.point((l = a[f])[0], l[1]);
241
+ else
242
+ e(c.x, c.p.x, -1, r);
243
+ c = c.p;
244
+ }
245
+ c = c.o, a = c.z, h = !h;
246
+ } while (!c.v);
247
+ r.lineEnd();
248
+ }
249
+ }
250
+ }
251
+ function Le(n) {
252
+ if (t = n.length) {
253
+ for (var t, i = 0, e = n[0], r; ++i < t; )
254
+ e.n = r = n[i], r.p = e, e = r;
255
+ e.n = r = n[0], r.p = e;
256
+ }
257
+ }
258
+ var Xt = ut();
259
+ function Yt(n) {
260
+ return Y(n[0]) <= G ? n[0] : Qi(n[0]) * ((Y(n[0]) + G) % hn - G);
261
+ }
262
+ function ii(n, t) {
263
+ var i = Yt(t), e = t[1], r = N(e), o = [N(i), -I(i), 0], u = 0, f = 0;
264
+ Xt.reset(), r === 1 ? e = ln + F : r === -1 && (e = -ln - F);
265
+ for (var d = 0, v = n.length; d < v; ++d)
266
+ if (l = (a = n[d]).length)
267
+ for (var a, l, c = a[l - 1], h = Yt(c), p = c[1] / 2 + Re, R = N(p), m = I(p), M = 0; M < l; ++M, h = g, R = w, m = j, c = y) {
268
+ var y = a[M], g = Yt(y), C = y[1] / 2 + Re, w = N(C), j = I(C), P = g - h, W = P >= 0 ? 1 : -1, x = W * P, O = x > G, E = R * w;
269
+ if (Xt.add(On(E * W * N(x), m * j + E * I(x))), u += O ? P + W * hn : P, O ^ h >= i ^ g >= i) {
270
+ var b = jt($n(c), $n(y));
271
+ Qt(b);
272
+ var A = jt(o, b);
273
+ Qt(A);
274
+ var L = (O ^ P >= 0 ? -1 : 1) * jn(A[2]);
275
+ (e > L || e === L && (b[0] || b[1])) && (f += O ^ P >= 0 ? 1 : -1);
276
+ }
277
+ }
278
+ return (u < -F || u < F && Xt < -F) ^ f & 1;
279
+ }
280
+ function ri(n, t) {
281
+ return n < t ? -1 : n > t ? 1 : n >= t ? 0 : NaN;
282
+ }
283
+ function _i(n) {
284
+ return n.length === 1 && (n = nr(n)), {
285
+ left: function(t, i, e, r) {
286
+ for (e == null && (e = 0), r == null && (r = t.length); e < r; ) {
287
+ var o = e + r >>> 1;
288
+ n(t[o], i) < 0 ? e = o + 1 : r = o;
289
+ }
290
+ return e;
291
+ },
292
+ right: function(t, i, e, r) {
293
+ for (e == null && (e = 0), r == null && (r = t.length); e < r; ) {
294
+ var o = e + r >>> 1;
295
+ n(t[o], i) > 0 ? r = o : e = o + 1;
296
+ }
297
+ return e;
298
+ }
299
+ };
300
+ }
301
+ function nr(n) {
302
+ return function(t, i) {
303
+ return ri(n(t), i);
304
+ };
305
+ }
306
+ _i(ri);
307
+ function An(n, t, i) {
308
+ n = +n, t = +t, i = (r = arguments.length) < 2 ? (t = n, n = 0, 1) : r < 3 ? 1 : +i;
309
+ for (var e = -1, r = Math.max(0, Math.ceil((t - n) / i)) | 0, o = new Array(r); ++e < r; )
310
+ o[e] = n + e * i;
311
+ return o;
312
+ }
313
+ function oi(n) {
314
+ for (var t = n.length, i, e = -1, r = 0, o, u; ++e < t; )
315
+ r += n[e].length;
316
+ for (o = new Array(r); --t >= 0; )
317
+ for (u = n[t], i = u.length; --i >= 0; )
318
+ o[--r] = u[i];
319
+ return o;
320
+ }
321
+ function ui(n, t, i, e) {
322
+ return function(r) {
323
+ var o = t(r), u = ti(), f = t(u), d = !1, v, a, l, c = {
324
+ point: h,
325
+ lineStart: R,
326
+ lineEnd: m,
327
+ polygonStart: function() {
328
+ c.point = M, c.lineStart = y, c.lineEnd = g, a = [], v = [];
329
+ },
330
+ polygonEnd: function() {
331
+ c.point = h, c.lineStart = R, c.lineEnd = m, a = oi(a);
332
+ var C = ii(v, e);
333
+ a.length ? (d || (r.polygonStart(), d = !0), ei(a, er, C, i, r)) : C && (d || (r.polygonStart(), d = !0), r.lineStart(), i(null, null, 1, r), r.lineEnd()), d && (r.polygonEnd(), d = !1), a = v = null;
334
+ },
335
+ sphere: function() {
336
+ r.polygonStart(), r.lineStart(), i(null, null, 1, r), r.lineEnd(), r.polygonEnd();
337
+ }
338
+ };
339
+ function h(C, w) {
340
+ n(C, w) && r.point(C, w);
341
+ }
342
+ function p(C, w) {
343
+ o.point(C, w);
344
+ }
345
+ function R() {
346
+ c.point = p, o.lineStart();
347
+ }
348
+ function m() {
349
+ c.point = h, o.lineEnd();
350
+ }
351
+ function M(C, w) {
352
+ l.push([C, w]), f.point(C, w);
353
+ }
354
+ function y() {
355
+ f.lineStart(), l = [];
356
+ }
357
+ function g() {
358
+ M(l[0][0], l[0][1]), f.lineEnd();
359
+ var C = f.clean(), w = u.result(), j, P = w.length, W, x, O;
360
+ if (l.pop(), v.push(l), l = null, !!P) {
361
+ if (C & 1) {
362
+ if (x = w[0], (W = x.length - 1) > 0) {
363
+ for (d || (r.polygonStart(), d = !0), r.lineStart(), j = 0; j < W; ++j)
364
+ r.point((O = x[j])[0], O[1]);
365
+ r.lineEnd();
366
+ }
367
+ return;
368
+ }
369
+ P > 1 && C & 2 && w.push(w.pop().concat(w.shift())), a.push(w.filter(tr));
370
+ }
371
+ }
372
+ return c;
373
+ };
374
+ }
375
+ function tr(n) {
376
+ return n.length > 1;
377
+ }
378
+ function er(n, t) {
379
+ return ((n = n.x)[0] < 0 ? n[1] - ln - F : ln - n[1]) - ((t = t.x)[0] < 0 ? t[1] - ln - F : ln - t[1]);
380
+ }
381
+ const We = ui(
382
+ function() {
383
+ return !0;
384
+ },
385
+ ir,
386
+ or,
387
+ [-G, -ln]
388
+ );
389
+ function ir(n) {
390
+ var t = NaN, i = NaN, e = NaN, r;
391
+ return {
392
+ lineStart: function() {
393
+ n.lineStart(), r = 1;
394
+ },
395
+ point: function(o, u) {
396
+ var f = o > 0 ? G : -G, d = Y(o - t);
397
+ Y(d - G) < F ? (n.point(t, i = (i + u) / 2 > 0 ? ln : -ln), n.point(e, i), n.lineEnd(), n.lineStart(), n.point(f, i), n.point(o, i), r = 0) : e !== f && d >= G && (Y(t - e) < F && (t -= e * F), Y(o - f) < F && (o -= f * F), i = rr(t, i, o, u), n.point(e, i), n.lineEnd(), n.lineStart(), n.point(f, i), r = 0), n.point(t = o, i = u), e = f;
398
+ },
399
+ lineEnd: function() {
400
+ n.lineEnd(), t = i = NaN;
401
+ },
402
+ clean: function() {
403
+ return 2 - r;
404
+ }
405
+ };
406
+ }
407
+ function rr(n, t, i, e) {
408
+ var r, o, u = N(n - i);
409
+ return Y(u) > F ? at((N(t) * (o = I(e)) * N(i) - N(e) * (r = I(t)) * N(n)) / (r * o * u)) : (t + e) / 2;
410
+ }
411
+ function or(n, t, i, e) {
412
+ var r;
413
+ if (n == null)
414
+ r = i * ln, e.point(-G, r), e.point(0, r), e.point(G, r), e.point(G, 0), e.point(G, -r), e.point(0, -r), e.point(-G, -r), e.point(-G, 0), e.point(-G, r);
415
+ else if (Y(n[0] - t[0]) > F) {
416
+ var o = n[0] < t[0] ? G : -G;
417
+ r = i * o / 2, e.point(-o, r), e.point(0, r), e.point(o, r);
418
+ } else
419
+ e.point(t[0], t[1]);
420
+ }
421
+ function ur(n) {
422
+ var t = I(n), i = 6 * H, e = t > 0, r = Y(t) > F;
423
+ function o(a, l, c, h) {
424
+ Vi(h, n, i, c, a, l);
425
+ }
426
+ function u(a, l) {
427
+ return I(a) * I(l) > t;
428
+ }
429
+ function f(a) {
430
+ var l, c, h, p, R;
431
+ return {
432
+ lineStart: function() {
433
+ p = h = !1, R = 1;
434
+ },
435
+ point: function(m, M) {
436
+ var y = [m, M], g, C = u(m, M), w = e ? C ? 0 : v(m, M) : C ? v(m + (m < 0 ? G : -G), M) : 0;
437
+ if (!l && (p = h = C) && a.lineStart(), C !== h && (g = d(l, y), (!g || Mt(l, g) || Mt(y, g)) && (y[2] = 1)), C !== h)
438
+ R = 0, C ? (a.lineStart(), g = d(y, l), a.point(g[0], g[1])) : (g = d(l, y), a.point(g[0], g[1], 2), a.lineEnd()), l = g;
439
+ else if (r && l && e ^ C) {
440
+ var j;
441
+ !(w & c) && (j = d(y, l, !0)) && (R = 0, e ? (a.lineStart(), a.point(j[0][0], j[0][1]), a.point(j[1][0], j[1][1]), a.lineEnd()) : (a.point(j[1][0], j[1][1]), a.lineEnd(), a.lineStart(), a.point(j[0][0], j[0][1], 3)));
442
+ }
443
+ C && (!l || !Mt(l, y)) && a.point(y[0], y[1]), l = y, h = C, c = w;
444
+ },
445
+ lineEnd: function() {
446
+ h && a.lineEnd(), l = null;
447
+ },
448
+ // Rejoin first and last segments if there were intersections and the first
449
+ // and last points were visible.
450
+ clean: function() {
451
+ return R | (p && h) << 1;
452
+ }
453
+ };
454
+ }
455
+ function d(a, l, c) {
456
+ var h = $n(a), p = $n(l), R = [1, 0, 0], m = jt(h, p), M = gt(m, m), y = m[0], g = M - y * y;
457
+ if (!g)
458
+ return !c && a;
459
+ var C = t * M / g, w = -t * y / g, j = jt(R, m), P = mt(R, C), W = mt(m, w);
460
+ Dt(P, W);
461
+ var x = j, O = gt(P, x), E = gt(x, x), b = O * O - E * (gt(P, P) - 1);
462
+ if (!(b < 0)) {
463
+ var A = yn(b), L = mt(x, (-O - A) / E);
464
+ if (Dt(L, P), L = Jt(L), !c)
465
+ return L;
466
+ var s = a[0], T = l[0], D = a[1], B = l[1], z;
467
+ T < s && (z = s, s = T, T = z);
468
+ var on = T - s, U = Y(on - G) < F, K = U || on < F;
469
+ if (!U && B < D && (z = D, D = B, B = z), K ? U ? D + B > 0 ^ L[1] < (Y(L[0] - s) < F ? D : B) : D <= L[1] && L[1] <= B : on > G ^ (s <= L[0] && L[0] <= T)) {
470
+ var J = mt(x, (-O + A) / E);
471
+ return Dt(J, P), [L, Jt(J)];
472
+ }
473
+ }
474
+ }
475
+ function v(a, l) {
476
+ var c = e ? n : G - n, h = 0;
477
+ return a < -c ? h |= 1 : a > c && (h |= 2), l < -c ? h |= 4 : l > c && (h |= 8), h;
478
+ }
479
+ return ui(u, f, o, e ? [0, -n] : [-G, n - G]);
480
+ }
481
+ function ar(n, t, i, e, r, o) {
482
+ var u = n[0], f = n[1], d = t[0], v = t[1], a = 0, l = 1, c = d - u, h = v - f, p;
483
+ if (p = i - u, !(!c && p > 0)) {
484
+ if (p /= c, c < 0) {
485
+ if (p < a)
486
+ return;
487
+ p < l && (l = p);
488
+ } else if (c > 0) {
489
+ if (p > l)
490
+ return;
491
+ p > a && (a = p);
492
+ }
493
+ if (p = r - u, !(!c && p < 0)) {
494
+ if (p /= c, c < 0) {
495
+ if (p > l)
496
+ return;
497
+ p > a && (a = p);
498
+ } else if (c > 0) {
499
+ if (p < a)
500
+ return;
501
+ p < l && (l = p);
502
+ }
503
+ if (p = e - f, !(!h && p > 0)) {
504
+ if (p /= h, h < 0) {
505
+ if (p < a)
506
+ return;
507
+ p < l && (l = p);
508
+ } else if (h > 0) {
509
+ if (p > l)
510
+ return;
511
+ p > a && (a = p);
512
+ }
513
+ if (p = o - f, !(!h && p < 0)) {
514
+ if (p /= h, h < 0) {
515
+ if (p > l)
516
+ return;
517
+ p > a && (a = p);
518
+ } else if (h > 0) {
519
+ if (p < a)
520
+ return;
521
+ p < l && (l = p);
522
+ }
523
+ return a > 0 && (n[0] = u + a * c, n[1] = f + a * h), l < 1 && (t[0] = u + l * c, t[1] = f + l * h), !0;
524
+ }
525
+ }
526
+ }
527
+ }
528
+ }
529
+ var Zn = 1e9, St = -Zn;
530
+ function lr(n, t, i, e) {
531
+ function r(v, a) {
532
+ return n <= v && v <= i && t <= a && a <= e;
533
+ }
534
+ function o(v, a, l, c) {
535
+ var h = 0, p = 0;
536
+ if (v == null || (h = u(v, l)) !== (p = u(a, l)) || d(v, a) < 0 ^ l > 0)
537
+ do
538
+ c.point(h === 0 || h === 3 ? n : i, h > 1 ? e : t);
539
+ while ((h = (h + l + 4) % 4) !== p);
540
+ else
541
+ c.point(a[0], a[1]);
542
+ }
543
+ function u(v, a) {
544
+ return Y(v[0] - n) < F ? a > 0 ? 0 : 3 : Y(v[0] - i) < F ? a > 0 ? 2 : 1 : Y(v[1] - t) < F ? a > 0 ? 1 : 0 : a > 0 ? 3 : 2;
545
+ }
546
+ function f(v, a) {
547
+ return d(v.x, a.x);
548
+ }
549
+ function d(v, a) {
550
+ var l = u(v, 1), c = u(a, 1);
551
+ return l !== c ? l - c : l === 0 ? a[1] - v[1] : l === 1 ? v[0] - a[0] : l === 2 ? v[1] - a[1] : a[0] - v[0];
552
+ }
553
+ return function(v) {
554
+ var a = v, l = ti(), c, h, p, R, m, M, y, g, C, w, j, P = {
555
+ point: W,
556
+ lineStart: b,
557
+ lineEnd: A,
558
+ polygonStart: O,
559
+ polygonEnd: E
560
+ };
561
+ function W(s, T) {
562
+ r(s, T) && a.point(s, T);
563
+ }
564
+ function x() {
565
+ for (var s = 0, T = 0, D = h.length; T < D; ++T)
566
+ for (var B = h[T], z = 1, on = B.length, U = B[0], K, J, V = U[0], X = U[1]; z < on; ++z)
567
+ K = V, J = X, U = B[z], V = U[0], X = U[1], J <= e ? X > e && (V - K) * (e - J) > (X - J) * (n - K) && ++s : X <= e && (V - K) * (e - J) < (X - J) * (n - K) && --s;
568
+ return s;
569
+ }
570
+ function O() {
571
+ a = l, c = [], h = [], j = !0;
572
+ }
573
+ function E() {
574
+ var s = x(), T = j && s, D = (c = oi(c)).length;
575
+ (T || D) && (v.polygonStart(), T && (v.lineStart(), o(null, null, 1, v), v.lineEnd()), D && ei(c, f, s, o, v), v.polygonEnd()), a = v, c = h = p = null;
576
+ }
577
+ function b() {
578
+ P.point = L, h && h.push(p = []), w = !0, C = !1, y = g = NaN;
579
+ }
580
+ function A() {
581
+ c && (L(R, m), M && C && l.rejoin(), c.push(l.result())), P.point = W, C && a.lineEnd();
582
+ }
583
+ function L(s, T) {
584
+ var D = r(s, T);
585
+ if (h && p.push([s, T]), w)
586
+ R = s, m = T, M = D, w = !1, D && (a.lineStart(), a.point(s, T));
587
+ else if (D && C)
588
+ a.point(s, T);
589
+ else {
590
+ var B = [y = Math.max(St, Math.min(Zn, y)), g = Math.max(St, Math.min(Zn, g))], z = [s = Math.max(St, Math.min(Zn, s)), T = Math.max(St, Math.min(Zn, T))];
591
+ ar(B, z, n, t, i, e) ? (C || (a.lineStart(), a.point(B[0], B[1])), a.point(z[0], z[1]), D || a.lineEnd(), j = !1) : D && (a.lineStart(), a.point(s, T), j = !1);
592
+ }
593
+ y = s, g = T, C = D;
594
+ }
595
+ return P;
596
+ };
597
+ }
598
+ var _t = ut(), ne, Ct, Rt, zn = {
599
+ sphere: tn,
600
+ point: tn,
601
+ lineStart: cr,
602
+ lineEnd: tn,
603
+ polygonStart: tn,
604
+ polygonEnd: tn
605
+ };
606
+ function cr() {
607
+ zn.point = sr, zn.lineEnd = fr;
608
+ }
609
+ function fr() {
610
+ zn.point = zn.lineEnd = tn;
611
+ }
612
+ function sr(n, t) {
613
+ n *= H, t *= H, ne = n, Ct = N(t), Rt = I(t), zn.point = pr;
614
+ }
615
+ function pr(n, t) {
616
+ n *= H, t *= H;
617
+ var i = N(t), e = I(t), r = Y(n - ne), o = I(r), u = N(r), f = e * u, d = Rt * i - Ct * e * o, v = Ct * i + Rt * e * o;
618
+ _t.add(On(yn(f * f + d * d), v)), ne = n, Ct = i, Rt = e;
619
+ }
620
+ function hr(n) {
621
+ return _t.reset(), Fn(n, zn), +_t;
622
+ }
623
+ var te = [null, null], dr = { type: "LineString", coordinates: te };
624
+ function ee(n, t) {
625
+ return te[0] = n, te[1] = t, hr(dr);
626
+ }
627
+ var ke = {
628
+ Feature: function(n, t) {
629
+ return Tt(n.geometry, t);
630
+ },
631
+ FeatureCollection: function(n, t) {
632
+ for (var i = n.features, e = -1, r = i.length; ++e < r; )
633
+ if (Tt(i[e].geometry, t))
634
+ return !0;
635
+ return !1;
636
+ }
637
+ }, Fe = {
638
+ Sphere: function() {
639
+ return !0;
640
+ },
641
+ Point: function(n, t) {
642
+ return Oe(n.coordinates, t);
643
+ },
644
+ MultiPoint: function(n, t) {
645
+ for (var i = n.coordinates, e = -1, r = i.length; ++e < r; )
646
+ if (Oe(i[e], t))
647
+ return !0;
648
+ return !1;
649
+ },
650
+ LineString: function(n, t) {
651
+ return Ne(n.coordinates, t);
652
+ },
653
+ MultiLineString: function(n, t) {
654
+ for (var i = n.coordinates, e = -1, r = i.length; ++e < r; )
655
+ if (Ne(i[e], t))
656
+ return !0;
657
+ return !1;
658
+ },
659
+ Polygon: function(n, t) {
660
+ return Ge(n.coordinates, t);
661
+ },
662
+ MultiPolygon: function(n, t) {
663
+ for (var i = n.coordinates, e = -1, r = i.length; ++e < r; )
664
+ if (Ge(i[e], t))
665
+ return !0;
666
+ return !1;
667
+ },
668
+ GeometryCollection: function(n, t) {
669
+ for (var i = n.geometries, e = -1, r = i.length; ++e < r; )
670
+ if (Tt(i[e], t))
671
+ return !0;
672
+ return !1;
673
+ }
674
+ };
675
+ function Tt(n, t) {
676
+ return n && Fe.hasOwnProperty(n.type) ? Fe[n.type](n, t) : !1;
677
+ }
678
+ function Oe(n, t) {
679
+ return ee(n, t) === 0;
680
+ }
681
+ function Ne(n, t) {
682
+ for (var i, e, r, o = 0, u = n.length; o < u; o++) {
683
+ if (e = ee(n[o], t), e === 0 || o > 0 && (r = ee(n[o], n[o - 1]), r > 0 && i <= r && e <= r && (i + e - r) * (1 - Math.pow((i - e) / r, 2)) < Je * r))
684
+ return !0;
685
+ i = e;
686
+ }
687
+ return !1;
688
+ }
689
+ function Ge(n, t) {
690
+ return !!ii(n.map(vr), ai(t));
691
+ }
692
+ function vr(n) {
693
+ return n = n.map(ai), n.pop(), n;
694
+ }
695
+ function ai(n) {
696
+ return [n[0] * H, n[1] * H];
697
+ }
698
+ function li(n, t) {
699
+ return (n && ke.hasOwnProperty(n.type) ? ke[n.type] : Tt)(n, t);
700
+ }
701
+ function be(n, t, i) {
702
+ var e = An(n, t - F, i).concat(t);
703
+ return function(r) {
704
+ return e.map(function(o) {
705
+ return [r, o];
706
+ });
707
+ };
708
+ }
709
+ function Ae(n, t, i) {
710
+ var e = An(n, t - F, i).concat(t);
711
+ return function(r) {
712
+ return e.map(function(o) {
713
+ return [o, r];
714
+ });
715
+ };
716
+ }
717
+ function gr() {
718
+ var n, t, i, e, r, o, u, f, d = 10, v = d, a = 90, l = 360, c, h, p, R, m = 2.5;
719
+ function M() {
720
+ return { type: "MultiLineString", coordinates: y() };
721
+ }
722
+ function y() {
723
+ return An(vt(e / a) * a, i, a).map(p).concat(An(vt(f / l) * l, u, l).map(R)).concat(An(vt(t / d) * d, n, d).filter(function(g) {
724
+ return Y(g % a) > F;
725
+ }).map(c)).concat(An(vt(o / v) * v, r, v).filter(function(g) {
726
+ return Y(g % l) > F;
727
+ }).map(h));
728
+ }
729
+ return M.lines = function() {
730
+ return y().map(function(g) {
731
+ return { type: "LineString", coordinates: g };
732
+ });
733
+ }, M.outline = function() {
734
+ return {
735
+ type: "Polygon",
736
+ coordinates: [
737
+ p(e).concat(
738
+ R(u).slice(1),
739
+ p(i).reverse().slice(1),
740
+ R(f).reverse().slice(1)
741
+ )
742
+ ]
743
+ };
744
+ }, M.extent = function(g) {
745
+ return arguments.length ? M.extentMajor(g).extentMinor(g) : M.extentMinor();
746
+ }, M.extentMajor = function(g) {
747
+ return arguments.length ? (e = +g[0][0], i = +g[1][0], f = +g[0][1], u = +g[1][1], e > i && (g = e, e = i, i = g), f > u && (g = f, f = u, u = g), M.precision(m)) : [[e, f], [i, u]];
748
+ }, M.extentMinor = function(g) {
749
+ return arguments.length ? (t = +g[0][0], n = +g[1][0], o = +g[0][1], r = +g[1][1], t > n && (g = t, t = n, n = g), o > r && (g = o, o = r, r = g), M.precision(m)) : [[t, o], [n, r]];
750
+ }, M.step = function(g) {
751
+ return arguments.length ? M.stepMajor(g).stepMinor(g) : M.stepMinor();
752
+ }, M.stepMajor = function(g) {
753
+ return arguments.length ? (a = +g[0], l = +g[1], M) : [a, l];
754
+ }, M.stepMinor = function(g) {
755
+ return arguments.length ? (d = +g[0], v = +g[1], M) : [d, v];
756
+ }, M.precision = function(g) {
757
+ return arguments.length ? (m = +g, c = be(o, r, 90), h = Ae(t, n, m), p = be(f, u, 90), R = Ae(e, i, m), M) : m;
758
+ }, M.extentMajor([[-180, -90 + F], [180, 90 - F]]).extentMinor([[-180, -80 - F], [180, 80 + F]]);
759
+ }
760
+ function ie(n) {
761
+ return n;
762
+ }
763
+ var Ht = ut(), re = ut(), ci, fi, oe, ue, xn = {
764
+ point: tn,
765
+ lineStart: tn,
766
+ lineEnd: tn,
767
+ polygonStart: function() {
768
+ xn.lineStart = mr, xn.lineEnd = Sr;
769
+ },
770
+ polygonEnd: function() {
771
+ xn.lineStart = xn.lineEnd = xn.point = tn, Ht.add(Y(re)), re.reset();
772
+ },
773
+ result: function() {
774
+ var n = Ht / 2;
775
+ return Ht.reset(), n;
776
+ }
777
+ };
778
+ function mr() {
779
+ xn.point = yr;
780
+ }
781
+ function yr(n, t) {
782
+ xn.point = si, ci = oe = n, fi = ue = t;
783
+ }
784
+ function si(n, t) {
785
+ re.add(ue * n - oe * t), oe = n, ue = t;
786
+ }
787
+ function Sr() {
788
+ si(ci, fi);
789
+ }
790
+ var Bn = 1 / 0, Pt = Bn, et = -Bn, qt = et, xt = {
791
+ point: Mr,
792
+ lineStart: tn,
793
+ lineEnd: tn,
794
+ polygonStart: tn,
795
+ polygonEnd: tn,
796
+ result: function() {
797
+ var n = [[Bn, Pt], [et, qt]];
798
+ return et = qt = -(Pt = Bn = 1 / 0), n;
799
+ }
800
+ };
801
+ function Mr(n, t) {
802
+ n < Bn && (Bn = n), n > et && (et = n), t < Pt && (Pt = t), t > qt && (qt = t);
803
+ }
804
+ var ae = 0, le = 0, Kn = 0, Lt = 0, Wt = 0, In = 0, ce = 0, fe = 0, Jn = 0, pi, hi, wn, En, mn = {
805
+ point: Nn,
806
+ lineStart: Ie,
807
+ lineEnd: $e,
808
+ polygonStart: function() {
809
+ mn.lineStart = wr, mn.lineEnd = Er;
810
+ },
811
+ polygonEnd: function() {
812
+ mn.point = Nn, mn.lineStart = Ie, mn.lineEnd = $e;
813
+ },
814
+ result: function() {
815
+ var n = Jn ? [ce / Jn, fe / Jn] : In ? [Lt / In, Wt / In] : Kn ? [ae / Kn, le / Kn] : [NaN, NaN];
816
+ return ae = le = Kn = Lt = Wt = In = ce = fe = Jn = 0, n;
817
+ }
818
+ };
819
+ function Nn(n, t) {
820
+ ae += n, le += t, ++Kn;
821
+ }
822
+ function Ie() {
823
+ mn.point = Cr;
824
+ }
825
+ function Cr(n, t) {
826
+ mn.point = Rr, Nn(wn = n, En = t);
827
+ }
828
+ function Rr(n, t) {
829
+ var i = n - wn, e = t - En, r = yn(i * i + e * e);
830
+ Lt += r * (wn + n) / 2, Wt += r * (En + t) / 2, In += r, Nn(wn = n, En = t);
831
+ }
832
+ function $e() {
833
+ mn.point = Nn;
834
+ }
835
+ function wr() {
836
+ mn.point = jr;
837
+ }
838
+ function Er() {
839
+ di(pi, hi);
840
+ }
841
+ function jr(n, t) {
842
+ mn.point = di, Nn(pi = wn = n, hi = En = t);
843
+ }
844
+ function di(n, t) {
845
+ var i = n - wn, e = t - En, r = yn(i * i + e * e);
846
+ Lt += r * (wn + n) / 2, Wt += r * (En + t) / 2, In += r, r = En * n - wn * t, ce += r * (wn + n), fe += r * (En + t), Jn += r * 3, Nn(wn = n, En = t);
847
+ }
848
+ function vi(n) {
849
+ this._context = n;
850
+ }
851
+ vi.prototype = {
852
+ _radius: 4.5,
853
+ pointRadius: function(n) {
854
+ return this._radius = n, this;
855
+ },
856
+ polygonStart: function() {
857
+ this._line = 0;
858
+ },
859
+ polygonEnd: function() {
860
+ this._line = NaN;
861
+ },
862
+ lineStart: function() {
863
+ this._point = 0;
864
+ },
865
+ lineEnd: function() {
866
+ this._line === 0 && this._context.closePath(), this._point = NaN;
867
+ },
868
+ point: function(n, t) {
869
+ switch (this._point) {
870
+ case 0: {
871
+ this._context.moveTo(n, t), this._point = 1;
872
+ break;
873
+ }
874
+ case 1: {
875
+ this._context.lineTo(n, t);
876
+ break;
877
+ }
878
+ default: {
879
+ this._context.moveTo(n + this._radius, t), this._context.arc(n, t, this._radius, 0, hn);
880
+ break;
881
+ }
882
+ }
883
+ },
884
+ result: tn
885
+ };
886
+ var se = ut(), Zt, gi, mi, Qn, Un, it = {
887
+ point: tn,
888
+ lineStart: function() {
889
+ it.point = Tr;
890
+ },
891
+ lineEnd: function() {
892
+ Zt && yi(gi, mi), it.point = tn;
893
+ },
894
+ polygonStart: function() {
895
+ Zt = !0;
896
+ },
897
+ polygonEnd: function() {
898
+ Zt = null;
899
+ },
900
+ result: function() {
901
+ var n = +se;
902
+ return se.reset(), n;
903
+ }
904
+ };
905
+ function Tr(n, t) {
906
+ it.point = yi, gi = Qn = n, mi = Un = t;
907
+ }
908
+ function yi(n, t) {
909
+ Qn -= n, Un -= t, se.add(yn(Qn * Qn + Un * Un)), Qn = n, Un = t;
910
+ }
911
+ function Si() {
912
+ this._string = [];
913
+ }
914
+ Si.prototype = {
915
+ _radius: 4.5,
916
+ _circle: ze(4.5),
917
+ pointRadius: function(n) {
918
+ return (n = +n) !== this._radius && (this._radius = n, this._circle = null), this;
919
+ },
920
+ polygonStart: function() {
921
+ this._line = 0;
922
+ },
923
+ polygonEnd: function() {
924
+ this._line = NaN;
925
+ },
926
+ lineStart: function() {
927
+ this._point = 0;
928
+ },
929
+ lineEnd: function() {
930
+ this._line === 0 && this._string.push("Z"), this._point = NaN;
931
+ },
932
+ point: function(n, t) {
933
+ switch (this._point) {
934
+ case 0: {
935
+ this._string.push("M", n, ",", t), this._point = 1;
936
+ break;
937
+ }
938
+ case 1: {
939
+ this._string.push("L", n, ",", t);
940
+ break;
941
+ }
942
+ default: {
943
+ this._circle == null && (this._circle = ze(this._radius)), this._string.push("M", n, ",", t, this._circle);
944
+ break;
945
+ }
946
+ }
947
+ },
948
+ result: function() {
949
+ if (this._string.length) {
950
+ var n = this._string.join("");
951
+ return this._string = [], n;
952
+ } else
953
+ return null;
954
+ }
955
+ };
956
+ function ze(n) {
957
+ return "m0," + n + "a" + n + "," + n + " 0 1,1 0," + -2 * n + "a" + n + "," + n + " 0 1,1 0," + 2 * n + "z";
958
+ }
959
+ function Pr(n, t) {
960
+ var i = 4.5, e, r;
961
+ function o(u) {
962
+ return u && (typeof i == "function" && r.pointRadius(+i.apply(this, arguments)), Fn(u, e(r))), r.result();
963
+ }
964
+ return o.area = function(u) {
965
+ return Fn(u, e(xn)), xn.result();
966
+ }, o.measure = function(u) {
967
+ return Fn(u, e(it)), it.result();
968
+ }, o.bounds = function(u) {
969
+ return Fn(u, e(xt)), xt.result();
970
+ }, o.centroid = function(u) {
971
+ return Fn(u, e(mn)), mn.result();
972
+ }, o.projection = function(u) {
973
+ return arguments.length ? (e = u == null ? (n = null, ie) : (n = u).stream, o) : n;
974
+ }, o.context = function(u) {
975
+ return arguments.length ? (r = u == null ? (t = null, new Si()) : new vi(t = u), typeof i != "function" && r.pointRadius(i), o) : t;
976
+ }, o.pointRadius = function(u) {
977
+ return arguments.length ? (i = typeof u == "function" ? u : (r.pointRadius(+u), +u), o) : i;
978
+ }, o.projection(n).context(t);
979
+ }
980
+ function ye(n) {
981
+ return function(t) {
982
+ var i = new pe();
983
+ for (var e in n)
984
+ i[e] = n[e];
985
+ return i.stream = t, i;
986
+ };
987
+ }
988
+ function pe() {
989
+ }
990
+ pe.prototype = {
991
+ constructor: pe,
992
+ point: function(n, t) {
993
+ this.stream.point(n, t);
994
+ },
995
+ sphere: function() {
996
+ this.stream.sphere();
997
+ },
998
+ lineStart: function() {
999
+ this.stream.lineStart();
1000
+ },
1001
+ lineEnd: function() {
1002
+ this.stream.lineEnd();
1003
+ },
1004
+ polygonStart: function() {
1005
+ this.stream.polygonStart();
1006
+ },
1007
+ polygonEnd: function() {
1008
+ this.stream.polygonEnd();
1009
+ }
1010
+ };
1011
+ function Se(n, t, i) {
1012
+ var e = n.clipExtent && n.clipExtent();
1013
+ return n.scale(150).translate([0, 0]), e != null && n.clipExtent(null), Fn(i, n.stream(xt)), t(xt.result()), e != null && n.clipExtent(e), n;
1014
+ }
1015
+ function Mi(n, t, i) {
1016
+ return Se(n, function(e) {
1017
+ var r = t[1][0] - t[0][0], o = t[1][1] - t[0][1], u = Math.min(r / (e[1][0] - e[0][0]), o / (e[1][1] - e[0][1])), f = +t[0][0] + (r - u * (e[1][0] + e[0][0])) / 2, d = +t[0][1] + (o - u * (e[1][1] + e[0][1])) / 2;
1018
+ n.scale(150 * u).translate([f, d]);
1019
+ }, i);
1020
+ }
1021
+ function qr(n, t, i) {
1022
+ return Mi(n, [[0, 0], t], i);
1023
+ }
1024
+ function xr(n, t, i) {
1025
+ return Se(n, function(e) {
1026
+ var r = +t, o = r / (e[1][0] - e[0][0]), u = (r - o * (e[1][0] + e[0][0])) / 2, f = -o * e[0][1];
1027
+ n.scale(150 * o).translate([u, f]);
1028
+ }, i);
1029
+ }
1030
+ function Lr(n, t, i) {
1031
+ return Se(n, function(e) {
1032
+ var r = +t, o = r / (e[1][1] - e[0][1]), u = -o * e[0][0], f = (r - o * (e[1][1] + e[0][1])) / 2;
1033
+ n.scale(150 * o).translate([u, f]);
1034
+ }, i);
1035
+ }
1036
+ var Be = 16, Wr = I(30 * H);
1037
+ function De(n, t) {
1038
+ return +t ? Fr(n, t) : kr(n);
1039
+ }
1040
+ function kr(n) {
1041
+ return ye({
1042
+ point: function(t, i) {
1043
+ t = n(t, i), this.stream.point(t[0], t[1]);
1044
+ }
1045
+ });
1046
+ }
1047
+ function Fr(n, t) {
1048
+ function i(e, r, o, u, f, d, v, a, l, c, h, p, R, m) {
1049
+ var M = v - e, y = a - r, g = M * M + y * y;
1050
+ if (g > 4 * t && R--) {
1051
+ var C = u + c, w = f + h, j = d + p, P = yn(C * C + w * w + j * j), W = jn(j /= P), x = Y(Y(j) - 1) < F || Y(o - l) < F ? (o + l) / 2 : On(w, C), O = n(x, W), E = O[0], b = O[1], A = E - e, L = b - r, s = y * A - M * L;
1052
+ (s * s / g > t || Y((M * A + y * L) / g - 0.5) > 0.3 || u * c + f * h + d * p < Wr) && (i(e, r, o, u, f, d, E, b, x, C /= P, w /= P, j, R, m), m.point(E, b), i(E, b, x, C, w, j, v, a, l, c, h, p, R, m));
1053
+ }
1054
+ }
1055
+ return function(e) {
1056
+ var r, o, u, f, d, v, a, l, c, h, p, R, m = {
1057
+ point: M,
1058
+ lineStart: y,
1059
+ lineEnd: C,
1060
+ polygonStart: function() {
1061
+ e.polygonStart(), m.lineStart = w;
1062
+ },
1063
+ polygonEnd: function() {
1064
+ e.polygonEnd(), m.lineStart = y;
1065
+ }
1066
+ };
1067
+ function M(W, x) {
1068
+ W = n(W, x), e.point(W[0], W[1]);
1069
+ }
1070
+ function y() {
1071
+ l = NaN, m.point = g, e.lineStart();
1072
+ }
1073
+ function g(W, x) {
1074
+ var O = $n([W, x]), E = n(W, x);
1075
+ i(l, c, a, h, p, R, l = E[0], c = E[1], a = W, h = O[0], p = O[1], R = O[2], Be, e), e.point(l, c);
1076
+ }
1077
+ function C() {
1078
+ m.point = M, e.lineEnd();
1079
+ }
1080
+ function w() {
1081
+ y(), m.point = j, m.lineEnd = P;
1082
+ }
1083
+ function j(W, x) {
1084
+ g(r = W, x), o = l, u = c, f = h, d = p, v = R, m.point = g;
1085
+ }
1086
+ function P() {
1087
+ i(l, c, a, h, p, R, o, u, r, f, d, v, Be, e), m.lineEnd = C, C();
1088
+ }
1089
+ return m;
1090
+ };
1091
+ }
1092
+ var Or = ye({
1093
+ point: function(n, t) {
1094
+ this.stream.point(n * H, t * H);
1095
+ }
1096
+ });
1097
+ function Nr(n) {
1098
+ return ye({
1099
+ point: function(t, i) {
1100
+ var e = n(t, i);
1101
+ return this.stream.point(e[0], e[1]);
1102
+ }
1103
+ });
1104
+ }
1105
+ function Gr(n, t, i, e, r) {
1106
+ function o(u, f) {
1107
+ return u *= e, f *= r, [t + n * u, i - n * f];
1108
+ }
1109
+ return o.invert = function(u, f) {
1110
+ return [(u - t) / n * e, (i - f) / n * r];
1111
+ }, o;
1112
+ }
1113
+ function Xe(n, t, i, e, r, o) {
1114
+ var u = I(o), f = N(o), d = u * n, v = f * n, a = u / n, l = f / n, c = (f * i - u * t) / n, h = (f * t + u * i) / n;
1115
+ function p(R, m) {
1116
+ return R *= e, m *= r, [d * R - v * m + t, i - v * R - d * m];
1117
+ }
1118
+ return p.invert = function(R, m) {
1119
+ return [e * (a * R - l * m + c), r * (h - l * R - a * m)];
1120
+ }, p;
1121
+ }
1122
+ function Ln(n) {
1123
+ return br(function() {
1124
+ return n;
1125
+ })();
1126
+ }
1127
+ function br(n) {
1128
+ var t, i = 150, e = 480, r = 250, o = 0, u = 0, f = 0, d = 0, v = 0, a, l = 0, c = 1, h = 1, p = null, R = We, m = null, M, y, g, C = ie, w = 0.5, j, P, W, x, O;
1129
+ function E(s) {
1130
+ return W(s[0] * H, s[1] * H);
1131
+ }
1132
+ function b(s) {
1133
+ return s = W.invert(s[0], s[1]), s && [s[0] * pn, s[1] * pn];
1134
+ }
1135
+ E.stream = function(s) {
1136
+ return x && O === s ? x : x = Or(Nr(a)(R(j(C(O = s)))));
1137
+ }, E.preclip = function(s) {
1138
+ return arguments.length ? (R = s, p = void 0, L()) : R;
1139
+ }, E.postclip = function(s) {
1140
+ return arguments.length ? (C = s, m = M = y = g = null, L()) : C;
1141
+ }, E.clipAngle = function(s) {
1142
+ return arguments.length ? (R = +s ? ur(p = s * H) : (p = null, We), L()) : p * pn;
1143
+ }, E.clipExtent = function(s) {
1144
+ return arguments.length ? (C = s == null ? (m = M = y = g = null, ie) : lr(m = +s[0][0], M = +s[0][1], y = +s[1][0], g = +s[1][1]), L()) : m == null ? null : [[m, M], [y, g]];
1145
+ }, E.scale = function(s) {
1146
+ return arguments.length ? (i = +s, A()) : i;
1147
+ }, E.translate = function(s) {
1148
+ return arguments.length ? (e = +s[0], r = +s[1], A()) : [e, r];
1149
+ }, E.center = function(s) {
1150
+ return arguments.length ? (o = s[0] % 360 * H, u = s[1] % 360 * H, A()) : [o * pn, u * pn];
1151
+ }, E.rotate = function(s) {
1152
+ return arguments.length ? (f = s[0] % 360 * H, d = s[1] % 360 * H, v = s.length > 2 ? s[2] % 360 * H : 0, A()) : [f * pn, d * pn, v * pn];
1153
+ }, E.angle = function(s) {
1154
+ return arguments.length ? (l = s % 360 * H, A()) : l * pn;
1155
+ }, E.reflectX = function(s) {
1156
+ return arguments.length ? (c = s ? -1 : 1, A()) : c < 0;
1157
+ }, E.reflectY = function(s) {
1158
+ return arguments.length ? (h = s ? -1 : 1, A()) : h < 0;
1159
+ }, E.precision = function(s) {
1160
+ return arguments.length ? (j = De(P, w = s * s), L()) : yn(w);
1161
+ }, E.fitExtent = function(s, T) {
1162
+ return Mi(E, s, T);
1163
+ }, E.fitSize = function(s, T) {
1164
+ return qr(E, s, T);
1165
+ }, E.fitWidth = function(s, T) {
1166
+ return xr(E, s, T);
1167
+ }, E.fitHeight = function(s, T) {
1168
+ return Lr(E, s, T);
1169
+ };
1170
+ function A() {
1171
+ var s = Xe(i, 0, 0, c, h, l).apply(null, t(o, u)), T = (l ? Xe : Gr)(i, e - s[0], r - s[1], c, h, l);
1172
+ return a = ni(f, d, v), P = Ut(t, T), W = Ut(a, P), j = De(P, w), L();
1173
+ }
1174
+ function L() {
1175
+ return x = O = null, E;
1176
+ }
1177
+ return function() {
1178
+ return t = n.apply(this, arguments), E.invert = t.invert && b, A();
1179
+ };
1180
+ }
1181
+ function Ci(n) {
1182
+ return function(t, i) {
1183
+ var e = I(t), r = I(i), o = n(e * r);
1184
+ return [
1185
+ o * r * N(t),
1186
+ o * N(i)
1187
+ ];
1188
+ };
1189
+ }
1190
+ function lt(n) {
1191
+ return function(t, i) {
1192
+ var e = yn(t * t + i * i), r = n(e), o = N(r), u = I(r);
1193
+ return [
1194
+ On(t * o, e * u),
1195
+ jn(e && i * o / e)
1196
+ ];
1197
+ };
1198
+ }
1199
+ var Ri = Ci(function(n) {
1200
+ return yn(2 / (1 + n));
1201
+ });
1202
+ Ri.invert = lt(function(n) {
1203
+ return 2 * jn(n / 2);
1204
+ });
1205
+ function Ar() {
1206
+ return Ln(Ri).scale(124.75).clipAngle(180 - 1e-3);
1207
+ }
1208
+ var wi = Ci(function(n) {
1209
+ return (n = _e(n)) && n / N(n);
1210
+ });
1211
+ wi.invert = lt(function(n) {
1212
+ return n;
1213
+ });
1214
+ function Ir() {
1215
+ return Ln(wi).scale(79.4188).clipAngle(180 - 1e-3);
1216
+ }
1217
+ function Me(n, t) {
1218
+ return [n, Ue(Ve((ln + t) / 2))];
1219
+ }
1220
+ Me.invert = function(n, t) {
1221
+ return [n, 2 * at(Qe(t)) - ln];
1222
+ };
1223
+ function $r() {
1224
+ return Ei(Me).scale(961 / hn);
1225
+ }
1226
+ function Ei(n) {
1227
+ var t = Ln(n), i = t.center, e = t.scale, r = t.translate, o = t.clipExtent, u = null, f, d, v;
1228
+ t.scale = function(l) {
1229
+ return arguments.length ? (e(l), a()) : e();
1230
+ }, t.translate = function(l) {
1231
+ return arguments.length ? (r(l), a()) : r();
1232
+ }, t.center = function(l) {
1233
+ return arguments.length ? (i(l), a()) : i();
1234
+ }, t.clipExtent = function(l) {
1235
+ return arguments.length ? (l == null ? u = f = d = v = null : (u = +l[0][0], f = +l[0][1], d = +l[1][0], v = +l[1][1]), a()) : u == null ? null : [[u, f], [d, v]];
1236
+ };
1237
+ function a() {
1238
+ var l = G * e(), c = t(Ui(t.rotate()).invert([0, 0]));
1239
+ return o(u == null ? [[c[0] - l, c[1] - l], [c[0] + l, c[1] + l]] : n === Me ? [[Math.max(c[0] - l, u), f], [Math.min(c[0] + l, d), v]] : [[u, Math.max(c[1] - l, f)], [d, Math.min(c[1] + l, v)]]);
1240
+ }
1241
+ return a();
1242
+ }
1243
+ function he(n, t) {
1244
+ return [n, t];
1245
+ }
1246
+ he.invert = he;
1247
+ function zr() {
1248
+ return Ln(he).scale(152.63);
1249
+ }
1250
+ var Vn = 1.340264, _n = -0.081106, nt = 893e-6, tt = 3796e-6, kt = yn(3) / 2, Br = 12;
1251
+ function ji(n, t) {
1252
+ var i = jn(kt * N(t)), e = i * i, r = e * e * e;
1253
+ return [
1254
+ n * I(i) / (kt * (Vn + 3 * _n * e + r * (7 * nt + 9 * tt * e))),
1255
+ i * (Vn + _n * e + r * (nt + tt * e))
1256
+ ];
1257
+ }
1258
+ ji.invert = function(n, t) {
1259
+ for (var i = t, e = i * i, r = e * e * e, o = 0, u, f, d; o < Br && (f = i * (Vn + _n * e + r * (nt + tt * e)) - t, d = Vn + 3 * _n * e + r * (7 * nt + 9 * tt * e), i -= u = f / d, e = i * i, r = e * e * e, !(Y(u) < Je)); ++o)
1260
+ ;
1261
+ return [
1262
+ kt * n * (Vn + 3 * _n * e + r * (7 * nt + 9 * tt * e)) / I(i),
1263
+ jn(N(i) / kt)
1264
+ ];
1265
+ };
1266
+ function Dr() {
1267
+ return Ln(ji).scale(177.158);
1268
+ }
1269
+ function Ti(n, t) {
1270
+ var i = I(t), e = I(n) * i;
1271
+ return [i * N(n) / e, N(t) / e];
1272
+ }
1273
+ Ti.invert = lt(at);
1274
+ function Xr() {
1275
+ return Ln(Ti).scale(144.049).clipAngle(60);
1276
+ }
1277
+ function Pi(n, t) {
1278
+ var i = t * t, e = i * i;
1279
+ return [
1280
+ n * (0.8707 - 0.131979 * i + e * (-0.013791 + e * (3971e-6 * i - 1529e-6 * e))),
1281
+ t * (1.007226 + i * (0.015085 + e * (-0.044475 + 0.028874 * i - 5916e-6 * e)))
1282
+ ];
1283
+ }
1284
+ Pi.invert = function(n, t) {
1285
+ var i = t, e = 25, r;
1286
+ do {
1287
+ var o = i * i, u = o * o;
1288
+ i -= r = (i * (1.007226 + o * (0.015085 + u * (-0.044475 + 0.028874 * o - 5916e-6 * u))) - t) / (1.007226 + o * (0.015085 * 3 + u * (-0.044475 * 7 + 0.028874 * 9 * o - 5916e-6 * 11 * u)));
1289
+ } while (Y(r) > F && --e > 0);
1290
+ return [
1291
+ n / (0.8707 + (o = i * i) * (-0.131979 + o * (-0.013791 + o * o * o * (3971e-6 - 1529e-6 * o)))),
1292
+ i
1293
+ ];
1294
+ };
1295
+ function Yr() {
1296
+ return Ln(Pi).scale(175.295);
1297
+ }
1298
+ function qi(n, t) {
1299
+ return [I(t) * N(n), N(t)];
1300
+ }
1301
+ qi.invert = lt(jn);
1302
+ function Hr() {
1303
+ return Ln(qi).scale(249.5).clipAngle(90 + F);
1304
+ }
1305
+ function xi(n, t) {
1306
+ var i = I(t), e = 1 + I(n) * i;
1307
+ return [i * N(n) / e, N(t) / e];
1308
+ }
1309
+ xi.invert = lt(function(n) {
1310
+ return 2 * at(n);
1311
+ });
1312
+ function Zr() {
1313
+ return Ln(xi).scale(250).clipAngle(142);
1314
+ }
1315
+ function Li(n, t) {
1316
+ return [Ue(Ve((ln + t) / 2)), -n];
1317
+ }
1318
+ Li.invert = function(n, t) {
1319
+ return [-t, 2 * at(Qe(n)) - ln];
1320
+ };
1321
+ function Kr() {
1322
+ var n = Ei(Li), t = n.center, i = n.rotate;
1323
+ return n.center = function(e) {
1324
+ return arguments.length ? t([-e[1], e[0]]) : (e = t(), [e[1], -e[0]]);
1325
+ }, n.rotate = function(e) {
1326
+ return arguments.length ? i([e[0], e[1], e.length > 2 ? e[2] + 90 : 90]) : (e = i(), [e[0], e[1], e[2] - 90]);
1327
+ }, i([0, 0, 90]).scale(159.155);
1328
+ }
1329
+ function rn() {
1330
+ return rn = Object.assign ? Object.assign.bind() : function(n) {
1331
+ for (var t = 1; t < arguments.length; t++) {
1332
+ var i = arguments[t];
1333
+ for (var e in i)
1334
+ Object.prototype.hasOwnProperty.call(i, e) && (n[e] = i[e]);
1335
+ }
1336
+ return n;
1337
+ }, rn.apply(this, arguments);
1338
+ }
1339
+ var Wi = { azimuthalEqualArea: Ar, azimuthalEquidistant: Ir, gnomonic: Xr, orthographic: Hr, stereographic: Zr, equalEarth: Dr, equirectangular: zr, mercator: $r, transverseMercator: Kr, naturalEarth1: Yr }, It = function(n) {
1340
+ var t = n.width, i = n.height, e = n.projectionType, r = n.projectionScale, o = n.projectionTranslation, u = n.projectionRotation, f = n.fillColor, d = n.borderWidth, v = n.borderColor, a = q.useMemo(function() {
1341
+ return Wi[e]().scale(r).translate([t * o[0], i * o[1]]).rotate(u);
1342
+ }, [t, i, e, r, o[0], o[1], u[0], u[1], u[2]]), l = q.useMemo(function() {
1343
+ return Pr(a);
1344
+ }, [a]), c = q.useMemo(function() {
1345
+ return gr();
1346
+ }), h = ot(), p = q.useMemo(function() {
1347
+ return typeof d == "function" ? d : function() {
1348
+ return d;
1349
+ };
1350
+ }, [d]), R = $i(v, h), m = q.useMemo(function() {
1351
+ return typeof f == "function" ? f : function() {
1352
+ return f;
1353
+ };
1354
+ }, [f]);
1355
+ return { projection: a, path: l, graticule: c, getBorderWidth: p, getBorderColor: R, getFillColor: m };
1356
+ }, ki = function(n) {
1357
+ var t = n.features, i = n.data, e = n.match, r = n.label, o = n.value, u = n.valueFormat, f = n.colors, d = n.unknownColor, v = n.domain, a = q.useMemo(function() {
1358
+ return pt(e) ? e : function(y, g) {
1359
+ var C = ht(y, e), w = ht(g, e);
1360
+ return C && C === w;
1361
+ };
1362
+ }, [e]), l = q.useMemo(function() {
1363
+ return pt(r) ? r : function(y) {
1364
+ return ht(y, r);
1365
+ };
1366
+ }, [r]), c = q.useMemo(function() {
1367
+ return pt(o) ? o : function(y) {
1368
+ return ht(y, o);
1369
+ };
1370
+ }, [o]), h = q.useMemo(function() {
1371
+ return u === void 0 ? function(y) {
1372
+ return y;
1373
+ } : pt(u) ? u : zi(u);
1374
+ }, [u]), p = q.useMemo(function() {
1375
+ return Bi(f).domain(v);
1376
+ }, [f, v]), R = q.useMemo(function() {
1377
+ return function(y) {
1378
+ return y.value === void 0 ? d : p(y.value);
1379
+ };
1380
+ }, [p, d]), m = q.useMemo(function() {
1381
+ return t.map(function(y) {
1382
+ var g = i.find(function(j) {
1383
+ return a(y, j);
1384
+ }), C = c(g);
1385
+ if (g) {
1386
+ var w = rn({}, y, { data: g, value: C, formattedValue: h(C) });
1387
+ return w.color = R(w), w.label = l(w), w;
1388
+ }
1389
+ return y;
1390
+ });
1391
+ }, [t, i, a, c, h, R]), M = Di({ scale: p, valueFormat: h });
1392
+ return { colorScale: p, getFillColor: R, boundFeatures: m, valueFormatter: h, legendData: M };
1393
+ }, rt = q.memo(function(n) {
1394
+ var t = n.feature;
1395
+ return t.data === void 0 ? null : $.jsx(Xi, { id: t.label, color: t.color, enableChip: !0, value: t.formattedValue });
1396
+ });
1397
+ rt.propTypes = { feature: S.object.isRequired }, rt.displayName = "ChoroplethTooltip";
1398
+ var Fi = { features: S.arrayOf(S.shape({ id: S.string.isRequired, type: S.oneOf(["Feature"]).isRequired, properties: S.object, geometry: S.object.isRequired })).isRequired, projectionType: S.oneOf(Object.keys(Wi)).isRequired, projectionScale: S.number.isRequired, projectionTranslation: S.arrayOf(S.number).isRequired, projectionRotation: S.arrayOf(S.number).isRequired, fillColor: S.oneOfType([S.string, S.func]).isRequired, borderWidth: S.oneOfType([S.number, S.func]).isRequired, borderColor: Yi.isRequired, enableGraticule: S.bool.isRequired, graticuleLineWidth: S.number.isRequired, graticuleLineColor: S.string.isRequired, isInteractive: S.bool.isRequired, onMouseEnter: S.func.isRequired, onMouseMove: S.func.isRequired, onMouseLeave: S.func.isRequired, onClick: S.func.isRequired, tooltip: S.any, layers: S.arrayOf(S.oneOfType([S.oneOf(["graticule", "features"]), S.func])).isRequired }, Oi = rn({}, Fi, { role: S.string.isRequired }), Ni = rn({ pixelRatio: S.number.isRequired }, Fi), Gi = { data: S.arrayOf(S.object).isRequired, match: S.oneOfType([S.string, S.func]).isRequired, label: S.oneOfType([S.string, S.func]).isRequired, value: S.oneOfType([S.string, S.func]).isRequired, valueFormat: S.oneOfType([S.string, S.func]), colors: Hi.isRequired, domain: S.arrayOf(S.number).isRequired, unknownColor: S.string.isRequired, layers: S.arrayOf(S.oneOfType([S.oneOf(["graticule", "features", "legends"]), S.func])).isRequired }, Jr = rn({}, Oi, Gi, { role: S.string.isRequired }), Qr = rn({}, Ni, Gi), bi = { projectionType: "mercator", projectionScale: 100, projectionTranslation: [0.5, 0.5], projectionRotation: [0, 0, 0], enableGraticule: !1, graticuleLineWidth: 0.5, graticuleLineColor: "#999999", fillColor: "#dddddd", borderWidth: 0, borderColor: "#000000", isInteractive: !0, onMouseEnter: function() {
1399
+ }, onMouseLeave: function() {
1400
+ }, onMouseMove: function() {
1401
+ }, onClick: function() {
1402
+ }, layers: ["graticule", "features"], legends: [], fill: [], defs: [] }, Ur = rn({}, bi, { role: "img" }), Vr = rn({}, bi, { pixelRatio: typeof window < "u" && window.devicePixelRatio || 1 }), Ai = { match: "id", label: "id", value: "value", colors: "PuBuGn", unknownColor: "#999", tooltip: rt, layers: ["graticule", "features", "legends"] }, oo = rn({}, Ur, Ai, { role: "img" }), uo = rn({}, Vr, Ai), Ft = q.memo(function(n) {
1403
+ var t = n.path, i = n.graticule, e = n.lineWidth, r = n.lineColor;
1404
+ return $.jsx("path", { fill: "none", strokeWidth: e, stroke: r, d: t(i()) });
1405
+ });
1406
+ Ft.propTypes = { path: S.func.isRequired, graticule: S.func.isRequired, lineWidth: S.number.isRequired, lineColor: S.string.isRequired }, Ft.displayName = "GeoGraticule";
1407
+ var Ot = q.memo(function(n) {
1408
+ var t, i = n.feature, e = n.path, r = n.fillColor, o = n.borderWidth, u = n.borderColor, f = n.onClick, d = n.onMouseEnter, v = n.onMouseMove, a = n.onMouseLeave;
1409
+ return $.jsx("path", { fill: (t = i == null ? void 0 : i.fill) != null ? t : r, strokeWidth: o, stroke: u, strokeLinejoin: "bevel", d: e(i), onMouseEnter: function(l) {
1410
+ return d(i, l);
1411
+ }, onMouseMove: function(l) {
1412
+ return v(i, l);
1413
+ }, onMouseLeave: function(l) {
1414
+ return a(i, l);
1415
+ }, onClick: function(l) {
1416
+ return f(i, l);
1417
+ } }, i.id);
1418
+ });
1419
+ Ot.propTypes = { feature: S.shape({ id: S.string.isRequired, type: S.oneOf(["Feature"]).isRequired, properties: S.object, geometry: S.object.isRequired }).isRequired, path: S.func.isRequired, fillColor: S.string.isRequired, borderWidth: S.number.isRequired, borderColor: S.string.isRequired, onMouseEnter: S.func.isRequired, onMouseMove: S.func.isRequired, onMouseLeave: S.func.isRequired, onClick: S.func.isRequired }, Ot.displayName = "GeoMapFeature";
1420
+ var de = q.memo(function(n) {
1421
+ var t = n.width, i = n.height, e = n.margin, r = n.features, o = n.layers, u = o === void 0 ? ["graticule", "features"] : o, f = n.projectionType, d = f === void 0 ? "mercator" : f, v = n.projectionScale, a = v === void 0 ? 100 : v, l = n.projectionTranslation, c = l === void 0 ? [0.5, 0.5] : l, h = n.projectionRotation, p = h === void 0 ? [0, 0, 0] : h, R = n.fillColor, m = R === void 0 ? "#dddddd" : R, M = n.borderWidth, y = M === void 0 ? 0 : M, g = n.borderColor, C = g === void 0 ? "#000000" : g, w = n.enableGraticule, j = w !== void 0 && w, P = n.graticuleLineWidth, W = P === void 0 ? 0.5 : P, x = n.graticuleLineColor, O = x === void 0 ? "#999999" : x, E = n.isInteractive, b = E === void 0 || E, A = n.onClick, L = A === void 0 ? function() {
1422
+ } : A, s = n.tooltip, T = n.role, D = T === void 0 ? "img" : T, B = Nt(t, i, e), z = B.margin, on = B.outerWidth, U = B.outerHeight, K = It({ width: t, height: i, projectionType: d, projectionScale: a, projectionTranslation: c, projectionRotation: p, fillColor: m, borderWidth: y, borderColor: C }), J = K.graticule, V = K.path, X = K.getFillColor, dn = K.getBorderWidth, un = K.getBorderColor, vn = ot(), an = Gt(), sn = an.showTooltipFromEvent, Sn = an.hideTooltip, Mn = q.useCallback(function(_, cn) {
1423
+ return b && L && L(_, cn);
1424
+ }, [b, L]), Cn = q.useCallback(function(_, cn) {
1425
+ return b && s && sn($.jsx(s, { feature: _ }), cn);
1426
+ }, [b, sn, s]), Q = q.useCallback(function(_, cn) {
1427
+ return b && s && sn($.jsx(s, { feature: _ }), cn);
1428
+ }, [b, sn, s]), Tn = q.useCallback(function() {
1429
+ return b && Sn();
1430
+ }, [b, Sn]);
1431
+ return $.jsx(Ze, { width: on, height: U, margin: z, theme: vn, role: D, children: u.map(function(_, cn) {
1432
+ return _ === "graticule" ? j !== !0 ? null : $.jsx(Ft, { path: V, graticule: J, lineWidth: W, lineColor: O }, "graticule") : _ === "features" ? $.jsx(q.Fragment, { children: r.map(function(k) {
1433
+ return $.jsx(Ot, { feature: k, path: V, fillColor: X(k), borderWidth: dn(k), borderColor: un(k), onMouseEnter: Cn, onMouseMove: Q, onMouseLeave: Tn, onClick: Mn }, k.id);
1434
+ }) }, "features") : $.jsx(q.Fragment, { children: _(n) }, cn);
1435
+ }) });
1436
+ });
1437
+ de.displayName = "GeoMap", de.propTypes = Oi;
1438
+ var _r = bt(de), ao = function(n) {
1439
+ return $.jsx(At, { children: function(t) {
1440
+ var i = t.width, e = t.height;
1441
+ return $.jsx(_r, rn({ width: i, height: e }, n));
1442
+ } });
1443
+ }, Ye = function(n, t, i, e) {
1444
+ var r = Ke(t, n), o = r[0], u = r[1];
1445
+ return i.find(function(f) {
1446
+ return li(f, e.invert([o, u]));
1447
+ });
1448
+ }, ve = q.memo(function(n) {
1449
+ var t = n.width, i = n.height, e = n.margin, r = n.pixelRatio, o = r === void 0 ? typeof window < "u" && window.devicePixelRatio || 1 : r, u = n.features, f = n.layers, d = n.projectionType, v = d === void 0 ? "mercator" : d, a = n.projectionScale, l = a === void 0 ? 100 : a, c = n.projectionTranslation, h = c === void 0 ? [0.5, 0.5] : c, p = n.projectionRotation, R = p === void 0 ? [0, 0, 0] : p, m = n.fillColor, M = m === void 0 ? "#dddddd" : m, y = n.borderWidth, g = y === void 0 ? 0 : y, C = n.borderColor, w = C === void 0 ? "#000000" : C, j = n.enableGraticule, P = j !== void 0 && j, W = n.graticuleLineWidth, x = W === void 0 ? 0.5 : W, O = n.graticuleLineColor, E = O === void 0 ? "#999999" : O, b = n.isInteractive, A = b === void 0 || b, L = n.onClick, s = L === void 0 ? function() {
1450
+ } : L, T = n.onMouseMove, D = T === void 0 ? function() {
1451
+ } : T, B = n.tooltip, z = q.useRef(null), on = ot(), U = Nt(t, i, e), K = U.margin, J = U.outerWidth, V = U.outerHeight, X = It({ width: t, height: i, projectionType: v, projectionScale: l, projectionTranslation: h, projectionRotation: R, fillColor: M, borderWidth: g, borderColor: w }), dn = X.projection, un = X.graticule, vn = X.path, an = X.getFillColor, sn = X.getBorderWidth, Sn = X.getBorderColor;
1452
+ q.useEffect(function() {
1453
+ if (z) {
1454
+ z.current.width = J * o, z.current.height = V * o;
1455
+ var k = z.current.getContext("2d");
1456
+ k.scale(o, o), k.fillStyle = on.background, k.fillRect(0, 0, J, V), k.translate(K.left, K.top), vn.context(k), f.forEach(function(nn) {
1457
+ nn === "graticule" ? P === !0 && (k.lineWidth = x, k.strokeStyle = E, k.beginPath(), vn(un()), k.stroke()) : nn === "features" ? u.forEach(function(fn) {
1458
+ k.beginPath(), vn(fn), k.fillStyle = an(fn), k.fill();
1459
+ var Pn = sn(fn);
1460
+ Pn > 0 && (k.strokeStyle = Sn(fn), k.lineWidth = Pn, k.stroke());
1461
+ }) : nn(k, n);
1462
+ });
1463
+ }
1464
+ }, [z, J, V, K, o, on, vn, un, an, sn, Sn, u, f]);
1465
+ var Mn = Gt(), Cn = Mn.showTooltipFromEvent, Q = Mn.hideTooltip, Tn = q.useCallback(function(k) {
1466
+ if (A && B) {
1467
+ var nn = Ye(k, z.current, u, dn);
1468
+ nn ? Cn($.jsx(B, { feature: nn }), k) : Q(), D && D(nn || null, k);
1469
+ }
1470
+ }, [Cn, Q, A, B, z, u, dn]), _ = q.useCallback(function() {
1471
+ return A && Q();
1472
+ }, [A, Q]), cn = q.useCallback(function(k) {
1473
+ if (A && s) {
1474
+ var nn = Ye(k, z.current, u, dn);
1475
+ nn && s(nn, k);
1476
+ }
1477
+ }, [A, z, u, dn, s]);
1478
+ return $.jsx("canvas", { ref: z, width: J * o, height: V * o, style: { width: J, height: V, cursor: A ? "auto" : "normal" }, onMouseMove: Tn, onMouseLeave: _, onClick: cn });
1479
+ });
1480
+ ve.displatName = "GeoMapCanvas", ve.propTypes = Ni;
1481
+ var no = bt(ve), lo = function(n) {
1482
+ return $.jsx(At, { children: function(t) {
1483
+ var i = t.width, e = t.height;
1484
+ return $.jsx(no, rn({ width: i, height: e }, n));
1485
+ } });
1486
+ }, ge = q.memo(function(n) {
1487
+ var t = n.width, i = n.height, e = n.margin, r = n.features, o = n.data, u = n.match, f = u === void 0 ? "id" : u, d = n.label, v = d === void 0 ? "id" : d, a = n.value, l = a === void 0 ? "value" : a, c = n.valueFormat, h = n.projectionType, p = h === void 0 ? "mercator" : h, R = n.projectionScale, m = R === void 0 ? 100 : R, M = n.projectionTranslation, y = M === void 0 ? [0.5, 0.5] : M, g = n.projectionRotation, C = g === void 0 ? [0, 0, 0] : g, w = n.colors, j = w === void 0 ? "PuBuGn" : w, P = n.domain, W = n.unknownColor, x = W === void 0 ? "#999" : W, O = n.borderWidth, E = O === void 0 ? 0 : O, b = n.borderColor, A = b === void 0 ? "#000000" : b, L = n.enableGraticule, s = L !== void 0 && L, T = n.graticuleLineWidth, D = T === void 0 ? 0.5 : T, B = n.graticuleLineColor, z = B === void 0 ? "#999999" : B, on = n.layers, U = on === void 0 ? ["graticule", "features", "legends"] : on, K = n.legends, J = K === void 0 ? [] : K, V = n.isInteractive, X = V === void 0 || V, dn = n.onClick, un = dn === void 0 ? function() {
1488
+ } : dn, vn = n.tooltip, an = vn === void 0 ? rt : vn, sn = n.role, Sn = sn === void 0 ? "img" : sn, Mn = n.defs, Cn = Mn === void 0 ? [] : Mn, Q = n.fill, Tn = Q === void 0 ? [] : Q, _ = Nt(t, i, e), cn = _.margin, k = _.outerWidth, nn = _.outerHeight, fn = It({ width: t, height: i, projectionType: p, projectionScale: m, projectionTranslation: y, projectionRotation: C, fillColor: function() {
1489
+ }, borderWidth: E, borderColor: A }), Pn = fn.graticule, Dn = fn.path, Gn = fn.getBorderWidth, ct = fn.getBorderColor, bn = ki({ features: r, data: o, match: f, label: v, value: l, valueFormat: c, colors: j, unknownColor: x, domain: P }), Xn = bn.getFillColor, Yn = bn.boundFeatures, Wn = bn.legendData, $t = ot(), ft = Zi(Cn, Yn, Tn, { dataKey: "data", targetKey: "fill" }), Hn = Gt(), qn = Hn.showTooltipFromEvent, st = Hn.hideTooltip, zt = q.useCallback(function(en, Rn) {
1490
+ return X && un && un(en, Rn);
1491
+ }, [X, un]), Bt = q.useCallback(function(en, Rn) {
1492
+ return X && an && qn($.jsx(an, { feature: en }), Rn);
1493
+ }, [X, qn, an]), Z = q.useCallback(function(en, Rn) {
1494
+ return X && an && qn($.jsx(an, { feature: en }), Rn);
1495
+ }, [X, qn, an]), gn = q.useCallback(function() {
1496
+ return X && st();
1497
+ }, [X, st]);
1498
+ return $.jsx(Ze, { width: k, height: nn, margin: cn, theme: $t, defs: ft, role: Sn, children: U.map(function(en, Rn) {
1499
+ return en === "graticule" ? s !== !0 ? null : $.jsx(Ft, { path: Dn, graticule: Pn, lineWidth: D, lineColor: z }, "graticule") : en === "features" ? $.jsx(q.Fragment, { children: Yn.map(function(kn) {
1500
+ return $.jsx(Ot, { feature: kn, path: Dn, fillColor: Xn(kn), borderWidth: Gn(kn), borderColor: ct(kn), onMouseEnter: Bt, onMouseMove: Z, onMouseLeave: gn, onClick: zt }, kn.id);
1501
+ }) }, "features") : en === "legends" ? J.map(function(kn, Ii) {
1502
+ return $.jsx(Ki, rn({ containerWidth: t, containerHeight: i, data: Wn }, kn), Ii);
1503
+ }) : $.jsx(q.Fragment, { children: en({}) }, Rn);
1504
+ }) });
1505
+ });
1506
+ ge.displayName = "Choropleth", ge.propTypes = Jr;
1507
+ var to = bt(ge), co = function(n) {
1508
+ return $.jsx(At, { children: function(t) {
1509
+ var i = t.width, e = t.height;
1510
+ return $.jsx(to, rn({ width: i, height: e }, n));
1511
+ } });
1512
+ }, He = function(n, t, i, e) {
1513
+ var r = Ke(t, n), o = r[0], u = r[1];
1514
+ return i.find(function(f) {
1515
+ return li(f, e.invert([o, u]));
1516
+ });
1517
+ }, me = q.memo(function(n) {
1518
+ var t = n.width, i = n.height, e = n.margin, r = n.pixelRatio, o = r === void 0 ? typeof window < "u" && window.devicePixelRatio || 1 : r, u = n.features, f = n.data, d = n.match, v = d === void 0 ? "id" : d, a = n.label, l = a === void 0 ? "id" : a, c = n.value, h = c === void 0 ? "value" : c, p = n.valueFormat, R = n.projectionType, m = R === void 0 ? "mercator" : R, M = n.projectionScale, y = M === void 0 ? 100 : M, g = n.projectionTranslation, C = g === void 0 ? [0.5, 0.5] : g, w = n.projectionRotation, j = w === void 0 ? [0, 0, 0] : w, P = n.colors, W = P === void 0 ? "PuBuGn" : P, x = n.domain, O = n.unknownColor, E = O === void 0 ? "#999" : O, b = n.borderWidth, A = b === void 0 ? 0 : b, L = n.borderColor, s = L === void 0 ? "#000000" : L, T = n.enableGraticule, D = T !== void 0 && T, B = n.graticuleLineWidth, z = B === void 0 ? 0.5 : B, on = n.graticuleLineColor, U = on === void 0 ? "#999999" : on, K = n.layers, J = K === void 0 ? ["graticule", "features", "legends"] : K, V = n.legends, X = V === void 0 ? [] : V, dn = n.isInteractive, un = dn === void 0 || dn, vn = n.onClick, an = vn === void 0 ? function() {
1519
+ } : vn, sn = n.onMouseMove, Sn = sn === void 0 ? function() {
1520
+ } : sn, Mn = n.tooltip, Cn = Mn === void 0 ? rt : Mn, Q = q.useRef(null), Tn = ot(), _ = Nt(t, i, e), cn = _.margin, k = _.outerWidth, nn = _.outerHeight, fn = It({ width: t, height: i, projectionType: m, projectionScale: y, projectionTranslation: C, projectionRotation: j, fillColor: function() {
1521
+ }, borderWidth: A, borderColor: s }), Pn = fn.projection, Dn = fn.graticule, Gn = fn.path, ct = fn.getBorderWidth, bn = fn.getBorderColor, Xn = ki({ features: u, data: f, match: v, label: l, value: h, valueFormat: p, colors: W, unknownColor: E, domain: x }), Yn = Xn.getFillColor, Wn = Xn.boundFeatures, $t = Xn.legendData;
1522
+ q.useEffect(function() {
1523
+ if (Q) {
1524
+ Q.current.width = k * o, Q.current.height = nn * o;
1525
+ var Z = Q.current.getContext("2d");
1526
+ Z.scale(o, o), Z.fillStyle = Tn.background, Z.fillRect(0, 0, k, nn), Z.translate(cn.left, cn.top), Gn.context(Z), J.forEach(function(gn) {
1527
+ gn === "graticule" ? D === !0 && (Z.lineWidth = z, Z.strokeStyle = U, Z.beginPath(), Gn(Dn()), Z.stroke()) : gn === "features" ? Wn.forEach(function(en) {
1528
+ Z.beginPath(), Gn(en), Z.fillStyle = Yn(en), Z.fill();
1529
+ var Rn = ct(en);
1530
+ Rn > 0 && (Z.strokeStyle = bn(en), Z.lineWidth = Rn, Z.stroke());
1531
+ }) : gn === "legends" && X.forEach(function(en) {
1532
+ Ji(Z, rn({}, en, { data: $t, containerWidth: t, containerHeight: i, theme: Tn }));
1533
+ });
1534
+ });
1535
+ }
1536
+ }, [Q, k, nn, cn, o, Tn, Gn, Dn, Yn, ct, bn, Wn, X, J]);
1537
+ var ft = Gt(), Hn = ft.showTooltipFromEvent, qn = ft.hideTooltip, st = q.useCallback(function(Z) {
1538
+ if (un && Cn) {
1539
+ var gn = He(Z, Q.current, Wn, Pn);
1540
+ gn ? Hn($.jsx(Cn, { feature: gn }), Z) : qn(), Sn && Sn(gn || null, Z);
1541
+ }
1542
+ }, [Hn, qn, un, Cn, Q, Wn, Pn]), zt = q.useCallback(function() {
1543
+ return un && qn();
1544
+ }, [un, qn]), Bt = q.useCallback(function(Z) {
1545
+ if (un && an) {
1546
+ var gn = He(Z, Q.current, Wn, Pn);
1547
+ gn && an(gn, Z);
1548
+ }
1549
+ }, [un, Q, Wn, Pn, an]);
1550
+ return $.jsx("canvas", { ref: Q, width: k * o, height: nn * o, style: { width: k, height: nn, cursor: un ? "auto" : "normal" }, onMouseMove: st, onMouseLeave: zt, onClick: Bt });
1551
+ });
1552
+ me.displayName = "ChoroplethCanvas", me.propTypes = Qr;
1553
+ var eo = bt(me), fo = function(n) {
1554
+ return $.jsx(At, { children: function(t) {
1555
+ var i = t.width, e = t.height;
1556
+ return $.jsx(eo, rn({ width: i, height: e }, n));
1557
+ } });
1558
+ };
1559
+ export {
1560
+ to as Choropleth,
1561
+ eo as ChoroplethCanvas,
1562
+ uo as ChoroplethCanvasDefaultProps,
1563
+ Qr as ChoroplethCanvasPropTypes,
1564
+ oo as ChoroplethDefaultProps,
1565
+ Jr as ChoroplethPropTypes,
1566
+ _r as GeoMap,
1567
+ no as GeoMapCanvas,
1568
+ Vr as GeoMapCanvasDefaultProps,
1569
+ Ni as GeoMapCanvasPropTypes,
1570
+ Ur as GeoMapDefaultProps,
1571
+ Oi as GeoMapPropTypes,
1572
+ co as ResponsiveChoropleth,
1573
+ fo as ResponsiveChoroplethCanvas,
1574
+ ao as ResponsiveGeoMap,
1575
+ lo as ResponsiveGeoMapCanvas,
1576
+ Wi as projectionById,
1577
+ ki as useChoropleth,
1578
+ It as useGeoMap
1579
+ };