@macrostrat/map-interface 1.5.0 → 1.5.2

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 (85) hide show
  1. package/CHANGELOG.md +9 -1
  2. package/dist/cjs/index.js +1 -1
  3. package/dist/cjs/map-interface.07a195a5.js +14 -0
  4. package/dist/cjs/map-interface.07a195a5.js.map +1 -0
  5. package/dist/cjs/map-interface.1bfa8ff4.css +22 -0
  6. package/dist/cjs/map-interface.1bfa8ff4.css.map +1 -0
  7. package/dist/cjs/{map-interface.5737346f.js → map-interface.533a7323.js} +2 -2
  8. package/dist/cjs/{map-interface.5737346f.js.map → map-interface.533a7323.js.map} +1 -1
  9. package/dist/cjs/{map-interface.29e156db.js → map-interface.5c8f9bde.js} +2 -2
  10. package/dist/{esm/map-interface.035e87bf.js.map → cjs/map-interface.5c8f9bde.js.map} +1 -1
  11. package/dist/cjs/{map-interface.3eb3ffd1.js → map-interface.5f0bd31b.js} +34 -15
  12. package/dist/cjs/map-interface.5f0bd31b.js.map +1 -0
  13. package/dist/cjs/{map-interface.3f968b46.js → map-interface.727092bc.js} +2 -2
  14. package/dist/cjs/{map-interface.3f968b46.js.map → map-interface.727092bc.js.map} +1 -1
  15. package/dist/cjs/{map-interface.134ad930.js → map-interface.744b121c.js} +8 -1
  16. package/dist/cjs/map-interface.744b121c.js.map +1 -0
  17. package/dist/cjs/{map-interface.cc9ad5c6.js → map-interface.84080d80.js} +3 -2
  18. package/dist/cjs/map-interface.84080d80.js.map +1 -0
  19. package/dist/cjs/{map-interface.2a32a290.js → map-interface.b6e70f1b.js} +2 -2
  20. package/dist/cjs/{map-interface.2a32a290.js.map → map-interface.b6e70f1b.js.map} +1 -1
  21. package/dist/cjs/map-interface.fba5cf13.js +136 -0
  22. package/dist/cjs/map-interface.fba5cf13.js.map +1 -0
  23. package/dist/cjs/map-interface.fd9ad74c.js +34 -0
  24. package/dist/cjs/map-interface.fd9ad74c.js.map +1 -0
  25. package/dist/esm/index.d.ts +1 -0
  26. package/dist/esm/index.d.ts.map +1 -1
  27. package/dist/esm/index.js +2 -2
  28. package/dist/esm/map-interface.15ee4b90.js +16 -0
  29. package/dist/esm/map-interface.15ee4b90.js.map +1 -0
  30. package/dist/esm/{map-interface.f5dccd21.js → map-interface.20193fc6.js} +2 -2
  31. package/dist/esm/{map-interface.f5dccd21.js.map → map-interface.20193fc6.js.map} +1 -1
  32. package/dist/esm/{map-interface.2b94a8ad.js → map-interface.2daa72f9.js} +2 -1
  33. package/dist/esm/map-interface.2daa72f9.js.map +1 -0
  34. package/dist/esm/map-interface.6981dd47.js +131 -0
  35. package/dist/esm/map-interface.6981dd47.js.map +1 -0
  36. package/dist/esm/map-interface.69a566f3.js +25 -0
  37. package/dist/esm/map-interface.69a566f3.js.map +1 -0
  38. package/dist/esm/{map-interface.ba171178.js → map-interface.6c0f5044.js} +2 -2
  39. package/dist/esm/{map-interface.ba171178.js.map → map-interface.6c0f5044.js.map} +1 -1
  40. package/dist/esm/{map-interface.6d7e89e5.js → map-interface.9123f5c8.js} +2 -2
  41. package/dist/esm/{map-interface.6d7e89e5.js.map → map-interface.9123f5c8.js.map} +1 -1
  42. package/dist/esm/{map-interface.c257cac1.js → map-interface.b7a0dc07.js} +2 -2
  43. package/dist/esm/{map-interface.c257cac1.js.map → map-interface.b7a0dc07.js.map} +1 -1
  44. package/dist/esm/map-interface.ba2faf2f.js +7 -0
  45. package/dist/{cjs/map-interface.29e156db.js.map → esm/map-interface.ba2faf2f.js.map} +1 -1
  46. package/dist/esm/{map-interface.78cdcaeb.js → map-interface.e5607033.js} +35 -10
  47. package/dist/esm/map-interface.e5607033.js.map +1 -0
  48. package/dist/node/index.js +1 -1
  49. package/dist/node/index.js.map +1 -1
  50. package/dist/node/map-interface.2dde967a.js +2 -0
  51. package/dist/node/map-interface.2dde967a.js.map +1 -0
  52. package/dist/node/map-interface.4dfbbb99.css +2 -0
  53. package/dist/node/map-interface.4dfbbb99.css.map +1 -0
  54. package/dist/node/{map-interface.42e8f2ba.js → map-interface.5fbb81b1.js} +2 -2
  55. package/dist/node/{map-interface.42e8f2ba.js.map → map-interface.5fbb81b1.js.map} +1 -1
  56. package/dist/node/{map-interface.dd613f56.js → map-interface.995ff472.js} +2 -2
  57. package/dist/node/{map-interface.dd613f56.js.map → map-interface.995ff472.js.map} +1 -1
  58. package/dist/node/map-interface.bbeeb59c.js +2 -0
  59. package/dist/node/map-interface.bbeeb59c.js.map +1 -0
  60. package/dist/node/map-interface.c8139e21.js +2 -0
  61. package/dist/node/map-interface.c8139e21.js.map +1 -0
  62. package/dist/node/{map-interface.792ebe85.js → map-interface.d4cd446a.js} +2 -2
  63. package/dist/node/{map-interface.792ebe85.js.map → map-interface.d4cd446a.js.map} +1 -1
  64. package/dist/node/{map-interface.8764423a.js → map-interface.ee63d11f.js} +2 -2
  65. package/dist/node/{map-interface.8764423a.js.map → map-interface.ee63d11f.js.map} +1 -1
  66. package/dist/node/map-interface.fbe01b07.js +2 -0
  67. package/dist/node/map-interface.fbe01b07.js.map +1 -0
  68. package/dist/node/{map-interface.efc5dd17.js → map-interface.fcb95c23.js} +2 -2
  69. package/dist/node/{map-interface.efc5dd17.js.map → map-interface.fcb95c23.js.map} +1 -1
  70. package/dist/node/map-interface.fecb181b.js +2 -0
  71. package/dist/node/map-interface.fecb181b.js.map +1 -0
  72. package/package.json +3 -3
  73. package/src/map-panel/components/info-drawer/fossil-collections/collections.tsx +1 -0
  74. package/src/map-panel/components/info-drawer/index.ts +41 -6
  75. package/src/map-panel/utils/fossils.ts +2 -0
  76. package/dist/cjs/map-interface.134ad930.js.map +0 -1
  77. package/dist/cjs/map-interface.3eb3ffd1.js.map +0 -1
  78. package/dist/cjs/map-interface.cc9ad5c6.js.map +0 -1
  79. package/dist/esm/map-interface.035e87bf.js +0 -6
  80. package/dist/esm/map-interface.2b94a8ad.js.map +0 -1
  81. package/dist/esm/map-interface.78cdcaeb.js.map +0 -1
  82. package/dist/node/map-interface.43014209.js +0 -2
  83. package/dist/node/map-interface.43014209.js.map +0 -1
  84. package/dist/node/map-interface.5f10b499.js +0 -2
  85. package/dist/node/map-interface.5f10b499.js.map +0 -1
@@ -0,0 +1,25 @@
1
+ import $c2cb56accc4a6ad0$export$2e2bcd8739ae039 from "./map-interface.6981dd47.js";
2
+ import $9hsgj$macrostrathyper from "@macrostrat/hyper";
3
+ import {ExpansionPanel as $9hsgj$ExpansionPanel} from "@macrostrat/map-interface";
4
+
5
+
6
+
7
+
8
+ function $1b961fdc6faa8857$export$12fa808128cf62aa(props) {
9
+ const { data: data, expanded: expanded } = props;
10
+ if (!data || data.length <= 0) return null;
11
+ return (0, $9hsgj$macrostrathyper)((0, $9hsgj$ExpansionPanel), {
12
+ className: "regional-panel",
13
+ title: "Fossil collections",
14
+ helpText: "via PBDB",
15
+ expanded: expanded
16
+ }, [
17
+ (0, $9hsgj$macrostrathyper)((0, $c2cb56accc4a6ad0$export$2e2bcd8739ae039), {
18
+ data: data
19
+ })
20
+ ]);
21
+ }
22
+
23
+
24
+ export {$1b961fdc6faa8857$export$12fa808128cf62aa as FossilCollections};
25
+ //# sourceMappingURL=map-interface.69a566f3.js.map
@@ -0,0 +1 @@
1
+ {"mappings":";;;;;;;AAIO,SAAS,0CAAkB,KAAK;IACrC,MAAM,QAAE,IAAI,YAAE,QAAQ,EAAE,GAAG;IAE3B,IAAI,CAAC,QAAQ,KAAK,MAAM,IAAI,GAC1B,OAAO;IAET,OAAO,CAAA,GAAA,sBAAA,EACL,CAAA,GAAA,qBAAa,GACb;QACE,WAAW;QACX,OAAO;QACP,UAAU;kBACV;IACF,GACA;QAAC,CAAA,GAAA,sBAAA,EAAE,CAAA,GAAA,wCAAc,GAAG;kBAAE;QAAK;KAAG;AAElC","sources":["packages/map-interface/src/map-panel/components/info-drawer/fossil-collections/index.ts"],"sourcesContent":["import h from \"@macrostrat/hyper\";\nimport { ExpansionPanel } from \"@macrostrat/map-interface\";\nimport PBDBCollections from \"./collections\";\n\nexport function FossilCollections(props) {\n const { data, expanded } = props;\n\n if (!data || data.length <= 0) {\n return null;\n }\n return h(\n ExpansionPanel,\n {\n className: \"regional-panel\",\n title: \"Fossil collections\",\n helpText: \"via PBDB\",\n expanded,\n },\n [h(PBDBCollections, { data })],\n );\n}\n"],"names":[],"version":3,"file":"map-interface.69a566f3.js.map"}
@@ -1,4 +1,4 @@
1
- import {AgeChip as $45639908ba2d0aba$export$f5b61c7108f98cd5, AttrChip as $45639908ba2d0aba$export$bde077e6dcba34d5} from "./map-interface.f5dccd21.js";
1
+ import {AgeChip as $45639908ba2d0aba$export$f5b61c7108f98cd5, AttrChip as $45639908ba2d0aba$export$bde077e6dcba34d5} from "./map-interface.20193fc6.js";
2
2
  import "../cjs/map-interface.1be58b40.css";
3
3
  import $1xmF0$mapinterfaceb965dc94js from "./map-interface.b965dc94.js";
4
4
  import $1xmF0$macrostrathyper from "@macrostrat/hyper";
