egatari 0.6.4 → 0.6.5-rc.1
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/NOTICE +36 -0
- package/README.ja.md +16 -4
- package/README.md +16 -4
- package/bin/egatari.mjs +86 -3
- package/components.lock.json +246 -123
- package/components2.lock.json +824 -1
- package/kit/article-steps.mjs +27 -0
- package/kit/build.mjs +50 -1
- package/kit/check-messages.mjs +15 -7
- package/kit/check.mjs +40 -7
- package/kit/cli-hint.mjs +27 -0
- package/kit/core/article-cite.mjs +188 -0
- package/kit/core/article-links.mjs +174 -0
- package/kit/core/article-messages.mjs +115 -0
- package/kit/core/article-page.mjs +183 -0
- package/kit/core/article-render.mjs +410 -0
- package/kit/core/article-text.mjs +501 -0
- package/kit/core/article.mjs +266 -0
- package/kit/core/build-core.mjs +49 -9
- package/kit/core/citeproc-credit.mjs +3 -0
- package/kit/core/colab-core.mjs +1 -1
- package/kit/core/components-lock.mjs +18 -0
- package/kit/core/llm-fix.mjs +2 -1
- package/kit/core/llm-pack-assemble.mjs +5 -3
- package/kit/core/llm-pack-data.mjs +63 -80
- package/kit/core/new-deck.mjs +1 -1
- package/kit/core/part-labels.mjs +17 -5
- package/kit/core/parts2.mjs +11 -1
- package/kit/core/player.mjs +1 -1
- package/kit/core/portable.mjs +132 -16
- package/kit/core/quote-ja.mjs +5 -0
- package/kit/core/themes-lock.mjs +16 -0
- package/kit/core/tier-a.mjs +47 -3
- package/kit/deck.js +195 -45
- package/kit/instruction-version.json +3 -0
- package/kit/layouts.css +11 -10
- package/kit/panes.js +1288 -0
- package/kit/player.json +1 -1
- package/kit/player.lock.json +2 -2
- package/kit/tools.js +81 -20
- package/kit/track.js +308 -0
- package/package.json +20 -3
- package/render/only.mjs +21 -0
- package/render/render.mjs +11 -8
- package/tools/ids.mjs +74 -9
- package/tools/portable.mjs +2 -0
- package/tools/sheet.mjs +5 -3
- package/vendor/components/CATALOG.md +4 -4
- package/vendor/components/sha256/00e4bdbb7b9964c92809177fe7bb574e7184ed603dbc5008a485d82603d9a7bf/CHANGELOG.md +37 -0
- package/vendor/components/sha256/00e4bdbb7b9964c92809177fe7bb574e7184ed603dbc5008a485d82603d9a7bf/README.md +58 -0
- package/vendor/components/sha256/00e4bdbb7b9964c92809177fe7bb574e7184ed603dbc5008a485d82603d9a7bf/demo.html +121 -0
- package/vendor/components/sha256/00e4bdbb7b9964c92809177fe7bb574e7184ed603dbc5008a485d82603d9a7bf/index.js +894 -0
- package/vendor/components/sha256/011b72fe1a9c24b980192931847484b12ae736e989d453c63c4d5b099962bfe0/CHANGELOG.md +44 -0
- package/vendor/components/sha256/011b72fe1a9c24b980192931847484b12ae736e989d453c63c4d5b099962bfe0/README.md +32 -0
- package/vendor/components/sha256/011b72fe1a9c24b980192931847484b12ae736e989d453c63c4d5b099962bfe0/demo.html +57 -0
- package/vendor/components/sha256/011b72fe1a9c24b980192931847484b12ae736e989d453c63c4d5b099962bfe0/fixtures/ABCJS-ADAPTER.md +101 -0
- package/vendor/components/sha256/011b72fe1a9c24b980192931847484b12ae736e989d453c63c4d5b099962bfe0/fixtures/LICENSE-abcjs.txt +21 -0
- package/vendor/components/sha256/011b72fe1a9c24b980192931847484b12ae736e989d453c63c4d5b099962bfe0/fixtures/chords.json +89 -0
- package/vendor/components/sha256/011b72fe1a9c24b980192931847484b12ae736e989d453c63c4d5b099962bfe0/fixtures/doremi.json +261 -0
- package/vendor/components/sha256/011b72fe1a9c24b980192931847484b12ae736e989d453c63c4d5b099962bfe0/fixtures/extras.json +192 -0
- package/vendor/components/sha256/011b72fe1a9c24b980192931847484b12ae736e989d453c63c4d5b099962bfe0/fixtures/kaeru.json +521 -0
- package/vendor/components/sha256/011b72fe1a9c24b980192931847484b12ae736e989d453c63c4d5b099962bfe0/fixtures/rhythm.json +248 -0
- package/vendor/components/sha256/011b72fe1a9c24b980192931847484b12ae736e989d453c63c4d5b099962bfe0/fixtures/ties.json +360 -0
- package/vendor/components/sha256/011b72fe1a9c24b980192931847484b12ae736e989d453c63c4d5b099962bfe0/index.js +474 -0
- package/vendor/components/sha256/027a8fea4060337ccc0a926c1488066f1ae7a6c102a15032eae974304e12cb3b/CHANGELOG.md +28 -0
- package/vendor/components/sha256/027a8fea4060337ccc0a926c1488066f1ae7a6c102a15032eae974304e12cb3b/README.md +21 -0
- package/vendor/components/sha256/027a8fea4060337ccc0a926c1488066f1ae7a6c102a15032eae974304e12cb3b/demo.html +32 -0
- package/vendor/components/sha256/027a8fea4060337ccc0a926c1488066f1ae7a6c102a15032eae974304e12cb3b/index.js +139 -0
- package/vendor/components/sha256/03550bb20d425aa926258bab18b03bbc0cee292072e01bb6c78c429b3ae92c34/README.md +42 -0
- package/vendor/components/sha256/03550bb20d425aa926258bab18b03bbc0cee292072e01bb6c78c429b3ae92c34/index.js +250 -0
- package/vendor/components/sha256/07013c263cc595382dbcfd4931ca8b016f9dfb673440adf28911c95bd465cf9d/README.md +22 -0
- package/vendor/components/sha256/07013c263cc595382dbcfd4931ca8b016f9dfb673440adf28911c95bd465cf9d/index.js +41 -0
- package/vendor/components/sha256/0703ec58997237fceda0008c28dfa3e3370c21cdcb6d0cc99c29a83e4b9d0f11/CHANGELOG.md +25 -0
- package/vendor/components/sha256/0703ec58997237fceda0008c28dfa3e3370c21cdcb6d0cc99c29a83e4b9d0f11/README.md +35 -0
- package/vendor/components/sha256/0703ec58997237fceda0008c28dfa3e3370c21cdcb6d0cc99c29a83e4b9d0f11/demo.html +40 -0
- package/vendor/components/sha256/0703ec58997237fceda0008c28dfa3e3370c21cdcb6d0cc99c29a83e4b9d0f11/index.js +731 -0
- package/vendor/components/sha256/0b85af3a688ca012d7d1df082dab1f405048589dce78d411d4cffc1fb3a81998/CHANGELOG.md +19 -0
- package/vendor/components/sha256/0b85af3a688ca012d7d1df082dab1f405048589dce78d411d4cffc1fb3a81998/README.md +21 -0
- package/vendor/components/sha256/0b85af3a688ca012d7d1df082dab1f405048589dce78d411d4cffc1fb3a81998/demo.html +33 -0
- package/vendor/components/sha256/0b85af3a688ca012d7d1df082dab1f405048589dce78d411d4cffc1fb3a81998/index.js +106 -0
- package/vendor/components/sha256/0cf00baed0da1bc3ce5460eb1eff0a8dd5f7789168e83aaef751135cd3f8af89/CHANGELOG.md +21 -0
- package/vendor/components/sha256/0cf00baed0da1bc3ce5460eb1eff0a8dd5f7789168e83aaef751135cd3f8af89/README.md +34 -0
- package/vendor/components/sha256/0cf00baed0da1bc3ce5460eb1eff0a8dd5f7789168e83aaef751135cd3f8af89/demo.html +77 -0
- package/vendor/components/sha256/0cf00baed0da1bc3ce5460eb1eff0a8dd5f7789168e83aaef751135cd3f8af89/index.js +200 -0
- package/vendor/components/sha256/0eca723150eb30db0b3d3fdbd35b973d5344ac0d0e2ea8ab89d143a0870ab4fd/CHANGELOG.md +31 -0
- package/vendor/components/sha256/0eca723150eb30db0b3d3fdbd35b973d5344ac0d0e2ea8ab89d143a0870ab4fd/README.md +43 -0
- package/vendor/components/sha256/0eca723150eb30db0b3d3fdbd35b973d5344ac0d0e2ea8ab89d143a0870ab4fd/demo.html +47 -0
- package/vendor/components/sha256/0eca723150eb30db0b3d3fdbd35b973d5344ac0d0e2ea8ab89d143a0870ab4fd/index.js +484 -0
- package/vendor/components/sha256/0f47d93b78df1c0661a91d5fc46d6f7f5d1c45349065aab6bd3e659e07e317dd/CHANGELOG.md +23 -0
- package/vendor/components/sha256/0f47d93b78df1c0661a91d5fc46d6f7f5d1c45349065aab6bd3e659e07e317dd/README.md +44 -0
- package/vendor/components/sha256/0f47d93b78df1c0661a91d5fc46d6f7f5d1c45349065aab6bd3e659e07e317dd/demo.html +43 -0
- package/vendor/components/sha256/0f47d93b78df1c0661a91d5fc46d6f7f5d1c45349065aab6bd3e659e07e317dd/index.js +266 -0
- package/vendor/components/sha256/12704ccb92a1f864a18cce824a2400e8e3141e8dba7db34805cb1d8522aae08e/CHANGELOG.md +34 -0
- package/vendor/components/sha256/12704ccb92a1f864a18cce824a2400e8e3141e8dba7db34805cb1d8522aae08e/README.md +44 -0
- package/vendor/components/sha256/12704ccb92a1f864a18cce824a2400e8e3141e8dba7db34805cb1d8522aae08e/demo.html +56 -0
- package/vendor/components/sha256/12704ccb92a1f864a18cce824a2400e8e3141e8dba7db34805cb1d8522aae08e/index.js +429 -0
- package/vendor/components/sha256/149e8ddefbc384aafa8b961d48f8f56ad68ff75cc2429bd8c1ad6d8da661f5f6/CHANGELOG.md +25 -0
- package/vendor/components/sha256/149e8ddefbc384aafa8b961d48f8f56ad68ff75cc2429bd8c1ad6d8da661f5f6/README.md +42 -0
- package/vendor/components/sha256/149e8ddefbc384aafa8b961d48f8f56ad68ff75cc2429bd8c1ad6d8da661f5f6/demo.html +115 -0
- package/vendor/components/sha256/149e8ddefbc384aafa8b961d48f8f56ad68ff75cc2429bd8c1ad6d8da661f5f6/index.js +384 -0
- package/vendor/components/sha256/1ccdd24c9e0e7ca2661450c52eb6dcf9dbc2fb48d05fed2d01e2b9cfd5df1365/CHANGELOG.md +19 -0
- package/vendor/components/sha256/1ccdd24c9e0e7ca2661450c52eb6dcf9dbc2fb48d05fed2d01e2b9cfd5df1365/README.md +38 -0
- package/vendor/components/sha256/1ccdd24c9e0e7ca2661450c52eb6dcf9dbc2fb48d05fed2d01e2b9cfd5df1365/demo.html +72 -0
- package/vendor/components/sha256/1ccdd24c9e0e7ca2661450c52eb6dcf9dbc2fb48d05fed2d01e2b9cfd5df1365/index.js +248 -0
- package/vendor/components/sha256/240bd2ff9a1707c557f0a1af7f278a3f7661a8e680d3b932e367d4b337a3ad13/CHANGELOG.md +19 -0
- package/vendor/components/sha256/240bd2ff9a1707c557f0a1af7f278a3f7661a8e680d3b932e367d4b337a3ad13/README.md +36 -0
- package/vendor/components/sha256/240bd2ff9a1707c557f0a1af7f278a3f7661a8e680d3b932e367d4b337a3ad13/demo.html +70 -0
- package/vendor/components/sha256/240bd2ff9a1707c557f0a1af7f278a3f7661a8e680d3b932e367d4b337a3ad13/index.js +167 -0
- package/vendor/components/sha256/2a6b20b93f1169ef2435cdf3bfca57d24c9111fe9aaf8e61f0d049cf8a70e9df/CHANGELOG.md +34 -0
- package/vendor/components/sha256/2a6b20b93f1169ef2435cdf3bfca57d24c9111fe9aaf8e61f0d049cf8a70e9df/README.md +32 -0
- package/vendor/components/sha256/2a6b20b93f1169ef2435cdf3bfca57d24c9111fe9aaf8e61f0d049cf8a70e9df/demo.html +51 -0
- package/vendor/components/sha256/2a6b20b93f1169ef2435cdf3bfca57d24c9111fe9aaf8e61f0d049cf8a70e9df/index.js +302 -0
- package/vendor/components/sha256/2c9490ac960a5bb04ebc0c8fa0622392775f85ef8b8ebe93065991ce40afc097/CHANGELOG.md +41 -0
- package/vendor/components/sha256/2c9490ac960a5bb04ebc0c8fa0622392775f85ef8b8ebe93065991ce40afc097/README.md +35 -0
- package/vendor/components/sha256/2c9490ac960a5bb04ebc0c8fa0622392775f85ef8b8ebe93065991ce40afc097/demo.html +66 -0
- package/vendor/components/sha256/2c9490ac960a5bb04ebc0c8fa0622392775f85ef8b8ebe93065991ce40afc097/index.js +352 -0
- package/vendor/components/sha256/328a440e91684524068076e96cba5771cdceaa274d4b90033656259f05467135/CHANGELOG.md +35 -0
- package/vendor/components/sha256/328a440e91684524068076e96cba5771cdceaa274d4b90033656259f05467135/README.md +35 -0
- package/vendor/components/sha256/328a440e91684524068076e96cba5771cdceaa274d4b90033656259f05467135/demo.html +40 -0
- package/vendor/components/sha256/328a440e91684524068076e96cba5771cdceaa274d4b90033656259f05467135/index.js +747 -0
- package/vendor/components/sha256/3395706f819e0e70b4047da33486a4b59e65118faf8f918677061e397dae408c/CHANGELOG.md +35 -0
- package/vendor/components/sha256/3395706f819e0e70b4047da33486a4b59e65118faf8f918677061e397dae408c/README.md +43 -0
- package/vendor/components/sha256/3395706f819e0e70b4047da33486a4b59e65118faf8f918677061e397dae408c/demo.html +89 -0
- package/vendor/components/sha256/3395706f819e0e70b4047da33486a4b59e65118faf8f918677061e397dae408c/index.js +323 -0
- package/vendor/components/sha256/34b1375b0897f881b8d43e5dbaa928485cfab240e87c53a5868e714879a20f79/CHANGELOG.md +24 -0
- package/vendor/components/sha256/34b1375b0897f881b8d43e5dbaa928485cfab240e87c53a5868e714879a20f79/README.md +40 -0
- package/vendor/components/sha256/34b1375b0897f881b8d43e5dbaa928485cfab240e87c53a5868e714879a20f79/demo.html +70 -0
- package/vendor/components/sha256/34b1375b0897f881b8d43e5dbaa928485cfab240e87c53a5868e714879a20f79/index.js +561 -0
- package/vendor/components/sha256/37ea0051e8a1f2d7c2fa2d38e57730e5a3b1afabe9037a74fcad6e6f05356c09/CHANGELOG.md +27 -0
- package/vendor/components/sha256/37ea0051e8a1f2d7c2fa2d38e57730e5a3b1afabe9037a74fcad6e6f05356c09/README.md +50 -0
- package/vendor/components/sha256/37ea0051e8a1f2d7c2fa2d38e57730e5a3b1afabe9037a74fcad6e6f05356c09/demo.html +44 -0
- package/vendor/components/sha256/37ea0051e8a1f2d7c2fa2d38e57730e5a3b1afabe9037a74fcad6e6f05356c09/index.js +464 -0
- package/vendor/components/sha256/39c84138e7e4c6040eeb3d82d1c7fc801f513b2c26ac431ac8cc121a01f81698/CHANGELOG.md +23 -0
- package/vendor/components/sha256/39c84138e7e4c6040eeb3d82d1c7fc801f513b2c26ac431ac8cc121a01f81698/README.md +44 -0
- package/vendor/components/sha256/39c84138e7e4c6040eeb3d82d1c7fc801f513b2c26ac431ac8cc121a01f81698/demo.html +56 -0
- package/vendor/components/sha256/39c84138e7e4c6040eeb3d82d1c7fc801f513b2c26ac431ac8cc121a01f81698/index.js +402 -0
- package/vendor/components/sha256/3c36a26fd78dffdfa114bd7c9ca5cae494117bbcdda14bee5c2a01351e5f2eb2/CHANGELOG.md +27 -0
- package/vendor/components/sha256/3c36a26fd78dffdfa114bd7c9ca5cae494117bbcdda14bee5c2a01351e5f2eb2/README.md +49 -0
- package/vendor/components/sha256/3c36a26fd78dffdfa114bd7c9ca5cae494117bbcdda14bee5c2a01351e5f2eb2/demo.html +44 -0
- package/vendor/components/sha256/3c36a26fd78dffdfa114bd7c9ca5cae494117bbcdda14bee5c2a01351e5f2eb2/index.js +354 -0
- package/vendor/components/sha256/3c60c8e63279b8ee86957a5874c80f86a44f9ed92c1f615eace4a9dea1789da5/CHANGELOG.md +20 -0
- package/vendor/components/sha256/3c60c8e63279b8ee86957a5874c80f86a44f9ed92c1f615eace4a9dea1789da5/README.md +50 -0
- package/vendor/components/sha256/3c60c8e63279b8ee86957a5874c80f86a44f9ed92c1f615eace4a9dea1789da5/demo.html +61 -0
- package/vendor/components/sha256/3c60c8e63279b8ee86957a5874c80f86a44f9ed92c1f615eace4a9dea1789da5/index.js +141 -0
- package/vendor/components/sha256/3dba49cbbf7853212a6e5c393de030430d02b8b1a2ba4c8b722db2bb8afad12f/CHANGELOG.md +42 -0
- package/vendor/components/sha256/3dba49cbbf7853212a6e5c393de030430d02b8b1a2ba4c8b722db2bb8afad12f/README.md +32 -0
- package/vendor/components/sha256/3dba49cbbf7853212a6e5c393de030430d02b8b1a2ba4c8b722db2bb8afad12f/demo.html +54 -0
- package/vendor/components/sha256/3dba49cbbf7853212a6e5c393de030430d02b8b1a2ba4c8b722db2bb8afad12f/index.js +315 -0
- package/vendor/components/sha256/40452368224bdcd8c4910222285e6af9e120df17dbd1c3177c0abe9cb69075d1/CHANGELOG.md +30 -0
- package/vendor/components/sha256/40452368224bdcd8c4910222285e6af9e120df17dbd1c3177c0abe9cb69075d1/README.md +38 -0
- package/vendor/components/sha256/40452368224bdcd8c4910222285e6af9e120df17dbd1c3177c0abe9cb69075d1/demo.html +72 -0
- package/vendor/components/sha256/40452368224bdcd8c4910222285e6af9e120df17dbd1c3177c0abe9cb69075d1/index.js +267 -0
- package/vendor/components/sha256/4a5971c1f83efc1f57c444ce7d3fbf242b2bcca65c5c6e4b0b0d75eeb2751150/CHANGELOG.md +16 -0
- package/vendor/components/sha256/4a5971c1f83efc1f57c444ce7d3fbf242b2bcca65c5c6e4b0b0d75eeb2751150/README.md +27 -0
- package/vendor/components/sha256/4a5971c1f83efc1f57c444ce7d3fbf242b2bcca65c5c6e4b0b0d75eeb2751150/demo.html +42 -0
- package/vendor/components/sha256/4a5971c1f83efc1f57c444ce7d3fbf242b2bcca65c5c6e4b0b0d75eeb2751150/index.js +121 -0
- package/vendor/components/sha256/4e0e5eb48fc20ffc554786a7db66c4f5cee0c42eb0554bdc8c98323cdb168eb4/CHANGELOG.md +33 -0
- package/vendor/components/sha256/4e0e5eb48fc20ffc554786a7db66c4f5cee0c42eb0554bdc8c98323cdb168eb4/README.md +41 -0
- package/vendor/components/sha256/4e0e5eb48fc20ffc554786a7db66c4f5cee0c42eb0554bdc8c98323cdb168eb4/demo.html +70 -0
- package/vendor/components/sha256/4e0e5eb48fc20ffc554786a7db66c4f5cee0c42eb0554bdc8c98323cdb168eb4/index.js +592 -0
- package/vendor/components/sha256/50db2d3b84ee33b36c09a9a216ef6b337d2e5da2154e8aa62e790b0e63401796/CHANGELOG.md +23 -0
- package/vendor/components/sha256/50db2d3b84ee33b36c09a9a216ef6b337d2e5da2154e8aa62e790b0e63401796/README.md +43 -0
- package/vendor/components/sha256/50db2d3b84ee33b36c09a9a216ef6b337d2e5da2154e8aa62e790b0e63401796/demo.html +47 -0
- package/vendor/components/sha256/50db2d3b84ee33b36c09a9a216ef6b337d2e5da2154e8aa62e790b0e63401796/index.js +483 -0
- package/vendor/components/sha256/546ec63feccdc65569b7167e58b2e36a85be52f2538743dd2ecc3fc29ed6b883/CHANGELOG.md +19 -0
- package/vendor/components/sha256/546ec63feccdc65569b7167e58b2e36a85be52f2538743dd2ecc3fc29ed6b883/README.md +34 -0
- package/vendor/components/sha256/546ec63feccdc65569b7167e58b2e36a85be52f2538743dd2ecc3fc29ed6b883/demo.html +60 -0
- package/vendor/components/sha256/546ec63feccdc65569b7167e58b2e36a85be52f2538743dd2ecc3fc29ed6b883/index.js +209 -0
- package/vendor/components/sha256/556e7d45a761c4fa749cde186fb53f6c526ba6ede0b8f0f0bba5ac9e25e0d6f4/CHANGELOG.md +30 -0
- package/vendor/components/sha256/556e7d45a761c4fa749cde186fb53f6c526ba6ede0b8f0f0bba5ac9e25e0d6f4/README.md +79 -0
- package/vendor/components/sha256/556e7d45a761c4fa749cde186fb53f6c526ba6ede0b8f0f0bba5ac9e25e0d6f4/demo.html +50 -0
- package/vendor/components/sha256/556e7d45a761c4fa749cde186fb53f6c526ba6ede0b8f0f0bba5ac9e25e0d6f4/index.js +351 -0
- package/vendor/components/sha256/577008a069e7eb08057705a0800d975e82c8dfe0d0ba5fbf4f8974af7b298a7f/README.md +53 -0
- package/vendor/components/sha256/577008a069e7eb08057705a0800d975e82c8dfe0d0ba5fbf4f8974af7b298a7f/index.js +310 -0
- package/vendor/components/sha256/5a9959f8626f2c5280d0954c476baeadf03fecebda2443c3e83b8203ad554167/CHANGELOG.md +20 -0
- package/vendor/components/sha256/5a9959f8626f2c5280d0954c476baeadf03fecebda2443c3e83b8203ad554167/README.md +75 -0
- package/vendor/components/sha256/5a9959f8626f2c5280d0954c476baeadf03fecebda2443c3e83b8203ad554167/demo.html +50 -0
- package/vendor/components/sha256/5a9959f8626f2c5280d0954c476baeadf03fecebda2443c3e83b8203ad554167/index.js +342 -0
- package/vendor/components/sha256/5b44b272b917246219d2709f1b001964f87a3e07786cc9950087bbb8add3c721/CHANGELOG.md +24 -0
- package/vendor/components/sha256/5b44b272b917246219d2709f1b001964f87a3e07786cc9950087bbb8add3c721/README.md +26 -0
- package/vendor/components/sha256/5b44b272b917246219d2709f1b001964f87a3e07786cc9950087bbb8add3c721/demo.html +48 -0
- package/vendor/components/sha256/5b44b272b917246219d2709f1b001964f87a3e07786cc9950087bbb8add3c721/index.js +97 -0
- package/vendor/components/sha256/5c8ae7714fd8243c9b37539a5f0f8488d3ba20316ba81179e97b6160116d13c2/CHANGELOG.md +22 -0
- package/vendor/components/sha256/5c8ae7714fd8243c9b37539a5f0f8488d3ba20316ba81179e97b6160116d13c2/README.md +64 -0
- package/vendor/components/sha256/5c8ae7714fd8243c9b37539a5f0f8488d3ba20316ba81179e97b6160116d13c2/demo.html +97 -0
- package/vendor/components/sha256/5c8ae7714fd8243c9b37539a5f0f8488d3ba20316ba81179e97b6160116d13c2/index.js +875 -0
- package/vendor/components/sha256/68c9e866e3cd3e2f8179ede44a005c7f31cef0ed07fd5770ec33f0cc3aa80a41/CHANGELOG.md +21 -0
- package/vendor/components/sha256/68c9e866e3cd3e2f8179ede44a005c7f31cef0ed07fd5770ec33f0cc3aa80a41/README.md +50 -0
- package/vendor/components/sha256/68c9e866e3cd3e2f8179ede44a005c7f31cef0ed07fd5770ec33f0cc3aa80a41/demo.html +63 -0
- package/vendor/components/sha256/68c9e866e3cd3e2f8179ede44a005c7f31cef0ed07fd5770ec33f0cc3aa80a41/index.js +219 -0
- package/vendor/components/sha256/693e2aa59e822d38c48eca7271cc020f8e0a6f6189f2409895318ed2a3f0b809/CHANGELOG.md +28 -0
- package/vendor/components/sha256/693e2aa59e822d38c48eca7271cc020f8e0a6f6189f2409895318ed2a3f0b809/README.md +35 -0
- package/vendor/components/sha256/693e2aa59e822d38c48eca7271cc020f8e0a6f6189f2409895318ed2a3f0b809/demo.html +73 -0
- package/vendor/components/sha256/693e2aa59e822d38c48eca7271cc020f8e0a6f6189f2409895318ed2a3f0b809/index.js +228 -0
- package/vendor/components/sha256/6b24ab9b90b4f2275af9f61073fe9d65b8b9d16573d639ae07352f29b8b067a1/CHANGELOG.md +34 -0
- package/vendor/components/sha256/6b24ab9b90b4f2275af9f61073fe9d65b8b9d16573d639ae07352f29b8b067a1/README.md +65 -0
- package/vendor/components/sha256/6b24ab9b90b4f2275af9f61073fe9d65b8b9d16573d639ae07352f29b8b067a1/demo.html +97 -0
- package/vendor/components/sha256/6b24ab9b90b4f2275af9f61073fe9d65b8b9d16573d639ae07352f29b8b067a1/index.js +920 -0
- package/vendor/components/sha256/6c25dc07f75697e7388564ad689303c370d49142aab9e6672baec15a0313a2fa/CHANGELOG.md +31 -0
- package/vendor/components/sha256/6c25dc07f75697e7388564ad689303c370d49142aab9e6672baec15a0313a2fa/README.md +39 -0
- package/vendor/components/sha256/6c25dc07f75697e7388564ad689303c370d49142aab9e6672baec15a0313a2fa/demo.html +66 -0
- package/vendor/components/sha256/6c25dc07f75697e7388564ad689303c370d49142aab9e6672baec15a0313a2fa/index.js +304 -0
- package/vendor/components/sha256/75a20673474b3104da24a7cb0d0483394bed380ff1c108a9a529bcdd1de0f1fb/CHANGELOG.md +31 -0
- package/vendor/components/sha256/75a20673474b3104da24a7cb0d0483394bed380ff1c108a9a529bcdd1de0f1fb/README.md +40 -0
- package/vendor/components/sha256/75a20673474b3104da24a7cb0d0483394bed380ff1c108a9a529bcdd1de0f1fb/demo.html +92 -0
- package/vendor/components/sha256/75a20673474b3104da24a7cb0d0483394bed380ff1c108a9a529bcdd1de0f1fb/index.js +424 -0
- package/vendor/components/sha256/8534966fead40ce56110b49bd8cabcd3fb703665e7c164abdfcc9aa29f3ce018/CHANGELOG.md +26 -0
- package/vendor/components/sha256/8534966fead40ce56110b49bd8cabcd3fb703665e7c164abdfcc9aa29f3ce018/README.md +57 -0
- package/vendor/components/sha256/8534966fead40ce56110b49bd8cabcd3fb703665e7c164abdfcc9aa29f3ce018/demo.html +121 -0
- package/vendor/components/sha256/8534966fead40ce56110b49bd8cabcd3fb703665e7c164abdfcc9aa29f3ce018/index.js +875 -0
- package/vendor/components/sha256/85f2da6dbed2b9beedaf3ffdea237f3f7940f9b1d4c0d056caa67e937d2dad8d/CHANGELOG.md +20 -0
- package/vendor/components/sha256/85f2da6dbed2b9beedaf3ffdea237f3f7940f9b1d4c0d056caa67e937d2dad8d/README.md +46 -0
- package/vendor/components/sha256/85f2da6dbed2b9beedaf3ffdea237f3f7940f9b1d4c0d056caa67e937d2dad8d/demo.html +112 -0
- package/vendor/components/sha256/85f2da6dbed2b9beedaf3ffdea237f3f7940f9b1d4c0d056caa67e937d2dad8d/index.js +443 -0
- package/vendor/components/sha256/87ca8b6a8995a8fe11206e2def2d6df54075092d15f2f900b25767dbe9bf998e/CHANGELOG.md +22 -0
- package/vendor/components/sha256/87ca8b6a8995a8fe11206e2def2d6df54075092d15f2f900b25767dbe9bf998e/README.md +35 -0
- package/vendor/components/sha256/87ca8b6a8995a8fe11206e2def2d6df54075092d15f2f900b25767dbe9bf998e/demo.html +69 -0
- package/vendor/components/sha256/87ca8b6a8995a8fe11206e2def2d6df54075092d15f2f900b25767dbe9bf998e/index.js +217 -0
- package/vendor/components/sha256/8af8e00fd248f55ce84fe9989e531ae60bf0eb5d0f059f3a28aa3d9c92a8e1d8/CHANGELOG.md +46 -0
- package/vendor/components/sha256/8af8e00fd248f55ce84fe9989e531ae60bf0eb5d0f059f3a28aa3d9c92a8e1d8/LICENSE-strokesvg.txt +115 -0
- package/vendor/components/sha256/8af8e00fd248f55ce84fe9989e531ae60bf0eb5d0f059f3a28aa3d9c92a8e1d8/OFL.txt +93 -0
- package/vendor/components/sha256/8af8e00fd248f55ce84fe9989e531ae60bf0eb5d0f059f3a28aa3d9c92a8e1d8/README.md +30 -0
- package/vendor/components/sha256/8af8e00fd248f55ce84fe9989e531ae60bf0eb5d0f059f3a28aa3d9c92a8e1d8/demo.html +40 -0
- package/vendor/components/sha256/8af8e00fd248f55ce84fe9989e531ae60bf0eb5d0f059f3a28aa3d9c92a8e1d8/index.js +749 -0
- package/vendor/components/sha256/8af8e00fd248f55ce84fe9989e531ae60bf0eb5d0f059f3a28aa3d9c92a8e1d8/strokes-CHANGES.md +20 -0
- package/vendor/components/sha256/9043427ed434c76fba5b11ddd863c40d99b6157e194cfc729895cbaa4940496c/CHANGELOG.md +40 -0
- package/vendor/components/sha256/9043427ed434c76fba5b11ddd863c40d99b6157e194cfc729895cbaa4940496c/README.md +36 -0
- package/vendor/components/sha256/9043427ed434c76fba5b11ddd863c40d99b6157e194cfc729895cbaa4940496c/demo.html +52 -0
- package/vendor/components/sha256/9043427ed434c76fba5b11ddd863c40d99b6157e194cfc729895cbaa4940496c/index.js +268 -0
- package/vendor/components/sha256/9bec862c19d5442f80a2a548a5c24911219469332a6b7fc63689a56f1f3209f4/CHANGELOG.md +31 -0
- package/vendor/components/sha256/9bec862c19d5442f80a2a548a5c24911219469332a6b7fc63689a56f1f3209f4/README.md +46 -0
- package/vendor/components/sha256/9bec862c19d5442f80a2a548a5c24911219469332a6b7fc63689a56f1f3209f4/demo.html +112 -0
- package/vendor/components/sha256/9bec862c19d5442f80a2a548a5c24911219469332a6b7fc63689a56f1f3209f4/index.js +481 -0
- package/vendor/components/sha256/9cf9789f26ceaae205d48bb083e823e768413e3b2227f87de09e3cde2105a68b/CHANGELOG.md +36 -0
- package/vendor/components/sha256/9cf9789f26ceaae205d48bb083e823e768413e3b2227f87de09e3cde2105a68b/README.md +73 -0
- package/vendor/components/sha256/9cf9789f26ceaae205d48bb083e823e768413e3b2227f87de09e3cde2105a68b/demo.html +76 -0
- package/vendor/components/sha256/9cf9789f26ceaae205d48bb083e823e768413e3b2227f87de09e3cde2105a68b/index.js +805 -0
- package/vendor/components/sha256/a034214e470de8f6fa3032f65c8534c87862859525105bdfe94e347ad6a33587/CHANGELOG.md +24 -0
- package/vendor/components/sha256/a034214e470de8f6fa3032f65c8534c87862859525105bdfe94e347ad6a33587/README.md +35 -0
- package/vendor/components/sha256/a034214e470de8f6fa3032f65c8534c87862859525105bdfe94e347ad6a33587/demo.html +53 -0
- package/vendor/components/sha256/a034214e470de8f6fa3032f65c8534c87862859525105bdfe94e347ad6a33587/index.js +481 -0
- package/vendor/components/sha256/a5ba78e0e95bf216bcd02295d1aa76ab8c3688b07931a3bfd9401448c4a34106/CHANGELOG.md +41 -0
- package/vendor/components/sha256/a5ba78e0e95bf216bcd02295d1aa76ab8c3688b07931a3bfd9401448c4a34106/LICENSE-strokesvg.txt +115 -0
- package/vendor/components/sha256/a5ba78e0e95bf216bcd02295d1aa76ab8c3688b07931a3bfd9401448c4a34106/OFL.txt +93 -0
- package/vendor/components/sha256/a5ba78e0e95bf216bcd02295d1aa76ab8c3688b07931a3bfd9401448c4a34106/README.md +33 -0
- package/vendor/components/sha256/a5ba78e0e95bf216bcd02295d1aa76ab8c3688b07931a3bfd9401448c4a34106/demo.html +40 -0
- package/vendor/components/sha256/a5ba78e0e95bf216bcd02295d1aa76ab8c3688b07931a3bfd9401448c4a34106/index.js +749 -0
- package/vendor/components/sha256/a5ba78e0e95bf216bcd02295d1aa76ab8c3688b07931a3bfd9401448c4a34106/strokes-CHANGES.md +20 -0
- package/vendor/components/sha256/a6486154cbfe25c500a64cbb2128be45c2e2365e848c34d4c5c10e9a93f6e73c/CHANGELOG.md +35 -0
- package/vendor/components/sha256/a6486154cbfe25c500a64cbb2128be45c2e2365e848c34d4c5c10e9a93f6e73c/README.md +35 -0
- package/vendor/components/sha256/a6486154cbfe25c500a64cbb2128be45c2e2365e848c34d4c5c10e9a93f6e73c/demo.html +53 -0
- package/vendor/components/sha256/a6486154cbfe25c500a64cbb2128be45c2e2365e848c34d4c5c10e9a93f6e73c/index.js +521 -0
- package/vendor/components/sha256/a6ad6867e21b4ffab426919d62f4293cbb447c7307f8f92e4a8c8d7c285fca6a/CHANGELOG.md +32 -0
- package/vendor/components/sha256/a6ad6867e21b4ffab426919d62f4293cbb447c7307f8f92e4a8c8d7c285fca6a/README.md +39 -0
- package/vendor/components/sha256/a6ad6867e21b4ffab426919d62f4293cbb447c7307f8f92e4a8c8d7c285fca6a/demo.html +70 -0
- package/vendor/components/sha256/a6ad6867e21b4ffab426919d62f4293cbb447c7307f8f92e4a8c8d7c285fca6a/index.js +166 -0
- package/vendor/components/sha256/abbe3a79cdd442191cb76ac572a7fa62af694850c115c4abba30356bae5f475f/CHANGELOG.md +56 -0
- package/vendor/components/sha256/abbe3a79cdd442191cb76ac572a7fa62af694850c115c4abba30356bae5f475f/README.md +35 -0
- package/vendor/components/sha256/abbe3a79cdd442191cb76ac572a7fa62af694850c115c4abba30356bae5f475f/demo.html +57 -0
- package/vendor/components/sha256/abbe3a79cdd442191cb76ac572a7fa62af694850c115c4abba30356bae5f475f/fixtures/ABCJS-ADAPTER.md +101 -0
- package/vendor/components/sha256/abbe3a79cdd442191cb76ac572a7fa62af694850c115c4abba30356bae5f475f/fixtures/LICENSE-abcjs.txt +21 -0
- package/vendor/components/sha256/abbe3a79cdd442191cb76ac572a7fa62af694850c115c4abba30356bae5f475f/fixtures/chords.json +89 -0
- package/vendor/components/sha256/abbe3a79cdd442191cb76ac572a7fa62af694850c115c4abba30356bae5f475f/fixtures/doremi.json +261 -0
- package/vendor/components/sha256/abbe3a79cdd442191cb76ac572a7fa62af694850c115c4abba30356bae5f475f/fixtures/extras.json +192 -0
- package/vendor/components/sha256/abbe3a79cdd442191cb76ac572a7fa62af694850c115c4abba30356bae5f475f/fixtures/kaeru.json +521 -0
- package/vendor/components/sha256/abbe3a79cdd442191cb76ac572a7fa62af694850c115c4abba30356bae5f475f/fixtures/rhythm.json +248 -0
- package/vendor/components/sha256/abbe3a79cdd442191cb76ac572a7fa62af694850c115c4abba30356bae5f475f/fixtures/ties.json +360 -0
- package/vendor/components/sha256/abbe3a79cdd442191cb76ac572a7fa62af694850c115c4abba30356bae5f475f/index.js +508 -0
- package/vendor/components/sha256/ae4f864445dff17a19df30c528cb44741558217080f8e6563e0c364025a4d0a6/CHANGELOG.md +31 -0
- package/vendor/components/sha256/ae4f864445dff17a19df30c528cb44741558217080f8e6563e0c364025a4d0a6/README.md +34 -0
- package/vendor/components/sha256/ae4f864445dff17a19df30c528cb44741558217080f8e6563e0c364025a4d0a6/demo.html +77 -0
- package/vendor/components/sha256/ae4f864445dff17a19df30c528cb44741558217080f8e6563e0c364025a4d0a6/index.js +222 -0
- package/vendor/components/sha256/b9ee9d0f48ab61977d3aa618e6155ccc3453dbf452235f438fa15db6f554f961/CHANGELOG.md +30 -0
- package/vendor/components/sha256/b9ee9d0f48ab61977d3aa618e6155ccc3453dbf452235f438fa15db6f554f961/README.md +50 -0
- package/vendor/components/sha256/b9ee9d0f48ab61977d3aa618e6155ccc3453dbf452235f438fa15db6f554f961/demo.html +61 -0
- package/vendor/components/sha256/b9ee9d0f48ab61977d3aa618e6155ccc3453dbf452235f438fa15db6f554f961/index.js +171 -0
- package/vendor/components/sha256/bd590a6619f80d659299e4e558f770e75244360450939d504a4eaf7989b0eb97/README.md +21 -0
- package/vendor/components/sha256/bd590a6619f80d659299e4e558f770e75244360450939d504a4eaf7989b0eb97/index.js +93 -0
- package/vendor/components/sha256/bd79435195d9657ad2cb690b49da192bbd20bf1fe25088ba63988dbacafa6f3d/CHANGELOG.md +18 -0
- package/vendor/components/sha256/bd79435195d9657ad2cb690b49da192bbd20bf1fe25088ba63988dbacafa6f3d/README.md +21 -0
- package/vendor/components/sha256/bd79435195d9657ad2cb690b49da192bbd20bf1fe25088ba63988dbacafa6f3d/demo.html +32 -0
- package/vendor/components/sha256/bd79435195d9657ad2cb690b49da192bbd20bf1fe25088ba63988dbacafa6f3d/index.js +53 -0
- package/vendor/components/sha256/be709cea3ba3d0a69138d4c55796f59f6322d97ad0bb8c3a75c3e9fcae5a0419/CHANGELOG.md +20 -0
- package/vendor/components/sha256/be709cea3ba3d0a69138d4c55796f59f6322d97ad0bb8c3a75c3e9fcae5a0419/README.md +40 -0
- package/vendor/components/sha256/be709cea3ba3d0a69138d4c55796f59f6322d97ad0bb8c3a75c3e9fcae5a0419/demo.html +92 -0
- package/vendor/components/sha256/be709cea3ba3d0a69138d4c55796f59f6322d97ad0bb8c3a75c3e9fcae5a0419/index.js +399 -0
- package/vendor/components/sha256/c252d5ceed6735b7ca8095ac8ef035dfc79f8492b2624d7d2eb94d2a27fafe2b/CHANGELOG.md +28 -0
- package/vendor/components/sha256/c252d5ceed6735b7ca8095ac8ef035dfc79f8492b2624d7d2eb94d2a27fafe2b/README.md +36 -0
- package/vendor/components/sha256/c252d5ceed6735b7ca8095ac8ef035dfc79f8492b2624d7d2eb94d2a27fafe2b/demo.html +70 -0
- package/vendor/components/sha256/c252d5ceed6735b7ca8095ac8ef035dfc79f8492b2624d7d2eb94d2a27fafe2b/index.js +179 -0
- package/vendor/components/sha256/c882093b0dc9215cf79d8f42afc5db46dce07c8b677f85148a3efa7355d7221b/CHANGELOG.md +25 -0
- package/vendor/components/sha256/c882093b0dc9215cf79d8f42afc5db46dce07c8b677f85148a3efa7355d7221b/README.md +32 -0
- package/vendor/components/sha256/c882093b0dc9215cf79d8f42afc5db46dce07c8b677f85148a3efa7355d7221b/demo.html +54 -0
- package/vendor/components/sha256/c882093b0dc9215cf79d8f42afc5db46dce07c8b677f85148a3efa7355d7221b/index.js +251 -0
- package/vendor/components/sha256/cd714d22f82d64c80db8fdef33ca03aa618803e8114662ee2692fc7c6ac7168c/CHANGELOG.md +34 -0
- package/vendor/components/sha256/cd714d22f82d64c80db8fdef33ca03aa618803e8114662ee2692fc7c6ac7168c/README.md +35 -0
- package/vendor/components/sha256/cd714d22f82d64c80db8fdef33ca03aa618803e8114662ee2692fc7c6ac7168c/demo.html +69 -0
- package/vendor/components/sha256/cd714d22f82d64c80db8fdef33ca03aa618803e8114662ee2692fc7c6ac7168c/index.js +244 -0
- package/vendor/components/sha256/d0fbcd5e36c0f38c2d8352acee060e783b58cd2ab1ff0f9e7a60da4b2a6e3232/CHANGELOG.md +19 -0
- package/vendor/components/sha256/d0fbcd5e36c0f38c2d8352acee060e783b58cd2ab1ff0f9e7a60da4b2a6e3232/README.md +44 -0
- package/vendor/components/sha256/d0fbcd5e36c0f38c2d8352acee060e783b58cd2ab1ff0f9e7a60da4b2a6e3232/demo.html +44 -0
- package/vendor/components/sha256/d0fbcd5e36c0f38c2d8352acee060e783b58cd2ab1ff0f9e7a60da4b2a6e3232/index.js +334 -0
- package/vendor/components/sha256/d159f55bb5a72bc67c4ffa856bf9e1735d3c37f5cad9673accffc1e1953182e0/CHANGELOG.md +37 -0
- package/vendor/components/sha256/d159f55bb5a72bc67c4ffa856bf9e1735d3c37f5cad9673accffc1e1953182e0/README.md +43 -0
- package/vendor/components/sha256/d159f55bb5a72bc67c4ffa856bf9e1735d3c37f5cad9673accffc1e1953182e0/demo.html +75 -0
- package/vendor/components/sha256/d159f55bb5a72bc67c4ffa856bf9e1735d3c37f5cad9673accffc1e1953182e0/index.js +348 -0
- package/vendor/components/sha256/d29e8fbfd371edf4dea02996c8b43028af511a5f1c212e3b5d89fff68a54e55e/CHANGELOG.md +20 -0
- package/vendor/components/sha256/d29e8fbfd371edf4dea02996c8b43028af511a5f1c212e3b5d89fff68a54e55e/README.md +39 -0
- package/vendor/components/sha256/d29e8fbfd371edf4dea02996c8b43028af511a5f1c212e3b5d89fff68a54e55e/demo.html +70 -0
- package/vendor/components/sha256/d29e8fbfd371edf4dea02996c8b43028af511a5f1c212e3b5d89fff68a54e55e/index.js +134 -0
- package/vendor/components/sha256/d4159ba1206d094364b7735750e5e2532aeabbc299e0d6858e3a0edb84495e11/README.md +22 -0
- package/vendor/components/sha256/d4159ba1206d094364b7735750e5e2532aeabbc299e0d6858e3a0edb84495e11/index.js +59 -0
- package/vendor/components/sha256/d92842c606795528d1246ddb050ac275e1b72659629185750a6e9ac7fdb763a3/README.md +20 -0
- package/vendor/components/sha256/d92842c606795528d1246ddb050ac275e1b72659629185750a6e9ac7fdb763a3/index.js +162 -0
- package/vendor/components/sha256/de611e2477042b14eb9c04bb98ad0bbe6d7b44ca829213dd1a7a2b94d8f946ae/CHANGELOG.md +33 -0
- package/vendor/components/sha256/de611e2477042b14eb9c04bb98ad0bbe6d7b44ca829213dd1a7a2b94d8f946ae/README.md +46 -0
- package/vendor/components/sha256/de611e2477042b14eb9c04bb98ad0bbe6d7b44ca829213dd1a7a2b94d8f946ae/demo.html +43 -0
- package/vendor/components/sha256/de611e2477042b14eb9c04bb98ad0bbe6d7b44ca829213dd1a7a2b94d8f946ae/index.js +278 -0
- package/vendor/components/sha256/de90044c2961a30c88570e41d0c41bfc5037fe691f6f81e12d8e9d3545cd6ec4/CHANGELOG.md +15 -0
- package/vendor/components/sha256/de90044c2961a30c88570e41d0c41bfc5037fe691f6f81e12d8e9d3545cd6ec4/README.md +25 -0
- package/vendor/components/sha256/de90044c2961a30c88570e41d0c41bfc5037fe691f6f81e12d8e9d3545cd6ec4/demo.html +48 -0
- package/vendor/components/sha256/de90044c2961a30c88570e41d0c41bfc5037fe691f6f81e12d8e9d3545cd6ec4/index.js +88 -0
- package/vendor/components/sha256/de9607f86221006e7bad43f1f661c751d9a6f8f9c62da5c7e0d7f1249b9afcd6/README.md +25 -0
- package/vendor/components/sha256/de9607f86221006e7bad43f1f661c751d9a6f8f9c62da5c7e0d7f1249b9afcd6/index.js +122 -0
- package/vendor/components/sha256/e6b022135d0a0bd85a508404f46005986b14d0d175af7ca54b4d024b1e490318/CHANGELOG.md +20 -0
- package/vendor/components/sha256/e6b022135d0a0bd85a508404f46005986b14d0d175af7ca54b4d024b1e490318/README.md +23 -0
- package/vendor/components/sha256/e6b022135d0a0bd85a508404f46005986b14d0d175af7ca54b4d024b1e490318/demo.html +236 -0
- package/vendor/components/sha256/e6b022135d0a0bd85a508404f46005986b14d0d175af7ca54b4d024b1e490318/index.js +572 -0
- package/vendor/components/sha256/e6bbe784ee452d52d534b8fb3a0924e65c49bbb5926139ef5eabd9193500b357/CHANGELOG.md +29 -0
- package/vendor/components/sha256/e6bbe784ee452d52d534b8fb3a0924e65c49bbb5926139ef5eabd9193500b357/README.md +23 -0
- package/vendor/components/sha256/e6bbe784ee452d52d534b8fb3a0924e65c49bbb5926139ef5eabd9193500b357/demo.html +33 -0
- package/vendor/components/sha256/e6bbe784ee452d52d534b8fb3a0924e65c49bbb5926139ef5eabd9193500b357/index.js +121 -0
- package/vendor/components/sha256/eb5efa15920d9883af15d105cc0f7a9b2c781d792faae34a43d44738138b219f/CHANGELOG.md +29 -0
- package/vendor/components/sha256/eb5efa15920d9883af15d105cc0f7a9b2c781d792faae34a43d44738138b219f/README.md +32 -0
- package/vendor/components/sha256/eb5efa15920d9883af15d105cc0f7a9b2c781d792faae34a43d44738138b219f/demo.html +56 -0
- package/vendor/components/sha256/eb5efa15920d9883af15d105cc0f7a9b2c781d792faae34a43d44738138b219f/index.js +232 -0
- package/vendor/components/sha256/ebded96e5827ecf359b73ac0d50a807227d9a06294bd5dabc84263e32c0eeebe/CHANGELOG.md +25 -0
- package/vendor/components/sha256/ebded96e5827ecf359b73ac0d50a807227d9a06294bd5dabc84263e32c0eeebe/README.md +71 -0
- package/vendor/components/sha256/ebded96e5827ecf359b73ac0d50a807227d9a06294bd5dabc84263e32c0eeebe/demo.html +76 -0
- package/vendor/components/sha256/ebded96e5827ecf359b73ac0d50a807227d9a06294bd5dabc84263e32c0eeebe/index.js +777 -0
- package/vendor/components/sha256/ed44804fc14b2755a82960d94cb0322858732ad789fd9a46704ee88955bd65e6/CHANGELOG.md +33 -0
- package/vendor/components/sha256/ed44804fc14b2755a82960d94cb0322858732ad789fd9a46704ee88955bd65e6/README.md +28 -0
- package/vendor/components/sha256/ed44804fc14b2755a82960d94cb0322858732ad789fd9a46704ee88955bd65e6/demo.html +236 -0
- package/vendor/components/sha256/ed44804fc14b2755a82960d94cb0322858732ad789fd9a46704ee88955bd65e6/index.js +600 -0
- package/vendor/components/sha256/ee8519d664179e6b6bb6d2f8cc5b1c07a0ebf3871a8681d28ddd08fecd5f3388/CHANGELOG.md +16 -0
- package/vendor/components/sha256/ee8519d664179e6b6bb6d2f8cc5b1c07a0ebf3871a8681d28ddd08fecd5f3388/README.md +38 -0
- package/vendor/components/sha256/ee8519d664179e6b6bb6d2f8cc5b1c07a0ebf3871a8681d28ddd08fecd5f3388/demo.html +115 -0
- package/vendor/components/sha256/ee8519d664179e6b6bb6d2f8cc5b1c07a0ebf3871a8681d28ddd08fecd5f3388/index.js +361 -0
- package/vendor/components/sha256/ef969fa27f1e11aa52a174874292366c7c8201c7c0d8236a7aef7d7eacf6a177/CHANGELOG.md +27 -0
- package/vendor/components/sha256/ef969fa27f1e11aa52a174874292366c7c8201c7c0d8236a7aef7d7eacf6a177/README.md +27 -0
- package/vendor/components/sha256/ef969fa27f1e11aa52a174874292366c7c8201c7c0d8236a7aef7d7eacf6a177/demo.html +42 -0
- package/vendor/components/sha256/ef969fa27f1e11aa52a174874292366c7c8201c7c0d8236a7aef7d7eacf6a177/index.js +233 -0
- package/vendor/components/sha256/f268cf809438c8af63a42f9c9121110fc7263e4d705c40c6206ce46cf7ec167b/README.md +23 -0
- package/vendor/components/sha256/f268cf809438c8af63a42f9c9121110fc7263e4d705c40c6206ce46cf7ec167b/index.js +180 -0
- package/vendor/components/sha256/f3f55f5ee11ebc66656ca40ff23cd2df6a48f09a2380469f96f8f48033ddf2f7/CHANGELOG.md +31 -0
- package/vendor/components/sha256/f3f55f5ee11ebc66656ca40ff23cd2df6a48f09a2380469f96f8f48033ddf2f7/README.md +36 -0
- package/vendor/components/sha256/f3f55f5ee11ebc66656ca40ff23cd2df6a48f09a2380469f96f8f48033ddf2f7/demo.html +50 -0
- package/vendor/components/sha256/f3f55f5ee11ebc66656ca40ff23cd2df6a48f09a2380469f96f8f48033ddf2f7/index.js +263 -0
- package/vendor/components/sha256/fa8c1e548234bdbfa401bb4b085c5ef24d607a006c377c8c1cf3bcfc52427a5e/CHANGELOG.md +20 -0
- package/vendor/components/sha256/fa8c1e548234bdbfa401bb4b085c5ef24d607a006c377c8c1cf3bcfc52427a5e/README.md +39 -0
- package/vendor/components/sha256/fa8c1e548234bdbfa401bb4b085c5ef24d607a006c377c8c1cf3bcfc52427a5e/demo.html +66 -0
- package/vendor/components/sha256/fa8c1e548234bdbfa401bb4b085c5ef24d607a006c377c8c1cf3bcfc52427a5e/index.js +258 -0
- package/vendor/components/sha256/fadd24868e2730ec14b8f3f1e9cb75b8577a48b8d71beaa12ef089f7a3ba0a7d/README.md +22 -0
- package/vendor/components/sha256/fadd24868e2730ec14b8f3f1e9cb75b8577a48b8d71beaa12ef089f7a3ba0a7d/index.js +37 -0
- package/vendor/components/sha256/faf6a2f0b5df589639de624e75c5b20594f517e4426f6415d152809249b00b92/README.md +19 -0
- package/vendor/components/sha256/faf6a2f0b5df589639de624e75c5b20594f517e4426f6415d152809249b00b92/index.js +200 -0
- package/vendor/components/sha256/fd07adeb4b775e139092dd69a3fcbca4528d08e67be6b9e9cf53d4fd06be775b/CHANGELOG.md +25 -0
- package/vendor/components/sha256/fd07adeb4b775e139092dd69a3fcbca4528d08e67be6b9e9cf53d4fd06be775b/README.md +32 -0
- package/vendor/components/sha256/fd07adeb4b775e139092dd69a3fcbca4528d08e67be6b9e9cf53d4fd06be775b/demo.html +51 -0
- package/vendor/components/sha256/fd07adeb4b775e139092dd69a3fcbca4528d08e67be6b9e9cf53d4fd06be775b/index.js +270 -0
- package/vendor/components/sha256/ffac8bd95044aeb032b20dc8412ced70d09759d993955ef66697d4f2aa7f97a5/CHANGELOG.md +19 -0
- package/vendor/components/sha256/ffac8bd95044aeb032b20dc8412ced70d09759d993955ef66697d4f2aa7f97a5/README.md +34 -0
- package/vendor/components/sha256/ffac8bd95044aeb032b20dc8412ced70d09759d993955ef66697d4f2aa7f97a5/demo.html +60 -0
- package/vendor/components/sha256/ffac8bd95044aeb032b20dc8412ced70d09759d993955ef66697d4f2aa7f97a5/index.js +209 -0
- package/vendor/components-2/manifest-2.2.0.json +1868 -0
- package/vendor/csl/SOURCE.json +17 -0
- package/vendor/csl/locales/locales-en-US.xml +864 -0
- package/vendor/csl/locales/locales-ja-JP.xml +676 -0
- package/vendor/csl/styles/apa.csl +2278 -0
- package/vendor/csl/styles/ieee.csl +519 -0
- package/vendor/csl/styles/sist02.csl +273 -0
- package/vendor/egatari-spec/SOURCE.json +3 -3
- package/vendor/egatari-spec/schema/deck-meta.schema.json +6 -0
|
@@ -0,0 +1,894 @@
|
|
|
1
|
+
// m-map-japan:日本の 47 都道府県の地図。地域の強調・塗り分け(階級)・点・矢印・作り手の重ね描きを段階ごとに出す
|
|
2
|
+
// <m-map-japan labels="focus" style="height:460px"><script type="application/json">
|
|
3
|
+
// {"regions": [{"id": "13", "tone": "emph", "step": 1}, {"group": "kinki", "tone": "series-2", "step": 2}],
|
|
4
|
+
// "values": {"01": 5.1, "13": 14.1}, "classes": [0, 5, 10, 15],
|
|
5
|
+
// "points": [{"lon": 139.69, "lat": 35.69, "label": "東京", "step": 3}], "flows": [{"from": "13", "to": "27", "via": [[137.5, 34.4]], "step": 4}],
|
|
6
|
+
// "shapes": [{"label": "例:古代の国の範囲", "polygon": [[135.1, 34.2], [136.0, 34.2], [136.0, 35.0]], "step": 5}]}
|
|
7
|
+
// (JSON の終わり)</m-map-japan>
|
|
8
|
+
// 地図のデータは Natural Earth 5.1.1(パブリックドメイン)を加工したもので、作り方は tools/map/build-japan.mjs(docs/map-design.md)。
|
|
9
|
+
// 領土は日本政府の立場のとおり(北方領土は北海道、竹島は島根県、尖閣諸島は沖縄県)。データに固定した性質で、切り替えはない。
|
|
10
|
+
// 島(docs/map-design.md §5.3):北方領土・竹島・尖閣諸島はいつも描く。沖ノ鳥島・南鳥島は小笠原諸島の枠(islands="all")か layout="true" のときに描き、
|
|
11
|
+
// そのときはいつも名前を書く。読める層には描いた島を挙げる
|
|
12
|
+
// 段階:地図そのもの(陸地・枠・枠の名前)は段階 0 から出ている(見出しや軸と同じ)。項目は step(既定 1)で出る
|
|
13
|
+
// 見せ方(docs/conventions.md §1):fade(フェードして現れる、既定)・sweep(同じ段階の中で西から東へ順に現れる)・
|
|
14
|
+
// draw(地域と重ね描きは輪郭を引いてから塗る)。どれも動かない(位置は変わらない)。段階の数・長さ・最後の中身は同じ
|
|
15
|
+
// 2.0(Egatari spec §6.1 の部品):base の MotionElement・el・prog・variant・previewOpacity を使い、プレイヤーのグローバルは使わない。
|
|
16
|
+
// 属性・データ・要素の大きさ・テーマの色の問題は ctx.report で知らせる(1.x の console.warn("m-map-japan: …") の代わり)
|
|
17
|
+
egatariParts.define({name: "map-japan", version: "2.0.2", requires: {base: "1.1.0"}, element: "m-map-japan"}, function(deps){
|
|
18
|
+
"use strict";
|
|
19
|
+
var base = deps.base;
|
|
20
|
+
// ---- BEGIN map-japan-data (generated by tools/map/build-japan.mjs from Natural Earth 5.1.1, public domain; do not edit by hand) ----
|
|
21
|
+
// Natural Earth ne_10m_admin_1_states_provinces + ne_10m_admin_0_countries_jpn (北方領土 → 01, 竹島 → 32), simplified (Visvalingam 1 km),
|
|
22
|
+
// projected (LCC 30°/42°, 136°E, 1 unit ≈ 1 km) and quantized to integers. arcs: zigzag varints (ALPH), per arc: count, then x, y deltas
|
|
23
|
+
var MAP = {
|
|
24
|
+
proj: {"lon0":136,"lat1":30,"lat2":42,"k":6371},
|
|
25
|
+
alph: "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_",
|
|
26
|
+
bounds: {main: [-698,-5375,1715,1765], "true": [-1344,-5375,3191,2883]},
|
|
27
|
+
insets: [{"id":"ryukyu","name":"南西諸島","s":2,"box":[122,23.5,132,30.1],"cb":[-1336,-3597,864,584],"corner":{"s":1,"frame":[-690,-5367,924,644]}},{"id":"ogasawara","name":"小笠原諸島","s":0.5,"box":[135,19.5,155,31],"cb":[9,-3275,1830,775],"corner":{"s":0.25,"frame":[491,-3872,518,254]}}],
|
|
28
|
+
prefs: [["01","北海道",141.347,43.064],["02","青森県",140.74,40.824],["03","岩手県",141.153,39.704],["04","宮城県",140.872,38.269],["05","秋田県",140.102,39.719],["06","山形県",140.364,38.24],["07","福島県",140.468,37.75],["08","茨城県",140.447,36.342],["09","栃木県",139.884,36.566],["10","群馬県",139.061,36.391],["11","埼玉県",139.649,35.857],["12","千葉県",140.123,35.605],["13","東京都",139.692,35.69],["14","神奈川県",139.642,35.448],["15","新潟県",139.023,37.902],["16","富山県",137.211,36.695],["17","石川県",136.626,36.594],["18","福井県",136.222,36.065],["19","山梨県",138.568,35.664],["20","長野県",138.181,36.651],["21","岐阜県",136.722,35.391],["22","静岡県",138.383,34.977],["23","愛知県",136.907,35.18],["24","三重県",136.509,34.73],["25","滋賀県",135.868,35.004],["26","京都府",135.756,35.021],["27","大阪府",135.52,34.686],["28","兵庫県",135.183,34.691],["29","奈良県",135.833,34.685],["30","和歌山県",135.167,34.226],["31","鳥取県",134.238,35.504],["32","島根県",133.051,35.472],["33","岡山県",133.935,34.662],["34","広島県",132.459,34.397],["35","山口県",131.471,34.186],["36","徳島県",134.559,34.066],["37","香川県",134.043,34.34],["38","愛媛県",132.766,33.842],["39","高知県",133.531,33.56],["40","福岡県",130.418,33.607],["41","佐賀県",130.299,33.249],["42","長崎県",129.873,32.745],["43","熊本県",130.742,32.79],["44","大分県",131.612,33.238],["45","宮崎県",131.424,31.911],["46","鹿児島県",130.558,31.56],["47","沖縄県",127.681,26.212]],
|
|
29
|
+
groups: [["hokkaido","北海道地方",["01"],[550,-5085]],["tohoku","東北地方",["02","03","04","05","06","07"],[456,-4634]],["kanto","関東地方",["08","09","10","11","12","13","14"],[338,-4331]],["chubu","中部地方",["15","16","17","18","19","20","21","22","23"],[183,-4269]],["kinki","近畿地方",["24","25","26","27","28","29","30"],[-113,-4140]],["chugoku","中国地方",["31","32","33","34","35"],[-203,-4124]],["shikoku","四国地方",["36","37","38","39"],[-155,-4013]],["kyushu","九州地方",["40","41","42","43","44","45","46","47"],[-454,-3804]]],
|
|
30
|
+
fixed: [["竹島",131.868,37.241,"32"],["魚釣島",123.476,25.745,"47"],["沖ノ鳥島",136.082,20.425,"13"],["南鳥島",153.981,24.287,"13"],["父島",142.2,27.07,"13"],["硫黄島",141.32,24.78,"13"]],
|
|
31
|
+
anchors: {"10":[266,-4306,-1],"11":[296,-4250,-1],"12":[375,-4176,-1],"13":[331,-4213,-1],"14":[292,-4186,-1],"15":[248,-4381,-1],"16":[91,-4310,-1],"17":[50,-4277,-1],"18":[23,-4239,-1],"19":[245,-4204,-1],"20":[183,-4269,-1],"21":[97,-4246,-1],"22":[189,-4139,-1],"23":[115,-4137,-1],"24":[39,-4071,-1],"25":[11,-4144,-1],"26":[-36,-4150,-1],"27":[-44,-4073,-1],"28":[-94,-4130,-1],"29":[-9,-4038,-1],"30":[-59,-4016,-1],"31":[-157,-4175,-1],"32":[-277,-4170,-1],"33":[-203,-4124,-1],"34":[-274,-4101,-1],"35":[-408,-4058,-1],"36":[-155,-4013,-1],"37":[-185,-4048,-1],"38":[-283,-4002,-1],"39":[-247,-3981,-1],"40":[-485,-3996,-1],"41":[-550,-3959,-1],"42":[-533,-3905,-1],"43":[-474,-3901,-1],"44":[-411,-3923,-1],"45":[-435,-3860,-1],"46":[-519,-3803,-1],"47":[-777,-3244,0],"01":[550,-5085,-1],"02":[432,-4769,-1],"03":[456,-4634,-1],"04":[425,-4541,-1],"05":[373,-4696,-1],"06":[355,-4539,-1],"07":[396,-4406,-1],"08":[377,-4265,-1],"09":[338,-4331,-1]},
|
|
32
|
+
feats: [["01",-1,[[[199]],[[200]],[[201]],[[202]],[[203]],[[204]],[[205]],[[206]],[[207]],[[208]],[[209]],[[210]],[[211]]]],["02",-1,[[[-187,188,189]]]],["03",-1,[[[-189,-186,190,191]]]],["04",-1,[[[-191,-185,-182,192,193]]]],["05",-1,[[[-183,184,185,186,187]]]],["06",-1,[[[-32,180,181,182,183]]]],["07",-1,[[[-193,-181,-31,-6,194,195,196]]]],["08",-1,[[[-196,197,-4,-11,-12,198]]]],["09",-1,[[[-5,-198,-195]]]],["10",-1,[[[0,1,2,3,4,5]]]],["11",-1,[[[-3,6,7,8,9,10]]]],["12",-1,[[[11,-10,12,13]]]],["13",-1,[[[-13,-9,17,18,19]],[[20]],[[21]],[[22]],[[23]],[[24]]]],["13",1,[[[14]],[[15]],[[16]]]],["14",-1,[[[-19,25,26,27]]]],["15",-1,[[[28,29,-1,30,31,32]],[[33]]]],["16",-1,[[[34,35,36,-29,37]]]],["17",-1,[[[38,39,-35,40]],[[41]]]],["18",-1,[[[42,43,44,-39,45]]]],["19",-1,[[[46,47,-26,-18,-8]]]],["20",-1,[[[-30,-37,48,49,50,-47,-7,-2]]]],["21",-1,[[[-36,-40,-45,51,52,53,-49]]]],["22",-1,[[[-27,-48,-51,54,55]]]],["23",-1,[[[-55,-50,-54,56,57]],[[58]]]],["24",-1,[[[-57,-53,59,60,61,62,63]]]],["25",-1,[[[-44,64,-60,-52]]]],["26",-1,[[[65,66,67,-61,-65,-43,68]]]],["27",-1,[[[69,70,-67,71,72]],[[73]]]],["28",-1,[[[74,75,76,-72,-66,77]],[[78]]]],["29",-1,[[[-68,-71,79,-62]]]],["30",-1,[[[-63,-80,-70,80]]]],["31",-1,[[[81,82,83,-75,84]]]],["32",-1,[[[85]],[[86]],[[87,88,-82,89]],[[90]],[[91]]]],["33",-1,[[[-76,-84,92,93]]]],["34",-1,[[[-93,-83,-89,94,95]],[[96]],[[97]],[[98]],[[99]]]],["35",-1,[[[-95,-88,100]],[[101]],[[102]]]],["36",-1,[[[103,104,105,106]]]],["37",-1,[[[107,-104,108]],[[109]],[[110]],[[111]]]],["38",-1,[[[112,-105,-108,113]],[[114]],[[115]],[[116]]]],["39",-1,[[[-106,-113,117]],[[118]]]],["40",-1,[[[119,120,121,122,123]]]],["41",-1,[[[124,125,-120,126]]]],["42",-1,[[[-125,127]],[[128]],[[129]],[[130]],[[131]],[[132]],[[133]],[[134]],[[135]],[[136]],[[137]],[[138]]]],["43",-1,[[[139,140,141,-122,142]],[[143]],[[144]],[[145]],[[146]],[[147]]]],["44",-1,[[[-123,-142,148,149]]]],["45",-1,[[[-149,-141,150,151]]]],["46",-1,[[[161]],[[-151,-140,162]],[[163]],[[164]],[[165]],[[166]],[[167]]]],["46",0,[[[152]],[[153]],[[154]],[[155]],[[156]],[[157]],[[158]],[[159]],[[160]]]],["47",0,[[[168]],[[169]],[[170]],[[171]],[[172]],[[173]],[[174]],[[175]],[[176]],[[177]],[[178]],[[179]]]]],
|
|
33
|
+
arcs: "a1uH_l873377730383492140E740834B418747274q1wEjk8B6B2540434743C5O4688E1616062240G5A2I143224662I24EAi1aFbf8454761C7I7C523276D4560A462E4C062C8838082C64mKpg83Bk1iK_g81397F19277BD036B4D6B2533909509290969015505456oItl8P5016aFbf8042C8cFre8G8C4A0UiGfe863654086c18MC80E546C185A0A3K4CsLXe80F19359L7B8-KZg8535515c1eRXe8503097775591B5F0H43432N291TB53BFBD906sLXe84G3Gc4sLXd864853561A2EC2E309G74B82A1271360474C406440656184608261A62065054700440A40444E1670749C940430365I245C0054360232N5H6NAFKJA9A124E740664733GeY1by550521626676103Guc1lf6351077316E6663Goc1pi634466221073332CiGfe8446C4688EAY1mHXd860A686A4E242AC411725036540MA86G4CgLdc825374D6643M-Lvr7333404682484406933D5IWKZy72460434733505408AqIj-71C622D50IiJZX8910G04C6610B3731CwKzw75112266005GmHXd804081C38PG3814KgGbb8C142064E5A2A6C42C4i2mHhZ84784390B65A581O5A0446144EG32460880403747800523117113512F35216207734180C921A-8_l84662466Uy1o9pk8834189250763G4442E64A780C362412B63674583A1A0424I4886480C28u1uH_l8232H190B5B3235056B2D3D43A1A3A02543808162231B172589CH8De1gKbs8B733154J09252P45C061654915977053572HR9c2cJZx8185C3A181k138HKFCD89012LIBA58187S18569A5A5I56JCHKDC7252B17A94HCD6LAB4c2iDrt832276H4D2D13725E329C56167A1A0A26C3467E0A14920682I7KD2327AF0309507250Y1u5vl890545032583E3G582C3A4I3A1G4A1C26i1g4dh8802741C2420822C94567A94182A540286360A4C2E6Gs8xh8CB276B05892F1Ng1-8_l8J4D81624183A5434509070505371537537890323Oe1bh8CA2C66826280E064AA64A3CW4tf86509AF2579W4u5vl8230B0B13301A7055107207202511256BE843610589A3A2650710132B6160611527117172N87830JC503152F8584A5C123GA41C6E463C4418BW17Eb1q1DE743698Gu5bn81052319646I307Gz2Xc8562A08CE22S8A1Y1j1pa8A78140654H218463E32760253D0381G6e1k1tc8692B63C2A04465I3E2E36903373371150F4913e3e1bh8365270267E7C7I5616680CEC6C1C3C3235433DB82626142298335275148A942434133035322A42343092112B34367271055205c1cFre8787257B1923137B3347I5231125E4A5A2C24y1gCtc844284C0A16281A2E42C1444E26A68043251B07270B254186826640O3C3-1s8xh886481A9C283E0468069I9E92547E246244A44C8A0A4CAA24184A12522A3CIu8da8184824816161C2A0W1cAtZ86165C7C545A36325350567132F6527Ok1tc86A284660484A2E1G3C0846Ce2rZ8M54226C8A4k1w3dZ80L8B69436283A181C82488A46660C560E644428365A3ScAtZ81E3CBE143C581876B6321A1A2Cm4i8XW8E180G2K6I5E0E2QA820351032FEBAD354943QD275205634963A1A380C26624AA1252D13A2628023628184C56286614AA20C58764210727014720692763412717135115295103498w3dZ86A4846a3e4lY862A1214B200A9K0E0464283C26G8420951352B2769223A06408A4241E1424561E4461A3136HC74303534163AE380a1BG5808m4jX8284155Ue2rZ82448241G5O5A96B4B091302856D840rW86CW26fW8424A54260A44648046422216769436128I14481C0E3I261290541858B81852ARdw70428GI84g41bv7EZ18960456069314344402955133067214661053105858560A56249622344C5478138A041C02830712662A3251921354342070373379173D777B15327554JEH6D1747C940Uj1pa844AC0C2C083Q8G0A446066644408y1h6xc80K8C84C3420K165695121E04626266A461822668448066808626367448Op3dY8C26248A643434686CI0616Gr1pW866I820C540E643g2z2Xc801331356725446424108733831491332B561379A03AD2587397732D272049672320454B3Kd5jz74440C0M341M5E0E780I_1zz7432D395703494H6HEp3dY82848840O2E58Of3bW8182A0C5812069CBC78J634An4h-744631374Ob9lc864484O4828482A16763271QX9zZ81A2A569G781E0E0C644A0614-1p9hW8822541444189846140O184A862EA4244C2446161I3623961066005A08663Ih6xc85051R09273D8F612s1r5p_7327C943AB8DQ5058266A6204C165E5A15915310529AD43496557k1_1zz72A0A8C04705616565A16444846243E266285A4836268W3d5jz736628828404804B0025C408618D61KA06448446404606440EC22B214A82406AA82SAM21882172363A3638931474127UjFbc8726G844224341C0C36F6340A383C8dG_Y862C062y1lFxY863C343054380A327876D41O686464045A345A04206E2886G22E38061C7Y1b9lc8B2367492P233H6V0R592D65810B1B717EXGbg852140E892513QfGfg851DC34644115402661076113g1nOnW80C4A7G280424E4023606484280A1A449631305C9W2lM_-71745654529671723A58764E36263G2E5G3237501A9A3CD6961C4A364408060Y3jFbc823810372325192773450369016H0B4329226907016840A163832F40452HC3C9616965034FCBA1830587698521AD672B0ArGnf826837312MrEfh87933F8161CCCC2A92B33OlFxY88C0S266C0E2A480A6C2A08c2nEv-7A3421478I763I964864A601380E2236B41850333725835A5C066C3610783453361A2ElM_-7260GAQ24A682c3lLZz719GHE74164A166341868462683246085A14115618526C5K1616315A0647430361846638342210711874B4612840660EF2940MtJby765530D5034269842A044EpIXz7503264620511GnHnz734942680214B10CzKxz7525844A715u6nOnW83471101A5018567432067806F214529033437114243451075031723013315424E4F432501C3444482A3654344A6416243C34644565A747C44886142683A6A56769200814C0694484226115C083A1A644762641434166A648G48626343014246383253B278167051909850BCnLhw77104646035e1pLxw7A2256426602921806770543074577390164E41c1z8xy73A3251P0707414549252525153D2567098768jDlx72G043Aa1lDnw7I8C0C88265C0224C0GE24424166C8220A4i2v9bu7230560891363A3E921412560236021C5159005414319533912311723094507193354B134506vDrx7A224y1z8xy733355255B5259738501D3134365190739238H8DC52F51286462E1A3656W1f9d_7H25452311CA14606208944444B2517AXDd-734264315AZBt-764453356e2lJbq765030939035D0340864147832B63E7059D1923O2838925056B8B8B47A087C182G1I5G1u4vDrx7785450B39071B214L653593DFJ362416B214DA083406723K0C38DCH8BA58LC54B2723472BA04E3404363OBE046061414687484C108882452183233362662163A424C34263248422782A441KbHXz780473B327842560663AdJvx79A24612BEpGvy753521E40A901a4lJbq7C202787E0A65A188A485C184286240199B0B802719272763862767696540058527170723A52263A1831345O921C1C164G4C24846C4266C6406606C212D4D6J6943A_J_o732044103c1hY1ru7M2A18064GA4442C5602A08945C5076383408CtW1hs74006A8060GMfW1dr7A1430345A7C08782C884Y1zTvr74D3J4909056549CBA1C0A2408B132543m3pRhv7L5BP05077101652511671752341456513553B134915834F178111654042208363078729324A685243A527136990752720494366266H638QtZ1xt79A06AI64C4263824CC66C8K4IpX1Xr745337D3BGB658AA2k1hY1ru732507745333352501408443439301646A804561E1315u6tZ1xt703B3723107563255121C28323A2480444006661642612C62434404C3AC043806AG04J7145277492723579145331373361806360C64064A4226810446480260163152487C942483A5438523AB806383418280264204BA300A6626A341456083431347093F53B0967077G745y1jf1rp7772703510756529419303424162418503AA621E0684105334566618015o1Xe1vr72D30521A2432117402A4261A084229420B6540652313B411g1bb1lu7505A921A56045866523314626163A72787034509UtZ1zw7415329B3305A0612288A67804531c1bc1p-71533147227521I121C1608404460656J411BW2db1xW8600725337278903C0626345C160C5224A3066308502480875B430745858H53Gdf1rq755521A64424505Eze1Xr7127246422307Gle1br70353163006C609Erd1zt7741246404317AZb1Zv731548425GZX1pl76884I3E542AA86y1_U_k7I241A3A0618784402539138B055B5917054967604305458547656B63A1Y1bRxp7B9151H3F573933B930940A483A70D951Y2fW1dr72E428AEC485824467054D606U3605ADA04447622261632780A5316043436DE16IdY1zl753142E46406D1351Y1pW1_n75013B4543452146A81E008658J631172m1XY1fo731J6185C1838484696641A42C5656149614307030J1735CrX1pm73416614333GhW1no715323444168009UbRxp764C08166088483K08B6084222E60W4XOZp74980C523718733A5A371327110970745A023B1B18B5034534785036B30B49193147374B1531F2340448003810741848F1725175D357053B076149A92F13591a1_U_k736GO6AA6041A2624E6682A28C6C26A3C5As2rSng76460462842E1434D21076D85076N47513905In18N4729674BA55703824143333015696047038763420523Czb1l-60C43230350Gva1z_671120644C23515Aja1nW737362461Odj1pl69454B1301A2462C3678503Udh1zn6151D13B43E4E1842286063890555Y1bf1_p653571550146A06226244434461133330Epa1jr696DAA2606927y2nc1bs61930045A5147D6543853963114D0983074666036B15034A462800AA844276043A5774147648741696123K32333Czk1xi65556644225Sna1fj7383452583632246463456B631B-6ZX1pl738965772364406560448280A3624521828EA6A6A1A263E5A9816575192A86A144G6080U286222A22E1616F017115533D3B07296B2587296781A66064081A7A30312513D132542464C2243A2686484C1G1658243GB6341E40A78143G3A361456903A0GB70134105D5112745636380a1xVZZ77553537353520478902C8OA4I143A74927W2lTdc734381ABE080A3C9C5208281824424561831323150347476027430B470F417DInY1zZ75133506888406375EXa1pc7115422424113KrZ1tj730145530146AA02307a1Xk2fz5773C185231303622E4K840A9670531F530CZp2n-5B006A24313g1pg2d-5527C545A5050775A62485446628063492749EH01OrZ2x-550573950183I84G0E00397EzTnZ6305604826733Kpv1ze63553525204C6464523o4vl1bh613DH065E7256169408B670332553F11208082282460456D6725A3090120A2E5A303A3451062G08A04067426369901347CH20C4405735073563E22381A945C261156541806143GN25CZp1Xh67036624027Cvn1jj6BE226345058rTZa6482551Gva2j_571143026A24315Abs1pd631182449W1gKbs8G46180806842C286C5624165051F0Lq1eNft82H41A1658D2B072B4527674F371507390780232509055D5515SkOrz891533BD790D1537195553092D1IwKZ_81I7K5S3838FE387OCkOrz862C3878541e2qPd-82B27035515256733395357173B296B4F874917396D5513254160233B190L2509154785q1YQbd90B4F0933231353915236B8D491343077711350D8T091307672Y2wKde902EE1Q1A041ABQ5656309373022G446AE165618486462C48060i17e136523E1M14QYQbd9C641A9QHA3A2C561C24147EBm7-Txe9995313325133377F1B3J3P1L0J172L2B4B2119BA9650D5FF739131B91624385C3I141G0A120A64A7816065408265A5114762666C2638180G065I56525115F3055593380626187A7273593N37192H155371321632915951340A1A127014A2460842442651353Y11E58519A505330765E321630584660482Qe1qPd-8A2G6C642K0423868C6C765E6870B470B2580G4a4gUn-8278862072017C123A39523A4259781098503701543832305565087338581074333367405838B035505337811470D497J075925195199370365139503455D535FBDe1eNft8A4E1826862A1E44226062484424380430F43A0s3-Qzs83F09096P8H674103502765604A400985E340C68018622840642711193125501761134542073732558529703385436003770385251B8146213B17W1oItl88565C5UHC560CBA382O6GA48642C04OkNZm884MK84608B65194166G6G4c1mQrl82943A56165272J290J094F075x1372715399Jm1kNZm82Q0A4A7A2C2I085A1A367194745032781492343A747470UeRXe8537BRh1BV3P2367091B2F278H8V8HAmd1hZA5150C401yMin1x-9301270321652DI460475D09115912742A8617555375H39113935DD7D17234D13276FCJ2D238D29075B32147C5E545A98DKHO5472R0L171953731390531321E3632512B8593H0B8L2739B21C1Z19ND5535937751F9BB957953VV9D3135DNr1x155D7557B335750560876J6153316082A3608580A28Ok16G6Q4S0A3c1BQ186m10I3A185678545298383A6E046A582AAE460A1A7G9CBA94F570132750B6F43133B5BBLD321654705G2A66CA8A28683854DG5C360A725733345C525A74D07438184I0A3E5C1A4EA8628CG864AG46082608120C14501A7E1E18086E4CA681C44B65K763071H27C343A54F4380485662838082E88061A9638115BB31B1739DD77B159572929411DB53F953192B27298F6765C3C2E384SU4A66621250264083AFC98385QLK9E3E0E2C6828AE8I2AAAAUIG4a1IY1AQG864886432943232H293H0929EVIX1ADMNEJOJMDM5604622E44041C1O26155154567620664A2C1455782832361530543E1A9G1814260474D8981438125600371MeItq954B4386O2265232F8D31A-k1XWA31D1MA35SgQnfA9BB3325624164444A640634901MwOjhA523512480C4A46450N33AoHtl950086303Igp1ZWA5076CAA313451170c1qs1tYA533670DA94261AA46045A347404183293051-3aq1lcAF4309551775052365G360A340834525A08983A08385638DE3476385824282AC3640A242F1N23ABA163472BC7176BED434987A141808367498384454F10D6w6w-1rkA138703975050F80676347A18327E56b1A30731B573D9E164A084804F6587I76327554060A3C7658DA342636B75416646064087G54955246483853371428245638164640824D8DA762A58J658BEBA9498D310745634246444361E06941AH8BCFA7A3E343CB41A1E04085450377Cco1f_91334046003Aaq1zWA31348203"
|
|
34
|
+
};
|
|
35
|
+
// ---- END map-japan-data ----
|
|
36
|
+
// ---- 地図のデータを読む(作るときに投影を済ませた整数の座標。1 単位 ≈ 1 km、y は下向き)
|
|
37
|
+
var ALPH = MAP.alph;
|
|
38
|
+
function decode(s){
|
|
39
|
+
var out = [], v = 0, sh = 1;
|
|
40
|
+
for (var i = 0; i < s.length; i++){
|
|
41
|
+
var d = ALPH.indexOf(s[i]);
|
|
42
|
+
if (d >= 32){ v += (d - 32) * sh; sh *= 32; }
|
|
43
|
+
else { v += d * sh; out.push(v % 2 ? -(v + 1) / 2 : v / 2); v = 0; sh = 1; }
|
|
44
|
+
}
|
|
45
|
+
return out;
|
|
46
|
+
}
|
|
47
|
+
var ARCS = (function(){
|
|
48
|
+
var n = decode(MAP.arcs), arcs = [], i = 0;
|
|
49
|
+
while (i < n.length){
|
|
50
|
+
var c = n[i++], a = [], x = 0, y = 0;
|
|
51
|
+
for (var j = 0; j < c; j++){ x += n[i++]; y += n[i++]; a.push([x, y]); }
|
|
52
|
+
arcs.push(a);
|
|
53
|
+
}
|
|
54
|
+
return arcs;
|
|
55
|
+
})();
|
|
56
|
+
function ring(idx){
|
|
57
|
+
var r = [];
|
|
58
|
+
idx.forEach(function(i){
|
|
59
|
+
var a = i < 0 ? ARCS[~i].slice().reverse() : ARCS[i];
|
|
60
|
+
for (var j = r.length ? 1 : 0; j < a.length; j++) r.push(a[j]);
|
|
61
|
+
});
|
|
62
|
+
return r;
|
|
63
|
+
}
|
|
64
|
+
// feats:[{code, inset, polys: [[外の環, 穴…]…]}](座標は本当の位置。inset ≥ 0 の部分は枠の中へ動かして描く)
|
|
65
|
+
var FEATS = MAP.feats.map(function(f){ return {code: f[0], inset: f[1], polys: f[2].map(function(p){ return p.map(ring); })}; });
|
|
66
|
+
var NAME = {}, CAPITAL = {}, CODE_BY = {};
|
|
67
|
+
MAP.prefs.forEach(function(p){
|
|
68
|
+
NAME[p[0]] = p[1]; CAPITAL[p[0]] = [p[2], p[3]];
|
|
69
|
+
CODE_BY[p[0]] = CODE_BY["JP-" + p[0]] = CODE_BY[p[1]] = CODE_BY[+p[0]] = p[0];
|
|
70
|
+
if (p[1] !== "北海道") CODE_BY[p[1].replace(/[都府県]$/, "")] = p[0];
|
|
71
|
+
});
|
|
72
|
+
var GROUP = {};
|
|
73
|
+
MAP.groups.forEach(function(g){ GROUP[g[0]] = GROUP[g[1]] = GROUP[g[1].replace(/地方$/, "")] = {id: g[0], name: g[1], codes: g[2], anchor: g[3]}; });
|
|
74
|
+
// 正角円錐図法(標準緯線 30°・42°、中央経線 136°E、球)。作るときの d3-geo の geoConicConformal と同じ式(作る手順が確かめる)
|
|
75
|
+
var LCC = (function(P){
|
|
76
|
+
var r = Math.PI / 180, y0 = P.lat1 * r, y1 = P.lat2 * r, f = function(y){ return Math.tan((Math.PI / 2 + y) / 2); };
|
|
77
|
+
var n = Math.log(Math.cos(y0) / Math.cos(y1)) / Math.log(f(y1) / f(y0)), F = Math.cos(y0) * Math.pow(f(y0), n) / n;
|
|
78
|
+
return function(lon, lat){ var q = F / Math.pow(f(lat * r), n), a = n * (lon - P.lon0) * r; return [P.k * q * Math.sin(a), -P.k * (F - q * Math.cos(a))]; };
|
|
79
|
+
})(MAP.proj);
|
|
80
|
+
var TONES = /^(term|emph|muted|accent2|fg|series-[1-4])$/;
|
|
81
|
+
// 字の幅の見積もり(字の読み込みを待たない。base の textWidth:font の要素の字で測った幅)
|
|
82
|
+
function est(s, size, font){ return base.textWidth(s, size, {font: font}); }
|
|
83
|
+
function inRing(x, y, r){
|
|
84
|
+
var c = false;
|
|
85
|
+
for (var i = 0, j = r.length - 1; i < r.length; j = i++){
|
|
86
|
+
var a = r[i], b = r[j];
|
|
87
|
+
if ((a[1] > y) !== (b[1] > y) && x < (b[0] - a[0]) * (y - a[1]) / (b[1] - a[1]) + a[0]) c = !c;
|
|
88
|
+
}
|
|
89
|
+
return c;
|
|
90
|
+
}
|
|
91
|
+
// 色を sRGB で読む(テーマの変数の値をキャンバスに 1 点塗って読む。読めなければ null)
|
|
92
|
+
function rgbOf(css){
|
|
93
|
+
try {
|
|
94
|
+
var cv = document.createElement("canvas"); cv.width = cv.height = 1;
|
|
95
|
+
var g = cv.getContext("2d", {willReadFrequently: true});
|
|
96
|
+
if (!g) return null;
|
|
97
|
+
g.fillStyle = "#010203"; g.fillStyle = css;
|
|
98
|
+
if (/^#010203$/i.test(g.fillStyle) && !/^#010203$/i.test(css)) return null;
|
|
99
|
+
g.fillRect(0, 0, 1, 1);
|
|
100
|
+
var d = g.getImageData(0, 0, 1, 1).data;
|
|
101
|
+
return [d[0], d[1], d[2]];
|
|
102
|
+
} catch (e) { return null; }
|
|
103
|
+
}
|
|
104
|
+
function lin(c){ c /= 255; return c <= 0.04045 ? c / 12.92 : Math.pow((c + 0.055) / 1.055, 2.4); }
|
|
105
|
+
function lum(c){ return 0.2126 * lin(c[0]) + 0.7152 * lin(c[1]) + 0.0722 * lin(c[2]); }
|
|
106
|
+
function oklab(c){
|
|
107
|
+
var r = lin(c[0]), g = lin(c[1]), b = lin(c[2]);
|
|
108
|
+
var l = Math.cbrt(0.4122214708 * r + 0.5363325363 * g + 0.0514459929 * b), m = Math.cbrt(0.2119034982 * r + 0.6806995451 * g + 0.1073969566 * b), s = Math.cbrt(0.0883024619 * r + 0.2817188376 * g + 0.6299787005 * b);
|
|
109
|
+
return [0.2104542553 * l + 0.7936177850 * m - 0.0040720468 * s, 1.9779984951 * l - 2.4285922050 * m + 0.4505937099 * s, 0.0259040371 * l + 0.7827717662 * m - 0.8086757660 * s];
|
|
110
|
+
}
|
|
111
|
+
function fromOklab(o){
|
|
112
|
+
var l = Math.pow(o[0] + 0.3963377774 * o[1] + 0.2158037573 * o[2], 3), m = Math.pow(o[0] - 0.1055613458 * o[1] - 0.0638541728 * o[2], 3), s = Math.pow(o[0] - 0.0894841775 * o[1] - 1.2914855480 * o[2], 3);
|
|
113
|
+
var f = function(x){ x = Math.max(0, Math.min(1, x)); return 255 * (x <= 0.0031308 ? 12.92 * x : 1.055 * Math.pow(x, 1 / 2.4) - 0.055); };
|
|
114
|
+
return [f(4.0767416621 * l - 3.3077115913 * m + 0.2309699292 * s), f(-1.2684380046 * l + 2.6097574011 * m - 0.3413193965 * s), f(-0.0041960863 * l - 0.7034186147 * m + 1.7076147010 * s)];
|
|
115
|
+
}
|
|
116
|
+
function contrast(a, b){ var x = lum(a), y = lum(b); return (Math.max(x, y) + 0.05) / (Math.min(x, y) + 0.05); }
|
|
117
|
+
|
|
118
|
+
return class extends base.MotionElement {
|
|
119
|
+
static partName = "map-japan"; // the registry name (define meta name), for report prefixes
|
|
120
|
+
static variants = ["fade", "sweep", "draw"];
|
|
121
|
+
// データの形(kit/shape.js)
|
|
122
|
+
static shape = {
|
|
123
|
+
schema: {type: "object", additionalProperties: false, properties: {
|
|
124
|
+
regions: {type: "array", items: {type: "object", additionalProperties: false, anyOf: [{required: ["id"]}, {required: ["group"]}], properties: {
|
|
125
|
+
id: {type: ["string", "integer"]}, group: {type: "string"}, label: {type: "string"}, tone: {type: "string"}, step: {type: "integer"}, at: {type: "number"}}}},
|
|
126
|
+
values: {type: "object"},
|
|
127
|
+
classes: {type: "array", minItems: 1, items: {type: "number"}},
|
|
128
|
+
valuesStep: {type: "integer"},
|
|
129
|
+
points: {type: "array", items: {type: "object", additionalProperties: false, anyOf: [{required: ["lon", "lat"]}, {required: ["code"]}], properties: {
|
|
130
|
+
lon: {type: "number"}, lat: {type: "number"}, code: {type: ["string", "integer"]}, label: {type: "string"}, tone: {type: "string"},
|
|
131
|
+
anchor: {enum: ["right", "left", "above", "below", "top", "bottom"]}, step: {type: "integer"}, at: {type: "number"}}}},
|
|
132
|
+
flows: {type: "array", items: {type: "object", additionalProperties: false, required: ["from", "to"], properties: {
|
|
133
|
+
from: {type: ["string", "integer", "array"]}, to: {type: ["string", "integer", "array"]}, label: {type: "string"}, tone: {type: "string"},
|
|
134
|
+
value: {type: "number"}, bend: {type: "number"}, via: {type: "array", items: {type: "array"}}, labelAt: {type: "array"}, step: {type: "integer"}, at: {type: "number"}}}},
|
|
135
|
+
shapes: {type: "array", items: {type: "object", additionalProperties: false, anyOf: [{required: ["polygon"]}, {required: ["line"]}], properties: {
|
|
136
|
+
polygon: {type: "array", minItems: 3, items: {type: "array"}}, line: {type: "array", minItems: 2, items: {type: "array"}},
|
|
137
|
+
label: {type: "string"}, labelAt: {type: "array"}, tone: {type: "string"}, dash: {type: "boolean"}, step: {type: "integer"}, at: {type: "number"}}}}}},
|
|
138
|
+
example: {regions: [{id: "13", tone: "emph", step: 1}, {group: "kinki", tone: "series-2", step: 2}],
|
|
139
|
+
points: [{lon: 135.50, lat: 34.69, label: "大阪", step: 3}], flows: [{from: "13", to: "27", step: 4}]},
|
|
140
|
+
note: {en: "prefectures by JIS code \"01\"–\"47\" (or \"JP-13\", \"東京都\") in regions[].id; the 8 regions (hokkaido, tohoku, kanto, chubu, kinki, chugoku, shikoku, kyushu) in regions[].group; values is an object {code: number}; classes are the lower bounds of the classes (default 4, at most 5); points, shapes and flows[].via use lon/lat in degrees",
|
|
141
|
+
ja: "都道府県は regions[].id に JIS の番号 \"01\"〜\"47\"(\"JP-13\"・\"東京都\" も可)、八地方区分は regions[].group(hokkaido・tohoku・kanto・chubu・kinki・chugoku・shikoku・kyushu)。values は {番号: 数} のオブジェクト、classes は階級の下限(既定は 4 階級、5 つまで)。points・shapes・flows[].via は経度・緯度(度)"},
|
|
142
|
+
};
|
|
143
|
+
static props = {
|
|
144
|
+
layout: {type: "string", default: "inset", doc: "inset(南西諸島を枠に入れて描く)か true(本当の位置。日本が小さくなる)"},
|
|
145
|
+
islands: {type: "string", default: "main", doc: "main か all(inset で小笠原諸島の枠も描く)"},
|
|
146
|
+
labels: {type: "string", default: "focus", doc: "地域の名前:focus(regions に書いた地域だけ)・all(名前が中に入る都道府県すべて)・none"},
|
|
147
|
+
show: {type: "string", default: "none", doc: "塗り分けた地域の上に値を書くか:none(書かない、既定)・value(中に入る地域だけ値を書く)"},
|
|
148
|
+
unit: {type: "string", default: "", doc: "値の単位(凡例の見出しに書く)"},
|
|
149
|
+
digits: {type: "number", default: 0, doc: "値の小数桁"},
|
|
150
|
+
legend: {type: "string", default: "", doc: "凡例の見出し(例:人口)。unit があれば後ろに(単位)を足す"},
|
|
151
|
+
dur: {type: "number", default: 1.0, doc: "1 つの項目の動きの秒数"},
|
|
152
|
+
};
|
|
153
|
+
get steps(){
|
|
154
|
+
if (this.getAttribute("steps") !== null) return +this.getAttribute("steps");
|
|
155
|
+
return Math.max(1, this.plan().last);
|
|
156
|
+
}
|
|
157
|
+
// 項目と段階:{items: [{kind, o, step, at}], first, last}
|
|
158
|
+
plan(){
|
|
159
|
+
if (this._plan) return this._plan;
|
|
160
|
+
var d = this.data || {}, items = [];
|
|
161
|
+
var st = function(o){ return o && o.step !== undefined ? Math.max(1, o.step) : 1; };
|
|
162
|
+
(d.regions || []).forEach(function(o, i){ items.push({kind: "region", o: o, i: i, step: st(o), at: +o.at || 0}); });
|
|
163
|
+
if (d.values && Object.keys(d.values).length) items.push({kind: "values", o: d.values, step: d.valuesStep !== undefined ? Math.max(1, d.valuesStep) : 1, at: 0});
|
|
164
|
+
(d.shapes || []).forEach(function(o, i){ items.push({kind: "shape", o: o, i: i, step: st(o), at: +o.at || 0}); });
|
|
165
|
+
(d.flows || []).forEach(function(o, i){ items.push({kind: "flow", o: o, i: i, step: st(o), at: +o.at || 0}); });
|
|
166
|
+
(d.points || []).forEach(function(o, i){ items.push({kind: "point", o: o, i: i, step: st(o), at: +o.at || 0}); });
|
|
167
|
+
var last = items.length ? Math.max.apply(null, items.map(function(x){ return x.step; })) : 1;
|
|
168
|
+
return (this._plan = {items: items, last: last});
|
|
169
|
+
}
|
|
170
|
+
code(v, what){
|
|
171
|
+
var c = CODE_BY[String(v).trim()];
|
|
172
|
+
if (!c) throw new Error(what + ": " + JSON.stringify(v) + " is not a prefecture (write the JIS code \"01\"–\"47\", \"JP-13\" or the name)");
|
|
173
|
+
return c;
|
|
174
|
+
}
|
|
175
|
+
mount(ctx){ this.draw(ctx, false); }
|
|
176
|
+
// retry:小笠原諸島の枠の島の名前が入らなかったので、枠なしで描き直す(draw を 1 度だけ呼び直す。初めの知らせは繰り返さない)
|
|
177
|
+
draw(ctx, retry){
|
|
178
|
+
var P = this.props, D = base, self = this, d = this.data || {}, pl = this.plan();
|
|
179
|
+
this.variant = base.variant(this);
|
|
180
|
+
this.style.display = "block"; this.style.position = "relative";
|
|
181
|
+
var W = this.clientWidth, H = this.clientHeight, lay = P.layout === "true" ? "true" : "inset";
|
|
182
|
+
if (P.layout !== "inset" && P.layout !== "true" && !retry) ctx.report("attr", '[map-japan] layout="' + P.layout + '" is not inset or true (inset is used)');
|
|
183
|
+
if (P.islands !== "main" && P.islands !== "all" && !retry) ctx.report("attr", '[map-japan] islands="' + P.islands + '" is not main or all (main is used)');
|
|
184
|
+
// 小笠原諸島の枠(沖ノ鳥島・南鳥島・父島・硫黄島・鳥島)は islands="all" のときだけ。南西諸島の枠(沖縄県・尖閣諸島)はいつも
|
|
185
|
+
var ogas = lay === "inset" && P.islands === "all" && !retry;
|
|
186
|
+
var svg = D.el("svg", {viewBox: "0 0 " + W + " " + H, width: W, height: H, style: "display:block;overflow:visible"}, this);
|
|
187
|
+
var tone = function(t, def){ return "var(--" + (TONES.test(t || "") ? t : def) + ")"; };
|
|
188
|
+
// 都道府県の名前を引く(values・regions)。知らない名前は知らせて(1 回だけ)飛ばす:地図ぜんぶを札にしない
|
|
189
|
+
var bad = {};
|
|
190
|
+
var codeOr = function(v, what){
|
|
191
|
+
var c = CODE_BY[String(v).trim()];
|
|
192
|
+
if (!c && !bad[String(v)]){ bad[String(v)] = 1; if (!retry) ctx.report("data", "[map-japan] " + what + ": " + JSON.stringify(v) + " is not a prefecture (write the JIS code \"01\"–\"47\", \"JP-13\" or the name); it is skipped"); }
|
|
193
|
+
return c || null;
|
|
194
|
+
};
|
|
195
|
+
// ---- 塗り分けの階級(classes は階級の下限。書かなければ 4 階級を値の 4 分位から。v < classes[0] は描かずに知らせる)
|
|
196
|
+
var classes = (d.classes || []).slice(), values = d.values || {}, vcodes = [];
|
|
197
|
+
var vals = Object.keys(values).map(function(k){ return +values[k]; }).filter(isFinite).sort(function(a, b){ return a - b; });
|
|
198
|
+
// 有効数字 2 桁に切り下げた下限
|
|
199
|
+
var nice = function(x){ if (!x) return 0; var e = Math.pow(10, Math.floor(Math.log10(Math.abs(x))) - 1); return Math.floor(x / e) * e; };
|
|
200
|
+
var quartiles = function(){ var out = []; for (var q = 0; q < 4; q++){ var b0 = nice(vals[Math.floor(q * vals.length / 4)]); if (!out.length || b0 > out[out.length - 1]) out.push(b0); } return out; };
|
|
201
|
+
if (vals.length && !classes.length) classes = quartiles();
|
|
202
|
+
for (var c = 1; c < classes.length; c++) if (!(classes[c] > classes[c - 1])){
|
|
203
|
+
// 増えていない階級:知らせて、classes を書かなかったときの 4 分位に
|
|
204
|
+
if (!retry) ctx.report("data", "[map-japan] classes must increase (" + JSON.stringify(d.classes) + "); 4 classes from the values' quartiles are used");
|
|
205
|
+
classes = vals.length ? quartiles() : [];
|
|
206
|
+
break;
|
|
207
|
+
}
|
|
208
|
+
if (classes.length > 5 && !retry) ctx.report("data", "[map-japan] " + classes.length + " classes are hard to tell apart (5 at most is recommended)");
|
|
209
|
+
Object.keys(values).forEach(function(k){
|
|
210
|
+
var code = codeOr(k, "values"), v = +values[k];
|
|
211
|
+
if (!code) return;
|
|
212
|
+
if (!isFinite(v)){ if (!retry) ctx.report("data", "[map-japan] values[" + JSON.stringify(k) + "] is not a number; it is skipped"); return; }
|
|
213
|
+
var ci = -1;
|
|
214
|
+
classes.forEach(function(b, j){ if (v >= b) ci = j; });
|
|
215
|
+
if (ci < 0 && !retry) ctx.report("data", "[map-japan] values[" + k + "] = " + v + " is below the first class (" + classes[0] + ") and is not drawn");
|
|
216
|
+
else vcodes.push({code: code, v: v, ci: ci});
|
|
217
|
+
});
|
|
218
|
+
vcodes.sort(function(a, b){ return a.code < b.code ? -1 : 1; });
|
|
219
|
+
var classFill = this.classColors(classes.length, retry, ctx);
|
|
220
|
+
// ---- 凡例の大きさ
|
|
221
|
+
var LS = 24, legendW = 0, legendH = 0, legendRows = [], title = "";
|
|
222
|
+
if (vcodes.length){
|
|
223
|
+
title = (P.legend || "") + (P.unit ? "(" + P.unit + ")" : "");
|
|
224
|
+
legendRows = classes.map(function(b, j){
|
|
225
|
+
return j < classes.length - 1 ? self.fmt(b) + "〜" + self.fmt(classes[j + 1]) + " 未満" : self.fmt(b) + " 以上";
|
|
226
|
+
});
|
|
227
|
+
legendW = Math.max(title ? est(title, LS, self) : 0, 40 + Math.max.apply(null, legendRows.map(function(t){ return est(t, LS, self); })));
|
|
228
|
+
legendH = (legendRows.length + (title ? 1 : 0)) * 36;
|
|
229
|
+
}
|
|
230
|
+
this.legendTitle = title;
|
|
231
|
+
// ---- 縮尺と位置。layout="inset" では、地図の高さいっぱいの本図の左に南西諸島、右に凡例と小笠原の枠を並べる(beside)。
|
|
232
|
+
// 要素が小さくてそれでは本図が小さくなるときは、本図の空いた隅(左上・右下の海)に枠を置く(corner)
|
|
233
|
+
var GAP = 20, PADI = 10, PADR = 6, CAPL = 30;
|
|
234
|
+
var capW = function(c){ return Math.max.apply(null, c.map(function(t){ return est(t, 24, self); }).concat([0])); };
|
|
235
|
+
var capsOf = function(s, k){ return Math.abs(k - 1) < 0.05 ? [s.name] : [s.name, "(縮尺は本図と異なる)"]; };
|
|
236
|
+
// 並べ方(凡例の幅 legendW・高さ legendH を受け取る。0 なら凡例なし)。小さい要素でも縮尺は 0 未満にしない
|
|
237
|
+
var layout = function(legendW, legendH){
|
|
238
|
+
var M = MAP.bounds.main, frames = [], legendXY = null, sc, ox, oy, mode = lay;
|
|
239
|
+
if (lay === "true"){
|
|
240
|
+
var BT = MAP.bounds["true"], lw0 = legendW ? legendW + GAP : 0;
|
|
241
|
+
sc = Math.max(0, Math.min((W - lw0) / BT[2], H / BT[3])); ox = (W - BT[2] * sc - lw0) / 2; oy = (H - BT[3] * sc) / 2;
|
|
242
|
+
M = BT;
|
|
243
|
+
if (legendW) legendXY = [ox + BT[2] * sc + GAP, oy + BT[3] * sc - legendH];
|
|
244
|
+
} else {
|
|
245
|
+
var I = ogas ? MAP.insets : MAP.insets.slice(0, 1), R = I[0], O = I[1];
|
|
246
|
+
var beside = function(s, caps){
|
|
247
|
+
// 南西諸島:枠は島の範囲にぴったり(余白 PADR)。高さは本図の 0.42 倍で、島が枠を満たす縮尺にする。本図の左下に置く
|
|
248
|
+
var mh0 = M[3] * s, rk = (mh0 * 0.42 - 2 * PADR) / R.cb[3];
|
|
249
|
+
var rw = R.cb[2] * rk + 2 * PADR, rh = R.cb[3] * rk + 2 * PADR, ow = O ? O.cb[2] * O.s * s + 2 * PADI : 0, oh = O ? O.cb[3] * O.s * s + 2 * PADI : 0;
|
|
250
|
+
if (!(rk > 0)) return null;
|
|
251
|
+
var rc = caps ? capsOf(R, rk / s) : [], oc = caps && O ? capsOf(O, O.s) : [];
|
|
252
|
+
// 右の列(凡例と小笠原諸島の枠)。どちらもなければ列も間もない
|
|
253
|
+
var lw = Math.max(rw, capW(rc)), rg = Math.max(ow, capW(oc), legendW), mw = M[2] * s, mh = M[3] * s, tw = lw + GAP + mw + (rg ? GAP + rg : 0);
|
|
254
|
+
if (tw > W || mh > H || rh + rc.length * CAPL > H || (O ? oh + oc.length * CAPL : 0) + (legendH ? legendH + 16 : 0) > H) return null;
|
|
255
|
+
var x0 = (W - tw) / 2, xr = x0 + lw + GAP + mw + GAP, ry = (H + mh) / 2 - rh;
|
|
256
|
+
var fr = [{x: x0 + lw - rw, y: ry, w: rw, h: rh, k: rk, cx: x0 + lw - rw + PADR, cy: ry + PADR, cb: R.cb, cap: rc, capAbove: true}];
|
|
257
|
+
if (O) fr.push({x: xr, y: H - oh, w: ow, h: oh, k: O.s * s, cx: xr + PADI, cy: H - oh + PADI, cb: O.cb, cap: oc, capAbove: true});
|
|
258
|
+
return {sc: s, ox: x0 + lw + GAP, oy: (H - mh) / 2, legend: legendW ? [xr, 0] : null, frames: fr};
|
|
259
|
+
};
|
|
260
|
+
var find = function(caps){ for (var s = H / M[3]; s > 0.005; s *= 0.97){ var r = beside(s, caps); if (r) return r; } return null; };
|
|
261
|
+
var bc = find(true), bn = find(false), bs = bc && bn && bc.sc >= 0.85 * bn.sc ? bc : bn;
|
|
262
|
+
var lw1 = legendW ? legendW + GAP : 0, cs = Math.max(0, Math.min((W - lw1) / M[2], H / M[3]));
|
|
263
|
+
if (bs && bs.sc >= 0.95 * cs){
|
|
264
|
+
sc = bs.sc; ox = bs.ox; oy = bs.oy; frames = bs.frames; legendXY = bs.legend; mode = "beside";
|
|
265
|
+
// 南西諸島の枠を、本図の陸に掛からないところまで右へ(九州の左下の海へ)寄せ、空いた幅の分だけ全体を真ん中に戻す
|
|
266
|
+
var mv = [];
|
|
267
|
+
FEATS.forEach(function(f){ if (f.inset < 0) f.polys.forEach(function(pp){ pp[0].forEach(function(q){ mv.push([ox + (q[0] - M[0]) * sc, oy + (q[1] - M[1]) * sc]); }); }); });
|
|
268
|
+
var F0 = frames[0], top0 = F0.y - F0.cap.length * CAPL, w0 = Math.max(F0.w, capW(F0.cap));
|
|
269
|
+
var hit = function(dx){ return mv.some(function(q){ return q[0] > F0.x + dx - 12 && q[0] < F0.x + dx + w0 + 12 && q[1] > top0 - 6 && q[1] < F0.y + F0.h + 12; }); };
|
|
270
|
+
var dx = 0;
|
|
271
|
+
while (dx + 4 <= ox - F0.x && !hit(dx + 4)) dx += 4;
|
|
272
|
+
F0.x += dx; F0.cx += dx;
|
|
273
|
+
var left = Math.min(F0.x, ox), right = ox + M[2] * sc;
|
|
274
|
+
frames.forEach(function(f){ right = Math.max(right, f.x + Math.max(f.w, capW(f.cap))); });
|
|
275
|
+
if (legendXY) right = Math.max(right, legendXY[0] + legendW);
|
|
276
|
+
var sh = (W - (right - left)) / 2 - left;
|
|
277
|
+
ox += sh; frames.forEach(function(f){ f.x += sh; f.cx += sh; });
|
|
278
|
+
if (legendXY) legendXY[0] += sh;
|
|
279
|
+
}
|
|
280
|
+
else {
|
|
281
|
+
sc = cs; ox = (W - M[2] * sc - lw1) / 2; oy = (H - M[3] * sc) / 2; mode = "corner";
|
|
282
|
+
frames = I.map(function(s){
|
|
283
|
+
var f = s.corner.frame, x = ox + (f[0] - M[0]) * sc, y = oy + (f[1] - M[1]) * sc;
|
|
284
|
+
return {x: x, y: y, w: f[2] * sc, h: f[3] * sc, k: s.corner.s * sc, cx: x + 30 * sc, cy: y + 30 * sc, cb: s.cb, cap: capsOf(s, s.corner.s), capAbove: false};
|
|
285
|
+
});
|
|
286
|
+
if (legendW) legendXY = [ox + M[2] * sc + GAP, oy + M[3] * sc - legendH];
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
return {M: M, frames: frames, legendXY: legendXY, sc: sc, ox: ox, oy: oy, mode: mode};
|
|
290
|
+
};
|
|
291
|
+
// 凡例の幅は字の幅の見積もり(base の textWidth)で並べる。凡例の右に 4 px の余白をとって要素の右からはみ出すなら、
|
|
292
|
+
// その幅で並べ直す。それでも入らない(凡例が要素より高い、本図の幅が 120 px 未満になる)なら凡例は描かない
|
|
293
|
+
var small = H < 360 || W < 340, dropped = this.dropped = [];
|
|
294
|
+
var lay0 = layout(legendW, legendH);
|
|
295
|
+
if (legendW){
|
|
296
|
+
var legendWc = legendW + 4;
|
|
297
|
+
if (legendH > H || W - legendWc - GAP < 120){ legendW = legendH = 0; lay0 = layout(0, 0); dropped.push("the legend"); }
|
|
298
|
+
else if (lay0.legendXY && lay0.legendXY[0] + legendWc > W){ legendW = legendWc; lay0 = layout(legendW, legendH); }
|
|
299
|
+
}
|
|
300
|
+
var M = lay0.M, frames = lay0.frames, legendXY = lay0.legendXY, sc = lay0.sc, ox = lay0.ox, oy = lay0.oy, mode = lay0.mode;
|
|
301
|
+
this.sc = sc; this.mode = mode;
|
|
302
|
+
var scr = function(x, y, i){
|
|
303
|
+
if (i >= 0 && frames[i]){ var f = frames[i]; return [f.cx + (x - f.cb[0]) * f.k, f.cy + (y - f.cb[1]) * f.k]; }
|
|
304
|
+
return [ox + (x - M[0]) * sc, oy + (y - M[1]) * sc];
|
|
305
|
+
};
|
|
306
|
+
var insetOf = function(lon, lat){
|
|
307
|
+
if (lay !== "inset") return -1;
|
|
308
|
+
for (var i = 0; i < MAP.insets.length; i++){ var b = MAP.insets[i].box; if (lon >= b[0] && lon <= b[2] && lat >= b[1] && lat <= b[3]) return i; }
|
|
309
|
+
return -1;
|
|
310
|
+
};
|
|
311
|
+
// 描かない枠(islands="main" の小笠原諸島)の範囲に作り手の点があれば知らせる(本当の位置では要素の外になる)
|
|
312
|
+
var offInset = false;
|
|
313
|
+
var ll = this.ll = function(lon, lat){ var q = LCC(lon, lat), i = insetOf(lon, lat); if (i >= 0 && !frames[i]) offInset = true; return scr(q[0], q[1], i); };
|
|
314
|
+
// ---- 都道府県の形(画面の座標)
|
|
315
|
+
var parts = FEATS.filter(function(f){ return f.inset < 0 || lay === "true" || frames[f.inset]; }).map(function(f){
|
|
316
|
+
var polys = f.polys.map(function(p){ return p.map(function(r){ return r.map(function(q){ return scr(q[0], q[1], f.inset); }); }); });
|
|
317
|
+
var dstr = polys.map(function(p){ return p.map(function(r){ return "M" + r.map(function(q){ return q[0].toFixed(1) + "," + q[1].toFixed(1); }).join("L") + "Z"; }).join(""); }).join("");
|
|
318
|
+
return {code: f.code, inset: f.inset, polys: polys, d: dstr};
|
|
319
|
+
});
|
|
320
|
+
var byCode = {};
|
|
321
|
+
parts.forEach(function(p){ (byCode[p.code] = byCode[p.code] || []).push(p); });
|
|
322
|
+
var fixedPts = MAP.fixed.map(function(f){ var i = insetOf(f[1], f[2]), q = LCC(f[1], f[2]); return {name: f[0], code: f[3], p: scr(q[0], q[1], i), i: i}; })
|
|
323
|
+
.filter(function(f){ return f.i < 0 || frames[f.i]; });
|
|
324
|
+
var anchorOf = function(code){ var a = MAP.anchors[code]; return scr(a[0], a[1], a[2]); };
|
|
325
|
+
// ---- 陸の格子(字の置き場所を探すため。4 px ごとに、どの都道府県の上か)
|
|
326
|
+
var G = 4, gw = Math.ceil(W / G), gh = Math.ceil(H / G), grid = new Int8Array(gw * gh), codes = Object.keys(byCode).sort();
|
|
327
|
+
parts.forEach(function(p){
|
|
328
|
+
var ci = codes.indexOf(p.code) + 1;
|
|
329
|
+
p.polys.forEach(function(poly){
|
|
330
|
+
var bx = [Infinity, Infinity, -Infinity, -Infinity];
|
|
331
|
+
poly[0].forEach(function(q){ bx = [Math.min(bx[0], q[0]), Math.min(bx[1], q[1]), Math.max(bx[2], q[0]), Math.max(bx[3], q[1])]; });
|
|
332
|
+
for (var gy = Math.max(0, Math.floor(bx[1] / G)); gy <= Math.min(gh - 1, Math.floor(bx[3] / G)); gy++)
|
|
333
|
+
for (var gx = Math.max(0, Math.floor(bx[0] / G)); gx <= Math.min(gw - 1, Math.floor(bx[2] / G)); gx++){
|
|
334
|
+
var x = gx * G + G / 2, y = gy * G + G / 2;
|
|
335
|
+
if (inRing(x, y, poly[0]) && !poly.slice(1).some(function(h){ return inRing(x, y, h); })) grid[gy * gw + gx] = ci;
|
|
336
|
+
}
|
|
337
|
+
});
|
|
338
|
+
});
|
|
339
|
+
fixedPts.forEach(function(f){ var gx = Math.floor(f.p[0] / G), gy = Math.floor(f.p[1] / G); if (gx >= 0 && gy >= 0 && gx < gw && gy < gh) grid[gy * gw + gx] = codes.indexOf(f.code) + 1; });
|
|
340
|
+
var at = function(x, y){ var gx = Math.floor(x / G), gy = Math.floor(y / G); return gx < 0 || gy < 0 || gx >= gw || gy >= gh ? -1 : grid[gy * gw + gx]; };
|
|
341
|
+
// 箱の中の点(5×3)を見る。inOwn:own の上に入るか(真ん中が own の上、ほかの都道府県には掛からず、6 割以上が own の上。
|
|
342
|
+
// はみ出すのは海の上だけ)、land:陸の割合、hi:強調した地域(own を除く)の上の割合
|
|
343
|
+
var hiCodes = {};
|
|
344
|
+
var probe = function(b, own){
|
|
345
|
+
var n = 0, mine = 0, land = 0, hi = 0, other = 0, mid = false;
|
|
346
|
+
for (var a = 0; a < 5; a++) for (var e = 0; e < 3; e++){
|
|
347
|
+
// 字の形のある所(札の内側の 7 割)を見る
|
|
348
|
+
var x = b.x + b.w * (0.15 + 0.7 * a / 4), y = b.y + b.h * (0.15 + 0.7 * e / 2), v = at(x, y), isOwn = v > 0 && !!own && own.indexOf(codes[v - 1]) >= 0;
|
|
349
|
+
n++;
|
|
350
|
+
if (v > 0){ land++; if (isOwn) mine++; else { other++; if (hiCodes[codes[v - 1]]) hi++; } }
|
|
351
|
+
if (a === 2 && e === 1) mid = isOwn;
|
|
352
|
+
}
|
|
353
|
+
return {inOwn: !!own && mid && !other && mine >= n * 0.6, full: !!own && mine === n, land: land / n, hi: hi / n};
|
|
354
|
+
};
|
|
355
|
+
// ---- 描く層:陸 → 塗り分け → 強調 → 枠 → 重ね描き → 矢印 → 点 → 字
|
|
356
|
+
var gBase = D.el("g", {}, svg), gVal = D.el("g", {}, svg), gReg = D.el("g", {}, svg), gFrame = D.el("g", {}, svg);
|
|
357
|
+
var gShape = D.el("g", {}, svg), gFlow = D.el("g", {}, svg), gPt = D.el("g", {}, svg), gTxt = D.el("g", {}, svg);
|
|
358
|
+
this.base = gBase; this.frames = gFrame; this.fixedPts = fixedPts;
|
|
359
|
+
var LAND = "color-mix(in oklab, var(--line) 55%, var(--bg))";
|
|
360
|
+
parts.forEach(function(p){
|
|
361
|
+
var main = p.inset < 0 || !byCode[p.code].some(function(q){ return q.inset < 0; });
|
|
362
|
+
var a = {d: p.d, fill: LAND, stroke: "var(--bg)", "stroke-width": 1.2, "stroke-linejoin": "round", "fill-rule": "evenodd"};
|
|
363
|
+
if (main) a["data-mark"] = "JP-" + p.code;
|
|
364
|
+
D.el("path", a, gBase);
|
|
365
|
+
});
|
|
366
|
+
// 小さくて形が消える島(竹島・魚釣島・沖ノ鳥島・南鳥島・父島・硫黄島)は点で描く。領土の端の島には data-territory(名前)
|
|
367
|
+
var ISLAND = {"竹島": "竹島", "魚釣島": "尖閣諸島", "沖ノ鳥島": "沖ノ鳥島", "南鳥島": "南鳥島"};
|
|
368
|
+
// layout="true" では小笠原諸島の父島・硫黄島にも名前を書く(すべての島を本当の位置に、名前付きで)
|
|
369
|
+
if (lay === "true"){ ISLAND["父島"] = "父島"; ISLAND["硫黄島"] = "硫黄島"; }
|
|
370
|
+
fixedPts.forEach(function(f){
|
|
371
|
+
var a = {cx: f.p[0].toFixed(1), cy: f.p[1].toFixed(1), r: 3.5, fill: LAND, stroke: "var(--muted)", "stroke-width": 1.5};
|
|
372
|
+
if (ISLAND[f.name]) a["data-territory"] = ISLAND[f.name];
|
|
373
|
+
f.el = D.el("circle", a, gBase);
|
|
374
|
+
});
|
|
375
|
+
// 枠と枠の名前(beside:枠の上の外。corner:枠の中の左上に入って島に掛からなければ)
|
|
376
|
+
var frameNames = [];
|
|
377
|
+
var clear = function(q){
|
|
378
|
+
return q.x >= 0 && q.y >= 0 && q.x + q.w <= W && q.y + q.h <= H && !probe(q, null).land && !fixedPts.some(function(f){ return f.p[0] > q.x - 8 && f.p[0] < q.x + q.w + 8 && f.p[1] > q.y - 8 && f.p[1] < q.y + q.h + 8; });
|
|
379
|
+
};
|
|
380
|
+
frames.forEach(function(f){
|
|
381
|
+
D.el("rect", {x: f.x.toFixed(1), y: f.y.toFixed(1), width: Math.max(0, f.w).toFixed(1), height: Math.max(0, f.h).toFixed(1), fill: "none", stroke: "var(--muted)", "stroke-width": 2}, gFrame);
|
|
382
|
+
var n = f.cap.length, cb = f.capAbove ? {x: f.x, y: f.y - n * CAPL, w: capW(f.cap), h: n * CAPL} : {x: f.x + 6, y: f.y + 4, w: capW(f.cap), h: n * CAPL};
|
|
383
|
+
if (!n) return;
|
|
384
|
+
if ((!f.capAbove && !(cb.x + cb.w <= f.x + f.w - 6 && cb.y + cb.h <= f.y + f.h - 4)) || !clear(cb)){ if (small) dropped.push("the caption " + f.cap[0]); return; }
|
|
385
|
+
f.cap.forEach(function(t, j){ D.el("text", {x: cb.x.toFixed(1), y: (cb.y + j * CAPL + 25).toFixed(1), "font-size": 24, fill: "var(--muted)"}, gFrame).textContent = t; });
|
|
386
|
+
frameNames.push(cb);
|
|
387
|
+
});
|
|
388
|
+
var inFrame = function(b){ return frames.some(function(f){ return b.x >= f.x + 2 && b.y >= f.y + 2 && b.x + b.w <= f.x + f.w - 2 && b.y + b.h <= f.y + f.h - 2; }); };
|
|
389
|
+
// 地域ごとの塗り(path と、点で描く島)
|
|
390
|
+
var paint = function(code, parent, fill, extra){
|
|
391
|
+
var g = D.el("g", {}, parent);
|
|
392
|
+
(byCode[code] || []).forEach(function(p){ D.el("path", Object.assign({d: p.d, fill: fill, stroke: "var(--bg)", "stroke-width": 1.2, "stroke-linejoin": "round", "fill-rule": "evenodd"}, extra || {}), g); });
|
|
393
|
+
fixedPts.forEach(function(f){ if (f.code === code) D.el("circle", {cx: f.p[0].toFixed(1), cy: f.p[1].toFixed(1), r: 3.5, fill: fill, stroke: "var(--fg)", "stroke-width": 1.5}, g); });
|
|
394
|
+
return g;
|
|
395
|
+
};
|
|
396
|
+
var placed = frameNames.slice(); // 置いた字の箱(重ならないように)。凡例の場所も
|
|
397
|
+
if (legendXY) placed.push({x: legendXY[0] - 4, y: legendXY[1], w: legendW + 8, h: legendH});
|
|
398
|
+
var boxes = function(b){ return placed.some(function(q){ return b.x < q.x + q.w + 6 && b.x + b.w + 6 > q.x && b.y < q.y + q.h + 4 && b.y + b.h + 4 > q.y; }); };
|
|
399
|
+
var inside = function(b){ return b.x >= 2 && b.y >= 2 && b.x + b.w <= W - 2 && b.y + b.h <= H - 2; };
|
|
400
|
+
// 枠と枠の名前は、その枠の中のもの(home:字の元の点がある枠の番号。-1 は本図)の字のほかは避ける。
|
|
401
|
+
// crossFrame:箱が枠の線を横切るか、ほかの枠(本図の字なら、どの枠でも)に掛かる
|
|
402
|
+
var frameAt = function(p){ for (var i = 0; i < frames.length; i++){ var f = frames[i]; if (f && p[0] >= f.x && p[0] <= f.x + f.w && p[1] >= f.y && p[1] <= f.y + f.h) return i; } return -1; };
|
|
403
|
+
var crossFrame = function(b, home){
|
|
404
|
+
return frames.some(function(f, i){
|
|
405
|
+
var ov = b.x < f.x + f.w + 2 && b.x + b.w > f.x - 2 && b.y < f.y + f.h + 2 && b.y + b.h > f.y - 2;
|
|
406
|
+
var within = b.x >= f.x + 2 && b.x + b.w <= f.x + f.w - 2 && b.y >= f.y + 2 && b.y + b.h <= f.y + f.h - 2;
|
|
407
|
+
return ov && (i !== home || !within);
|
|
408
|
+
});
|
|
409
|
+
};
|
|
410
|
+
// 引いた引き出し線(ほかの引き出し線と交わる置き場所は遠いとみなす)
|
|
411
|
+
var leaders = [];
|
|
412
|
+
var segX = function(p1, p2, p3, p4){
|
|
413
|
+
var d = function(a, b, c){ return (b[0] - a[0]) * (c[1] - a[1]) - (b[1] - a[1]) * (c[0] - a[0]); };
|
|
414
|
+
return d(p1, p2, p3) * d(p1, p2, p4) < 0 && d(p3, p4, p1) * d(p3, p4, p2) < 0;
|
|
415
|
+
};
|
|
416
|
+
// 引き出し線(from から箱のいちばん近い点まで)が、ほかの枠か枠の名前に入る
|
|
417
|
+
var leadCross = function(from, b, home){
|
|
418
|
+
var x = Math.max(b.x, Math.min(b.x + b.w, from[0])), y = Math.max(b.y, Math.min(b.y + b.h, from[1]));
|
|
419
|
+
for (var u = 0; u <= 20; u++){
|
|
420
|
+
var px = from[0] + (x - from[0]) * u / 20, py = from[1] + (y - from[1]) * u / 20;
|
|
421
|
+
if (frames.some(function(f, i){ return i !== home && px > f.x - 2 && px < f.x + f.w + 2 && py > f.y - 2 && py < f.y + f.h + 2; })) return true;
|
|
422
|
+
if (frameNames.some(function(q){ return px > q.x - 2 && px < q.x + q.w + 2 && py > q.y - 2 && py < q.y + q.h + 2; })) return true;
|
|
423
|
+
}
|
|
424
|
+
return false;
|
|
425
|
+
};
|
|
426
|
+
// 字の札(地の色の角丸の箱に --fg の字)。w, h は札の大きさ
|
|
427
|
+
var chipSize = function(t, size){ return {w: est(t, size, self) + 10, h: size + 8}; };
|
|
428
|
+
var chip = function(parent, b, t, size, weight){
|
|
429
|
+
var g = D.el("g", {opacity: 0}, parent);
|
|
430
|
+
D.el("rect", {x: b.x.toFixed(1), y: b.y.toFixed(1), width: Math.max(0, b.w).toFixed(1), height: Math.max(0, b.h).toFixed(1), rx: 6, fill: "var(--bg)"}, g);
|
|
431
|
+
D.el("text", {x: (b.x + b.w / 2).toFixed(1), y: (b.y + b.h / 2 + size * 0.36).toFixed(1), "text-anchor": "middle", "font-size": size, "font-weight": weight || 400, fill: "var(--fg)"}, g).textContent = t;
|
|
432
|
+
return g;
|
|
433
|
+
};
|
|
434
|
+
// 名前の置き場所:中に入れば anchor に。入らなければまわりの海(陸と強調した地域を避ける)に置いて、引き出し線を引く
|
|
435
|
+
// strict:中に置くのは札がすべて own の上に入るときだけ(名前。値は 6 割でよい)
|
|
436
|
+
var placeLabel = function(t, size, anchor, own, mayOut, strict){
|
|
437
|
+
var s = chipSize(t, size), best = null, bc = Infinity, home = frameAt(anchor);
|
|
438
|
+
var ins = [[0, 0]];
|
|
439
|
+
[6, 12, 18].forEach(function(r){ ins.push([0, -r], [0, r], [-r, 0], [r, 0], [-r, -r], [r, -r], [-r, r], [r, r]); });
|
|
440
|
+
for (var n = 0; n < ins.length && own; n++){
|
|
441
|
+
var b0 = {x: anchor[0] + ins[n][0] - s.w / 2, y: anchor[1] + ins[n][1] - s.h / 2, w: s.w, h: s.h};
|
|
442
|
+
var pb = probe(b0, own);
|
|
443
|
+
if (inside(b0) && !boxes(b0) && !crossFrame(b0, home) && (strict ? pb.full : pb.inOwn)) return {b: b0, out: false};
|
|
444
|
+
}
|
|
445
|
+
if (!mayOut) return null;
|
|
446
|
+
for (var r = 30; r <= 260; r += 20) for (var k = 0; k < 24; k++){
|
|
447
|
+
var a = k / 24 * Math.PI * 2, cx = anchor[0] + Math.cos(a) * (r + s.w / 2 * Math.abs(Math.cos(a))), cy = anchor[1] + Math.sin(a) * (r * 0.8 + s.h / 2 * Math.abs(Math.sin(a)));
|
|
448
|
+
var b = {x: cx - s.w / 2, y: cy - s.h / 2, w: s.w, h: s.h};
|
|
449
|
+
if (!inside(b) || boxes(b) || crossFrame(b, home) || leadCross(anchor, b, home)) continue;
|
|
450
|
+
// 引き出し線がほかの強調した地域を横切るのも避ける
|
|
451
|
+
var lx = Math.max(b.x, Math.min(b.x + b.w, anchor[0])), ly = Math.max(b.y, Math.min(b.y + b.h, anchor[1])), cross = 0;
|
|
452
|
+
for (var u = 1; u < 10; u++){ var v = at(anchor[0] + (lx - anchor[0]) * u / 10, anchor[1] + (ly - anchor[1]) * u / 10); if (v > 0 && hiCodes[codes[v - 1]] && !(own && own.indexOf(codes[v - 1]) >= 0)) cross++; }
|
|
453
|
+
var lp = [lx, ly], lc = leaders.filter(function(l){ return segX(anchor, lp, l[0], l[1]); }).length;
|
|
454
|
+
var pr = probe(b, own), cost = r + 260 * pr.land + 900 * pr.hi + 120 * cross + 150 * lc;
|
|
455
|
+
if (cost < bc){ bc = cost; best = b; }
|
|
456
|
+
}
|
|
457
|
+
if (!best) ctx.report("size", "[map-japan] no room for the label \"" + t + "\"");
|
|
458
|
+
return best ? {b: best, out: true} : null;
|
|
459
|
+
};
|
|
460
|
+
var leader = function(parent, from, b){
|
|
461
|
+
var x = Math.max(b.x, Math.min(b.x + b.w, from[0])), y = Math.max(b.y, Math.min(b.y + b.h, from[1]));
|
|
462
|
+
leaders.push([from, [x, y]]);
|
|
463
|
+
var g = D.el("g", {opacity: 0}, parent);
|
|
464
|
+
D.el("path", {d: "M" + from[0].toFixed(1) + "," + from[1].toFixed(1) + "L" + x.toFixed(1) + "," + y.toFixed(1), fill: "none", stroke: "var(--fg)", "stroke-width": 1.5}, g);
|
|
465
|
+
D.el("circle", {cx: from[0].toFixed(1), cy: from[1].toFixed(1), r: 3, fill: "var(--fg)"}, g);
|
|
466
|
+
return g;
|
|
467
|
+
};
|
|
468
|
+
// 領土の端の島の名前(竹島・尖閣諸島・沖ノ鳥島・南鳥島)は地図と一緒に書く。点のまわりの入る所に(枠の中の島は枠の中に)。
|
|
469
|
+
// 入らなければ、小さい要素(small)と、いつも名前を書く島(layout="true" のすべてと小笠原諸島の枠の中)では少し離れた海に引き出し線を付けて書く。
|
|
470
|
+
// 小笠原諸島の枠の島の名前がそれでも入らなければ、枠ごと描かない(名前のない枠は出さない)
|
|
471
|
+
// 作り手の点(経度・緯度で書いたもの)の位置:島の名前を離して置くとき、それに掛けない
|
|
472
|
+
var userPts = (d.points || []).filter(function(o){ return o && isFinite(+o.lon) && isFinite(+o.lat); }).map(function(o, j){ return {p: ll(+o.lon, +o.lat), o: o}; });
|
|
473
|
+
// 名前のある作り手の点が島の点から 15 px 以内なら、その島は作り手の点と名前で示す:組み込みの点と名前は、作り手の点が現れるのと
|
|
474
|
+
// 入れ替わりに消える(render。最後の状態では点も名前も 1 つ)
|
|
475
|
+
var noOgas = false;
|
|
476
|
+
fixedPts.forEach(function(f){
|
|
477
|
+
var name = ISLAND[f.name];
|
|
478
|
+
if (!name) return;
|
|
479
|
+
f.by = userPts.filter(function(u){ return u.o.label && Math.hypot(u.p[0] - f.p[0], u.p[1] - f.p[1]) <= 15; })[0];
|
|
480
|
+
var s = chipSize(name, 24), p = f.p, spots = [[p[0] + 7, p[1] - s.h / 2], [p[0] - 7 - s.w, p[1] - s.h / 2], [p[0] - s.w / 2, p[1] - 7 - s.h], [p[0] - s.w / 2, p[1] + 7],
|
|
481
|
+
[p[0] + 4, p[1] - 5 - s.h], [p[0] - 4 - s.w, p[1] - 5 - s.h], [p[0] + 4, p[1] + 5], [p[0] - 4 - s.w, p[1] + 5]];
|
|
482
|
+
for (var n = 0; n < spots.length; n++){
|
|
483
|
+
var b = {x: spots[n][0], y: spots[n][1], w: s.w, h: s.h};
|
|
484
|
+
var where = f.i >= 0 && frames[f.i] ? inFrame(b) : !crossFrame(b, -1);
|
|
485
|
+
if (inside(b) && !boxes(b) && where && !probe(b, null).land && !fixedPts.some(function(o){ return o !== f && o.p[0] > b.x - 5 && o.p[0] < b.x + b.w + 5 && o.p[1] > b.y - 5 && o.p[1] < b.y + b.h + 5; })){
|
|
486
|
+
// 作り手の点に替わる島の名前は、作り手の名前の置き場所を妨げない(入れ替わりに消えるので)
|
|
487
|
+
if (!f.by) placed.push(b);
|
|
488
|
+
(f.nameEl = chip(gFrame, b, name, 24, 400)).setAttribute("opacity", 1);
|
|
489
|
+
return;
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
// 小さい要素(small)と、いつも名前を書く島:点のまわりに入らなければ、少し離れた海(枠の外でもよい)に置いて引き出し線を引く。
|
|
493
|
+
// それでも入らなければ知らせる(小笠原諸島の枠の島なら枠ごと描き直す)
|
|
494
|
+
var must = lay === "true" || f.i === 1;
|
|
495
|
+
if (!small && !must) return;
|
|
496
|
+
var hitFrame = function(q){ return frames.some(function(fr){ return q.x < fr.x + fr.w + 3 && q.x + q.w > fr.x - 3 && q.y < fr.y + fr.h + 3 && q.y + q.h > fr.y - 3; }); };
|
|
497
|
+
// 近い所を先に。引き出し線が陸を横切るほど遠いとみなす
|
|
498
|
+
var best = null, bc = Infinity;
|
|
499
|
+
for (var r = 10; r <= 200; r += 6) for (var k = 0; k < 16; k++){
|
|
500
|
+
var a = k / 16 * Math.PI * 2, q = {x: p[0] + Math.cos(a) * (r + s.w / 2) - s.w / 2, y: p[1] + Math.sin(a) * (r + s.h / 2) - s.h / 2, w: s.w, h: s.h};
|
|
501
|
+
var ok = (f.i >= 0 && frames[f.i] && inFrame(q) || !hitFrame(q)) && !leadCross(p, q, f.i >= 0 && frames[f.i] ? f.i : -1);
|
|
502
|
+
if (ok && inside(q) && !boxes(q) && !probe(q, null).land && !fixedPts.some(function(o){ return o !== f && o.p[0] > q.x - 5 && o.p[0] < q.x + q.w + 5 && o.p[1] > q.y - 5 && o.p[1] < q.y + q.h + 5; })
|
|
503
|
+
&& !userPts.some(function(u){ return u.p[0] > q.x - 10 && u.p[0] < q.x + q.w + 10 && u.p[1] > q.y - 10 && u.p[1] < q.y + q.h + 10; })){
|
|
504
|
+
var lx = Math.max(q.x, Math.min(q.x + q.w, p[0])), ly = Math.max(q.y, Math.min(q.y + q.h, p[1])), cross = 0;
|
|
505
|
+
for (var u = 1; u < 10; u++) if (at(p[0] + (lx - p[0]) * u / 10, p[1] + (ly - p[1]) * u / 10) > 0) cross++;
|
|
506
|
+
var cost = Math.hypot(lx - p[0], ly - p[1]) + 40 * cross;
|
|
507
|
+
if (cost < bc){ bc = cost; best = {q: q, lx: lx, ly: ly}; }
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
if (!best){ if (f.i === 1) noOgas = true; else dropped.push("the name " + name); return; }
|
|
511
|
+
var q = best.q, lx = best.lx, ly = best.ly, ld = Math.hypot(lx - p[0], ly - p[1]) || 1;
|
|
512
|
+
if (!f.by) placed.push(q);
|
|
513
|
+
var ng = f.nameEl = D.el("g", {}, gFrame);
|
|
514
|
+
if (ld > 6) D.el("path", {d: "M" + (p[0] + (lx - p[0]) * 5 / ld).toFixed(1) + "," + (p[1] + (ly - p[1]) * 5 / ld).toFixed(1) + "L" + lx.toFixed(1) + "," + ly.toFixed(1), fill: "none", stroke: "var(--muted)", "stroke-width": 1.5}, ng);
|
|
515
|
+
chip(ng, q, name, 24, 400).setAttribute("opacity", 1);
|
|
516
|
+
});
|
|
517
|
+
if (noOgas){
|
|
518
|
+
ctx.report("size", "[map-japan] the element (" + W + "×" + H + " px) has no room for the names of 沖ノ鳥島 and 南鳥島 in the 小笠原諸島 inset; the inset is not drawn");
|
|
519
|
+
svg.remove();
|
|
520
|
+
return this.draw(ctx, true);
|
|
521
|
+
}
|
|
522
|
+
// ほかの字は島の点に掛けない
|
|
523
|
+
fixedPts.forEach(function(f){ placed.push({x: f.p[0] - 5, y: f.p[1] - 5, w: 10, h: 10}); });
|
|
524
|
+
// ---- 項目
|
|
525
|
+
var items = this.items = [];
|
|
526
|
+
var lab = /^(focus|all|none)$/.test(P.labels) ? P.labels : "focus";
|
|
527
|
+
// 強調する地域を先に知っておく(名前の置き場所がそれを避ける)
|
|
528
|
+
var regs = pl.items.filter(function(x){ return x.kind === "region"; }).map(function(x){
|
|
529
|
+
var o = x.o, g = o.group !== undefined ? GROUP[o.group] : null;
|
|
530
|
+
if (o.group !== undefined && !g){ if (!retry) ctx.report("data", "[map-japan] regions[" + x.i + "]: group " + JSON.stringify(o.group) + " is not one of hokkaido, tohoku, kanto, chubu, kinki, chugoku, shikoku, kyushu; it is skipped"); return null; }
|
|
531
|
+
var cd0 = g ? null : codeOr(o.id, "regions[" + x.i + "].id");
|
|
532
|
+
if (!g && !cd0) return null;
|
|
533
|
+
var cs = g ? g.codes : [cd0];
|
|
534
|
+
cs.forEach(function(cd){ hiCodes[cd] = true; });
|
|
535
|
+
return {x: x, cs: cs, g: g};
|
|
536
|
+
}).filter(Boolean);
|
|
537
|
+
var valued = {};
|
|
538
|
+
vcodes.forEach(function(v){ valued[v.code] = v; });
|
|
539
|
+
// 点・矢印・重ね描きの座標を先に(その周りに名前を置かない)
|
|
540
|
+
var ptOf = function(o, what){
|
|
541
|
+
if (Array.isArray(o)){ if (o.length !== 2 || !isFinite(+o[0]) || !isFinite(+o[1])) throw new Error(what + ": write [lon, lat] or a prefecture"); return ll(+o[0], +o[1]); }
|
|
542
|
+
var cd = self.code(o, what), c = CAPITAL[cd];
|
|
543
|
+
return ll(c[0], c[1]);
|
|
544
|
+
};
|
|
545
|
+
pl.items.forEach(function(x){
|
|
546
|
+
if (x.kind === "point"){ x.p = x.o.code !== undefined && x.o.lon === undefined ? ptOf(x.o.code, "points[" + x.i + "].code") : ll(+x.o.lon, +x.o.lat); placed.push({x: x.p[0] - 9, y: x.p[1] - 9, w: 18, h: 18}); }
|
|
547
|
+
});
|
|
548
|
+
// 塗り分け
|
|
549
|
+
pl.items.forEach(function(x){
|
|
550
|
+
if (x.kind !== "values") return;
|
|
551
|
+
var it = {x: x, els: [], txt: []};
|
|
552
|
+
// 境界はいつも描く(どの階級の上でも見える --muted の細い線。いちばん薄い階級も縁取られる)
|
|
553
|
+
vcodes.forEach(function(v){ var g = paint(v.code, gVal, classFill[v.ci], {stroke: "var(--muted)", "stroke-width": 1}); g.setAttribute("data-class", v.ci); it.els.push({g: g, cx: anchorOf(v.code)[0]}); });
|
|
554
|
+
items.push(it);
|
|
555
|
+
});
|
|
556
|
+
// 強調
|
|
557
|
+
regs.forEach(function(r){
|
|
558
|
+
var o = r.x.o, col = tone(o.tone, "term"), it = {x: r.x, els: [], txt: []};
|
|
559
|
+
r.cs.forEach(function(cd){
|
|
560
|
+
// 塗り分けた地域は塗りつぶさず、太い縁で強調する
|
|
561
|
+
var g = valued[cd] ? paint(cd, gReg, "none", {stroke: col, "stroke-width": 4}) : paint(cd, gReg, col);
|
|
562
|
+
it.els.push({g: g, cx: anchorOf(cd)[0], outline: true});
|
|
563
|
+
});
|
|
564
|
+
items.push(it);
|
|
565
|
+
r.it = it;
|
|
566
|
+
});
|
|
567
|
+
// 重ね描き(経度・緯度の多角形・線)
|
|
568
|
+
pl.items.forEach(function(x){
|
|
569
|
+
if (x.kind !== "shape") return;
|
|
570
|
+
var o = x.o, pts = (o.polygon || o.line).map(function(q, j){
|
|
571
|
+
if (!Array.isArray(q) || q.length !== 2 || !isFinite(+q[0]) || !isFinite(+q[1])) throw new Error("shapes[" + x.i + "]: point " + j + " is not [lon, lat]");
|
|
572
|
+
return q;
|
|
573
|
+
});
|
|
574
|
+
// 枠に入れるかは最初の点で決める(多角形の全部を同じ所に)
|
|
575
|
+
var i0 = insetOf(+pts[0][0], +pts[0][1]);
|
|
576
|
+
var sp = pts.map(function(q){ var v = LCC(+q[0], +q[1]); return scr(v[0], v[1], i0); });
|
|
577
|
+
var dd = "M" + sp.map(function(q){ return q[0].toFixed(1) + "," + q[1].toFixed(1); }).join("L") + (o.polygon ? "Z" : "");
|
|
578
|
+
var col = tone(o.tone, "accent2");
|
|
579
|
+
var g = D.el("g", {opacity: 0}, gShape);
|
|
580
|
+
var fillEl = o.polygon ? D.el("path", {d: dd, fill: col, "fill-opacity": 0.22, stroke: "none"}, g) : null;
|
|
581
|
+
var line = D.el("path", {d: dd, fill: "none", stroke: col, "stroke-width": o.polygon ? 3 : 4, "stroke-linejoin": "round", "stroke-linecap": "round", "stroke-dasharray": o.dash ? "10 7" : ""}, g);
|
|
582
|
+
var c = [0, 0]; sp.forEach(function(q){ c[0] += q[0] / sp.length; c[1] += q[1] / sp.length; });
|
|
583
|
+
if (!o.polygon) c = sp[Math.floor(sp.length / 2)];
|
|
584
|
+
items.push({x: x, els: [{g: g, cx: c[0], line: line, fill: fillEl, len: line.getTotalLength ? line.getTotalLength() : 0}], txt: [], c: c});
|
|
585
|
+
});
|
|
586
|
+
// 矢印
|
|
587
|
+
var vmax = 0;
|
|
588
|
+
pl.items.forEach(function(x){ if (x.kind === "flow" && isFinite(+x.o.value)) vmax = Math.max(vmax, Math.abs(+x.o.value)); });
|
|
589
|
+
pl.items.forEach(function(x){
|
|
590
|
+
if (x.kind !== "flow") return;
|
|
591
|
+
var o = x.o, a = ptOf(o.from, "flows[" + x.i + "].from"), b = ptOf(o.to, "flows[" + x.i + "].to");
|
|
592
|
+
var sw = vmax && isFinite(+o.value) ? 3 + 7 * Math.abs(+o.value) / vmax : 4, col = tone(o.tone, "emph");
|
|
593
|
+
// 線の形:via があればその点を通るなめらかな曲線(Catmull-Rom)、なければ bend だけ横にふくらむ曲線。折れ線にして持つ
|
|
594
|
+
var poly = [];
|
|
595
|
+
if (o.via && o.via.length){
|
|
596
|
+
var ps = [a].concat(o.via.map(function(q, j){ return ptOf(q, "flows[" + x.i + "].via[" + j + "]"); }), [b]);
|
|
597
|
+
// 求心的な Catmull-Rom(点の間隔がそろっていなくても行き過ぎて輪にならない。Barry–Goldman の形)
|
|
598
|
+
var ext = function(a0, b0){ return [2 * a0[0] - b0[0], 2 * a0[1] - b0[1]]; };
|
|
599
|
+
for (var i = 0; i < ps.length - 1; i++){
|
|
600
|
+
var p0 = ps[i - 1] || ext(ps[i], ps[i + 1]), p1 = ps[i], p2 = ps[i + 1], p3 = ps[i + 2] || ext(ps[i + 1], ps[i]);
|
|
601
|
+
var kt = function(a0, b0){ return Math.max(1e-6, Math.sqrt(Math.hypot(b0[0] - a0[0], b0[1] - a0[1]))); };
|
|
602
|
+
var t0 = 0, t1 = t0 + kt(p0, p1), t2 = t1 + kt(p1, p2), t3 = t2 + kt(p2, p3);
|
|
603
|
+
var mixp = function(a0, b0, ta, tb, t){ var w = (t - ta) / (tb - ta); return [a0[0] + (b0[0] - a0[0]) * w, a0[1] + (b0[1] - a0[1]) * w]; };
|
|
604
|
+
for (var u = 0; u < 1; u += 1 / 16){
|
|
605
|
+
var t = t1 + (t2 - t1) * u;
|
|
606
|
+
var A1 = mixp(p0, p1, t0, t1, t), A2 = mixp(p1, p2, t1, t2, t), A3 = mixp(p2, p3, t2, t3, t);
|
|
607
|
+
var B1 = mixp(A1, A2, t0, t2, t), B2 = mixp(A2, A3, t1, t3, t);
|
|
608
|
+
poly.push(mixp(B1, B2, t1, t2, t));
|
|
609
|
+
}
|
|
610
|
+
}
|
|
611
|
+
poly.push(b);
|
|
612
|
+
} else {
|
|
613
|
+
var dx = b[0] - a[0], dy = b[1] - a[1], bend = o.bend !== undefined ? +o.bend : 0.18, m = [(a[0] + b[0]) / 2 - dy * bend, (a[1] + b[1]) / 2 + dx * bend];
|
|
614
|
+
for (var v = 0; v <= 1.0001; v += 1 / 32) poly.push([0, 1].map(function(j){ return (1 - v) * (1 - v) * a[j] + 2 * v * (1 - v) * m[j] + v * v * b[j]; }));
|
|
615
|
+
}
|
|
616
|
+
// 始めは点の外(11 px)から引く(点の下から線の端がのぞかないように)
|
|
617
|
+
var cut = 11;
|
|
618
|
+
while (poly.length > 2 && Math.hypot(poly[1][0] - poly[0][0], poly[1][1] - poly[0][1]) <= cut){ cut -= Math.hypot(poly[1][0] - poly[0][0], poly[1][1] - poly[0][1]); poly.shift(); }
|
|
619
|
+
if (poly.length > 1){ var l0 = Math.hypot(poly[1][0] - poly[0][0], poly[1][1] - poly[0][1]) || 1; poly[0] = [poly[0][0] + (poly[1][0] - poly[0][0]) * cut / l0, poly[0][1] + (poly[1][1] - poly[0][1]) * cut / l0]; }
|
|
620
|
+
// 終わりから d の所の点(折れ線に沿って)
|
|
621
|
+
var back = function(d){
|
|
622
|
+
for (var i = poly.length - 1; i > 0; i--){
|
|
623
|
+
var q = poly[i], r = poly[i - 1], l = Math.hypot(q[0] - r[0], q[1] - r[1]);
|
|
624
|
+
if (l >= d && l > 0) return {p: [q[0] + (r[0] - q[0]) * d / l, q[1] + (r[1] - q[1]) * d / l], i: i};
|
|
625
|
+
d -= l;
|
|
626
|
+
}
|
|
627
|
+
return {p: poly[0], i: 1};
|
|
628
|
+
};
|
|
629
|
+
// 矢じりの先は終わりの点の 4 px 手前(点の半径 8 +縁 + 4)。線は矢じりの中で止める
|
|
630
|
+
var hl = 10 + sw * 1.6, TIP = 13, tipB = back(TIP), endB = back(TIP + hl * 0.85), dirB = back(TIP + hl);
|
|
631
|
+
var tip = tipB.p, e = endB.p, ux = tip[0] - dirB.p[0], uy = tip[1] - dirB.p[1], ul = Math.hypot(ux, uy) || 1;
|
|
632
|
+
var line = poly.slice(0, endB.i).concat([e]);
|
|
633
|
+
var g = D.el("g", {}, gFlow);
|
|
634
|
+
var lineEl = D.el("path", {d: "M" + line.map(function(q){ return q[0].toFixed(1) + "," + q[1].toFixed(1); }).join("L"), fill: "none", stroke: col, "stroke-width": sw.toFixed(1), "stroke-linecap": "round", "stroke-linejoin": "round", opacity: 0}, g);
|
|
635
|
+
var nx = -uy / ul, ny = ux / ul, hw = 6 + sw * 0.9;
|
|
636
|
+
var head = D.el("path", {d: "M" + tip[0].toFixed(1) + "," + tip[1].toFixed(1) + "L" + (tip[0] - ux / ul * hl + nx * hw).toFixed(1) + "," + (tip[1] - uy / ul * hl + ny * hw).toFixed(1) + "L" + (tip[0] - ux / ul * hl - nx * hw).toFixed(1) + "," + (tip[1] - uy / ul * hl - ny * hw).toFixed(1) + "Z", fill: col, opacity: 0}, g);
|
|
637
|
+
// 線の長さの半ばの点(名前の目安)
|
|
638
|
+
var len = 0; for (var i2 = 1; i2 < line.length; i2++) len += Math.hypot(line[i2][0] - line[i2 - 1][0], line[i2][1] - line[i2 - 1][1]);
|
|
639
|
+
var half = len / 2, mid = line[0];
|
|
640
|
+
for (var i3 = 1; i3 < line.length; i3++){ var l3 = Math.hypot(line[i3][0] - line[i3 - 1][0], line[i3][1] - line[i3 - 1][1]); if (half <= l3){ mid = [line[i3 - 1][0] + (line[i3][0] - line[i3 - 1][0]) * half / l3, line[i3 - 1][1] + (line[i3][1] - line[i3 - 1][1]) * half / l3]; break; } half -= l3; }
|
|
641
|
+
// 名前の札を線と矢じりに掛けない
|
|
642
|
+
line.concat([tip]).forEach(function(q){ placed.push({x: q[0] - 1, y: q[1] - 1, w: 2, h: 2}); });
|
|
643
|
+
items.push({x: x, flow: true, line: lineEl, head: head, len: lineEl.getTotalLength ? lineEl.getTotalLength() : len, els: [], txt: [], c: mid, a: a});
|
|
644
|
+
});
|
|
645
|
+
// 点
|
|
646
|
+
pl.items.forEach(function(x){
|
|
647
|
+
if (x.kind !== "point") return;
|
|
648
|
+
var col = tone(x.o.tone, "fg"), g = D.el("g", {opacity: 0}, gPt);
|
|
649
|
+
var dot = D.el("circle", {cx: x.p[0].toFixed(1), cy: x.p[1].toFixed(1), r: 8, fill: col, stroke: "var(--bg)", "stroke-width": 2.5}, g);
|
|
650
|
+
var it = {x: x, els: [{g: g, cx: x.p[0]}], txt: [], c: x.p};
|
|
651
|
+
// 領土の端の島に置いた点は、その島の点の代わり(render が島の点を作り手の点と入れ替える)
|
|
652
|
+
fixedPts.forEach(function(f){ if (f.by && f.by.o === x.o){ dot.setAttribute("data-territory", ISLAND[f.name]); f.byIt = it; } });
|
|
653
|
+
items.push(it);
|
|
654
|
+
});
|
|
655
|
+
// ---- 字(強調の名前 → 点の名前 → 矢印・重ね描きの名前 → 値 → すべての名前)
|
|
656
|
+
var byItem = function(x){ return items.filter(function(it){ return it.x === x; })[0]; };
|
|
657
|
+
// 枠の近く(150 px 以内)の地域の名前を先に置く(枠を避けると置き場所が少ないので、ほかの名前に取られないように)
|
|
658
|
+
var nearFrame = function(p){ return frames.some(function(f, i){ return i !== frameAt(p) && p[0] > f.x - 150 && p[0] < f.x + f.w + 150 && p[1] > f.y - 150 && p[1] < f.y + f.h + 150; }); };
|
|
659
|
+
var ancOf = function(r){ return r.g ? scr(r.g.anchor[0], r.g.anchor[1], -1) : anchorOf(r.cs[0]); };
|
|
660
|
+
regs.filter(function(r){ return nearFrame(ancOf(r)); }).concat(regs.filter(function(r){ return !nearFrame(ancOf(r)); })).forEach(function(r){
|
|
661
|
+
var o = r.x.o, t = o.label !== undefined ? o.label : lab === "none" ? "" : r.g ? r.g.name : NAME[r.cs[0]];
|
|
662
|
+
if (!t) return;
|
|
663
|
+
var anc = ancOf(r);
|
|
664
|
+
var pos = placeLabel(t, 24, anc, r.cs, true, true);
|
|
665
|
+
if (!pos) return;
|
|
666
|
+
placed.push(pos.b);
|
|
667
|
+
if (pos.out) r.it.txt.push(leader(gTxt, anc, pos.b));
|
|
668
|
+
r.it.txt.push(chip(gTxt, pos.b, t, 24, 400));
|
|
669
|
+
});
|
|
670
|
+
pl.items.forEach(function(x){
|
|
671
|
+
if (x.kind !== "point" || !x.o.label) return;
|
|
672
|
+
var it = byItem(x), s = chipSize(x.o.label, 24), p = x.p, order = ["right", "left", "above", "below"];
|
|
673
|
+
var want = {top: "above", bottom: "below"}[x.o.anchor] || x.o.anchor || "right"; // top / bottom は above / below の別名
|
|
674
|
+
order = [want].concat(order.filter(function(a){ return a !== want; }));
|
|
675
|
+
var spot = function(a, r){ return a === "right" ? {x: p[0] + r, y: p[1] - s.h / 2} : a === "left" ? {x: p[0] - r - s.w, y: p[1] - s.h / 2} : a === "above" ? {x: p[0] - s.w / 2, y: p[1] - r - s.h} : {x: p[0] - s.w / 2, y: p[1] + r}; };
|
|
676
|
+
// 書いた向きを先に、離す距離を少しずつ増やして、線・ほかの字に掛からない所。斜めも試す
|
|
677
|
+
var b = null, rs = [13, 22, 32], ph = frameAt(p);
|
|
678
|
+
for (var m = 0; m < rs.length && !b; m++) for (var n = 0; n < order.length && !b; n++){ var q = spot(order[n], rs[m]); q.w = s.w; q.h = s.h; if (inside(q) && !boxes(q) && !crossFrame(q, ph)) b = q; }
|
|
679
|
+
for (var dd = 0; dd < 4 && !b; dd++){ var q2 = {x: dd % 2 ? p[0] + 8 : p[0] - 8 - s.w, y: dd < 2 ? p[1] - 8 - s.h : p[1] + 8, w: s.w, h: s.h}; if (inside(q2) && !boxes(q2) && !crossFrame(q2, ph)) b = q2; }
|
|
680
|
+
// 点のそばに入らなければ(要素の縁の近く、枠の中の点)、少し離れた所に置いて引き出し線を引く
|
|
681
|
+
var lead = null;
|
|
682
|
+
if (!b){ var pos = placeLabel(x.o.label, 24, p, null, true); if (pos){ b = pos.b; lead = leader(gTxt, p, b); } }
|
|
683
|
+
if (!b){ b = spot(want, 13); b.w = s.w; b.h = s.h; ctx.report("size", "[map-japan] the label \"" + x.o.label + "\" overlaps another"); }
|
|
684
|
+
placed.push(b);
|
|
685
|
+
if (lead) it.txt.push(lead);
|
|
686
|
+
it.txt.push(chip(gTxt, b, x.o.label, 24, 400));
|
|
687
|
+
});
|
|
688
|
+
items.forEach(function(it){
|
|
689
|
+
if (!(it.x.kind === "flow" || it.x.kind === "shape") || !it.x.o.label) return;
|
|
690
|
+
// labelAt:名前を置く所(経度・緯度)。空いていればそこに、そうでなければまわりに
|
|
691
|
+
var pos = null;
|
|
692
|
+
if (it.x.o.labelAt){
|
|
693
|
+
var la = ptOf(it.x.o.labelAt, (it.x.kind === "flow" ? "flows[" : "shapes[") + it.x.i + "].labelAt"), s0 = chipSize(it.x.o.label, 24);
|
|
694
|
+
var b0 = {x: la[0] - s0.w / 2, y: la[1] - s0.h / 2, w: s0.w, h: s0.h};
|
|
695
|
+
pos = inside(b0) && !boxes(b0) && !crossFrame(b0, frameAt(la)) ? {b: b0} : placeLabel(it.x.o.label, 24, la, null, true);
|
|
696
|
+
} else pos = placeLabel(it.x.o.label, 24, it.c, null, true);
|
|
697
|
+
if (!pos) return;
|
|
698
|
+
placed.push(pos.b);
|
|
699
|
+
it.txt.push(chip(gTxt, pos.b, it.x.o.label, 24, 400));
|
|
700
|
+
});
|
|
701
|
+
// 値(中に入る地域だけ)
|
|
702
|
+
var show = P.show === "value" ? "value" : "none";
|
|
703
|
+
if (!/^(value|none)$/.test(P.show)) ctx.report("attr", '[map-japan] show="' + P.show + '" is not value or none (none is used)');
|
|
704
|
+
items.forEach(function(it){
|
|
705
|
+
if (it.x.kind !== "values" || show === "none") return;
|
|
706
|
+
vcodes.forEach(function(v){
|
|
707
|
+
var t = self.fmt(v.v);
|
|
708
|
+
var pos = placeLabel(t, 24, anchorOf(v.code), [v.code], false);
|
|
709
|
+
if (!pos) return;
|
|
710
|
+
placed.push(pos.b);
|
|
711
|
+
it.txt.push(chip(gTxt, pos.b, t, 24, 700));
|
|
712
|
+
});
|
|
713
|
+
});
|
|
714
|
+
// すべての名前(labels="all"):中に入る都道府県だけ、地図と一緒に
|
|
715
|
+
this.allNames = [];
|
|
716
|
+
if (lab === "all") codes.forEach(function(cd){
|
|
717
|
+
if (hiCodes[cd]) return;
|
|
718
|
+
var pos = placeLabel(NAME[cd].replace(/[都府県]$/, ""), 24, anchorOf(cd), [cd], false);
|
|
719
|
+
if (!pos) return;
|
|
720
|
+
placed.push(pos.b);
|
|
721
|
+
self.allNames.push(chip(gTxt, pos.b, NAME[cd].replace(/[都府県]$/, ""), 24, 400));
|
|
722
|
+
});
|
|
723
|
+
// ---- 凡例
|
|
724
|
+
this.legendG = null;
|
|
725
|
+
if (vcodes.length && legendXY){
|
|
726
|
+
var lg = this.legendG = D.el("g", {opacity: 0}, svg), lx = legendXY[0], ly = Math.max(0, legendXY[1]);
|
|
727
|
+
if (this.legendTitle){ D.el("text", {x: lx.toFixed(1), y: (ly + 24).toFixed(1), "font-size": LS, "font-weight": 700, fill: "var(--fg)"}, lg).textContent = this.legendTitle; ly += 36; }
|
|
728
|
+
// 濃い階級(大きい値)を上に
|
|
729
|
+
legendRows.slice().reverse().forEach(function(t, j){
|
|
730
|
+
var ci = classes.length - 1 - j;
|
|
731
|
+
D.el("rect", {x: lx.toFixed(1), y: (ly + j * 36 + 2).toFixed(1), width: 30, height: 26, rx: 3, fill: classFill[ci], stroke: "var(--muted)", "stroke-width": 1, "data-class": ci}, lg);
|
|
732
|
+
D.el("text", {x: (lx + 40).toFixed(1), y: (ly + j * 36 + 24).toFixed(1), "font-size": LS, fill: "var(--fg)"}, lg).textContent = t;
|
|
733
|
+
});
|
|
734
|
+
}
|
|
735
|
+
// 西から東への順(sweep):同じ段階の中の塗り・点の x の順位
|
|
736
|
+
var steps = {};
|
|
737
|
+
items.forEach(function(it){ it.els.forEach(function(e){ (steps[it.x.step] = steps[it.x.step] || []).push(e); }); });
|
|
738
|
+
Object.keys(steps).forEach(function(k){
|
|
739
|
+
var es = steps[k].slice().sort(function(a, b){ return a.cx - b.cx; });
|
|
740
|
+
es.forEach(function(e, j){ e.rank = es.length > 1 ? j / (es.length - 1) : 0; });
|
|
741
|
+
});
|
|
742
|
+
// draw:地域の輪郭を引く線(塗りの上に重ね、塗り終わったら消す)
|
|
743
|
+
if (this.variant === "draw") items.forEach(function(it){
|
|
744
|
+
if (it.x.kind !== "region" && it.x.kind !== "values") return;
|
|
745
|
+
var col = it.x.kind === "region" ? tone(it.x.o.tone, "term") : "var(--fg)";
|
|
746
|
+
it.els.forEach(function(e){
|
|
747
|
+
e.kids = [].slice.call(e.g.childNodes);
|
|
748
|
+
e.outlines = e.kids.filter(function(q){ return q.localName === "path"; }).map(function(q){
|
|
749
|
+
var o = D.el("path", {d: q.getAttribute("d"), fill: "none", stroke: col, "stroke-width": 2.5, "stroke-linejoin": "round"}, e.g);
|
|
750
|
+
return {p: o, len: o.getTotalLength ? o.getTotalLength() : 0};
|
|
751
|
+
});
|
|
752
|
+
});
|
|
753
|
+
});
|
|
754
|
+
if (dropped.length) ctx.report("size", "[map-japan] the element (" + W + "×" + H + " px) is too small for " + dropped.join(", ") + " (not drawn)");
|
|
755
|
+
// 読める層(最後の状態の字の等価物。画面にも印刷にも出ない):強調した地域、塗り分けのすべての値と階級、点・矢印・重ね描きの名前
|
|
756
|
+
var lines = [];
|
|
757
|
+
regs.forEach(function(r){ lines.push((r.x.o.label || (r.g ? r.g.name : NAME[r.cs[0]])) + (r.g ? "(" + r.g.codes.map(function(c){ return NAME[c]; }).join("・") + ")" : "")); });
|
|
758
|
+
if (vcodes.length){
|
|
759
|
+
lines.push((title || "値") + ":" + legendRows.join("、"));
|
|
760
|
+
vcodes.forEach(function(v){ lines.push(NAME[v.code] + " " + self.fmt(v.v) + (P.unit || "") + "(" + (v.ci + 1) + ")"); });
|
|
761
|
+
}
|
|
762
|
+
pl.items.forEach(function(x){
|
|
763
|
+
if (x.kind === "point" && x.o.label) lines.push(x.o.label);
|
|
764
|
+
if ((x.kind === "flow" || x.kind === "shape") && x.o.label) lines.push(x.o.label);
|
|
765
|
+
});
|
|
766
|
+
// 描いた領土(北方領土はいつも。島の点は描いたものだけ。作り手の点を置いた島はその名前が上にある)
|
|
767
|
+
lines.push("北方領土(択捉島・国後島・色丹島・歯舞群島、北海道)");
|
|
768
|
+
fixedPts.forEach(function(f){ if (ISLAND[f.name] && !f.by) lines.push(ISLAND[f.name] + "(" + NAME[f.code] + ")"); });
|
|
769
|
+
if (offInset) ctx.report("data", '[map-japan] a point, arrow or shape is in the 小笠原諸島 area, which is drawn only with islands="all" or layout="true"');
|
|
770
|
+
if (lines.length){
|
|
771
|
+
// 1 つの段落(項目ごとの要素にしない):Studio の配置の検査が、隠した子の箱まで測ってはみ出しと数えるため(v1.5.0)
|
|
772
|
+
var sr = document.createElement("p");
|
|
773
|
+
sr.className = "sr-only";
|
|
774
|
+
sr.setAttribute("style", "position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0");
|
|
775
|
+
sr.textContent = lines.join(";");
|
|
776
|
+
this.appendChild(sr);
|
|
777
|
+
}
|
|
778
|
+
// 読み上げ用の名前
|
|
779
|
+
// 名前を出す役割:figure(中の読める段落 .sr-only がそのまま読める。img にすると段落が読まれない)
|
|
780
|
+
this.setAttribute("role", "figure");
|
|
781
|
+
if (!this.getAttribute("aria-label")) this.setAttribute("aria-label", "日本の地図" + (regs.length ? ":" + regs.map(function(r){ return r.g ? r.g.name : NAME[r.cs[0]]; }).join("、") : ""));
|
|
782
|
+
}
|
|
783
|
+
// 塗り分けの色:var(--term) を var(--bg) と(濃い側は var(--fg) と)color-mix で混ぜる。OKLab の明るさ L を、いちばん薄い階級
|
|
784
|
+
// (L = 地の L − 0.08)から濃い階級(L = 0.32 か --fg の L + 0.06)まで等しい間隔に(暗い地では向きが逆)。割合はテーマの色から計算する
|
|
785
|
+
// (color-mix の oklab の混ぜは L について線形)。読めなければ決まった割合。n は 1 以上(6 以上は mount が知らせる)
|
|
786
|
+
classColors(n, quiet, ctx){
|
|
787
|
+
var cs = getComputedStyle(this), get = function(v){ return rgbOf(cs.getPropertyValue(v).trim()); };
|
|
788
|
+
var bg = get("--bg"), term = get("--term"), fg = get("--fg"), out = [];
|
|
789
|
+
if (n <= 1) return ["var(--term)"];
|
|
790
|
+
if (!bg || !term || !fg){
|
|
791
|
+
for (var j = 0; j < n; j++) out.push("color-mix(in oklab, var(--term) " + (12 + 88 * j / (n - 1)).toFixed(1) + "%, var(--bg))");
|
|
792
|
+
return out;
|
|
793
|
+
}
|
|
794
|
+
var Lb = oklab(bg)[0], Lt = oklab(term)[0], Lf = oklab(fg)[0];
|
|
795
|
+
// 明るい地:薄い階級は地より 0.08 暗く、濃い階級は 0.32 か --fg + 0.06。暗い地(地が字より暗い):向きを逆に、薄い階級は地より
|
|
796
|
+
// 0.08 明るく、値のない陸(--line 55% と地)よりも 0.06 明るく、濃い階級は 0.86 か --fg − 0.06(地から字の色へ。階級がつぶれない)
|
|
797
|
+
var light = Lb >= Lf, ln = get("--line"), Ll = ln ? Lb + 0.55 * (oklab(ln)[0] - Lb) : Lb;
|
|
798
|
+
var hi = light ? Lb - 0.08 : Math.max(Lb + 0.08, Ll + 0.06), lo = light ? Math.max(0.32, Lf + 0.06) : Math.min(0.86, Lf - 0.06);
|
|
799
|
+
if (Math.abs(hi - lo) / (n - 1) < 0.08 && !quiet) ctx.report("theme", "[map-japan] the theme's colours give less than 0.08 lightness between " + n + " classes");
|
|
800
|
+
for (var i = 0; i < n; i++){
|
|
801
|
+
var L = hi - (hi - lo) * i / (n - 1);
|
|
802
|
+
// L が地と --term の間なら --term を地に、--term を越えれば --fg を --term に混ぜる(明るい地では 2.0.0 と同じ式)
|
|
803
|
+
if ((L - Lt) * (Lb - Lt) >= 0) out.push("color-mix(in oklab, var(--term) " + (100 * Math.min(1, Math.max(0, (Lb - L) / (Lb - Lt || 1e-6)))).toFixed(1) + "%, var(--bg))");
|
|
804
|
+
else out.push("color-mix(in oklab, var(--fg) " + (100 * Math.min(1, (L - Lt) / ((Lf - Lt) || 1e-6))).toFixed(1) + "%, var(--term))");
|
|
805
|
+
}
|
|
806
|
+
return out;
|
|
807
|
+
}
|
|
808
|
+
// 数の書き方:3 桁ごとのカンマ、小数桁(m-bars と同じ)
|
|
809
|
+
fmt(v){
|
|
810
|
+
var s = Math.abs(v).toFixed(this.props.digits).split("."), i = s[0].replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
|
811
|
+
return (v < 0 ? "−" : "") + i + (s[1] ? "." + s[1] : "");
|
|
812
|
+
}
|
|
813
|
+
// 段階の長さ:その段階の項目の at + dur の最大(地図そのものは段階 0 から出ていて動かない)
|
|
814
|
+
duration(k){
|
|
815
|
+
var dur = this.props.dur, m = 0;
|
|
816
|
+
this.plan().items.forEach(function(x){ if (x.step === k) m = Math.max(m, x.at + dur); });
|
|
817
|
+
return m;
|
|
818
|
+
}
|
|
819
|
+
render(k, t, ctx){
|
|
820
|
+
var P = this.props, D = base, dur = P.dur, vr = this.variant, lecture = !!ctx.preview, pl = this.plan(), FAINT = 0.45;
|
|
821
|
+
if (lecture) FAINT = base.previewOpacity(this); // 先の段階の薄さ:テーマの --preview-opacity(ないときは 0.45)
|
|
822
|
+
// 地図そのもの(陸・枠・枠の名前・すべての名前)は段階 0 から出ている(見出しや軸と同じ)
|
|
823
|
+
this.allNames.forEach(function(g){ g.setAttribute("opacity", 1); });
|
|
824
|
+
var legendO = 0;
|
|
825
|
+
this.items.forEach(function(it){
|
|
826
|
+
var x = it.x, faint = lecture && x.step > k;
|
|
827
|
+
var tt = x.step < k ? Infinity : x.step > k ? -1 : t - x.at;
|
|
828
|
+
if (faint) tt = Infinity;
|
|
829
|
+
var mul = faint ? FAINT : 1;
|
|
830
|
+
// 動きの区切り:fade は 0〜0.6 dur で現れ、字は 0.4〜1.0 dur。sweep は順位に応じて 0〜0.4 dur 遅らせ、0.6 dur で現れる
|
|
831
|
+
var lo = tt < 0 ? 0 : D.prog(tt, dur * 0.4, dur * 0.6) * mul;
|
|
832
|
+
if (it.flow){
|
|
833
|
+
// 矢印は線を引いていく(どの見せ方も同じ)。矢じりは引き終わりに
|
|
834
|
+
var e = tt < 0 ? 0 : D.prog(tt, 0, dur * 0.7), L = it.len;
|
|
835
|
+
it.line.setAttribute("opacity", tt < 0 ? 0 : mul);
|
|
836
|
+
it.line.setAttribute("stroke-dasharray", e >= 1 ? "" : L.toFixed(1) + " " + L.toFixed(1));
|
|
837
|
+
it.line.setAttribute("stroke-dashoffset", e >= 1 ? "" : (L * (1 - e)).toFixed(1));
|
|
838
|
+
it.head.setAttribute("opacity", ((tt < 0 ? 0 : D.prog(tt, dur * 0.65, dur * 0.15)) * mul).toFixed(3));
|
|
839
|
+
}
|
|
840
|
+
it.els.forEach(function(el){
|
|
841
|
+
var s0 = vr === "sweep" ? (el.rank || 0) * dur * 0.4 : 0, op;
|
|
842
|
+
if (vr === "draw" && (el.outlines || el.line) && tt < 0){
|
|
843
|
+
// まだの段階:mount の直後の属性に戻す(前の呼び出しの値を残さない。docs/contract.md §3)。g が見えないので見た目は同じ。
|
|
844
|
+
// 0 を書かずに属性を消すのは、v1.10.0 の段階 0 と同じ DOM にするため(見えない子の opacity="0" だけで、Chrome は
|
|
845
|
+
// 同じ地図の字を LCD の縁取りでなく灰色の縁取りで描く:Linux・Windows の CI で test-default-variant が違いを見つけた)
|
|
846
|
+
op = 0;
|
|
847
|
+
if (el.outlines){
|
|
848
|
+
el.kids.forEach(function(q){ q.removeAttribute("opacity"); });
|
|
849
|
+
el.outlines.forEach(function(q){ q.p.removeAttribute("opacity"); q.p.removeAttribute("stroke-dasharray"); q.p.removeAttribute("stroke-dashoffset"); });
|
|
850
|
+
}
|
|
851
|
+
if (el.line){
|
|
852
|
+
el.line.setAttribute("stroke-dasharray", it.x.o.dash ? "10 7" : "");
|
|
853
|
+
el.line.removeAttribute("stroke-dashoffset");
|
|
854
|
+
if (el.fill) el.fill.removeAttribute("opacity");
|
|
855
|
+
}
|
|
856
|
+
}
|
|
857
|
+
else if (vr === "draw" && (el.outlines || el.line)){
|
|
858
|
+
// 輪郭を 0〜0.6 dur で引き、塗りを 0.4〜1.0 dur で。輪郭は 0.8〜1.0 dur で消える
|
|
859
|
+
var de = D.prog(tt, 0, dur * 0.6), fe = D.prog(tt, dur * 0.4, dur * 0.6), oe = 1 - D.prog(tt, dur * 0.8, dur * 0.2);
|
|
860
|
+
op = mul;
|
|
861
|
+
if (el.outlines){
|
|
862
|
+
el.kids.forEach(function(q){ q.setAttribute("opacity", fe.toFixed(3)); });
|
|
863
|
+
el.outlines.forEach(function(q){
|
|
864
|
+
var L = q.len;
|
|
865
|
+
q.p.setAttribute("opacity", oe.toFixed(3));
|
|
866
|
+
q.p.setAttribute("stroke-dasharray", L.toFixed(1) + " " + L.toFixed(1));
|
|
867
|
+
q.p.setAttribute("stroke-dashoffset", (L * (1 - de)).toFixed(1));
|
|
868
|
+
});
|
|
869
|
+
}
|
|
870
|
+
if (el.line){
|
|
871
|
+
var L2 = el.len, done = de >= 1 || !L2;
|
|
872
|
+
el.line.setAttribute("stroke-dasharray", done ? (it.x.o.dash ? "10 7" : "") : L2.toFixed(1) + " " + L2.toFixed(1));
|
|
873
|
+
el.line.setAttribute("stroke-dashoffset", done ? "" : (L2 * (1 - de)).toFixed(1));
|
|
874
|
+
if (el.fill) el.fill.setAttribute("opacity", fe.toFixed(3));
|
|
875
|
+
}
|
|
876
|
+
}
|
|
877
|
+
else op = tt < 0 ? 0 : D.prog(tt, s0, dur * 0.6) * mul;
|
|
878
|
+
el.g.setAttribute("opacity", op.toFixed(3));
|
|
879
|
+
});
|
|
880
|
+
it.txt.forEach(function(g){ g.setAttribute("opacity", lo.toFixed(3)); });
|
|
881
|
+
if (x.kind === "values") legendO = lo;
|
|
882
|
+
});
|
|
883
|
+
if (this.legendG) this.legendG.setAttribute("opacity", legendO.toFixed(3));
|
|
884
|
+
// 作り手の点が置かれた島:島の点は作り手の点が現れるのと入れ替わりに消える(点は 1 つ)
|
|
885
|
+
this.fixedPts.forEach(function(f){
|
|
886
|
+
if (!f.byIt) return;
|
|
887
|
+
// 授業の表示で作り手の点が薄く見えているあいだは、島の点はそのまま(入れ替わるのはその段階になってから)
|
|
888
|
+
var o = (lecture && f.byIt.x.step > k ? 1 : 1 - (+f.byIt.els[0].g.getAttribute("opacity") || 0)).toFixed(3);
|
|
889
|
+
f.el.setAttribute("opacity", o);
|
|
890
|
+
if (f.nameEl) f.nameEl.setAttribute("opacity", o);
|
|
891
|
+
});
|
|
892
|
+
}
|
|
893
|
+
};
|
|
894
|
+
});
|