@jjlmoya/utils-forensic-science 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +69 -0
- package/scripts/crystal-lattice-catalog-translations.mjs +459 -0
- package/scripts/postinstall.mjs +27 -0
- package/scripts/sync-crystal-lattice-i18n.mjs +50 -0
- package/src/category/i18n/de.ts +55 -0
- package/src/category/i18n/en.ts +55 -0
- package/src/category/i18n/es.ts +55 -0
- package/src/category/i18n/fr.ts +55 -0
- package/src/category/i18n/id.ts +55 -0
- package/src/category/i18n/it.ts +55 -0
- package/src/category/i18n/ja.ts +56 -0
- package/src/category/i18n/ko.ts +56 -0
- package/src/category/i18n/nl.ts +55 -0
- package/src/category/i18n/pl.ts +55 -0
- package/src/category/i18n/pt.ts +55 -0
- package/src/category/i18n/ru.ts +55 -0
- package/src/category/i18n/sv.ts +55 -0
- package/src/category/i18n/tr.ts +55 -0
- package/src/category/i18n/zh.ts +56 -0
- package/src/category/index.ts +48 -0
- package/src/category/seo.astro +15 -0
- package/src/components/PreviewNavSidebar.astro +116 -0
- package/src/components/PreviewToolbar.astro +143 -0
- package/src/data.ts +10 -0
- package/src/entries.ts +48 -0
- package/src/env.d.ts +5 -0
- package/src/index.ts +29 -0
- package/src/layouts/PreviewLayout.astro +117 -0
- package/src/pages/[locale]/[slug].astro +162 -0
- package/src/pages/[locale].astro +261 -0
- package/src/pages/index.astro +3 -0
- package/src/tests/diacritics_density.test.ts +140 -0
- package/src/tests/faq_count.test.ts +19 -0
- package/src/tests/i18n_coverage.test.ts +36 -0
- package/src/tests/inverted_punctuation.test.ts +84 -0
- package/src/tests/locale_completeness.test.ts +24 -0
- package/src/tests/mocks/astro_mock.js +2 -0
- package/src/tests/no_en_dash.test.ts +70 -0
- package/src/tests/no_h1_in_components.test.ts +48 -0
- package/src/tests/schemas_fulfillment.test.ts +23 -0
- package/src/tests/script_density.test.ts +94 -0
- package/src/tests/seo_length.test.ts +46 -0
- package/src/tests/shared-test-helpers.ts +56 -0
- package/src/tests/slug_language_code_format.test.ts +23 -0
- package/src/tests/slug_uniqueness.test.ts +81 -0
- package/src/tests/title_quality.test.ts +55 -0
- package/src/tests/tool_exports.test.ts +34 -0
- package/src/tests/tool_validation.test.ts +16 -0
- package/src/tests/widmark.test.ts +28 -0
- package/src/tool/forensic-age-estimator/bibliography.astro +14 -0
- package/src/tool/forensic-age-estimator/bibliography.ts +16 -0
- package/src/tool/forensic-age-estimator/component.astro +321 -0
- package/src/tool/forensic-age-estimator/dental-skeletal-third-molar-age-estimator.css +634 -0
- package/src/tool/forensic-age-estimator/entry.ts +32 -0
- package/src/tool/forensic-age-estimator/i18n/de.ts +245 -0
- package/src/tool/forensic-age-estimator/i18n/en.ts +245 -0
- package/src/tool/forensic-age-estimator/i18n/es.ts +245 -0
- package/src/tool/forensic-age-estimator/i18n/fr.ts +245 -0
- package/src/tool/forensic-age-estimator/i18n/id.ts +245 -0
- package/src/tool/forensic-age-estimator/i18n/it.ts +245 -0
- package/src/tool/forensic-age-estimator/i18n/ja.ts +245 -0
- package/src/tool/forensic-age-estimator/i18n/ko.ts +245 -0
- package/src/tool/forensic-age-estimator/i18n/nl.ts +245 -0
- package/src/tool/forensic-age-estimator/i18n/pl.ts +245 -0
- package/src/tool/forensic-age-estimator/i18n/pt.ts +245 -0
- package/src/tool/forensic-age-estimator/i18n/ru.ts +245 -0
- package/src/tool/forensic-age-estimator/i18n/sv.ts +245 -0
- package/src/tool/forensic-age-estimator/i18n/tr.ts +245 -0
- package/src/tool/forensic-age-estimator/i18n/zh.ts +246 -0
- package/src/tool/forensic-age-estimator/index.ts +11 -0
- package/src/tool/forensic-age-estimator/logic.ts +81 -0
- package/src/tool/forensic-age-estimator/seo.astro +15 -0
- package/src/tool/forensic-blood-test-simulator/bibliography.astro +6 -0
- package/src/tool/forensic-blood-test-simulator/bibliography.ts +12 -0
- package/src/tool/forensic-blood-test-simulator/component.astro +168 -0
- package/src/tool/forensic-blood-test-simulator/dom-utils.ts +40 -0
- package/src/tool/forensic-blood-test-simulator/entry.ts +32 -0
- package/src/tool/forensic-blood-test-simulator/forensic-presumptive-blood-testing-luminol-kastle-meyer-simulator.css +532 -0
- package/src/tool/forensic-blood-test-simulator/helpers.ts +16 -0
- package/src/tool/forensic-blood-test-simulator/i18n/de.ts +185 -0
- package/src/tool/forensic-blood-test-simulator/i18n/en.ts +185 -0
- package/src/tool/forensic-blood-test-simulator/i18n/es.ts +185 -0
- package/src/tool/forensic-blood-test-simulator/i18n/fr.ts +220 -0
- package/src/tool/forensic-blood-test-simulator/i18n/id.ts +220 -0
- package/src/tool/forensic-blood-test-simulator/i18n/it.ts +220 -0
- package/src/tool/forensic-blood-test-simulator/i18n/ja.ts +220 -0
- package/src/tool/forensic-blood-test-simulator/i18n/ko.ts +220 -0
- package/src/tool/forensic-blood-test-simulator/i18n/nl.ts +220 -0
- package/src/tool/forensic-blood-test-simulator/i18n/pl.ts +220 -0
- package/src/tool/forensic-blood-test-simulator/i18n/pt.ts +220 -0
- package/src/tool/forensic-blood-test-simulator/i18n/ru.ts +220 -0
- package/src/tool/forensic-blood-test-simulator/i18n/sv.ts +220 -0
- package/src/tool/forensic-blood-test-simulator/i18n/tr.ts +220 -0
- package/src/tool/forensic-blood-test-simulator/i18n/zh.ts +220 -0
- package/src/tool/forensic-blood-test-simulator/index.ts +11 -0
- package/src/tool/forensic-blood-test-simulator/logic.ts +174 -0
- package/src/tool/forensic-blood-test-simulator/script.ts +192 -0
- package/src/tool/forensic-blood-test-simulator/seo.astro +15 -0
- package/src/tool/forensic-fiber-comparison-microscope/bibliography.astro +6 -0
- package/src/tool/forensic-fiber-comparison-microscope/bibliography.ts +16 -0
- package/src/tool/forensic-fiber-comparison-microscope/component.astro +146 -0
- package/src/tool/forensic-fiber-comparison-microscope/entry.ts +32 -0
- package/src/tool/forensic-fiber-comparison-microscope/forensic-fiber-comparison-microscope.css +629 -0
- package/src/tool/forensic-fiber-comparison-microscope/i18n/de.ts +250 -0
- package/src/tool/forensic-fiber-comparison-microscope/i18n/en.ts +246 -0
- package/src/tool/forensic-fiber-comparison-microscope/i18n/es.ts +246 -0
- package/src/tool/forensic-fiber-comparison-microscope/i18n/fr.ts +246 -0
- package/src/tool/forensic-fiber-comparison-microscope/i18n/id.ts +250 -0
- package/src/tool/forensic-fiber-comparison-microscope/i18n/it.ts +246 -0
- package/src/tool/forensic-fiber-comparison-microscope/i18n/ja.ts +250 -0
- package/src/tool/forensic-fiber-comparison-microscope/i18n/ko.ts +246 -0
- package/src/tool/forensic-fiber-comparison-microscope/i18n/nl.ts +246 -0
- package/src/tool/forensic-fiber-comparison-microscope/i18n/pl.ts +250 -0
- package/src/tool/forensic-fiber-comparison-microscope/i18n/pt.ts +250 -0
- package/src/tool/forensic-fiber-comparison-microscope/i18n/ru.ts +250 -0
- package/src/tool/forensic-fiber-comparison-microscope/i18n/sv.ts +250 -0
- package/src/tool/forensic-fiber-comparison-microscope/i18n/tr.ts +246 -0
- package/src/tool/forensic-fiber-comparison-microscope/i18n/zh.ts +250 -0
- package/src/tool/forensic-fiber-comparison-microscope/index.ts +11 -0
- package/src/tool/forensic-fiber-comparison-microscope/logic.ts +244 -0
- package/src/tool/forensic-fiber-comparison-microscope/render.ts +265 -0
- package/src/tool/forensic-fiber-comparison-microscope/seo.astro +15 -0
- package/src/tool/forensic-fiber-comparison-microscope/view.ts +267 -0
- package/src/tool/forensic-glass-becke-line-simulator/bibliography.astro +6 -0
- package/src/tool/forensic-glass-becke-line-simulator/bibliography.ts +16 -0
- package/src/tool/forensic-glass-becke-line-simulator/component.astro +81 -0
- package/src/tool/forensic-glass-becke-line-simulator/entry.ts +32 -0
- package/src/tool/forensic-glass-becke-line-simulator/forensic-glass-becke-line-simulator.css +392 -0
- package/src/tool/forensic-glass-becke-line-simulator/i18n/de.ts +231 -0
- package/src/tool/forensic-glass-becke-line-simulator/i18n/en.ts +231 -0
- package/src/tool/forensic-glass-becke-line-simulator/i18n/es.ts +231 -0
- package/src/tool/forensic-glass-becke-line-simulator/i18n/fr.ts +231 -0
- package/src/tool/forensic-glass-becke-line-simulator/i18n/id.ts +231 -0
- package/src/tool/forensic-glass-becke-line-simulator/i18n/it.ts +231 -0
- package/src/tool/forensic-glass-becke-line-simulator/i18n/ja.ts +231 -0
- package/src/tool/forensic-glass-becke-line-simulator/i18n/ko.ts +231 -0
- package/src/tool/forensic-glass-becke-line-simulator/i18n/nl.ts +231 -0
- package/src/tool/forensic-glass-becke-line-simulator/i18n/pl.ts +231 -0
- package/src/tool/forensic-glass-becke-line-simulator/i18n/pt.ts +231 -0
- package/src/tool/forensic-glass-becke-line-simulator/i18n/ru.ts +231 -0
- package/src/tool/forensic-glass-becke-line-simulator/i18n/sv.ts +231 -0
- package/src/tool/forensic-glass-becke-line-simulator/i18n/tr.ts +231 -0
- package/src/tool/forensic-glass-becke-line-simulator/i18n/zh.ts +231 -0
- package/src/tool/forensic-glass-becke-line-simulator/index.ts +11 -0
- package/src/tool/forensic-glass-becke-line-simulator/logic.ts +100 -0
- package/src/tool/forensic-glass-becke-line-simulator/seo.astro +15 -0
- package/src/tool/forensic-glass-becke-line-simulator/view.ts +281 -0
- package/src/tool/forensic-image-authenticity-analyzer/bibliography.astro +9 -0
- package/src/tool/forensic-image-authenticity-analyzer/bibliography.ts +7 -0
- package/src/tool/forensic-image-authenticity-analyzer/component.astro +250 -0
- package/src/tool/forensic-image-authenticity-analyzer/entry.ts +29 -0
- package/src/tool/forensic-image-authenticity-analyzer/forensic-image-metadata-authenticity-analyzer.css +679 -0
- package/src/tool/forensic-image-authenticity-analyzer/i18n/de.ts +105 -0
- package/src/tool/forensic-image-authenticity-analyzer/i18n/en.ts +105 -0
- package/src/tool/forensic-image-authenticity-analyzer/i18n/es.ts +105 -0
- package/src/tool/forensic-image-authenticity-analyzer/i18n/fr.ts +105 -0
- package/src/tool/forensic-image-authenticity-analyzer/i18n/id.ts +76 -0
- package/src/tool/forensic-image-authenticity-analyzer/i18n/it.ts +105 -0
- package/src/tool/forensic-image-authenticity-analyzer/i18n/ja.ts +72 -0
- package/src/tool/forensic-image-authenticity-analyzer/i18n/ko.ts +72 -0
- package/src/tool/forensic-image-authenticity-analyzer/i18n/nl.ts +75 -0
- package/src/tool/forensic-image-authenticity-analyzer/i18n/pl.ts +75 -0
- package/src/tool/forensic-image-authenticity-analyzer/i18n/pt.ts +105 -0
- package/src/tool/forensic-image-authenticity-analyzer/i18n/ru.ts +75 -0
- package/src/tool/forensic-image-authenticity-analyzer/i18n/sv.ts +76 -0
- package/src/tool/forensic-image-authenticity-analyzer/i18n/tr.ts +76 -0
- package/src/tool/forensic-image-authenticity-analyzer/i18n/zh.ts +71 -0
- package/src/tool/forensic-image-authenticity-analyzer/index.ts +11 -0
- package/src/tool/forensic-image-authenticity-analyzer/logic.ts +283 -0
- package/src/tool/forensic-image-authenticity-analyzer/seo.astro +10 -0
- package/src/tool/forensic-microcrystal-drug-simulator/bibliography.astro +6 -0
- package/src/tool/forensic-microcrystal-drug-simulator/bibliography.ts +12 -0
- package/src/tool/forensic-microcrystal-drug-simulator/component.astro +240 -0
- package/src/tool/forensic-microcrystal-drug-simulator/entry.ts +32 -0
- package/src/tool/forensic-microcrystal-drug-simulator/forensic-microcrystal-drug-simulator.css +430 -0
- package/src/tool/forensic-microcrystal-drug-simulator/i18n/de.ts +244 -0
- package/src/tool/forensic-microcrystal-drug-simulator/i18n/en.ts +244 -0
- package/src/tool/forensic-microcrystal-drug-simulator/i18n/es.ts +244 -0
- package/src/tool/forensic-microcrystal-drug-simulator/i18n/fr.ts +244 -0
- package/src/tool/forensic-microcrystal-drug-simulator/i18n/id.ts +244 -0
- package/src/tool/forensic-microcrystal-drug-simulator/i18n/it.ts +244 -0
- package/src/tool/forensic-microcrystal-drug-simulator/i18n/ja.ts +244 -0
- package/src/tool/forensic-microcrystal-drug-simulator/i18n/ko.ts +244 -0
- package/src/tool/forensic-microcrystal-drug-simulator/i18n/nl.ts +244 -0
- package/src/tool/forensic-microcrystal-drug-simulator/i18n/pl.ts +244 -0
- package/src/tool/forensic-microcrystal-drug-simulator/i18n/pt.ts +244 -0
- package/src/tool/forensic-microcrystal-drug-simulator/i18n/ru.ts +244 -0
- package/src/tool/forensic-microcrystal-drug-simulator/i18n/sv.ts +244 -0
- package/src/tool/forensic-microcrystal-drug-simulator/i18n/tr.ts +244 -0
- package/src/tool/forensic-microcrystal-drug-simulator/i18n/zh.ts +244 -0
- package/src/tool/forensic-microcrystal-drug-simulator/index.ts +11 -0
- package/src/tool/forensic-microcrystal-drug-simulator/logic.ts +189 -0
- package/src/tool/forensic-microcrystal-drug-simulator/seo.astro +15 -0
- package/src/tool/forensic-sex-determinator/bibliography.astro +14 -0
- package/src/tool/forensic-sex-determinator/bibliography.ts +12 -0
- package/src/tool/forensic-sex-determinator/component.astro +463 -0
- package/src/tool/forensic-sex-determinator/entry.ts +32 -0
- package/src/tool/forensic-sex-determinator/forensic-sex-determinator.css +413 -0
- package/src/tool/forensic-sex-determinator/i18n/de.ts +211 -0
- package/src/tool/forensic-sex-determinator/i18n/en.ts +211 -0
- package/src/tool/forensic-sex-determinator/i18n/es.ts +211 -0
- package/src/tool/forensic-sex-determinator/i18n/fr.ts +211 -0
- package/src/tool/forensic-sex-determinator/i18n/id.ts +211 -0
- package/src/tool/forensic-sex-determinator/i18n/it.ts +211 -0
- package/src/tool/forensic-sex-determinator/i18n/ja.ts +211 -0
- package/src/tool/forensic-sex-determinator/i18n/ko.ts +211 -0
- package/src/tool/forensic-sex-determinator/i18n/nl.ts +211 -0
- package/src/tool/forensic-sex-determinator/i18n/pl.ts +211 -0
- package/src/tool/forensic-sex-determinator/i18n/pt.ts +211 -0
- package/src/tool/forensic-sex-determinator/i18n/ru.ts +211 -0
- package/src/tool/forensic-sex-determinator/i18n/sv.ts +211 -0
- package/src/tool/forensic-sex-determinator/i18n/tr.ts +211 -0
- package/src/tool/forensic-sex-determinator/i18n/zh.ts +211 -0
- package/src/tool/forensic-sex-determinator/index.ts +11 -0
- package/src/tool/forensic-sex-determinator/logic.ts +89 -0
- package/src/tool/forensic-sex-determinator/seo.astro +15 -0
- package/src/tool/forensic-stature-estimator/bibliography.astro +14 -0
- package/src/tool/forensic-stature-estimator/bibliography.ts +12 -0
- package/src/tool/forensic-stature-estimator/component.astro +49 -0
- package/src/tool/forensic-stature-estimator/components/EstimationPanel.astro +65 -0
- package/src/tool/forensic-stature-estimator/components/OsteometricBoard.astro +39 -0
- package/src/tool/forensic-stature-estimator/components/OsteometricSelector.astro +109 -0
- package/src/tool/forensic-stature-estimator/dom-utils.ts +71 -0
- package/src/tool/forensic-stature-estimator/entry.ts +32 -0
- package/src/tool/forensic-stature-estimator/forensic-stature-estimator.css +689 -0
- package/src/tool/forensic-stature-estimator/helpers.ts +51 -0
- package/src/tool/forensic-stature-estimator/i18n/de.ts +196 -0
- package/src/tool/forensic-stature-estimator/i18n/en.ts +196 -0
- package/src/tool/forensic-stature-estimator/i18n/es.ts +196 -0
- package/src/tool/forensic-stature-estimator/i18n/fr.ts +196 -0
- package/src/tool/forensic-stature-estimator/i18n/id.ts +196 -0
- package/src/tool/forensic-stature-estimator/i18n/it.ts +196 -0
- package/src/tool/forensic-stature-estimator/i18n/ja.ts +196 -0
- package/src/tool/forensic-stature-estimator/i18n/ko.ts +196 -0
- package/src/tool/forensic-stature-estimator/i18n/nl.ts +196 -0
- package/src/tool/forensic-stature-estimator/i18n/pl.ts +196 -0
- package/src/tool/forensic-stature-estimator/i18n/pt.ts +196 -0
- package/src/tool/forensic-stature-estimator/i18n/ru.ts +196 -0
- package/src/tool/forensic-stature-estimator/i18n/sv.ts +196 -0
- package/src/tool/forensic-stature-estimator/i18n/tr.ts +196 -0
- package/src/tool/forensic-stature-estimator/i18n/zh.ts +196 -0
- package/src/tool/forensic-stature-estimator/index.ts +11 -0
- package/src/tool/forensic-stature-estimator/logic.ts +119 -0
- package/src/tool/forensic-stature-estimator/script.ts +288 -0
- package/src/tool/forensic-stature-estimator/seo.astro +15 -0
- package/src/tool/forensic-tlc-ink-simulator/bibliography.astro +6 -0
- package/src/tool/forensic-tlc-ink-simulator/bibliography.ts +16 -0
- package/src/tool/forensic-tlc-ink-simulator/component.astro +245 -0
- package/src/tool/forensic-tlc-ink-simulator/entry.ts +32 -0
- package/src/tool/forensic-tlc-ink-simulator/forensic-tlc-ink-simulator.css +462 -0
- package/src/tool/forensic-tlc-ink-simulator/i18n/de.ts +243 -0
- package/src/tool/forensic-tlc-ink-simulator/i18n/en.ts +243 -0
- package/src/tool/forensic-tlc-ink-simulator/i18n/es.ts +243 -0
- package/src/tool/forensic-tlc-ink-simulator/i18n/fr.ts +243 -0
- package/src/tool/forensic-tlc-ink-simulator/i18n/id.ts +243 -0
- package/src/tool/forensic-tlc-ink-simulator/i18n/it.ts +243 -0
- package/src/tool/forensic-tlc-ink-simulator/i18n/ja.ts +235 -0
- package/src/tool/forensic-tlc-ink-simulator/i18n/ko.ts +235 -0
- package/src/tool/forensic-tlc-ink-simulator/i18n/nl.ts +243 -0
- package/src/tool/forensic-tlc-ink-simulator/i18n/pl.ts +243 -0
- package/src/tool/forensic-tlc-ink-simulator/i18n/pt.ts +243 -0
- package/src/tool/forensic-tlc-ink-simulator/i18n/ru.ts +243 -0
- package/src/tool/forensic-tlc-ink-simulator/i18n/sv.ts +243 -0
- package/src/tool/forensic-tlc-ink-simulator/i18n/tr.ts +243 -0
- package/src/tool/forensic-tlc-ink-simulator/i18n/zh.ts +235 -0
- package/src/tool/forensic-tlc-ink-simulator/index.ts +11 -0
- package/src/tool/forensic-tlc-ink-simulator/logic.ts +152 -0
- package/src/tool/forensic-tlc-ink-simulator/seo.astro +15 -0
- package/src/tool/gsr-dispersion-calculator/bibliography.astro +6 -0
- package/src/tool/gsr-dispersion-calculator/bibliography.ts +16 -0
- package/src/tool/gsr-dispersion-calculator/component.astro +294 -0
- package/src/tool/gsr-dispersion-calculator/entry.ts +32 -0
- package/src/tool/gsr-dispersion-calculator/gsr-dispersion-calculator.css +305 -0
- package/src/tool/gsr-dispersion-calculator/i18n/de.ts +272 -0
- package/src/tool/gsr-dispersion-calculator/i18n/en.ts +272 -0
- package/src/tool/gsr-dispersion-calculator/i18n/es.ts +272 -0
- package/src/tool/gsr-dispersion-calculator/i18n/fr.ts +272 -0
- package/src/tool/gsr-dispersion-calculator/i18n/id.ts +272 -0
- package/src/tool/gsr-dispersion-calculator/i18n/it.ts +272 -0
- package/src/tool/gsr-dispersion-calculator/i18n/ja.ts +272 -0
- package/src/tool/gsr-dispersion-calculator/i18n/ko.ts +272 -0
- package/src/tool/gsr-dispersion-calculator/i18n/nl.ts +272 -0
- package/src/tool/gsr-dispersion-calculator/i18n/pl.ts +272 -0
- package/src/tool/gsr-dispersion-calculator/i18n/pt.ts +272 -0
- package/src/tool/gsr-dispersion-calculator/i18n/ru.ts +272 -0
- package/src/tool/gsr-dispersion-calculator/i18n/sv.ts +272 -0
- package/src/tool/gsr-dispersion-calculator/i18n/tr.ts +272 -0
- package/src/tool/gsr-dispersion-calculator/i18n/zh.ts +272 -0
- package/src/tool/gsr-dispersion-calculator/index.ts +11 -0
- package/src/tool/gsr-dispersion-calculator/logic.ts +148 -0
- package/src/tool/gsr-dispersion-calculator/seo.astro +15 -0
- package/src/tool/widmark-alcohol-simulator/bibliography.astro +14 -0
- package/src/tool/widmark-alcohol-simulator/bibliography.ts +12 -0
- package/src/tool/widmark-alcohol-simulator/component.astro +453 -0
- package/src/tool/widmark-alcohol-simulator/entry.ts +32 -0
- package/src/tool/widmark-alcohol-simulator/i18n/de.ts +193 -0
- package/src/tool/widmark-alcohol-simulator/i18n/en.ts +206 -0
- package/src/tool/widmark-alcohol-simulator/i18n/es.ts +193 -0
- package/src/tool/widmark-alcohol-simulator/i18n/fr.ts +193 -0
- package/src/tool/widmark-alcohol-simulator/i18n/id.ts +193 -0
- package/src/tool/widmark-alcohol-simulator/i18n/it.ts +193 -0
- package/src/tool/widmark-alcohol-simulator/i18n/ja.ts +193 -0
- package/src/tool/widmark-alcohol-simulator/i18n/ko.ts +193 -0
- package/src/tool/widmark-alcohol-simulator/i18n/nl.ts +193 -0
- package/src/tool/widmark-alcohol-simulator/i18n/pl.ts +193 -0
- package/src/tool/widmark-alcohol-simulator/i18n/pt.ts +193 -0
- package/src/tool/widmark-alcohol-simulator/i18n/ru.ts +193 -0
- package/src/tool/widmark-alcohol-simulator/i18n/sv.ts +193 -0
- package/src/tool/widmark-alcohol-simulator/i18n/tr.ts +193 -0
- package/src/tool/widmark-alcohol-simulator/i18n/zh.ts +193 -0
- package/src/tool/widmark-alcohol-simulator/index.ts +11 -0
- package/src/tool/widmark-alcohol-simulator/logic.ts +97 -0
- package/src/tool/widmark-alcohol-simulator/seo.astro +15 -0
- package/src/tool/widmark-alcohol-simulator/widmark-alcohol-simulator.css +386 -0
- package/src/tools.ts +27 -0
- package/src/types.ts +70 -0
|
@@ -0,0 +1,463 @@
|
|
|
1
|
+
---
|
|
2
|
+
import './forensic-sex-determinator.css';
|
|
3
|
+
import { forensicSexDeterminator } from './index';
|
|
4
|
+
import type { KnownLocale } from '../../types';
|
|
5
|
+
|
|
6
|
+
interface Props {
|
|
7
|
+
locale?: KnownLocale;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const { locale = 'en' } = Astro.props;
|
|
11
|
+
const content = await forensicSexDeterminator.i18n[locale]?.();
|
|
12
|
+
if (!content) return null;
|
|
13
|
+
const { ui } = content;
|
|
14
|
+
|
|
15
|
+
const regions = [
|
|
16
|
+
{
|
|
17
|
+
title: ui.pelvisRegion,
|
|
18
|
+
desc: ui.pelvisDesc,
|
|
19
|
+
fields: [
|
|
20
|
+
{
|
|
21
|
+
id: 'subpubicAngle',
|
|
22
|
+
label: ui.subpubicAngle,
|
|
23
|
+
desc: ui.subpubicAngleDesc,
|
|
24
|
+
femText: ui.subpubicAngleFem,
|
|
25
|
+
mascText: ui.subpubicAngleMasc
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
id: 'sciaticNotch',
|
|
29
|
+
label: ui.sciaticNotch,
|
|
30
|
+
desc: ui.sciaticNotchDesc,
|
|
31
|
+
femText: ui.sciaticNotchFem,
|
|
32
|
+
mascText: ui.sciaticNotchMasc
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
id: 'ventralArc',
|
|
36
|
+
label: ui.ventralArc,
|
|
37
|
+
desc: ui.ventralArcDesc,
|
|
38
|
+
femText: ui.ventralArcFem,
|
|
39
|
+
mascText: ui.ventralArcMasc
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
id: 'preauricularSulcus',
|
|
43
|
+
label: ui.preauricularSulcus,
|
|
44
|
+
desc: ui.preauricularSulcusDesc,
|
|
45
|
+
femText: ui.preauricularSulcusFem,
|
|
46
|
+
mascText: ui.preauricularSulcusMasc
|
|
47
|
+
}
|
|
48
|
+
]
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
title: ui.craniumRegion,
|
|
52
|
+
desc: ui.cranialDesc,
|
|
53
|
+
fields: [
|
|
54
|
+
{
|
|
55
|
+
id: 'mastoidProcess',
|
|
56
|
+
label: ui.mastoidProcess,
|
|
57
|
+
desc: ui.mastoidProcessDesc,
|
|
58
|
+
femText: ui.mastoidProcessFem,
|
|
59
|
+
mascText: ui.mastoidProcessMasc
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
id: 'supraorbitalRidge',
|
|
63
|
+
label: ui.supraorbitalRidge,
|
|
64
|
+
desc: ui.supraorbitalRidgeDesc,
|
|
65
|
+
femText: ui.supraorbitalRidgeFem,
|
|
66
|
+
mascText: ui.supraorbitalRidgeMasc
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
id: 'mentalEminence',
|
|
70
|
+
label: ui.mentalEminence,
|
|
71
|
+
desc: ui.mentalEminenceDesc,
|
|
72
|
+
femText: ui.mentalEminenceFem,
|
|
73
|
+
mascText: ui.mentalEminenceMasc
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
id: 'nuchalCrest',
|
|
77
|
+
label: ui.nuchalCrest,
|
|
78
|
+
desc: ui.nuchalCrestDesc,
|
|
79
|
+
femText: ui.nuchalCrestFem,
|
|
80
|
+
mascText: ui.nuchalCrestMasc
|
|
81
|
+
}
|
|
82
|
+
]
|
|
83
|
+
}
|
|
84
|
+
];
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
<div class="forensic-sex-card">
|
|
88
|
+
<div class="forensic-sex-grid">
|
|
89
|
+
<div class="forensic-sex-inputs">
|
|
90
|
+
<div class="forensic-sex-anatomy-grid">
|
|
91
|
+
{regions.map((region) => (
|
|
92
|
+
<div class="forensic-sex-region">
|
|
93
|
+
<h3 class="forensic-sex-region-title">{region.title}</h3>
|
|
94
|
+
<p class="forensic-sex-region-desc">{region.desc}</p>
|
|
95
|
+
|
|
96
|
+
<div class="forensic-sex-fields-list">
|
|
97
|
+
{region.fields.map((field) => (
|
|
98
|
+
<div class="forensic-sex-field state-unevaluated" id={`field-card-${field.id}`}>
|
|
99
|
+
<div class="forensic-sex-field-header">
|
|
100
|
+
<span class="forensic-sex-label">{field.label}</span>
|
|
101
|
+
<span class="forensic-sex-desc">{field.desc}</span>
|
|
102
|
+
</div>
|
|
103
|
+
<div class="forensic-sex-field-body">
|
|
104
|
+
<div class="forensic-sex-control-side">
|
|
105
|
+
<div class="forensic-sex-slider-container">
|
|
106
|
+
<input type="range" id={`input-${field.id}`} name={field.id} min="0" max="5" value="0" class="forensic-sex-slider" />
|
|
107
|
+
<div class="forensic-sex-slider-labels">
|
|
108
|
+
<span>Ø</span>
|
|
109
|
+
<span>1</span>
|
|
110
|
+
<span>2</span>
|
|
111
|
+
<span>3</span>
|
|
112
|
+
<span>4</span>
|
|
113
|
+
<span>5</span>
|
|
114
|
+
</div>
|
|
115
|
+
</div>
|
|
116
|
+
<div class="forensic-sex-status-label" id={`status-${field.id}`}>{ui.notEvaluated}</div>
|
|
117
|
+
</div>
|
|
118
|
+
<div class="forensic-sex-visual-side">
|
|
119
|
+
<svg viewBox="0 0 100 60" class="forensic-sex-svg">
|
|
120
|
+
{field.id === 'subpubicAngle' && (
|
|
121
|
+
<path id="svg-subpubicAngle" d="M 20 50 Q 50 20 80 50" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" />
|
|
122
|
+
)}
|
|
123
|
+
{field.id === 'sciaticNotch' && (
|
|
124
|
+
<path id="svg-sciaticNotch" d="M 10 15 C 25 15, 30 45, 60 45" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" />
|
|
125
|
+
)}
|
|
126
|
+
{field.id === 'ventralArc' && (
|
|
127
|
+
<g>
|
|
128
|
+
<path d="M 25 15 L 75 15 L 65 45 L 35 45 Z" fill="rgba(255,255,255,0.03)" stroke="rgba(255,255,255,0.1)" stroke-width="1.5" />
|
|
129
|
+
<path id="svg-ventralArc" d="M 35 20 Q 50 30 65 40" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" />
|
|
130
|
+
</g>
|
|
131
|
+
)}
|
|
132
|
+
{field.id === 'preauricularSulcus' && (
|
|
133
|
+
<g>
|
|
134
|
+
<path d="M 15 15 L 85 15 C 80 30, 80 40, 85 45 L 15 45 Z" fill="rgba(255,255,255,0.03)" stroke="rgba(255,255,255,0.1)" stroke-width="1.5" />
|
|
135
|
+
<path id="svg-preauricularSulcus" d="M 40 25 Q 50 35 60 25" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" />
|
|
136
|
+
</g>
|
|
137
|
+
)}
|
|
138
|
+
{field.id === 'mastoidProcess' && (
|
|
139
|
+
<g>
|
|
140
|
+
<path d="M 10 15 L 90 15" stroke="rgba(255,255,255,0.2)" stroke-width="1.5" stroke-linecap="round" />
|
|
141
|
+
<path id="svg-mastoidProcess" d="M 30 15 L 45 22 L 60 15 Z" fill="currentColor" stroke="none" />
|
|
142
|
+
</g>
|
|
143
|
+
)}
|
|
144
|
+
{field.id === 'supraorbitalRidge' && (
|
|
145
|
+
<path id="svg-supraorbitalRidge" d="M 20 10 L 20 30 L 22 45 L 35 50" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" />
|
|
146
|
+
)}
|
|
147
|
+
{field.id === 'mentalEminence' && (
|
|
148
|
+
<path id="svg-mentalEminence" d="M 20 20 Q 50 45 80 20" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" />
|
|
149
|
+
)}
|
|
150
|
+
{field.id === 'nuchalCrest' && (
|
|
151
|
+
<g>
|
|
152
|
+
<path d="M 20 10 Q 50 30 80 50" fill="none" stroke="rgba(255,255,255,0.2)" stroke-width="1.5" stroke-linecap="round" />
|
|
153
|
+
<path id="svg-nuchalCrest" d="M 50 30 L 50 30 L 50 30 Z" fill="currentColor" stroke="none" />
|
|
154
|
+
</g>
|
|
155
|
+
)}
|
|
156
|
+
</svg>
|
|
157
|
+
</div>
|
|
158
|
+
</div>
|
|
159
|
+
<div class="forensic-sex-field-footer">
|
|
160
|
+
<span class="extreme-label fem-label">{field.femText}</span>
|
|
161
|
+
<span class="extreme-label masc-label">{field.mascText}</span>
|
|
162
|
+
</div>
|
|
163
|
+
</div>
|
|
164
|
+
))}
|
|
165
|
+
</div>
|
|
166
|
+
</div>
|
|
167
|
+
))}
|
|
168
|
+
</div>
|
|
169
|
+
</div>
|
|
170
|
+
|
|
171
|
+
<div class="forensic-sex-outputs">
|
|
172
|
+
<h3 class="forensic-sex-outputs-title">{ui.resultsTitle}</h3>
|
|
173
|
+
|
|
174
|
+
<div class="forensic-sex-gauge-container">
|
|
175
|
+
<div class="forensic-sex-gauge-bar">
|
|
176
|
+
<div id="sex-gauge-marker" class="forensic-sex-gauge-marker"></div>
|
|
177
|
+
</div>
|
|
178
|
+
<div class="forensic-sex-gauge-labels">
|
|
179
|
+
<span>{ui.femaleClass}</span>
|
|
180
|
+
<span>50/50</span>
|
|
181
|
+
<span>{ui.maleClass}</span>
|
|
182
|
+
</div>
|
|
183
|
+
</div>
|
|
184
|
+
|
|
185
|
+
<div class="forensic-sex-metrics">
|
|
186
|
+
<div class="forensic-sex-metric-row">
|
|
187
|
+
<span class="forensic-sex-metric-label">{ui.femaleProbLabel}</span>
|
|
188
|
+
<span id="sex-female-prob" class="forensic-sex-metric-value">50%</span>
|
|
189
|
+
</div>
|
|
190
|
+
<div class="forensic-sex-metric-row">
|
|
191
|
+
<span class="forensic-sex-metric-label">{ui.maleProbLabel}</span>
|
|
192
|
+
<span id="sex-male-prob" class="forensic-sex-metric-value">50%</span>
|
|
193
|
+
</div>
|
|
194
|
+
<div class="forensic-sex-metric-row">
|
|
195
|
+
<span class="forensic-sex-metric-label">{ui.predominantLabel}</span>
|
|
196
|
+
<span id="sex-predominant" class="forensic-sex-metric-value">{ui.indeterminateClass}</span>
|
|
197
|
+
</div>
|
|
198
|
+
<div class="forensic-sex-metric-row">
|
|
199
|
+
<span class="forensic-sex-metric-label">{ui.confidenceLabel}</span>
|
|
200
|
+
<span id="sex-confidence" class="forensic-sex-metric-value">{ui.weakConf}</span>
|
|
201
|
+
</div>
|
|
202
|
+
</div>
|
|
203
|
+
|
|
204
|
+
<div id="sex-notes-container" class="forensic-sex-notes">
|
|
205
|
+
<p class="forensic-sex-note">{ui.noteNoData}</p>
|
|
206
|
+
</div>
|
|
207
|
+
</div>
|
|
208
|
+
</div>
|
|
209
|
+
</div>
|
|
210
|
+
|
|
211
|
+
<script id="sex-ui-data" type="application/json" set:html={JSON.stringify(ui)}></script>
|
|
212
|
+
|
|
213
|
+
<script>
|
|
214
|
+
import { determineSex } from './logic';
|
|
215
|
+
import type { SexDeterminatorInput } from './logic';
|
|
216
|
+
|
|
217
|
+
const uiDataEl = document.getElementById('sex-ui-data');
|
|
218
|
+
const ui = uiDataEl ? JSON.parse(uiDataEl.textContent || '{}') : {};
|
|
219
|
+
|
|
220
|
+
const fields = [
|
|
221
|
+
'subpubicAngle',
|
|
222
|
+
'sciaticNotch',
|
|
223
|
+
'ventralArc',
|
|
224
|
+
'preauricularSulcus',
|
|
225
|
+
'mastoidProcess',
|
|
226
|
+
'supraorbitalRidge',
|
|
227
|
+
'mentalEminence',
|
|
228
|
+
'nuchalCrest'
|
|
229
|
+
];
|
|
230
|
+
|
|
231
|
+
const svgConfigs = {
|
|
232
|
+
subpubicAngle: {
|
|
233
|
+
el: document.getElementById('svg-subpubicAngle'),
|
|
234
|
+
type: 'd',
|
|
235
|
+
values: {
|
|
236
|
+
0: 'M 20 50 Q 50 20 80 50',
|
|
237
|
+
1: 'M 15 50 Q 50 15 85 50',
|
|
238
|
+
2: 'M 20 50 Q 50 20 80 50',
|
|
239
|
+
3: 'M 28 50 Q 50 25 72 50',
|
|
240
|
+
4: 'M 35 50 Q 50 30 65 50',
|
|
241
|
+
5: 'M 40 50 Q 50 35 60 50'
|
|
242
|
+
}
|
|
243
|
+
},
|
|
244
|
+
sciaticNotch: {
|
|
245
|
+
el: document.getElementById('svg-sciaticNotch'),
|
|
246
|
+
type: 'd',
|
|
247
|
+
values: {
|
|
248
|
+
0: 'M 10 15 C 25 15, 30 45, 60 45',
|
|
249
|
+
1: 'M 10 15 C 25 15, 30 45, 60 45',
|
|
250
|
+
2: 'M 10 15 C 22 15, 27 45, 55 45',
|
|
251
|
+
3: 'M 10 15 C 20 15, 23 45, 48 45',
|
|
252
|
+
4: 'M 10 15 C 16 15, 18 45, 42 45',
|
|
253
|
+
5: 'M 10 15 C 12 15, 14 45, 35 45'
|
|
254
|
+
}
|
|
255
|
+
},
|
|
256
|
+
ventralArc: {
|
|
257
|
+
el: document.getElementById('svg-ventralArc'),
|
|
258
|
+
type: 'stroke-width',
|
|
259
|
+
values: {
|
|
260
|
+
0: '2',
|
|
261
|
+
1: '6',
|
|
262
|
+
2: '4',
|
|
263
|
+
3: '2',
|
|
264
|
+
4: '1',
|
|
265
|
+
5: '0'
|
|
266
|
+
}
|
|
267
|
+
},
|
|
268
|
+
preauricularSulcus: {
|
|
269
|
+
el: document.getElementById('svg-preauricularSulcus'),
|
|
270
|
+
type: 'stroke-dasharray',
|
|
271
|
+
values: {
|
|
272
|
+
0: '0',
|
|
273
|
+
1: '3,3',
|
|
274
|
+
2: '2,4',
|
|
275
|
+
3: '1,5',
|
|
276
|
+
4: '0',
|
|
277
|
+
5: '0'
|
|
278
|
+
}
|
|
279
|
+
},
|
|
280
|
+
mastoidProcess: {
|
|
281
|
+
el: document.getElementById('svg-mastoidProcess'),
|
|
282
|
+
type: 'd',
|
|
283
|
+
values: {
|
|
284
|
+
0: 'M 30 15 L 45 22 L 60 15 Z',
|
|
285
|
+
1: 'M 30 15 L 45 22 L 60 15 Z',
|
|
286
|
+
2: 'M 30 15 L 45 28 L 60 15 Z',
|
|
287
|
+
3: 'M 30 15 L 45 35 L 60 15 Z',
|
|
288
|
+
4: 'M 30 15 L 45 42 L 60 15 Z',
|
|
289
|
+
5: 'M 30 15 L 45 50 L 60 15 Z'
|
|
290
|
+
}
|
|
291
|
+
},
|
|
292
|
+
supraorbitalRidge: {
|
|
293
|
+
el: document.getElementById('svg-supraorbitalRidge'),
|
|
294
|
+
type: 'd',
|
|
295
|
+
values: {
|
|
296
|
+
0: 'M 20 10 L 20 30 L 22 45 L 35 50',
|
|
297
|
+
1: 'M 20 10 L 20 30 L 22 45 L 35 50',
|
|
298
|
+
2: 'M 20 10 L 20 28 Q 23 33 22 40 L 35 50',
|
|
299
|
+
3: 'M 20 10 L 20 26 Q 26 31 22 40 L 35 50',
|
|
300
|
+
4: 'M 20 10 L 20 24 Q 29 29 22 40 L 35 50',
|
|
301
|
+
5: 'M 20 10 L 20 22 Q 33 27 22 40 L 35 50'
|
|
302
|
+
}
|
|
303
|
+
},
|
|
304
|
+
mentalEminence: {
|
|
305
|
+
el: document.getElementById('svg-mentalEminence'),
|
|
306
|
+
type: 'd',
|
|
307
|
+
values: {
|
|
308
|
+
0: 'M 20 20 Q 50 45 80 20',
|
|
309
|
+
1: 'M 20 20 Q 50 45 80 20',
|
|
310
|
+
2: 'M 22 20 Q 50 43 78 20',
|
|
311
|
+
3: 'M 25 20 C 35 38, 65 38, 75 20',
|
|
312
|
+
4: 'M 27 20 C 35 40, 65 40, 73 20',
|
|
313
|
+
5: 'M 30 20 L 35 38 L 65 38 L 70 20 Z'
|
|
314
|
+
}
|
|
315
|
+
},
|
|
316
|
+
nuchalCrest: {
|
|
317
|
+
el: document.getElementById('svg-nuchalCrest'),
|
|
318
|
+
type: 'd',
|
|
319
|
+
values: {
|
|
320
|
+
0: 'M 50 30 L 50 30 L 50 30 Z',
|
|
321
|
+
1: 'M 50 30 L 50 30 L 50 30 Z',
|
|
322
|
+
2: 'M 50 30 L 53 27 L 52 32 Z',
|
|
323
|
+
3: 'M 50 30 L 56 25 L 53 34 Z',
|
|
324
|
+
4: 'M 50 30 L 60 22 L 54 36 Z',
|
|
325
|
+
5: 'M 50 30 Q 63 20 58 18 Q 57 23 54 36 Z'
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
};
|
|
329
|
+
|
|
330
|
+
const femaleProbEl = document.getElementById('sex-female-prob');
|
|
331
|
+
const maleProbEl = document.getElementById('sex-male-prob');
|
|
332
|
+
const predominantEl = document.getElementById('sex-predominant');
|
|
333
|
+
const confidenceEl = document.getElementById('sex-confidence');
|
|
334
|
+
const notesContainer = document.getElementById('sex-notes-container');
|
|
335
|
+
const marker = document.getElementById('sex-gauge-marker');
|
|
336
|
+
const STORAGE_KEY = 'forensic-sex-determinator-input';
|
|
337
|
+
|
|
338
|
+
function getSelectedValue(field: string): number {
|
|
339
|
+
const el = document.getElementById(`input-${field}`) as HTMLInputElement | null;
|
|
340
|
+
return el ? parseInt(el.value, 10) : 0;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
function renderPredominantSex(predominantSex: string) {
|
|
344
|
+
if (!predominantEl) return;
|
|
345
|
+
if (predominantSex === 'female') {
|
|
346
|
+
predominantEl.textContent = ui.femaleClass || 'Female';
|
|
347
|
+
} else if (predominantSex === 'male') {
|
|
348
|
+
predominantEl.textContent = ui.maleClass || 'Male';
|
|
349
|
+
} else {
|
|
350
|
+
predominantEl.textContent = ui.indeterminateClass || 'Indeterminate';
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
function renderConfidence(confidence: string) {
|
|
355
|
+
if (!confidenceEl) return;
|
|
356
|
+
if (confidence === 'strong') {
|
|
357
|
+
confidenceEl.textContent = ui.strongConf || 'Strong';
|
|
358
|
+
} else if (confidence === 'moderate') {
|
|
359
|
+
confidenceEl.textContent = ui.moderateConf || 'Moderate';
|
|
360
|
+
} else {
|
|
361
|
+
confidenceEl.textContent = ui.weakConf || 'Weak';
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
function renderNotes(notes: string[]) {
|
|
366
|
+
if (!notesContainer) return;
|
|
367
|
+
notesContainer.innerHTML = '';
|
|
368
|
+
notes.forEach(noteKey => {
|
|
369
|
+
const p = document.createElement('p');
|
|
370
|
+
p.className = 'forensic-sex-note';
|
|
371
|
+
p.textContent = ui[noteKey] || '';
|
|
372
|
+
notesContainer.appendChild(p);
|
|
373
|
+
});
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
const scoreLabels: Record<number, string> = {
|
|
377
|
+
0: 'notEvaluated', 1: 'score1', 2: 'score2', 3: 'score3', 4: 'score4', 5: 'score5',
|
|
378
|
+
};
|
|
379
|
+
|
|
380
|
+
const cardStates: Record<number, string> = {
|
|
381
|
+
0: 'state-unevaluated', 1: 'state-feminine', 2: 'state-feminine',
|
|
382
|
+
3: 'state-neutral', 4: 'state-masculine', 5: 'state-masculine',
|
|
383
|
+
};
|
|
384
|
+
|
|
385
|
+
function applyCardState(field: string, val: number) {
|
|
386
|
+
const card = document.getElementById(`field-card-${field}`);
|
|
387
|
+
if (!card) return;
|
|
388
|
+
card.className = 'forensic-sex-field';
|
|
389
|
+
card.classList.add(cardStates[val] ?? 'state-unevaluated');
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
function applyStatusText(field: string, val: number) {
|
|
393
|
+
const statusEl = document.getElementById(`status-${field}`);
|
|
394
|
+
if (!statusEl) return;
|
|
395
|
+
statusEl.textContent = ui[scoreLabels[val]] ?? '';
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
function applySvgState(field: string, val: number) {
|
|
399
|
+
const config = svgConfigs[field as keyof typeof svgConfigs];
|
|
400
|
+
if (!config || !config.el) return;
|
|
401
|
+
const valueStr = config.values[val as keyof typeof config.values];
|
|
402
|
+
config.el.setAttribute(config.type === 'd' ? 'd' : config.type, valueStr);
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
function updateFieldState(field: string, val: number) {
|
|
406
|
+
applyCardState(field, val);
|
|
407
|
+
applyStatusText(field, val);
|
|
408
|
+
applySvgState(field, val);
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
function update() {
|
|
412
|
+
const input: SexDeterminatorInput = {
|
|
413
|
+
subpubicAngle: getSelectedValue('subpubicAngle'),
|
|
414
|
+
sciaticNotch: getSelectedValue('sciaticNotch'),
|
|
415
|
+
ventralArc: getSelectedValue('ventralArc'),
|
|
416
|
+
preauricularSulcus: getSelectedValue('preauricularSulcus'),
|
|
417
|
+
mastoidProcess: getSelectedValue('mastoidProcess'),
|
|
418
|
+
supraorbitalRidge: getSelectedValue('supraorbitalRidge'),
|
|
419
|
+
mentalEminence: getSelectedValue('mentalEminence'),
|
|
420
|
+
nuchalCrest: getSelectedValue('nuchalCrest'),
|
|
421
|
+
};
|
|
422
|
+
|
|
423
|
+
try {
|
|
424
|
+
localStorage.setItem(STORAGE_KEY, JSON.stringify(input));
|
|
425
|
+
} catch {}
|
|
426
|
+
|
|
427
|
+
fields.forEach(field => {
|
|
428
|
+
updateFieldState(field, input[field as keyof SexDeterminatorInput]);
|
|
429
|
+
});
|
|
430
|
+
|
|
431
|
+
const result = determineSex(input);
|
|
432
|
+
|
|
433
|
+
if (femaleProbEl) femaleProbEl.textContent = `${result.femaleProbability}%`;
|
|
434
|
+
if (maleProbEl) maleProbEl.textContent = `${result.maleProbability}%`;
|
|
435
|
+
renderPredominantSex(result.predominantSex);
|
|
436
|
+
renderConfidence(result.confidence);
|
|
437
|
+
if (marker) marker.style.left = `${result.maleProbability}%`;
|
|
438
|
+
renderNotes(result.notes);
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
fields.forEach(field => {
|
|
442
|
+
const input = document.getElementById(`input-${field}`);
|
|
443
|
+
if (input) {
|
|
444
|
+
input.addEventListener('input', update);
|
|
445
|
+
}
|
|
446
|
+
});
|
|
447
|
+
|
|
448
|
+
try {
|
|
449
|
+
const saved = localStorage.getItem(STORAGE_KEY);
|
|
450
|
+
if (saved) {
|
|
451
|
+
const parsed = JSON.parse(saved);
|
|
452
|
+
fields.forEach(field => {
|
|
453
|
+
const val = parsed[field];
|
|
454
|
+
if (typeof val === 'number') {
|
|
455
|
+
const el = document.getElementById(`input-${field}`) as HTMLInputElement | null;
|
|
456
|
+
if (el) el.value = val.toString();
|
|
457
|
+
}
|
|
458
|
+
});
|
|
459
|
+
}
|
|
460
|
+
} catch {}
|
|
461
|
+
|
|
462
|
+
update();
|
|
463
|
+
</script>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { ScienceToolEntry, ToolLocaleContent } from '../../types';
|
|
2
|
+
|
|
3
|
+
export interface SexDeterminatorUI {
|
|
4
|
+
[key: string]: string;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export type SexDeterminatorLocaleContent = ToolLocaleContent<SexDeterminatorUI>;
|
|
8
|
+
|
|
9
|
+
export const forensicSexDeterminator: ScienceToolEntry<SexDeterminatorUI> = {
|
|
10
|
+
id: 'forensic-sex-determinator',
|
|
11
|
+
icons: {
|
|
12
|
+
bg: 'mdi:gender-male-female',
|
|
13
|
+
fg: 'mdi:skull-outline',
|
|
14
|
+
},
|
|
15
|
+
i18n: {
|
|
16
|
+
de: () => import('./i18n/de').then((m) => m.content),
|
|
17
|
+
en: () => import('./i18n/en').then((m) => m.content),
|
|
18
|
+
es: () => import('./i18n/es').then((m) => m.content),
|
|
19
|
+
fr: () => import('./i18n/fr').then((m) => m.content),
|
|
20
|
+
id: () => import('./i18n/id').then((m) => m.content),
|
|
21
|
+
it: () => import('./i18n/it').then((m) => m.content),
|
|
22
|
+
ja: () => import('./i18n/ja').then((m) => m.content),
|
|
23
|
+
ko: () => import('./i18n/ko').then((m) => m.content),
|
|
24
|
+
nl: () => import('./i18n/nl').then((m) => m.content),
|
|
25
|
+
pl: () => import('./i18n/pl').then((m) => m.content),
|
|
26
|
+
pt: () => import('./i18n/pt').then((m) => m.content),
|
|
27
|
+
ru: () => import('./i18n/ru').then((m) => m.content),
|
|
28
|
+
sv: () => import('./i18n/sv').then((m) => m.content),
|
|
29
|
+
tr: () => import('./i18n/tr').then((m) => m.content),
|
|
30
|
+
zh: () => import('./i18n/zh').then((m) => m.content),
|
|
31
|
+
},
|
|
32
|
+
};
|