@@ -373,4 +373,4 @@ function $f739fa86e651c3b6$var$Economy(props) {
373
373
 
374
374
 
375
375
  export {$f739fa86e651c3b6$export$fa9d8c2f420ac2bd as MacrostratLinkedData};
376
- //# sourceMappingURL=map-interface.ba171178.js.map
376
+ //# sourceMappingURL=map-interface.6c0f5044.js.map
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;AAaA,MAAM,0BAAI,CAAA,GAAA,sBAAI,EAAE,MAAM,CAAC,CAAA,GAAA,wEAAK;AAE5B,SAAS,0CAAqB,KAAK;IACjC,MAAM,WAAE,OAAO,wBAAE,oBAAoB,UAAE,MAAM,EAAE,GAAG;IAElD,IAAI,CAAC,QAAQ,OAAO,CAAC,EAAE,EAAE,OAAO,wBAAE;IAElC,OAAO,wBACL,CAAA,GAAA,qBAAa,GACb;QACE,WAAW;QACX,OAAO;QACP,UAAU;QACV,UAAU;IACZ,GACA;QACE,wBAAE,OAAO;YAAE,SAAS;QAA4B,GAAG;YACjD,wBAAE,kCAAY;wBAAE;YAAO;YACvB,wBAA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GAAG;gBACjB,KAAK;gBACL,MAAM,KAAK,IAAI;gBACf,OAAO,KAAK,KAAK;YACnB;QACF;KACD;AAEL","sources":["packages/map-interface/src/map-panel/components/info-drawer/macrostrat-linked.ts"],"sourcesContent":["import hyper from \"@macrostrat/hyper\";\nimport { AgeChip, AttrChip } from \"../info-blocks\";\nimport {\n ExpansionPanel,\n ExpandableDetailsPanel,\n ExpansionBody,\n} from \"@macrostrat/map-interface\";\nimport styles from \"./main.module.styl\";\nimport { scaleLinear } from \"@visx/scale\";\nimport { AxisBottom } from \"@visx/axis\";\nimport chroma from \"chroma-js\";\nimport { LithologyList } from \"@macrostrat/data-components\";\n\nconst h = hyper.styled(styles);\n\nfunction MacrostratLinkedData(props) {\n const { mapInfo, bedrockMatchExpanded, source } = props;\n\n if (!mapInfo.mapData[0]) return h(\"div\");\n\n return h(\n ExpansionPanel,\n {\n className: \"regional-panel\",\n title: \"Macrostrat-linked data\",\n helpText: \"via Macrostrat\",\n expanded: bedrockMatchExpanded,\n },\n [\n h(\"div\", { classes: expansionPanelDetailClasses }, [\n h(MatchBasis, { source }),\n h(AgeInformation, { mapInfo, source }),\n h(Thickness, { source }),\n h(MinorFossilCollections, { source }),\n h(FossilOccs, { source }),\n h(LithsAndClasses, { source }),\n h(Environments, { source }),\n h(Economy, { source }),\n ]),\n ],\n );\n}\n\nconst expansionPanelDetailClasses = {\n root: \"expansion-panel-detail\",\n};\n\nfunction AgeInformation(props) {\n const { source, mapInfo } = props;\n const { macrostrat } = source;\n\n if (!macrostrat?.b_age) return h(MapAgeRenderer, { mapInfo });\n\n return h(MacrostratAgeInfo, { macrostrat, mapInfo });\n}\n\nfunction MapAgeRenderer(props) {\n const { mapInfo, ...rest } = props;\n return h(\n DescribedAgeInfo,\n {\n ageElement: h(AgeChip, {\n b_int: mapInfo.mapData[0].b_int,\n t_int: mapInfo.mapData[0].t_int,\n }),\n },\n \"Based on geologic map description.\",\n );\n}\n\nfunction DescribedAgeInfo(props) {\n const { ageElement, children, className } = props;\n\n return h(\"div.described-age.macrostrast-detail\", [\n h(\"div.expansion-summary-title\", \"Age\"),\n h(\"div.age-chips\", null, ageElement),\n h(\"div.description\", children),\n ]);\n}\n\nfunction AgeRefinementBar({ scale, data, color, label = null }) {\n const { b_int, t_int } = data;\n const b_age = data.b_age ?? b_int.b_age;\n const t_age = data.t_age ?? t_int.t_age;\n const backgroundColor = color ?? b_int.color;\n const accentColor = chroma(backgroundColor).darken(0.5).hex();\n const labelColor = chroma(backgroundColor).darken(2).hex();\n\n const left = scale(b_age);\n const width = scale(t_age) - scale(b_age);\n\n let labelTranslate = 5;\n let textAlign = \"start\";\n\n // Adjust label placement\n\n if (width < 100) {\n if (left < 100) {\n labelTranslate = width + 5;\n } else {\n labelTranslate = -305;\n textAlign = \"end\";\n }\n }\n\n return h(\n \"div.age-refinement-bar\",\n {\n style: {\n marginLeft: `${left}px`,\n width: `${width}px`,\n height: \"18px\",\n backgroundColor,\n border: `2px solid ${accentColor}`,\n position: \"relative\",\n },\n },\n h(\n \"div.age-refinement-bar-label\",\n {\n style: {\n transform: `translateX(${labelTranslate}px)`,\n color: labelColor,\n fontSize: \"10px\",\n width: 300,\n textAlign,\n },\n },\n label,\n ),\n );\n}\n\nfunction AgeRefinementPlot({ macrostrat, mapInfo }) {\n // Plot the amount by which the age was refined\n\n const mapData = mapInfo.mapData[0];\n const b_age = Math.max(mapData.b_int.b_age, macrostrat.b_age);\n const t_age = Math.min(mapData.t_int.t_age, macrostrat.t_age);\n\n const scale = scaleLinear({\n domain: [1.02 * b_age, t_age * 0.98],\n range: [20, 360],\n });\n\n // use visx to plot the age refinement\n return h(\"div.age-refinement-plot\", [\n h(AgeRefinementBar, {\n scale,\n data: macrostrat,\n label: \"Macrostrat age model\",\n }),\n h(AgeRefinementBar, {\n scale,\n data: mapData,\n label: \"Map legend\",\n }),\n // Age axis\n h(\"svg\", { width: \"100%\", height: \"40px\" }, [\n h(AxisBottom, {\n scale,\n numTicks: 5,\n top: 1,\n left: 0,\n label: \"Age (Ma)\",\n }),\n ]),\n ]);\n}\n\nfunction MacrostratAgeInfoCore({ macrostrat }) {\n const { b_age, t_age, b_int, t_int } = macrostrat;\n\n if (!b_age) return null;\n\n let age = b_int.int_name;\n if (b_int.int_id !== t_int.int_id) {\n age += ` - ${t_int.int_name}`;\n }\n return h(\n DescribedAgeInfo,\n {\n ageElement: h(AgeChip, {\n b_int: { ...b_int, int_name: age, b_age, t_age },\n t_int: { ...b_int, int_name: age, b_age, t_age },\n }),\n },\n \"Refined using the Macrostrat age model.\",\n );\n}\n\nfunction MacrostratAgeInfo(props) {\n return h(\n ExpandableDetailsPanel,\n { headerElement: h(MacrostratAgeInfoCore, props) },\n h(ExpansionBody, { title: \"Age refinement\" }, h(AgeRefinementPlot, props)),\n );\n}\n\nfunction MatchBasis(props) {\n const { source } = props;\n if (!source.macrostrat?.strat_names) return null;\n\n return h(\n ExpandableDetailsPanel,\n {\n className: \"macrostrat-unit\",\n headerElement: h([\n h(\"h3\", source.macrostrat.strat_names[0].rank_name),\n h(\"div.description\", \"Matched stratigraphic unit\"),\n ]),\n },\n h(ExpansionBody, { title: \"All matched names\" }, [\n source.macrostrat.strat_names.map((name, i) => {\n let lastElement: boolean =\n i == source.macrostrat.strat_names.length - 1;\n return h(\"span\", { key: i }, [\n h(\n \"a.externalLink\",\n {\n href: \"/lex/strat-names/\" + name.strat_name_id,\n key: i,\n },\n [name.rank_name],\n ),\n h.if(!lastElement)([\", \"]),\n ]);\n }),\n ]),\n );\n}\n\nfunction Thickness(props) {\n const { source } = props;\n if (!source.macrostrat.max_thick) return h(\"div\");\n\n return h.if(source.macrostrat && source.macrostrat.max_thick)(\n \"div.macrostrat-detail\",\n [\n h(\"div.expansion-summary-title\", \"Thickness\"),\n h(\"div\", [\n source.macrostrat.min_min_thick,\n \" - \",\n source.macrostrat.max_thick,\n \"m\",\n ]),\n ],\n );\n}\n\nfunction MinorFossilCollections(props) {\n const { source } = props;\n const { macrostrat } = source;\n if (!macrostrat.pbdb_collections) return h(\"div\");\n\n return h.if(macrostrat && macrostrat.pbdb_collections)(\n \"div.macrostrat-detail\",\n [\n h(\"div.expansion-summary-title\", \"Fossil collections\"),\n h(\"div\", [macrostrat.pbdb_collections]),\n ],\n );\n}\n\nfunction FossilOccs(props) {\n const { source } = props;\n const { macrostrat } = source;\n\n if (!macrostrat?.pbdb_occs) return null;\n\n return h(\"div.macrostrat-detail\", [\n h(\"div.expansion-summary-title\", \"Fossil occurrences\"),\n h(\"div\", [macrostrat.pbdb_occs]),\n ]);\n}\n\nfunction LithTypes(props) {\n const { lith_types } = props;\n\n return h.if(lith_types && lith_types.length > 0)(\n \"div.lithologies.lithology-types\",\n [\n h(LithologyList, {\n lithologies: lith_types,\n }),\n ],\n );\n}\n\nfunction LithsAndClasses(props) {\n const { source } = props;\n const { macrostrat } = source;\n const { liths = null, lith_types = null } = macrostrat;\n\n if (!liths || liths.length == 0) return null;\n\n const lithologies = liths.map((lith) => {\n return {\n ...lith,\n name: lith.lith,\n color: lith.color || \"#000000\",\n };\n });\n\n return h(\n ExpandableDetailsPanel,\n {\n title: \"Lithology\",\n value: h(LithTypes, { lith_types }),\n },\n h(ExpansionBody, { title: \"Matched lithologies\" }, [\n h(LithologyList, {\n lithologies,\n onClickItem: (e, lith) => {\n window.open(\"/lex/lithology/\" + lith.lith_id, \"_self\");\n },\n }),\n ]),\n );\n}\n\nfunction EnvironTypes(props) {\n const { environ_types } = props;\n return h.if(environ_types && environ_types.length > 0)(LithologyList, {\n lithologies: environ_types?.filter((e) => e.name != \"\"),\n });\n}\n\nfunction Environments(props) {\n const { source } = props;\n const { macrostrat } = source;\n const { environs = null, environ_types = null } = macrostrat;\n\n if (!environs || environs.length == 0) return null;\n\n const lithologies = environs.map((environ) => {\n return {\n ...environ,\n name: environ.environ,\n color: environ.color || \"#000000\",\n };\n });\n\n return h(\n ExpandableDetailsPanel,\n {\n title: \"Environment\",\n value: h(EnvironTypes, { environ_types }),\n },\n h(ExpansionBody, { title: \"Matched environments\" }, [\n h(LithologyList, {\n lithologies,\n onClickItem: (e, environ) => {\n window.open(\"/lex/environments/\" + environ.environ_id, \"_self\");\n },\n }),\n ]),\n );\n}\n\nfunction EconType(props) {\n const { econ_types } = props;\n\n return h.if(econ_types && econ_types.length > 0)(\"div\", [\n econ_types.map((econClass, i) => {\n return h(AttrChip, {\n key: i,\n name: econClass.name,\n color: econClass.color,\n });\n }),\n ]);\n}\n\nfunction Economy(props) {\n const { source } = props;\n const { macrostrat } = source;\n const { econs = null, econ_types = null } = macrostrat;\n if (!econs) return h(\"div\");\n\n return h.if(econs && econs.length > 0)(\n ExpandableDetailsPanel,\n {\n title: \"Economy \",\n value: h(EconType, { econ_types }),\n },\n h(ExpansionBody, { title: \"Matched economic attributes\" }, [\n econs.map((econ, i) => {\n return h(AttrChip, {\n key: i,\n name: econ.econ,\n color: econ.color,\n });\n }),\n ]),\n );\n}\n\nexport { MacrostratLinkedData };\n"],"names":[],"version":3,"file":"map-interface.ba171178.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;AAaA,MAAM,0BAAI,CAAA,GAAA,sBAAI,EAAE,MAAM,CAAC,CAAA,GAAA,wEAAK;AAE5B,SAAS,0CAAqB,KAAK;IACjC,MAAM,WAAE,OAAO,wBAAE,oBAAoB,UAAE,MAAM,EAAE,GAAG;IAElD,IAAI,CAAC,QAAQ,OAAO,CAAC,EAAE,EAAE,OAAO,wBAAE;IAElC,OAAO,wBACL,CAAA,GAAA,qBAAa,GACb;QACE,WAAW;QACX,OAAO;QACP,UAAU;QACV,UAAU;IACZ,GACA;QACE,wBAAE,OAAO;YAAE,SAAS;QAA4B,GAAG;YACjD,wBAAE,kCAAY;wBAAE;YAAO;YACvB,wBAAE,sCAAgB;yBAAE;wBAAS;YAAO;YACpC,wBAAE,iCAAW;wBAAE;YAAO;YACtB,wBAAE,8CAAwB;wBAAE;YAAO;YACnC,wBAAE,kCAAY;wBAAE;YAAO;YACvB,wBAAE,u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K,IAAI;QAC1B;IACF;IAEA,OAAO,wBACL,CAAA,GAAA,6BAAqB,GACrB;QACE,OAAO;QACP,OAAO,wBAAE,oCAAc;2BAAE;QAAc;IACzC,GACA,wBAAE,CAAA,GAAA,oBAAY,GAAG;QAAE,OAAO;IAAuB,GAAG;QAClD,wBAAE,CAAA,GAAA,oBAAY,GAAG;yBACf;YACA,aAAa,CAAC,GAAG;gBACf,OAAO,IAAI,CAAC,uBAAuB,QAAQ,UAAU,EAAE;YACzD;QACF;KACD;AAEL;AAEA,SAAS,+BAAS,KAAK;IACrB,MAAM,cAAE,UAAU,EAAE,GAAG;IAEvB,OAAO,wBAAE,EAAE,CAAC,cAAc,WAAW,MAAM,GAAG,GAAG,OAAO;QACtD,WAAW,GAAG,CAAC,CAAC,WAAW;YACzB,OAAO,wBAAE,CAAA,GAAA,yCAAO,GAAG;gBACjB,KAAK;gBACL,MAAM,UAAU,IAAI;gBACpB,OAAO,UAAU,KAAK;YACxB;QACF;KACD;AACH;AAEA,SAAS,8BAAQ,KAAK;IACpB,MAAM,UAAE,MAAM,EAAE,GAAG;IACnB,MAAM,cAAE,UAAU,EAAE,GAAG;IACvB,MAAM,SAAE,QAAQ,kBAAM,aAAa,MAAM,GAAG;IAC5C,IAAI,CAAC,OAAO,OAAO,wBAAE;IAErB,OAAO,wBAAE,EAAE,CAAC,SAAS,MAAM,MAAM,GAAG,GAClC,CAAA,GAAA,6BAAqB,GACrB;QACE,OAAO;QACP,OAAO,wBAAE,gCAAU;wBAAE;QAAW;IAClC,GACA,wBAAE,CAAA,GAAA,oBAAY,GAAG;QAAE,OAAO;IAA8B,GAAG;QACzD,MAAM,GAAG,CAAC,CAAC,MAAM;YACf,OAAO,wBAAE,CAAA,GAAA,yCAAO,GAAG;gBACjB,KAAK;gBACL,MAAM,KAAK,IAAI;gBACf,OAAO,KAAK,KAAK;YACnB;QACF;KACD;AAEL","sources":["packages/map-interface/src/map-panel/components/info-drawer/macrostrat-linked.ts"],"sourcesContent":["import hyper from \"@macrostrat/hyper\";\nimport { AgeChip, AttrChip } from \"../info-blocks\";\nimport {\n ExpansionPanel,\n ExpandableDetailsPanel,\n ExpansionBody,\n} from \"@macrostrat/map-interface\";\nimport styles from \"./main.module.styl\";\nimport { scaleLinear } from \"@visx/scale\";\nimport { AxisBottom } from \"@visx/axis\";\nimport chroma from \"chroma-js\";\nimport { LithologyList } from \"@macrostrat/data-components\";\n\nconst h = hyper.styled(styles);\n\nfunction MacrostratLinkedData(props) {\n const { mapInfo, bedrockMatchExpanded, source } = props;\n\n if (!mapInfo.mapData[0]) return h(\"div\");\n\n return h(\n ExpansionPanel,\n {\n className: \"regional-panel\",\n title: \"Macrostrat-linked data\",\n helpText: \"via Macrostrat\",\n expanded: bedrockMatchExpanded,\n },\n [\n h(\"div\", { classes: expansionPanelDetailClasses }, [\n h(MatchBasis, { source }),\n h(AgeInformation, { mapInfo, source }),\n h(Thickness, { source }),\n h(MinorFossilCollections, { source }),\n h(FossilOccs, { source }),\n h(LithsAndClasses, { source }),\n h(Environments, { source }),\n h(Economy, { source }),\n ]),\n ],\n );\n}\n\nconst expansionPanelDetailClasses = {\n root: \"expansion-panel-detail\",\n};\n\nfunction AgeInformation(props) {\n const { source, mapInfo } = props;\n const { macrostrat } = source;\n\n if (!macrostrat?.b_age) return h(MapAgeRenderer, { mapInfo });\n\n return h(MacrostratAgeInfo, { macrostrat, mapInfo });\n}\n\nfunction MapAgeRenderer(props) {\n const { mapInfo, ...rest } = props;\n return h(\n DescribedAgeInfo,\n {\n ageElement: h(AgeChip, {\n b_int: mapInfo.mapData[0].b_int,\n t_int: mapInfo.mapData[0].t_int,\n }),\n },\n \"Based on geologic map description.\",\n );\n}\n\nfunction DescribedAgeInfo(props) {\n const { ageElement, children, className } = props;\n\n return h(\"div.described-age.macrostrast-detail\", [\n h(\"div.expansion-summary-title\", \"Age\"),\n h(\"div.age-chips\", null, ageElement),\n h(\"div.description\", children),\n ]);\n}\n\nfunction AgeRefinementBar({ scale, data, color, label = null }) {\n const { b_int, t_int } = data;\n const b_age = data.b_age ?? b_int.b_age;\n const t_age = data.t_age ?? t_int.t_age;\n const backgroundColor = color ?? b_int.color;\n const accentColor = chroma(backgroundColor).darken(0.5).hex();\n const labelColor = chroma(backgroundColor).darken(2).hex();\n\n const left = scale(b_age);\n const width = scale(t_age) - scale(b_age);\n\n let labelTranslate = 5;\n let textAlign = \"start\";\n\n // Adjust label placement\n\n if (width < 100) {\n if (left < 100) {\n labelTranslate = width + 5;\n } else {\n labelTranslate = -305;\n textAlign = \"end\";\n }\n }\n\n return h(\n \"div.age-refinement-bar\",\n {\n style: {\n marginLeft: `${left}px`,\n width: `${width}px`,\n height: \"18px\",\n backgroundColor,\n border: `2px solid ${accentColor}`,\n position: \"relative\",\n },\n },\n h(\n \"div.age-refinement-bar-label\",\n {\n style: {\n transform: `translateX(${labelTranslate}px)`,\n color: labelColor,\n fontSize: \"10px\",\n width: 300,\n textAlign,\n },\n },\n label,\n ),\n );\n}\n\nfunction AgeRefinementPlot({ macrostrat, mapInfo }) {\n // Plot the amount by which the age was refined\n\n const mapData = mapInfo.mapData[0];\n const b_age = Math.max(mapData.b_int.b_age, macrostrat.b_age);\n const t_age = Math.min(mapData.t_int.t_age, macrostrat.t_age);\n\n const scale = scaleLinear({\n domain: [1.02 * b_age, t_age * 0.98],\n range: [20, 360],\n });\n\n // use visx to plot the age refinement\n return h(\"div.age-refinement-plot\", [\n h(AgeRefinementBar, {\n scale,\n data: macrostrat,\n label: \"Macrostrat age model\",\n }),\n h(AgeRefinementBar, {\n scale,\n data: mapData,\n label: \"Map legend\",\n }),\n // Age axis\n h(\"svg\", { width: \"100%\", height: \"40px\" }, [\n h(AxisBottom, {\n scale,\n numTicks: 5,\n top: 1,\n left: 0,\n label: \"Age (Ma)\",\n }),\n ]),\n ]);\n}\n\nfunction MacrostratAgeInfoCore({ macrostrat }) {\n const { b_age, t_age, b_int, t_int } = macrostrat;\n\n if (!b_age) return null;\n\n let age = b_int.int_name;\n if (b_int.int_id !== t_int.int_id) {\n age += ` - ${t_int.int_name}`;\n }\n return h(\n DescribedAgeInfo,\n {\n ageElement: h(AgeChip, {\n b_int: { ...b_int, int_name: age, b_age, t_age },\n t_int: { ...b_int, int_name: age, b_age, t_age },\n }),\n },\n \"Refined using the Macrostrat age model.\",\n );\n}\n\nfunction MacrostratAgeInfo(props) {\n return h(\n ExpandableDetailsPanel,\n { headerElement: h(MacrostratAgeInfoCore, props) },\n h(ExpansionBody, { title: \"Age refinement\" }, h(AgeRefinementPlot, props)),\n );\n}\n\nfunction MatchBasis(props) {\n const { source } = props;\n if (!source.macrostrat?.strat_names) return null;\n\n return h(\n ExpandableDetailsPanel,\n {\n className: \"macrostrat-unit\",\n headerElement: h([\n h(\"h3\", source.macrostrat.strat_names[0].rank_name),\n h(\"div.description\", \"Matched stratigraphic unit\"),\n ]),\n },\n h(ExpansionBody, { title: \"All matched names\" }, [\n source.macrostrat.strat_names.map((name, i) => {\n let lastElement: boolean =\n i == source.macrostrat.strat_names.length - 1;\n return h(\"span\", { key: i }, [\n h(\n \"a.externalLink\",\n {\n href: \"/lex/strat-names/\" + name.strat_name_id,\n key: i,\n },\n [name.rank_name],\n ),\n h.if(!lastElement)([\", \"]),\n ]);\n }),\n ]),\n );\n}\n\nfunction Thickness(props) {\n const { source } = props;\n if (!source.macrostrat.max_thick) return h(\"div\");\n\n return h.if(source.macrostrat && source.macrostrat.max_thick)(\n \"div.macrostrat-detail\",\n [\n h(\"div.expansion-summary-title\", \"Thickness\"),\n h(\"div\", [\n source.macrostrat.min_min_thick,\n \" - \",\n source.macrostrat.max_thick,\n \"m\",\n ]),\n ],\n );\n}\n\nfunction MinorFossilCollections(props) {\n const { source } = props;\n const { macrostrat } = source;\n if (!macrostrat.pbdb_collections) return h(\"div\");\n\n return h.if(macrostrat && macrostrat.pbdb_collections)(\n \"div.macrostrat-detail\",\n [\n h(\"div.expansion-summary-title\", \"Fossil collections\"),\n h(\"div\", [macrostrat.pbdb_collections]),\n ],\n );\n}\n\nfunction FossilOccs(props) {\n const { source } = props;\n const { macrostrat } = source;\n\n if (!macrostrat?.pbdb_occs) return null;\n\n return h(\"div.macrostrat-detail\", [\n h(\"div.expansion-summary-title\", \"Fossil occurrences\"),\n h(\"div\", [macrostrat.pbdb_occs]),\n ]);\n}\n\nfunction LithTypes(props) {\n const { lith_types } = props;\n\n return h.if(lith_types && lith_types.length > 0)(\n \"div.lithologies.lithology-types\",\n [\n h(LithologyList, {\n lithologies: lith_types,\n }),\n ],\n );\n}\n\nfunction LithsAndClasses(props) {\n const { source } = props;\n const { macrostrat } = source;\n const { liths = null, lith_types = null } = macrostrat;\n\n if (!liths || liths.length == 0) return null;\n\n const lithologies = liths.map((lith) => {\n return {\n ...lith,\n name: lith.lith,\n color: lith.color || \"#000000\",\n };\n });\n\n return h(\n ExpandableDetailsPanel,\n {\n title: \"Lithology\",\n value: h(LithTypes, { lith_types }),\n },\n h(ExpansionBody, { title: \"Matched lithologies\" }, [\n h(LithologyList, {\n lithologies,\n onClickItem: (e, lith) => {\n window.open(\"/lex/lithology/\" + lith.lith_id, \"_self\");\n },\n }),\n ]),\n );\n}\n\nfunction EnvironTypes(props) {\n const { environ_types } = props;\n return h.if(environ_types && environ_types.length > 0)(LithologyList, {\n lithologies: environ_types?.filter((e) => e.name != \"\"),\n });\n}\n\nfunction Environments(props) {\n const { source } = props;\n const { macrostrat } = source;\n const { environs = null, environ_types = null } = macrostrat;\n\n if (!environs || environs.length == 0) return null;\n\n const lithologies = environs.map((environ) => {\n return {\n ...environ,\n name: environ.environ,\n color: environ.color || \"#000000\",\n };\n });\n\n return h(\n ExpandableDetailsPanel,\n {\n title: \"Environment\",\n value: h(EnvironTypes, { environ_types }),\n },\n h(ExpansionBody, { title: \"Matched environments\" }, [\n h(LithologyList, {\n lithologies,\n onClickItem: (e, environ) => {\n window.open(\"/lex/environments/\" + environ.environ_id, \"_self\");\n },\n }),\n ]),\n );\n}\n\nfunction EconType(props) {\n const { econ_types } = props;\n\n return h.if(econ_types && econ_types.length > 0)(\"div\", [\n econ_types.map((econClass, i) => {\n return h(AttrChip, {\n key: i,\n name: econClass.name,\n color: econClass.color,\n });\n }),\n ]);\n}\n\nfunction Economy(props) {\n const { source } = props;\n const { macrostrat } = source;\n const { econs = null, econ_types = null } = macrostrat;\n if (!econs) return h(\"div\");\n\n return h.if(econs && econs.length > 0)(\n ExpandableDetailsPanel,\n {\n title: \"Economy \",\n value: h(EconType, { econ_types }),\n },\n h(ExpansionBody, { title: \"Matched economic attributes\" }, [\n econs.map((econ, i) => {\n return h(AttrChip, {\n key: i,\n name: econ.econ,\n color: econ.color,\n });\n }),\n ]),\n );\n}\n\nexport { MacrostratLinkedData };\n"],"names":[],"version":3,"file":"map-interface.6c0f5044.js.map"}
@@ -1,4 +1,4 @@
1
- import {addCommas as $22a5ce3f53d8fe7d$export$b6fe44657ce35c42} from "./map-interface.c257cac1.js";
1
+ import {addCommas as $22a5ce3f53d8fe7d$export$b6fe44657ce35c42} from "./map-interface.b7a0dc07.js";
2
2
  import $11TyU$macrostrathyper from "@macrostrat/hyper";
3
3
  import {ExpansionPanel as $11TyU$ExpansionPanel} from "@macrostrat/map-interface";
4
4
 
@@ -101,4 +101,4 @@ function $dba5769eaddd65ed$var$MapAttribute(props) {
101
101
 
102
102
 
103
103
  export {$dba5769eaddd65ed$export$2b7bf9249a3d9866 as RegionalStratigraphy};
104
- //# sourceMappingURL=map-interface.6d7e89e5.js.map
104
+ //# sourceMappingURL=map-interface.9123f5c8.js.map
@@ -1 +1 @@
1
- {"mappings":";;;;;;;AAIO,SAAS,0CAAqB,KAAK;IACxC,MAAM,WAAE,OAAO,cAAE,UAAU,EAAE,GAAG;IAChC,IAAI,SAAS,WAAW,QAAQ,CAAC,YAAY,OAAO;IAEpD,OAAO,CAAA,GAAA,sBAAA,EACL,CAAA,GAAA,qBAAa,GACb;QACE,SAAS;YAAE,MAAM;QAAiB;QAClC,OAAO;QACP,UAAU;IACZ,GACA;QA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M;aAAE;QAC3E;QACA,CAAA,GAAA,sBAAA,EAAE,oCAAc;YACd,OAAO;YACP,SAAS;gBAAC,CAAA,GAAA,yCAAQ,EAAE,WAAW,gBAAgB;aAAE;QACnD;KACD;AACH;AAEA,SAAS,mCAAa,KAAK;IACzB,OAAO,CAAA,GAAA,sBAAA,EAAE,uBAAuB;QAC9B,CAAA,GAAA,sBAAA,EAAE,aAAa;YAAC,MAAM,KAAK;SAAC;WACzB,MAAM,OAAO;KACjB;AACH","sources":["packages/map-interface/src/map-panel/components/info-drawer/reg-strat.ts"],"sourcesContent":["import h from \"@macrostrat/hyper\";\nimport { ExpansionPanel } from \"@macrostrat/map-interface\";\nimport { addCommas } from \"../../utils\";\n\nexport function RegionalStratigraphy(props) {\n const { mapInfo, columnInfo } = props;\n if (mapInfo?.mapData == null || !columnInfo) return null;\n\n return h(\n ExpansionPanel,\n {\n classes: { root: \"regional-panel\" },\n title: \"Regional stratigraphy\",\n expanded: true,\n },\n [h.if(columnInfo != null)(ColumnData, { columnInfo })],\n );\n}\n\nfunction ColumnData({ columnInfo }) {\n return h(\"div.column-data\", [\n h(\"a\", { href: \"/columns/\" + columnInfo.col_id }, \"View column page\"),\n h(MapAttribute, {\n label: \"Name: \",\n content: [columnInfo.col_name],\n }),\n h(MapAttribute, {\n label: \"Column ID: \",\n content: [columnInfo.col_id],\n }),\n h(MapAttribute, {\n label: \"Group: \",\n content: [columnInfo.col_group],\n }),\n h(MapAttribute, {\n label: \"Group ID: \",\n content: [columnInfo.col_group_id],\n }),\n h.if(columnInfo.min_min_thick || columnInfo.max_thick)(MapAttribute, {\n label: \"Thickness: \",\n content: [\n addCommas(parseInt(columnInfo.min_min_thick)),\n \" - \",\n addCommas(parseInt(columnInfo.max_thick)),\n h(\"span.age-ma\", [\"m\"]),\n ],\n }),\n h(MapAttribute, {\n label: \"Age: \",\n content: [\n columnInfo.b_age,\n \" - \",\n columnInfo.t_age,\n \" \",\n h(\"span.age-ma\", [\"Ma\"]),\n ],\n }),\n h(MapAttribute, {\n label: \"Area: \",\n content: [addCommas(columnInfo.col_area), \" \", h(\"span.age-ma\", [\"km2\"])],\n }),\n h(MapAttribute, {\n label: \"Fossil collections: \",\n content: [addCommas(columnInfo.pbdb_collections)],\n }),\n ]);\n}\n\nfunction MapAttribute(props) {\n return h(\"div.map-source-attr\", [\n h(\"span.attr\", [props.label]),\n ...props.content,\n ]);\n}\n"],"names":[],"version":3,"file":"map-interface.6d7e89e5.js.map"}
1
+ {"mappings":";;;;;;;AAIO,SAAS,0CAAqB,KAAK;IACxC,MAAM,WAAE,OAAO,cAAE,UAAU,EAAE,GAAG;IAChC,IAAI,SAAS,WAAW,QAAQ,CAAC,YAAY,OAAO;IAEpD,OAAO,CAAA,GAAA,sBAAA,EACL,CAAA,GAAA,qBAAa,GACb;QACE,SAAS;YAAE,MAAM;QAAiB;QAClC,OAAO;QACP,UAAU;IACZ,GACA;QAAC,CAAA,GAAA,sBAAA,EAAE,EAAE,CAAC,cAAc,MAAM,kCAAY;wBAAE;QAAW;KAAG;AAE1D;AAEA,SAAS,iCAAW,cAAE,UAAU,EAAE;IAChC,OAAO,CAAA,GAAA,sBAAA,EAAE,mBAAmB;QAC1B,CAAA,GAAA,sBAAA,EAAE,KAAK;YAAE,MAAM,cAAc,WAAW,MAAM;QAAC,GAAG;QAClD,CAAA,GAAA,sBAAA,EAAE,oCAAc;YACd,OAAO;YACP,SAAS;gBAAC,WAAW,QAAQ;aAAC;QAChC;QACA,CAAA,GAAA,sBAAA,EAAE,oCAAc;YACd,OAAO;YACP,SAAS;gBAAC,WAAW,MAAM;aAAC;QAC9B;QACA,CAAA,GAAA,sBAAA,EAAE,oCAAc;YACd,OAAO;YACP,SAAS;gBAAC,WAAW,SAAS;aAAC;QACjC;QACA,CAAA,GAAA,sBAAA,EAAE,oCAAc;YACd,OAAO;YACP,SAAS;gBAAC,WAAW,YAAY;aAAC;QACpC;QACA,CAAA,GAAA,sBAAA,EAAE,EAAE,CAAC,WAAW,aAAa,IAAI,WAAW,SAAS,EAAE,oCAAc;YACnE,OAAO;YACP,SAAS;gBACP,CAAA,GAAA,yCAAQ,EAAE,SAAS,WAAW,aAAa;gBAC3C;gBACA,CAAA,GAAA,yCAAQ,EAAE,SAAS,WAAW,SAAS;gBACvC,CAAA,GAAA,sBAAA,EAAE,eAAe;oBAAC;iBAAI;aACvB;QACH;QACA,CAAA,GAAA,sBAAA,EAAE,oCAAc;YACd,OAAO;YACP,SAAS;gBACP,WAAW,KAAK;gBAChB;gBACA,WAAW,KAAK;gBAChB;gBACA,CAAA,GAAA,sBAAA,EAAE,eAAe;oBAAC;iBAAK;aACxB;QACH;QACA,CAAA,GAAA,sBAAA,EAAE,oCAAc;YACd,OAAO;YACP,SAAS;gBAAC,CAAA,GAAA,yCAAQ,EAAE,WAAW,QAAQ;gBAAG;gBAAK,CAAA,GAAA,sBAAA,EAAE,eAAe;oBAAC;iBAAM;aAAE;QAC3E;QACA,CAAA,GAAA,sBAAA,EAAE,oCAAc;YACd,OAAO;YACP,SAAS;gBAAC,CAAA,GAAA,yCAAQ,EAAE,WAAW,gBAAgB;aAAE;QACnD;KACD;AACH;AAEA,SAAS,mCAAa,KAAK;IACzB,OAAO,CAAA,GAAA,sBAAA,EAAE,uBAAuB;QAC9B,CAAA,GAAA,sBAAA,EAAE,aAAa;YAAC,MAAM,KAAK;SAAC;WACzB,MAAM,OAAO;KACjB;AACH","sources":["packages/map-interface/src/map-panel/components/info-drawer/reg-strat.ts"],"sourcesContent":["import h from \"@macrostrat/hyper\";\nimport { ExpansionPanel } from \"@macrostrat/map-interface\";\nimport { addCommas } from \"../../utils\";\n\nexport function RegionalStratigraphy(props) {\n const { mapInfo, columnInfo } = props;\n if (mapInfo?.mapData == null || !columnInfo) return null;\n\n return h(\n ExpansionPanel,\n {\n classes: { root: \"regional-panel\" },\n title: \"Regional stratigraphy\",\n expanded: true,\n },\n [h.if(columnInfo != null)(ColumnData, { columnInfo })],\n );\n}\n\nfunction ColumnData({ columnInfo }) {\n return h(\"div.column-data\", [\n h(\"a\", { href: \"/columns/\" + columnInfo.col_id }, \"View column page\"),\n h(MapAttribute, {\n label: \"Name: \",\n content: [columnInfo.col_name],\n }),\n h(MapAttribute, {\n label: \"Column ID: \",\n content: [columnInfo.col_id],\n }),\n h(MapAttribute, {\n label: \"Group: \",\n content: [columnInfo.col_group],\n }),\n h(MapAttribute, {\n label: \"Group ID: \",\n content: [columnInfo.col_group_id],\n }),\n h.if(columnInfo.min_min_thick || columnInfo.max_thick)(MapAttribute, {\n label: \"Thickness: \",\n content: [\n addCommas(parseInt(columnInfo.min_min_thick)),\n \" - \",\n addCommas(parseInt(columnInfo.max_thick)),\n h(\"span.age-ma\", [\"m\"]),\n ],\n }),\n h(MapAttribute, {\n label: \"Age: \",\n content: [\n columnInfo.b_age,\n \" - \",\n columnInfo.t_age,\n \" \",\n h(\"span.age-ma\", [\"Ma\"]),\n ],\n }),\n h(MapAttribute, {\n label: \"Area: \",\n content: [addCommas(columnInfo.col_area), \" \", h(\"span.age-ma\", [\"km2\"])],\n }),\n h(MapAttribute, {\n label: \"Fossil collections: \",\n content: [addCommas(columnInfo.pbdb_collections)],\n }),\n ]);\n}\n\nfunction MapAttribute(props) {\n return h(\"div.map-source-attr\", [\n h(\"span.attr\", [props.label]),\n ...props.content,\n ]);\n}\n"],"names":[],"version":3,"file":"map-interface.9123f5c8.js.map"}
@@ -1,4 +1,4 @@
1
- import {makeOccurrenceTree as $690cfb657ed76f7b$export$9355c61f37d969f4} from "./map-interface.2b94a8ad.js";
1
+ import {makeOccurrenceTree as $690cfb657ed76f7b$export$9355c61f37d969f4} from "./map-interface.2daa72f9.js";
2
2
  import {fmt4 as $5867df295bec1a21$export$97c1b10e131a836d, fmt3 as $5867df295bec1a21$export$b1cb0f7fb990b3ea, fmt2 as $5867df295bec1a21$export$4c173b1b2f78faf7, fmt1 as $5867df295bec1a21$export$e54bbd2c33d17485, fmtInt as $5867df295bec1a21$export$bc135f63e2f56fd4, addCommas as $5867df295bec1a21$export$b6fe44657ce35c42} from "./map-interface.a0ea0c86.js";
3
3
 
4
4
 
@@ -185,4 +185,4 @@ const $22a5ce3f53d8fe7d$export$a5a22643c02a030c = [
185
185
 
186
186
 
187
187
  export {$22a5ce3f53d8fe7d$export$b6fe44657ce35c42 as addCommas, $22a5ce3f53d8fe7d$export$8a63f25cc62965f1 as sum, $22a5ce3f53d8fe7d$export$5a544e13ad4e1fa5 as hexToRgb, $22a5ce3f53d8fe7d$export$a5a22643c02a030c as timescale, $690cfb657ed76f7b$export$9355c61f37d969f4 as makeOccurrenceTree, $5867df295bec1a21$export$97c1b10e131a836d as fmt4, $5867df295bec1a21$export$b1cb0f7fb990b3ea as fmt3, $5867df295bec1a21$export$4c173b1b2f78faf7 as fmt2, $5867df295bec1a21$export$e54bbd2c33d17485 as fmt1, $5867df295bec1a21$export$bc135f63e2f56fd4 as fmtInt, $5867df295bec1a21$export$b6fe44657ce35c42 as addCommas};
188
- //# sourceMappingURL=map-interface.c257cac1.js.map
188
+ //# sourceMappingURL=map-interface.b7a0dc07.js.map
@@ -1 +1 @@
1
- {"mappings":";;;;;AAAO,MAAM,4CAAY,CAAC;IACxB,IAAI,SAAS;IACb,IAAI,QAAQ,EAAE,QAAQ,GAAG,KAAK,CAAC;IAC/B,KAAK,CAAC,EAAE,GAAG,KAAK,CAAC,EAAE,CAAC,OAAO,CAAC,yBAAyB;IACrD,OAAO,MAAM,IAAI,CAAC;AACpB;AAEO,MAAM,4CAAM,CAAC,MAAM;IACxB,IAAI,CAAC,QAAQ,CAAC,KAAK,MAAM,EACvB,OAAO,EAAE;IAEX,OAAO,KACJ,GAAG,CAAC,CAAC;QACJ,OAAO,CAAC,CAAC,KAAK;IAChB,GACC,MAAM,CAAC,CAAC,GAAG;QACV,OAAO,IAAI;IACb,GAAG;AACP;AAEO,MAAM,4CAAW,CAAC,KAAK;IAC5B,IAAI,CAAC,KACH,OAAO;IAET,MAAM,IAAI,OAAO,CAAC,KAAK;I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U,QAAQ;QAAK,OAAO;QAAK,OAAO;QAAM,OAAO;IAAU;IACzE;QAAE,MAAM;QAAW,QAAQ;QAAM,OAAO;QAAM,OAAO;QAAM,OAAO;IAAU;IAC5E;QACE,MAAM;QACN,QAAQ;QACR,OAAO;QACP,OAAO;QACP,OAAO;IACT;IACA;QACE,MAAM;QACN,QAAQ;QACR,OAAO;QACP,OAAO;QACP,OAAO;IACT;IACA;QACE,MAAM;QACN,QAAQ;QACR,OAAO;QACP,OAAO;QACP,OAAO;IACT;IACA;QACE,MAAM;QACN,QAAQ;QACR,OAAO;QACP,OAAO;QACP,OAAO;IACT;IACA;QAAE,MAAM;QAAY,QAAQ;QAAK,OAAO;QAAM,OAAO;QAAM,OAAO;IAAU;IAC5E;QACE,MAAM;QACN,QAAQ;QACR,OAAO;QACP,OAAO;QACP,OAAO;IACT;CACD","sources":["packages/map-interface/src/map-panel/utils/index.ts"],"sourcesContent":["export const addCommas = (x) => {\n x = parseInt(x);\n var parts = x.toString().split(\".\");\n parts[0] = parts[0].replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\");\n return parts.join(\".\");\n};\n\nexport const sum = (data, prop) => {\n if (!data || !data.length) {\n return [];\n }\n return data\n .map((d) => {\n return d[prop];\n })\n .reduce((a, b) => {\n return a + b;\n }, 0);\n};\n\nexport const hexToRgb = (hex, opacity) => {\n if (!hex) {\n return \"rgba(0,0,0,0.3)\";\n }\n hex = hex.replace(\"#\", \"\");\n let bigint = parseInt(hex, 16);\n let r = (bigint >> 16) & 255;\n let g = (bigint >> 8) & 255;\n let b = bigint & 255;\n return `rgba(${r},${g},${b},${opacity || 0.8})`;\n};\n\nexport type TimescaleDivision = {\n name: string;\n abbrev: string;\n t_age: number;\n b_age: number;\n color: string;\n};\n\nexport const timescale: TimescaleDivision[] = [\n { name: \"Quaternary\", abbrev: \"Q\", t_age: 0, b_age: 2.588, color: \"#F9F97F\" },\n {\n name: \"Neogene\",\n abbrev: \"Ng\",\n t_age: 2.588,\n b_age: 23.03,\n color: \"#FFE619\",\n },\n {\n name: \"Paleogene\",\n abbrev: \"Pg\",\n t_age: 23.03,\n b_age: 66,\n color: \"#FD9A52\",\n },\n { name: \"Cretaceous\", abbrev: \"K\", t_age: 66, b_age: 145, color: \"#7FC64E\" },\n { name: \"Jurassic\", abbrev: \"J\", t_age: 145, b_age: 201.3, color: \"#34B2C9\" },\n {\n name: \"Triassic\",\n abbrev: \"Tr\",\n t_age: 201.3,\n b_age: 252.17,\n color: \"#812B92\",\n },\n {\n name: \"Permian\",\n abbrev: \"P\",\n t_age: 252.17,\n b_age: 298.9,\n color: \"#F04028\",\n },\n {\n name: \"Carboniferous\",\n abbrev: \"C\",\n t_age: 298.9,\n b_age: 358.9,\n color: \"#67A599\",\n },\n {\n name: \"Devonian\",\n abbrev: \"D\",\n t_age: 358.9,\n b_age: 419.2,\n color: \"#CB8C37\",\n },\n {\n name: \"Silurian\",\n abbrev: \"S\",\n t_age: 419.2,\n b_age: 443.8,\n color: \"#B3E1B6\",\n },\n {\n name: \"Ordovician\",\n abbrev: \"O\",\n t_age: 443.8,\n b_age: 485.4,\n color: \"#009270\",\n },\n {\n name: \"Cambrian\",\n abbrev: \"Cm\",\n t_age: 485.4,\n b_age: 541,\n color: \"#7FA056\",\n },\n { name: \"Ediacaran\", abbrev: \"E\", t_age: 541, b_age: 635, color: \"#FFC3E1\" },\n {\n name: \"Cryogenian\",\n abbrev: \"Cr\",\n t_age: 635,\n b_age: 720,\n color: \"#FFAFD7\",\n },\n { name: \"Tonian\", abbrev: \"T\", t_age: 720, b_age: 1000, color: \"#FFA5D2\" },\n { name: \"Stenian\", abbrev: \"St\", t_age: 1000, b_age: 1200, color: \"#FFA5D2\" },\n {\n name: \"Ectasian\",\n abbrev: \"Ec\",\n t_age: 1200,\n b_age: 1400,\n color: \"#FF98CC\",\n },\n {\n name: \"Calymmian\",\n abbrev: \"Ca\",\n t_age: 1400,\n b_age: 1600,\n color: \"#FF8BC5\",\n },\n {\n name: \"Statherian\",\n abbrev: \"St\",\n t_age: 1600,\n b_age: 1800,\n color: \"#EE93C1\",\n },\n {\n name: \"Orosirian\",\n abbrev: \"Or\",\n t_age: 1800,\n b_age: 2050,\n color: \"#E874AF\",\n },\n { name: \"Rhyacian\", abbrev: \"R\", t_age: 2050, b_age: 2300, color: \"#EB84B8\" },\n {\n name: \"Siderian\",\n abbrev: \"Sd\",\n t_age: 2300,\n b_age: 2500,\n color: \"#E874AF\",\n },\n];\n\nexport * from \"./fossils\";\nexport * from \"./formatting\";\n"],"names":[],"version":3,"file":"map-interface.c257cac1.js.map"}
1
+ {"mappings":";;;;;AAAO,MAAM,4CAAY,CAAC;IACxB,IAAI,SAAS;IACb,IAAI,QAAQ,EAAE,QAAQ,GAAG,KAAK,CAAC;IAC/B,KAAK,CAAC,EAAE,GAAG,KAAK,CAAC,EAAE,CAAC,OAAO,CAAC,yBAAyB;IACrD,OAAO,MAAM,IAAI,CAAC;AACpB;AAEO,MAAM,4CAAM,CAAC,MAAM;IACxB,IAAI,CAAC,QAAQ,CAAC,KAAK,MAAM,EACvB,OAAO,EAAE;IAEX,OAAO,KACJ,GAAG,CAAC,CAAC;QACJ,OAAO,CAAC,CAAC,KAAK;IAChB,GACC,MAAM,CAAC,CAAC,GAAG;QACV,OAAO,IAAI;IACb,GAAG;AACP;AAEO,MAAM,4CAAW,CAAC,KAAK;IAC5B,IAAI,CAAC,KACH,OAAO;IAET,MAAM,IAAI,OAAO,CAAC,KAAK;IACvB,IAAI,SAAS,SAAS,KAAK;IAC3B,IAAI,IAAI,AAAC,UAAU,KAAM;IACzB,IAAI,IAAI,AAAC,UAAU,IAAK;IACxB,IAAI,IAAI,SAAS;IACjB,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,EAAE,WAAW,IAAI,CAAC,CAAC;AACjD;AAUO,MAAM,4CAAiC;IAC5C;QAAE,MAAM;QAAc,QAAQ;QAAK,OAAO;QAAG,OAAO;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IACT;IACA;QACE,MAAM;QACN,QAAQ;QACR,OAAO;QACP,OAAO;QACP,OAAO;IACT;IACA;QAAE,MAAM;QAAY,QAAQ;QAAK,OAAO;QAAM,OAAO;QAAM,OAAO;IAAU;IAC5E;QACE,MAAM;QACN,QAAQ;QACR,OAAO;QACP,OAAO;QACP,OAAO;IACT;CACD","sources":["packages/map-interface/src/map-panel/utils/index.ts"],"sourcesContent":["export const addCommas = (x) => {\n x = parseInt(x);\n var parts = x.toString().split(\".\");\n parts[0] = parts[0].replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\");\n return parts.join(\".\");\n};\n\nexport const sum = (data, prop) => {\n if (!data || !data.length) {\n return [];\n }\n return data\n .map((d) => {\n return d[prop];\n })\n .reduce((a, b) => {\n return a + b;\n }, 0);\n};\n\nexport const hexToRgb = (hex, opacity) => {\n if (!hex) {\n return \"rgba(0,0,0,0.3)\";\n }\n hex = hex.replace(\"#\", \"\");\n let bigint = parseInt(hex, 16);\n let r = (bigint >> 16) & 255;\n let g = (bigint >> 8) & 255;\n let b = bigint & 255;\n return `rgba(${r},${g},${b},${opacity || 0.8})`;\n};\n\nexport type TimescaleDivision = {\n name: string;\n abbrev: string;\n t_age: number;\n b_age: number;\n color: string;\n};\n\nexport const timescale: TimescaleDivision[] = [\n { name: \"Quaternary\", abbrev: \"Q\", t_age: 0, b_age: 2.588, color: \"#F9F97F\" },\n {\n name: \"Neogene\",\n abbrev: \"Ng\",\n t_age: 2.588,\n b_age: 23.03,\n color: \"#FFE619\",\n },\n {\n name: \"Paleogene\",\n abbrev: \"Pg\",\n t_age: 23.03,\n b_age: 66,\n color: \"#FD9A52\",\n },\n { name: \"Cretaceous\", abbrev: \"K\", t_age: 66, b_age: 145, color: \"#7FC64E\" },\n { name: \"Jurassic\", abbrev: \"J\", t_age: 145, b_age: 201.3, color: \"#34B2C9\" },\n {\n name: \"Triassic\",\n abbrev: \"Tr\",\n t_age: 201.3,\n b_age: 252.17,\n color: \"#812B92\",\n },\n {\n name: \"Permian\",\n abbrev: \"P\",\n t_age: 252.17,\n b_age: 298.9,\n color: \"#F04028\",\n },\n {\n name: \"Carboniferous\",\n abbrev: \"C\",\n t_age: 298.9,\n b_age: 358.9,\n color: \"#67A599\",\n },\n {\n name: \"Devonian\",\n abbrev: \"D\",\n t_age: 358.9,\n b_age: 419.2,\n color: \"#CB8C37\",\n },\n {\n name: \"Silurian\",\n abbrev: \"S\",\n t_age: 419.2,\n b_age: 443.8,\n color: \"#B3E1B6\",\n },\n {\n name: \"Ordovician\",\n abbrev: \"O\",\n t_age: 443.8,\n b_age: 485.4,\n color: \"#009270\",\n },\n {\n name: \"Cambrian\",\n abbrev: \"Cm\",\n t_age: 485.4,\n b_age: 541,\n color: \"#7FA056\",\n },\n { name: \"Ediacaran\", abbrev: \"E\", t_age: 541, b_age: 635, color: \"#FFC3E1\" },\n {\n name: \"Cryogenian\",\n abbrev: \"Cr\",\n t_age: 635,\n b_age: 720,\n color: \"#FFAFD7\",\n },\n { name: \"Tonian\", abbrev: \"T\", t_age: 720, b_age: 1000, color: \"#FFA5D2\" },\n { name: \"Stenian\", abbrev: \"St\", t_age: 1000, b_age: 1200, color: \"#FFA5D2\" },\n {\n name: \"Ectasian\",\n abbrev: \"Ec\",\n t_age: 1200,\n b_age: 1400,\n color: \"#FF98CC\",\n },\n {\n name: \"Calymmian\",\n abbrev: \"Ca\",\n t_age: 1400,\n b_age: 1600,\n color: \"#FF8BC5\",\n },\n {\n name: \"Statherian\",\n abbrev: \"St\",\n t_age: 1600,\n b_age: 1800,\n color: \"#EE93C1\",\n },\n {\n name: \"Orosirian\",\n abbrev: \"Or\",\n t_age: 1800,\n b_age: 2050,\n color: \"#E874AF\",\n },\n { name: \"Rhyacian\", abbrev: \"R\", t_age: 2050, b_age: 2300, color: \"#EB84B8\" },\n {\n name: \"Siderian\",\n abbrev: \"Sd\",\n t_age: 2300,\n b_age: 2500,\n color: \"#E874AF\",\n },\n];\n\nexport * from \"./fossils\";\nexport * from \"./formatting\";\n"],"names":[],"version":3,"file":"map-interface.b7a0dc07.js.map"}
@@ -0,0 +1,7 @@
1
+ import {InfoDrawer as $18270d342e6e17e6$export$6644c89560e2c31f} from "./map-interface.e5607033.js";
2
+
3
+
4
+
5
+
6
+ export {$18270d342e6e17e6$export$6644c89560e2c31f as InfoDrawer};
7
+ //# sourceMappingURL=map-interface.ba2faf2f.js.map
@@ -1 +1 @@
1
- {"mappings":"","sources":["packages/map-interface/src/map-panel/index.ts"],"sourcesContent":["export * from \"./components/info-drawer\";\n"],"names":[],"version":3,"file":"map-interface.29e156db.js.map"}
1
+ {"mappings":"","sources":["packages/map-interface/src/map-panel/index.ts"],"sourcesContent":["export * from \"./components/info-drawer\";\n"],"names":[],"version":3,"file":"map-interface.ba2faf2f.js.map"}
@@ -1,10 +1,11 @@
1
- import {MacrostratLinkedData as $f739fa86e651c3b6$export$fa9d8c2f420ac2bd} from "./map-interface.ba171178.js";
1
+ import {MacrostratLinkedData as $f739fa86e651c3b6$export$fa9d8c2f420ac2bd} from "./map-interface.6c0f5044.js";
2
2
  import {Physiography as $c084684e911e94a0$export$5ebc456b1906f3f1} from "./map-interface.ce6edbfa.js";
3
3
  import "../cjs/map-interface.1be58b40.css";
4
4
  import $dWzBH$mapinterfaceb965dc94js from "./map-interface.b965dc94.js";
5
5
  import {LoadingArea as $739b7d01d753a3dc$export$c2b811cccfc0947} from "./map-interface.d86c2fc5.js";
6
- import {RegionalStratigraphy as $dba5769eaddd65ed$export$2b7bf9249a3d9866} from "./map-interface.6d7e89e5.js";
6
+ import {RegionalStratigraphy as $dba5769eaddd65ed$export$2b7bf9249a3d9866} from "./map-interface.9123f5c8.js";
7
7
  import {XddExpansion as $ef627688a39529ce$export$7bbcc612b1169c6f} from "./map-interface.17a0e9a0.js";
8
+ import {FossilCollections as $1b961fdc6faa8857$export$12fa808128cf62aa} from "./map-interface.69a566f3.js";
8
9
  import $dWzBH$macrostrathyper from "@macrostrat/hyper";
9
10
  import {LocationPanel as $dWzBH$LocationPanel} from "@macrostrat/map-interface";
10
11
  import {useAPIResult as $dWzBH$useAPIResult} from "@macrostrat/ui-components";
@@ -22,16 +23,19 @@ function $parcel$interopDefault(a) {
22
23
 
23
24
 
24
25
 
25
- // import { apiV2Prefix, gddDomain } from "@macrostrat-web/settings";
26
+
26
27
  const $18270d342e6e17e6$var$apiV2Prefix = `https://dev.macrostrat.org/api/v2`;
27
28
  const $18270d342e6e17e6$var$gddDomain = `https://xdd.wisc.edu`;
29
+ const $18270d342e6e17e6$var$paleobioDomain = `https://paleobiodb.org`;
28
30
  const $18270d342e6e17e6$var$h = (0, $dWzBH$macrostrathyper).styled((0, ($parcel$interopDefault($dWzBH$mapinterfaceb965dc94js))));
29
- function $18270d342e6e17e6$var$InfoDrawer(props) {
31
+ function $18270d342e6e17e6$export$6644c89560e2c31f(props) {
30
32
  const { className: className, position: position, zoom: zoom, setSelectedLocation: setSelectedLocation, children: children = null } = props;
31
33
  const { lat: lat, lng: lng } = position;
32
34
  const mapInfo = $18270d342e6e17e6$var$fetchMapInfo(lng, lat, zoom);
33
35
  const columnInfo = $18270d342e6e17e6$var$fetchColumnInfo(lng, lat);
36
+ const fossilInfo = $18270d342e6e17e6$var$fetchFossilInfo(lng, lat);
34
37
  const xddInfo = $18270d342e6e17e6$var$fetchXddInfo(mapInfo?.mapData?.[0]?.macrostrat?.strat_names);
38
+ console.log("fossilInfo", fossilInfo);
35
39
  const fetchingMapInfo = mapInfo == null;
36
40
  return $18270d342e6e17e6$var$h((0, $dWzBH$LocationPanel), {
37
41
  className: className,
@@ -49,13 +53,15 @@ function $18270d342e6e17e6$var$InfoDrawer(props) {
49
53
  }, $18270d342e6e17e6$var$h.if(!fetchingMapInfo)($18270d342e6e17e6$var$InfoDrawerMainPanel, {
50
54
  mapInfo: mapInfo,
51
55
  columnInfo: columnInfo,
52
- xddInfo: xddInfo
56
+ xddInfo: xddInfo,
57
+ fossilInfo: fossilInfo
53
58
  })),
54
59
  children
55
60
  ]);
56
61
  }
57
- function $18270d342e6e17e6$var$InfoDrawerMainPanel({ mapInfo: mapInfo, columnInfo: columnInfo, xddInfo: xddInfo }) {
62
+ function $18270d342e6e17e6$var$InfoDrawerMainPanel({ mapInfo: mapInfo, columnInfo: columnInfo, xddInfo: xddInfo, fossilInfo: fossilInfo }) {
58
63
  if (!mapInfo || !mapInfo.mapData) return null;
64
+ console.log("InfoDrawerMainPanel", fossilInfo);
59
65
  let source = mapInfo && mapInfo.mapData && mapInfo.mapData.length ? mapInfo.mapData[0] : {
60
66
  name: null,
61
67
  descrip: null,
@@ -70,7 +76,10 @@ function $18270d342e6e17e6$var$InfoDrawerMainPanel({ mapInfo: mapInfo, columnInf
70
76
  mapInfo: mapInfo,
71
77
  columnInfo: columnInfo
72
78
  }),
73
- // h(FossilCollections, { data: pbdbData, expanded: true }),
79
+ $18270d342e6e17e6$var$h((0, $1b961fdc6faa8857$export$12fa808128cf62aa), {
80
+ data: fossilInfo,
81
+ expanded: true
82
+ }),
74
83
  $18270d342e6e17e6$var$h((0, $f739fa86e651c3b6$export$fa9d8c2f420ac2bd), {
75
84
  mapInfo: mapInfo,
76
85
  bedrockMatchExpanded: true,
@@ -84,7 +93,6 @@ function $18270d342e6e17e6$var$InfoDrawerMainPanel({ mapInfo: mapInfo, columnInf
84
93
  })
85
94
  ]);
86
95
  }
87
- var $18270d342e6e17e6$export$2e2bcd8739ae039 = $18270d342e6e17e6$var$InfoDrawer;
88
96
  function $18270d342e6e17e6$var$fetchMapInfo(lng, lat, z) {
89
97
  return (0, $dWzBH$useAPIResult)(`${$18270d342e6e17e6$var$apiV2Prefix}/mobile/map_query_v2`, {
90
98
  lng: lng,
@@ -105,7 +113,24 @@ function $18270d342e6e17e6$var$fetchXddInfo(stratNames) {
105
113
  term: stratNames?.map((d)=>d.rank_name).join(",")
106
114
  })?.success?.data;
107
115
  }
116
+ function $18270d342e6e17e6$var$fetchFossilInfo(lng, lat) {
117
+ const collectionResponse = (0, $dWzBH$useAPIResult)(`${$18270d342e6e17e6$var$paleobioDomain}/data1.2/colls/list.json?lngmin=${lng - 0.1}&lngmax=${lng + 0.1}&latmin=${lat - 0.1}&latmax=${lat + 0.1}`)?.records;
118
+ const occurrences = (0, $dWzBH$useAPIResult)(`${$18270d342e6e17e6$var$paleobioDomain}/data1.2/occs/list.json?lngmin=${lng - 0.1}&lngmax=${lng + 0.1}&latmin=${lat - 0.1}&latmax=${lat + 0.1}`)?.records;
119
+ if (!collectionResponse || !occurrences) return null;
120
+ try {
121
+ return collectionResponse.map((col)=>{
122
+ col.occurrences = [];
123
+ occurrences.forEach((occ)=>{
124
+ if (occ.cid === col.oid) col.occurrences.push(occ);
125
+ });
126
+ return col;
127
+ });
128
+ } catch (error) {
129
+ console.log(error);
130
+ return [];
131
+ }
132
+ }
108
133
 
109
134
 
110
- export {$18270d342e6e17e6$export$2e2bcd8739ae039 as default};
111
- //# sourceMappingURL=map-interface.78cdcaeb.js.map
135
+ export {$18270d342e6e17e6$export$6644c89560e2c31f as InfoDrawer};
136
+ //# sourceMappingURL=map-interface.e5607033.js.map
@@ -0,0 +1 @@
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAWA,MAAM,oCAAc,CAAC,iCAAiC,CAAC;AACvD,MAAM,kCAAY,CAAC,oBAAoB,CAAC;AACxC,MAAM,uCAAiB,CAAC,sBAAsB,CAAC;AAE/C,MAAM,0BAAI,CAAA,GAAA,sBAAI,EAAE,MAAM,CAAC,CAAA,GAAA,wEAAK;AAErB,SAAS,0CAAW,KAAK;IAC9B,MAAM,aACJ,SAAS,YACT,QAAQ,QACR,IAAI,uBACJ,mBAAmB,YACnB,WAAW,MACZ,GAAG;IAEJ,MAAM,OAAE,GAAG,OAAE,GAAG,EAAE,GAAG;IAErB,MAAM,UAAU,mCAAa,KAAK,KAAK;IACvC,MAAM,aAAa,sCAAgB,KAAK;IACxC,MAAM,aAAa,sCAAgB,KAAK;IACxC,MAAM,UAAU,mCAAa,SAAS,SAAS,CA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AAG,kCAAY,oBAAoB,CAAC,EAAE;aACxD;aACA;WACA;IACF,IAAI,SAAS;AACf;AAEA,SAAS,sCAAgB,GAAG,EAAE,GAAG;IAC/B,OAAO,CAAA,GAAA,mBAAW,EAAE,GAAG,kCAAY,QAAQ,CAAC,EAAE;aAC5C;aACA;QACA,UAAU;IACZ,IAAI,SAAS,MAAM,CAAC,EAAE;AACxB;AAEA,SAAS,mCAAa,UAAU;IAC9B,OAAO,CAAA,GAAA,mBAAW,EAAE,GAAG,gCAAU,gBAAgB,CAAC,EAAE;QAClD,eAAe;QACf,MAAM,YAAY,IAAI,CAAC,IAAM,EAAE,SAAS,EAAE,KAAK;IACjD,IAAI,SAAS;AACf;AAEA,SAAS,sCAAgB,GAAG,EAAE,GAAG;IAC/B,MAAM,qBAAqB,CAAA,GAAA,mBAAW,EACpC,GAAG,qCAAe,gCAAgC,EAAE,MAAM,IAAI,QAAQ,EAAE,MAAM,IAAI,QAAQ,EAAE,MAAM,IAAI,QAAQ,EAAE,MAAM,KAAK,GAC1H;IAEH,MAAM,cAAc,CAAA,GAAA,mBAAW,EAC7B,GAAG,qCAAe,+BAA+B,EAAE,MAAM,IAAI,QAAQ,EAAE,MAAM,IAAI,QAAQ,EAAE,MAAM,IAAI,QAAQ,EAAE,MAAM,KAAK,GACzH;IAEH,IAAI,CAAC,sBAAsB,CAAC,aAC1B,OAAO;IAGT,IAAI;QACF,OAAO,mBAAmB,GAAG,CAAC,CAAC;YAC7B,IAAI,WAAW,GAAG,EAAE;YACpB,YAAY,OAAO,CAAC,CAAC;gBACnB,IAAI,IAAI,GAAG,KAAK,IAAI,GAAG,EACrB,IAAI,WAAW,CAAC,IAAI,CAAC;YAEzB;YACA,OAAO;QACT;IACF,EAAE,OAAO,OAAO;QACd,QAAQ,GAAG,CAAC;QACZ,OAAO,EAAE;IACX;AACF","sources":["packages/map-interface/src/map-panel/components/info-drawer/index.ts"],"sourcesContent":["import hyper from \"@macrostrat/hyper\";\nimport { LocationPanel } from \"@macrostrat/map-interface\";\nimport { MacrostratLinkedData } from \"./macrostrat-linked\";\nimport { Physiography } from \"./physiography\";\nimport styles from \"./main.module.styl\";\nimport { LoadingArea } from \"../transitions\";\nimport { RegionalStratigraphy } from \"./reg-strat\";\nimport { XddExpansion } from \"./xdd-panel\";\nimport { useAPIResult } from \"@macrostrat/ui-components\";\nimport { FossilCollections } from \"./fossil-collections\";\n\nconst apiV2Prefix = `https://dev.macrostrat.org/api/v2`;\nconst gddDomain = `https://xdd.wisc.edu`;\nconst paleobioDomain = `https://paleobiodb.org`;\n\nconst h = hyper.styled(styles);\n\nexport function InfoDrawer(props) {\n const {\n className,\n position,\n zoom,\n setSelectedLocation,\n children = null,\n } = props;\n\n const { lat, lng } = position;\n\n const mapInfo = fetchMapInfo(lng, lat, zoom);\n const columnInfo = fetchColumnInfo(lng, lat);\n const fossilInfo = fetchFossilInfo(lng, lat);\n const xddInfo = fetchXddInfo(mapInfo?.mapData?.[0]?.macrostrat?.strat_names);\n\n console.log(\"fossilInfo\", fossilInfo);\n\n const fetchingMapInfo = mapInfo == null;\n\n return h(\n LocationPanel,\n {\n className,\n position,\n elevation: mapInfo?.elevation,\n zoom,\n onClose: () => setSelectedLocation(null),\n loading: mapInfo == null,\n showCopyPositionButton: true,\n contentContainer: \"div.infodrawer-content-holder\",\n },\n [\n h(\n LoadingArea,\n { loaded: !fetchingMapInfo, className: \"infodrawer-content\" },\n h.if(!fetchingMapInfo)(InfoDrawerMainPanel, {\n mapInfo,\n columnInfo,\n xddInfo,\n fossilInfo,\n }),\n ),\n children,\n ],\n );\n}\n\nfunction InfoDrawerMainPanel({ mapInfo, columnInfo, xddInfo, fossilInfo }) {\n if (!mapInfo || !mapInfo.mapData) {\n return null;\n }\n\n console.log(\"InfoDrawerMainPanel\", fossilInfo);\n\n let source =\n mapInfo && mapInfo.mapData && mapInfo.mapData.length\n ? mapInfo.mapData[0]\n : {\n name: null,\n descrip: null,\n comments: null,\n liths: [],\n b_int: {},\n t_int: {},\n ref: {},\n };\n\n return h([\n h(RegionalStratigraphy, {\n mapInfo,\n columnInfo,\n }),\n h(FossilCollections, { data: fossilInfo, expanded: true }),\n h(MacrostratLinkedData, {\n mapInfo,\n bedrockMatchExpanded: true,\n source,\n }),\n h.if(xddInfo)(XddExpansion, { xddInfo }),\n h(Physiography, { mapInfo }),\n ]);\n}\n\nfunction fetchMapInfo(lng, lat, z) {\n return useAPIResult(`${apiV2Prefix}/mobile/map_query_v2`, {\n lng,\n lat,\n z,\n })?.success?.data;\n}\n\nfunction fetchColumnInfo(lng, lat) {\n return useAPIResult(`${apiV2Prefix}/columns`, {\n lat,\n lng,\n response: \"long\",\n })?.success?.data?.[0];\n}\n\nfunction fetchXddInfo(stratNames) {\n return useAPIResult(`${gddDomain}/api/v1/snippets`, {\n article_limit: 20,\n term: stratNames?.map((d) => d.rank_name).join(\",\"),\n })?.success?.data;\n}\n\nfunction fetchFossilInfo(lng, lat) {\n const collectionResponse = useAPIResult(\n `${paleobioDomain}/data1.2/colls/list.json?lngmin=${lng - 0.1}&lngmax=${lng + 0.1}&latmin=${lat - 0.1}&latmax=${lat + 0.1}`,\n )?.records;\n\n const occurrences = useAPIResult(\n `${paleobioDomain}/data1.2/occs/list.json?lngmin=${lng - 0.1}&lngmax=${lng + 0.1}&latmin=${lat - 0.1}&latmax=${lat + 0.1}`,\n )?.records;\n\n if (!collectionResponse || !occurrences) {\n return null;\n }\n\n try {\n return collectionResponse.map((col) => {\n col.occurrences = [];\n occurrences.forEach((occ) => {\n if (occ.cid === col.oid) {\n col.occurrences.push(occ);\n }\n });\n return col;\n });\n } catch (error) {\n console.log(error);\n return [];\n }\n}\n"],"names":[],"version":3,"file":"map-interface.e5607033.js.map"}
@@ -1,2 +1,2 @@
1
- function $parcel$exportWildcard(e,r){return Object.keys(r).forEach(function(a){"default"===a||"__esModule"===a||Object.prototype.hasOwnProperty.call(e,a)||Object.defineProperty(e,a,{enumerable:!0,get:function(){return r[a]}})}),e}require("./map-interface.ed6b5586.js"),require("./map-interface.6184dc0f.js"),require("./map-interface.7e13bea8.js"),require("./map-interface.b14f08e8.js"),require("./map-interface.7aaa58c9.js"),require("./map-interface.971af4bc.js"),require("./map-interface.33b7734a.js"),require("./map-interface.713361a4.js"),require("./map-interface.d92b296e.js"),require("./map-interface.10f5ef81.js"),require("./map-interface.8764423a.js");var $parcel$global=globalThis,$parcel$modules={},$parcel$inits={},parcelRequire=$parcel$global.parcelRequirea149;null==parcelRequire&&((parcelRequire=function(e){if(e in $parcel$modules)return $parcel$modules[e].exports;if(e in $parcel$inits){var r=$parcel$inits[e];delete $parcel$inits[e];var a={id:e,exports:{}};return $parcel$modules[e]=a,r.call(a.exports,a,a.exports),a.exports}var c=Error("Cannot find module '"+e+"'");throw c.code="MODULE_NOT_FOUND",c}).register=function(e,r){$parcel$inits[e]=r},$parcel$global.parcelRequirea149=parcelRequire);var parcelRegister=parcelRequire.register,$d7LVS=parcelRequire("d7LVS"),$6t6Bb=parcelRequire("6t6Bb"),$jVPp0=parcelRequire("jVPp0"),$lw3Ik=parcelRequire("lw3Ik"),$3wYIs=parcelRequire("3wYIs"),$cL8YF=parcelRequire("cL8YF"),$7CmOU=parcelRequire("7CmOU"),$R3my3=parcelRequire("R3my3"),$66CcX=parcelRequire("66CcX"),$e9x7B=parcelRequire("e9x7B"),$7B6S4=parcelRequire("7B6S4");$parcel$exportWildcard(module.exports,$d7LVS),$parcel$exportWildcard(module.exports,$6t6Bb),$parcel$exportWildcard(module.exports,$jVPp0),$parcel$exportWildcard(module.exports,$lw3Ik),$parcel$exportWildcard(module.exports,$3wYIs),$parcel$exportWildcard(module.exports,$cL8YF),$parcel$exportWildcard(module.exports,$7CmOU),$parcel$exportWildcard(module.exports,$R3my3),$parcel$exportWildcard(module.exports,$66CcX),$parcel$exportWildcard(module.exports,$e9x7B),$parcel$exportWildcard(module.exports,$7B6S4);
1
+ function $parcel$exportWildcard(e,r){return Object.keys(r).forEach(function(a){"default"===a||"__esModule"===a||Object.prototype.hasOwnProperty.call(e,a)||Object.defineProperty(e,a,{enumerable:!0,get:function(){return r[a]}})}),e}require("./map-interface.ed6b5586.js"),require("./map-interface.6184dc0f.js"),require("./map-interface.7e13bea8.js"),require("./map-interface.b14f08e8.js"),require("./map-interface.7aaa58c9.js"),require("./map-interface.971af4bc.js"),require("./map-interface.33b7734a.js"),require("./map-interface.713361a4.js"),require("./map-interface.d92b296e.js"),require("./map-interface.10f5ef81.js"),require("./map-interface.ee63d11f.js");var $parcel$global=globalThis,$parcel$modules={},$parcel$inits={},parcelRequire=$parcel$global.parcelRequirea149;null==parcelRequire&&((parcelRequire=function(e){if(e in $parcel$modules)return $parcel$modules[e].exports;if(e in $parcel$inits){var r=$parcel$inits[e];delete $parcel$inits[e];var a={id:e,exports:{}};return $parcel$modules[e]=a,r.call(a.exports,a,a.exports),a.exports}var c=Error("Cannot find module '"+e+"'");throw c.code="MODULE_NOT_FOUND",c}).register=function(e,r){$parcel$inits[e]=r},$parcel$global.parcelRequirea149=parcelRequire);var parcelRegister=parcelRequire.register,$d7LVS=parcelRequire("d7LVS"),$6t6Bb=parcelRequire("6t6Bb"),$jVPp0=parcelRequire("jVPp0"),$lw3Ik=parcelRequire("lw3Ik"),$3wYIs=parcelRequire("3wYIs"),$cL8YF=parcelRequire("cL8YF"),$7CmOU=parcelRequire("7CmOU"),$R3my3=parcelRequire("R3my3"),$66CcX=parcelRequire("66CcX"),$e9x7B=parcelRequire("e9x7B"),$7B6S4=parcelRequire("7B6S4");$parcel$exportWildcard(module.exports,$d7LVS),$parcel$exportWildcard(module.exports,$6t6Bb),$parcel$exportWildcard(module.exports,$jVPp0),$parcel$exportWildcard(module.exports,$lw3Ik),$parcel$exportWildcard(module.exports,$3wYIs),$parcel$exportWildcard(module.exports,$cL8YF),$parcel$exportWildcard(module.exports,$7CmOU),$parcel$exportWildcard(module.exports,$R3my3),$parcel$exportWildcard(module.exports,$66CcX),$parcel$exportWildcard(module.exports,$e9x7B),$parcel$exportWildcard(module.exports,$7B6S4);
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"mappings":"A,S,uB,C,C,C,E,O,O,I,C,G,O,C,S,C,E,Y,G,A,e,G,O,S,C,c,C,I,C,E,I,O,c,C,E,E,C,W,C,E,I,W,O,C,C,E,A,C,E,G,C,C,Q,gD,Q,gD,Q,gD,Q,gD,Q,gD,Q,gD,Q,gD,Q,gD,Q,gD,Q,gD,Q,gD,I,e,W,gB,C,E,c,C,E,c,e,iB,A,O,gB,A,C,c,S,C,E,G,K,gB,O,e,C,E,C,O,C,G,K,c,C,I,E,a,C,E,A,Q,a,C,E,C,I,E,C,G,E,Q,C,C,E,O,e,C,E,C,E,E,I,C,E,O,C,E,E,O,E,E,O,A,C,I,E,A,M,uB,E,I,O,E,I,C,mB,C,C,E,Q,C,S,C,C,C,E,a,C,E,C,C,E,e,iB,C,e,I,e,c,Q,C,O,c,S,O,c,S,O,c,S,O,c,S,O,c,S,O,c,S,O,c,S,O,c,S,O,c,S,O,c,S,O,c,S,uB,O,O,C,Q,uB,O,O,C,Q,uB,O,O,C,Q,uB,O,O,C,Q,uB,O,O,C,Q,uB,O,O,C,Q,uB,O,O,C,Q,uB,O,O,C,Q,uB,O,O,C,Q,uB,O,O,C,Q,uB,O,O,C","sources":["<anon>","packages/map-interface/src/index.ts"],"sourcesContent":["require(\"./map-interface.ed6b5586.js\");\nrequire(\"./map-interface.6184dc0f.js\");\nrequire(\"./map-interface.7e13bea8.js\");\nrequire(\"./map-interface.b14f08e8.js\");\nrequire(\"./map-interface.7aaa58c9.js\");\nrequire(\"./map-interface.971af4bc.js\");\nrequire(\"./map-interface.33b7734a.js\");\nrequire(\"./map-interface.713361a4.js\");\nrequire(\"./map-interface.d92b296e.js\");\nrequire(\"./map-interface.10f5ef81.js\");\nrequire(\"./map-interface.8764423a.js\");\n\n\nfunction $parcel$exportWildcard(dest, source) {\n Object.keys(source).forEach(function(key) {\n if (key === 'default' || key === '__esModule' || Object.prototype.hasOwnProperty.call(dest, key)) {\n return;\n }\n\n Object.defineProperty(dest, key, {\n enumerable: true,\n get: function get() {\n return source[key];\n }\n });\n });\n\n return dest;\n}\n\n var $parcel$global = globalThis;\n \nvar $parcel$modules = {};\nvar $parcel$inits = {};\n\nvar parcelRequire = $parcel$global[\"parcelRequirea149\"];\n\nif (parcelRequire == null) {\n parcelRequire = function(id) {\n if (id in $parcel$modules) {\n return $parcel$modules[id].exports;\n }\n if (id in $parcel$inits) {\n var init = $parcel$inits[id];\n delete $parcel$inits[id];\n var module = {id: id, exports: {}};\n $parcel$modules[id] = module;\n init.call(module.exports, module, module.exports);\n return module.exports;\n }\n var err = new Error(\"Cannot find module '\" + id + \"'\");\n err.code = 'MODULE_NOT_FOUND';\n throw err;\n };\n\n parcelRequire.register = function register(id, init) {\n $parcel$inits[id] = init;\n };\n\n $parcel$global[\"parcelRequirea149\"] = parcelRequire;\n}\n\nvar parcelRegister = parcelRequire.register;\n\nvar $d7LVS = parcelRequire(\"d7LVS\");\n\nvar $6t6Bb = parcelRequire(\"6t6Bb\");\n\nvar $jVPp0 = parcelRequire(\"jVPp0\");\n\nvar $lw3Ik = parcelRequire(\"lw3Ik\");\n\nvar $3wYIs = parcelRequire(\"3wYIs\");\n\nvar $cL8YF = parcelRequire(\"cL8YF\");\n\nvar $7CmOU = parcelRequire(\"7CmOU\");\n\nvar $R3my3 = parcelRequire(\"R3my3\");\n\nvar $66CcX = parcelRequire(\"66CcX\");\n\nvar $e9x7B = parcelRequire(\"e9x7B\");\n\nvar $7B6S4 = parcelRequire(\"7B6S4\");\n$parcel$exportWildcard(module.exports, $d7LVS);\n$parcel$exportWildcard(module.exports, $6t6Bb);\n$parcel$exportWildcard(module.exports, $jVPp0);\n$parcel$exportWildcard(module.exports, $lw3Ik);\n$parcel$exportWildcard(module.exports, $3wYIs);\n$parcel$exportWildcard(module.exports, $cL8YF);\n$parcel$exportWildcard(module.exports, $7CmOU);\n$parcel$exportWildcard(module.exports, $R3my3);\n$parcel$exportWildcard(module.exports, $66CcX);\n$parcel$exportWildcard(module.exports, $e9x7B);\n$parcel$exportWildcard(module.exports, $7B6S4);\n\n\n//# sourceMappingURL=index.js.map\n","export * from \"./context-panel\";\nexport * from \"./location-panel\";\nexport * from \"./dev\";\nexport * from \"./container\";\nexport * from \"./map-view\";\nexport * from \"./controls\";\nexport * from \"./helpers\";\nexport * from \"./utils\";\nexport * from \"./location-info\";\nexport * from \"./expansion-panel\";\nexport * from \"./map-panel\";\n"],"names":["$parcel$exportWildcard","dest","source","Object","keys","forEach","key","prototype","hasOwnProperty","call","defineProperty","enumerable","get","require","$parcel$global","globalThis","$parcel$modules","$parcel$inits","parcelRequire","id","exports","init","module","err","Error","code","register","parcelRegister","$d7LVS","$6t6Bb","$jVPp0","$lw3Ik","$3wYIs","$cL8YF","$7CmOU","$R3my3","$66CcX","$e9x7B","$7B6S4"],"version":3,"file":"index.js.map","sourceRoot":"../../../../"}
1
+ {"mappings":"A,S,uB,C,C,C,E,O,O,I,C,G,O,C,S,C,E,Y,G,A,e,G,O,S,C,c,C,I,C,E,I,O,c,C,E,E,C,W,C,E,I,W,O,C,C,E,A,C,E,G,C,C,Q,gD,Q,gD,Q,gD,Q,gD,Q,gD,Q,gD,Q,gD,Q,gD,Q,gD,Q,gD,Q,gD,I,e,W,gB,C,E,c,C,E,c,e,iB,A,O,gB,A,C,c,S,C,E,G,K,gB,O,e,C,E,C,O,C,G,K,c,C,I,E,a,C,E,A,Q,a,C,E,C,I,E,C,G,E,Q,C,C,E,O,e,C,E,C,E,E,I,C,E,O,C,E,E,O,E,E,O,A,C,I,E,A,M,uB,E,I,O,E,I,C,mB,C,C,E,Q,C,S,C,C,C,E,a,C,E,C,C,E,e,iB,C,e,I,e,c,Q,C,O,c,S,O,c,S,O,c,S,O,c,S,O,c,S,O,c,S,O,c,S,O,c,S,O,c,S,O,c,S,O,c,S,uB,O,O,C,Q,uB,O,O,C,Q,uB,O,O,C,Q,uB,O,O,C,Q,uB,O,O,C,Q,uB,O,O,C,Q,uB,O,O,C,Q,uB,O,O,C,Q,uB,O,O,C,Q,uB,O,O,C,Q,uB,O,O,C","sources":["<anon>","packages/map-interface/src/index.ts"],"sourcesContent":["require(\"./map-interface.ed6b5586.js\");\nrequire(\"./map-interface.6184dc0f.js\");\nrequire(\"./map-interface.7e13bea8.js\");\nrequire(\"./map-interface.b14f08e8.js\");\nrequire(\"./map-interface.7aaa58c9.js\");\nrequire(\"./map-interface.971af4bc.js\");\nrequire(\"./map-interface.33b7734a.js\");\nrequire(\"./map-interface.713361a4.js\");\nrequire(\"./map-interface.d92b296e.js\");\nrequire(\"./map-interface.10f5ef81.js\");\nrequire(\"./map-interface.ee63d11f.js\");\n\n\nfunction $parcel$exportWildcard(dest, source) {\n Object.keys(source).forEach(function(key) {\n if (key === 'default' || key === '__esModule' || Object.prototype.hasOwnProperty.call(dest, key)) {\n return;\n }\n\n Object.defineProperty(dest, key, {\n enumerable: true,\n get: function get() {\n return source[key];\n }\n });\n });\n\n return dest;\n}\n\n var $parcel$global = globalThis;\n \nvar $parcel$modules = {};\nvar $parcel$inits = {};\n\nvar parcelRequire = $parcel$global[\"parcelRequirea149\"];\n\nif (parcelRequire == null) {\n parcelRequire = function(id) {\n if (id in $parcel$modules) {\n return $parcel$modules[id].exports;\n }\n if (id in $parcel$inits) {\n var init = $parcel$inits[id];\n delete $parcel$inits[id];\n var module = {id: id, exports: {}};\n $parcel$modules[id] = module;\n init.call(module.exports, module, module.exports);\n return module.exports;\n }\n var err = new Error(\"Cannot find module '\" + id + \"'\");\n err.code = 'MODULE_NOT_FOUND';\n throw err;\n };\n\n parcelRequire.register = function register(id, init) {\n $parcel$inits[id] = init;\n };\n\n $parcel$global[\"parcelRequirea149\"] = parcelRequire;\n}\n\nvar parcelRegister = parcelRequire.register;\n\nvar $d7LVS = parcelRequire(\"d7LVS\");\n\nvar $6t6Bb = parcelRequire(\"6t6Bb\");\n\nvar $jVPp0 = parcelRequire(\"jVPp0\");\n\nvar $lw3Ik = parcelRequire(\"lw3Ik\");\n\nvar $3wYIs = parcelRequire(\"3wYIs\");\n\nvar $cL8YF = parcelRequire(\"cL8YF\");\n\nvar $7CmOU = parcelRequire(\"7CmOU\");\n\nvar $R3my3 = parcelRequire(\"R3my3\");\n\nvar $66CcX = parcelRequire(\"66CcX\");\n\nvar $e9x7B = parcelRequire(\"e9x7B\");\n\nvar $7B6S4 = parcelRequire(\"7B6S4\");\n$parcel$exportWildcard(module.exports, $d7LVS);\n$parcel$exportWildcard(module.exports, $6t6Bb);\n$parcel$exportWildcard(module.exports, $jVPp0);\n$parcel$exportWildcard(module.exports, $lw3Ik);\n$parcel$exportWildcard(module.exports, $3wYIs);\n$parcel$exportWildcard(module.exports, $cL8YF);\n$parcel$exportWildcard(module.exports, $7CmOU);\n$parcel$exportWildcard(module.exports, $R3my3);\n$parcel$exportWildcard(module.exports, $66CcX);\n$parcel$exportWildcard(module.exports, $e9x7B);\n$parcel$exportWildcard(module.exports, $7B6S4);\n\n\n//# sourceMappingURL=index.js.map\n","export * from \"./context-panel\";\nexport * from \"./location-panel\";\nexport * from \"./dev\";\nexport * from \"./container\";\nexport * from \"./map-view\";\nexport * from \"./controls\";\nexport * from \"./helpers\";\nexport * from \"./utils\";\nexport * from \"./location-info\";\nexport * from \"./expansion-panel\";\nexport * from \"./map-panel\";\n"],"names":["$parcel$exportWildcard","dest","source","Object","keys","forEach","key","prototype","hasOwnProperty","call","defineProperty","enumerable","get","require","$parcel$global","globalThis","$parcel$modules","$parcel$inits","parcelRequire","id","exports","init","module","err","Error","code","register","parcelRegister","$d7LVS","$6t6Bb","$jVPp0","$lw3Ik","$3wYIs","$cL8YF","$7CmOU","$R3my3","$66CcX","$e9x7B","$7B6S4"],"version":3,"file":"index.js.map","sourceRoot":"../../../../"}
@@ -0,0 +1,2 @@
1
+ require("./map-interface.5fbb81b1.js"),require("./map-interface.ecfe462b.js"),require("./map-interface.f42969c3.js"),require("./map-interface.7963263e.js"),require("./map-interface.995ff472.js"),require("./map-interface.c3275c05.js"),require("./map-interface.fbe01b07.js");var $hLLCF$macrostrathyper=require("@macrostrat/hyper"),$hLLCF$macrostratmapinterface=require("@macrostrat/map-interface"),$hLLCF$macrostratuicomponents=require("@macrostrat/ui-components");function $parcel$interopDefault(a){return a&&a.__esModule?a.default:a}function $parcel$export(a,e,r,c){Object.defineProperty(a,e,{get:r,set:c,enumerable:!0,configurable:!0})}var $parcel$global=globalThis,$parcel$modules={},$parcel$inits={},parcelRequire=$parcel$global.parcelRequirea149;null==parcelRequire&&((parcelRequire=function(a){if(a in $parcel$modules)return $parcel$modules[a].exports;if(a in $parcel$inits){var e=$parcel$inits[a];delete $parcel$inits[a];var r={id:a,exports:{}};return $parcel$modules[a]=r,e.call(r.exports,r,r.exports),r.exports}var c=Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}).register=function(a,e){$parcel$inits[a]=e},$parcel$global.parcelRequirea149=parcelRequire);var parcelRegister=parcelRequire.register;$parcel$export(module.exports,"InfoDrawer",()=>$1c63896c6b26afc0$export$6644c89560e2c31f);var $jVbYH=parcelRequire("jVbYH"),$bBXCB=parcelRequire("bBXCB"),$lgfMb=parcelRequire("lgfMb"),$bJAsY=parcelRequire("bJAsY"),$dIa8c=parcelRequire("dIa8c"),$kzrf8=parcelRequire("kzrf8"),$72xcd=parcelRequire("72xcd");let $1c63896c6b26afc0$var$apiV2Prefix="https://dev.macrostrat.org/api/v2",$1c63896c6b26afc0$var$gddDomain="https://xdd.wisc.edu",$1c63896c6b26afc0$var$paleobioDomain="https://paleobiodb.org",$1c63896c6b26afc0$var$h=$parcel$interopDefault($hLLCF$macrostrathyper).styled($parcel$interopDefault($lgfMb));function $1c63896c6b26afc0$export$6644c89560e2c31f(a){let{className:e,position:r,zoom:c,setSelectedLocation:t,children:n=null}=a,{lat:o,lng:$}=r,l=$1c63896c6b26afc0$var$fetchMapInfo($,o,c),i=$1c63896c6b26afc0$var$fetchColumnInfo($,o),s=$1c63896c6b26afc0$var$fetchFossilInfo($,o),f=$1c63896c6b26afc0$var$fetchXddInfo(l?.mapData?.[0]?.macrostrat?.strat_names);console.log("fossilInfo",s);let p=null==l;return $1c63896c6b26afc0$var$h($hLLCF$macrostratmapinterface.LocationPanel,{className:e,position:r,elevation:l?.elevation,zoom:c,onClose:()=>t(null),loading:null==l,showCopyPositionButton:!0,contentContainer:"div.infodrawer-content-holder"},[$1c63896c6b26afc0$var$h($bJAsY.LoadingArea,{loaded:!p,className:"infodrawer-content"},$1c63896c6b26afc0$var$h.if(!p)($1c63896c6b26afc0$var$InfoDrawerMainPanel,{mapInfo:l,columnInfo:i,xddInfo:f,fossilInfo:s})),n])}function $1c63896c6b26afc0$var$InfoDrawerMainPanel({mapInfo:a,columnInfo:e,xddInfo:r,fossilInfo:c}){if(!a||!a.mapData)return null;console.log("InfoDrawerMainPanel",c);let t=a&&a.mapData&&a.mapData.length?a.mapData[0]:{name:null,descrip:null,comments:null,liths:[],b_int:{},t_int:{},ref:{}};return $1c63896c6b26afc0$var$h([$1c63896c6b26afc0$var$h($dIa8c.RegionalStratigraphy,{mapInfo:a,columnInfo:e}),$1c63896c6b26afc0$var$h($72xcd.FossilCollections,{data:c,expanded:!0}),$1c63896c6b26afc0$var$h($jVbYH.MacrostratLinkedData,{mapInfo:a,bedrockMatchExpanded:!0,source:t}),$1c63896c6b26afc0$var$h.if(r)($kzrf8.XddExpansion,{xddInfo:r}),$1c63896c6b26afc0$var$h($bBXCB.Physiography,{mapInfo:a})])}function $1c63896c6b26afc0$var$fetchMapInfo(a,e,r){return(0,$hLLCF$macrostratuicomponents.useAPIResult)(`${$1c63896c6b26afc0$var$apiV2Prefix}/mobile/map_query_v2`,{lng:a,lat:e,z:r})?.success?.data}function $1c63896c6b26afc0$var$fetchColumnInfo(a,e){return(0,$hLLCF$macrostratuicomponents.useAPIResult)(`${$1c63896c6b26afc0$var$apiV2Prefix}/columns`,{lat:e,lng:a,response:"long"})?.success?.data?.[0]}function $1c63896c6b26afc0$var$fetchXddInfo(a){return(0,$hLLCF$macrostratuicomponents.useAPIResult)("https://xdd.wisc.edu/api/v1/snippets",{article_limit:20,term:a?.map(a=>a.rank_name).join(",")})?.success?.data}function $1c63896c6b26afc0$var$fetchFossilInfo(a,e){let r=(0,$hLLCF$macrostratuicomponents.useAPIResult)(`${$1c63896c6b26afc0$var$paleobioDomain}/data1.2/colls/list.json?lngmin=${a-.1}&lngmax=${a+.1}&latmin=${e-.1}&latmax=${e+.1}`)?.records,c=(0,$hLLCF$macrostratuicomponents.useAPIResult)(`${$1c63896c6b26afc0$var$paleobioDomain}/data1.2/occs/list.json?lngmin=${a-.1}&lngmax=${a+.1}&latmin=${e-.1}&latmax=${e+.1}`)?.records;if(!r||!c)return null;try{return r.map(a=>(a.occurrences=[],c.forEach(e=>{e.cid===a.oid&&a.occurrences.push(e)}),a))}catch(a){return console.log(a),[]}}
2
+ //# sourceMappingURL=map-interface.2dde967a.js.map
@@ -0,0 +1 @@
1
+ {"mappings":"A,Q,gD,Q,gD,Q,gD,Q,gD,Q,gD,Q,gD,Q,gD,I,uB,Q,qB,8B,Q,6B,8B,Q,6B,S,uB,C,E,O,G,E,U,C,E,O,C,C,C,S,e,C,C,C,C,C,C,C,E,O,c,C,E,E,C,I,E,I,E,W,C,E,a,C,C,E,C,I,e,W,gB,C,E,c,C,E,c,e,iB,A,O,gB,A,C,c,S,C,E,G,K,gB,O,e,C,E,C,O,C,G,K,c,C,I,E,a,C,E,A,Q,a,C,E,C,I,E,C,G,E,Q,C,C,E,O,e,C,E,C,E,E,I,C,E,O,C,E,E,O,E,E,O,A,C,I,E,A,M,uB,E,I,O,E,I,C,mB,C,C,E,Q,C,S,C,C,C,E,a,C,E,C,C,E,e,iB,C,e,I,e,c,Q,C,e,O,O,C,a,I,2C,I,O,c,S,O,c,S,O,c,S,O,c,S,O,c,S,O,c,S,O,c,SCWA,IAAM,kCAAc,oCACd,gCAAY,uBACZ,qCAAiB,yBAEjB,wBAAI,AAAA,u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,qCAAe,+BAA+B,EAAE,EAAM,GAAI,QAAQ,EAAE,EAAM,GAAI,QAAQ,EAAE,EAAM,GAAI,QAAQ,EAAE,EAAM,GAAA,CAAK,GACzH,QAEH,GAAI,CAAC,GAAsB,CAAC,EAC1B,OAAO,KAGT,GAAI,CACF,OAAO,EAAmB,GAAG,CAAC,AAAC,IAC7B,EAAI,WAAW,CAAG,EAAE,CACpB,EAAY,OAAO,CAAC,AAAC,IACf,EAAI,GAAG,GAAK,EAAI,GAAG,EACrB,EAAI,WAAW,CAAC,IAAI,CAAC,EAEzB,GACO,GAEX,CAAE,MAAO,EAAO,CAEd,OADA,QAAQ,GAAG,CAAC,GACL,EAAE,AACX,CACF","sources":["<anon>","packages/map-interface/src/map-panel/components/info-drawer/index.ts"],"sourcesContent":["require(\"./map-interface.5fbb81b1.js\");\nrequire(\"./map-interface.ecfe462b.js\");\nrequire(\"./map-interface.f42969c3.js\");\nrequire(\"./map-interface.7963263e.js\");\nrequire(\"./map-interface.995ff472.js\");\nrequire(\"./map-interface.c3275c05.js\");\nrequire(\"./map-interface.fbe01b07.js\");\nvar $hLLCF$macrostrathyper = require(\"@macrostrat/hyper\");\nvar $hLLCF$macrostratmapinterface = require(\"@macrostrat/map-interface\");\nvar $hLLCF$macrostratuicomponents = require(\"@macrostrat/ui-components\");\n\n\nfunction $parcel$interopDefault(a) {\n return a && a.__esModule ? a.default : a;\n}\n\nfunction $parcel$export(e, n, v, s) {\n Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});\n}\n\n var $parcel$global = globalThis;\n \nvar $parcel$modules = {};\nvar $parcel$inits = {};\n\nvar parcelRequire = $parcel$global[\"parcelRequirea149\"];\n\nif (parcelRequire == null) {\n parcelRequire = function(id) {\n if (id in $parcel$modules) {\n return $parcel$modules[id].exports;\n }\n if (id in $parcel$inits) {\n var init = $parcel$inits[id];\n delete $parcel$inits[id];\n var module = {id: id, exports: {}};\n $parcel$modules[id] = module;\n init.call(module.exports, module, module.exports);\n return module.exports;\n }\n var err = new Error(\"Cannot find module '\" + id + \"'\");\n err.code = 'MODULE_NOT_FOUND';\n throw err;\n };\n\n parcelRequire.register = function register(id, init) {\n $parcel$inits[id] = init;\n };\n\n $parcel$global[\"parcelRequirea149\"] = parcelRequire;\n}\n\nvar parcelRegister = parcelRequire.register;\n\n$parcel$export(module.exports, \"InfoDrawer\", () => $1c63896c6b26afc0$export$6644c89560e2c31f);\n\n\n\nvar $jVbYH = parcelRequire(\"jVbYH\");\n\nvar $bBXCB = parcelRequire(\"bBXCB\");\n\nvar $lgfMb = parcelRequire(\"lgfMb\");\n\nvar $bJAsY = parcelRequire(\"bJAsY\");\n\nvar $dIa8c = parcelRequire(\"dIa8c\");\n\nvar $kzrf8 = parcelRequire(\"kzrf8\");\n\n\nvar $72xcd = parcelRequire(\"72xcd\");\nconst $1c63896c6b26afc0$var$apiV2Prefix = `https://dev.macrostrat.org/api/v2`;\nconst $1c63896c6b26afc0$var$gddDomain = `https://xdd.wisc.edu`;\nconst $1c63896c6b26afc0$var$paleobioDomain = `https://paleobiodb.org`;\nconst $1c63896c6b26afc0$var$h = (0, ($parcel$interopDefault($hLLCF$macrostrathyper))).styled((0, (/*@__PURE__*/$parcel$interopDefault($lgfMb))));\nfunction $1c63896c6b26afc0$export$6644c89560e2c31f(props) {\n const { className: className, position: position, zoom: zoom, setSelectedLocation: setSelectedLocation, children: children = null } = props;\n const { lat: lat, lng: lng } = position;\n const mapInfo = $1c63896c6b26afc0$var$fetchMapInfo(lng, lat, zoom);\n const columnInfo = $1c63896c6b26afc0$var$fetchColumnInfo(lng, lat);\n const fossilInfo = $1c63896c6b26afc0$var$fetchFossilInfo(lng, lat);\n const xddInfo = $1c63896c6b26afc0$var$fetchXddInfo(mapInfo?.mapData?.[0]?.macrostrat?.strat_names);\n console.log(\"fossilInfo\", fossilInfo);\n const fetchingMapInfo = mapInfo == null;\n return $1c63896c6b26afc0$var$h((0, $hLLCF$macrostratmapinterface.LocationPanel), {\n className: className,\n position: position,\n elevation: mapInfo?.elevation,\n zoom: zoom,\n onClose: ()=>setSelectedLocation(null),\n loading: mapInfo == null,\n showCopyPositionButton: true,\n contentContainer: \"div.infodrawer-content-holder\"\n }, [\n $1c63896c6b26afc0$var$h((0, $bJAsY.LoadingArea), {\n loaded: !fetchingMapInfo,\n className: \"infodrawer-content\"\n }, $1c63896c6b26afc0$var$h.if(!fetchingMapInfo)($1c63896c6b26afc0$var$InfoDrawerMainPanel, {\n mapInfo: mapInfo,\n columnInfo: columnInfo,\n xddInfo: xddInfo,\n fossilInfo: fossilInfo\n })),\n children\n ]);\n}\nfunction $1c63896c6b26afc0$var$InfoDrawerMainPanel({ mapInfo: mapInfo, columnInfo: columnInfo, xddInfo: xddInfo, fossilInfo: fossilInfo }) {\n if (!mapInfo || !mapInfo.mapData) return null;\n console.log(\"InfoDrawerMainPanel\", fossilInfo);\n let source = mapInfo && mapInfo.mapData && mapInfo.mapData.length ? mapInfo.mapData[0] : {\n name: null,\n descrip: null,\n comments: null,\n liths: [],\n b_int: {},\n t_int: {},\n ref: {}\n };\n return $1c63896c6b26afc0$var$h([\n $1c63896c6b26afc0$var$h((0, $dIa8c.RegionalStratigraphy), {\n mapInfo: mapInfo,\n columnInfo: columnInfo\n }),\n $1c63896c6b26afc0$var$h((0, $72xcd.FossilCollections), {\n data: fossilInfo,\n expanded: true\n }),\n $1c63896c6b26afc0$var$h((0, $jVbYH.MacrostratLinkedData), {\n mapInfo: mapInfo,\n bedrockMatchExpanded: true,\n source: source\n }),\n $1c63896c6b26afc0$var$h.if(xddInfo)((0, $kzrf8.XddExpansion), {\n xddInfo: xddInfo\n }),\n $1c63896c6b26afc0$var$h((0, $bBXCB.Physiography), {\n mapInfo: mapInfo\n })\n ]);\n}\nfunction $1c63896c6b26afc0$var$fetchMapInfo(lng, lat, z) {\n return (0, $hLLCF$macrostratuicomponents.useAPIResult)(`${$1c63896c6b26afc0$var$apiV2Prefix}/mobile/map_query_v2`, {\n lng: lng,\n lat: lat,\n z: z\n })?.success?.data;\n}\nfunction $1c63896c6b26afc0$var$fetchColumnInfo(lng, lat) {\n return (0, $hLLCF$macrostratuicomponents.useAPIResult)(`${$1c63896c6b26afc0$var$apiV2Prefix}/columns`, {\n lat: lat,\n lng: lng,\n response: \"long\"\n })?.success?.data?.[0];\n}\nfunction $1c63896c6b26afc0$var$fetchXddInfo(stratNames) {\n return (0, $hLLCF$macrostratuicomponents.useAPIResult)(`${$1c63896c6b26afc0$var$gddDomain}/api/v1/snippets`, {\n article_limit: 20,\n term: stratNames?.map((d)=>d.rank_name).join(\",\")\n })?.success?.data;\n}\nfunction $1c63896c6b26afc0$var$fetchFossilInfo(lng, lat) {\n const collectionResponse = (0, $hLLCF$macrostratuicomponents.useAPIResult)(`${$1c63896c6b26afc0$var$paleobioDomain}/data1.2/colls/list.json?lngmin=${lng - 0.1}&lngmax=${lng + 0.1}&latmin=${lat - 0.1}&latmax=${lat + 0.1}`)?.records;\n const occurrences = (0, $hLLCF$macrostratuicomponents.useAPIResult)(`${$1c63896c6b26afc0$var$paleobioDomain}/data1.2/occs/list.json?lngmin=${lng - 0.1}&lngmax=${lng + 0.1}&latmin=${lat - 0.1}&latmax=${lat + 0.1}`)?.records;\n if (!collectionResponse || !occurrences) return null;\n try {\n return collectionResponse.map((col)=>{\n col.occurrences = [];\n occurrences.forEach((occ)=>{\n if (occ.cid === col.oid) col.occurrences.push(occ);\n });\n return col;\n });\n } catch (error) {\n console.log(error);\n return [];\n }\n}\n\n\n//# sourceMappingURL=map-interface.2dde967a.js.map\n","import hyper from \"@macrostrat/hyper\";\nimport { LocationPanel } from \"@macrostrat/map-interface\";\nimport { MacrostratLinkedData } from \"./macrostrat-linked\";\nimport { Physiography } from \"./physiography\";\nimport styles from \"./main.module.styl\";\nimport { LoadingArea } from \"../transitions\";\nimport { RegionalStratigraphy } from \"./reg-strat\";\nimport { XddExpansion } from \"./xdd-panel\";\nimport { useAPIResult } from \"@macrostrat/ui-components\";\nimport { FossilCollections } from \"./fossil-collections\";\n\nconst apiV2Prefix = `https://dev.macrostrat.org/api/v2`;\nconst gddDomain = `https://xdd.wisc.edu`;\nconst paleobioDomain = `https://paleobiodb.org`;\n\nconst h = hyper.styled(styles);\n\nexport function InfoDrawer(props) {\n const {\n className,\n position,\n zoom,\n setSelectedLocation,\n children = null,\n } = props;\n\n const { lat, lng } = position;\n\n const mapInfo = fetchMapInfo(lng, lat, zoom);\n const columnInfo = fetchColumnInfo(lng, lat);\n const fossilInfo = fetchFossilInfo(lng, lat);\n const xddInfo = fetchXddInfo(mapInfo?.mapData?.[0]?.macrostrat?.strat_names);\n\n console.log(\"fossilInfo\", fossilInfo);\n\n const fetchingMapInfo = mapInfo == null;\n\n return h(\n LocationPanel,\n {\n className,\n position,\n elevation: mapInfo?.elevation,\n zoom,\n onClose: () => setSelectedLocation(null),\n loading: mapInfo == null,\n showCopyPositionButton: true,\n contentContainer: \"div.infodrawer-content-holder\",\n },\n [\n h(\n LoadingArea,\n { loaded: !fetchingMapInfo, className: \"infodrawer-content\" },\n h.if(!fetchingMapInfo)(InfoDrawerMainPanel, {\n mapInfo,\n columnInfo,\n xddInfo,\n fossilInfo,\n }),\n ),\n children,\n ],\n );\n}\n\nfunction InfoDrawerMainPanel({ mapInfo, columnInfo, xddInfo, fossilInfo }) {\n if (!mapInfo || !mapInfo.mapData) {\n return null;\n }\n\n console.log(\"InfoDrawerMainPanel\", fossilInfo);\n\n let source =\n mapInfo && mapInfo.mapData && mapInfo.mapData.length\n ? mapInfo.mapData[0]\n : {\n name: null,\n descrip: null,\n comments: null,\n liths: [],\n b_int: {},\n t_int: {},\n ref: {},\n };\n\n return h([\n h(RegionalStratigraphy, {\n mapInfo,\n columnInfo,\n }),\n h(FossilCollections, { data: fossilInfo, expanded: true }),\n h(MacrostratLinkedData, {\n mapInfo,\n bedrockMatchExpanded: true,\n source,\n }),\n h.if(xddInfo)(XddExpansion, { xddInfo }),\n h(Physiography, { mapInfo }),\n ]);\n}\n\nfunction fetchMapInfo(lng, lat, z) {\n return useAPIResult(`${apiV2Prefix}/mobile/map_query_v2`, {\n lng,\n lat,\n z,\n })?.success?.data;\n}\n\nfunction fetchColumnInfo(lng, lat) {\n return useAPIResult(`${apiV2Prefix}/columns`, {\n lat,\n lng,\n response: \"long\",\n })?.success?.data?.[0];\n}\n\nfunction fetchXddInfo(stratNames) {\n return useAPIResult(`${gddDomain}/api/v1/snippets`, {\n article_limit: 20,\n term: stratNames?.map((d) => d.rank_name).join(\",\"),\n })?.success?.data;\n}\n\nfunction fetchFossilInfo(lng, lat) {\n const collectionResponse = useAPIResult(\n `${paleobioDomain}/data1.2/colls/list.json?lngmin=${lng - 0.1}&lngmax=${lng + 0.1}&latmin=${lat - 0.1}&latmax=${lat + 0.1}`,\n )?.records;\n\n const occurrences = useAPIResult(\n `${paleobioDomain}/data1.2/occs/list.json?lngmin=${lng - 0.1}&lngmax=${lng + 0.1}&latmin=${lat - 0.1}&latmax=${lat + 0.1}`,\n )?.records;\n\n if (!collectionResponse || !occurrences) {\n return null;\n }\n\n try {\n return collectionResponse.map((col) => {\n col.occurrences = [];\n occurrences.forEach((occ) => {\n if (occ.cid === col.oid) {\n col.occurrences.push(occ);\n }\n });\n return col;\n });\n } catch (error) {\n console.log(error);\n return [];\n }\n}\n"],"names":["require","$hLLCF$macrostrathyper","$hLLCF$macrostratmapinterface","$hLLCF$macrostratuicomponents","$parcel$interopDefault","a","__esModule","default","$parcel$export","e","n","v","s","Object","defineProperty","get","set","enumerable","configurable","$parcel$global","globalThis","$parcel$modules","$parcel$inits","parcelRequire","id","exports","init","module","call","err","Error","code","register","parcelRegister","$1c63896c6b26afc0$export$6644c89560e2c31f","$jVbYH","$bBXCB","$lgfMb","$bJAsY","$dIa8c","$kzrf8","$72xcd","$1c63896c6b26afc0$var$apiV2Prefix","$1c63896c6b26afc0$var$gddDomain","$1c63896c6b26afc0$var$paleobioDomain","$1c63896c6b26afc0$var$h","styled","props","className","position","zoom","setSelectedLocation","children","lat","lng","mapInfo","$1c63896c6b26afc0$var$fetchMapInfo","columnInfo","$1c63896c6b26afc0$var$fetchColumnInfo","fossilInfo","$1c63896c6b26afc0$var$fetchFossilInfo","xddInfo","$1c63896c6b26afc0$var$fetchXddInfo","mapData","macrostrat","strat_names","console","log","fetchingMapInfo","LocationPanel","elevation","onClose","loading","showCopyPositionButton","contentContainer","LoadingArea","loaded","if","$1c63896c6b26afc0$var$InfoDrawerMainPanel","source","length","name","descrip","comments","liths","b_int","t_int","ref","RegionalStratigraphy","FossilCollections","data","expanded","MacrostratLinkedData","bedrockMatchExpanded","XddExpansion","Physiography","z","useAPIResult","success","response","stratNames","article_limit","term","map","d","rank_name","join","collectionResponse","records","occurrences","col","forEach","occ","cid","oid","push","error"],"version":3,"file":"map-interface.2dde967a.js.map","sourceRoot":"../../../../"}
@@ -0,0 +1,2 @@
1
+ div._8WYhnW_pbdb-panel-header{background-color:var(--accent-secondary-color);flex-direction:row;justify-content:space-between;align-items:baseline;margin:0 -10px;padding:5px 10px;display:flex}div._8WYhnW_pbdb-panel-header h4{margin:0}._8WYhnW_fossil-collection{margin-bottom:1em}._8WYhnW_fossil-collection .bp5-tab-panel{margin-top:0}
2
+ /*# sourceMappingURL=map-interface.4dfbbb99.css.map */
@@ -0,0 +1 @@
1
+ {"mappings":"ACCA,gMAQE,0CAGF,6CAEE","sources":["map-interface.4dfbbb99.css","packages/map-interface/src/map-panel/components/info-drawer/fossil-collections/main.module.sass"],"sourcesContent":["div._8WYhnW_pbdb-panel-header {\n background-color: var(--accent-secondary-color);\n flex-direction: row;\n justify-content: space-between;\n align-items: baseline;\n margin: 0 -10px;\n padding: 5px 10px;\n display: flex;\n}\n\ndiv._8WYhnW_pbdb-panel-header h4 {\n margin: 0;\n}\n\n._8WYhnW_fossil-collection {\n margin-bottom: 1em;\n}\n\n._8WYhnW_fossil-collection .bp5-tab-panel {\n margin-top: 0;\n}\n/*# sourceMappingURL=map-interface.4dfbbb99.css.map */\n","\ndiv.pbdb-panel-header\n background-color: var(--accent-secondary-color)\n display: flex\n flex-direction: row\n justify-content: space-between\n align-items: baseline\n margin: 0 -10px\n padding: 5px 10px\n h4\n margin: 0\n\n.fossil-collection\n margin-bottom: 1em\n :global(.bp5-tab-panel)\n margin-top: 0px\n"],"names":[],"version":3,"file":"map-interface.4dfbbb99.css.map","sourceRoot":"../../../../"}
@@ -1,2 +1,2 @@
1
- require("./map-interface.792ebe85.js"),require("./map-interface.f42969c3.js");var $3ZHlr$macrostrathyper=require("@macrostrat/hyper"),$3ZHlr$macrostratmapinterface=require("@macrostrat/map-interface"),$3ZHlr$visxscale=require("@visx/scale"),$3ZHlr$visxaxis=require("@visx/axis"),$3ZHlr$chromajs=require("chroma-js"),$3ZHlr$macrostratdatacomponents=require("@macrostrat/data-components");function $parcel$interopDefault(e){return e&&e.__esModule?e.default:e}var $parcel$global=globalThis,$parcel$modules={},$parcel$inits={},parcelRequire=$parcel$global.parcelRequirea149;null==parcelRequire&&((parcelRequire=function(e){if(e in $parcel$modules)return $parcel$modules[e].exports;if(e in $parcel$inits){var a=$parcel$inits[e];delete $parcel$inits[e];var r={id:e,exports:{}};return $parcel$modules[e]=r,a.call(r.exports,r,r.exports),r.exports}var t=Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}).register=function(e,a){$parcel$inits[e]=a},$parcel$global.parcelRequirea149=parcelRequire);var parcelRegister=parcelRequire.register,$eO3Qe=parcelRequire("eO3Qe"),$lgfMb=parcelRequire("lgfMb");let $cf0bdf59758290f6$var$h=$parcel$interopDefault($3ZHlr$macrostrathyper).styled($parcel$interopDefault($lgfMb));function $cf0bdf59758290f6$export$fa9d8c2f420ac2bd(e){let{mapInfo:a,bedrockMatchExpanded:r,source:t}=e;return a.mapData[0]?$cf0bdf59758290f6$var$h($3ZHlr$macrostratmapinterface.ExpansionPanel,{className:"regional-panel",title:"Macrostrat-linked data",helpText:"via Macrostrat",expanded:r},[$cf0bdf59758290f6$var$h("div",{classes:$cf0bdf59758290f6$var$expansionPanelDetailClasses},[$cf0bdf59758290f6$var$h($cf0bdf59758290f6$var$MatchBasis,{source:t}),$cf0bdf59758290f6$var$h($cf0bdf59758290f6$var$AgeInformation,{mapInfo:a,source:t}),$cf0bdf59758290f6$var$h($cf0bdf59758290f6$var$Thickness,{source:t}),$cf0bdf59758290f6$var$h($cf0bdf59758290f6$var$MinorFossilCollections,{source:t}),$cf0bdf59758290f6$var$h($cf0bdf59758290f6$var$FossilOccs,{source:t}),$cf0bdf59758290f6$var$h($cf0bdf59758290f6$var$LithsAndClasses,{source:t}),$cf0bdf59758290f6$var$h($cf0bdf59758290f6$var$Environments,{source:t}),$cf0bdf59758290f6$var$h($cf0bdf59758290f6$var$Economy,{source:t})])]):$cf0bdf59758290f6$var$h("div")}let $cf0bdf59758290f6$var$expansionPanelDetailClasses={root:"expansion-panel-detail"};function $cf0bdf59758290f6$var$AgeInformation(e){let{source:a,mapInfo:r}=e,{macrostrat:t}=a;return t?.b_age?$cf0bdf59758290f6$var$h($cf0bdf59758290f6$var$MacrostratAgeInfo,{macrostrat:t,mapInfo:r}):$cf0bdf59758290f6$var$h($cf0bdf59758290f6$var$MapAgeRenderer,{mapInfo:r})}function $cf0bdf59758290f6$var$MapAgeRenderer(e){let{mapInfo:a,...r}=e;return $cf0bdf59758290f6$var$h($cf0bdf59758290f6$var$DescribedAgeInfo,{ageElement:$cf0bdf59758290f6$var$h($eO3Qe.AgeChip,{b_int:a.mapData[0].b_int,t_int:a.mapData[0].t_int})},"Based on geologic map description.")}function $cf0bdf59758290f6$var$DescribedAgeInfo(e){let{ageElement:a,children:r,className:t}=e;return $cf0bdf59758290f6$var$h("div.described-age.macrostrast-detail",[$cf0bdf59758290f6$var$h("div.expansion-summary-title","Age"),$cf0bdf59758290f6$var$h("div.age-chips",null,a),$cf0bdf59758290f6$var$h("div.description",r)])}function $cf0bdf59758290f6$var$AgeRefinementBar({scale:e,data:a,color:r,label:t=null}){let{b_int:$,t_int:f}=a,n=a.b_age??$.b_age,c=a.t_age??f.t_age,i=r??$.color,o=$parcel$interopDefault($3ZHlr$chromajs)(i).darken(.5).hex(),l=$parcel$interopDefault($3ZHlr$chromajs)(i).darken(2).hex(),s=e(n),d=e(c)-e(n),m=5,v="start";return d<100&&(s<100?m=d+5:(m=-305,v="end")),$cf0bdf59758290f6$var$h("div.age-refinement-bar",{style:{marginLeft:`${s}px`,width:`${d}px`,height:"18px",backgroundColor:i,border:`2px solid ${o}`,position:"relative"}},$cf0bdf59758290f6$var$h("div.age-refinement-bar-label",{style:{transform:`translateX(${m}px)`,color:l,fontSize:"10px",width:300,textAlign:v}},t))}function $cf0bdf59758290f6$var$AgeRefinementPlot({macrostrat:e,mapInfo:a}){let r=a.mapData[0],t=Math.max(r.b_int.b_age,e.b_age),$=Math.min(r.t_int.t_age,e.t_age),f=(0,$3ZHlr$visxscale.scaleLinear)({domain:[1.02*t,.98*$],range:[20,360]});return $cf0bdf59758290f6$var$h("div.age-refinement-plot",[$cf0bdf59758290f6$var$h($cf0bdf59758290f6$var$AgeRefinementBar,{scale:f,data:e,label:"Macrostrat age model"}),$cf0bdf59758290f6$var$h($cf0bdf59758290f6$var$AgeRefinementBar,{scale:f,data:r,label:"Map legend"}),$cf0bdf59758290f6$var$h("svg",{width:"100%",height:"40px"},[$cf0bdf59758290f6$var$h($3ZHlr$visxaxis.AxisBottom,{scale:f,numTicks:5,top:1,left:0,label:"Age (Ma)"})])])}function $cf0bdf59758290f6$var$MacrostratAgeInfoCore({macrostrat:e}){let{b_age:a,t_age:r,b_int:t,t_int:$}=e;if(!a)return null;let f=t.int_name;return t.int_id!==$.int_id&&(f+=` - ${$.int_name}`),$cf0bdf59758290f6$var$h($cf0bdf59758290f6$var$DescribedAgeInfo,{ageElement:$cf0bdf59758290f6$var$h($eO3Qe.AgeChip,{b_int:{...t,int_name:f,b_age:a,t_age:r},t_int:{...t,int_name:f,b_age:a,t_age:r}})},"Refined using the Macrostrat age model.")}function $cf0bdf59758290f6$var$MacrostratAgeInfo(e){return $cf0bdf59758290f6$var$h($3ZHlr$macrostratmapinterface.ExpandableDetailsPanel,{headerElement:$cf0bdf59758290f6$var$h($cf0bdf59758290f6$var$MacrostratAgeInfoCore,e)},$cf0bdf59758290f6$var$h($3ZHlr$macrostratmapinterface.ExpansionBody,{title:"Age refinement"},$cf0bdf59758290f6$var$h($cf0bdf59758290f6$var$AgeRefinementPlot,e)))}function $cf0bdf59758290f6$var$MatchBasis(e){let{source:a}=e;return a.macrostrat?.strat_names?$cf0bdf59758290f6$var$h($3ZHlr$macrostratmapinterface.ExpandableDetailsPanel,{className:"macrostrat-unit",headerElement:$cf0bdf59758290f6$var$h([$cf0bdf59758290f6$var$h("h3",a.macrostrat.strat_names[0].rank_name),$cf0bdf59758290f6$var$h("div.description","Matched stratigraphic unit")])},$cf0bdf59758290f6$var$h($3ZHlr$macrostratmapinterface.ExpansionBody,{title:"All matched names"},[a.macrostrat.strat_names.map((e,r)=>{let t=r==a.macrostrat.strat_names.length-1;return $cf0bdf59758290f6$var$h("span",{key:r},[$cf0bdf59758290f6$var$h("a.externalLink",{href:"/lex/strat-names/"+e.strat_name_id,key:r},[e.rank_name]),$cf0bdf59758290f6$var$h.if(!t)([", "])])})])):null}function $cf0bdf59758290f6$var$Thickness(e){let{source:a}=e;return a.macrostrat.max_thick?$cf0bdf59758290f6$var$h.if(a.macrostrat&&a.macrostrat.max_thick)("div.macrostrat-detail",[$cf0bdf59758290f6$var$h("div.expansion-summary-title","Thickness"),$cf0bdf59758290f6$var$h("div",[a.macrostrat.min_min_thick," - ",a.macrostrat.max_thick,"m"])]):$cf0bdf59758290f6$var$h("div")}function $cf0bdf59758290f6$var$MinorFossilCollections(e){let{source:a}=e,{macrostrat:r}=a;return r.pbdb_collections?$cf0bdf59758290f6$var$h.if(r&&r.pbdb_collections)("div.macrostrat-detail",[$cf0bdf59758290f6$var$h("div.expansion-summary-title","Fossil collections"),$cf0bdf59758290f6$var$h("div",[r.pbdb_collections])]):$cf0bdf59758290f6$var$h("div")}function $cf0bdf59758290f6$var$FossilOccs(e){let{source:a}=e,{macrostrat:r}=a;return r?.pbdb_occs?$cf0bdf59758290f6$var$h("div.macrostrat-detail",[$cf0bdf59758290f6$var$h("div.expansion-summary-title","Fossil occurrences"),$cf0bdf59758290f6$var$h("div",[r.pbdb_occs])]):null}function $cf0bdf59758290f6$var$LithTypes(e){let{lith_types:a}=e;return $cf0bdf59758290f6$var$h.if(a&&a.length>0)("div.lithologies.lithology-types",[$cf0bdf59758290f6$var$h($3ZHlr$macrostratdatacomponents.LithologyList,{lithologies:a})])}function $cf0bdf59758290f6$var$LithsAndClasses(e){let{source:a}=e,{macrostrat:r}=a,{liths:t=null,lith_types:$=null}=r;if(!t||0==t.length)return null;let f=t.map(e=>({...e,name:e.lith,color:e.color||"#000000"}));return $cf0bdf59758290f6$var$h($3ZHlr$macrostratmapinterface.ExpandableDetailsPanel,{title:"Lithology",value:$cf0bdf59758290f6$var$h($cf0bdf59758290f6$var$LithTypes,{lith_types:$})},$cf0bdf59758290f6$var$h($3ZHlr$macrostratmapinterface.ExpansionBody,{title:"Matched lithologies"},[$cf0bdf59758290f6$var$h($3ZHlr$macrostratdatacomponents.LithologyList,{lithologies:f,onClickItem:(e,a)=>{window.open("/lex/lithology/"+a.lith_id,"_self")}})]))}function $cf0bdf59758290f6$var$EnvironTypes(e){let{environ_types:a}=e;return $cf0bdf59758290f6$var$h.if(a&&a.length>0)($3ZHlr$macrostratdatacomponents.LithologyList,{lithologies:a?.filter(e=>""!=e.name)})}function $cf0bdf59758290f6$var$Environments(e){let{source:a}=e,{macrostrat:r}=a,{environs:t=null,environ_types:$=null}=r;if(!t||0==t.length)return null;let f=t.map(e=>({...e,name:e.environ,color:e.color||"#000000"}));return $cf0bdf59758290f6$var$h($3ZHlr$macrostratmapinterface.ExpandableDetailsPanel,{title:"Environment",value:$cf0bdf59758290f6$var$h($cf0bdf59758290f6$var$EnvironTypes,{environ_types:$})},$cf0bdf59758290f6$var$h($3ZHlr$macrostratmapinterface.ExpansionBody,{title:"Matched environments"},[$cf0bdf59758290f6$var$h($3ZHlr$macrostratdatacomponents.LithologyList,{lithologies:f,onClickItem:(e,a)=>{window.open("/lex/environments/"+a.environ_id,"_self")}})]))}function $cf0bdf59758290f6$var$EconType(e){let{econ_types:a}=e;return $cf0bdf59758290f6$var$h.if(a&&a.length>0)("div",[a.map((e,a)=>$cf0bdf59758290f6$var$h($eO3Qe.AttrChip,{key:a,name:e.name,color:e.color}))])}function $cf0bdf59758290f6$var$Economy(e){let{source:a}=e,{macrostrat:r}=a,{econs:t=null,econ_types:$=null}=r;return t?$cf0bdf59758290f6$var$h.if(t&&t.length>0)($3ZHlr$macrostratmapinterface.ExpandableDetailsPanel,{title:"Economy ",value:$cf0bdf59758290f6$var$h($cf0bdf59758290f6$var$EconType,{econ_types:$})},$cf0bdf59758290f6$var$h($3ZHlr$macrostratmapinterface.ExpansionBody,{title:"Matched economic attributes"},[t.map((e,a)=>$cf0bdf59758290f6$var$h($eO3Qe.AttrChip,{key:a,name:e.econ,color:e.color}))])):$cf0bdf59758290f6$var$h("div")}
2
- //# sourceMappingURL=map-interface.42e8f2ba.js.map
1
+ require("./map-interface.d4cd446a.js"),require("./map-interface.f42969c3.js");var $3ZHlr$macrostrathyper=require("@macrostrat/hyper"),$3ZHlr$macrostratmapinterface=require("@macrostrat/map-interface"),$3ZHlr$visxscale=require("@visx/scale"),$3ZHlr$visxaxis=require("@visx/axis"),$3ZHlr$chromajs=require("chroma-js"),$3ZHlr$macrostratdatacomponents=require("@macrostrat/data-components");function $parcel$interopDefault(e){return e&&e.__esModule?e.default:e}var $parcel$global=globalThis,$parcel$modules={},$parcel$inits={},parcelRequire=$parcel$global.parcelRequirea149;null==parcelRequire&&((parcelRequire=function(e){if(e in $parcel$modules)return $parcel$modules[e].exports;if(e in $parcel$inits){var a=$parcel$inits[e];delete $parcel$inits[e];var r={id:e,exports:{}};return $parcel$modules[e]=r,a.call(r.exports,r,r.exports),r.exports}var t=Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}).register=function(e,a){$parcel$inits[e]=a},$parcel$global.parcelRequirea149=parcelRequire);var parcelRegister=parcelRequire.register,$eO3Qe=parcelRequire("eO3Qe"),$lgfMb=parcelRequire("lgfMb");let $cf0bdf59758290f6$var$h=$parcel$interopDefault($3ZHlr$macrostrathyper).styled($parcel$interopDefault($lgfMb));function $cf0bdf59758290f6$export$fa9d8c2f420ac2bd(e){let{mapInfo:a,bedrockMatchExpanded:r,source:t}=e;return a.mapData[0]?$cf0bdf59758290f6$var$h($3ZHlr$macrostratmapinterface.ExpansionPanel,{className:"regional-panel",title:"Macrostrat-linked data",helpText:"via Macrostrat",expanded:r},[$cf0bdf59758290f6$var$h("div",{classes:$cf0bdf59758290f6$var$expansionPanelDetailClasses},[$cf0bdf59758290f6$var$h($cf0bdf59758290f6$var$MatchBasis,{source:t}),$cf0bdf59758290f6$var$h($cf0bdf59758290f6$var$AgeInformation,{mapInfo:a,source:t}),$cf0bdf59758290f6$var$h($cf0bdf59758290f6$var$Thickness,{source:t}),$cf0bdf59758290f6$var$h($cf0bdf59758290f6$var$MinorFossilCollections,{source:t}),$cf0bdf59758290f6$var$h($cf0bdf59758290f6$var$FossilOccs,{source:t}),$cf0bdf59758290f6$var$h($cf0bdf59758290f6$var$LithsAndClasses,{source:t}),$cf0bdf59758290f6$var$h($cf0bdf59758290f6$var$Environments,{source:t}),$cf0bdf59758290f6$var$h($cf0bdf59758290f6$var$Economy,{source:t})])]):$cf0bdf59758290f6$var$h("div")}let $cf0bdf59758290f6$var$expansionPanelDetailClasses={root:"expansion-panel-detail"};function $cf0bdf59758290f6$var$AgeInformation(e){let{source:a,mapInfo:r}=e,{macrostrat:t}=a;return t?.b_age?$cf0bdf59758290f6$var$h($cf0bdf59758290f6$var$MacrostratAgeInfo,{macrostrat:t,mapInfo:r}):$cf0bdf59758290f6$var$h($cf0bdf59758290f6$var$MapAgeRenderer,{mapInfo:r})}function $cf0bdf59758290f6$var$MapAgeRenderer(e){let{mapInfo:a,...r}=e;return $cf0bdf59758290f6$var$h($cf0bdf59758290f6$var$DescribedAgeInfo,{ageElement:$cf0bdf59758290f6$var$h($eO3Qe.AgeChip,{b_int:a.mapData[0].b_int,t_int:a.mapData[0].t_int})},"Based on geologic map description.")}function $cf0bdf59758290f6$var$DescribedAgeInfo(e){let{ageElement:a,children:r,className:t}=e;return $cf0bdf59758290f6$var$h("div.described-age.macrostrast-detail",[$cf0bdf59758290f6$var$h("div.expansion-summary-title","Age"),$cf0bdf59758290f6$var$h("div.age-chips",null,a),$cf0bdf59758290f6$var$h("div.description",r)])}function $cf0bdf59758290f6$var$AgeRefinementBar({scale:e,data:a,color:r,label:t=null}){let{b_int:$,t_int:f}=a,n=a.b_age??$.b_age,c=a.t_age??f.t_age,i=r??$.color,o=$parcel$interopDefault($3ZHlr$chromajs)(i).darken(.5).hex(),l=$parcel$interopDefault($3ZHlr$chromajs)(i).darken(2).hex(),s=e(n),d=e(c)-e(n),m=5,v="start";return d<100&&(s<100?m=d+5:(m=-305,v="end")),$cf0bdf59758290f6$var$h("div.age-refinement-bar",{style:{marginLeft:`${s}px`,width:`${d}px`,height:"18px",backgroundColor:i,border:`2px solid ${o}`,position:"relative"}},$cf0bdf59758290f6$var$h("div.age-refinement-bar-label",{style:{transform:`translateX(${m}px)`,color:l,fontSize:"10px",width:300,textAlign:v}},t))}function $cf0bdf59758290f6$var$AgeRefinementPlot({macrostrat:e,mapInfo:a}){let r=a.mapData[0],t=Math.max(r.b_int.b_age,e.b_age),$=Math.min(r.t_int.t_age,e.t_age),f=(0,$3ZHlr$visxscale.scaleLinear)({domain:[1.02*t,.98*$],range:[20,360]});return $cf0bdf59758290f6$var$h("div.age-refinement-plot",[$cf0bdf59758290f6$var$h($cf0bdf59758290f6$var$AgeRefinementBar,{scale:f,data:e,label:"Macrostrat age model"}),$cf0bdf59758290f6$var$h($cf0bdf59758290f6$var$AgeRefinementBar,{scale:f,data:r,label:"Map legend"}),$cf0bdf59758290f6$var$h("svg",{width:"100%",height:"40px"},[$cf0bdf59758290f6$var$h($3ZHlr$visxaxis.AxisBottom,{scale:f,numTicks:5,top:1,left:0,label:"Age (Ma)"})])])}function $cf0bdf59758290f6$var$MacrostratAgeInfoCore({macrostrat:e}){let{b_age:a,t_age:r,b_int:t,t_int:$}=e;if(!a)return null;let f=t.int_name;return t.int_id!==$.int_id&&(f+=` - ${$.int_name}`),$cf0bdf59758290f6$var$h($cf0bdf59758290f6$var$DescribedAgeInfo,{ageElement:$cf0bdf59758290f6$var$h($eO3Qe.AgeChip,{b_int:{...t,int_name:f,b_age:a,t_age:r},t_int:{...t,int_name:f,b_age:a,t_age:r}})},"Refined using the Macrostrat age model.")}function $cf0bdf59758290f6$var$MacrostratAgeInfo(e){return $cf0bdf59758290f6$var$h($3ZHlr$macrostratmapinterface.ExpandableDetailsPanel,{headerElement:$cf0bdf59758290f6$var$h($cf0bdf59758290f6$var$MacrostratAgeInfoCore,e)},$cf0bdf59758290f6$var$h($3ZHlr$macrostratmapinterface.ExpansionBody,{title:"Age refinement"},$cf0bdf59758290f6$var$h($cf0bdf59758290f6$var$AgeRefinementPlot,e)))}function $cf0bdf59758290f6$var$MatchBasis(e){let{source:a}=e;return a.macrostrat?.strat_names?$cf0bdf59758290f6$var$h($3ZHlr$macrostratmapinterface.ExpandableDetailsPanel,{className:"macrostrat-unit",headerElement:$cf0bdf59758290f6$var$h([$cf0bdf59758290f6$var$h("h3",a.macrostrat.strat_names[0].rank_name),$cf0bdf59758290f6$var$h("div.description","Matched stratigraphic unit")])},$cf0bdf59758290f6$var$h($3ZHlr$macrostratmapinterface.ExpansionBody,{title:"All matched names"},[a.macrostrat.strat_names.map((e,r)=>{let t=r==a.macrostrat.strat_names.length-1;return $cf0bdf59758290f6$var$h("span",{key:r},[$cf0bdf59758290f6$var$h("a.externalLink",{href:"/lex/strat-names/"+e.strat_name_id,key:r},[e.rank_name]),$cf0bdf59758290f6$var$h.if(!t)([", "])])})])):null}function $cf0bdf59758290f6$var$Thickness(e){let{source:a}=e;return a.macrostrat.max_thick?$cf0bdf59758290f6$var$h.if(a.macrostrat&&a.macrostrat.max_thick)("div.macrostrat-detail",[$cf0bdf59758290f6$var$h("div.expansion-summary-title","Thickness"),$cf0bdf59758290f6$var$h("div",[a.macrostrat.min_min_thick," - ",a.macrostrat.max_thick,"m"])]):$cf0bdf59758290f6$var$h("div")}function $cf0bdf59758290f6$var$MinorFossilCollections(e){let{source:a}=e,{macrostrat:r}=a;return r.pbdb_collections?$cf0bdf59758290f6$var$h.if(r&&r.pbdb_collections)("div.macrostrat-detail",[$cf0bdf59758290f6$var$h("div.expansion-summary-title","Fossil collections"),$cf0bdf59758290f6$var$h("div",[r.pbdb_collections])]):$cf0bdf59758290f6$var$h("div")}function $cf0bdf59758290f6$var$FossilOccs(e){let{source:a}=e,{macrostrat:r}=a;return r?.pbdb_occs?$cf0bdf59758290f6$var$h("div.macrostrat-detail",[$cf0bdf59758290f6$var$h("div.expansion-summary-title","Fossil occurrences"),$cf0bdf59758290f6$var$h("div",[r.pbdb_occs])]):null}function $cf0bdf59758290f6$var$LithTypes(e){let{lith_types:a}=e;return $cf0bdf59758290f6$var$h.if(a&&a.length>0)("div.lithologies.lithology-types",[$cf0bdf59758290f6$var$h($3ZHlr$macrostratdatacomponents.LithologyList,{lithologies:a})])}function $cf0bdf59758290f6$var$LithsAndClasses(e){let{source:a}=e,{macrostrat:r}=a,{liths:t=null,lith_types:$=null}=r;if(!t||0==t.length)return null;let f=t.map(e=>({...e,name:e.lith,color:e.color||"#000000"}));return $cf0bdf59758290f6$var$h($3ZHlr$macrostratmapinterface.ExpandableDetailsPanel,{title:"Lithology",value:$cf0bdf59758290f6$var$h($cf0bdf59758290f6$var$LithTypes,{lith_types:$})},$cf0bdf59758290f6$var$h($3ZHlr$macrostratmapinterface.ExpansionBody,{title:"Matched lithologies"},[$cf0bdf59758290f6$var$h($3ZHlr$macrostratdatacomponents.LithologyList,{lithologies:f,onClickItem:(e,a)=>{window.open("/lex/lithology/"+a.lith_id,"_self")}})]))}function $cf0bdf59758290f6$var$EnvironTypes(e){let{environ_types:a}=e;return $cf0bdf59758290f6$var$h.if(a&&a.length>0)($3ZHlr$macrostratdatacomponents.LithologyList,{lithologies:a?.filter(e=>""!=e.name)})}function $cf0bdf59758290f6$var$Environments(e){let{source:a}=e,{macrostrat:r}=a,{environs:t=null,environ_types:$=null}=r;if(!t||0==t.length)return null;let f=t.map(e=>({...e,name:e.environ,color:e.color||"#000000"}));return $cf0bdf59758290f6$var$h($3ZHlr$macrostratmapinterface.ExpandableDetailsPanel,{title:"Environment",value:$cf0bdf59758290f6$var$h($cf0bdf59758290f6$var$EnvironTypes,{environ_types:$})},$cf0bdf59758290f6$var$h($3ZHlr$macrostratmapinterface.ExpansionBody,{title:"Matched environments"},[$cf0bdf59758290f6$var$h($3ZHlr$macrostratdatacomponents.LithologyList,{lithologies:f,onClickItem:(e,a)=>{window.open("/lex/environments/"+a.environ_id,"_self")}})]))}function $cf0bdf59758290f6$var$EconType(e){let{econ_types:a}=e;return $cf0bdf59758290f6$var$h.if(a&&a.length>0)("div",[a.map((e,a)=>$cf0bdf59758290f6$var$h($eO3Qe.AttrChip,{key:a,name:e.name,color:e.color}))])}function $cf0bdf59758290f6$var$Economy(e){let{source:a}=e,{macrostrat:r}=a,{econs:t=null,econ_types:$=null}=r;return t?$cf0bdf59758290f6$var$h.if(t&&t.length>0)($3ZHlr$macrostratmapinterface.ExpandableDetailsPanel,{title:"Economy ",value:$cf0bdf59758290f6$var$h($cf0bdf59758290f6$var$EconType,{econ_types:$})},$cf0bdf59758290f6$var$h($3ZHlr$macrostratmapinterface.ExpansionBody,{title:"Matched economic attributes"},[t.map((e,a)=>$cf0bdf59758290f6$var$h($eO3Qe.AttrChip,{key:a,name:e.econ,color:e.color}))])):$cf0bdf59758290f6$var$h("div")}
2
+ //# sourceMappingURL=map-interface.5fbb81b1.js.map